@cdklabs/cdk-ecs-codedeploy 0.0.301 → 0.0.303

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 (95) 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/index.js +5 -5
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-es/CodeDeployClient.js +5 -5
  8. package/node_modules/@aws-sdk/client-codedeploy/dist-types/CodeDeployClient.d.ts +2 -2
  9. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.browser.d.ts +1 -1
  10. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.d.ts +1 -1
  11. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.native.d.ts +1 -1
  12. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/CodeDeployClient.d.ts +2 -2
  13. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  14. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  15. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  16. package/node_modules/@aws-sdk/client-codedeploy/package.json +18 -18
  17. package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +5 -5
  18. package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +5 -5
  19. package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +2 -2
  20. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +1 -1
  21. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +1 -1
  22. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +1 -1
  23. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +2 -2
  24. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  25. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  26. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  27. package/node_modules/@aws-sdk/client-sso/package.json +15 -15
  28. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +5 -5
  29. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +5 -5
  30. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +2 -2
  31. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +1 -1
  32. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +1 -1
  33. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +1 -1
  34. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +2 -2
  35. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  36. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  37. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  38. package/node_modules/@aws-sdk/client-sso-oidc/package.json +17 -17
  39. package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +5 -5
  40. package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +5 -5
  41. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -2
  42. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +1 -1
  43. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +1 -1
  44. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +1 -1
  45. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +2 -2
  46. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  47. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  48. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  49. package/node_modules/@aws-sdk/client-sts/package.json +17 -17
  50. package/node_modules/@aws-sdk/core/package.json +5 -5
  51. package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
  52. package/node_modules/@aws-sdk/credential-provider-ini/package.json +5 -5
  53. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +30 -6
  54. package/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js +29 -9
  55. package/node_modules/@aws-sdk/credential-provider-node/package.json +5 -5
  56. package/node_modules/@aws-sdk/credential-provider-sso/package.json +2 -2
  57. package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
  58. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
  59. package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
  60. package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
  61. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +2 -1
  62. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +2 -1
  63. package/node_modules/@smithy/core/package.json +5 -5
  64. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +2 -1
  65. package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js +1 -0
  66. package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/ImdsCredentials.d.ts +1 -0
  67. package/node_modules/@smithy/credential-provider-imds/dist-types/ts3.4/remoteProvider/ImdsCredentials.d.ts +1 -0
  68. package/node_modules/@smithy/credential-provider-imds/package.json +1 -1
  69. package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
  70. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  71. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +7 -0
  72. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js +7 -0
  73. package/node_modules/@smithy/middleware-endpoint/package.json +1 -1
  74. package/node_modules/@smithy/middleware-retry/package.json +4 -4
  75. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  76. package/node_modules/@smithy/protocol-http/package.json +1 -1
  77. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +4 -16
  78. package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -2
  79. package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -2
  80. package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +1 -1
  81. package/node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts +3 -3
  82. package/node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts +2 -2
  83. package/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts +1 -1
  84. package/node_modules/@smithy/signature-v4/dist-types/ts3.4/moveHeadersToQuery.d.ts +3 -3
  85. package/node_modules/@smithy/signature-v4/dist-types/ts3.4/prepareRequest.d.ts +2 -2
  86. package/node_modules/@smithy/signature-v4/package.json +2 -2
  87. package/node_modules/@smithy/smithy-client/package.json +4 -4
  88. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  89. package/node_modules/@smithy/util-defaults-mode-node/package.json +3 -3
  90. package/node_modules/@smithy/util-stream/package.json +4 -4
  91. package/package.json +8 -8
  92. package/node_modules/@smithy/signature-v4/dist-cjs/cloneRequest.js +0 -1
  93. package/node_modules/@smithy/signature-v4/dist-es/cloneRequest.js +0 -12
  94. package/node_modules/@smithy/signature-v4/dist-types/cloneRequest.d.ts +0 -6
  95. package/node_modules/@smithy/signature-v4/dist-types/ts3.4/cloneRequest.d.ts +0 -6
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-ini",
3
- "version": "3.614.0",
3
+ "version": "3.620.0",
4
4
  "description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -25,12 +25,12 @@
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
27
  "@aws-sdk/credential-provider-env": "3.609.0",
28
- "@aws-sdk/credential-provider-http": "3.614.0",
28
+ "@aws-sdk/credential-provider-http": "3.620.0",
29
29
  "@aws-sdk/credential-provider-process": "3.614.0",
