@cdk8s/awscdk-resolver 0.0.600 → 0.0.601

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 (117) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
  4. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/bdd.js +2 -5
  5. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/endpointResolver.js +7 -11
  6. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +449 -469
  7. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/CloudFormationServiceException.js +4 -8
  8. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/errors.js +59 -91
  9. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.browser.js +22 -26
  10. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.js +30 -34
  11. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.native.js +4 -7
  12. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.shared.js +20 -24
  13. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/schemas/schemas_0.js +814 -533
  14. package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
  15. package/node_modules/@aws-sdk/core/dist-cjs/index.js +45 -50
  16. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
  17. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +21 -22
  18. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -51
  19. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +21 -22
  20. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
  21. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
  22. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
  23. package/node_modules/@aws-sdk/core/package.json +8 -8
  24. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
  25. package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
  26. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
  27. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
  28. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
  29. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
  30. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
  31. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
  32. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
  33. package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
  34. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
  35. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
  36. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
  37. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  38. package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
  39. package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
  40. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
  41. package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
  42. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
  43. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  44. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +22 -24
  45. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
  46. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  47. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
  48. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
  49. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
  50. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  51. package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
  52. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
  53. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
  54. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
  55. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
  56. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
  57. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
  58. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
  59. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
  60. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
  61. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  62. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
  63. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  64. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
  65. package/node_modules/@aws-sdk/nested-clients/package.json +9 -8
  66. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
  67. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
  68. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
  69. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  70. package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
  71. package/node_modules/@aws-sdk/types/package.json +4 -4
  72. package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
  73. package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
  74. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
  75. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
  76. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
  77. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
  78. package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
  79. package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
  80. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
  81. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
  82. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
  83. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
  84. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
  85. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
  86. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
  87. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
  88. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
  89. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
  90. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
  91. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
  92. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
  93. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +23 -24
  94. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +25 -26
  95. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
  96. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
  97. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
  98. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
  99. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
  100. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
  101. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
  102. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
  103. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
  104. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
  105. package/node_modules/@smithy/core/package.json +7 -6
  106. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
  107. package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
  108. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
  109. package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
  110. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
  111. package/node_modules/@smithy/node-http-handler/package.json +7 -7
  112. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
  113. package/node_modules/@smithy/signature-v4/package.json +6 -6
  114. package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
  115. package/node_modules/@smithy/types/package.json +4 -4
  116. package/package.json +3 -3
  117. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@smithy/credential-provider-imds",
