@servicevic-oss/cdk-cleanup-certificate-validation-records 1.3.56 → 1.3.57
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 +4 -4
- package/lib/index.js +2 -2
- package/node_modules/@aws-sdk/client-acm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-acm/package.json +3 -3
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +3 -3
- 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/cbor/index.js +15 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -203
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +113 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +95 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/SinglePassCborShapeDeserializer.js +609 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/SinglePassCborShapeSerializer.js +611 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/index.js +3 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +3 -25
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeDeserializer.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/SinglePassCborShapeDeserializer.d.ts +19 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/SinglePassCborShapeSerializer.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/index.d.ts +3 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +3 -25
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v1/CborShapeDeserializer.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/SinglePassCborShapeDeserializer.d.ts +19 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/SinglePassCborShapeSerializer.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/index.d.ts +3 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +12 -0
- package/node_modules/@smithy/core/package.json +2 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/package.json +3 -3
package/.jsii
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
9
|
"bundled": {
|
|
10
|
-
"@aws-sdk/client-acm": "^3.
|
|
11
|
-
"@aws-sdk/client-route-53": "^3.
|
|
10
|
+
"@aws-sdk/client-acm": "^3.1096.0",
|
|
11
|
+
"@aws-sdk/client-route-53": "^3.1096.0",
|
|
12
12
|
"@types/aws-lambda": "^8.10.162",
|
|
13
13
|
"async-await-retry": "^2.1.0"
|
|
14
14
|
},
|
|
@@ -8898,6 +8898,6 @@
|
|
|
8898
8898
|
"symbolId": "src/index:CertificateWithCleanup"
|
|
8899
8899
|
}
|
|
8900
8900
|
},
|
|
8901
|
-
"version": "1.3.
|
|
8902
|
-
"fingerprint": "
|
|
8901
|
+
"version": "1.3.57",
|
|
8902
|
+
"fingerprint": "wJIfmlAFi4hZIJuDI/O1JxiFEVdmPlzvlDWkGGUbeNk="
|
|
8903
8903
|
}
|
package/lib/index.js
CHANGED
|
@@ -43,7 +43,7 @@ const constructs_1 = require("constructs");
|
|
|
43
43
|
* leave behind when deleting a DNS validated certificate
|
|
44
44
|
*/
|
|
45
45
|
class CertificateValidationRecordCleanup extends constructs_1.Construct {
|
|
46
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@servicevic-oss/cdk-cleanup-certificate-validation-records.CertificateValidationRecordCleanup", version: "1.3.
|
|
46
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@servicevic-oss/cdk-cleanup-certificate-validation-records.CertificateValidationRecordCleanup", version: "1.3.57" };
|
|
47
47
|
static HANDLER_UID = 'CertRecordsCleanupHandler-2B663BAB-7981';
|
|
48
48
|
static PROVIDER_UID = 'CertRecordsCleanupProvider-57EBF059-2E26';
|
|
49
49
|
static LOG_GROUP_UID = 'CertRecordsCleanupLogGroup-57ABF051-1E25';
|
|
@@ -109,7 +109,7 @@ exports.CertificateValidationRecordCleanup = CertificateValidationRecordCleanup;
|
|
|
109
109
|
* A wrapper class for a vanilla `Certificate` object with automatic cleanup attached
|
|
110
110
|
*/
|
|
111
111
|
class CertificateWithCleanup extends cdk.aws_certificatemanager.Certificate {
|
|
112
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@servicevic-oss/cdk-cleanup-certificate-validation-records.CertificateWithCleanup", version: "1.3.
|
|
112
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@servicevic-oss/cdk-cleanup-certificate-validation-records.CertificateWithCleanup", version: "1.3.57" };
|
|
113
113
|
constructor(scope, id, props) {
|
|
114
114
|
super(scope, id, props);
|
|
115
115
|
if (props.validation && props.validation.props.hostedZone && props.validation?.method == cdk.aws_certificatemanager.ValidationMethod.DNS) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-acm",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1096.0",
|
|
4
4
|
"description": "AWS SDK for JavaScript Acm Client for Node.js, Browser and React Native",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-acm",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@aws-sdk/core": "^3.977.
|
|
52
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
51
|
+
"@aws-sdk/core": "^3.977.1",
|
|
52
|
+
"@aws-sdk/credential-provider-node": "^3.972.73",
|
|
53
53
|
"@aws-sdk/types": "^3.974.2",
|
|
54
54
|
"@smithy/core": "^3.29.8",
|
|
55
55
|
"@smithy/fetch-http-handler": "^5.6.10",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-route-53",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1096.0",
|
|
4
4
|
"description": "AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@aws-sdk/core": "^3.977.
|
|
56
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
55
|
+
"@aws-sdk/core": "^3.977.1",
|
|
56
|
+
"@aws-sdk/credential-provider-node": "^3.972.73",
|
|
57
57
|
"@aws-sdk/middleware-sdk-route53": "^3.972.23",
|
|
58
58
|
"@aws-sdk/types": "^3.974.2",
|
|
59
59
|
"@smithy/core": "^3.29.8",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-env",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.62",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from known environment variables",
|
|
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.977.
|
|
46
|
+
"@aws-sdk/core": "^3.977.1",
|
|
47
47
|
"@aws-sdk/types": "^3.974.2",
|
|
48
48
|
"@smithy/core": "^3.29.8",
|
|
49
49
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-http",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.64",
|
|
4
4
|
"description": "AWS credential provider for containers and HTTP sources",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@aws-sdk/core": "^3.977.
|
|
56
|
+
"@aws-sdk/core": "^3.977.1",
|
|
57
57
|
"@aws-sdk/types": "^3.974.2",
|
|
58
58
|
"@smithy/core": "^3.29.8",
|
|
59
59
|
"@smithy/fetch-http-handler": "^5.6.10",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.7",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/core": "^3.977.
|
|
49
|
-
"@aws-sdk/credential-provider-env": "^3.972.
|
|
50
|
-
"@aws-sdk/credential-provider-http": "^3.972.
|
|
51
|
-
"@aws-sdk/credential-provider-login": "^3.972.
|
|
52
|
-
"@aws-sdk/credential-provider-process": "^3.972.
|
|
53
|
-
"@aws-sdk/credential-provider-sso": "^3.973.
|
|
54
|
-
"@aws-sdk/credential-provider-web-identity": "^3.972.
|
|
55
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
48
|
+
"@aws-sdk/core": "^3.977.1",
|
|
49
|
+
"@aws-sdk/credential-provider-env": "^3.972.62",
|
|
50
|
+
"@aws-sdk/credential-provider-http": "^3.972.64",
|
|
51
|
+
"@aws-sdk/credential-provider-login": "^3.972.69",
|
|
52
|
+
"@aws-sdk/credential-provider-process": "^3.972.62",
|
|
53
|
+
"@aws-sdk/credential-provider-sso": "^3.973.6",
|
|
54
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.68",
|
|
55
|
+
"@aws-sdk/nested-clients": "^3.997.36",
|
|
56
56
|
"@aws-sdk/types": "^3.974.2",
|
|
57
57
|
"@smithy/core": "^3.29.8",
|
|
58
58
|
"@smithy/credential-provider-imds": "^4.4.13",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-login",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.69",
|
|
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.977.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
48
|
+
"@aws-sdk/core": "^3.977.1",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.36",
|
|
50
50
|
"@aws-sdk/types": "^3.974.2",
|
|
51
51
|
"@smithy/core": "^3.29.8",
|
|
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.73",
|
|
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.62",
|
|
49
|
+
"@aws-sdk/credential-provider-http": "^3.972.64",
|
|
50
|
+
"@aws-sdk/credential-provider-ini": "^3.973.7",
|
|
51
|
+
"@aws-sdk/credential-provider-process": "^3.972.62",
|
|
52
|
+
"@aws-sdk/credential-provider-sso": "^3.973.6",
|
|
53
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.68",
|
|
54
54
|
"@aws-sdk/types": "^3.974.2",
|
|
55
55
|
"@smithy/core": "^3.29.8",
|
|
56
56
|
"@smithy/credential-provider-imds": "^4.4.13",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-process",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.62",
|
|
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.977.
|
|
46
|
+
"@aws-sdk/core": "^3.977.1",
|
|
47
47
|
"@aws-sdk/types": "^3.974.2",
|
|
48
48
|
"@smithy/core": "^3.29.8",
|
|
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.6",
|
|
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.977.
|
|
49
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
50
|
-
"@aws-sdk/token-providers": "3.
|
|
48
|
+
"@aws-sdk/core": "^3.977.1",
|
|
49
|
+
"@aws-sdk/nested-clients": "^3.997.36",
|
|
50
|
+
"@aws-sdk/token-providers": "3.1096.0",
|
|
51
51
|
"@aws-sdk/types": "^3.974.2",
|
|
52
52
|
"@smithy/core": "^3.29.8",
|
|
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.68",
|
|
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.977.
|
|
54
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
53
|
+
"@aws-sdk/core": "^3.977.1",
|
|
54
|
+
"@aws-sdk/nested-clients": "^3.997.36",
|
|
55
55
|
"@aws-sdk/types": "^3.974.2",
|
|
56
56
|
"@smithy/core": "^3.29.8",
|
|
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.36",
|
|
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.977.
|
|
103
|
+
"@aws-sdk/core": "^3.977.1",
|
|
104
104
|
"@aws-sdk/signature-v4-multi-region": "^3.996.42",
|
|
105
105
|
"@aws-sdk/types": "^3.974.2",
|
|
106
106
|
"@smithy/core": "^3.29.8",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1096.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.977.
|
|
52
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
51
|
+
"@aws-sdk/core": "^3.977.1",
|
|
52
|
+
"@aws-sdk/nested-clients": "^3.997.36",
|
|
53
53
|
"@aws-sdk/types": "^3.974.2",
|
|
54
54
|
"@smithy/core": "^3.29.8",
|
|
55
55
|
"@smithy/types": "^4.16.1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { nv, NumericValue, calculateBodyLength,
|
|
1
|
+
const { nv, NumericValue, calculateBodyLength, generateIdempotencyToken, fromBase64, _parseEpochTimestamp } = require("@smithy/core/serde");
|
|
2
2
|
const { HttpRequest, collectBody, SerdeContext, RpcProtocol } = require("@smithy/core/protocols");
|
|
3
3
|
const { NormalizedSchema, deref, TypeRegistry } = require("@smithy/core/schema");
|
|
4
4
|
const { getSmithyContext } = require("@smithy/core/transport");
|
|
@@ -933,18 +933,6 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
933
933
|
return new HttpRequest(contents);
|
|
934
934
|
};
|
|
935
935
|
|
|
936
|
-
class CborCodec extends SerdeContext {
|
|
937
|
-
createSerializer() {
|
|
938
|
-
const serializer = new CborShapeSerializer();
|
|
939
|
-
serializer.setSerdeContext(this.serdeContext);
|
|
940
|
-
return serializer;
|
|
941
|
-
}
|
|
942
|
-
createDeserializer() {
|
|
943
|
-
const deserializer = new CborShapeDeserializer();
|
|
944
|
-
deserializer.setSerdeContext(this.serdeContext);
|
|
945
|
-
return deserializer;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
936
|
class CborShapeSerializer extends SerdeContext {
|
|
949
937
|
value;
|
|
950
938
|
write(schema, value) {
|
|
@@ -1035,6 +1023,7 @@ class CborShapeSerializer extends SerdeContext {
|
|
|
1035
1023
|
return buffer;
|
|
1036
1024
|
}
|
|
1037
1025
|
}
|
|
1026
|
+
|
|
1038
1027
|
class CborShapeDeserializer extends SerdeContext {
|
|
1039
1028
|
read(schema, bytes) {
|
|
1040
1029
|
const data = cbor.deserialize(bytes);
|
|
@@ -1145,6 +1134,19 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
1145
1134
|
}
|
|
1146
1135
|
}
|
|
1147
1136
|
|
|
1137
|
+
class CborCodec extends SerdeContext {
|
|
1138
|
+
createSerializer() {
|
|
1139
|
+
const serializer = new CborShapeSerializer();
|
|
1140
|
+
serializer.setSerdeContext(this.serdeContext);
|
|
1141
|
+
return serializer;
|
|
1142
|
+
}
|
|
1143
|
+
createDeserializer() {
|
|
1144
|
+
const deserializer = new CborShapeDeserializer();
|
|
1145
|
+
deserializer.setSerdeContext(this.serdeContext);
|
|
1146
|
+
return deserializer;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1148
1150
|
class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
1149
1151
|
codec = new CborCodec();
|
|
1150
1152
|
serializer = this.codec.createSerializer();
|
|
@@ -529,6 +529,9 @@ class NormalizedSchema {
|
|
|
529
529
|
}
|
|
530
530
|
struct[anno.it] = it;
|
|
531
531
|
}
|
|
532
|
+
structIteratorCbor() {
|
|
533
|
+
throw new Error("@smithy/core/schema - structIteratorCbor not loaded.");
|
|
534
|
+
}
|
|
532
535
|
}
|
|
533
536
|
function member(memberSchema, memberName) {
|
|
534
537
|
if (memberSchema instanceof NormalizedSchema) {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { SerdeContext } from "@smithy/core/protocols";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { cbor } from "./cbor";
|
|
5
|
-
import { dateToTag } from "./parseCborBody";
|
|
2
|
+
import { CborShapeSerializer } from "./codec-v1/CborShapeSerializer";
|
|
3
|
+
import { CborShapeDeserializer } from "./codec-v1/CborShapeDeserializer";
|
|
6
4
|
export class CborCodec extends SerdeContext {
|
|
7
5
|
createSerializer() {
|
|
8
6
|
const serializer = new CborShapeSerializer();
|
|
@@ -15,202 +13,3 @@ export class CborCodec extends SerdeContext {
|
|
|
15
13
|
return deserializer;
|
|
16
14
|
}
|
|
17
15
|
}
|
|
18
|
-
export class CborShapeSerializer extends SerdeContext {
|
|
19
|
-
value;
|
|
20
|
-
write(schema, value) {
|
|
21
|
-
this.value = this.serialize(schema, value);
|
|
22
|
-
}
|
|
23
|
-
serialize(schema, source) {
|
|
24
|
-
const ns = NormalizedSchema.of(schema);
|
|
25
|
-
if (source == null) {
|
|
26
|
-
if (ns.isIdempotencyToken()) {
|
|
27
|
-
return generateIdempotencyToken();
|
|
28
|
-
}
|
|
29
|
-
return source;
|
|
30
|
-
}
|
|
31
|
-
if (ns.isBlobSchema()) {
|
|
32
|
-
if (typeof source === "string") {
|
|
33
|
-
return (this.serdeContext?.base64Decoder ?? fromBase64)(source);
|
|
34
|
-
}
|
|
35
|
-
return source;
|
|
36
|
-
}
|
|
37
|
-
if (ns.isTimestampSchema()) {
|
|
38
|
-
if (typeof source === "number" || typeof source === "bigint") {
|
|
39
|
-
return dateToTag(new Date((Number(source) / 1000) | 0));
|
|
40
|
-
}
|
|
41
|
-
return dateToTag(source);
|
|
42
|
-
}
|
|
43
|
-
if (typeof source === "function" || typeof source === "object") {
|
|
44
|
-
const sourceObject = source;
|
|
45
|
-
if (ns.isListSchema() && Array.isArray(sourceObject)) {
|
|
46
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
47
|
-
const newArray = [];
|
|
48
|
-
let i = 0;
|
|
49
|
-
for (const item of sourceObject) {
|
|
50
|
-
const value = this.serialize(ns.getValueSchema(), item);
|
|
51
|
-
if (value != null || sparse) {
|
|
52
|
-
newArray[i++] = value;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return newArray;
|
|
56
|
-
}
|
|
57
|
-
if (sourceObject instanceof Date) {
|
|
58
|
-
return dateToTag(sourceObject);
|
|
59
|
-
}
|
|
60
|
-
const newObject = {};
|
|
61
|
-
if (ns.isMapSchema()) {
|
|
62
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
63
|
-
for (const key in sourceObject) {
|
|
64
|
-
const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
65
|
-
if (value != null || sparse) {
|
|
66
|
-
newObject[key] = value;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
else if (ns.isStructSchema()) {
|
|
71
|
-
for (const [key, memberSchema] of ns.structIterator()) {
|
|
72
|
-
const value = this.serialize(memberSchema, sourceObject[key]);
|
|
73
|
-
if (value != null) {
|
|
74
|
-
newObject[key] = value;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
const isUnion = ns.isUnionSchema();
|
|
78
|
-
if (isUnion && Array.isArray(sourceObject.$unknown)) {
|
|
79
|
-
const [k, v] = sourceObject.$unknown;
|
|
80
|
-
newObject[k] = v;
|
|
81
|
-
}
|
|
82
|
-
else if (typeof sourceObject.__type === "string") {
|
|
83
|
-
for (const k in sourceObject) {
|
|
84
|
-
if (!(k in newObject)) {
|
|
85
|
-
newObject[k] = this.serialize(15, sourceObject[k]);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
else if (ns.isDocumentSchema()) {
|
|
91
|
-
for (const key in sourceObject) {
|
|
92
|
-
newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else if (ns.isBigDecimalSchema()) {
|
|
96
|
-
return sourceObject;
|
|
97
|
-
}
|
|
98
|
-
return newObject;
|
|
99
|
-
}
|
|
100
|
-
return source;
|
|
101
|
-
}
|
|
102
|
-
flush() {
|
|
103
|
-
const buffer = cbor.serialize(this.value);
|
|
104
|
-
this.value = undefined;
|
|
105
|
-
return buffer;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
export class CborShapeDeserializer extends SerdeContext {
|
|
109
|
-
read(schema, bytes) {
|
|
110
|
-
const data = cbor.deserialize(bytes);
|
|
111
|
-
return this.readValue(schema, data);
|
|
112
|
-
}
|
|
113
|
-
readValue(_schema, value) {
|
|
114
|
-
const ns = NormalizedSchema.of(_schema);
|
|
115
|
-
if (ns.isTimestampSchema()) {
|
|
116
|
-
if (typeof value === "number") {
|
|
117
|
-
return _parseEpochTimestamp(value);
|
|
118
|
-
}
|
|
119
|
-
if (typeof value === "object") {
|
|
120
|
-
if (value.tag === 1 && "value" in value) {
|
|
121
|
-
return _parseEpochTimestamp(value.value);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (ns.isBlobSchema()) {
|
|
126
|
-
if (typeof value === "string") {
|
|
127
|
-
return (this.serdeContext?.base64Decoder ?? fromBase64)(value);
|
|
128
|
-
}
|
|
129
|
-
return value;
|
|
130
|
-
}
|
|
131
|
-
if (typeof value === "undefined" ||
|
|
132
|
-
typeof value === "boolean" ||
|
|
133
|
-
typeof value === "number" ||
|
|
134
|
-
typeof value === "string" ||
|
|
135
|
-
typeof value === "bigint" ||
|
|
136
|
-
typeof value === "symbol") {
|
|
137
|
-
return value;
|
|
138
|
-
}
|
|
139
|
-
else if (typeof value === "object") {
|
|
140
|
-
if (value === null) {
|
|
141
|
-
return null;
|
|
142
|
-
}
|
|
143
|
-
if ("byteLength" in value) {
|
|
144
|
-
return value;
|
|
145
|
-
}
|
|
146
|
-
if (value instanceof Date) {
|
|
147
|
-
return value;
|
|
148
|
-
}
|
|
149
|
-
if (ns.isDocumentSchema()) {
|
|
150
|
-
return value;
|
|
151
|
-
}
|
|
152
|
-
if (ns.isListSchema()) {
|
|
153
|
-
const newArray = [];
|
|
154
|
-
const memberSchema = ns.getValueSchema();
|
|
155
|
-
for (const item of value) {
|
|
156
|
-
const itemValue = this.readValue(memberSchema, item);
|
|
157
|
-
newArray.push(itemValue);
|
|
158
|
-
}
|
|
159
|
-
return newArray;
|
|
160
|
-
}
|
|
161
|
-
const newObject = {};
|
|
162
|
-
if (ns.isMapSchema()) {
|
|
163
|
-
const targetSchema = ns.getValueSchema();
|
|
164
|
-
for (const key in value) {
|
|
165
|
-
const itemValue = this.readValue(targetSchema, value[key]);
|
|
166
|
-
newObject[key] = itemValue;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
else if (ns.isStructSchema()) {
|
|
170
|
-
const isUnion = ns.isUnionSchema();
|
|
171
|
-
let keys;
|
|
172
|
-
if (isUnion) {
|
|
173
|
-
keys = new Set();
|
|
174
|
-
for (const k in value) {
|
|
175
|
-
if (k !== "__type") {
|
|
176
|
-
keys.add(k);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
for (const [key, memberSchema] of ns.structIterator()) {
|
|
181
|
-
if (isUnion) {
|
|
182
|
-
keys.delete(key);
|
|
183
|
-
}
|
|
184
|
-
if (value[key] != null) {
|
|
185
|
-
newObject[key] = this.readValue(memberSchema, value[key]);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
if (isUnion && keys?.size === 1) {
|
|
189
|
-
let newObjectEmpty = true;
|
|
190
|
-
for (const _ in newObject) {
|
|
191
|
-
newObjectEmpty = false;
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
if (newObjectEmpty) {
|
|
195
|
-
const k = keys.values().next().value;
|
|
196
|
-
newObject.$unknown = [k, value[k]];
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
else if (typeof value.__type === "string") {
|
|
200
|
-
for (const k in value) {
|
|
201
|
-
if (!(k in newObject)) {
|
|
202
|
-
newObject[k] = value[k];
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
else if (value instanceof NumericValue) {
|
|
208
|
-
return value;
|
|
209
|
-
}
|
|
210
|
-
return newObject;
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
return value;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|