@aws-sdk/util-waiter
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.1.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.0.0...v3.1.0) (2020-12-23) | ||
### Bug Fixes | ||
* **util-waiter:** fix compiling error with waiter ([#1812](https://github.com/aws/aws-sdk-js-v3/issues/1812)) ([ca1f0d6](https://github.com/aws/aws-sdk-js-v3/commit/ca1f0d6f93d13ea2cf28ffea22fb24f01d495cf9)), closes [#1803](https://github.com/aws/aws-sdk-js-v3/issues/1803) | ||
# [3.0.0](https://github.com/aws/aws-sdk-js-v3/compare/v1.0.0-rc.10...v3.0.0) (2020-12-15) | ||
@@ -8,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { SmithyClient, WaiterOptions, WaiterResult } from "./waiter"; | ||
import { WaiterOptions, WaiterResult } from "./waiter"; | ||
/** | ||
@@ -11,2 +11,2 @@ * Create a waiter promise that only resolves when: | ||
*/ | ||
export declare const createWaiter: <Client extends SmithyClient, Input>(options: WaiterOptions<Client>, input: Input, acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>) => Promise<WaiterResult>; | ||
export declare const createWaiter: <Client, Input>(options: WaiterOptions<Client>, input: Input, acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>) => Promise<WaiterResult>; |
@@ -7,6 +7,2 @@ "use strict"; | ||
const waiter_1 = require("./waiter"); | ||
const waiterTimeout = async (seconds) => { | ||
await utils_1.sleep(seconds); | ||
return { state: waiter_1.WaiterState.TIMEOUT }; | ||
}; | ||
const abortTimeout = async (abortSignal) => { | ||
@@ -39,2 +35,2 @@ return new Promise((resolve) => { | ||
exports.createWaiter = createWaiter; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlV2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NyZWF0ZVdhaXRlci50cyJdLCJu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YWNrb2ZmIGRlbGF5LlxuICpcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgY3JlYXRlV2FpdGVyID0gYXN5bmMgPENsaWVudCwgSW5wdXQ+KFxuICBvcHRpb25zOiBXYWl0ZXJPcHRpb25zPENsaWVudD4sXG4gIGlucHV0OiBJbnB1dCxcbiAgYWNjZXB0b3JDaGVja3M6IChjbGllbnQ6IENsaWVudCwgaW5wdXQ6IElucHV0KSA9PiBQcm9taXNlPFdhaXRlclJlc3VsdD5cbik6IFByb21pc2U8V2FpdGVyUmVzdWx0PiA9PiB7XG4gIGNvbnN0IHBhcmFtcyA9IHtcbiAgICAuLi53YWl0ZXJTZXJ2aWNlRGVmYXVsdHMsXG4gICAgLi4ub3B0aW9ucyxcbiAgfTtcbiAgdmFsaWRhdGVXYWl0ZXJPcHRpb25zKHBhcmFtcyk7XG5cbiAgY29uc3QgZXhpdENvbmRpdGlvbnMgPSBbcnVuUG9sbGluZzxDbGllbnQsIElucHV0PihwYXJhbXMsIGlucHV0LCBhY2NlcHRvckNoZWNrcyldO1xuICBpZiAob3B0aW9ucy5hYm9ydENvbnRyb2xsZXIpIHtcbiAgICBleGl0Q29uZGl0aW9ucy5wdXNoKGFib3J0VGltZW91dChvcHRpb25zLmFib3J0Q29udHJvbGxlci5zaWduYWwpKTtcbiAgfVxuICByZXR1cm4gUHJvbWlzZS5yYWNlKGV4aXRDb25kaXRpb25zKTtcbn07XG4iXX0= |
@@ -1,2 +0,2 @@ | ||
import { ResolvedWaiterOptions, SmithyClient, WaiterResult } from "./waiter"; | ||
import { ResolvedWaiterOptions, WaiterResult } from "./waiter"; | ||
/** | ||
@@ -9,2 +9,2 @@ * Function that runs indefinite polling as part of waiters. | ||
*/ | ||
export declare const runPolling: <T extends SmithyClient, S>({ minDelay, maxDelay, maxWaitTime, abortController, client }: ResolvedWaiterOptions<T>, input: S, acceptorChecks: (client: T, input: S) => Promise<WaiterResult>) => Promise<WaiterResult>; | ||
export declare const runPolling: <Client, Input>({ minDelay, maxDelay, maxWaitTime, abortController, client }: ResolvedWaiterOptions<Client>, input: Input, acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>) => Promise<WaiterResult>; |
@@ -49,2 +49,2 @@ "use strict"; | ||
exports.runPolling = runPolling; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9sbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3BvbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5Q0FBc0M7QUFDdEMscUNBQTBGO0FBRTFGOztHQUVHO0FBQ0gsTUFBTSw0QkFBNEIsR0FBRyxDQUFDLFFBQWdCLEVBQUUsUUFBZ0IsRUFBRSxjQUFzQixFQUFFLE9BQWUsRUFBRSxFQUFFO0lBQ25ILElBQUksT0FBTyxHQUFHLGNBQWM7UUFBRSxPQUFPLFFBQVEsQ0FBQztJQUM5QyxNQUFNLEtBQUssR0FBRyxRQUFRLEdBQUcsQ0FBQyxJQUFJLENBQUMsT0FBTyxHQUFHLENBQUMsQ0FBQyxDQUFDO0lBQzVDLE9BQU8sYUFBYSxDQUFDLFFBQVEsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUN4QyxDQUFDLENBQUM7QUFFRixNQUFNLGFBQWEsR0FBRyxDQUFDLEdBQVcsRUFBRSxHQUFXLEVBQUUsRUFBRSxDQUFDLEdBQUcsR0FBRyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUM7QUFFdEY7Ozs7OztHQU1HO0FBQ0ksTUFBTSxVQUFVLEdBQUcsS0FBSyxFQUM3QixFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsV0FBVyxFQUFFLGVBQWUsRUFBRSxNQUFNLEVBQTRCLEVBQ3RGLEtBQVEsRUFDUixjQUE4RCxFQUN2Qyx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aWYgKERhdGUubm93KCkgKyBkZWxheSAqIDEwMDAgPiB3YWl0VW50aWwpIHtcbiAgICAgIHJldHVybiB7IHN0YXRlOiBXYWl0ZXJTdGF0ZS5USU1FT1VUIH07XG4gICAgfVxuICAgIGF3YWl0IHNsZWVwKGRlbGF5KTtcbiAgICBjb25zdCB7IHN0YXRlIH0gPSBhd2FpdCBhY2NlcHRvckNoZWNrcyhjbGllbnQsIGlucHV0KTtcbiAgICBpZiAoc3RhdGUgIT09IFdhaXRlclN0YXRlLlJFVFJZKSB7XG4gICAgICByZXR1cm4geyBzdGF0ZSB9O1xuICAgIH1cblxuICAgIGN1cnJlbnRBdHRlbXB0ICs9IDE7XG4gIH1cbn07XG4iXX0= |
@@ -1,2 +0,2 @@ | ||
import { ResolvedWaiterOptions, SmithyClient } from "../waiter"; | ||
import { ResolvedWaiterOptions } from "../waiter"; | ||
/** | ||
@@ -6,2 +6,2 @@ * Validates that waiter options are passed correctly | ||
*/ | ||
export declare const validateWaiterOptions: (options: ResolvedWaiterOptions<SmithyClient>) => void; | ||
export declare const validateWaiterOptions: <Client>(options: ResolvedWaiterOptions<Client>) => void; |
@@ -17,2 +17,2 @@ "use strict"; | ||
exports.validateWaiterOptions = validateWaiterOptions; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdmFsaWRhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUE7OztHQUdHO0FBQ0ksTUFBTSxxQkFBcUIsR0FBRyxDQUFDLE9BQTRDLEVBQVEsRUFBRTtJQUMxRixJQUFJLE9BQU8sQ0FBQyxXQUFXLEdBQUcsQ0FBQyxFQUFFO1FBQzNCLE1BQU0sa0RBQWtELENBQUM7S0FDMUQ7U0FBTSxJQUFJLE9BQU8sQ0FBQyxXQUFXLElBQUksT0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lIDw9IG9wdGlvbnMubWluRGVsYXkpIHtcbiAgICB0aHJvdyBgV2FpdGVyT3B0aW9ucy5tYXhXYWl0VGltZSBbJHtvcHRpb25zLm1heFdhaXRUaW1lfV0gbXVzdCBiZSBncmVhdGVyIHRoYW4gV2FpdGVyT3B0aW9ucy5taW5EZWxheSBbJHtvcHRpb25zLm1pbkRlbGF5fV0gZm9yIHRoaXMgd2FpdGVyYDtcbiAgfVxufTtcbiJdfQ== |
@@ -1,7 +0,3 @@ | ||
import { AbortController, Client } from "@aws-sdk/types"; | ||
/** | ||
* @internal | ||
*/ | ||
export declare type SmithyClient = Client<any, any, any>; | ||
export interface WaiterConfiguration<Client extends SmithyClient> { | ||
import { AbortController } from "@aws-sdk/types"; | ||
export interface WaiterConfiguration<Client> { | ||
/** | ||
@@ -20,3 +16,3 @@ * Required service client | ||
} | ||
export interface WaiterOptions<Client extends SmithyClient> extends WaiterConfiguration<Client> { | ||
export interface WaiterOptions<Client> extends WaiterConfiguration<Client> { | ||
/** | ||
@@ -45,3 +41,3 @@ * The minimum amount of time to delay between retries in seconds. This value defaults | ||
*/ | ||
export declare type ResolvedWaiterOptions<Client extends SmithyClient> = WaiterOptions<Client> & Required<Pick<WaiterOptions<Client>, "minDelay" | "maxDelay">>; | ||
export declare type ResolvedWaiterOptions<Client> = WaiterOptions<Client> & Required<Pick<WaiterOptions<Client>, "minDelay" | "maxDelay">>; | ||
export declare enum WaiterState { | ||
@@ -48,0 +44,0 @@ ABORTED = "ABORTED", |
@@ -19,2 +19,2 @@ "use strict"; | ||
})(WaiterState = exports.WaiterState || (exports.WaiterState = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dhaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF1Q0E7O0dBRUc7QUFDVSxRQUFBLHF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BlYWNoIHJldHJ5LiBUaGlzIHZhbHVlIGRlZmF1bHRzIHRvIDEyMCBpZiBub3RcbiAgICogc3BlY2lmaWVkICgyIG1pbnV0ZXMpLiBJZiBzcGVjaWZpZWQsIHRoaXMgdmFsdWUgTVVTVCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gMS5cbiAgICovXG4gIG1heERlbGF5PzogbnVtYmVyO1xufVxuXG4vKipcbiAqIEBwcml2YXRlXG4gKi9cbmV4cG9ydCBjb25zdCB3YWl0ZXJTZXJ2aWNlRGVmYXVsdHMgPSB7XG4gIG1pbkRlbGF5OiAyLFxuICBtYXhEZWxheTogMTIwLFxufTtcblxuLyoqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgdHlwZSBSZXNvbHZlZFdhaXRlck9wdGlvbnM8Q2xpZW50PiA9IFdhaXRlck9wdGlvbnM8Q2xpZW50PiAmXG4gIFJlcXVpcmVkPFBpY2s8V2FpdGVyT3B0aW9uczxDbGllbnQ+LCBcIm1pbkRlbGF5XCIgfCBcIm1heERlbGF5XCI+PjtcblxuZXhwb3J0IGVudW0gV2FpdGVyU3RhdGUge1xuICBBQk9SVEVEID0gXCJBQk9SVEVEXCIsXG4gIEZBSUxVUkUgPSBcIkZBSUxVUkVcIixcbiAgU1VDQ0VTUyA9IFwiU1VDQ0VTU1wiLFxuICBSRVRSWSA9IFwiUkVUUllcIixcbiAgVElNRU9VVCA9IFwiVElNRU9VVFwiLFxufVxuXG5leHBvcnQgdHlwZSBXYWl0ZXJSZXN1bHQgPSB7XG4gIHN0YXRlOiBXYWl0ZXJTdGF0ZTtcbn07XG4iXX0= |
@@ -1,2 +0,2 @@ | ||
import { SmithyClient, WaiterOptions, WaiterResult } from "./waiter"; | ||
import { WaiterOptions, WaiterResult } from "./waiter"; | ||
/** | ||
@@ -11,2 +11,2 @@ * Create a waiter promise that only resolves when: | ||
*/ | ||
export declare const createWaiter: <Client extends SmithyClient, Input>(options: WaiterOptions<Client>, input: Input, acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>) => Promise<WaiterResult>; | ||
export declare const createWaiter: <Client, Input>(options: WaiterOptions<Client>, input: Input, acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>) => Promise<WaiterResult>; |
import { __assign, __awaiter, __generator } from "tslib"; | ||
import { runPolling } from "./poller"; | ||
import { sleep, validateWaiterOptions } from "./utils"; | ||
import { validateWaiterOptions } from "./utils"; | ||
import { waiterServiceDefaults, WaiterState } from "./waiter"; | ||
var waiterTimeout = function (seconds) { return __awaiter(void 0, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, sleep(seconds)]; | ||
case 1: | ||
_a.sent(); | ||
return [2 /*return*/, { state: WaiterState.TIMEOUT }]; | ||
} | ||
}); | ||
}); }; | ||
var abortTimeout = function (abortSignal) { return __awaiter(void 0, void 0, void 0, function () { | ||
@@ -43,2 +33,2 @@ return __generator(this, function (_a) { | ||
}); }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlV2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NyZWF0ZVdhaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUN0QyxPQUFPLEVBQUUsS0FBSyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ3ZELE9BQU8sRUFBNkMscUJBQXFCLEVBQUUsV0FBVyxFQUFFLE1BQU0sVUFBVSxDQUFDO0FBRXpHLElBQU0sYUFBYSxHQUFHLFVBQU8sT0FBZTs7O29CQUMxQyxxQkFBTSxLQUFLLENBQUMsT0FBTyxDQUFDLEVBQUE7O2dCQUFwQixTQUFvQixDQUFDO2dCQUNyQixzQkFBTyxFQUFFLE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GFyYW1zID0ge1xuICAgIC4uLndhaXRlclNlcnZpY2VEZWZhdWx0cyxcbiAgICAuLi5vcHRpb25zLFxuICB9O1xuICB2YWxpZGF0ZVdhaXRlck9wdGlvbnMocGFyYW1zKTtcblxuICBjb25zdCBleGl0Q29uZGl0aW9ucyA9IFtydW5Qb2xsaW5nPENsaWVudCwgSW5wdXQ+KHBhcmFtcywgaW5wdXQsIGFjY2VwdG9yQ2hlY2tzKV07XG4gIGlmIChvcHRpb25zLmFib3J0Q29udHJvbGxlcikge1xuICAgIGV4aXRDb25kaXRpb25zLnB1c2goYWJvcnRUaW1lb3V0KG9wdGlvbnMuYWJvcnRDb250cm9sbGVyLnNpZ25hbCkpO1xuICB9XG4gIHJldHVybiBQcm9taXNlLnJhY2UoZXhpdENvbmRpdGlvbnMpO1xufTtcbiJdfQ== |
@@ -1,2 +0,2 @@ | ||
import { ResolvedWaiterOptions, SmithyClient, WaiterResult } from "./waiter"; | ||
import { ResolvedWaiterOptions, WaiterResult } from "./waiter"; | ||
/** | ||
@@ -9,2 +9,2 @@ * Function that runs indefinite polling as part of waiters. | ||
*/ | ||
export declare const runPolling: <T extends SmithyClient, S>({ minDelay, maxDelay, maxWaitTime, abortController, client }: ResolvedWaiterOptions<T>, input: S, acceptorChecks: (client: T, input: S) => Promise<WaiterResult>) => Promise<WaiterResult>; | ||
export declare const runPolling: <Client, Input>({ minDelay, maxDelay, maxWaitTime, abortController, client }: ResolvedWaiterOptions<Client>, input: Input, acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult>) => Promise<WaiterResult>; |
@@ -60,2 +60,2 @@ import { __awaiter, __generator } from "tslib"; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9sbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3BvbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQ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YXdhaXQgc2xlZXAoZGVsYXkpO1xuICAgIGNvbnN0IHsgc3RhdGUgfSA9IGF3YWl0IGFjY2VwdG9yQ2hlY2tzKGNsaWVudCwgaW5wdXQpO1xuICAgIGlmIChzdGF0ZSAhPT0gV2FpdGVyU3RhdGUuUkVUUlkpIHtcbiAgICAgIHJldHVybiB7IHN0YXRlIH07XG4gICAgfVxuXG4gICAgY3VycmVudEF0dGVtcHQgKz0gMTtcbiAgfVxufTtcbiJdfQ== |
@@ -1,2 +0,2 @@ | ||
import { ResolvedWaiterOptions, SmithyClient } from "../waiter"; | ||
import { ResolvedWaiterOptions } from "../waiter"; | ||
/** | ||
@@ -6,2 +6,2 @@ * Validates that waiter options are passed correctly | ||
*/ | ||
export declare const validateWaiterOptions: (options: ResolvedWaiterOptions<SmithyClient>) => void; | ||
export declare const validateWaiterOptions: <Client>(options: ResolvedWaiterOptions<Client>) => void; |
@@ -13,2 +13,2 @@ /** | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdmFsaWRhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLElBQU0scUJBQXFCLEdBQUcsVUFBQyxPQUE0QztJQUNoRixJQUFJLE9BQU8sQ0FBQyxXQUFXLEdBQUcsQ0FBQyxFQUFFO1FBQzNCLE1BQU0sa0RBQWtELENBQUM7S0FDMUQ7U0FBTSxJQUFJLE9BQU8sQ0FBQyxXQUFXLElBQUksT0FBTyxDQUFDLFFBQVEsRUFBRTtRQUNsRCxNQUFNLGdDQUE4QixPQUFPLENBQUMsV0FBVyx1REFBa0QsT0FBTyxDQUFDLFFBQVEsc0JBQW1CLENBQUM7S0FDOUk7QUFDSCxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGV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xufTtcbiJdfQ== |
@@ -1,7 +0,3 @@ | ||
import { AbortController, Client } from "@aws-sdk/types"; | ||
/** | ||
* @internal | ||
*/ | ||
export declare type SmithyClient = Client<any, any, any>; | ||
export interface WaiterConfiguration<Client extends SmithyClient> { | ||
import { AbortController } from "@aws-sdk/types"; | ||
export interface WaiterConfiguration<Client> { | ||
/** | ||
@@ -20,3 +16,3 @@ * Required service client | ||
} | ||
export interface WaiterOptions<Client extends SmithyClient> extends WaiterConfiguration<Client> { | ||
export interface WaiterOptions<Client> extends WaiterConfiguration<Client> { | ||
/** | ||
@@ -45,3 +41,3 @@ * The minimum amount of time to delay between retries in seconds. This value defaults | ||
*/ | ||
export declare type ResolvedWaiterOptions<Client extends SmithyClient> = WaiterOptions<Client> & Required<Pick<WaiterOptions<Client>, "minDelay" | "maxDelay">>; | ||
export declare type ResolvedWaiterOptions<Client> = WaiterOptions<Client> & Required<Pick<WaiterOptions<Client>, "minDelay" | "maxDelay">>; | ||
export declare enum WaiterState { | ||
@@ -48,0 +44,0 @@ ABORTED = "ABORTED", |
@@ -16,2 +16,2 @@ /** | ||
})(WaiterState || (WaiterState = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dhaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q0E7O0dBRUc7QUFDSCxNQUFNLENBQUMsSUFBTSxxQkFBcUIsR0FBRztJQUNuQyxRQUFRLEVBQUUsQ0FBQztJQUNYLFFBQVEsRUFBRSxHQUFHO0NBQ2QsQ0FBQztBQVFGLE1BQU0sQ0FBTixJQUFZLFdBTVg7QUFORCxXQUFZLFdBQVc7SUFDckIsa0NBQW1CLENBQUE7SUFDbkIsa0NBQW1CLENBQUE7SUFDbkIsa0NBQW1CLENBQUE7SUFDbkIsOEJBQWUsQ0FBQTtJQUNmL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1xuZXhwb3J0IGNvbnN0IHdhaXRlclNlcnZpY2VEZWZhdWx0cyA9IHtcbiAgbWluRGVsYXk6IDIsXG4gIG1heERlbGF5OiAxMjAsXG59O1xuXG4vKipcbiAqIEBwcml2YXRlXG4gKi9cbmV4cG9ydCB0eXBlIFJlc29sdmVkV2FpdGVyT3B0aW9uczxDbGllbnQ+ID0gV2FpdGVyT3B0aW9uczxDbGllbnQ+ICZcbiAgUmVxdWlyZWQ8UGljazxXYWl0ZXJPcHRpb25zPENsaWVudD4sIFwibWluRGVsYXlcIiB8IFwibWF4RGVsYXlcIj4+O1xuXG5leHBvcnQgZW51bSBXYWl0ZXJTdGF0ZSB7XG4gIEFCT1JURUQgPSBcIkFCT1JURURcIixcbiAgRkFJTFVSRSA9IFwiRkFJTFVSRVwiLFxuICBTVUNDRVNTID0gXCJTVUNDRVNTXCIsXG4gIFJFVFJZID0gXCJSRVRSWVwiLFxuICBUSU1FT1VUID0gXCJUSU1FT1VUXCIsXG59XG5cbmV4cG9ydCB0eXBlIFdhaXRlclJlc3VsdCA9IHtcbiAgc3RhdGU6IFdhaXRlclN0YXRlO1xufTtcbiJdfQ== |
{ | ||
"name": "@aws-sdk/util-waiter", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Shared utilities for client waiters for the AWS SDK", | ||
"dependencies": { | ||
"@aws-sdk/abort-controller": "3.0.0", | ||
"@aws-sdk/types": "3.0.0", | ||
"@aws-sdk/abort-controller": "3.1.0", | ||
"tslib": "^1.8.0" | ||
}, | ||
"devDependencies": { | ||
"@aws-sdk/types": "3.1.0", | ||
"@types/jest": "^26.0.4", | ||
@@ -12,0 +12,0 @@ "jest": "^26.1.0", |
# @aws-sdk/util-waiter | ||
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-waiter/rc.svg)](https://www.npmjs.com/package/@aws-sdk/util-waiter) | ||
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-waiter/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-waiter) | ||
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-waiter.svg)](https://www.npmjs.com/package/@aws-sdk/util-waiter) | ||
@@ -5,0 +5,0 @@ |
import { AbortSignal } from "@aws-sdk/types"; | ||
import { runPolling } from "./poller"; | ||
import { sleep, validateWaiterOptions } from "./utils"; | ||
import { SmithyClient, WaiterOptions, WaiterResult, waiterServiceDefaults, WaiterState } from "./waiter"; | ||
import { validateWaiterOptions } from "./utils"; | ||
import { WaiterOptions, WaiterResult, waiterServiceDefaults, WaiterState } from "./waiter"; | ||
const waiterTimeout = async (seconds: number): Promise<WaiterResult> => { | ||
await sleep(seconds); | ||
return { state: WaiterState.TIMEOUT }; | ||
}; | ||
const abortTimeout = async (abortSignal: AbortSignal): Promise<WaiterResult> => { | ||
@@ -27,3 +22,3 @@ return new Promise((resolve) => { | ||
*/ | ||
export const createWaiter = async <Client extends SmithyClient, Input>( | ||
export const createWaiter = async <Client, Input>( | ||
options: WaiterOptions<Client>, | ||
@@ -30,0 +25,0 @@ input: Input, |
import { sleep } from "./utils/sleep"; | ||
import { ResolvedWaiterOptions, SmithyClient, WaiterResult, WaiterState } from "./waiter"; | ||
import { ResolvedWaiterOptions, WaiterResult, WaiterState } from "./waiter"; | ||
@@ -22,6 +22,6 @@ /** | ||
*/ | ||
export const runPolling = async <T extends SmithyClient, S>( | ||
{ minDelay, maxDelay, maxWaitTime, abortController, client }: ResolvedWaiterOptions<T>, | ||
input: S, | ||
acceptorChecks: (client: T, input: S) => Promise<WaiterResult> | ||
export const runPolling = async <Client, Input>( | ||
{ minDelay, maxDelay, maxWaitTime, abortController, client }: ResolvedWaiterOptions<Client>, | ||
input: Input, | ||
acceptorChecks: (client: Client, input: Input) => Promise<WaiterResult> | ||
): Promise<WaiterResult> => { | ||
@@ -28,0 +28,0 @@ let currentAttempt = 1; |
@@ -1,2 +0,2 @@ | ||
import { ResolvedWaiterOptions, SmithyClient } from "../waiter"; | ||
import { ResolvedWaiterOptions } from "../waiter"; | ||
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
export const validateWaiterOptions = (options: ResolvedWaiterOptions<SmithyClient>): void => { | ||
export const validateWaiterOptions = <Client>(options: ResolvedWaiterOptions<Client>): void => { | ||
if (options.maxWaitTime < 1) { | ||
@@ -10,0 +10,0 @@ throw `WaiterOptions.maxWaitTime must be greater than 0`; |
@@ -1,8 +0,4 @@ | ||
import { AbortController, Client } from "@aws-sdk/types"; | ||
import { AbortController } from "@aws-sdk/types"; | ||
/** | ||
* @internal | ||
*/ | ||
export type SmithyClient = Client<any, any, any>; | ||
export interface WaiterConfiguration<Client extends SmithyClient> { | ||
export interface WaiterConfiguration<Client> { | ||
/** | ||
@@ -24,3 +20,3 @@ * Required service client | ||
export interface WaiterOptions<Client extends SmithyClient> extends WaiterConfiguration<Client> { | ||
export interface WaiterOptions<Client> extends WaiterConfiguration<Client> { | ||
/** | ||
@@ -52,3 +48,3 @@ * The minimum amount of time to delay between retries in seconds. This value defaults | ||
*/ | ||
export type ResolvedWaiterOptions<Client extends SmithyClient> = WaiterOptions<Client> & | ||
export type ResolvedWaiterOptions<Client> = WaiterOptions<Client> & | ||
Required<Pick<WaiterOptions<Client>, "minDelay" | "maxDelay">>; | ||
@@ -55,0 +51,0 @@ |
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
2
63524
4
588
+ Added@aws-sdk/abort-controller@3.1.0(transitive)
- Removed@aws-sdk/types@3.0.0
- Removed@aws-sdk/abort-controller@3.0.0(transitive)
- Removed@aws-sdk/types@3.0.0(transitive)