@cdk8s/awscdk-resolver 0.0.224 → 0.0.226
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/index.js +610 -478
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/CloudFormationClient.js +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/models_0.js +81 -54
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/models_1.js +3 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +9 -7
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.native.d.ts +20 -8
- package/node_modules/@aws-sdk/client-cloudformation/package.json +44 -44
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +57 -42
- package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +1 -0
- package/node_modules/@aws-sdk/client-sso/dist-es/models/models_0.js +8 -8
- package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +15 -5
- package/node_modules/@aws-sdk/client-sso/package.json +40 -40
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +295 -92
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +1 -0
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/models/models_0.js +58 -28
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -3
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +9 -7
- package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +20 -8
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +42 -42
- package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +1 -0
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +115 -104
- package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +1 -0
- package/node_modules/@aws-sdk/client-sts/dist-es/models/models_0.js +16 -16
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +2 -2
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -3
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +9 -7
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +20 -8
- package/node_modules/@aws-sdk/client-sts/package.json +42 -42
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +18 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +3 -4
- package/node_modules/@aws-sdk/core/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +2 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-http/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +12 -17
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +16 -16
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +11 -18
- package/node_modules/@aws-sdk/credential-provider-node/package.json +15 -15
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +3 -5
- package/node_modules/@aws-sdk/credential-provider-process/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +5 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +9 -9
- package/node_modules/@aws-sdk/middleware-host-header/package.json +6 -6
- package/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +2 -3
- package/node_modules/@aws-sdk/middleware-logger/package.json +6 -6
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +6 -6
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +13 -17
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +9 -9
- package/node_modules/@aws-sdk/region-config-resolver/package.json +8 -8
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +5 -7
- package/node_modules/@aws-sdk/token-providers/package.json +9 -9
- package/node_modules/@aws-sdk/types/package.json +4 -4
- package/node_modules/@aws-sdk/util-endpoints/package.json +6 -6
- package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +1 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +8 -8
- package/node_modules/@smithy/abort-controller/dist-cjs/index.js +8 -6
- package/node_modules/@smithy/abort-controller/package.json +3 -3
- package/node_modules/@smithy/config-resolver/dist-cjs/index.js +8 -12
- package/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveCustomEndpointsConfig.d.ts +3 -0
- package/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/resolveEndpointsConfig.d.ts +4 -1
- package/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveCustomEndpointsConfig.d.ts +3 -0
- package/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/resolveEndpointsConfig.d.ts +4 -1
- package/node_modules/@smithy/config-resolver/package.json +6 -6
- package/node_modules/@smithy/core/dist-cjs/index.js +19 -16
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/cbor-types.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +10 -10
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +10 -11
- package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/httpRequest.d.ts +1 -0
- package/node_modules/@smithy/credential-provider-imds/package.json +7 -7
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +8 -9
- package/node_modules/@smithy/fetch-http-handler/package.json +9 -6
- package/node_modules/@smithy/hash-node/dist-cjs/index.js +4 -3
- package/node_modules/@smithy/hash-node/package.json +6 -6
- package/node_modules/@smithy/invalid-dependency/package.json +5 -2
- package/node_modules/@smithy/is-array-buffer/package.json +5 -4
- package/node_modules/@smithy/middleware-content-length/package.json +4 -4
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +7 -9
- package/node_modules/@smithy/middleware-endpoint/package.json +9 -9
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +18 -17
- package/node_modules/@smithy/middleware-retry/package.json +9 -9
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +1 -2
- package/node_modules/@smithy/middleware-serde/package.json +3 -3
- package/node_modules/@smithy/middleware-stack/dist-cjs/index.js +4 -12
- package/node_modules/@smithy/middleware-stack/dist-types/MiddlewareStack.d.ts +3 -0
- package/node_modules/@smithy/middleware-stack/dist-types/ts3.4/MiddlewareStack.d.ts +3 -0
- package/node_modules/@smithy/middleware-stack/package.json +3 -3
- package/node_modules/@smithy/node-config-provider/dist-types/configLoader.d.ts +9 -0
- package/node_modules/@smithy/node-config-provider/dist-types/fromSharedConfigFiles.d.ts +7 -0
- package/node_modules/@smithy/node-config-provider/dist-types/fromStatic.d.ts +6 -0
- package/node_modules/@smithy/node-config-provider/dist-types/ts3.4/configLoader.d.ts +9 -0
- package/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromSharedConfigFiles.d.ts +7 -0
- package/node_modules/@smithy/node-config-provider/dist-types/ts3.4/fromStatic.d.ts +6 -0
- package/node_modules/@smithy/node-config-provider/package.json +6 -6
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +36 -36
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +8 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +6 -1
- package/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +1 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -0
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +1 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +8 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +6 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/package.json +7 -7
- package/node_modules/@smithy/property-provider/dist-cjs/index.js +16 -14
- package/node_modules/@smithy/property-provider/package.json +3 -3
- package/node_modules/@smithy/protocol-http/dist-cjs/index.js +16 -12
- package/node_modules/@smithy/protocol-http/dist-types/httpHandler.d.ts +0 -2
- package/node_modules/@smithy/protocol-http/dist-types/httpRequest.d.ts +3 -1
- package/node_modules/@smithy/protocol-http/dist-types/httpResponse.d.ts +13 -0
- package/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpHandler.d.ts +0 -2
- package/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpRequest.d.ts +3 -1
- package/node_modules/@smithy/protocol-http/dist-types/ts3.4/httpResponse.d.ts +13 -0
- package/node_modules/@smithy/protocol-http/package.json +3 -3
- package/node_modules/@smithy/querystring-builder/package.json +4 -4
- package/node_modules/@smithy/querystring-parser/package.json +3 -3
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +4 -14
- package/node_modules/@smithy/service-error-classification/package.json +3 -3
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/getProfileName.d.ts +10 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFilepath.d.ts +1 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/getSSOTokenFromFile.d.ts +2 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +10 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSsoSessionData.d.ts +7 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/parseKnownFiles.d.ts +3 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getProfileName.d.ts +10 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFilepath.d.ts +1 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/getSSOTokenFromFile.d.ts +2 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +10 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSsoSessionData.d.ts +7 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/parseKnownFiles.d.ts +3 -0
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/types.d.ts +6 -3
- package/node_modules/@smithy/shared-ini-file-loader/dist-types/types.d.ts +6 -3
- package/node_modules/@smithy/shared-ini-file-loader/package.json +4 -4
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +16 -14
- package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +9 -0
- package/node_modules/@smithy/signature-v4/dist-types/credentialDerivation.d.ts +13 -9
- package/node_modules/@smithy/signature-v4/dist-types/getCanonicalHeaders.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/getCanonicalQuery.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/getPayloadHash.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/moveHeadersToQuery.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/prepareRequest.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/SignatureV4.d.ts +9 -0
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/credentialDerivation.d.ts +13 -9
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalHeaders.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/getCanonicalQuery.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/getPayloadHash.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/moveHeadersToQuery.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/dist-types/ts3.4/prepareRequest.d.ts +1 -1
- package/node_modules/@smithy/signature-v4/package.json +9 -9
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +27 -21
- package/node_modules/@smithy/smithy-client/package.json +9 -9
- package/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +2 -0
- package/node_modules/@smithy/types/dist-types/client.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/connection/config.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/connection/manager.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/connection/pool.d.ts +8 -0
- package/node_modules/@smithy/types/dist-types/encode.d.ts +12 -0
- package/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +12 -0
- package/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +9 -0
- package/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +30 -0
- package/node_modules/@smithy/types/dist-types/eventStream.d.ts +31 -2
- package/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +3 -2
- package/node_modules/@smithy/types/dist-types/http.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/serde.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +2 -1
- package/node_modules/@smithy/types/dist-types/transfer.d.ts +8 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +8 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +12 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +12 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +9 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +30 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +31 -2
- package/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +3 -2
- package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +1 -1
- package/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +8 -0
- package/node_modules/@smithy/types/package.json +2 -2
- package/node_modules/@smithy/url-parser/package.json +6 -3
- package/node_modules/@smithy/util-base64/package.json +8 -7
- package/node_modules/@smithy/util-body-length-browser/package.json +7 -3
- package/node_modules/@smithy/util-body-length-node/package.json +6 -5
- package/node_modules/@smithy/util-buffer-from/package.json +7 -6
- package/node_modules/@smithy/util-config-provider/package.json +6 -5
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +6 -6
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +9 -9
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +13 -15
- package/node_modules/@smithy/util-endpoints/package.json +5 -5
- package/node_modules/@smithy/util-hex-encoding/package.json +5 -4
- package/node_modules/@smithy/util-middleware/package.json +4 -4
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +27 -21
- package/node_modules/@smithy/util-retry/package.json +5 -5
- package/node_modules/@smithy/util-stream/dist-cjs/index.js +4 -3
- package/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +1 -1
- package/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js +1 -1
- package/node_modules/@smithy/util-stream/dist-types/checksum/ChecksumStream.d.ts +1 -0
- package/node_modules/@smithy/util-stream/package.json +10 -10
- package/node_modules/@smithy/util-uri-escape/package.json +5 -4
- package/node_modules/@smithy/util-utf8/package.json +6 -5
- package/node_modules/@smithy/util-waiter/dist-cjs/index.js +4 -6
- package/node_modules/@smithy/util-waiter/package.json +4 -4
- package/package.json +3 -3
@@ -78,7 +78,7 @@ var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs
|
|
78
78
|
);
|
79
79
|
}, timeoutInMs - offset);
|
80
80
|
const doWithSocket = /* @__PURE__ */ __name((socket) => {
|
81
|
-
if (socket
|
81
|
+
if (socket?.connecting) {
|
82
82
|
socket.on("connect", () => {
|
83
83
|
timing.clearTimeout(timeoutId);
|
84
84
|
});
|
@@ -123,7 +123,7 @@ var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAlive
|
|
123
123
|
|
124
124
|
// src/set-socket-timeout.ts
|
125
125
|
var DEFER_EVENT_LISTENER_TIME3 = 3e3;
|
126
|
-
var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs =
|
126
|
+
var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => {
|
127
127
|
const registerTimeout = /* @__PURE__ */ __name((offset) => {
|
128
128
|
const timeout = timeoutInMs - offset;
|
129
129
|
const onTimeout = /* @__PURE__ */ __name(() => {
|
@@ -204,7 +204,7 @@ __name(writeBody, "writeBody");
|
|
204
204
|
|
205
205
|
// src/node-http-handler.ts
|
206
206
|
var DEFAULT_REQUEST_TIMEOUT = 0;
|
207
|
-
var
|
207
|
+
var NodeHttpHandler = class _NodeHttpHandler {
|
208
208
|
constructor(options) {
|
209
209
|
this.socketWarningTimestamp = 0;
|
210
210
|
// Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286
|
@@ -219,12 +219,15 @@ var _NodeHttpHandler = class _NodeHttpHandler {
|
|
219
219
|
}
|
220
220
|
});
|
221
221
|
}
|
222
|
+
static {
|
223
|
+
__name(this, "NodeHttpHandler");
|
224
|
+
}
|
222
225
|
/**
|
223
226
|
* @returns the input if it is an HttpHandler of any class,
|
224
227
|
* or instantiates a new instance of this handler.
|
225
228
|
*/
|
226
229
|
static create(instanceOrOptions) {
|
227
|
-
if (typeof
|
230
|
+
if (typeof instanceOrOptions?.handle === "function") {
|
228
231
|
return instanceOrOptions;
|
229
232
|
}
|
230
233
|
return new _NodeHttpHandler(instanceOrOptions);
|
@@ -238,7 +241,6 @@ var _NodeHttpHandler = class _NodeHttpHandler {
|
|
238
241
|
* @returns timestamp of last emitted warning.
|
239
242
|
*/
|
240
243
|
static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {
|
241
|
-
var _a, _b, _c;
|
242
244
|
const { sockets, requests, maxSockets } = agent;
|
243
245
|
if (typeof maxSockets !== "number" || maxSockets === Infinity) {
|
244
246
|
return socketWarningTimestamp;
|
@@ -249,11 +251,10 @@ var _NodeHttpHandler = class _NodeHttpHandler {
|
|
249
251
|
}
|
250
252
|
if (sockets && requests) {
|
251
253
|
for (const origin in sockets) {
|
252
|
-
const socketsInUse =
|
253
|
-
const requestsEnqueued =
|
254
|
+
const socketsInUse = sockets[origin]?.length ?? 0;
|
255
|
+
const requestsEnqueued = requests[origin]?.length ?? 0;
|
254
256
|
if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
|
255
|
-
|
256
|
-
logger,
|
257
|
+
logger?.warn?.(
|
257
258
|
`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
|
258
259
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
259
260
|
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`
|
@@ -272,13 +273,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
272
273
|
connectionTimeout,
|
273
274
|
requestTimeout: requestTimeout ?? socketTimeout,
|
274
275
|
httpAgent: (() => {
|
275
|
-
if (httpAgent instanceof import_http.Agent || typeof
|
276
|
+
if (httpAgent instanceof import_http.Agent || typeof httpAgent?.destroy === "function") {
|
276
277
|
return httpAgent;
|
277
278
|
}
|
278
279
|
return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent });
|
279
280
|
})(),
|
280
281
|
httpsAgent: (() => {
|
281
|
-
if (httpsAgent instanceof import_https.Agent || typeof
|
282
|
+
if (httpsAgent instanceof import_https.Agent || typeof httpsAgent?.destroy === "function") {
|
282
283
|
return httpsAgent;
|
283
284
|
}
|
284
285
|
return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
|
@@ -287,9 +288,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
287
288
|
};
|
288
289
|
}
|
289
290
|
destroy() {
|
290
|
-
|
291
|
-
|
292
|
-
(_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy();
|
291
|
+
this.config?.httpAgent?.destroy();
|
292
|
+
this.config?.httpsAgent?.destroy();
|
293
293
|
}
|
294
294
|
async handle(request, { abortSignal } = {}) {
|
295
295
|
if (!this.config) {
|
@@ -311,7 +311,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
311
311
|
if (!this.config) {
|
312
312
|
throw new Error("Node HTTP request handler config is not resolved");
|
313
313
|
}
|
314
|
-
if (abortSignal
|
314
|
+
if (abortSignal?.aborted) {
|
315
315
|
const abortError = new Error("Request aborted");
|
316
316
|
abortError.name = "AbortError";
|
317
317
|
reject(abortError);
|
@@ -424,8 +424,6 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
424
424
|
return this.config ?? {};
|
425
425
|
}
|
426
426
|
};
|
427
|
-
__name(_NodeHttpHandler, "NodeHttpHandler");
|
428
|
-
var NodeHttpHandler = _NodeHttpHandler;
|
429
427
|
|
430
428
|
// src/node-http2-handler.ts
|
431
429
|
|
@@ -436,11 +434,14 @@ var import_http22 = require("http2");
|
|
436
434
|
var import_http2 = __toESM(require("http2"));
|
437
435
|
|
438
436
|
// src/node-http2-connection-pool.ts
|
439
|
-
var
|
437
|
+
var NodeHttp2ConnectionPool = class {
|
440
438
|
constructor(sessions) {
|
441
439
|
this.sessions = [];
|
442
440
|
this.sessions = sessions ?? [];
|
443
441
|
}
|
442
|
+
static {
|
443
|
+
__name(this, "NodeHttp2ConnectionPool");
|
444
|
+
}
|
444
445
|
poll() {
|
445
446
|
if (this.sessions.length > 0) {
|
446
447
|
return this.sessions.shift();
|
@@ -468,11 +469,9 @@ var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool {
|
|
468
469
|
}
|
469
470
|
}
|
470
471
|
};
|
471
|
-
__name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool");
|
472
|
-
var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool;
|
473
472
|
|
474
473
|
// src/node-http2-connection-manager.ts
|
475
|
-
var
|
474
|
+
var NodeHttp2ConnectionManager = class {
|
476
475
|
constructor(config) {
|
477
476
|
this.sessionCache = /* @__PURE__ */ new Map();
|
478
477
|
this.config = config;
|
@@ -480,6 +479,9 @@ var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager {
|
|
480
479
|
throw new RangeError("maxConcurrency must be greater than zero.");
|
481
480
|
}
|
482
481
|
}
|
482
|
+
static {
|
483
|
+
__name(this, "NodeHttp2ConnectionManager");
|
484
|
+
}
|
483
485
|
lease(requestContext, connectionConfiguration) {
|
484
486
|
const url = this.getUrlString(requestContext);
|
485
487
|
const existingPool = this.sessionCache.get(url);
|
@@ -533,9 +535,8 @@ var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager {
|
|
533
535
|
this.sessionCache.set(authority, existingConnectionPool);
|
534
536
|
}
|
535
537
|
release(requestContext, session) {
|
536
|
-
var _a;
|
537
538
|
const cacheKey = this.getUrlString(requestContext);
|
538
|
-
|
539
|
+
this.sessionCache.get(cacheKey)?.offerLast(session);
|
539
540
|
}
|
540
541
|
destroy() {
|
541
542
|
for (const [key, connectionPool] of this.sessionCache) {
|
@@ -561,11 +562,9 @@ var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager {
|
|
561
562
|
return request.destination.toString();
|
562
563
|
}
|
563
564
|
};
|
564
|
-
__name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager");
|
565
|
-
var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager;
|
566
565
|
|
567
566
|
// src/node-http2-handler.ts
|
568
|
-
var
|
567
|
+
var NodeHttp2Handler = class _NodeHttp2Handler {
|
569
568
|
constructor(options) {
|
570
569
|
this.metadata = { handlerProtocol: "h2" };
|
571
570
|
this.connectionManager = new NodeHttp2ConnectionManager({});
|
@@ -579,12 +578,15 @@ var _NodeHttp2Handler = class _NodeHttp2Handler {
|
|
579
578
|
}
|
580
579
|
});
|
581
580
|
}
|
581
|
+
static {
|
582
|
+
__name(this, "NodeHttp2Handler");
|
583
|
+
}
|
582
584
|
/**
|
583
585
|
* @returns the input if it is an HttpHandler of any class,
|
584
586
|
* or instantiates a new instance of this handler.
|
585
587
|
*/
|
586
588
|
static create(instanceOrOptions) {
|
587
|
-
if (typeof
|
589
|
+
if (typeof instanceOrOptions?.handle === "function") {
|
588
590
|
return instanceOrOptions;
|
589
591
|
}
|
590
592
|
return new _NodeHttp2Handler(instanceOrOptions);
|
@@ -602,7 +604,6 @@ var _NodeHttp2Handler = class _NodeHttp2Handler {
|
|
602
604
|
}
|
603
605
|
const { requestTimeout, disableConcurrentStreams } = this.config;
|
604
606
|
return new Promise((_resolve, _reject) => {
|
605
|
-
var _a;
|
606
607
|
let fulfilled = false;
|
607
608
|
let writeRequestBodyPromise = void 0;
|
608
609
|
const resolve = /* @__PURE__ */ __name(async (arg) => {
|
@@ -613,7 +614,7 @@ var _NodeHttp2Handler = class _NodeHttp2Handler {
|
|
613
614
|
await writeRequestBodyPromise;
|
614
615
|
_reject(arg);
|
615
616
|
}, "reject");
|
616
|
-
if (abortSignal
|
617
|
+
if (abortSignal?.aborted) {
|
617
618
|
fulfilled = true;
|
618
619
|
const abortError = new Error("Request aborted");
|
619
620
|
abortError.name = "AbortError";
|
@@ -630,7 +631,7 @@ var _NodeHttp2Handler = class _NodeHttp2Handler {
|
|
630
631
|
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
|
631
632
|
const requestContext = { destination: new URL(authority) };
|
632
633
|
const session = this.connectionManager.lease(requestContext, {
|
633
|
-
requestTimeout:
|
634
|
+
requestTimeout: this.config?.sessionTimeout,
|
634
635
|
disableConcurrentStreams: disableConcurrentStreams || false
|
635
636
|
});
|
636
637
|
const rejectWithDestroy = /* @__PURE__ */ __name((err) => {
|
@@ -725,7 +726,7 @@ var _NodeHttp2Handler = class _NodeHttp2Handler {
|
|
725
726
|
}
|
726
727
|
/**
|
727
728
|
* Destroys a session.
|
728
|
-
* @param session
|
729
|
+
* @param session - the session to destroy.
|
729
730
|
*/
|
730
731
|
destroySession(session) {
|
731
732
|
if (!session.destroyed) {
|
@@ -733,23 +734,22 @@ var _NodeHttp2Handler = class _NodeHttp2Handler {
|
|
733
734
|
}
|
734
735
|
}
|
735
736
|
};
|
736
|
-
__name(_NodeHttp2Handler, "NodeHttp2Handler");
|
737
|
-
var NodeHttp2Handler = _NodeHttp2Handler;
|
738
737
|
|
739
738
|
// src/stream-collector/collector.ts
|
740
739
|
|
741
|
-
var
|
740
|
+
var Collector = class extends import_stream.Writable {
|
742
741
|
constructor() {
|
743
742
|
super(...arguments);
|
744
743
|
this.bufferedBytes = [];
|
745
744
|
}
|
745
|
+
static {
|
746
|
+
__name(this, "Collector");
|
747
|
+
}
|
746
748
|
_write(chunk, encoding, callback) {
|
747
749
|
this.bufferedBytes.push(chunk);
|
748
750
|
callback();
|
749
751
|
}
|
750
752
|
};
|
751
|
-
__name(_Collector, "Collector");
|
752
|
-
var Collector = _Collector;
|
753
753
|
|
754
754
|
// src/stream-collector/index.ts
|
755
755
|
var streamCollector = /* @__PURE__ */ __name((stream) => {
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import { DEFAULT_REQUEST_TIMEOUT } from "./node-http-handler";
|
1
2
|
import { timing } from "./timing";
|
2
3
|
const DEFER_EVENT_LISTENER_TIME = 3000;
|
3
|
-
export const setSocketTimeout = (request, reject, timeoutInMs =
|
4
|
+
export const setSocketTimeout = (request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => {
|
4
5
|
const registerTimeout = (offset) => {
|
5
6
|
const timeout = timeoutInMs - offset;
|
6
7
|
const onTimeout = () => {
|
@@ -6,7 +6,15 @@ import { HttpHandlerOptions, Provider } from "@smithy/types";
|
|
6
6
|
import { Agent as hAgent } from "http";
|
7
7
|
import { Agent as hsAgent } from "https";
|
8
8
|
export { NodeHttpHandlerOptions };
|
9
|
+
/**
|
10
|
+
* @public
|
11
|
+
* A default of 0 means no timeout.
|
12
|
+
*/
|
9
13
|
export declare const DEFAULT_REQUEST_TIMEOUT = 0;
|
14
|
+
/**
|
15
|
+
* @public
|
16
|
+
* A request handler that uses the Node.js http and https modules.
|
17
|
+
*/
|
10
18
|
export declare class NodeHttpHandler implements HttpHandler<NodeHttpHandlerOptions> {
|
11
19
|
private config?;
|
12
20
|
private configProvider;
|
package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts
CHANGED
@@ -3,6 +3,9 @@ import { RequestContext } from "@smithy/types";
|
|
3
3
|
import { ConnectConfiguration } from "@smithy/types";
|
4
4
|
import { ConnectionManager, ConnectionManagerConfiguration } from "@smithy/types";
|
5
5
|
import { ClientHttp2Session } from "http2";
|
6
|
+
/**
|
7
|
+
* @public
|
8
|
+
*/
|
6
9
|
export declare class NodeHttp2ConnectionManager implements ConnectionManager<ClientHttp2Session> {
|
7
10
|
constructor(config: ConnectionManagerConfiguration);
|
8
11
|
private config;
|
@@ -2,6 +2,7 @@ import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
|
2
2
|
import { HttpHandlerOptions, Provider } from "@smithy/types";
|
3
3
|
/**
|
4
4
|
* Represents the http2 options that can be passed to a node http2 client.
|
5
|
+
* @public
|
5
6
|
*/
|
6
7
|
export interface NodeHttp2HandlerOptions {
|
7
8
|
/**
|
@@ -30,6 +31,10 @@ export interface NodeHttp2HandlerOptions {
|
|
30
31
|
*/
|
31
32
|
maxConcurrentStreams?: number;
|
32
33
|
}
|
34
|
+
/**
|
35
|
+
* A request handler using the node:http2 package.
|
36
|
+
* @public
|
37
|
+
*/
|
33
38
|
export declare class NodeHttp2Handler implements HttpHandler<NodeHttp2HandlerOptions> {
|
34
39
|
private config?;
|
35
40
|
private configProvider;
|
@@ -51,7 +56,7 @@ export declare class NodeHttp2Handler implements HttpHandler<NodeHttp2HandlerOpt
|
|
51
56
|
httpHandlerConfigs(): NodeHttp2HandlerOptions;
|
52
57
|
/**
|
53
58
|
* Destroys a session.
|
54
|
-
* @param session
|
59
|
+
* @param session - the session to destroy.
|
55
60
|
*/
|
56
61
|
private destroySession;
|
57
62
|
}
|
@@ -3,5 +3,7 @@
|
|
3
3
|
/// <reference types="node" />
|
4
4
|
/// <reference types="node" />
|
5
5
|
/// <reference types="node" />
|
6
|
+
/// <reference types="node" />
|
7
|
+
/// <reference types="node" />
|
6
8
|
import { ClientRequest } from "http";
|
7
9
|
export declare const setConnectionTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => NodeJS.Timeout | number;
|
@@ -3,6 +3,8 @@
|
|
3
3
|
/// <reference types="node" />
|
4
4
|
/// <reference types="node" />
|
5
5
|
/// <reference types="node" />
|
6
|
+
/// <reference types="node" />
|
7
|
+
/// <reference types="node" />
|
6
8
|
import { ClientRequest } from "http";
|
7
9
|
export interface SocketKeepAliveOptions {
|
8
10
|
keepAlive: boolean;
|
@@ -3,5 +3,7 @@
|
|
3
3
|
/// <reference types="node" />
|
4
4
|
/// <reference types="node" />
|
5
5
|
/// <reference types="node" />
|
6
|
+
/// <reference types="node" />
|
7
|
+
/// <reference types="node" />
|
6
8
|
import { ClientRequest } from "http";
|
7
9
|
export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => NodeJS.Timeout | number;
|
@@ -5,7 +5,15 @@ import { HttpHandlerOptions, Provider } from "@smithy/types";
|
|
5
5
|
import { Agent as hAgent } from "http";
|
6
6
|
import { Agent as hsAgent } from "https";
|
7
7
|
export { NodeHttpHandlerOptions };
|
8
|
+
/**
|
9
|
+
* @public
|
10
|
+
* A default of 0 means no timeout.
|
11
|
+
*/
|
8
12
|
export declare const DEFAULT_REQUEST_TIMEOUT = 0;
|
13
|
+
/**
|
14
|
+
* @public
|
15
|
+
* A request handler that uses the Node.js http and https modules.
|
16
|
+
*/
|
9
17
|
export declare class NodeHttpHandler implements HttpHandler<NodeHttpHandlerOptions> {
|
10
18
|
private config?;
|
11
19
|
private configProvider;
|
package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts
CHANGED
@@ -3,6 +3,9 @@ import { RequestContext } from "@smithy/types";
|
|
3
3
|
import { ConnectConfiguration } from "@smithy/types";
|
4
4
|
import { ConnectionManager, ConnectionManagerConfiguration } from "@smithy/types";
|
5
5
|
import { ClientHttp2Session } from "http2";
|
6
|
+
/**
|
7
|
+
* @public
|
8
|
+
*/
|
6
9
|
export declare class NodeHttp2ConnectionManager implements ConnectionManager<ClientHttp2Session> {
|
7
10
|
constructor(config: ConnectionManagerConfiguration);
|
8
11
|
private config;
|
@@ -2,6 +2,7 @@ import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http";
|
|
2
2
|
import { HttpHandlerOptions, Provider } from "@smithy/types";
|
3
3
|
/**
|
4
4
|
* Represents the http2 options that can be passed to a node http2 client.
|
5
|
+
* @public
|
5
6
|
*/
|
6
7
|
export interface NodeHttp2HandlerOptions {
|
7
8
|
/**
|
@@ -30,6 +31,10 @@ export interface NodeHttp2HandlerOptions {
|
|
30
31
|
*/
|
31
32
|
maxConcurrentStreams?: number;
|
32
33
|
}
|
34
|
+
/**
|
35
|
+
* A request handler using the node:http2 package.
|
36
|
+
* @public
|
37
|
+
*/
|
33
38
|
export declare class NodeHttp2Handler implements HttpHandler<NodeHttp2HandlerOptions> {
|
34
39
|
private config?;
|
35
40
|
private configProvider;
|
@@ -51,7 +56,7 @@ export declare class NodeHttp2Handler implements HttpHandler<NodeHttp2HandlerOpt
|
|
51
56
|
httpHandlerConfigs(): NodeHttp2HandlerOptions;
|
52
57
|
/**
|
53
58
|
* Destroys a session.
|
54
|
-
* @param session
|
59
|
+
* @param session - the session to destroy.
|
55
60
|
*/
|
56
61
|
private destroySession;
|
57
62
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/node-http-handler",
|
3
|
-
"version": "
|
3
|
+
"version": "4.0.0",
|
4
4
|
"description": "Provides a way to make requests",
|
5
5
|
"scripts": {
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
@@ -26,21 +26,21 @@
|
|
26
26
|
"module": "./dist-es/index.js",
|
27
27
|
"types": "./dist-types/index.d.ts",
|
28
28
|
"dependencies": {
|
29
|
-
"@smithy/abort-controller": "^
|
30
|
-
"@smithy/protocol-http": "^
|
31
|
-
"@smithy/querystring-builder": "^
|
32
|
-
"@smithy/types": "^
|
29
|
+
"@smithy/abort-controller": "^4.0.0",
|
30
|
+
"@smithy/protocol-http": "^5.0.0",
|
31
|
+
"@smithy/querystring-builder": "^4.0.0",
|
32
|
+
"@smithy/types": "^4.0.0",
|
33
33
|
"tslib": "^2.6.2"
|
34
34
|
},
|
35
35
|
"devDependencies": {
|
36
|
-
"@types/node": "^
|
36
|
+
"@types/node": "^18.11.9",
|
37
37
|
"concurrently": "7.0.0",
|
38
38
|
"downlevel-dts": "0.10.1",
|
39
39
|
"rimraf": "3.0.2",
|
40
40
|
"typedoc": "0.23.23"
|
41
41
|
},
|
42
42
|
"engines": {
|
43
|
-
"node": ">=
|
43
|
+
"node": ">=18.0.0"
|
44
44
|
},
|
45
45
|
"typesVersions": {
|
46
46
|
"<4.0": {
|
@@ -30,9 +30,8 @@ __export(src_exports, {
|
|
30
30
|
module.exports = __toCommonJS(src_exports);
|
31
31
|
|
32
32
|
// src/ProviderError.ts
|
33
|
-
var
|
33
|
+
var ProviderError = class _ProviderError extends Error {
|
34
34
|
constructor(message, options = true) {
|
35
|
-
var _a;
|
36
35
|
let logger;
|
37
36
|
let tryNextLink = true;
|
38
37
|
if (typeof options === "boolean") {
|
@@ -46,7 +45,10 @@ var _ProviderError = class _ProviderError extends Error {
|
|
46
45
|
this.name = "ProviderError";
|
47
46
|
this.tryNextLink = tryNextLink;
|
48
47
|
Object.setPrototypeOf(this, _ProviderError.prototype);
|
49
|
-
|
48
|
+
logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
|
49
|
+
}
|
50
|
+
static {
|
51
|
+
__name(this, "ProviderError");
|
50
52
|
}
|
51
53
|
/**
|
52
54
|
* @deprecated use new operator.
|
@@ -55,11 +57,9 @@ var _ProviderError = class _ProviderError extends Error {
|
|
55
57
|
return Object.assign(new this(error.message, options), error);
|
56
58
|
}
|
57
59
|
};
|
58
|
-
__name(_ProviderError, "ProviderError");
|
59
|
-
var ProviderError = _ProviderError;
|
60
60
|
|
61
61
|
// src/CredentialsProviderError.ts
|
62
|
-
var
|
62
|
+
var CredentialsProviderError = class _CredentialsProviderError extends ProviderError {
|
63
63
|
/**
|
64
64
|
* @override
|
65
65
|
*/
|
@@ -68,12 +68,13 @@ var _CredentialsProviderError = class _CredentialsProviderError extends Provider
|
|
68
68
|
this.name = "CredentialsProviderError";
|
69
69
|
Object.setPrototypeOf(this, _CredentialsProviderError.prototype);
|
70
70
|
}
|
71
|
+
static {
|
72
|
+
__name(this, "CredentialsProviderError");
|
73
|
+
}
|
71
74
|
};
|
72
|
-
__name(_CredentialsProviderError, "CredentialsProviderError");
|
73
|
-
var CredentialsProviderError = _CredentialsProviderError;
|
74
75
|
|
75
76
|
// src/TokenProviderError.ts
|
76
|
-
var
|
77
|
+
var TokenProviderError = class _TokenProviderError extends ProviderError {
|
77
78
|
/**
|
78
79
|
* @override
|
79
80
|
*/
|
@@ -82,9 +83,10 @@ var _TokenProviderError = class _TokenProviderError extends ProviderError {
|
|
82
83
|
this.name = "TokenProviderError";
|
83
84
|
Object.setPrototypeOf(this, _TokenProviderError.prototype);
|
84
85
|
}
|
86
|
+
static {
|
87
|
+
__name(this, "TokenProviderError");
|
88
|
+
}
|
85
89
|
};
|
86
|
-
__name(_TokenProviderError, "TokenProviderError");
|
87
|
-
var TokenProviderError = _TokenProviderError;
|
88
90
|
|
89
91
|
// src/chain.ts
|
90
92
|
var chain = /* @__PURE__ */ __name((...providers) => async () => {
|
@@ -98,7 +100,7 @@ var chain = /* @__PURE__ */ __name((...providers) => async () => {
|
|
98
100
|
return credentials;
|
99
101
|
} catch (err) {
|
100
102
|
lastProviderError = err;
|
101
|
-
if (err
|
103
|
+
if (err?.tryNextLink) {
|
102
104
|
continue;
|
103
105
|
}
|
104
106
|
throw err;
|
@@ -131,14 +133,14 @@ var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {
|
|
131
133
|
}, "coalesceProvider");
|
132
134
|
if (isExpired === void 0) {
|
133
135
|
return async (options) => {
|
134
|
-
if (!hasResult ||
|
136
|
+
if (!hasResult || options?.forceRefresh) {
|
135
137
|
resolved = await coalesceProvider();
|
136
138
|
}
|
137
139
|
return resolved;
|
138
140
|
};
|
139
141
|
}
|
140
142
|
return async (options) => {
|
141
|
-
if (!hasResult ||
|
143
|
+
if (!hasResult || options?.forceRefresh) {
|
142
144
|
resolved = await coalesceProvider();
|
143
145
|
}
|
144
146
|
if (isConstant) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/property-provider",
|
3
|
-
"version": "
|
3
|
+
"version": "4.0.0",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "node ../../scripts/inline property-provider",
|
@@ -23,11 +23,11 @@
|
|
23
23
|
},
|
24
24
|
"license": "Apache-2.0",
|
25
25
|
"dependencies": {
|
26
|
-
"@smithy/types": "^
|
26
|
+
"@smithy/types": "^4.0.0",
|
27
27
|
"tslib": "^2.6.2"
|
28
28
|
},
|
29
29
|
"engines": {
|
30
|
-
"node": ">=
|
30
|
+
"node": ">=18.0.0"
|
31
31
|
},
|
32
32
|
"typesVersions": {
|
33
33
|
"<4.0": {
|
@@ -57,7 +57,10 @@ var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensi
|
|
57
57
|
|
58
58
|
// src/Field.ts
|
59
59
|
var import_types = require("@smithy/types");
|
60
|
-
var
|
60
|
+
var Field = class {
|
61
|
+
static {
|
62
|
+
__name(this, "Field");
|
63
|
+
}
|
61
64
|
constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {
|
62
65
|
this.name = name;
|
63
66
|
this.kind = kind;
|
@@ -104,16 +107,17 @@ var _Field = class _Field {
|
|
104
107
|
return this.values;
|
105
108
|
}
|
106
109
|
};
|
107
|
-
__name(_Field, "Field");
|
108
|
-
var Field = _Field;
|
109
110
|
|
110
111
|
// src/Fields.ts
|
111
|
-
var
|
112
|
+
var Fields = class {
|
112
113
|
constructor({ fields = [], encoding = "utf-8" }) {
|
113
114
|
this.entries = {};
|
114
115
|
fields.forEach(this.setField.bind(this));
|
115
116
|
this.encoding = encoding;
|
116
117
|
}
|
118
|
+
static {
|
119
|
+
__name(this, "Fields");
|
120
|
+
}
|
117
121
|
/**
|
118
122
|
* Set entry for a {@link Field} name. The `name`
|
119
123
|
* attribute will be used to key the collection.
|
@@ -153,12 +157,13 @@ var _Fields = class _Fields {
|
|
153
157
|
return Object.values(this.entries).filter((field) => field.kind === kind);
|
154
158
|
}
|
155
159
|
};
|
156
|
-
__name(_Fields, "Fields");
|
157
|
-
var Fields = _Fields;
|
158
160
|
|
159
161
|
// src/httpRequest.ts
|
160
162
|
|
161
|
-
var
|
163
|
+
var HttpRequest = class _HttpRequest {
|
164
|
+
static {
|
165
|
+
__name(this, "HttpRequest");
|
166
|
+
}
|
162
167
|
constructor(options) {
|
163
168
|
this.method = options.method || "GET";
|
164
169
|
this.hostname = options.hostname || "localhost";
|
@@ -208,8 +213,6 @@ var _HttpRequest = class _HttpRequest {
|
|
208
213
|
return _HttpRequest.clone(this);
|
209
214
|
}
|
210
215
|
};
|
211
|
-
__name(_HttpRequest, "HttpRequest");
|
212
|
-
var HttpRequest = _HttpRequest;
|
213
216
|
function cloneQuery(query) {
|
214
217
|
return Object.keys(query).reduce((carry, paramName) => {
|
215
218
|
const param = query[paramName];
|
@@ -222,7 +225,10 @@ function cloneQuery(query) {
|
|
222
225
|
__name(cloneQuery, "cloneQuery");
|
223
226
|
|
224
227
|
// src/httpResponse.ts
|
225
|
-
var
|
228
|
+
var HttpResponse = class {
|
229
|
+
static {
|
230
|
+
__name(this, "HttpResponse");
|
231
|
+
}
|
226
232
|
constructor(options) {
|
227
233
|
this.statusCode = options.statusCode;
|
228
234
|
this.reason = options.reason;
|
@@ -236,8 +242,6 @@ var _HttpResponse = class _HttpResponse {
|
|
236
242
|
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
|
237
243
|
}
|
238
244
|
};
|
239
|
-
__name(_HttpResponse, "HttpResponse");
|
240
|
-
var HttpResponse = _HttpResponse;
|
241
245
|
|
242
246
|
// src/isValidHostname.ts
|
243
247
|
function isValidHostname(hostname) {
|