@cdk8s/awscdk-resolver 0.0.539 → 0.0.540
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 +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/bdd.js +52 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/endpoint/bdd.js +49 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/client-cloudformation/package.json +5 -5
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +18 -10
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +18 -10
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +6 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -2
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/LICENSE +201 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/README.md +4 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +597 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/bucket-endpoint-middleware.js +36 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/check-content-length-header.js +32 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/index.js +9 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/protocol/S3RestXmlProtocol.js +25 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-endpoint-middleware.js +41 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/region-redirect-middleware.js +42 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-expires-middleware.js +33 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCache.js +39 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityCacheEntry.js +14 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/S3ExpressIdentityProviderImpl.js +49 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/classes/SignatureV4S3Express.js +41 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/constants.js +13 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressHttpSigningMiddleware.js +38 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/s3ExpressMiddleware.js +41 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/signS3Express.js +7 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/index.js +7 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/interfaces/S3ExpressIdentity.js +1 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/interfaces/S3ExpressIdentityProvider.js +1 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3Configuration.js +17 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js +67 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/validate-bucket-name.js +25 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/bucket-endpoint-middleware.d.ts +13 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/check-content-length-header.d.ts +16 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/index.d.ts +9 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/protocol/S3RestXmlProtocol.d.ts +20 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/region-redirect-endpoint-middleware.d.ts +10 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/region-redirect-middleware.d.ts +20 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-expires-middleware.d.ts +26 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/classes/S3ExpressIdentityCache.d.ts +16 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/classes/S3ExpressIdentityCacheEntry.d.ts +16 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +32 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/classes/SignatureV4S3Express.d.ts +17 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/constants.d.ts +37 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/functions/s3ExpressHttpSigningMiddleware.d.ts +27 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/functions/s3ExpressMiddleware.d.ts +32 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/functions/signS3Express.d.ts +9 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/index.d.ts +9 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/interfaces/S3ExpressIdentity.d.ts +6 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3-express/interfaces/S3ExpressIdentityProvider.d.ts +12 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/s3Configuration.d.ts +79 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/throw-200-exceptions.d.ts +20 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/bucket-endpoint-middleware.d.ts +9 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/check-content-length-header.d.ts +13 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/index.d.ts +9 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/protocol/S3RestXmlProtocol.d.ts +15 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/region-redirect-endpoint-middleware.d.ts +6 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/region-redirect-middleware.d.ts +17 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-expires-middleware.d.ts +14 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/classes/S3ExpressIdentityCache.d.ts +14 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/classes/S3ExpressIdentityCacheEntry.d.ts +12 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +31 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/classes/SignatureV4S3Express.d.ts +19 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/constants.d.ts +11 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/functions/s3ExpressHttpSigningMiddleware.d.ts +40 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/functions/s3ExpressMiddleware.d.ts +27 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/functions/signS3Express.d.ts +21 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/index.d.ts +17 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/interfaces/S3ExpressIdentity.d.ts +2 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3-express/interfaces/S3ExpressIdentityProvider.d.ts +8 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/s3Configuration.d.ts +33 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/throw-200-exceptions.d.ts +17 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/validate-bucket-name.d.ts +13 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/validate-bucket-name.d.ts +14 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +72 -0
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/bdd.js +100 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/bdd.js +90 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/bdd.js +80 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/bdd.js +80 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +87 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/bdd.js +150 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/bdd.js +97 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +87 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js +77 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js +77 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +88 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js +147 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js +8 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/auth/httpAuthSchemeProvider.d.ts +15 -7
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +10 -4
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.shared.d.ts +3 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/auth/httpAuthSchemeProvider.d.ts +20 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +35 -16
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.shared.d.ts +8 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -4
- package/node_modules/@aws-sdk/signature-v4-multi-region/LICENSE +201 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/README.md +32 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +121 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-es/SignatureV4MultiRegion.js +112 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-es/index.js +2 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-es/signature-v4-crt-container.js +3 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/SignatureV4MultiRegion.d.ts +35 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/index.d.ts +5 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/signature-v4-crt-container.d.ts +28 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/ts3.4/SignatureV4MultiRegion.d.ts +41 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/ts3.4/index.d.ts +2 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-types/ts3.4/signature-v4-crt-container.d.ts +20 -0
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +61 -0
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-arn-parser/LICENSE +201 -0
- package/node_modules/@aws-sdk/util-arn-parser/README.md +4 -0
- package/node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js +27 -0
- package/node_modules/@aws-sdk/util-arn-parser/dist-es/index.js +21 -0
- package/node_modules/@aws-sdk/util-arn-parser/dist-types/index.d.ts +32 -0
- package/node_modules/@aws-sdk/util-arn-parser/dist-types/ts3.4/index.d.ts +14 -0
- package/node_modules/@aws-sdk/util-arn-parser/package.json +55 -0
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -14
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +17 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +6 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +6 -3
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +23 -11
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +9 -3
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +16 -8
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +8 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +6 -3
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +3 -3
- package/node_modules/@smithy/middleware-retry/package.json +5 -5
- package/node_modules/@smithy/middleware-serde/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +188 -93
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +45 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +71 -35
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -18
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +41 -40
- package/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +42 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +34 -14
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +32 -8
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -5
- package/node_modules/@smithy/node-http-handler/package.json +1 -1
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +5 -0
- package/node_modules/@smithy/service-error-classification/dist-es/index.js +4 -0
- package/node_modules/@smithy/service-error-classification/dist-types/index.d.ts +6 -0
- package/node_modules/@smithy/service-error-classification/package.json +1 -1
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +3 -3
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +65 -53
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +9 -7
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +12 -8
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +14 -13
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +7 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +10 -8
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +5 -5
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts +2 -15
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts +6 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts +1 -1
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/package.json +1 -1
- package/node_modules/@smithy/util-retry/package.json +2 -2
- package/node_modules/@smithy/util-stream/package.json +2 -2
- package/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/endpoint/ruleset.js +0 -7
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/endpoint/ruleset.js +0 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/ruleset.js +0 -146
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/ruleset.js +0 -133
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/ruleset.js +0 -106
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +0 -106
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js +0 -145
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/ruleset.js +0 -143
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/ruleset.js +0 -130
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/ruleset.js +0 -103
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js +0 -103
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js +0 -142
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/ruleset.d.ts +0 -2
|
@@ -135,9 +135,12 @@ export const expectUnion = (value) => {
|
|
|
135
135
|
return undefined;
|
|
136
136
|
}
|
|
137
137
|
const asObject = expectObject(value);
|
|
138
|
-
const setKeys =
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
const setKeys = [];
|
|
139
|
+
for (const k in asObject) {
|
|
140
|
+
if (asObject[k] != null) {
|
|
141
|
+
setKeys.push(k);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
141
144
|
if (setKeys.length === 0) {
|
|
142
145
|
throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
|
|
143
146
|
}
|
package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export class DefaultIdentityProviderConfig {
|
|
2
2
|
authSchemes = new Map();
|
|
3
3
|
constructor(config) {
|
|
4
|
-
for (const
|
|
4
|
+
for (const key in config) {
|
|
5
|
+
const value = config[key];
|
|
5
6
|
if (value !== undefined) {
|
|
6
7
|
this.authSchemes.set(key, value);
|
|
7
8
|
}
|
|
@@ -62,7 +62,7 @@ export declare class TypeRegistry {
|
|
|
62
62
|
* @param predicate - criterion.
|
|
63
63
|
* @returns a schema in this registry matching the predicate.
|
|
64
64
|
*/
|
|
65
|
-
find(predicate: (schema: ISchema) => boolean):
|
|
65
|
+
find(predicate: (schema: ISchema) => boolean): number | import("@smithy/types").StaticSimpleSchema | import("@smithy/types").StaticListSchema | import("@smithy/types").StaticMapSchema | import("@smithy/types").StaticStructureSchema | import("@smithy/types").StaticUnionSchema | StaticErrorSchema | import("@smithy/types").StaticOperationSchema | "unit" | import("@smithy/types").NormalizedSchema | import("@smithy/types").TraitsSchema | import("@smithy/types").MemberSchema | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* Unloads the current TypeRegistry.
|
|
68
68
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.16",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline core",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@smithy/util-base64": "^4.3.2",
|
|
92
92
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
93
93
|
"@smithy/util-middleware": "^4.2.14",
|
|
94
|
-
"@smithy/util-stream": "^4.5.
|
|
94
|
+
"@smithy/util-stream": "^4.5.24",
|
|
95
95
|
"@smithy/util-utf8": "^4.2.2",
|
|
96
96
|
"@smithy/uuid": "^1.1.2",
|
|
97
97
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.31",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-endpoint",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@smithy/core": "^3.23.
|
|
28
|
-
"@smithy/middleware-serde": "^4.2.
|
|
27
|
+
"@smithy/core": "^3.23.16",
|
|
28
|
+
"@smithy/middleware-serde": "^4.2.19",
|
|
29
29
|
"@smithy/node-config-provider": "^4.3.14",
|
|
30
30
|
"@smithy/shared-ini-file-loader": "^4.4.9",
|
|
31
31
|
"@smithy/types": "^4.14.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-retry",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.4",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-retry",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"sideEffects": false,
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@smithy/core": "^3.23.
|
|
36
|
+
"@smithy/core": "^3.23.16",
|
|
37
37
|
"@smithy/node-config-provider": "^4.3.14",
|
|
38
38
|
"@smithy/protocol-http": "^5.3.14",
|
|
39
|
-
"@smithy/service-error-classification": "^4.
|
|
40
|
-
"@smithy/smithy-client": "^4.12.
|
|
39
|
+
"@smithy/service-error-classification": "^4.3.0",
|
|
40
|
+
"@smithy/smithy-client": "^4.12.12",
|
|
41
41
|
"@smithy/types": "^4.14.1",
|
|
42
42
|
"@smithy/util-middleware": "^4.2.14",
|
|
43
|
-
"@smithy/util-retry": "^4.3.
|
|
43
|
+
"@smithy/util-retry": "^4.3.3",
|
|
44
44
|
"@smithy/uuid": "^1.1.2",
|
|
45
45
|
"tslib": "^2.6.2"
|
|
46
46
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-serde",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.19",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-serde",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.23.
|
|
28
|
+
"@smithy/core": "^3.23.16",
|
|
29
29
|
"@smithy/protocol-http": "^5.3.14",
|
|
30
30
|
"@smithy/types": "^4.14.1",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
@@ -425,58 +425,119 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
+
const ids = new Uint16Array(1);
|
|
429
|
+
class ClientHttp2SessionRef {
|
|
430
|
+
id = ids[0]++;
|
|
431
|
+
total = 0;
|
|
432
|
+
max = 0;
|
|
433
|
+
session;
|
|
434
|
+
refs = 0;
|
|
435
|
+
constructor(session) {
|
|
436
|
+
session.unref();
|
|
437
|
+
this.session = session;
|
|
438
|
+
}
|
|
439
|
+
retain() {
|
|
440
|
+
if (this.session.destroyed) {
|
|
441
|
+
throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");
|
|
442
|
+
}
|
|
443
|
+
this.refs += 1;
|
|
444
|
+
this.total += 1;
|
|
445
|
+
this.max = Math.max(this.refs, this.max);
|
|
446
|
+
this.session.ref();
|
|
447
|
+
}
|
|
448
|
+
free() {
|
|
449
|
+
if (this.session.destroyed) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
this.refs -= 1;
|
|
453
|
+
if (this.refs === 0) {
|
|
454
|
+
this.session.unref();
|
|
455
|
+
}
|
|
456
|
+
if (this.refs < 0) {
|
|
457
|
+
throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.");
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
deref() {
|
|
461
|
+
return this.session;
|
|
462
|
+
}
|
|
463
|
+
destroy() {
|
|
464
|
+
this.refs = 0;
|
|
465
|
+
if (!this.session.destroyed) {
|
|
466
|
+
this.session.destroy();
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
useCount() {
|
|
470
|
+
return this.refs;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
428
474
|
class NodeHttp2ConnectionPool {
|
|
429
475
|
sessions = [];
|
|
476
|
+
maxConcurrency = 0;
|
|
430
477
|
constructor(sessions) {
|
|
431
|
-
this.sessions = sessions ?? [];
|
|
478
|
+
this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));
|
|
432
479
|
}
|
|
433
480
|
poll() {
|
|
434
|
-
|
|
435
|
-
|
|
481
|
+
let cleanup = false;
|
|
482
|
+
for (const session of this.sessions) {
|
|
483
|
+
if (session.deref().destroyed) {
|
|
484
|
+
cleanup = true;
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {
|
|
488
|
+
return session;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (cleanup) {
|
|
492
|
+
for (const session of this.sessions) {
|
|
493
|
+
if (session.deref().destroyed) {
|
|
494
|
+
this.remove(session);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
436
497
|
}
|
|
437
498
|
}
|
|
438
|
-
offerLast(
|
|
439
|
-
this.sessions.push(
|
|
440
|
-
}
|
|
441
|
-
contains(session) {
|
|
442
|
-
return this.sessions.includes(session);
|
|
499
|
+
offerLast(ref) {
|
|
500
|
+
this.sessions.push(ref);
|
|
443
501
|
}
|
|
444
|
-
remove(
|
|
445
|
-
|
|
502
|
+
remove(ref) {
|
|
503
|
+
const ix = this.sessions.indexOf(ref);
|
|
504
|
+
if (ix > -1) {
|
|
505
|
+
this.sessions.splice(ix, 1);
|
|
506
|
+
}
|
|
446
507
|
}
|
|
447
508
|
[Symbol.iterator]() {
|
|
448
509
|
return this.sessions[Symbol.iterator]();
|
|
449
510
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
}
|
|
457
|
-
}
|
|
511
|
+
setMaxConcurrency(maxConcurrency) {
|
|
512
|
+
this.maxConcurrency = maxConcurrency;
|
|
513
|
+
}
|
|
514
|
+
destroy(ref) {
|
|
515
|
+
this.remove(ref);
|
|
516
|
+
ref.destroy();
|
|
458
517
|
}
|
|
459
518
|
}
|
|
460
519
|
|
|
461
520
|
class NodeHttp2ConnectionManager {
|
|
521
|
+
config;
|
|
522
|
+
connectionPools = new Map();
|
|
462
523
|
constructor(config) {
|
|
463
524
|
this.config = config;
|
|
464
525
|
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
|
|
465
526
|
throw new RangeError("maxConcurrency must be greater than zero.");
|
|
466
527
|
}
|
|
467
528
|
}
|
|
468
|
-
config;
|
|
469
|
-
sessionCache = new Map();
|
|
470
529
|
lease(requestContext, connectionConfiguration) {
|
|
471
530
|
const url = this.getUrlString(requestContext);
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
|
|
531
|
+
const pool = this.getPool(url);
|
|
532
|
+
if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {
|
|
533
|
+
const available = pool.poll();
|
|
534
|
+
if (available) {
|
|
535
|
+
available.retain();
|
|
536
|
+
return available;
|
|
477
537
|
}
|
|
478
538
|
}
|
|
479
|
-
const
|
|
539
|
+
const ref = new ClientHttp2SessionRef(http2.connect(url));
|
|
540
|
+
const session = ref.deref();
|
|
480
541
|
if (this.config.maxConcurrency) {
|
|
481
542
|
session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
|
|
482
543
|
if (err) {
|
|
@@ -487,47 +548,48 @@ class NodeHttp2ConnectionManager {
|
|
|
487
548
|
}
|
|
488
549
|
});
|
|
489
550
|
}
|
|
490
|
-
session.unref();
|
|
491
551
|
const destroySessionCb = () => {
|
|
492
552
|
session.destroy();
|
|
493
|
-
this.
|
|
553
|
+
this.removeFromPool(url, ref);
|
|
494
554
|
};
|
|
495
555
|
session.on("goaway", destroySessionCb);
|
|
496
556
|
session.on("error", destroySessionCb);
|
|
497
557
|
session.on("frameError", destroySessionCb);
|
|
498
|
-
session.on("close", () => this.
|
|
558
|
+
session.on("close", () => this.removeFromPool(url, ref));
|
|
499
559
|
if (connectionConfiguration.requestTimeout) {
|
|
500
560
|
session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
|
|
501
561
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
return session;
|
|
562
|
+
pool.offerLast(ref);
|
|
563
|
+
ref.retain();
|
|
564
|
+
return ref;
|
|
506
565
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
if (!existingConnectionPool) {
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
if (!existingConnectionPool.contains(session)) {
|
|
513
|
-
return;
|
|
514
|
-
}
|
|
515
|
-
existingConnectionPool.remove(session);
|
|
516
|
-
this.sessionCache.set(authority, existingConnectionPool);
|
|
566
|
+
release(_requestContext, ref) {
|
|
567
|
+
ref.free();
|
|
517
568
|
}
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
|
|
569
|
+
createIsolatedSession(requestContext, connectionConfiguration) {
|
|
570
|
+
const url = this.getUrlString(requestContext);
|
|
571
|
+
const ref = new ClientHttp2SessionRef(http2.connect(url));
|
|
572
|
+
const session = ref.deref();
|
|
573
|
+
session.settings({ maxConcurrentStreams: 1 });
|
|
574
|
+
const destroySession = () => {
|
|
575
|
+
session.destroy();
|
|
576
|
+
};
|
|
577
|
+
session.on("goaway", destroySession);
|
|
578
|
+
session.on("error", destroySession);
|
|
579
|
+
session.on("frameError", destroySession);
|
|
580
|
+
session.on("close", destroySession);
|
|
581
|
+
if (connectionConfiguration.requestTimeout) {
|
|
582
|
+
session.setTimeout(connectionConfiguration.requestTimeout, destroySession);
|
|
583
|
+
}
|
|
584
|
+
ref.retain();
|
|
585
|
+
return ref;
|
|
521
586
|
}
|
|
522
587
|
destroy() {
|
|
523
|
-
for (const [
|
|
524
|
-
for (const session of connectionPool) {
|
|
525
|
-
|
|
526
|
-
session.destroy();
|
|
527
|
-
}
|
|
528
|
-
connectionPool.remove(session);
|
|
588
|
+
for (const [url, connectionPool] of this.connectionPools) {
|
|
589
|
+
for (const session of [...connectionPool]) {
|
|
590
|
+
session.destroy();
|
|
529
591
|
}
|
|
530
|
-
this.
|
|
592
|
+
this.connectionPools.delete(url);
|
|
531
593
|
}
|
|
532
594
|
}
|
|
533
595
|
setMaxConcurrentStreams(maxConcurrentStreams) {
|
|
@@ -535,10 +597,42 @@ class NodeHttp2ConnectionManager {
|
|
|
535
597
|
throw new RangeError("maxConcurrentStreams must be greater than zero.");
|
|
536
598
|
}
|
|
537
599
|
this.config.maxConcurrency = maxConcurrentStreams;
|
|
600
|
+
for (const pool of this.connectionPools.values()) {
|
|
601
|
+
pool.setMaxConcurrency(maxConcurrentStreams);
|
|
602
|
+
}
|
|
538
603
|
}
|
|
539
604
|
setDisableConcurrentStreams(disableConcurrentStreams) {
|
|
540
605
|
this.config.disableConcurrency = disableConcurrentStreams;
|
|
541
606
|
}
|
|
607
|
+
debug() {
|
|
608
|
+
const pools = {};
|
|
609
|
+
for (const [url, pool] of this.connectionPools) {
|
|
610
|
+
const sessions = [];
|
|
611
|
+
for (const ref of pool) {
|
|
612
|
+
sessions.push({
|
|
613
|
+
id: ref.id,
|
|
614
|
+
active: ref.useCount(),
|
|
615
|
+
maxConcurrent: ref.max,
|
|
616
|
+
totalRequests: ref.total,
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
pools[url] = { sessions };
|
|
620
|
+
}
|
|
621
|
+
return pools;
|
|
622
|
+
}
|
|
623
|
+
removeFromPool(authority, ref) {
|
|
624
|
+
this.connectionPools.get(authority)?.remove(ref);
|
|
625
|
+
}
|
|
626
|
+
getPool(url) {
|
|
627
|
+
if (!this.connectionPools.has(url)) {
|
|
628
|
+
const pool = new NodeHttp2ConnectionPool();
|
|
629
|
+
if (this.config.maxConcurrency) {
|
|
630
|
+
pool.setMaxConcurrency(this.config.maxConcurrency);
|
|
631
|
+
}
|
|
632
|
+
this.connectionPools.set(url, pool);
|
|
633
|
+
}
|
|
634
|
+
return this.connectionPools.get(url);
|
|
635
|
+
}
|
|
542
636
|
getUrlString(request) {
|
|
543
637
|
return request.destination.toString();
|
|
544
638
|
}
|
|
@@ -575,12 +669,14 @@ class NodeHttp2Handler {
|
|
|
575
669
|
async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {
|
|
576
670
|
if (!this.config) {
|
|
577
671
|
this.config = await this.configProvider;
|
|
578
|
-
this.
|
|
579
|
-
|
|
580
|
-
|
|
672
|
+
const { disableConcurrentStreams, maxConcurrentStreams } = this.config;
|
|
673
|
+
this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);
|
|
674
|
+
if (maxConcurrentStreams) {
|
|
675
|
+
this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);
|
|
581
676
|
}
|
|
582
677
|
}
|
|
583
678
|
const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
|
|
679
|
+
const useIsolatedSession = disableConcurrentStreams || isEventStream;
|
|
584
680
|
const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
|
|
585
681
|
return new Promise((_resolve, _reject) => {
|
|
586
682
|
let fulfilled = false;
|
|
@@ -608,13 +704,17 @@ class NodeHttp2Handler {
|
|
|
608
704
|
}
|
|
609
705
|
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
|
|
610
706
|
const requestContext = { destination: new URL(authority) };
|
|
611
|
-
const
|
|
707
|
+
const connectConfig = {
|
|
612
708
|
requestTimeout: this.config?.sessionTimeout,
|
|
613
709
|
isEventStream,
|
|
614
|
-
}
|
|
710
|
+
};
|
|
711
|
+
const ref = useIsolatedSession
|
|
712
|
+
? this.connectionManager.createIsolatedSession(requestContext, connectConfig)
|
|
713
|
+
: this.connectionManager.lease(requestContext, connectConfig);
|
|
714
|
+
const session = ref.deref();
|
|
615
715
|
const rejectWithDestroy = (err) => {
|
|
616
|
-
if (
|
|
617
|
-
|
|
716
|
+
if (useIsolatedSession) {
|
|
717
|
+
ref.destroy();
|
|
618
718
|
}
|
|
619
719
|
fulfilled = true;
|
|
620
720
|
reject(err);
|
|
@@ -627,28 +727,14 @@ class NodeHttp2Handler {
|
|
|
627
727
|
if (request.fragment) {
|
|
628
728
|
path += `#${request.fragment}`;
|
|
629
729
|
}
|
|
630
|
-
const
|
|
730
|
+
const clientHttp2Stream = session.request({
|
|
631
731
|
...request.headers,
|
|
632
732
|
[http2.constants.HTTP2_HEADER_PATH]: path,
|
|
633
733
|
[http2.constants.HTTP2_HEADER_METHOD]: method,
|
|
634
734
|
});
|
|
635
|
-
session.ref();
|
|
636
|
-
req.on("response", (headers) => {
|
|
637
|
-
const httpResponse = new protocolHttp.HttpResponse({
|
|
638
|
-
statusCode: headers[":status"] ?? -1,
|
|
639
|
-
headers: getTransformedHeaders(headers),
|
|
640
|
-
body: req,
|
|
641
|
-
});
|
|
642
|
-
fulfilled = true;
|
|
643
|
-
resolve({ response: httpResponse });
|
|
644
|
-
if (disableConcurrentStreams) {
|
|
645
|
-
session.close();
|
|
646
|
-
this.connectionManager.deleteSession(authority, session);
|
|
647
|
-
}
|
|
648
|
-
});
|
|
649
735
|
if (effectiveRequestTimeout) {
|
|
650
|
-
|
|
651
|
-
|
|
736
|
+
clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {
|
|
737
|
+
clientHttp2Stream.close();
|
|
652
738
|
const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
|
|
653
739
|
timeoutError.name = "TimeoutError";
|
|
654
740
|
rejectWithDestroy(timeoutError);
|
|
@@ -656,36 +742,50 @@ class NodeHttp2Handler {
|
|
|
656
742
|
}
|
|
657
743
|
if (abortSignal) {
|
|
658
744
|
const onAbort = () => {
|
|
659
|
-
|
|
745
|
+
clientHttp2Stream.close();
|
|
660
746
|
const abortError = buildAbortError(abortSignal);
|
|
661
747
|
rejectWithDestroy(abortError);
|
|
662
748
|
};
|
|
663
749
|
if (typeof abortSignal.addEventListener === "function") {
|
|
664
750
|
const signal = abortSignal;
|
|
665
751
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
666
|
-
|
|
752
|
+
clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort));
|
|
667
753
|
}
|
|
668
754
|
else {
|
|
669
755
|
abortSignal.onabort = onAbort;
|
|
670
756
|
}
|
|
671
757
|
}
|
|
672
|
-
|
|
758
|
+
clientHttp2Stream.on("frameError", (type, code, id) => {
|
|
673
759
|
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
|
|
674
760
|
});
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${
|
|
761
|
+
clientHttp2Stream.on("error", rejectWithDestroy);
|
|
762
|
+
clientHttp2Stream.on("aborted", () => {
|
|
763
|
+
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
|
|
678
764
|
});
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
765
|
+
clientHttp2Stream.on("response", (headers) => {
|
|
766
|
+
const httpResponse = new protocolHttp.HttpResponse({
|
|
767
|
+
statusCode: headers[":status"] ?? -1,
|
|
768
|
+
headers: getTransformedHeaders(headers),
|
|
769
|
+
body: clientHttp2Stream,
|
|
770
|
+
});
|
|
771
|
+
fulfilled = true;
|
|
772
|
+
resolve({ response: httpResponse });
|
|
773
|
+
if (useIsolatedSession) {
|
|
774
|
+
session.close();
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
clientHttp2Stream.on("close", () => {
|
|
778
|
+
if (useIsolatedSession) {
|
|
779
|
+
ref.destroy();
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
this.connectionManager.release(requestContext, ref);
|
|
683
783
|
}
|
|
684
784
|
if (!fulfilled) {
|
|
685
785
|
rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
|
|
686
786
|
}
|
|
687
787
|
});
|
|
688
|
-
writeRequestBodyPromise = writeRequestBody(
|
|
788
|
+
writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
|
|
689
789
|
});
|
|
690
790
|
}
|
|
691
791
|
updateHttpClientConfig(key, value) {
|
|
@@ -700,11 +800,6 @@ class NodeHttp2Handler {
|
|
|
700
800
|
httpHandlerConfigs() {
|
|
701
801
|
return this.config ?? {};
|
|
702
802
|
}
|
|
703
|
-
destroySession(session) {
|
|
704
|
-
if (!session.destroyed) {
|
|
705
|
-
session.destroy();
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
803
|
}
|
|
709
804
|
|
|
710
805
|
class Collector extends node_stream.Writable {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const ids = new Uint16Array(1);
|
|
2
|
+
export class ClientHttp2SessionRef {
|
|
3
|
+
id = ids[0]++;
|
|
4
|
+
total = 0;
|
|
5
|
+
max = 0;
|
|
6
|
+
session;
|
|
7
|
+
refs = 0;
|
|
8
|
+
constructor(session) {
|
|
9
|
+
session.unref();
|
|
10
|
+
this.session = session;
|
|
11
|
+
}
|
|
12
|
+
retain() {
|
|
13
|
+
if (this.session.destroyed) {
|
|
14
|
+
throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");
|
|
15
|
+
}
|
|
16
|
+
this.refs += 1;
|
|
17
|
+
this.total += 1;
|
|
18
|
+
this.max = Math.max(this.refs, this.max);
|
|
19
|
+
this.session.ref();
|
|
20
|
+
}
|
|
21
|
+
free() {
|
|
22
|
+
if (this.session.destroyed) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.refs -= 1;
|
|
26
|
+
if (this.refs === 0) {
|
|
27
|
+
this.session.unref();
|
|
28
|
+
}
|
|
29
|
+
if (this.refs < 0) {
|
|
30
|
+
throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
deref() {
|
|
34
|
+
return this.session;
|
|
35
|
+
}
|
|
36
|
+
destroy() {
|
|
37
|
+
this.refs = 0;
|
|
38
|
+
if (!this.session.destroyed) {
|
|
39
|
+
this.session.destroy();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
useCount() {
|
|
43
|
+
return this.refs;
|
|
44
|
+
}
|
|
45
|
+
}
|