@aws-sdk/util-waiter
Advanced tools
Comparing version 3.178.0 to 3.180.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27) | ||
### Features | ||
* **util-waiter:** include reason on waiter result ([#3534](https://github.com/aws/aws-sdk-js-v3/issues/3534)) ([7f19c17](https://github.com/aws/aws-sdk-js-v3/commit/7f19c174b52ed7cc92c70374a5ff4c67f7d953c5)) | ||
# [3.178.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.177.0...v3.178.0) (2022-09-23) | ||
@@ -8,0 +19,0 @@ |
@@ -15,5 +15,5 @@ "use strict"; | ||
var _a; | ||
const { state } = await acceptorChecks(client, input); | ||
const { state, reason } = await acceptorChecks(client, input); | ||
if (state !== waiter_1.WaiterState.RETRY) { | ||
return { state }; | ||
return { state, reason }; | ||
} | ||
@@ -32,5 +32,5 @@ let currentAttempt = 1; | ||
await (0, sleep_1.sleep)(delay); | ||
const { state } = await acceptorChecks(client, input); | ||
const { state, reason } = await acceptorChecks(client, input); | ||
if (state !== waiter_1.WaiterState.RETRY) { | ||
return { state }; | ||
return { state, reason }; | ||
} | ||
@@ -37,0 +37,0 @@ currentAttempt += 1; |
@@ -14,11 +14,11 @@ import { __awaiter, __generator } from "tslib"; | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var state, currentAttempt, waitUntil, attemptCeiling, delay, state_1; | ||
var _b; | ||
return __generator(this, function (_c) { | ||
switch (_c.label) { | ||
var _b, state, reason, currentAttempt, waitUntil, attemptCeiling, delay, _c, state_1, reason_1; | ||
var _d; | ||
return __generator(this, function (_e) { | ||
switch (_e.label) { | ||
case 0: return [4, acceptorChecks(client, input)]; | ||
case 1: | ||
state = (_c.sent()).state; | ||
_b = _e.sent(), state = _b.state, reason = _b.reason; | ||
if (state !== WaiterState.RETRY) { | ||
return [2, { state: state }]; | ||
return [2, { state: state, reason: reason }]; | ||
} | ||
@@ -28,6 +28,6 @@ currentAttempt = 1; | ||
attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1; | ||
_c.label = 2; | ||
_e.label = 2; | ||
case 2: | ||
if (!true) return [3, 5]; | ||
if (((_b = abortController === null || abortController === void 0 ? void 0 : abortController.signal) === null || _b === void 0 ? void 0 : _b.aborted) || (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) { | ||
if (((_d = abortController === null || abortController === void 0 ? void 0 : abortController.signal) === null || _d === void 0 ? void 0 : _d.aborted) || (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) { | ||
return [2, { state: WaiterState.ABORTED }]; | ||
@@ -41,8 +41,8 @@ } | ||
case 3: | ||
_c.sent(); | ||
_e.sent(); | ||
return [4, acceptorChecks(client, input)]; | ||
case 4: | ||
state_1 = (_c.sent()).state; | ||
_c = _e.sent(), state_1 = _c.state, reason_1 = _c.reason; | ||
if (state_1 !== WaiterState.RETRY) { | ||
return [2, { state: state_1 }]; | ||
return [2, { state: state_1, reason: reason_1 }]; | ||
} | ||
@@ -49,0 +49,0 @@ currentAttempt += 1; |
{ | ||
"name": "@aws-sdk/util-waiter", | ||
"version": "3.178.0", | ||
"version": "3.180.0", | ||
"description": "Shared utilities for client waiters for the AWS SDK", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
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
40848