@psnext/slingcli 3.5.20261019-1 → 3.6.20261105-1
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/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +38 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +7 -7
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +51 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
- package/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +914 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +13 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +51 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +263 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +135 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +204 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +38 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +4 -2
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHandlingMiddleware.js +2 -1
- package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHeaderMiddleware.js +2 -1
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-websocket/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +10 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +8 -39
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +914 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +13 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +51 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +263 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +135 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +204 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +38 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +56 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- package/node_modules/@babel/runtime/helpers/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +1 -1
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/LICENSE +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/index.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/range.js +577 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/major.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/index.js +93 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/internal/re.js +223 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/package.json +78 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/preload.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/range.bnf +17 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/@hono/node-server/dist/index.cjs +31 -6
- package/node_modules/@hono/node-server/dist/index.mjs +31 -6
- package/node_modules/@hono/node-server/package.json +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts +8 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +10 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts +8 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +45 -53
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +52 -19
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +91 -58
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +53 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +57 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +12 -37
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +17 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +12 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +6 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +8 -31
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -8
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +17 -8
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +10 -4
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +6 -2
- package/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +4 -2
- package/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts +12 -1
- package/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts +12 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +3 -3
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +6 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/zlib.d.ts +752 -0
- package/node_modules/body-parser/README.md +17 -13
- package/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/body-parser/package.json +7 -12
- package/node_modules/bowser/README.md +26 -3
- package/node_modules/bowser/bowser.mjs +2225 -0
- package/node_modules/bowser/bundled.js +14 -1
- package/node_modules/bowser/es5.js +14 -1
- package/node_modules/bowser/index.d.mts +45 -0
- package/node_modules/bowser/package.json +90 -31
- package/node_modules/bowser/src/bowser.js +9 -1
- package/node_modules/bowser/src/constants.js +7 -0
- package/node_modules/bowser/src/parser-browsers.js +73 -7
- package/node_modules/bowser/src/parser-engines.js +12 -0
- package/node_modules/bowser/src/parser-os.js +3 -1
- package/node_modules/bowser/src/parser-platforms.js +3 -1
- package/node_modules/bowser/src/parser.js +22 -5
- package/node_modules/bowser/src/utils.js +16 -0
- package/node_modules/encodeurl/README.md +14 -0
- package/node_modules/encodeurl/index.js +5 -10
- package/node_modules/encodeurl/package.json +10 -6
- package/node_modules/express-rate-limit/dist/index.cjs +7 -3
- package/node_modules/express-rate-limit/dist/index.mjs +7 -3
- package/node_modules/express-rate-limit/package.json +10 -10
- package/node_modules/hono/README.md +2 -3
- package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
- package/node_modules/hono/dist/cjs/context.js +1 -1
- package/node_modules/hono/dist/cjs/helper/css/common.js +11 -8
- package/node_modules/hono/dist/cjs/helper/css/index.js +1 -1
- package/node_modules/hono/dist/cjs/helper/route/index.js +3 -1
- package/node_modules/hono/dist/cjs/hono-base.js +4 -10
- package/node_modules/hono/dist/cjs/hono.js +0 -1
- package/node_modules/hono/dist/cjs/jsx/base.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +9 -1
- package/node_modules/hono/dist/cjs/middleware/csrf/index.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/mount/index.js +4 -4
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +3 -1
- package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +13 -11
- package/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +4 -4
- package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +39 -51
- package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +15 -5
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +2 -2
- package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +2 -1
- package/node_modules/hono/dist/cjs/utils/mount.js +35 -0
- package/node_modules/hono/dist/cjs/utils/url.js +21 -6
- package/node_modules/hono/dist/cjs/validator/validator.js +1 -1
- package/node_modules/hono/dist/context.js +1 -1
- package/node_modules/hono/dist/helper/css/common.js +11 -8
- package/node_modules/hono/dist/helper/css/index.js +1 -1
- package/node_modules/hono/dist/helper/route/index.js +3 -1
- package/node_modules/hono/dist/hono-base.js +4 -10
- package/node_modules/hono/dist/hono.js +0 -1
- package/node_modules/hono/dist/jsx/base.js +1 -1
- package/node_modules/hono/dist/middleware/basic-auth/index.js +1 -1
- package/node_modules/hono/dist/middleware/bearer-auth/index.js +9 -1
- package/node_modules/hono/dist/middleware/csrf/index.js +2 -2
- package/node_modules/hono/dist/middleware/jwk/jwk.js +2 -2
- package/node_modules/hono/dist/middleware/jwt/jwt.js +2 -2
- package/node_modules/hono/dist/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/middleware/mount/index.js +4 -4
- package/node_modules/hono/dist/middleware/serve-static/index.js +3 -1
- package/node_modules/hono/dist/router/reg-exp-router/node.js +13 -11
- package/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +5 -5
- package/node_modules/hono/dist/router/reg-exp-router/router.js +40 -52
- package/node_modules/hono/dist/router/reg-exp-router/trie.js +15 -5
- package/node_modules/hono/dist/router/trie-router/node.js +2 -2
- package/node_modules/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/netlify/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +1 -1
- package/node_modules/hono/dist/types/helper/testing/index.d.ts +2 -1
- package/node_modules/hono/dist/types/hono-base.d.ts +21 -9
- package/node_modules/hono/dist/types/index.d.ts +1 -1
- package/node_modules/hono/dist/types/jsx/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/context.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/css.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/streaming.d.ts +4 -3
- package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +3 -3
- package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +3 -3
- package/node_modules/hono/dist/types/middleware/mount/index.d.ts +1 -0
- package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -3
- package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/ipaddr.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/mount.d.ts +4 -0
- package/node_modules/hono/dist/types/utils/url.d.ts +1 -0
- package/node_modules/hono/dist/utils/jwt/jwt.js +2 -1
- package/node_modules/hono/dist/utils/mount.js +34 -0
- package/node_modules/hono/dist/utils/url.js +21 -7
- package/node_modules/hono/dist/validator/validator.js +1 -1
- package/node_modules/hono/package.json +1 -1
- package/node_modules/ip-address/README.md +39 -39
- package/node_modules/ip-address/dist/common.js +2 -2
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.js +1 -1
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -2
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +3 -0
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -0
- package/node_modules/jose/dist/types/jwt/verify.d.ts +3 -0
- package/node_modules/jose/dist/types/types.d.ts +8 -0
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -0
- package/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
- package/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/on-finished/index.js +14 -2
- package/node_modules/on-finished/package.json +11 -7
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/CHANGELOG.md +87 -22
- package/node_modules/qs/README.md +63 -10
- package/node_modules/qs/dist/qs.js +17 -17
- package/node_modules/qs/eslint.config.mjs +61 -50
- package/node_modules/qs/lib/formats.js +7 -2
- package/node_modules/qs/lib/parse.js +29 -10
- package/node_modules/qs/lib/stringify.js +5 -3
- package/node_modules/qs/lib/utils.js +28 -9
- package/node_modules/qs/package.json +6 -6
- package/node_modules/qs/test/parse.js +335 -2
- package/node_modules/qs/test/stringify.js +222 -0
- package/node_modules/qs/test/utils.js +61 -3
- package/node_modules/semver/classes/range.js +2 -2
- package/node_modules/semver/internal/constants.js +30 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/tslib/README.md +3 -8
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.d.ts +4 -2
- package/node_modules/tslib/tslib.es6.js +10 -1
- package/node_modules/tslib/tslib.es6.mjs +10 -1
- package/node_modules/tslib/tslib.js +10 -1
- package/node_modules/ws/README.md +21 -29
- package/node_modules/ws/lib/buffer-util.js +13 -2
- package/node_modules/ws/lib/sender.js +4 -1
- package/node_modules/ws/lib/websocket.js +8 -3
- package/node_modules/ws/package.json +1 -1
- package/package.json +14 -14
- package/sling-default-packages.json +3 -2
- package/slingshot/index.js +2 -2
- package/node_modules/on-finished/HISTORY.md +0 -98
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
- /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
- /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
|
@@ -0,0 +1,914 @@
|
|
|
1
|
+
const { hasOwn } = require("@smithy/core/serde");
|
|
2
|
+
const { streamCollector } = require("@smithy/core/serde");
|
|
3
|
+
exports.streamCollector = streamCollector;
|
|
4
|
+
const { buildQueryString, HttpResponse } = require("@smithy/core/protocols");
|
|
5
|
+
const node_https = require("node:https");
|
|
6
|
+
const { Readable } = require("node:stream");
|
|
7
|
+
const http2 = require("node:http2");
|
|
8
|
+
|
|
9
|
+
function buildAbortError(abortSignal) {
|
|
10
|
+
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
|
|
11
|
+
? abortSignal.reason
|
|
12
|
+
: undefined;
|
|
13
|
+
if (reason) {
|
|
14
|
+
if (reason instanceof Error) {
|
|
15
|
+
const abortError = new Error("Request aborted");
|
|
16
|
+
abortError.name = "AbortError";
|
|
17
|
+
abortError.cause = reason;
|
|
18
|
+
return abortError;
|
|
19
|
+
}
|
|
20
|
+
const abortError = new Error(String(reason));
|
|
21
|
+
abortError.name = "AbortError";
|
|
22
|
+
return abortError;
|
|
23
|
+
}
|
|
24
|
+
const abortError = new Error("Request aborted");
|
|
25
|
+
abortError.name = "AbortError";
|
|
26
|
+
return abortError;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
|
|
30
|
+
|
|
31
|
+
const getTransformedHeaders = (headers) => {
|
|
32
|
+
const transformedHeaders = {};
|
|
33
|
+
for (const name in headers) {
|
|
34
|
+
if (!hasOwn(headers, name)) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const headerValues = headers[name];
|
|
38
|
+
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
|
|
39
|
+
}
|
|
40
|
+
return transformedHeaders;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const timing = {
|
|
44
|
+
setTimeout: (cb, ms) => setTimeout(cb, ms),
|
|
45
|
+
clearTimeout: (timeoutId) => clearTimeout(timeoutId),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const DEFER_EVENT_LISTENER_TIME$2 = 1000;
|
|
49
|
+
const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
|
|
50
|
+
if (!timeoutInMs) {
|
|
51
|
+
return -1;
|
|
52
|
+
}
|
|
53
|
+
const registerTimeout = (offset) => {
|
|
54
|
+
const timeoutId = timing.setTimeout(() => {
|
|
55
|
+
request.destroy();
|
|
56
|
+
reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
|
|
57
|
+
name: "TimeoutError",
|
|
58
|
+
}));
|
|
59
|
+
}, timeoutInMs - offset);
|
|
60
|
+
const doWithSocket = (socket) => {
|
|
61
|
+
if (socket?.connecting) {
|
|
62
|
+
socket.on("connect", () => {
|
|
63
|
+
timing.clearTimeout(timeoutId);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
timing.clearTimeout(timeoutId);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
if (request.socket) {
|
|
71
|
+
doWithSocket(request.socket);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
request.on("socket", doWithSocket);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
if (timeoutInMs < 2000) {
|
|
78
|
+
registerTimeout(0);
|
|
79
|
+
return 0;
|
|
80
|
+
}
|
|
81
|
+
return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {
|
|
85
|
+
if (timeoutInMs) {
|
|
86
|
+
return timing.setTimeout(() => {
|
|
87
|
+
let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
|
|
88
|
+
if (throwOnRequestTimeout) {
|
|
89
|
+
const error = Object.assign(new Error(msg), {
|
|
90
|
+
name: "TimeoutError",
|
|
91
|
+
code: "ETIMEDOUT",
|
|
92
|
+
});
|
|
93
|
+
req.destroy(error);
|
|
94
|
+
reject(error);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
|
|
98
|
+
logger?.warn?.(msg);
|
|
99
|
+
}
|
|
100
|
+
}, timeoutInMs);
|
|
101
|
+
}
|
|
102
|
+
return -1;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const DEFER_EVENT_LISTENER_TIME$1 = 3000;
|
|
106
|
+
const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
|
|
107
|
+
if (keepAlive !== true) {
|
|
108
|
+
return -1;
|
|
109
|
+
}
|
|
110
|
+
const registerListener = () => {
|
|
111
|
+
if (request.socket) {
|
|
112
|
+
request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
request.on("socket", (socket) => {
|
|
116
|
+
socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
if (deferTimeMs === 0) {
|
|
121
|
+
registerListener();
|
|
122
|
+
return 0;
|
|
123
|
+
}
|
|
124
|
+
return timing.setTimeout(registerListener, deferTimeMs);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const resolveDefaultSocketTimeout = (config) => {
|
|
128
|
+
const value = config?.defaultSocketTimeout;
|
|
129
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : undefined;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const DEFER_EVENT_LISTENER_TIME = 3000;
|
|
133
|
+
const setSocketTimeout = (request, reject, timeoutInMs = 0, isServiceDefault = false) => {
|
|
134
|
+
if (!Number.isFinite(timeoutInMs) || timeoutInMs <= 0) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
let response;
|
|
138
|
+
request.once("response", (res) => (response = res));
|
|
139
|
+
const onTimeout = () => {
|
|
140
|
+
if (response?.complete) {
|
|
141
|
+
request.socket?.destroy();
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const error = Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (${isServiceDefault ? "service default socket timeout" : "configured by client requestHandler"}).`), { name: "TimeoutError" });
|
|
145
|
+
response?.destroy(error);
|
|
146
|
+
request.destroy();
|
|
147
|
+
reject(error);
|
|
148
|
+
};
|
|
149
|
+
const registerTimeout = () => {
|
|
150
|
+
const { socket } = request;
|
|
151
|
+
if (!socket) {
|
|
152
|
+
request.once("socket", registerTimeout);
|
|
153
|
+
}
|
|
154
|
+
else if (socket.connecting) {
|
|
155
|
+
socket.once("connect", registerTimeout);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
socket.setTimeout(timeoutInMs, onTimeout);
|
|
159
|
+
request.on("close", () => socket.removeListener("timeout", onTimeout));
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
if (timeoutInMs < 6000) {
|
|
163
|
+
registerTimeout();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const deferralId = timing.setTimeout(registerTimeout, DEFER_EVENT_LISTENER_TIME);
|
|
167
|
+
request.once("close", () => timing.clearTimeout(deferralId));
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const MIN_WAIT_TIME = 6_000;
|
|
171
|
+
async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
|
|
172
|
+
const headers = request.headers;
|
|
173
|
+
const expect = headers ? headers.Expect || headers.expect : undefined;
|
|
174
|
+
let timeoutId = -1;
|
|
175
|
+
let sendBody = true;
|
|
176
|
+
if (!externalAgent && expect === "100-continue") {
|
|
177
|
+
sendBody = await Promise.race([
|
|
178
|
+
new Promise((resolve) => {
|
|
179
|
+
timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
180
|
+
}),
|
|
181
|
+
new Promise((resolve) => {
|
|
182
|
+
httpRequest.on("continue", () => {
|
|
183
|
+
timing.clearTimeout(timeoutId);
|
|
184
|
+
resolve(true);
|
|
185
|
+
});
|
|
186
|
+
httpRequest.on("response", () => {
|
|
187
|
+
timing.clearTimeout(timeoutId);
|
|
188
|
+
resolve(false);
|
|
189
|
+
});
|
|
190
|
+
httpRequest.on("error", () => {
|
|
191
|
+
timing.clearTimeout(timeoutId);
|
|
192
|
+
resolve(false);
|
|
193
|
+
});
|
|
194
|
+
}),
|
|
195
|
+
]);
|
|
196
|
+
}
|
|
197
|
+
if (sendBody) {
|
|
198
|
+
writeBody(httpRequest, request.body);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function writeBody(httpRequest, body) {
|
|
202
|
+
if (body instanceof Readable) {
|
|
203
|
+
body.pipe(httpRequest);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (body) {
|
|
207
|
+
const isBuffer = Buffer.isBuffer(body);
|
|
208
|
+
const isString = typeof body === "string";
|
|
209
|
+
if (isBuffer || isString) {
|
|
210
|
+
if (isBuffer && body.byteLength === 0) {
|
|
211
|
+
httpRequest.end();
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
httpRequest.end(body);
|
|
215
|
+
}
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const uint8 = body;
|
|
219
|
+
if (typeof uint8 === "object" &&
|
|
220
|
+
uint8.buffer &&
|
|
221
|
+
typeof uint8.byteOffset === "number" &&
|
|
222
|
+
typeof uint8.byteLength === "number") {
|
|
223
|
+
httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
httpRequest.end(Buffer.from(body));
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
httpRequest.end();
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const DEFAULT_REQUEST_TIMEOUT = 0;
|
|
233
|
+
let hAgent = undefined;
|
|
234
|
+
let hRequest = undefined;
|
|
235
|
+
class NodeHttpHandler {
|
|
236
|
+
config;
|
|
237
|
+
configProvider;
|
|
238
|
+
socketWarningTimestamp = 0;
|
|
239
|
+
externalAgent = false;
|
|
240
|
+
metadata = { handlerProtocol: "http/1.1" };
|
|
241
|
+
static create(instanceOrOptions) {
|
|
242
|
+
if (typeof instanceOrOptions?.handle === "function") {
|
|
243
|
+
return instanceOrOptions;
|
|
244
|
+
}
|
|
245
|
+
return new NodeHttpHandler(instanceOrOptions);
|
|
246
|
+
}
|
|
247
|
+
static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {
|
|
248
|
+
const { sockets, requests, maxSockets } = agent;
|
|
249
|
+
if (typeof maxSockets !== "number" || maxSockets === Infinity) {
|
|
250
|
+
return socketWarningTimestamp;
|
|
251
|
+
}
|
|
252
|
+
const interval = 15_000;
|
|
253
|
+
if (Date.now() - interval < socketWarningTimestamp) {
|
|
254
|
+
return socketWarningTimestamp;
|
|
255
|
+
}
|
|
256
|
+
if (sockets && requests) {
|
|
257
|
+
for (const origin in sockets) {
|
|
258
|
+
if (!hasOwn(sockets, origin)) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
const socketsInUse = sockets[origin]?.length ?? 0;
|
|
262
|
+
const requestsEnqueued = requests[origin]?.length ?? 0;
|
|
263
|
+
if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
|
|
264
|
+
logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
|
|
265
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
266
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
|
|
267
|
+
return Date.now();
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return socketWarningTimestamp;
|
|
272
|
+
}
|
|
273
|
+
constructor(options) {
|
|
274
|
+
this.configProvider = new Promise((resolve, reject) => {
|
|
275
|
+
if (typeof options === "function") {
|
|
276
|
+
options()
|
|
277
|
+
.then((_options) => {
|
|
278
|
+
resolve(this.resolveDefaultConfig(_options));
|
|
279
|
+
})
|
|
280
|
+
.catch(reject);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
resolve(this.resolveDefaultConfig(options));
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
destroy() {
|
|
288
|
+
this.config?.httpAgent?.destroy();
|
|
289
|
+
this.config?.httpsAgent?.destroy();
|
|
290
|
+
}
|
|
291
|
+
async handle(request, { abortSignal, requestTimeout } = {}) {
|
|
292
|
+
if (!this.config) {
|
|
293
|
+
this.config = await this.configProvider;
|
|
294
|
+
}
|
|
295
|
+
const config = this.config;
|
|
296
|
+
const logger = config.logger;
|
|
297
|
+
const isSSL = request.protocol === "https:";
|
|
298
|
+
if (!isSSL && !this.config.httpAgent) {
|
|
299
|
+
this.config.httpAgent = await this.config.httpAgentProvider();
|
|
300
|
+
}
|
|
301
|
+
return new Promise((_resolve, _reject) => {
|
|
302
|
+
let writeRequestBodyPromise = undefined;
|
|
303
|
+
let socketWarningTimeoutId = -1;
|
|
304
|
+
let connectionTimeoutId = -1;
|
|
305
|
+
let requestTimeoutId = -1;
|
|
306
|
+
let keepAliveTimeoutId = -1;
|
|
307
|
+
const clearTimeouts = () => {
|
|
308
|
+
timing.clearTimeout(socketWarningTimeoutId);
|
|
309
|
+
timing.clearTimeout(connectionTimeoutId);
|
|
310
|
+
timing.clearTimeout(requestTimeoutId);
|
|
311
|
+
timing.clearTimeout(keepAliveTimeoutId);
|
|
312
|
+
};
|
|
313
|
+
const resolve = async (arg) => {
|
|
314
|
+
await writeRequestBodyPromise;
|
|
315
|
+
clearTimeouts();
|
|
316
|
+
_resolve(arg);
|
|
317
|
+
};
|
|
318
|
+
const reject = async (arg) => {
|
|
319
|
+
await writeRequestBodyPromise;
|
|
320
|
+
clearTimeouts();
|
|
321
|
+
_reject(arg);
|
|
322
|
+
};
|
|
323
|
+
if (abortSignal?.aborted) {
|
|
324
|
+
const abortError = buildAbortError(abortSignal);
|
|
325
|
+
reject(abortError);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
const headers = request.headers;
|
|
329
|
+
const expectContinue = headers ? (headers.Expect ?? headers.expect) === "100-continue" : false;
|
|
330
|
+
let agent = isSSL ? config.httpsAgent : config.httpAgent;
|
|
331
|
+
if (expectContinue && !this.externalAgent) {
|
|
332
|
+
agent = new (isSSL ? node_https.Agent : hAgent)({
|
|
333
|
+
keepAlive: false,
|
|
334
|
+
maxSockets: Infinity,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
socketWarningTimeoutId = timing.setTimeout(() => {
|
|
338
|
+
this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, logger);
|
|
339
|
+
}, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));
|
|
340
|
+
const queryString = request.query ? buildQueryString(request.query) : "";
|
|
341
|
+
let auth = undefined;
|
|
342
|
+
if (request.username != null || request.password != null) {
|
|
343
|
+
const username = request.username ?? "";
|
|
344
|
+
const password = request.password ?? "";
|
|
345
|
+
auth = `${username}:${password}`;
|
|
346
|
+
}
|
|
347
|
+
let path = request.path;
|
|
348
|
+
if (queryString) {
|
|
349
|
+
path += `?${queryString}`;
|
|
350
|
+
}
|
|
351
|
+
if (request.fragment) {
|
|
352
|
+
path += `#${request.fragment}`;
|
|
353
|
+
}
|
|
354
|
+
let hostname = request.hostname ?? "";
|
|
355
|
+
if (hostname[0] === "[" && hostname.endsWith("]")) {
|
|
356
|
+
hostname = request.hostname.slice(1, -1);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
hostname = request.hostname;
|
|
360
|
+
}
|
|
361
|
+
const nodeHttpsOptions = {
|
|
362
|
+
headers: request.headers,
|
|
363
|
+
host: hostname,
|
|
364
|
+
method: request.method,
|
|
365
|
+
path,
|
|
366
|
+
port: request.port,
|
|
367
|
+
agent,
|
|
368
|
+
auth,
|
|
369
|
+
};
|
|
370
|
+
const requestFunc = isSSL ? node_https.request : hRequest;
|
|
371
|
+
const req = requestFunc(nodeHttpsOptions, (res) => {
|
|
372
|
+
const httpResponse = new HttpResponse({
|
|
373
|
+
statusCode: res.statusCode || -1,
|
|
374
|
+
reason: res.statusMessage,
|
|
375
|
+
headers: getTransformedHeaders(res.headers),
|
|
376
|
+
body: res,
|
|
377
|
+
});
|
|
378
|
+
resolve({ response: httpResponse });
|
|
379
|
+
});
|
|
380
|
+
req.on("error", (err) => {
|
|
381
|
+
if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
|
|
382
|
+
reject(Object.assign(err, { name: "TimeoutError" }));
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
reject(err);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
if (abortSignal) {
|
|
389
|
+
const onAbort = () => {
|
|
390
|
+
req.destroy();
|
|
391
|
+
const abortError = buildAbortError(abortSignal);
|
|
392
|
+
reject(abortError);
|
|
393
|
+
};
|
|
394
|
+
if (typeof abortSignal.addEventListener === "function") {
|
|
395
|
+
const signal = abortSignal;
|
|
396
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
397
|
+
req.once("close", () => signal.removeEventListener("abort", onAbort));
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
abortSignal.onabort = onAbort;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
|
|
404
|
+
connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
|
|
405
|
+
requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, logger ?? console);
|
|
406
|
+
const defaultSocketTimeout = config.socketTimeout === undefined ? resolveDefaultSocketTimeout(config) : undefined;
|
|
407
|
+
if (defaultSocketTimeout) {
|
|
408
|
+
setSocketTimeout(req, reject, defaultSocketTimeout, true);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
setSocketTimeout(req, reject, config.socketTimeout);
|
|
412
|
+
}
|
|
413
|
+
const httpAgent = nodeHttpsOptions.agent;
|
|
414
|
+
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
|
|
415
|
+
keepAliveTimeoutId = setSocketKeepAlive(req, {
|
|
416
|
+
keepAlive: httpAgent.keepAlive,
|
|
417
|
+
keepAliveMsecs: httpAgent.keepAliveMsecs,
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {
|
|
421
|
+
clearTimeouts();
|
|
422
|
+
return _reject(e);
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
updateHttpClientConfig(key, value) {
|
|
427
|
+
this.config = undefined;
|
|
428
|
+
this.configProvider = this.configProvider.then((config) => {
|
|
429
|
+
switch (key) {
|
|
430
|
+
case Symbol.for("logger"):
|
|
431
|
+
key = "logger";
|
|
432
|
+
value = config.logger ?? value;
|
|
433
|
+
break;
|
|
434
|
+
case Symbol.for("@smithy/defaultSocketTimeout"):
|
|
435
|
+
key = "defaultSocketTimeout";
|
|
436
|
+
value = resolveDefaultSocketTimeout(config) ?? value;
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
return {
|
|
440
|
+
...config,
|
|
441
|
+
[key]: value,
|
|
442
|
+
};
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
httpHandlerConfigs() {
|
|
446
|
+
return this.config ?? {};
|
|
447
|
+
}
|
|
448
|
+
resolveDefaultConfig(options) {
|
|
449
|
+
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};
|
|
450
|
+
const keepAlive = true;
|
|
451
|
+
const maxSockets = 50;
|
|
452
|
+
let httpAgentPromise;
|
|
453
|
+
return {
|
|
454
|
+
connectionTimeout,
|
|
455
|
+
requestTimeout,
|
|
456
|
+
socketTimeout,
|
|
457
|
+
defaultSocketTimeout: resolveDefaultSocketTimeout(options),
|
|
458
|
+
socketAcquisitionWarningTimeout,
|
|
459
|
+
throwOnRequestTimeout,
|
|
460
|
+
httpAgentProvider: () => (httpAgentPromise ??= (async () => {
|
|
461
|
+
const node_http = require('node:http');
|
|
462
|
+
const { Agent, request } = node_http.default ?? node_http;
|
|
463
|
+
hRequest = request;
|
|
464
|
+
hAgent = Agent;
|
|
465
|
+
if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
|
|
466
|
+
this.externalAgent = true;
|
|
467
|
+
return httpAgent;
|
|
468
|
+
}
|
|
469
|
+
return new hAgent({ keepAlive, maxSockets, ...httpAgent });
|
|
470
|
+
})()),
|
|
471
|
+
httpsAgent: (() => {
|
|
472
|
+
if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
|
|
473
|
+
this.externalAgent = true;
|
|
474
|
+
return httpsAgent;
|
|
475
|
+
}
|
|
476
|
+
return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
|
|
477
|
+
})(),
|
|
478
|
+
logger,
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const ids = new Uint16Array(1);
|
|
484
|
+
class ClientHttp2SessionRef {
|
|
485
|
+
id = ids[0]++;
|
|
486
|
+
total = 0;
|
|
487
|
+
max = 0;
|
|
488
|
+
session;
|
|
489
|
+
refs = 0;
|
|
490
|
+
constructor(session) {
|
|
491
|
+
session.unref();
|
|
492
|
+
this.session = session;
|
|
493
|
+
}
|
|
494
|
+
retain() {
|
|
495
|
+
if (this.session.destroyed) {
|
|
496
|
+
throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");
|
|
497
|
+
}
|
|
498
|
+
this.refs += 1;
|
|
499
|
+
this.total += 1;
|
|
500
|
+
this.max = Math.max(this.refs, this.max);
|
|
501
|
+
this.session.ref();
|
|
502
|
+
}
|
|
503
|
+
free() {
|
|
504
|
+
if (this.session.destroyed) {
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
this.refs -= 1;
|
|
508
|
+
if (this.refs === 0) {
|
|
509
|
+
this.session.unref();
|
|
510
|
+
}
|
|
511
|
+
if (this.refs < 0) {
|
|
512
|
+
throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.");
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
deref() {
|
|
516
|
+
return this.session;
|
|
517
|
+
}
|
|
518
|
+
close() {
|
|
519
|
+
if (!this.session.closed) {
|
|
520
|
+
this.session.close();
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
destroy() {
|
|
524
|
+
this.refs = 0;
|
|
525
|
+
if (!this.session.destroyed) {
|
|
526
|
+
this.session.setTimeout(0);
|
|
527
|
+
this.session.destroy();
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
useCount() {
|
|
531
|
+
return this.refs;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
class NodeHttp2ConnectionPool {
|
|
536
|
+
sessions = [];
|
|
537
|
+
maxConcurrency = 0;
|
|
538
|
+
constructor(sessions) {
|
|
539
|
+
this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));
|
|
540
|
+
}
|
|
541
|
+
poll() {
|
|
542
|
+
let cleanup = false;
|
|
543
|
+
for (const session of this.sessions) {
|
|
544
|
+
if (session.deref().destroyed) {
|
|
545
|
+
cleanup = true;
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {
|
|
549
|
+
return session;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
if (cleanup) {
|
|
553
|
+
for (const session of this.sessions) {
|
|
554
|
+
if (session.deref().destroyed) {
|
|
555
|
+
this.remove(session);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
offerLast(ref) {
|
|
561
|
+
this.sessions.push(ref);
|
|
562
|
+
}
|
|
563
|
+
remove(ref) {
|
|
564
|
+
const ix = this.sessions.indexOf(ref);
|
|
565
|
+
if (ix > -1) {
|
|
566
|
+
this.sessions.splice(ix, 1);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
[Symbol.iterator]() {
|
|
570
|
+
return this.sessions[Symbol.iterator]();
|
|
571
|
+
}
|
|
572
|
+
setMaxConcurrency(maxConcurrency) {
|
|
573
|
+
this.maxConcurrency = maxConcurrency;
|
|
574
|
+
}
|
|
575
|
+
destroy(ref) {
|
|
576
|
+
this.remove(ref);
|
|
577
|
+
ref.destroy();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
class NodeHttp2ConnectionManager {
|
|
582
|
+
config;
|
|
583
|
+
connectOptions;
|
|
584
|
+
connectionPools = new Map();
|
|
585
|
+
constructor(config) {
|
|
586
|
+
this.config = config;
|
|
587
|
+
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
|
|
588
|
+
throw new RangeError("maxConcurrency must be greater than zero.");
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
lease(requestContext, connectionConfiguration) {
|
|
592
|
+
const url = this.getUrlString(requestContext);
|
|
593
|
+
const pool = this.getPool(url);
|
|
594
|
+
if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {
|
|
595
|
+
const available = pool.poll();
|
|
596
|
+
if (available) {
|
|
597
|
+
available.retain();
|
|
598
|
+
return available;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
const ref = new ClientHttp2SessionRef(this.connect(url));
|
|
602
|
+
const session = ref.deref();
|
|
603
|
+
if (this.config.maxConcurrency) {
|
|
604
|
+
session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
|
|
605
|
+
if (err) {
|
|
606
|
+
throw new Error("Fail to set maxConcurrentStreams to " +
|
|
607
|
+
this.config.maxConcurrency +
|
|
608
|
+
"when creating new session for " +
|
|
609
|
+
requestContext.destination.toString());
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
const graceful = () => {
|
|
614
|
+
this.removeFromPoolAndClose(url, ref);
|
|
615
|
+
};
|
|
616
|
+
const ensureDestroyed = () => {
|
|
617
|
+
this.removeFromPoolAndCheckedDestroy(url, ref);
|
|
618
|
+
};
|
|
619
|
+
session.on("goaway", graceful);
|
|
620
|
+
session.on("error", ensureDestroyed);
|
|
621
|
+
session.on("frameError", ensureDestroyed);
|
|
622
|
+
session.on("close", ensureDestroyed);
|
|
623
|
+
if (connectionConfiguration.requestTimeout) {
|
|
624
|
+
session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
|
|
625
|
+
}
|
|
626
|
+
pool.offerLast(ref);
|
|
627
|
+
ref.retain();
|
|
628
|
+
return ref;
|
|
629
|
+
}
|
|
630
|
+
release(_requestContext, ref) {
|
|
631
|
+
ref.free();
|
|
632
|
+
}
|
|
633
|
+
createIsolatedSession(requestContext, connectionConfiguration) {
|
|
634
|
+
const url = this.getUrlString(requestContext);
|
|
635
|
+
const ref = new ClientHttp2SessionRef(this.connect(url));
|
|
636
|
+
const session = ref.deref();
|
|
637
|
+
session.settings({ maxConcurrentStreams: 1 });
|
|
638
|
+
const ensureDestroyed = () => {
|
|
639
|
+
ref.destroy();
|
|
640
|
+
};
|
|
641
|
+
session.on("error", ensureDestroyed);
|
|
642
|
+
session.on("frameError", ensureDestroyed);
|
|
643
|
+
session.on("close", ensureDestroyed);
|
|
644
|
+
const timeout = connectionConfiguration.requestTimeout ?? 300_000;
|
|
645
|
+
session.setTimeout(timeout, ensureDestroyed);
|
|
646
|
+
ref.retain();
|
|
647
|
+
return ref;
|
|
648
|
+
}
|
|
649
|
+
destroy() {
|
|
650
|
+
for (const [url, connectionPool] of this.connectionPools) {
|
|
651
|
+
for (const session of [...connectionPool]) {
|
|
652
|
+
session.destroy();
|
|
653
|
+
}
|
|
654
|
+
this.connectionPools.delete(url);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
setMaxConcurrentStreams(maxConcurrentStreams) {
|
|
658
|
+
if (maxConcurrentStreams && maxConcurrentStreams <= 0) {
|
|
659
|
+
throw new RangeError("maxConcurrentStreams must be greater than zero.");
|
|
660
|
+
}
|
|
661
|
+
this.config.maxConcurrency = maxConcurrentStreams;
|
|
662
|
+
for (const pool of this.connectionPools.values()) {
|
|
663
|
+
pool.setMaxConcurrency(maxConcurrentStreams);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
setDisableConcurrentStreams(disableConcurrentStreams) {
|
|
667
|
+
this.config.disableConcurrency = disableConcurrentStreams;
|
|
668
|
+
}
|
|
669
|
+
setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) {
|
|
670
|
+
this.connectOptions = nodeHttp2ConnectOptions;
|
|
671
|
+
}
|
|
672
|
+
debug() {
|
|
673
|
+
const pools = {};
|
|
674
|
+
for (const [url, pool] of this.connectionPools) {
|
|
675
|
+
const sessions = [];
|
|
676
|
+
for (const ref of pool) {
|
|
677
|
+
sessions.push({
|
|
678
|
+
id: ref.id,
|
|
679
|
+
active: ref.useCount(),
|
|
680
|
+
maxConcurrent: ref.max,
|
|
681
|
+
totalRequests: ref.total,
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
pools[url] = { sessions };
|
|
685
|
+
}
|
|
686
|
+
return pools;
|
|
687
|
+
}
|
|
688
|
+
removeFromPoolAndClose(authority, ref) {
|
|
689
|
+
this.connectionPools.get(authority)?.remove(ref);
|
|
690
|
+
ref.close();
|
|
691
|
+
}
|
|
692
|
+
removeFromPoolAndCheckedDestroy(authority, ref) {
|
|
693
|
+
this.connectionPools.get(authority)?.remove(ref);
|
|
694
|
+
ref.destroy();
|
|
695
|
+
}
|
|
696
|
+
getPool(url) {
|
|
697
|
+
if (!this.connectionPools.has(url)) {
|
|
698
|
+
const pool = new NodeHttp2ConnectionPool();
|
|
699
|
+
if (this.config.maxConcurrency) {
|
|
700
|
+
pool.setMaxConcurrency(this.config.maxConcurrency);
|
|
701
|
+
}
|
|
702
|
+
this.connectionPools.set(url, pool);
|
|
703
|
+
}
|
|
704
|
+
return this.connectionPools.get(url);
|
|
705
|
+
}
|
|
706
|
+
getUrlString(request) {
|
|
707
|
+
return request.destination.toString();
|
|
708
|
+
}
|
|
709
|
+
connect(url) {
|
|
710
|
+
return this.connectOptions === undefined ? http2.connect(url) : http2.connect(url, this.connectOptions);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
const { constants } = http2;
|
|
715
|
+
class NodeHttp2Handler {
|
|
716
|
+
config;
|
|
717
|
+
configProvider;
|
|
718
|
+
metadata = { handlerProtocol: "h2" };
|
|
719
|
+
connectionManager = new NodeHttp2ConnectionManager({});
|
|
720
|
+
static create(instanceOrOptions) {
|
|
721
|
+
if (typeof instanceOrOptions?.handle === "function") {
|
|
722
|
+
return instanceOrOptions;
|
|
723
|
+
}
|
|
724
|
+
return new NodeHttp2Handler(instanceOrOptions);
|
|
725
|
+
}
|
|
726
|
+
constructor(options) {
|
|
727
|
+
this.configProvider = new Promise((resolve, reject) => {
|
|
728
|
+
if (typeof options === "function") {
|
|
729
|
+
options()
|
|
730
|
+
.then((opts) => {
|
|
731
|
+
resolve(opts || {});
|
|
732
|
+
})
|
|
733
|
+
.catch(reject);
|
|
734
|
+
}
|
|
735
|
+
else {
|
|
736
|
+
resolve(options || {});
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
destroy() {
|
|
741
|
+
this.connectionManager.destroy();
|
|
742
|
+
}
|
|
743
|
+
async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {
|
|
744
|
+
if (!this.config) {
|
|
745
|
+
const config = await this.configProvider;
|
|
746
|
+
this.config = { ...config, defaultSocketTimeout: resolveDefaultSocketTimeout(config) };
|
|
747
|
+
const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;
|
|
748
|
+
this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);
|
|
749
|
+
if (maxConcurrentStreams) {
|
|
750
|
+
this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);
|
|
751
|
+
}
|
|
752
|
+
if (nodeHttp2ConnectOptions) {
|
|
753
|
+
this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
const { requestTimeout: configRequestTimeout, disableConcurrentStreams, sessionTimeout } = this.config;
|
|
757
|
+
const useIsolatedSession = disableConcurrentStreams || isEventStream;
|
|
758
|
+
const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
|
|
759
|
+
const defaultSocketTimeout = effectiveRequestTimeout === undefined && sessionTimeout === undefined
|
|
760
|
+
? this.config.defaultSocketTimeout
|
|
761
|
+
: undefined;
|
|
762
|
+
return new Promise((_resolve, _reject) => {
|
|
763
|
+
let fulfilled = false;
|
|
764
|
+
let writeRequestBodyPromise = undefined;
|
|
765
|
+
const resolve = async (arg) => {
|
|
766
|
+
await writeRequestBodyPromise;
|
|
767
|
+
_resolve(arg);
|
|
768
|
+
};
|
|
769
|
+
const reject = async (arg) => {
|
|
770
|
+
await writeRequestBodyPromise;
|
|
771
|
+
_reject(arg);
|
|
772
|
+
};
|
|
773
|
+
if (abortSignal?.aborted) {
|
|
774
|
+
fulfilled = true;
|
|
775
|
+
const abortError = buildAbortError(abortSignal);
|
|
776
|
+
reject(abortError);
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
const { hostname, method, port, protocol, query } = request;
|
|
780
|
+
let auth = "";
|
|
781
|
+
if (request.username != null || request.password != null) {
|
|
782
|
+
const username = request.username ?? "";
|
|
783
|
+
const password = request.password ?? "";
|
|
784
|
+
auth = `${username}:${password}@`;
|
|
785
|
+
}
|
|
786
|
+
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
|
|
787
|
+
const requestContext = { destination: new URL(authority) };
|
|
788
|
+
const connectConfig = {
|
|
789
|
+
requestTimeout: this.config?.sessionTimeout,
|
|
790
|
+
isEventStream,
|
|
791
|
+
};
|
|
792
|
+
const ref = useIsolatedSession
|
|
793
|
+
? this.connectionManager.createIsolatedSession(requestContext, connectConfig)
|
|
794
|
+
: this.connectionManager.lease(requestContext, connectConfig);
|
|
795
|
+
const session = ref.deref();
|
|
796
|
+
const rejectWithDestroy = (err) => {
|
|
797
|
+
if (useIsolatedSession) {
|
|
798
|
+
ref.destroy();
|
|
799
|
+
}
|
|
800
|
+
fulfilled = true;
|
|
801
|
+
reject(err);
|
|
802
|
+
};
|
|
803
|
+
const queryString = query ? buildQueryString(query) : "";
|
|
804
|
+
let path = request.path;
|
|
805
|
+
if (queryString) {
|
|
806
|
+
path += `?${queryString}`;
|
|
807
|
+
}
|
|
808
|
+
if (request.fragment) {
|
|
809
|
+
path += `#${request.fragment}`;
|
|
810
|
+
}
|
|
811
|
+
const clientHttp2Stream = session.request({
|
|
812
|
+
...request.headers,
|
|
813
|
+
[constants.HTTP2_HEADER_PATH]: path,
|
|
814
|
+
[constants.HTTP2_HEADER_METHOD]: method,
|
|
815
|
+
});
|
|
816
|
+
if (effectiveRequestTimeout) {
|
|
817
|
+
clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {
|
|
818
|
+
clientHttp2Stream.close();
|
|
819
|
+
const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
|
|
820
|
+
timeoutError.name = "TimeoutError";
|
|
821
|
+
rejectWithDestroy(timeoutError);
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
else if (defaultSocketTimeout) {
|
|
825
|
+
clientHttp2Stream.setTimeout(defaultSocketTimeout, () => {
|
|
826
|
+
const timeoutError = new Error(`Stream timed out because of no activity for ${defaultSocketTimeout} ms`);
|
|
827
|
+
timeoutError.name = "TimeoutError";
|
|
828
|
+
fulfilled = true;
|
|
829
|
+
reject(timeoutError);
|
|
830
|
+
clientHttp2Stream.destroy(timeoutError);
|
|
831
|
+
if (useIsolatedSession) {
|
|
832
|
+
ref.destroy();
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
clientHttp2Stream.once("response", () => clientHttp2Stream.setTimeout(defaultSocketTimeout));
|
|
836
|
+
}
|
|
837
|
+
if (abortSignal) {
|
|
838
|
+
const onAbort = () => {
|
|
839
|
+
clientHttp2Stream.close();
|
|
840
|
+
const abortError = buildAbortError(abortSignal);
|
|
841
|
+
rejectWithDestroy(abortError);
|
|
842
|
+
};
|
|
843
|
+
if (typeof abortSignal.addEventListener === "function") {
|
|
844
|
+
const signal = abortSignal;
|
|
845
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
846
|
+
clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort));
|
|
847
|
+
}
|
|
848
|
+
else {
|
|
849
|
+
abortSignal.onabort = onAbort;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
clientHttp2Stream.on("frameError", (type, code, id) => {
|
|
853
|
+
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
|
|
854
|
+
});
|
|
855
|
+
clientHttp2Stream.on("error", rejectWithDestroy);
|
|
856
|
+
clientHttp2Stream.on("aborted", () => {
|
|
857
|
+
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
|
|
858
|
+
});
|
|
859
|
+
clientHttp2Stream.on("response", (headers) => {
|
|
860
|
+
const httpResponse = new HttpResponse({
|
|
861
|
+
statusCode: headers[":status"] ?? -1,
|
|
862
|
+
headers: getTransformedHeaders(headers),
|
|
863
|
+
body: clientHttp2Stream,
|
|
864
|
+
});
|
|
865
|
+
fulfilled = true;
|
|
866
|
+
resolve({ response: httpResponse });
|
|
867
|
+
if (useIsolatedSession) {
|
|
868
|
+
session.close();
|
|
869
|
+
clientHttp2Stream.on("end", () => {
|
|
870
|
+
ref.destroy();
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
clientHttp2Stream.on("close", () => {
|
|
875
|
+
if (useIsolatedSession) {
|
|
876
|
+
ref.destroy();
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
this.connectionManager.release(requestContext, ref);
|
|
880
|
+
}
|
|
881
|
+
if (!fulfilled) {
|
|
882
|
+
const error = new Error("Unexpected error: http2 request did not get a response");
|
|
883
|
+
if (session.destroyed) {
|
|
884
|
+
error.name = "TimeoutError";
|
|
885
|
+
}
|
|
886
|
+
rejectWithDestroy(error);
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
updateHttpClientConfig(key, value) {
|
|
893
|
+
this.config = undefined;
|
|
894
|
+
this.configProvider = this.configProvider.then((config) => {
|
|
895
|
+
switch (key) {
|
|
896
|
+
case Symbol.for("@smithy/defaultSocketTimeout"):
|
|
897
|
+
key = "defaultSocketTimeout";
|
|
898
|
+
value = resolveDefaultSocketTimeout(config) ?? value;
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
901
|
+
return {
|
|
902
|
+
...config,
|
|
903
|
+
[key]: value,
|
|
904
|
+
};
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
httpHandlerConfigs() {
|
|
908
|
+
return this.config ?? {};
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
|
|
913
|
+
exports.NodeHttp2Handler = NodeHttp2Handler;
|
|
914
|
+
exports.NodeHttpHandler = NodeHttpHandler;
|