Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elastic.io/maester-client

Package Overview
Dependencies
Maintainers
6
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic.io/maester-client - npm Package Compare versions

Comparing version 5.0.2-dev.4 to 5.0.2-dev.5

4

CHANGELOG.md

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc