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.7 to 1.1.8-beta.1

0

build/lib/api/Extensions.js

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

12

build/lib/services/fetchTokenIntercept.js

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

function shouldIntercept(baseApi) {
function shouldIntercept(baseApi, additionalApiEndpoints) {
// Regex used to match urls and detect if url belongs to Shoutem api or in case of local

@@ -60,3 +60,5 @@ // development to locahost. Regex tries to match url hostname against against shoutem api base

// eslint-disable-next-line max-len
var apiSubdomainRegex = new RegExp('^([.a-z0-9]*?).*(localhost|' + baseApi + ')$', 'g');
var additionalEndpoints = _lodash2.default.join(additionalApiEndpoints, '|');
var apiSubdomainRegex = new RegExp('^([.a-z0-9]*?).*(localhost|' + baseApi + '|' + additionalEndpoints + ')', 'g');
console.log(apiSubdomainRegex);

@@ -98,6 +100,8 @@ return function (request) {

function initializeFetchTokenInterceptor(config) {
console.log('fti config', config);
var refreshToken = config.auth.token;
var _config$url = config.url,
auth = _config$url.auth,
baseApi = _config$url.baseApi;
baseApi = _config$url.baseApi,
additionalApiEndpoints = _config$url.additionalApiEndpoints;

@@ -112,3 +116,3 @@

createAccessTokenRequest: createAccessTokenRequest,
shouldIntercept: shouldIntercept(baseApi),
shouldIntercept: shouldIntercept(baseApi, additionalApiEndpoints),
// can be removed when server-side token invalidation works (SEEXT-4012)

@@ -115,0 +119,0 @@ shouldWaitForTokenRenewal: true

{
"name": "@shoutem/api-sdk",
"version": "1.1.7",
"version": "1.1.8-beta.1",
"description": "Javascript SDK for Shoutem API using fetch",

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

"build-lib": "babel src --out-dir build/lib --copy-files",
"build:debug": "npm run build-lib -- --source-maps",
"test": "mocha --require babelTestSetup --reporter spec --recursive test",
"coverage": "babel-node node_modules/isparta/bin/isparta cover --report text --report html node_modules/mocha/bin/_mocha -- -R spec --recursive test",
"lint": "eslint src test",

@@ -33,5 +33,4 @@ "publish": "npm publish --access public --tag latest"

"chai": "^3.5.0",
"chai-shallow-deep-equal": "^1.4.0",
"deep-freeze": "0.0.1",
"isparta": "^4.0.0",
"isparta": "4.1.1",
"istanbul": "0.4.4",

@@ -47,6 +46,6 @@ "json-loader": "^0.5.4",

"dependencies": {
"@shoutem/fetch-token-intercept": "^0.3.0",
"lodash": "^4.17.4",
"urijs": "^1.18.9"
"@shoutem/fetch-token-intercept": "0.3.0",
"lodash": "4.17.11",
"urijs": "1.19.1"
}
}
}

@@ -0,0 +0,0 @@ # README #

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