@psnext/slingcli 3.1.20260904-1 → 3.3.20260911-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 (711) hide show
  1. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  2. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  3. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  4. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  5. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  6. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  7. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  8. package/node_modules/@aws-sdk/core/package.json +1 -1
  9. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  10. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  11. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  12. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  13. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  14. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  15. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +3 -3
  16. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  17. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  18. package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
  19. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  20. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  21. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  22. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  23. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  24. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  25. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-PBNSMEG7.js → chunk-VDBOM5UG.js} +9 -9
  26. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
  27. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  28. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  29. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +25 -8
  30. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  31. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  32. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
  33. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
  34. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +33 -43
  35. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  36. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +16 -2
  37. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +3 -0
  38. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +7 -2
  39. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
  40. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +9 -1
  41. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +221 -12
  42. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +76 -30
  43. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  44. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
  45. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
  46. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +37 -8
  47. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
  48. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
  49. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  50. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +106 -22
  51. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +29 -5
  52. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  53. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  54. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +21 -4
  55. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +155 -32
  56. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +65 -9
  57. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +115 -13
  58. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
  59. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +7 -0
  60. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dump.js +10 -23
  61. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +13 -1
  62. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-utils.js +217 -27
  63. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +43 -3
  64. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/parse.js +150 -147
  65. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  66. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
  67. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +6 -0
  68. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +2 -3
  69. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +6 -1
  70. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +3 -3
  71. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +1 -1
  72. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  73. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  74. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  75. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +3 -3
  76. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +4 -4
  77. package/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
  78. package/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  79. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
  80. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
  81. package/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  82. package/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  83. package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  84. package/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  85. package/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  86. package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  87. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  88. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  89. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  90. package/node_modules/@smithy/core/errors.d.ts +5 -0
  91. package/node_modules/@smithy/core/errors.js +5 -0
  92. package/node_modules/@smithy/core/package.json +11 -2
  93. package/node_modules/@types/node/README.md +3 -3
  94. package/node_modules/@types/node/assert/strict.d.ts +56 -13
  95. package/node_modules/@types/node/assert.d.ts +190 -189
  96. package/node_modules/@types/node/async_hooks.d.ts +43 -151
  97. package/node_modules/@types/node/buffer.buffer.d.ts +13 -12
  98. package/node_modules/@types/node/buffer.d.ts +237 -102
  99. package/node_modules/@types/node/child_process.d.ts +154 -39
  100. package/node_modules/@types/node/cluster.d.ts +384 -238
  101. package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
  102. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  103. package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  104. package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
  105. package/node_modules/@types/node/console.d.ts +404 -45
  106. package/node_modules/@types/node/constants.d.ts +10 -3
  107. package/node_modules/@types/node/crypto.d.ts +1600 -1007
  108. package/node_modules/@types/node/dgram.d.ts +81 -133
  109. package/node_modules/@types/node/diagnostics_channel.d.ts +59 -277
  110. package/node_modules/@types/node/dns/promises.d.ts +15 -9
  111. package/node_modules/@types/node/dns.d.ts +183 -136
  112. package/node_modules/@types/node/domain.d.ts +32 -12
  113. package/node_modules/@types/node/events.d.ts +696 -728
  114. package/node_modules/@types/node/fs/promises.d.ts +85 -256
  115. package/node_modules/@types/node/fs.d.ts +525 -865
  116. package/node_modules/@types/node/globals.d.ts +34 -12
  117. package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
  118. package/node_modules/@types/node/http.d.ts +311 -432
  119. package/node_modules/@types/node/http2.d.ts +891 -545
  120. package/node_modules/@types/node/https.d.ts +243 -64
  121. package/node_modules/@types/node/index.d.ts +7 -25
  122. package/node_modules/@types/node/inspector.d.ts +58 -70
  123. package/node_modules/@types/node/inspector.generated.d.ts +411 -765
  124. package/node_modules/@types/node/module.d.ts +219 -54
  125. package/node_modules/@types/node/net.d.ts +222 -208
  126. package/node_modules/@types/node/os.d.ts +49 -41
  127. package/node_modules/@types/node/package.json +3 -13
  128. package/node_modules/@types/node/path.d.ts +141 -119
  129. package/node_modules/@types/node/perf_hooks.d.ts +673 -310
  130. package/node_modules/@types/node/process.d.ts +205 -389
  131. package/node_modules/@types/node/punycode.d.ts +31 -3
  132. package/node_modules/@types/node/querystring.d.ts +16 -3
  133. package/node_modules/@types/node/readline/promises.d.ts +6 -3
  134. package/node_modules/@types/node/readline.d.ts +152 -66
  135. package/node_modules/@types/node/repl.d.ts +109 -101
  136. package/node_modules/@types/node/sea.d.ts +116 -1
  137. package/node_modules/@types/node/sqlite.d.ts +68 -486
  138. package/node_modules/@types/node/stream/consumers.d.ts +15 -91
  139. package/node_modules/@types/node/stream/promises.d.ts +15 -136
  140. package/node_modules/@types/node/stream/web.d.ts +456 -179
  141. package/node_modules/@types/node/stream.d.ts +491 -603
  142. package/node_modules/@types/node/string_decoder.d.ts +43 -3
  143. package/node_modules/@types/node/test.d.ts +292 -513
  144. package/node_modules/@types/node/timers/promises.d.ts +18 -3
  145. package/node_modules/@types/node/timers.d.ts +141 -3
  146. package/node_modules/@types/node/tls.d.ts +242 -140
  147. package/node_modules/@types/node/trace_events.d.ts +97 -3
  148. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +8 -7
  149. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
  150. package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
  151. package/node_modules/@types/node/tty.d.ts +43 -61
  152. package/node_modules/@types/node/url.d.ts +584 -156
  153. package/node_modules/@types/node/util.d.ts +1110 -181
  154. package/node_modules/@types/node/v8.d.ts +36 -175
  155. package/node_modules/@types/node/vm.d.ts +209 -292
  156. package/node_modules/@types/node/wasi.d.ts +74 -24
  157. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
  158. package/node_modules/@types/node/web-globals/domexception.d.ts +0 -15
  159. package/node_modules/@types/node/web-globals/events.d.ts +0 -9
  160. package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
  161. package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
  162. package/node_modules/@types/node/web-globals/streams.d.ts +0 -93
  163. package/node_modules/@types/node/worker_threads.d.ts +407 -257
  164. package/node_modules/@types/node/zlib.d.ts +165 -7
  165. package/node_modules/hono/dist/cjs/client/client.js +4 -4
  166. package/node_modules/hono/dist/cjs/hono-base.js +7 -6
  167. package/node_modules/hono/dist/cjs/jsx/base.js +18 -1
  168. package/node_modules/hono/dist/cjs/jsx/components.js +25 -26
  169. package/node_modules/hono/dist/cjs/jsx/context.js +5 -5
  170. package/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
  171. package/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +2 -2
  172. package/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
  173. package/node_modules/hono/dist/client/client.js +4 -4
  174. package/node_modules/hono/dist/hono-base.js +7 -6
  175. package/node_modules/hono/dist/jsx/base.js +15 -1
  176. package/node_modules/hono/dist/jsx/components.js +26 -27
  177. package/node_modules/hono/dist/jsx/context.js +6 -6
  178. package/node_modules/hono/dist/jsx/dom/server.js +5 -1
  179. package/node_modules/hono/dist/jsx/intrinsic-element/components.js +3 -3
  180. package/node_modules/hono/dist/jsx/streaming.js +5 -6
  181. package/node_modules/hono/dist/types/context.d.ts +2 -2
  182. package/node_modules/hono/dist/types/jsx/base.d.ts +3 -0
  183. package/node_modules/hono/package.json +2 -2
  184. package/node_modules/jose/dist/types/index.d.ts +1 -2
  185. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -11
  186. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +13 -16
  187. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -11
  188. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -19
  189. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +10 -16
  190. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +18 -21
  191. package/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -1
  192. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +4 -6
  193. package/node_modules/jose/dist/types/jwks/local.d.ts +5 -4
  194. package/node_modules/jose/dist/types/jwks/remote.d.ts +20 -21
  195. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +4 -4
  196. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +8 -11
  197. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -5
  198. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +8 -11
  199. package/node_modules/jose/dist/types/jws/general/sign.d.ts +10 -14
  200. package/node_modules/jose/dist/types/jws/general/verify.d.ts +11 -17
  201. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +14 -11
  202. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +24 -22
  203. package/node_modules/jose/dist/types/jwt/sign.d.ts +3 -7
  204. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -6
  205. package/node_modules/jose/dist/types/jwt/verify.d.ts +13 -6
  206. package/node_modules/jose/dist/types/key/export.d.ts +6 -6
  207. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +9 -14
  208. package/node_modules/jose/dist/types/key/generate_secret.d.ts +10 -10
  209. package/node_modules/jose/dist/types/key/import.d.ts +19 -18
  210. package/node_modules/jose/dist/types/types.d.ts +152 -247
  211. package/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
  212. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +6 -1
  213. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -3
  214. package/node_modules/jose/dist/types/util/errors.d.ts +29 -40
  215. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +1 -2
  216. package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +9 -26
  217. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +3 -3
  218. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +11 -30
  219. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +6 -6
  220. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -57
  221. package/node_modules/jose/dist/webapi/jwk/embedded.js +3 -4
  222. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +3 -6
  223. package/node_modules/jose/dist/webapi/jwks/local.js +16 -10
  224. package/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
  225. package/node_modules/jose/dist/webapi/jws/compact/sign.js +2 -4
  226. package/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
  227. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +8 -15
  228. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +4 -14
  229. package/node_modules/jose/dist/webapi/jws/general/sign.js +4 -11
  230. package/node_modules/jose/dist/webapi/jws/general/verify.js +5 -7
  231. package/node_modules/jose/dist/webapi/jwt/decrypt.js +2 -3
  232. package/node_modules/jose/dist/webapi/jwt/encrypt.js +11 -25
  233. package/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
  234. package/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -2
  235. package/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
  236. package/node_modules/jose/dist/webapi/key/export.js +12 -16
  237. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +4 -13
  238. package/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
  239. package/node_modules/jose/dist/webapi/key/import.js +5 -9
  240. package/node_modules/jose/dist/webapi/lib/asn1.js +2 -4
  241. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +35 -0
  242. package/node_modules/jose/dist/webapi/lib/content_encryption.js +21 -29
  243. package/node_modules/jose/dist/webapi/lib/deflate.js +9 -19
  244. package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -4
  245. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +21 -54
  246. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +26 -59
  247. package/node_modules/jose/dist/webapi/lib/jws_sign.js +29 -43
  248. package/node_modules/jose/dist/webapi/lib/jws_verify.js +37 -45
  249. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
  250. package/node_modules/jose/dist/webapi/lib/key.js +119 -59
  251. package/node_modules/jose/dist/webapi/lib/key_management.js +45 -80
  252. package/node_modules/jose/dist/webapi/lib/{options.js → validate.js} +64 -3
  253. package/node_modules/jose/dist/webapi/util/base64url.js +5 -19
  254. package/node_modules/jose/dist/webapi/util/decode_jwt.js +1 -1
  255. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +1 -1
  256. package/node_modules/jose/package.json +1 -1
  257. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
  258. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  259. package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
  260. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  261. package/node_modules/undici/lib/handler/cache-handler.js +21 -5
  262. package/node_modules/undici/lib/handler/retry-handler.js +42 -7
  263. package/node_modules/undici/lib/interceptor/cache.js +20 -1
  264. package/node_modules/undici/lib/interceptor/decompress.js +146 -14
  265. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  266. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
  267. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  268. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  269. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  270. package/node_modules/undici/package.json +1 -1
  271. package/node_modules/undici/types/interceptors.d.ts +2 -0
  272. package/node_modules/undici-types/agent.d.ts +13 -12
  273. package/node_modules/undici-types/api.d.ts +26 -26
  274. package/node_modules/undici-types/balanced-pool.d.ts +12 -13
  275. package/node_modules/undici-types/client.d.ts +34 -55
  276. package/node_modules/undici-types/connector.d.ts +2 -4
  277. package/node_modules/undici-types/cookies.d.ts +0 -2
  278. package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
  279. package/node_modules/undici-types/dispatcher.d.ts +137 -134
  280. package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
  281. package/node_modules/undici-types/errors.d.ts +54 -82
  282. package/node_modules/undici-types/eventsource.d.ts +4 -9
  283. package/node_modules/undici-types/fetch.d.ts +24 -46
  284. package/node_modules/undici-types/file.d.ts +39 -0
  285. package/node_modules/undici-types/filereader.d.ts +54 -0
  286. package/node_modules/undici-types/formdata.d.ts +7 -7
  287. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  288. package/node_modules/undici-types/global-origin.d.ts +5 -5
  289. package/node_modules/undici-types/handlers.d.ts +9 -8
  290. package/node_modules/undici-types/header.d.ts +1 -162
  291. package/node_modules/undici-types/index.d.ts +47 -69
  292. package/node_modules/undici-types/interceptors.d.ts +9 -72
  293. package/node_modules/undici-types/mock-agent.d.ts +18 -36
  294. package/node_modules/undici-types/mock-client.d.ts +4 -6
  295. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  296. package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
  297. package/node_modules/undici-types/mock-pool.d.ts +4 -6
  298. package/node_modules/undici-types/package.json +1 -1
  299. package/node_modules/undici-types/patch.d.ts +4 -0
  300. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  301. package/node_modules/undici-types/pool.d.ts +14 -14
  302. package/node_modules/undici-types/proxy-agent.d.ts +6 -7
  303. package/node_modules/undici-types/readable.d.ts +16 -19
  304. package/node_modules/undici-types/retry-agent.d.ts +1 -1
  305. package/node_modules/undici-types/retry-handler.d.ts +10 -19
  306. package/node_modules/undici-types/util.d.ts +3 -3
  307. package/node_modules/undici-types/webidl.d.ts +30 -148
  308. package/node_modules/undici-types/websocket.d.ts +10 -48
  309. package/node_modules/zod/compile.cjs +19 -0
  310. package/node_modules/zod/index.cjs +19 -0
  311. package/node_modules/zod/locales/index.cjs +19 -0
  312. package/node_modules/zod/mini/index.cjs +19 -0
  313. package/node_modules/zod/package.json +8 -7
  314. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  315. package/node_modules/zod/src/v4/classic/checks.ts +0 -1
  316. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  317. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  318. package/node_modules/zod/src/v4/classic/schemas.ts +255 -164
  319. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +59 -9
  320. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  321. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  322. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +274 -0
  323. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  324. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  325. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  326. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
  327. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  328. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  329. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +18 -2
  330. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  331. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  332. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  333. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  334. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  335. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +225 -0
  336. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  337. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  338. package/node_modules/zod/src/v4/classic/tests/string.test.ts +25 -0
  339. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  340. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +147 -3
  341. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  342. package/node_modules/zod/src/v4/core/api.ts +30 -6
  343. package/node_modules/zod/src/v4/core/checks.ts +1 -101
  344. package/node_modules/zod/src/v4/core/compile.ts +202 -88
  345. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  346. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  347. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  348. package/node_modules/zod/src/v4/core/json-schema-processors.ts +226 -68
  349. package/node_modules/zod/src/v4/core/memoizer.ts +78 -28
  350. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  351. package/node_modules/zod/src/v4/core/regexes.ts +10 -4
  352. package/node_modules/zod/src/v4/core/schemas.ts +359 -122
  353. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  354. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  355. package/node_modules/zod/src/v4/core/tests/compile.test.ts +222 -2
  356. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  357. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  358. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  359. package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -8
  360. package/node_modules/zod/src/v4/core/util.ts +222 -147
  361. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  362. package/node_modules/zod/src/v4/core/visit.ts +11 -0
  363. package/node_modules/zod/src/v4/locales/ar.ts +1 -0
  364. package/node_modules/zod/src/v4/locales/az.ts +1 -0
  365. package/node_modules/zod/src/v4/locales/be.ts +1 -0
  366. package/node_modules/zod/src/v4/locales/bg.ts +1 -0
  367. package/node_modules/zod/src/v4/locales/bn.ts +1 -0
  368. package/node_modules/zod/src/v4/locales/ca.ts +1 -0
  369. package/node_modules/zod/src/v4/locales/ckb.ts +1 -0
  370. package/node_modules/zod/src/v4/locales/cs.ts +1 -0
  371. package/node_modules/zod/src/v4/locales/da.ts +1 -0
  372. package/node_modules/zod/src/v4/locales/de.ts +1 -0
  373. package/node_modules/zod/src/v4/locales/el.ts +1 -0
  374. package/node_modules/zod/src/v4/locales/en.ts +1 -0
  375. package/node_modules/zod/src/v4/locales/eo.ts +1 -0
  376. package/node_modules/zod/src/v4/locales/es.ts +1 -0
  377. package/node_modules/zod/src/v4/locales/fa.ts +1 -0
  378. package/node_modules/zod/src/v4/locales/fi.ts +1 -0
  379. package/node_modules/zod/src/v4/locales/fr-CA.ts +1 -0
  380. package/node_modules/zod/src/v4/locales/fr.ts +1 -0
  381. package/node_modules/zod/src/v4/locales/gu.ts +1 -0
  382. package/node_modules/zod/src/v4/locales/he.ts +1 -0
  383. package/node_modules/zod/src/v4/locales/hi.ts +1 -0
  384. package/node_modules/zod/src/v4/locales/hr.ts +1 -0
  385. package/node_modules/zod/src/v4/locales/hu.ts +1 -0
  386. package/node_modules/zod/src/v4/locales/hy.ts +1 -0
  387. package/node_modules/zod/src/v4/locales/id.ts +1 -0
  388. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  389. package/node_modules/zod/src/v4/locales/is.ts +1 -0
  390. package/node_modules/zod/src/v4/locales/it.ts +1 -0
  391. package/node_modules/zod/src/v4/locales/ja.ts +1 -0
  392. package/node_modules/zod/src/v4/locales/ka.ts +1 -0
  393. package/node_modules/zod/src/v4/locales/km.ts +1 -0
  394. package/node_modules/zod/src/v4/locales/kn.ts +1 -0
  395. package/node_modules/zod/src/v4/locales/ko.ts +1 -0
  396. package/node_modules/zod/src/v4/locales/lt.ts +1 -0
  397. package/node_modules/zod/src/v4/locales/mk.ts +1 -0
  398. package/node_modules/zod/src/v4/locales/ms.ts +1 -0
  399. package/node_modules/zod/src/v4/locales/ne.ts +1 -0
  400. package/node_modules/zod/src/v4/locales/nl.ts +1 -0
  401. package/node_modules/zod/src/v4/locales/nn.ts +1 -0
  402. package/node_modules/zod/src/v4/locales/no.ts +1 -0
  403. package/node_modules/zod/src/v4/locales/ota.ts +1 -0
  404. package/node_modules/zod/src/v4/locales/pl.ts +1 -0
  405. package/node_modules/zod/src/v4/locales/ps.ts +1 -0
  406. package/node_modules/zod/src/v4/locales/pt-BR.ts +1 -0
  407. package/node_modules/zod/src/v4/locales/pt.ts +1 -0
  408. package/node_modules/zod/src/v4/locales/ro.ts +1 -0
  409. package/node_modules/zod/src/v4/locales/ru.ts +1 -0
  410. package/node_modules/zod/src/v4/locales/sk.ts +1 -0
  411. package/node_modules/zod/src/v4/locales/sl.ts +1 -0
  412. package/node_modules/zod/src/v4/locales/sv.ts +1 -0
  413. package/node_modules/zod/src/v4/locales/ta.ts +1 -0
  414. package/node_modules/zod/src/v4/locales/tg.ts +134 -0
  415. package/node_modules/zod/src/v4/locales/th.ts +1 -0
  416. package/node_modules/zod/src/v4/locales/tk.ts +1 -0
  417. package/node_modules/zod/src/v4/locales/tr.ts +1 -0
  418. package/node_modules/zod/src/v4/locales/uk.ts +1 -0
  419. package/node_modules/zod/src/v4/locales/ur.ts +1 -0
  420. package/node_modules/zod/src/v4/locales/uz.ts +1 -0
  421. package/node_modules/zod/src/v4/locales/vi.ts +1 -0
  422. package/node_modules/zod/src/v4/locales/yo.ts +1 -0
  423. package/node_modules/zod/src/v4/locales/zh-CN.ts +1 -0
  424. package/node_modules/zod/src/v4/locales/zh-TW.ts +1 -0
  425. package/node_modules/zod/src/v4/mini/checks.ts +0 -1
  426. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  427. package/node_modules/zod/src/v4/mini/schemas.ts +39 -3
  428. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  429. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  430. package/node_modules/zod/src/v4/mini/tests/index.test.ts +30 -0
  431. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  432. package/node_modules/zod/src/v4/mini/tests/string.test.ts +16 -0
  433. package/node_modules/zod/v3/ZodError.cjs +19 -0
  434. package/node_modules/zod/v3/errors.cjs +19 -0
  435. package/node_modules/zod/v3/external.cjs +19 -0
  436. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  437. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  438. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  439. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  440. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  441. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  442. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  443. package/node_modules/zod/v3/index.cjs +19 -0
  444. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  445. package/node_modules/zod/v3/types.cjs +19 -0
  446. package/node_modules/zod/v4/classic/checks.cjs +20 -2
  447. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  448. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  449. package/node_modules/zod/v4/classic/checks.js +1 -1
  450. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  451. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  452. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  453. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  454. package/node_modules/zod/v4/classic/external.cjs +22 -1
  455. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  456. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  457. package/node_modules/zod/v4/classic/external.js +1 -1
  458. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  459. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  460. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  461. package/node_modules/zod/v4/classic/index.cjs +19 -0
  462. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  463. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  464. package/node_modules/zod/v4/classic/schemas.cjs +100 -31
  465. package/node_modules/zod/v4/classic/schemas.d.cts +17 -1
  466. package/node_modules/zod/v4/classic/schemas.d.ts +17 -1
  467. package/node_modules/zod/v4/classic/schemas.js +77 -29
  468. package/node_modules/zod/v4/core/api.cjs +37 -2
  469. package/node_modules/zod/v4/core/api.d.cts +6 -4
  470. package/node_modules/zod/v4/core/api.d.ts +6 -4
  471. package/node_modules/zod/v4/core/api.js +17 -2
  472. package/node_modules/zod/v4/core/checks.cjs +19 -96
  473. package/node_modules/zod/v4/core/checks.d.cts +1 -1
  474. package/node_modules/zod/v4/core/checks.d.ts +1 -1
  475. package/node_modules/zod/v4/core/checks.js +0 -96
  476. package/node_modules/zod/v4/core/compile.cjs +172 -72
  477. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  478. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  479. package/node_modules/zod/v4/core/compile.js +153 -73
  480. package/node_modules/zod/v4/core/core.cjs +19 -0
  481. package/node_modules/zod/v4/core/doc.cjs +26 -2
  482. package/node_modules/zod/v4/core/doc.js +7 -2
  483. package/node_modules/zod/v4/core/errors.cjs +21 -5
  484. package/node_modules/zod/v4/core/errors.js +2 -5
  485. package/node_modules/zod/v4/core/index.cjs +19 -0
  486. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  487. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  488. package/node_modules/zod/v4/core/json-schema-processors.cjs +215 -63
  489. package/node_modules/zod/v4/core/json-schema-processors.d.cts +17 -0
  490. package/node_modules/zod/v4/core/json-schema-processors.d.ts +17 -0
  491. package/node_modules/zod/v4/core/json-schema-processors.js +195 -64
  492. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  493. package/node_modules/zod/v4/core/memoizer.cjs +114 -23
  494. package/node_modules/zod/v4/core/memoizer.js +72 -23
  495. package/node_modules/zod/v4/core/parse.cjs +56 -16
  496. package/node_modules/zod/v4/core/parse.js +37 -16
  497. package/node_modules/zod/v4/core/regexes.cjs +29 -6
  498. package/node_modules/zod/v4/core/regexes.d.cts +2 -0
  499. package/node_modules/zod/v4/core/regexes.d.ts +2 -0
  500. package/node_modules/zod/v4/core/regexes.js +8 -4
  501. package/node_modules/zod/v4/core/registries.cjs +19 -0
  502. package/node_modules/zod/v4/core/schemas.cjs +331 -103
  503. package/node_modules/zod/v4/core/schemas.d.cts +43 -8
  504. package/node_modules/zod/v4/core/schemas.d.ts +43 -8
  505. package/node_modules/zod/v4/core/schemas.js +310 -102
  506. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  507. package/node_modules/zod/v4/core/to-json-schema.cjs +29 -7
  508. package/node_modules/zod/v4/core/to-json-schema.d.cts +7 -3
  509. package/node_modules/zod/v4/core/to-json-schema.d.ts +7 -3
  510. package/node_modules/zod/v4/core/to-json-schema.js +8 -7
  511. package/node_modules/zod/v4/core/util.cjs +181 -143
  512. package/node_modules/zod/v4/core/util.d.cts +25 -4
  513. package/node_modules/zod/v4/core/util.d.ts +25 -4
  514. package/node_modules/zod/v4/core/util.js +160 -143
  515. package/node_modules/zod/v4/core/versions.cjs +21 -2
  516. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  517. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  518. package/node_modules/zod/v4/core/versions.js +2 -2
  519. package/node_modules/zod/v4/core/visit.cjs +31 -0
  520. package/node_modules/zod/v4/core/visit.js +12 -0
  521. package/node_modules/zod/v4/index.cjs +19 -0
  522. package/node_modules/zod/v4/locales/ar.cjs +1 -0
  523. package/node_modules/zod/v4/locales/ar.js +1 -0
  524. package/node_modules/zod/v4/locales/az.cjs +1 -0
  525. package/node_modules/zod/v4/locales/az.js +1 -0
  526. package/node_modules/zod/v4/locales/be.cjs +1 -0
  527. package/node_modules/zod/v4/locales/be.js +1 -0
  528. package/node_modules/zod/v4/locales/bg.cjs +1 -0
  529. package/node_modules/zod/v4/locales/bg.js +1 -0
  530. package/node_modules/zod/v4/locales/bn.cjs +1 -0
  531. package/node_modules/zod/v4/locales/bn.js +1 -0
  532. package/node_modules/zod/v4/locales/ca.cjs +1 -0
  533. package/node_modules/zod/v4/locales/ca.js +1 -0
  534. package/node_modules/zod/v4/locales/ckb.cjs +1 -0
  535. package/node_modules/zod/v4/locales/ckb.js +1 -0
  536. package/node_modules/zod/v4/locales/cs.cjs +1 -0
  537. package/node_modules/zod/v4/locales/cs.js +1 -0
  538. package/node_modules/zod/v4/locales/da.cjs +1 -0
  539. package/node_modules/zod/v4/locales/da.js +1 -0
  540. package/node_modules/zod/v4/locales/de.cjs +1 -0
  541. package/node_modules/zod/v4/locales/de.js +1 -0
  542. package/node_modules/zod/v4/locales/el.cjs +1 -0
  543. package/node_modules/zod/v4/locales/el.js +1 -0
  544. package/node_modules/zod/v4/locales/en.cjs +1 -0
  545. package/node_modules/zod/v4/locales/en.js +1 -0
  546. package/node_modules/zod/v4/locales/eo.cjs +1 -0
  547. package/node_modules/zod/v4/locales/eo.js +1 -0
  548. package/node_modules/zod/v4/locales/es.cjs +1 -0
  549. package/node_modules/zod/v4/locales/es.js +1 -0
  550. package/node_modules/zod/v4/locales/fa.cjs +1 -0
  551. package/node_modules/zod/v4/locales/fa.js +1 -0
  552. package/node_modules/zod/v4/locales/fi.cjs +1 -0
  553. package/node_modules/zod/v4/locales/fi.js +1 -0
  554. package/node_modules/zod/v4/locales/fr-CA.cjs +1 -0
  555. package/node_modules/zod/v4/locales/fr-CA.js +1 -0
  556. package/node_modules/zod/v4/locales/fr.cjs +1 -0
  557. package/node_modules/zod/v4/locales/fr.js +1 -0
  558. package/node_modules/zod/v4/locales/gu.cjs +1 -0
  559. package/node_modules/zod/v4/locales/gu.js +1 -0
  560. package/node_modules/zod/v4/locales/he.cjs +1 -0
  561. package/node_modules/zod/v4/locales/he.js +1 -0
  562. package/node_modules/zod/v4/locales/hi.cjs +1 -0
  563. package/node_modules/zod/v4/locales/hi.js +1 -0
  564. package/node_modules/zod/v4/locales/hr.cjs +1 -0
  565. package/node_modules/zod/v4/locales/hr.js +1 -0
  566. package/node_modules/zod/v4/locales/hu.cjs +1 -0
  567. package/node_modules/zod/v4/locales/hu.js +1 -0
  568. package/node_modules/zod/v4/locales/hy.cjs +1 -0
  569. package/node_modules/zod/v4/locales/hy.js +1 -0
  570. package/node_modules/zod/v4/locales/id.cjs +1 -0
  571. package/node_modules/zod/v4/locales/id.js +1 -0
  572. package/node_modules/zod/v4/locales/index.cjs +22 -1
  573. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  574. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  575. package/node_modules/zod/v4/locales/index.js +1 -0
  576. package/node_modules/zod/v4/locales/is.cjs +1 -0
  577. package/node_modules/zod/v4/locales/is.js +1 -0
  578. package/node_modules/zod/v4/locales/it.cjs +1 -0
  579. package/node_modules/zod/v4/locales/it.js +1 -0
  580. package/node_modules/zod/v4/locales/ja.cjs +1 -0
  581. package/node_modules/zod/v4/locales/ja.js +1 -0
  582. package/node_modules/zod/v4/locales/ka.cjs +1 -0
  583. package/node_modules/zod/v4/locales/ka.js +1 -0
  584. package/node_modules/zod/v4/locales/km.cjs +1 -0
  585. package/node_modules/zod/v4/locales/km.js +1 -0
  586. package/node_modules/zod/v4/locales/kn.cjs +1 -0
  587. package/node_modules/zod/v4/locales/kn.js +1 -0
  588. package/node_modules/zod/v4/locales/ko.cjs +1 -0
  589. package/node_modules/zod/v4/locales/ko.js +1 -0
  590. package/node_modules/zod/v4/locales/lt.cjs +1 -0
  591. package/node_modules/zod/v4/locales/lt.js +1 -0
  592. package/node_modules/zod/v4/locales/mk.cjs +1 -0
  593. package/node_modules/zod/v4/locales/mk.js +1 -0
  594. package/node_modules/zod/v4/locales/ms.cjs +1 -0
  595. package/node_modules/zod/v4/locales/ms.js +1 -0
  596. package/node_modules/zod/v4/locales/ne.cjs +1 -0
  597. package/node_modules/zod/v4/locales/ne.js +1 -0
  598. package/node_modules/zod/v4/locales/nl.cjs +1 -0
  599. package/node_modules/zod/v4/locales/nl.js +1 -0
  600. package/node_modules/zod/v4/locales/nn.cjs +1 -0
  601. package/node_modules/zod/v4/locales/nn.js +1 -0
  602. package/node_modules/zod/v4/locales/no.cjs +1 -0
  603. package/node_modules/zod/v4/locales/no.js +1 -0
  604. package/node_modules/zod/v4/locales/ota.cjs +1 -0
  605. package/node_modules/zod/v4/locales/ota.js +1 -0
  606. package/node_modules/zod/v4/locales/pl.cjs +1 -0
  607. package/node_modules/zod/v4/locales/pl.js +1 -0
  608. package/node_modules/zod/v4/locales/ps.cjs +1 -0
  609. package/node_modules/zod/v4/locales/ps.js +1 -0
  610. package/node_modules/zod/v4/locales/pt-BR.cjs +1 -0
  611. package/node_modules/zod/v4/locales/pt-BR.js +1 -0
  612. package/node_modules/zod/v4/locales/pt.cjs +1 -0
  613. package/node_modules/zod/v4/locales/pt.js +1 -0
  614. package/node_modules/zod/v4/locales/ro.cjs +1 -0
  615. package/node_modules/zod/v4/locales/ro.js +1 -0
  616. package/node_modules/zod/v4/locales/ru.cjs +1 -0
  617. package/node_modules/zod/v4/locales/ru.js +1 -0
  618. package/node_modules/zod/v4/locales/sk.cjs +1 -0
  619. package/node_modules/zod/v4/locales/sk.js +1 -0
  620. package/node_modules/zod/v4/locales/sl.cjs +1 -0
  621. package/node_modules/zod/v4/locales/sl.js +1 -0
  622. package/node_modules/zod/v4/locales/sv.cjs +1 -0
  623. package/node_modules/zod/v4/locales/sv.js +1 -0
  624. package/node_modules/zod/v4/locales/ta.cjs +1 -0
  625. package/node_modules/zod/v4/locales/ta.js +1 -0
  626. package/node_modules/zod/v4/locales/tg.cjs +143 -0
  627. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  628. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  629. package/node_modules/zod/v4/locales/tg.js +116 -0
  630. package/node_modules/zod/v4/locales/th.cjs +1 -0
  631. package/node_modules/zod/v4/locales/th.js +1 -0
  632. package/node_modules/zod/v4/locales/tk.cjs +1 -0
  633. package/node_modules/zod/v4/locales/tk.js +1 -0
  634. package/node_modules/zod/v4/locales/tr.cjs +1 -0
  635. package/node_modules/zod/v4/locales/tr.js +1 -0
  636. package/node_modules/zod/v4/locales/uk.cjs +1 -0
  637. package/node_modules/zod/v4/locales/uk.js +1 -0
  638. package/node_modules/zod/v4/locales/ur.cjs +1 -0
  639. package/node_modules/zod/v4/locales/ur.js +1 -0
  640. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  641. package/node_modules/zod/v4/locales/uz.js +1 -0
  642. package/node_modules/zod/v4/locales/vi.cjs +1 -0
  643. package/node_modules/zod/v4/locales/vi.js +1 -0
  644. package/node_modules/zod/v4/locales/yo.cjs +1 -0
  645. package/node_modules/zod/v4/locales/yo.js +1 -0
  646. package/node_modules/zod/v4/locales/zh-CN.cjs +1 -0
  647. package/node_modules/zod/v4/locales/zh-CN.js +1 -0
  648. package/node_modules/zod/v4/locales/zh-TW.cjs +1 -0
  649. package/node_modules/zod/v4/locales/zh-TW.js +1 -0
  650. package/node_modules/zod/v4/mini/checks.cjs +20 -2
  651. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  652. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  653. package/node_modules/zod/v4/mini/checks.js +1 -1
  654. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  655. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  656. package/node_modules/zod/v4/mini/external.cjs +22 -1
  657. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  658. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  659. package/node_modules/zod/v4/mini/external.js +1 -1
  660. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  661. package/node_modules/zod/v4/mini/index.cjs +19 -0
  662. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  663. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  664. package/node_modules/zod/v4/mini/schemas.cjs +42 -4
  665. package/node_modules/zod/v4/mini/schemas.d.cts +9 -1
  666. package/node_modules/zod/v4/mini/schemas.d.ts +9 -1
  667. package/node_modules/zod/v4/mini/schemas.js +19 -2
  668. package/node_modules/zod/v4-mini/index.cjs +19 -0
  669. package/package.json +2 -2
  670. package/slingshot/index.js +151 -149
  671. package/node_modules/@types/node/ffi.d.ts +0 -486
  672. package/node_modules/@types/node/inspector/promises.d.ts +0 -35
  673. package/node_modules/@types/node/path/posix.d.ts +0 -8
  674. package/node_modules/@types/node/path/win32.d.ts +0 -8
  675. package/node_modules/@types/node/quic.d.ts +0 -2151
  676. package/node_modules/@types/node/stream/iter.d.ts +0 -452
  677. package/node_modules/@types/node/test/reporters.d.ts +0 -59
  678. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
  679. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
  680. package/node_modules/@types/node/ts5.7/index.d.ts +0 -118
  681. package/node_modules/@types/node/util/types.d.ts +0 -558
  682. package/node_modules/@types/node/vfs.d.ts +0 -210
  683. package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
  684. package/node_modules/@types/node/web-globals/console.d.ts +0 -9
  685. package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
  686. package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
  687. package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
  688. package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
  689. package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
  690. package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
  691. package/node_modules/@types/node/web-globals/url.d.ts +0 -24
  692. package/node_modules/@types/node/zlib/iter.d.ts +0 -131
  693. package/node_modules/jose/dist/webapi/lib/base64.js +0 -20
  694. package/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -27
  695. package/node_modules/jose/dist/webapi/lib/helpers.js +0 -45
  696. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -12
  697. package/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -19
  698. package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -19
  699. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -10
  700. package/node_modules/jose/dist/webapi/lib/key_options.js +0 -8
  701. package/node_modules/jose/dist/webapi/lib/signing.js +0 -22
  702. package/node_modules/jose/dist/webapi/lib/type_checks.js +0 -30
  703. package/node_modules/undici-types/cache-interceptor.d.ts +0 -179
  704. package/node_modules/undici-types/client-stats.d.ts +0 -15
  705. package/node_modules/undici-types/dispatcher1-wrapper.d.ts +0 -7
  706. package/node_modules/undici-types/h2c-client.d.ts +0 -73
  707. package/node_modules/undici-types/mock-call-history.d.ts +0 -111
  708. package/node_modules/undici-types/round-robin-pool.d.ts +0 -39
  709. package/node_modules/undici-types/snapshot-agent.d.ts +0 -113
  710. package/node_modules/undici-types/socks5-proxy-agent.d.ts +0 -25
  711. package/node_modules/undici-types/utility.d.ts +0 -7
