@cdklabs/cdk-ecs-codedeploy 0.0.317 → 0.0.319

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 (145) 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-cjs/endpoint/endpointResolver.js +6 -2
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.browser.d.ts +2 -0
  8. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.d.ts +2 -0
  9. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.native.d.ts +2 -0
  10. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  11. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  12. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  13. package/node_modules/@aws-sdk/client-codedeploy/dist-types/tsdoc-metadata.json +11 -0
  14. package/node_modules/@aws-sdk/client-codedeploy/package.json +36 -36
  15. package/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js +6 -2
  16. package/node_modules/@aws-sdk/client-sso/dist-es/endpoint/endpointResolver.js +7 -3
  17. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +2 -0
  18. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +2 -0
  19. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +2 -0
  20. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  21. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  22. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  23. package/node_modules/@aws-sdk/client-sso/dist-types/tsdoc-metadata.json +11 -0
  24. package/node_modules/@aws-sdk/client-sso/package.json +32 -32
  25. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js +6 -2
  26. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +2 -0
  27. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +2 -0
  28. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +2 -0
  29. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  30. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  31. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  32. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/tsdoc-metadata.json +11 -0
  33. package/node_modules/@aws-sdk/client-sso-oidc/package.json +34 -34
  34. package/node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js +6 -2
  35. package/node_modules/@aws-sdk/client-sts/dist-es/endpoint/endpointResolver.js +7 -3
  36. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +2 -0
  37. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +2 -0
  38. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +2 -0
  39. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  40. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  41. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  42. package/node_modules/@aws-sdk/client-sts/package.json +34 -34
  43. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4AConfigSelector.js +20 -0
  44. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/awsSdkSigV4AConfigSelector.js +20 -0
  45. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4AConfigSelector.d.ts +5 -0
  46. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/awsSdkSigV4AConfigSelector.d.ts +5 -0
  47. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4AConfigSelector.d.ts +4 -0
  48. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/awsSdkSigV4AConfigSelector.d.ts +4 -0
  49. package/node_modules/@aws-sdk/core/dist-types/tsdoc-metadata.json +11 -0
  50. package/node_modules/@aws-sdk/core/package.json +9 -9
  51. package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
  52. package/node_modules/@aws-sdk/credential-provider-http/package.json +9 -9
  53. package/node_modules/@aws-sdk/credential-provider-ini/package.json +12 -12
  54. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  55. package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
  56. package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
  57. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
  58. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  59. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  60. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  61. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/tsdoc-metadata.json +11 -0
  62. package/node_modules/@aws-sdk/middleware-user-agent/package.json +5 -5
  63. package/node_modules/@aws-sdk/region-config-resolver/dist-types/tsdoc-metadata.json +11 -0
  64. package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
  65. package/node_modules/@aws-sdk/token-providers/package.json +6 -6
  66. package/node_modules/@aws-sdk/types/package.json +2 -2
  67. package/node_modules/@aws-sdk/util-endpoints/package.json +4 -4
  68. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  69. package/node_modules/@aws-sdk/util-user-agent-node/package.json +4 -4
  70. package/node_modules/@smithy/abort-controller/package.json +2 -2
  71. package/node_modules/@smithy/config-resolver/package.json +4 -4
  72. package/node_modules/@smithy/core/package.json +8 -8
  73. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  74. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  75. package/node_modules/@smithy/hash-node/package.json +2 -2
  76. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  77. package/node_modules/@smithy/middleware-content-length/package.json +4 -4
  78. package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +1 -1
  79. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +16 -2
  80. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.js +1 -1
  81. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +7 -1
  82. package/node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js +10 -1
  83. package/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/getEndpointFromConfig.d.ts +4 -1
  84. package/node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts +11 -0
  85. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromConfig.d.ts +4 -1
  86. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/resolveEndpointConfig.d.ts +11 -0
  87. package/node_modules/@smithy/middleware-endpoint/package.json +7 -7
  88. package/node_modules/@smithy/middleware-retry/package.json +9 -9
  89. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  90. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  91. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  92. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +86 -46
  93. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +10 -10
  94. package/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +27 -13
  95. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +18 -5
  96. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +12 -4
  97. package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +6 -1
  98. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -1
  99. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +6 -1
  100. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -1
  101. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +2 -1
  102. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +2 -1
  103. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  104. package/node_modules/@smithy/property-provider/package.json +2 -2
  105. package/node_modules/@smithy/protocol-http/package.json +2 -2
  106. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  107. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  108. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  109. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  110. package/node_modules/@smithy/signature-v4/package.json +4 -4
  111. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +21 -4
  112. package/node_modules/@smithy/smithy-client/dist-es/client.js +22 -4
  113. package/node_modules/@smithy/smithy-client/dist-types/client.d.ts +22 -1
  114. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/client.d.ts +22 -1
  115. package/node_modules/@smithy/smithy-client/package.json +6 -6
  116. package/node_modules/@smithy/types/README.md +36 -1
  117. package/node_modules/@smithy/types/dist-types/command.d.ts +14 -1
  118. package/node_modules/@smithy/types/dist-types/endpoint.d.ts +1 -1
  119. package/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +6 -6
  120. package/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +12 -6
  121. package/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +8 -3
  122. package/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +14 -1
  123. package/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +1 -1
  124. package/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +6 -6
  125. package/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +8 -10
  126. package/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +6 -9
  127. package/node_modules/@smithy/types/package.json +1 -1
  128. package/node_modules/@smithy/url-parser/package.json +3 -3
  129. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  130. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  131. package/node_modules/@smithy/util-endpoints/dist-cjs/cache/EndpointCache.js +1 -0
  132. package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +73 -11
  133. package/node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js +49 -0
  134. package/node_modules/@smithy/util-endpoints/dist-es/index.js +1 -0
  135. package/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +0 -10
  136. package/node_modules/@smithy/util-endpoints/dist-types/cache/EndpointCache.d.ts +34 -0
  137. package/node_modules/@smithy/util-endpoints/dist-types/index.d.ts +1 -0
  138. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/cache/EndpointCache.d.ts +34 -0
  139. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/index.d.ts +1 -0
  140. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  141. package/node_modules/@smithy/util-middleware/package.json +2 -2
  142. package/node_modules/@smithy/util-retry/package.json +3 -3
  143. package/node_modules/@smithy/util-stream/package.json +5 -5
  144. package/node_modules/@smithy/util-waiter/package.json +3 -3
  145. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/invalid-dependency",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline invalid-dependency",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/types": "^3.3.0",
