@elastic.io/maester-client
Advanced tools
Comparing version 5.0.2-dev.4 to 5.0.2-dev.5
@@ -1,3 +0,3 @@ | ||
# 5.0.2 (March 07, 2024) | ||
* Updated @elastic.io/component-commons-library to 3.2.0 | ||
# 5.0.2 (March 20, 2024) | ||
* Got rid of @elastic.io/component-commons-library lib as a dependency to avoid circular dependency. The only function that was used from that library has been moved to this library source code | ||
@@ -4,0 +4,0 @@ # 5.0.1 (December 22, 2022) |
{ | ||
"name": "@elastic.io/maester-client", | ||
"version": "5.0.2-dev.4", | ||
"version": "5.0.2-dev.5", | ||
"description": "The official object-storage client", | ||
@@ -56,3 +56,3 @@ "main": "dist/src/index.js", | ||
"is-uuid": "1.0.2", | ||
"mocha": "8.1.0", | ||
"mocha": "10.3.0", | ||
"nock": "12.0.3", | ||
@@ -66,3 +66,2 @@ "nyc": "15.1.0", | ||
"@elastic.io/bunyan-logger": "1.0.8", | ||
"@elastic.io/component-commons-library": "3.2.0-dev.4", | ||
"@types/sinon": "10.0.0", | ||
@@ -69,0 +68,0 @@ "axios": "0.26.1", |
@@ -14,3 +14,2 @@ "use strict"; | ||
const stream_mime_type_1 = require("stream-mime-type"); | ||
const externalApi_1 = require("@elastic.io/component-commons-library/dist/src/externalApi"); | ||
const logger_1 = __importDefault(require("./logger")); | ||
@@ -69,3 +68,3 @@ const package_json_1 = __importDefault(require("../package.json")); | ||
logger_1.default.warn({ err, status: res === null || res === void 0 ? void 0 : res.status, statusText: res === null || res === void 0 ? void 0 : res.statusText }, `Error during object request, retrying (${currentRetries + 1})`); | ||
await (0, externalApi_1.exponentialSleep)(currentRetries); | ||
await (0, utils_1.exponentialSleep)(currentRetries); | ||
currentRetries++; | ||
@@ -72,0 +71,0 @@ continue; |
@@ -11,1 +11,3 @@ import { Readable } from 'stream'; | ||
export declare const validateAndGetRetryOptions: ({ retriesCount, requestTimeout }: RetryOptions) => RetryOptions; | ||
export declare const exponentialSleep: (currentRetries: number) => Promise<unknown>; | ||
export declare const exponentialDelay: (currentRetries: number) => number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateAndGetRetryOptions = exports.getFreshStreamChecker = exports.streamFromData = exports.parseJson = void 0; | ||
exports.exponentialDelay = exports.exponentialSleep = exports.validateAndGetRetryOptions = exports.getFreshStreamChecker = exports.streamFromData = exports.parseJson = void 0; | ||
const stream_1 = require("stream"); | ||
@@ -49,1 +49,13 @@ const errors_1 = require("./errors"); | ||
exports.validateAndGetRetryOptions = validateAndGetRetryOptions; | ||
const exponentialSleep = async (currentRetries) => sleep((0, exports.exponentialDelay)(currentRetries)); | ||
exports.exponentialSleep = exponentialSleep; | ||
const sleep = async (ms) => new Promise((resolve) => { | ||
setTimeout(resolve, ms); | ||
}); | ||
const exponentialDelay = (currentRetries) => { | ||
const maxBackoff = 15000; | ||
const delay = (2 ** currentRetries) * 100; | ||
const randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay | ||
return Math.min(delay + randomSum, maxBackoff); | ||
}; | ||
exports.exponentialDelay = exponentialDelay; |
{ | ||
"name": "@elastic.io/maester-client", | ||
"version": "5.0.2-dev.4", | ||
"version": "5.0.2-dev.5", | ||
"description": "The official object-storage client", | ||
@@ -56,3 +56,3 @@ "main": "dist/src/index.js", | ||
"is-uuid": "1.0.2", | ||
"mocha": "8.1.0", | ||
"mocha": "10.3.0", | ||
"nock": "12.0.3", | ||
@@ -66,3 +66,2 @@ "nyc": "15.1.0", | ||
"@elastic.io/bunyan-logger": "1.0.8", | ||
"@elastic.io/component-commons-library": "3.2.0-dev.4", | ||
"@types/sinon": "10.0.0", | ||
@@ -69,0 +68,0 @@ "axios": "0.26.1", |
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
308121
8
5474
- Removed@elastic.io/component-commons-library@3.0.03.2.0-dev.4(transitive)
- Removed@elastic.io/jsonata-moment@1.1.41.1.6-dev.1(transitive)
- Removed@elastic.io/maester-client@4.0.05.0.1(transitive)
- Removed@elastic.io/ntlm-client@1.0.0(transitive)
- Removedaccounting@0.4.1(transitive)
- Removedajv@6.12.68.17.1(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedansicolors@0.2.1(transitive)
- Removedansistyles@0.1.3(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedastral-regex@2.0.0(transitive)
- Removedasync@3.2.3(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedaxios@0.27.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedbetter-npm-audit@3.7.3(transitive)
- Removedbunyan@1.8.14(transitive)
- Removedbunyan-format@0.2.1(transitive)
- Removedbunyan-serializers@0.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcommander@8.3.0(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removedcrc@3.4.4(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddayjs@1.11.13(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedelasticio-node@0.0.9(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfast-uri@3.0.3(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.11.0.0(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsonata@1.7.01.8.7(transitive)
- Removedjsonwebtoken@8.5.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedlodash.includes@4.3.0(transitive)
- Removedlodash.isboolean@3.0.3(transitive)
- Removedlodash.isinteger@4.0.4(transitive)
- Removedlodash.isnumber@3.0.3(transitive)
- Removedlodash.isplainobject@4.0.6(transitive)
- Removedlodash.isstring@4.0.1(transitive)
- Removedlodash.once@4.1.1(transitive)
- Removedlodash.truncate@4.4.2(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedobject-keys@0.4.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedq@1.4.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedremove-leading-slash@1.0.1(transitive)
- Removedremove-trailing-slash@0.1.1(transitive)
- Removedrequest@2.88.2(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsemver@5.7.2(transitive)
- Removedslice-ansi@4.0.0(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstream-counter@1.0.0(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedtable@6.9.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.0.13.4.0(transitive)
- Removedverror@1.10.0(transitive)
- Removedxtend@2.1.2(transitive)