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

@shoutem/api-sdk

Package Overview
Dependencies
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shoutem/api-sdk - npm Package Compare versions

Comparing version 1.1.9 to 1.1.10

6

build/lib/index.js

@@ -81,8 +81,2 @@ 'use strict';

});
Object.defineProperty(exports, 'extendShouldIntercept', {
enumerable: true,
get: function get() {
return _fetchTokenIntercept.extendShouldIntercept;
}
});

@@ -89,0 +83,0 @@ var _settings = require('./services/settings');

18

build/lib/services/fetchTokenIntercept.js

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

exports.initializeFetchTokenInterceptor = initializeFetchTokenInterceptor;
exports.extendShouldIntercept = extendShouldIntercept;

@@ -61,4 +60,7 @@ var _lodash = require('lodash');

// eslint-disable-next-line max-len
// array defining additional endpoints for regex matching
var additionalEndpoints = '|' + _lodash2.default.join(additionalApiEndpoints, '|');
var apiSubdomainRegex = new RegExp('^([.a-z0-9]*?).*(localhost|' + baseApi + additionalEndpoints + ')', 'g');
return function (request) {

@@ -68,2 +70,3 @@ // add auth headers only if we're accessing known API endpoints

var requestHostname = requestUri.hostname();
var authRequired = requestHostname.match(apiSubdomainRegex);

@@ -120,15 +123,2 @@ var returnValue = authRequired && request.url !== authTokenEndpoint && request.url !== authSessionEndpoint;

fetchTokenIntercept.authorize(refreshToken);
}
function extendShouldIntercept(config) {
var _config$url2 = config.url,
baseApi = _config$url2.baseApi,
additionalApiEndpoints = _config$url2.additionalApiEndpoints;
var configuration = {
shouldIntercept: shouldIntercept(baseApi, additionalApiEndpoints)
};
fetchTokenIntercept.configure(configuration);
}
{
"name": "@shoutem/api-sdk",
"version": "1.1.9",
"version": "1.1.10",
"description": "Javascript SDK for Shoutem API using fetch",

@@ -18,3 +18,4 @@ "main": "build/lib/index.js",

"test": "mocha --require babelTestSetup --reporter spec --recursive test",
"lint": "eslint src test"
"lint": "eslint src test",
"publish": "npm publish --access public --tag latest"
},

@@ -48,2 +49,2 @@ "devDependencies": {

}
}
}
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