25
+ "@smithy/types": "^3.4.0",
26
26
  "tslib": "^2.6.2"
27
27
  },
28
28
  "typesVersions": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-content-length",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-content-length",
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/protocol-http": "^4.1.0",
27
- "@smithy/types": "^3.3.0",
26
+ "@smithy/protocol-http": "^4.1.1",
27
+ "@smithy/types": "^3.4.0",
28
28
  "tslib": "^2.6.2"
29
29
  },
30
30
  "engines": {
@@ -47,7 +47,7 @@
47
47
  "directory": "packages/middleware-content-length"
48
48
  },
49
49
  "devDependencies": {
50
- "@smithy/util-test": "^0.2.6",
50
+ "@smithy/util-test": "^0.2.7",
51
51
  "concurrently": "7.0.0",
52
52
  "downlevel-dts": "0.10.1",
53
53
  "rimraf": "3.0.2",
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEndpointFromConfig = void 0;
4
4
  const node_config_provider_1 = require("@smithy/node-config-provider");
5
5
  const getEndpointUrlConfig_1 = require("./getEndpointUrlConfig");
6
- const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))();
6
+ const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : ""))();
7
7
  exports.getEndpointFromConfig = getEndpointFromConfig;
@@ -122,7 +122,12 @@ var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => {
122
122
  // src/adaptors/getEndpointFromInstructions.ts
123
123
  var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => {
124
124
  if (!clientConfig.endpoint) {
125
- const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || "");
125
+ let endpointFromConfig;
126
+ if (clientConfig.serviceConfiguredEndpoint) {
127
+ endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
128
+ } else {
129
+ endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId);
130
+ }
126
131
  if (endpointFromConfig) {
127
132
  clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
128
133
  }
@@ -233,12 +238,13 @@ var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({
233
238
 
234
239
  // src/resolveEndpointConfig.ts
235
240
 
241
+ var import_getEndpointFromConfig2 = require("./adaptors/getEndpointFromConfig");
236
242
  var resolveEndpointConfig = /* @__PURE__ */ __name((input) => {
237
243
  const tls = input.tls ?? true;
238
244
  const { endpoint } = input;
239
245
  const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0;
240
246
  const isCustomEndpoint = !!endpoint;
241
- return {
247
+ const resolvedConfig = {
242
248
  ...input,
243
249
  endpoint: customEndpointProvider,
244
250
  tls,
@@ -246,6 +252,14 @@ var resolveEndpointConfig = /* @__PURE__ */ __name((input) => {
246
252
  useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false),
247
253
  useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false)
248
254
  };
255
+ let configuredEndpointPromise = void 0;
256
+ resolvedConfig.serviceConfiguredEndpoint = async () => {
257
+ if (input.serviceId && !configuredEndpointPromise) {
258
+ configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId);
259
+ }
260
+ return configuredEndpointPromise;
261
+ };
262
+ return resolvedConfig;
249
263
  }, "resolveEndpointConfig");
250
264
  // Annotate the CommonJS export names for ESM import in node:
251
265
 
@@ -1,3 +1,3 @@
1
1
  import { loadConfig } from "@smithy/node-config-provider";
2
2
  import { getEndpointUrlConfig } from "./getEndpointUrlConfig";
3
- export const getEndpointFromConfig = async (serviceId) => loadConfig(getEndpointUrlConfig(serviceId))();
3
+ export const getEndpointFromConfig = async (serviceId) => loadConfig(getEndpointUrlConfig(serviceId ?? ""))();
@@ -4,7 +4,13 @@ import { getEndpointFromConfig } from "./getEndpointFromConfig";
4
4
  import { toEndpointV1 } from "./toEndpointV1";
5
5
  export const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
6
6
  if (!clientConfig.endpoint) {
7
- const endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId || "");
7
+ let endpointFromConfig;
8
+ if (clientConfig.serviceConfiguredEndpoint) {
9
+ endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
10
+ }
11
+ else {
12
+ endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);
13
+ }
8
14
  if (endpointFromConfig) {
9
15
  clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
10
16
  }
@@ -1,11 +1,12 @@
1
1
  import { normalizeProvider } from "@smithy/util-middleware";
2
+ import { getEndpointFromConfig } from "./adaptors/getEndpointFromConfig";
2
3
  import { toEndpointV1 } from "./adaptors/toEndpointV1";
3
4
  export const resolveEndpointConfig = (input) => {
4
5
  const tls = input.tls ?? true;
5
6
  const { endpoint } = input;
6
7
  const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : undefined;
7
8
  const isCustomEndpoint = !!endpoint;
8
- return {
9
+ const resolvedConfig = {
9
10
  ...input,
10
11
  endpoint: customEndpointProvider,
11
12
  tls,
@@ -13,4 +14,12 @@ export const resolveEndpointConfig = (input) => {
13
14
  useDualstackEndpoint: normalizeProvider(input.useDualstackEndpoint ?? false),
14
15
  useFipsEndpoint: normalizeProvider(input.useFipsEndpoint ?? false),
15
16
  };
17
+ let configuredEndpointPromise = undefined;
18
+ resolvedConfig.serviceConfiguredEndpoint = async () => {
19
+ if (input.serviceId && !configuredEndpointPromise) {
20
+ configuredEndpointPromise = getEndpointFromConfig(input.serviceId);
21
+ }
22
+ return configuredEndpointPromise;
23
+ };
24
+ return resolvedConfig;
16
25
  };
@@ -1 +1,4 @@
1
- export declare const getEndpointFromConfig: (serviceId: string) => Promise<string | undefined>;
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const getEndpointFromConfig: (serviceId?: string) => Promise<string | undefined>;
@@ -36,6 +36,11 @@ export interface EndpointInputConfig<T extends EndpointParameters = EndpointPara
36
36
  * Enables FIPS compatible endpoints.
37
37
  */
38
38
  useFipsEndpoint?: boolean | Provider<boolean>;
39
+ /**
40
+ * @internal
41
+ * This field is used internally so you should not fill any value to this field.
42
+ */
43
+ serviceConfiguredEndpoint?: never;
39
44
  }
40
45
  interface PreviouslyResolved<T extends EndpointParameters = EndpointParameters> {
41
46
  urlParser: UrlParser;
@@ -44,6 +49,7 @@ interface PreviouslyResolved<T extends EndpointParameters = EndpointParameters>
44
49
  logger?: Logger;
45
50
  }) => EndpointV2;
46
51
  logger?: Logger;
52
+ serviceId?: string;
47
53
  }
48
54
  /**
49
55
  * @internal
@@ -85,6 +91,11 @@ export interface EndpointResolvedConfig<T extends EndpointParameters = EndpointP
85
91
  * @internal
86
92
  */
87
93
  serviceId?: string;
94
+ /**
95
+ * A configured endpoint global or specific to the service from ENV or AWS SDK configuration files.
96
+ * @internal
97
+ */
98
+ serviceConfiguredEndpoint?: Provider<string | undefined>;
88
99
  }
