@psnext/slingcli 3.5.20261007-3 → 3.5.20261026-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.
Files changed (453) hide show
  1. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +12 -3
  2. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
  3. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +12 -3
  4. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
  5. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
  6. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
  7. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -8
  8. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  9. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  10. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  11. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  12. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -10
  13. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  14. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  15. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  16. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  17. package/node_modules/@aws-sdk/core/package.json +4 -4
  18. package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
  19. package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
  20. package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
  21. package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
  22. package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
  23. package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
  24. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
  25. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
  26. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +5 -5
  27. package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
  28. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
  29. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +3 -3
  30. package/node_modules/@aws-sdk/middleware-eventstream/package.json +3 -3
  31. package/node_modules/@aws-sdk/middleware-websocket/package.json +5 -5
  32. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +11 -1
  33. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +6 -1
  34. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +6 -1
  35. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +13 -1
  36. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +9 -1
  37. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +1 -0
  38. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/errors.js +9 -0
  39. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js +1 -0
  40. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js +4 -0
  41. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js +1 -0
  42. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js +4 -0
  43. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +1 -0
  44. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js +11 -0
  45. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +1 -0
  46. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +7 -0
  47. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
  48. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
  49. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/errors.d.ts +9 -0
  50. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +2 -1
  51. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/SigninServiceException.d.ts +1 -0
  52. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +4 -0
  53. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
  54. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/SSOServiceException.d.ts +1 -0
  55. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/errors.d.ts +4 -0
  56. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
  57. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
  58. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +11 -0
  59. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +2 -1
  60. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/STSServiceException.d.ts +1 -0
  61. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +7 -0
  62. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
  63. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +9 -0
  64. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +1 -0
  65. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/errors.d.ts +4 -0
  66. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +1 -0
  67. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/errors.d.ts +4 -0
  68. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
  69. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +11 -0
  70. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +1 -0
  71. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +7 -0
  72. package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
  73. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
  74. package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +3 -0
  75. package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +3 -0
  76. package/node_modules/@aws-sdk/types/package.json +1 -1
  77. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +2 -0
  78. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +21 -86
  79. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +3 -103
  80. package/node_modules/@earendil-works/pi-codemode/package.json +1 -1
  81. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-TFS67BSI.js → chunk-23QDZLZG.js} +20 -14
  82. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-IB6ONE3U.js → chunk-QPFSTNX5.js} +1 -1
  83. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{virtual-modules-P5ROWYIG.js → virtual-modules-GRXGP6ZA.js} +1 -1
  84. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
  85. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  86. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  87. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Agent.md +8 -8
  88. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  89. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +11 -6
  90. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
  91. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Dispatcher.md +12 -0
  92. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Errors.md +101 -1
  93. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Fetch.md +10 -0
  94. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  95. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +17 -9
  96. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Pool.md +5 -6
  97. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  98. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/index.md +22 -13
  99. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/type-map.json +66 -66
  100. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +1 -2
  101. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  102. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  103. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +10 -4
  104. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/constants.js +12 -1
  105. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/errors.js +38 -1
  106. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/request.js +39 -3
  107. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +2 -0
  108. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/util.js +26 -40
  109. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +6 -2
  110. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +127 -84
  111. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +97 -21
  112. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +10 -2
  113. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  114. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  115. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
  116. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  117. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool-base.js +117 -19
  118. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool.js +99 -13
  119. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +34 -11
  120. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  121. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  122. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +153 -15
  123. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +126 -52
  124. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +31 -6
  125. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +116 -24
  126. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +15 -4
  127. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +253 -73
  128. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +11 -0
  129. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/response-error.js +72 -28
  130. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/LICENSE.md +7 -0
  131. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/no-simd.js +1002 -0
  132. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/simd.js +1002 -0
  133. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +11 -0
  134. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  135. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  136. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +11 -5
  137. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cache.js +17 -8
  138. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
  139. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/index.js +19 -7
  140. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/util.js +21 -2
  141. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  142. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +50 -3
  143. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/body.js +69 -53
  144. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/data-url.js +6 -6
  145. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  146. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata.js +30 -36
  147. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/headers.js +36 -33
  148. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +54 -29
  149. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +74 -79
  150. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/response.js +43 -44
  151. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +7 -7
  152. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/infra/index.js +16 -1
  153. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  154. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +2 -14
  155. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +33 -12
  156. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/events.js +43 -26
  157. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/receiver.js +27 -4
  158. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
  159. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
  160. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +44 -41
  161. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +7 -5
  162. package/node_modules/@earendil-works/pi-coding-agent/package.json +2 -2
  163. package/node_modules/@hono/node-server/README.md +2 -0
  164. package/node_modules/@hono/node-server/dist/index.cjs +1 -1
  165. package/node_modules/@hono/node-server/dist/index.mjs +1 -1
  166. package/node_modules/@hono/node-server/dist/serve-static.cjs +2 -1
  167. package/node_modules/@hono/node-server/dist/serve-static.mjs +2 -1
  168. package/node_modules/@hono/node-server/package.json +2 -2
  169. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts.map +1 -1
  170. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js +10 -0
  171. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js.map +1 -1
  172. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts +8 -8
  173. package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts.map +1 -1
  174. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts.map +1 -1
  175. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +10 -0
  176. package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -1
  177. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts +8 -8
  178. package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts.map +1 -1
  179. package/node_modules/@modelcontextprotocol/sdk/package.json +1 -1
  180. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +15 -2
  181. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
  182. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -1
  183. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -0
  184. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -0
  185. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1695 -3
  186. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +16 -2
  187. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js +2 -1
  188. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +10 -0
  189. package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
  190. package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
  191. package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
  192. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +8 -0
  193. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +102 -0
  194. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +8 -1
  195. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +8 -1
  196. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +13 -2
  197. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +16 -6
  198. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
  199. package/node_modules/@smithy/core/dist-es/submodules/protocols/writeKey.js +3 -0
  200. package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  201. package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
  202. package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
  203. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +9 -0
  204. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
  205. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
  206. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
  207. package/node_modules/@smithy/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
  208. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  209. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
  210. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
  211. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +9 -0
  212. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
  213. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
  214. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
  215. package/node_modules/{@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json → @smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +7 -4
  216. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
  217. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
  218. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
  219. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
  220. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
  221. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
  222. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
  223. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
  224. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
  225. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
  226. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
  227. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
  228. package/node_modules/@smithy/core/package.json +2 -1
  229. package/node_modules/@types/node/README.md +1 -1
  230. package/node_modules/@types/node/package.json +2 -2
  231. package/node_modules/@types/node/util.d.ts +6 -3
  232. package/node_modules/body-parser/README.md +17 -13
  233. package/node_modules/body-parser/lib/read.js +74 -57
  234. package/node_modules/body-parser/lib/types/json.js +11 -11
  235. package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
  236. package/node_modules/body-parser/lib/utils.js +0 -15
  237. package/node_modules/body-parser/package.json +7 -12
  238. package/node_modules/content-disposition/README.md +105 -35
  239. package/node_modules/content-disposition/dist/index.d.ts +72 -0
  240. package/node_modules/content-disposition/dist/index.js +388 -0
  241. package/node_modules/content-disposition/dist/index.js.map +1 -0
  242. package/node_modules/content-disposition/package.json +31 -19
  243. package/node_modules/express/Readme.md +15 -9
  244. package/node_modules/express/lib/application.js +2 -2
  245. package/node_modules/express/lib/request.js +32 -19
  246. package/node_modules/express/lib/response.js +27 -30
  247. package/node_modules/express/node_modules/content-type/LICENSE +22 -0
  248. package/node_modules/express/node_modules/content-type/README.md +71 -0
  249. package/node_modules/express/node_modules/content-type/dist/index.d.ts +46 -0
  250. package/node_modules/express/node_modules/content-type/dist/index.js +176 -0
  251. package/node_modules/express/node_modules/content-type/dist/index.js.map +1 -0
  252. package/node_modules/express/node_modules/content-type/package.json +52 -0
  253. package/node_modules/express/package.json +10 -10
  254. package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
  255. package/node_modules/fast-uri/README.md +8 -0
  256. package/node_modules/fast-uri/index.js +98 -18
  257. package/node_modules/fast-uri/lib/utils.js +52 -0
  258. package/node_modules/fast-uri/package.json +1 -1
  259. package/node_modules/fast-uri/test/host-delimiter-security.test.js +94 -0
  260. package/node_modules/fast-uri/test/relative-normalization-security.test.js +156 -0
  261. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +32 -4
  262. package/node_modules/fast-uri/test/scheme-validation.test.js +53 -14
  263. package/node_modules/hono/README.md +2 -3
  264. package/node_modules/hono/dist/cjs/helper/css/common.js +8 -3
  265. package/node_modules/hono/dist/cjs/helper/css/index.js +1 -1
  266. package/node_modules/hono/dist/cjs/helper/route/index.js +3 -1
  267. package/node_modules/hono/dist/cjs/jsx/base.js +1 -1
  268. package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +8 -0
  269. package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +3 -1
  270. package/node_modules/hono/dist/cjs/router/trie-router/node.js +2 -2
  271. package/node_modules/hono/dist/cjs/utils/url.js +11 -6
  272. package/node_modules/hono/dist/helper/css/common.js +8 -3
  273. package/node_modules/hono/dist/helper/css/index.js +1 -1
  274. package/node_modules/hono/dist/helper/route/index.js +3 -1
  275. package/node_modules/hono/dist/jsx/base.js +1 -1
  276. package/node_modules/hono/dist/middleware/bearer-auth/index.js +8 -0
  277. package/node_modules/hono/dist/middleware/serve-static/index.js +3 -1
  278. package/node_modules/hono/dist/router/trie-router/node.js +2 -2
  279. package/node_modules/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +1 -1
  280. package/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +1 -1
  281. package/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +1 -1
  282. package/node_modules/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +1 -1
  283. package/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +1 -1
  284. package/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +1 -1
  285. package/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +1 -1
  286. package/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +1 -1
  287. package/node_modules/hono/dist/types/adapter/netlify/conninfo.d.ts +1 -1
  288. package/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +1 -1
  289. package/node_modules/hono/dist/types/helper/testing/index.d.ts +2 -1
  290. package/node_modules/hono/dist/types/hono-base.d.ts +21 -9
  291. package/node_modules/hono/dist/types/index.d.ts +1 -1
  292. package/node_modules/hono/dist/types/jsx/components.d.ts +2 -2
  293. package/node_modules/hono/dist/types/jsx/context.d.ts +2 -2
  294. package/node_modules/hono/dist/types/jsx/dom/components.d.ts +2 -2
  295. package/node_modules/hono/dist/types/jsx/dom/css.d.ts +2 -2
  296. package/node_modules/hono/dist/types/jsx/streaming.d.ts +4 -3
  297. package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +2 -1
  298. package/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +3 -3
  299. package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +3 -3
  300. package/node_modules/hono/dist/types/utils/ipaddr.d.ts +1 -1
  301. package/node_modules/hono/dist/utils/url.js +11 -6
  302. package/node_modules/hono/package.json +1 -1
  303. package/node_modules/ip-address/README.md +70 -70
  304. package/node_modules/ip-address/dist/common.js +2 -2
  305. package/node_modules/ip-address/dist/common.js.map +1 -1
  306. package/node_modules/ip-address/dist/ipv6.js +7 -4
  307. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  308. package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
  309. package/node_modules/ip-address/dist/v6/constants.js +3 -0
  310. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  311. package/node_modules/ip-address/package.json +3 -2
  312. package/node_modules/jose/README.md +2 -2
  313. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +5 -4
  314. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +4 -4
  315. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +5 -4
  316. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +5 -5
  317. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +5 -4
  318. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +5 -5
  319. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +5 -4
  320. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +5 -5
  321. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -4
  322. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +6 -5
  323. package/node_modules/jose/dist/types/jws/general/sign.d.ts +9 -6
  324. package/node_modules/jose/dist/types/jws/general/verify.d.ts +7 -5
  325. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +7 -6
  326. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +1 -1
  327. package/node_modules/jose/dist/types/jwt/sign.d.ts +1 -1
  328. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +1 -1
  329. package/node_modules/jose/dist/types/jwt/verify.d.ts +3 -5
  330. package/node_modules/jose/dist/types/key/export.d.ts +1 -1
  331. package/node_modules/jose/dist/types/key/generate_secret.d.ts +1 -1
  332. package/node_modules/jose/dist/types/key/import.d.ts +2 -2
  333. package/node_modules/jose/dist/types/types.d.ts +165 -107
  334. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +2 -2
  335. package/node_modules/jose/dist/types/util/errors.d.ts +1 -1
  336. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +3 -3
  337. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +8 -8
  338. package/node_modules/jose/dist/webapi/jwks/local.js +2 -1
  339. package/node_modules/jose/dist/webapi/jwks/remote.js +4 -4
  340. package/node_modules/jose/dist/webapi/jws/general/sign.js +3 -3
  341. package/node_modules/jose/dist/webapi/jws/general/verify.js +3 -3
  342. package/node_modules/jose/dist/webapi/jwt/encrypt.js +2 -2
  343. package/node_modules/jose/dist/webapi/jwt/sign.js +2 -2
  344. package/node_modules/jose/dist/webapi/jwt/unsecured.js +3 -3
  345. package/node_modules/jose/dist/webapi/key/generate_secret.js +4 -4
  346. package/node_modules/jose/dist/webapi/lib/asn1.js +2 -2
  347. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +4 -4
  348. package/node_modules/jose/dist/webapi/lib/content_encryption.js +8 -8
  349. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +14 -14
  350. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +3 -3
  351. package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +2 -2
  352. package/node_modules/jose/dist/webapi/lib/jws_sign.js +11 -11
  353. package/node_modules/jose/dist/webapi/lib/jws_verify.js +19 -16
  354. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +44 -43
  355. package/node_modules/jose/dist/webapi/lib/key.js +4 -4
  356. package/node_modules/jose/dist/webapi/lib/key_management.js +17 -17
  357. package/node_modules/jose/dist/webapi/lib/validate.js +10 -10
  358. package/node_modules/jose/dist/webapi/util/decode_jwt.js +12 -12
  359. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -5
  360. package/node_modules/jose/package.json +1 -1
  361. package/node_modules/on-finished/index.js +14 -2
  362. package/node_modules/on-finished/package.json +11 -7
  363. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  364. package/node_modules/qs/CHANGELOG.md +38 -14
  365. package/node_modules/qs/README.md +31 -3
  366. package/node_modules/qs/dist/qs.js +20 -20
  367. package/node_modules/qs/lib/parse.js +94 -4
  368. package/node_modules/qs/lib/stringify.js +4 -4
  369. package/node_modules/qs/lib/utils.js +130 -6
  370. package/node_modules/qs/package.json +4 -4
  371. package/node_modules/qs/test/parse.js +174 -0
  372. package/node_modules/qs/test/stringify.js +263 -33
  373. package/node_modules/qs/test/utils.js +184 -0
  374. package/node_modules/undici/docs/docs/api/Client.md +2 -0
  375. package/node_modules/undici/lib/core/connect.js +10 -4
  376. package/node_modules/undici/lib/core/symbols.js +1 -0
  377. package/node_modules/undici/lib/dispatcher/agent.js +6 -2
  378. package/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
  379. package/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
  380. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  381. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
  382. package/node_modules/undici/lib/handler/cache-handler.js +48 -0
  383. package/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
  384. package/node_modules/undici/lib/handler/redirect-handler.js +8 -1
  385. package/node_modules/undici/lib/interceptor/decompress.js +15 -5
  386. package/node_modules/undici/lib/web/cookies/index.js +3 -1
  387. package/node_modules/undici/lib/web/cookies/parse.js +138 -137
  388. package/node_modules/undici/lib/web/cookies/util.js +21 -2
  389. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
  390. package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  391. package/node_modules/undici/lib/web/fetch/index.js +3 -3
  392. package/node_modules/undici/lib/web/infra/index.js +14 -0
  393. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  394. package/node_modules/undici/lib/web/websocket/receiver.js +13 -0
  395. package/node_modules/undici/package.json +1 -1
  396. package/node_modules/undici/types/client.d.ts +14 -0
  397. package/node_modules/zod/package.json +1 -1
  398. package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  399. package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  400. package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  401. package/node_modules/zod/src/v4/core/compile.ts +9 -0
  402. package/node_modules/zod/src/v4/core/schemas.ts +35 -1
  403. package/node_modules/zod/src/v4/core/util.ts +13 -0
  404. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  405. package/node_modules/zod/v4/core/compile.cjs +8 -0
  406. package/node_modules/zod/v4/core/compile.js +8 -0
  407. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  408. package/node_modules/zod/v4/core/schemas.d.cts +3 -1
  409. package/node_modules/zod/v4/core/schemas.d.ts +3 -1
  410. package/node_modules/zod/v4/core/schemas.js +30 -0
  411. package/node_modules/zod/v4/core/util.cjs +15 -0
  412. package/node_modules/zod/v4/core/util.d.cts +2 -0
  413. package/node_modules/zod/v4/core/util.d.ts +2 -0
  414. package/node_modules/zod/v4/core/util.js +14 -0
  415. package/node_modules/zod/v4/core/versions.cjs +1 -1
  416. package/node_modules/zod/v4/core/versions.js +1 -1
  417. package/package.json +5 -4
  418. package/sling-default-packages.json +3 -2
  419. package/slingshot/index.js +124 -124
  420. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
  421. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
  422. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
  423. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
  424. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
  425. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
  426. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
  427. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
  428. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
  429. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
  430. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
  431. package/node_modules/content-disposition/index.js +0 -536
  432. package/node_modules/on-finished/HISTORY.md +0 -98
  433. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
  434. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
  435. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
  436. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
  437. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
  438. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
  439. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
  440. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
  441. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
  442. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
  443. /package/node_modules/{@aws-sdk/core/dist-types/submodules/protocols/json → @smithy/core/dist-types/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +0 -0
  444. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
  445. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
  446. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
  447. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
  448. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
  449. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
  450. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
  451. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
  452. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
  453. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
@@ -13,10 +13,32 @@ const kOnDrain = Symbol('onDrain')
13
13
  const kOnConnect = Symbol('onConnect')
14
14
  const kOnDisconnect = Symbol('onDisconnect')
15
15
  const kOnConnectionError = Symbol('onConnectionError')
16
+ const kOnClientBusy = Symbol('on client busy')
17
+ const kOnClientDrain = Symbol('on client drain')
18
+ const kDrainQueue = Symbol('drain queue')
16
19
  const kGetDispatcher = Symbol('get dispatcher')
17
20
  const kHasDispatcher = Symbol('has dispatcher')
18
21
  const kAddClient = Symbol('add client')
19
22
  const kRemoveClient = Symbol('remove client')
23
+ const kRetireClient = Symbol('retire client')
24
+ const kRetiring = Symbol('retiring clients')
25
+
26
+ // Closes every live client, including clients that have been
27
+ // taken out of rotation but are still finishing their own
28
+ // requests.
29
+ function closeClients (pool) {
30
+ const closeAll = []
31
+ for (let i = 0; i < pool[kClients].length; i++) {
32
+ const client = pool[kClients][i]
33
+ if (!client.destroyed) {
34
+ closeAll.push(client.close())
35
+ }
36
+ }
37
+ for (const closed of pool[kRetiring].values()) {
38
+ closeAll.push(closed)
39
+ }
40
+ return Promise.all(closeAll)
41
+ }
20
42
 
21
43
  class PoolBase extends DispatcherBase {
22
44
  [kQueue] = new FixedQueue();
@@ -25,13 +47,22 @@ class PoolBase extends DispatcherBase {
25
47
 
26
48
  [kClients] = [];
27
49
 
50
+ // Clients removed from kClients that have not finished closing,
51
+ // mapped to a promise that settles once they have.
52
+ [kRetiring] = new Map();
53
+
28
54
  [kNeedDrain] = false;
29
55
 
30
56
  [kOnDrain] (client, origin, targets) {
31
- const queue = this[kQueue]
57
+ if (client.closed || client.destroyed) {
58
+ return
59
+ }
32
60
 
61
+ const queue = this[kQueue]
33
62
  let needDrain = false
34
63
 
64
+ this[kOnClientDrain](client)
65
+
35
66
  while (!needDrain) {
36
67
  const item = queue.shift()
37
68
  if (!item) {
@@ -42,6 +73,18 @@ class PoolBase extends DispatcherBase {
42
73
  }
43
74
 
44
75
  client[kNeedDrain] = needDrain
76
+ if (needDrain) {
77
+ this[kOnClientBusy](client)
78
+
79
+ // This client is full but requests are still queued, e.g. an h2
80
+ // client that has just released everything queued while ALPN was
81
+ // negotiated and hit maxConcurrentStreams. Hand the rest to other
82
+ // clients, creating new ones up to the connection limit, instead of
83
+ // leaving them for this client to drain one batch at a time.
84
+ if (!queue.isEmpty()) {
85
+ return this[kDrainQueue](origin, targets)
86
+ }
87
+ }
45
88
 
46
89
  if (!needDrain && this[kNeedDrain]) {
47
90
  this[kNeedDrain] = false
@@ -49,15 +92,45 @@ class PoolBase extends DispatcherBase {
49
92
  }
50
93
 
51
94
  if (this[kClosedResolve] && queue.isEmpty()) {
52
- const closeAll = []
53
- for (let i = 0; i < this[kClients].length; i++) {
54
- const client = this[kClients][i]
55
- if (!client.destroyed) {
56
- closeAll.push(client.close())
95
+ return closeClients(this).then(this[kClosedResolve])
96
+ }
97
+ }
98
+
99
+ [kOnClientBusy] () {}
100
+
101
+ [kOnClientDrain] () {}
102
+
103
+ [kDrainQueue] (origin, targets) {
104
+ const queue = this[kQueue]
105
+ let hasDispatcher = true
106
+
107
+ while (!queue.isEmpty()) {
108
+ const dispatcher = this[kGetDispatcher]()
109
+ if (!dispatcher) {
110
+ hasDispatcher = false
111
+ break
112
+ }
113
+
114
+ const item = queue.shift()
115
+ this[kQueued]--
116
+
117
+ if (!dispatcher.dispatch(item.opts, item.handler)) {
118
+ dispatcher[kNeedDrain] = true
119
+ this[kOnClientBusy](dispatcher)
120
+ hasDispatcher = this[kHasDispatcher]()
121
+ if (!hasDispatcher) {
122
+ break
57
123
  }
58
124
  }
59
- return Promise.all(closeAll)
60
- .then(this[kClosedResolve])
125
+ }
126
+
127
+ if (hasDispatcher && this[kNeedDrain]) {
128
+ this[kNeedDrain] = false
129
+ this.emit('drain', origin, [this, ...targets])
130
+ }
131
+
132
+ if (this[kClosedResolve] && queue.isEmpty()) {
133
+ return closeClients(this).then(this[kClosedResolve])
61
134
  }
62
135
  }
63
136
 
@@ -123,14 +196,7 @@ class PoolBase extends DispatcherBase {
123
196
 
124
197
  [kClose] () {
125
198
  if (this[kQueue].isEmpty()) {
126
- const closeAll = []
127
- for (let i = 0; i < this[kClients].length; i++) {
128
- const client = this[kClients][i]
129
- if (!client.destroyed) {
130
- closeAll.push(client.close())
131
- }
132
- }
133
- return Promise.all(closeAll)
199
+ return closeClients(this)
134
200
  } else {
135
201
  return new Promise((resolve) => {
136
202
  this[kClosedResolve] = resolve
@@ -151,6 +217,9 @@ class PoolBase extends DispatcherBase {
151
217
  for (let i = 0; i < this[kClients].length; i++) {
152
218
  destroyAll[i] = this[kClients][i].destroy(err)
153
219
  }
220
+ for (const client of this[kRetiring].keys()) {
221
+ destroyAll.push(client.destroy(err))
222
+ }
154
223
  return Promise.all(destroyAll)
155
224
  }
156
225
 
@@ -163,6 +232,7 @@ class PoolBase extends DispatcherBase {
163
232
  this[kQueued]++
164
233
  } else if (!dispatcher.dispatch(opts, handler)) {
165
234
  dispatcher[kNeedDrain] = true
235
+ this[kOnClientBusy](dispatcher)
166
236
  this[kNeedDrain] = !this[kHasDispatcher]()
167
237
  }
168
238
 
@@ -196,7 +266,7 @@ class PoolBase extends DispatcherBase {
196
266
 
197
267
  if (this[kNeedDrain]) {
198
268
  queueMicrotask(() => {
199
- if (this[kNeedDrain]) {
269
+ if (this[kNeedDrain] && !client[kNeedDrain]) {
200
270
  this[kOnDrain](client, client[kUrl], [client, this])
201
271
  }
202
272
  })
@@ -205,13 +275,37 @@ class PoolBase extends DispatcherBase {
205
275
  return this
206
276
  }
207
277
 
208
- [kRemoveClient] (client) {
278
+ // Takes a client out of rotation. A closed client no longer takes requests
279
+ // from the pool queue (see kOnDrain), but it finishes the requests it
280
+ // already has. Until it has, pool.close() waits for it and pool.destroy()
281
+ // destroys it.
282
+ [kRetireClient] (client) {
209
283
  const idx = this[kClients].indexOf(client)
210
284
  if (idx !== -1) {
211
285
  this[kClients].splice(idx, 1)
212
286
  }
213
287
 
214
- client.close(() => {})
288
+ if (client.destroyed || this[kRetiring].has(client)) {
289
+ return
290
+ }
291
+
292
+ // Use the callback form: custom dispatchers from `factory` are not
293
+ // required to return a promise, and may call back synchronously.
294
+ let done = false
295
+ let resolveClosed
296
+ const closed = new Promise((resolve) => { resolveClosed = resolve })
297
+ this[kRetiring].set(client, closed)
298
+ client.close(() => {
299
+ if (!done) {
300
+ done = true
301
+ this[kRetiring].delete(client)
302
+ resolveClosed()
303
+ }
304
+ })
305
+ }
306
+
307
+ [kRemoveClient] (client) {
308
+ this[kRetireClient](client)
215
309
 
216
310
  this[kNeedDrain] = !this[kClients].some(dispatcher => (
217
311
  !dispatcher[kNeedDrain] &&
@@ -227,6 +321,10 @@ module.exports = {
227
321
  kNeedDrain,
228
322
  kAddClient,
229
323
  kRemoveClient,
324
+ kRetireClient,
325
+ kDrainQueue,
326
+ kOnClientBusy,
327
+ kOnClientDrain,
230
328
  kGetDispatcher,
231
329
  kHasDispatcher
232
330
  }
@@ -5,26 +5,54 @@ const {
5
5
  kClients,
6
6
  kNeedDrain,
7
7
  kAddClient,
8
+ kDrainQueue,
9
+ kOnClientBusy,
10
+ kOnClientDrain,
8
11
  kGetDispatcher,
9
12
  kHasDispatcher,
10
- kRemoveClient
13
+ kRemoveClient,
14
+ kRetireClient
11
15
  } = require('./pool-base')
12
16
  const Client = require('./client')
13
17
  const {
14
18
  InvalidArgumentError
15
19
  } = require('../core/errors')
16
20
  const util = require('../core/util')
17
- const { kUrl } = require('../core/symbols')
21
+ const { kConnecting, kHTTPContext, kUrl, kQueued } = require('../core/symbols')
18
22
  const buildConnector = require('../core/connect')
19
23
 
20
24
  const kOptions = Symbol('options')
21
25
  const kConnections = Symbol('connections')
22
26
  const kFactory = Symbol('factory')
27
+ const kProtocol = Symbol('protocol')
28
+ const kProtocolProbe = Symbol('protocol probe')
23
29
 
24
30
  function defaultFactory (origin, opts) {
25
31
  return new Client(origin, opts)
26
32
  }
27
33
 
34
+ function shouldCreateProtocolProbe (pool, dispatcher) {
35
+ return dispatcher instanceof Client &&
36
+ pool[kProtocol] !== 'h1' &&
37
+ (pool[kOptions].useH2c === true || (pool[kUrl].protocol === 'https:' && pool[kOptions].allowH2 !== false))
38
+ }
39
+
40
+ function createClient (pool) {
41
+ const dispatcher = pool[kFactory](pool[kUrl], pool[kOptions])
42
+
43
+ // HTTPS does not reveal whether the peer selected h1 or h2 until ALPN
44
+ // completes. While h2 is still possible, let one Client probe the protocol
45
+ // and keep later requests in the Pool queue instead of opening one TLS
46
+ // connection per request. A confirmed h1 connection disables this gate and
47
+ // restores the usual Pool fan-out.
48
+ if (shouldCreateProtocolProbe(pool, dispatcher)) {
49
+ pool[kProtocolProbe] = dispatcher
50
+ }
51
+
52
+ pool[kAddClient](dispatcher)
53
+ return dispatcher
54
+ }
55
+
28
56
  class Pool extends PoolBase {
29
57
  constructor (origin, {
30
58
  connections,
@@ -72,6 +100,8 @@ class Pool extends PoolBase {
72
100
  this[kUrl] = util.parseOrigin(origin)
73
101
  this[kOptions] = { ...util.deepClone(options), connect, allowH2, useH2c, clientTtl, socketPath }
74
102
  this[kFactory] = factory
103
+ this[kProtocol] = null
104
+ this[kProtocolProbe] = null
75
105
 
76
106
  this.on('connect', (origin, targets) => {
77
107
  if (clientTtl != null && clientTtl > 0) {
@@ -79,23 +109,74 @@ class Pool extends PoolBase {
79
109
  Object.assign(target, { ttl: Date.now() })
80
110
  }
81
111
  }
112
+
113
+ const client = targets[targets.length - 1]
114
+ if (client instanceof Client) {
115
+ this[kProtocol] = client[kHTTPContext]?.version
116
+ }
117
+
118
+ if (client === this[kProtocolProbe]) {
119
+ // An h2 Client's drain event releases the requests accumulated during
120
+ // negotiation onto that Client. If ALPN selected h1, release the probe
121
+ // immediately and restore normal Pool fan-out instead.
122
+ if (this[kProtocol] !== 'h2') {
123
+ this[kProtocolProbe] = null
124
+ this[kDrainQueue](origin, targets.slice(1))
125
+ }
126
+ }
127
+ })
128
+
129
+ this.on('disconnect', (origin, targets) => {
130
+ if (targets.includes(this[kProtocolProbe])) {
131
+ this[kProtocolProbe] = null
132
+ this[kDrainQueue](origin, targets.slice(1))
133
+ }
82
134
  })
83
135
 
84
- this.on('connectionError', (origin, targets, error) => {
136
+ this.on('connectionError', (origin, targets) => {
137
+ let resumeQueued = false
138
+
85
139
  // If a connection error occurs, we remove the client from the pool,
86
140
  // and emit a connectionError event. They will not be re-used.
87
141
  // Fixes https://github.com/nodejs/undici/issues/3895
88
142
  for (const target of targets) {
89
- // Do not use kRemoveClient here, as it will close the client,
90
- // but the client cannot be closed in this state.
91
- const idx = this[kClients].indexOf(target)
92
- if (idx !== -1) {
93
- this[kClients].splice(idx, 1)
143
+ if (target === this[kProtocolProbe]) {
144
+ this[kProtocolProbe] = null
145
+ resumeQueued = true
146
+ }
147
+
148
+ // Retire (close) the client rather than only dropping it from
149
+ // kClients: otherwise its drain listener keeps pulling requests from
150
+ // the pool queue onto a client that pool.destroy() can't reach.
151
+ if (this[kClients].includes(target)) {
152
+ this[kRetireClient](target)
94
153
  }
95
154
  }
155
+
156
+ // The retired client no longer drains the pool queue, so hand any
157
+ // queued requests to another (possibly new) client.
158
+ if (resumeQueued || this[kQueued] > 0) {
159
+ this[kDrainQueue](origin, targets.slice(1))
160
+ }
96
161
  })
97
162
  }
98
163
 
164
+ [kOnClientBusy] (client) {
165
+ if (
166
+ this[kProtocolProbe] === null &&
167
+ client[kConnecting] &&
168
+ shouldCreateProtocolProbe(this, client)
169
+ ) {
170
+ this[kProtocolProbe] = client
171
+ }
172
+ }
173
+
174
+ [kOnClientDrain] (client) {
175
+ if (client === this[kProtocolProbe]) {
176
+ this[kProtocolProbe] = null
177
+ }
178
+ }
179
+
99
180
  [kGetDispatcher] () {
100
181
  const clientTtlOption = this[kOptions].clientTtl
101
182
  for (let i = 0; i < this[kClients].length; i++) {
@@ -110,10 +191,12 @@ class Pool extends PoolBase {
110
191
  }
111
192
  }
112
193
 
194
+ if (this[kProtocolProbe] !== null) {
195
+ return
196
+ }
197
+
113
198
  if (!this[kConnections] || this[kClients].length < this[kConnections]) {
114
- const dispatcher = this[kFactory](this[kUrl], this[kOptions])
115
- this[kAddClient](dispatcher)
116
- return dispatcher
199
+ return createClient(this)
117
200
  }
118
201
  }
119
202
 
@@ -130,9 +213,12 @@ class Pool extends PoolBase {
130
213
  }
131
214
  }
132
215
 
216
+ if (this[kProtocolProbe] !== null) {
217
+ return false
218
+ }
219
+
133
220
  if (!this[kConnections] || this[kClients].length < this[kConnections]) {
134
- const dispatcher = this[kFactory](this[kUrl], this[kOptions])
135
- this[kAddClient](dispatcher)
221
+ createClient(this)
136
222
  return true
137
223
  }
138
224
 
@@ -83,11 +83,10 @@ class Http1ProxyWrapper extends DispatcherBase {
83
83
 
84
84
  opts.path = origin + path
85
85
 
86
- if (!('host' in headers) && !('Host' in headers)) {
87
- const { host } = new URL(origin)
88
- headers.host = host
89
- }
90
86
  opts.headers = { ...this[kProxyHeaders], ...headers }
87
+ if (!hasHostHeader(headers)) {
88
+ opts.headers.host = new URL(origin).host
89
+ }
91
90
 
92
91
  // Pin the SNI/cert hostname to the proxy. Without this the underlying
93
92
  // Client would derive it from the (rewritten) Host header, which points
@@ -276,12 +275,14 @@ class ProxyAgent extends DispatcherBase {
276
275
  }
277
276
 
278
277
  dispatch (opts, handler) {
279
- const headers = buildHeaders(opts.headers)
278
+ let headers = buildHeaders(opts.headers)
280
279
  throwIfProxyAuthIsSent(headers)
281
280
 
282
- if (headers && !('host' in headers) && !('Host' in headers)) {
283
- const { host } = new URL(opts.origin)
284
- headers.host = host
281
+ if (headers && !hasHostHeader(headers)) {
282
+ if (headers === opts.headers) {
283
+ headers = { ...headers }
284
+ }
285
+ headers.host = new URL(opts.origin).host
285
286
  }
286
287
 
287
288
  return this[kAgent].dispatch(
@@ -325,8 +326,8 @@ class ProxyAgent extends DispatcherBase {
325
326
  }
326
327
 
327
328
  /**
328
- * @param {string[] | Record<string, string>} headers
329
- * @returns {Record<string, string>}
329
+ * @param {string[] | Record<string, string> | Iterable<[string, string | string[] | undefined]>} headers
330
+ * @returns {Record<string, string | string[] | undefined>}
330
331
  */
331
332
  function buildHeaders (headers) {
332
333
  // When using undici.fetch, the headers list is stored
@@ -355,7 +356,20 @@ function buildHeaders (headers) {
355
356
  const headersPair = {}
356
357
 
357
358
  for (const [key, value] of headers) {
358
- headersPair[key] = value
359
+ if (!Object.hasOwn(headersPair, key)) {
360
+ headersPair[key] = value
361
+ continue
362
+ }
363
+
364
+ const previous = headersPair[key]
365
+ const values = []
366
+ if (previous !== undefined) {
367
+ values.push(...(Array.isArray(previous) ? previous : [previous]))
368
+ }
369
+ if (value !== undefined) {
370
+ values.push(...(Array.isArray(value) ? value : [value]))
371
+ }
372
+ headersPair[key] = values.length > 1 ? values : values[0]
359
373
  }
360
374
 
361
375
  return headersPair
@@ -388,6 +402,15 @@ function isProxyAuthorizationHeader (key) {
388
402
  return key.length === proxyAuthorization.length && key.toLowerCase() === proxyAuthorization
389
403
  }
390
404
 
405
+ function hasHostHeader (headers) {
406
+ for (const key in headers) {
407
+ if (key.length === 4 && key.toLowerCase() === 'host') {
408
+ return true
409
+ }
410
+ }
411
+ return false
412
+ }
413
+
391
414
  function throwProxyAuthError () {
392
415
  throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')
393
416
  }
@@ -26,6 +26,16 @@ class RetryAgent extends Dispatcher {
26
26
  return this.#agent.dispatch(opts, retry)
27
27
  }
28
28
 
29
+ // WebSocket and EventSource read their receive limits from the dispatcher
30
+ // they are given, so report the wrapped agent's settings rather than none.
31
+ get webSocketOptions () {
32
+ return this.#agent.webSocketOptions
33
+ }
34
+
35
+ get eventSourceOptions () {
36
+ return this.#agent.eventSourceOptions
37
+ }
38
+
29
39
  close () {
30
40
  return this.#agent.close()
31
41
  }
@@ -7,14 +7,16 @@ const {
7
7
  kAddClient,
8
8
  kGetDispatcher,
9
9
  kHasDispatcher,
10
- kRemoveClient
10
+ kRemoveClient,
11
+ kRetireClient,
12
+ kDrainQueue
11
13
  } = require('./pool-base')
12
14
  const Client = require('./client')
13
15
  const {
14
16
  InvalidArgumentError
15
17
  } = require('../core/errors')
16
18
  const util = require('../core/util')
17
- const { kUrl } = require('../core/symbols')
19
+ const { kUrl, kQueued } = require('../core/symbols')
18
20
  const buildConnector = require('../core/connect')
19
21
 
20
22
  const kOptions = Symbol('options')
@@ -82,12 +84,20 @@ class RoundRobinPool extends PoolBase {
82
84
  })
83
85
 
84
86
  this.on('connectionError', (origin, targets, error) => {
87
+ // Retire (close) the client rather than only dropping it from
88
+ // kClients: otherwise its drain listener keeps pulling requests from
89
+ // the pool queue onto a client that pool.destroy() can't reach.
85
90
  for (const target of targets) {
86
- const idx = this[kClients].indexOf(target)
87
- if (idx !== -1) {
88
- this[kClients].splice(idx, 1)
91
+ if (this[kClients].includes(target)) {
92
+ this[kRetireClient](target)
89
93
  }
90
94
  }
95
+
96
+ // The retired client no longer drains the pool queue, so hand any
97
+ // queued requests to another (possibly new) client.
98
+ if (this[kQueued] > 0) {
99
+ this[kDrainQueue](origin, targets.slice(1))
100
+ }
91
101
  })
92
102
  }
93
103