@shoutem/api-sdk
Advanced tools
Comparing version 1.1.7 to 1.1.8-beta.1
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30827
20
667
2
+ Addedlodash@4.17.11(transitive)
+ Addedurijs@1.19.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedurijs@1.19.11(transitive)
Updatedlodash@4.17.11
Updatedurijs@1.19.1