@psnext/slingcli 3.5.20261007-3 → 3.5.20261019-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 (377) 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 +3 -3
  18. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  19. package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
  20. package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
  21. package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
  22. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  23. package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
  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 +4 -4
  27. package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
  28. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
  29. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
  30. package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
  31. package/node_modules/@aws-sdk/middleware-websocket/package.json +4 -4
  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/models/CognitoIdentityServiceException.d.ts +1 -0
  48. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/errors.d.ts +9 -0
  49. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/SigninServiceException.d.ts +1 -0
  50. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +4 -0
  51. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/SSOServiceException.d.ts +1 -0
  52. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/errors.d.ts +4 -0
  53. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
  54. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +11 -0
  55. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/STSServiceException.d.ts +1 -0
  56. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +7 -0
  57. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
  58. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +9 -0
  59. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +1 -0
  60. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/errors.d.ts +4 -0
  61. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +1 -0
  62. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/errors.d.ts +4 -0
  63. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
  64. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +11 -0
  65. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +1 -0
  66. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +7 -0
  67. package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
  68. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
  69. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +2 -0
  70. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +21 -86
  71. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +3 -103
  72. package/node_modules/@earendil-works/pi-codemode/package.json +1 -1
  73. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-TFS67BSI.js → chunk-23QDZLZG.js} +20 -14
  74. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-IB6ONE3U.js → chunk-QPFSTNX5.js} +1 -1
  75. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{virtual-modules-P5ROWYIG.js → virtual-modules-GRXGP6ZA.js} +1 -1
  76. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
  77. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  78. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  79. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Agent.md +8 -8
  80. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  81. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +11 -6
  82. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
  83. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Dispatcher.md +12 -0
  84. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Errors.md +101 -1
  85. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Fetch.md +10 -0
  86. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  87. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +17 -9
  88. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Pool.md +5 -6
  89. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  90. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/index.md +22 -13
  91. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/type-map.json +66 -66
  92. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +1 -2
  93. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  94. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  95. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +10 -4
  96. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/constants.js +12 -1
  97. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/errors.js +38 -1
  98. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/request.js +39 -3
  99. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +2 -0
  100. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/util.js +26 -40
  101. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +6 -2
  102. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +127 -84
  103. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +97 -21
  104. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +10 -2
  105. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  106. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  107. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
  108. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  109. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool-base.js +117 -19
  110. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool.js +99 -13
  111. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +34 -11
  112. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  113. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  114. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +153 -15
  115. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +126 -52
  116. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +31 -6
  117. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +116 -24
  118. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +15 -4
  119. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +253 -73
  120. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +11 -0
  121. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/response-error.js +72 -28
  122. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/LICENSE.md +7 -0
  123. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/no-simd.js +1002 -0
  124. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/simd.js +1002 -0
  125. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +11 -0
  126. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  127. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  128. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +11 -5
  129. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cache.js +17 -8
  130. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
  131. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/index.js +19 -7
  132. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/util.js +21 -2
  133. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  134. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +50 -3
  135. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/body.js +69 -53
  136. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/data-url.js +6 -6
  137. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  138. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata.js +30 -36
  139. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/headers.js +36 -33
  140. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +54 -29
  141. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +74 -79
  142. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/response.js +43 -44
  143. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +7 -7
  144. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/infra/index.js +16 -1
  145. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  146. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +2 -14
  147. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +33 -12
  148. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/events.js +43 -26
  149. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/receiver.js +27 -4
  150. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
  151. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
  152. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +44 -41
  153. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +7 -5
  154. package/node_modules/@earendil-works/pi-coding-agent/package.json +2 -2
  155. package/node_modules/@hono/node-server/README.md +2 -0
  156. package/node_modules/@hono/node-server/dist/index.cjs +1 -1
  157. package/node_modules/@hono/node-server/dist/index.mjs +1 -1
  158. package/node_modules/@hono/node-server/dist/serve-static.cjs +2 -1
  159. package/node_modules/@hono/node-server/dist/serve-static.mjs +2 -1
  160. package/node_modules/@hono/node-server/package.json +2 -2
  161. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
  162. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -1
  163. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1695 -3
  164. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js +2 -1
  165. package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
  166. package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
  167. package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
  168. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +8 -0
  169. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +102 -0
  170. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +8 -1
  171. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +8 -1
  172. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +13 -2
  173. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -1
  174. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
  175. package/node_modules/@smithy/core/dist-es/submodules/protocols/writeKey.js +3 -0
  176. package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  177. package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
  178. package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
  179. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +9 -0
  180. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
  181. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
  182. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
  183. package/node_modules/@smithy/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
  184. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  185. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
  186. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
  187. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +9 -0
  188. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
  189. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
  190. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
  191. 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
  192. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
  193. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
  194. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
  195. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
  196. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
  197. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
  198. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
  199. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
  200. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
  201. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
  202. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
  203. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
  204. package/node_modules/@smithy/core/package.json +2 -1
  205. package/node_modules/@types/node/README.md +1 -1
  206. package/node_modules/@types/node/package.json +2 -2
  207. package/node_modules/@types/node/util.d.ts +6 -3
  208. package/node_modules/content-disposition/README.md +105 -35
  209. package/node_modules/content-disposition/dist/index.d.ts +72 -0
  210. package/node_modules/content-disposition/dist/index.js +388 -0
  211. package/node_modules/content-disposition/dist/index.js.map +1 -0
  212. package/node_modules/content-disposition/package.json +31 -19
  213. package/node_modules/express/Readme.md +15 -9
  214. package/node_modules/express/lib/application.js +2 -2
  215. package/node_modules/express/lib/request.js +32 -19
  216. package/node_modules/express/lib/response.js +27 -30
  217. package/node_modules/express/node_modules/content-type/LICENSE +22 -0
  218. package/node_modules/express/node_modules/content-type/README.md +71 -0
  219. package/node_modules/express/node_modules/content-type/dist/index.d.ts +46 -0
  220. package/node_modules/express/node_modules/content-type/dist/index.js +176 -0
  221. package/node_modules/express/node_modules/content-type/dist/index.js.map +1 -0
  222. package/node_modules/express/node_modules/content-type/package.json +52 -0
  223. package/node_modules/express/package.json +10 -10
  224. package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
  225. package/node_modules/fast-uri/README.md +8 -0
  226. package/node_modules/fast-uri/index.js +98 -18
  227. package/node_modules/fast-uri/lib/utils.js +52 -0
  228. package/node_modules/fast-uri/package.json +1 -1
  229. package/node_modules/fast-uri/test/host-delimiter-security.test.js +94 -0
  230. package/node_modules/fast-uri/test/relative-normalization-security.test.js +156 -0
  231. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +32 -4
  232. package/node_modules/fast-uri/test/scheme-validation.test.js +53 -14
  233. package/node_modules/ip-address/README.md +70 -70
  234. package/node_modules/ip-address/dist/ipv6.js +7 -4
  235. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  236. package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
  237. package/node_modules/ip-address/dist/v6/constants.js +3 -0
  238. package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  239. package/node_modules/ip-address/package.json +2 -1
  240. package/node_modules/jose/README.md +2 -2
  241. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +5 -4
  242. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +4 -4
  243. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +5 -4
  244. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +5 -5
  245. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +5 -4
  246. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +5 -5
  247. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +5 -4
  248. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +5 -5
  249. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -4
  250. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +6 -5
  251. package/node_modules/jose/dist/types/jws/general/sign.d.ts +9 -6
  252. package/node_modules/jose/dist/types/jws/general/verify.d.ts +7 -5
  253. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +7 -6
  254. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +1 -1
  255. package/node_modules/jose/dist/types/jwt/sign.d.ts +1 -1
  256. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +1 -1
  257. package/node_modules/jose/dist/types/jwt/verify.d.ts +3 -5
  258. package/node_modules/jose/dist/types/key/export.d.ts +1 -1
  259. package/node_modules/jose/dist/types/key/generate_secret.d.ts +1 -1
  260. package/node_modules/jose/dist/types/key/import.d.ts +2 -2
  261. package/node_modules/jose/dist/types/types.d.ts +165 -107
  262. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +2 -2
  263. package/node_modules/jose/dist/types/util/errors.d.ts +1 -1
  264. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +3 -3
  265. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +8 -8
  266. package/node_modules/jose/dist/webapi/jwks/local.js +2 -1
  267. package/node_modules/jose/dist/webapi/jwks/remote.js +4 -4
  268. package/node_modules/jose/dist/webapi/jws/general/sign.js +3 -3
  269. package/node_modules/jose/dist/webapi/jws/general/verify.js +3 -3
  270. package/node_modules/jose/dist/webapi/jwt/encrypt.js +2 -2
  271. package/node_modules/jose/dist/webapi/jwt/sign.js +2 -2
  272. package/node_modules/jose/dist/webapi/jwt/unsecured.js +3 -3
  273. package/node_modules/jose/dist/webapi/key/generate_secret.js +4 -4
  274. package/node_modules/jose/dist/webapi/lib/asn1.js +2 -2
  275. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +4 -4
  276. package/node_modules/jose/dist/webapi/lib/content_encryption.js +8 -8
  277. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +14 -14
  278. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +3 -3
  279. package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +2 -2
  280. package/node_modules/jose/dist/webapi/lib/jws_sign.js +11 -11
  281. package/node_modules/jose/dist/webapi/lib/jws_verify.js +19 -16
  282. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +44 -43
  283. package/node_modules/jose/dist/webapi/lib/key.js +4 -4
  284. package/node_modules/jose/dist/webapi/lib/key_management.js +17 -17
  285. package/node_modules/jose/dist/webapi/lib/validate.js +10 -10
  286. package/node_modules/jose/dist/webapi/util/decode_jwt.js +12 -12
  287. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -5
  288. package/node_modules/jose/package.json +1 -1
  289. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  290. package/node_modules/qs/CHANGELOG.md +38 -14
  291. package/node_modules/qs/README.md +31 -3
  292. package/node_modules/qs/dist/qs.js +20 -20
  293. package/node_modules/qs/lib/parse.js +94 -4
  294. package/node_modules/qs/lib/stringify.js +4 -4
  295. package/node_modules/qs/lib/utils.js +130 -6
  296. package/node_modules/qs/package.json +4 -4
  297. package/node_modules/qs/test/parse.js +174 -0
  298. package/node_modules/qs/test/stringify.js +263 -33
  299. package/node_modules/qs/test/utils.js +184 -0
  300. package/node_modules/undici/docs/docs/api/Client.md +2 -0
  301. package/node_modules/undici/lib/core/connect.js +10 -4
  302. package/node_modules/undici/lib/core/symbols.js +1 -0
  303. package/node_modules/undici/lib/dispatcher/agent.js +6 -2
  304. package/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
  305. package/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
  306. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  307. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
  308. package/node_modules/undici/lib/handler/cache-handler.js +48 -0
  309. package/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
  310. package/node_modules/undici/lib/handler/redirect-handler.js +8 -1
  311. package/node_modules/undici/lib/interceptor/decompress.js +15 -5
  312. package/node_modules/undici/lib/web/cookies/index.js +3 -1
  313. package/node_modules/undici/lib/web/cookies/parse.js +138 -137
  314. package/node_modules/undici/lib/web/cookies/util.js +21 -2
  315. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
  316. package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  317. package/node_modules/undici/lib/web/fetch/index.js +3 -3
  318. package/node_modules/undici/lib/web/infra/index.js +14 -0
  319. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  320. package/node_modules/undici/lib/web/websocket/receiver.js +13 -0
  321. package/node_modules/undici/package.json +1 -1
  322. package/node_modules/undici/types/client.d.ts +14 -0
  323. package/node_modules/zod/package.json +1 -1
  324. package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  325. package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  326. package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  327. package/node_modules/zod/src/v4/core/compile.ts +9 -0
  328. package/node_modules/zod/src/v4/core/schemas.ts +35 -1
  329. package/node_modules/zod/src/v4/core/util.ts +13 -0
  330. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  331. package/node_modules/zod/v4/core/compile.cjs +8 -0
  332. package/node_modules/zod/v4/core/compile.js +8 -0
  333. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  334. package/node_modules/zod/v4/core/schemas.d.cts +3 -1
  335. package/node_modules/zod/v4/core/schemas.d.ts +3 -1
  336. package/node_modules/zod/v4/core/schemas.js +30 -0
  337. package/node_modules/zod/v4/core/util.cjs +15 -0
  338. package/node_modules/zod/v4/core/util.d.cts +2 -0
  339. package/node_modules/zod/v4/core/util.d.ts +2 -0
  340. package/node_modules/zod/v4/core/util.js +14 -0
  341. package/node_modules/zod/v4/core/versions.cjs +1 -1
  342. package/node_modules/zod/v4/core/versions.js +1 -1
  343. package/package.json +5 -4
  344. package/slingshot/index.js +124 -124
  345. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
  346. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
  347. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
  348. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
  349. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
  350. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
  351. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
  352. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
  353. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
  354. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
  355. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
  356. package/node_modules/content-disposition/index.js +0 -536
  357. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
  358. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
  359. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
  360. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
  361. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
  362. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
  363. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
  364. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
  365. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
  366. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
  367. /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
  368. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
  369. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
  370. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
  371. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
  372. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
  373. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
  374. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
  375. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
  376. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
  377. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
