Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atajox-lib

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atajox-lib - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

1

dist/queue/queue.js

@@ -71,2 +71,3 @@ 'use strict';

if (!this.processInterval) {
setTimeout(function () { _this.process(); }, 1000);
this.processInterval = setInterval(function () {

@@ -73,0 +74,0 @@ _this.process();

@@ -10,2 +10,3 @@ export declare class AtajoXTime {

isDeviceTimeValid(): Promise<{}>;
private getTimeFromCore();
/**

@@ -12,0 +13,0 @@ * Get time from zone

14

dist/time/time.js
'use strict';
var request = require('request');
import { atajoXConfig } from '../config/config';
import { atajoXApi } from "../api/api";
var AtajoXTime = /** @class */ (function () {

@@ -18,3 +19,3 @@ function AtajoXTime() {

return new Promise(function (resolve, reject) {
_this.getTimeFromZone('Africa/Johannesburg').then(function (data) {
_this.getTimeFromCore().then(function (data) {
if (data == null)

@@ -29,5 +30,3 @@ resolve(false);

var timeDifference = Math.abs(deviceTime - remoteTime);
var gmtOffset = data['gmtOffset'];
var timeDeviation = timeDifference - gmtOffset;
if (timeDeviation > maxDeviation) {
if (timeDifference > maxDeviation) {
resolve(false);

@@ -44,2 +43,9 @@ }

};
AtajoXTime.prototype.getTimeFromCore = function () {
return new Promise(function (resolve, reject) {
atajoXApi.addTransaction('@atajo-time/v1/time/now', {}, { timeout: 180000 }).subscribe(function (result) {
resolve(result.data);
}, function (error) { reject(); }, function () { });
});
};
/**

@@ -46,0 +52,0 @@ * Get time from zone

{
"name": "atajox-lib",
"version": "0.0.7",
"version": "0.0.8",
"description": "AtajoX API Library",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -1,2 +0,2 @@

*Global installs*
## Global installs

@@ -7,3 +7,3 @@ $ npm install -g karma-cli

*Available Plugins*
## Available Plugins

@@ -19,3 +19,3 @@ cordova-plugin-app-version

*Database Support*
## Database Support

@@ -32,5 +32,53 @@ https://ionicframework.com/docs/storage/

## Code Push Support
*Start tests*
`$ cordova plugin add https://github.com/k1dbl4ck/cordova-plugin-atajo-update.git`
Remember to remove the old code push first.
In Ionic2:
```
platform.ready(() => {
atajoXConfig.set('domain', {your-domain-name});
let update = new AtajoXUpdate();
update.checkForUpdates();
});
```
The following events can be listened through atajoXEvents:
```
'atajo:update:initialized',
'atajo:update:filesystem:ready',
'atajo:update:folder:ready',
'atajo:update:error',
'atajo:update:download:success',
'atajo:update:download:error',
'atajo:update:download:progress',
'atajo:update:unzip:success',
'atajo:update:unzip:error',
'atajo:update:unzip:progress',
'atajo:update:file:remove:success',
'atajo:update:file:remove:error',
'atajo:update:file:get:error'
```
Example:
```
import {atajoXEvents} from 'atajox-lib';
...
atajoXEvents.subscribe('atajo:update:file:remove:success', (data) => {
// update installed successfully
});
...
```
## Start tests
$ karma start

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc