@cdklabs/cdk-ecs-codedeploy 0.0.437 → 0.0.438
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/package.json +34 -34
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +52 -50
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +52 -50
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +11 -10
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js +4 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +4 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +9 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +17 -17
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -8
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
- package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -8
- package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +5 -5
- package/node_modules/@smithy/core/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -14
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +17 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +6 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +6 -3
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +23 -11
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +9 -3
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +16 -8
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +8 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +6 -3
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +7 -7
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/package.json +9 -9
- package/node_modules/@smithy/middleware-serde/package.json +4 -4
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +191 -96
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +45 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +71 -35
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -18
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +44 -43
- package/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +42 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +34 -14
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +32 -8
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +14 -6
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +5 -0
- package/node_modules/@smithy/service-error-classification/dist-es/index.js +4 -0
- package/node_modules/@smithy/service-error-classification/dist-types/index.d.ts +6 -0
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +11 -5
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +11 -5
- package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +3 -3
- package/node_modules/@smithy/signature-v4/package.json +4 -4
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +8 -1
- package/node_modules/@smithy/smithy-client/dist-es/command.js +8 -1
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-types/connection/config.d.ts +5 -0
- package/node_modules/@smithy/types/dist-types/signature.d.ts +20 -3
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +79 -71
- package/node_modules/@smithy/util-endpoints/dist-es/decideEndpoint.js +4 -3
- package/node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js +2 -1
- package/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +8 -13
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +9 -7
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +12 -8
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +14 -13
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +7 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +10 -8
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +5 -5
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-types/bdd/BinaryDecisionDiagram.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts +2 -15
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts +6 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts +1 -1
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/node_modules/fast-xml-builder/package.json +1 -1
- package/node_modules/fast-xml-builder/src/fxb.js +6 -2
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +16 -2
- package/package.json +4 -4
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/strnum → strnum}/CHANGELOG.md +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/strnum → strnum}/LICENSE +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/strnum → strnum}/README.md +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/strnum → strnum}/package.json +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/strnum → strnum}/strnum.js +0 -0
|
@@ -50,9 +50,13 @@ class EventStreamSerde {
|
|
|
50
50
|
body: event.body,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
let unionMember = "";
|
|
54
|
+
for (const key in event) {
|
|
55
|
+
if (key !== "__type") {
|
|
56
|
+
unionMember = key;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
56
60
|
const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
|
|
57
61
|
const headers = {
|
|
58
62
|
":event-type": { type: "string", value: eventType },
|
|
@@ -73,9 +77,13 @@ class EventStreamSerde {
|
|
|
73
77
|
const memberSchemas = unionSchema.getMemberSchemas();
|
|
74
78
|
const initialResponseMarker = Symbol("initialResponseMarker");
|
|
75
79
|
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
let unionMember = "";
|
|
81
|
+
for (const key in event) {
|
|
82
|
+
if (key !== "__type") {
|
|
83
|
+
unionMember = key;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
79
87
|
const body = event[unionMember].body;
|
|
80
88
|
if (unionMember === "initial-response") {
|
|
81
89
|
const dataObject = await this.deserializer.read(responseSchema, body);
|
|
@@ -151,8 +159,8 @@ class EventStreamSerde {
|
|
|
151
159
|
if (!responseSchema) {
|
|
152
160
|
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
|
153
161
|
}
|
|
154
|
-
for (const
|
|
155
|
-
initialResponseContainer[key] = value;
|
|
162
|
+
for (const key in firstEvent.value) {
|
|
163
|
+
initialResponseContainer[key] = firstEvent.value[key];
|
|
156
164
|
}
|
|
157
165
|
}
|
|
158
166
|
return {
|
|
@@ -72,8 +72,8 @@ class HttpProtocol extends SerdeContext {
|
|
|
72
72
|
request.query[k] = v;
|
|
73
73
|
}
|
|
74
74
|
if (endpoint.headers) {
|
|
75
|
-
for (const
|
|
76
|
-
request.headers[name] =
|
|
75
|
+
for (const name in endpoint.headers) {
|
|
76
|
+
request.headers[name] = endpoint.headers[name].join(", ");
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return request;
|
|
@@ -87,8 +87,8 @@ class HttpProtocol extends SerdeContext {
|
|
|
87
87
|
...endpoint.query,
|
|
88
88
|
};
|
|
89
89
|
if (endpoint.headers) {
|
|
90
|
-
for (const
|
|
91
|
-
request.headers[name] =
|
|
90
|
+
for (const name in endpoint.headers) {
|
|
91
|
+
request.headers[name] = endpoint.headers[name];
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
return request;
|
|
@@ -103,8 +103,10 @@ class HttpProtocol extends SerdeContext {
|
|
|
103
103
|
if (opTraits.endpoint) {
|
|
104
104
|
let hostPrefix = opTraits.endpoint?.[0];
|
|
105
105
|
if (typeof hostPrefix === "string") {
|
|
106
|
-
const
|
|
107
|
-
|
|
106
|
+
for (const [name, member] of inputNs.structIterator()) {
|
|
107
|
+
if (!member.getMergedTraits().hostLabel) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
108
110
|
const replacement = input[name];
|
|
109
111
|
if (typeof replacement !== "string") {
|
|
110
112
|
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
|
@@ -200,7 +202,9 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
200
202
|
request.path += path;
|
|
201
203
|
}
|
|
202
204
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
203
|
-
|
|
205
|
+
for (const [key, value] of traitSearchParams) {
|
|
206
|
+
query[key] = value;
|
|
207
|
+
}
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
210
|
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
@@ -250,7 +254,8 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
250
254
|
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
|
251
255
|
}
|
|
252
256
|
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
253
|
-
for (const
|
|
257
|
+
for (const key in inputMemberValue) {
|
|
258
|
+
const val = inputMemberValue[key];
|
|
254
259
|
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
255
260
|
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
256
261
|
headers[amalgam.toLowerCase()] = serializer.flush();
|
|
@@ -295,8 +300,9 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
295
300
|
const serializer = this.serializer;
|
|
296
301
|
const traits = ns.getMergedTraits();
|
|
297
302
|
if (traits.httpQueryParams) {
|
|
298
|
-
for (const
|
|
303
|
+
for (const key in data) {
|
|
299
304
|
if (!(key in query)) {
|
|
305
|
+
const val = data[key];
|
|
300
306
|
const valueSchema = ns.getValueSchema();
|
|
301
307
|
Object.assign(valueSchema.getMergedTraits(), {
|
|
302
308
|
...traits,
|
|
@@ -424,8 +430,9 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
424
430
|
}
|
|
425
431
|
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
426
432
|
dataObject[memberName] = {};
|
|
427
|
-
for (const
|
|
433
|
+
for (const header in response.headers) {
|
|
428
434
|
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
435
|
+
const value = response.headers[header];
|
|
429
436
|
const valueSchema = memberSchema.getValueSchema();
|
|
430
437
|
valueSchema.getMergedTraits().httpHeader = header;
|
|
431
438
|
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
|
@@ -655,7 +655,12 @@ class TypeRegistry {
|
|
|
655
655
|
return undefined;
|
|
656
656
|
}
|
|
657
657
|
find(predicate) {
|
|
658
|
-
|
|
658
|
+
for (const schema of this.schemas.values()) {
|
|
659
|
+
if (predicate(schema)) {
|
|
660
|
+
return schema;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
return undefined;
|
|
659
664
|
}
|
|
660
665
|
clear() {
|
|
661
666
|
this.schemas.clear();
|
|
@@ -141,9 +141,12 @@ const expectUnion = (value) => {
|
|
|
141
141
|
return undefined;
|
|
142
142
|
}
|
|
143
143
|
const asObject = expectObject(value);
|
|
144
|
-
const setKeys =
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
const setKeys = [];
|
|
145
|
+
for (const k in asObject) {
|
|
146
|
+
if (asObject[k] != null) {
|
|
147
|
+
setKeys.push(k);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
147
150
|
if (setKeys.length === 0) {
|
|
148
151
|
throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
|
|
149
152
|
}
|
package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js
CHANGED
|
@@ -4,7 +4,8 @@ exports.DefaultIdentityProviderConfig = void 0;
|
|
|
4
4
|
class DefaultIdentityProviderConfig {
|
|
5
5
|
authSchemes = new Map();
|
|
6
6
|
constructor(config) {
|
|
7
|
-
for (const
|
|
7
|
+
for (const key in config) {
|
|
8
|
+
const value = config[key];
|
|
8
9
|
if (value !== undefined) {
|
|
9
10
|
this.authSchemes.set(key, value);
|
|
10
11
|
}
|
|
@@ -62,7 +62,7 @@ export class CborShapeSerializer extends SerdeContext {
|
|
|
62
62
|
const newObject = {};
|
|
63
63
|
if (ns.isMapSchema()) {
|
|
64
64
|
const sparse = !!ns.getMergedTraits().sparse;
|
|
65
|
-
for (const key
|
|
65
|
+
for (const key in sourceObject) {
|
|
66
66
|
const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
67
67
|
if (value != null || sparse) {
|
|
68
68
|
newObject[key] = value;
|
|
@@ -82,15 +82,15 @@ export class CborShapeSerializer extends SerdeContext {
|
|
|
82
82
|
newObject[k] = v;
|
|
83
83
|
}
|
|
84
84
|
else if (typeof sourceObject.__type === "string") {
|
|
85
|
-
for (const
|
|
85
|
+
for (const k in sourceObject) {
|
|
86
86
|
if (!(k in newObject)) {
|
|
87
|
-
newObject[k] = this.serialize(15,
|
|
87
|
+
newObject[k] = this.serialize(15, sourceObject[k]);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
else if (ns.isDocumentSchema()) {
|
|
93
|
-
for (const key
|
|
93
|
+
for (const key in sourceObject) {
|
|
94
94
|
newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -163,7 +163,7 @@ export class CborShapeDeserializer extends SerdeContext {
|
|
|
163
163
|
const newObject = {};
|
|
164
164
|
if (ns.isMapSchema()) {
|
|
165
165
|
const targetSchema = ns.getValueSchema();
|
|
166
|
-
for (const key
|
|
166
|
+
for (const key in value) {
|
|
167
167
|
const itemValue = this.readValue(targetSchema, value[key]);
|
|
168
168
|
newObject[key] = itemValue;
|
|
169
169
|
}
|
|
@@ -172,7 +172,12 @@ export class CborShapeDeserializer extends SerdeContext {
|
|
|
172
172
|
const isUnion = ns.isUnionSchema();
|
|
173
173
|
let keys;
|
|
174
174
|
if (isUnion) {
|
|
175
|
-
keys = new Set(
|
|
175
|
+
keys = new Set();
|
|
176
|
+
for (const k in value) {
|
|
177
|
+
if (k !== "__type") {
|
|
178
|
+
keys.add(k);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
176
181
|
}
|
|
177
182
|
for (const [key, memberSchema] of ns.structIterator()) {
|
|
178
183
|
if (isUnion) {
|
|
@@ -182,14 +187,21 @@ export class CborShapeDeserializer extends SerdeContext {
|
|
|
182
187
|
newObject[key] = this.readValue(memberSchema, value[key]);
|
|
183
188
|
}
|
|
184
189
|
}
|
|
185
|
-
if (isUnion && keys?.size === 1
|
|
186
|
-
|
|
187
|
-
|
|
190
|
+
if (isUnion && keys?.size === 1) {
|
|
191
|
+
let newObjectEmpty = true;
|
|
192
|
+
for (const _ in newObject) {
|
|
193
|
+
newObjectEmpty = false;
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
if (newObjectEmpty) {
|
|
197
|
+
const k = keys.values().next().value;
|
|
198
|
+
newObject.$unknown = [k, value[k]];
|
|
199
|
+
}
|
|
188
200
|
}
|
|
189
201
|
else if (typeof value.__type === "string") {
|
|
190
|
-
for (const
|
|
202
|
+
for (const k in value) {
|
|
191
203
|
if (!(k in newObject)) {
|
|
192
|
-
newObject[k] =
|
|
204
|
+
newObject[k] = value[k];
|
|
193
205
|
}
|
|
194
206
|
}
|
|
195
207
|
}
|
|
@@ -50,7 +50,13 @@ export const loadSmithyRpcV2CborErrorCode = (output, data) => {
|
|
|
50
50
|
if (data["__type"] !== undefined) {
|
|
51
51
|
return sanitizeErrorCode(data["__type"]);
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
let codeKey;
|
|
54
|
+
for (const key in data) {
|
|
55
|
+
if (key.toLowerCase() === "code") {
|
|
56
|
+
codeKey = key;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
54
60
|
if (codeKey && data[codeKey] !== undefined) {
|
|
55
61
|
return sanitizeErrorCode(data[codeKey]);
|
|
56
62
|
}
|
|
@@ -77,8 +83,8 @@ export const buildHttpRpcRequest = async (context, headers, path, resolvedHostna
|
|
|
77
83
|
contents.hostname = resolvedHostname;
|
|
78
84
|
}
|
|
79
85
|
if (endpoint.headers) {
|
|
80
|
-
for (const
|
|
81
|
-
contents.headers[name] =
|
|
86
|
+
for (const name in endpoint.headers) {
|
|
87
|
+
contents.headers[name] = endpoint.headers[name];
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
90
|
if (body !== undefined) {
|
|
@@ -5,8 +5,8 @@ export const toEndpointV1 = (endpoint) => {
|
|
|
5
5
|
const v1Endpoint = parseUrl(endpoint.url);
|
|
6
6
|
if (endpoint.headers) {
|
|
7
7
|
v1Endpoint.headers = {};
|
|
8
|
-
for (const
|
|
9
|
-
v1Endpoint.headers[name.toLowerCase()] =
|
|
8
|
+
for (const name in endpoint.headers) {
|
|
9
|
+
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
return v1Endpoint;
|
|
@@ -47,9 +47,13 @@ export class EventStreamSerde {
|
|
|
47
47
|
body: event.body,
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
let unionMember = "";
|
|
51
|
+
for (const key in event) {
|
|
52
|
+
if (key !== "__type") {
|
|
53
|
+
unionMember = key;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
53
57
|
const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
|
|
54
58
|
const headers = {
|
|
55
59
|
":event-type": { type: "string", value: eventType },
|
|
@@ -70,9 +74,13 @@ export class EventStreamSerde {
|
|
|
70
74
|
const memberSchemas = unionSchema.getMemberSchemas();
|
|
71
75
|
const initialResponseMarker = Symbol("initialResponseMarker");
|
|
72
76
|
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
let unionMember = "";
|
|
78
|
+
for (const key in event) {
|
|
79
|
+
if (key !== "__type") {
|
|
80
|
+
unionMember = key;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
76
84
|
const body = event[unionMember].body;
|
|
77
85
|
if (unionMember === "initial-response") {
|
|
78
86
|
const dataObject = await this.deserializer.read(responseSchema, body);
|
|
@@ -148,8 +156,8 @@ export class EventStreamSerde {
|
|
|
148
156
|
if (!responseSchema) {
|
|
149
157
|
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
|
150
158
|
}
|
|
151
|
-
for (const
|
|
152
|
-
initialResponseContainer[key] = value;
|
|
159
|
+
for (const key in firstEvent.value) {
|
|
160
|
+
initialResponseContainer[key] = firstEvent.value[key];
|
|
153
161
|
}
|
|
154
162
|
}
|
|
155
163
|
return {
|
|
@@ -41,7 +41,9 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
41
41
|
request.path += path;
|
|
42
42
|
}
|
|
43
43
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
44
|
-
|
|
44
|
+
for (const [key, value] of traitSearchParams) {
|
|
45
|
+
query[key] = value;
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
@@ -91,7 +93,8 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
91
93
|
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
|
92
94
|
}
|
|
93
95
|
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
94
|
-
for (const
|
|
96
|
+
for (const key in inputMemberValue) {
|
|
97
|
+
const val = inputMemberValue[key];
|
|
95
98
|
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
96
99
|
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
97
100
|
headers[amalgam.toLowerCase()] = serializer.flush();
|
|
@@ -136,8 +139,9 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
136
139
|
const serializer = this.serializer;
|
|
137
140
|
const traits = ns.getMergedTraits();
|
|
138
141
|
if (traits.httpQueryParams) {
|
|
139
|
-
for (const
|
|
142
|
+
for (const key in data) {
|
|
140
143
|
if (!(key in query)) {
|
|
144
|
+
const val = data[key];
|
|
141
145
|
const valueSchema = ns.getValueSchema();
|
|
142
146
|
Object.assign(valueSchema.getMergedTraits(), {
|
|
143
147
|
...traits,
|
|
@@ -265,8 +269,9 @@ export class HttpBindingProtocol extends HttpProtocol {
|
|
|
265
269
|
}
|
|
266
270
|
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
267
271
|
dataObject[memberName] = {};
|
|
268
|
-
for (const
|
|
272
|
+
for (const header in response.headers) {
|
|
269
273
|
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
274
|
+
const value = response.headers[header];
|
|
270
275
|
const valueSchema = memberSchema.getValueSchema();
|
|
271
276
|
valueSchema.getMergedTraits().httpHeader = header;
|
|
272
277
|
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
|
@@ -42,8 +42,8 @@ export class HttpProtocol extends SerdeContext {
|
|
|
42
42
|
request.query[k] = v;
|
|
43
43
|
}
|
|
44
44
|
if (endpoint.headers) {
|
|
45
|
-
for (const
|
|
46
|
-
request.headers[name] =
|
|
45
|
+
for (const name in endpoint.headers) {
|
|
46
|
+
request.headers[name] = endpoint.headers[name].join(", ");
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return request;
|
|
@@ -57,8 +57,8 @@ export class HttpProtocol extends SerdeContext {
|
|
|
57
57
|
...endpoint.query,
|
|
58
58
|
};
|
|
59
59
|
if (endpoint.headers) {
|
|
60
|
-
for (const
|
|
61
|
-
request.headers[name] =
|
|
60
|
+
for (const name in endpoint.headers) {
|
|
61
|
+
request.headers[name] = endpoint.headers[name];
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
return request;
|
|
@@ -73,8 +73,10 @@ export class HttpProtocol extends SerdeContext {
|
|
|
73
73
|
if (opTraits.endpoint) {
|
|
74
74
|
let hostPrefix = opTraits.endpoint?.[0];
|
|
75
75
|
if (typeof hostPrefix === "string") {
|
|
76
|
-
const
|
|
77
|
-
|
|
76
|
+
for (const [name, member] of inputNs.structIterator()) {
|
|
77
|
+
if (!member.getMergedTraits().hostLabel) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
78
80
|
const replacement = input[name];
|
|
79
81
|
if (typeof replacement !== "string") {
|
|
80
82
|
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
|
@@ -69,7 +69,12 @@ export class TypeRegistry {
|
|
|
69
69
|
return undefined;
|
|
70
70
|
}
|
|
71
71
|
find(predicate) {
|
|
72
|
-
|
|
72
|
+
for (const schema of this.schemas.values()) {
|
|
73
|
+
if (predicate(schema)) {
|
|
74
|
+
return schema;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
73
78
|
}
|
|
74
79
|
clear() {
|
|
75
80
|
this.schemas.clear();
|
|
@@ -135,9 +135,12 @@ export const expectUnion = (value) => {
|
|
|
135
135
|
return undefined;
|
|
136
136
|
}
|
|
137
137
|
const asObject = expectObject(value);
|
|
138
|
-
const setKeys =
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
const setKeys = [];
|
|
139
|
+
for (const k in asObject) {
|
|
140
|
+
if (asObject[k] != null) {
|
|
141
|
+
setKeys.push(k);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
141
144
|
if (setKeys.length === 0) {
|
|
142
145
|
throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
|
|
143
146
|
}
|
package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export class DefaultIdentityProviderConfig {
|
|
2
2
|
authSchemes = new Map();
|
|
3
3
|
constructor(config) {
|
|
4
|
-
for (const
|
|
4
|
+
for (const key in config) {
|
|
5
|
+
const value = config[key];
|
|
5
6
|
if (value !== undefined) {
|
|
6
7
|
this.authSchemes.set(key, value);
|
|
7
8
|
}
|
|
@@ -62,7 +62,7 @@ export declare class TypeRegistry {
|
|
|
62
62
|
* @param predicate - criterion.
|
|
63
63
|
* @returns a schema in this registry matching the predicate.
|
|
64
64
|
*/
|
|
65
|
-
find(predicate: (schema: ISchema) => boolean):
|
|
65
|
+
find(predicate: (schema: ISchema) => boolean): number | import("@smithy/types").StaticSimpleSchema | import("@smithy/types").StaticListSchema | import("@smithy/types").StaticMapSchema | import("@smithy/types").StaticStructureSchema | import("@smithy/types").StaticUnionSchema | StaticErrorSchema | import("@smithy/types").StaticOperationSchema | "unit" | import("@smithy/types").NormalizedSchema | import("@smithy/types").TraitsSchema | import("@smithy/types").MemberSchema | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* Unloads the current TypeRegistry.
|
|
68
68
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.16",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline core",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
"license": "Apache-2.0",
|
|
86
86
|
"sideEffects": false,
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@smithy/protocol-http": "^5.3.
|
|
89
|
-
"@smithy/types": "^4.14.
|
|
90
|
-
"@smithy/url-parser": "^4.2.
|
|
88
|
+
"@smithy/protocol-http": "^5.3.14",
|
|
89
|
+
"@smithy/types": "^4.14.1",
|
|
90
|
+
"@smithy/url-parser": "^4.2.14",
|
|
91
91
|
"@smithy/util-base64": "^4.3.2",
|
|
92
92
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
93
|
-
"@smithy/util-middleware": "^4.2.
|
|
94
|
-
"@smithy/util-stream": "^4.5.
|
|
93
|
+
"@smithy/util-middleware": "^4.2.14",
|
|
94
|
+
"@smithy/util-stream": "^4.5.24",
|
|
95
95
|
"@smithy/util-utf8": "^4.2.2",
|
|
96
96
|
"@smithy/uuid": "^1.1.2",
|
|
97
97
|
"tslib": "^2.6.2"
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"directory": "packages/core"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@smithy/eventstream-serde-node": "^4.2.
|
|
131
|
+
"@smithy/eventstream-serde-node": "^4.2.14",
|
|
132
132
|
"@types/node": "^18.11.9",
|
|
133
133
|
"concurrently": "7.0.0",
|
|
134
134
|
"downlevel-dts": "0.10.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/credential-provider-imds",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/node-config-provider": "^4.3.
|
|
31
|
-
"@smithy/property-provider": "^4.2.
|
|
32
|
-
"@smithy/types": "^4.14.
|
|
33
|
-
"@smithy/url-parser": "^4.2.
|
|
30
|
+
"@smithy/node-config-provider": "^4.3.14",
|
|
31
|
+
"@smithy/property-provider": "^4.2.14",
|
|
32
|
+
"@smithy/types": "^4.14.1",
|
|
33
|
+
"@smithy/url-parser": "^4.2.14",
|
|
34
34
|
"tslib": "^2.6.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.17",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"module": "./dist-es/index.js",
|
|
28
28
|
"types": "./dist-types/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/protocol-http": "^5.3.
|
|
31
|
-
"@smithy/querystring-builder": "^4.2.
|
|
32
|
-
"@smithy/types": "^4.14.
|
|
30
|
+
"@smithy/protocol-http": "^5.3.14",
|
|
31
|
+
"@smithy/querystring-builder": "^4.2.14",
|
|
32
|
+
"@smithy/types": "^4.14.1",
|
|
33
33
|
"@smithy/util-base64": "^4.3.2",
|
|
34
34
|
"tslib": "^2.6.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@smithy/abort-controller": "^4.2.
|
|
37
|
+
"@smithy/abort-controller": "^4.2.14",
|
|
38
38
|
"concurrently": "7.0.0",
|
|
39
39
|
"downlevel-dts": "0.10.1",
|
|
40
40
|
"premove": "4.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/hash-node",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline hash-node",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"typedoc": "0.23.23"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@smithy/types": "^4.14.
|
|
34
|
+
"@smithy/types": "^4.14.1",
|
|
35
35
|
"@smithy/util-buffer-from": "^4.2.2",
|
|
36
36
|
"@smithy/util-utf8": "^4.2.2",
|
|
37
37
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/invalid-dependency",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline invalid-dependency",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@smithy/types": "^4.14.
|
|
26
|
+
"@smithy/types": "^4.14.1",
|
|
27
27
|
"tslib": "^2.6.2"
|
|
28
28
|
},
|
|
29
29
|
"typesVersions": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-content-length",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-content-length",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@smithy/protocol-http": "^5.3.
|
|
28
|
-
"@smithy/types": "^4.14.
|
|
27
|
+
"@smithy/protocol-http": "^5.3.14",
|
|
28
|
+
"@smithy/types": "^4.14.1",
|
|
29
29
|
"tslib": "^2.6.2"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.31",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-endpoint",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@smithy/core": "^3.23.
|
|
28
|
-
"@smithy/middleware-serde": "^4.2.
|
|
29
|
-
"@smithy/node-config-provider": "^4.3.
|
|
30
|
-
"@smithy/shared-ini-file-loader": "^4.4.
|
|
31
|
-
"@smithy/types": "^4.14.
|
|
32
|
-
"@smithy/url-parser": "^4.2.
|
|
33
|
-
"@smithy/util-middleware": "^4.2.
|
|
27
|
+
"@smithy/core": "^3.23.16",
|
|
28
|
+
"@smithy/middleware-serde": "^4.2.19",
|
|
29
|
+
"@smithy/node-config-provider": "^4.3.14",
|
|
30
|
+
"@smithy/shared-ini-file-loader": "^4.4.9",
|
|
31
|
+
"@smithy/types": "^4.14.1",
|
|
32
|
+
"@smithy/url-parser": "^4.2.14",
|
|
33
|
+
"@smithy/util-middleware": "^4.2.14",
|
|
34
34
|
"tslib": "^2.6.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|