@sp-api-sdk/auth
Advanced tools
Comparing version 1.10.0 to 1.10.1
@@ -30,3 +30,3 @@ "use strict"; | ||
try { | ||
const { data } = await axios_2.axios.post('https://api.amazon.com/auth/o2/token', body); | ||
const { data } = await axios_2.axios.post('/o2/token', body); | ||
const expiration = new Date(); | ||
@@ -33,0 +33,0 @@ expiration.setSeconds(expiration.getSeconds() + data.expires_in); |
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.axios = axios_1.default.create({ | ||
baseURL: 'https://api.amazon.com/auth/', | ||
headers: { | ||
@@ -10,0 +11,0 @@ 'user-agent': `${package_1.packageJson.name}/${package_1.packageJson.version}`, |
@@ -27,3 +27,3 @@ import { AxiosError } from 'axios'; | ||
try { | ||
const { data } = await axios.post('https://api.amazon.com/auth/o2/token', body); | ||
const { data } = await axios.post('/o2/token', body); | ||
const expiration = new Date(); | ||
@@ -30,0 +30,0 @@ expiration.setSeconds(expiration.getSeconds() + data.expires_in); |
import globalAxios from 'axios'; | ||
import { packageJson } from './package'; | ||
export const axios = globalAxios.create({ | ||
baseURL: 'https://api.amazon.com/auth/', | ||
headers: { | ||
@@ -5,0 +6,0 @@ 'user-agent': `${packageJson.name}/${packageJson.version}`, |
@@ -5,3 +5,3 @@ { | ||
"description": "Amazon Selling Partner API authentication helper class", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"main": "dist/cjs/index.js", | ||
@@ -30,3 +30,3 @@ "module": "dist/es/index.js", | ||
"dependencies": { | ||
"@aws-sdk/client-sts": "^3.163.0", | ||
"@aws-sdk/client-sts": "^3.171.0", | ||
"axios": "^0.27.2", | ||
@@ -37,3 +37,3 @@ "read-pkg-up": "^7.0.1" | ||
"nock": "^13.2.9", | ||
"type-fest": "^2.19.0" | ||
"type-fest": "^3.0.0" | ||
}, | ||
@@ -62,3 +62,3 @@ "repository": { | ||
}, | ||
"gitHead": "42038f403139340136ef5b39b2c59e5369b3d94b" | ||
"gitHead": "b1a628f884e9e251eae587cc474baf5d52c9f294" | ||
} |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25875
548
0
Updated@aws-sdk/client-sts@^3.171.0