@cdk8s/awscdk-resolver 0.0.613 → 0.0.614
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 +3710 -15
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +7 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
- package/node_modules/@aws-sdk/core/account-id-endpoint.d.ts +1 -3
- package/node_modules/@aws-sdk/core/client.d.ts +1 -3
- package/node_modules/@aws-sdk/core/httpAuthSchemes.d.ts +1 -3
- package/node_modules/@aws-sdk/core/package.json +8 -14
- package/node_modules/@aws-sdk/core/protocols.d.ts +1 -3
- package/node_modules/@aws-sdk/core/util.d.ts +1 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +172 -1
- package/node_modules/@aws-sdk/credential-provider-http/package.json +8 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +58 -3
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -8
- package/node_modules/@aws-sdk/nested-clients/cognito-identity.d.ts +1 -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/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +7 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/nested-clients/signin.d.ts +1 -3
- package/node_modules/@aws-sdk/nested-clients/sso-oidc.d.ts +1 -3
- package/node_modules/@aws-sdk/nested-clients/sso.d.ts +1 -3
- package/node_modules/@aws-sdk/nested-clients/sts.d.ts +1 -3
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +236 -3
- package/node_modules/@aws-sdk/xml-builder/package.json +3 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +358 -145
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +462 -142
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +358 -145
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +108 -63
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +11 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +5 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +30 -36
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +54 -110
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +30 -36
- package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js +30 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js +24 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.browser.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.native.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js +92 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js +29 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js +179 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js +59 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js +71 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js +92 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js +3 -56
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js +5 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js +7 -6
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js +15 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js +4 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js +12 -38
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js +18 -33
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.browser.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Js.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Node.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.browser.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.native.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Js.d.ts +19 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Node.d.ts +17 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Js.d.ts +28 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Node.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256WebCrypto.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/submodules/config/defaults-mode/constants.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/concatBytes.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/checksum/ChecksumStream.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.browser.d.ts +8 -2
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.d.ts +4 -1
- package/node_modules/@smithy/core/package.json +4 -4
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -55
- package/node_modules/@smithy/fetch-http-handler/dist-es/index.js +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +3 -51
- package/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -3
- package/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -3
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -3
- package/package.json +3 -3
- package/node_modules/@aws-crypto/crc32/CHANGELOG.md +0 -100
- package/node_modules/@aws-crypto/crc32/LICENSE +0 -201
- package/node_modules/@aws-crypto/crc32/README.md +0 -16
- package/node_modules/@aws-crypto/crc32/build/main/aws_crc32.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js +0 -31
- package/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/build/main/index.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/main/index.js +0 -108
- package/node_modules/@aws-crypto/crc32/build/main/index.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/build/module/aws_crc32.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/module/aws_crc32.js +0 -28
- package/node_modules/@aws-crypto/crc32/build/module/aws_crc32.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/build/module/index.d.ts +0 -7
- package/node_modules/@aws-crypto/crc32/build/module/index.js +0 -103
- package/node_modules/@aws-crypto/crc32/build/module/index.js.map +0 -1
- package/node_modules/@aws-crypto/crc32/package.json +0 -32
- package/node_modules/@aws-crypto/crc32/src/aws_crc32.ts +0 -24
- package/node_modules/@aws-crypto/crc32/src/index.ts +0 -92
- package/node_modules/@aws-crypto/crc32/tsconfig.json +0 -9
- package/node_modules/@aws-crypto/crc32/tsconfig.module.json +0 -7
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/auth/httpAuthSchemeProvider.js +0 -40
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/bdd.js +0 -49
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/endpointResolver.js +0 -14
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/CloudFormationServiceException.js +0 -8
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/models/errors.js +0 -407
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.browser.js +0 -32
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.js +0 -45
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.native.js +0 -12
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/runtimeConfig.shared.js +0 -39
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/schemas/schemas_0.js +0 -3022
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +0 -869
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +0 -862
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +0 -42
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +0 -27
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +0 -71
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +0 -49
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +0 -13
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +0 -29
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +0 -25
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +0 -57
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +0 -234
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/constants.js +0 -3
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/md5.js +0 -168
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/constants.d.ts +0 -12
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/md5.d.ts +0 -16
- package/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +0 -53
- package/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts +0 -2
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -7
|
@@ -2,6 +2,4 @@
|
|
|
2
2
|
* Do not edit:
|
|
3
3
|
* This is a compatibility redirect for contexts that do not understand package.json exports field.
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
export * from "@aws-sdk/nested-clients/dist-types/submodules/sts/index.d";
|
|
7
|
-
}
|
|
5
|
+
export * from "./dist-types/submodules/sts/index";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/signature-v4-multi-region",
|
|
3
|
-
"version": "3.996.
|
|
3
|
+
"version": "3.996.36",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:browser": "node ./test-browser/browser-build/esbuild",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aws-sdk/types": "^3.973.
|
|
30
|
-
"@smithy/signature-v4": "^5.
|
|
31
|
-
"@smithy/types": "^4.
|
|
29
|
+
"@aws-sdk/types": "^3.973.14",
|
|
30
|
+
"@smithy/signature-v4": "^5.5.3",
|
|
31
|
+
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1076.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"license": "Apache-2.0",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aws-sdk/core": "^3.974.
|
|
33
|
-
"@aws-sdk/nested-clients": "^3.997.
|
|
34
|
-
"@aws-sdk/types": "^3.973.
|
|
35
|
-
"@smithy/core": "^3.
|
|
36
|
-
"@smithy/types": "^4.
|
|
32
|
+
"@aws-sdk/core": "^3.974.24",
|
|
33
|
+
"@aws-sdk/nested-clients": "^3.997.24",
|
|
34
|
+
"@aws-sdk/types": "^3.973.14",
|
|
35
|
+
"@smithy/core": "^3.27.0",
|
|
36
|
+
"@smithy/types": "^4.15.0",
|
|
37
37
|
"tslib": "^2.6.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/types",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.14",
|
|
4
4
|
"main": "./dist-cjs/index.js",
|
|
5
5
|
"module": "./dist-es/index.js",
|
|
6
6
|
"types": "./dist-types/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"directory": "packages-internal/types"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@smithy/types": "^4.
|
|
45
|
+
"@smithy/types": "^4.15.0",
|
|
46
46
|
"tslib": "^2.6.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
const { parseXML } = require("./xml-parser");
|
|
2
|
-
exports.parseXML = parseXML;
|
|
3
|
-
|
|
4
1
|
const ATTR_ESCAPE_RE = /[&<>"]/g;
|
|
5
2
|
const ATTR_ESCAPE_MAP = {
|
|
6
3
|
"&": "&",
|
|
@@ -125,5 +122,241 @@ class XmlNode {
|
|
|
125
122
|
}
|
|
126
123
|
}
|
|
127
124
|
|
|
125
|
+
function parseXML(xml) {
|
|
126
|
+
const state = new AwsXmlParser(xml);
|
|
127
|
+
return state.parse();
|
|
128
|
+
}
|
|
129
|
+
class AwsXmlParser {
|
|
130
|
+
x;
|
|
131
|
+
i = 0;
|
|
132
|
+
z;
|
|
133
|
+
constructor(x) {
|
|
134
|
+
this.x = x;
|
|
135
|
+
this.x = x.replace(/\r\n?/g, "\n");
|
|
136
|
+
this.z = this.x.length;
|
|
137
|
+
}
|
|
138
|
+
parse() {
|
|
139
|
+
const p = this;
|
|
140
|
+
const { z } = p;
|
|
141
|
+
while (p.i < z) {
|
|
142
|
+
p.trim();
|
|
143
|
+
if (p.i >= z) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
if (p.isNext("<?")) {
|
|
147
|
+
p.readTo("?>");
|
|
148
|
+
p.trim();
|
|
149
|
+
}
|
|
150
|
+
else if (p.isNext("<!--")) {
|
|
151
|
+
p.readTo("-->");
|
|
152
|
+
p.trim();
|
|
153
|
+
}
|
|
154
|
+
else if (p.isNext("<!DOCTYPE", false)) {
|
|
155
|
+
p.skipDoctype();
|
|
156
|
+
p.trim();
|
|
157
|
+
}
|
|
158
|
+
else if (p.x[p.i] === "<") {
|
|
159
|
+
const root = p.parseTag();
|
|
160
|
+
return { [root.tag]: root.value };
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
throw new Error("@aws-sdk XML parse error: unexpected content.");
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
throw new Error("@aws-sdk XML parse error: no root element.");
|
|
167
|
+
}
|
|
168
|
+
isNext(s, caseSensitive = true) {
|
|
169
|
+
const p = this;
|
|
170
|
+
if (caseSensitive) {
|
|
171
|
+
return p.x.startsWith(s, p.i);
|
|
172
|
+
}
|
|
173
|
+
return p.x.toLowerCase().startsWith(s.toLowerCase(), p.i);
|
|
174
|
+
}
|
|
175
|
+
readTo(stop) {
|
|
176
|
+
const p = this;
|
|
177
|
+
const _i = p.x.indexOf(stop, p.i);
|
|
178
|
+
if (_i === -1) {
|
|
179
|
+
throw new Error(`@aws-sdk XML parse error: expected "${stop}" not found.`);
|
|
180
|
+
}
|
|
181
|
+
const result = p.x.slice(p.i, _i);
|
|
182
|
+
p.i = _i + stop.length;
|
|
183
|
+
return result;
|
|
184
|
+
}
|
|
185
|
+
trim() {
|
|
186
|
+
const p = this;
|
|
187
|
+
while (p.i < p.z && " \t\r\n".includes(p.x[p.i])) {
|
|
188
|
+
++p.i;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
readAttrValue() {
|
|
192
|
+
const p = this;
|
|
193
|
+
const quote = p.x[p.i];
|
|
194
|
+
++p.i;
|
|
195
|
+
let value = "";
|
|
196
|
+
while (p.i < p.z && p.x[p.i] !== quote) {
|
|
197
|
+
value += p.x[p.i++];
|
|
198
|
+
}
|
|
199
|
+
++p.i;
|
|
200
|
+
return p.decodeEntities(value);
|
|
201
|
+
}
|
|
202
|
+
parseTag() {
|
|
203
|
+
const p = this;
|
|
204
|
+
++p.i;
|
|
205
|
+
let tag = "";
|
|
206
|
+
while (p.i < p.z && !" \t\r\n>/".includes(p.x[p.i])) {
|
|
207
|
+
tag += p.x[p.i++];
|
|
208
|
+
}
|
|
209
|
+
let hasAttrs = false;
|
|
210
|
+
const attrs = Object.create(null);
|
|
211
|
+
while (p.i < p.z) {
|
|
212
|
+
p.trim();
|
|
213
|
+
if (">/".includes(p.x[p.i])) {
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
let name = "";
|
|
217
|
+
while (p.i < p.z && !"= \t\r\n>/?".includes(p.x[p.i])) {
|
|
218
|
+
name += p.x[p.i++];
|
|
219
|
+
}
|
|
220
|
+
p.trim();
|
|
221
|
+
if (p.x[p.i] !== "=") {
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
++p.i;
|
|
225
|
+
p.trim();
|
|
226
|
+
attrs[name] = p.readAttrValue();
|
|
227
|
+
hasAttrs = true;
|
|
228
|
+
}
|
|
229
|
+
if (p.i >= p.z) {
|
|
230
|
+
throw new Error("@aws-sdk XML parse error: unexpected end of input.");
|
|
231
|
+
}
|
|
232
|
+
if (p.x[p.i] === "/") {
|
|
233
|
+
++p.i;
|
|
234
|
+
if (p.i >= p.z || p.x[p.i] !== ">") {
|
|
235
|
+
throw new Error("@aws-sdk XML parse error: expected > at the end of self-closing tag.");
|
|
236
|
+
}
|
|
237
|
+
++p.i;
|
|
238
|
+
Object.setPrototypeOf(attrs, Object.prototype);
|
|
239
|
+
return { tag, value: hasAttrs ? attrs : "" };
|
|
240
|
+
}
|
|
241
|
+
if (p.x[p.i] !== ">") {
|
|
242
|
+
throw new Error("@aws-sdk XML parse error: expected > at the end of opening tag.");
|
|
243
|
+
}
|
|
244
|
+
++p.i;
|
|
245
|
+
const textParts = [];
|
|
246
|
+
const childTags = [];
|
|
247
|
+
let hasElementChild = false;
|
|
248
|
+
while (p.i < p.z) {
|
|
249
|
+
if (p.isNext("</")) {
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
if (p.x[p.i] === "<") {
|
|
253
|
+
if (p.isNext("<!--")) {
|
|
254
|
+
p.readTo("-->");
|
|
255
|
+
}
|
|
256
|
+
else if (p.isNext("<![CDATA[")) {
|
|
257
|
+
p.i += 9;
|
|
258
|
+
textParts.push(p.readTo("]]>"));
|
|
259
|
+
}
|
|
260
|
+
else if (p.isNext("<?")) {
|
|
261
|
+
p.readTo("?>");
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
hasElementChild = true;
|
|
265
|
+
childTags.push(p.parseTag());
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
let text = "";
|
|
270
|
+
while (p.i < p.z && p.x[p.i] !== "<") {
|
|
271
|
+
text += p.x[p.i++];
|
|
272
|
+
}
|
|
273
|
+
textParts.push(p.decodeEntities(text));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (!p.isNext("</")) {
|
|
277
|
+
throw new Error(`@aws-sdk XML parse error: missing closing tag </${tag}>.`);
|
|
278
|
+
}
|
|
279
|
+
p.i += 2;
|
|
280
|
+
const closeTag = p.readTo(">").trim();
|
|
281
|
+
if (closeTag !== tag) {
|
|
282
|
+
throw new Error(`@aws-sdk XML parse error: mismatched tags <${tag}> and </${closeTag}>.`);
|
|
283
|
+
}
|
|
284
|
+
if (!hasAttrs && textParts.length === 0 && !hasElementChild) {
|
|
285
|
+
return { tag, value: "" };
|
|
286
|
+
}
|
|
287
|
+
if (!hasAttrs && !hasElementChild) {
|
|
288
|
+
const text = textParts.length === 1 ? textParts[0] : textParts.join("");
|
|
289
|
+
if (text.trim() === "" && text.includes("\n")) {
|
|
290
|
+
return { tag, value: "" };
|
|
291
|
+
}
|
|
292
|
+
return { tag, value: text };
|
|
293
|
+
}
|
|
294
|
+
const obj = Object.create(null);
|
|
295
|
+
for (const text of textParts) {
|
|
296
|
+
if (text.trim() === "" && text.includes("\n")) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
obj["#text"] = "#text" in obj ? obj["#text"] + text : text;
|
|
300
|
+
}
|
|
301
|
+
for (const child of childTags) {
|
|
302
|
+
if (child.tag in obj) {
|
|
303
|
+
if (Array.isArray(obj[child.tag])) {
|
|
304
|
+
obj[child.tag].push(child.value);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
obj[child.tag] = [obj[child.tag], child.value];
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
obj[child.tag] = child.value;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
315
|
+
obj[k] = v;
|
|
316
|
+
}
|
|
317
|
+
Object.setPrototypeOf(obj, Object.prototype);
|
|
318
|
+
return { tag, value: obj };
|
|
319
|
+
}
|
|
320
|
+
static ENTITIES = {
|
|
321
|
+
amp: "&",
|
|
322
|
+
lt: "<",
|
|
323
|
+
gt: ">",
|
|
324
|
+
quot: '"',
|
|
325
|
+
apos: "'",
|
|
326
|
+
};
|
|
327
|
+
skipDoctype() {
|
|
328
|
+
const p = this;
|
|
329
|
+
p.i += 9;
|
|
330
|
+
let depth = 0;
|
|
331
|
+
while (p.i < p.z) {
|
|
332
|
+
const c = p.x[p.i];
|
|
333
|
+
if (c === "[") {
|
|
334
|
+
++depth;
|
|
335
|
+
}
|
|
336
|
+
else if (c === "]") {
|
|
337
|
+
--depth;
|
|
338
|
+
}
|
|
339
|
+
else if (c === ">" && depth === 0) {
|
|
340
|
+
++p.i;
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
++p.i;
|
|
344
|
+
}
|
|
345
|
+
throw new Error("@aws-sdk XML parse error: unclosed DOCTYPE.");
|
|
346
|
+
}
|
|
347
|
+
decodeEntities(s) {
|
|
348
|
+
return s.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g, (_, hex, dec, named) => {
|
|
349
|
+
if (hex) {
|
|
350
|
+
return String.fromCharCode(parseInt(hex, 16));
|
|
351
|
+
}
|
|
352
|
+
if (dec) {
|
|
353
|
+
return String.fromCharCode(parseInt(dec, 10));
|
|
354
|
+
}
|
|
355
|
+
return AwsXmlParser.ENTITIES[named] ?? "";
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
128
360
|
exports.XmlNode = XmlNode;
|
|
129
361
|
exports.XmlText = XmlText;
|
|
362
|
+
exports.parseXML = parseXML;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/xml-builder",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.32",
|
|
4
4
|
"description": "XML utilities for the AWS SDK",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@smithy/types": "^4.
|
|
6
|
+
"@smithy/types": "^4.15.0",
|
|
7
7
|
"tslib": "^2.6.2"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
@@ -45,8 +45,7 @@
|
|
|
45
45
|
"./dist-es/xml-parser": "./dist-es/xml-parser.browser"
|
|
46
46
|
},
|
|
47
47
|
"react-native": {
|
|
48
|
-
"./dist-es/xml-parser": "./dist-es/xml-parser.browser"
|
|
49
|
-
"./dist-cjs/xml-parser": "./dist-cjs/xml-parser.browser"
|
|
48
|
+
"./dist-es/xml-parser": "./dist-es/xml-parser.browser"
|
|
50
49
|
},
|
|
51
50
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/xml-builder",
|
|
52
51
|
"repository": {
|