@cdklabs/cdk-ecs-codedeploy 0.0.235 → 0.0.236
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/.jsii.tabl.json +1 -1
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js +1 -13
- package/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js +1 -24
- package/node_modules/@smithy/abort-controller/dist-cjs/index.js +83 -5
- package/node_modules/@smithy/abort-controller/package.json +3 -3
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +1 -12
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +1 -12
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/index.js +1 -7
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveCustomEndpointsConfig.js +1 -16
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveEndpointsConfig.js +1 -20
- package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/utils/getEndpointFromRegion.js +1 -20
- package/node_modules/@smithy/config-resolver/dist-cjs/index.js +233 -6
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js +1 -15
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/getRealRegion.js +1 -10
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/index.js +1 -5
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/isFipsRegion.js +1 -5
- package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js +1 -29
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariant.js +1 -2
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariantTag.js +1 -2
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/PartitionHash.js +1 -2
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/RegionHash.js +1 -2
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getHostnameFromVariants.js +1 -8
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getRegionInfo.js +1 -34
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedHostname.js +1 -9
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedPartition.js +1 -5
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedSigningRegion.js +1 -16
- package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/index.js +1 -6
- package/node_modules/@smithy/config-resolver/package.json +6 -6
- package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +1 -6
- package/node_modules/@smithy/core/dist-cjs/index.js +480 -12
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +1 -22
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +1 -22
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -45
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +1 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +1 -20
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +1 -28
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +1 -5
- package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +1 -10
- package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +1 -32
- package/node_modules/@smithy/core/dist-cjs/protocols/requestBuilder.js +1 -72
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +1 -17
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +1 -37
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +1 -14
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +1 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +1 -9
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +1 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +1 -59
- package/node_modules/@smithy/core/package.json +9 -9
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/Endpoint.js +1 -8
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointConfigOptions.js +1 -10
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointMode.js +1 -8
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointModeConfigOptions.js +1 -11
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/error/InstanceMetadataV1FallbackError.js +1 -13
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/fromContainerMetadata.js +1 -70
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/fromInstanceMetadata.js +1 -137
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +425 -12
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/ImdsCredentials.js +1 -17
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/RemoteProviderInit.js +1 -7
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/httpRequest.js +1 -41
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/index.js +1 -5
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/retry.js +1 -11
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/types.js +1 -2
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getExtendedInstanceMetadataCredentials.js +1 -22
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getInstanceMetadataEndpoint.js +1 -23
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/staticStabilityProvider.js +1 -29
- package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
- package/node_modules/@smithy/eventstream-codec/dist-cjs/EventStreamCodec.js +1 -66
- package/node_modules/@smithy/eventstream-codec/dist-cjs/HeaderMarshaller.js +1 -186
- package/node_modules/@smithy/eventstream-codec/dist-cjs/Int64.js +1 -47
- package/node_modules/@smithy/eventstream-codec/dist-cjs/Message.js +1 -2
- package/node_modules/@smithy/eventstream-codec/dist-cjs/MessageDecoderStream.js +1 -18
- package/node_modules/@smithy/eventstream-codec/dist-cjs/MessageEncoderStream.js +1 -21
- package/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageDecoderStream.js +1 -20
- package/node_modules/@smithy/eventstream-codec/dist-cjs/SmithyMessageEncoderStream.js +1 -18
- package/node_modules/@smithy/eventstream-codec/dist-cjs/TestVectors.fixture.js +1 -693
- package/node_modules/@smithy/eventstream-codec/dist-cjs/index.js +466 -11
- package/node_modules/@smithy/eventstream-codec/dist-cjs/splitMessage.js +1 -34
- package/node_modules/@smithy/eventstream-codec/dist-cjs/vectorTypes.fixture.js +1 -2
- package/node_modules/@smithy/eventstream-codec/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js +1 -117
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +218 -5
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js +1 -15
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js +1 -50
- package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
- package/node_modules/@smithy/hash-node/dist-cjs/index.js +62 -36
- package/node_modules/@smithy/hash-node/package.json +5 -5
- package/node_modules/@smithy/invalid-dependency/dist-cjs/index.js +39 -5
- package/node_modules/@smithy/invalid-dependency/dist-cjs/invalidFunction.js +1 -7
- package/node_modules/@smithy/invalid-dependency/dist-cjs/invalidProvider.js +1 -5
- package/node_modules/@smithy/invalid-dependency/package.json +3 -3
- package/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +30 -6
- package/node_modules/@smithy/is-array-buffer/package.json +7 -9
- package/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +64 -39
- package/node_modules/@smithy/middleware-content-length/package.json +5 -5
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/createConfigValueProvider.js +1 -38
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromInstructions.js +1 -51
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/index.js +1 -5
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/toEndpointV1.js +1 -14
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/endpointMiddleware.js +1 -37
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/getEndpointPlugin.js +1 -22
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +252 -8
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/resolveEndpointConfig.js +1 -21
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/index.js +1 -4
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/service-customizations/s3.js +1 -43
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/types.js +1 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/dist-cjs/AdaptiveRetryStrategy.js +1 -24
- package/node_modules/@smithy/middleware-retry/dist-cjs/StandardRetryStrategy.js +1 -95
- package/node_modules/@smithy/middleware-retry/dist-cjs/configurations.js +1 -57
- package/node_modules/@smithy/middleware-retry/dist-cjs/defaultRetryQuota.js +1 -32
- package/node_modules/@smithy/middleware-retry/dist-cjs/delayDecider.js +1 -6
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +422 -10
- package/node_modules/@smithy/middleware-retry/dist-cjs/omitRetryHeadersMiddleware.js +1 -27
- package/node_modules/@smithy/middleware-retry/dist-cjs/retryDecider.js +1 -11
- package/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js +1 -118
- package/node_modules/@smithy/middleware-retry/dist-cjs/types.js +1 -2
- package/node_modules/@smithy/middleware-retry/dist-cjs/util.js +1 -13
- package/node_modules/@smithy/middleware-retry/package.json +10 -10
- package/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js +1 -24
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +95 -6
- package/node_modules/@smithy/middleware-serde/dist-cjs/serdePlugin.js +1 -26
- package/node_modules/@smithy/middleware-serde/dist-cjs/serializerMiddleware.js +1 -18
- package/node_modules/@smithy/middleware-serde/package.json +4 -4
- package/node_modules/@smithy/middleware-stack/dist-cjs/MiddlewareStack.js +1 -287
- package/node_modules/@smithy/middleware-stack/dist-cjs/index.js +316 -4
- package/node_modules/@smithy/middleware-stack/dist-cjs/types.js +1 -2
- package/node_modules/@smithy/middleware-stack/package.json +3 -3
- package/node_modules/@smithy/node-config-provider/dist-cjs/configLoader.js +1 -9
- package/node_modules/@smithy/node-config-provider/dist-cjs/fromEnv.js +1 -17
- package/node_modules/@smithy/node-config-provider/dist-cjs/fromSharedConfigFiles.js +1 -26
- package/node_modules/@smithy/node-config-provider/dist-cjs/fromStatic.js +1 -7
- package/node_modules/@smithy/node-config-provider/dist-cjs/index.js +85 -4
- package/node_modules/@smithy/node-config-provider/package.json +5 -5
- package/node_modules/@smithy/node-http-handler/dist-cjs/constants.js +1 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js +1 -12
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +624 -6
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js +1 -153
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js +1 -92
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js +1 -36
- package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js +1 -165
- package/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js +1 -23
- package/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js +1 -60
- package/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js +1 -25
- package/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js +1 -12
- package/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js +1 -10
- package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js +1 -15
- package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/index.js +1 -18
- package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js +1 -23
- package/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js +1 -45
- package/node_modules/@smithy/node-http-handler/package.json +6 -6
- package/node_modules/@smithy/property-provider/dist-cjs/CredentialsProviderError.js +1 -13
- package/node_modules/@smithy/property-provider/dist-cjs/ProviderError.js +1 -15
- package/node_modules/@smithy/property-provider/dist-cjs/TokenProviderError.js +1 -13
- package/node_modules/@smithy/property-provider/dist-cjs/chain.js +1 -25
- package/node_modules/@smithy/property-provider/dist-cjs/fromStatic.js +1 -5
- package/node_modules/@smithy/property-provider/dist-cjs/index.js +148 -9
- package/node_modules/@smithy/property-provider/dist-cjs/memoize.js +1 -49
- package/node_modules/@smithy/property-provider/package.json +3 -3
- package/node_modules/@smithy/protocol-http/dist-cjs/Field.js +1 -27
- package/node_modules/@smithy/protocol-http/dist-cjs/Fields.js +1 -23
- package/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js +1 -27
- package/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js +1 -4
- package/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js +1 -2
- package/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js +1 -52
- package/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js +1 -18
- package/node_modules/@smithy/protocol-http/dist-cjs/index.js +235 -11
- package/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js +1 -8
- package/node_modules/@smithy/protocol-http/dist-cjs/types.js +1 -2
- package/node_modules/@smithy/protocol-http/package.json +3 -3
- package/node_modules/@smithy/querystring-builder/dist-cjs/index.js +47 -22
- package/node_modules/@smithy/querystring-builder/package.json +4 -4
- package/node_modules/@smithy/querystring-parser/dist-cjs/index.js +48 -24
- package/node_modules/@smithy/querystring-parser/package.json +3 -3
- package/node_modules/@smithy/service-error-classification/dist-cjs/constants.js +1 -30
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +86 -30
- package/node_modules/@smithy/service-error-classification/package.json +3 -3
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js +1 -22
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js +1 -8
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js +1 -8
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js +1 -7
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js +1 -9
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +188 -11
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js +1 -31
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js +1 -16
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js +1 -18
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js +1 -56
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js +1 -10
- package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js +1 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +13 -3
- package/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4.js +1 -194
- package/node_modules/@smithy/signature-v4/dist-cjs/cloneRequest.js +1 -17
- package/node_modules/@smithy/signature-v4/dist-cjs/constants.js +1 -46
- package/node_modules/@smithy/signature-v4/dist-cjs/credentialDerivation.js +1 -39
- package/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalHeaders.js +1 -24
- package/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalQuery.js +1 -31
- package/node_modules/@smithy/signature-v4/dist-cjs/getPayloadHash.js +1 -24
- package/node_modules/@smithy/signature-v4/dist-cjs/headerUtil.js +1 -32
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +465 -16
- package/node_modules/@smithy/signature-v4/dist-cjs/moveHeadersToQuery.js +1 -21
- package/node_modules/@smithy/signature-v4/dist-cjs/prepareRequest.js +1 -15
- package/node_modules/@smithy/signature-v4/dist-cjs/suite.fixture.js +1 -402
- package/node_modules/@smithy/signature-v4/dist-cjs/utilDate.js +1 -20
- package/node_modules/@smithy/signature-v4/package.json +10 -10
- package/node_modules/@smithy/smithy-client/dist-cjs/NoOpLogger.js +1 -11
- package/node_modules/@smithy/smithy-client/dist-cjs/client.js +1 -28
- package/node_modules/@smithy/smithy-client/dist-cjs/collect-stream-body.js +1 -15
- package/node_modules/@smithy/smithy-client/dist-cjs/command.js +1 -118
- package/node_modules/@smithy/smithy-client/dist-cjs/constants.js +1 -4
- package/node_modules/@smithy/smithy-client/dist-cjs/create-aggregated-client.js +1 -25
- package/node_modules/@smithy/smithy-client/dist-cjs/date-utils.js +1 -195
- package/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js +1 -30
- package/node_modules/@smithy/smithy-client/dist-cjs/defaults-mode.js +1 -30
- package/node_modules/@smithy/smithy-client/dist-cjs/emitWarningIfUnsupportedVersion.js +1 -10
- package/node_modules/@smithy/smithy-client/dist-cjs/exceptions.js +1 -27
- package/node_modules/@smithy/smithy-client/dist-cjs/extended-encode-uri-component.js +1 -9
- package/node_modules/@smithy/smithy-client/dist-cjs/extensions/checksum.js +1 -36
- package/node_modules/@smithy/smithy-client/dist-cjs/extensions/defaultExtensionConfiguration.js +1 -20
- package/node_modules/@smithy/smithy-client/dist-cjs/extensions/index.js +1 -4
- package/node_modules/@smithy/smithy-client/dist-cjs/extensions/retry.js +1 -21
- package/node_modules/@smithy/smithy-client/dist-cjs/get-array-if-single-item.js +1 -5
- package/node_modules/@smithy/smithy-client/dist-cjs/get-value-from-text-node.js +1 -16
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +1254 -25
- package/node_modules/@smithy/smithy-client/dist-cjs/lazy-json.js +1 -38
- package/node_modules/@smithy/smithy-client/dist-cjs/object-mapping.js +1 -98
- package/node_modules/@smithy/smithy-client/dist-cjs/parse-utils.js +1 -253
- package/node_modules/@smithy/smithy-client/dist-cjs/resolve-path.js +1 -23
- package/node_modules/@smithy/smithy-client/dist-cjs/ser-utils.js +1 -17
- package/node_modules/@smithy/smithy-client/dist-cjs/serde-json.js +1 -23
- package/node_modules/@smithy/smithy-client/dist-cjs/split-every.js +1 -31
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-cjs/abort.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js +1 -8
- package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/auth/auth.js +1 -8
- package/node_modules/@smithy/types/dist-cjs/auth/index.js +1 -9
- package/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/checksum.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/client.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/command.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/connection/config.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/connection/index.js +1 -6
- package/node_modules/@smithy/types/dist-cjs/connection/manager.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/connection/pool.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/crypto.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/encode.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/endpoint.js +1 -8
- package/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/endpoints/index.js +1 -8
- package/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/eventStream.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/extensions/checksum.js +1 -44
- package/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +1 -16
- package/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/extensions/index.js +1 -8
- package/node_modules/@smithy/types/dist-cjs/extensions/retry.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/http.js +1 -8
- package/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/identity/identity.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/identity/index.js +1 -7
- package/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/index.js +147 -39
- package/node_modules/@smithy/types/dist-cjs/logger.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/middleware.js +1 -4
- package/node_modules/@smithy/types/dist-cjs/pagination.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/profile.js +1 -9
- package/node_modules/@smithy/types/dist-cjs/response.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/retry.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/serde.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/shapes.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/signature.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/stream.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/transfer.js +1 -9
- package/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/transform/exact.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/transform/type-transform.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/uri.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/util.js +1 -2
- package/node_modules/@smithy/types/dist-cjs/waiter.js +1 -2
- package/node_modules/@smithy/types/package.json +2 -2
- package/node_modules/@smithy/url-parser/dist-cjs/index.js +46 -21
- package/node_modules/@smithy/url-parser/package.json +4 -4
- package/node_modules/@smithy/util-base64/dist-cjs/index.js +25 -5
- package/node_modules/@smithy/util-base64/package.json +4 -4
- package/node_modules/@smithy/util-body-length-browser/dist-cjs/calculateBodyLength.js +1 -30
- package/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +55 -4
- package/node_modules/@smithy/util-body-length-browser/package.json +2 -2
- package/node_modules/@smithy/util-body-length-node/dist-cjs/calculateBodyLength.js +1 -29
- package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +51 -4
- package/node_modules/@smithy/util-body-length-node/package.json +7 -9
- package/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +43 -17
- package/node_modules/@smithy/util-buffer-from/package.json +8 -10
- package/node_modules/@smithy/util-config-provider/dist-cjs/booleanSelector.js +1 -13
- package/node_modules/@smithy/util-config-provider/dist-cjs/index.js +62 -6
- package/node_modules/@smithy/util-config-provider/dist-cjs/numberSelector.js +1 -13
- package/node_modules/@smithy/util-config-provider/dist-cjs/types.js +1 -8
- package/node_modules/@smithy/util-config-provider/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js +23 -4
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +5 -5
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/constants.js +1 -9
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/defaultsModeConfig.js +1 -14
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +107 -4
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/resolveDefaultsModeConfig.js +1 -57
- package/node_modules/@smithy/util-defaults-mode-node/package.json +8 -8
- package/node_modules/@smithy/util-endpoints/dist-cjs/debug/debugId.js +1 -4
- package/node_modules/@smithy/util-endpoints/dist-cjs/debug/index.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-cjs/debug/toDebugString.js +1 -16
- package/node_modules/@smithy/util-endpoints/dist-cjs/getEndpointUrlConfig.js +1 -25
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +482 -8
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/booleanEquals.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttr.js +1 -15
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttrPathList.js +1 -29
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/index.js +1 -12
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isIpAddress.js +1 -6
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isSet.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isValidHostLabel.js +1 -17
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/not.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/parseURL.js +1 -55
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/stringEquals.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/substring.js +1 -13
- package/node_modules/@smithy/util-endpoints/dist-cjs/lib/uriEncode.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-cjs/resolveEndpoint.js +1 -42
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointError.js +1 -10
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointFunctions.js +1 -2
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointRuleObject.js +1 -2
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/ErrorRuleObject.js +1 -2
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/RuleSetObject.js +1 -2
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/TreeRuleObject.js +1 -2
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/index.js +1 -10
- package/node_modules/@smithy/util-endpoints/dist-cjs/types/shared.js +1 -2
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/callFunction.js +1 -15
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/customEndpointFunctions.js +1 -4
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/endpointFunctions.js +1 -15
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateCondition.js +1 -19
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateConditions.js +1 -27
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js +1 -32
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateErrorRule.js +1 -18
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateExpression.js +1 -20
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateRules.js +1 -31
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTemplate.js +1 -40
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTreeRule.js +1 -17
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointHeaders.js +1 -16
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperties.js +1 -9
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperty.js +1 -25
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointUrl.js +1 -19
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getReferenceValue.js +1 -11
- package/node_modules/@smithy/util-endpoints/dist-cjs/utils/index.js +1 -5
- package/node_modules/@smithy/util-endpoints/package.json +4 -4
- package/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +58 -31
- package/node_modules/@smithy/util-hex-encoding/package.json +7 -9
- package/node_modules/@smithy/util-middleware/dist-cjs/getSmithyContext.js +1 -6
- package/node_modules/@smithy/util-middleware/dist-cjs/index.js +43 -5
- package/node_modules/@smithy/util-middleware/dist-cjs/normalizeProvider.js +1 -10
- package/node_modules/@smithy/util-middleware/package.json +3 -3
- package/node_modules/@smithy/util-retry/dist-cjs/AdaptiveRetryStrategy.js +1 -28
- package/node_modules/@smithy/util-retry/dist-cjs/ConfiguredRetryStrategy.js +1 -22
- package/node_modules/@smithy/util-retry/dist-cjs/DefaultRateLimiter.js +1 -104
- package/node_modules/@smithy/util-retry/dist-cjs/StandardRetryStrategy.js +1 -70
- package/node_modules/@smithy/util-retry/dist-cjs/config.js +1 -10
- package/node_modules/@smithy/util-retry/dist-cjs/constants.js +1 -12
- package/node_modules/@smithy/util-retry/dist-cjs/defaultRetryBackoffStrategy.js +1 -18
- package/node_modules/@smithy/util-retry/dist-cjs/defaultRetryToken.js +1 -15
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +345 -10
- package/node_modules/@smithy/util-retry/dist-cjs/types.js +1 -2
- package/node_modules/@smithy/util-retry/package.json +4 -4
- package/node_modules/@smithy/util-stream/dist-cjs/blob/Uint8ArrayBlobAdapter.js +1 -22
- package/node_modules/@smithy/util-stream/dist-cjs/blob/transforms.js +1 -20
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +87 -6
- package/node_modules/@smithy/util-stream/package.json +10 -10
- package/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri-path.js +1 -6
- package/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri.js +1 -6
- package/node_modules/@smithy/util-uri-escape/dist-cjs/index.js +41 -5
- package/node_modules/@smithy/util-uri-escape/package.json +7 -9
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +1 -5
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +1 -9
- package/node_modules/@smithy/util-utf8/dist-cjs/index.js +55 -6
- package/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +1 -14
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +1 -5
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +1 -6
- package/node_modules/@smithy/util-utf8/package.json +4 -4
- package/node_modules/@smithy/util-waiter/dist-cjs/createWaiter.js +1 -27
- package/node_modules/@smithy/util-waiter/dist-cjs/index.js +153 -5
- package/node_modules/@smithy/util-waiter/dist-cjs/poller.js +1 -38
- package/node_modules/@smithy/util-waiter/dist-cjs/utils/index.js +1 -5
- package/node_modules/@smithy/util-waiter/dist-cjs/utils/sleep.js +1 -7
- package/node_modules/@smithy/util-waiter/dist-cjs/utils/validate.js +1 -21
- package/node_modules/@smithy/util-waiter/dist-cjs/waiter.js +1 -38
- package/node_modules/@smithy/util-waiter/package.json +4 -4
- package/package.json +5 -5
- package/.gitattributes +0 -27
- package/.projenrc.ts +0 -113
|
@@ -1,6 +1,624 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,
|
|
34
|
+
NodeHttp2Handler: () => NodeHttp2Handler,
|
|
35
|
+
NodeHttpHandler: () => NodeHttpHandler,
|
|
36
|
+
streamCollector: () => streamCollector
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(src_exports);
|
|
39
|
+
|
|
40
|
+
// src/node-http-handler.ts
|
|
41
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
42
|
+
var import_querystring_builder = require("@smithy/querystring-builder");
|
|
43
|
+
var import_http = require("http");
|
|
44
|
+
var import_https = require("https");
|
|
45
|
+
|
|
46
|
+
// src/constants.ts
|
|
47
|
+
var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
|
|
48
|
+
|
|
49
|
+
// src/get-transformed-headers.ts
|
|
50
|
+
var getTransformedHeaders = /* @__PURE__ */ __name((headers) => {
|
|
51
|
+
const transformedHeaders = {};
|
|
52
|
+
for (const name of Object.keys(headers)) {
|
|
53
|
+
const headerValues = headers[name];
|
|
54
|
+
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
55
|
+
}
|
|
56
|
+
return transformedHeaders;
|
|
57
|
+
}, "getTransformedHeaders");
|
|
58
|
+
|
|
59
|
+
// src/set-connection-timeout.ts
|
|
60
|
+
var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {
|
|
61
|
+
if (!timeoutInMs) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const timeoutId = setTimeout(() => {
|
|
65
|
+
request.destroy();
|
|
66
|
+
reject(
|
|
67
|
+
Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {
|
|
68
|
+
name: "TimeoutError"
|
|
69
|
+
})
|
|
70
|
+
);
|
|
71
|
+
}, timeoutInMs);
|
|
72
|
+
request.on("socket", (socket) => {
|
|
73
|
+
if (socket.connecting) {
|
|
74
|
+
socket.on("connect", () => {
|
|
75
|
+
clearTimeout(timeoutId);
|
|
76
|
+
});
|
|
77
|
+
} else {
|
|
78
|
+
clearTimeout(timeoutId);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}, "setConnectionTimeout");
|
|
82
|
+
|
|
83
|
+
// src/set-socket-keep-alive.ts
|
|
84
|
+
var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }) => {
|
|
85
|
+
if (keepAlive !== true) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
request.on("socket", (socket) => {
|
|
89
|
+
socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
|
|
90
|
+
});
|
|
91
|
+
}, "setSocketKeepAlive");
|
|
92
|
+
|
|
93
|
+
// src/set-socket-timeout.ts
|
|
94
|
+
var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {
|
|
95
|
+
request.setTimeout(timeoutInMs, () => {
|
|
96
|
+
request.destroy();
|
|
97
|
+
reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" }));
|
|
98
|
+
});
|
|
99
|
+
}, "setSocketTimeout");
|
|
100
|
+
|
|
101
|
+
// src/write-request-body.ts
|
|
102
|
+
var import_stream = require("stream");
|
|
103
|
+
var MIN_WAIT_TIME = 1e3;
|
|
104
|
+
async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {
|
|
105
|
+
const headers = request.headers ?? {};
|
|
106
|
+
const expect = headers["Expect"] || headers["expect"];
|
|
107
|
+
let timeoutId = -1;
|
|
108
|
+
let hasError = false;
|
|
109
|
+
if (expect === "100-continue") {
|
|
110
|
+
await Promise.race([
|
|
111
|
+
new Promise((resolve) => {
|
|
112
|
+
timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
113
|
+
}),
|
|
114
|
+
new Promise((resolve) => {
|
|
115
|
+
httpRequest.on("continue", () => {
|
|
116
|
+
clearTimeout(timeoutId);
|
|
117
|
+
resolve();
|
|
118
|
+
});
|
|
119
|
+
httpRequest.on("error", () => {
|
|
120
|
+
hasError = true;
|
|
121
|
+
clearTimeout(timeoutId);
|
|
122
|
+
resolve();
|
|
123
|
+
});
|
|
124
|
+
})
|
|
125
|
+
]);
|
|
126
|
+
}
|
|
127
|
+
if (!hasError) {
|
|
128
|
+
writeBody(httpRequest, request.body);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
__name(writeRequestBody, "writeRequestBody");
|
|
132
|
+
function writeBody(httpRequest, body) {
|
|
133
|
+
if (body instanceof import_stream.Readable) {
|
|
134
|
+
body.pipe(httpRequest);
|
|
135
|
+
} else if (body) {
|
|
136
|
+
httpRequest.end(Buffer.from(body));
|
|
137
|
+
} else {
|
|
138
|
+
httpRequest.end();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
__name(writeBody, "writeBody");
|
|
142
|
+
|
|
143
|
+
// src/node-http-handler.ts
|
|
144
|
+
var DEFAULT_REQUEST_TIMEOUT = 0;
|
|
145
|
+
var _NodeHttpHandler = class _NodeHttpHandler {
|
|
146
|
+
constructor(options) {
|
|
147
|
+
// Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286
|
|
148
|
+
this.metadata = { handlerProtocol: "http/1.1" };
|
|
149
|
+
this.configProvider = new Promise((resolve, reject) => {
|
|
150
|
+
if (typeof options === "function") {
|
|
151
|
+
options().then((_options) => {
|
|
152
|
+
resolve(this.resolveDefaultConfig(_options));
|
|
153
|
+
}).catch(reject);
|
|
154
|
+
} else {
|
|
155
|
+
resolve(this.resolveDefaultConfig(options));
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @returns the input if it is an HttpHandler of any class,
|
|
161
|
+
* or instantiates a new instance of this handler.
|
|
162
|
+
*/
|
|
163
|
+
static create(instanceOrOptions) {
|
|
164
|
+
if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") {
|
|
165
|
+
return instanceOrOptions;
|
|
166
|
+
}
|
|
167
|
+
return new _NodeHttpHandler(instanceOrOptions);
|
|
168
|
+
}
|
|
169
|
+
resolveDefaultConfig(options) {
|
|
170
|
+
const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};
|
|
171
|
+
const keepAlive = true;
|
|
172
|
+
const maxSockets = 50;
|
|
173
|
+
return {
|
|
174
|
+
connectionTimeout,
|
|
175
|
+
requestTimeout: requestTimeout ?? socketTimeout,
|
|
176
|
+
httpAgent: httpAgent || new import_http.Agent({ keepAlive, maxSockets }),
|
|
177
|
+
httpsAgent: httpsAgent || new import_https.Agent({ keepAlive, maxSockets })
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
destroy() {
|
|
181
|
+
var _a, _b, _c, _d;
|
|
182
|
+
(_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy();
|
|
183
|
+
(_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy();
|
|
184
|
+
}
|
|
185
|
+
async handle(request, { abortSignal } = {}) {
|
|
186
|
+
if (!this.config) {
|
|
187
|
+
this.config = await this.configProvider;
|
|
188
|
+
}
|
|
189
|
+
return new Promise((_resolve, _reject) => {
|
|
190
|
+
let writeRequestBodyPromise = void 0;
|
|
191
|
+
const resolve = /* @__PURE__ */ __name(async (arg) => {
|
|
192
|
+
await writeRequestBodyPromise;
|
|
193
|
+
_resolve(arg);
|
|
194
|
+
}, "resolve");
|
|
195
|
+
const reject = /* @__PURE__ */ __name(async (arg) => {
|
|
196
|
+
await writeRequestBodyPromise;
|
|
197
|
+
_reject(arg);
|
|
198
|
+
}, "reject");
|
|
199
|
+
if (!this.config) {
|
|
200
|
+
throw new Error("Node HTTP request handler config is not resolved");
|
|
201
|
+
}
|
|
202
|
+
if (abortSignal == null ? void 0 : abortSignal.aborted) {
|
|
203
|
+
const abortError = new Error("Request aborted");
|
|
204
|
+
abortError.name = "AbortError";
|
|
205
|
+
reject(abortError);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const isSSL = request.protocol === "https:";
|
|
209
|
+
const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});
|
|
210
|
+
let auth = void 0;
|
|
211
|
+
if (request.username != null || request.password != null) {
|
|
212
|
+
const username = request.username ?? "";
|
|
213
|
+
const password = request.password ?? "";
|
|
214
|
+
auth = `${username}:${password}`;
|
|
215
|
+
}
|
|
216
|
+
let path = request.path;
|
|
217
|
+
if (queryString) {
|
|
218
|
+
path += `?${queryString}`;
|
|
219
|
+
}
|
|
220
|
+
if (request.fragment) {
|
|
221
|
+
path += `#${request.fragment}`;
|
|
222
|
+
}
|
|
223
|
+
const nodeHttpsOptions = {
|
|
224
|
+
headers: request.headers,
|
|
225
|
+
host: request.hostname,
|
|
226
|
+
method: request.method,
|
|
227
|
+
path,
|
|
228
|
+
port: request.port,
|
|
229
|
+
agent: isSSL ? this.config.httpsAgent : this.config.httpAgent,
|
|
230
|
+
auth
|
|
231
|
+
};
|
|
232
|
+
const requestFunc = isSSL ? import_https.request : import_http.request;
|
|
233
|
+
const req = requestFunc(nodeHttpsOptions, (res) => {
|
|
234
|
+
const httpResponse = new import_protocol_http.HttpResponse({
|
|
235
|
+
statusCode: res.statusCode || -1,
|
|
236
|
+
reason: res.statusMessage,
|
|
237
|
+
headers: getTransformedHeaders(res.headers),
|
|
238
|
+
body: res
|
|
239
|
+
});
|
|
240
|
+
resolve({ response: httpResponse });
|
|
241
|
+
});
|
|
242
|
+
req.on("error", (err) => {
|
|
243
|
+
if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
|
|
244
|
+
reject(Object.assign(err, { name: "TimeoutError" }));
|
|
245
|
+
} else {
|
|
246
|
+
reject(err);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
setConnectionTimeout(req, reject, this.config.connectionTimeout);
|
|
250
|
+
setSocketTimeout(req, reject, this.config.requestTimeout);
|
|
251
|
+
if (abortSignal) {
|
|
252
|
+
abortSignal.onabort = () => {
|
|
253
|
+
req.abort();
|
|
254
|
+
const abortError = new Error("Request aborted");
|
|
255
|
+
abortError.name = "AbortError";
|
|
256
|
+
reject(abortError);
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
const httpAgent = nodeHttpsOptions.agent;
|
|
260
|
+
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
|
|
261
|
+
setSocketKeepAlive(req, {
|
|
262
|
+
// @ts-expect-error keepAlive is not public on httpAgent.
|
|
263
|
+
keepAlive: httpAgent.keepAlive,
|
|
264
|
+
// @ts-expect-error keepAliveMsecs is not public on httpAgent.
|
|
265
|
+
keepAliveMsecs: httpAgent.keepAliveMsecs
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject);
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
updateHttpClientConfig(key, value) {
|
|
272
|
+
this.config = void 0;
|
|
273
|
+
this.configProvider = this.configProvider.then((config) => {
|
|
274
|
+
return {
|
|
275
|
+
...config,
|
|
276
|
+
[key]: value
|
|
277
|
+
};
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
httpHandlerConfigs() {
|
|
281
|
+
return this.config ?? {};
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
__name(_NodeHttpHandler, "NodeHttpHandler");
|
|
285
|
+
var NodeHttpHandler = _NodeHttpHandler;
|
|
286
|
+
|
|
287
|
+
// src/node-http2-handler.ts
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
var import_http22 = require("http2");
|
|
291
|
+
|
|
292
|
+
// src/node-http2-connection-manager.ts
|
|
293
|
+
var import_http2 = __toESM(require("http2"));
|
|
294
|
+
|
|
295
|
+
// src/node-http2-connection-pool.ts
|
|
296
|
+
var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool {
|
|
297
|
+
constructor(sessions) {
|
|
298
|
+
this.sessions = [];
|
|
299
|
+
this.sessions = sessions ?? [];
|
|
300
|
+
}
|
|
301
|
+
poll() {
|
|
302
|
+
if (this.sessions.length > 0) {
|
|
303
|
+
return this.sessions.shift();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
offerLast(session) {
|
|
307
|
+
this.sessions.push(session);
|
|
308
|
+
}
|
|
309
|
+
contains(session) {
|
|
310
|
+
return this.sessions.includes(session);
|
|
311
|
+
}
|
|
312
|
+
remove(session) {
|
|
313
|
+
this.sessions = this.sessions.filter((s) => s !== session);
|
|
314
|
+
}
|
|
315
|
+
[Symbol.iterator]() {
|
|
316
|
+
return this.sessions[Symbol.iterator]();
|
|
317
|
+
}
|
|
318
|
+
destroy(connection) {
|
|
319
|
+
for (const session of this.sessions) {
|
|
320
|
+
if (session === connection) {
|
|
321
|
+
if (!session.destroyed) {
|
|
322
|
+
session.destroy();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
__name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool");
|
|
329
|
+
var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool;
|
|
330
|
+
|
|
331
|
+
// src/node-http2-connection-manager.ts
|
|
332
|
+
var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager {
|
|
333
|
+
constructor(config) {
|
|
334
|
+
this.sessionCache = /* @__PURE__ */ new Map();
|
|
335
|
+
this.config = config;
|
|
336
|
+
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
|
|
337
|
+
throw new RangeError("maxConcurrency must be greater than zero.");
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
lease(requestContext, connectionConfiguration) {
|
|
341
|
+
const url = this.getUrlString(requestContext);
|
|
342
|
+
const existingPool = this.sessionCache.get(url);
|
|
343
|
+
if (existingPool) {
|
|
344
|
+
const existingSession = existingPool.poll();
|
|
345
|
+
if (existingSession && !this.config.disableConcurrency) {
|
|
346
|
+
return existingSession;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
const session = import_http2.default.connect(url);
|
|
350
|
+
if (this.config.maxConcurrency) {
|
|
351
|
+
session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
|
|
352
|
+
if (err) {
|
|
353
|
+
throw new Error(
|
|
354
|
+
"Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString()
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
session.unref();
|
|
360
|
+
const destroySessionCb = /* @__PURE__ */ __name(() => {
|
|
361
|
+
session.destroy();
|
|
362
|
+
this.deleteSession(url, session);
|
|
363
|
+
}, "destroySessionCb");
|
|
364
|
+
session.on("goaway", destroySessionCb);
|
|
365
|
+
session.on("error", destroySessionCb);
|
|
366
|
+
session.on("frameError", destroySessionCb);
|
|
367
|
+
session.on("close", () => this.deleteSession(url, session));
|
|
368
|
+
if (connectionConfiguration.requestTimeout) {
|
|
369
|
+
session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
|
|
370
|
+
}
|
|
371
|
+
const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();
|
|
372
|
+
connectionPool.offerLast(session);
|
|
373
|
+
this.sessionCache.set(url, connectionPool);
|
|
374
|
+
return session;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Delete a session from the connection pool.
|
|
378
|
+
* @param authority The authority of the session to delete.
|
|
379
|
+
* @param session The session to delete.
|
|
380
|
+
*/
|
|
381
|
+
deleteSession(authority, session) {
|
|
382
|
+
const existingConnectionPool = this.sessionCache.get(authority);
|
|
383
|
+
if (!existingConnectionPool) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
if (!existingConnectionPool.contains(session)) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
existingConnectionPool.remove(session);
|
|
390
|
+
this.sessionCache.set(authority, existingConnectionPool);
|
|
391
|
+
}
|
|
392
|
+
release(requestContext, session) {
|
|
393
|
+
var _a;
|
|
394
|
+
const cacheKey = this.getUrlString(requestContext);
|
|
395
|
+
(_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session);
|
|
396
|
+
}
|
|
397
|
+
destroy() {
|
|
398
|
+
for (const [key, connectionPool] of this.sessionCache) {
|
|
399
|
+
for (const session of connectionPool) {
|
|
400
|
+
if (!session.destroyed) {
|
|
401
|
+
session.destroy();
|
|
402
|
+
}
|
|
403
|
+
connectionPool.remove(session);
|
|
404
|
+
}
|
|
405
|
+
this.sessionCache.delete(key);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
setMaxConcurrentStreams(maxConcurrentStreams) {
|
|
409
|
+
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
|
|
410
|
+
throw new RangeError("maxConcurrentStreams must be greater than zero.");
|
|
411
|
+
}
|
|
412
|
+
this.config.maxConcurrency = maxConcurrentStreams;
|
|
413
|
+
}
|
|
414
|
+
setDisableConcurrentStreams(disableConcurrentStreams) {
|
|
415
|
+
this.config.disableConcurrency = disableConcurrentStreams;
|
|
416
|
+
}
|
|
417
|
+
getUrlString(request) {
|
|
418
|
+
return request.destination.toString();
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
__name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager");
|
|
422
|
+
var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager;
|
|
423
|
+
|
|
424
|
+
// src/node-http2-handler.ts
|
|
425
|
+
var _NodeHttp2Handler = class _NodeHttp2Handler {
|
|
426
|
+
constructor(options) {
|
|
427
|
+
this.metadata = { handlerProtocol: "h2" };
|
|
428
|
+
this.connectionManager = new NodeHttp2ConnectionManager({});
|
|
429
|
+
this.configProvider = new Promise((resolve, reject) => {
|
|
430
|
+
if (typeof options === "function") {
|
|
431
|
+
options().then((opts) => {
|
|
432
|
+
resolve(opts || {});
|
|
433
|
+
}).catch(reject);
|
|
434
|
+
} else {
|
|
435
|
+
resolve(options || {});
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* @returns the input if it is an HttpHandler of any class,
|
|
441
|
+
* or instantiates a new instance of this handler.
|
|
442
|
+
*/
|
|
443
|
+
static create(instanceOrOptions) {
|
|
444
|
+
if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") {
|
|
445
|
+
return instanceOrOptions;
|
|
446
|
+
}
|
|
447
|
+
return new _NodeHttp2Handler(instanceOrOptions);
|
|
448
|
+
}
|
|
449
|
+
destroy() {
|
|
450
|
+
this.connectionManager.destroy();
|
|
451
|
+
}
|
|
452
|
+
async handle(request, { abortSignal } = {}) {
|
|
453
|
+
if (!this.config) {
|
|
454
|
+
this.config = await this.configProvider;
|
|
455
|
+
this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);
|
|
456
|
+
if (this.config.maxConcurrentStreams) {
|
|
457
|
+
this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
const { requestTimeout, disableConcurrentStreams } = this.config;
|
|
461
|
+
return new Promise((_resolve, _reject) => {
|
|
462
|
+
var _a;
|
|
463
|
+
let fulfilled = false;
|
|
464
|
+
let writeRequestBodyPromise = void 0;
|
|
465
|
+
const resolve = /* @__PURE__ */ __name(async (arg) => {
|
|
466
|
+
await writeRequestBodyPromise;
|
|
467
|
+
_resolve(arg);
|
|
468
|
+
}, "resolve");
|
|
469
|
+
const reject = /* @__PURE__ */ __name(async (arg) => {
|
|
470
|
+
await writeRequestBodyPromise;
|
|
471
|
+
_reject(arg);
|
|
472
|
+
}, "reject");
|
|
473
|
+
if (abortSignal == null ? void 0 : abortSignal.aborted) {
|
|
474
|
+
fulfilled = true;
|
|
475
|
+
const abortError = new Error("Request aborted");
|
|
476
|
+
abortError.name = "AbortError";
|
|
477
|
+
reject(abortError);
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
const { hostname, method, port, protocol, query } = request;
|
|
481
|
+
let auth = "";
|
|
482
|
+
if (request.username != null || request.password != null) {
|
|
483
|
+
const username = request.username ?? "";
|
|
484
|
+
const password = request.password ?? "";
|
|
485
|
+
auth = `${username}:${password}@`;
|
|
486
|
+
}
|
|
487
|
+
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
|
|
488
|
+
const requestContext = { destination: new URL(authority) };
|
|
489
|
+
const session = this.connectionManager.lease(requestContext, {
|
|
490
|
+
requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout,
|
|
491
|
+
disableConcurrentStreams: disableConcurrentStreams || false
|
|
492
|
+
});
|
|
493
|
+
const rejectWithDestroy = /* @__PURE__ */ __name((err) => {
|
|
494
|
+
if (disableConcurrentStreams) {
|
|
495
|
+
this.destroySession(session);
|
|
496
|
+
}
|
|
497
|
+
fulfilled = true;
|
|
498
|
+
reject(err);
|
|
499
|
+
}, "rejectWithDestroy");
|
|
500
|
+
const queryString = (0, import_querystring_builder.buildQueryString)(query || {});
|
|
501
|
+
let path = request.path;
|
|
502
|
+
if (queryString) {
|
|
503
|
+
path += `?${queryString}`;
|
|
504
|
+
}
|
|
505
|
+
if (request.fragment) {
|
|
506
|
+
path += `#${request.fragment}`;
|
|
507
|
+
}
|
|
508
|
+
const req = session.request({
|
|
509
|
+
...request.headers,
|
|
510
|
+
[import_http22.constants.HTTP2_HEADER_PATH]: path,
|
|
511
|
+
[import_http22.constants.HTTP2_HEADER_METHOD]: method
|
|
512
|
+
});
|
|
513
|
+
session.ref();
|
|
514
|
+
req.on("response", (headers) => {
|
|
515
|
+
const httpResponse = new import_protocol_http.HttpResponse({
|
|
516
|
+
statusCode: headers[":status"] || -1,
|
|
517
|
+
headers: getTransformedHeaders(headers),
|
|
518
|
+
body: req
|
|
519
|
+
});
|
|
520
|
+
fulfilled = true;
|
|
521
|
+
resolve({ response: httpResponse });
|
|
522
|
+
if (disableConcurrentStreams) {
|
|
523
|
+
session.close();
|
|
524
|
+
this.connectionManager.deleteSession(authority, session);
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
if (requestTimeout) {
|
|
528
|
+
req.setTimeout(requestTimeout, () => {
|
|
529
|
+
req.close();
|
|
530
|
+
const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);
|
|
531
|
+
timeoutError.name = "TimeoutError";
|
|
532
|
+
rejectWithDestroy(timeoutError);
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
if (abortSignal) {
|
|
536
|
+
abortSignal.onabort = () => {
|
|
537
|
+
req.close();
|
|
538
|
+
const abortError = new Error("Request aborted");
|
|
539
|
+
abortError.name = "AbortError";
|
|
540
|
+
rejectWithDestroy(abortError);
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
req.on("frameError", (type, code, id) => {
|
|
544
|
+
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
|
|
545
|
+
});
|
|
546
|
+
req.on("error", rejectWithDestroy);
|
|
547
|
+
req.on("aborted", () => {
|
|
548
|
+
rejectWithDestroy(
|
|
549
|
+
new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)
|
|
550
|
+
);
|
|
551
|
+
});
|
|
552
|
+
req.on("close", () => {
|
|
553
|
+
session.unref();
|
|
554
|
+
if (disableConcurrentStreams) {
|
|
555
|
+
session.destroy();
|
|
556
|
+
}
|
|
557
|
+
if (!fulfilled) {
|
|
558
|
+
rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
updateHttpClientConfig(key, value) {
|
|
565
|
+
this.config = void 0;
|
|
566
|
+
this.configProvider = this.configProvider.then((config) => {
|
|
567
|
+
return {
|
|
568
|
+
...config,
|
|
569
|
+
[key]: value
|
|
570
|
+
};
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
httpHandlerConfigs() {
|
|
574
|
+
return this.config ?? {};
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Destroys a session.
|
|
578
|
+
* @param session The session to destroy.
|
|
579
|
+
*/
|
|
580
|
+
destroySession(session) {
|
|
581
|
+
if (!session.destroyed) {
|
|
582
|
+
session.destroy();
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
__name(_NodeHttp2Handler, "NodeHttp2Handler");
|
|
587
|
+
var NodeHttp2Handler = _NodeHttp2Handler;
|
|
588
|
+
|
|
589
|
+
// src/stream-collector/collector.ts
|
|
590
|
+
|
|
591
|
+
var _Collector = class _Collector extends import_stream.Writable {
|
|
592
|
+
constructor() {
|
|
593
|
+
super(...arguments);
|
|
594
|
+
this.bufferedBytes = [];
|
|
595
|
+
}
|
|
596
|
+
_write(chunk, encoding, callback) {
|
|
597
|
+
this.bufferedBytes.push(chunk);
|
|
598
|
+
callback();
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
__name(_Collector, "Collector");
|
|
602
|
+
var Collector = _Collector;
|
|
603
|
+
|
|
604
|
+
// src/stream-collector/index.ts
|
|
605
|
+
var streamCollector = /* @__PURE__ */ __name((stream) => new Promise((resolve, reject) => {
|
|
606
|
+
const collector = new Collector();
|
|
607
|
+
stream.pipe(collector);
|
|
608
|
+
stream.on("error", (err) => {
|
|
609
|
+
collector.end();
|
|
610
|
+
reject(err);
|
|
611
|
+
});
|
|
612
|
+
collector.on("error", reject);
|
|
613
|
+
collector.on("finish", function() {
|
|
614
|
+
const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
|
|
615
|
+
resolve(bytes);
|
|
616
|
+
});
|
|
617
|
+
}), "streamCollector");
|
|
618
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
619
|
+
0 && (module.exports = {
|
|
620
|
+
DEFAULT_REQUEST_TIMEOUT,
|
|
621
|
+
NodeHttp2Handler,
|
|
622
|
+
NodeHttpHandler,
|
|
623
|
+
streamCollector
|
|
624
|
+
});
|