@jupiterone/integration-sdk-http-client
Advanced tools
Comparing version 12.8.1 to 12.8.3
@@ -25,3 +25,3 @@ "use strict"; | ||
if (err.status === 429) { | ||
const retryAfter = err.retryAfter ? err.retryAfter * 1000 : 5000; | ||
const retryAfter = err.retryAfter ? err.retryAfter * 1000 : 5_000; | ||
logger.warn({ retryAfter }, 'Received a rate limit error. Waiting before retrying.'); | ||
@@ -34,6 +34,6 @@ await (0, attempt_1.sleep)(retryAfter); | ||
maxAttempts: 3, | ||
delay: 30000, | ||
timeout: 180000, | ||
delay: 30_000, | ||
timeout: 180_000, | ||
timeoutMaxAttempts: 3, | ||
factor: 2, | ||
factor: 2, // exponential backoff factor. with 30 sec start and 3 attempts, longest wait is 2 min | ||
handleError: exports.defaultErrorHandler, | ||
@@ -353,4 +353,4 @@ }; | ||
parent: this.baseTokenBucket, | ||
maximumCapacity: tokens ?? this.tokenBucketInitialConfig?.maximumCapacity ?? 10000, | ||
refillRate: tokens ?? this.tokenBucketInitialConfig?.refillRate ?? 10000, | ||
maximumCapacity: tokens ?? this.tokenBucketInitialConfig?.maximumCapacity ?? 10_000, | ||
refillRate: tokens ?? this.tokenBucketInitialConfig?.refillRate ?? 10_000, | ||
}); | ||
@@ -426,3 +426,3 @@ return this.endpointTokenBuckets[path]; | ||
// If the header is not present, we can't determine the wait time, so we'll just wait 60 seconds | ||
return 60000; | ||
return 60_000; | ||
} | ||
@@ -429,0 +429,0 @@ if (this.rateLimitThrottling?.resetMode === 'remaining_epoch_s') { |
{ | ||
"name": "@jupiterone/integration-sdk-http-client", | ||
"version": "12.8.1", | ||
"version": "12.8.3", | ||
"description": "The HTTP client for use in JupiterOne integrations", | ||
@@ -27,3 +27,3 @@ "main": "dist/src/index.js", | ||
"@jupiterone/hierarchical-token-bucket": "^0.3.1", | ||
"@jupiterone/integration-sdk-core": "^12.8.1", | ||
"@jupiterone/integration-sdk-core": "^12.8.3", | ||
"@lifeomic/attempt": "^3.0.3", | ||
@@ -35,4 +35,4 @@ "form-data": "^4.0.0", | ||
"devDependencies": { | ||
"@jupiterone/integration-sdk-dev-tools": "^12.8.1", | ||
"@jupiterone/integration-sdk-private-test-utils": "^12.8.1", | ||
"@jupiterone/integration-sdk-dev-tools": "^12.8.3", | ||
"@jupiterone/integration-sdk-private-test-utils": "^12.8.3", | ||
"@types/node-fetch": "^2.6.11" | ||
@@ -44,3 +44,3 @@ }, | ||
"homepage": "https://github.com/JupiterOne/sdk#readme", | ||
"gitHead": "01bd7c6824a549f9931ac045468d5642fb2cc677" | ||
"gitHead": "aa9dfabc973f1b046424b742b34cafc91261c3f5" | ||
} |
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
251514