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-13 to 3.0.0-14

2

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

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

@@ -36,12 +36,8 @@ const axios = require('axios');

if (accessToken && accessToken.length > 0) {
const payloadBase64 = accessToken.split('.')[1].replace('-', '+').replace('_', '/');
const pd = JSON.parse(base64.decode(payloadBase64));
const payloadBase64 = accessToken.split('.')[1].replace('-', '+').replace('_', '/');
const pd = JSON.parse(base64.decode(payloadBase64));
const exp = new Date(pd.exp * 1000);
const exp = new Date(pd.exp * 1000);
return Object.assign({}, pd, { exp });
}
return null;
return Object.assign({}, pd, { exp });
}

@@ -92,12 +88,13 @@

login({ email, password, url, database }) {
this.emit('login');
return new Promise((resolve, reject) => {
this.emit('login');
if (this.loggedIn) {
this.emit('login:success');
}
if (this.loggedIn) {
return this.emit('login:success');
}
if (url) this.url = url;
if (database) this.database = database;
if (url) this.url = url;
if (database) this.database = database;
this.getToken({ email, password })
this.getToken({ email, password })
.then(res => res.data)

@@ -110,3 +107,3 @@ .then(data => {

if (timeDiff < 30000 && state.loading === false) {
if (timeDiff < 30000) {
this.refresh(this.accessToken);

@@ -117,4 +114,9 @@ }

this.emit('login:success');
resolve();
})
.catch(error => this.emit('login:failed', error));
.catch((error) => {
this.emit('login:failed', error);
reject(error);
});
});
}

@@ -121,0 +123,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