89
100
  /**
90
101
  * @internal
@@ -1 +1,4 @@
1
- export declare const getEndpointFromConfig: (serviceId: string) => Promise<string | undefined>;
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const getEndpointFromConfig: (serviceId?: string) => Promise<string | undefined>;
@@ -36,6 +36,11 @@ export interface EndpointInputConfig<T extends EndpointParameters = EndpointPara
36
36
  * Enables FIPS compatible endpoints.
37
37
  */
38
38
  useFipsEndpoint?: boolean | Provider<boolean>;
39
+ /**
40
+ * @internal
41
+ * This field is used internally so you should not fill any value to this field.
42
+ */
43
+ serviceConfiguredEndpoint?: never;
39
44
  }
40
45
  interface PreviouslyResolved<T extends EndpointParameters = EndpointParameters> {
41
46
  urlParser: UrlParser;
@@ -44,6 +49,7 @@ interface PreviouslyResolved<T extends EndpointParameters = EndpointParameters>
44
49
  logger?: Logger;
45
50
  }) => EndpointV2;
46
51
  logger?: Logger;
52
+ serviceId?: string;
47
53
  }
48
54
  /**
49
55
  * @internal
@@ -85,6 +91,11 @@ export interface EndpointResolvedConfig<T extends EndpointParameters = EndpointP
85
91
  * @internal
86
92
  */
