@cdk8s/awscdk-resolver 0.0.374 → 0.0.376
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 +2 -2
- package/lib/resolve.js +1 -1
- package/node_modules/@smithy/abort-controller/dist-cjs/index.js +28 -80
- package/node_modules/@smithy/abort-controller/dist-es/AbortController.js +1 -3
- package/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js +2 -2
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/dist-cjs/index.js +158 -215
- package/node_modules/@smithy/config-resolver/package.json +5 -5
- package/node_modules/@smithy/core/dist-cjs/index.js +308 -412
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +957 -969
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +198 -249
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +793 -895
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +617 -811
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +584 -680
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +4 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +3 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +18 -18
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +9 -7
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +3 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +6 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +16 -8
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +6 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +6 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +14 -14
- package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +2 -0
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +1 -1
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +4 -2
- package/node_modules/@smithy/core/package.json +11 -11
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +340 -412
- package/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js +2 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +190 -238
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +2 -0
- package/node_modules/@smithy/fetch-http-handler/package.json +6 -6
- package/node_modules/@smithy/hash-node/dist-cjs/index.js +38 -63
- package/node_modules/@smithy/hash-node/dist-es/index.js +3 -0
- package/node_modules/@smithy/hash-node/package.json +4 -4
- package/node_modules/@smithy/invalid-dependency/dist-cjs/index.js +7 -38
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +4 -30
- package/node_modules/@smithy/is-array-buffer/package.json +1 -1
- package/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +39 -64
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +1 -1
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +219 -277
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +327 -380
- package/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.browser.js +1 -1
- package/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +2 -2
- package/node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js +1 -0
- package/node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js +5 -1
- package/node_modules/@smithy/middleware-retry/package.json +9 -9
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +89 -118
- package/node_modules/@smithy/middleware-serde/package.json +3 -3
- package/node_modules/@smithy/middleware-stack/dist-cjs/index.js +274 -297
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/dist-cjs/index.js +51 -98
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +663 -771
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +5 -3
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +4 -2
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +3 -1
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +1 -4
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +3 -1
- package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +1 -1
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/dist-cjs/index.js +105 -158
- package/node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js +1 -1
- package/node_modules/@smithy/property-provider/dist-es/ProviderError.js +2 -1
- package/node_modules/@smithy/property-provider/dist-es/TokenProviderError.js +1 -1
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/dist-cjs/index.js +154 -246
- package/node_modules/@smithy/protocol-http/dist-es/Field.js +3 -0
- package/node_modules/@smithy/protocol-http/dist-es/Fields.js +2 -1
- package/node_modules/@smithy/protocol-http/dist-es/httpRequest.js +11 -0
- package/node_modules/@smithy/protocol-http/dist-es/httpResponse.js +4 -0
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/dist-cjs/index.js +21 -47
- package/node_modules/@smithy/querystring-builder/package.json +3 -3
- package/node_modules/@smithy/querystring-parser/dist-cjs/index.js +22 -48
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +70 -103
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +171 -210
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +1 -1
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +525 -648
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +1 -1
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +6 -0
- package/node_modules/@smithy/signature-v4/package.json +8 -8
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +554 -747
- package/node_modules/@smithy/smithy-client/dist-es/client.js +4 -1
- package/node_modules/@smithy/smithy-client/dist-es/command.js +17 -18
- package/node_modules/@smithy/smithy-client/dist-es/exceptions.js +4 -0
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-cjs/index.js +80 -133
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/dist-cjs/index.js +20 -46
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-base64/dist-cjs/index.js +16 -24
- package/node_modules/@smithy/util-base64/package.json +3 -3
- package/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +26 -50
- package/node_modules/@smithy/util-body-length-browser/package.json +1 -1
- package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +27 -50
- package/node_modules/@smithy/util-body-length-node/package.json +1 -1
- package/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +17 -44
- package/node_modules/@smithy/util-buffer-from/package.json +2 -2
- package/node_modules/@smithy/util-config-provider/dist-cjs/index.js +26 -56
- package/node_modules/@smithy/util-config-provider/package.json +1 -1
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js +9 -22
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +4 -5
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.native.js +2 -2
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +65 -110
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +445 -526
- package/node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js +3 -2
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +29 -58
- package/node_modules/@smithy/util-hex-encoding/package.json +1 -1
- package/node_modules/@smithy/util-middleware/dist-cjs/index.js +11 -40
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +260 -340
- package/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +4 -1
- package/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +1 -0
- package/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +17 -8
- package/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +5 -3
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +3 -2
- package/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +7 -3
- package/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +2 -3
- package/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +1 -1
- package/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +2 -3
- package/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +1 -2
- package/node_modules/@smithy/util-stream/dist-cjs/headStream.js +4 -8
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +83 -93
- package/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +1 -2
- package/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +1 -2
- package/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +3 -7
- package/node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js +3 -2
- package/node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.js +5 -0
- package/node_modules/@smithy/util-stream/dist-es/headStream.js +3 -6
- package/node_modules/@smithy/util-stream/package.json +8 -8
- package/node_modules/@smithy/util-uri-escape/dist-cjs/index.js +6 -40
- package/node_modules/@smithy/util-uri-escape/package.json +1 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/index.js +27 -60
- package/node_modules/@smithy/util-utf8/package.json +2 -2
- package/node_modules/@smithy/util-waiter/dist-cjs/index.js +152 -189
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/node_modules/@smithy/uuid/dist-cjs/index.js +33 -42
- package/node_modules/@smithy/uuid/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js +0 -1
- package/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/index.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveCustomEndpointsConfig.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveEndpointsConfig.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/utils/getEndpointFromRegion.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/getRealRegion.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/index.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/isFipsRegion.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariant.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariantTag.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/PartitionHash.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/RegionHash.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getHostnameFromVariants.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getRegionInfo.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedHostname.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedPartition.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedSigningRegion.js +0 -1
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/index.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/Endpoint.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointConfigOptions.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointMode.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointModeConfigOptions.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/error/InstanceMetadataV1FallbackError.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/fromContainerMetadata.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/fromInstanceMetadata.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/ImdsCredentials.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/RemoteProviderInit.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/httpRequest.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/index.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/retry.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/types.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getExtendedInstanceMetadataCredentials.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getInstanceMetadataEndpoint.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/staticStabilityProvider.js +0 -1
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/create-request.js +0 -1
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js +0 -1
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js +0 -1
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js +0 -1
- package/node_modules/@smithy/invalid-dependency/dist-cjs/invalidFunction.js +0 -1
- package/node_modules/@smithy/invalid-dependency/dist-cjs/invalidProvider.js +0 -1
- package/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js +0 -1
- package/node_modules/@smithy/middleware-serde/dist-cjs/serdePlugin.js +0 -1
- package/node_modules/@smithy/middleware-serde/dist-cjs/serializerMiddleware.js +0 -1
- package/node_modules/@smithy/middleware-stack/dist-cjs/MiddlewareStack.js +0 -1
- package/node_modules/@smithy/middleware-stack/dist-cjs/types.js +0 -1
- package/node_modules/@smithy/node-config-provider/dist-cjs/configLoader.js +0 -1
- package/node_modules/@smithy/node-config-provider/dist-cjs/fromEnv.js +0 -1
- package/node_modules/@smithy/node-config-provider/dist-cjs/fromSharedConfigFiles.js +0 -1
- package/node_modules/@smithy/node-config-provider/dist-cjs/fromStatic.js +0 -1
- package/node_modules/@smithy/node-config-provider/dist-cjs/getSelectorName.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/constants.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/index.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/timing.js +0 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js +0 -1
- package/node_modules/@smithy/property-provider/dist-cjs/CredentialsProviderError.js +0 -1
- package/node_modules/@smithy/property-provider/dist-cjs/ProviderError.js +0 -1
- package/node_modules/@smithy/property-provider/dist-cjs/TokenProviderError.js +0 -1
- package/node_modules/@smithy/property-provider/dist-cjs/chain.js +0 -1
- package/node_modules/@smithy/property-provider/dist-cjs/fromStatic.js +0 -1
- package/node_modules/@smithy/property-provider/dist-cjs/memoize.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/Field.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/Fields.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js +0 -1
- package/node_modules/@smithy/protocol-http/dist-cjs/types.js +0 -1
- package/node_modules/@smithy/service-error-classification/dist-cjs/constants.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/externalDataInterceptor.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js +0 -1
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/HeaderFormatter.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4Base.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/constants.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/credentialDerivation.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalHeaders.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalQuery.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/getPayloadHash.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/headerUtil.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/moveHeadersToQuery.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/prepareRequest.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/signature-v4a-container.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/suite.fixture.js +0 -1
- package/node_modules/@smithy/signature-v4/dist-cjs/utilDate.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/abort-handler.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/abort.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/auth/auth.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/auth/index.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/checksum.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/client.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/command.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/connection/config.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/connection/index.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/connection/manager.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/connection/pool.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/crypto.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/encode.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/endpoint.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/endpoints/index.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/eventStream.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/extensions/checksum.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/extensions/index.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/extensions/retry.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/feature-ids.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/http.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/identity/identity.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/identity/index.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/logger.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/middleware.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/pagination.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/profile.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/response.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/retry.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/schema/schema.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/schema/sentinels.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/schema/traits.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/serde.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/shapes.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/signature.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/stream.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/transfer.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/transform/exact.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/transform/mutable.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/transform/type-transform.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/uri.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/util.js +0 -1
- package/node_modules/@smithy/types/dist-cjs/waiter.js +0 -1
- package/node_modules/@smithy/util-body-length-browser/dist-cjs/calculateBodyLength.js +0 -1
- package/node_modules/@smithy/util-body-length-node/dist-cjs/calculateBodyLength.js +0 -1
- package/node_modules/@smithy/util-config-provider/dist-cjs/booleanSelector.js +0 -1
- package/node_modules/@smithy/util-config-provider/dist-cjs/numberSelector.js +0 -1
- package/node_modules/@smithy/util-config-provider/dist-cjs/types.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/cache/EndpointCache.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/debug/debugId.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/debug/index.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/debug/toDebugString.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/getEndpointUrlConfig.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/booleanEquals.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttr.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttrPathList.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/index.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isIpAddress.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isSet.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isValidHostLabel.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/not.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/parseURL.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/stringEquals.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/substring.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/uriEncode.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/resolveEndpoint.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointError.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointFunctions.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointRuleObject.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/ErrorRuleObject.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/RuleSetObject.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/TreeRuleObject.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/index.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/shared.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/callFunction.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/customEndpointFunctions.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/endpointFunctions.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateCondition.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateConditions.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateErrorRule.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateExpression.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateRules.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTemplate.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTreeRule.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointHeaders.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperties.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperty.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointUrl.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getReferenceValue.js +0 -1
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/index.js +0 -1
- package/node_modules/@smithy/util-middleware/dist-cjs/getSmithyContext.js +0 -1
- package/node_modules/@smithy/util-middleware/dist-cjs/normalizeProvider.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/AdaptiveRetryStrategy.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/ConfiguredRetryStrategy.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/DefaultRateLimiter.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/StandardRetryStrategy.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/config.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/constants.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/defaultRetryBackoffStrategy.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/defaultRetryToken.js +0 -1
- package/node_modules/@smithy/util-retry/dist-cjs/types.js +0 -1
- package/node_modules/@smithy/util-stream/dist-cjs/blob/Uint8ArrayBlobAdapter.js +0 -1
- package/node_modules/@smithy/util-stream/dist-cjs/blob/transforms.js +0 -1
- package/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri-path.js +0 -1
- package/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +0 -1
- package/node_modules/@smithy/util-waiter/dist-cjs/createWaiter.js +0 -1
- package/node_modules/@smithy/util-waiter/dist-cjs/poller.js +0 -1
- package/node_modules/@smithy/util-waiter/dist-cjs/utils/index.js +0 -1
- package/node_modules/@smithy/util-waiter/dist-cjs/utils/sleep.js +0 -1
- package/node_modules/@smithy/util-waiter/dist-cjs/utils/validate.js +0 -1
- package/node_modules/@smithy/util-waiter/dist-cjs/waiter.js +0 -1
- package/node_modules/@smithy/uuid/dist-cjs/randomUUID.browser.js +0 -1
- package/node_modules/@smithy/uuid/dist-cjs/v4.js +0 -1
|
@@ -1,926 +1,824 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
28
2
|
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer,
|
|
36
|
-
HttpProtocol: () => HttpProtocol,
|
|
37
|
-
RequestBuilder: () => RequestBuilder,
|
|
38
|
-
RpcProtocol: () => RpcProtocol,
|
|
39
|
-
ToStringShapeSerializer: () => ToStringShapeSerializer,
|
|
40
|
-
collectBody: () => collectBody,
|
|
41
|
-
determineTimestampFormat: () => determineTimestampFormat,
|
|
42
|
-
extendedEncodeURIComponent: () => extendedEncodeURIComponent,
|
|
43
|
-
requestBuilder: () => requestBuilder,
|
|
44
|
-
resolvedPath: () => resolvedPath
|
|
45
|
-
});
|
|
46
|
-
module.exports = __toCommonJS(index_exports);
|
|
3
|
+
var utilStream = require('@smithy/util-stream');
|
|
4
|
+
var schema = require('@smithy/core/schema');
|
|
5
|
+
var serde = require('@smithy/core/serde');
|
|
6
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
7
|
+
var utilBase64 = require('@smithy/util-base64');
|
|
8
|
+
var utilUtf8 = require('@smithy/util-utf8');
|
|
47
9
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const fromContext = context.streamCollector(streamBody);
|
|
58
|
-
return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
10
|
+
const collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
11
|
+
if (streamBody instanceof Uint8Array) {
|
|
12
|
+
return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
13
|
+
}
|
|
14
|
+
if (!streamBody) {
|
|
15
|
+
return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
16
|
+
}
|
|
17
|
+
const fromContext = context.streamCollector(streamBody);
|
|
18
|
+
return utilStream.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
59
19
|
};
|
|
60
20
|
|
|
61
|
-
// src/submodules/protocols/extended-encode-uri-component.ts
|
|
62
21
|
function extendedEncodeURIComponent(str) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
22
|
+
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
|
|
23
|
+
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
24
|
+
});
|
|
66
25
|
}
|
|
67
26
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return eventStreamSerde.deserializeEventStream({
|
|
183
|
-
response,
|
|
184
|
-
responseSchema,
|
|
185
|
-
initialResponseContainer
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Loads eventStream capability async (for chunking).
|
|
190
|
-
*/
|
|
191
|
-
async loadEventStreamCapability() {
|
|
192
|
-
const { EventStreamSerde } = await Promise.resolve().then(() => __toESM(require("@smithy/core/event-streams")));
|
|
193
|
-
return new EventStreamSerde({
|
|
194
|
-
marshaller: this.getEventStreamMarshaller(),
|
|
195
|
-
serializer: this.serializer,
|
|
196
|
-
deserializer: this.deserializer,
|
|
197
|
-
serdeContext: this.serdeContext,
|
|
198
|
-
defaultContentType: this.getDefaultContentType()
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* @returns content-type default header value for event stream events and other documents.
|
|
203
|
-
*/
|
|
204
|
-
getDefaultContentType() {
|
|
205
|
-
throw new Error(
|
|
206
|
-
`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
210
|
-
void schema;
|
|
211
|
-
void context;
|
|
212
|
-
void response;
|
|
213
|
-
void arg4;
|
|
214
|
-
void arg5;
|
|
215
|
-
return [];
|
|
216
|
-
}
|
|
217
|
-
getEventStreamMarshaller() {
|
|
218
|
-
const context = this.serdeContext;
|
|
219
|
-
if (!context.eventStreamMarshaller) {
|
|
220
|
-
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
221
|
-
}
|
|
222
|
-
return context.eventStreamMarshaller;
|
|
223
|
-
}
|
|
224
|
-
};
|
|
27
|
+
class HttpProtocol {
|
|
28
|
+
options;
|
|
29
|
+
serdeContext;
|
|
30
|
+
constructor(options) {
|
|
31
|
+
this.options = options;
|
|
32
|
+
}
|
|
33
|
+
getRequestType() {
|
|
34
|
+
return protocolHttp.HttpRequest;
|
|
35
|
+
}
|
|
36
|
+
getResponseType() {
|
|
37
|
+
return protocolHttp.HttpResponse;
|
|
38
|
+
}
|
|
39
|
+
setSerdeContext(serdeContext) {
|
|
40
|
+
this.serdeContext = serdeContext;
|
|
41
|
+
this.serializer.setSerdeContext(serdeContext);
|
|
42
|
+
this.deserializer.setSerdeContext(serdeContext);
|
|
43
|
+
if (this.getPayloadCodec()) {
|
|
44
|
+
this.getPayloadCodec().setSerdeContext(serdeContext);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
updateServiceEndpoint(request, endpoint) {
|
|
48
|
+
if ("url" in endpoint) {
|
|
49
|
+
request.protocol = endpoint.url.protocol;
|
|
50
|
+
request.hostname = endpoint.url.hostname;
|
|
51
|
+
request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;
|
|
52
|
+
request.path = endpoint.url.pathname;
|
|
53
|
+
request.fragment = endpoint.url.hash || void 0;
|
|
54
|
+
request.username = endpoint.url.username || void 0;
|
|
55
|
+
request.password = endpoint.url.password || void 0;
|
|
56
|
+
for (const [k, v] of endpoint.url.searchParams.entries()) {
|
|
57
|
+
if (!request.query) {
|
|
58
|
+
request.query = {};
|
|
59
|
+
}
|
|
60
|
+
request.query[k] = v;
|
|
61
|
+
}
|
|
62
|
+
return request;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
request.protocol = endpoint.protocol;
|
|
66
|
+
request.hostname = endpoint.hostname;
|
|
67
|
+
request.port = endpoint.port ? Number(endpoint.port) : undefined;
|
|
68
|
+
request.path = endpoint.path;
|
|
69
|
+
request.query = {
|
|
70
|
+
...endpoint.query,
|
|
71
|
+
};
|
|
72
|
+
return request;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
setHostPrefix(request, operationSchema, input) {
|
|
76
|
+
const operationNs = schema.NormalizedSchema.of(operationSchema);
|
|
77
|
+
const inputNs = schema.NormalizedSchema.of(operationSchema.input);
|
|
78
|
+
if (operationNs.getMergedTraits().endpoint) {
|
|
79
|
+
let hostPrefix = operationNs.getMergedTraits().endpoint?.[0];
|
|
80
|
+
if (typeof hostPrefix === "string") {
|
|
81
|
+
const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel);
|
|
82
|
+
for (const [name] of hostLabelInputs) {
|
|
83
|
+
const replacement = input[name];
|
|
84
|
+
if (typeof replacement !== "string") {
|
|
85
|
+
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
|
86
|
+
}
|
|
87
|
+
hostPrefix = hostPrefix.replace(`{${name}}`, replacement);
|
|
88
|
+
}
|
|
89
|
+
request.hostname = hostPrefix + request.hostname;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
deserializeMetadata(output) {
|
|
94
|
+
return {
|
|
95
|
+
httpStatusCode: output.statusCode,
|
|
96
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
97
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
98
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {
|
|
102
|
+
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
103
|
+
return eventStreamSerde.serializeEventStream({
|
|
104
|
+
eventStream,
|
|
105
|
+
requestSchema,
|
|
106
|
+
initialRequest,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {
|
|
110
|
+
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
111
|
+
return eventStreamSerde.deserializeEventStream({
|
|
112
|
+
response,
|
|
113
|
+
responseSchema,
|
|
114
|
+
initialResponseContainer,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
async loadEventStreamCapability() {
|
|
118
|
+
const { EventStreamSerde } = await import('@smithy/core/event-streams');
|
|
119
|
+
return new EventStreamSerde({
|
|
120
|
+
marshaller: this.getEventStreamMarshaller(),
|
|
121
|
+
serializer: this.serializer,
|
|
122
|
+
deserializer: this.deserializer,
|
|
123
|
+
serdeContext: this.serdeContext,
|
|
124
|
+
defaultContentType: this.getDefaultContentType(),
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
getDefaultContentType() {
|
|
128
|
+
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
129
|
+
}
|
|
130
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
133
|
+
getEventStreamMarshaller() {
|
|
134
|
+
const context = this.serdeContext;
|
|
135
|
+
if (!context.eventStreamMarshaller) {
|
|
136
|
+
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
137
|
+
}
|
|
138
|
+
return context.eventStreamMarshaller;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
225
141
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
267
|
-
const memberTraits = memberNs.getMergedTraits() ?? {};
|
|
268
|
-
const inputMemberValue = input[memberName];
|
|
269
|
-
if (inputMemberValue == null) {
|
|
270
|
-
continue;
|
|
271
|
-
}
|
|
272
|
-
if (memberTraits.httpPayload) {
|
|
273
|
-
const isStreaming = memberNs.isStreaming();
|
|
274
|
-
if (isStreaming) {
|
|
275
|
-
const isEventStream = memberNs.isStructSchema();
|
|
276
|
-
if (isEventStream) {
|
|
277
|
-
if (input[memberName]) {
|
|
278
|
-
payload = await this.serializeEventStream({
|
|
279
|
-
eventStream: input[memberName],
|
|
280
|
-
requestSchema: ns
|
|
281
|
-
});
|
|
142
|
+
class HttpBindingProtocol extends HttpProtocol {
|
|
143
|
+
async serializeRequest(operationSchema, _input, context) {
|
|
144
|
+
const input = {
|
|
145
|
+
...(_input ?? {}),
|
|
146
|
+
};
|
|
147
|
+
const serializer = this.serializer;
|
|
148
|
+
const query = {};
|
|
149
|
+
const headers = {};
|
|
150
|
+
const endpoint = await context.endpoint();
|
|
151
|
+
const ns = schema.NormalizedSchema.of(operationSchema?.input);
|
|
152
|
+
const schema$1 = ns.getSchema();
|
|
153
|
+
let hasNonHttpBindingMember = false;
|
|
154
|
+
let payload;
|
|
155
|
+
const request = new protocolHttp.HttpRequest({
|
|
156
|
+
protocol: "",
|
|
157
|
+
hostname: "",
|
|
158
|
+
port: undefined,
|
|
159
|
+
path: "",
|
|
160
|
+
fragment: undefined,
|
|
161
|
+
query: query,
|
|
162
|
+
headers: headers,
|
|
163
|
+
body: undefined,
|
|
164
|
+
});
|
|
165
|
+
if (endpoint) {
|
|
166
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
167
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
168
|
+
const opTraits = schema.NormalizedSchema.translateTraits(operationSchema.traits);
|
|
169
|
+
if (opTraits.http) {
|
|
170
|
+
request.method = opTraits.http[0];
|
|
171
|
+
const [path, search] = opTraits.http[1].split("?");
|
|
172
|
+
if (request.path == "/") {
|
|
173
|
+
request.path = path;
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
request.path += path;
|
|
177
|
+
}
|
|
178
|
+
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
179
|
+
Object.assign(query, Object.fromEntries(traitSearchParams));
|
|
282
180
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
delete input[memberName];
|
|
291
|
-
} else if (memberTraits.httpLabel) {
|
|
292
|
-
serializer.write(memberNs, inputMemberValue);
|
|
293
|
-
const replacement = serializer.flush();
|
|
294
|
-
if (request.path.includes(`{${memberName}+}`)) {
|
|
295
|
-
request.path = request.path.replace(
|
|
296
|
-
`{${memberName}+}`,
|
|
297
|
-
replacement.split("/").map(extendedEncodeURIComponent).join("/")
|
|
298
|
-
);
|
|
299
|
-
} else if (request.path.includes(`{${memberName}}`)) {
|
|
300
|
-
request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
|
|
301
|
-
}
|
|
302
|
-
delete input[memberName];
|
|
303
|
-
} else if (memberTraits.httpHeader) {
|
|
304
|
-
serializer.write(memberNs, inputMemberValue);
|
|
305
|
-
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
|
306
|
-
delete input[memberName];
|
|
307
|
-
} else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
308
|
-
for (const [key, val] of Object.entries(inputMemberValue)) {
|
|
309
|
-
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
310
|
-
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
311
|
-
headers[amalgam.toLowerCase()] = serializer.flush();
|
|
312
|
-
}
|
|
313
|
-
delete input[memberName];
|
|
314
|
-
} else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
|
|
315
|
-
this.serializeQuery(memberNs, inputMemberValue, query);
|
|
316
|
-
delete input[memberName];
|
|
317
|
-
} else {
|
|
318
|
-
hasNonHttpBindingMember = true;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
if (hasNonHttpBindingMember && input) {
|
|
322
|
-
serializer.write(schema, input);
|
|
323
|
-
payload = serializer.flush();
|
|
324
|
-
}
|
|
325
|
-
request.headers = headers;
|
|
326
|
-
request.query = query;
|
|
327
|
-
request.body = payload;
|
|
328
|
-
return request;
|
|
329
|
-
}
|
|
330
|
-
serializeQuery(ns, data, query) {
|
|
331
|
-
const serializer = this.serializer;
|
|
332
|
-
const traits = ns.getMergedTraits();
|
|
333
|
-
if (traits.httpQueryParams) {
|
|
334
|
-
for (const [key, val] of Object.entries(data)) {
|
|
335
|
-
if (!(key in query)) {
|
|
336
|
-
const valueSchema = ns.getValueSchema();
|
|
337
|
-
Object.assign(valueSchema.getMergedTraits(), {
|
|
338
|
-
// We pass on the traits to the sub-schema
|
|
339
|
-
// because we are still in the process of serializing the map itself.
|
|
340
|
-
...traits,
|
|
341
|
-
httpQuery: key,
|
|
342
|
-
httpQueryParams: void 0
|
|
343
|
-
});
|
|
344
|
-
this.serializeQuery(valueSchema, val, query);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
if (ns.isListSchema()) {
|
|
350
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
351
|
-
const buffer = [];
|
|
352
|
-
for (const item of data) {
|
|
353
|
-
serializer.write([ns.getValueSchema(), traits], item);
|
|
354
|
-
const serializable = serializer.flush();
|
|
355
|
-
if (sparse || serializable !== void 0) {
|
|
356
|
-
buffer.push(serializable);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
query[traits.httpQuery] = buffer;
|
|
360
|
-
} else {
|
|
361
|
-
serializer.write([ns, traits], data);
|
|
362
|
-
query[traits.httpQuery] = serializer.flush();
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
async deserializeResponse(operationSchema, context, response) {
|
|
366
|
-
const deserializer = this.deserializer;
|
|
367
|
-
const ns = import_schema2.NormalizedSchema.of(operationSchema.output);
|
|
368
|
-
const dataObject = {};
|
|
369
|
-
if (response.statusCode >= 300) {
|
|
370
|
-
const bytes = await collectBody(response.body, context);
|
|
371
|
-
if (bytes.byteLength > 0) {
|
|
372
|
-
Object.assign(dataObject, await deserializer.read(import_schema2.SCHEMA.DOCUMENT, bytes));
|
|
373
|
-
}
|
|
374
|
-
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
375
|
-
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
376
|
-
}
|
|
377
|
-
for (const header in response.headers) {
|
|
378
|
-
const value = response.headers[header];
|
|
379
|
-
delete response.headers[header];
|
|
380
|
-
response.headers[header.toLowerCase()] = value;
|
|
381
|
-
}
|
|
382
|
-
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
|
|
383
|
-
if (nonHttpBindingMembers.length) {
|
|
384
|
-
const bytes = await collectBody(response.body, context);
|
|
385
|
-
if (bytes.byteLength > 0) {
|
|
386
|
-
const dataFromBody = await deserializer.read(ns, bytes);
|
|
387
|
-
for (const member of nonHttpBindingMembers) {
|
|
388
|
-
dataObject[member] = dataFromBody[member];
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
dataObject.$metadata = this.deserializeMetadata(response);
|
|
393
|
-
return dataObject;
|
|
394
|
-
}
|
|
395
|
-
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
396
|
-
let dataObject;
|
|
397
|
-
if (arg4 instanceof Set) {
|
|
398
|
-
dataObject = arg5;
|
|
399
|
-
} else {
|
|
400
|
-
dataObject = arg4;
|
|
401
|
-
}
|
|
402
|
-
const deserializer = this.deserializer;
|
|
403
|
-
const ns = import_schema2.NormalizedSchema.of(schema);
|
|
404
|
-
const nonHttpBindingMembers = [];
|
|
405
|
-
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
406
|
-
const memberTraits = memberSchema.getMemberTraits();
|
|
407
|
-
if (memberTraits.httpPayload) {
|
|
408
|
-
const isStreaming = memberSchema.isStreaming();
|
|
409
|
-
if (isStreaming) {
|
|
410
|
-
const isEventStream = memberSchema.isStructSchema();
|
|
411
|
-
if (isEventStream) {
|
|
412
|
-
dataObject[memberName] = await this.deserializeEventStream({
|
|
413
|
-
response,
|
|
414
|
-
responseSchema: ns
|
|
415
|
-
});
|
|
416
|
-
} else {
|
|
417
|
-
dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
|
|
418
|
-
}
|
|
419
|
-
} else if (response.body) {
|
|
420
|
-
const bytes = await collectBody(response.body, context);
|
|
421
|
-
if (bytes.byteLength > 0) {
|
|
422
|
-
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
} else if (memberTraits.httpHeader) {
|
|
426
|
-
const key = String(memberTraits.httpHeader).toLowerCase();
|
|
427
|
-
const value = response.headers[key];
|
|
428
|
-
if (null != value) {
|
|
429
|
-
if (memberSchema.isListSchema()) {
|
|
430
|
-
const headerListValueSchema = memberSchema.getValueSchema();
|
|
431
|
-
headerListValueSchema.getMergedTraits().httpHeader = key;
|
|
432
|
-
let sections;
|
|
433
|
-
if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === import_schema2.SCHEMA.TIMESTAMP_DEFAULT) {
|
|
434
|
-
sections = (0, import_serde.splitEvery)(value, ",", 2);
|
|
435
|
-
} else {
|
|
436
|
-
sections = (0, import_serde.splitHeader)(value);
|
|
181
|
+
}
|
|
182
|
+
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
183
|
+
const memberTraits = memberNs.getMergedTraits() ?? {};
|
|
184
|
+
const inputMemberValue = input[memberName];
|
|
185
|
+
if (inputMemberValue == null) {
|
|
186
|
+
continue;
|
|
437
187
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
188
|
+
if (memberTraits.httpPayload) {
|
|
189
|
+
const isStreaming = memberNs.isStreaming();
|
|
190
|
+
if (isStreaming) {
|
|
191
|
+
const isEventStream = memberNs.isStructSchema();
|
|
192
|
+
if (isEventStream) {
|
|
193
|
+
if (input[memberName]) {
|
|
194
|
+
payload = await this.serializeEventStream({
|
|
195
|
+
eventStream: input[memberName],
|
|
196
|
+
requestSchema: ns,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
payload = inputMemberValue;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
serializer.write(memberNs, inputMemberValue);
|
|
206
|
+
payload = serializer.flush();
|
|
207
|
+
}
|
|
208
|
+
delete input[memberName];
|
|
441
209
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
valueSchema.getMergedTraits().httpHeader = header;
|
|
453
|
-
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(
|
|
454
|
-
valueSchema,
|
|
455
|
-
value
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
} else if (memberTraits.httpResponseCode) {
|
|
460
|
-
dataObject[memberName] = response.statusCode;
|
|
461
|
-
} else {
|
|
462
|
-
nonHttpBindingMembers.push(memberName);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
return nonHttpBindingMembers;
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
// src/submodules/protocols/RpcProtocol.ts
|
|
470
|
-
var import_schema3 = require("@smithy/core/schema");
|
|
471
|
-
var import_protocol_http3 = require("@smithy/protocol-http");
|
|
472
|
-
var RpcProtocol = class extends HttpProtocol {
|
|
473
|
-
async serializeRequest(operationSchema, input, context) {
|
|
474
|
-
const serializer = this.serializer;
|
|
475
|
-
const query = {};
|
|
476
|
-
const headers = {};
|
|
477
|
-
const endpoint = await context.endpoint();
|
|
478
|
-
const ns = import_schema3.NormalizedSchema.of(operationSchema?.input);
|
|
479
|
-
const schema = ns.getSchema();
|
|
480
|
-
let payload;
|
|
481
|
-
const request = new import_protocol_http3.HttpRequest({
|
|
482
|
-
protocol: "",
|
|
483
|
-
hostname: "",
|
|
484
|
-
port: void 0,
|
|
485
|
-
path: "/",
|
|
486
|
-
fragment: void 0,
|
|
487
|
-
query,
|
|
488
|
-
headers,
|
|
489
|
-
body: void 0
|
|
490
|
-
});
|
|
491
|
-
if (endpoint) {
|
|
492
|
-
this.updateServiceEndpoint(request, endpoint);
|
|
493
|
-
this.setHostPrefix(request, operationSchema, input);
|
|
494
|
-
}
|
|
495
|
-
const _input = {
|
|
496
|
-
...input
|
|
497
|
-
};
|
|
498
|
-
if (input) {
|
|
499
|
-
const eventStreamMember = ns.getEventStreamMember();
|
|
500
|
-
if (eventStreamMember) {
|
|
501
|
-
if (_input[eventStreamMember]) {
|
|
502
|
-
const initialRequest = {};
|
|
503
|
-
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
504
|
-
if (memberName !== eventStreamMember && _input[memberName]) {
|
|
505
|
-
serializer.write(memberSchema, _input[memberName]);
|
|
506
|
-
initialRequest[memberName] = serializer.flush();
|
|
210
|
+
else if (memberTraits.httpLabel) {
|
|
211
|
+
serializer.write(memberNs, inputMemberValue);
|
|
212
|
+
const replacement = serializer.flush();
|
|
213
|
+
if (request.path.includes(`{${memberName}+}`)) {
|
|
214
|
+
request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/"));
|
|
215
|
+
}
|
|
216
|
+
else if (request.path.includes(`{${memberName}}`)) {
|
|
217
|
+
request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
|
|
218
|
+
}
|
|
219
|
+
delete input[memberName];
|
|
507
220
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
221
|
+
else if (memberTraits.httpHeader) {
|
|
222
|
+
serializer.write(memberNs, inputMemberValue);
|
|
223
|
+
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
|
224
|
+
delete input[memberName];
|
|
225
|
+
}
|
|
226
|
+
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
227
|
+
for (const [key, val] of Object.entries(inputMemberValue)) {
|
|
228
|
+
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
229
|
+
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
230
|
+
headers[amalgam.toLowerCase()] = serializer.flush();
|
|
231
|
+
}
|
|
232
|
+
delete input[memberName];
|
|
233
|
+
}
|
|
234
|
+
else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
|
|
235
|
+
this.serializeQuery(memberNs, inputMemberValue, query);
|
|
236
|
+
delete input[memberName];
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
hasNonHttpBindingMember = true;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (hasNonHttpBindingMember && input) {
|
|
243
|
+
serializer.write(schema$1, input);
|
|
244
|
+
payload = serializer.flush();
|
|
245
|
+
}
|
|
246
|
+
request.headers = headers;
|
|
247
|
+
request.query = query;
|
|
248
|
+
request.body = payload;
|
|
249
|
+
return request;
|
|
250
|
+
}
|
|
251
|
+
serializeQuery(ns, data, query) {
|
|
252
|
+
const serializer = this.serializer;
|
|
253
|
+
const traits = ns.getMergedTraits();
|
|
254
|
+
if (traits.httpQueryParams) {
|
|
255
|
+
for (const [key, val] of Object.entries(data)) {
|
|
256
|
+
if (!(key in query)) {
|
|
257
|
+
const valueSchema = ns.getValueSchema();
|
|
258
|
+
Object.assign(valueSchema.getMergedTraits(), {
|
|
259
|
+
...traits,
|
|
260
|
+
httpQuery: key,
|
|
261
|
+
httpQueryParams: undefined,
|
|
262
|
+
});
|
|
263
|
+
this.serializeQuery(valueSchema, val, query);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
if (ns.isListSchema()) {
|
|
269
|
+
const sparse = !!ns.getMergedTraits().sparse;
|
|
270
|
+
const buffer = [];
|
|
271
|
+
for (const item of data) {
|
|
272
|
+
serializer.write([ns.getValueSchema(), traits], item);
|
|
273
|
+
const serializable = serializer.flush();
|
|
274
|
+
if (sparse || serializable !== undefined) {
|
|
275
|
+
buffer.push(serializable);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
query[traits.httpQuery] = buffer;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
serializer.write([ns, traits], data);
|
|
282
|
+
query[traits.httpQuery] = serializer.flush();
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
286
|
+
const deserializer = this.deserializer;
|
|
287
|
+
const ns = schema.NormalizedSchema.of(operationSchema.output);
|
|
288
|
+
const dataObject = {};
|
|
289
|
+
if (response.statusCode >= 300) {
|
|
290
|
+
const bytes = await collectBody(response.body, context);
|
|
291
|
+
if (bytes.byteLength > 0) {
|
|
292
|
+
Object.assign(dataObject, await deserializer.read(schema.SCHEMA.DOCUMENT, bytes));
|
|
293
|
+
}
|
|
294
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
295
|
+
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
296
|
+
}
|
|
297
|
+
for (const header in response.headers) {
|
|
298
|
+
const value = response.headers[header];
|
|
299
|
+
delete response.headers[header];
|
|
300
|
+
response.headers[header.toLowerCase()] = value;
|
|
301
|
+
}
|
|
302
|
+
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
|
|
303
|
+
if (nonHttpBindingMembers.length) {
|
|
304
|
+
const bytes = await collectBody(response.body, context);
|
|
305
|
+
if (bytes.byteLength > 0) {
|
|
306
|
+
const dataFromBody = await deserializer.read(ns, bytes);
|
|
307
|
+
for (const member of nonHttpBindingMembers) {
|
|
308
|
+
dataObject[member] = dataFromBody[member];
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
313
|
+
return dataObject;
|
|
314
|
+
}
|
|
315
|
+
async deserializeHttpMessage(schema$1, context, response, arg4, arg5) {
|
|
316
|
+
let dataObject;
|
|
317
|
+
if (arg4 instanceof Set) {
|
|
318
|
+
dataObject = arg5;
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
dataObject = arg4;
|
|
322
|
+
}
|
|
323
|
+
const deserializer = this.deserializer;
|
|
324
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
325
|
+
const nonHttpBindingMembers = [];
|
|
326
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
327
|
+
const memberTraits = memberSchema.getMemberTraits();
|
|
328
|
+
if (memberTraits.httpPayload) {
|
|
329
|
+
const isStreaming = memberSchema.isStreaming();
|
|
330
|
+
if (isStreaming) {
|
|
331
|
+
const isEventStream = memberSchema.isStructSchema();
|
|
332
|
+
if (isEventStream) {
|
|
333
|
+
dataObject[memberName] = await this.deserializeEventStream({
|
|
334
|
+
response,
|
|
335
|
+
responseSchema: ns,
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
dataObject[memberName] = utilStream.sdkStreamMixin(response.body);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
else if (response.body) {
|
|
343
|
+
const bytes = await collectBody(response.body, context);
|
|
344
|
+
if (bytes.byteLength > 0) {
|
|
345
|
+
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
else if (memberTraits.httpHeader) {
|
|
350
|
+
const key = String(memberTraits.httpHeader).toLowerCase();
|
|
351
|
+
const value = response.headers[key];
|
|
352
|
+
if (null != value) {
|
|
353
|
+
if (memberSchema.isListSchema()) {
|
|
354
|
+
const headerListValueSchema = memberSchema.getValueSchema();
|
|
355
|
+
headerListValueSchema.getMergedTraits().httpHeader = key;
|
|
356
|
+
let sections;
|
|
357
|
+
if (headerListValueSchema.isTimestampSchema() &&
|
|
358
|
+
headerListValueSchema.getSchema() === schema.SCHEMA.TIMESTAMP_DEFAULT) {
|
|
359
|
+
sections = serde.splitEvery(value, ",", 2);
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
sections = serde.splitHeader(value);
|
|
363
|
+
}
|
|
364
|
+
const list = [];
|
|
365
|
+
for (const section of sections) {
|
|
366
|
+
list.push(await deserializer.read(headerListValueSchema, section.trim()));
|
|
367
|
+
}
|
|
368
|
+
dataObject[memberName] = list;
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
dataObject[memberName] = await deserializer.read(memberSchema, value);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
376
|
+
dataObject[memberName] = {};
|
|
377
|
+
for (const [header, value] of Object.entries(response.headers)) {
|
|
378
|
+
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
379
|
+
const valueSchema = memberSchema.getValueSchema();
|
|
380
|
+
valueSchema.getMergedTraits().httpHeader = header;
|
|
381
|
+
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
else if (memberTraits.httpResponseCode) {
|
|
386
|
+
dataObject[memberName] = response.statusCode;
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
nonHttpBindingMembers.push(memberName);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
return nonHttpBindingMembers;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
560
395
|
|
|
561
|
-
|
|
562
|
-
|
|
396
|
+
class RpcProtocol extends HttpProtocol {
|
|
397
|
+
async serializeRequest(operationSchema, input, context) {
|
|
398
|
+
const serializer = this.serializer;
|
|
399
|
+
const query = {};
|
|
400
|
+
const headers = {};
|
|
401
|
+
const endpoint = await context.endpoint();
|
|
402
|
+
const ns = schema.NormalizedSchema.of(operationSchema?.input);
|
|
403
|
+
const schema$1 = ns.getSchema();
|
|
404
|
+
let payload;
|
|
405
|
+
const request = new protocolHttp.HttpRequest({
|
|
406
|
+
protocol: "",
|
|
407
|
+
hostname: "",
|
|
408
|
+
port: undefined,
|
|
409
|
+
path: "/",
|
|
410
|
+
fragment: undefined,
|
|
411
|
+
query: query,
|
|
412
|
+
headers: headers,
|
|
413
|
+
body: undefined,
|
|
414
|
+
});
|
|
415
|
+
if (endpoint) {
|
|
416
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
417
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
418
|
+
}
|
|
419
|
+
const _input = {
|
|
420
|
+
...input,
|
|
421
|
+
};
|
|
422
|
+
if (input) {
|
|
423
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
424
|
+
if (eventStreamMember) {
|
|
425
|
+
if (_input[eventStreamMember]) {
|
|
426
|
+
const initialRequest = {};
|
|
427
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
428
|
+
if (memberName !== eventStreamMember && _input[memberName]) {
|
|
429
|
+
serializer.write(memberSchema, _input[memberName]);
|
|
430
|
+
initialRequest[memberName] = serializer.flush();
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
payload = await this.serializeEventStream({
|
|
434
|
+
eventStream: _input[eventStreamMember],
|
|
435
|
+
requestSchema: ns,
|
|
436
|
+
initialRequest,
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
serializer.write(schema$1, _input);
|
|
442
|
+
payload = serializer.flush();
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
request.headers = headers;
|
|
446
|
+
request.query = query;
|
|
447
|
+
request.body = payload;
|
|
448
|
+
request.method = "POST";
|
|
449
|
+
return request;
|
|
450
|
+
}
|
|
451
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
452
|
+
const deserializer = this.deserializer;
|
|
453
|
+
const ns = schema.NormalizedSchema.of(operationSchema.output);
|
|
454
|
+
const dataObject = {};
|
|
455
|
+
if (response.statusCode >= 300) {
|
|
456
|
+
const bytes = await collectBody(response.body, context);
|
|
457
|
+
if (bytes.byteLength > 0) {
|
|
458
|
+
Object.assign(dataObject, await deserializer.read(schema.SCHEMA.DOCUMENT, bytes));
|
|
459
|
+
}
|
|
460
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
461
|
+
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
462
|
+
}
|
|
463
|
+
for (const header in response.headers) {
|
|
464
|
+
const value = response.headers[header];
|
|
465
|
+
delete response.headers[header];
|
|
466
|
+
response.headers[header.toLowerCase()] = value;
|
|
467
|
+
}
|
|
468
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
469
|
+
if (eventStreamMember) {
|
|
470
|
+
dataObject[eventStreamMember] = await this.deserializeEventStream({
|
|
471
|
+
response,
|
|
472
|
+
responseSchema: ns,
|
|
473
|
+
initialResponseContainer: dataObject,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
const bytes = await collectBody(response.body, context);
|
|
478
|
+
if (bytes.byteLength > 0) {
|
|
479
|
+
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
483
|
+
return dataObject;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
563
486
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
487
|
+
const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
|
|
488
|
+
if (input != null && input[memberName] !== undefined) {
|
|
489
|
+
const labelValue = labelValueProvider();
|
|
490
|
+
if (labelValue.length <= 0) {
|
|
491
|
+
throw new Error("Empty value provided for input HTTP label: " + memberName + ".");
|
|
492
|
+
}
|
|
493
|
+
resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel
|
|
494
|
+
? labelValue
|
|
495
|
+
.split("/")
|
|
496
|
+
.map((segment) => extendedEncodeURIComponent(segment))
|
|
497
|
+
.join("/")
|
|
498
|
+
: extendedEncodeURIComponent(labelValue));
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
throw new Error("No value provided for input HTTP label: " + memberName + ".");
|
|
502
|
+
}
|
|
503
|
+
return resolvedPath;
|
|
579
504
|
};
|
|
580
505
|
|
|
581
|
-
// src/submodules/protocols/requestBuilder.ts
|
|
582
506
|
function requestBuilder(input, context) {
|
|
583
|
-
|
|
507
|
+
return new RequestBuilder(input, context);
|
|
508
|
+
}
|
|
509
|
+
class RequestBuilder {
|
|
510
|
+
input;
|
|
511
|
+
context;
|
|
512
|
+
query = {};
|
|
513
|
+
method = "";
|
|
514
|
+
headers = {};
|
|
515
|
+
path = "";
|
|
516
|
+
body = null;
|
|
517
|
+
hostname = "";
|
|
518
|
+
resolvePathStack = [];
|
|
519
|
+
constructor(input, context) {
|
|
520
|
+
this.input = input;
|
|
521
|
+
this.context = context;
|
|
522
|
+
}
|
|
523
|
+
async build() {
|
|
524
|
+
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
525
|
+
this.path = basePath;
|
|
526
|
+
for (const resolvePath of this.resolvePathStack) {
|
|
527
|
+
resolvePath(this.path);
|
|
528
|
+
}
|
|
529
|
+
return new protocolHttp.HttpRequest({
|
|
530
|
+
protocol,
|
|
531
|
+
hostname: this.hostname || hostname,
|
|
532
|
+
port,
|
|
533
|
+
method: this.method,
|
|
534
|
+
path: this.path,
|
|
535
|
+
query: this.query,
|
|
536
|
+
body: this.body,
|
|
537
|
+
headers: this.headers,
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
hn(hostname) {
|
|
541
|
+
this.hostname = hostname;
|
|
542
|
+
return this;
|
|
543
|
+
}
|
|
544
|
+
bp(uriLabel) {
|
|
545
|
+
this.resolvePathStack.push((basePath) => {
|
|
546
|
+
this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
|
|
547
|
+
});
|
|
548
|
+
return this;
|
|
549
|
+
}
|
|
550
|
+
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
551
|
+
this.resolvePathStack.push((path) => {
|
|
552
|
+
this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
553
|
+
});
|
|
554
|
+
return this;
|
|
555
|
+
}
|
|
556
|
+
h(headers) {
|
|
557
|
+
this.headers = headers;
|
|
558
|
+
return this;
|
|
559
|
+
}
|
|
560
|
+
q(query) {
|
|
561
|
+
this.query = query;
|
|
562
|
+
return this;
|
|
563
|
+
}
|
|
564
|
+
b(body) {
|
|
565
|
+
this.body = body;
|
|
566
|
+
return this;
|
|
567
|
+
}
|
|
568
|
+
m(method) {
|
|
569
|
+
this.method = method;
|
|
570
|
+
return this;
|
|
571
|
+
}
|
|
584
572
|
}
|
|
585
|
-
var RequestBuilder = class {
|
|
586
|
-
constructor(input, context) {
|
|
587
|
-
this.input = input;
|
|
588
|
-
this.context = context;
|
|
589
|
-
this.query = {};
|
|
590
|
-
this.method = "";
|
|
591
|
-
this.headers = {};
|
|
592
|
-
this.path = "";
|
|
593
|
-
this.body = null;
|
|
594
|
-
this.hostname = "";
|
|
595
|
-
this.resolvePathStack = [];
|
|
596
|
-
}
|
|
597
|
-
async build() {
|
|
598
|
-
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
599
|
-
this.path = basePath;
|
|
600
|
-
for (const resolvePath of this.resolvePathStack) {
|
|
601
|
-
resolvePath(this.path);
|
|
602
|
-
}
|
|
603
|
-
return new import_protocol_http4.HttpRequest({
|
|
604
|
-
protocol,
|
|
605
|
-
hostname: this.hostname || hostname,
|
|
606
|
-
port,
|
|
607
|
-
method: this.method,
|
|
608
|
-
path: this.path,
|
|
609
|
-
query: this.query,
|
|
610
|
-
body: this.body,
|
|
611
|
-
headers: this.headers
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* Brevity setter for "hostname".
|
|
616
|
-
*/
|
|
617
|
-
hn(hostname) {
|
|
618
|
-
this.hostname = hostname;
|
|
619
|
-
return this;
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
* Brevity initial builder for "basepath".
|
|
623
|
-
*/
|
|
624
|
-
bp(uriLabel) {
|
|
625
|
-
this.resolvePathStack.push((basePath) => {
|
|
626
|
-
this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
|
|
627
|
-
});
|
|
628
|
-
return this;
|
|
629
|
-
}
|
|
630
|
-
/**
|
|
631
|
-
* Brevity incremental builder for "path".
|
|
632
|
-
*/
|
|
633
|
-
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
634
|
-
this.resolvePathStack.push((path) => {
|
|
635
|
-
this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
636
|
-
});
|
|
637
|
-
return this;
|
|
638
|
-
}
|
|
639
|
-
/**
|
|
640
|
-
* Brevity setter for "headers".
|
|
641
|
-
*/
|
|
642
|
-
h(headers) {
|
|
643
|
-
this.headers = headers;
|
|
644
|
-
return this;
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Brevity setter for "query".
|
|
648
|
-
*/
|
|
649
|
-
q(query) {
|
|
650
|
-
this.query = query;
|
|
651
|
-
return this;
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Brevity setter for "body".
|
|
655
|
-
*/
|
|
656
|
-
b(body) {
|
|
657
|
-
this.body = body;
|
|
658
|
-
return this;
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* Brevity setter for "method".
|
|
662
|
-
*/
|
|
663
|
-
m(method) {
|
|
664
|
-
this.method = method;
|
|
665
|
-
return this;
|
|
666
|
-
}
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
// src/submodules/protocols/serde/FromStringShapeDeserializer.ts
|
|
670
|
-
var import_schema5 = require("@smithy/core/schema");
|
|
671
|
-
var import_serde2 = require("@smithy/core/serde");
|
|
672
|
-
var import_util_base64 = require("@smithy/util-base64");
|
|
673
|
-
var import_util_utf8 = require("@smithy/util-utf8");
|
|
674
573
|
|
|
675
|
-
// src/submodules/protocols/serde/determineTimestampFormat.ts
|
|
676
|
-
var import_schema4 = require("@smithy/core/schema");
|
|
677
574
|
function determineTimestampFormat(ns, settings) {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
575
|
+
if (settings.timestampFormat.useTrait) {
|
|
576
|
+
if (ns.isTimestampSchema() &&
|
|
577
|
+
(ns.getSchema() === schema.SCHEMA.TIMESTAMP_DATE_TIME ||
|
|
578
|
+
ns.getSchema() === schema.SCHEMA.TIMESTAMP_HTTP_DATE ||
|
|
579
|
+
ns.getSchema() === schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS)) {
|
|
580
|
+
return ns.getSchema();
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();
|
|
584
|
+
const bindingFormat = settings.httpBindings
|
|
585
|
+
? typeof httpPrefixHeaders === "string" || Boolean(httpHeader)
|
|
586
|
+
? schema.SCHEMA.TIMESTAMP_HTTP_DATE
|
|
587
|
+
: Boolean(httpQuery) || Boolean(httpLabel)
|
|
588
|
+
? schema.SCHEMA.TIMESTAMP_DATE_TIME
|
|
589
|
+
: undefined
|
|
590
|
+
: undefined;
|
|
591
|
+
return bindingFormat ?? settings.timestampFormat.default;
|
|
686
592
|
}
|
|
687
593
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
if (ns.isBlobSchema()) {
|
|
702
|
-
return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data);
|
|
703
|
-
}
|
|
704
|
-
if (ns.isTimestampSchema()) {
|
|
705
|
-
const format = determineTimestampFormat(ns, this.settings);
|
|
706
|
-
switch (format) {
|
|
707
|
-
case import_schema5.SCHEMA.TIMESTAMP_DATE_TIME:
|
|
708
|
-
return (0, import_serde2.parseRfc3339DateTimeWithOffset)(data);
|
|
709
|
-
case import_schema5.SCHEMA.TIMESTAMP_HTTP_DATE:
|
|
710
|
-
return (0, import_serde2.parseRfc7231DateTime)(data);
|
|
711
|
-
case import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
|
|
712
|
-
return (0, import_serde2.parseEpochTimestamp)(data);
|
|
713
|
-
default:
|
|
714
|
-
console.warn("Missing timestamp format, parsing value with Date constructor:", data);
|
|
715
|
-
return new Date(data);
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
if (ns.isStringSchema()) {
|
|
719
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
720
|
-
let intermediateValue = data;
|
|
721
|
-
if (mediaType) {
|
|
722
|
-
if (ns.getMergedTraits().httpHeader) {
|
|
723
|
-
intermediateValue = this.base64ToUtf8(intermediateValue);
|
|
724
|
-
}
|
|
725
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
726
|
-
if (isJson) {
|
|
727
|
-
intermediateValue = import_serde2.LazyJsonString.from(intermediateValue);
|
|
728
|
-
}
|
|
729
|
-
return intermediateValue;
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
switch (true) {
|
|
733
|
-
case ns.isNumericSchema():
|
|
734
|
-
return Number(data);
|
|
735
|
-
case ns.isBigIntegerSchema():
|
|
736
|
-
return BigInt(data);
|
|
737
|
-
case ns.isBigDecimalSchema():
|
|
738
|
-
return new import_serde2.NumericValue(data, "bigDecimal");
|
|
739
|
-
case ns.isBooleanSchema():
|
|
740
|
-
return String(data).toLowerCase() === "true";
|
|
741
|
-
}
|
|
742
|
-
return data;
|
|
743
|
-
}
|
|
744
|
-
base64ToUtf8(base64String) {
|
|
745
|
-
return (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String));
|
|
746
|
-
}
|
|
747
|
-
};
|
|
748
|
-
|
|
749
|
-
// src/submodules/protocols/serde/HttpInterceptingShapeDeserializer.ts
|
|
750
|
-
var import_schema6 = require("@smithy/core/schema");
|
|
751
|
-
var import_util_utf82 = require("@smithy/util-utf8");
|
|
752
|
-
var HttpInterceptingShapeDeserializer = class {
|
|
753
|
-
constructor(codecDeserializer, codecSettings) {
|
|
754
|
-
this.codecDeserializer = codecDeserializer;
|
|
755
|
-
this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);
|
|
756
|
-
}
|
|
757
|
-
setSerdeContext(serdeContext) {
|
|
758
|
-
this.stringDeserializer.setSerdeContext(serdeContext);
|
|
759
|
-
this.codecDeserializer.setSerdeContext(serdeContext);
|
|
760
|
-
this.serdeContext = serdeContext;
|
|
761
|
-
}
|
|
762
|
-
read(schema, data) {
|
|
763
|
-
const ns = import_schema6.NormalizedSchema.of(schema);
|
|
764
|
-
const traits = ns.getMergedTraits();
|
|
765
|
-
const toString = this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8;
|
|
766
|
-
if (traits.httpHeader || traits.httpResponseCode) {
|
|
767
|
-
return this.stringDeserializer.read(ns, toString(data));
|
|
768
|
-
}
|
|
769
|
-
if (traits.httpPayload) {
|
|
770
|
-
if (ns.isBlobSchema()) {
|
|
771
|
-
const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf82.fromUtf8;
|
|
772
|
-
if (typeof data === "string") {
|
|
773
|
-
return toBytes(data);
|
|
594
|
+
class FromStringShapeDeserializer {
|
|
595
|
+
settings;
|
|
596
|
+
serdeContext;
|
|
597
|
+
constructor(settings) {
|
|
598
|
+
this.settings = settings;
|
|
599
|
+
}
|
|
600
|
+
setSerdeContext(serdeContext) {
|
|
601
|
+
this.serdeContext = serdeContext;
|
|
602
|
+
}
|
|
603
|
+
read(_schema, data) {
|
|
604
|
+
const ns = schema.NormalizedSchema.of(_schema);
|
|
605
|
+
if (ns.isListSchema()) {
|
|
606
|
+
return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
|
|
774
607
|
}
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
608
|
+
if (ns.isBlobSchema()) {
|
|
609
|
+
return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data);
|
|
610
|
+
}
|
|
611
|
+
if (ns.isTimestampSchema()) {
|
|
612
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
613
|
+
switch (format) {
|
|
614
|
+
case schema.SCHEMA.TIMESTAMP_DATE_TIME:
|
|
615
|
+
return serde.parseRfc3339DateTimeWithOffset(data);
|
|
616
|
+
case schema.SCHEMA.TIMESTAMP_HTTP_DATE:
|
|
617
|
+
return serde.parseRfc7231DateTime(data);
|
|
618
|
+
case schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
|
|
619
|
+
return serde.parseEpochTimestamp(data);
|
|
620
|
+
default:
|
|
621
|
+
console.warn("Missing timestamp format, parsing value with Date constructor:", data);
|
|
622
|
+
return new Date(data);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
if (ns.isStringSchema()) {
|
|
626
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
627
|
+
let intermediateValue = data;
|
|
628
|
+
if (mediaType) {
|
|
629
|
+
if (ns.getMergedTraits().httpHeader) {
|
|
630
|
+
intermediateValue = this.base64ToUtf8(intermediateValue);
|
|
631
|
+
}
|
|
632
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
633
|
+
if (isJson) {
|
|
634
|
+
intermediateValue = serde.LazyJsonString.from(intermediateValue);
|
|
635
|
+
}
|
|
636
|
+
return intermediateValue;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
switch (true) {
|
|
640
|
+
case ns.isNumericSchema():
|
|
641
|
+
return Number(data);
|
|
642
|
+
case ns.isBigIntegerSchema():
|
|
643
|
+
return BigInt(data);
|
|
644
|
+
case ns.isBigDecimalSchema():
|
|
645
|
+
return new serde.NumericValue(data, "bigDecimal");
|
|
646
|
+
case ns.isBooleanSchema():
|
|
647
|
+
return String(data).toLowerCase() === "true";
|
|
779
648
|
}
|
|
780
649
|
return data;
|
|
781
|
-
}
|
|
782
650
|
}
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
// src/submodules/protocols/serde/HttpInterceptingShapeSerializer.ts
|
|
788
|
-
var import_schema8 = require("@smithy/core/schema");
|
|
651
|
+
base64ToUtf8(base64String) {
|
|
652
|
+
return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(base64String));
|
|
653
|
+
}
|
|
654
|
+
}
|
|
789
655
|
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
if (
|
|
808
|
-
|
|
809
|
-
return;
|
|
656
|
+
class HttpInterceptingShapeDeserializer {
|
|
657
|
+
codecDeserializer;
|
|
658
|
+
stringDeserializer;
|
|
659
|
+
serdeContext;
|
|
660
|
+
constructor(codecDeserializer, codecSettings) {
|
|
661
|
+
this.codecDeserializer = codecDeserializer;
|
|
662
|
+
this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);
|
|
663
|
+
}
|
|
664
|
+
setSerdeContext(serdeContext) {
|
|
665
|
+
this.stringDeserializer.setSerdeContext(serdeContext);
|
|
666
|
+
this.codecDeserializer.setSerdeContext(serdeContext);
|
|
667
|
+
this.serdeContext = serdeContext;
|
|
668
|
+
}
|
|
669
|
+
read(schema$1, data) {
|
|
670
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
671
|
+
const traits = ns.getMergedTraits();
|
|
672
|
+
const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8;
|
|
673
|
+
if (traits.httpHeader || traits.httpResponseCode) {
|
|
674
|
+
return this.stringDeserializer.read(ns, toString(data));
|
|
810
675
|
}
|
|
811
|
-
if (
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
case import_schema7.SCHEMA.TIMESTAMP_HTTP_DATE:
|
|
825
|
-
this.stringBuffer = (0, import_serde3.dateToUtcString)(value);
|
|
826
|
-
break;
|
|
827
|
-
case import_schema7.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
|
|
828
|
-
this.stringBuffer = String(value.getTime() / 1e3);
|
|
829
|
-
break;
|
|
830
|
-
default:
|
|
831
|
-
console.warn("Missing timestamp format, using epoch seconds", value);
|
|
832
|
-
this.stringBuffer = String(value.getTime() / 1e3);
|
|
833
|
-
}
|
|
834
|
-
return;
|
|
835
|
-
}
|
|
836
|
-
if (ns.isBlobSchema() && "byteLength" in value) {
|
|
837
|
-
this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value);
|
|
838
|
-
return;
|
|
839
|
-
}
|
|
840
|
-
if (ns.isListSchema() && Array.isArray(value)) {
|
|
841
|
-
let buffer = "";
|
|
842
|
-
for (const item of value) {
|
|
843
|
-
this.write([ns.getValueSchema(), ns.getMergedTraits()], item);
|
|
844
|
-
const headerItem = this.flush();
|
|
845
|
-
const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : (0, import_serde3.quoteHeader)(headerItem);
|
|
846
|
-
if (buffer !== "") {
|
|
847
|
-
buffer += ", ";
|
|
676
|
+
if (traits.httpPayload) {
|
|
677
|
+
if (ns.isBlobSchema()) {
|
|
678
|
+
const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8;
|
|
679
|
+
if (typeof data === "string") {
|
|
680
|
+
return toBytes(data);
|
|
681
|
+
}
|
|
682
|
+
return data;
|
|
683
|
+
}
|
|
684
|
+
else if (ns.isStringSchema()) {
|
|
685
|
+
if ("byteLength" in data) {
|
|
686
|
+
return toString(data);
|
|
687
|
+
}
|
|
688
|
+
return data;
|
|
848
689
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
690
|
+
}
|
|
691
|
+
return this.codecDeserializer.read(ns, data);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
class ToStringShapeSerializer {
|
|
696
|
+
settings;
|
|
697
|
+
stringBuffer = "";
|
|
698
|
+
serdeContext = undefined;
|
|
699
|
+
constructor(settings) {
|
|
700
|
+
this.settings = settings;
|
|
701
|
+
}
|
|
702
|
+
setSerdeContext(serdeContext) {
|
|
703
|
+
this.serdeContext = serdeContext;
|
|
704
|
+
}
|
|
705
|
+
write(schema$1, value) {
|
|
706
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
707
|
+
switch (typeof value) {
|
|
708
|
+
case "object":
|
|
709
|
+
if (value === null) {
|
|
710
|
+
this.stringBuffer = "null";
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
if (ns.isTimestampSchema()) {
|
|
714
|
+
if (!(value instanceof Date)) {
|
|
715
|
+
throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);
|
|
716
|
+
}
|
|
717
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
718
|
+
switch (format) {
|
|
719
|
+
case schema.SCHEMA.TIMESTAMP_DATE_TIME:
|
|
720
|
+
this.stringBuffer = value.toISOString().replace(".000Z", "Z");
|
|
721
|
+
break;
|
|
722
|
+
case schema.SCHEMA.TIMESTAMP_HTTP_DATE:
|
|
723
|
+
this.stringBuffer = serde.dateToUtcString(value);
|
|
724
|
+
break;
|
|
725
|
+
case schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
|
|
726
|
+
this.stringBuffer = String(value.getTime() / 1000);
|
|
727
|
+
break;
|
|
728
|
+
default:
|
|
729
|
+
console.warn("Missing timestamp format, using epoch seconds", value);
|
|
730
|
+
this.stringBuffer = String(value.getTime() / 1000);
|
|
731
|
+
}
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
if (ns.isBlobSchema() && "byteLength" in value) {
|
|
735
|
+
this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value);
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (ns.isListSchema() && Array.isArray(value)) {
|
|
739
|
+
let buffer = "";
|
|
740
|
+
for (const item of value) {
|
|
741
|
+
this.write([ns.getValueSchema(), ns.getMergedTraits()], item);
|
|
742
|
+
const headerItem = this.flush();
|
|
743
|
+
const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : serde.quoteHeader(headerItem);
|
|
744
|
+
if (buffer !== "") {
|
|
745
|
+
buffer += ", ";
|
|
746
|
+
}
|
|
747
|
+
buffer += serialized;
|
|
748
|
+
}
|
|
749
|
+
this.stringBuffer = buffer;
|
|
750
|
+
return;
|
|
751
|
+
}
|
|
752
|
+
this.stringBuffer = JSON.stringify(value, null, 2);
|
|
753
|
+
break;
|
|
754
|
+
case "string":
|
|
755
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
756
|
+
let intermediateValue = value;
|
|
757
|
+
if (mediaType) {
|
|
758
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
759
|
+
if (isJson) {
|
|
760
|
+
intermediateValue = serde.LazyJsonString.from(intermediateValue);
|
|
761
|
+
}
|
|
762
|
+
if (ns.getMergedTraits().httpHeader) {
|
|
763
|
+
this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString());
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
this.stringBuffer = value;
|
|
768
|
+
break;
|
|
769
|
+
default:
|
|
770
|
+
this.stringBuffer = String(value);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
flush() {
|
|
774
|
+
const buffer = this.stringBuffer;
|
|
775
|
+
this.stringBuffer = "";
|
|
776
|
+
return buffer;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
class HttpInterceptingShapeSerializer {
|
|
781
|
+
codecSerializer;
|
|
782
|
+
stringSerializer;
|
|
783
|
+
buffer;
|
|
784
|
+
constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {
|
|
785
|
+
this.codecSerializer = codecSerializer;
|
|
786
|
+
this.stringSerializer = stringSerializer;
|
|
787
|
+
}
|
|
788
|
+
setSerdeContext(serdeContext) {
|
|
789
|
+
this.codecSerializer.setSerdeContext(serdeContext);
|
|
790
|
+
this.stringSerializer.setSerdeContext(serdeContext);
|
|
791
|
+
}
|
|
792
|
+
write(schema$1, value) {
|
|
793
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
794
|
+
const traits = ns.getMergedTraits();
|
|
795
|
+
if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
|
|
796
|
+
this.stringSerializer.write(ns, value);
|
|
797
|
+
this.buffer = this.stringSerializer.flush();
|
|
866
798
|
return;
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
};
|
|
799
|
+
}
|
|
800
|
+
return this.codecSerializer.write(ns, value);
|
|
801
|
+
}
|
|
802
|
+
flush() {
|
|
803
|
+
if (this.buffer !== undefined) {
|
|
804
|
+
const buffer = this.buffer;
|
|
805
|
+
this.buffer = undefined;
|
|
806
|
+
return buffer;
|
|
807
|
+
}
|
|
808
|
+
return this.codecSerializer.flush();
|
|
809
|
+
}
|
|
810
|
+
}
|
|
881
811
|
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
|
|
896
|
-
this.stringSerializer.write(ns, value);
|
|
897
|
-
this.buffer = this.stringSerializer.flush();
|
|
898
|
-
return;
|
|
899
|
-
}
|
|
900
|
-
return this.codecSerializer.write(ns, value);
|
|
901
|
-
}
|
|
902
|
-
flush() {
|
|
903
|
-
if (this.buffer !== void 0) {
|
|
904
|
-
const buffer = this.buffer;
|
|
905
|
-
this.buffer = void 0;
|
|
906
|
-
return buffer;
|
|
907
|
-
}
|
|
908
|
-
return this.codecSerializer.flush();
|
|
909
|
-
}
|
|
910
|
-
};
|
|
911
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
912
|
-
0 && (module.exports = {
|
|
913
|
-
FromStringShapeDeserializer,
|
|
914
|
-
HttpBindingProtocol,
|
|
915
|
-
HttpInterceptingShapeDeserializer,
|
|
916
|
-
HttpInterceptingShapeSerializer,
|
|
917
|
-
HttpProtocol,
|
|
918
|
-
RequestBuilder,
|
|
919
|
-
RpcProtocol,
|
|
920
|
-
ToStringShapeSerializer,
|
|
921
|
-
collectBody,
|
|
922
|
-
determineTimestampFormat,
|
|
923
|
-
extendedEncodeURIComponent,
|
|
924
|
-
requestBuilder,
|
|
925
|
-
resolvedPath
|
|
926
|
-
});
|
|
812
|
+
exports.FromStringShapeDeserializer = FromStringShapeDeserializer;
|
|
813
|
+
exports.HttpBindingProtocol = HttpBindingProtocol;
|
|
814
|
+
exports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;
|
|
815
|
+
exports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;
|
|
816
|
+
exports.HttpProtocol = HttpProtocol;
|
|
817
|
+
exports.RequestBuilder = RequestBuilder;
|
|
818
|
+
exports.RpcProtocol = RpcProtocol;
|
|
819
|
+
exports.ToStringShapeSerializer = ToStringShapeSerializer;
|
|
820
|
+
exports.collectBody = collectBody;
|
|
821
|
+
exports.determineTimestampFormat = determineTimestampFormat;
|
|
822
|
+
exports.extendedEncodeURIComponent = extendedEncodeURIComponent;
|
|
823
|
+
exports.requestBuilder = requestBuilder;
|
|
824
|
+
exports.resolvedPath = resolvedPath;
|