@figuredev/orders-sdk
Advanced tools
Comparing version 0.12.43 to 0.12.44
@@ -15,5 +15,15 @@ "use strict"; | ||
const createHttpRequest = (config) => __awaiter(void 0, void 0, void 0, function* () { | ||
return yield axios_1.default.request(Object.assign({ timeout: 20000 }, config)); | ||
const defaultTimeout = 20000; | ||
const source = axios_1.default.CancelToken.source(); | ||
const timeout = setTimeout(() => { | ||
source.cancel(); | ||
}, config.timeout || defaultTimeout); | ||
try { | ||
return yield axios_1.default.request(Object.assign({ timeout: defaultTimeout, cancelToken: source.token }, config)); | ||
} | ||
finally { | ||
clearTimeout(timeout); | ||
} | ||
}); | ||
exports.createHttpRequest = createHttpRequest; | ||
//# sourceMappingURL=http.js.map |
{ | ||
"name": "@figuredev/orders-sdk", | ||
"version": "0.12.43", | ||
"version": "0.12.44", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
51031
987
1