@mavogel/awscdk-rootmail 0.1.35 → 0.1.37
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 +8 -8
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/checksums/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +51 -14
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-es/models/enums.js +1 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-es/schemas/schemas_0.js +46 -13
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DeleteAccountPolicyCommand.d.ts +22 -5
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeAccountPoliciesCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeLogGroupsCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/PutAccountPolicyCommand.d.ts +18 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/TagLogGroupCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/TagResourceCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/TestMetricFilterCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/models/models_0.d.ts +124 -58
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/models/models_1.d.ts +58 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/commands/DeleteAccountPolicyCommand.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/commands/TagLogGroupCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/commands/TestMetricFilterCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/models/models_0.d.ts +21 -12
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/models/models_1.d.ts +12 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +5 -5
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +5 -5
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +9 -9
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +5 -5
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/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-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
- 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/middleware-sdk-s3/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/package.json +7 -7
- /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,13 +1,12 @@
|
|
|
1
1
|
import { determineTimestampFormat } from "../../serde/determineTimestampFormat";
|
|
2
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
-
import { fromBase64, LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from "@smithy/core/serde";
|
|
3
|
+
import { fromBase64, LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, writeKey, } from "@smithy/core/serde";
|
|
4
4
|
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
5
5
|
import { UnionSerde } from "../../UnionSerde";
|
|
6
6
|
import { detectBufferParsing } from "../detectBufferParsing";
|
|
7
7
|
import { jsonReviver } from "../jsonReviver";
|
|
8
8
|
import { needsReviver } from "../needsReviver";
|
|
9
9
|
import { parseJsonBody } from "../parseJsonBody";
|
|
10
|
-
import { writeKey } from "../../writeKey";
|
|
11
10
|
import { hasOwn } from "@smithy/core/transport";
|
|
12
11
|
export class JsonShapeDeserializer2 extends SerdeContextConfig {
|
|
13
12
|
settings;
|
|
@@ -60,8 +59,9 @@ export class JsonShapeDeserializer2 extends SerdeContextConfig {
|
|
|
60
59
|
const map = value;
|
|
61
60
|
if (this.needsTransform(mapMember)) {
|
|
62
61
|
for (const k in map) {
|
|
63
|
-
if (!hasOwn(map, k))
|
|
62
|
+
if (!hasOwn(map, k)) {
|
|
64
63
|
continue;
|
|
64
|
+
}
|
|
65
65
|
if (k === "__proto__") {
|
|
66
66
|
writeKey(map);
|
|
67
67
|
}
|
|
@@ -133,8 +133,9 @@ export class JsonShapeDeserializer2 extends SerdeContextConfig {
|
|
|
133
133
|
else {
|
|
134
134
|
const doc = value;
|
|
135
135
|
for (const k in doc) {
|
|
136
|
-
if (!hasOwn(doc, k))
|
|
136
|
+
if (!hasOwn(doc, k)) {
|
|
137
137
|
continue;
|
|
138
|
+
}
|
|
138
139
|
if (k === "__proto__") {
|
|
139
140
|
writeKey(doc);
|
|
140
141
|
}
|
|
@@ -181,8 +182,9 @@ export class JsonShapeDeserializer2 extends SerdeContextConfig {
|
|
|
181
182
|
}
|
|
182
183
|
else if (hasType) {
|
|
183
184
|
for (const k in record) {
|
|
184
|
-
if (!hasOwn(record, k))
|
|
185
|
+
if (!hasOwn(record, k)) {
|
|
185
186
|
continue;
|
|
187
|
+
}
|
|
186
188
|
const v = record[k];
|
|
187
189
|
const t = jsonName ? (nameMap[k] ?? k) : k;
|
|
188
190
|
if (!(t in out)) {
|
package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js
CHANGED
|
@@ -417,8 +417,9 @@ export class JsonShapeSerializer2 extends SerdeContextConfig {
|
|
|
417
417
|
const out = [];
|
|
418
418
|
for (let i = 0; i < value.length; ++i) {
|
|
419
419
|
const v = value[i];
|
|
420
|
-
if (v == null && !sparse)
|
|
420
|
+
if (v == null && !sparse) {
|
|
421
421
|
continue;
|
|
422
|
+
}
|
|
422
423
|
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
423
424
|
out.push(String(v));
|
|
424
425
|
}
|
|
@@ -458,8 +459,9 @@ export class JsonShapeSerializer2 extends SerdeContextConfig {
|
|
|
458
459
|
if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
|
|
459
460
|
let modifications;
|
|
460
461
|
for (const k in value) {
|
|
461
|
-
if (!hasOwn(value, k))
|
|
462
|
+
if (!hasOwn(value, k)) {
|
|
462
463
|
continue;
|
|
464
|
+
}
|
|
463
465
|
const v = value[k];
|
|
464
466
|
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
465
467
|
(modifications ??= {})[k] = v;
|
|
@@ -483,8 +485,9 @@ export class JsonShapeSerializer2 extends SerdeContextConfig {
|
|
|
483
485
|
this.json[this.i++] = OPEN_BRACE;
|
|
484
486
|
let first = true;
|
|
485
487
|
for (const k in value) {
|
|
486
|
-
if (!hasOwn(value, k))
|
|
488
|
+
if (!hasOwn(value, k)) {
|
|
487
489
|
continue;
|
|
490
|
+
}
|
|
488
491
|
const v = value[k];
|
|
489
492
|
if (isDocument ? v === undefined : v == null && !sparse) {
|
|
490
493
|
continue;
|
|
@@ -2,6 +2,9 @@ export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
|
|
|
2
2
|
if (runtimeConfig.logger && runtimeConfig.logger.constructor?.name !== "NoOpLogger") {
|
|
3
3
|
runtimeConfig.requestHandler?.updateHttpClientConfig?.(Symbol.for("logger"), runtimeConfig.logger);
|
|
4
4
|
}
|
|
5
|
+
if (runtimeConfig.defaultSocketTimeout) {
|
|
6
|
+
runtimeConfig.requestHandler?.updateHttpClientConfig?.(Symbol.for("@smithy/defaultSocketTimeout"), runtimeConfig.defaultSocketTimeout);
|
|
7
|
+
}
|
|
5
8
|
return {
|
|
6
9
|
setHttpHandler(handler) {
|
|
7
10
|
runtimeConfig.requestHandler = handler;
|
package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js
CHANGED
|
@@ -8,8 +8,9 @@ export const CONFIG_MAX_ATTEMPTS = "max_attempts";
|
|
|
8
8
|
export const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
|
9
9
|
environmentVariableSelector: (env) => {
|
|
10
10
|
const value = env[ENV_MAX_ATTEMPTS];
|
|
11
|
-
if (!value)
|
|
11
|
+
if (!value) {
|
|
12
12
|
return undefined;
|
|
13
|
+
}
|
|
13
14
|
const maxAttempt = parseInt(value);
|
|
14
15
|
if (Number.isNaN(maxAttempt)) {
|
|
15
16
|
throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
|
@@ -18,8 +19,9 @@ export const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
|
|
18
19
|
},
|
|
19
20
|
configFileSelector: (profile) => {
|
|
20
21
|
const value = profile[CONFIG_MAX_ATTEMPTS];
|
|
21
|
-
if (!value)
|
|
22
|
+
if (!value) {
|
|
22
23
|
return undefined;
|
|
24
|
+
}
|
|
23
25
|
const maxAttempt = parseInt(value);
|
|
24
26
|
if (Number.isNaN(maxAttempt)) {
|
|
25
27
|
throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js
CHANGED
|
@@ -6,8 +6,9 @@ export function parseRetryAfterHeader(response, logger) {
|
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
8
8
|
for (const header in response.headers) {
|
|
9
|
-
if (!hasOwn(response.headers, header))
|
|
9
|
+
if (!hasOwn(response.headers, header)) {
|
|
10
10
|
continue;
|
|
11
|
+
}
|
|
11
12
|
const h = header.toLowerCase();
|
|
12
13
|
if (h === "retry-after") {
|
|
13
14
|
const retryAfter = response.headers[header];
|
|
@@ -81,15 +81,18 @@ export class StandardRetryStrategy {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
const getDelayFromRetryAfterHeader = (response) => {
|
|
84
|
-
if (!HttpResponse.isInstance(response))
|
|
84
|
+
if (!HttpResponse.isInstance(response)) {
|
|
85
85
|
return;
|
|
86
|
+
}
|
|
86
87
|
const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
|
|
87
|
-
if (!retryAfterHeaderName)
|
|
88
|
+
if (!retryAfterHeaderName) {
|
|
88
89
|
return;
|
|
90
|
+
}
|
|
89
91
|
const retryAfter = response.headers[retryAfterHeaderName];
|
|
90
92
|
const retryAfterSeconds = Number(retryAfter);
|
|
91
|
-
if (!Number.isNaN(retryAfterSeconds))
|
|
93
|
+
if (!Number.isNaN(retryAfterSeconds)) {
|
|
92
94
|
return Math.min(retryAfterSeconds * 1000, 20_000);
|
|
95
|
+
}
|
|
93
96
|
const retryAfterDate = new Date(retryAfter);
|
|
94
97
|
return Math.min(retryAfterDate.getTime() - Date.now(), 20_000);
|
|
95
98
|
};
|
package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js
CHANGED
|
@@ -83,12 +83,15 @@ const getRetryErrorInfo = (error, logger) => {
|
|
|
83
83
|
return errorInfo;
|
|
84
84
|
};
|
|
85
85
|
const getRetryErrorType = (error) => {
|
|
86
|
-
if (isThrottlingError(error))
|
|
86
|
+
if (isThrottlingError(error)) {
|
|
87
87
|
return "THROTTLING";
|
|
88
|
-
|
|
88
|
+
}
|
|
89
|
+
if (isTransientError(error)) {
|
|
89
90
|
return "TRANSIENT";
|
|
90
|
-
|
|
91
|
+
}
|
|
92
|
+
if (isServerError(error)) {
|
|
91
93
|
return "SERVER_ERROR";
|
|
94
|
+
}
|
|
92
95
|
return "CLIENT_ERROR";
|
|
93
96
|
};
|
|
94
97
|
export const retryMiddlewareOptions = {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export const asSdkError = (error) => {
|
|
2
|
-
if (error instanceof Error)
|
|
2
|
+
if (error instanceof Error) {
|
|
3
3
|
return error;
|
|
4
|
-
|
|
4
|
+
}
|
|
5
|
+
if (error instanceof Object) {
|
|
5
6
|
return Object.assign(new Error(), error);
|
|
6
|
-
|
|
7
|
+
}
|
|
8
|
+
if (typeof error === "string") {
|
|
7
9
|
return new Error(error);
|
|
10
|
+
}
|
|
8
11
|
return new Error(`AWS SDK error wrapper for ${error}`);
|
|
9
12
|
};
|
|
@@ -138,8 +138,9 @@ export const expectUnion = (value) => {
|
|
|
138
138
|
const asObject = expectObject(value);
|
|
139
139
|
const setKeys = [];
|
|
140
140
|
for (const k in asObject) {
|
|
141
|
-
if (!hasOwn(asObject, k))
|
|
141
|
+
if (!hasOwn(asObject, k)) {
|
|
142
142
|
continue;
|
|
143
|
+
}
|
|
143
144
|
if (asObject[k] != null) {
|
|
144
145
|
setKeys.push(k);
|
|
145
146
|
}
|
|
@@ -7,12 +7,15 @@ export const calculateBodyLength = (body) => {
|
|
|
7
7
|
let len = body.length;
|
|
8
8
|
for (let i = len - 1; i >= 0; i--) {
|
|
9
9
|
const code = body.charCodeAt(i);
|
|
10
|
-
if (code > 0x7f && code <= 0x7ff)
|
|
10
|
+
if (code > 0x7f && code <= 0x7ff) {
|
|
11
11
|
len++;
|
|
12
|
-
|
|
12
|
+
}
|
|
13
|
+
else if (code > 0x7ff && code <= 0xffff) {
|
|
13
14
|
len += 2;
|
|
14
|
-
|
|
15
|
+
}
|
|
16
|
+
if (code >= 0xdc00 && code <= 0xdfff) {
|
|
15
17
|
i--;
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
return len;
|
|
18
21
|
}
|
|
@@ -10,8 +10,9 @@ export class HttpResponse {
|
|
|
10
10
|
this.body = options.body;
|
|
11
11
|
}
|
|
12
12
|
static isInstance(response) {
|
|
13
|
-
if (!response)
|
|
13
|
+
if (!response) {
|
|
14
14
|
return false;
|
|
15
|
+
}
|
|
15
16
|
const resp = response;
|
|
16
17
|
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
|
|
17
18
|
}
|
|
@@ -7,8 +7,9 @@ export const toEndpointV1 = (endpoint) => {
|
|
|
7
7
|
if (endpoint.headers) {
|
|
8
8
|
v1Endpoint.headers = {};
|
|
9
9
|
for (const name in endpoint.headers) {
|
|
10
|
-
if (!hasOwn(endpoint.headers, name))
|
|
10
|
+
if (!hasOwn(endpoint.headers, name)) {
|
|
11
11
|
continue;
|
|
12
|
+
}
|
|
12
13
|
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -24,6 +24,7 @@ export declare const getHttpHandlerExtensionConfiguration: <HandlerConfig extend
|
|
|
24
24
|
logger?: Logger;
|
|
25
25
|
}>(runtimeConfig: HttpHandlerExtensionConfigType<HandlerConfig> & {
|
|
26
26
|
logger?: Logger;
|
|
27
|
+
defaultSocketTimeout?: number;
|
|
27
28
|
}) => {
|
|
28
29
|
setHttpHandler(handler: HttpHandler<HandlerConfig>): void;
|
|
29
30
|
httpHandler(): HttpHandler<HandlerConfig>;
|
|
@@ -40,3 +40,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
|
40
40
|
export declare const v4: () => string;
|
|
41
41
|
export declare const generateIdempotencyToken: () => string;
|
|
42
42
|
export { hasOwn } from "@smithy/core/transport";
|
|
43
|
+
export { writeKey } from "./writeKey";
|
|
@@ -38,3 +38,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
|
38
38
|
export declare const v4: () => string;
|
|
39
39
|
export declare const generateIdempotencyToken: () => string;
|
|
40
40
|
export { hasOwn } from "@smithy/core/transport";
|
|
41
|
+
export { writeKey } from "./writeKey";
|
|
@@ -24,6 +24,7 @@ export declare const getHttpHandlerExtensionConfiguration: <HandlerConfig extend
|
|
|
24
24
|
logger?: Logger;
|
|
25
25
|
}>(runtimeConfig: HttpHandlerExtensionConfigType<HandlerConfig> & {
|
|
26
26
|
logger?: Logger;
|
|
27
|
+
defaultSocketTimeout?: number;
|
|
27
28
|
}) => {
|
|
28
29
|
setHttpHandler(handler: HttpHandler<HandlerConfig>): void;
|
|
29
30
|
httpHandler(): HttpHandler<HandlerConfig>;
|
|
@@ -40,3 +40,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
|
40
40
|
export declare const v4: () => string;
|
|
41
41
|
export declare const generateIdempotencyToken: () => string;
|
|
42
42
|
export { hasOwn } from "@smithy/core/transport";
|
|
43
|
+
export { writeKey } from "./writeKey";
|
|
@@ -38,3 +38,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
|
|
|
38
38
|
export declare const v4: () => string;
|
|
39
39
|
export declare const generateIdempotencyToken: () => string;
|
|
40
40
|
export { hasOwn } from "@smithy/core/transport";
|
|
41
|
+
export { writeKey } from "./writeKey";
|
|
@@ -31,8 +31,9 @@ const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
|
|
|
31
31
|
const getTransformedHeaders = (headers) => {
|
|
32
32
|
const transformedHeaders = {};
|
|
33
33
|
for (const name in headers) {
|
|
34
|
-
if (!hasOwn(headers, name))
|
|
34
|
+
if (!hasOwn(headers, name)) {
|
|
35
35
|
continue;
|
|
36
|
+
}
|
|
36
37
|
const headerValues = headers[name];
|
|
37
38
|
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
38
39
|
}
|
|
@@ -252,8 +253,9 @@ class NodeHttpHandler {
|
|
|
252
253
|
}
|
|
253
254
|
if (sockets && requests) {
|
|
254
255
|
for (const origin in sockets) {
|
|
255
|
-
if (!hasOwn(sockets, origin))
|
|
256
|
+
if (!hasOwn(sockets, origin)) {
|
|
256
257
|
continue;
|
|
258
|
+
}
|
|
257
259
|
const socketsInUse = sockets[origin]?.length ?? 0;
|
|
258
260
|
const requestsEnqueued = requests[origin]?.length ?? 0;
|
|
259
261
|
if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
|
|
@@ -424,11 +426,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
424
426
|
updateHttpClientConfig(key, value) {
|
|
425
427
|
this.config = undefined;
|
|
426
428
|
this.configProvider = this.configProvider.then((config) => {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
switch (key) {
|
|
430
|
+
case Symbol.for("logger"):
|
|
431
|
+
key = "logger";
|
|
432
|
+
value = config.logger ?? value;
|
|
433
|
+
break;
|
|
434
|
+
case Symbol.for("@smithy/defaultSocketTimeout"):
|
|
435
|
+
key = "defaultSocketTimeout";
|
|
436
|
+
value = resolveDefaultSocketTimeout(config) ?? value;
|
|
437
|
+
break;
|
|
432
438
|
}
|
|
433
439
|
return {
|
|
434
440
|
...config,
|
|
@@ -443,6 +449,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
443
449
|
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};
|
|
444
450
|
const keepAlive = true;
|
|
445
451
|
const maxSockets = 50;
|
|
452
|
+
let httpAgentPromise;
|
|
446
453
|
return {
|
|
447
454
|
connectionTimeout,
|
|
448
455
|
requestTimeout,
|
|
@@ -450,7 +457,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
450
457
|
defaultSocketTimeout: resolveDefaultSocketTimeout(options),
|
|
451
458
|
socketAcquisitionWarningTimeout,
|
|
452
459
|
throwOnRequestTimeout,
|
|
453
|
-
httpAgentProvider: async () => {
|
|
460
|
+
httpAgentProvider: () => (httpAgentPromise ??= (async () => {
|
|
454
461
|
const node_http = require('node:http');
|
|
455
462
|
const { Agent, request } = node_http.default ?? node_http;
|
|
456
463
|
hRequest = request;
|
|
@@ -460,7 +467,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
460
467
|
return httpAgent;
|
|
461
468
|
}
|
|
462
469
|
return new hAgent({ keepAlive, maxSockets, ...httpAgent });
|
|
463
|
-
},
|
|
470
|
+
})()),
|
|
464
471
|
httpsAgent: (() => {
|
|
465
472
|
if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
|
|
466
473
|
this.externalAgent = true;
|
|
@@ -885,6 +892,12 @@ class NodeHttp2Handler {
|
|
|
885
892
|
updateHttpClientConfig(key, value) {
|
|
886
893
|
this.config = undefined;
|
|
887
894
|
this.configProvider = this.configProvider.then((config) => {
|
|
895
|
+
switch (key) {
|
|
896
|
+
case Symbol.for("@smithy/defaultSocketTimeout"):
|
|
897
|
+
key = "defaultSocketTimeout";
|
|
898
|
+
value = resolveDefaultSocketTimeout(config) ?? value;
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
888
901
|
return {
|
|
889
902
|
...config,
|
|
890
903
|
[key]: value,
|
|
@@ -2,8 +2,9 @@ import { hasOwn } from "@smithy/core/serde";
|
|
|
2
2
|
const getTransformedHeaders = (headers) => {
|
|
3
3
|
const transformedHeaders = {};
|
|
4
4
|
for (const name in headers) {
|
|
5
|
-
if (!hasOwn(headers, name))
|
|
5
|
+
if (!hasOwn(headers, name)) {
|
|
6
6
|
continue;
|
|
7
|
+
}
|
|
7
8
|
const headerValues = headers[name];
|
|
8
9
|
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
9
10
|
}
|
|
@@ -37,8 +37,9 @@ export class NodeHttpHandler {
|
|
|
37
37
|
}
|
|
38
38
|
if (sockets && requests) {
|
|
39
39
|
for (const origin in sockets) {
|
|
40
|
-
if (!hasOwn(sockets, origin))
|
|
40
|
+
if (!hasOwn(sockets, origin)) {
|
|
41
41
|
continue;
|
|
42
|
+
}
|
|
42
43
|
const socketsInUse = sockets[origin]?.length ?? 0;
|
|
43
44
|
const requestsEnqueued = requests[origin]?.length ?? 0;
|
|
44
45
|
if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
|
|
@@ -209,11 +210,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
209
210
|
updateHttpClientConfig(key, value) {
|
|
210
211
|
this.config = undefined;
|
|
211
212
|
this.configProvider = this.configProvider.then((config) => {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
switch (key) {
|
|
214
|
+
case Symbol.for("logger"):
|
|
215
|
+
key = "logger";
|
|
216
|
+
value = config.logger ?? value;
|
|
217
|
+
break;
|
|
218
|
+
case Symbol.for("@smithy/defaultSocketTimeout"):
|
|
219
|
+
key = "defaultSocketTimeout";
|
|
220
|
+
value = resolveDefaultSocketTimeout(config) ?? value;
|
|
221
|
+
break;
|
|
217
222
|
}
|
|
218
223
|
return {
|
|
219
224
|
...config,
|
|
@@ -228,6 +233,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
228
233
|
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};
|
|
229
234
|
const keepAlive = true;
|
|
230
235
|
const maxSockets = 50;
|
|
236
|
+
let httpAgentPromise;
|
|
231
237
|
return {
|
|
232
238
|
connectionTimeout,
|
|
233
239
|
requestTimeout,
|
|
@@ -235,7 +241,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
235
241
|
defaultSocketTimeout: resolveDefaultSocketTimeout(options),
|
|
236
242
|
socketAcquisitionWarningTimeout,
|
|
237
243
|
throwOnRequestTimeout,
|
|
238
|
-
httpAgentProvider: async () => {
|
|
244
|
+
httpAgentProvider: () => (httpAgentPromise ??= (async () => {
|
|
239
245
|
const node_http = await import("node:http");
|
|
240
246
|
const { Agent, request } = node_http.default ?? node_http;
|
|
241
247
|
hRequest = request;
|
|
@@ -245,7 +251,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
245
251
|
return httpAgent;
|
|
246
252
|
}
|
|
247
253
|
return new hAgent({ keepAlive, maxSockets, ...httpAgent });
|
|
248
|
-
},
|
|
254
|
+
})()),
|
|
249
255
|
httpsAgent: (() => {
|
|
250
256
|
if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
|
|
251
257
|
this.externalAgent = true;
|
|
@@ -186,6 +186,12 @@ export class NodeHttp2Handler {
|
|
|
186
186
|
updateHttpClientConfig(key, value) {
|
|
187
187
|
this.config = undefined;
|
|
188
188
|
this.configProvider = this.configProvider.then((config) => {
|
|
189
|
+
switch (key) {
|
|
190
|
+
case Symbol.for("@smithy/defaultSocketTimeout"):
|
|
191
|
+
key = "defaultSocketTimeout";
|
|
192
|
+
value = resolveDefaultSocketTimeout(config) ?? value;
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
189
195
|
return {
|
|
190
196
|
...config,
|
|
191
197
|
[key]: value,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.1",
|
|
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.
|
|
42
|
+
"@smithy/core": "^3.38.1",
|
|
43
43
|
"@smithy/types": "^4.19.0",
|
|
44
44
|
"tslib": "^2.6.2"
|
|
45
45
|
},
|
|
@@ -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
|
}
|