@or-sdk/base
Advanced tools
Comparing version 0.38.1 to 0.38.2-beta.2851.0
@@ -313,4 +313,4 @@ "use strict"; | ||
}; | ||
if (timeoutController_1) { | ||
timeoutTimer = setTimeout(function () { return timeoutController_1 === null || timeoutController_1 === void 0 ? void 0 : timeoutController_1.abort(new errors_1.ApiTimeoutError(constants_1.TIMEOUT_SIGNAL_REASON)); }); | ||
if (params.timeout && timeoutController_1) { | ||
timeoutTimer = setTimeout(function () { return timeoutController_1 === null || timeoutController_1 === void 0 ? void 0 : timeoutController_1.abort(new errors_1.ApiTimeoutError(constants_1.TIMEOUT_SIGNAL_REASON)); }, params.timeout); | ||
} | ||
@@ -378,4 +378,4 @@ return [4 /*yield*/, this.axios(conf)]; | ||
}; | ||
if (timeoutController_2) { | ||
timeoutTimer = setTimeout(function () { return timeoutController_2 === null || timeoutController_2 === void 0 ? void 0 : timeoutController_2.abort(new errors_1.ApiTimeoutError(constants_1.TIMEOUT_SIGNAL_REASON)); }); | ||
if (params.timeout && timeoutController_2) { | ||
timeoutTimer = setTimeout(function () { return timeoutController_2 === null || timeoutController_2 === void 0 ? void 0 : timeoutController_2.abort(new errors_1.ApiTimeoutError(constants_1.TIMEOUT_SIGNAL_REASON)); }, params.timeout); | ||
} | ||
@@ -382,0 +382,0 @@ return [4 /*yield*/, this.axios(axiosConfig)]; |
@@ -211,4 +211,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
if (timeoutController) { | ||
timeoutTimer = setTimeout(() => timeoutController === null || timeoutController === void 0 ? void 0 : timeoutController.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON))); | ||
if (params.timeout && timeoutController) { | ||
timeoutTimer = setTimeout(() => timeoutController === null || timeoutController === void 0 ? void 0 : timeoutController.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON)), params.timeout); | ||
} | ||
@@ -268,4 +268,4 @@ const { data } = yield this.axios(conf); | ||
}; | ||
if (timeoutController) { | ||
timeoutTimer = setTimeout(() => timeoutController === null || timeoutController === void 0 ? void 0 : timeoutController.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON))); | ||
if (params.timeout && timeoutController) { | ||
timeoutTimer = setTimeout(() => timeoutController === null || timeoutController === void 0 ? void 0 : timeoutController.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON)), params.timeout); | ||
} | ||
@@ -272,0 +272,0 @@ const { data } = yield this.axios(axiosConfig); |
{ | ||
"name": "@or-sdk/base", | ||
"version": "0.38.1", | ||
"version": "0.38.2-beta.2851.0", | ||
"license": "Apache-2.0", | ||
@@ -36,4 +36,3 @@ "main": "dist/cjs/index.js", | ||
"access": "public" | ||
}, | ||
"gitHead": "3f379e15a25152d1d29b9fd05613775c49e7c0be" | ||
} | ||
} |
@@ -264,4 +264,7 @@ import axios, { AxiosInstance, RawAxiosRequestHeaders, AxiosRequestConfig, AxiosError } from 'axios'; | ||
if (timeoutController) { | ||
timeoutTimer = setTimeout(() => timeoutController?.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON))); | ||
if (params.timeout && timeoutController) { | ||
timeoutTimer = setTimeout( | ||
() => timeoutController?.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON)), | ||
params.timeout, | ||
); | ||
} | ||
@@ -299,3 +302,2 @@ const { data } = await this.axios(conf); | ||
try { | ||
let timeoutController: AbortController | undefined; | ||
@@ -329,4 +331,7 @@ let signal = params.signal; | ||
if (timeoutController) { | ||
timeoutTimer = setTimeout(() => timeoutController?.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON))); | ||
if (params.timeout && timeoutController) { | ||
timeoutTimer = setTimeout( | ||
() => timeoutController?.abort(new ApiTimeoutError(TIMEOUT_SIGNAL_REASON)), | ||
params.timeout, | ||
); | ||
} | ||
@@ -333,0 +338,0 @@ const { data } = await this.axios(axiosConfig); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
171631
2605