@moralisweb3/core
Advanced tools
Comparing version 2.5.3 to 2.5.5
@@ -44,2 +44,4 @@ "use strict"; | ||
var axios_1 = __importDefault(require("axios")); | ||
var isTest_1 = require("../environment/isTest"); | ||
var noop_1 = require("../utils/noop"); | ||
var AxiosRetry = /** @class */ (function () { | ||
@@ -60,8 +62,23 @@ function AxiosRetry() { | ||
case 1: | ||
_b.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, axios_1.default.request(requestConfig)]; | ||
_b.trys.push([1, 5, , 6]); | ||
if (!(0, isTest_1.isTest)()) return [3 /*break*/, 3]; | ||
/** | ||
* Known issue where in Jest, axios.request() will leave open handlers. | ||
* See: https://stackoverflow.com/questions/69169492/async-external-function-leaves-open-handles-jest-supertest-express | ||
*/ | ||
// eslint-disable-next-line no-await-in-loop -- we have sequential and conditional async requests | ||
return [4 /*yield*/, process.nextTick(noop_1.noop)]; | ||
case 2: | ||
/** | ||
* Known issue where in Jest, axios.request() will leave open handlers. | ||
* See: https://stackoverflow.com/questions/69169492/async-external-function-leaves-open-handles-jest-supertest-express | ||
*/ | ||
// eslint-disable-next-line no-await-in-loop -- we have sequential and conditional async requests | ||
_b.sent(); | ||
_b.label = 3; | ||
case 3: return [4 /*yield*/, axios_1.default.request(requestConfig)]; | ||
case 4: | ||
response = _b.sent(); | ||
return [2 /*return*/, response]; | ||
case 3: | ||
case 5: | ||
e_1 = _b.sent(); | ||
@@ -84,7 +101,7 @@ if (attempt >= retryConfig.maxAttempts) { | ||
} | ||
return [3 /*break*/, 4]; | ||
case 4: | ||
return [3 /*break*/, 6]; | ||
case 6: | ||
attempt++; | ||
return [3 /*break*/, 1]; | ||
case 5: return [2 /*return*/]; | ||
case 7: return [2 /*return*/]; | ||
} | ||
@@ -91,0 +108,0 @@ }); |
@@ -21,3 +21,3 @@ import { Module, ModuleFactory } from './Modules/Module'; | ||
readonly name = "core"; | ||
static readonly libVersion = "2.5.3"; | ||
static readonly libVersion = "2.5.5"; | ||
constructor(modules: Modules, config: Config, logger: LoggerController); | ||
@@ -24,0 +24,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export declare const LIB_VERSION = "2.5.3"; | ||
export declare const LIB_VERSION = "2.5.5"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LIB_VERSION = void 0; | ||
exports.LIB_VERSION = "2.5.3"; | ||
exports.LIB_VERSION = "2.5.5"; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@moralisweb3/core", | ||
"author": "Moralis", | ||
"version": "2.5.3", | ||
"version": "2.5.5", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "private": false, |
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
161177
194
2386