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

@serverless/platform-sdk

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/platform-sdk - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0-5-g7a1454c

dist/apps/getApps.js

9

dist/apps/index.js

@@ -25,3 +25,12 @@ 'use strict';

var _getApps = require('./getApps');
Object.defineProperty(exports, 'getApps', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_getApps).default;
}
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=index.js.map

17

dist/fetch.js

@@ -77,3 +77,10 @@ 'use strict';

case 0:
_context.next = 2;
if (process.env.SDK_HTTP_DEBUG) {
// eslint-disable-next-line no-console
console.log(`platform-sdk fetching: ${options.method || 'GET'} ${url} ${JSON.stringify(options.headers) || 'NO_HEADERS'} ${options.body || 'NO_BODY'}`);
} else if (process.env.SLS_DEBUG) {
// eslint-disable-next-line no-console
console.log(`platform-sdk fetching: ${options.method || 'GET'} ${url}`);
}
_context.next = 3;
return (0, _isomorphicFetch2.default)(url, Object.assign({

@@ -85,11 +92,11 @@ agent

case 2:
case 3:
response = _context.sent;
_context.next = 5;
_context.next = 6;
return (0, _utils.checkHttpResponse)(response);
case 5:
case 6:
return _context.abrupt('return', response);
case 6:
case 7:
case 'end':

@@ -96,0 +103,0 @@ return _context.stop();

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

var core = require('./core');
var register = require('./register');
var deployProfiles = require('./deployProfiles');

@@ -28,3 +29,3 @@ var stateVariables = require('./stateVariables');

Deployment
}, core, service, apps, tenants, accessKeys, login, logout, utils, logs, secrets, safeguards, deployProfiles, stateVariables, {
}, core, register, service, apps, tenants, accessKeys, login, logout, utils, logs, secrets, safeguards, deployProfiles, stateVariables, {
urls,

@@ -31,0 +32,0 @@ configureFetchDefaults

@@ -31,6 +31,12 @@ 'use strict';

// id token not expired, no need to renew
if (configFile.users[currentId].dashboard.refreshToken) {
_context.next = 4;
break;
}
return _context.abrupt('return');
case 4:
if (!(Number(configFile.users[currentId].dashboard.expiresAt) > Date.now())) {
_context.next = 4;
_context.next = 6;
break;

@@ -41,5 +47,5 @@ }

case 4:
case 6:
body = JSON.stringify({ refreshToken: configFile.users[currentId].dashboard.refreshToken });
_context.next = 7;
_context.next = 9;
return (0, _fetch2.default)(`${_config2.default.backendUrl}tokens/refresh`, {

@@ -50,8 +56,8 @@ method: 'POST',

case 7:
case 9:
response = _context.sent;
_context.next = 10;
_context.next = 12;
return response.json();
case 10:
case 12:
tokens = _context.sent;

@@ -65,3 +71,3 @@ expiresAt = tokens.expires_in * 1000 + Date.now();

case 16:
case 18:
case 'end':

@@ -68,0 +74,0 @@ return _context.stop();

@@ -16,3 +16,12 @@ 'use strict';

var _createTenant = require('./createTenant');
Object.defineProperty(exports, 'createTenant', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_createTenant).default;
}
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=index.js.map

@@ -107,3 +107,3 @@ 'use strict';

var user = (0, _ramda.path)(['users', config.userId, 'dashboard'], config);
if (!user || !user.username || !user.idToken) {
if (!user || !user.username) {
return null; // user is logged out

@@ -110,0 +110,0 @@ }

{
"name": "@serverless/platform-sdk",
"version": "1.0.2",
"version": "2.0.0-5-g7a1454c",
"description": "Serverless Platform SDK",

@@ -5,0 +5,0 @@ "author": "Serverless, Inc.",

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