@cdk8s/awscdk-resolver 0.0.662 → 0.0.663
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 +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +126 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +14 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +7 -0
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +29 -13
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +12 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +44 -15
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +22 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +4 -1
- 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 +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +3 -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/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/submodules/transport/index.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/dist-types/ts3.4/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/transport/index.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +19 -7
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +10 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +4 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/transport";
|
|
1
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
3
|
import { HttpRequest } from "@smithy/core/transport";
|
|
3
4
|
import { HttpProtocol } from "./HttpProtocol";
|
|
@@ -67,6 +68,8 @@ export class RpcProtocol extends HttpProtocol {
|
|
|
67
68
|
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
68
69
|
}
|
|
69
70
|
for (const header in response.headers) {
|
|
71
|
+
if (!hasOwn(response.headers, header))
|
|
72
|
+
continue;
|
|
70
73
|
const value = response.headers[header];
|
|
71
74
|
delete response.headers[header];
|
|
72
75
|
response.headers[header.toLowerCase()] = value;
|
package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/transport";
|
|
1
2
|
import { HttpResponse } from "@smithy/core/protocols";
|
|
2
3
|
import { parseRfc7231DateTime } from "@smithy/core/serde";
|
|
3
4
|
export function parseRetryAfterHeader(response, logger) {
|
|
4
5
|
if (!HttpResponse.isInstance(response)) {
|
|
5
6
|
return;
|
|
6
7
|
}
|
|
7
|
-
for (const header
|
|
8
|
+
for (const header in response.headers) {
|
|
9
|
+
if (!hasOwn(response.headers, header))
|
|
10
|
+
continue;
|
|
8
11
|
const h = header.toLowerCase();
|
|
9
12
|
if (h === "retry-after") {
|
|
10
13
|
const retryAfter = response.headers[header];
|
|
@@ -41,3 +41,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
|
41
41
|
const _getRandomValues = (array) => crypto.getRandomValues(array);
|
|
42
42
|
export const v4 = bindV4(_getRandomValues);
|
|
43
43
|
export const generateIdempotencyToken = v4;
|
|
44
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -43,3 +43,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
|
43
43
|
const _getRandomValues = (array) => crypto.getRandomValues(array);
|
|
44
44
|
export const v4 = bindV4(_getRandomValues);
|
|
45
45
|
export const generateIdempotencyToken = v4;
|
|
46
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/transport";
|
|
1
2
|
export const parseBoolean = (value) => {
|
|
2
3
|
switch (value) {
|
|
3
4
|
case "true":
|
|
@@ -137,6 +138,8 @@ export const expectUnion = (value) => {
|
|
|
137
138
|
const asObject = expectObject(value);
|
|
138
139
|
const setKeys = [];
|
|
139
140
|
for (const k in asObject) {
|
|
141
|
+
if (!hasOwn(asObject, k))
|
|
142
|
+
continue;
|
|
140
143
|
if (asObject[k] != null) {
|
|
141
144
|
setKeys.push(k);
|
|
142
145
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "./hasOwn";
|
|
1
2
|
import { parseUrl } from "./parseUrl";
|
|
2
3
|
export const toEndpointV1 = (endpoint) => {
|
|
3
4
|
if (typeof endpoint === "object") {
|
|
@@ -6,6 +7,8 @@ export const toEndpointV1 = (endpoint) => {
|
|
|
6
7
|
if (endpoint.headers) {
|
|
7
8
|
v1Endpoint.headers = {};
|
|
8
9
|
for (const name in endpoint.headers) {
|
|
10
|
+
if (!hasOwn(endpoint.headers, name))
|
|
11
|
+
continue;
|
|
9
12
|
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
10
13
|
}
|
|
11
14
|
}
|
|
@@ -39,3 +39,4 @@ export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
|
|
|
39
39
|
export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
40
40
|
export declare const v4: () => string;
|
|
41
41
|
export declare const generateIdempotencyToken: () => string;
|
|
42
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -37,3 +37,4 @@ export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
|
|
|
37
37
|
export { streamCollector } from "./util-stream/stream-collector";
|
|
38
38
|
export declare const v4: () => string;
|
|
39
39
|
export declare const generateIdempotencyToken: () => string;
|
|
40
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -37,3 +37,4 @@ export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
|
|
|
37
37
|
export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
38
38
|
export declare const v4: () => string;
|
|
39
39
|
export declare const generateIdempotencyToken: () => string;
|
|
40
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -39,3 +39,4 @@ export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
|
|
|
39
39
|
export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
40
40
|
export declare const v4: () => string;
|
|
41
41
|
export declare const generateIdempotencyToken: () => string;
|
|
42
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -37,3 +37,4 @@ export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
|
|
|
37
37
|
export { streamCollector } from "./util-stream/stream-collector";
|
|
38
38
|
export declare const v4: () => string;
|
|
39
39
|
export declare const generateIdempotencyToken: () => string;
|
|
40
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -37,3 +37,4 @@ export { isReadableStream, isBlob } from "./util-stream/stream-type-check";
|
|
|
37
37
|
export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
38
38
|
export declare const v4: () => string;
|
|
39
39
|
export declare const generateIdempotencyToken: () => string;
|
|
40
|
+
export { hasOwn } from "@smithy/core/transport";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
const { hasOwn } = require("@smithy/core/serde");
|
|
2
|
+
const { streamCollector } = require("@smithy/core/serde");
|
|
3
|
+
exports.streamCollector = streamCollector;
|
|
1
4
|
const { buildQueryString, HttpResponse } = require("@smithy/core/protocols");
|
|
2
5
|
const node_https = require("node:https");
|
|
3
6
|
const { Readable } = require("node:stream");
|
|
4
7
|
const http2 = require("node:http2");
|
|
5
|
-
const { streamCollector } = require("@smithy/core/serde");
|
|
6
|
-
exports.streamCollector = streamCollector;
|
|
7
8
|
|
|
8
9
|
function buildAbortError(abortSignal) {
|
|
9
10
|
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
|
|
@@ -30,6 +31,8 @@ const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
|
|
|
30
31
|
const getTransformedHeaders = (headers) => {
|
|
31
32
|
const transformedHeaders = {};
|
|
32
33
|
for (const name in headers) {
|
|
34
|
+
if (!hasOwn(headers, name))
|
|
35
|
+
continue;
|
|
33
36
|
const headerValues = headers[name];
|
|
34
37
|
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
35
38
|
}
|
|
@@ -231,6 +234,8 @@ class NodeHttpHandler {
|
|
|
231
234
|
}
|
|
232
235
|
if (sockets && requests) {
|
|
233
236
|
for (const origin in sockets) {
|
|
237
|
+
if (!hasOwn(sockets, origin))
|
|
238
|
+
continue;
|
|
234
239
|
const socketsInUse = sockets[origin]?.length ?? 0;
|
|
235
240
|
const requestsEnqueued = requests[origin]?.length ?? 0;
|
|
236
241
|
if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
const getTransformedHeaders = (headers) => {
|
|
2
3
|
const transformedHeaders = {};
|
|
3
4
|
for (const name in headers) {
|
|
5
|
+
if (!hasOwn(headers, name))
|
|
6
|
+
continue;
|
|
4
7
|
const headerValues = headers[name];
|
|
5
8
|
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
6
9
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
import { HttpResponse, buildQueryString } from "@smithy/core/protocols";
|
|
2
3
|
import { buildAbortError } from "./build-abort-error";
|
|
3
4
|
import { NODEJS_TIMEOUT_ERROR_CODES } from "./constants";
|
|
@@ -35,6 +36,8 @@ export class NodeHttpHandler {
|
|
|
35
36
|
}
|
|
36
37
|
if (sockets && requests) {
|
|
37
38
|
for (const origin in sockets) {
|
|
39
|
+
if (!hasOwn(sockets, origin))
|
|
40
|
+
continue;
|
|
38
41
|
const socketsInUse = sockets[origin]?.length ?? 0;
|
|
39
42
|
const requestsEnqueued = requests[origin]?.length ?? 0;
|
|
40
43
|
if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.3",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/node-http-handler",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"test:watch": "yarn g:vitest watch"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@smithy/core": "^3.33.
|
|
42
|
+
"@smithy/core": "^3.33.3",
|
|
43
43
|
"@smithy/types": "^4.17.2",
|
|
44
44
|
"tslib": "^2.6.2"
|
|
45
45
|
},
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
const { fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require("@smithy/core/serde");
|
|
1
|
+
const { hasOwn, fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require("@smithy/core/serde");
|
|
2
2
|
const { normalizeProvider } = require("@smithy/core/client");
|
|
3
3
|
const { escapeUri, HttpRequest } = require("@smithy/core/protocols");
|
|
4
4
|
|
|
5
5
|
class HeaderFormatter {
|
|
6
6
|
format(headers) {
|
|
7
7
|
const chunks = [];
|
|
8
|
-
for (const headerName
|
|
8
|
+
for (const headerName in headers) {
|
|
9
|
+
if (!hasOwn(headers, headerName))
|
|
10
|
+
continue;
|
|
9
11
|
const bytes = fromUtf8(headerName);
|
|
10
12
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
11
13
|
}
|
|
@@ -174,7 +176,9 @@ const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
|
|
|
174
176
|
const getCanonicalQuery = ({ query = {} }) => {
|
|
175
177
|
const keys = [];
|
|
176
178
|
const serialized = {};
|
|
177
|
-
for (const key
|
|
179
|
+
for (const key in query) {
|
|
180
|
+
if (!hasOwn(query, key))
|
|
181
|
+
continue;
|
|
178
182
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
179
183
|
continue;
|
|
180
184
|
}
|
|
@@ -341,7 +345,9 @@ const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) =>
|
|
|
341
345
|
};
|
|
342
346
|
|
|
343
347
|
const getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
344
|
-
for (const headerName
|
|
348
|
+
for (const headerName in headers) {
|
|
349
|
+
if (!hasOwn(headers, headerName))
|
|
350
|
+
continue;
|
|
345
351
|
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
346
352
|
return headers[headerName];
|
|
347
353
|
}
|
|
@@ -359,7 +365,9 @@ const getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
|
359
365
|
|
|
360
366
|
const hasHeader = (soughtHeader, headers) => {
|
|
361
367
|
soughtHeader = soughtHeader.toLowerCase();
|
|
362
|
-
for (const headerName
|
|
368
|
+
for (const headerName in headers) {
|
|
369
|
+
if (!hasOwn(headers, headerName))
|
|
370
|
+
continue;
|
|
363
371
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
364
372
|
return true;
|
|
365
373
|
}
|
|
@@ -369,7 +377,9 @@ const hasHeader = (soughtHeader, headers) => {
|
|
|
369
377
|
|
|
370
378
|
const moveHeadersToQuery = (request, options = {}) => {
|
|
371
379
|
const { headers, query = {} } = HttpRequest.clone(request);
|
|
372
|
-
for (const name
|
|
380
|
+
for (const name in headers) {
|
|
381
|
+
if (!hasOwn(headers, name))
|
|
382
|
+
continue;
|
|
373
383
|
const lname = name.toLowerCase();
|
|
374
384
|
if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) ||
|
|
375
385
|
options.hoistableHeaders?.has(lname)) {
|
|
@@ -386,7 +396,9 @@ const moveHeadersToQuery = (request, options = {}) => {
|
|
|
386
396
|
|
|
387
397
|
const prepareRequest = (request) => {
|
|
388
398
|
request = HttpRequest.clone(request);
|
|
389
|
-
for (const headerName
|
|
399
|
+
for (const headerName in request.headers) {
|
|
400
|
+
if (!hasOwn(request.headers, headerName))
|
|
401
|
+
continue;
|
|
390
402
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
391
403
|
delete request.headers[headerName];
|
|
392
404
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
import { fromHex, fromUtf8, toHex } from "@smithy/core/serde";
|
|
2
3
|
export class HeaderFormatter {
|
|
3
4
|
format(headers) {
|
|
4
5
|
const chunks = [];
|
|
5
|
-
for (const headerName
|
|
6
|
+
for (const headerName in headers) {
|
|
7
|
+
if (!hasOwn(headers, headerName))
|
|
8
|
+
continue;
|
|
6
9
|
const bytes = fromUtf8(headerName);
|
|
7
10
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
8
11
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
import { escapeUri } from "@smithy/core/protocols";
|
|
2
3
|
import { SIGNATURE_HEADER } from "./constants";
|
|
3
4
|
export const getCanonicalQuery = ({ query = {} }) => {
|
|
4
5
|
const keys = [];
|
|
5
6
|
const serialized = {};
|
|
6
|
-
for (const key
|
|
7
|
+
for (const key in query) {
|
|
8
|
+
if (!hasOwn(query, key))
|
|
9
|
+
continue;
|
|
7
10
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
8
11
|
continue;
|
|
9
12
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
import { isArrayBuffer, toHex, toUint8Array } from "@smithy/core/serde";
|
|
2
3
|
import { SHA256_HEADER, UNSIGNED_PAYLOAD } from "./constants";
|
|
3
4
|
export const getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
4
|
-
for (const headerName
|
|
5
|
+
for (const headerName in headers) {
|
|
6
|
+
if (!hasOwn(headers, headerName))
|
|
7
|
+
continue;
|
|
5
8
|
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
6
9
|
return headers[headerName];
|
|
7
10
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
export const hasHeader = (soughtHeader, headers) => {
|
|
2
3
|
soughtHeader = soughtHeader.toLowerCase();
|
|
3
|
-
for (const headerName
|
|
4
|
+
for (const headerName in headers) {
|
|
5
|
+
if (!hasOwn(headers, headerName))
|
|
6
|
+
continue;
|
|
4
7
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
5
8
|
return true;
|
|
6
9
|
}
|
|
@@ -9,7 +12,9 @@ export const hasHeader = (soughtHeader, headers) => {
|
|
|
9
12
|
};
|
|
10
13
|
export const getHeaderValue = (soughtHeader, headers) => {
|
|
11
14
|
soughtHeader = soughtHeader.toLowerCase();
|
|
12
|
-
for (const headerName
|
|
15
|
+
for (const headerName in headers) {
|
|
16
|
+
if (!hasOwn(headers, headerName))
|
|
17
|
+
continue;
|
|
13
18
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
14
19
|
return headers[headerName];
|
|
15
20
|
}
|
|
@@ -18,7 +23,9 @@ export const getHeaderValue = (soughtHeader, headers) => {
|
|
|
18
23
|
};
|
|
19
24
|
export const deleteHeader = (soughtHeader, headers) => {
|
|
20
25
|
soughtHeader = soughtHeader.toLowerCase();
|
|
21
|
-
for (const headerName
|
|
26
|
+
for (const headerName in headers) {
|
|
27
|
+
if (!hasOwn(headers, headerName))
|
|
28
|
+
continue;
|
|
22
29
|
if (soughtHeader === headerName.toLowerCase()) {
|
|
23
30
|
delete headers[headerName];
|
|
24
31
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
import { HttpRequest } from "@smithy/core/protocols";
|
|
2
3
|
export const moveHeadersToQuery = (request, options = {}) => {
|
|
3
4
|
const { headers, query = {} } = HttpRequest.clone(request);
|
|
4
|
-
for (const name
|
|
5
|
+
for (const name in headers) {
|
|
6
|
+
if (!hasOwn(headers, name))
|
|
7
|
+
continue;
|
|
5
8
|
const lname = name.toLowerCase();
|
|
6
9
|
if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) ||
|
|
7
10
|
options.hoistableHeaders?.has(lname)) {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/serde";
|
|
1
2
|
import { HttpRequest } from "@smithy/core/protocols";
|
|
2
3
|
import { GENERATED_HEADERS } from "./constants";
|
|
3
4
|
export const prepareRequest = (request) => {
|
|
4
5
|
request = HttpRequest.clone(request);
|
|
5
|
-
for (const headerName
|
|
6
|
+
for (const headerName in request.headers) {
|
|
7
|
+
if (!hasOwn(request.headers, headerName))
|
|
8
|
+
continue;
|
|
6
9
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
7
10
|
delete request.headers[headerName];
|
|
8
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.3",
|
|
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.33.
|
|
41
|
+
"@smithy/core": "^3.33.3",
|
|
42
42
|
"@smithy/types": "^4.17.2",
|
|
43
43
|
"tslib": "^2.6.2"
|
|
44
44
|
},
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@types/node": "^18",
|
|
51
51
|
"@typescript-eslint/eslint-plugin": "^8",
|
|
52
52
|
"@typescript-eslint/parser": "^8",
|
|
53
|
-
"aws-cdk": "^2.
|
|
53
|
+
"aws-cdk": "^2.1138.0",
|
|
54
54
|
"aws-cdk-lib": "2.195.0",
|
|
55
55
|
"cdk8s": "2.68.91",
|
|
56
56
|
"cdk8s-cli": "^2.207.53",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"jsii-docgen": "^10.5.0",
|
|
68
68
|
"jsii-pacmak": "^1.139.0",
|
|
69
69
|
"jsii-rosetta": "^5",
|
|
70
|
-
"projen": "^0.101.
|
|
70
|
+
"projen": "^0.101.34",
|
|
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.1115.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.663",
|
|
96
96
|
"jest": {
|
|
97
97
|
"coverageProvider": "v8",
|
|
98
98
|
"testMatch": [
|