@cdklabs/cdk-ecs-codedeploy 0.0.416 → 0.0.417

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.
Files changed (47) hide show
  1. package/.jsii +3 -3
  2. package/lib/api-canary/index.js +1 -1
  3. package/lib/ecs-appspec/index.js +1 -1
  4. package/lib/ecs-deployment/index.js +1 -1
  5. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  6. package/node_modules/@aws-sdk/client-codedeploy/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +4 -1
  8. package/node_modules/@aws-sdk/client-codedeploy/package.json +13 -13
  9. package/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  10. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +4 -1
  11. package/node_modules/@aws-sdk/client-sso/package.json +11 -11
  12. package/node_modules/@aws-sdk/core/package.json +3 -3
  13. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  14. package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
  15. package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
  16. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  17. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  18. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  19. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  20. package/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
  21. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +1 -1
  22. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/EndpointParameters.d.ts +1 -1
  23. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +4 -1
  24. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/EndpointParameters.d.ts +4 -1
  25. package/node_modules/@aws-sdk/nested-clients/package.json +11 -11
  26. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  27. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  28. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +55 -8
  29. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +34 -2
  30. package/node_modules/@smithy/core/dist-es/submodules/cbor/byte-printer.js +3 -0
  31. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +24 -4
  32. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +33 -3
  33. package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +32 -2
  34. package/node_modules/@smithy/core/dist-types/submodules/cbor/byte-printer.d.ts +6 -0
  35. package/node_modules/@smithy/core/dist-types/submodules/serde/value/NumericValue.d.ts +3 -1
  36. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/byte-printer.d.ts +6 -0
  37. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/value/NumericValue.d.ts +3 -1
  38. package/node_modules/@smithy/core/package.json +1 -1
  39. package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
  40. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  41. package/node_modules/@smithy/smithy-client/package.json +3 -3
  42. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  43. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  44. package/node_modules/@smithy/util-waiter/dist-cjs/index.js +27 -8
  45. package/node_modules/@smithy/util-waiter/dist-es/createWaiter.js +27 -8
  46. package/node_modules/@smithy/util-waiter/package.json +1 -1
  47. package/package.json +2 -2
@@ -1,9 +1,10 @@
1
1
  import { runPolling } from "./poller";
2
2
  import { validateWaiterOptions } from "./utils";
3
3
  import { waiterServiceDefaults, WaiterState } from "./waiter";
4
- const abortTimeout = async (abortSignal) => {
5
- return new Promise((resolve) => {
6
- const onAbort = () => resolve({ state: WaiterState.ABORTED });
4
+ const abortTimeout = (abortSignal) => {
5
+ let onAbort;
6
+ const promise = new Promise((resolve) => {
7
+ onAbort = () => resolve({ state: WaiterState.ABORTED });
7
8
  if (typeof abortSignal.addEventListener === "function") {
8
9
  abortSignal.addEventListener("abort", onAbort);
9
10
  }
@@ -11,6 +12,14 @@ const abortTimeout = async (abortSignal) => {
11
12
  abortSignal.onabort = onAbort;
12
13
  }
13
14
  });
15
+ return {
16
+ clearListener() {
17
+ if (typeof abortSignal.removeEventListener === "function") {
18
+ abortSignal.removeEventListener("abort", onAbort);
19
+ }
20
+ },
21
+ aborted: promise,
22
+ };
14
23
  };
15
24
  export const createWaiter = async (options, input, acceptorChecks) => {
16
25
  const params = {
@@ -19,11 +28,21 @@ export const createWaiter = async (options, input, acceptorChecks) => {
19
28
  };
20
29
  validateWaiterOptions(params);
21
30
  const exitConditions = [runPolling(params, input, acceptorChecks)];
22
- if (options.abortController) {
23
- exitConditions.push(abortTimeout(options.abortController.signal));
24
- }
31
+ const finalize = [];
25
32
  if (options.abortSignal) {
26
- exitConditions.push(abortTimeout(options.abortSignal));
33
+ const { aborted, clearListener } = abortTimeout(options.abortSignal);
34
+ finalize.push(clearListener);
35
+ exitConditions.push(aborted);
36
+ }
37
+ if (options.abortController?.signal) {
38
+ const { aborted, clearListener } = abortTimeout(options.abortController.signal);
39
+ finalize.push(clearListener);
40
+ exitConditions.push(aborted);
27
41
  }
28
- return Promise.race(exitConditions);
42
+ return Promise.race(exitConditions).then((result) => {
43
+ for (const fn of finalize) {
44
+ fn();
45
+ }
46
+ return result;
47
+ });
29
48
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-waiter",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "Shared utilities for client waiters for the AWS SDK",
5
5
  "dependencies": {
6
6
  "@smithy/abort-controller": "^4.0.4",
package/package.json CHANGED
@@ -110,7 +110,7 @@
110
110
  "constructs": "^10.0.5"
111
111
  },
112
112
  "dependencies": {
113
- "@aws-sdk/client-codedeploy": "^3.830.0",
113
+ "@aws-sdk/client-codedeploy": "^3.839.0",
114
114
  "jmespath": "^0.16.0"
115
115
  },
116
116
  "bundledDependencies": [
@@ -128,7 +128,7 @@
128
128
  "publishConfig": {
129
129
  "access": "public"
130
130
  },
131
- "version": "0.0.416",
131
+ "version": "0.0.417",
132
132
  "jest": {
133
133
  "coverageProvider": "v8",
134
134
  "testMatch": [