@cdk8s/awscdk-resolver 0.0.635 → 0.0.636
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-es/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.js +182 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/ByteJsonShapeSerializer.js +473 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +29 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +59 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +14 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +30 -0
- package/node_modules/@aws-sdk/core/package.json +2 -1
- 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 +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +34 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +34 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +34 -11
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/event-streams/EventStreamSerde.d.ts +10 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/event-streams/EventStreamSerde.d.ts +10 -2
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/package.json +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.js +0 -135
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts +0 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts +0 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-login",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.67",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from aws login cached tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"test:watch": "yarn g:vitest watch"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/core": "^3.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
48
|
+
"@aws-sdk/core": "^3.976.0",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.34",
|
|
50
50
|
"@aws-sdk/types": "^3.974.2",
|
|
51
51
|
"@smithy/core": "^3.29.4",
|
|
52
52
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.71",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/credential-provider-env": "^3.972.
|
|
49
|
-
"@aws-sdk/credential-provider-http": "^3.972.
|
|
50
|
-
"@aws-sdk/credential-provider-ini": "^3.973.
|
|
51
|
-
"@aws-sdk/credential-provider-process": "^3.972.
|
|
52
|
-
"@aws-sdk/credential-provider-sso": "^3.973.
|
|
53
|
-
"@aws-sdk/credential-provider-web-identity": "^3.972.
|
|
48
|
+
"@aws-sdk/credential-provider-env": "^3.972.60",
|
|
49
|
+
"@aws-sdk/credential-provider-http": "^3.972.62",
|
|
50
|
+
"@aws-sdk/credential-provider-ini": "^3.973.5",
|
|
51
|
+
"@aws-sdk/credential-provider-process": "^3.972.60",
|
|
52
|
+
"@aws-sdk/credential-provider-sso": "^3.973.4",
|
|
53
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.66",
|
|
54
54
|
"@aws-sdk/types": "^3.974.2",
|
|
55
55
|
"@smithy/core": "^3.29.4",
|
|
56
56
|
"@smithy/credential-provider-imds": "^4.4.9",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.60",
|
|
4
4
|
"description": "AWS credential provider that sources credential_process from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test:watch": "yarn g:vitest watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@aws-sdk/core": "^3.
|
|
46
|
+
"@aws-sdk/core": "^3.976.0",
|
|
47
47
|
"@aws-sdk/types": "^3.974.2",
|
|
48
48
|
"@smithy/core": "^3.29.4",
|
|
49
49
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-sso",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.4",
|
|
4
4
|
"description": "AWS credential provider that exchanges a resolved SSO login token file for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/core": "^3.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
50
|
-
"@aws-sdk/token-providers": "3.
|
|
48
|
+
"@aws-sdk/core": "^3.976.0",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.34",
|
|
50
|
+
"@aws-sdk/token-providers": "3.1092.0",
|
|
51
51
|
"@aws-sdk/types": "^3.974.2",
|
|
52
52
|
"@smithy/core": "^3.29.4",
|
|
53
53
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.66",
|
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"test:watch": "yarn g:vitest watch"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aws-sdk/core": "^3.
|
|
54
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
53
|
+
"@aws-sdk/core": "^3.976.0",
|
|
54
|
+
"@aws-sdk/nested-clients": "^3.997.34",
|
|
55
55
|
"@aws-sdk/types": "^3.974.2",
|
|
56
56
|
"@smithy/core": "^3.29.4",
|
|
57
57
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/nested-clients",
|
|
3
|
-
"version": "3.997.
|
|
3
|
+
"version": "3.997.34",
|
|
4
4
|
"description": "Nested clients for AWS SDK packages.",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"test:watch": "yarn g:vitest watch"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@aws-sdk/core": "^3.
|
|
103
|
+
"@aws-sdk/core": "^3.976.0",
|
|
104
104
|
"@aws-sdk/signature-v4-multi-region": "^3.996.41",
|
|
105
105
|
"@aws-sdk/types": "^3.974.2",
|
|
106
106
|
"@smithy/core": "^3.29.4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1092.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@aws-sdk/core": "^3.
|
|
52
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
51
|
+
"@aws-sdk/core": "^3.976.0",
|
|
52
|
+
"@aws-sdk/nested-clients": "^3.997.34",
|
|
53
53
|
"@aws-sdk/types": "^3.974.2",
|
|
54
54
|
"@smithy/core": "^3.29.4",
|
|
55
55
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { Crc32 } = require("@smithy/core/checksum");
|
|
2
2
|
const { toHex, fromHex, toUtf8, fromUtf8 } = require("@smithy/core/serde");
|
|
3
|
+
const { TypeRegistry } = require("@smithy/core/schema");
|
|
3
4
|
|
|
4
5
|
class Int64 {
|
|
5
6
|
bytes;
|
|
@@ -591,12 +592,14 @@ class EventStreamSerde {
|
|
|
591
592
|
deserializer;
|
|
592
593
|
serdeContext;
|
|
593
594
|
defaultContentType;
|
|
594
|
-
|
|
595
|
+
compositeErrorRegistry;
|
|
596
|
+
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry, }) {
|
|
595
597
|
this.marshaller = marshaller;
|
|
596
598
|
this.serializer = serializer;
|
|
597
599
|
this.deserializer = deserializer;
|
|
598
600
|
this.serdeContext = serdeContext;
|
|
599
601
|
this.defaultContentType = defaultContentType;
|
|
602
|
+
this.compositeErrorRegistry = compositeErrorRegistry;
|
|
600
603
|
}
|
|
601
604
|
async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {
|
|
602
605
|
const marshaller = this.marshaller;
|
|
@@ -712,16 +715,9 @@ class EventStreamSerde {
|
|
|
712
715
|
}
|
|
713
716
|
}
|
|
714
717
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
if (body.byteLength === 0) {
|
|
721
|
-
return {
|
|
722
|
-
[unionMember]: {},
|
|
723
|
-
};
|
|
724
|
-
}
|
|
718
|
+
return {
|
|
719
|
+
[unionMember]: await this.readEventMember(eventStreamSchema, body, hasBindings, out),
|
|
720
|
+
};
|
|
725
721
|
}
|
|
726
722
|
return {
|
|
727
723
|
[unionMember]: await this.deserializer.read(eventStreamSchema, body),
|
|
@@ -761,6 +757,33 @@ class EventStreamSerde {
|
|
|
761
757
|
},
|
|
762
758
|
};
|
|
763
759
|
}
|
|
760
|
+
async readEventMember(eventStreamSchema, body, hasBindings, out) {
|
|
761
|
+
let ErrCtor;
|
|
762
|
+
const staticStructuralSchema = eventStreamSchema.getSchema();
|
|
763
|
+
if (Array.isArray(staticStructuralSchema) && staticStructuralSchema[0] === -3) {
|
|
764
|
+
const namespace = staticStructuralSchema[1];
|
|
765
|
+
const nsRegistry = TypeRegistry.for(namespace);
|
|
766
|
+
this.compositeErrorRegistry?.copyFrom(nsRegistry);
|
|
767
|
+
ErrCtor = (this.compositeErrorRegistry ?? nsRegistry)?.getErrorCtor(staticStructuralSchema);
|
|
768
|
+
}
|
|
769
|
+
const dataObject = hasBindings
|
|
770
|
+
? out
|
|
771
|
+
: body.byteLength === 0
|
|
772
|
+
? {}
|
|
773
|
+
: await this.deserializer.read(eventStreamSchema, body);
|
|
774
|
+
if (ErrCtor) {
|
|
775
|
+
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
776
|
+
const metadata = {};
|
|
777
|
+
const $fault = eventStreamSchema.getMergedTraits().error;
|
|
778
|
+
if ($fault) {
|
|
779
|
+
metadata.$fault = $fault;
|
|
780
|
+
}
|
|
781
|
+
return Object.assign(new ErrCtor({}), metadata, {
|
|
782
|
+
message,
|
|
783
|
+
}, dataObject);
|
|
784
|
+
}
|
|
785
|
+
return dataObject;
|
|
786
|
+
}
|
|
764
787
|
writeEventBody(unionMember, unionSchema, event) {
|
|
765
788
|
const serializer = this.serializer;
|
|
766
789
|
let eventType = unionMember;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const { Crc32 } = require("@smithy/core/checksum");
|
|
2
2
|
const { toHex, fromHex, toUtf8, fromUtf8 } = require("@smithy/core/serde");
|
|
3
3
|
const { Readable } = require("node:stream");
|
|
4
|
+
const { TypeRegistry } = require("@smithy/core/schema");
|
|
4
5
|
|
|
5
6
|
class Int64 {
|
|
6
7
|
bytes;
|
|
@@ -616,12 +617,14 @@ class EventStreamSerde {
|
|
|
616
617
|
deserializer;
|
|
617
618
|
serdeContext;
|
|
618
619
|
defaultContentType;
|
|
619
|
-
|
|
620
|
+
compositeErrorRegistry;
|
|
621
|
+
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry, }) {
|
|
620
622
|
this.marshaller = marshaller;
|
|
621
623
|
this.serializer = serializer;
|
|
622
624
|
this.deserializer = deserializer;
|
|
623
625
|
this.serdeContext = serdeContext;
|
|
624
626
|
this.defaultContentType = defaultContentType;
|
|
627
|
+
this.compositeErrorRegistry = compositeErrorRegistry;
|
|
625
628
|
}
|
|
626
629
|
async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {
|
|
627
630
|
const marshaller = this.marshaller;
|
|
@@ -737,16 +740,9 @@ class EventStreamSerde {
|
|
|
737
740
|
}
|
|
738
741
|
}
|
|
739
742
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
};
|
|
744
|
-
}
|
|
745
|
-
if (body.byteLength === 0) {
|
|
746
|
-
return {
|
|
747
|
-
[unionMember]: {},
|
|
748
|
-
};
|
|
749
|
-
}
|
|
743
|
+
return {
|
|
744
|
+
[unionMember]: await this.readEventMember(eventStreamSchema, body, hasBindings, out),
|
|
745
|
+
};
|
|
750
746
|
}
|
|
751
747
|
return {
|
|
752
748
|
[unionMember]: await this.deserializer.read(eventStreamSchema, body),
|
|
@@ -786,6 +782,33 @@ class EventStreamSerde {
|
|
|
786
782
|
},
|
|
787
783
|
};
|
|
788
784
|
}
|
|
785
|
+
async readEventMember(eventStreamSchema, body, hasBindings, out) {
|
|
786
|
+
let ErrCtor;
|
|
787
|
+
const staticStructuralSchema = eventStreamSchema.getSchema();
|
|
788
|
+
if (Array.isArray(staticStructuralSchema) && staticStructuralSchema[0] === -3) {
|
|
789
|
+
const namespace = staticStructuralSchema[1];
|
|
790
|
+
const nsRegistry = TypeRegistry.for(namespace);
|
|
791
|
+
this.compositeErrorRegistry?.copyFrom(nsRegistry);
|
|
792
|
+
ErrCtor = (this.compositeErrorRegistry ?? nsRegistry)?.getErrorCtor(staticStructuralSchema);
|
|
793
|
+
}
|
|
794
|
+
const dataObject = hasBindings
|
|
795
|
+
? out
|
|
796
|
+
: body.byteLength === 0
|
|
797
|
+
? {}
|
|
798
|
+
: await this.deserializer.read(eventStreamSchema, body);
|
|
799
|
+
if (ErrCtor) {
|
|
800
|
+
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
801
|
+
const metadata = {};
|
|
802
|
+
const $fault = eventStreamSchema.getMergedTraits().error;
|
|
803
|
+
if ($fault) {
|
|
804
|
+
metadata.$fault = $fault;
|
|
805
|
+
}
|
|
806
|
+
return Object.assign(new ErrCtor({}), metadata, {
|
|
807
|
+
message,
|
|
808
|
+
}, dataObject);
|
|
809
|
+
}
|
|
810
|
+
return dataObject;
|
|
811
|
+
}
|
|
789
812
|
writeEventBody(unionMember, unionSchema, event) {
|
|
790
813
|
const serializer = this.serializer;
|
|
791
814
|
let eventType = unionMember;
|
|
@@ -155,6 +155,7 @@ class HttpProtocol extends SerdeContext {
|
|
|
155
155
|
deserializer: this.deserializer,
|
|
156
156
|
serdeContext: this.serdeContext,
|
|
157
157
|
defaultContentType: this.getDefaultContentType(),
|
|
158
|
+
compositeErrorRegistry: this.compositeErrorRegistry,
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
resolveEventStreamMarshaller(importedProvider) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
1
2
|
import { fromUtf8, toUtf8 } from "@smithy/core/serde";
|
|
2
3
|
export class EventStreamSerde {
|
|
3
4
|
marshaller;
|
|
@@ -5,12 +6,14 @@ export class EventStreamSerde {
|
|
|
5
6
|
deserializer;
|
|
6
7
|
serdeContext;
|
|
7
8
|
defaultContentType;
|
|
8
|
-
|
|
9
|
+
compositeErrorRegistry;
|
|
10
|
+
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry, }) {
|
|
9
11
|
this.marshaller = marshaller;
|
|
10
12
|
this.serializer = serializer;
|
|
11
13
|
this.deserializer = deserializer;
|
|
12
14
|
this.serdeContext = serdeContext;
|
|
13
15
|
this.defaultContentType = defaultContentType;
|
|
16
|
+
this.compositeErrorRegistry = compositeErrorRegistry;
|
|
14
17
|
}
|
|
15
18
|
async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {
|
|
16
19
|
const marshaller = this.marshaller;
|
|
@@ -126,16 +129,9 @@ export class EventStreamSerde {
|
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
if (body.byteLength === 0) {
|
|
135
|
-
return {
|
|
136
|
-
[unionMember]: {},
|
|
137
|
-
};
|
|
138
|
-
}
|
|
132
|
+
return {
|
|
133
|
+
[unionMember]: await this.readEventMember(eventStreamSchema, body, hasBindings, out),
|
|
134
|
+
};
|
|
139
135
|
}
|
|
140
136
|
return {
|
|
141
137
|
[unionMember]: await this.deserializer.read(eventStreamSchema, body),
|
|
@@ -175,6 +171,33 @@ export class EventStreamSerde {
|
|
|
175
171
|
},
|
|
176
172
|
};
|
|
177
173
|
}
|
|
174
|
+
async readEventMember(eventStreamSchema, body, hasBindings, out) {
|
|
175
|
+
let ErrCtor;
|
|
176
|
+
const staticStructuralSchema = eventStreamSchema.getSchema();
|
|
177
|
+
if (Array.isArray(staticStructuralSchema) && staticStructuralSchema[0] === -3) {
|
|
178
|
+
const namespace = staticStructuralSchema[1];
|
|
179
|
+
const nsRegistry = TypeRegistry.for(namespace);
|
|
180
|
+
this.compositeErrorRegistry?.copyFrom(nsRegistry);
|
|
181
|
+
ErrCtor = (this.compositeErrorRegistry ?? nsRegistry)?.getErrorCtor(staticStructuralSchema);
|
|
182
|
+
}
|
|
183
|
+
const dataObject = hasBindings
|
|
184
|
+
? out
|
|
185
|
+
: body.byteLength === 0
|
|
186
|
+
? {}
|
|
187
|
+
: await this.deserializer.read(eventStreamSchema, body);
|
|
188
|
+
if (ErrCtor) {
|
|
189
|
+
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
190
|
+
const metadata = {};
|
|
191
|
+
const $fault = eventStreamSchema.getMergedTraits().error;
|
|
192
|
+
if ($fault) {
|
|
193
|
+
metadata.$fault = $fault;
|
|
194
|
+
}
|
|
195
|
+
return Object.assign(new ErrCtor({}), metadata, {
|
|
196
|
+
message,
|
|
197
|
+
}, dataObject);
|
|
198
|
+
}
|
|
199
|
+
return dataObject;
|
|
200
|
+
}
|
|
178
201
|
writeEventBody(unionMember, unionSchema, event) {
|
|
179
202
|
const serializer = this.serializer;
|
|
180
203
|
let eventType = unionMember;
|
|
@@ -123,6 +123,7 @@ export class HttpProtocol extends SerdeContext {
|
|
|
123
123
|
deserializer: this.deserializer,
|
|
124
124
|
serdeContext: this.serdeContext,
|
|
125
125
|
defaultContentType: this.getDefaultContentType(),
|
|
126
|
+
compositeErrorRegistry: this.compositeErrorRegistry,
|
|
126
127
|
});
|
|
127
128
|
}
|
|
128
129
|
resolveEventStreamMarshaller(importedProvider) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
2
2
|
import type { EventStreamMarshaller, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
3
|
/**
|
|
4
4
|
* Separated module for async mixin of EventStream serde capability.
|
|
@@ -12,15 +12,17 @@ export declare class EventStreamSerde {
|
|
|
12
12
|
private readonly deserializer;
|
|
13
13
|
private readonly serdeContext?;
|
|
14
14
|
private readonly defaultContentType;
|
|
15
|
+
private readonly compositeErrorRegistry?;
|
|
15
16
|
/**
|
|
16
17
|
* Properties are injected by the HttpProtocol.
|
|
17
18
|
*/
|
|
18
|
-
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }: {
|
|
19
|
+
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry, }: {
|
|
19
20
|
marshaller: EventStreamMarshaller;
|
|
20
21
|
serializer: ShapeSerializer<string | Uint8Array>;
|
|
21
22
|
deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
22
23
|
serdeContext?: SerdeFunctions;
|
|
23
24
|
defaultContentType: string;
|
|
25
|
+
compositeErrorRegistry?: TypeRegistry;
|
|
24
26
|
});
|
|
25
27
|
/**
|
|
26
28
|
* @param eventStream - the iterable provided by the caller.
|
|
@@ -49,6 +51,12 @@ export declare class EventStreamSerde {
|
|
|
49
51
|
[key: string]: any;
|
|
50
52
|
$unknown?: unknown;
|
|
51
53
|
}>>;
|
|
54
|
+
/**
|
|
55
|
+
* Reads and returns an event member. For error schemas, resolves the registered
|
|
56
|
+
* error constructor from the TypeRegistry and wraps the deserialized value
|
|
57
|
+
* so that it can be thrown as a typed exception instance by the caller.
|
|
58
|
+
*/
|
|
59
|
+
private readEventMember;
|
|
52
60
|
/**
|
|
53
61
|
* @param unionMember - member name within the structure that contains an event stream union.
|
|
54
62
|
* @param unionSchema - schema of the union.
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/event-streams/EventStreamSerde.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
1
|
+
import { NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
2
2
|
import { EventStreamMarshaller, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
3
|
/**
|
|
4
4
|
* Separated module for async mixin of EventStream serde capability.
|
|
@@ -12,15 +12,17 @@ export declare class EventStreamSerde {
|
|
|
12
12
|
private readonly deserializer;
|
|
13
13
|
private readonly serdeContext?;
|
|
14
14
|
private readonly defaultContentType;
|
|
15
|
+
private readonly compositeErrorRegistry?;
|
|
15
16
|
/**
|
|
16
17
|
* Properties are injected by the HttpProtocol.
|
|
17
18
|
*/
|
|
18
|
-
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }: {
|
|
19
|
+
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry, }: {
|
|
19
20
|
marshaller: EventStreamMarshaller;
|
|
20
21
|
serializer: ShapeSerializer<string | Uint8Array>;
|
|
21
22
|
deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
22
23
|
serdeContext?: SerdeFunctions;
|
|
23
24
|
defaultContentType: string;
|
|
25
|
+
compositeErrorRegistry?: TypeRegistry;
|
|
24
26
|
});
|
|
25
27
|
/**
|
|
26
28
|
* @param eventStream - the iterable provided by the caller.
|
|
@@ -49,6 +51,12 @@ export declare class EventStreamSerde {
|
|
|
49
51
|
[key: string]: any;
|
|
50
52
|
$unknown?: unknown;
|
|
51
53
|
}>>;
|
|
54
|
+
/**
|
|
55
|
+
* Reads and returns an event member. For error schemas, resolves the registered
|
|
56
|
+
* error constructor from the TypeRegistry and wraps the deserialized value
|
|
57
|
+
* so that it can be thrown as a typed exception instance by the caller.
|
|
58
|
+
*/
|
|
59
|
+
private readEventMember;
|
|
52
60
|
/**
|
|
53
61
|
* @param unionMember - member name within the structure that contains an event stream union.
|
|
54
62
|
* @param unionSchema - schema of the union.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/credential-provider-imds",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.12",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"test:watch": "yarn g:vitest watch"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@smithy/core": "^3.29.
|
|
48
|
+
"@smithy/core": "^3.29.7",
|
|
49
49
|
"@smithy/types": "^4.16.1",
|
|
50
50
|
"tslib": "^2.6.2"
|
|
51
51
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.9",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/fetch-http-handler",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.mts"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@smithy/core": "^3.29.
|
|
47
|
+
"@smithy/core": "^3.29.7",
|
|
48
48
|
"@smithy/types": "^4.16.1",
|
|
49
49
|
"tslib": "^2.6.2"
|
|
50
50
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.9",
|
|
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",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test:watch": "yarn g:vitest watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@smithy/core": "^3.29.
|
|
46
|
+
"@smithy/core": "^3.29.7",
|
|
47
47
|
"@smithy/types": "^4.16.1",
|
|
48
48
|
"tslib": "^2.6.2"
|
|
49
49
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.8",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/signature-v4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test:watch": "yarn g:vitest watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@smithy/core": "^3.29.
|
|
45
|
+
"@smithy/core": "^3.29.7",
|
|
46
46
|
"@smithy/types": "^4.16.1",
|
|
47
47
|
"tslib": "^2.6.2"
|
|
48
48
|
},
|
package/package.json
CHANGED
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"constructs": "^10.3.0"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@aws-sdk/client-cloudformation": "^3.
|
|
81
|
+
"@aws-sdk/client-cloudformation": "^3.1092.0"
|
|
82
82
|
},
|
|
83
83
|
"bundledDependencies": [
|
|
84
84
|
"@aws-sdk/client-cloudformation"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"publishConfig": {
|
|
96
96
|
"access": "public"
|
|
97
97
|
},
|
|
98
|
-
"version": "0.0.
|
|
98
|
+
"version": "0.0.636",
|
|
99
99
|
"jest": {
|
|
100
100
|
"coverageProvider": "v8",
|
|
101
101
|
"testMatch": [
|