87
93
  serviceId?: string;
94
+ /**
95
+ * A configured endpoint global or specific to the service from ENV or AWS SDK configuration files.
96
+ * @internal
97
+ */
98
+ serviceConfiguredEndpoint?: Provider<string | undefined>;
88
99
  }
89
100
  /**
90
101
  * @internal
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-endpoint",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-endpoint",
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/middleware-serde": "^3.0.3",
27
- "@smithy/node-config-provider": "^3.1.4",
28
- "@smithy/shared-ini-file-loader": "^3.1.4",
29
- "@smithy/types": "^3.3.0",
30
- "@smithy/url-parser": "^3.0.3",
31
- "@smithy/util-middleware": "^3.0.3",
26
+ "@smithy/middleware-serde": "^3.0.4",
27
+ "@smithy/node-config-provider": "^3.1.5",
28
+ "@smithy/shared-ini-file-loader": "^3.1.5",
29
+ "@smithy/types": "^3.4.0",
30
+ "@smithy/url-parser": "^3.0.4",
31
+ "@smithy/util-middleware": "^3.0.4",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "3.0.15",
3
+ "version": "3.0.16",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-retry",
@@ -31,18 +31,18 @@
31
31
  },
32
32
  "license": "Apache-2.0",
33
33
  "dependencies": {
34
- "@smithy/node-config-provider": "^3.1.4",
35
- "@smithy/protocol-http": "^4.1.0",
36
- "@smithy/service-error-classification": "^3.0.3",
37
- "@smithy/smithy-client": "^3.2.0",
38
- "@smithy/types": "^3.3.0",
39
- "@smithy/util-middleware": "^3.0.3",
40
- "@smithy/util-retry": "^3.0.3",
34
+ "@smithy/node-config-provider": "^3.1.5",
35
+ "@smithy/protocol-http": "^4.1.1",
36
+ "@smithy/service-error-classification": "^3.0.4",
37
+ "@smithy/smithy-client": "^3.3.0",
38
+ "@smithy/types": "^3.4.0",
39
+ "@smithy/util-middleware": "^3.0.4",
40
+ "@smithy/util-retry": "^3.0.4",
41
41
  "tslib": "^2.6.2",
42
42
  "uuid": "^9.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@smithy/util-test": "^0.2.6",
45
+ "@smithy/util-test": "^0.2.7",
46
46
  "@types/uuid": "^8.3.0",
47
47
  "concurrently": "7.0.0",
48
48
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-serde",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-serde",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/types": "^3.3.0",
26
+ "@smithy/types": "^3.4.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
29
29
  "engines": {
@@ -46,7 +46,7 @@
46
46
  "directory": "packages/middleware-serde"
47
47
  },
48
48
  "devDependencies": {
49
- "@smithy/util-test": "^0.2.4",
49
+ "@smithy/util-test": "^0.2.7",
50
50
  "concurrently": "7.0.0",
51
51
  "downlevel-dts": "0.10.1",
52
52
  "rimraf": "3.0.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-stack",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Provides a means for composing multiple middleware functions into a single handler",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -25,7 +25,7 @@
25
25
  "module": "./dist-es/index.js",
26
26
  "types": "./dist-types/index.d.ts",
27
27
  "dependencies": {
28
- "@smithy/types": "^3.3.0",
28
+ "@smithy/types": "^3.4.0",
29
29
  "tslib": "^2.6.2"
30
30
  },
31
31
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/node-config-provider",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "description": "Load config default values from ini config files and environmental variable",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -24,9 +24,9 @@
24
24
  "module": "./dist-es/index.js",
25
25
  "types": "./dist-types/index.d.ts",
26
26
  "dependencies": {
27
- "@smithy/property-provider": "^3.1.3",
28
- "@smithy/shared-ini-file-loader": "^3.1.4",
29
- "@smithy/types": "^3.3.0",
27
+ "@smithy/property-provider": "^3.1.4",
28
+ "@smithy/shared-ini-file-loader": "^3.1.5",
29
+ "@smithy/types": "^3.4.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "devDependencies": {
@@ -57,45 +57,81 @@ var getTransformedHeaders = /* @__PURE__ */ __name((headers) => {
57
57
  }, "getTransformedHeaders");
