@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,298 +1,240 @@
|
|
|
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);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
endpointMiddleware: () => endpointMiddleware,
|
|
24
|
-
endpointMiddlewareOptions: () => endpointMiddlewareOptions,
|
|
25
|
-
getEndpointFromInstructions: () => getEndpointFromInstructions,
|
|
26
|
-
getEndpointPlugin: () => getEndpointPlugin,
|
|
27
|
-
resolveEndpointConfig: () => resolveEndpointConfig,
|
|
28
|
-
resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig,
|
|
29
|
-
resolveParams: () => resolveParams,
|
|
30
|
-
toEndpointV1: () => toEndpointV1
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(index_exports);
|
|
1
|
+
'use strict';
|
|
33
2
|
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
if (isArnBucketName(bucket)) {
|
|
41
|
-
if (endpointParams.ForcePathStyle === true) {
|
|
42
|
-
throw new Error("Path-style addressing cannot be used with ARN buckets");
|
|
43
|
-
}
|
|
44
|
-
} else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) {
|
|
45
|
-
endpointParams.ForcePathStyle = true;
|
|
46
|
-
}
|
|
47
|
-
if (endpointParams.DisableMultiRegionAccessPoints) {
|
|
48
|
-
endpointParams.disableMultiRegionAccessPoints = true;
|
|
49
|
-
endpointParams.DisableMRAP = true;
|
|
50
|
-
}
|
|
51
|
-
return endpointParams;
|
|
52
|
-
}, "resolveParamsForS3");
|
|
53
|
-
var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
|
|
54
|
-
var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
|
|
55
|
-
var DOTS_PATTERN = /\.\./;
|
|
56
|
-
var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName");
|
|
57
|
-
var isArnBucketName = /* @__PURE__ */ __name((bucketName) => {
|
|
58
|
-
const [arn, partition, service, , , bucket] = bucketName.split(":");
|
|
59
|
-
const isArn = arn === "arn" && bucketName.split(":").length >= 6;
|
|
60
|
-
const isValidArn = Boolean(isArn && partition && service && bucket);
|
|
61
|
-
if (isArn && !isValidArn) {
|
|
62
|
-
throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
|
|
63
|
-
}
|
|
64
|
-
return isValidArn;
|
|
65
|
-
}, "isArnBucketName");
|
|
3
|
+
var getEndpointFromConfig = require('./adaptors/getEndpointFromConfig');
|
|
4
|
+
var urlParser = require('@smithy/url-parser');
|
|
5
|
+
var core = require('@smithy/core');
|
|
6
|
+
var utilMiddleware = require('@smithy/util-middleware');
|
|
7
|
+
var middlewareSerde = require('@smithy/middleware-serde');
|
|
66
8
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (typeof configValue === "function") {
|
|
72
|
-
return configValue();
|
|
9
|
+
const resolveParamsForS3 = async (endpointParams) => {
|
|
10
|
+
const bucket = endpointParams?.Bucket || "";
|
|
11
|
+
if (typeof endpointParams.Bucket === "string") {
|
|
12
|
+
endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
|
|
73
13
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return async () => {
|
|
78
|
-
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
|
|
79
|
-
const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;
|
|
80
|
-
return configValue;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
|
|
84
|
-
return async () => {
|
|
85
|
-
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
|
|
86
|
-
const configValue = credentials?.accountId ?? credentials?.AccountId;
|
|
87
|
-
return configValue;
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
|
|
91
|
-
return async () => {
|
|
92
|
-
if (config.isCustomEndpoint === false) {
|
|
93
|
-
return void 0;
|
|
94
|
-
}
|
|
95
|
-
const endpoint = await configProvider();
|
|
96
|
-
if (endpoint && typeof endpoint === "object") {
|
|
97
|
-
if ("url" in endpoint) {
|
|
98
|
-
return endpoint.url.href;
|
|
14
|
+
if (isArnBucketName(bucket)) {
|
|
15
|
+
if (endpointParams.ForcePathStyle === true) {
|
|
16
|
+
throw new Error("Path-style addressing cannot be used with ARN buckets");
|
|
99
17
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
18
|
+
}
|
|
19
|
+
else if (!isDnsCompatibleBucketName(bucket) ||
|
|
20
|
+
(bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:")) ||
|
|
21
|
+
bucket.toLowerCase() !== bucket ||
|
|
22
|
+
bucket.length < 3) {
|
|
23
|
+
endpointParams.ForcePathStyle = true;
|
|
24
|
+
}
|
|
25
|
+
if (endpointParams.DisableMultiRegionAccessPoints) {
|
|
26
|
+
endpointParams.disableMultiRegionAccessPoints = true;
|
|
27
|
+
endpointParams.DisableMRAP = true;
|
|
28
|
+
}
|
|
29
|
+
return endpointParams;
|
|
30
|
+
};
|
|
31
|
+
const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
|
|
32
|
+
const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
|
|
33
|
+
const DOTS_PATTERN = /\.\./;
|
|
34
|
+
const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
|
|
35
|
+
const isArnBucketName = (bucketName) => {
|
|
36
|
+
const [arn, partition, service, , , bucket] = bucketName.split(":");
|
|
37
|
+
const isArn = arn === "arn" && bucketName.split(":").length >= 6;
|
|
38
|
+
const isValidArn = Boolean(isArn && partition && service && bucket);
|
|
39
|
+
if (isArn && !isValidArn) {
|
|
40
|
+
throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
|
|
41
|
+
}
|
|
42
|
+
return isValidArn;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => {
|
|
46
|
+
const configProvider = async () => {
|
|
47
|
+
const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
|
|
48
|
+
if (typeof configValue === "function") {
|
|
49
|
+
return configValue();
|
|
103
50
|
}
|
|
104
|
-
|
|
105
|
-
return endpoint;
|
|
51
|
+
return configValue;
|
|
106
52
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// src/adaptors/toEndpointV1.ts
|
|
115
|
-
var import_url_parser = require("@smithy/url-parser");
|
|
116
|
-
var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => {
|
|
117
|
-
if (typeof endpoint === "object") {
|
|
118
|
-
if ("url" in endpoint) {
|
|
119
|
-
return (0, import_url_parser.parseUrl)(endpoint.url);
|
|
53
|
+
if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") {
|
|
54
|
+
return async () => {
|
|
55
|
+
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
|
|
56
|
+
const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;
|
|
57
|
+
return configValue;
|
|
58
|
+
};
|
|
120
59
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
128
|
-
if (!clientConfig.isCustomEndpoint) {
|
|
129
|
-
let endpointFromConfig;
|
|
130
|
-
if (clientConfig.serviceConfiguredEndpoint) {
|
|
131
|
-
endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
|
|
132
|
-
} else {
|
|
133
|
-
endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId);
|
|
60
|
+
if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
|
|
61
|
+
return async () => {
|
|
62
|
+
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
|
|
63
|
+
const configValue = credentials?.accountId ?? credentials?.AccountId;
|
|
64
|
+
return configValue;
|
|
65
|
+
};
|
|
134
66
|
}
|
|
135
|
-
if (
|
|
136
|
-
|
|
137
|
-
|
|
67
|
+
if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
|
|
68
|
+
return async () => {
|
|
69
|
+
if (config.isCustomEndpoint === false) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
const endpoint = await configProvider();
|
|
73
|
+
if (endpoint && typeof endpoint === "object") {
|
|
74
|
+
if ("url" in endpoint) {
|
|
75
|
+
return endpoint.url.href;
|
|
76
|
+
}
|
|
77
|
+
if ("hostname" in endpoint) {
|
|
78
|
+
const { protocol, hostname, port, path } = endpoint;
|
|
79
|
+
return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return endpoint;
|
|
83
|
+
};
|
|
138
84
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const endpointParams = {};
|
|
149
|
-
const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
|
|
150
|
-
for (const [name, instruction] of Object.entries(instructions)) {
|
|
151
|
-
switch (instruction.type) {
|
|
152
|
-
case "staticContextParams":
|
|
153
|
-
endpointParams[name] = instruction.value;
|
|
154
|
-
break;
|
|
155
|
-
case "contextParams":
|
|
156
|
-
endpointParams[name] = commandInput[instruction.name];
|
|
157
|
-
break;
|
|
158
|
-
case "clientContextParams":
|
|
159
|
-
case "builtInParams":
|
|
160
|
-
endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
|
|
161
|
-
break;
|
|
162
|
-
case "operationContextParams":
|
|
163
|
-
endpointParams[name] = instruction.get(commandInput);
|
|
164
|
-
break;
|
|
165
|
-
default:
|
|
166
|
-
throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
|
|
85
|
+
return configProvider;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const toEndpointV1 = (endpoint) => {
|
|
89
|
+
if (typeof endpoint === "object") {
|
|
90
|
+
if ("url" in endpoint) {
|
|
91
|
+
return urlParser.parseUrl(endpoint.url);
|
|
92
|
+
}
|
|
93
|
+
return endpoint;
|
|
167
94
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
Object.assign(endpointParams, clientConfig);
|
|
171
|
-
}
|
|
172
|
-
if (String(clientConfig.serviceId).toLowerCase() === "s3") {
|
|
173
|
-
await resolveParamsForS3(endpointParams);
|
|
174
|
-
}
|
|
175
|
-
return endpointParams;
|
|
176
|
-
}, "resolveParams");
|
|
95
|
+
return urlParser.parseUrl(endpoint);
|
|
96
|
+
};
|
|
177
97
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
98
|
+
const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
99
|
+
if (!clientConfig.isCustomEndpoint) {
|
|
100
|
+
let endpointFromConfig;
|
|
101
|
+
if (clientConfig.serviceConfiguredEndpoint) {
|
|
102
|
+
endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId);
|
|
106
|
+
}
|
|
107
|
+
if (endpointFromConfig) {
|
|
108
|
+
clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
|
|
109
|
+
clientConfig.isCustomEndpoint = true;
|
|
110
|
+
}
|
|
188
111
|
}
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
112
|
+
const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
|
|
113
|
+
if (typeof clientConfig.endpointProvider !== "function") {
|
|
114
|
+
throw new Error("config.endpointProvider is not set.");
|
|
115
|
+
}
|
|
116
|
+
const endpoint = clientConfig.endpointProvider(endpointParams, context);
|
|
117
|
+
return endpoint;
|
|
118
|
+
};
|
|
119
|
+
const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
|
|
120
|
+
const endpointParams = {};
|
|
121
|
+
const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
|
|
122
|
+
for (const [name, instruction] of Object.entries(instructions)) {
|
|
123
|
+
switch (instruction.type) {
|
|
124
|
+
case "staticContextParams":
|
|
125
|
+
endpointParams[name] = instruction.value;
|
|
126
|
+
break;
|
|
127
|
+
case "contextParams":
|
|
128
|
+
endpointParams[name] = commandInput[instruction.name];
|
|
129
|
+
break;
|
|
130
|
+
case "clientContextParams":
|
|
131
|
+
case "builtInParams":
|
|
132
|
+
endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
|
|
133
|
+
break;
|
|
134
|
+
case "operationContextParams":
|
|
135
|
+
endpointParams[name] = instruction.get(commandInput);
|
|
136
|
+
break;
|
|
137
|
+
default:
|
|
138
|
+
throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
|
|
194
139
|
}
|
|
195
|
-
},
|
|
196
|
-
{ ...config },
|
|
197
|
-
context
|
|
198
|
-
);
|
|
199
|
-
context.endpointV2 = endpoint;
|
|
200
|
-
context.authSchemes = endpoint.properties?.authSchemes;
|
|
201
|
-
const authScheme = context.authSchemes?.[0];
|
|
202
|
-
if (authScheme) {
|
|
203
|
-
context["signing_region"] = authScheme.signingRegion;
|
|
204
|
-
context["signing_service"] = authScheme.signingName;
|
|
205
|
-
const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
|
|
206
|
-
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
|
|
207
|
-
if (httpAuthOption) {
|
|
208
|
-
httpAuthOption.signingProperties = Object.assign(
|
|
209
|
-
httpAuthOption.signingProperties || {},
|
|
210
|
-
{
|
|
211
|
-
signing_region: authScheme.signingRegion,
|
|
212
|
-
signingRegion: authScheme.signingRegion,
|
|
213
|
-
signing_service: authScheme.signingName,
|
|
214
|
-
signingName: authScheme.signingName,
|
|
215
|
-
signingRegionSet: authScheme.signingRegionSet
|
|
216
|
-
},
|
|
217
|
-
authScheme.properties
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
140
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
229
|
-
var endpointMiddlewareOptions = {
|
|
230
|
-
step: "serialize",
|
|
231
|
-
tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
|
|
232
|
-
name: "endpointV2Middleware",
|
|
233
|
-
override: true,
|
|
234
|
-
relation: "before",
|
|
235
|
-
toMiddleware: import_middleware_serde.serializerMiddlewareOption.name
|
|
141
|
+
if (Object.keys(instructions).length === 0) {
|
|
142
|
+
Object.assign(endpointParams, clientConfig);
|
|
143
|
+
}
|
|
144
|
+
if (String(clientConfig.serviceId).toLowerCase() === "s3") {
|
|
145
|
+
await resolveParamsForS3(endpointParams);
|
|
146
|
+
}
|
|
147
|
+
return endpointParams;
|
|
236
148
|
};
|
|
237
|
-
var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({
|
|
238
|
-
applyToStack: /* @__PURE__ */ __name((clientStack) => {
|
|
239
|
-
clientStack.addRelativeTo(
|
|
240
|
-
endpointMiddleware({
|
|
241
|
-
config,
|
|
242
|
-
instructions
|
|
243
|
-
}),
|
|
244
|
-
endpointMiddlewareOptions
|
|
245
|
-
);
|
|
246
|
-
}, "applyToStack")
|
|
247
|
-
}), "getEndpointPlugin");
|
|
248
149
|
|
|
249
|
-
|
|
150
|
+
const endpointMiddleware = ({ config, instructions, }) => {
|
|
151
|
+
return (next, context) => async (args) => {
|
|
152
|
+
if (config.isCustomEndpoint) {
|
|
153
|
+
core.setFeature(context, "ENDPOINT_OVERRIDE", "N");
|
|
154
|
+
}
|
|
155
|
+
const endpoint = await getEndpointFromInstructions(args.input, {
|
|
156
|
+
getEndpointParameterInstructions() {
|
|
157
|
+
return instructions;
|
|
158
|
+
},
|
|
159
|
+
}, { ...config }, context);
|
|
160
|
+
context.endpointV2 = endpoint;
|
|
161
|
+
context.authSchemes = endpoint.properties?.authSchemes;
|
|
162
|
+
const authScheme = context.authSchemes?.[0];
|
|
163
|
+
if (authScheme) {
|
|
164
|
+
context["signing_region"] = authScheme.signingRegion;
|
|
165
|
+
context["signing_service"] = authScheme.signingName;
|
|
166
|
+
const smithyContext = utilMiddleware.getSmithyContext(context);
|
|
167
|
+
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
|
|
168
|
+
if (httpAuthOption) {
|
|
169
|
+
httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
|
|
170
|
+
signing_region: authScheme.signingRegion,
|
|
171
|
+
signingRegion: authScheme.signingRegion,
|
|
172
|
+
signing_service: authScheme.signingName,
|
|
173
|
+
signingName: authScheme.signingName,
|
|
174
|
+
signingRegionSet: authScheme.signingRegionSet,
|
|
175
|
+
}, authScheme.properties);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return next({
|
|
179
|
+
...args,
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
};
|
|
250
183
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId);
|
|
268
|
-
}
|
|
269
|
-
return configuredEndpointPromise;
|
|
270
|
-
};
|
|
271
|
-
return resolvedConfig;
|
|
272
|
-
}, "resolveEndpointConfig");
|
|
184
|
+
const endpointMiddlewareOptions = {
|
|
185
|
+
step: "serialize",
|
|
186
|
+
tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
|
|
187
|
+
name: "endpointV2Middleware",
|
|
188
|
+
override: true,
|
|
189
|
+
relation: "before",
|
|
190
|
+
toMiddleware: middlewareSerde.serializerMiddlewareOption.name,
|
|
191
|
+
};
|
|
192
|
+
const getEndpointPlugin = (config, instructions) => ({
|
|
193
|
+
applyToStack: (clientStack) => {
|
|
194
|
+
clientStack.addRelativeTo(endpointMiddleware({
|
|
195
|
+
config,
|
|
196
|
+
instructions,
|
|
197
|
+
}), endpointMiddlewareOptions);
|
|
198
|
+
},
|
|
199
|
+
});
|
|
273
200
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
201
|
+
const resolveEndpointConfig = (input) => {
|
|
202
|
+
const tls = input.tls ?? true;
|
|
203
|
+
const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
|
|
204
|
+
const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined;
|
|
205
|
+
const isCustomEndpoint = !!endpoint;
|
|
206
|
+
const resolvedConfig = Object.assign(input, {
|
|
207
|
+
endpoint: customEndpointProvider,
|
|
208
|
+
tls,
|
|
209
|
+
isCustomEndpoint,
|
|
210
|
+
useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false),
|
|
211
|
+
useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false),
|
|
212
|
+
});
|
|
213
|
+
let configuredEndpointPromise = undefined;
|
|
214
|
+
resolvedConfig.serviceConfiguredEndpoint = async () => {
|
|
215
|
+
if (input.serviceId && !configuredEndpointPromise) {
|
|
216
|
+
configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId);
|
|
217
|
+
}
|
|
218
|
+
return configuredEndpointPromise;
|
|
282
219
|
};
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}, "resolveEndpointRequiredConfig");
|
|
286
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
220
|
+
return resolvedConfig;
|
|
221
|
+
};
|
|
287
222
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
});
|
|
223
|
+
const resolveEndpointRequiredConfig = (input) => {
|
|
224
|
+
const { endpoint } = input;
|
|
225
|
+
if (endpoint === undefined) {
|
|
226
|
+
input.endpoint = async () => {
|
|
227
|
+
throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
return input;
|
|
231
|
+
};
|
|
298
232
|
|
|
233
|
+
exports.endpointMiddleware = endpointMiddleware;
|
|
234
|
+
exports.endpointMiddlewareOptions = endpointMiddlewareOptions;
|
|
235
|
+
exports.getEndpointFromInstructions = getEndpointFromInstructions;
|
|
236
|
+
exports.getEndpointPlugin = getEndpointPlugin;
|
|
237
|
+
exports.resolveEndpointConfig = resolveEndpointConfig;
|
|
238
|
+
exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig;
|
|
239
|
+
exports.resolveParams = resolveParams;
|
|
240
|
+
exports.toEndpointV1 = toEndpointV1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-endpoint",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.
|
|
29
|
-
"@smithy/middleware-serde": "^4.
|
|
30
|
-
"@smithy/node-config-provider": "^4.
|
|
31
|
-
"@smithy/shared-ini-file-loader": "^4.
|
|
32
|
-
"@smithy/types": "^4.
|
|
33
|
-
"@smithy/url-parser": "^4.
|
|
34
|
-
"@smithy/util-middleware": "^4.
|
|
28
|
+
"@smithy/core": "^3.14.0",
|
|
29
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
30
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
31
|
+
"@smithy/shared-ini-file-loader": "^4.3.0",
|
|
32
|
+
"@smithy/types": "^4.6.0",
|
|
33
|
+
"@smithy/url-parser": "^4.2.0",
|
|
34
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
35
35
|
"tslib": "^2.6.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|