@cdklabs/cdk-ecs-codedeploy 0.0.453 → 0.0.454
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/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/package.json +8 -8
- package/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- 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 +1 -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/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +8 -4
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +8 -4
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- 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 +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/transport";
|
|
1
2
|
import { TypeRegistry } from "@smithy/core/schema";
|
|
2
3
|
import { fromUtf8, toUtf8 } from "@smithy/core/serde";
|
|
3
4
|
export class EventStreamSerde {
|
|
@@ -52,6 +53,8 @@ export class EventStreamSerde {
|
|
|
52
53
|
}
|
|
53
54
|
let unionMember = "";
|
|
54
55
|
for (const key in event) {
|
|
56
|
+
if (!hasOwn(event, key))
|
|
57
|
+
continue;
|
|
55
58
|
if (key !== "__type") {
|
|
56
59
|
unionMember = key;
|
|
57
60
|
break;
|
|
@@ -79,6 +82,8 @@ export class EventStreamSerde {
|
|
|
79
82
|
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
|
80
83
|
let unionMember = "";
|
|
81
84
|
for (const key in event) {
|
|
85
|
+
if (!hasOwn(event, key))
|
|
86
|
+
continue;
|
|
82
87
|
if (key !== "__type") {
|
|
83
88
|
unionMember = key;
|
|
84
89
|
break;
|
|
@@ -153,6 +158,8 @@ export class EventStreamSerde {
|
|
|
153
158
|
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
|
154
159
|
}
|
|
155
160
|
for (const key in firstEvent.value) {
|
|
161
|
+
if (!hasOwn(firstEvent.value, key))
|
|
162
|
+
continue;
|
|
156
163
|
initialResponseContainer[key] = firstEvent.value[key];
|
|
157
164
|
}
|
|
158
165
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/transport";
|
|
1
2
|
import { fromHex, toHex } from "@smithy/core/serde";
|
|
2
3
|
import { Int64 } from "./Int64";
|
|
3
4
|
export class HeaderMarshaller {
|
|
@@ -9,7 +10,9 @@ export class HeaderMarshaller {
|
|
|
9
10
|
}
|
|
10
11
|
format(headers) {
|
|
11
12
|
const chunks = [];
|
|
12
|
-
for (const headerName
|
|
13
|
+
for (const headerName in headers) {
|
|
14
|
+
if (!hasOwn(headers, headerName))
|
|
15
|
+
continue;
|
|
13
16
|
const bytes = this.fromUtf8(headerName);
|
|
14
17
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
15
18
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/transport";
|
|
1
2
|
import { NormalizedSchema, translateTraits } from "@smithy/core/schema";
|
|
2
3
|
import { sdkStreamMixin, splitEvery, splitHeader } from "@smithy/core/serde";
|
|
3
4
|
import { HttpRequest } from "@smithy/core/transport";
|
|
@@ -93,6 +94,8 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
93
94
|
}
|
|
94
95
|
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
95
96
|
for (const key in inputMemberValue) {
|
|
97
|
+
if (!hasOwn(inputMemberValue, key))
|
|
98
|
+
continue;
|
|
96
99
|
const val = inputMemberValue[key];
|
|
97
100
|
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
98
101
|
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
@@ -139,6 +142,8 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
139
142
|
const traits = ns.getMergedTraits();
|
|
140
143
|
if (traits.httpQueryParams) {
|
|
141
144
|
for (const key in data) {
|
|
145
|
+
if (!hasOwn(data, key))
|
|
146
|
+
continue;
|
|
142
147
|
if (!(key in query)) {
|
|
143
148
|
const val = data[key];
|
|
144
149
|
const valueSchema = ns.getValueSchema();
|
|
@@ -182,6 +187,8 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
182
187
|
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
183
188
|
}
|
|
184
189
|
for (const header in response.headers) {
|
|
190
|
+
if (!hasOwn(response.headers, header))
|
|
191
|
+
continue;
|
|
185
192
|
const value = response.headers[header];
|
|
186
193
|
delete response.headers[header];
|
|
187
194
|
response.headers[header.toLowerCase()] = value;
|
|
@@ -269,6 +276,8 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
269
276
|
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
270
277
|
dataObject[memberName] = {};
|
|
271
278
|
for (const header in response.headers) {
|
|
279
|
+
if (!hasOwn(response.headers, header))
|
|
280
|
+
continue;
|
|
272
281
|
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
273
282
|
const value = response.headers[header];
|
|
274
283
|
const valueSchema = memberSchema.getValueSchema();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasOwn } from "@smithy/core/transport";
|
|
1
2
|
import { NormalizedSchema, TypeRegistry, translateTraits } from "@smithy/core/schema";
|
|
2
3
|
import { HttpRequest, HttpResponse, isValidHostname } from "@smithy/core/transport";
|
|
3
4
|
import { SerdeContext } from "./SerdeContext";
|
|
@@ -43,6 +44,8 @@ export class HttpProtocol extends SerdeContext {
|
|
|
43
44
|
}
|
|
44
45
|
if (endpoint.headers) {
|
|
45
46
|
for (const name in endpoint.headers) {
|
|
47
|
+
if (!hasOwn(endpoint.headers, name))
|
|
48
|
+
continue;
|
|
46
49
|
request.headers[name] = endpoint.headers[name].join(", ");
|
|
47
50
|
}
|
|
48
51
|
}
|
|
@@ -58,6 +61,8 @@ export class HttpProtocol extends SerdeContext {
|
|
|
58
61
|
};
|
|
59
62
|
if (endpoint.headers) {
|
|
60
63
|
for (const name in endpoint.headers) {
|
|
64
|
+
if (!hasOwn(endpoint.headers, name))
|
|
65
|
+
continue;
|
|
61
66
|
request.headers[name] = endpoint.headers[name];
|
|
62
67
|
}
|
|
63
68
|
}
|
|
@@ -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
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"constructs": "^10.0.5"
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|
|
113
|
-
"@aws-sdk/client-codedeploy": "^3.
|
|
113
|
+
"@aws-sdk/client-codedeploy": "^3.1116.0",
|
|
114
114
|
"jmespath": "^0.16.0"
|
|
115
115
|
},
|
|
116
116
|
"bundledDependencies": [
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"publishConfig": {
|
|
129
129
|
"access": "public"
|
|
130
130
|
},
|
|
131
|
-
"version": "0.0.
|
|
131
|
+
"version": "0.0.454",
|
|
132
132
|
"jest": {
|
|
133
133
|
"coverageProvider": "v8",
|
|
134
134
|
"testMatch": [
|