58
58
 
59
59
  // src/set-connection-timeout.ts
60
+ var DEFER_EVENT_LISTENER_TIME = 1e3;
60
61
  var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {
61
62
  if (!timeoutInMs) {
62
- return;
63
- }
64
- const timeoutId = setTimeout(() => {
65
- request.destroy();
66
- reject(
67
- Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {
68
- name: "TimeoutError"
69
- })
70
- );
71
- }, timeoutInMs);
72
- request.on("socket", (socket) => {
73
- if (socket.connecting) {
74
- socket.on("connect", () => {
63
+ return -1;
64
+ }
65
+ const registerTimeout = /* @__PURE__ */ __name((offset) => {
66
+ const timeoutId = setTimeout(() => {
67
+ request.destroy();
68
+ reject(
69
+ Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {
70
+ name: "TimeoutError"
71
+ })
72
+ );
73
+ }, timeoutInMs - offset);
74
+ const doWithSocket = /* @__PURE__ */ __name((socket) => {
75
+ if (socket == null ? void 0 : socket.connecting) {
76
+ socket.on("connect", () => {
77
+ clearTimeout(timeoutId);
78
+ });
79
+ } else {
75
80
  clearTimeout(timeoutId);
76
- });
81
+ }
82
+ }, "doWithSocket");
83
+ if (request.socket) {
84
+ doWithSocket(request.socket);
77
85
  } else {
78
- clearTimeout(timeoutId);
86
+ request.on("socket", doWithSocket);
79
87
  }
80
- });
88
+ }, "registerTimeout");
89
+ if (timeoutInMs < 2e3) {
90
+ registerTimeout(0);
91
+ return 0;
92
+ }
93
+ return setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
81
94
  }, "setConnectionTimeout");