30
- "@aws-sdk/credential-provider-sso": "3.614.0",
30
+ "@aws-sdk/credential-provider-sso": "3.620.0",
31
31
  "@aws-sdk/credential-provider-web-identity": "3.609.0",
32
32
  "@aws-sdk/types": "3.609.0",
33
- "@smithy/credential-provider-imds": "^3.1.4",
33
+ "@smithy/credential-provider-imds": "^3.2.0",
34
34
  "@smithy/property-provider": "^3.1.3",
35
35
  "@smithy/shared-ini-file-loader": "^3.1.4",
36
36
  "@smithy/types": "^3.3.0",
@@ -45,7 +45,7 @@
45
45
  "typescript": "~4.9.5"
46
46
  },
47
47
  "peerDependencies": {
48
- "@aws-sdk/client-sts": "^3.614.0"
48
+ "@aws-sdk/client-sts": "^3.620.0"
49
49
  },
50
50
  "types": "./dist-types/index.d.ts",
51
51
  "engines": {
@@ -63,15 +63,39 @@ var remoteProvider = /* @__PURE__ */ __name(async (init) => {
63
63
  }, "remoteProvider");
64
64
 
65
65
  // src/defaultProvider.ts
66
+ var multipleCredentialSourceWarningEmitted = false;
66
67
  var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(
67
68
  (0, import_property_provider.chain)(
68
- ...init.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [
69
- async () => {
70
- var _a;
71
- (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
72
- return (0, import_credential_provider_env.fromEnv)(init)();
69
+ async () => {
70
+ var _a, _b, _c, _d;
71
+ const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE];
72
+ if (profile) {
73
+ const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET];
74
+ if (envStaticCredentialsAreSet) {
75
+ if (!multipleCredentialSourceWarningEmitted) {
76
+ const warnFn = ((_a = init.logger) == null ? void 0 : _a.warn) && ((_c = (_b = init.logger) == null ? void 0 : _b.constructor) == null ? void 0 : _c.name) !== "NoOpLogger" ? init.logger.warn : console.warn;
77
+ warnFn(
78
+ `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
79
+ Multiple credential sources detected:
80
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
81
+ This SDK will proceed with the AWS_PROFILE value.
82
+
83
+ However, a future version may change this behavior to prefer the ENV static credentials.
84
+ Please ensure that your environment only sets either the AWS_PROFILE or the
85
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
86
+ `
87
+ );
88
+ multipleCredentialSourceWarningEmitted = true;
89
+ }
90
+ }
91
+ throw new import_property_provider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
92
+ logger: init.logger,
93
+ tryNextLink: true
94
+ });
73
95
  }
74
- ],
96
+ (_d = init.logger) == null ? void 0 : _d.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
97
+ return (0, import_credential_provider_env.fromEnv)(init)();
98
+ },
75
99
  async () => {
76
100
  var _a;
77
101
  (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
@@ -1,15 +1,35 @@
1
- import { fromEnv } from "@aws-sdk/credential-provider-env";
1
+ import { ENV_KEY, ENV_SECRET, fromEnv } from "@aws-sdk/credential-provider-env";
2
2
  import { chain, CredentialsProviderError, memoize } from "@smithy/property-provider";
3
3
  import { ENV_PROFILE } from "@smithy/shared-ini-file-loader";
4
4
  import { remoteProvider } from "./remoteProvider";
5
- export const defaultProvider = (init = {}) => memoize(chain(...(init.profile || process.env[ENV_PROFILE]
6
- ? []
7
- : [
8
- async () => {
9
- init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
10
- return fromEnv(init)();
11
- },
12
- ]), async () => {
5
+ let multipleCredentialSourceWarningEmitted = false;
6
+ export const defaultProvider = (init = {}) => memoize(chain(async () => {
7
+ const profile = init.profile ?? process.env[ENV_PROFILE];
8
+ if (profile) {
9
+ const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];
10
+ if (envStaticCredentialsAreSet) {
11
+ if (!multipleCredentialSourceWarningEmitted) {
12
+ const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn;
13
+ warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
14
+ Multiple credential sources detected:
15
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
16
+ This SDK will proceed with the AWS_PROFILE value.
17
+
18
+ However, a future version may change this behavior to prefer the ENV static credentials.
19
+ Please ensure that your environment only sets either the AWS_PROFILE or the
20
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
21
+ `);
22
+ multipleCredentialSourceWarningEmitted = true;
23
+ }
24
+ }
25
+ throw new CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
26
+ logger: init.logger,
27
+ tryNextLink: true,
28
+ });
29
+ }
30
+ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
31
+ return fromEnv(init)();
32
+ }, async () => {
13
33
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
14
34
  const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
15
35
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-node",
3
- "version": "3.614.0",
3
+ "version": "3.620.0",
4
4
  "description": "AWS credential provider that sources credentials from a Node.JS environment. ",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
@@ -29,13 +29,13 @@
29
29
  "license": "Apache-2.0",
30
30
  "dependencies": {
31
31
  "@aws-sdk/credential-provider-env": "3.609.0",
32
- "@aws-sdk/credential-provider-http": "3.614.0",
33
- "@aws-sdk/credential-provider-ini": "3.614.0",
32
+ "@aws-sdk/credential-provider-http": "3.620.0",
33
+ "@aws-sdk/credential-provider-ini": "3.620.0",
34
34
  "@aws-sdk/credential-provider-process": "3.614.0",
35
- "@aws-sdk/credential-provider-sso": "3.614.0",
35
+ "@aws-sdk/credential-provider-sso": "3.620.0",
36
36
  "@aws-sdk/credential-provider-web-identity": "3.609.0",
37
37
  "@aws-sdk/types": "3.609.0",
38
- "@smithy/credential-provider-imds": "^3.1.4",
38
+ "@smithy/credential-provider-imds": "^3.2.0",
39
39
  "@smithy/property-provider": "^3.1.3",
40
40
  "@smithy/shared-ini-file-loader": "^3.1.4",
41
41
  "@smithy/types": "^3.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-sso",
3
- "version": "3.614.0",
3
+ "version": "3.620.0",
4
4
  "description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/client-sso": "3.614.0",
27
+ "@aws-sdk/client-sso": "3.620.0",
28
28
  "@aws-sdk/token-providers": "3.614.0",
29
29
  "@aws-sdk/types": "3.609.0",
30
30
  "@smithy/property-provider": "^3.1.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-host-header",
3
- "version": "3.609.0",
3
+ "version": "3.620.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-host-header",
@@ -22,7 +22,7 @@
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
24
  "@aws-sdk/types": "3.609.0",
25
- "@smithy/protocol-http": "^4.0.3",
25
+ "@smithy/protocol-http": "^4.1.0",
26
26
  "@smithy/types": "^3.3.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-recursion-detection",
3
- "version": "3.609.0",
3
+ "version": "3.620.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-recursion-detection",
@@ -22,7 +22,7 @@
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
24
  "@aws-sdk/types": "3.609.0",
25
- "@smithy/protocol-http": "^4.0.3",
25
+ "@smithy/protocol-http": "^4.1.0",
26
26
  "@smithy/types": "^3.3.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-user-agent",
3
- "version": "3.614.0",
3
+ "version": "3.620.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-user-agent",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@aws-sdk/types": "3.609.0",
26
26
  "@aws-sdk/util-endpoints": "3.614.0",
27
- "@smithy/protocol-http": "^4.0.3",
27
+ "@smithy/protocol-http": "^4.1.0",
28
28
  "@smithy/types": "^3.3.0",
29
29
  "tslib": "^2.6.2"
30
30
  },
@@ -210,6 +210,7 @@ __name(_DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig");
210
210
  var DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig;
211
211
 
212
212
  // src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts
213
+
213
214
  var import_types = require("@smithy/types");
214
215
  var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner {
215
216
  async sign(httpRequest, identity, signingProperties) {
@@ -227,7 +228,7 @@ var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner {
227
228
  if (!identity.apiKey) {
228
229
  throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
229
230
  }
230
- const clonedRequest = httpRequest.clone();
231
+ const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);
231
232
  if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) {
232
233
  clonedRequest.query[signingProperties.name] = identity.apiKey;
233
234
  } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) {
@@ -244,9 +245,10 @@ __name(_HttpApiKeyAuthSigner, "HttpApiKeyAuthSigner");
244
245
  var HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner;
245
246
 
246
247
  // src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts
248
+
247
249
  var _HttpBearerAuthSigner = class _HttpBearerAuthSigner {
248
250
  async sign(httpRequest, identity, signingProperties) {
249
- const clonedRequest = httpRequest.clone();
251
+ const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);
250
252
  if (!identity.token) {
251
253
  throw new Error("request could not be signed with `token` since the `token` is not defined");
252
254
  }
@@ -1,3 +1,4 @@
1
+ import { HttpRequest } from "@smithy/protocol-http";
1
2
  import { HttpApiKeyAuthLocation } from "@smithy/types";
2
3
  export class HttpApiKeyAuthSigner {
3
4
  async sign(httpRequest, identity, signingProperties) {
@@ -13,7 +14,7 @@ export class HttpApiKeyAuthSigner {
13
14
  if (!identity.apiKey) {
14
15
  throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
15
16
  }
16
- const clonedRequest = httpRequest.clone();
17
+ const clonedRequest = HttpRequest.clone(httpRequest);
17
18
  if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {
18
19
  clonedRequest.query[signingProperties.name] = identity.apiKey;
19
20
  }
@@ -1,6 +1,7 @@
1
+ import { HttpRequest } from "@smithy/protocol-http";
1
2
  export class HttpBearerAuthSigner {
2
3
  async sign(httpRequest, identity, signingProperties) {
3
- const clonedRequest = httpRequest.clone();
4
+ const clonedRequest = HttpRequest.clone(httpRequest);
4
5
  if (!identity.token) {
5
6
  throw new Error("request could not be signed with `token` since the `token` is not defined");
6
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "2.2.8",
3
+ "version": "2.3.0",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
- "@smithy/middleware-endpoint": "^3.0.5",
42
- "@smithy/middleware-retry": "^3.0.11",
41
+ "@smithy/middleware-endpoint": "^3.1.0",
42
+ "@smithy/middleware-retry": "^3.0.12",
43
43
  "@smithy/middleware-serde": "^3.0.3",
44
- "@smithy/protocol-http": "^4.0.4",
45
- "@smithy/smithy-client": "^3.1.9",
44
+ "@smithy/protocol-http": "^4.1.0",
45
+ "@smithy/smithy-client": "^3.1.10",
46
46
  "@smithy/types": "^3.3.0",
47
47
  "@smithy/util-middleware": "^3.0.3",
48
48
  "tslib": "^2.6.2"
@@ -88,7 +88,8 @@ var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({
88
88
  accessKeyId: creds.AccessKeyId,
89
89
  secretAccessKey: creds.SecretAccessKey,
90
90
  sessionToken: creds.Token,
91
- expiration: new Date(creds.Expiration)
91
+ expiration: new Date(creds.Expiration),
92
+ ...creds.AccountId && { accountId: creds.AccountId }
92
93
  }), "fromImdsCredentials");
93
94
 
94
95
  // src/remoteProvider/RemoteProviderInit.ts
@@ -9,4 +9,5 @@ export const fromImdsCredentials = (creds) => ({
9
9
  secretAccessKey: creds.SecretAccessKey,
10
10
  sessionToken: creds.Token,
11
11
  expiration: new Date(creds.Expiration),
12
+ ...(creds.AccountId && { accountId: creds.AccountId }),
12
13
  });
@@ -7,6 +7,7 @@ export interface ImdsCredentials {
7
7
  SecretAccessKey: string;
8
8
  Token: string;
9
9
  Expiration: string;
10
+ AccountId?: string;
10
11
  }
11
12
  /**
12
13
  * @internal
@@ -7,6 +7,7 @@ export interface ImdsCredentials {
7
7
  SecretAccessKey: string;
8
8
  Token: string;
9
9
  Expiration: string;
10
+ AccountId?: string;
10
11
  }
11
12
  /**
12
13
  * @internal
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/credential-provider-imds",
3
- "version": "3.1.4",
3
+ "version": "3.2.0",
4
4
  "description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -24,7 +24,7 @@
24
24
  "module": "./dist-es/index.js",
25
25
  "types": "./dist-types/index.d.ts",
26
26
  "dependencies": {
27
- "@smithy/protocol-http": "^4.0.4",
27
+ "@smithy/protocol-http": "^4.1.0",
28
28
  "@smithy/querystring-builder": "^3.0.3",
29
29
  "@smithy/types": "^3.3.0",
30
30
  "@smithy/util-base64": "^3.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-content-length",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
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,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/protocol-http": "^4.0.4",
26
+ "@smithy/protocol-http": "^4.1.0",
27
27
  "@smithy/types": "^3.3.0",
28
28
  "tslib": "^2.6.2"
29
29
  },
@@ -47,7 +47,7 @@
47
47
  "directory": "packages/middleware-content-length"
48
48
  },
49
49
  "devDependencies": {
50
- "@smithy/util-test": "^0.2.5",
50
+ "@smithy/util-test": "^0.2.6",
51
51
  "concurrently": "7.0.0",
52
52
  "downlevel-dts": "0.10.1",
53
53
  "rimraf": "3.0.2",
@@ -79,6 +79,13 @@ var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndp
79
79
  return configValue;
80
80
  };
81
81
  }
82
+ if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
83
+ return async () => {
84
+ const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
85
+ const configValue = (credentials == null ? void 0 : credentials.accountId) ?? (credentials == null ? void 0 : credentials.AccountId);
86
+ return configValue;
87
+ };
88
+ }
82
89
  if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
83
90
  return async () => {
84
91
  const endpoint = await configProvider();
@@ -13,6 +13,13 @@ export const createConfigValueProvider = (configKey, canonicalEndpointParamKey,
13
13
  return configValue;
14
14
  };
15
15
  }
16
+ if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
17
+ return async () => {
18
+ const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
19
+ const configValue = credentials?.accountId ?? credentials?.AccountId;
20
+ return configValue;
21
+ };
22
+ }
16
23
  if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
17
24
  return async () => {
18
25
  const endpoint = await configProvider();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-endpoint",
3
- "version": "3.0.5",
3
+ "version": "3.1.0",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "3.0.11",
3
+ "version": "3.0.12",
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",
@@ -32,9 +32,9 @@
32
32
  "license": "Apache-2.0",
33
33
  "dependencies": {
34
34
  "@smithy/node-config-provider": "^3.1.4",
35
- "@smithy/protocol-http": "^4.0.4",
35
+ "@smithy/protocol-http": "^4.1.0",
36
36
  "@smithy/service-error-classification": "^3.0.3",
37
- "@smithy/smithy-client": "^3.1.9",
37
+ "@smithy/smithy-client": "^3.1.10",
38
38
  "@smithy/types": "^3.3.0",
39
39
  "@smithy/util-middleware": "^3.0.3",
40
40
  "@smithy/util-retry": "^3.0.3",
@@ -42,7 +42,7 @@
42
42
  "uuid": "^9.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@smithy/util-test": "^0.2.5",
45
+ "@smithy/util-test": "^0.2.6",
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/node-http-handler",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -26,7 +26,7 @@
26
26
  "types": "./dist-types/index.d.ts",
27
27
  "dependencies": {
28
28
  "@smithy/abort-controller": "^3.1.1",
29
- "@smithy/protocol-http": "^4.0.4",
29
+ "@smithy/protocol-http": "^4.1.0",
30
30
  "@smithy/querystring-builder": "^3.0.3",
31
31
  "@smithy/types": "^3.3.0",
32
32
  "tslib": "^2.6.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/protocol-http",
3
- "version": "4.0.4",
3
+ "version": "4.1.0",
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 protocol-http",
@@ -307,24 +307,11 @@ var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => {
307
307
  return false;
308
308
  }, "hasHeader");
309
309
 
310
- // src/cloneRequest.ts
311
- var cloneRequest = /* @__PURE__ */ __name(({ headers, query, ...rest }) => ({
312
- ...rest,
313
- headers: { ...headers },
314
- query: query ? cloneQuery(query) : void 0
315
- }), "cloneRequest");
316
- var cloneQuery = /* @__PURE__ */ __name((query) => Object.keys(query).reduce((carry, paramName) => {
317
- const param = query[paramName];
318
- return {
319
- ...carry,
320
- [paramName]: Array.isArray(param) ? [...param] : param
321
- };
322
- }, {}), "cloneQuery");
323
-
324
310
  // src/moveHeadersToQuery.ts
311
+ var import_protocol_http = require("@smithy/protocol-http");
325
312
  var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {
326
313
  var _a;
327
- const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
314
+ const { headers, query = {} } = import_protocol_http.HttpRequest.clone(request);
328
315
  for (const name of Object.keys(headers)) {
329
316
  const lname = name.toLowerCase();
330
317
  if (lname.slice(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) == null ? void 0 : _a.has(lname))) {
@@ -340,8 +327,9 @@ var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {
340
327
  }, "moveHeadersToQuery");
341
328
 
342
329
  // src/prepareRequest.ts
330
+
343
331
  var prepareRequest = /* @__PURE__ */ __name((request) => {
344
- request = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
332
+ request = import_protocol_http.HttpRequest.clone(request);
345
333
  for (const headerName of Object.keys(request.headers)) {
346
334
  if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
347
335
  delete request.headers[headerName];
@@ -1,6 +1,6 @@
1
- import { cloneRequest } from "./cloneRequest";
1
+ import { HttpRequest } from "@smithy/protocol-http";
2
2
  export const moveHeadersToQuery = (request, options = {}) => {
3
- const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
3
+ const { headers, query = {} } = HttpRequest.clone(request);
4
4
  for (const name of Object.keys(headers)) {
5
5
  const lname = name.toLowerCase();
6
6
  if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) {
@@ -1,7 +1,7 @@
1
- import { cloneRequest } from "./cloneRequest";
1
+ import { HttpRequest } from "@smithy/protocol-http";
2
2
  import { GENERATED_HEADERS } from "./constants";
3
3
  export const prepareRequest = (request) => {
4
- request = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
4
+ request = HttpRequest.clone(request);
5
5
  for (const headerName of Object.keys(request.headers)) {
6
6
  if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
7
7
  delete request.headers[headerName];
@@ -18,7 +18,7 @@ export interface SignatureV4Init {
18
18
  * A constructor function for a hash object that will calculate SHA-256 HMAC
19
19
  * checksums.
20
20
  */
21
- sha256?: ChecksumConstructor | HashConstructor;
21
+ sha256: ChecksumConstructor | HashConstructor;
22
22
  /**
23
23
  * Whether to uri-escape the request URI path as part of computing the
24
24
  * canonical request string. This is required for every AWS service, except
@@ -1,9 +1,9 @@
1
- import { HttpRequest, QueryParameterBag } from "@smithy/types";
1
+ import type { HttpRequest as IHttpRequest, QueryParameterBag } from "@smithy/types";
2
2
  /**
3
3
  * @private
4
4
  */
5
- export declare const moveHeadersToQuery: (request: HttpRequest, options?: {
5
+ export declare const moveHeadersToQuery: (request: IHttpRequest, options?: {
6
6
  unhoistableHeaders?: Set<string>;
7
- }) => HttpRequest & {
7
+ }) => IHttpRequest & {
8
8
  query: QueryParameterBag;
9
9
  };
@@ -1,5 +1,5 @@
1
- import { HttpRequest } from "@smithy/types";
1
+ import type { HttpRequest as IHttpRequest } from "@smithy/types";
2
2
  /**
3
3
  * @private
4
4
  */
5
- export declare const prepareRequest: (request: HttpRequest) => HttpRequest;
5
+ export declare const prepareRequest: (request: IHttpRequest) => IHttpRequest;
@@ -18,7 +18,7 @@ export interface SignatureV4Init {
18
18
  * A constructor function for a hash object that will calculate SHA-256 HMAC
19
19
  * checksums.
20
20
  */
21
- sha256?: ChecksumConstructor | HashConstructor;
21
+ sha256: ChecksumConstructor | HashConstructor;
22
22
  /**
23
23
  * Whether to uri-escape the request URI path as part of computing the
24
24
  * canonical request string. This is required for every AWS service, except
@@ -1,9 +1,9 @@
1
- import { HttpRequest, QueryParameterBag } from "@smithy/types";
1
+ import { HttpRequest as IHttpRequest, QueryParameterBag } from "@smithy/types";
2
2
  /**
3
3
  * @private
4
4
  */
5
- export declare const moveHeadersToQuery: (request: HttpRequest, options?: {
5
+ export declare const moveHeadersToQuery: (request: IHttpRequest, options?: {
6
6
  unhoistableHeaders?: Set<string>;
7
- }) => HttpRequest & {
7
+ }) => IHttpRequest & {
8
8
  query: QueryParameterBag;
9
9
  };
@@ -1,5 +1,5 @@
1
- import { HttpRequest } from "@smithy/types";
1
+ import { HttpRequest as IHttpRequest } from "@smithy/types";
2
2
  /**
3
3
  * @private
4
4
  */
5
- export declare const prepareRequest: (request: HttpRequest) => HttpRequest;
5
+ export declare const prepareRequest: (request: IHttpRequest) => IHttpRequest;