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

directus-sdk-javascript

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directus-sdk-javascript - npm Package Compare versions

Comparing version 3.0.0-16 to 3.0.0-17

2

package.json
{
"name": "directus-sdk-javascript",
"version": "3.0.0-16",
"version": "3.0.0-17",
"description": "WIP - Directus SDK for JavaScript (Node and Browser)",

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

@@ -14,3 +14,10 @@ const axios = require('axios');

this._headers = {};
this._refreshInterval = null;
this._refreshInterval = setInterval(() => {
if (!this.accessToken || !this.url) return;
const timeDiff = this.payload.exp.getTime() - Date.now();
if (timeDiff < 30000) {
this.refresh(this.accessToken);
}
}, 10000);
}

@@ -52,6 +59,6 @@

if (accessTokenExpired) return false;
if (accessTokenExpired === false) return true;
}
return true;
return false;
}

@@ -104,10 +111,3 @@

this.refreshInterval = setInterval(() => {
const timeDiff = this.payload.exp.getTime() - Date.now();
if (timeDiff < 30000) {
this.refresh(this.accessToken);
}
}, 10000)
this.emit('login:success');

@@ -129,4 +129,2 @@ resolve();

this.database = '_';
clearInterval(this._refreshInterval);
}

@@ -148,3 +146,3 @@

this.logout();
})
});
}

@@ -151,0 +149,0 @@

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