82
95
 
83
96
  // src/set-socket-keep-alive.ts
84
- var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }) => {
97
+ var DEFER_EVENT_LISTENER_TIME2 = 3e3;
98
+ var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => {
85
99
  if (keepAlive !== true) {
86
- return;
100
+ return -1;
87
101
  }
88
- request.on("socket", (socket) => {
89
- socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
90
- });
102
+ const registerListener = /* @__PURE__ */ __name(() => {
103
+ if (request.socket) {
104
+ request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
105
+ } else {
106
+ request.on("socket", (socket) => {
107
+ socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
108
+ });
109
+ }
110
+ }, "registerListener");
111
+ if (deferTimeMs === 0) {
112
+ registerListener();
113
+ return 0;
114
+ }
115
+ return setTimeout(registerListener, deferTimeMs);
91
116
  }, "setSocketKeepAlive");
92
117
 
93
118
  // src/set-socket-timeout.ts
119
+ var DEFER_EVENT_LISTENER_TIME3 = 3e3;
94
120
  var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {
95
- request.setTimeout(timeoutInMs, () => {
96
- request.destroy();
97
- reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" }));
98
- });
121
+ const registerTimeout = /* @__PURE__ */ __name((offset) => {
122
+ request.setTimeout(timeoutInMs - offset, () => {
123
+ request.destroy();
124
+ reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" }));
125
+ });
126
+ }, "registerTimeout");
127
+ if (0 < timeoutInMs && timeoutInMs < 6e3) {
128
+ registerTimeout(0);
129
+ return 0;
130
+ }
131
+ return setTimeout(
132
+ registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3),
133
+ DEFER_EVENT_LISTENER_TIME3
134
+ );
99
135
  }, "setSocketTimeout");
100
136
 
101
137
  // src/write-request-body.ts
@@ -244,17 +280,17 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
244
280
  if (!this.config) {
245
281
  this.config = await this.configProvider;
246
282
  }
247
- let socketCheckTimeoutId;
248
283
  return new Promise((_resolve, _reject) => {
249
284
  let writeRequestBodyPromise = void 0;
285
+ const timeouts = [];
250
286
  const resolve = /* @__PURE__ */ __name(async (arg) => {
251
287
  await writeRequestBodyPromise;
252
- clearTimeout(socketCheckTimeoutId);
288
+ timeouts.forEach(clearTimeout);
253
289
  _resolve(arg);
254
290
  }, "resolve");
255
291
  const reject = /* @__PURE__ */ __name(async (arg) => {
256
292
  await writeRequestBodyPromise;
257
- clearTimeout(socketCheckTimeoutId);
293
+ timeouts.forEach(clearTimeout);
258
294
  _reject(arg);
259
295
  }, "reject");
260
296
  if (!this.config) {
@@ -268,15 +304,17 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
268
304
  }
269
305
  const isSSL = request.protocol === "https:";
270
306
  const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;
271
- socketCheckTimeoutId = setTimeout(
272
- () => {
273
- this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(
274
- agent,
275
- this.socketWarningTimestamp,
276
- this.config.logger
277
- );
278
- },
279
- this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)
307
+ timeouts.push(
308
+ setTimeout(
309
+ () => {
310
+ this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(
311
+ agent,
312
+ this.socketWarningTimestamp,
313
+ this.config.logger
314
+ );
315
+ },
316
+ this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)
317
+ )
280
318
  );
281
319
  const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});
282
320
  let auth = void 0;
@@ -318,8 +356,6 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
318
356
  reject(err);
