@cdklabs/cdk-ecs-codedeploy 0.0.450 → 0.0.452
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/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 +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/package.json +6 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1328 -411
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +8 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{JsonCodec.js → codec-v1/JsonCodec.js} +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{JsonShapeDeserializer.js → codec-v1/JsonShapeDeserializer.js} +6 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{JsonShapeSerializer.js → codec-v1/JsonShapeSerializer.js} +8 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +103 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +20 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{experimental/BufferJsonShapeDeserializer.js → codec-v2/JsonShapeDeserializer2.js} +38 -18
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{experimental/ByteJsonShapeSerializer.js → codec-v2/JsonShapeSerializer2.js} +107 -71
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +93 -9
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +9 -6
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +4 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +5 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{JsonCodec.d.ts → codec-v1/JsonCodec.d.ts} +4 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{JsonShapeDeserializer.d.ts → codec-v1/JsonShapeDeserializer.d.ts} +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{JsonShapeSerializer.d.ts → codec-v1/JsonShapeSerializer.d.ts} +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{experimental/BufferJsonShapeDeserializer.d.ts → codec-v2/JsonShapeDeserializer2.d.ts} +4 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{experimental/ByteJsonShapeSerializer.d.ts → codec-v2/JsonShapeSerializer2.d.ts} +19 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/api-extractor-type-index.d.ts +4 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +61 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +13 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +4 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +5 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +16 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/emitWarningIfUnsupportedVersion.d.ts +4 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +107 -47
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +112 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +107 -48
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +13 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts +25 -35
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-logger/loggerMiddleware.d.ts +14 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/configuration.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.browser.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +2 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.native.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/check-features.d.ts +16 -20
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/configurations.d.ts +21 -44
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/constants.d.ts +7 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/encode-features.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/user-agent-middleware.d.ts +18 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/awsRegionConfig.d.ts +8 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/extensions.d.ts +14 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.browser.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.d.ts +7 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.native.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +6 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setFeature.d.ts +6 -12
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +6 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/aws.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.d.ts +4 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/parseArn.d.ts +2 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partition.d.ts +28 -38
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +647 -638
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/isIpAddress.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.d.ts +29 -56
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveEndpoint.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointError.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointRuleObject.d.ts +6 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/ErrorRuleObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/TreeRuleObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/shared.d.ts +12 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/configurations.d.ts +4 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.d.ts +7 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +7 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +18 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +13 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/crt-availability.d.ts +3 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +17 -28
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/is-crt-available.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.d.ts +4 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +9 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +39 -44
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +1 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +1 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +4 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +23 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +13 -38
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +57 -133
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.browser.d.ts +32 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +32 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +1 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.d.ts +1 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +2 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +1 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +6 -26
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +4 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/isClockSkewed.d.ts +1 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +5 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +40 -74
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +9 -24
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +36 -25
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/coercing-serializers.d.ts +3 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/common.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +30 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +22 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +22 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +50 -29
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +52 -36
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/awsExpectUnion.d.ts +1 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +18 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +27 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +9 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +15 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +39 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +7 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +7 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +2 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +14 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +18 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +57 -49
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +7 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +21 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +47 -31
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +17 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +15 -20
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/parseXmlBody.d.ts +4 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +1 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +3 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-arn-parser/arn.d.ts +14 -32
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-format-url/format-url.d.ts +4 -2
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/LoginCredentialsFetcher.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/LoginCredentialsFetcher.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1561 -337
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +4 -205
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +113 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +103 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +621 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +602 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/index.js +5 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +5 -27
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeDeserializer.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/CborShapeDeserializer2.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/CborShapeSerializer2.d.ts +35 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/index.d.ts +5 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +5 -27
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v1/CborShapeDeserializer.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/CborShapeDeserializer2.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/CborShapeSerializer2.d.ts +35 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/index.d.ts +5 -1
- package/node_modules/@smithy/core/package.json +2 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/package.json +2 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +0 -19
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +0 -28
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +0 -29
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +0 -57
|
@@ -2,7 +2,7 @@ import { determineTimestampFormat } from "@smithy/core/protocols";
|
|
|
2
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
3
|
import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from "@smithy/core/serde";
|
|
4
4
|
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
5
|
-
import {
|
|
5
|
+
import { JsonBytesStringAdapter } from "./JsonBytesStringAdapter";
|
|
6
6
|
const encoder = new TextEncoder();
|
|
7
7
|
const OPEN_BRACE = 0x7b;
|
|
8
8
|
const CLOSE_BRACE = 0x7d;
|
|
@@ -30,13 +30,15 @@ for (let i = 0; i < 0x20; i++) {
|
|
|
30
30
|
}
|
|
31
31
|
const INITIAL_BUFFER_SIZE = 2048;
|
|
32
32
|
function alloc(size) {
|
|
33
|
-
return
|
|
33
|
+
return JsonBytesStringAdapter.allocUnsafe(size);
|
|
34
34
|
}
|
|
35
|
-
export class
|
|
35
|
+
export class JsonShapeSerializer2 extends SerdeContextConfig {
|
|
36
36
|
settings;
|
|
37
37
|
json;
|
|
38
38
|
i = 0;
|
|
39
39
|
rootSchema;
|
|
40
|
+
rawValue;
|
|
41
|
+
passthrough = false;
|
|
40
42
|
constructor(settings) {
|
|
41
43
|
super();
|
|
42
44
|
this.settings = settings;
|
|
@@ -44,38 +46,25 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
44
46
|
}
|
|
45
47
|
write(schema, value) {
|
|
46
48
|
this.i = 0;
|
|
49
|
+
this.rawValue = value;
|
|
47
50
|
this.rootSchema = NormalizedSchema.of(schema);
|
|
48
|
-
this.
|
|
51
|
+
this.passthrough = this.rootSchema.isBlobSchema() || this.rootSchema.isStringSchema();
|
|
52
|
+
if (!this.passthrough) {
|
|
53
|
+
this.writeValue(this.rootSchema, value, undefined);
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
writeDiscriminatedDocument(schema, value) {
|
|
51
57
|
this.i = 0;
|
|
52
58
|
this.rootSchema = NormalizedSchema.of(schema);
|
|
53
59
|
const ns = this.rootSchema;
|
|
54
60
|
if (ns.isStructSchema() && value != null && typeof value === "object") {
|
|
55
|
-
this.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
63
|
-
const item = value[memberName];
|
|
64
|
-
if (item == null && !memberSchema.isIdempotencyToken()) {
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
if (wroteAny) {
|
|
68
|
-
this.ensure(1);
|
|
69
|
-
this.json[this.i++] = COMMA;
|
|
70
|
-
}
|
|
71
|
-
const targetKey = jsonName ? (memberSchema.getMergedTraits().jsonName ?? memberName) : memberName;
|
|
72
|
-
this.writeAsciiQuoted(targetKey);
|
|
73
|
-
this.json[this.i++] = COLON;
|
|
74
|
-
this.writeValue(memberSchema, item, ns);
|
|
75
|
-
wroteAny = true;
|
|
76
|
-
}
|
|
77
|
-
this.ensure(1);
|
|
78
|
-
this.json[this.i++] = CLOSE_BRACE;
|
|
61
|
+
this.writeValue(ns, value, undefined);
|
|
62
|
+
const prefix = `"__type":"${ns.getName(true) ?? "Unknown"}",`;
|
|
63
|
+
const z = prefix.length;
|
|
64
|
+
this.ensure(z);
|
|
65
|
+
this.json.copyWithin(1 + z, 1, this.i);
|
|
66
|
+
encoder.encodeInto(prefix, this.json.subarray(1));
|
|
67
|
+
this.i += z;
|
|
79
68
|
}
|
|
80
69
|
else {
|
|
81
70
|
this.writeValue(ns, value, undefined);
|
|
@@ -85,6 +74,11 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
85
74
|
this.rootSchema = undefined;
|
|
86
75
|
const finalPosition = this.i;
|
|
87
76
|
this.i = 0;
|
|
77
|
+
const raw = this.rawValue;
|
|
78
|
+
this.rawValue = undefined;
|
|
79
|
+
if (finalPosition === 0) {
|
|
80
|
+
return raw;
|
|
81
|
+
}
|
|
88
82
|
const result = this.json.subarray(0, finalPosition);
|
|
89
83
|
this.json = alloc(INITIAL_BUFFER_SIZE);
|
|
90
84
|
return result;
|
|
@@ -123,7 +117,7 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
123
117
|
this.i = i;
|
|
124
118
|
}
|
|
125
119
|
writeJsonString(s) {
|
|
126
|
-
this.ensure(s.length *
|
|
120
|
+
this.ensure(s.length * 3 + 2);
|
|
127
121
|
this.json[this.i++] = QUOTE;
|
|
128
122
|
const z = s.length;
|
|
129
123
|
for (let j = 0; j < z; ++j) {
|
|
@@ -150,7 +144,7 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
150
144
|
this.ensure(4);
|
|
151
145
|
const { written } = encoder.encodeInto(s.substring(j, j + 2), this.json.subarray(this.i));
|
|
152
146
|
this.i += written;
|
|
153
|
-
j
|
|
147
|
+
++j;
|
|
154
148
|
}
|
|
155
149
|
else {
|
|
156
150
|
this.ensure(6);
|
|
@@ -190,15 +184,16 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
190
184
|
static B64 = (() => {
|
|
191
185
|
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
192
186
|
const table = new Uint8Array(64);
|
|
193
|
-
for (let i = 0; i < 64; i
|
|
187
|
+
for (let i = 0; i < 64; ++i) {
|
|
194
188
|
table[i] = chars.charCodeAt(i);
|
|
189
|
+
}
|
|
195
190
|
return table;
|
|
196
191
|
})();
|
|
197
192
|
writeBase64(data) {
|
|
198
193
|
const b64Len = Math.ceil(data.length / 3) * 4;
|
|
199
194
|
this.ensure(b64Len + 2);
|
|
200
195
|
const json = this.json;
|
|
201
|
-
const B64 =
|
|
196
|
+
const B64 = JsonShapeSerializer2.B64;
|
|
202
197
|
let i = this.i;
|
|
203
198
|
json[i++] = QUOTE;
|
|
204
199
|
const len = data.length;
|
|
@@ -250,6 +245,16 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
250
245
|
}
|
|
251
246
|
const ns = NormalizedSchema.of(schema);
|
|
252
247
|
const isObject = typeof value === "object";
|
|
248
|
+
if (ns.isStringSchema()) {
|
|
249
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
250
|
+
if (mediaType) {
|
|
251
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
252
|
+
if (isJson) {
|
|
253
|
+
this.writeJsonString(LazyJsonString.from(value).toString());
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
253
258
|
if (isObject) {
|
|
254
259
|
if (ns.isStructSchema()) {
|
|
255
260
|
this.writeStruct(ns, value);
|
|
@@ -289,16 +294,6 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
289
294
|
return;
|
|
290
295
|
}
|
|
291
296
|
if (typeof value === "string") {
|
|
292
|
-
if (ns.isStringSchema()) {
|
|
293
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
294
|
-
if (mediaType) {
|
|
295
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
296
|
-
if (isJson) {
|
|
297
|
-
this.writeJsonString(LazyJsonString.from(value).toString());
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
297
|
if (ns.isBlobSchema()) {
|
|
303
298
|
const b64 = (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
304
299
|
this.writeAsciiQuoted(b64);
|
|
@@ -308,7 +303,7 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
308
303
|
return;
|
|
309
304
|
}
|
|
310
305
|
if (typeof value === "number") {
|
|
311
|
-
if (
|
|
306
|
+
if (Math.abs(value) === Infinity || Number.isNaN(value)) {
|
|
312
307
|
this.writeAsciiQuoted(String(value));
|
|
313
308
|
return;
|
|
314
309
|
}
|
|
@@ -318,14 +313,16 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
318
313
|
}
|
|
319
314
|
if (typeof value === "boolean") {
|
|
320
315
|
this.ensure(5);
|
|
316
|
+
let { i, json } = this;
|
|
321
317
|
if (value) {
|
|
322
|
-
|
|
323
|
-
|
|
318
|
+
json.set(TRUE, i);
|
|
319
|
+
i += 4;
|
|
324
320
|
}
|
|
325
321
|
else {
|
|
326
|
-
|
|
327
|
-
|
|
322
|
+
json.set(FALSE, i);
|
|
323
|
+
i += 5;
|
|
328
324
|
}
|
|
325
|
+
this.i = i;
|
|
329
326
|
return;
|
|
330
327
|
}
|
|
331
328
|
if (typeof value === "bigint") {
|
|
@@ -337,7 +334,6 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
337
334
|
writeStruct(ns, value) {
|
|
338
335
|
this.ensure(2);
|
|
339
336
|
this.json[this.i++] = OPEN_BRACE;
|
|
340
|
-
let first = true;
|
|
341
337
|
let wroteAny = false;
|
|
342
338
|
const hasType = typeof value.__type === "string";
|
|
343
339
|
let writtenKeys;
|
|
@@ -346,13 +342,13 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
346
342
|
}
|
|
347
343
|
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
348
344
|
const item = value[memberName];
|
|
349
|
-
if (item == null && !memberSchema.isIdempotencyToken())
|
|
345
|
+
if (item == null && !memberSchema.isIdempotencyToken()) {
|
|
350
346
|
continue;
|
|
351
|
-
|
|
347
|
+
}
|
|
348
|
+
if (wroteAny) {
|
|
352
349
|
this.ensure(1);
|
|
353
350
|
this.json[this.i++] = COMMA;
|
|
354
351
|
}
|
|
355
|
-
first = false;
|
|
356
352
|
wroteAny = true;
|
|
357
353
|
const targetKey = this.settings.jsonName ? (memberSchema.getMergedTraits().jsonName ?? memberName) : memberName;
|
|
358
354
|
if (writtenKeys) {
|
|
@@ -375,17 +371,17 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
375
371
|
}
|
|
376
372
|
else if (hasType) {
|
|
377
373
|
for (const k in value) {
|
|
378
|
-
|
|
379
|
-
if (writtenKeys.has(targetKey))
|
|
374
|
+
if (writtenKeys.has(k)) {
|
|
380
375
|
continue;
|
|
381
|
-
|
|
376
|
+
}
|
|
377
|
+
writtenKeys.add(k);
|
|
382
378
|
const v = value[k];
|
|
383
|
-
if (
|
|
379
|
+
if (wroteAny) {
|
|
384
380
|
this.ensure(1);
|
|
385
381
|
this.json[this.i++] = COMMA;
|
|
386
382
|
}
|
|
387
|
-
|
|
388
|
-
this.writeAsciiQuoted(
|
|
383
|
+
wroteAny = true;
|
|
384
|
+
this.writeAsciiQuoted(k);
|
|
389
385
|
this.ensure(1);
|
|
390
386
|
this.json[this.i++] = COLON;
|
|
391
387
|
this.writeValue(15, v, undefined);
|
|
@@ -395,20 +391,56 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
395
391
|
this.json[this.i++] = CLOSE_BRACE;
|
|
396
392
|
}
|
|
397
393
|
writeList(ns, value, isDocument) {
|
|
398
|
-
this.ensure(2);
|
|
399
|
-
this.json[this.i++] = OPEN_BRACKET;
|
|
400
394
|
const sparse = !!ns.getMergedTraits().sparse;
|
|
401
395
|
const valueSchema = ns.getValueSchema();
|
|
396
|
+
if (!isDocument) {
|
|
397
|
+
if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
|
|
398
|
+
let hasSpecials = false;
|
|
399
|
+
for (let i = 0; i < value.length; ++i) {
|
|
400
|
+
const v = value[i];
|
|
401
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity || (v == null && !sparse)) {
|
|
402
|
+
hasSpecials = true;
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
let json;
|
|
407
|
+
if (!hasSpecials) {
|
|
408
|
+
json = JSON.stringify(value);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
const out = [];
|
|
412
|
+
for (let i = 0; i < value.length; ++i) {
|
|
413
|
+
const v = value[i];
|
|
414
|
+
if (v == null && !sparse)
|
|
415
|
+
continue;
|
|
416
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
417
|
+
out.push(String(v));
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
out.push(v);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
json = JSON.stringify(out);
|
|
424
|
+
}
|
|
425
|
+
this.ensure(json.length * 3);
|
|
426
|
+
this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
this.ensure(2);
|
|
431
|
+
this.json[this.i++] = OPEN_BRACKET;
|
|
432
|
+
let wroteFirstItem = false;
|
|
402
433
|
for (let i = 0; i < value.length; ++i) {
|
|
403
434
|
const item = value[i];
|
|
404
435
|
if (isDocument ? item === undefined : item == null && !sparse) {
|
|
405
436
|
continue;
|
|
406
437
|
}
|
|
407
|
-
if (
|
|
438
|
+
if (wroteFirstItem) {
|
|
408
439
|
this.ensure(1);
|
|
409
440
|
this.json[this.i++] = COMMA;
|
|
410
441
|
}
|
|
411
442
|
this.writeValue(valueSchema, item, undefined);
|
|
443
|
+
wroteFirstItem = true;
|
|
412
444
|
}
|
|
413
445
|
this.ensure(1);
|
|
414
446
|
this.json[this.i++] = CLOSE_BRACKET;
|
|
@@ -418,20 +450,24 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
|
|
|
418
450
|
const valueSchema = ns.getValueSchema();
|
|
419
451
|
if (!isDocument) {
|
|
420
452
|
if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
|
|
421
|
-
let
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
453
|
+
let modifications;
|
|
454
|
+
for (const k in value) {
|
|
455
|
+
const v = value[k];
|
|
456
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
457
|
+
(modifications ??= {})[k] = v;
|
|
458
|
+
value[k] = String(v);
|
|
459
|
+
}
|
|
460
|
+
else if (v === null && !sparse) {
|
|
461
|
+
(modifications ??= {})[k] = null;
|
|
462
|
+
value[k] = undefined;
|
|
429
463
|
}
|
|
430
464
|
}
|
|
431
|
-
const json = JSON.stringify(
|
|
465
|
+
const json = JSON.stringify(value);
|
|
466
|
+
if (modifications) {
|
|
467
|
+
Object.assign(value, modifications);
|
|
468
|
+
}
|
|
432
469
|
this.ensure(json.length * 3);
|
|
433
|
-
|
|
434
|
-
this.i += written;
|
|
470
|
+
this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
|
|
435
471
|
return;
|
|
436
472
|
}
|
|
437
473
|
}
|
|
@@ -4,25 +4,26 @@ export function jsonReviver(key, value, context) {
|
|
|
4
4
|
const numericString = context.source;
|
|
5
5
|
if (typeof value === "number") {
|
|
6
6
|
const inSafeRange = value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER;
|
|
7
|
-
if (
|
|
8
|
-
if (
|
|
7
|
+
if (inSafeRange) {
|
|
8
|
+
if (isRepresentable(numericString, value)) {
|
|
9
9
|
return value;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
return new NumericValue(numericString, "bigDecimal");
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
if (isFractionalBigNumeric(numericString)) {
|
|
12
15
|
return new NumericValue(numericString, "bigDecimal");
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return BigInt(Number(numericString));
|
|
17
|
-
}
|
|
18
|
-
return BigInt(numericString);
|
|
17
|
+
if (/[eE]/.test(numericString)) {
|
|
18
|
+
return expandExponentToBigInt(numericString);
|
|
19
19
|
}
|
|
20
|
+
return BigInt(numericString);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
return value;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function isFractionalBigNumeric(s) {
|
|
26
27
|
const dotIndex = s.indexOf(".");
|
|
27
28
|
if (dotIndex === -1) {
|
|
28
29
|
return false;
|
|
@@ -35,3 +36,86 @@ function isFractionalNumeric(s) {
|
|
|
35
36
|
const exp = parseInt(s.slice(eIndex + 1), 10);
|
|
36
37
|
return exp < fracDigits;
|
|
37
38
|
}
|
|
39
|
+
function isRepresentable(numericString, value) {
|
|
40
|
+
if (numericString === String(value)) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
if (Object.is(value, -0)) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
if (/[eE]/.test(numericString)) {
|
|
47
|
+
return expandToDecimal(numericString) === expandToDecimal(String(value));
|
|
48
|
+
}
|
|
49
|
+
const normalized = numericString.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
50
|
+
const canonical = String(value);
|
|
51
|
+
if (normalized === canonical) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
if (/[eE]/.test(canonical)) {
|
|
55
|
+
return normalized === expandToDecimal(canonical);
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
function expandToDecimal(s) {
|
|
60
|
+
const negative = s.startsWith("-");
|
|
61
|
+
const abs = negative ? s.slice(1) : s;
|
|
62
|
+
const eIndex = abs.search(/[eE]/);
|
|
63
|
+
let result;
|
|
64
|
+
if (eIndex === -1) {
|
|
65
|
+
result = abs;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const exp = parseInt(abs.slice(eIndex + 1), 10);
|
|
69
|
+
const mantissa = abs.slice(0, eIndex);
|
|
70
|
+
const dotIndex = mantissa.indexOf(".");
|
|
71
|
+
let digits;
|
|
72
|
+
let intLen;
|
|
73
|
+
if (dotIndex === -1) {
|
|
74
|
+
digits = mantissa;
|
|
75
|
+
intLen = mantissa.length;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
|
|
79
|
+
intLen = dotIndex;
|
|
80
|
+
}
|
|
81
|
+
digits = digits.replace(/0+$/, "") || "0";
|
|
82
|
+
const newDotPos = intLen + exp;
|
|
83
|
+
if (digits === "0") {
|
|
84
|
+
result = "0";
|
|
85
|
+
}
|
|
86
|
+
else if (newDotPos <= 0) {
|
|
87
|
+
result = "0." + "0".repeat(-newDotPos) + digits;
|
|
88
|
+
}
|
|
89
|
+
else if (newDotPos >= digits.length) {
|
|
90
|
+
result = digits + "0".repeat(newDotPos - digits.length);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
result = digits.slice(0, newDotPos) + "." + digits.slice(newDotPos);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (result.includes(".")) {
|
|
97
|
+
result = result.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
98
|
+
}
|
|
99
|
+
return (negative ? "-" : "") + result;
|
|
100
|
+
}
|
|
101
|
+
function expandExponentToBigInt(s) {
|
|
102
|
+
const eIndex = s.search(/[eE]/);
|
|
103
|
+
const exp = parseInt(s.slice(eIndex + 1), 10);
|
|
104
|
+
const negative = s.startsWith("-");
|
|
105
|
+
const mantissa = s.slice(negative ? 1 : 0, eIndex);
|
|
106
|
+
const dotIndex = mantissa.indexOf(".");
|
|
107
|
+
let digits;
|
|
108
|
+
let shift;
|
|
109
|
+
if (dotIndex === -1) {
|
|
110
|
+
digits = mantissa;
|
|
111
|
+
shift = exp;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
|
|
115
|
+
const fracDigits = mantissa.length - dotIndex - 1;
|
|
116
|
+
shift = exp - fracDigits;
|
|
117
|
+
}
|
|
118
|
+
digits = digits.replace(/0+$/, "") || "0";
|
|
119
|
+
const result = BigInt(digits) * 10n ** BigInt(shift + (mantissa.replace(".", "").length - digits.length));
|
|
120
|
+
return negative ? -result : result;
|
|
121
|
+
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { AwsSmithyRpcV2CborProtocol } from "./cbor/AwsSmithyRpcV2CborProtocol";
|
|
2
|
-
export { _toStr, _toBool, _toNum } from "./coercing-serializers";
|
|
3
2
|
export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
|
|
4
3
|
export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
|
|
5
4
|
export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
|
|
6
5
|
export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
|
|
7
|
-
export { JsonCodec } from "./json/JsonCodec";
|
|
8
|
-
export type { JsonSettings } from "./json/
|
|
9
|
-
export { JsonShapeDeserializer } from "./json/JsonShapeDeserializer";
|
|
10
|
-
export { JsonShapeSerializer } from "./json/JsonShapeSerializer";
|
|
11
|
-
export {
|
|
6
|
+
export { JsonCodec } from "./json/codec-v1/JsonCodec";
|
|
7
|
+
export type { JsonSettings } from "./json/JsonSettings";
|
|
8
|
+
export { JsonShapeDeserializer } from "./json/codec-v1/JsonShapeDeserializer";
|
|
9
|
+
export { JsonShapeSerializer } from "./json/codec-v1/JsonShapeSerializer";
|
|
10
|
+
export { JsonCodec2 } from "./json/codec-v2/JsonCodec2";
|
|
11
|
+
export { JsonShapeDeserializer2 } from "./json/codec-v2/JsonShapeDeserializer2";
|
|
12
|
+
export { JsonShapeSerializer2 } from "./json/codec-v2/JsonShapeSerializer2";
|
|
12
13
|
export { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode, loadJsonRpcErrorCode } from "./json/parseJsonBody";
|
|
13
14
|
export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
|
|
14
15
|
export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
|
|
@@ -20,3 +21,5 @@ export type { XmlSettings } from "./xml/XmlCodec";
|
|
|
20
21
|
export { XmlShapeDeserializer } from "./xml/XmlShapeDeserializer";
|
|
21
22
|
export { XmlShapeSerializer } from "./xml/XmlShapeSerializer";
|
|
22
23
|
export { parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode } from "./xml/parseXmlBody";
|
|
24
|
+
export { awsExpectUnion } from "./json/awsExpectUnion";
|
|
25
|
+
export { _toStr, _toBool, _toNum } from "./coercing-serializers";
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TypeRegistry } from "@smithy/core/schema";
|
|
2
2
|
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
|
|
3
|
-
import type { JsonCodec } from "./JsonCodec";
|
|
3
|
+
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
4
|
+
import type { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
4
5
|
/**
|
|
5
6
|
* @public
|
|
6
7
|
* @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
|
|
@@ -11,7 +12,7 @@ export declare class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
|
11
12
|
errorTypeRegistries?: TypeRegistry[];
|
|
12
13
|
serviceTarget: string;
|
|
13
14
|
awsQueryCompatible?: boolean;
|
|
14
|
-
jsonCodec?: JsonCodec;
|
|
15
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
15
16
|
});
|
|
16
17
|
getShapeId(): string;
|
|
17
18
|
protected getJsonRpcVersion(): "1.0";
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TypeRegistry } from "@smithy/core/schema";
|
|
2
2
|
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
|
|
3
|
-
import type { JsonCodec } from "./JsonCodec";
|
|
3
|
+
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
4
|
+
import type { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
4
5
|
/**
|
|
5
6
|
* @public
|
|
6
7
|
* @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
|
|
@@ -11,7 +12,7 @@ export declare class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
|
|
|
11
12
|
errorTypeRegistries?: TypeRegistry[];
|
|
12
13
|
serviceTarget: string;
|
|
13
14
|
awsQueryCompatible?: boolean;
|
|
14
|
-
jsonCodec?: JsonCodec;
|
|
15
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
15
16
|
});
|
|
16
17
|
getShapeId(): string;
|
|
17
18
|
protected getJsonRpcVersion(): "1.1";
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
2
|
import type { TypeRegistry } from "@smithy/core/schema";
|
|
3
3
|
import type { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
4
|
-
import { JsonCodec } from "./JsonCodec";
|
|
4
|
+
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
5
|
+
import { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
5
6
|
/**
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
@@ -17,10 +18,10 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
17
18
|
errorTypeRegistries?: TypeRegistry[];
|
|
18
19
|
serviceTarget: string;
|
|
19
20
|
awsQueryCompatible?: boolean;
|
|
20
|
-
jsonCodec?: JsonCodec;
|
|
21
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
21
22
|
});
|
|
22
23
|
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<HttpRequest>;
|
|
23
|
-
getPayloadCodec(): JsonCodec;
|
|
24
|
+
getPayloadCodec(): JsonCodec | JsonCodec2;
|
|
24
25
|
protected abstract getJsonRpcVersion(): "1.1" | "1.0";
|
|
25
26
|
/**
|
|
26
27
|
* @override
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { HttpBindingProtocol } from "@smithy/core/protocols";
|
|
2
2
|
import type { TypeRegistry } from "@smithy/core/schema";
|
|
3
3
|
import type { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
4
|
-
import { JsonCodec } from "./JsonCodec";
|
|
4
|
+
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
5
|
+
import { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
5
6
|
/**
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
@@ -10,12 +11,13 @@ export declare class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
10
11
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
11
12
|
private readonly codec;
|
|
12
13
|
private readonly mixin;
|
|
13
|
-
constructor({ defaultNamespace, errorTypeRegistries, }: {
|
|
14
|
+
constructor({ defaultNamespace, errorTypeRegistries, jsonCodec, }: {
|
|
14
15
|
defaultNamespace: string;
|
|
15
16
|
errorTypeRegistries?: TypeRegistry[];
|
|
17
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
16
18
|
});
|
|
17
19
|
getShapeId(): string;
|
|
18
|
-
getPayloadCodec(): JsonCodec;
|
|
20
|
+
getPayloadCodec(): JsonCodec | JsonCodec2;
|
|
19
21
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
20
22
|
/**
|
|
21
23
|
* @override
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import type { Codec
|
|
2
|
-
import { SerdeContextConfig } from "
|
|
1
|
+
import type { Codec } from "@smithy/types";
|
|
2
|
+
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
3
3
|
import { JsonShapeDeserializer } from "./JsonShapeDeserializer";
|
|
4
4
|
import { JsonShapeSerializer } from "./JsonShapeSerializer";
|
|
5
|
+
import type { JsonSettings } from "./JsonSettings";
|
|
5
6
|
/**
|
|
6
|
-
* @
|
|
7
|
-
*/
|
|
8
|
-
export type JsonSettings = CodecSettings & {
|
|
9
|
-
jsonName: boolean;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
7
|
+
* @deprecated use JsonCodec2.
|
|
12
8
|
* @public
|
|
13
9
|
*/
|
|
14
10
|
export declare class JsonCodec extends SerdeContextConfig implements Codec<string, string> {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
|
|
2
|
-
import { SerdeContextConfig } from "
|
|
3
|
-
import type { JsonSettings } from "./
|
|
2
|
+
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
3
|
+
import type { JsonSettings } from "./JsonSettings";
|
|
4
4
|
/**
|
|
5
|
+
* @deprecated prefer JsonShapeDeserializer in codec-v2.
|
|
5
6
|
* @public
|
|
6
7
|
*/
|
|
7
8
|
export declare class JsonShapeDeserializer extends SerdeContextConfig implements ShapeDeserializer<string> {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
2
|
import type { Schema, ShapeSerializer } from "@smithy/types";
|
|
3
|
-
import { SerdeContextConfig } from "
|
|
4
|
-
import type { JsonSettings } from "./
|
|
3
|
+
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
4
|
+
import type { JsonSettings } from "./JsonSettings";
|
|
5
5
|
/**
|
|
6
|
+
* @deprecated prefer byte-targeting JsonShapeSerializer or its string adapter StringJsonShapeSerializer in codec-v2.
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
8
9
|
export declare class JsonShapeSerializer extends SerdeContextConfig implements ShapeSerializer<string> {
|