@@ -1,42 +1,89 @@
1
- declare module "node:events" {
1
+ /**
2
+ * Much of the Node.js core API is built around an idiomatic asynchronous
3
+ * event-driven architecture in which certain kinds of objects (called "emitters")
4
+ * emit named events that cause `Function` objects ("listeners") to be called.
5
+ *
6
+ * For instance: a `net.Server` object emits an event each time a peer
7
+ * connects to it; a `fs.ReadStream` emits an event when the file is opened;
8
+ * a `stream` emits an event whenever data is available to be read.
9
+ *
10
+ * All objects that emit events are instances of the `EventEmitter` class. These
11
+ * objects expose an `eventEmitter.on()` function that allows one or more
12
+ * functions to be attached to named events emitted by the object. Typically,
13
+ * event names are camel-cased strings but any valid JavaScript property key
14
+ * can be used.
15
+ *
16
+ * When the `EventEmitter` object emits an event, all of the functions attached
17
+ * to that specific event are called _synchronously_. Any values returned by the
18
+ * called listeners are _ignored_ and discarded.
19
+ *
20
+ * The following example shows a simple `EventEmitter` instance with a single
21
+ * listener. The `eventEmitter.on()` method is used to register listeners, while
22
+ * the `eventEmitter.emit()` method is used to trigger the event.
23
+ *
24
+ * ```js
25
+ * import { EventEmitter } from 'node:events';
26
+ *
27
+ * class MyEmitter extends EventEmitter {}
28
+ *
29
+ * const myEmitter = new MyEmitter();
30
+ * myEmitter.on('event', () => {
31
+ * console.log('an event occurred!');
32
+ * });
33
+ * myEmitter.emit('event');
34
+ * ```
35
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/events.js)
36
+ */
37
+ declare module "events" {
2
38
  import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
3
- // #region Event map helpers
4
- type EventMap<T> = Record<keyof T, any[]>;
5
- type IfEventMap<Events extends EventMap<Events>, True, False> = {} extends Events ? False : True;
6
- type Args<Events extends EventMap<Events>, EventName extends string | symbol> = IfEventMap<
7
- Events,
8
- EventName extends keyof Events ? Events[EventName]
9
- : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName]
10
- : any[],
11
- any[]
12
- >;
13
- type EventNames<Events extends EventMap<Events>, EventName extends string | symbol> = IfEventMap<
14
- Events,
15
- EventName | (keyof Events & (string | symbol)) | keyof EventEmitterEventMap,
16
- string | symbol
17
- >;
18
- type Listener<Events extends EventMap<Events>, EventName extends string | symbol> = IfEventMap<
19
- Events,
20
- (
21
- ...args: EventName extends keyof Events ? Events[EventName]
22
- : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName]
23
- : any[]
24
- ) => void,
25
- (...args: any[]) => void
26
- >;
27
- interface EventEmitterEventMap {
28
- newListener: [eventName: string | symbol, listener: (...args: any[]) => void];
29
- removeListener: [eventName: string | symbol, listener: (...args: any[]) => void];
30
- }
31
- // #endregion
32
39
  interface EventEmitterOptions {
33
40
  /**
34
- * It enables
35
- * [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v26.x/api/events.html#capture-rejections-of-promises).
36
- * @default false
41
+ * Enables automatic capturing of promise rejection.
37
42
  */
38
43
  captureRejections?: boolean | undefined;
39
44
  }