3
- "version": "4.3.9",
3
+ "version": "4.4.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",
7
7
  "scripts": {
8
8
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
9
- "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
10
- "build:types": "yarn g:tsc -p tsconfig.types.json",
9
+ "build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
10
+ "build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
11
11
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
12
- "clean": "premove dist-cjs dist-es dist-types *.tsbuildinfo",
12
+ "clean": "premove dist-cjs dist-es dist-types",
13
13
  "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
14
14
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
15
15
  "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
@@ -27,8 +27,8 @@
27
27
  "license": "Apache-2.0",
28
28
  "sideEffects": false,
29
29
  "dependencies": {
30
- "@smithy/core": "^3.24.7",
31
- "@smithy/types": "^4.14.4",
30
+ "@smithy/core": "^3.25.0",
31
+ "@smithy/types": "^4.15.0",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "devDependencies": {
@@ -1,7 +1,5 @@
1
- 'use strict';
2
-
3
- var protocols = require('@smithy/core/protocols');
4
- var serde = require('@smithy/core/serde');
1
+ const { buildQueryString, HttpResponse } = require("@smithy/core/protocols");
2
+ const { fromBase64 } = require("@smithy/core/serde");
5
3
 
6
4
  function createRequest(url, requestOptions) {
7
5
  return new Request(url, requestOptions);
@@ -57,7 +55,7 @@ class FetchHttpHandler {
57
55
  return Promise.reject(abortError);
58
56
  }
59
57
  let path = request.path;
60
- const queryString = protocols.buildQueryString(request.query || {});
58
+ const queryString = buildQueryString(request.query || {});
61
59
  if (queryString) {
62
60
  path += `?${queryString}`;
63
61
  }
@@ -106,7 +104,7 @@ class FetchHttpHandler {
106
104
  const hasReadableStream = response.body != undefined;
107
105
  if (!hasReadableStream) {
108
106
  return response.blob().then((body) => ({
109
- response: new protocols.HttpResponse({
107
+ response: new HttpResponse({
110
108
  headers: transformedHeaders,
111
109
  reason: response.statusText,
112
110
  statusCode: response.status,
@@ -115,7 +113,7 @@ class FetchHttpHandler {
115
113
  }));
116
114
  }
117
115
  return {
118
- response: new protocols.HttpResponse({
116
+ response: new HttpResponse({
119
117
  headers: transformedHeaders,
120
118
  reason: response.statusText,
121
119
  statusCode: response.status,
@@ -185,7 +183,7 @@ const streamCollector = async (stream) => {
185
183
  };
186
184
  async function collectBlob(blob) {
187
185
  const base64 = await readToBase64(blob);
188
- const arrayBuffer = serde.fromBase64(base64);
186
+ const arrayBuffer = fromBase64(base64);
189
187
  return new Uint8Array(arrayBuffer);
190
188
  }
191
189
  async function collectStream(stream) {
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.4.7",
3
+ "version": "5.5.0",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
7
- "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
8
- "build:types": "yarn g:tsc -p tsconfig.types.json",
7
+ "build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
8
+ "build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
9
9
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
- "clean": "premove dist-cjs dist-es dist-types *.tsbuildinfo",
10
+ "clean": "premove dist-cjs dist-es dist-types",
11
11
  "extract:docs": "api-extractor run --local",
12
12
  "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
13
13
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -27,12 +27,12 @@
27
27
  "module": "./dist-es/index.js",
28
28
  "types": "./dist-types/index.d.ts",
29
29
  "dependencies": {
30
- "@smithy/core": "^3.24.7",
31
- "@smithy/types": "^4.14.4",
30
+ "@smithy/core": "^3.25.0",
31
+ "@smithy/types": "^4.15.0",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "devDependencies": {
35
- "@smithy/abort-controller": "^4.2.17",
35
+ "@smithy/abort-controller": "^4.3.0",
36
36
  "concurrently": "7.0.0",
37
37
  "downlevel-dts": "0.10.1",
38
38
  "premove": "4.0.0",
@@ -1,9 +1,7 @@
1
- 'use strict';
2
-
3
- var protocols = require('@smithy/core/protocols');
4
- var node_https = require('node:https');
5
- var node_stream = require('node:stream');
6
- var http2 = require('node:http2');
1
+ const { buildQueryString, HttpResponse } = require("@smithy/core/protocols");
2
+ const node_https = require("node:https");
3
+ const { Readable, Writable } = require("node:stream");
4
+ const http2 = require("node:http2");
7
5
 
8
6
  function buildAbortError(abortSignal) {
9
7
  const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
@@ -175,7 +173,7 @@ async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN
175
173
  }
176
174
  }
177
175
  function writeBody(httpRequest, body) {
178
- if (body instanceof node_stream.Readable) {
176
+ if (body instanceof Readable) {
179
177
  body.pipe(httpRequest);
180
178
  return;
181
179
  }
@@ -311,7 +309,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
311
309
  socketWarningTimeoutId = timing.setTimeout(() => {
312
310
  this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
313
311
  }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));
314
- const queryString = request.query ? protocols.buildQueryString(request.query) : "";
312
+ const queryString = request.query ? buildQueryString(request.query) : "";
315
313
  let auth = undefined;
316
314
  if (request.username != null || request.password != null) {
317
315
  const username = request.username ?? "";
@@ -343,7 +341,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
343
341
  };
344
342
  const requestFunc = isSSL ? node_https.request : hRequest;
345
343
  const req = requestFunc(nodeHttpsOptions, (res) => {
346
- const httpResponse = new protocols.HttpResponse({
344
+ const httpResponse = new HttpResponse({
347
345
  statusCode: res.statusCode || -1,
348
346
  reason: res.statusMessage,
349
347
  headers: getTransformedHeaders(res.headers),
@@ -414,7 +412,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
414
412
  socketAcquisitionWarningTimeout,
415
413
  throwOnRequestTimeout,
416
414
  httpAgentProvider: async () => {
417
- const node_http = await import('node:http');
415
+ const node_http = require('node:http');
418
416
  const { Agent, request } = node_http.default ?? node_http;
419
417
  hRequest = request;
420
418
  hAgent = Agent;
@@ -752,7 +750,7 @@ class NodeHttp2Handler {
752
750
  fulfilled = true;
753
751
  reject(err);
754
752
  };
755
- const queryString = query ? protocols.buildQueryString(query) : "";
753
+ const queryString = query ? buildQueryString(query) : "";
756
754
  let path = request.path;
757
755
  if (queryString) {
758
756
  path += `?${queryString}`;
@@ -796,7 +794,7 @@ class NodeHttp2Handler {
796
794
  rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
797
795
  });
798
796
  clientHttp2Stream.on("response", (headers) => {
799
- const httpResponse = new protocols.HttpResponse({
797
+ const httpResponse = new HttpResponse({
800
798
  statusCode: headers[":status"] ?? -1,
801
799
  headers: getTransformedHeaders(headers),
802
800
  body: clientHttp2Stream,
@@ -835,7 +833,7 @@ class NodeHttp2Handler {
835
833
  }
836
834
  }
837
835
 
838
- class Collector extends node_stream.Writable {
836
+ class Collector extends Writable {
839
837
  bufferedBytes = [];
840
838
  _write(chunk, encoding, callback) {
841
839
  this.bufferedBytes.push(chunk);
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@smithy/node-http-handler",
3
- "version": "4.7.8",
3
+ "version": "4.8.0",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
7
- "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
8
- "build:types": "yarn g:tsc -p tsconfig.types.json",
7
+ "build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
8
+ "build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
9
9
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
- "clean": "premove dist-cjs dist-es dist-types *.tsbuildinfo",
10
+ "clean": "premove dist-cjs dist-es dist-types",
11
11
  "extract:docs": "api-extractor run --local",
12
12
  "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
13
13
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -26,12 +26,12 @@
26
26
  "module": "./dist-es/index.js",
27
27
  "types": "./dist-types/index.d.ts",
28
28
  "dependencies": {
29
- "@smithy/core": "^3.24.7",
30
- "@smithy/types": "^4.14.4",
29
+ "@smithy/core": "^3.25.0",
30
+ "@smithy/types": "^4.15.0",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
34
- "@smithy/abort-controller": "^4.2.17",
34
+ "@smithy/abort-controller": "^4.3.0",
35
35
  "@types/node": "^18.11.9",
36
36
  "concurrently": "7.0.0",
37
37
  "downlevel-dts": "0.10.1",
@@ -1,14 +1,12 @@
1
- 'use strict';
2
-
3
- var serde = require('@smithy/core/serde');
4
- var client = require('@smithy/core/client');
5
- var protocols = require('@smithy/core/protocols');
1
+ const { fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require("@smithy/core/serde");
2
+ const { normalizeProvider } = require("@smithy/core/client");
3
+ const { escapeUri, HttpRequest } = require("@smithy/core/protocols");
6
4
 
7
5
  class HeaderFormatter {
8
6
  format(headers) {
9
7
  const chunks = [];
10
8
  for (const headerName of Object.keys(headers)) {
11
- const bytes = serde.fromUtf8(headerName);
9
+ const bytes = fromUtf8(headerName);
12
10
  chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
13
11
  }
14
12
  const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
@@ -48,7 +46,7 @@ class HeaderFormatter {
48
46
  binBytes.set(header.value, 3);
49
47
  return binBytes;
50
48
  case "string":
51
- const utf8Bytes = serde.fromUtf8(header.value);
49
+ const utf8Bytes = fromUtf8(header.value);
52
50
  const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
53
51
  strView.setUint8(0, 7);
54
52
  strView.setUint16(1, utf8Bytes.byteLength, false);
@@ -66,7 +64,7 @@ class HeaderFormatter {
66
64
  }
67
65
  const uuidBytes = new Uint8Array(17);
68
66
  uuidBytes[0] = 9;
69
- uuidBytes.set(serde.fromHex(header.value.replace(/\-/g, "")), 1);
67
+ uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1);
70
68
  return uuidBytes;
71
69
  }
72
70
  }
@@ -112,7 +110,7 @@ class Int64 {
112
110
  if (negative) {
113
111
  negate(bytes);
114
112
  }
115
- return parseInt(serde.toHex(bytes), 16) * (negative ? -1 : 1);
113
+ return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);
116
114
  }
117
115
  toString() {
118
116
  return String(this.valueOf());
@@ -180,16 +178,16 @@ const getCanonicalQuery = ({ query = {} }) => {
180
178
  if (key.toLowerCase() === SIGNATURE_HEADER) {
181
179
  continue;
182
180
  }
183
- const encodedKey = protocols.escapeUri(key);
181
+ const encodedKey = escapeUri(key);
184
182
  keys.push(encodedKey);
185
183
  const value = query[key];
186
184
  if (typeof value === "string") {
187
- serialized[encodedKey] = `${encodedKey}=${protocols.escapeUri(value)}`;
185
+ serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;
188
186
  }
189
187
  else if (Array.isArray(value)) {
190
188
  serialized[encodedKey] = value
191
189
  .slice(0)
192
- .reduce((encoded, value) => encoded.concat([`${encodedKey}=${protocols.escapeUri(value)}`]), [])
190
+ .reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), [])
193
191
  .sort()
194
192
  .join("&");
195
193
  }
@@ -229,8 +227,8 @@ class SignatureV4Base {
229
227
  this.sha256 = sha256;
230
228
  this.uriEscapePath = uriEscapePath;
231
229
  this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
232
- this.regionProvider = client.normalizeProvider(region);
233
- this.credentialProvider = client.normalizeProvider(credentials);
230
+ this.regionProvider = normalizeProvider(region);
231
+ this.credentialProvider = normalizeProvider(credentials);
234
232
  }
235
233
  createCanonicalRequest(request, canonicalHeaders, payloadHash) {
236
234
  const sortedHeaders = Object.keys(canonicalHeaders).sort();
@@ -244,12 +242,12 @@ ${payloadHash}`;
244
242
  }
245
243
  async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
246
244
  const hash = new this.sha256();
247
- hash.update(serde.toUint8Array(canonicalRequest));
245
+ hash.update(toUint8Array(canonicalRequest));
248
246
  const hashedRequest = await hash.digest();
249
247
  return `${algorithmIdentifier}
250
248
  ${longDate}
251
249
  ${credentialScope}
252
- ${serde.toHex(hashedRequest)}`;
250
+ ${toHex(hashedRequest)}`;
253
251
  }
254
252
  getCanonicalPath({ path }) {
255
253
  if (this.uriEscapePath) {
@@ -267,7 +265,7 @@ ${serde.toHex(hashedRequest)}`;
267
265
  }
268
266
  }
269
267
  const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
270
- const doubleEncoded = protocols.escapeUri(normalizedPath);
268
+ const doubleEncoded = escapeUri(normalizedPath);
271
269
  return doubleEncoded.replace(/%2F/g, "/");
272
270
  }
273
271
  return path;
@@ -296,7 +294,7 @@ const cacheQueue = [];
296
294
  const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
297
295
  const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
298
296
  const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
299
- const cacheKey = `${shortDate}:${region}:${service}:${serde.toHex(credsHash)}:${credentials.sessionToken}`;
297
+ const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;
300
298
  if (cacheKey in signingKeyCache) {
301
299
  return signingKeyCache[cacheKey];
302
300
  }
@@ -318,7 +316,7 @@ const clearCredentialCache = () => {
318
316
  };
319
317
  const hmac = (ctor, secret, data) => {
320
318
  const hash = new ctor(secret);
321
- hash.update(serde.toUint8Array(data));
319
+ hash.update(toUint8Array(data));
322
320
  return hash.digest();
323
321
  };
324
322
 
@@ -351,10 +349,10 @@ const getPayloadHash = async ({ headers, body }, hashConstructor) => {
351
349
  if (body == undefined) {
352
350
  return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
353
351
  }
354
- else if (typeof body === "string" || ArrayBuffer.isView(body) || serde.isArrayBuffer(body)) {
352
+ else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {
355
353
  const hashCtor = new hashConstructor();
356
- hashCtor.update(serde.toUint8Array(body));
357
- return serde.toHex(await hashCtor.digest());
354
+ hashCtor.update(toUint8Array(body));
355
+ return toHex(await hashCtor.digest());
358
356
  }
359
357
  return UNSIGNED_PAYLOAD;
360
358
  };
@@ -370,7 +368,7 @@ const hasHeader = (soughtHeader, headers) => {
370
368
  };
371
369
 
372
370
  const moveHeadersToQuery = (request, options = {}) => {
373
- const { headers, query = {} } = protocols.HttpRequest.clone(request);
371
+ const { headers, query = {} } = HttpRequest.clone(request);
374
372
  for (const name of Object.keys(headers)) {
375
373
  const lname = name.toLowerCase();
376
374
  if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) ||
@@ -387,7 +385,7 @@ const moveHeadersToQuery = (request, options = {}) => {
387
385
  };
388
386
 
389
387
  const prepareRequest = (request) => {
390
- request = protocols.HttpRequest.clone(request);
388
+ request = HttpRequest.clone(request);
391
389
  for (const headerName of Object.keys(request.headers)) {
392
390
  if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
393
391
  delete request.headers[headerName];
@@ -452,7 +450,7 @@ class SignatureV4 extends SignatureV4Base {
452
450
  const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);
453
451
  const hash = new this.sha256();
454
452
  hash.update(headers);
455
- const hashedHeaders = serde.toHex(await hash.digest());
453
+ const hashedHeaders = toHex(await hash.digest());
456
454
  const stringToSign = [
457
455
  EVENT_ALGORITHM_IDENTIFIER,
458
456
  longDate,
@@ -489,8 +487,8 @@ class SignatureV4 extends SignatureV4Base {
489
487
  const region = signingRegion ?? (await this.regionProvider());
490
488
  const { shortDate } = this.formatDate(signingDate);
491
489
  const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
492
- hash.update(serde.toUint8Array(stringToSign));
493
- return serde.toHex(await hash.digest());
490
+ hash.update(toUint8Array(stringToSign));
491
+ return toHex(await hash.digest());
494
492
  }
495
493
  async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {
496
494
  const credentials = await this.credentialProvider();
@@ -519,8 +517,8 @@ class SignatureV4 extends SignatureV4Base {
519
517
  async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
520
518
  const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
521
519
  const hash = new this.sha256(await keyPromise);
522
- hash.update(serde.toUint8Array(stringToSign));
523
- return serde.toHex(await hash.digest());
520
+ hash.update(toUint8Array(stringToSign));
521
+ return toHex(await hash.digest());
524
522
  }
525
523
  getSigningKey(credentials, region, shortDate, service) {
526
524
  return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "5.4.7",
3
+ "version": "5.5.0",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
7
7
  "types": "./dist-types/index.d.ts",
8
8
  "scripts": {
9
9
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
10
- "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
11
- "build:types": "yarn g:tsc -p tsconfig.types.json",
10
+ "build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
11
+ "build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
12
12
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
13
- "clean": "premove dist-cjs dist-es dist-types *.tsbuildinfo",
13
+ "clean": "premove dist-cjs dist-es dist-types",
14
14
  "extract:docs": "api-extractor run --local",
15
15
  "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
16
16
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -25,8 +25,8 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/core": "^3.24.7",
29
- "@smithy/types": "^4.14.4",
28
+ "@smithy/core": "^3.25.0",
29
+ "@smithy/types": "^4.15.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "devDependencies": {
@@ -1,42 +1,40 @@
1
- 'use strict';
2
-
3
- exports.HttpAuthLocation = void 0;
1
+ var HttpAuthLocation;
4
2
  (function (HttpAuthLocation) {
5
3
  HttpAuthLocation["HEADER"] = "header";
6
4
  HttpAuthLocation["QUERY"] = "query";
7
- })(exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));
5
+ })(HttpAuthLocation || (HttpAuthLocation = {}));
8
6
 
9
- exports.HttpApiKeyAuthLocation = void 0;
7
+ var HttpApiKeyAuthLocation;
10
8
  (function (HttpApiKeyAuthLocation) {
11
9
  HttpApiKeyAuthLocation["HEADER"] = "header";
12
10
  HttpApiKeyAuthLocation["QUERY"] = "query";
13
- })(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {}));
11
+ })(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));
14
12
 
15
- exports.EndpointURLScheme = void 0;
13
+ var EndpointURLScheme;
16
14
  (function (EndpointURLScheme) {
17
15
  EndpointURLScheme["HTTP"] = "http";
18
16
  EndpointURLScheme["HTTPS"] = "https";
19
- })(exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));
17
+ })(EndpointURLScheme || (EndpointURLScheme = {}));
20
18
 
21
- exports.AlgorithmId = void 0;
19
+ var AlgorithmId;
22
20
  (function (AlgorithmId) {
23
21
  AlgorithmId["MD5"] = "md5";
24
22
  AlgorithmId["CRC32"] = "crc32";
25
23
  AlgorithmId["CRC32C"] = "crc32c";
26
24
  AlgorithmId["SHA1"] = "sha1";
27
25
  AlgorithmId["SHA256"] = "sha256";
28
- })(exports.AlgorithmId || (exports.AlgorithmId = {}));
26
+ })(AlgorithmId || (AlgorithmId = {}));
29
27
  const getChecksumConfiguration = (runtimeConfig) => {
30
28
  const checksumAlgorithms = [];
31
29
  if (runtimeConfig.sha256 !== undefined) {
32
30
  checksumAlgorithms.push({
33
- algorithmId: () => exports.AlgorithmId.SHA256,
31
+ algorithmId: () => AlgorithmId.SHA256,
34
32
  checksumConstructor: () => runtimeConfig.sha256,
35
33
  });
36
34
  }
37
35
  if (runtimeConfig.md5 != undefined) {
38
36
  checksumAlgorithms.push({
39
- algorithmId: () => exports.AlgorithmId.MD5,
37
+ algorithmId: () => AlgorithmId.MD5,
40
38
  checksumConstructor: () => runtimeConfig.md5,
41
39
  });
42
40
  }
@@ -64,28 +62,35 @@ const resolveDefaultRuntimeConfig = (config) => {
64
62
  return resolveChecksumRuntimeConfig(config);
65
63
  };
66
64
 
67
- exports.FieldPosition = void 0;
65
+ var FieldPosition;
68
66
  (function (FieldPosition) {
69
67
  FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
70
68
  FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
71
- })(exports.FieldPosition || (exports.FieldPosition = {}));
69
+ })(FieldPosition || (FieldPosition = {}));
72
70
 
73
71
  const SMITHY_CONTEXT_KEY = "__smithy_context";
74
72
 
75
- exports.IniSectionType = void 0;
73
+ var IniSectionType;
76
74
  (function (IniSectionType) {
77
75
  IniSectionType["PROFILE"] = "profile";
78
76
  IniSectionType["SSO_SESSION"] = "sso-session";
79
77
  IniSectionType["SERVICES"] = "services";
80
- })(exports.IniSectionType || (exports.IniSectionType = {}));
78
+ })(IniSectionType || (IniSectionType = {}));
81
79
 
82
- exports.RequestHandlerProtocol = void 0;
80
+ var RequestHandlerProtocol;
83
81
  (function (RequestHandlerProtocol) {
84
82
  RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
85
83
  RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
86
84
  RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
87
- })(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));
85
+ })(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
88
86
 
87
+ exports.AlgorithmId = AlgorithmId;
88
+ exports.EndpointURLScheme = EndpointURLScheme;
89
+ exports.FieldPosition = FieldPosition;
90
+ exports.HttpApiKeyAuthLocation = HttpApiKeyAuthLocation;
91
+ exports.HttpAuthLocation = HttpAuthLocation;
92
+ exports.IniSectionType = IniSectionType;
93
+ exports.RequestHandlerProtocol = RequestHandlerProtocol;
89
94
  exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;
90
95
  exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
91
96
  exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "4.14.4",
3
+ "version": "4.15.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
6
- "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
7
- "build:types": "yarn g:tsc -p tsconfig.types.json",
6
+ "build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
7
+ "build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
8
8
  "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4 && node scripts/downlevel",
9
- "clean": "premove dist-cjs dist-es dist-types *.tsbuildinfo",
9
+ "clean": "premove dist-cjs dist-es dist-types",
10
10
  "extract:docs": "api-extractor run --local",
11
11
  "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
package/package.json CHANGED
@@ -52,7 +52,7 @@
52
52
  "aws-cdk": "^2.1126.0",
53
53
  "aws-cdk-lib": "2.195.0",
54
54
  "cdk8s": "2.68.91",
55
- "cdk8s-cli": "^2.207.21",
55
+ "cdk8s-cli": "^2.207.22",
56
56
  "commit-and-tag-version": "^12",
57
57
  "constructs": "10.3.0",
58
58
  "eslint": "^9",
@@ -77,7 +77,7 @@
77
77
  "constructs": "^10.3.0"
78
78
  },
79
79
  "dependencies": {
80
- "@aws-sdk/client-cloudformation": "^3.1068.0"
80
+ "@aws-sdk/client-cloudformation": "^3.1069.0"
81
81
  },
82
82
  "bundledDependencies": [
83
83
  "@aws-sdk/client-cloudformation"
@@ -93,7 +93,7 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
- "version": "0.0.600",
96
+ "version": "0.0.601",
97
97
  "jest": {
98
98
  "coverageProvider": "v8",
99
99
  "testMatch": [
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var sso = require('@aws-sdk/nested-clients/sso');
4
-
5
-
6
-
7
- exports.GetRoleCredentialsCommand = sso.GetRoleCredentialsCommand;
8
- exports.SSOClient = sso.SSOClient;