@cdk8s/awscdk-resolver 0.0.725 → 0.0.726

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 (70) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +3 -2
  4. package/node_modules/@aws-sdk/client-cloudformation/dist-es/runtimeConfig.js +2 -1
  5. package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +1 -0
  6. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  7. package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
  8. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +12 -0
  9. package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
  10. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
  11. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  12. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
  13. package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
  14. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
  15. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
  16. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
  17. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
  18. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
  19. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
  20. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
  21. package/node_modules/@aws-sdk/core/package.json +1 -1
  22. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  23. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  24. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  25. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  26. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  27. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  28. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  29. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  30. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -2
  31. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +3 -2
  32. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -2
  33. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -2
  34. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
  35. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
  36. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
  37. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
  38. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
  39. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
  40. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  41. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
  42. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
  43. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  44. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
  45. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  46. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
  47. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
  48. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  49. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
  50. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  51. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  52. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1 -0
  53. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +33 -5
  54. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +33 -5
  55. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +1 -0
  56. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +11 -5
  57. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
  58. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
  59. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
  60. package/node_modules/@smithy/core/package.json +2 -2
  61. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +31 -31
  62. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +2 -4
  63. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +29 -27
  64. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +7 -3
  65. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +7 -3
  66. package/node_modules/@smithy/node-http-handler/package.json +3 -3
  67. package/node_modules/@smithy/types/dist-types/middleware.d.ts +6 -0
  68. package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +6 -0
  69. package/node_modules/@smithy/types/package.json +1 -1
  70. package/package.json +6 -6
@@ -1,36 +1,38 @@
1
1
  import { timing } from "./timing";
2
2
  const DEFER_EVENT_LISTENER_TIME = 3000;
3
- export const setSocketTimeout = (request, reject, timeoutInMs = 0, destroyResponseBodyOnTimeout = false) => {
4
- let response;
5
- if (destroyResponseBodyOnTimeout) {
6
- request.once("response", (res) => (response = res));
3
+ export const setSocketTimeout = (request, reject, timeoutInMs = 0, isServiceDefault = false) => {
4
+ if (!Number.isFinite(timeoutInMs) || timeoutInMs <= 0) {
5
+ return;
7
6
  }
8
- const registerTimeout = (offset) => {
9
- const timeout = timeoutInMs - offset;
10
- const onTimeout = () => {
11
- const error = Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (${destroyResponseBodyOnTimeout ? "service default socket timeout" : "configured by client requestHandler"}).`), { name: "TimeoutError" });
12
- if (destroyResponseBodyOnTimeout) {
13
- response?.destroy(error);
14
- }
15
- request.destroy();
16
- reject(error);
17
- };
18
- if (request.socket) {
19
- request.socket.setTimeout(timeout, onTimeout);
20
- request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
7
+ let response;
8
+ request.once("response", (res) => (response = res));
9
+ const onTimeout = () => {
10
+ if (response?.complete) {
11
+ request.socket?.destroy();
12
+ return;
13
+ }
14
+ const error = Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (${isServiceDefault ? "service default socket timeout" : "configured by client requestHandler"}).`), { name: "TimeoutError" });
15
+ response?.destroy(error);
16
+ request.destroy();
17
+ reject(error);
18
+ };
19
+ const registerTimeout = () => {
20
+ const { socket } = request;
21
+ if (!socket) {
22
+ request.once("socket", registerTimeout);
23
+ }
24
+ else if (socket.connecting) {
25
+ socket.once("connect", registerTimeout);
21
26
  }
22
27
  else {
23
- request.setTimeout(timeout, onTimeout);
28
+ socket.setTimeout(timeoutInMs, onTimeout);
29
+ request.on("close", () => socket.removeListener("timeout", onTimeout));
24
30
  }
25
31
  };
26
- if (0 < timeoutInMs && timeoutInMs < 6000) {
27
- registerTimeout(0);
28
- return 0;
29
- }
30
- const deferralId = timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
31
- if (destroyResponseBodyOnTimeout) {
32
- request.once("close", () => timing.clearTimeout(deferralId));
33
- return 0;
32
+ if (timeoutInMs < 6000) {
33
+ registerTimeout();
34
+ return;
34
35
  }
35
- return deferralId;
36
+ const deferralId = timing.setTimeout(registerTimeout, DEFER_EVENT_LISTENER_TIME);
37
+ request.once("close", () => timing.clearTimeout(deferralId));
36
38
  };
@@ -1,7 +1,11 @@
1
1
  import type { ClientRequest } from "node:http";
2
2
  /**
3
+ * Sets a rolling socket idle timeout that stays armed through the response body. Timeouts of
4
+ * 6000 ms or more register after 3000 ms, so requests that finish sooner skip the socket
5
+ * listener, and may fire up to 3000 ms late. The timeout is not cancelled on headers. It is
6
+ * removed, or its deferral cleared, when the request closes.
7
+ *
3
8
  * @internal
4
- * @param destroyResponseBodyOnTimeout - set by the service default. On timeout the response
5
- * body is destroyed with the TimeoutError, and the timeout stays armed through the body.
9
+ * @param isServiceDefault - whether timeoutInMs is the service default, which labels the error.
6
10
  */
7
- export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, destroyResponseBodyOnTimeout?: boolean) => NodeJS.Timeout | number;
11
+ export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, isServiceDefault?: boolean) => void;
@@ -1,7 +1,11 @@
1
1
  import { ClientRequest } from "node:http";