45
+ interface StaticEventEmitterOptions {
46
+ /**
47
+ * Can be used to cancel awaiting events.
48
+ */
49
+ signal?: AbortSignal | undefined;
50
+ }
51
+ interface StaticEventEmitterIteratorOptions extends StaticEventEmitterOptions {
52
+ /**
53
+ * Names of events that will end the iteration.
54
+ */
55
+ close?: string[] | undefined;
56
+ /**
57
+ * The high watermark. The emitter is paused every time the size of events being buffered is higher than it.
58
+ * Supported only on emitters implementing `pause()` and `resume()` methods.
59
+ * @default Number.MAX_SAFE_INTEGER
60
+ */
61
+ highWaterMark?: number | undefined;
62
+ /**
63
+ * The low watermark. The emitter is resumed every time the size of events being buffered is lower than it.
64
+ * Supported only on emitters implementing `pause()` and `resume()` methods.
65
+ * @default 1
66
+ */
67
+ lowWaterMark?: number | undefined;
68
+ }
69
+ interface EventEmitter<T extends EventMap<T> = DefaultEventMap> extends NodeJS.EventEmitter<T> {}
70
+ type EventMap<T> = Record<keyof T, any[]> | DefaultEventMap;
71
+ type DefaultEventMap = [never];
72
+ type AnyRest = [...args: any[]];
73
+ type Args<K, T> = T extends DefaultEventMap ? AnyRest : (
74
+ K extends keyof T ? T[K] : never
75
+ );
76
+ type Key<K, T> = T extends DefaultEventMap ? string | symbol : K | keyof T;
77
+ type Key2<K, T> = T extends DefaultEventMap ? string | symbol : K & keyof T;
78
+ type Listener<K, T, F> = T extends DefaultEventMap ? F : (
79
+ K extends keyof T ? (
80
+ T[K] extends unknown[] ? (...args: T[K]) => void : never
81
+ )
82
+ : never
83
+ );
84
+ type Listener1<K, T> = Listener<K, T, (...args: any[]) => void>;
85
+ type Listener2<K, T> = Listener<K, T, Function>;
86
+
40
87
  /**
41
88
  * The `EventEmitter` class is defined and exposed by the `node:events` module:
42
89
  *
@@ -50,586 +97,96 @@ declare module "node:events" {
50
97
  * It supports the following option:
51
98
  * @since v0.1.26
52
99
  */
