@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,308 +1,285 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(index_exports);
|
|
26
|
-
|
|
27
|
-
// src/MiddlewareStack.ts
|
|
28
|
-
var getAllAliases = /* @__PURE__ */ __name((name, aliases) => {
|
|
29
|
-
const _aliases = [];
|
|
30
|
-
if (name) {
|
|
31
|
-
_aliases.push(name);
|
|
32
|
-
}
|
|
33
|
-
if (aliases) {
|
|
34
|
-
for (const alias of aliases) {
|
|
35
|
-
_aliases.push(alias);
|
|
3
|
+
const getAllAliases = (name, aliases) => {
|
|
4
|
+
const _aliases = [];
|
|
5
|
+
if (name) {
|
|
6
|
+
_aliases.push(name);
|
|
36
7
|
}
|
|
37
|
-
|
|
38
|
-
return _aliases;
|
|
39
|
-
}, "getAllAliases");
|
|
40
|
-
var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => {
|
|
41
|
-
return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
|
|
42
|
-
}, "getMiddlewareNameWithAliases");
|
|
43
|
-
var constructStack = /* @__PURE__ */ __name(() => {
|
|
44
|
-
let absoluteEntries = [];
|
|
45
|
-
let relativeEntries = [];
|
|
46
|
-
let identifyOnResolve = false;
|
|
47
|
-
const entriesNameSet = /* @__PURE__ */ new Set();
|
|
48
|
-
const sort = /* @__PURE__ */ __name((entries) => entries.sort(
|
|
49
|
-
(a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]
|
|
50
|
-
), "sort");
|
|
51
|
-
const removeByName = /* @__PURE__ */ __name((toRemove) => {
|
|
52
|
-
let isRemoved = false;
|
|
53
|
-
const filterCb = /* @__PURE__ */ __name((entry) => {
|
|
54
|
-
const aliases = getAllAliases(entry.name, entry.aliases);
|
|
55
|
-
if (aliases.includes(toRemove)) {
|
|
56
|
-
isRemoved = true;
|
|
8
|
+
if (aliases) {
|
|
57
9
|
for (const alias of aliases) {
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
return true;
|
|
63
|
-
}, "filterCb");
|
|
64
|
-
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
65
|
-
relativeEntries = relativeEntries.filter(filterCb);
|
|
66
|
-
return isRemoved;
|
|
67
|
-
}, "removeByName");
|
|
68
|
-
const removeByReference = /* @__PURE__ */ __name((toRemove) => {
|
|
69
|
-
let isRemoved = false;
|
|
70
|
-
const filterCb = /* @__PURE__ */ __name((entry) => {
|
|
71
|
-
if (entry.middleware === toRemove) {
|
|
72
|
-
isRemoved = true;
|
|
73
|
-
for (const alias of getAllAliases(entry.name, entry.aliases)) {
|
|
74
|
-
entriesNameSet.delete(alias);
|
|
75
|
-
}
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
return true;
|
|
79
|
-
}, "filterCb");
|
|
80
|
-
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
81
|
-
relativeEntries = relativeEntries.filter(filterCb);
|
|
82
|
-
return isRemoved;
|
|
83
|
-
}, "removeByReference");
|
|
84
|
-
const cloneTo = /* @__PURE__ */ __name((toStack) => {
|
|
85
|
-
absoluteEntries.forEach((entry) => {
|
|
86
|
-
toStack.add(entry.middleware, { ...entry });
|
|
87
|
-
});
|
|
88
|
-
relativeEntries.forEach((entry) => {
|
|
89
|
-
toStack.addRelativeTo(entry.middleware, { ...entry });
|
|
90
|
-
});
|
|
91
|
-
toStack.identifyOnResolve?.(stack.identifyOnResolve());
|
|
92
|
-
return toStack;
|
|
93
|
-
}, "cloneTo");
|
|
94
|
-
const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => {
|
|
95
|
-
const expandedMiddlewareList = [];
|
|
96
|
-
from.before.forEach((entry) => {
|
|
97
|
-
if (entry.before.length === 0 && entry.after.length === 0) {
|
|
98
|
-
expandedMiddlewareList.push(entry);
|
|
99
|
-
} else {
|
|
100
|
-
expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
expandedMiddlewareList.push(from);
|
|
104
|
-
from.after.reverse().forEach((entry) => {
|
|
105
|
-
if (entry.before.length === 0 && entry.after.length === 0) {
|
|
106
|
-
expandedMiddlewareList.push(entry);
|
|
107
|
-
} else {
|
|
108
|
-
expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
return expandedMiddlewareList;
|
|
112
|
-
}, "expandRelativeMiddlewareList");
|
|
113
|
-
const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => {
|
|
114
|
-
const normalizedAbsoluteEntries = [];
|
|
115
|
-
const normalizedRelativeEntries = [];
|
|
116
|
-
const normalizedEntriesNameMap = {};
|
|
117
|
-
absoluteEntries.forEach((entry) => {
|
|
118
|
-
const normalizedEntry = {
|
|
119
|
-
...entry,
|
|
120
|
-
before: [],
|
|
121
|
-
after: []
|
|
122
|
-
};
|
|
123
|
-
for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
|
|
124
|
-
normalizedEntriesNameMap[alias] = normalizedEntry;
|
|
125
|
-
}
|
|
126
|
-
normalizedAbsoluteEntries.push(normalizedEntry);
|
|
127
|
-
});
|
|
128
|
-
relativeEntries.forEach((entry) => {
|
|
129
|
-
const normalizedEntry = {
|
|
130
|
-
...entry,
|
|
131
|
-
before: [],
|
|
132
|
-
after: []
|
|
133
|
-
};
|
|
134
|
-
for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
|
|
135
|
-
normalizedEntriesNameMap[alias] = normalizedEntry;
|
|
136
|
-
}
|
|
137
|
-
normalizedRelativeEntries.push(normalizedEntry);
|
|
138
|
-
});
|
|
139
|
-
normalizedRelativeEntries.forEach((entry) => {
|
|
140
|
-
if (entry.toMiddleware) {
|
|
141
|
-
const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
|
|
142
|
-
if (toMiddleware === void 0) {
|
|
143
|
-
if (debug) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
throw new Error(
|
|
147
|
-
`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
if (entry.relation === "after") {
|
|
151
|
-
toMiddleware.after.push(entry);
|
|
152
|
-
}
|
|
153
|
-
if (entry.relation === "before") {
|
|
154
|
-
toMiddleware.before.push(entry);
|
|
10
|
+
_aliases.push(alias);
|
|
155
11
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
|
|
180
|
-
for (const alias of aliases) {
|
|
181
|
-
const toOverrideIndex = absoluteEntries.findIndex(
|
|
182
|
-
(entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)
|
|
183
|
-
);
|
|
184
|
-
if (toOverrideIndex === -1) {
|
|
185
|
-
continue;
|
|
12
|
+
}
|
|
13
|
+
return _aliases;
|
|
14
|
+
};
|
|
15
|
+
const getMiddlewareNameWithAliases = (name, aliases) => {
|
|
16
|
+
return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
|
|
17
|
+
};
|
|
18
|
+
const constructStack = () => {
|
|
19
|
+
let absoluteEntries = [];
|
|
20
|
+
let relativeEntries = [];
|
|
21
|
+
let identifyOnResolve = false;
|
|
22
|
+
const entriesNameSet = new Set();
|
|
23
|
+
const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] ||
|
|
24
|
+
priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]);
|
|
25
|
+
const removeByName = (toRemove) => {
|
|
26
|
+
let isRemoved = false;
|
|
27
|
+
const filterCb = (entry) => {
|
|
28
|
+
const aliases = getAllAliases(entry.name, entry.aliases);
|
|
29
|
+
if (aliases.includes(toRemove)) {
|
|
30
|
+
isRemoved = true;
|
|
31
|
+
for (const alias of aliases) {
|
|
32
|
+
entriesNameSet.delete(alias);
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
186
35
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
36
|
+
return true;
|
|
37
|
+
};
|
|
38
|
+
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
39
|
+
relativeEntries = relativeEntries.filter(filterCb);
|
|
40
|
+
return isRemoved;
|
|
41
|
+
};
|
|
42
|
+
const removeByReference = (toRemove) => {
|
|
43
|
+
let isRemoved = false;
|
|
44
|
+
const filterCb = (entry) => {
|
|
45
|
+
if (entry.middleware === toRemove) {
|
|
46
|
+
isRemoved = true;
|
|
47
|
+
for (const alias of getAllAliases(entry.name, entry.aliases)) {
|
|
48
|
+
entriesNameSet.delete(alias);
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
192
51
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
(entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)
|
|
215
|
-
);
|
|
216
|
-
if (toOverrideIndex === -1) {
|
|
217
|
-
continue;
|
|
52
|
+
return true;
|
|
53
|
+
};
|
|
54
|
+
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
55
|
+
relativeEntries = relativeEntries.filter(filterCb);
|
|
56
|
+
return isRemoved;
|
|
57
|
+
};
|
|
58
|
+
const cloneTo = (toStack) => {
|
|
59
|
+
absoluteEntries.forEach((entry) => {
|
|
60
|
+
toStack.add(entry.middleware, { ...entry });
|
|
61
|
+
});
|
|
62
|
+
relativeEntries.forEach((entry) => {
|
|
63
|
+
toStack.addRelativeTo(entry.middleware, { ...entry });
|
|
64
|
+
});
|
|
65
|
+
toStack.identifyOnResolve?.(stack.identifyOnResolve());
|
|
66
|
+
return toStack;
|
|
67
|
+
};
|
|
68
|
+
const expandRelativeMiddlewareList = (from) => {
|
|
69
|
+
const expandedMiddlewareList = [];
|
|
70
|
+
from.before.forEach((entry) => {
|
|
71
|
+
if (entry.before.length === 0 && entry.after.length === 0) {
|
|
72
|
+
expandedMiddlewareList.push(entry);
|
|
218
73
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
throw new Error(
|
|
222
|
-
`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`
|
|
223
|
-
);
|
|
74
|
+
else {
|
|
75
|
+
expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
|
|
224
76
|
}
|
|
225
|
-
|
|
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
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
77
|
+
});
|
|
78
|
+
expandedMiddlewareList.push(from);
|
|
79
|
+
from.after.reverse().forEach((entry) => {
|
|
80
|
+
if (entry.before.length === 0 && entry.after.length === 0) {
|
|
81
|
+
expandedMiddlewareList.push(entry);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
return expandedMiddlewareList;
|
|
88
|
+
};
|
|
89
|
+
const getMiddlewareList = (debug = false) => {
|
|
90
|
+
const normalizedAbsoluteEntries = [];
|
|
91
|
+
const normalizedRelativeEntries = [];
|
|
92
|
+
const normalizedEntriesNameMap = {};
|
|
93
|
+
absoluteEntries.forEach((entry) => {
|
|
94
|
+
const normalizedEntry = {
|
|
95
|
+
...entry,
|
|
96
|
+
before: [],
|
|
97
|
+
after: [],
|
|
98
|
+
};
|
|
99
|
+
for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
|
|
100
|
+
normalizedEntriesNameMap[alias] = normalizedEntry;
|
|
101
|
+
}
|
|
102
|
+
normalizedAbsoluteEntries.push(normalizedEntry);
|
|
103
|
+
});
|
|
104
|
+
relativeEntries.forEach((entry) => {
|
|
105
|
+
const normalizedEntry = {
|
|
106
|
+
...entry,
|
|
107
|
+
before: [],
|
|
108
|
+
after: [],
|
|
109
|
+
};
|
|
110
|
+
for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
|
|
111
|
+
normalizedEntriesNameMap[alias] = normalizedEntry;
|
|
112
|
+
}
|
|
113
|
+
normalizedRelativeEntries.push(normalizedEntry);
|
|
114
|
+
});
|
|
115
|
+
normalizedRelativeEntries.forEach((entry) => {
|
|
116
|
+
if (entry.toMiddleware) {
|
|
117
|
+
const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
|
|
118
|
+
if (toMiddleware === undefined) {
|
|
119
|
+
if (debug) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
throw new Error(`${entry.toMiddleware} is not found when adding ` +
|
|
123
|
+
`${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` +
|
|
124
|
+
`middleware ${entry.relation} ${entry.toMiddleware}`);
|
|
125
|
+
}
|
|
126
|
+
if (entry.relation === "after") {
|
|
127
|
+
toMiddleware.after.push(entry);
|
|
128
|
+
}
|
|
129
|
+
if (entry.relation === "before") {
|
|
130
|
+
toMiddleware.before.push(entry);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
const mainChain = sort(normalizedAbsoluteEntries)
|
|
135
|
+
.map(expandRelativeMiddlewareList)
|
|
136
|
+
.reduce((wholeList, expandedMiddlewareList) => {
|
|
137
|
+
wholeList.push(...expandedMiddlewareList);
|
|
138
|
+
return wholeList;
|
|
139
|
+
}, []);
|
|
140
|
+
return mainChain;
|
|
141
|
+
};
|
|
142
|
+
const stack = {
|
|
143
|
+
add: (middleware, options = {}) => {
|
|
144
|
+
const { name, override, aliases: _aliases } = options;
|
|
145
|
+
const entry = {
|
|
146
|
+
step: "initialize",
|
|
147
|
+
priority: "normal",
|
|
148
|
+
middleware,
|
|
149
|
+
...options,
|
|
150
|
+
};
|
|
151
|
+
const aliases = getAllAliases(name, _aliases);
|
|
152
|
+
if (aliases.length > 0) {
|
|
153
|
+
if (aliases.some((alias) => entriesNameSet.has(alias))) {
|
|
154
|
+
if (!override)
|
|
155
|
+
throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
|
|
156
|
+
for (const alias of aliases) {
|
|
157
|
+
const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));
|
|
158
|
+
if (toOverrideIndex === -1) {
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
const toOverride = absoluteEntries[toOverrideIndex];
|
|
162
|
+
if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {
|
|
163
|
+
throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` +
|
|
164
|
+
`${toOverride.priority} priority in ${toOverride.step} step cannot ` +
|
|
165
|
+
`be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` +
|
|
166
|
+
`${entry.priority} priority in ${entry.step} step.`);
|
|
167
|
+
}
|
|
168
|
+
absoluteEntries.splice(toOverrideIndex, 1);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
for (const alias of aliases) {
|
|
172
|
+
entriesNameSet.add(alias);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
absoluteEntries.push(entry);
|
|
176
|
+
},
|
|
177
|
+
addRelativeTo: (middleware, options) => {
|
|
178
|
+
const { name, override, aliases: _aliases } = options;
|
|
179
|
+
const entry = {
|
|
180
|
+
middleware,
|
|
181
|
+
...options,
|
|
182
|
+
};
|
|
183
|
+
const aliases = getAllAliases(name, _aliases);
|
|
184
|
+
if (aliases.length > 0) {
|
|
185
|
+
if (aliases.some((alias) => entriesNameSet.has(alias))) {
|
|
186
|
+
if (!override)
|
|
187
|
+
throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
|
|
188
|
+
for (const alias of aliases) {
|
|
189
|
+
const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));
|
|
190
|
+
if (toOverrideIndex === -1) {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
const toOverride = relativeEntries[toOverrideIndex];
|
|
194
|
+
if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
|
|
195
|
+
throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` +
|
|
196
|
+
`${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` +
|
|
197
|
+
`by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` +
|
|
198
|
+
`"${entry.toMiddleware}" middleware.`);
|
|
199
|
+
}
|
|
200
|
+
relativeEntries.splice(toOverrideIndex, 1);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
for (const alias of aliases) {
|
|
204
|
+
entriesNameSet.add(alias);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
relativeEntries.push(entry);
|
|
208
|
+
},
|
|
209
|
+
clone: () => cloneTo(constructStack()),
|
|
210
|
+
use: (plugin) => {
|
|
211
|
+
plugin.applyToStack(stack);
|
|
212
|
+
},
|
|
213
|
+
remove: (toRemove) => {
|
|
214
|
+
if (typeof toRemove === "string")
|
|
215
|
+
return removeByName(toRemove);
|
|
216
|
+
else
|
|
217
|
+
return removeByReference(toRemove);
|
|
218
|
+
},
|
|
219
|
+
removeByTag: (toRemove) => {
|
|
220
|
+
let isRemoved = false;
|
|
221
|
+
const filterCb = (entry) => {
|
|
222
|
+
const { tags, name, aliases: _aliases } = entry;
|
|
223
|
+
if (tags && tags.includes(toRemove)) {
|
|
224
|
+
const aliases = getAllAliases(name, _aliases);
|
|
225
|
+
for (const alias of aliases) {
|
|
226
|
+
entriesNameSet.delete(alias);
|
|
227
|
+
}
|
|
228
|
+
isRemoved = true;
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
return true;
|
|
232
|
+
};
|
|
233
|
+
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
234
|
+
relativeEntries = relativeEntries.filter(filterCb);
|
|
235
|
+
return isRemoved;
|
|
236
|
+
},
|
|
237
|
+
concat: (from) => {
|
|
238
|
+
const cloned = cloneTo(constructStack());
|
|
239
|
+
cloned.use(from);
|
|
240
|
+
cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));
|
|
241
|
+
return cloned;
|
|
242
|
+
},
|
|
243
|
+
applyToStack: cloneTo,
|
|
244
|
+
identify: () => {
|
|
245
|
+
return getMiddlewareList(true).map((mw) => {
|
|
246
|
+
const step = mw.step ??
|
|
247
|
+
mw.relation +
|
|
248
|
+
" " +
|
|
249
|
+
mw.toMiddleware;
|
|
250
|
+
return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
|
|
251
|
+
});
|
|
252
|
+
},
|
|
253
|
+
identifyOnResolve(toggle) {
|
|
254
|
+
if (typeof toggle === "boolean")
|
|
255
|
+
identifyOnResolve = toggle;
|
|
256
|
+
return identifyOnResolve;
|
|
257
|
+
},
|
|
258
|
+
resolve: (handler, context) => {
|
|
259
|
+
for (const middleware of getMiddlewareList()
|
|
260
|
+
.map((entry) => entry.middleware)
|
|
261
|
+
.reverse()) {
|
|
262
|
+
handler = middleware(handler, context);
|
|
263
|
+
}
|
|
264
|
+
if (identifyOnResolve) {
|
|
265
|
+
console.log(stack.identify());
|
|
266
|
+
}
|
|
267
|
+
return handler;
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
return stack;
|
|
297
271
|
};
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
272
|
+
const stepWeights = {
|
|
273
|
+
initialize: 5,
|
|
274
|
+
serialize: 4,
|
|
275
|
+
build: 3,
|
|
276
|
+
finalizeRequest: 2,
|
|
277
|
+
deserialize: 1,
|
|
278
|
+
};
|
|
279
|
+
const priorityWeights = {
|
|
280
|
+
high: 3,
|
|
281
|
+
normal: 2,
|
|
282
|
+
low: 1,
|
|
302
283
|
};
|
|
303
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
304
|
-
|
|
305
|
-
0 && (module.exports = {
|
|
306
|
-
constructStack
|
|
307
|
-
});
|
|
308
284
|
|
|
285
|
+
exports.constructStack = constructStack;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-stack",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Provides a means for composing multiple middleware functions into a single handler",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"module": "./dist-es/index.js",
|
|
28
28
|
"types": "./dist-types/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/types": "^4.
|
|
30
|
+
"@smithy/types": "^4.6.0",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|