@mavogel/awscdk-rootmail 0.0.30 → 0.0.32
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 +9 -9
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +4 -4
- package/node_modules/@aws-sdk/client-route-53/package.json +4 -4
- package/node_modules/@aws-sdk/client-s3/package.json +4 -4
- package/node_modules/@aws-sdk/client-ses/package.json +4 -4
- package/node_modules/@aws-sdk/client-ssm/package.json +4 -4
- package/node_modules/@aws-sdk/client-sso/package.json +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +4 -4
- package/node_modules/@aws-sdk/client-sts/package.json +3 -3
- package/node_modules/@aws-sdk/core/CHANGELOG.md +11 -0
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/protocols/xml/parseXmlBody.js +1 -1
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/core/src/protocols/xml/parseXmlBody.spec.ts +60 -0
- package/node_modules/@aws-sdk/core/src/protocols/xml/parseXmlBody.ts +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +2 -1
- package/node_modules/@smithy/signature-v4/package.json +1 -1
- package/node_modules/cdk-nag/.jsii +2 -2
- package/node_modules/cdk-nag/lib/ignore-suppression-conditions.js +5 -5
- package/node_modules/cdk-nag/lib/nag-logger.js +2 -2
- package/node_modules/cdk-nag/lib/nag-pack.js +1 -1
- package/node_modules/cdk-nag/lib/nag-rules.js +1 -1
- package/node_modules/cdk-nag/lib/nag-suppressions.js +1 -1
- package/node_modules/cdk-nag/lib/packs/aws-solutions.js +1 -1
- package/node_modules/cdk-nag/lib/packs/hipaa-security.js +1 -1
- package/node_modules/cdk-nag/lib/packs/nist-800-53-r4.js +1 -1
- package/node_modules/cdk-nag/lib/packs/nist-800-53-r5.js +1 -1
- package/node_modules/cdk-nag/lib/packs/pci-dss-321.js +1 -1
- package/node_modules/cdk-nag/package.json +2 -2
- package/node_modules/mailparser/CHANGELOG.md +7 -0
- package/node_modules/mailparser/lib/mail-parser.js +4 -0
- package/node_modules/mailparser/package.json +1 -1
- package/package.json +9 -9
package/.jsii
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
9
|
"bundled": {
|
|
10
|
-
"@aws-sdk/client-cloudwatch-logs": "^3.
|
|
11
|
-
"@aws-sdk/client-route-53": "^3.
|
|
12
|
-
"@aws-sdk/client-s3": "^3.
|
|
13
|
-
"@aws-sdk/client-ses": "^3.
|
|
14
|
-
"@aws-sdk/client-ssm": "^3.
|
|
10
|
+
"@aws-sdk/client-cloudwatch-logs": "^3.554.0",
|
|
11
|
+
"@aws-sdk/client-route-53": "^3.554.0",
|
|
12
|
+
"@aws-sdk/client-s3": "^3.554.0",
|
|
13
|
+
"@aws-sdk/client-ses": "^3.554.0",
|
|
14
|
+
"@aws-sdk/client-ssm": "^3.554.0",
|
|
15
15
|
"async-retry": "^1.3.3",
|
|
16
16
|
"axios": "^1.6.8",
|
|
17
|
-
"cdk-nag": "^2.28.
|
|
18
|
-
"mailparser": "^3.
|
|
17
|
+
"cdk-nag": "^2.28.89",
|
|
18
|
+
"mailparser": "^3.7.0",
|
|
19
19
|
"uuid": "^9.0.1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
@@ -3877,6 +3877,6 @@
|
|
|
3877
3877
|
"symbolId": "src/ses-receive:SESReceiveProps"
|
|
3878
3878
|
}
|
|
3879
3879
|
},
|
|
3880
|
-
"version": "0.0.
|
|
3881
|
-
"fingerprint": "
|
|
3880
|
+
"version": "0.0.32",
|
|
3881
|
+
"fingerprint": "sTUDx+8rCK+PXhYqtq4smW56QaPRFtvGJzWDvxU8C3I="
|
|
3882
3882
|
}
|
package/lib/rootmail.js
CHANGED
|
@@ -74,7 +74,7 @@ class Rootmail extends constructs_1.Construct {
|
|
|
74
74
|
}
|
|
75
75
|
exports.Rootmail = Rootmail;
|
|
76
76
|
_a = JSII_RTTI_SYMBOL_1;
|
|
77
|
-
Rootmail[_a] = { fqn: "@mavogel/awscdk-rootmail.Rootmail", version: "0.0.
|
|
77
|
+
Rootmail[_a] = { fqn: "@mavogel/awscdk-rootmail.Rootmail", version: "0.0.32" };
|
|
78
78
|
/**
|
|
79
79
|
* Aspect for setting all removal policies to DESTROY
|
|
80
80
|
*/
|
package/lib/ses-receive.js
CHANGED
|
@@ -124,7 +124,7 @@ class SESReceive extends constructs_1.Construct {
|
|
|
124
124
|
}
|
|
125
125
|
exports.SESReceive = SESReceive;
|
|
126
126
|
_a = JSII_RTTI_SYMBOL_1;
|
|
127
|
-
SESReceive[_a] = { fqn: "@mavogel/awscdk-rootmail.SESReceive", version: "0.0.
|
|
127
|
+
SESReceive[_a] = { fqn: "@mavogel/awscdk-rootmail.SESReceive", version: "0.0.32" };
|
|
128
128
|
/**
|
|
129
129
|
* Aspect for setting all removal policies to DESTROY
|
|
130
130
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudwatch-logs",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cloudwatch Logs Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-cloudwatch-logs",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.554.0",
|
|
24
|
+
"@aws-sdk/core": "3.554.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.554.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-route-53",
|
|
3
3
|
"description": "AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-route-53",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.554.0",
|
|
24
|
+
"@aws-sdk/core": "3.554.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.554.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-s3",
|
|
3
3
|
"description": "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-s3",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@aws-crypto/sha1-browser": "3.0.0",
|
|
27
27
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
28
28
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
29
|
-
"@aws-sdk/client-sts": "3.
|
|
30
|
-
"@aws-sdk/core": "3.
|
|
31
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
29
|
+
"@aws-sdk/client-sts": "3.554.0",
|
|
30
|
+
"@aws-sdk/core": "3.554.0",
|
|
31
|
+
"@aws-sdk/credential-provider-node": "3.554.0",
|
|
32
32
|
"@aws-sdk/middleware-bucket-endpoint": "3.535.0",
|
|
33
33
|
"@aws-sdk/middleware-expect-continue": "3.535.0",
|
|
34
34
|
"@aws-sdk/middleware-flexible-checksums": "3.535.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ses",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ses Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-ses",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.554.0",
|
|
24
|
+
"@aws-sdk/core": "3.554.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.554.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ssm",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ssm Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-ssm",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.554.0",
|
|
24
|
+
"@aws-sdk/core": "3.554.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.554.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sso",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
23
|
+
"@aws-sdk/core": "3.554.0",
|
|
24
24
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
25
25
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
26
26
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sso-oidc",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sso-oidc",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.554.0",
|
|
24
|
+
"@aws-sdk/core": "3.554.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"license": "Apache-2.0",
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@aws-sdk/credential-provider-node": "^3.
|
|
89
|
+
"@aws-sdk/credential-provider-node": "^3.554.0"
|
|
90
90
|
},
|
|
91
91
|
"browser": {
|
|
92
92
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sts",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.554.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-sts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
25
|
-
"@aws-sdk/core": "3.
|
|
25
|
+
"@aws-sdk/core": "3.554.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
},
|
|
88
88
|
"license": "Apache-2.0",
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@aws-sdk/credential-provider-node": "^3.
|
|
90
|
+
"@aws-sdk/credential-provider-node": "^3.554.0"
|
|
91
91
|
},
|
|
92
92
|
"browser": {
|
|
93
93
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.554.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.553.0...v3.554.0) (2024-04-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **core:** validate XML during deserialization ([#5991](https://github.com/aws/aws-sdk-js-v3/issues/5991)) ([50002cf](https://github.com/aws/aws-sdk-js-v3/commit/50002cf02856165ebadecd0ebd975ac7358ec331))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.552.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.551.0...v3.552.0) (2024-04-09)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/core
|
|
@@ -385,7 +385,7 @@ var parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodySt
|
|
|
385
385
|
parser.addEntity("#10", "\n");
|
|
386
386
|
let parsedObj;
|
|
387
387
|
try {
|
|
388
|
-
parsedObj = parser.parse(encoded);
|
|
388
|
+
parsedObj = parser.parse(encoded, true);
|
|
389
389
|
} catch (e) {
|
|
390
390
|
if (e && typeof e === "object") {
|
|
391
391
|
Object.defineProperty(e, "$responseBodyText", {
|
|
@@ -16,7 +16,7 @@ export const parseXmlBody = (streamBody, context) => collectBodyString(streamBod
|
|
|
16
16
|
parser.addEntity("#10", "\n");
|
|
17
17
|
let parsedObj;
|
|
18
18
|
try {
|
|
19
|
-
parsedObj = parser.parse(encoded);
|
|
19
|
+
parsedObj = parser.parse(encoded, true);
|
|
20
20
|
}
|
|
21
21
|
catch (e) {
|
|
22
22
|
if (e && typeof e === "object") {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { SerdeContext } from "@smithy/types";
|
|
2
|
+
import { toUtf8 } from "@smithy/util-utf8";
|
|
3
|
+
|
|
4
|
+
import { parseXmlBody } from "./parseXmlBody";
|
|
5
|
+
|
|
6
|
+
describe(parseXmlBody.name, () => {
|
|
7
|
+
const context = {
|
|
8
|
+
utf8Encoder: toUtf8,
|
|
9
|
+
};
|
|
10
|
+
it("should parse xml", async () => {
|
|
11
|
+
const xml = Buffer.from(`<?xml version="1.0" encoding="UTF-8"?>
|
|
12
|
+
<ListAllMyBucketsResult>
|
|
13
|
+
<Buckets>
|
|
14
|
+
<Bucket>
|
|
15
|
+
<CreationDate>timestamp</CreationDate>
|
|
16
|
+
<Name>string</Name>
|
|
17
|
+
</Bucket>
|
|
18
|
+
</Buckets>
|
|
19
|
+
<Owner>
|
|
20
|
+
<DisplayName>string</DisplayName>
|
|
21
|
+
<ID>string</ID>
|
|
22
|
+
</Owner>
|
|
23
|
+
</ListAllMyBucketsResult>
|
|
24
|
+
`);
|
|
25
|
+
const parsed = await parseXmlBody(xml, context as any as SerdeContext);
|
|
26
|
+
expect(parsed).toEqual({
|
|
27
|
+
Buckets: { Bucket: { CreationDate: "timestamp", Name: "string" } },
|
|
28
|
+
Owner: { DisplayName: "string", ID: "string" },
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("should throw on incomplete xml", async () => {
|
|
33
|
+
const xml = Buffer.from(`<?xml version="1.0" encoding="UTF-8"?>
|
|
34
|
+
<ListAllMyBucketsResult>
|
|
35
|
+
<Buckets>
|
|
36
|
+
<Bucket>
|
|
37
|
+
<CreationDate>timestamp</CreationDate>
|
|
38
|
+
<Name>string</Name>
|
|
39
|
+
</Bucket>
|
|
40
|
+
</Buckets>
|
|
41
|
+
<Owner>
|
|
42
|
+
<DisplayName>string</DisplayName>
|
|
43
|
+
<ID>string</ID>
|
|
44
|
+
</Owner>
|
|
45
|
+
`);
|
|
46
|
+
const parsed = await parseXmlBody(xml, context as any as SerdeContext).catch((_) => _);
|
|
47
|
+
expect(parsed.toString()).toEqual(`Error: Unclosed tag 'ListAllMyBucketsResult'.:2:1`);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("should throw on incomplete xml", async () => {
|
|
51
|
+
const xml = Buffer.from(`<?xml version="1.0" encoding="UTF-8"?>
|
|
52
|
+
<ListAllMyBucketsResult>
|
|
53
|
+
<Buckets>
|
|
54
|
+
<Bucket>
|
|
55
|
+
<CreationDate>timestamp</Creatio
|
|
56
|
+
`);
|
|
57
|
+
const parsed = await parseXmlBody(xml, context as any as SerdeContext).catch((_) => _);
|
|
58
|
+
expect(parsed.toString()).toEqual(`Error: Closing tag 'Creatio' doesn't have proper closing.:6:1`);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -21,7 +21,7 @@ export const parseXmlBody = (streamBody: any, context: SerdeContext): any =>
|
|
|
21
21
|
|
|
22
22
|
let parsedObj;
|
|
23
23
|
try {
|
|
24
|
-
parsedObj = parser.parse(encoded);
|
|
24
|
+
parsedObj = parser.parse(encoded, true);
|
|
25
25
|
} catch (e: any) {
|
|
26
26
|
if (e && typeof e === "object") {
|
|
27
27
|
Object.defineProperty(e, "$responseBodyText", {
|