@cdklabs/cdk-ecs-codedeploy 0.0.426 → 0.0.428
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/.jsii.tabl.json +1 -1
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/index.js +66 -3902
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/models/CodeDeployServiceException.js +12 -0
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/models/errors.js +1436 -0
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/schemas/schemas_0.js +2155 -0
- package/node_modules/@aws-sdk/client-codedeploy/dist-es/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/client-codedeploy/dist-es/schemas/schemas_0.js +778 -772
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/schemas/schemas_0.d.ts +102 -95
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/schemas/schemas_0.d.ts +97 -95
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/LICENSE +201 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/README.md +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +415 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json +267 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js +10 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/index.js +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js +3 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js +25 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js +18 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js +41 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +267 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js +21 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/aws.d.ts +2 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/index.d.ts +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/isVirtualHostableS3Bucket.d.ts +5 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/parseArn.d.ts +7 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts +38 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/isIpAddress.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/resolveDefaultAwsRegionalEndpointsConfig.d.ts +56 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/resolveEndpoint.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/aws.d.ts +2 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/index.d.ts +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/isVirtualHostableS3Bucket.d.ts +4 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/parseArn.d.ts +2 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/partition.d.ts +28 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveDefaultAwsRegionalEndpointsConfig.d.ts +35 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts +5 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/index.d.ts +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/shared.d.ts +12 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointError.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointRuleObject.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/ErrorRuleObject.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/RuleSetObject.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/TreeRuleObject.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/index.d.ts +6 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/shared.d.ts +1 -0
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/package.json +60 -0
- package/node_modules/@aws-sdk/client-codedeploy/package.json +13 -13
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +23 -234
- package/node_modules/@aws-sdk/client-sso/dist-cjs/models/SSOServiceException.js +12 -0
- package/node_modules/@aws-sdk/client-sso/dist-cjs/models/errors.js +56 -0
- package/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/client-sso/dist-cjs/schemas/schemas_0.js +161 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/schemas/schemas_0.js +32 -26
- package/node_modules/@aws-sdk/client-sso/dist-types/schemas/schemas_0.d.ts +12 -5
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/schemas/schemas_0.d.ts +7 -5
- package/node_modules/@aws-sdk/client-sso/package.json +12 -12
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +26 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +26 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +14 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QueryShapeSerializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +6 -1
- package/node_modules/@aws-sdk/core/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- 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/middleware-user-agent/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +20 -198
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/SigninServiceException.js +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/errors.js +64 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/schemas/schemas_0.js +125 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +20 -347
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/SSOOIDCServiceException.js +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/errors.js +195 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/schemas/schemas_0.js +140 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +21 -308
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/STSServiceException.js +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/errors.js +95 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/schemas/schemas_0.js +195 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +15 -12
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +40 -37
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +60 -57
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +4 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/auth/httpAuthSchemeProvider.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/schemas/schemas_0.d.ts +11 -4
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +4 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/auth/httpAuthSchemeProvider.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/schemas/schemas_0.d.ts +10 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STS.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +5 -4
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/auth/httpAuthSchemeProvider.d.ts +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/schemas/schemas_0.d.ts +15 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/SigninClient.d.ts +5 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/schemas/schemas_0.d.ts +6 -4
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/SSOOIDCClient.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/schemas/schemas_0.d.ts +5 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/STSClient.d.ts +5 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/auth/httpAuthSchemeProvider.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/schemas/schemas_0.d.ts +10 -8
- package/node_modules/@aws-sdk/nested-clients/package.json +12 -12
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-endpoints/package.json +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/CHANGELOG.md +16 -0
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/README.md +7 -6
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.d.cts +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/package.json +4 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.d.ts +2 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +4 -4
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +55 -22
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
- package/node_modules/@aws-sdk/xml-builder/package.json +3 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +13 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +5 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +24 -5
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +15 -11
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +24 -5
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpBindingProtocol.d.ts +5 -1
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +14 -1
- package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +8 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts +5 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +14 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +8 -1
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +9 -2
- package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +9 -2
- package/node_modules/@smithy/node-http-handler/package.json +1 -1
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/node_modules/@smithy/util-stream/package.json +2 -2
- package/node_modules/bowser/README.md +72 -3
- package/node_modules/bowser/bundled.js +1 -1
- package/node_modules/bowser/es5.js +1 -1
- package/node_modules/bowser/index.d.ts +44 -6
- package/node_modules/bowser/package.json +10 -5
- package/node_modules/bowser/src/bowser.js +24 -8
- package/node_modules/bowser/src/constants.js +8 -0
- package/node_modules/bowser/src/parser-browsers.js +89 -0
- package/node_modules/bowser/src/parser-platforms.js +42 -0
- package/node_modules/bowser/src/parser.js +86 -5
- package/package.json +4 -4
- package/node_modules/bowser/CHANGELOG.md +0 -218
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import {getAllMatches, isExist} from '../util.js';
|
|
5
5
|
import xmlNode from './xmlNode.js';
|
|
6
|
-
import
|
|
6
|
+
import DocTypeReader from './DocTypeReader.js';
|
|
7
7
|
import toNumber from "strnum";
|
|
8
8
|
import getIgnoreAttributesFn from "../ignoreAttributes.js";
|
|
9
9
|
|
|
@@ -41,8 +41,8 @@ export default class OrderedObjParser{
|
|
|
41
41
|
"copyright" : { regex: /&(copy|#169);/g, val: "©" },
|
|
42
42
|
"reg" : { regex: /&(reg|#174);/g, val: "®" },
|
|
43
43
|
"inr" : { regex: /&(inr|#8377);/g, val: "₹" },
|
|
44
|
-
"num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) =>
|
|
45
|
-
"num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) =>
|
|
44
|
+
"num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => fromCodePoint(str, 10, "&#") },
|
|
45
|
+
"num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => fromCodePoint(str, 16, "&#x") },
|
|
46
46
|
};
|
|
47
47
|
this.addExternalEntities = addExternalEntities;
|
|
48
48
|
this.parseXml = parseXml;
|
|
@@ -55,6 +55,20 @@ export default class OrderedObjParser{
|
|
|
55
55
|
this.saveTextToParentTag = saveTextToParentTag;
|
|
56
56
|
this.addChild = addChild;
|
|
57
57
|
this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)
|
|
58
|
+
|
|
59
|
+
if(this.options.stopNodes && this.options.stopNodes.length > 0){
|
|
60
|
+
this.stopNodesExact = new Set();
|
|
61
|
+
this.stopNodesWildcard = new Set();
|
|
62
|
+
for(let i = 0; i < this.options.stopNodes.length; i++){
|
|
63
|
+
const stopNodeExp = this.options.stopNodes[i];
|
|
64
|
+
if(typeof stopNodeExp !== 'string') continue;
|
|
65
|
+
if(stopNodeExp.startsWith("*.")){
|
|
66
|
+
this.stopNodesWildcard.add(stopNodeExp.substring(2));
|
|
67
|
+
}else{
|
|
68
|
+
this.stopNodesExact.add(stopNodeExp);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
58
72
|
}
|
|
59
73
|
|
|
60
74
|
}
|
|
@@ -126,7 +140,7 @@ function resolveNameSpace(tagname) {
|
|
|
126
140
|
//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm");
|
|
127
141
|
const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm');
|
|
128
142
|
|
|
129
|
-
function buildAttributesMap(attrStr, jPath
|
|
143
|
+
function buildAttributesMap(attrStr, jPath) {
|
|
130
144
|
if (this.options.ignoreAttributes !== true && typeof attrStr === 'string') {
|
|
131
145
|
// attrStr = attrStr.replace(/\r?\n/g, ' ');
|
|
132
146
|
//attrStr = attrStr || attrStr.trim();
|
|
@@ -189,6 +203,7 @@ const parseXml = function(xmlData) {
|
|
|
189
203
|
let currentNode = xmlObj;
|
|
190
204
|
let textData = "";
|
|
191
205
|
let jPath = "";
|
|
206
|
+
const docTypeReader = new DocTypeReader(this.options.processEntities);
|
|
192
207
|
for(let i=0; i< xmlData.length; i++){//for each char in XML data
|
|
193
208
|
const ch = xmlData[i];
|
|
194
209
|
if(ch === '<'){
|
|
@@ -237,14 +252,14 @@ const parseXml = function(xmlData) {
|
|
|
237
252
|
|
|
238
253
|
textData = this.saveTextToParentTag(textData, currentNode, jPath);
|
|
239
254
|
if( (this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags){
|
|
240
|
-
|
|
255
|
+
//do nothing
|
|
241
256
|
}else{
|
|
242
257
|
|
|
243
258
|
const childNode = new xmlNode(tagData.tagName);
|
|
244
259
|
childNode.add(this.options.textNodeName, "");
|
|
245
260
|
|
|
246
261
|
if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){
|
|
247
|
-
childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath
|
|
262
|
+
childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath);
|
|
248
263
|
}
|
|
249
264
|
this.addChild(currentNode, childNode, jPath, i);
|
|
250
265
|
}
|
|
@@ -262,7 +277,7 @@ const parseXml = function(xmlData) {
|
|
|
262
277
|
}
|
|
263
278
|
i = endIndex;
|
|
264
279
|
} else if( xmlData.substr(i + 1, 2) === '!D') {
|
|
265
|
-
const result = readDocType(xmlData, i);
|
|
280
|
+
const result = docTypeReader.readDocType(xmlData, i);
|
|
266
281
|
this.docTypeEntities = result.entities;
|
|
267
282
|
i = result.i;
|
|
268
283
|
}else if(xmlData.substr(i + 1, 2) === '![') {
|
|
@@ -291,7 +306,12 @@ const parseXml = function(xmlData) {
|
|
|
291
306
|
let closeIndex = result.closeIndex;
|
|
292
307
|
|
|
293
308
|
if (this.options.transformTagName) {
|
|
294
|
-
|
|
309
|
+
//console.log(tagExp, tagName)
|
|
310
|
+
const newTagName = this.options.transformTagName(tagName);
|
|
311
|
+
if(tagExp === tagName) {
|
|
312
|
+
tagExp = newTagName
|
|
313
|
+
}
|
|
314
|
+
tagName = newTagName;
|
|
295
315
|
}
|
|
296
316
|
|
|
297
317
|
//save text as child node
|
|
@@ -312,7 +332,7 @@ const parseXml = function(xmlData) {
|
|
|
312
332
|
jPath += jPath ? "." + tagName : tagName;
|
|
313
333
|
}
|
|
314
334
|
const startIndex = i;
|
|
315
|
-
if (this.isItStopNode(this.
|
|
335
|
+
if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, jPath, tagName)) {
|
|
316
336
|
let tagContent = "";
|
|
317
337
|
//self-closing tag
|
|
318
338
|
if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){
|
|
@@ -342,7 +362,8 @@ const parseXml = function(xmlData) {
|
|
|
342
362
|
const childNode = new xmlNode(tagName);
|
|
343
363
|
|
|
344
364
|
if(tagName !== tagExp && attrExpPresent){
|
|
345
|
-
childNode[":@"] = this.buildAttributesMap(tagExp, jPath
|
|
365
|
+
childNode[":@"] = this.buildAttributesMap(tagExp, jPath
|
|
366
|
+
);
|
|
346
367
|
}
|
|
347
368
|
if(tagContent) {
|
|
348
369
|
tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);
|
|
@@ -364,12 +385,16 @@ const parseXml = function(xmlData) {
|
|
|
364
385
|
}
|
|
365
386
|
|
|
366
387
|
if(this.options.transformTagName) {
|
|
367
|
-
|
|
388
|
+
const newTagName = this.options.transformTagName(tagName);
|
|
389
|
+
if(tagExp === tagName) {
|
|
390
|
+
tagExp = newTagName
|
|
391
|
+
}
|
|
392
|
+
tagName = newTagName;
|
|
368
393
|
}
|
|
369
394
|
|
|
370
395
|
const childNode = new xmlNode(tagName);
|
|
371
396
|
if(tagName !== tagExp && attrExpPresent){
|
|
372
|
-
childNode[":@"] = this.buildAttributesMap(tagExp, jPath
|
|
397
|
+
childNode[":@"] = this.buildAttributesMap(tagExp, jPath);
|
|
373
398
|
}
|
|
374
399
|
this.addChild(currentNode, childNode, jPath, startIndex);
|
|
375
400
|
jPath = jPath.substr(0, jPath.lastIndexOf("."));
|
|
@@ -380,7 +405,7 @@ const parseXml = function(xmlData) {
|
|
|
380
405
|
this.tagsNodeStack.push(currentNode);
|
|
381
406
|
|
|
382
407
|
if(tagName !== tagExp && attrExpPresent){
|
|
383
|
-
childNode[":@"] = this.buildAttributesMap(tagExp, jPath
|
|
408
|
+
childNode[":@"] = this.buildAttributesMap(tagExp, jPath);
|
|
384
409
|
}
|
|
385
410
|
this.addChild(currentNode, childNode, jPath, startIndex);
|
|
386
411
|
currentNode = childNode;
|
|
@@ -401,6 +426,7 @@ function addChild(currentNode, childNode, jPath, startIndex){
|
|
|
401
426
|
if (!this.options.captureMetaData) startIndex = undefined;
|
|
402
427
|
const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"])
|
|
403
428
|
if(result === false){
|
|
429
|
+
//do nothing
|
|
404
430
|
} else if(typeof result === "string"){
|
|
405
431
|
childNode.tagname = result
|
|
406
432
|
currentNode.addChild(childNode, startIndex);
|
|
@@ -450,17 +476,14 @@ function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {
|
|
|
450
476
|
|
|
451
477
|
//TODO: use jPath to simplify the logic
|
|
452
478
|
/**
|
|
453
|
-
*
|
|
454
|
-
* @param {
|
|
479
|
+
* @param {Set} stopNodesExact
|
|
480
|
+
* @param {Set} stopNodesWildcard
|
|
455
481
|
* @param {string} jPath
|
|
456
|
-
* @param {string} currentTagName
|
|
482
|
+
* @param {string} currentTagName
|
|
457
483
|
*/
|
|
458
|
-
function isItStopNode(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const stopNodeExp = stopNodes[stopNodePath];
|
|
462
|
-
if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;
|
|
463
|
-
}
|
|
484
|
+
function isItStopNode(stopNodesExact, stopNodesWildcard, jPath, currentTagName){
|
|
485
|
+
if(stopNodesWildcard && stopNodesWildcard.has(currentTagName)) return true;
|
|
486
|
+
if(stopNodesExact && stopNodesExact.has(jPath)) return true;
|
|
464
487
|
return false;
|
|
465
488
|
}
|
|
466
489
|
|
|
@@ -604,3 +627,13 @@ function parseValue(val, shouldParse, options) {
|
|
|
604
627
|
}
|
|
605
628
|
}
|
|
606
629
|
}
|
|
630
|
+
|
|
631
|
+
function fromCodePoint(str, base, prefix){
|
|
632
|
+
const codePoint = Number.parseInt(str, base);
|
|
633
|
+
|
|
634
|
+
if (codePoint >= 0 && codePoint <= 0x10FFFF) {
|
|
635
|
+
return String.fromCodePoint(codePoint);
|
|
636
|
+
} else {
|
|
637
|
+
return prefix +str + ";";
|
|
638
|
+
}
|
|
639
|
+
}
|
package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
CHANGED
|
@@ -13,16 +13,16 @@ export default class XMLParser{
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Parse XML dats to JS object
|
|
16
|
-
* @param {string|
|
|
16
|
+
* @param {string|Uint8Array} xmlData
|
|
17
17
|
* @param {boolean|Object} validationOption
|
|
18
18
|
*/
|
|
19
19
|
parse(xmlData,validationOption){
|
|
20
|
-
if(typeof xmlData
|
|
21
|
-
}else if( xmlData.toString){
|
|
20
|
+
if(typeof xmlData !== "string" && xmlData.toString){
|
|
22
21
|
xmlData = xmlData.toString();
|
|
23
|
-
}else{
|
|
22
|
+
}else if(typeof xmlData !== "string"){
|
|
24
23
|
throw new Error("XML data is accepted in String or Bytes[] form.")
|
|
25
24
|
}
|
|
25
|
+
|
|
26
26
|
if( validationOption){
|
|
27
27
|
if(validationOption === true) validationOption = {}; //validate with default options
|
|
28
28
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/xml-builder",
|
|
3
|
-
"version": "3.972.
|
|
4
|
-
"description": "XML
|
|
3
|
+
"version": "3.972.4",
|
|
4
|
+
"description": "XML utilities for the AWS SDK",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@smithy/types": "^4.12.0",
|
|
7
|
-
"fast-xml-parser": "5.
|
|
7
|
+
"fast-xml-parser": "5.3.4",
|
|
8
8
|
"tslib": "^2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
@@ -990,8 +990,8 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
990
990
|
codec = new CborCodec();
|
|
991
991
|
serializer = this.codec.createSerializer();
|
|
992
992
|
deserializer = this.codec.createDeserializer();
|
|
993
|
-
constructor({ defaultNamespace }) {
|
|
994
|
-
super({ defaultNamespace });
|
|
993
|
+
constructor({ defaultNamespace, errorTypeRegistries, }) {
|
|
994
|
+
super({ defaultNamespace, errorTypeRegistries });
|
|
995
995
|
}
|
|
996
996
|
getShapeId() {
|
|
997
997
|
return "smithy.protocols#rpcv2Cbor";
|
|
@@ -1035,15 +1035,17 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1037
1037
|
const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
1038
|
-
let namespace = this.options.defaultNamespace;
|
|
1039
|
-
if (errorName.includes("#")) {
|
|
1040
|
-
[namespace] = errorName.split("#");
|
|
1041
|
-
}
|
|
1042
1038
|
const errorMetadata = {
|
|
1043
1039
|
$metadata: metadata,
|
|
1044
1040
|
$fault: response.statusCode <= 500 ? "client" : "server",
|
|
1045
1041
|
};
|
|
1046
|
-
|
|
1042
|
+
let namespace = this.options.defaultNamespace;
|
|
1043
|
+
if (errorName.includes("#")) {
|
|
1044
|
+
[namespace] = errorName.split("#");
|
|
1045
|
+
}
|
|
1046
|
+
const registry = this.compositeErrorRegistry;
|
|
1047
|
+
const nsRegistry = schema.TypeRegistry.for(namespace);
|
|
1048
|
+
registry.copyFrom(nsRegistry);
|
|
1047
1049
|
let errorSchema;
|
|
1048
1050
|
try {
|
|
1049
1051
|
errorSchema = registry.getSchema(errorName);
|
|
@@ -1052,10 +1054,11 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
|
|
|
1052
1054
|
if (dataObject.Message) {
|
|
1053
1055
|
dataObject.message = dataObject.Message;
|
|
1054
1056
|
}
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
+
const syntheticRegistry = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
|
|
1058
|
+
registry.copyFrom(syntheticRegistry);
|
|
1059
|
+
const baseExceptionSchema = registry.getBaseException();
|
|
1057
1060
|
if (baseExceptionSchema) {
|
|
1058
|
-
const ErrorCtor =
|
|
1061
|
+
const ErrorCtor = registry.getErrorCtor(baseExceptionSchema);
|
|
1059
1062
|
throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject);
|
|
1060
1063
|
}
|
|
1061
1064
|
throw Object.assign(new Error(errorName), errorMetadata, dataObject);
|
|
@@ -33,9 +33,14 @@ class SerdeContext {
|
|
|
33
33
|
|
|
34
34
|
class HttpProtocol extends SerdeContext {
|
|
35
35
|
options;
|
|
36
|
+
compositeErrorRegistry;
|
|
36
37
|
constructor(options) {
|
|
37
38
|
super();
|
|
38
39
|
this.options = options;
|
|
40
|
+
this.compositeErrorRegistry = schema.TypeRegistry.for(options.defaultNamespace);
|
|
41
|
+
for (const etr of options.errorTypeRegistries ?? []) {
|
|
42
|
+
this.compositeErrorRegistry.copyFrom(etr);
|
|
43
|
+
}
|
|
39
44
|
}
|
|
40
45
|
getRequestType() {
|
|
41
46
|
return protocolHttp.HttpRequest;
|
|
@@ -566,10 +566,24 @@ class TypeRegistry {
|
|
|
566
566
|
}
|
|
567
567
|
return TypeRegistry.registries.get(namespace);
|
|
568
568
|
}
|
|
569
|
+
copyFrom(other) {
|
|
570
|
+
const { schemas, exceptions } = this;
|
|
571
|
+
for (const [k, v] of other.schemas) {
|
|
572
|
+
if (!schemas.has(k)) {
|
|
573
|
+
schemas.set(k, v);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
for (const [k, v] of other.exceptions) {
|
|
577
|
+
if (!exceptions.has(k)) {
|
|
578
|
+
exceptions.set(k, v);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
569
582
|
register(shapeId, schema) {
|
|
570
583
|
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
571
|
-
const
|
|
572
|
-
|
|
584
|
+
for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
|
585
|
+
r.schemas.set(qualifiedName, schema);
|
|
586
|
+
}
|
|
573
587
|
}
|
|
574
588
|
getSchema(shapeId) {
|
|
575
589
|
const id = this.normalizeShapeId(shapeId);
|
|
@@ -580,12 +594,17 @@ class TypeRegistry {
|
|
|
580
594
|
}
|
|
581
595
|
registerError(es, ctor) {
|
|
582
596
|
const $error = es;
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
|
|
597
|
+
const ns = $error[1];
|
|
598
|
+
for (const r of [this, TypeRegistry.for(ns)]) {
|
|
599
|
+
r.schemas.set(ns + "#" + $error[2], $error);
|
|
600
|
+
r.exceptions.set($error, ctor);
|
|
601
|
+
}
|
|
586
602
|
}
|
|
587
603
|
getErrorCtor(es) {
|
|
588
604
|
const $error = es;
|
|
605
|
+
if (this.exceptions.has($error)) {
|
|
606
|
+
return this.exceptions.get($error);
|
|
607
|
+
}
|
|
589
608
|
const registry = TypeRegistry.for($error[1]);
|
|
590
609
|
return registry.exceptions.get($error);
|
|
591
610
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
|
-
import {
|
|
2
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
3
|
+
import { deref, NormalizedSchema } from "@smithy/core/schema";
|
|
3
4
|
import { getSmithyContext } from "@smithy/util-middleware";
|
|
4
5
|
import { CborCodec } from "./CborCodec";
|
|
5
6
|
import { loadSmithyRpcV2CborErrorCode } from "./parseCborBody";
|
|
@@ -7,8 +8,8 @@ export class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
|
7
8
|
codec = new CborCodec();
|
|
8
9
|
serializer = this.codec.createSerializer();
|
|
9
10
|
deserializer = this.codec.createDeserializer();
|
|
10
|
-
constructor({ defaultNamespace }) {
|
|
11
|
-
super({ defaultNamespace });
|
|
11
|
+
constructor({ defaultNamespace, errorTypeRegistries, }) {
|
|
12
|
+
super({ defaultNamespace, errorTypeRegistries });
|
|
12
13
|
}
|
|
13
14
|
getShapeId() {
|
|
14
15
|
return "smithy.protocols#rpcv2Cbor";
|
|
@@ -52,15 +53,17 @@ export class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
|
52
53
|
}
|
|
53
54
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
54
55
|
const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
55
|
-
let namespace = this.options.defaultNamespace;
|
|
56
|
-
if (errorName.includes("#")) {
|
|
57
|
-
[namespace] = errorName.split("#");
|
|
58
|
-
}
|
|
59
56
|
const errorMetadata = {
|
|
60
57
|
$metadata: metadata,
|
|
61
58
|
$fault: response.statusCode <= 500 ? "client" : "server",
|
|
62
59
|
};
|
|
63
|
-
|
|
60
|
+
let namespace = this.options.defaultNamespace;
|
|
61
|
+
if (errorName.includes("#")) {
|
|
62
|
+
[namespace] = errorName.split("#");
|
|
63
|
+
}
|
|
64
|
+
const registry = this.compositeErrorRegistry;
|
|
65
|
+
const nsRegistry = TypeRegistry.for(namespace);
|
|
66
|
+
registry.copyFrom(nsRegistry);
|
|
64
67
|
let errorSchema;
|
|
65
68
|
try {
|
|
66
69
|
errorSchema = registry.getSchema(errorName);
|
|
@@ -69,10 +72,11 @@ export class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
|
69
72
|
if (dataObject.Message) {
|
|
70
73
|
dataObject.message = dataObject.Message;
|
|
71
74
|
}
|
|
72
|
-
const
|
|
73
|
-
|
|
75
|
+
const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
|
|
76
|
+
registry.copyFrom(syntheticRegistry);
|
|
77
|
+
const baseExceptionSchema = registry.getBaseException();
|
|
74
78
|
if (baseExceptionSchema) {
|
|
75
|
-
const ErrorCtor =
|
|
79
|
+
const ErrorCtor = registry.getErrorCtor(baseExceptionSchema);
|
|
76
80
|
throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject);
|
|
77
81
|
}
|
|
78
82
|
throw Object.assign(new Error(errorName), errorMetadata, dataObject);
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { NormalizedSchema, translateTraits } from "@smithy/core/schema";
|
|
1
|
+
import { NormalizedSchema, translateTraits, TypeRegistry } from "@smithy/core/schema";
|
|
2
2
|
import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
|
3
3
|
import { SerdeContext } from "./SerdeContext";
|
|
4
4
|
export class HttpProtocol extends SerdeContext {
|
|
5
5
|
options;
|
|
6
|
+
compositeErrorRegistry;
|
|
6
7
|
constructor(options) {
|
|
7
8
|
super();
|
|
8
9
|
this.options = options;
|
|
10
|
+
this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
|
|
11
|
+
for (const etr of options.errorTypeRegistries ?? []) {
|
|
12
|
+
this.compositeErrorRegistry.copyFrom(etr);
|
|
13
|
+
}
|
|
9
14
|
}
|
|
10
15
|
getRequestType() {
|
|
11
16
|
return HttpRequest;
|
|
@@ -14,10 +14,24 @@ export class TypeRegistry {
|
|
|
14
14
|
}
|
|
15
15
|
return TypeRegistry.registries.get(namespace);
|
|
16
16
|
}
|
|
17
|
+
copyFrom(other) {
|
|
18
|
+
const { schemas, exceptions } = this;
|
|
19
|
+
for (const [k, v] of other.schemas) {
|
|
20
|
+
if (!schemas.has(k)) {
|
|
21
|
+
schemas.set(k, v);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
for (const [k, v] of other.exceptions) {
|
|
25
|
+
if (!exceptions.has(k)) {
|
|
26
|
+
exceptions.set(k, v);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
17
30
|
register(shapeId, schema) {
|
|
18
31
|
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
19
|
-
const
|
|
20
|
-
|
|
32
|
+
for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
|
33
|
+
r.schemas.set(qualifiedName, schema);
|
|
34
|
+
}
|
|
21
35
|
}
|
|
22
36
|
getSchema(shapeId) {
|
|
23
37
|
const id = this.normalizeShapeId(shapeId);
|
|
@@ -28,12 +42,17 @@ export class TypeRegistry {
|
|
|
28
42
|
}
|
|
29
43
|
registerError(es, ctor) {
|
|
30
44
|
const $error = es;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
const ns = $error[1];
|
|
46
|
+
for (const r of [this, TypeRegistry.for(ns)]) {
|
|
47
|
+
r.schemas.set(ns + "#" + $error[2], $error);
|
|
48
|
+
r.exceptions.set($error, ctor);
|
|
49
|
+
}
|
|
34
50
|
}
|
|
35
51
|
getErrorCtor(es) {
|
|
36
52
|
const $error = es;
|
|
53
|
+
if (this.exceptions.has($error)) {
|
|
54
|
+
return this.exceptions.get($error);
|
|
55
|
+
}
|
|
37
56
|
const registry = TypeRegistry.for($error[1]);
|
|
38
57
|
return registry.exceptions.get($error);
|
|
39
58
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
2
3
|
import type { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions } from "@smithy/types";
|
|
3
4
|
import { CborCodec } from "./CborCodec";
|
|
4
5
|
/**
|
|
@@ -7,11 +8,16 @@ import { CborCodec } from "./CborCodec";
|
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
9
10
|
export declare class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
11
|
+
/**
|
|
12
|
+
* @override
|
|
13
|
+
*/
|
|
14
|
+
protected compositeErrorRegistry: TypeRegistry;
|
|
10
15
|
private codec;
|
|
11
16
|
protected serializer: import("./CborCodec").CborShapeSerializer;
|
|
12
17
|
protected deserializer: import("./CborCodec").CborShapeDeserializer;
|
|
13
|
-
constructor({ defaultNamespace }: {
|
|
18
|
+
constructor({ defaultNamespace, errorTypeRegistries, }: {
|
|
14
19
|
defaultNamespace: string;
|
|
20
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
15
21
|
});
|
|
16
22
|
getShapeId(): string;
|
|
17
23
|
getPayloadCodec(): CborCodec;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
1
|
+
import { type TypeRegistry, NormalizedSchema } from "@smithy/core/schema";
|
|
2
2
|
import { HttpRequest } from "@smithy/protocol-http";
|
|
3
3
|
import type { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, Schema, SerdeFunctions } from "@smithy/types";
|
|
4
4
|
import { HttpProtocol } from "./HttpProtocol";
|
|
@@ -9,6 +9,10 @@ import { HttpProtocol } from "./HttpProtocol";
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
|
12
|
+
/**
|
|
13
|
+
* @override
|
|
14
|
+
*/
|
|
15
|
+
protected compositeErrorRegistry: TypeRegistry;
|
|
12
16
|
serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
13
17
|
protected serializeQuery(ns: NormalizedSchema, data: any, query: HttpRequest["query"]): void;
|
|
14
18
|
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EventStreamSerde } from "@smithy/core/event-streams";
|
|
2
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
|
+
import { NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
3
3
|
import type { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
4
4
|
import { SerdeContext } from "./SerdeContext";
|
|
5
5
|
/**
|
|
@@ -10,11 +10,24 @@ import { SerdeContext } from "./SerdeContext";
|
|
|
10
10
|
export declare abstract class HttpProtocol extends SerdeContext implements ClientProtocol<IHttpRequest, IHttpResponse> {
|
|
11
11
|
readonly options: {
|
|
12
12
|
defaultNamespace: string;
|
|
13
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
13
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* An error registry having the namespace of the modeled service,
|
|
17
|
+
* but combining all error schemas found within the service closure.
|
|
18
|
+
*
|
|
19
|
+
* Used to look up error schema during deserialization.
|
|
20
|
+
*/
|
|
21
|
+
protected compositeErrorRegistry: TypeRegistry;
|
|
14
22
|
protected abstract serializer: ShapeSerializer<string | Uint8Array>;
|
|
15
23
|
protected abstract deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
24
|
+
/**
|
|
25
|
+
* @param options.defaultNamespace - used by various implementing classes.
|
|
26
|
+
* @param options.errorTypeRegistries - registry instances that contribute to error deserialization.
|
|
27
|
+
*/
|
|
16
28
|
protected constructor(options: {
|
|
17
29
|
defaultNamespace: string;
|
|
30
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
18
31
|
});
|
|
19
32
|
abstract getShapeId(): string;
|
|
20
33
|
abstract getPayloadCodec(): Codec<any, any>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TypeRegistry } from "@smithy/core/schema";
|
|
1
2
|
import type { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, SerdeFunctions } from "@smithy/types";
|
|
2
3
|
import { HttpProtocol } from "./HttpProtocol";
|
|
3
4
|
/**
|
|
@@ -6,6 +7,10 @@ import { HttpProtocol } from "./HttpProtocol";
|
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
8
9
|
export declare abstract class RpcProtocol extends HttpProtocol {
|
|
10
|
+
/**
|
|
11
|
+
* @override
|
|
12
|
+
*/
|
|
13
|
+
protected compositeErrorRegistry: TypeRegistry;
|
|
9
14
|
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
10
15
|
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
11
16
|
}
|
|
@@ -17,7 +17,14 @@ export declare class TypeRegistry {
|
|
|
17
17
|
*/
|
|
18
18
|
static for(namespace: string): TypeRegistry;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Copies entries from another instance without changing the namespace of self.
|
|
21
|
+
* The composition is additive but non-destructive and will not overwrite existing entries.
|
|
22
|
+
*
|
|
23
|
+
* @param other - another TypeRegistry.
|
|
24
|
+
*/
|
|
25
|
+
copyFrom(other: TypeRegistry): void;
|
|
26
|
+
/**
|
|
27
|
+
* Adds the given schema to a type registry with the same namespace, and this registry.
|
|
21
28
|
*
|
|
22
29
|
* @param shapeId - to be registered.
|
|
23
30
|
* @param schema - to be registered.
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
2
3
|
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions } from "@smithy/types";
|
|
3
4
|
import { CborCodec } from "./CborCodec";
|
|
4
5
|
/**
|
|
@@ -7,11 +8,16 @@ import { CborCodec } from "./CborCodec";
|
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
9
10
|
export declare class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
11
|
+
/**
|
|
12
|
+
* @override
|
|
13
|
+
*/
|
|
14
|
+
protected compositeErrorRegistry: TypeRegistry;
|
|
10
15
|
private codec;
|
|
11
16
|
protected serializer: import("./CborCodec").CborShapeSerializer;
|
|
12
17
|
protected deserializer: import("./CborCodec").CborShapeDeserializer;
|
|
13
|
-
constructor({ defaultNamespace }: {
|
|
18
|
+
constructor({ defaultNamespace, errorTypeRegistries, }: {
|
|
14
19
|
defaultNamespace: string;
|
|
20
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
15
21
|
});
|
|
16
22
|
getShapeId(): string;
|
|
17
23
|
getPayloadCodec(): CborCodec;
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
1
|
+
import { TypeRegistry, NormalizedSchema } from "@smithy/core/schema";
|
|
2
2
|
import { HttpRequest } from "@smithy/protocol-http";
|
|
3
3
|
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, Schema, SerdeFunctions } from "@smithy/types";
|
|
4
4
|
import { HttpProtocol } from "./HttpProtocol";
|
|
@@ -9,6 +9,10 @@ import { HttpProtocol } from "./HttpProtocol";
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
|
12
|
+
/**
|
|
13
|
+
* @override
|
|
14
|
+
*/
|
|
15
|
+
protected compositeErrorRegistry: TypeRegistry;
|
|
12
16
|
serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
13
17
|
protected serializeQuery(ns: NormalizedSchema, data: any, query: HttpRequest["query"]): void;
|
|
14
18
|
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventStreamSerde } from "@smithy/core/event-streams";
|
|
2
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
|
+
import { NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
3
3
|
import { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
4
4
|
import { SerdeContext } from "./SerdeContext";
|
|
5
5
|
/**
|
|
@@ -10,11 +10,24 @@ import { SerdeContext } from "./SerdeContext";
|
|
|
10
10
|
export declare abstract class HttpProtocol extends SerdeContext implements ClientProtocol<IHttpRequest, IHttpResponse> {
|
|
11
11
|
readonly options: {
|
|
12
12
|
defaultNamespace: string;
|
|
13
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
13
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* An error registry having the namespace of the modeled service,
|
|
17
|
+
* but combining all error schemas found within the service closure.
|
|
18
|
+
*
|
|
19
|
+
* Used to look up error schema during deserialization.
|
|
20
|
+
*/
|
|
21
|
+
protected compositeErrorRegistry: TypeRegistry;
|
|
14
22
|
protected abstract serializer: ShapeSerializer<string | Uint8Array>;
|
|
15
23
|
protected abstract deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
24
|
+
/**
|
|
25
|
+
* @param options.defaultNamespace - used by various implementing classes.
|
|
26
|
+
* @param options.errorTypeRegistries - registry instances that contribute to error deserialization.
|
|
27
|
+
*/
|
|
16
28
|
protected constructor(options: {
|
|
17
29
|
defaultNamespace: string;
|
|
30
|
+
errorTypeRegistries?: TypeRegistry[];
|
|
18
31
|
});
|
|
19
32
|
abstract getShapeId(): string;
|
|
20
33
|
abstract getPayloadCodec(): Codec<any, any>;
|