New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rettersoft/rbs-node-sdk

Package Overview
Dependencies
Maintainers
6
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rettersoft/rbs-node-sdk - npm Package Compare versions

Comparing version

to
0.1.5

3

dist/index.d.ts

@@ -95,6 +95,3 @@ import { createResponse, parseActionEvent, ActionEvent, RESPONSE_TYPE, parseClassValidatorErrors, ValidationError } from './helpers';

post: (url: string, action: RBSAction, tokenData: RBSTokenData) => Promise<any>;
getSafeNow: () => number;
setTokenData: (tokenData: RBSTokenData) => Promise<void>;
getJsonWebToken: () => any;
send: (action: RBSAction) => Promise<Array<any>>;
}

@@ -52,3 +52,2 @@ "use strict";

var jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
var async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
var LogLevel;

@@ -215,52 +214,2 @@ (function (LogLevel) {

// }
this.getSafeNow = function () {
return Math.round((new Date()).getTime() / 1000) + 30; // Plus 30 seconds, just in case.
};
this.setTokenData = function (tokenData) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!(typeof document != 'undefined')) return [3 /*break*/, 1];
// I'm on the web!
// Browser environment
localStorage.setItem(RBS_TOKENS_KEY, JSON.stringify(tokenData));
return [3 /*break*/, 4];
case 1:
if (!(typeof navigator != 'undefined' && navigator.product == 'ReactNative')) return [3 /*break*/, 3];
// I'm in react-native
console.log('DEBUG:RUNNING ON ReactNative 2');
return [4 /*yield*/, async_storage_1.default.setItem(RBS_TOKENS_KEY, JSON.stringify(tokenData))];
case 2:
_a.sent();
return [3 /*break*/, 4];
case 3:
// I'm in node js
// Node environment
this.latestTokenData = tokenData;
_a.label = 4;
case 4: return [2 /*return*/];
}
});
}); };
this.getJsonWebToken = function () {
if (typeof document != 'undefined') {
// I'm on the web!
// Browser environment
console.log("DEBUG:REQUIRE 1");
// return require('jsonwebtoken')
return {};
}
else if (typeof navigator != 'undefined' && navigator.product == 'ReactNative') {
// I'm in react-native
console.log("DEBUG:REQUIRE 2");
return {};
}
else {
// I'm in node js
// Node environment
// return require('jsonwebtoken')
console.log("DEBUG:REQUIRE 3");
return {};
}
};
// PUBLIC METHODS

@@ -267,0 +216,0 @@ this.send = function (action) { return __awaiter(_this, void 0, void 0, function () {

2

package.json
{
"name": "@rettersoft/rbs-node-sdk",
"version": "0.1.3",
"version": "0.1.5",
"description": "Nodejs sdk for retter business services",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet