Socket
Socket
Sign inDemoInstall

elarian

Package Overview
Dependencies
Maintainers
3
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elarian - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

8

lib/client.js

@@ -17,3 +17,3 @@ /* eslint-disable max-len */

function Client(config) {
const opts = {
const conf = {
...config,

@@ -35,3 +35,3 @@ };

const error = validate(opts, constraints);
const error = validate(conf, constraints);
if (error) {

@@ -42,3 +42,4 @@ throw error;

this.config = {
options: {
...conf,
options: conf.options || {
uris: {

@@ -49,3 +50,2 @@ social: 'id.elarian.com:443',

},
...opts,
};

@@ -52,0 +52,0 @@ this._socialService = null;

@@ -24,10 +24,2 @@ /* eslint-disable no-underscore-dangle */

Elarian.prototype.fetchUserData = function fetchUserData() {
throw new Error('Not implemented');
};
Elarian.prototype.updateUserData = function updateUserData() {
throw new Error('Not implemented');
};
/**

@@ -39,3 +31,3 @@ * Lease app state

Elarian.prototype.fetchAppState = function fetchAppState() {
const { appId, sessionId } = this.config;
const { appId, token } = this.config;
const service = this._getAppStateService();

@@ -45,3 +37,3 @@ return new Promise((resolve, reject) => {

appId,
sessionId,
token,
};

@@ -69,3 +61,3 @@ service.GetAppState(params, (error, result) => {

const { appId, sessionId } = this.config;
const { appId, token } = this.config;
const service = this._getAppStateService();

@@ -77,3 +69,3 @@

appId,
sessionId,
token,
state: data,

@@ -80,0 +72,0 @@ },

{
"name": "elarian",
"version": "0.5.3",
"version": "0.5.4",
"description": "Elarian JavaScript SDK",

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

@@ -29,10 +29,13 @@ # Elarian

elarian.on('consentDenied', (userId, data) => {
elarian.on('consentDenied', (userId) => {
// ...
});
const userId = 'abc...';
elarian.on('consentGranted', (userId, data) => {
// ...
});
const { state } = await elarian.fetchAppState();
const data = JSON.parse(state.toString());
await elarian.updateAppState({ state: Buffer.from(JSON.stringify({ ...data, status: 'good boy' })) });
await elarian.updateAppState(Buffer.from(JSON.stringify({ ...data, status: 'good boy' })));

@@ -69,3 +72,3 @@ ```

- Missing method to lease/get/fetch user metadata
- `resumable` connection options prevents app from connecting
- Missing partial state updates
- Missing consent event notifications

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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