@cdk8s/awscdk-resolver 0.0.722 → 0.0.724
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 +3 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +26 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +6 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +51 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- 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 +3 -3
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +1 -1
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- 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 +26 -13
- 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/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 +19 -7
- 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 +11 -6
- 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 +5 -5
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
- /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
- /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
|
@@ -94,8 +94,9 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
94
94
|
}
|
|
95
95
|
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
96
96
|
for (const key in inputMemberValue) {
|
|
97
|
-
if (!hasOwn(inputMemberValue, key))
|
|
97
|
+
if (!hasOwn(inputMemberValue, key)) {
|
|
98
98
|
continue;
|
|
99
|
+
}
|
|
99
100
|
const val = inputMemberValue[key];
|
|
100
101
|
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
101
102
|
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
@@ -142,8 +143,9 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
142
143
|
const traits = ns.getMergedTraits();
|
|
143
144
|
if (traits.httpQueryParams) {
|
|
144
145
|
for (const key in data) {
|
|
145
|
-
if (!hasOwn(data, key))
|
|
146
|
+
if (!hasOwn(data, key)) {
|
|
146
147
|
continue;
|
|
148
|
+
}
|
|
147
149
|
if (!(key in query)) {
|
|
148
150
|
const val = data[key];
|
|
149
151
|
const valueSchema = ns.getValueSchema();
|
|
@@ -187,8 +189,9 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
187
189
|
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
188
190
|
}
|
|
189
191
|
for (const header in response.headers) {
|
|
190
|
-
if (!hasOwn(response.headers, header))
|
|
192
|
+
if (!hasOwn(response.headers, header)) {
|
|
191
193
|
continue;
|
|
194
|
+
}
|
|
192
195
|
const value = response.headers[header];
|
|
193
196
|
delete response.headers[header];
|
|
194
197
|
response.headers[header.toLowerCase()] = value;
|
|
@@ -276,8 +279,9 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
276
279
|
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
277
280
|
dataObject[memberName] = {};
|
|
278
281
|
for (const header in response.headers) {
|
|
279
|
-
if (!hasOwn(response.headers, header))
|
|
282
|
+
if (!hasOwn(response.headers, header)) {
|
|
280
283
|
continue;
|
|
284
|
+
}
|
|
281
285
|
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
282
286
|
const value = response.headers[header];
|
|
283
287
|
const valueSchema = memberSchema.getValueSchema();
|
|
@@ -44,8 +44,9 @@ export class HttpProtocol extends SerdeContext {
|
|
|
44
44
|
}
|
|
45
45
|
if (endpoint.headers) {
|
|
46
46
|
for (const name in endpoint.headers) {
|
|
47
|
-
if (!hasOwn(endpoint.headers, name))
|
|
47
|
+
if (!hasOwn(endpoint.headers, name)) {
|
|
48
48
|
continue;
|
|
49
|
+
}
|
|
49
50
|
request.headers[name] = endpoint.headers[name].join(", ");
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -61,8 +62,9 @@ export class HttpProtocol extends SerdeContext {
|
|
|
61
62
|
};
|
|
62
63
|
if (endpoint.headers) {
|
|
63
64
|
for (const name in endpoint.headers) {
|
|
64
|
-
if (!hasOwn(endpoint.headers, name))
|
|
65
|
+
if (!hasOwn(endpoint.headers, name)) {
|
|
65
66
|
continue;
|
|
67
|
+
}
|
|
66
68
|
request.headers[name] = endpoint.headers[name];
|
|
67
69
|
}
|
|
68
70
|
}
|
|
@@ -68,8 +68,9 @@ export class RpcProtocol extends HttpProtocol {
|
|
|
68
68
|
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
69
69
|
}
|
|
70
70
|
for (const header in response.headers) {
|
|
71
|
-
if (!hasOwn(response.headers, header))
|
|
71
|
+
if (!hasOwn(response.headers, header)) {
|
|
72
72
|
continue;
|
|
73
|
+
}
|
|
73
74
|
const value = response.headers[header];
|
|
74
75
|
delete response.headers[header];
|
|
75
76
|
response.headers[header.toLowerCase()] = value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { determineTimestampFormat } from "../../serde/determineTimestampFormat";
|
|
2
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
-
import { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from "@smithy/core/serde";
|
|
3
|
+
import { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, writeKey, } from "@smithy/core/serde";
|
|
4
4
|
import { fromBase64 } from "@smithy/core/serde";
|
|
5
5
|
import { hasOwn } from "@smithy/core/transport";
|
|
6
6
|
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
@@ -8,7 +8,6 @@ import { UnionSerde } from "../../UnionSerde";
|
|
|
8
8
|
import { jsonReviver } from "../jsonReviver";
|
|
9
9
|
import { needsReviver } from "../needsReviver";
|
|
10
10
|
import { parseJsonBody } from "../parseJsonBody";
|
|
11
|
-
import { writeKey } from "../../writeKey";
|
|
12
11
|
export class JsonShapeDeserializer extends SerdeContextConfig {
|
|
13
12
|
settings;
|
|
14
13
|
constructor(settings) {
|
|
@@ -57,8 +56,9 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
|
|
|
57
56
|
}
|
|
58
57
|
else if (typeof record.__type === "string") {
|
|
59
58
|
for (const k in record) {
|
|
60
|
-
if (!hasOwn(record, k))
|
|
59
|
+
if (!hasOwn(record, k)) {
|
|
61
60
|
continue;
|
|
61
|
+
}
|
|
62
62
|
const v = record[k];
|
|
63
63
|
const t = jsonName ? (nameMap[k] ?? k) : k;
|
|
64
64
|
if (!(t in out)) {
|
|
@@ -80,8 +80,9 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
|
|
|
80
80
|
const mapMember = ns.getValueSchema();
|
|
81
81
|
const out = {};
|
|
82
82
|
for (const _k in value) {
|
|
83
|
-
if (!hasOwn(value, _k))
|
|
83
|
+
if (!hasOwn(value, _k)) {
|
|
84
84
|
continue;
|
|
85
|
+
}
|
|
85
86
|
if (_k === "__proto__") {
|
|
86
87
|
writeKey(out);
|
|
87
88
|
}
|
|
@@ -143,8 +144,9 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
|
|
|
143
144
|
if (isObject) {
|
|
144
145
|
const out = Array.isArray(value) ? [] : {};
|
|
145
146
|
for (const k in value) {
|
|
146
|
-
if (!hasOwn(value, k))
|
|
147
|
+
if (!hasOwn(value, k)) {
|
|
147
148
|
continue;
|
|
149
|
+
}
|
|
148
150
|
if (k === "__proto__") {
|
|
149
151
|
writeKey(out);
|
|
150
152
|
}
|
package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { determineTimestampFormat } from "../../serde/determineTimestampFormat";
|
|
2
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
-
import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from "@smithy/core/serde";
|
|
3
|
+
import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64, writeKey, } from "@smithy/core/serde";
|
|
4
4
|
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
5
5
|
import { JsonReplacer } from "../jsonReplacer";
|
|
6
|
-
import { writeKey } from "../../writeKey";
|
|
7
6
|
import { hasOwn } from "@smithy/core/transport";
|
|
8
7
|
export class JsonShapeSerializer extends SerdeContextConfig {
|
|
9
8
|
settings;
|
|
@@ -74,8 +73,9 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
74
73
|
}
|
|
75
74
|
else if (typeof record.__type === "string") {
|
|
76
75
|
for (const k in record) {
|
|
77
|
-
if (!hasOwn(record, k))
|
|
76
|
+
if (!hasOwn(record, k)) {
|
|
78
77
|
continue;
|
|
78
|
+
}
|
|
79
79
|
const v = record[k];
|
|
80
80
|
const targetKey = jsonName ? (nameMap[k] ?? k) : k;
|
|
81
81
|
if (!(targetKey in out)) {
|
|
@@ -101,8 +101,9 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
101
101
|
const out = {};
|
|
102
102
|
const sparse = !!ns.getMergedTraits().sparse;
|
|
103
103
|
for (const _k in value) {
|
|
104
|
-
if (!hasOwn(value, _k))
|
|
104
|
+
if (!hasOwn(value, _k)) {
|
|
105
105
|
continue;
|
|
106
|
+
}
|
|
106
107
|
const _v = value[_k];
|
|
107
108
|
if (sparse || _v != null) {
|
|
108
109
|
if (_k === "__proto__") {
|
|
@@ -175,8 +176,9 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
175
176
|
}
|
|
176
177
|
const out = Array.isArray(value) ? [] : {};
|
|
177
178
|
for (const k in value) {
|
|
178
|
-
if (!hasOwn(value, k))
|
|
179
|
+
if (!hasOwn(value, k)) {
|
|
179
180
|
continue;
|
|
181
|
+
}
|
|
180
182
|
const v = value[k];
|
|
181
183
|
if (k === "__proto__") {
|
|
182
184
|
writeKey(out);
|
|
@@ -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,
|
|
@@ -885,6 +891,12 @@ class NodeHttp2Handler {
|
|
|
885
891
|
updateHttpClientConfig(key, value) {
|
|
886
892
|
this.config = undefined;
|
|
887
893
|
this.configProvider = this.configProvider.then((config) => {
|
|
894
|
+
switch (key) {
|
|
895
|
+
case Symbol.for("@smithy/defaultSocketTimeout"):
|
|
896
|
+
key = "defaultSocketTimeout";
|
|
897
|
+
value = resolveDefaultSocketTimeout(config) ?? value;
|
|
898
|
+
break;
|
|
899
|
+
}
|
|
888
900
|
return {
|
|
889
901
|
...config,
|
|
890
902
|
[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,
|
|
@@ -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.0",
|
|
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.0",
|
|
43
43
|
"@smithy/types": "^4.19.0",
|
|
44
44
|
"tslib": "^2.6.2"
|
|
45
45
|
},
|