319
357
  }
320
358
  });
321
- setConnectionTimeout(req, reject, this.config.connectionTimeout);
322
- setSocketTimeout(req, reject, this.config.requestTimeout);
323
359
  if (abortSignal) {
324
360
  const onAbort = /* @__PURE__ */ __name(() => {
325
361
  req.destroy();
@@ -335,17 +371,21 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
335
371
  abortSignal.onabort = onAbort;
336
372
  }
337
373
  }
374
+ timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));
375
+ timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));
338
376
  const httpAgent = nodeHttpsOptions.agent;
339
377
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
340
- setSocketKeepAlive(req, {
341
- // @ts-expect-error keepAlive is not public on httpAgent.
342
- keepAlive: httpAgent.keepAlive,
343
- // @ts-expect-error keepAliveMsecs is not public on httpAgent.
344
- keepAliveMsecs: httpAgent.keepAliveMsecs
345
- });
378
+ timeouts.push(
379
+ setSocketKeepAlive(req, {
380
+ // @ts-expect-error keepAlive is not public on httpAgent.
381
+ keepAlive: httpAgent.keepAlive,
382
+ // @ts-expect-error keepAliveMsecs is not public on httpAgent.
383
+ keepAliveMsecs: httpAgent.keepAliveMsecs
384
+ })
385
+ );
346
386
  }
347
387
  writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {
348
- clearTimeout(socketCheckTimeoutId);
388
+ timeouts.forEach(clearTimeout);
349
389
  return _reject(e);
350
390
  });
351
391
  });
@@ -85,17 +85,17 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
85
85
  if (!this.config) {
86
86
  this.config = await this.configProvider;
87
87
  }
88
- let socketCheckTimeoutId;
89
88
  return new Promise((_resolve, _reject) => {
90
89
  let writeRequestBodyPromise = undefined;
90
+ const timeouts = [];
91
91
  const resolve = async (arg) => {
92
92
  await writeRequestBodyPromise;
93
- clearTimeout(socketCheckTimeoutId);
93
+ timeouts.forEach(clearTimeout);
94
94
  _resolve(arg);
95
95
  };
96
96
  const reject = async (arg) => {
97
97
  await writeRequestBodyPromise;
98
- clearTimeout(socketCheckTimeoutId);
98
+ timeouts.forEach(clearTimeout);
99
99
  _reject(arg);
100
100
  };
101
101
  if (!this.config) {
@@ -109,10 +109,10 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
109
109
  }
110
110
  const isSSL = request.protocol === "https:";
111
111
  const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;
112
- socketCheckTimeoutId = setTimeout(() => {
112
+ timeouts.push(setTimeout(() => {
113
113
  this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger);
114
114
  }, this.config.socketAcquisitionWarningTimeout ??
115
- (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000));
115
+ (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000)));
116
116
  const queryString = buildQueryString(request.query || {});
117
117
  let auth = undefined;
118
118
  if (request.username != null || request.password != null) {
@@ -154,8 +154,6 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
154
154
  reject(err);
155
155
  }
156
156
  });
157
- setConnectionTimeout(req, reject, this.config.connectionTimeout);
158
- setSocketTimeout(req, reject, this.config.requestTimeout);
159
157
  if (abortSignal) {
160
158
  const onAbort = () => {
161
159
  req.destroy();
@@ -172,15 +170,17 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
172
170
  abortSignal.onabort = onAbort;
173
171
  }
174
172
  }
173
+ timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));
174
+ timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));
175
175
  const httpAgent = nodeHttpsOptions.agent;
176
176
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
177
- setSocketKeepAlive(req, {
177
+ timeouts.push(setSocketKeepAlive(req, {
178
178
  keepAlive: httpAgent.keepAlive,
179
179
  keepAliveMsecs: httpAgent.keepAliveMsecs,
180
- });
180
+ }));
181
181
  }
182
182
  writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {
183
- clearTimeout(socketCheckTimeoutId);
183
+ timeouts.forEach(clearTimeout);
184
184
  return _reject(e);
185
185
  });
186
186
  });