53
- class EventEmitter<T extends EventMap<T> = any> {
100
+ class EventEmitter<T extends EventMap<T> = DefaultEventMap> {
54
101
  constructor(options?: EventEmitterOptions);
55
- }
56
- interface EventEmitter<T extends EventMap<T> = any> extends NodeJS.EventEmitter<T> {}
57
- global {
58
- namespace NodeJS {
59
- interface EventEmitter<T extends EventMap<T> = any> {
60
- /**
61
- * The `Symbol.for('nodejs.rejection')` method is called in case a
62
- * promise rejection happens when emitting an event and
63
- * `captureRejections` is enabled on the emitter.
64
- * It is possible to use `events.captureRejectionSymbol` in
65
- * place of `Symbol.for('nodejs.rejection')`.
66
- *
67
- * ```js
68
- * import { EventEmitter, captureRejectionSymbol } from 'node:events';
69
- *
70
- * class MyClass extends EventEmitter {
71
- * constructor() {
72
- * super({ captureRejections: true });
73
- * }
74
- *
75
- * [captureRejectionSymbol](err, event, ...args) {
76
- * console.log('rejection happened for', event, 'with', err, ...args);
77
- * this.destroy(err);
78
- * }
79
- *
80
- * destroy(err) {
81
- * // Tear the resource down here.
82
- * }
83
- * }
84
- * ```
85
- * @since v13.4.0, v12.16.0
86
- */
87
- [EventEmitter.captureRejectionSymbol]?(error: Error, event: string | symbol, ...args: any[]): void;
88
- /**
89
- * Alias for `emitter.on(eventName, listener)`.
90
- * @since v0.1.26
91
- */
92
- addListener<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
93
- /**
94
- * Synchronously calls each of the listeners registered for the event named
95
- * `eventName`, in the order they were registered, passing the supplied arguments
96
- * to each.
97
- *
98
- * Returns `true` if the event had listeners, `false` otherwise.
99
- *
100
- * ```js
101
- * import { EventEmitter } from 'node:events';
102
- * const myEmitter = new EventEmitter();
103
- *
104
- * // First listener
105
- * myEmitter.on('event', function firstListener() {
106
- * console.log('Helloooo! first listener');
107
- * });
108
- * // Second listener
109
- * myEmitter.on('event', function secondListener(arg1, arg2) {
110
- * console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
111
- * });
112
- * // Third listener
113
- * myEmitter.on('event', function thirdListener(...args) {
114
- * const parameters = args.join(', ');
115
- * console.log(`event with parameters ${parameters} in third listener`);
116
- * });
117
- *
118
- * console.log(myEmitter.listeners('event'));
119
- *
120
- * myEmitter.emit('event', 1, 2, 3, 4, 5);
121
- *
122
- * // Prints:
123
- * // [
124
- * // [Function: firstListener],
125
- * // [Function: secondListener],
126
- * // [Function: thirdListener]
127
- * // ]
128
- * // Helloooo! first listener
129
- * // event with parameters 1, 2 in second listener
130
- * // event with parameters 1, 2, 3, 4, 5 in third listener
131
- * ```
132
- * @since v0.1.26
133
- */
134
- emit<E extends string | symbol>(eventName: EventNames<T, E>, ...args: Args<T, E>): boolean;
135
- /**
136
- * Returns an array listing the events for which the emitter has registered
137
- * listeners.
138
- *
139
- * ```js
140
- * import { EventEmitter } from 'node:events';
141
- *
142
- * const myEE = new EventEmitter();
143
- * myEE.on('foo', () => {});
144
- * myEE.on('bar', () => {});
145
- *
146
- * const sym = Symbol('symbol');
147
- * myEE.on(sym, () => {});
148
- *
149
- * console.log(myEE.eventNames());
150
- * // Prints: [ 'foo', 'bar', Symbol(symbol) ]
151
- * ```
152
- * @since v6.0.0
153
- */
154
- eventNames(): (string | symbol)[];
155
- /**
156
- * Returns the current max listener value for the `EventEmitter` which is either
157
- * set by `emitter.setMaxListeners(n)` or defaults to
158
- * `events.defaultMaxListeners`.
159
- * @since v1.0.0
160
- */
161
- getMaxListeners(): number;
162
- /**
163
- * Returns the number of listeners listening for the event named `eventName`.
164
- * If `listener` is provided, it will return how many times the listener is found
165
- * in the list of the listeners of the event.
166
- * @since v3.2.0
167
- * @param eventName The name of the event being listened for
168
- * @param listener The event handler function
169
- */
170
- listenerCount<E extends string | symbol>(
171
- eventName: EventNames<T, E>,
172
- listener?: Listener<T, E>,
173
- ): number;
174
- /**
175
- * Returns a copy of the array of listeners for the event named `eventName`.
176
- *
177
- * ```js
178
- * server.on('connection', (stream) => {
179
- * console.log('someone connected!');
180
- * });
181
- * console.log(util.inspect(server.listeners('connection')));
182
- * // Prints: [ [Function] ]
183
- * ```
184
- * @since v0.1.26
185
- */
186
- listeners<E extends string | symbol>(eventName: EventNames<T, E>): Listener<T, E>[];
187
- /**
188
- * Alias for `emitter.removeListener()`.
189
- * @since v10.0.0
190
- */
191
- off<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
192
- /**
193
- * Adds the `listener` function to the end of the listeners array for the
194
- * event named `eventName`. No checks are made to see if the `listener` has
195
- * already been added. Multiple calls passing the same combination of `eventName`
196
- * and `listener` will result in the `listener` being added, and called, multiple
197
- * times.
198
- *
199
- * ```js
200
- * server.on('connection', (stream) => {
201
- * console.log('someone connected!');
202
- * });
203
- * ```
204
- *
205
- * Returns a reference to the `EventEmitter`, so that calls can be chained.
206
- *
207
- * By default, event listeners are invoked in the order they are added. The
208
- * `emitter.prependListener()` method can be used as an alternative to add the
209
- * event listener to the beginning of the listeners array.
210
- *
211
- * ```js
212
- * import { EventEmitter } from 'node:events';
213
- * const myEE = new EventEmitter();
214
- * myEE.on('foo', () => console.log('a'));
215
- * myEE.prependListener('foo', () => console.log('b'));
216
- * myEE.emit('foo');
217
- * // Prints:
218
- * // b
219
- * // a
220
- * ```
221
- * @since v0.1.101
222
- * @param eventName The name of the event.
223
- * @param listener The callback function
224
- */
225
- on<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
226
- /**
227
- * Adds a **one-time** `listener` function for the event named `eventName`. The
228
- * next time `eventName` is triggered, this listener is removed and then invoked.
229
- *
230
- * ```js
231
- * server.once('connection', (stream) => {
232
- * console.log('Ah, we have our first user!');
233
- * });
234
- * ```
235
- *
236
- * Returns a reference to the `EventEmitter`, so that calls can be chained.
237
- *
238
- * By default, event listeners are invoked in the order they are added. The
239
- * `emitter.prependOnceListener()` method can be used as an alternative to add the
240
- * event listener to the beginning of the listeners array.
241
- *
242
- * ```js
243
- * import { EventEmitter } from 'node:events';
244
- * const myEE = new EventEmitter();
245
- * myEE.once('foo', () => console.log('a'));
246
- * myEE.prependOnceListener('foo', () => console.log('b'));
247
- * myEE.emit('foo');
248
- * // Prints:
249
- * // b
250
- * // a
251
- * ```
252
- * @since v0.3.0
253
- * @param eventName The name of the event.
254
- * @param listener The callback function
255
- */
256
- once<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
257
- /**
258
- * Adds the `listener` function to the _beginning_ of the listeners array for the
259
- * event named `eventName`. No checks are made to see if the `listener` has
260
- * already been added. Multiple calls passing the same combination of `eventName`
261
- * and `listener` will result in the `listener` being added, and called, multiple
262
- * times.
263
- *
264
- * ```js
265
- * server.prependListener('connection', (stream) => {
266
- * console.log('someone connected!');
267
- * });
268
- * ```
269
- *
270
- * Returns a reference to the `EventEmitter`, so that calls can be chained.
271
- * @since v6.0.0
272
- * @param eventName The name of the event.
273
- * @param listener The callback function
274
- */
275
- prependListener<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
276
- /**
277
- * Adds a **one-time** `listener` function for the event named `eventName` to the
278
- * _beginning_ of the listeners array. The next time `eventName` is triggered, this
279
- * listener is removed, and then invoked.
280
- *
281
- * ```js
282
- * server.prependOnceListener('connection', (stream) => {
283
- * console.log('Ah, we have our first user!');
284
- * });
285
- * ```
286
- *
287
- * Returns a reference to the `EventEmitter`, so that calls can be chained.
288
- * @since v6.0.0
289
- * @param eventName The name of the event.
290
- * @param listener The callback function
291
- */
292
- prependOnceListener<E extends string | symbol>(
293
- eventName: EventNames<T, E>,
294
- listener: Listener<T, E>,
295
- ): this;
296
- /**
297
- * Returns a copy of the array of listeners for the event named `eventName`,
298
- * including any wrappers (such as those created by `.once()`).
299
- *
300
- * ```js
301
- * import { EventEmitter } from 'node:events';
302
- * const emitter = new EventEmitter();
303
- * emitter.once('log', () => console.log('log once'));
304
- *
305
- * // Returns a new Array with a function `onceWrapper` which has a property
306
- * // `listener` which contains the original listener bound above
307
- * const listeners = emitter.rawListeners('log');
308
- * const logFnWrapper = listeners[0];
309
- *
310
- * // Logs "log once" to the console and does not unbind the `once` event
311
- * logFnWrapper.listener();
312
- *
313
- * // Logs "log once" to the console and removes the listener
314
- * logFnWrapper();
315
- *
316
- * emitter.on('log', () => console.log('log persistently'));
317
- * // Will return a new Array with a single function bound by `.on()` above
318
- * const newListeners = emitter.rawListeners('log');
319
- *
320
- * // Logs "log persistently" twice
321
- * newListeners[0]();
322
- * emitter.emit('log');
323
- * ```
324
- * @since v9.4.0
325
- */
326
- rawListeners<E extends string | symbol>(eventName: EventNames<T, E>): Listener<T, E>[];
327
- /**
328
- * Removes all listeners, or those of the specified `eventName`.
329
- *
330
- * It is bad practice to remove listeners added elsewhere in the code,
331
- * particularly when the `EventEmitter` instance was created by some other
332
- * component or module (e.g. sockets or file streams).
333
- *
334
- * Returns a reference to the `EventEmitter`, so that calls can be chained.
335
- * @since v0.1.26
336
- */
337
- // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
338
- removeAllListeners<E extends string | symbol>(eventName?: EventNames<T, E>): this;
339
- /**
340
- * Removes the specified `listener` from the listener array for the event named
341
- * `eventName`.
342
- *
343
- * ```js
344
- * const callback = (stream) => {
345
- * console.log('someone connected!');
346
- * };
347
- * server.on('connection', callback);
348
- * // ...
349
- * server.removeListener('connection', callback);
350
- * ```
351
- *
352
- * `removeListener()` will remove, at most, one instance of a listener from the
353
- * listener array. If any single listener has been added multiple times to the
354
- * listener array for the specified `eventName`, then `removeListener()` must be
355
- * called multiple times to remove each instance.
356
- *
357
- * Once an event is emitted, all listeners attached to it at the
358
- * time of emitting are called in order. This implies that any
359
- * `removeListener()` or `removeAllListeners()` calls _after_ emitting and
360
- * _before_ the last listener finishes execution will not remove them from
361
- * `emit()` in progress. Subsequent events behave as expected.
362
- *
363
- * ```js
364
- * import { EventEmitter } from 'node:events';
365
- * class MyEmitter extends EventEmitter {}
366
- * const myEmitter = new MyEmitter();
367
- *
368
- * const callbackA = () => {
369
- * console.log('A');
370
- * myEmitter.removeListener('event', callbackB);
371
- * };
372
- *
373
- * const callbackB = () => {
374
- * console.log('B');
375
- * };
376
- *
377
- * myEmitter.on('event', callbackA);
378
- *
379
- * myEmitter.on('event', callbackB);
380
- *
381
- * // callbackA removes listener callbackB but it will still be called.
382
- * // Internal listener array at time of emit [callbackA, callbackB]
383
- * myEmitter.emit('event');
384
- * // Prints:
385
- * // A
386
- * // B
387
- *
388
- * // callbackB is now removed.
389
- * // Internal listener array [callbackA]
390
- * myEmitter.emit('event');
391
- * // Prints:
392
- * // A
393
- * ```
394
- *
395
- * Because listeners are managed using an internal array, calling this will
396
- * change the position indexes of any listener registered _after_ the listener
397
- * being removed. This will not impact the order in which listeners are called,
398
- * but it means that any copies of the listener array as returned by
399
- * the `emitter.listeners()` method will need to be recreated.
400
- *
401
- * When a single function has been added as a handler multiple times for a single
402
- * event (as in the example below), `removeListener()` will remove the most
403
- * recently added instance. In the example the `once('ping')`
404
- * listener is removed:
405
- *
406
- * ```js
407
- * import { EventEmitter } from 'node:events';
408
- * const ee = new EventEmitter();
409
- *
410
- * function pong() {
411
- * console.log('pong');
412
- * }
413
- *
414
- * ee.on('ping', pong);
415
- * ee.once('ping', pong);
416
- * ee.removeListener('ping', pong);
417
- *
418
- * ee.emit('ping');
419
- * ee.emit('ping');
420
- * ```
421
- *
422
- * Returns a reference to the `EventEmitter`, so that calls can be chained.
423
- * @since v0.1.26
424
- */
425
- removeListener<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
426
- /**
427
- * By default `EventEmitter`s will print a warning if more than `10` listeners are
428
- * added for a particular event. This is a useful default that helps finding
429
- * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
430
- * modified for this specific `EventEmitter` instance. The value can be set to
431
- * `Infinity` (or `0`) to indicate an unlimited number of listeners.
432
- *
433
- * Returns a reference to the `EventEmitter`, so that calls can be chained.
434
- * @since v0.3.5
435
- */
436
- setMaxListeners(n: number): this;
437
- }
438
- }
439
- }
440
- namespace EventEmitter {
441
- export { EventEmitter, EventEmitterEventMap, EventEmitterOptions };
442
- }
443
- namespace EventEmitter {
444
- interface Abortable {
445
- signal?: AbortSignal | undefined;
446
- }
447
- /**
448
- * See how to write a custom [rejection handler](https://nodejs.org/docs/latest-v26.x/api/events.html#emittersymbolfornodejsrejectionerr-eventname-args).
449
- * @since v13.4.0, v12.16.0
450
- */
451
- const captureRejectionSymbol: unique symbol;
452
- /**
453
- * Change the default `captureRejections` option on all new `EventEmitter` objects.
454
- * @since v13.4.0, v12.16.0
455
- */
456
- let captureRejections: boolean;
102
+
103
+ [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: Key<K, T>, ...args: Args<K, T>): void;
104
+
457
105
  /**
458
- * By default, a maximum of `10` listeners can be registered for any single
459
- * event. This limit can be changed for individual `EventEmitter` instances
460
- * using the `emitter.setMaxListeners(n)` method. To change the default
461
- * for _all_ `EventEmitter` instances, the `events.defaultMaxListeners`
462
- * property can be used. If this value is not a positive number, a `RangeError`
463
- * is thrown.
464
- *
465
- * Take caution when setting the `events.defaultMaxListeners` because the
466
- * change affects _all_ `EventEmitter` instances, including those created before
467
- * the change is made. However, calling `emitter.setMaxListeners(n)` still has
468
- * precedence over `events.defaultMaxListeners`.
469
- *
470
- * This is not a hard limit. The `EventEmitter` instance will allow
471
- * more listeners to be added but will output a trace warning to stderr indicating
472
- * that a "possible EventEmitter memory leak" has been detected. For any single
473
- * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`
474
- * methods can be used to temporarily avoid this warning:
106
+ * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
107
+ * event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
108
+ * The `Promise` will resolve with an array of all the arguments emitted to the
109
+ * given event.
475
110
  *
476
- * `defaultMaxListeners` has no effect on `AbortSignal` instances. While it is
477
- * still possible to use `emitter.setMaxListeners(n)` to set a warning limit
478
- * for individual `AbortSignal` instances, per default `AbortSignal` instances will not warn.
111
+ * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
112
+ * semantics and does not listen to the `'error'` event.
479
113
  *
480
114
  * ```js
481
- * import { EventEmitter } from 'node:events';
482
- * const emitter = new EventEmitter();
483
- * emitter.setMaxListeners(emitter.getMaxListeners() + 1);
484
- * emitter.once('event', () => {
485
- * // do stuff
486
- * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
487
- * });
488
- * ```
115
+ * import { once, EventEmitter } from 'node:events';
116
+ * import process from 'node:process';
489
117
  *
490
- * The `--trace-warnings` command-line flag can be used to display the
491
- * stack trace for such warnings.
118
+ * const ee = new EventEmitter();
492
119
  *
493
- * The emitted warning can be inspected with `process.on('warning')` and will
494
- * have the additional `emitter`, `type`, and `count` properties, referring to
495
- * the event emitter instance, the event's name and the number of attached
496
- * listeners, respectively.
497
- * Its `name` property is set to `'MaxListenersExceededWarning'`.
498
- * @since v0.11.2
499
- */
500
- let defaultMaxListeners: number;
501
- /**
502
- * This symbol shall be used to install a listener for only monitoring `'error'`
503
- * events. Listeners installed using this symbol are called before the regular
504
- * `'error'` listeners are called.
120
+ * process.nextTick(() => {
121
+ * ee.emit('myevent', 42);
122
+ * });
505
123
  *
506
- * Installing a listener using this symbol does not change the behavior once an
507
- * `'error'` event is emitted. Therefore, the process will still crash if no
508
- * regular `'error'` listener is installed.
509
- * @since v13.6.0, v12.17.0
510
- */
511
- const errorMonitor: unique symbol;
512
- /**
513
- * Listens once to the `abort` event on the provided `signal`.
124
+ * const [value] = await once(ee, 'myevent');
125
+ * console.log(value);
514
126
  *
515
- * Listening to the `abort` event on abort signals is unsafe and may
516
- * lead to resource leaks since another third party with the signal can
517
- * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change
518
- * this since it would violate the web standard. Additionally, the original
519
- * API makes it easy to forget to remove listeners.
127
+ * const err = new Error('kaboom');
128
+ * process.nextTick(() => {
129
+ * ee.emit('error', err);
130
+ * });
520
131
  *
521
- * This API allows safely using `AbortSignal`s in Node.js APIs by solving these
522
- * two issues by listening to the event such that `stopImmediatePropagation` does
523
- * not prevent the listener from running.
132
+ * try {
133
+ * await once(ee, 'myevent');
134
+ * } catch (err) {
135
+ * console.error('error happened', err);
136
+ * }
137
+ * ```
524
138
  *
525
- * Returns a disposable so that it may be unsubscribed from more easily.
139
+ * The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the
140
+ * '`error'` event itself, then it is treated as any other kind of event without
141
+ * special handling:
526
142
  *
527
143
  * ```js
528
- * import { addAbortListener } from 'node:events';
529
- *
530
- * function example(signal) {
531
- * signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
532
- * // addAbortListener() returns a disposable, so the `using` keyword ensures
533
- * // the abort listener is automatically removed when this scope exits.
534
- * using _ = addAbortListener(signal, (e) => {
535
- * // Do something when signal is aborted.
536
- * });
537
- * }
538
- * ```
539
- * @since v20.5.0
540
- * @return Disposable that removes the `abort` listener.
541
- */
542
- function addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable;
543
- /**
544
- * Returns a copy of the array of listeners for the event named `eventName`.
144
+ * import { EventEmitter, once } from 'node:events';
545
145
  *
546
- * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
547
- * the emitter.
146
+ * const ee = new EventEmitter();
548
147
  *
549
- * For `EventTarget`s this is the only way to get the event listeners for the
550
- * event target. This is useful for debugging and diagnostic purposes.
148
+ * once(ee, 'error')
149
+ * .then(([err]) => console.log('ok', err.message))
150
+ * .catch((err) => console.error('error', err.message));
551
151
  *
552
- * ```js
553
- * import { getEventListeners, EventEmitter } from 'node:events';
152
+ * ee.emit('error', new Error('boom'));
554
153
  *
555
- * {
556
- * const ee = new EventEmitter();
557
- * const listener = () => console.log('Events are fun');
558
- * ee.on('foo', listener);
559
- * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
560
- * }
561
- * {
562
- * const et = new EventTarget();
563
- * const listener = () => console.log('Events are fun');
564
- * et.addEventListener('foo', listener);
565
- * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
566
- * }
154
+ * // Prints: ok boom
567
155
  * ```
568
- * @since v15.2.0, v14.17.0
569
- */
570
- function getEventListeners(emitter: EventEmitter, name: string | symbol): ((...args: any[]) => void)[];
571
- function getEventListeners(emitter: EventTarget, name: string): ((...args: any[]) => void)[];
572
- /**
573
- * Returns the currently set max amount of listeners.
574
- *
575
- * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
576
- * the emitter.
577
156
  *
578
- * For `EventTarget`s this is the only way to get the max event listeners for the
579
- * event target. If the number of event handlers on a single EventTarget exceeds
580
- * the max set, the EventTarget will print a warning.
157
+ * An `AbortSignal` can be used to cancel waiting for the event:
581
158
  *
582
159
  * ```js
583
- * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
160
+ * import { EventEmitter, once } from 'node:events';
584
161
  *
585
- * {
586
- * const ee = new EventEmitter();
587
- * console.log(getMaxListeners(ee)); // 10
588
- * setMaxListeners(11, ee);
589
- * console.log(getMaxListeners(ee)); // 11
590
- * }
591
- * {
592
- * const et = new EventTarget();
593
- * console.log(getMaxListeners(et)); // 10
594
- * setMaxListeners(11, et);
595
- * console.log(getMaxListeners(et)); // 11
596
- * }
597
- * ```
598
- * @since v19.9.0
599
- */
600
- function getMaxListeners(emitter: EventEmitter | EventTarget): number;
601
- /**
602
- * Returns the number of registered listeners for the event named `eventName`.
162
+ * const ee = new EventEmitter();
163
+ * const ac = new AbortController();
603
164
  *
604
- * For `EventEmitter`s this behaves exactly the same as calling `.listenerCount`
605
- * on the emitter.
165
+ * async function foo(emitter, event, signal) {
166
+ * try {
167
+ * await once(emitter, event, { signal });
168
+ * console.log('event emitted!');
169
+ * } catch (error) {
170
+ * if (error.name === 'AbortError') {
171
+ * console.error('Waiting for the event was canceled!');
172
+ * } else {
173
+ * console.error('There was an error', error.message);
174
+ * }
175
+ * }
176
+ * }
606
177
  *
607
- * For `EventTarget`s this is the only way to obtain the listener count. This can
608
- * be useful for debugging and diagnostic purposes.
609
- * @since v0.9.12
178
+ * foo(ee, 'foo', ac.signal);
179
+ * ac.abort(); // Abort waiting for the event
180
+ * ee.emit('foo'); // Prints: Waiting for the event was canceled!
181
+ * ```
182
+ * @since v11.13.0, v10.16.0
610
183
  */
611
- function listenerCount(emitter: EventEmitter, eventName: string | symbol): number;
612
- function listenerCount(emitter: EventTarget, eventName: string): number;
613
- interface OnOptions extends Abortable {
614
- /**
615
- * Names of events that will end the iteration.
616
- */
617
- close?: readonly string[] | undefined;
618
- /**
619
- * The high watermark. The emitter is paused every time the size of events
620
- * being buffered is higher than it. Supported only on emitters implementing
621
- * `pause()` and `resume()` methods.
622
- * @default Number.MAX_SAFE_INTEGER
623
- */
624
- highWaterMark?: number | undefined;
625
- /**
626
- * The low watermark. The emitter is resumed every time the size of events
627
- * being buffered is lower than it. Supported only on emitters implementing
628
- * `pause()` and `resume()` methods.
629
- * @default 1
630
- */
631
- lowWaterMark?: number | undefined;
632
- }
184
+ static once(
185
+ emitter: NodeJS.EventEmitter,
186
+ eventName: string | symbol,
187
+ options?: StaticEventEmitterOptions,
188
+ ): Promise<any[]>;
189
+ static once(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
633
190
  /**
634
191
  * ```js
635
192
  * import { on, EventEmitter } from 'node:events';
@@ -685,106 +242,116 @@ declare module "node:events" {
685
242
  *
686
243
  * process.nextTick(() => ac.abort());
687
244
  * ```
688
- * @since v13.6.0, v12.16.0
689
- * @returns `AsyncIterator` that iterates `eventName` events emitted by the `emitter`
690
- */
691
- function on(
692
- emitter: EventEmitter,
693
- eventName: string | symbol,
694
- options?: OnOptions,
695
- ): NodeJS.AsyncIterator<any[]>;
696
- function on(
697
- emitter: EventTarget,
698
- eventName: string,
699
- options?: OnOptions,
700
- ): NodeJS.AsyncIterator<any[]>;
701
- interface OnceOptions extends Abortable {}
702
- /**
703
- * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
704
- * event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
705
- * The `Promise` will resolve with an array of all the arguments emitted to the
706
- * given event.
707
245
  *
708
- * This method is intentionally generic and works with the web platform
709
- * [EventTarget][WHATWG-EventTarget] interface, which has no special
710
- * `'error'` event semantics and does not listen to the `'error'` event.
246
+ * Use the `close` option to specify an array of event names that will end the iteration:
711
247
  *
712
248
  * ```js
713
- * import { once, EventEmitter } from 'node:events';
249
+ * import { on, EventEmitter } from 'node:events';
714
250
  * import process from 'node:process';
715
251
  *
716
252
  * const ee = new EventEmitter();
717
253
  *
254
+ * // Emit later on
718
255
  * process.nextTick(() => {
719
- * ee.emit('myevent', 42);
720
- * });
721
- *
722
- * const [value] = await once(ee, 'myevent');
723
- * console.log(value);
724
- *
725
- * const err = new Error('kaboom');
726
- * process.nextTick(() => {
727
- * ee.emit('error', err);
256
+ * ee.emit('foo', 'bar');
257
+ * ee.emit('foo', 42);
258
+ * ee.emit('close');
728
259
  * });
729
260
  *
730
- * try {
731
- * await once(ee, 'myevent');
732
- * } catch (err) {
733
- * console.error('error happened', err);
261
+ * for await (const event of on(ee, 'foo', { close: ['close'] })) {
262
+ * console.log(event); // prints ['bar'] [42]
734
263
  * }
264
+ * // the loop will exit after 'close' is emitted
265
+ * console.log('done'); // prints 'done'
735
266
  * ```
736
- *
737
- * The special handling of the `'error'` event is only used when `events.once()`
738
- * is used to wait for another event. If `events.once()` is used to wait for the
739
- * '`error'` event itself, then it is treated as any other kind of event without
740
- * special handling:
267
+ * @since v13.6.0, v12.16.0
268
+ * @return An `AsyncIterator` that iterates `eventName` events emitted by the `emitter`
269
+ */
270
+ static on(
271
+ emitter: NodeJS.EventEmitter,
272
+ eventName: string | symbol,
273
+ options?: StaticEventEmitterIteratorOptions,
274
+ ): NodeJS.AsyncIterator<any[]>;
275
+ static on(
276
+ emitter: EventTarget,
277
+ eventName: string,
278
+ options?: StaticEventEmitterIteratorOptions,
279
+ ): NodeJS.AsyncIterator<any[]>;
280
+ /**
281
+ * A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`.
741
282
  *
742
283
  * ```js
743
- * import { EventEmitter, once } from 'node:events';
284
+ * import { EventEmitter, listenerCount } from 'node:events';
744
285
  *
745
- * const ee = new EventEmitter();
286
+ * const myEmitter = new EventEmitter();
287
+ * myEmitter.on('event', () => {});
288
+ * myEmitter.on('event', () => {});
289
+ * console.log(listenerCount(myEmitter, 'event'));
290
+ * // Prints: 2
291
+ * ```
292
+ * @since v0.9.12
293
+ * @deprecated Since v3.2.0 - Use `listenerCount` instead.
294
+ * @param emitter The emitter to query
295
+ * @param eventName The event name
296
+ */
297
+ static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
298
+ /**
299
+ * Returns a copy of the array of listeners for the event named `eventName`.
746
300
  *
747
- * once(ee, 'error')
748
- * .then(([err]) => console.log('ok', err.message))
749
- * .catch((err) => console.error('error', err.message));
301
+ * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
302
+ * the emitter.
750
303
  *
751
- * ee.emit('error', new Error('boom'));
304
+ * For `EventTarget`s this is the only way to get the event listeners for the
305
+ * event target. This is useful for debugging and diagnostic purposes.
752
306
  *
753
- * // Prints: ok boom
307
+ * ```js
308
+ * import { getEventListeners, EventEmitter } from 'node:events';
309
+ *
310
+ * {
311
+ * const ee = new EventEmitter();
312
+ * const listener = () => console.log('Events are fun');
313
+ * ee.on('foo', listener);
314
+ * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
315
+ * }
316
+ * {
317
+ * const et = new EventTarget();
318
+ * const listener = () => console.log('Events are fun');
319
+ * et.addEventListener('foo', listener);
320
+ * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
321
+ * }
754
322
  * ```
323
+ * @since v15.2.0, v14.17.0
324
+ */
325
+ static getEventListeners(emitter: EventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
326
+ /**
327
+ * Returns the currently set max amount of listeners.
755
328
  *
756
- * An `AbortSignal` can be used to cancel waiting for the event:
329
+ * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
330
+ * the emitter.
757
331
  *
758
- * ```js
759
- * import { EventEmitter, once } from 'node:events';
332
+ * For `EventTarget`s this is the only way to get the max event listeners for the
333
+ * event target. If the number of event handlers on a single EventTarget exceeds
334
+ * the max set, the EventTarget will print a warning.
760
335
  *
761
- * const ee = new EventEmitter();
762
- * const ac = new AbortController();
336
+ * ```js
337
+ * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
763
338
  *
764
- * async function foo(emitter, event, signal) {
765
- * try {
766
- * await once(emitter, event, { signal });
767
- * console.log('event emitted!');
768
- * } catch (error) {
769
- * if (error.name === 'AbortError') {
770
- * console.error('Waiting for the event was canceled!');
771
- * } else {
772
- * console.error('There was an error', error.message);
773
- * }
774
- * }
339
+ * {
340
+ * const ee = new EventEmitter();
341
+ * console.log(getMaxListeners(ee)); // 10
342
+ * setMaxListeners(11, ee);
343
+ * console.log(getMaxListeners(ee)); // 11
344
+ * }
345
+ * {
346
+ * const et = new EventTarget();
347
+ * console.log(getMaxListeners(et)); // 10
348
+ * setMaxListeners(11, et);
349
+ * console.log(getMaxListeners(et)); // 11
775
350
  * }
776
- *
777
- * foo(ee, 'foo', ac.signal);
778
- * ac.abort(); // Prints: Waiting for the event was canceled!
779
351
  * ```
780
- * @since v11.13.0, v10.16.0
352
+ * @since v19.9.0
781
353
  */
782
- function once(
783
- emitter: EventEmitter,
784
- eventName: string | symbol,
785
- options?: OnceOptions,
786
- ): Promise<any[]>;
787
- function once(emitter: EventTarget, eventName: string, options?: OnceOptions): Promise<any[]>;
354
+ static getMaxListeners(emitter: EventTarget | NodeJS.EventEmitter): number;
788
355
  /**
789
356
  * ```js
790
357
  * import { setMaxListeners, EventEmitter } from 'node:events';
@@ -796,68 +363,134 @@ declare module "node:events" {
796
363
  * ```
797
364
  * @since v15.4.0
798
365
  * @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
799
- * @param eventTargets Zero or more `EventTarget`
800
- * or `EventEmitter` instances. If none are specified, `n` is set as the default
801
- * max for all newly created `EventTarget` and `EventEmitter` objects.
366
+ * @param eventTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
802
367
  * objects.
803
368
  */
804
- function setMaxListeners(n: number, ...eventTargets: ReadonlyArray<EventEmitter | EventTarget>): void;
369
+ static setMaxListeners(n?: number, ...eventTargets: Array<EventTarget | NodeJS.EventEmitter>): void;
805
370
  /**
806
- * This is the interface from which event-emitting Node.js APIs inherit in the types package.
807
- * **It is not intended for consumer use.**
808
- *
809
- * It provides event-mapped definitions similar to EventEmitter, except that its signatures
810
- * are deliberately permissive: they provide type _hinting_, but not rigid type-checking,
811
- * for compatibility reasons.
812
- *
813
- * Classes that inherit directly from EventEmitter in JavaScript can inherit directly from
814
- * this interface in the type definitions. Classes that are more than one inheritance level
815
- * away from EventEmitter (eg. `net.Socket` > `stream.Duplex` > `EventEmitter`) must instead
816
- * copy these method definitions into the derived class. Search "#region InternalEventEmitter"
817
- * for examples.
818
- * @internal
371
+ * Listens once to the `abort` event on the provided `signal`.
372
+ *
373
+ * Listening to the `abort` event on abort signals is unsafe and may
374
+ * lead to resource leaks since another third party with the signal can
375
+ * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change
376
+ * this since it would violate the web standard. Additionally, the original
377
+ * API makes it easy to forget to remove listeners.
378
+ *
379
+ * This API allows safely using `AbortSignal`s in Node.js APIs by solving these
380
+ * two issues by listening to the event such that `stopImmediatePropagation` does
381
+ * not prevent the listener from running.
382
+ *
383
+ * Returns a disposable so that it may be unsubscribed from more easily.
384
+ *
385
+ * ```js
386
+ * import { addAbortListener } from 'node:events';
387
+ *
388
+ * function example(signal) {
389
+ * let disposable;
390
+ * try {
391
+ * signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
392
+ * disposable = addAbortListener(signal, (e) => {
393
+ * // Do something when signal is aborted.
394
+ * });
395
+ * } finally {
396
+ * disposable?.[Symbol.dispose]();
397
+ * }
398
+ * }
399
+ * ```
400
+ * @since v20.5.0
401
+ * @return Disposable that removes the `abort` listener.
402
+ */
403
+ static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable;
404
+ /**
405
+ * This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called.
406
+ *
407
+ * Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no
408
+ * regular `'error'` listener is installed.
409
+ * @since v13.6.0, v12.17.0
410
+ */
411
+ static readonly errorMonitor: unique symbol;
412
+ /**
413
+ * Value: `Symbol.for('nodejs.rejection')`
414
+ *
415
+ * See how to write a custom `rejection handler`.
416
+ * @since v13.4.0, v12.16.0
417
+ */
418
+ static readonly captureRejectionSymbol: unique symbol;
419
+ /**
420
+ * Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
421
+ *
422
+ * Change the default `captureRejections` option on all new `EventEmitter` objects.
423
+ * @since v13.4.0, v12.16.0
424
+ */
425
+ static captureRejections: boolean;
426
+ /**
427
+ * By default, a maximum of `10` listeners can be registered for any single
428
+ * event. This limit can be changed for individual `EventEmitter` instances
429
+ * using the `emitter.setMaxListeners(n)` method. To change the default
430
+ * for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property
431
+ * can be used. If this value is not a positive number, a `RangeError` is thrown.
432
+ *
433
+ * Take caution when setting the `events.defaultMaxListeners` because the
434
+ * change affects _all_ `EventEmitter` instances, including those created before
435
+ * the change is made. However, calling `emitter.setMaxListeners(n)` still has
436
+ * precedence over `events.defaultMaxListeners`.
437
+ *
438
+ * This is not a hard limit. The `EventEmitter` instance will allow
439
+ * more listeners to be added but will output a trace warning to stderr indicating
440
+ * that a "possible EventEmitter memory leak" has been detected. For any single
441
+ * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to
442
+ * temporarily avoid this warning:
443
+ *
444
+ * ```js
445
+ * import { EventEmitter } from 'node:events';
446
+ * const emitter = new EventEmitter();
447
+ * emitter.setMaxListeners(emitter.getMaxListeners() + 1);
448
+ * emitter.once('event', () => {
449
+ * // do stuff
450
+ * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
451
+ * });
452
+ * ```
453
+ *
454
+ * The `--trace-warnings` command-line flag can be used to display the
455
+ * stack trace for such warnings.
456
+ *
457
+ * The emitted warning can be inspected with `process.on('warning')` and will
458
+ * have the additional `emitter`, `type`, and `count` properties, referring to
459
+ * the event emitter instance, the event's name and the number of attached
460
+ * listeners, respectively.
461
+ * Its `name` property is set to `'MaxListenersExceededWarning'`.
462
+ * @since v0.11.2
819
463
  */
820
- interface InternalEventEmitter<T extends EventMap<T>> extends EventEmitter {
821
- addListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
822
- addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
823
- emit<E extends keyof T>(eventName: E, ...args: T[E]): boolean;
824
- emit(eventName: string | symbol, ...args: any[]): boolean;
825
- listenerCount<E extends keyof T>(eventName: E, listener?: (...args: T[E]) => void): number;
826
- listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
827
- listeners<E extends keyof T>(eventName: E): ((...args: T[E]) => void)[];
828
- listeners(eventName: string | symbol): ((...args: any[]) => void)[];
829
- off<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
830
- off(eventName: string | symbol, listener: (...args: any[]) => void): this;
831
- on<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
832
- on(eventName: string | symbol, listener: (...args: any[]) => void): this;
833
- once<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
834
- once(eventName: string | symbol, listener: (...args: any[]) => void): this;
835
- prependListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
836
- prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
837
- prependOnceListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
838
- prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
839
- rawListeners<E extends keyof T>(eventName: E): ((...args: T[E]) => void)[];
840
- rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
841
- // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
842
- removeAllListeners<E extends keyof T>(eventName?: E): this;
843
- removeAllListeners(eventName?: string | symbol): this;
844
- removeListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
845
- removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
464
+ static defaultMaxListeners: number;
465
+ }
466
+ import internal = require("node:events");
467
+ namespace EventEmitter {
468
+ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
469
+ export { internal as EventEmitter };
470
+ export interface Abortable {
471
+ /**
472
+ * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
473
+ */
474
+ signal?: AbortSignal | undefined;
846
475
  }
847
- interface EventEmitterReferencingAsyncResource extends AsyncResource {
476
+
477
+ export interface EventEmitterReferencingAsyncResource extends AsyncResource {
848
478
  readonly eventEmitter: EventEmitterAsyncResource;
849
479
  }
850
- interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions {
480
+
481
+ export interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions {
851
482
  /**
852
- * The type of async event.
853
- * @default new.target.name
483
+ * The type of async event, this is required when instantiating `EventEmitterAsyncResource`
484
+ * directly rather than as a child class.
485
+ * @default new.target.name if instantiated as a child class.
854
486
  */
855
487
  name?: string | undefined;
856
488
  }
489
+
857
490
  /**
858
491
  * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that
859
492
  * require manual async tracking. Specifically, all events emitted by instances
860
- * of `events.EventEmitterAsyncResource` will run within its [async context](https://nodejs.org/docs/latest-v26.x/api/async_context.html).
493
+ * of `events.EventEmitterAsyncResource` will run within its `async context`.
861
494
  *
862
495
  * ```js
863
496
  * import { EventEmitterAsyncResource, EventEmitter } from 'node:events';
@@ -892,17 +525,11 @@ declare module "node:events" {
892
525
  * same options as `EventEmitter` and `AsyncResource` themselves.
893
526
  * @since v17.4.0, v16.14.0
894
527
  */
895
- class EventEmitterAsyncResource extends EventEmitter {
896
- constructor(options?: EventEmitterAsyncResourceOptions);
897
- /**
898
- * The unique `asyncId` assigned to the resource.
899
- */
900
- readonly asyncId: number;
528
+ export class EventEmitterAsyncResource extends EventEmitter {
901
529
  /**
902
- * The returned `AsyncResource` object has an additional `eventEmitter` property
903
- * that provides a reference to this `EventEmitterAsyncResource`.
530
+ * @param options Only optional in child class.
904
531
  */
905
- readonly asyncResource: EventEmitterReferencingAsyncResource;
532
+ constructor(options?: EventEmitterAsyncResourceOptions);
906
533
  /**
907
534
  * Call all `destroy` hooks. This should only ever be called once. An error will
908
535
  * be thrown if it is called more than once. This **must** be manually called. If
@@ -911,17 +538,25 @@ declare module "node:events" {
911
538
  */
912
539
  emitDestroy(): void;
913
540
  /**
914
- * The same `triggerAsyncId` that is passed to the
915
- * `AsyncResource` constructor.
541
+ * The unique `asyncId` assigned to the resource.
542
+ */
543
+ readonly asyncId: number;
544
+ /**
545
+ * The same triggerAsyncId that is passed to the AsyncResource constructor.
916
546
  */
917
547
  readonly triggerAsyncId: number;
548
+ /**
549
+ * The returned `AsyncResource` object has an additional `eventEmitter` property
550
+ * that provides a reference to this `EventEmitterAsyncResource`.
551
+ */
552
+ readonly asyncResource: EventEmitterReferencingAsyncResource;
918
553
  }
919
554
  /**
920
555
  * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget`
921
556
  * that emulates a subset of the `EventEmitter` API.
922
557
  * @since v14.5.0
923
558
  */
924
- interface NodeEventTarget extends EventTarget {
559
+ export interface NodeEventTarget extends EventTarget {
925
560
  /**
926
561
  * Node.js-specific extension to the `EventTarget` class that emulates the
927
562
  * equivalent `EventEmitter` API. The only difference between `addListener()` and
@@ -995,14 +630,347 @@ declare module "node:events" {
995
630
  */
996
631
  removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
997
632
  }
998
- /** @internal */
999
- type InternalEventTargetEventProperties<T> = {
1000
- [K in keyof T & string as `on${K}`]: ((ev: T[K]) => void) | null;
1001
- };
633
+ }
634
+ global {
635
+ namespace NodeJS {
636
+ interface EventEmitter<T extends EventMap<T> = DefaultEventMap> {
637
+ [EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: Key<K, T>, ...args: Args<K, T>): void;
638
+ /**
639
+ * Alias for `emitter.on(eventName, listener)`.
640
+ * @since v0.1.26
641
+ */
642
+ addListener<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
643
+ /**
644
+ * Adds the `listener` function to the end of the listeners array for the event
645
+ * named `eventName`. No checks are made to see if the `listener` has already
646
+ * been added. Multiple calls passing the same combination of `eventName` and
647
+ * `listener` will result in the `listener` being added, and called, multiple times.
648
+ *
649
+ * ```js
650
+ * server.on('connection', (stream) => {
651
+ * console.log('someone connected!');
652
+ * });
653
+ * ```
654
+ *
655
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
656
+ *
657
+ * By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the
658
+ * event listener to the beginning of the listeners array.
659
+ *
660
+ * ```js
661
+ * import { EventEmitter } from 'node:events';
662
+ * const myEE = new EventEmitter();
663
+ * myEE.on('foo', () => console.log('a'));
664
+ * myEE.prependListener('foo', () => console.log('b'));
665
+ * myEE.emit('foo');
666
+ * // Prints:
667
+ * // b
668
+ * // a
669
+ * ```
670
+ * @since v0.1.101
671
+ * @param eventName The name of the event.
672
+ * @param listener The callback function
673
+ */
674
+ on<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
675
+ /**
676
+ * Adds a **one-time** `listener` function for the event named `eventName`. The
677
+ * next time `eventName` is triggered, this listener is removed and then invoked.
678
+ *
679
+ * ```js
680
+ * server.once('connection', (stream) => {
681
+ * console.log('Ah, we have our first user!');
682
+ * });
683
+ * ```
684
+ *
685
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
686
+ *
687
+ * By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the
688
+ * event listener to the beginning of the listeners array.
689
+ *
690
+ * ```js
691
+ * import { EventEmitter } from 'node:events';
692
+ * const myEE = new EventEmitter();
693
+ * myEE.once('foo', () => console.log('a'));
694
+ * myEE.prependOnceListener('foo', () => console.log('b'));
695
+ * myEE.emit('foo');
696
+ * // Prints:
697
+ * // b
698
+ * // a
699
+ * ```
700
+ * @since v0.3.0
701
+ * @param eventName The name of the event.
702
+ * @param listener The callback function
703
+ */
704
+ once<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
705
+ /**
706
+ * Removes the specified `listener` from the listener array for the event named `eventName`.
707
+ *
708
+ * ```js
709
+ * const callback = (stream) => {
710
+ * console.log('someone connected!');
711
+ * };
712
+ * server.on('connection', callback);
713
+ * // ...
714
+ * server.removeListener('connection', callback);
715
+ * ```
716
+ *
717
+ * `removeListener()` will remove, at most, one instance of a listener from the
718
+ * listener array. If any single listener has been added multiple times to the
719
+ * listener array for the specified `eventName`, then `removeListener()` must be
720
+ * called multiple times to remove each instance.
721
+ *
722
+ * Once an event is emitted, all listeners attached to it at the
723
+ * time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
724
+ * will not remove them from`emit()` in progress. Subsequent events behave as expected.
725
+ *
726
+ * ```js
727
+ * import { EventEmitter } from 'node:events';
728
+ * class MyEmitter extends EventEmitter {}
729
+ * const myEmitter = new MyEmitter();
730
+ *
731
+ * const callbackA = () => {
732
+ * console.log('A');
733
+ * myEmitter.removeListener('event', callbackB);
734
+ * };
735
+ *
736
+ * const callbackB = () => {
737
+ * console.log('B');
738
+ * };
739
+ *
740
+ * myEmitter.on('event', callbackA);
741
+ *
742
+ * myEmitter.on('event', callbackB);
743
+ *
744
+ * // callbackA removes listener callbackB but it will still be called.
745
+ * // Internal listener array at time of emit [callbackA, callbackB]
746
+ * myEmitter.emit('event');
747
+ * // Prints:
748
+ * // A
749
+ * // B
750
+ *
751
+ * // callbackB is now removed.
752
+ * // Internal listener array [callbackA]
753
+ * myEmitter.emit('event');
754
+ * // Prints:
755
+ * // A
756
+ * ```
757
+ *
758
+ * Because listeners are managed using an internal array, calling this will
759
+ * change the position indices of any listener registered _after_ the listener
760
+ * being removed. This will not impact the order in which listeners are called,
761
+ * but it means that any copies of the listener array as returned by
762
+ * the `emitter.listeners()` method will need to be recreated.
763
+ *
764
+ * When a single function has been added as a handler multiple times for a single
765
+ * event (as in the example below), `removeListener()` will remove the most
766
+ * recently added instance. In the example the `once('ping')` listener is removed:
767
+ *
768
+ * ```js
769
+ * import { EventEmitter } from 'node:events';
770
+ * const ee = new EventEmitter();
771
+ *
772
+ * function pong() {
773
+ * console.log('pong');
774
+ * }
775
+ *
776
+ * ee.on('ping', pong);
777
+ * ee.once('ping', pong);
778
+ * ee.removeListener('ping', pong);
779
+ *
780
+ * ee.emit('ping');
781
+ * ee.emit('ping');
782
+ * ```
783
+ *
784
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
785
+ * @since v0.1.26
786
+ */
787
+ removeListener<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
788
+ /**
789
+ * Alias for `emitter.removeListener()`.
790
+ * @since v10.0.0
791
+ */
792
+ off<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
793
+ /**
794
+ * Removes all listeners, or those of the specified `eventName`.
795
+ *
796
+ * It is bad practice to remove listeners added elsewhere in the code,
797
+ * particularly when the `EventEmitter` instance was created by some other
798
+ * component or module (e.g. sockets or file streams).
799
+ *
800
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
801
+ * @since v0.1.26
802
+ */
803
+ removeAllListeners(eventName?: Key<unknown, T>): this;
804
+ /**
805
+ * By default `EventEmitter`s will print a warning if more than `10` listeners are
806
+ * added for a particular event. This is a useful default that helps finding
807
+ * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
808
+ * modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners.
809
+ *
810
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
811
+ * @since v0.3.5
812
+ */
813
+ setMaxListeners(n: number): this;
814
+ /**
815
+ * Returns the current max listener value for the `EventEmitter` which is either
816
+ * set by `emitter.setMaxListeners(n)` or defaults to {@link EventEmitter.defaultMaxListeners}.
817
+ * @since v1.0.0
818
+ */
819
+ getMaxListeners(): number;
820
+ /**
821
+ * Returns a copy of the array of listeners for the event named `eventName`.
822
+ *
823
+ * ```js
824
+ * server.on('connection', (stream) => {
825
+ * console.log('someone connected!');
826
+ * });
827
+ * console.log(util.inspect(server.listeners('connection')));
828
+ * // Prints: [ [Function] ]
829
+ * ```
830
+ * @since v0.1.26
831
+ */
832
+ listeners<K>(eventName: Key<K, T>): Array<Listener2<K, T>>;
833
+ /**
834
+ * Returns a copy of the array of listeners for the event named `eventName`,
835
+ * including any wrappers (such as those created by `.once()`).
836
+ *
837
+ * ```js
838
+ * import { EventEmitter } from 'node:events';
839
+ * const emitter = new EventEmitter();
840
+ * emitter.once('log', () => console.log('log once'));
841
+ *
842
+ * // Returns a new Array with a function `onceWrapper` which has a property
843
+ * // `listener` which contains the original listener bound above
844
+ * const listeners = emitter.rawListeners('log');
845
+ * const logFnWrapper = listeners[0];
846
+ *
847
+ * // Logs "log once" to the console and does not unbind the `once` event
848
+ * logFnWrapper.listener();
849
+ *
850
+ * // Logs "log once" to the console and removes the listener
851
+ * logFnWrapper();
852
+ *
853
+ * emitter.on('log', () => console.log('log persistently'));
854
+ * // Will return a new Array with a single function bound by `.on()` above
855
+ * const newListeners = emitter.rawListeners('log');
856
+ *
857
+ * // Logs "log persistently" twice
858
+ * newListeners[0]();
859
+ * emitter.emit('log');
860
+ * ```
861
+ * @since v9.4.0
862
+ */
863
+ rawListeners<K>(eventName: Key<K, T>): Array<Listener2<K, T>>;
864
+ /**
865
+ * Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments
866
+ * to each.
867
+ *
868
+ * Returns `true` if the event had listeners, `false` otherwise.
869
+ *
870
+ * ```js
871
+ * import { EventEmitter } from 'node:events';
872
+ * const myEmitter = new EventEmitter();
873
+ *
874
+ * // First listener
875
+ * myEmitter.on('event', function firstListener() {
876
+ * console.log('Helloooo! first listener');
877
+ * });
878
+ * // Second listener
879
+ * myEmitter.on('event', function secondListener(arg1, arg2) {
880
+ * console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
881
+ * });
882
+ * // Third listener
883
+ * myEmitter.on('event', function thirdListener(...args) {
884
+ * const parameters = args.join(', ');
885
+ * console.log(`event with parameters ${parameters} in third listener`);
886
+ * });
887
+ *
888
+ * console.log(myEmitter.listeners('event'));
889
+ *
890
+ * myEmitter.emit('event', 1, 2, 3, 4, 5);
891
+ *
892
+ * // Prints:
893
+ * // [
894
+ * // [Function: firstListener],
895
+ * // [Function: secondListener],
896
+ * // [Function: thirdListener]
897
+ * // ]
898
+ * // Helloooo! first listener
899
+ * // event with parameters 1, 2 in second listener
900
+ * // event with parameters 1, 2, 3, 4, 5 in third listener
901
+ * ```
902
+ * @since v0.1.26
903
+ */
904
+ emit<K>(eventName: Key<K, T>, ...args: Args<K, T>): boolean;
905
+ /**
906
+ * Returns the number of listeners listening for the event named `eventName`.
907
+ * If `listener` is provided, it will return how many times the listener is found
908
+ * in the list of the listeners of the event.
909
+ * @since v3.2.0
910
+ * @param eventName The name of the event being listened for
911
+ * @param listener The event handler function
912
+ */
913
+ listenerCount<K>(eventName: Key<K, T>, listener?: Listener2<K, T>): number;
914
+ /**
915
+ * Adds the `listener` function to the _beginning_ of the listeners array for the
916
+ * event named `eventName`. No checks are made to see if the `listener` has
917
+ * already been added. Multiple calls passing the same combination of `eventName`
918
+ * and `listener` will result in the `listener` being added, and called, multiple times.
919
+ *
920
+ * ```js
921
+ * server.prependListener('connection', (stream) => {
922
+ * console.log('someone connected!');
923
+ * });
924
+ * ```
925
+ *
926
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
927
+ * @since v6.0.0
928
+ * @param eventName The name of the event.
929
+ * @param listener The callback function
930
+ */
931
+ prependListener<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
932
+ /**
933
+ * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
934
+ * listener is removed, and then invoked.
935
+ *
936
+ * ```js
937
+ * server.prependOnceListener('connection', (stream) => {
938
+ * console.log('Ah, we have our first user!');
939
+ * });
940
+ * ```
941
+ *
942
+ * Returns a reference to the `EventEmitter`, so that calls can be chained.
943
+ * @since v6.0.0
944
+ * @param eventName The name of the event.
945
+ * @param listener The callback function
946
+ */
947
+ prependOnceListener<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
948
+ /**
949
+ * Returns an array listing the events for which the emitter has registered
950
+ * listeners. The values in the array are strings or `Symbol`s.
951
+ *
952
+ * ```js
953
+ * import { EventEmitter } from 'node:events';
954
+ *
955
+ * const myEE = new EventEmitter();
956
+ * myEE.on('foo', () => {});
957
+ * myEE.on('bar', () => {});
958
+ *
959
+ * const sym = Symbol('symbol');
960
+ * myEE.on(sym, () => {});
961
+ *
962
+ * console.log(myEE.eventNames());
963
+ * // Prints: [ 'foo', 'bar', Symbol(symbol) ]
964
+ * ```
965
+ * @since v6.0.0
966
+ */
967
+ eventNames(): Array<(string | symbol) & Key2<unknown, T>>;
968
+ }
969
+ }
1002
970
  }
1003
971
  export = EventEmitter;
1004
972
  }
1005
- declare module "events" {
1006
- import events = require("node:events");
973
+ declare module "node:events" {
974
+ import events = require("events");
1007
975
  export = events;
1008
976
  }