2
2
  /**
3
+ * Sets a rolling socket idle timeout that stays armed through the response body. Timeouts of
4
+ * 6000 ms or more register after 3000 ms, so requests that finish sooner skip the socket
5
+ * listener, and may fire up to 3000 ms late. The timeout is not cancelled on headers. It is
6
+ * removed, or its deferral cleared, when the request closes.
7
+ *
3
8
  * @internal
4
- * @param destroyResponseBodyOnTimeout - set by the service default. On timeout the response
5
- * body is destroyed with the TimeoutError, and the timeout stays armed through the body.
9
+ * @param isServiceDefault - whether timeoutInMs is the service default, which labels the error.
6
10
  */
7
- export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, destroyResponseBodyOnTimeout?: boolean) => NodeJS.Timeout | number;
11
+ export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, isServiceDefault?: boolean) => void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/node-http-handler",
3
- "version": "4.14.1",
3
+ "version": "4.14.2",
4
4
  "description": "Provides a way to make requests",
5
5
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/node-http-handler",
6
6
  "license": "Apache-2.0",
@@ -39,8 +39,8 @@
39
39
  "test:watch": "yarn g:vitest watch"
40
40
  },
41
41
  "dependencies": {
42
- "@smithy/core": "^3.38.1",
43
- "@smithy/types": "^4.19.0",
42
+ "@smithy/core": "^3.39.0",
43
+ "@smithy/types": "^4.20.0",
44
44
  "tslib": "^2.6.2"
45
45
  },
46
46
  "devDependencies": {
@@ -1,3 +1,4 @@
1
+ import type { AbortSignal as DeprecatedAbortSignal } from "./abort";
1
2
  import type { SelectedHttpAuthScheme } from "./auth/HttpAuthScheme";
2
3
  import type { AuthScheme, HttpAuthDefinition } from "./auth/auth";
3
4
  import type { Command } from "./command";
@@ -510,6 +511,11 @@ export interface HandlerExecutionContext {
510
511
  * Transferred from request options to the Smithy context.
511
512
  */
512
513
  metricsRecorder?: MetricsRecorder<unknown>;
514
+ /**
515
+ * Transferred from request options to allow middleware to cancel
516
+ * asynchronous work outside of the request handler.
517
+ */
518
+ abortSignal?: AbortSignal | DeprecatedAbortSignal;
513
519
  /**
514
520
  * @deprecated
515
521
  * Do not assign arbitrary members to the Smithy Context,
@@ -1,3 +1,4 @@
1
+ import { AbortSignal as DeprecatedAbortSignal } from "./abort";
1
2
  import { SelectedHttpAuthScheme } from "./auth/HttpAuthScheme";
2
3
  import { AuthScheme, HttpAuthDefinition } from "./auth/auth";
3
4
  import { Command } from "./command";
@@ -510,6 +511,11 @@ export interface HandlerExecutionContext {
510
511
  * Transferred from request options to the Smithy context.
511
512
  */
512
513
  metricsRecorder?: MetricsRecorder<unknown>;
514
+ /**
515
+ * Transferred from request options to allow middleware to cancel
516
+ * asynchronous work outside of the request handler.
517
+ */
518
+ abortSignal?: AbortSignal | DeprecatedAbortSignal;
513
519
  /**
514
520
  * @deprecated
515
521
  * Do not assign arbitrary members to the Smithy Context,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "4.19.0",
3
+ "version": "4.20.0",
4
4
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/types",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
package/package.json CHANGED
@@ -43,17 +43,17 @@
43
43
  "organization": false
44
44
  },
45
45
  "devDependencies": {
46
- "@cdk8s/projen-common": "0.1.43",
46
+ "@cdk8s/projen-common": "0.1.44",
47
47
  "@stylistic/eslint-plugin": "^2",
48
48
  "@types/fs-extra": "^11.0.4",
49
49
  "@types/jest": "^27",
50
50
  "@types/node": "^18",
51
51
  "@typescript-eslint/eslint-plugin": "^8",
52
52
  "@typescript-eslint/parser": "^8",
53
- "aws-cdk": "^2.1146.1",
53
+ "aws-cdk": "^2.1147.0",
54
54
  "aws-cdk-lib": "2.195.0",
55
55
  "cdk8s": "2.68.91",
56
- "cdk8s-cli": "^2.207.74",
56
+ "cdk8s-cli": "^2.207.77",
57
57
  "commit-and-tag-version": "^13",
58
58
  "constructs": "10.3.0",
59
59
  "eslint": "^9",
@@ -67,7 +67,7 @@
67
67
  "jsii-docgen": "^10.5.0",
68
68
  "jsii-pacmak": "^1.142.0",
69
69
  "jsii-rosetta": "^5",
70
- "projen": "^0.104.20",
70
+ "projen": "^0.104.25",
71
71
  "ts-jest": "^27",
72
72
  "ts-node": "^10.9.2",
73
73
  "typescript": "^5.9.3"
@@ -78,7 +78,7 @@
78
78
  "constructs": "^10.3.0"
79
79
  },
80
80
  "dependencies": {
81
- "@aws-sdk/client-cloudformation": "^3.1161.0"
81
+ "@aws-sdk/client-cloudformation": "^3.1162.0"
82
82
  },
83
83
  "bundledDependencies": [
84
84
  "@aws-sdk/client-cloudformation"
@@ -92,7 +92,7 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "version": "0.0.725",
95
+ "version": "0.0.726",
96
96
  "jest": {
97
97
  "coverageProvider": "v8",
98
98
  "testMatch": [