@cdk8s/awscdk-resolver 0.0.723 → 0.0.725
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.
- package/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +5 -5
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +1 -4
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +51 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +8 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +8 -39
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -16
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +36 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +18 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +18 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +42 -24
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +20 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +24 -12
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +22 -9
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +14 -8
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +6 -0
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/tslib/README.md +3 -8
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.d.ts +4 -2
- package/node_modules/tslib/tslib.es6.js +10 -1
- package/node_modules/tslib/tslib.es6.mjs +10 -1
- package/node_modules/tslib/tslib.js +10 -1
- package/package.json +5 -5
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
- /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
- /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { hasOwn, fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require("@smithy/core/serde");
|
|
1
|
+
const { hasOwn, fromUtf8, fromHex, toHex, toUint8Array, writeKey, isArrayBuffer } = require("@smithy/core/serde");
|
|
2
2
|
const { normalizeProvider } = require("@smithy/core/client");
|
|
3
3
|
const { escapeUri, HttpRequest } = require("@smithy/core/protocols");
|
|
4
4
|
|
|
@@ -6,8 +6,9 @@ class HeaderFormatter {
|
|
|
6
6
|
format(headers) {
|
|
7
7
|
const chunks = [];
|
|
8
8
|
for (const headerName in headers) {
|
|
9
|
-
if (!hasOwn(headers, headerName))
|
|
9
|
+
if (!hasOwn(headers, headerName)) {
|
|
10
10
|
continue;
|
|
11
|
+
}
|
|
11
12
|
const bytes = fromUtf8(headerName);
|
|
12
13
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
13
14
|
}
|
|
@@ -124,8 +125,9 @@ function negate(bytes) {
|
|
|
124
125
|
}
|
|
125
126
|
for (let i = 7; i > -1; i--) {
|
|
126
127
|
bytes[i]++;
|
|
127
|
-
if (bytes[i] !== 0)
|
|
128
|
+
if (bytes[i] !== 0) {
|
|
128
129
|
break;
|
|
130
|
+
}
|
|
129
131
|
}
|
|
130
132
|
}
|
|
131
133
|
|
|
@@ -177,8 +179,9 @@ const getCanonicalQuery = ({ query = {} }) => {
|
|
|
177
179
|
const keys = [];
|
|
178
180
|
const serialized = {};
|
|
179
181
|
for (const key in query) {
|
|
180
|
-
if (!hasOwn(query, key))
|
|
182
|
+
if (!hasOwn(query, key)) {
|
|
181
183
|
continue;
|
|
184
|
+
}
|
|
182
185
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
183
186
|
continue;
|
|
184
187
|
}
|
|
@@ -257,10 +260,12 @@ ${toHex(hashedRequest)}`;
|
|
|
257
260
|
if (this.uriEscapePath) {
|
|
258
261
|
const normalizedPathSegments = [];
|
|
259
262
|
for (const pathSegment of path.split("/")) {
|
|
260
|
-
if (pathSegment?.length === 0)
|
|
263
|
+
if (pathSegment?.length === 0) {
|
|
261
264
|
continue;
|
|
262
|
-
|
|
265
|
+
}
|
|
266
|
+
if (pathSegment === ".") {
|
|
263
267
|
continue;
|
|
268
|
+
}
|
|
264
269
|
if (pathSegment === "..") {
|
|
265
270
|
normalizedPathSegments.pop();
|
|
266
271
|
}
|
|
@@ -331,7 +336,7 @@ const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) =>
|
|
|
331
336
|
continue;
|
|
332
337
|
}
|
|
333
338
|
const canonicalHeaderName = headerName.toLowerCase();
|
|
334
|
-
if (canonicalHeaderName
|
|
339
|
+
if (hasOwn(ALWAYS_UNSIGNABLE_HEADERS, canonicalHeaderName) ||
|
|
335
340
|
unsignableHeaders?.has(canonicalHeaderName) ||
|
|
336
341
|
PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||
|
|
337
342
|
SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
|
|
@@ -339,6 +344,9 @@ const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) =>
|
|
|
339
344
|
continue;
|
|
340
345
|
}
|
|
341
346
|
}
|
|
347
|
+
if (canonicalHeaderName === "__proto__") {
|
|
348
|
+
writeKey(canonical);
|
|
349
|
+
}
|
|
342
350
|
canonical[canonicalHeaderName] = headers[headerName]
|
|
343
351
|
.replace(/[\r\n]/g, " ")
|
|
344
352
|
.replace(/[ \t]+/g, " ")
|
|
@@ -349,8 +357,9 @@ const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) =>
|
|
|
349
357
|
|
|
350
358
|
const getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
351
359
|
for (const headerName in headers) {
|
|
352
|
-
if (!hasOwn(headers, headerName))
|
|
360
|
+
if (!hasOwn(headers, headerName)) {
|
|
353
361
|
continue;
|
|
362
|
+
}
|
|
354
363
|
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
355
364
|
return headers[headerName];
|
|
356
365
|
}
|
|
@@ -369,8 +378,9 @@ const getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
|
369
378
|
const hasHeader = (soughtHeader, headers) => {
|
|
370
379
|
soughtHeader = soughtHeader.toLowerCase();
|
|
371
380
|
for (const headerName in headers) {
|
|
372
|
-
if (!hasOwn(headers, headerName))
|
|
381
|
+
if (!hasOwn(headers, headerName)) {
|
|
373
382
|
continue;
|
|
383
|
+
}
|
|
374
384
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
375
385
|
return true;
|
|
376
386
|
}
|
|
@@ -381,8 +391,9 @@ const hasHeader = (soughtHeader, headers) => {
|
|
|
381
391
|
const moveHeadersToQuery = (request, options = {}) => {
|
|
382
392
|
const { headers, query = {} } = HttpRequest.clone(request);
|
|
383
393
|
for (const name in headers) {
|
|
384
|
-
if (!hasOwn(headers, name))
|
|
394
|
+
if (!hasOwn(headers, name)) {
|
|
385
395
|
continue;
|
|
396
|
+
}
|
|
386
397
|
const lname = name.toLowerCase();
|
|
387
398
|
if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) ||
|
|
388
399
|
options.hoistableHeaders?.has(lname)) {
|
|
@@ -400,8 +411,9 @@ const moveHeadersToQuery = (request, options = {}) => {
|
|
|
400
411
|
const prepareRequest = (request) => {
|
|
401
412
|
request = HttpRequest.clone(request);
|
|
402
413
|
for (const headerName in request.headers) {
|
|
403
|
-
if (!hasOwn(request.headers, headerName))
|
|
414
|
+
if (!hasOwn(request.headers, headerName)) {
|
|
404
415
|
continue;
|
|
416
|
+
}
|
|
405
417
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
406
418
|
delete request.headers[headerName];
|
|
407
419
|
}
|
|
@@ -4,8 +4,9 @@ export class HeaderFormatter {
|
|
|
4
4
|
format(headers) {
|
|
5
5
|
const chunks = [];
|
|
6
6
|
for (const headerName in headers) {
|
|
7
|
-
if (!hasOwn(headers, headerName))
|
|
7
|
+
if (!hasOwn(headers, headerName)) {
|
|
8
8
|
continue;
|
|
9
|
+
}
|
|
9
10
|
const bytes = fromUtf8(headerName);
|
|
10
11
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
11
12
|
}
|
|
@@ -122,7 +123,8 @@ function negate(bytes) {
|
|
|
122
123
|
}
|
|
123
124
|
for (let i = 7; i > -1; i--) {
|
|
124
125
|
bytes[i]++;
|
|
125
|
-
if (bytes[i] !== 0)
|
|
126
|
+
if (bytes[i] !== 0) {
|
|
126
127
|
break;
|
|
128
|
+
}
|
|
127
129
|
}
|
|
128
130
|
}
|
|
@@ -41,10 +41,12 @@ ${toHex(hashedRequest)}`;
|
|
|
41
41
|
if (this.uriEscapePath) {
|
|
42
42
|
const normalizedPathSegments = [];
|
|
43
43
|
for (const pathSegment of path.split("/")) {
|
|
44
|
-
if (pathSegment?.length === 0)
|
|
44
|
+
if (pathSegment?.length === 0) {
|
|
45
45
|
continue;
|
|
46
|
-
|
|
46
|
+
}
|
|
47
|
+
if (pathSegment === ".") {
|
|
47
48
|
continue;
|
|
49
|
+
}
|
|
48
50
|
if (pathSegment === "..") {
|
|
49
51
|
normalizedPathSegments.pop();
|
|
50
52
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn, writeKey } from "@smithy/core/serde";
|
|
1
2
|
import { ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN } from "./constants";
|
|
2
3
|
export const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
|
|
3
4
|
const canonical = {};
|
|
@@ -6,7 +7,7 @@ export const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHead
|
|
|
6
7
|
continue;
|
|
7
8
|
}
|
|
8
9
|
const canonicalHeaderName = headerName.toLowerCase();
|
|
9
|
-
if (canonicalHeaderName
|
|
10
|
+
if (hasOwn(ALWAYS_UNSIGNABLE_HEADERS, canonicalHeaderName) ||
|
|
10
11
|
unsignableHeaders?.has(canonicalHeaderName) ||
|
|
11
12
|
PROXY_HEADER_PATTERN.test(canonicalHeaderName) ||
|
|
12
13
|
SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
|
|
@@ -14,6 +15,9 @@ export const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHead
|
|
|
14
15
|
continue;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
18
|
+
if (canonicalHeaderName === "__proto__") {
|
|
19
|
+
writeKey(canonical);
|
|
20
|
+
}
|
|
17
21
|
canonical[canonicalHeaderName] = headers[headerName]
|
|
18
22
|
.replace(/[\r\n]/g, " ")
|
|
19
23
|
.replace(/[ \t]+/g, " ")
|
|
@@ -5,8 +5,9 @@ export const getCanonicalQuery = ({ query = {} }) => {
|
|
|
5
5
|
const keys = [];
|
|
6
6
|
const serialized = {};
|
|
7
7
|
for (const key in query) {
|
|
8
|
-
if (!hasOwn(query, key))
|
|
8
|
+
if (!hasOwn(query, key)) {
|
|
9
9
|
continue;
|
|
10
|
+
}
|
|
10
11
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
11
12
|
continue;
|
|
12
13
|
}
|
|
@@ -3,8 +3,9 @@ import { isArrayBuffer, toHex, toUint8Array } from "@smithy/core/serde";
|
|
|
3
3
|
import { SHA256_HEADER, UNSIGNED_PAYLOAD } from "./constants";
|
|
4
4
|
export const getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
5
5
|
for (const headerName in headers) {
|
|
6
|
-
if (!hasOwn(headers, headerName))
|
|
6
|
+
if (!hasOwn(headers, headerName)) {
|
|
7
7
|
continue;
|
|
8
|
+
}
|
|
8
9
|
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
9
10
|
return headers[headerName];
|
|
10
11
|
}
|
|
@@ -2,8 +2,9 @@ import { hasOwn } from "@smithy/core/serde";
|
|
|
2
2
|
export const hasHeader = (soughtHeader, headers) => {
|
|
3
3
|
soughtHeader = soughtHeader.toLowerCase();
|
|
4
4
|
for (const headerName in headers) {
|
|
5
|
-
if (!hasOwn(headers, headerName))
|
|
5
|
+
if (!hasOwn(headers, headerName)) {
|
|
6
6
|
continue;
|
|
7
|
+
}
|
|
7
8
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
8
9
|
return true;
|
|
9
10
|
}
|
|
@@ -13,8 +14,9 @@ export const hasHeader = (soughtHeader, headers) => {
|
|
|
13
14
|
export const getHeaderValue = (soughtHeader, headers) => {
|
|
14
15
|
soughtHeader = soughtHeader.toLowerCase();
|
|
15
16
|
for (const headerName in headers) {
|
|
16
|
-
if (!hasOwn(headers, headerName))
|
|
17
|
+
if (!hasOwn(headers, headerName)) {
|
|
17
18
|
continue;
|
|
19
|
+
}
|
|
18
20
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
19
21
|
return headers[headerName];
|
|
20
22
|
}
|
|
@@ -24,8 +26,9 @@ export const getHeaderValue = (soughtHeader, headers) => {
|
|
|
24
26
|
export const deleteHeader = (soughtHeader, headers) => {
|
|
25
27
|
soughtHeader = soughtHeader.toLowerCase();
|
|
26
28
|
for (const headerName in headers) {
|
|
27
|
-
if (!hasOwn(headers, headerName))
|
|
29
|
+
if (!hasOwn(headers, headerName)) {
|
|
28
30
|
continue;
|
|
31
|
+
}
|
|
29
32
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
30
33
|
delete headers[headerName];
|
|
31
34
|
}
|
|
@@ -3,8 +3,9 @@ import { HttpRequest } from "@smithy/core/protocols";
|
|
|
3
3
|
export const moveHeadersToQuery = (request, options = {}) => {
|
|
4
4
|
const { headers, query = {} } = HttpRequest.clone(request);
|
|
5
5
|
for (const name in headers) {
|
|
6
|
-
if (!hasOwn(headers, name))
|
|
6
|
+
if (!hasOwn(headers, name)) {
|
|
7
7
|
continue;
|
|
8
|
+
}
|
|
8
9
|
const lname = name.toLowerCase();
|
|
9
10
|
if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) ||
|
|
10
11
|
options.hoistableHeaders?.has(lname)) {
|
|
@@ -4,8 +4,9 @@ import { GENERATED_HEADERS } from "./constants";
|
|
|
4
4
|
export const prepareRequest = (request) => {
|
|
5
5
|
request = HttpRequest.clone(request);
|
|
6
6
|
for (const headerName in request.headers) {
|
|
7
|
-
if (!hasOwn(request.headers, headerName))
|
|
7
|
+
if (!hasOwn(request.headers, headerName)) {
|
|
8
8
|
continue;
|
|
9
|
+
}
|
|
9
10
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
10
11
|
delete request.headers[headerName];
|
|
11
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.5",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/signature-v4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"test:watch": "yarn g:vitest watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@smithy/core": "^3.
|
|
41
|
+
"@smithy/core": "^3.38.0",
|
|
42
42
|
"@smithy/types": "^4.19.0",
|
|
43
43
|
"tslib": "^2.6.2"
|
|
44
44
|
},
|
|
@@ -138,14 +138,9 @@ For JSPM users:
|
|
|
138
138
|
|
|
139
139
|
## Deployment
|
|
140
140
|
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
- Push the tag: `git push --tags`
|
|
145
|
-
- Create a [release in GitHub](https://github.com/microsoft/tslib/releases)
|
|
146
|
-
- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow
|
|
147
|
-
|
|
148
|
-
Done.
|
|
141
|
+
- Run the **Bump tslib** GitHub workflow and choose patch, minor, or major
|
|
142
|
+
- Review and squash-merge the generated version-bump PR
|
|
143
|
+
- The release runs automatically: tag, build, publish to npm, and create a GitHub release with generated notes
|
|
149
144
|
|
|
150
145
|
# Contribute
|
|
151
146
|
|
|
@@ -453,8 +453,10 @@ export declare function __addDisposableResource<T>(env: { stack: { value?: unkno
|
|
|
453
453
|
export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any;
|
|
454
454
|
|
|
455
455
|
/**
|
|
456
|
-
* Transforms a relative import specifier
|
|
456
|
+
* Transforms a relative import specifier using additional extension mappings, falling back to rewriting non-declaration TypeScript file extensions to their JavaScript counterparts.
|
|
457
457
|
* @param path The import specifier.
|
|
458
458
|
* @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`.
|
|
459
|
+
* @param extraExtensions Additional file extension mappings, including leading dots, checked in enumeration order before the built-in rewrites.
|
|
460
|
+
* @param ignoreCase Whether to ignore case when matching additional file extensions.
|
|
459
461
|
*/
|
|
460
|
-
export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string;
|
|
462
|
+
export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean, extraExtensions?: { [extension: string]: string }, ignoreCase?: boolean): string;
|
|
@@ -357,8 +357,17 @@ export function __disposeResources(env) {
|
|
|
357
357
|
return next();
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
export function __rewriteRelativeImportExtension(path, preserveJsx) {
|
|
360
|
+
export function __rewriteRelativeImportExtension(path, preserveJsx, extraExtensions, ignoreCase) {
|
|
361
361
|
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
362
|
+
if (extraExtensions) {
|
|
363
|
+
for (var extension in extraExtensions) {
|
|
364
|
+
var suffix = path.slice(-extension.length);
|
|
365
|
+
if (suffix === extension || ignoreCase && suffix.toLowerCase() === extension.toLowerCase()) {
|
|
366
|
+
var output = extraExtensions[extension];
|
|
367
|
+
return output === extension ? path : path.slice(0, -extension.length) + output;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
362
371
|
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
363
372
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
364
373
|
});
|
|
@@ -356,8 +356,17 @@ export function __disposeResources(env) {
|
|
|
356
356
|
return next();
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
export function __rewriteRelativeImportExtension(path, preserveJsx) {
|
|
359
|
+
export function __rewriteRelativeImportExtension(path, preserveJsx, extraExtensions, ignoreCase) {
|
|
360
360
|
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
361
|
+
if (extraExtensions) {
|
|
362
|
+
for (var extension in extraExtensions) {
|
|
363
|
+
var suffix = path.slice(-extension.length);
|
|
364
|
+
if (suffix === extension || ignoreCase && suffix.toLowerCase() === extension.toLowerCase()) {
|
|
365
|
+
var output = extraExtensions[extension];
|
|
366
|
+
return output === extension ? path : path.slice(0, -extension.length) + output;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
361
370
|
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
362
371
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
363
372
|
});
|
|
@@ -405,8 +405,17 @@ var __rewriteRelativeImportExtension;
|
|
|
405
405
|
return next();
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
-
__rewriteRelativeImportExtension = function (path, preserveJsx) {
|
|
408
|
+
__rewriteRelativeImportExtension = function (path, preserveJsx, extraExtensions, ignoreCase) {
|
|
409
409
|
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
410
|
+
if (extraExtensions) {
|
|
411
|
+
for (var extension in extraExtensions) {
|
|
412
|
+
var suffix = path.slice(-extension.length);
|
|
413
|
+
if (suffix === extension || ignoreCase && suffix.toLowerCase() === extension.toLowerCase()) {
|
|
414
|
+
var output = extraExtensions[extension];
|
|
415
|
+
return output === extension ? path : path.slice(0, -extension.length) + output;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
410
419
|
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
411
420
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
412
421
|
});
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"organization": false
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@cdk8s/projen-common": "0.1.
|
|
46
|
+
"@cdk8s/projen-common": "0.1.43",
|
|
47
47
|
"@stylistic/eslint-plugin": "^2",
|
|
48
48
|
"@types/fs-extra": "^11.0.4",
|
|
49
49
|
"@types/jest": "^27",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"aws-cdk": "^2.1146.1",
|
|
54
54
|
"aws-cdk-lib": "2.195.0",
|
|
55
55
|
"cdk8s": "2.68.91",
|
|
56
|
-
"cdk8s-cli": "^2.207.
|
|
56
|
+
"cdk8s-cli": "^2.207.74",
|
|
57
57
|
"commit-and-tag-version": "^13",
|
|
58
58
|
"constructs": "10.3.0",
|
|
59
59
|
"eslint": "^9",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"jsii-docgen": "^10.5.0",
|
|
68
68
|
"jsii-pacmak": "^1.142.0",
|
|
69
69
|
"jsii-rosetta": "^5",
|
|
70
|
-
"projen": "^0.104.
|
|
70
|
+
"projen": "^0.104.20",
|
|
71
71
|
"ts-jest": "^27",
|
|
72
72
|
"ts-node": "^10.9.2",
|
|
73
73
|
"typescript": "^5.9.3"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"constructs": "^10.3.0"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@aws-sdk/client-cloudformation": "^3.
|
|
81
|
+
"@aws-sdk/client-cloudformation": "^3.1161.0"
|
|
82
82
|
},
|
|
83
83
|
"bundledDependencies": [
|
|
84
84
|
"@aws-sdk/client-cloudformation"
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
|
94
94
|
},
|
|
95
|
-
"version": "0.0.
|
|
95
|
+
"version": "0.0.725",
|
|
96
96
|
"jest": {
|
|
97
97
|
"coverageProvider": "v8",
|
|
98
98
|
"testMatch": [
|
|
File without changes
|
|
File without changes
|
/package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts
RENAMED
|
File without changes
|