@@ -6,7 +6,7 @@ const { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require('./cons
6
6
  const { getGlobalOrigin } = require('./global')
7
7
  const { collectAnHTTPQuotedString, parseMIMEType } = require('./data-url')
8
8
  const { performance } = require('node:perf_hooks')
9
- const { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util')
9
+ const { isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util')
10
10
  const assert = require('node:assert')
11
11
  const { isUint8Array } = require('node:util/types')
12
12
  const { webidl } = require('../webidl')
@@ -872,8 +872,9 @@ function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1)
872
872
  * @param {(target: any) => any} kInternalIterator
873
873
  * @param {string | number} [keyIndex]
874
874
  * @param {string | number} [valueIndex]
875
+ * @param {import('../../../types/webidl').WebidlIsFunction} brandCheck
875
876
  */
876
- function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) {
877
+ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1, brandCheck) {
877
878
  const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex)
878
879
 
879
880
  const properties = {
@@ -882,7 +883,7 @@ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueInde
882
883
  enumerable: true,
883
884
  configurable: true,
884
885
  value: function keys () {
885
- webidl.brandCheck(this, object)
886
+ webidl.brandCheck(this, brandCheck)
886
887
  return makeIterator(this, 'key')
887
888
  }
888
889
  },
@@ -891,7 +892,7 @@ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueInde
891
892
  enumerable: true,
892
893
  configurable: true,
893
894
  value: function values () {
894
- webidl.brandCheck(this, object)
895
+ webidl.brandCheck(this, brandCheck)
895
896
  return makeIterator(this, 'value')
896
897
  }
897
898
  },
@@ -900,7 +901,7 @@ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueInde
900
901
  enumerable: true,
901
902
  configurable: true,
902
903
  value: function entries () {
903
- webidl.brandCheck(this, object)
904
+ webidl.brandCheck(this, brandCheck)
904
905
  return makeIterator(this, 'key+value')
905
906
  }
906
907
  },
