Comparing version 3.1.1 to 3.1.2
{ | ||
"name": "cockatiel", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "A resilience and transient-fault-handling library that allows developers to express policies such as Backoff, Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. Inspired by .NET Polly.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -26,3 +26,3 @@ # Cockatiel | ||
// times with a randomized exponential backoff. | ||
const retry = retry(handleAll, { maxAttempts: 3, backoff: new ExponentialBackoff() }); | ||
const retryPolicy = retry(handleAll, { maxAttempts: 3, backoff: new ExponentialBackoff() }); | ||
@@ -32,3 +32,3 @@ // Create a circuit breaker that'll stop calling the executed function for 10 | ||
// to recover without getting tons of traffic. | ||
const circuitBreaker = circuitBreaker(handleAll, { | ||
const circuitBreakerPolicy = circuitBreaker(handleAll, { | ||
halfOpenAfter: 10 * 1000, | ||
@@ -39,3 +39,3 @@ breaker: new ConsecutiveBreaker(5), | ||
// Combine these! Create a policy that retries 3 times, calling through the circuit breaker | ||
const retryWithBreaker = wrap(retry, circuitBreaker); | ||
const retryWithBreaker = wrap(retryPolicy, circuitBreakerPolicy); | ||
@@ -42,0 +42,0 @@ exports.handleRequest = async (req, res) => { |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
0
408315
165
4910