@cdk8s/awscdk-resolver 0.0.375 → 0.0.377
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 +5 -5
- 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,842 +1,648 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
__export(index_exports, {
|
|
22
|
-
ErrorSchema: () => ErrorSchema,
|
|
23
|
-
ListSchema: () => ListSchema,
|
|
24
|
-
MapSchema: () => MapSchema,
|
|
25
|
-
NormalizedSchema: () => NormalizedSchema,
|
|
26
|
-
OperationSchema: () => OperationSchema,
|
|
27
|
-
SCHEMA: () => SCHEMA,
|
|
28
|
-
Schema: () => Schema,
|
|
29
|
-
SimpleSchema: () => SimpleSchema,
|
|
30
|
-
StructureSchema: () => StructureSchema,
|
|
31
|
-
TypeRegistry: () => TypeRegistry,
|
|
32
|
-
deref: () => deref,
|
|
33
|
-
deserializerMiddlewareOption: () => deserializerMiddlewareOption,
|
|
34
|
-
error: () => error,
|
|
35
|
-
getSchemaSerdePlugin: () => getSchemaSerdePlugin,
|
|
36
|
-
list: () => list,
|
|
37
|
-
map: () => map,
|
|
38
|
-
op: () => op,
|
|
39
|
-
serializerMiddlewareOption: () => serializerMiddlewareOption,
|
|
40
|
-
sim: () => sim,
|
|
41
|
-
struct: () => struct
|
|
42
|
-
});
|
|
43
|
-
module.exports = __toCommonJS(index_exports);
|
|
3
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
4
|
+
var utilMiddleware = require('@smithy/util-middleware');
|
|
44
5
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return schemaRef;
|
|
6
|
+
const deref = (schemaRef) => {
|
|
7
|
+
if (typeof schemaRef === "function") {
|
|
8
|
+
return schemaRef();
|
|
9
|
+
}
|
|
10
|
+
return schemaRef;
|
|
51
11
|
};
|
|
52
12
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
throw error2;
|
|
107
|
-
}
|
|
13
|
+
const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
|
|
14
|
+
const { response } = await next(args);
|
|
15
|
+
const { operationSchema } = utilMiddleware.getSmithyContext(context);
|
|
16
|
+
try {
|
|
17
|
+
const parsed = await config.protocol.deserializeResponse(operationSchema, {
|
|
18
|
+
...config,
|
|
19
|
+
...context,
|
|
20
|
+
}, response);
|
|
21
|
+
return {
|
|
22
|
+
response,
|
|
23
|
+
output: parsed,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
Object.defineProperty(error, "$response", {
|
|
28
|
+
value: response,
|
|
29
|
+
});
|
|
30
|
+
if (!("$metadata" in error)) {
|
|
31
|
+
const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
|
|
32
|
+
try {
|
|
33
|
+
error.message += "\n " + hint;
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
|
|
37
|
+
console.warn(hint);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
context.logger?.warn?.(hint);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (typeof error.$responseBodyText !== "undefined") {
|
|
44
|
+
if (error.$response) {
|
|
45
|
+
error.$response.body = error.$responseBodyText;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
if (protocolHttp.HttpResponse.isInstance(response)) {
|
|
50
|
+
const { headers = {} } = response;
|
|
51
|
+
const headerEntries = Object.entries(headers);
|
|
52
|
+
error.$metadata = {
|
|
53
|
+
httpStatusCode: response.statusCode,
|
|
54
|
+
requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
|
|
55
|
+
extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
|
|
56
|
+
cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
108
65
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
66
|
+
const findHeader = (pattern, headers) => {
|
|
67
|
+
return (headers.find(([k]) => {
|
|
68
|
+
return k.match(pattern);
|
|
69
|
+
}) || [void 0, void 0])[1];
|
|
113
70
|
};
|
|
114
71
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
72
|
+
const schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
|
|
73
|
+
const { operationSchema } = utilMiddleware.getSmithyContext(context);
|
|
74
|
+
const endpoint = context.endpointV2?.url && config.urlParser
|
|
75
|
+
? async () => config.urlParser(context.endpointV2.url)
|
|
76
|
+
: config.endpoint;
|
|
77
|
+
const request = await config.protocol.serializeRequest(operationSchema, args.input, {
|
|
78
|
+
...config,
|
|
79
|
+
...context,
|
|
80
|
+
endpoint,
|
|
81
|
+
});
|
|
82
|
+
return next({
|
|
83
|
+
...args,
|
|
84
|
+
request,
|
|
85
|
+
});
|
|
129
86
|
};
|
|
130
87
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
override: true
|
|
88
|
+
const deserializerMiddlewareOption = {
|
|
89
|
+
name: "deserializerMiddleware",
|
|
90
|
+
step: "deserialize",
|
|
91
|
+
tags: ["DESERIALIZER"],
|
|
92
|
+
override: true,
|
|
137
93
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
94
|
+
const serializerMiddlewareOption = {
|
|
95
|
+
name: "serializerMiddleware",
|
|
96
|
+
step: "serialize",
|
|
97
|
+
tags: ["SERIALIZER"],
|
|
98
|
+
override: true,
|
|
143
99
|
};
|
|
144
100
|
function getSchemaSerdePlugin(config) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
101
|
+
return {
|
|
102
|
+
applyToStack: (commandStack) => {
|
|
103
|
+
commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);
|
|
104
|
+
commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
|
|
105
|
+
config.protocol.setSerdeContext(config);
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
class TypeRegistry {
|
|
111
|
+
namespace;
|
|
112
|
+
schemas;
|
|
113
|
+
exceptions;
|
|
114
|
+
static registries = new Map();
|
|
115
|
+
constructor(namespace, schemas = new Map(), exceptions = new Map()) {
|
|
116
|
+
this.namespace = namespace;
|
|
117
|
+
this.schemas = schemas;
|
|
118
|
+
this.exceptions = exceptions;
|
|
119
|
+
}
|
|
120
|
+
static for(namespace) {
|
|
121
|
+
if (!TypeRegistry.registries.has(namespace)) {
|
|
122
|
+
TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));
|
|
123
|
+
}
|
|
124
|
+
return TypeRegistry.registries.get(namespace);
|
|
125
|
+
}
|
|
126
|
+
register(shapeId, schema) {
|
|
127
|
+
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
128
|
+
this.schemas.set(qualifiedName, schema);
|
|
129
|
+
}
|
|
130
|
+
getSchema(shapeId) {
|
|
131
|
+
const id = this.normalizeShapeId(shapeId);
|
|
132
|
+
if (!this.schemas.has(id)) {
|
|
133
|
+
throw new Error(`@smithy/core/schema - schema not found for ${id}`);
|
|
134
|
+
}
|
|
135
|
+
return this.schemas.get(id);
|
|
136
|
+
}
|
|
137
|
+
registerError(errorSchema, ctor) {
|
|
138
|
+
this.exceptions.set(errorSchema, ctor);
|
|
139
|
+
}
|
|
140
|
+
getErrorCtor(errorSchema) {
|
|
141
|
+
return this.exceptions.get(errorSchema);
|
|
142
|
+
}
|
|
143
|
+
getBaseException() {
|
|
144
|
+
for (const [id, schema] of this.schemas.entries()) {
|
|
145
|
+
if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
|
|
146
|
+
return schema;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
find(predicate) {
|
|
152
|
+
return [...this.schemas.values()].find(predicate);
|
|
153
|
+
}
|
|
154
|
+
clear() {
|
|
155
|
+
this.schemas.clear();
|
|
156
|
+
this.exceptions.clear();
|
|
157
|
+
}
|
|
158
|
+
normalizeShapeId(shapeId) {
|
|
159
|
+
if (shapeId.includes("#")) {
|
|
160
|
+
return shapeId;
|
|
161
|
+
}
|
|
162
|
+
return this.namespace + "#" + shapeId;
|
|
163
|
+
}
|
|
164
|
+
getNamespace(shapeId) {
|
|
165
|
+
return this.normalizeShapeId(shapeId).split("#")[0];
|
|
150
166
|
}
|
|
151
|
-
};
|
|
152
167
|
}
|
|
153
168
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
static {
|
|
162
|
-
this.registries = /* @__PURE__ */ new Map();
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* @param namespace - specifier.
|
|
166
|
-
* @returns the schema for that namespace, creating it if necessary.
|
|
167
|
-
*/
|
|
168
|
-
static for(namespace) {
|
|
169
|
-
if (!_TypeRegistry.registries.has(namespace)) {
|
|
170
|
-
_TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
|
|
171
|
-
}
|
|
172
|
-
return _TypeRegistry.registries.get(namespace);
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Adds the given schema to a type registry with the same namespace.
|
|
176
|
-
*
|
|
177
|
-
* @param shapeId - to be registered.
|
|
178
|
-
* @param schema - to be registered.
|
|
179
|
-
*/
|
|
180
|
-
register(shapeId, schema) {
|
|
181
|
-
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
182
|
-
this.schemas.set(qualifiedName, schema);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* @param shapeId - query.
|
|
186
|
-
* @returns the schema.
|
|
187
|
-
*/
|
|
188
|
-
getSchema(shapeId) {
|
|
189
|
-
const id = this.normalizeShapeId(shapeId);
|
|
190
|
-
if (!this.schemas.has(id)) {
|
|
191
|
-
throw new Error(`@smithy/core/schema - schema not found for ${id}`);
|
|
192
|
-
}
|
|
193
|
-
return this.schemas.get(id);
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Associates an error schema with its constructor.
|
|
197
|
-
*/
|
|
198
|
-
registerError(errorSchema, ctor) {
|
|
199
|
-
this.exceptions.set(errorSchema, ctor);
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* @param errorSchema - query.
|
|
203
|
-
* @returns Error constructor that extends the service's base exception.
|
|
204
|
-
*/
|
|
205
|
-
getErrorCtor(errorSchema) {
|
|
206
|
-
return this.exceptions.get(errorSchema);
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception,
|
|
210
|
-
* because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which
|
|
211
|
-
* is unique per service/model.
|
|
212
|
-
*
|
|
213
|
-
* This is generated under a unique prefix that is combined with the service namespace, and this
|
|
214
|
-
* method is used to retrieve it.
|
|
215
|
-
*
|
|
216
|
-
* The base exception synthetic schema is used when an error is returned by a service, but we cannot
|
|
217
|
-
* determine what existing schema to use to deserialize it.
|
|
218
|
-
*
|
|
219
|
-
* @returns the synthetic base exception of the service namespace associated with this registry instance.
|
|
220
|
-
*/
|
|
221
|
-
getBaseException() {
|
|
222
|
-
for (const [id, schema] of this.schemas.entries()) {
|
|
223
|
-
if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
|
|
169
|
+
class Schema {
|
|
170
|
+
name;
|
|
171
|
+
namespace;
|
|
172
|
+
traits;
|
|
173
|
+
static assign(instance, values) {
|
|
174
|
+
const schema = Object.assign(instance, values);
|
|
175
|
+
TypeRegistry.for(schema.namespace).register(schema.name, schema);
|
|
224
176
|
return schema;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
*/
|
|
239
|
-
clear() {
|
|
240
|
-
this.schemas.clear();
|
|
241
|
-
this.exceptions.clear();
|
|
242
|
-
}
|
|
243
|
-
normalizeShapeId(shapeId) {
|
|
244
|
-
if (shapeId.includes("#")) {
|
|
245
|
-
return shapeId;
|
|
246
|
-
}
|
|
247
|
-
return this.namespace + "#" + shapeId;
|
|
248
|
-
}
|
|
249
|
-
getNamespace(shapeId) {
|
|
250
|
-
return this.normalizeShapeId(shapeId).split("#")[0];
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
// src/submodules/schema/schemas/Schema.ts
|
|
255
|
-
var Schema = class {
|
|
256
|
-
static assign(instance, values) {
|
|
257
|
-
const schema = Object.assign(instance, values);
|
|
258
|
-
TypeRegistry.for(schema.namespace).register(schema.name, schema);
|
|
259
|
-
return schema;
|
|
260
|
-
}
|
|
261
|
-
static [Symbol.hasInstance](lhs) {
|
|
262
|
-
const isPrototype = this.prototype.isPrototypeOf(lhs);
|
|
263
|
-
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
|
264
|
-
const list2 = lhs;
|
|
265
|
-
return list2.symbol === this.symbol;
|
|
266
|
-
}
|
|
267
|
-
return isPrototype;
|
|
268
|
-
}
|
|
269
|
-
getName() {
|
|
270
|
-
return this.namespace + "#" + this.name;
|
|
271
|
-
}
|
|
272
|
-
};
|
|
177
|
+
}
|
|
178
|
+
static [Symbol.hasInstance](lhs) {
|
|
179
|
+
const isPrototype = this.prototype.isPrototypeOf(lhs);
|
|
180
|
+
if (!isPrototype && typeof lhs === "object" && lhs !== null) {
|
|
181
|
+
const list = lhs;
|
|
182
|
+
return list.symbol === this.symbol;
|
|
183
|
+
}
|
|
184
|
+
return isPrototype;
|
|
185
|
+
}
|
|
186
|
+
getName() {
|
|
187
|
+
return this.namespace + "#" + this.name;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
273
190
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
namespace,
|
|
287
|
-
traits,
|
|
288
|
-
valueSchema
|
|
191
|
+
class ListSchema extends Schema {
|
|
192
|
+
static symbol = Symbol.for("@smithy/lis");
|
|
193
|
+
name;
|
|
194
|
+
traits;
|
|
195
|
+
valueSchema;
|
|
196
|
+
symbol = ListSchema.symbol;
|
|
197
|
+
}
|
|
198
|
+
const list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), {
|
|
199
|
+
name,
|
|
200
|
+
namespace,
|
|
201
|
+
traits,
|
|
202
|
+
valueSchema,
|
|
289
203
|
});
|
|
290
204
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
keySchema,
|
|
306
|
-
valueSchema
|
|
205
|
+
class MapSchema extends Schema {
|
|
206
|
+
static symbol = Symbol.for("@smithy/map");
|
|
207
|
+
name;
|
|
208
|
+
traits;
|
|
209
|
+
keySchema;
|
|
210
|
+
valueSchema;
|
|
211
|
+
symbol = MapSchema.symbol;
|
|
212
|
+
}
|
|
213
|
+
const map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), {
|
|
214
|
+
name,
|
|
215
|
+
namespace,
|
|
216
|
+
traits,
|
|
217
|
+
keySchema,
|
|
218
|
+
valueSchema,
|
|
307
219
|
});
|
|
308
220
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
input,
|
|
324
|
-
output
|
|
221
|
+
class OperationSchema extends Schema {
|
|
222
|
+
static symbol = Symbol.for("@smithy/ope");
|
|
223
|
+
name;
|
|
224
|
+
traits;
|
|
225
|
+
input;
|
|
226
|
+
output;
|
|
227
|
+
symbol = OperationSchema.symbol;
|
|
228
|
+
}
|
|
229
|
+
const op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), {
|
|
230
|
+
name,
|
|
231
|
+
namespace,
|
|
232
|
+
traits,
|
|
233
|
+
input,
|
|
234
|
+
output,
|
|
325
235
|
});
|
|
326
236
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
memberNames,
|
|
342
|
-
memberList
|
|
237
|
+
class StructureSchema extends Schema {
|
|
238
|
+
static symbol = Symbol.for("@smithy/str");
|
|
239
|
+
name;
|
|
240
|
+
traits;
|
|
241
|
+
memberNames;
|
|
242
|
+
memberList;
|
|
243
|
+
symbol = StructureSchema.symbol;
|
|
244
|
+
}
|
|
245
|
+
const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), {
|
|
246
|
+
name,
|
|
247
|
+
namespace,
|
|
248
|
+
traits,
|
|
249
|
+
memberNames,
|
|
250
|
+
memberList,
|
|
343
251
|
});
|
|
344
252
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
namespace,
|
|
358
|
-
traits,
|
|
359
|
-
memberNames,
|
|
360
|
-
memberList,
|
|
361
|
-
ctor: null
|
|
253
|
+
class ErrorSchema extends StructureSchema {
|
|
254
|
+
static symbol = Symbol.for("@smithy/err");
|
|
255
|
+
ctor;
|
|
256
|
+
symbol = ErrorSchema.symbol;
|
|
257
|
+
}
|
|
258
|
+
const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), {
|
|
259
|
+
name,
|
|
260
|
+
namespace,
|
|
261
|
+
traits,
|
|
262
|
+
memberNames,
|
|
263
|
+
memberList,
|
|
264
|
+
ctor: null,
|
|
362
265
|
});
|
|
363
266
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
// 19
|
|
380
|
-
DOCUMENT: 15,
|
|
381
|
-
// 15
|
|
382
|
-
TIMESTAMP_DEFAULT: 4,
|
|
383
|
-
// 4
|
|
384
|
-
TIMESTAMP_DATE_TIME: 5,
|
|
385
|
-
// 5
|
|
386
|
-
TIMESTAMP_HTTP_DATE: 6,
|
|
387
|
-
// 6
|
|
388
|
-
TIMESTAMP_EPOCH_SECONDS: 7,
|
|
389
|
-
// 7
|
|
390
|
-
LIST_MODIFIER: 64,
|
|
391
|
-
// 64
|
|
392
|
-
MAP_MODIFIER: 128
|
|
393
|
-
// 128
|
|
267
|
+
const SCHEMA = {
|
|
268
|
+
BLOB: 0b0001_0101,
|
|
269
|
+
STREAMING_BLOB: 0b0010_1010,
|
|
270
|
+
BOOLEAN: 0b0000_0010,
|
|
271
|
+
STRING: 0b0000_0000,
|
|
272
|
+
NUMERIC: 0b0000_0001,
|
|
273
|
+
BIG_INTEGER: 0b0001_0001,
|
|
274
|
+
BIG_DECIMAL: 0b0001_0011,
|
|
275
|
+
DOCUMENT: 0b0000_1111,
|
|
276
|
+
TIMESTAMP_DEFAULT: 0b0000_0100,
|
|
277
|
+
TIMESTAMP_DATE_TIME: 0b0000_0101,
|
|
278
|
+
TIMESTAMP_HTTP_DATE: 0b0000_0110,
|
|
279
|
+
TIMESTAMP_EPOCH_SECONDS: 0b0000_0111,
|
|
280
|
+
LIST_MODIFIER: 0b0100_0000,
|
|
281
|
+
MAP_MODIFIER: 0b1000_0000,
|
|
394
282
|
};
|
|
395
283
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
namespace,
|
|
409
|
-
traits,
|
|
410
|
-
schemaRef
|
|
284
|
+
class SimpleSchema extends Schema {
|
|
285
|
+
static symbol = Symbol.for("@smithy/sim");
|
|
286
|
+
name;
|
|
287
|
+
schemaRef;
|
|
288
|
+
traits;
|
|
289
|
+
symbol = SimpleSchema.symbol;
|
|
290
|
+
}
|
|
291
|
+
const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), {
|
|
292
|
+
name,
|
|
293
|
+
namespace,
|
|
294
|
+
traits,
|
|
295
|
+
schemaRef,
|
|
411
296
|
});
|
|
412
297
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
traits
|
|
506
|
-
|
|
507
|
-
|
|
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
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
return "";
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Allows iteration over members of a structure schema.
|
|
769
|
-
* Each yield is a pair of the member name and member schema.
|
|
770
|
-
*
|
|
771
|
-
* This avoids the overhead of calling Object.entries(ns.getMemberSchemas()).
|
|
772
|
-
*/
|
|
773
|
-
*structIterator() {
|
|
774
|
-
if (this.isUnitSchema()) {
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
|
-
if (!this.isStructSchema()) {
|
|
778
|
-
throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
779
|
-
}
|
|
780
|
-
const struct2 = this.getSchema();
|
|
781
|
-
for (let i = 0; i < struct2.memberNames.length; ++i) {
|
|
782
|
-
yield [struct2.memberNames[i], this.memberFrom([struct2.memberList[i], 0], struct2.memberNames[i])];
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
/**
|
|
786
|
-
* Creates a normalized member schema from the given schema and member name.
|
|
787
|
-
*/
|
|
788
|
-
memberFrom(memberSchema, memberName) {
|
|
789
|
-
if (memberSchema instanceof _NormalizedSchema) {
|
|
790
|
-
return Object.assign(memberSchema, {
|
|
791
|
-
memberName,
|
|
792
|
-
_isMemberSchema: true
|
|
793
|
-
});
|
|
794
|
-
}
|
|
795
|
-
return new _NormalizedSchema(memberSchema, memberName);
|
|
796
|
-
}
|
|
797
|
-
/**
|
|
798
|
-
* @returns a last-resort human-readable name for the schema if it has no other identifiers.
|
|
799
|
-
*/
|
|
800
|
-
getSchemaName() {
|
|
801
|
-
const schema = this.getSchema();
|
|
802
|
-
if (typeof schema === "number") {
|
|
803
|
-
const _schema = 63 & schema;
|
|
804
|
-
const container = 192 & schema;
|
|
805
|
-
const type = Object.entries(SCHEMA).find(([, value]) => {
|
|
806
|
-
return value === _schema;
|
|
807
|
-
})?.[0] ?? "Unknown";
|
|
808
|
-
switch (container) {
|
|
809
|
-
case SCHEMA.MAP_MODIFIER:
|
|
810
|
-
return `${type}Map`;
|
|
811
|
-
case SCHEMA.LIST_MODIFIER:
|
|
812
|
-
return `${type}List`;
|
|
813
|
-
case 0:
|
|
814
|
-
return type;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
return "Unknown";
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
821
|
-
0 && (module.exports = {
|
|
822
|
-
ErrorSchema,
|
|
823
|
-
ListSchema,
|
|
824
|
-
MapSchema,
|
|
825
|
-
NormalizedSchema,
|
|
826
|
-
OperationSchema,
|
|
827
|
-
SCHEMA,
|
|
828
|
-
Schema,
|
|
829
|
-
SimpleSchema,
|
|
830
|
-
StructureSchema,
|
|
831
|
-
TypeRegistry,
|
|
832
|
-
deref,
|
|
833
|
-
deserializerMiddlewareOption,
|
|
834
|
-
error,
|
|
835
|
-
getSchemaSerdePlugin,
|
|
836
|
-
list,
|
|
837
|
-
map,
|
|
838
|
-
op,
|
|
839
|
-
serializerMiddlewareOption,
|
|
840
|
-
sim,
|
|
841
|
-
struct
|
|
842
|
-
});
|
|
298
|
+
class NormalizedSchema {
|
|
299
|
+
ref;
|
|
300
|
+
memberName;
|
|
301
|
+
static symbol = Symbol.for("@smithy/nor");
|
|
302
|
+
symbol = NormalizedSchema.symbol;
|
|
303
|
+
name;
|
|
304
|
+
schema;
|
|
305
|
+
_isMemberSchema;
|
|
306
|
+
traits;
|
|
307
|
+
memberTraits;
|
|
308
|
+
normalizedTraits;
|
|
309
|
+
constructor(ref, memberName) {
|
|
310
|
+
this.ref = ref;
|
|
311
|
+
this.memberName = memberName;
|
|
312
|
+
const traitStack = [];
|
|
313
|
+
let _ref = ref;
|
|
314
|
+
let schema = ref;
|
|
315
|
+
this._isMemberSchema = false;
|
|
316
|
+
while (Array.isArray(_ref)) {
|
|
317
|
+
traitStack.push(_ref[1]);
|
|
318
|
+
_ref = _ref[0];
|
|
319
|
+
schema = deref(_ref);
|
|
320
|
+
this._isMemberSchema = true;
|
|
321
|
+
}
|
|
322
|
+
if (traitStack.length > 0) {
|
|
323
|
+
this.memberTraits = {};
|
|
324
|
+
for (let i = traitStack.length - 1; i >= 0; --i) {
|
|
325
|
+
const traitSet = traitStack[i];
|
|
326
|
+
Object.assign(this.memberTraits, NormalizedSchema.translateTraits(traitSet));
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
this.memberTraits = 0;
|
|
331
|
+
}
|
|
332
|
+
if (schema instanceof NormalizedSchema) {
|
|
333
|
+
const computedMemberTraits = this.memberTraits;
|
|
334
|
+
Object.assign(this, schema);
|
|
335
|
+
this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
|
|
336
|
+
this.normalizedTraits = void 0;
|
|
337
|
+
this.memberName = memberName ?? schema.memberName;
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
this.schema = deref(schema);
|
|
341
|
+
if (this.schema && typeof this.schema === "object") {
|
|
342
|
+
this.traits = this.schema?.traits ?? {};
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
this.traits = 0;
|
|
346
|
+
}
|
|
347
|
+
this.name =
|
|
348
|
+
(this.schema instanceof Schema ? this.schema.getName?.() : void 0) ?? this.memberName ?? this.getSchemaName();
|
|
349
|
+
if (this._isMemberSchema && !memberName) {
|
|
350
|
+
throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
static [Symbol.hasInstance](lhs) {
|
|
354
|
+
return Schema[Symbol.hasInstance].bind(this)(lhs);
|
|
355
|
+
}
|
|
356
|
+
static of(ref) {
|
|
357
|
+
if (ref instanceof NormalizedSchema) {
|
|
358
|
+
return ref;
|
|
359
|
+
}
|
|
360
|
+
if (Array.isArray(ref)) {
|
|
361
|
+
const [ns, traits] = ref;
|
|
362
|
+
if (ns instanceof NormalizedSchema) {
|
|
363
|
+
Object.assign(ns.getMergedTraits(), NormalizedSchema.translateTraits(traits));
|
|
364
|
+
return ns;
|
|
365
|
+
}
|
|
366
|
+
throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
|
|
367
|
+
}
|
|
368
|
+
return new NormalizedSchema(ref);
|
|
369
|
+
}
|
|
370
|
+
static translateTraits(indicator) {
|
|
371
|
+
if (typeof indicator === "object") {
|
|
372
|
+
return indicator;
|
|
373
|
+
}
|
|
374
|
+
indicator = indicator | 0;
|
|
375
|
+
const traits = {};
|
|
376
|
+
let i = 0;
|
|
377
|
+
for (const trait of [
|
|
378
|
+
"httpLabel",
|
|
379
|
+
"idempotent",
|
|
380
|
+
"idempotencyToken",
|
|
381
|
+
"sensitive",
|
|
382
|
+
"httpPayload",
|
|
383
|
+
"httpResponseCode",
|
|
384
|
+
"httpQueryParams",
|
|
385
|
+
]) {
|
|
386
|
+
if (((indicator >> i++) & 1) === 1) {
|
|
387
|
+
traits[trait] = 1;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return traits;
|
|
391
|
+
}
|
|
392
|
+
getSchema() {
|
|
393
|
+
if (this.schema instanceof NormalizedSchema) {
|
|
394
|
+
Object.assign(this, { schema: this.schema.getSchema() });
|
|
395
|
+
return this.schema;
|
|
396
|
+
}
|
|
397
|
+
if (this.schema instanceof SimpleSchema) {
|
|
398
|
+
return deref(this.schema.schemaRef);
|
|
399
|
+
}
|
|
400
|
+
return deref(this.schema);
|
|
401
|
+
}
|
|
402
|
+
getName(withNamespace = false) {
|
|
403
|
+
if (!withNamespace) {
|
|
404
|
+
if (this.name && this.name.includes("#")) {
|
|
405
|
+
return this.name.split("#")[1];
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return this.name || undefined;
|
|
409
|
+
}
|
|
410
|
+
getMemberName() {
|
|
411
|
+
if (!this.isMemberSchema()) {
|
|
412
|
+
throw new Error(`@smithy/core/schema - non-member schema: ${this.getName(true)}`);
|
|
413
|
+
}
|
|
414
|
+
return this.memberName;
|
|
415
|
+
}
|
|
416
|
+
isMemberSchema() {
|
|
417
|
+
return this._isMemberSchema;
|
|
418
|
+
}
|
|
419
|
+
isUnitSchema() {
|
|
420
|
+
return this.getSchema() === "unit";
|
|
421
|
+
}
|
|
422
|
+
isListSchema() {
|
|
423
|
+
const inner = this.getSchema();
|
|
424
|
+
if (typeof inner === "number") {
|
|
425
|
+
return inner >= SCHEMA.LIST_MODIFIER && inner < SCHEMA.MAP_MODIFIER;
|
|
426
|
+
}
|
|
427
|
+
return inner instanceof ListSchema;
|
|
428
|
+
}
|
|
429
|
+
isMapSchema() {
|
|
430
|
+
const inner = this.getSchema();
|
|
431
|
+
if (typeof inner === "number") {
|
|
432
|
+
return inner >= SCHEMA.MAP_MODIFIER && inner <= 0b1111_1111;
|
|
433
|
+
}
|
|
434
|
+
return inner instanceof MapSchema;
|
|
435
|
+
}
|
|
436
|
+
isStructSchema() {
|
|
437
|
+
const inner = this.getSchema();
|
|
438
|
+
return (inner !== null && typeof inner === "object" && "members" in inner) || inner instanceof StructureSchema;
|
|
439
|
+
}
|
|
440
|
+
isBlobSchema() {
|
|
441
|
+
return this.getSchema() === SCHEMA.BLOB || this.getSchema() === SCHEMA.STREAMING_BLOB;
|
|
442
|
+
}
|
|
443
|
+
isTimestampSchema() {
|
|
444
|
+
const schema = this.getSchema();
|
|
445
|
+
return typeof schema === "number" && schema >= SCHEMA.TIMESTAMP_DEFAULT && schema <= SCHEMA.TIMESTAMP_EPOCH_SECONDS;
|
|
446
|
+
}
|
|
447
|
+
isDocumentSchema() {
|
|
448
|
+
return this.getSchema() === SCHEMA.DOCUMENT;
|
|
449
|
+
}
|
|
450
|
+
isStringSchema() {
|
|
451
|
+
return this.getSchema() === SCHEMA.STRING;
|
|
452
|
+
}
|
|
453
|
+
isBooleanSchema() {
|
|
454
|
+
return this.getSchema() === SCHEMA.BOOLEAN;
|
|
455
|
+
}
|
|
456
|
+
isNumericSchema() {
|
|
457
|
+
return this.getSchema() === SCHEMA.NUMERIC;
|
|
458
|
+
}
|
|
459
|
+
isBigIntegerSchema() {
|
|
460
|
+
return this.getSchema() === SCHEMA.BIG_INTEGER;
|
|
461
|
+
}
|
|
462
|
+
isBigDecimalSchema() {
|
|
463
|
+
return this.getSchema() === SCHEMA.BIG_DECIMAL;
|
|
464
|
+
}
|
|
465
|
+
isStreaming() {
|
|
466
|
+
const streaming = !!this.getMergedTraits().streaming;
|
|
467
|
+
if (streaming) {
|
|
468
|
+
return true;
|
|
469
|
+
}
|
|
470
|
+
return this.getSchema() === SCHEMA.STREAMING_BLOB;
|
|
471
|
+
}
|
|
472
|
+
isIdempotencyToken() {
|
|
473
|
+
if (this.normalizedTraits) {
|
|
474
|
+
return !!this.normalizedTraits.idempotencyToken;
|
|
475
|
+
}
|
|
476
|
+
for (const traits of [this.traits, this.memberTraits]) {
|
|
477
|
+
if (typeof traits === "number") {
|
|
478
|
+
if ((traits & 0b0100) === 0b0100) {
|
|
479
|
+
return true;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
else if (typeof traits === "object") {
|
|
483
|
+
if (!!traits.idempotencyToken) {
|
|
484
|
+
return true;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return false;
|
|
489
|
+
}
|
|
490
|
+
getMergedTraits() {
|
|
491
|
+
return (this.normalizedTraits ??
|
|
492
|
+
(this.normalizedTraits = {
|
|
493
|
+
...this.getOwnTraits(),
|
|
494
|
+
...this.getMemberTraits(),
|
|
495
|
+
}));
|
|
496
|
+
}
|
|
497
|
+
getMemberTraits() {
|
|
498
|
+
return NormalizedSchema.translateTraits(this.memberTraits);
|
|
499
|
+
}
|
|
500
|
+
getOwnTraits() {
|
|
501
|
+
return NormalizedSchema.translateTraits(this.traits);
|
|
502
|
+
}
|
|
503
|
+
getKeySchema() {
|
|
504
|
+
if (this.isDocumentSchema()) {
|
|
505
|
+
return this.memberFrom([SCHEMA.DOCUMENT, 0], "key");
|
|
506
|
+
}
|
|
507
|
+
if (!this.isMapSchema()) {
|
|
508
|
+
throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
|
|
509
|
+
}
|
|
510
|
+
const schema = this.getSchema();
|
|
511
|
+
if (typeof schema === "number") {
|
|
512
|
+
return this.memberFrom([0b0011_1111 & schema, 0], "key");
|
|
513
|
+
}
|
|
514
|
+
return this.memberFrom([schema.keySchema, 0], "key");
|
|
515
|
+
}
|
|
516
|
+
getValueSchema() {
|
|
517
|
+
const schema = this.getSchema();
|
|
518
|
+
if (typeof schema === "number") {
|
|
519
|
+
if (this.isMapSchema()) {
|
|
520
|
+
return this.memberFrom([0b0011_1111 & schema, 0], "value");
|
|
521
|
+
}
|
|
522
|
+
else if (this.isListSchema()) {
|
|
523
|
+
return this.memberFrom([0b0011_1111 & schema, 0], "member");
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
if (schema && typeof schema === "object") {
|
|
527
|
+
if (this.isStructSchema()) {
|
|
528
|
+
throw new Error(`may not getValueSchema() on structure ${this.getName(true)}`);
|
|
529
|
+
}
|
|
530
|
+
const collection = schema;
|
|
531
|
+
if ("valueSchema" in collection) {
|
|
532
|
+
if (this.isMapSchema()) {
|
|
533
|
+
return this.memberFrom([collection.valueSchema, 0], "value");
|
|
534
|
+
}
|
|
535
|
+
else if (this.isListSchema()) {
|
|
536
|
+
return this.memberFrom([collection.valueSchema, 0], "member");
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
if (this.isDocumentSchema()) {
|
|
541
|
+
return this.memberFrom([SCHEMA.DOCUMENT, 0], "value");
|
|
542
|
+
}
|
|
543
|
+
throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
|
|
544
|
+
}
|
|
545
|
+
hasMemberSchema(member) {
|
|
546
|
+
if (this.isStructSchema()) {
|
|
547
|
+
const struct = this.getSchema();
|
|
548
|
+
return struct.memberNames.includes(member);
|
|
549
|
+
}
|
|
550
|
+
return false;
|
|
551
|
+
}
|
|
552
|
+
getMemberSchema(member) {
|
|
553
|
+
if (this.isStructSchema()) {
|
|
554
|
+
const struct = this.getSchema();
|
|
555
|
+
if (!struct.memberNames.includes(member)) {
|
|
556
|
+
throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${member}.`);
|
|
557
|
+
}
|
|
558
|
+
const i = struct.memberNames.indexOf(member);
|
|
559
|
+
const memberSchema = struct.memberList[i];
|
|
560
|
+
return this.memberFrom(Array.isArray(memberSchema) ? memberSchema : [memberSchema, 0], member);
|
|
561
|
+
}
|
|
562
|
+
if (this.isDocumentSchema()) {
|
|
563
|
+
return this.memberFrom([SCHEMA.DOCUMENT, 0], member);
|
|
564
|
+
}
|
|
565
|
+
throw new Error(`@smithy/core/schema - ${this.getName(true)} has no members.`);
|
|
566
|
+
}
|
|
567
|
+
getMemberSchemas() {
|
|
568
|
+
const buffer = {};
|
|
569
|
+
try {
|
|
570
|
+
for (const [k, v] of this.structIterator()) {
|
|
571
|
+
buffer[k] = v;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
catch (ignored) { }
|
|
575
|
+
return buffer;
|
|
576
|
+
}
|
|
577
|
+
getEventStreamMember() {
|
|
578
|
+
if (this.isStructSchema()) {
|
|
579
|
+
for (const [memberName, memberSchema] of this.structIterator()) {
|
|
580
|
+
if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {
|
|
581
|
+
return memberName;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
return "";
|
|
586
|
+
}
|
|
587
|
+
*structIterator() {
|
|
588
|
+
if (this.isUnitSchema()) {
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
if (!this.isStructSchema()) {
|
|
592
|
+
throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
593
|
+
}
|
|
594
|
+
const struct = this.getSchema();
|
|
595
|
+
for (let i = 0; i < struct.memberNames.length; ++i) {
|
|
596
|
+
yield [struct.memberNames[i], this.memberFrom([struct.memberList[i], 0], struct.memberNames[i])];
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
memberFrom(memberSchema, memberName) {
|
|
600
|
+
if (memberSchema instanceof NormalizedSchema) {
|
|
601
|
+
return Object.assign(memberSchema, {
|
|
602
|
+
memberName,
|
|
603
|
+
_isMemberSchema: true,
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
return new NormalizedSchema(memberSchema, memberName);
|
|
607
|
+
}
|
|
608
|
+
getSchemaName() {
|
|
609
|
+
const schema = this.getSchema();
|
|
610
|
+
if (typeof schema === "number") {
|
|
611
|
+
const _schema = 0b0011_1111 & schema;
|
|
612
|
+
const container = 0b1100_0000 & schema;
|
|
613
|
+
const type = Object.entries(SCHEMA).find(([, value]) => {
|
|
614
|
+
return value === _schema;
|
|
615
|
+
})?.[0] ?? "Unknown";
|
|
616
|
+
switch (container) {
|
|
617
|
+
case SCHEMA.MAP_MODIFIER:
|
|
618
|
+
return `${type}Map`;
|
|
619
|
+
case SCHEMA.LIST_MODIFIER:
|
|
620
|
+
return `${type}List`;
|
|
621
|
+
case 0:
|
|
622
|
+
return type;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
return "Unknown";
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
exports.ErrorSchema = ErrorSchema;
|
|
630
|
+
exports.ListSchema = ListSchema;
|
|
631
|
+
exports.MapSchema = MapSchema;
|
|
632
|
+
exports.NormalizedSchema = NormalizedSchema;
|
|
633
|
+
exports.OperationSchema = OperationSchema;
|
|
634
|
+
exports.SCHEMA = SCHEMA;
|
|
635
|
+
exports.Schema = Schema;
|
|
636
|
+
exports.SimpleSchema = SimpleSchema;
|
|
637
|
+
exports.StructureSchema = StructureSchema;
|
|
638
|
+
exports.TypeRegistry = TypeRegistry;
|
|
639
|
+
exports.deref = deref;
|
|
640
|
+
exports.deserializerMiddlewareOption = deserializerMiddlewareOption;
|
|
641
|
+
exports.error = error;
|
|
642
|
+
exports.getSchemaSerdePlugin = getSchemaSerdePlugin;
|
|
643
|
+
exports.list = list;
|
|
644
|
+
exports.map = map;
|
|
645
|
+
exports.op = op;
|
|
646
|
+
exports.serializerMiddlewareOption = serializerMiddlewareOption;
|
|
647
|
+
exports.sim = sim;
|
|
648
|
+
exports.struct = struct;
|