@smithy/util-waiter 4.0.7 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -18,14 +18,14 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  WaiterState: () => WaiterState,
24
24
  checkExceptions: () => checkExceptions,
25
25
  createWaiter: () => createWaiter,
26
26
  waiterServiceDefaults: () => waiterServiceDefaults
27
27
  });
28
- module.exports = __toCommonJS(src_exports);
28
+ module.exports = __toCommonJS(index_exports);
29
29
 
30
30
  // src/utils/sleep.ts
31
31
  var sleep = /* @__PURE__ */ __name((seconds) => {
@@ -72,8 +72,7 @@ var checkExceptions = /* @__PURE__ */ __name((result) => {
72
72
 
73
73
  // src/poller.ts
74
74
  var exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, attemptCeiling, attempt) => {
75
- if (attempt > attemptCeiling)
76
- return maxDelay;
75
+ if (attempt > attemptCeiling) return maxDelay;
77
76
  const delay = minDelay * 2 ** (attempt - 1);
78
77
  return randomInRange(minDelay, delay);
79
78
  }, "exponentialBackoffWithJitter");
@@ -1,4 +1,4 @@
1
- import { WaiterOptions, WaiterResult } from "./waiter";
1
+ import type { WaiterOptions, WaiterResult } from "./waiter";
2
2
  /**
3
3
  * Create a waiter promise that only resolves when:
4
4
  * 1. Abort controller is signaled
@@ -1,4 +1,4 @@
1
- import { WaiterOptions, WaiterResult } from "./waiter";
1
+ import type { WaiterOptions, WaiterResult } from "./waiter";
2
2
  /**
3
3
  * Function that runs polling as part of waiters. This will make one inital attempt and then
4
4
  * subsequent attempts with an increasing delay.
@@ -1,4 +1,4 @@
1
- import { WaiterOptions } from "../waiter";
1
+ import type { WaiterOptions } from "../waiter";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,4 +1,4 @@
1
- import { WaiterConfiguration as WaiterConfiguration__ } from "@smithy/types";
1
+ import type { WaiterConfiguration as WaiterConfiguration__ } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@smithy/util-waiter",
3
- "version": "4.0.7",
3
+ "version": "4.1.1",
4
4
  "description": "Shared utilities for client waiters for the AWS SDK",
5
5
  "dependencies": {
6
- "@smithy/abort-controller": "^4.0.5",
7
- "@smithy/types": "^4.3.2",
6
+ "@smithy/abort-controller": "^4.1.1",
7
+ "@smithy/types": "^4.5.0",
8
8
  "tslib": "^2.6.2"
9
9
  },
10
10
  "scripts": {
@@ -25,6 +25,7 @@
25
25
  "url": "https://aws.amazon.com/javascript/"
26
26
  },
27
27
  "license": "Apache-2.0",
28
+ "sideEffects": false,
28
29
  "main": "./dist-cjs/index.js",
29
30
  "module": "./dist-es/index.js",
30
31
  "types": "./dist-types/index.d.ts",