@@ -909,7 +910,7 @@ function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueInde
909
910
  enumerable: true,
910
911
  configurable: true,
911
912
  value: function forEach (callbackfn, thisArg = globalThis) {
912
- webidl.brandCheck(this, object)
913
+ webidl.brandCheck(this, brandCheck)
913
914
  webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`)
914
915
  if (typeof callbackfn !== 'function') {
915
916
  throw new TypeError(
@@ -1483,7 +1484,6 @@ module.exports = {
1483
1484
  isAborted,
1484
1485
  isCancelled,
1485
1486
  isValidEncodedURL,
1486
- ReadableStreamFrom,
1487
1487
  tryUpgradeRequestToAPotentiallyTrustworthyURL,
1488
1488
  clampAndCoarsenConnectionTimingInfo,
1489
1489
  coarsenedSharedCurrentTime,
@@ -156,6 +156,20 @@ function isomorphicEncode (input) {
156
156
  return input
157
157
  }
158
158
 
159
+ const nonASCIIRegex = /[^\x00-\x7F]/ // eslint-disable-line no-control-regex
160
+
161
+ /**
162
+ * @param {string} str
163
+ * @returns {string}
164
+ *
165
+ * @see https://infra.spec.whatwg.org/#ascii-lowercase
166
+ */
167
+ function asciiLowercase (str) {
168
+ return nonASCIIRegex.test(str)
169
+ ? str.replace(/[A-Z]+/g, (upper) => upper.toLowerCase())
170
+ : str.toLowerCase()
171
+ }
172
+
159
173
  /**
160
174
  * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value
161
175
  * @param {Uint8Array} bytes
@@ -192,7 +206,7 @@ function removeChars (str, leading, trailing, predicate) {
192
206
  }
193
207
 
194
208
  if (trailing) {
195
- while (trail > 0 && predicate(str.charCodeAt(trail))) trail--
209
+ while (trail >= lead && predicate(str.charCodeAt(trail))) trail--
196
210
  }
197
211
 
198
212
  return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1)
@@ -216,6 +230,7 @@ function serializeJavascriptValueToJSONString (value) {
216
230
  }
217
231
 
218
232
  module.exports = {
233
+ asciiLowercase,
219
234
  collectASequenceOfCodePoints,
220
235
  collectASequenceOfCodePointsFast,
221
236
  forgivingBase64,
@@ -2,6 +2,7 @@
2
2
 
3
3
  const assert = require('node:assert')
4
4
  const { runtimeFeatures } = require('../../util/runtime-features.js')
5
+ const { asciiLowercase } = require('../infra/index.js')
5
6
 
6
7
  /**
7
8
  * @typedef {object} Metadata
@@ -66,14 +67,12 @@ const getSRIHashAlgorithmIndex = /** @type {GetSRIHashAlgorithmIndex} */ (Map.pr
66
67
 
67
68
  /**
68
69
  * @typedef IsValidSRIHashAlgorithm
70
+ * @see https://w3c.github.io/webappsec-subresource-integrity/#valid-sri-hash-algorithm-token
69
71
  * @type {(algorithm: string) => algorithm is SRIHashAlgorithm}
70
72
  * @param {*} algorithm
71
73
  * @returns {algorithm is SRIHashAlgorithm}
72
74
  */
73
-
74
- const isValidSRIHashAlgorithm = /** @type {IsValidSRIHashAlgorithm} */ (
75
- Map.prototype.has.bind(validSRIHashAlgorithmTokenSet)
76
- )
75
+ const isValidSRIHashAlgorithm = (algorithm) => validSRIHashAlgorithmTokenSet.has(asciiLowercase(algorithm))
77
76
 
78
77
  /**
79
78
  * @param {Uint8Array} bytes
@@ -229,7 +228,8 @@ function parseMetadata (metadata) {
229
228
  // 8. Let metadata be the ordered map
230
229
  // «["alg" → algorithm, "val" → base64-value]».
231
230
  const metadata = {
232
- alg: algorithm,
231
+ // Possible spec bug?
232
+ alg: asciiLowercase(algorithm),
233
233
  val: base64Value
234
234
  }
235
235
 
@@ -73,26 +73,14 @@ webidl.errors.invalidArgument = function (context) {
73
73
  }
74
74
 
75
75
  // https://webidl.spec.whatwg.org/#implements
76
- webidl.brandCheck = function (V, I) {
77
- if (!FunctionPrototypeSymbolHasInstance(I, V)) {
76
+ webidl.brandCheck = function (V, is) {
77
+ if (!is(V)) {
78
78
  const err = new TypeError('Illegal invocation')
79
79
  err.code = 'ERR_INVALID_THIS' // node compat.
80
80
  throw err
81
81
  }
82
82
  }
83
83
 
84
- webidl.brandCheckMultiple = function (List) {
85
- const prototypes = List.map((c) => webidl.util.MakeTypeAssertion(c))
86
-
87
- return (V) => {
88
- if (prototypes.every(typeCheck => !typeCheck(V))) {
89
- const err = new TypeError('Illegal invocation')
90
- err.code = 'ERR_INVALID_THIS' // node compat.
91
- throw err
92
- }
93
- }
94
- }
95
-
96
84
  webidl.argumentLengthCheck = function ({ length }, min, ctx) {
97
85
  if (length < min) {
98
86
  throw webidl.errors.exception({
@@ -101,13 +101,13 @@ function establishWebSocketConnection (url, protocols, client, handler, options)
101
101
  // The presence of a session property on the socket indicates HTTP2
102
102
  // HTTP1
103
103
  if (response.socket?.session == null) {
104
- failWebsocketConnection(handler, 1002, 'Received network error or non-101 status code.', response.error)
104
+ failHandshake(handler, response, 1002, 'Received network error or non-101 status code.', response.error)
105
105
  return
106
106
  }
107
107
 
108
108
  // HTTP2
109
109
  if (response.status !== 200) {
110
- failWebsocketConnection(handler, 1002, 'Received network error or non-200 status code.', response.error)
110
+ failHandshake(handler, response, 1002, 'Received network error or non-200 status code.', response.error)
111
111
  return
112
112
  }
113
113
  }
@@ -122,7 +122,7 @@ function establishWebSocketConnection (url, protocols, client, handler, options)
122
122
  // header list results in null, failure, or the empty byte
123
123
  // sequence, then fail the WebSocket connection.
124
124
  if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {
125
- failWebsocketConnection(handler, 1002, 'Server did not respond with sent protocols.')
125
+ failHandshake(handler, response, 1002, 'Server did not respond with sent protocols.')
126
126
  return
127
127
  }
128
128
 
@@ -138,7 +138,7 @@ function establishWebSocketConnection (url, protocols, client, handler, options)
138
138
  // _Fail the WebSocket Connection_.
139
139
  // For H2, no upgrade header is expected.
140
140
  if (response.socket.session == null && response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {
141
- failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to "websocket".')
141
+ failHandshake(handler, response, 1002, 'Server did not set Upgrade header to "websocket".')
142
142
  return
143
143
  }
144
144
 
@@ -148,7 +148,7 @@ function establishWebSocketConnection (url, protocols, client, handler, options)
148
148
  // MUST _Fail the WebSocket Connection_.
149
149
  // For H2, no connection header is expected.
150
150
  if (response.socket.session == null && response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {
151
- failWebsocketConnection(handler, 1002, 'Server did not set Connection header to "upgrade".')
151
+ failHandshake(handler, response, 1002, 'Server did not set Connection header to "upgrade".')
152
152
  return
153
153
  }
154
154
 
@@ -159,11 +159,15 @@ function establishWebSocketConnection (url, protocols, client, handler, options)
159
159
  // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and
160
160
  // trailing whitespace, the client MUST _Fail the WebSocket
161
161
  // Connection_.
162
- const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')
163
- const digest = crypto.hash('sha1', keyValue + uid, 'base64')
164
- if (secWSAccept !== digest) {
165
- failWebsocketConnection(handler, 1002, 'Incorrect hash received in Sec-WebSocket-Accept header.')
166
- return
162
+ // For H2, implementations "do not do the processing of the Sec-WebSocket-Key and
163
+ // Sec-WebSocket-Accept header fields". https://datatracker.ietf.org/doc/html/rfc8441#section-5
164
+ if (response.socket.session == null) {
165
+ const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')
166
+ const digest = crypto.hash('sha1', keyValue + uid, 'base64')
167
+ if (secWSAccept !== digest) {
168
+ failHandshake(handler, response, 1002, 'Incorrect hash received in Sec-WebSocket-Accept header.')
169
+ return
170
+ }
167
171
  }
168
172
 
169
173
  // 5. If the response includes a |Sec-WebSocket-Extensions| header
@@ -180,7 +184,7 @@ function establishWebSocketConnection (url, protocols, client, handler, options)
180
184
  extensions = parseExtensions(secExtension)
181
185
 
182
186
  if (!extensions.has('permessage-deflate')) {
183
- failWebsocketConnection(handler, 1002, 'Sec-WebSocket-Extensions header does not match.')
187
+ failHandshake(handler, response, 1002, 'Sec-WebSocket-Extensions header does not match.')
184
188
  return
185
189
  }
186
190
  }
@@ -201,11 +205,18 @@ function establishWebSocketConnection (url, protocols, client, handler, options)
201
205
  // the selected subprotocol values in its response for the connection to
202
206
  // be established.
203
207
  if (requestProtocols === null || !requestProtocols.includes(secProtocol)) {
204
- failWebsocketConnection(handler, 1002, 'Protocol was not set in the opening handshake.')
208
+ failHandshake(handler, response, 1002, 'Protocol was not set in the opening handshake.')
205
209
  return
206
210
  }
207
211
  }
208
212
 
213
+ // For H2, "Orderly TCP-level closures are represented as END_STREAM flags", so
214
+ // end our side of the stream when the server ends its side, as a TCP socket would.
215
+ // https://datatracker.ietf.org/doc/html/rfc8441#section-5
216
+ if (response.socket.session != null) {
217
+ response.socket.allowHalfOpen = false
218
+ }
219
+
209
220
  response.socket.on('data', handler.onSocketData)
210
221
  response.socket.on('close', handler.onSocketClose)
211
222
  response.socket.on('error', handler.onSocketError)
@@ -296,6 +307,16 @@ function closeWebSocketConnection (object, code, reason, validate = false) {
296
307
  }
297
308
  }
298
309
 
310
+ function failHandshake (handler, response, code, reason, cause) {
311
+ // The H2 upgrade request has already completed and handed off its stream.
312
+ // Aborting the request cannot close that stream after handshake validation fails.
313
+ if (response.socket?.session != null && !response.socket.destroyed) {
314
+ response.socket.destroy()
315
+ }
316
+
317
+ failWebsocketConnection(handler, code, reason, cause)
318
+ }
319
+
299
320
  /**
300
321
  * @param {import('./websocket').Handler} handler
301
322
  * @param {number} code
@@ -4,6 +4,8 @@ const { webidl } = require('../webidl')
4
4
  const { kEnumerableProperty } = require('../../core/util')
5
5
  const { kConstruct } = require('../../core/symbols')
6
6
 
7
+ let createFastMessageEvent
8
+
7
9
  /**
8
10
  * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent
9
11
  */
@@ -30,31 +32,31 @@ class MessageEvent extends Event {
30
32
  }
31
33
 
32
34
  get data () {
33
- webidl.brandCheck(this, MessageEvent)
35
+ webidl.brandCheck(this, webidl.is.MessageEvent)
34
36
 
35
37
  return this.#eventInit.data
36
38
  }
37
39
 
38
40
  get origin () {
39
- webidl.brandCheck(this, MessageEvent)
41
+ webidl.brandCheck(this, webidl.is.MessageEvent)
40
42
 
41
43
  return this.#eventInit.origin
42
44
  }
43
45
 
44
46
  get lastEventId () {
45
- webidl.brandCheck(this, MessageEvent)
47
+ webidl.brandCheck(this, webidl.is.MessageEvent)
46
48
 
47
49
  return this.#eventInit.lastEventId
48
50
  }
49
51
 
50
52
  get source () {
51
- webidl.brandCheck(this, MessageEvent)
53
+ webidl.brandCheck(this, webidl.is.MessageEvent)
52
54
 
53
55
  return this.#eventInit.source
54
56
  }
55
57
 
56
58
  get ports () {
57
- webidl.brandCheck(this, MessageEvent)
59
+ webidl.brandCheck(this, webidl.is.MessageEvent)
58
60
 
59
61
  if (!Object.isFrozen(this.#eventInit.ports)) {
60
62
  Object.freeze(this.#eventInit.ports)
@@ -73,7 +75,7 @@ class MessageEvent extends Event {
73
75
  source = null,
74
76
  ports = []
75
77
  ) {
76
- webidl.brandCheck(this, MessageEvent)
78
+ webidl.brandCheck(this, webidl.is.MessageEvent)
77
79
 
78
80
  webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent')
79
81
 
@@ -82,21 +84,24 @@ class MessageEvent extends Event {
82
84
  })
83
85
  }
84
86
 
85
- static createFastMessageEvent (type, init) {
86
- const messageEvent = new MessageEvent(kConstruct, type, init)
87
- messageEvent.#eventInit = init
88
- messageEvent.#eventInit.data ??= null
89
- messageEvent.#eventInit.origin ??= ''
90
- messageEvent.#eventInit.lastEventId ??= ''
91
- messageEvent.#eventInit.source ??= null
92
- messageEvent.#eventInit.ports ??= []
93
- return messageEvent
87
+ static {
88
+ createFastMessageEvent = (type, init) => {
89
+ const messageEvent = new MessageEvent(kConstruct, type, init)
90
+ messageEvent.#eventInit = init
91
+ messageEvent.#eventInit.data ??= null
92
+ messageEvent.#eventInit.origin ??= ''
93
+ messageEvent.#eventInit.lastEventId ??= ''
94
+ messageEvent.#eventInit.source ??= null
95
+ messageEvent.#eventInit.ports ??= []
96
+ return messageEvent
97
+ }
98
+
99
+ webidl.is.MessageEvent = (arg) => {
100
+ return arg != null && typeof arg === 'object' && #eventInit in arg
101
+ }
94
102
  }
95
103
  }
96
104
 
97
- const { createFastMessageEvent } = MessageEvent
98
- delete MessageEvent.createFastMessageEvent
99
-
100
105
  /**
101
106
  * @see https://websockets.spec.whatwg.org/#the-closeevent-interface
102
107
  */
@@ -117,22 +122,28 @@ class CloseEvent extends Event {
117
122
  }
118
123
 
119
124
  get wasClean () {
120
- webidl.brandCheck(this, CloseEvent)
125
+ webidl.brandCheck(this, webidl.is.CloseEvent)
121
126
 
122
127
  return this.#eventInit.wasClean
123
128
  }
124
129
 
125
130
  get code () {
126
- webidl.brandCheck(this, CloseEvent)
131
+ webidl.brandCheck(this, webidl.is.CloseEvent)
127
132
 
128
133
  return this.#eventInit.code
129
134
  }
130
135
 
131
136
  get reason () {
132
- webidl.brandCheck(this, CloseEvent)
137
+ webidl.brandCheck(this, webidl.is.CloseEvent)
133
138
 
134
139
  return this.#eventInit.reason
135
140
  }
141
+
142
+ static {
143
+ webidl.is.CloseEvent = (arg) => {
144
+ return arg != null && typeof arg === 'object' && #eventInit in arg
145
+ }
146
+ }
136
147
  }
137
148
 
138
149
  // https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface
@@ -153,34 +164,40 @@ class ErrorEvent extends Event {
153
164
  }
154
165
 
155
166
  get message () {
156
- webidl.brandCheck(this, ErrorEvent)
167
+ webidl.brandCheck(this, webidl.is.ErrorEvent)
157
168
 
158
169
  return this.#eventInit.message
159
170
  }
160
171
 
161
172
  get filename () {
162
- webidl.brandCheck(this, ErrorEvent)
173
+ webidl.brandCheck(this, webidl.is.ErrorEvent)
163
174
 
164
175
  return this.#eventInit.filename
165
176
  }
166
177
 
167
178
  get lineno () {
168
- webidl.brandCheck(this, ErrorEvent)
179
+ webidl.brandCheck(this, webidl.is.ErrorEvent)
169
180
 
170
181
  return this.#eventInit.lineno
171
182
  }
172
183
 
173
184
  get colno () {
174
- webidl.brandCheck(this, ErrorEvent)
185
+ webidl.brandCheck(this, webidl.is.ErrorEvent)
175
186
 
176
187
  return this.#eventInit.colno
177
188
  }
178
189
 
179
190
  get error () {
180
- webidl.brandCheck(this, ErrorEvent)
191
+ webidl.brandCheck(this, webidl.is.ErrorEvent)
181
192
 
182
193
  return this.#eventInit.error
183
194
  }
195
+
196
+ static {
197
+ webidl.is.ErrorEvent = (arg) => {
198
+ return arg != null && typeof arg === 'object' && #eventInit in arg
199
+ }
200
+ }
184
201
  }
185
202
 
186
203
  Object.defineProperties(MessageEvent.prototype, {
@@ -16,6 +16,7 @@ const { failWebsocketConnection } = require('./connection')
16
16
  const { WebsocketFrameSend } = require('./frame')
17
17
  const { PerMessageDeflate } = require('./permessage-deflate')
18
18
  const { MessageSizeExceededError } = require('../../core/errors')
19
+ const { defaultWebSocketMaxFragments, defaultWebSocketMaxPayloadSize } = require('../../core/constants')
19
20
 
20
21
  // This code was influenced by ws released under the MIT license.
21
22
  // Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
@@ -48,18 +49,25 @@ class ByteParser extends Writable {
48
49
  /**
49
50
  * @param {import('./websocket').Handler} handler
50
51
  * @param {Map<string, string>|null} extensions
51
- * @param {{ maxPayloadSize?: number }} [options]
52
+ * @param {{ maxFragments?: number, maxPayloadSize?: number }} [options]
53
+ * A missing value uses the default limit; `0` disables the limit.
52
54
  */
53
55
  constructor (handler, extensions, options = {}) {
54
56
  super()
55
57
 
56
58
  this.#handler = handler
57
59
  this.#extensions = extensions == null ? new Map() : extensions
58
- this.#maxFragments = options.maxFragments ?? 0
59
- this.#maxPayloadSize = options.maxPayloadSize ?? 0
60
+ // Options come from the dispatcher's `webSocketOptions`, which only
61
+ // DispatcherBase provides. Fall back to the defaults rather than to no
62
+ // limit, so RetryAgent, MockAgent or a custom dispatcher can't turn off
63
+ // the payload and decompression limits by accident.
64
+ this.#maxFragments = options.maxFragments ?? defaultWebSocketMaxFragments
65
+ this.#maxPayloadSize = options.maxPayloadSize ?? defaultWebSocketMaxPayloadSize
60
66
 
61
67
  if (this.#extensions.has('permessage-deflate')) {
62
- this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options))
68
+ this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, {
69
+ maxPayloadSize: this.#maxPayloadSize
70
+ }))
63
71
  }
64
72
  }
65
73
 
@@ -244,6 +252,19 @@ class ByteParser extends Writable {
244
252
  if (isControlFrame(this.#info.opcode)) {
245
253
  this.#loop = this.parseControlFrame(body)
246
254
  this.#state = parserStates.INFO
255
+
256
+ // If the automatic PONG/CLOSE reply filled the socket's write buffer,
257
+ // stop parsing and resume on drain so a PING flood cannot grow the
258
+ // outbound queue without bound.
259
+ if (this.#loop && this.#handler.socket.writableNeedDrain) {
260
+ this.#loop = false
261
+ this.#handler.socket.once('drain', () => {
262
+ if (this.destroyed) return
263
+ this.#loop = true
264
+ this.run(callback)
265
+ })
266
+ return
267
+ }
247
268
  } else {
248
269
  if (!this.#info.compressed) {
249
270
  if (!this.writeFragments(body)) {
@@ -369,6 +390,8 @@ class ByteParser extends Writable {
369
390
  consumeFragments () {
370
391
  const fragments = this.#fragments
371
392
 
393
+ this.#info.compressed = false
394
+
372
395
  if (fragments.length === 1) {
373
396
  // single fragment
374
397
  this.#fragmentsBytes = 0
@@ -26,6 +26,8 @@ function createInheritableDOMException () {
26
26
  })
27
27
  }
28
28
 
29
+ let createUnvalidatedWebSocketError
30
+
29
31
  class WebSocketError extends createInheritableDOMException() {
30
32
  #closeCode
31
33
  #reason
@@ -77,17 +79,20 @@ class WebSocketError extends createInheritableDOMException() {
77
79
  * @param {number|null} code
78
80
  * @param {string} reason
79
81
  */
80
- static createUnvalidatedWebSocketError (message, code, reason) {
81
- const error = new WebSocketError(message, kConstruct)
82
- error.#closeCode = code
83
- error.#reason = reason
84
- return error
82
+ static {
83
+ createUnvalidatedWebSocketError = (message, code, reason) => {
84
+ const error = new WebSocketError(message, kConstruct)
85
+ error.#closeCode = code
86
+ error.#reason = reason
87
+ return error
88
+ }
89
+
90
+ webidl.is.WebSocketError = (arg) => {
91
+ return arg != null && typeof arg === 'object' && #reason in arg
92
+ }
85
93
  }
86
94
  }
87
95
 
88
- const { createUnvalidatedWebSocketError } = WebSocketError
89
- delete WebSocketError.createUnvalidatedWebSocketError
90
-
91
96
  Object.defineProperties(WebSocketError.prototype, {
92
97
  closeCode: kEnumerableProperty,
93
98
  reason: kEnumerableProperty,
@@ -99,6 +104,4 @@ Object.defineProperties(WebSocketError.prototype, {
99
104
  }
100
105
  })
101
106
 
102
- webidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError)
103
-
104
107
  module.exports = { WebSocketError, createUnvalidatedWebSocketError }
@@ -62,7 +62,9 @@ class WebSocketStream {
62
62
 
63
63
  this.#handler.socket.destroy()
64
64
  },
65
- onSocketClose: () => this.#onSocketClose(),
65
+ // When the WebSocket connection is closed for a WebSocketStream stream, possibly cleanly, the user agent must
66
+ // queue a global task on the WebSocket task source given stream ’s relevant global object to run the following substeps:
67
+ onSocketClose: () => queueMicrotask(() => this.#onSocketClose()),
66
68
  onPing: () => {},
67
69
  onPong: () => {},
68
70
 
@@ -246,11 +248,15 @@ class WebSocketStream {
246
248
  const frame = new WebsocketFrameSend(data)
247
249
 
248
250
  this.#handler.socket.write(frame.createFrame(opcode), () => {
251
+ // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
249
252
  promise.resolve(undefined)
250
253
  })
254
+ } else {
255
+ // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
256
+ promise.resolve(undefined)
251
257
  }
252
258
 
253
- // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
259
+ // 7. Return promise.
254
260
  return promise.promise
255
261
  }
256
262
 
@@ -278,7 +284,7 @@ class WebSocketStream {
278
284
  // This is done in the opening handshake.
279
285
 
280
286
  // 3. Let extensions be the extensions in use .
281
- const extensions = parsedExtensions ?? ''
287
+ const extensions = response.headersList.get('sec-websocket-extensions') ?? ''
282
288
 
283
289
  // 4. Let protocol be the subprotocol in use .
284
290
  const protocol = response.headersList.get('sec-websocket-protocol') ?? ''
@@ -291,6 +297,7 @@ class WebSocketStream {
291
297
  start: (controller) => {
292
298
  this.#readableStreamController = controller
293
299
  },
300
+ pull: () => this.#pull(),
294
301
  cancel: (reason) => this.#cancel(reason)
295
302
  })
296
303
 
@@ -350,6 +357,9 @@ class WebSocketStream {
350
357
  this.#readableStreamController.enqueue(chunk)
351
358
 
352
359
  // 4. Apply backpressure to the WebSocket.
360
+ if (this.#readableStreamController.desiredSize <= 0) {
361
+ this.#handler.socket.pause()
362
+ }
353
363
  }
354
364
 
355
365
  /** @type {import('../websocket').Handler['onSocketClose']} */
@@ -383,7 +393,7 @@ class WebSocketStream {
383
393
  // 1006.
384
394
  let code = result?.code ?? 1005
385
395
 
386
- if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
396
+ if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
387
397
  code = 1006
388
398
  }
389
399
 
@@ -441,6 +451,11 @@ class WebSocketStream {
441
451
  closeWebSocketConnection(this.#handler, code, reasonString)
442
452
  }
443
453
 
454
+ // To pull bytes from a WebSocketStream stream , if stream is currently applying backpressure, release backpressure.
455
+ #pull () {
456
+ this.#handler.socket.resume()
457
+ }
458
+
444
459
  // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason .
445
460
  #cancel (reason) {
446
461
  this.#closeUsingReason(reason)