@runlith/tagma 0.0.0-stage → 0.2.3

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 (342) hide show
  1. package/adapter/claudeHooks.d.ts +10 -0
  2. package/adapter/claudeHooks.js +4 -0
  3. package/adapter/declaration.d.ts +14 -0
  4. package/adapter/declaration.js +2 -0
  5. package/adapter/harness.d.ts +454 -0
  6. package/adapter/harness.js +2 -0
  7. package/adapter/hook.d.ts +43 -0
  8. package/adapter/hook.js +2 -0
  9. package/adapter/hostModules.d.ts +19 -0
  10. package/adapter/hostModules.js +2 -0
  11. package/adapter/loader.d.ts +10 -0
  12. package/adapter/loader.js +2 -0
  13. package/adapter/metadata.d.ts +179 -0
  14. package/adapter/metadata.js +4 -0
  15. package/adapter/payload.d.ts +19 -0
  16. package/adapter/payload.js +3 -0
  17. package/adapter/provider.d.ts +209 -0
  18. package/adapter/provider.js +2 -0
  19. package/adapter/settings.d.ts +182 -0
  20. package/adapter/settings.js +2 -0
  21. package/adapter/speech.d.ts +4 -0
  22. package/adapter/speech.js +2 -0
  23. package/host.d.ts +61223 -0
  24. package/package.json +134 -3
  25. package/plugin/Held-cvetk2wg.js +6 -0
  26. package/plugin/accountKey-t44g9avw.js +2 -0
  27. package/plugin/adapter-qdnpxs6n.js +1 -0
  28. package/plugin/anthropic-a4pdzrv2.js +2 -0
  29. package/plugin/anthropic-messages-svq0svwe.js +2 -0
  30. package/plugin/anthropic-q1xa9n0j.js +2 -0
  31. package/plugin/auth-cp8wnd0z.js +2 -0
  32. package/plugin/authStatus-d6scztz5.js +2 -0
  33. package/plugin/bundling.d.ts +30 -0
  34. package/plugin/bundling.js +2 -0
  35. package/plugin/cacheLifetime-c5mpw676.js +2 -0
  36. package/plugin/callback-server-q2asby82.js +16 -0
  37. package/plugin/capabilities-jfhf61dt.js +2 -0
  38. package/plugin/claudeHooks-edpg1e46.js +3 -0
  39. package/plugin/cli.js +21 -0
  40. package/plugin/cliStore-5s0qerr7.js +2 -0
  41. package/plugin/clientSession-tmmxm39z.js +2 -0
  42. package/plugin/codec-aa8mxqyr.js +1 -0
  43. package/plugin/connect-d7ec6kfh.js +2 -0
  44. package/plugin/contract-qn0z7r9c.js +1 -0
  45. package/plugin/credential-garn07qc.js +2 -0
  46. package/plugin/deepseek-fvdrmjr9.js +2 -0
  47. package/plugin/deepseek-sp4vxjqy.js +2 -0
  48. package/plugin/definition-0h3gqd2z.js +2 -0
  49. package/plugin/description-8xhxryaq.js +2 -0
  50. package/plugin/deviceGrant-axpyc7xr.js +2 -0
  51. package/plugin/devin-hy98d305.js +2 -0
  52. package/plugin/duplex-yexjcpv2.js +2 -0
  53. package/plugin/endpoint-0b9bsb4q.js +2 -0
  54. package/plugin/errors-kck87dpv.js +2 -0
  55. package/plugin/events-81m69vqz.js +2 -0
  56. package/plugin/events-s95ybm4g.js +2 -0
  57. package/plugin/executor-avear8af.js +2 -0
  58. package/plugin/failure-ddv4456n.js +2 -0
  59. package/plugin/framing-jnd2zm0h.js +2 -0
  60. package/plugin/grant-85r3bbqn.js +2 -0
  61. package/plugin/harness-jm3fhnwg.js +2 -0
  62. package/plugin/headers-w6p5sp18.js +2 -0
  63. package/plugin/hook-hjrk83m8.js +2 -0
  64. package/plugin/icon-044pa3y8.js +6 -0
  65. package/plugin/icon-j22svmgp.js +4 -0
  66. package/plugin/icon-ny6qbjvc.js +4 -0
  67. package/plugin/icon-pz54e8n3.js +4 -0
  68. package/plugin/icon-qy92jx2b.js +4 -0
  69. package/plugin/ids-2dndaq8y.js +2 -0
  70. package/plugin/images-s2kqebfv.js +2 -0
  71. package/plugin/index-b3yp4szm.js +2 -0
  72. package/plugin/index-xs7nfsck.js +2 -0
  73. package/plugin/lifecycle-er51apxp.js +2 -0
  74. package/plugin/manual-2mdscj84.js +2 -0
  75. package/plugin/messages-gmwcg1pq.js +2 -0
  76. package/plugin/metadata-gpazs3f5.js +4 -0
  77. package/plugin/muse-g8bc58v8.js +2 -0
  78. package/plugin/muse-tfe6sph7.js +2 -0
  79. package/plugin/museToolSchema-tbe0f3wa.js +2 -0
  80. package/plugin/notes-5m0m3pdr.js +2 -0
  81. package/plugin/object-9pjtdam7.js +2 -0
  82. package/plugin/open-browser-vqb7ckt1.js +2 -0
  83. package/plugin/openai-6f50tf64.js +2 -0
  84. package/plugin/openai-compatible-chat-eez8hkge.js +2 -0
  85. package/plugin/openai-images-haszbnft.js +2 -0
  86. package/plugin/openai-mfqwg6pa.js +2 -0
  87. package/plugin/openai-responses-1gpyp640.js +2 -0
  88. package/plugin/opencodeGo-1wgdjtjz.js +3 -0
  89. package/plugin/opencodeGo-qgw3pfg6.js +2 -0
  90. package/plugin/options-476akxaj.js +2 -0
  91. package/plugin/payload-2gr4q9g8.js +2 -0
  92. package/plugin/pkce-y3sh5pk8.js +2 -0
  93. package/plugin/plugin-0e34qaar.js +3 -0
  94. package/plugin/plugin-1vpp5mqk.js +4 -0
  95. package/plugin/plugin-1zkx860n.js +3 -0
  96. package/plugin/plugin-217mw9ck.js +3 -0
  97. package/plugin/plugin-24j9hnc7.js +3 -0
  98. package/plugin/plugin-2s6bq45c.js +3 -0
  99. package/plugin/plugin-3969dy0b.js +3 -0
  100. package/plugin/plugin-3b8x73y6.js +3 -0
  101. package/plugin/plugin-3t0qp574.js +3 -0
  102. package/plugin/plugin-55fbx586.js +3 -0
  103. package/plugin/plugin-5zq084fb.js +3 -0
  104. package/plugin/plugin-6a56xsx3.js +3 -0
  105. package/plugin/plugin-6vzw5yyr.js +3 -0
  106. package/plugin/plugin-72xxqm1t.js +3 -0
  107. package/plugin/plugin-7swap1ad.js +3 -0
  108. package/plugin/plugin-7te9b50h.js +3 -0
  109. package/plugin/plugin-7xmwhj5h.js +3 -0
  110. package/plugin/plugin-80gqwmjy.js +3 -0
  111. package/plugin/plugin-8g8myq9g.js +3 -0
  112. package/plugin/plugin-8q44b578.js +3 -0
  113. package/plugin/plugin-8v4g0q0b.js +3 -0
  114. package/plugin/plugin-8x3c401q.js +9 -0
  115. package/plugin/plugin-92sxs4r1.js +3 -0
  116. package/plugin/plugin-9gha9fx3.js +3 -0
  117. package/plugin/plugin-9zbh7788.js +3 -0
  118. package/plugin/plugin-a3vzpk4e.js +3 -0
  119. package/plugin/plugin-ak62rhwz.js +3 -0
  120. package/plugin/plugin-azkzdkpk.js +3 -0
  121. package/plugin/plugin-cydz2zhy.js +3 -0
  122. package/plugin/plugin-d28d8jar.js +4 -0
  123. package/plugin/plugin-dd951075.js +3 -0
  124. package/plugin/plugin-dqxdznvd.js +3 -0
  125. package/plugin/plugin-dsjq4tye.js +3 -0
  126. package/plugin/plugin-e5ybk2a2.js +3 -0
  127. package/plugin/plugin-eksq91yp.js +5 -0
  128. package/plugin/plugin-er1kc6f6.js +5 -0
  129. package/plugin/plugin-fjsmz1vy.js +4 -0
  130. package/plugin/plugin-fre9hdcg.js +3 -0
  131. package/plugin/plugin-g0zv4vrz.js +3 -0
  132. package/plugin/plugin-g4hst0jz.js +3 -0
  133. package/plugin/plugin-g7hrtg2p.js +3 -0
  134. package/plugin/plugin-gh857xdd.js +3 -0
  135. package/plugin/plugin-hkjxkgty.js +3 -0
  136. package/plugin/plugin-jxvmq18y.js +3 -0
  137. package/plugin/plugin-kc4z9msd.js +3 -0
  138. package/plugin/plugin-krbbb4ts.js +3 -0
  139. package/plugin/plugin-me00x60n.js +3 -0
  140. package/plugin/plugin-mqr325kz.js +3 -0
  141. package/plugin/plugin-nzacjxf9.js +3 -0
  142. package/plugin/plugin-p59gy5xd.js +3 -0
  143. package/plugin/plugin-p6x7emar.js +3 -0
  144. package/plugin/plugin-pdww1ma8.js +3 -0
  145. package/plugin/plugin-psj9935q.js +3 -0
  146. package/plugin/plugin-q6pvb1xf.js +3 -0
  147. package/plugin/plugin-r342d8zf.js +3 -0
  148. package/plugin/plugin-r7g3vqrm.js +3 -0
  149. package/plugin/plugin-rrgyjesv.js +3 -0
  150. package/plugin/plugin-t4xrq5q2.js +3 -0
  151. package/plugin/plugin-tetj2cr3.js +3 -0
  152. package/plugin/plugin-v80m00bq.js +14 -0
  153. package/plugin/plugin-vfjhxng8.js +3 -0
  154. package/plugin/plugin-vqrd05eg.js +3 -0
  155. package/plugin/plugin-w3zbkmy6.js +3 -0
  156. package/plugin/plugin-w8f977my.js +3 -0
  157. package/plugin/plugin-xbnw80pk.js +3 -0
  158. package/plugin/plugin-xfcgt5ba.js +36 -0
  159. package/plugin/plugin-y9cdpmbv.js +6 -0
  160. package/plugin/plugin-yg0h5k5d.js +3 -0
  161. package/plugin/plugin-yp736z4n.js +3 -0
  162. package/plugin/plugin-zrb8bbr4.js +3 -0
  163. package/plugin/plugin-zsv7wawc.js +3 -0
  164. package/plugin/plugin.d.ts +175 -0
  165. package/plugin/plugin.js +2 -0
  166. package/plugin/points.generated.d.ts +341 -0
  167. package/plugin/points.generated.js +2 -0
  168. package/plugin/process.d.ts +4 -0
  169. package/plugin/process.js +85 -0
  170. package/plugin/protocol-8c26dk6v.js +2 -0
  171. package/plugin/protocol.d.ts +115 -0
  172. package/plugin/protocol.js +2 -0
  173. package/plugin/provider-0b7xxyhn.js +2 -0
  174. package/plugin/quota-v63yvp13.js +2 -0
  175. package/plugin/quotaRead-esmjycnd.js +2 -0
  176. package/plugin/reasoning-1saw6tds.js +2 -0
  177. package/plugin/record-1m3vvy60.js +2 -0
  178. package/plugin/requests-2zyr1g8e.js +1 -0
  179. package/plugin/responseFold-xxhqx4sa.js +2 -0
  180. package/plugin/settings-8xq8dvhp.js +2 -0
  181. package/plugin/shared-4jndfh28.js +2 -0
  182. package/plugin/speech-067caz1a.js +2 -0
  183. package/plugin/stepfun-3en5g41d.js +2 -0
  184. package/plugin/stepfun-xp1c5wpk.js +2 -0
  185. package/plugin/stream-8yrr289z.js +2 -0
  186. package/plugin/svelteProgram-73v9yajk.js +2 -0
  187. package/plugin/synthesisDuplex-ch9jhqzt.js +2 -0
  188. package/plugin/template.d.ts +14 -0
  189. package/plugin/template.js +2 -0
  190. package/plugin/testing.d.ts +85 -0
  191. package/plugin/testing.js +4 -0
  192. package/plugin/tool-content-vean6rqa.js +2 -0
  193. package/plugin/tool-stream-fb180jmt.js +2 -0
  194. package/plugin/transport-j784dsdr.js +2 -0
  195. package/plugin/ui.generated.d.ts +1041 -0
  196. package/plugin/value.d.ts +8 -0
  197. package/plugin/value.js +2 -0
  198. package/plugin/vendor-pn6b5a8f.js +2 -0
  199. package/plugin/vendorCall-6n5chrn0.js +2 -0
  200. package/plugin/vendorCall-82evk8b3.js +2 -0
  201. package/plugin/vendorPayload-458354fv.js +2 -0
  202. package/plugin/vendorWeb-cz5t01m7.js +2 -0
  203. package/plugin/verbatim-2f2d9n02.js +2 -0
  204. package/plugin/xai-2cqraa99.js +2 -0
  205. package/plugin/xai-e8sbtk6a.js +2 -0
  206. package/rules/effect.d.ts +55 -0
  207. package/rules/effect.js +11 -0
  208. package/rules/rules.d.ts +342 -0
  209. package/rules/rules.js +50 -0
  210. package/types/node/assert/strict.d.ts +12 -0
  211. package/types/node/assert.d.ts +76 -0
  212. package/types/node/async_hooks.d.ts +113 -0
  213. package/types/node/buffer.buffer.d.ts +29 -0
  214. package/types/node/buffer.d.ts +162 -0
  215. package/types/node/child_process.d.ts +337 -0
  216. package/types/node/cluster.d.ts +118 -0
  217. package/types/node/compatibility/iterators.d.ts +11 -0
  218. package/types/node/console.d.ts +48 -0
  219. package/types/node/constants.d.ts +8 -0
  220. package/types/node/crypto.d.ts +847 -0
  221. package/types/node/dgram.d.ts +88 -0
  222. package/types/node/diagnostics_channel.d.ts +61 -0
  223. package/types/node/dns/promises.d.ts +94 -0
  224. package/types/node/dns.d.ts +276 -0
  225. package/types/node/domain.d.ts +17 -0
  226. package/types/node/events.d.ts +138 -0
  227. package/types/node/fs/promises.d.ts +253 -0
  228. package/types/node/fs.d.ts +1038 -0
  229. package/types/node/globals.d.ts +73 -0
  230. package/types/node/globals.typedarray.d.ts +22 -0
  231. package/types/node/http.d.ts +530 -0
  232. package/types/node/http2.d.ts +794 -0
  233. package/types/node/https.d.ts +66 -0
  234. package/types/node/index.d.ts +84 -0
  235. package/types/node/inspector/promises.d.ts +13 -0
  236. package/types/node/inspector.d.ts +61 -0
  237. package/types/node/inspector.generated.d.ts +1624 -0
  238. package/types/node/module.d.ts +187 -0
  239. package/types/node/net.d.ts +266 -0
  240. package/types/node/os.d.ts +236 -0
  241. package/types/node/path/posix.d.ts +8 -0
  242. package/types/node/path/win32.d.ts +8 -0
  243. package/types/node/path.d.ts +40 -0
  244. package/types/node/perf_hooks.d.ts +236 -0
  245. package/types/node/process.d.ts +436 -0
  246. package/types/node/punycode.d.ts +15 -0
  247. package/types/node/querystring.d.ts +22 -0
  248. package/types/node/quic.d.ts +203 -0
  249. package/types/node/readline/promises.d.ts +28 -0
  250. package/types/node/readline.d.ts +94 -0
  251. package/types/node/repl.d.ts +104 -0
  252. package/types/node/sea.d.ts +11 -0
  253. package/types/node/sqlite.d.ts +183 -0
  254. package/types/node/stream/consumers.d.ts +13 -0
  255. package/types/node/stream/iter.d.ts +240 -0
  256. package/types/node/stream/promises.d.ts +37 -0
  257. package/types/node/stream/web.d.ts +297 -0
  258. package/types/node/stream.d.ts +378 -0
  259. package/types/node/string_decoder.d.ts +10 -0
  260. package/types/node/test/reporters.d.ts +66 -0
  261. package/types/node/test.d.ts +462 -0
  262. package/types/node/timers/promises.d.ts +16 -0
  263. package/types/node/timers.d.ts +43 -0
  264. package/types/node/tls.d.ts +279 -0
  265. package/types/node/trace_events.d.ts +16 -0
  266. package/types/node/ts5.6/buffer.buffer.d.ts +26 -0
  267. package/types/node/ts5.6/compatibility/float16array.d.ts +43 -0
  268. package/types/node/ts5.6/globals.typedarray.d.ts +22 -0
  269. package/types/node/ts5.6/index.d.ts +84 -0
  270. package/types/node/ts5.7/compatibility/float16array.d.ts +50 -0
  271. package/types/node/ts5.7/index.d.ts +84 -0
  272. package/types/node/tty.d.ts +61 -0
  273. package/types/node/url.d.ts +165 -0
  274. package/types/node/util/types.d.ts +49 -0
  275. package/types/node/util.d.ts +320 -0
  276. package/types/node/v8.d.ts +178 -0
  277. package/types/node/vm.d.ts +130 -0
  278. package/types/node/wasi.d.ts +26 -0
  279. package/types/node/web-globals/abortcontroller.d.ts +47 -0
  280. package/types/node/web-globals/blob.d.ts +34 -0
  281. package/types/node/web-globals/console.d.ts +7 -0
  282. package/types/node/web-globals/crypto.d.ts +46 -0
  283. package/types/node/web-globals/domexception.d.ts +74 -0
  284. package/types/node/web-globals/encoding.d.ts +16 -0
  285. package/types/node/web-globals/events.d.ts +111 -0
  286. package/types/node/web-globals/fetch.d.ts +121 -0
  287. package/types/node/web-globals/importmeta.d.ts +11 -0
  288. package/types/node/web-globals/messaging.d.ts +32 -0
  289. package/types/node/web-globals/navigator.d.ts +28 -0
  290. package/types/node/web-globals/performance.d.ts +71 -0
  291. package/types/node/web-globals/storage.d.ts +26 -0
  292. package/types/node/web-globals/streams.d.ts +162 -0
  293. package/types/node/web-globals/timers.d.ts +22 -0
  294. package/types/node/web-globals/url.d.ts +27 -0
  295. package/types/node/worker_threads.d.ts +199 -0
  296. package/types/node/zlib/iter.d.ts +49 -0
  297. package/types/node/zlib.d.ts +360 -0
  298. package/types/undici/agent.d.ts +24 -0
  299. package/types/undici/api.d.ts +19 -0
  300. package/types/undici/balanced-pool.d.ts +16 -0
  301. package/types/undici/cache-interceptor.d.ts +98 -0
  302. package/types/undici/cache.d.ts +30 -0
  303. package/types/undici/client-stats.d.ts +9 -0
  304. package/types/undici/client.d.ts +61 -0
  305. package/types/undici/connector.d.ts +37 -0
  306. package/types/undici/content-type.d.ts +9 -0
  307. package/types/undici/cookies.d.ts +22 -0
  308. package/types/undici/diagnostics-channel.d.ts +72 -0
  309. package/types/undici/dispatcher.d.ts +207 -0
  310. package/types/undici/env-http-proxy-agent.d.ts +15 -0
  311. package/types/undici/errors.d.ts +117 -0
  312. package/types/undici/eventsource.d.ts +39 -0
  313. package/types/undici/fetch.d.ts +122 -0
  314. package/types/undici/formdata.d.ts +24 -0
  315. package/types/undici/global-dispatcher.d.ts +4 -0
  316. package/types/undici/global-origin.d.ts +3 -0
  317. package/types/undici/h2c-client.d.ts +35 -0
  318. package/types/undici/handlers.d.ts +7 -0
  319. package/types/undici/header.d.ts +10 -0
  320. package/types/undici/index.d.ts +85 -0
  321. package/types/undici/interceptors.d.ts +70 -0
  322. package/types/undici/mock-agent.d.ts +43 -0
  323. package/types/undici/mock-call-history.d.ts +57 -0
  324. package/types/undici/mock-client.d.ts +17 -0
  325. package/types/undici/mock-errors.d.ts +9 -0
  326. package/types/undici/mock-interceptor.d.ts +60 -0
  327. package/types/undici/mock-pool.d.ts +17 -0
  328. package/types/undici/patch.d.ts +21 -0
  329. package/types/undici/pool-stats.d.ts +11 -0
  330. package/types/undici/pool.d.ts +25 -0
  331. package/types/undici/proxy-agent.d.ts +22 -0
  332. package/types/undici/readable.d.ts +24 -0
  333. package/types/undici/retry-agent.d.ts +6 -0
  334. package/types/undici/retry-handler.d.ts +41 -0
  335. package/types/undici/round-robin-pool.d.ts +25 -0
  336. package/types/undici/snapshot-agent.d.ts +98 -0
  337. package/types/undici/socks5-proxy-agent.d.ts +17 -0
  338. package/types/undici/util.d.ts +4 -0
  339. package/types/undici/utility.d.ts +2 -0
  340. package/types/undici/webidl.d.ts +121 -0
  341. package/types/undici/websocket.d.ts +130 -0
  342. package/README.md +0 -3
@@ -0,0 +1,462 @@
1
+ declare module "node:test" {
2
+ import { AssertMethodNames, AssertPredicate } from "node:assert";
3
+ import { Readable, ReadableEventMap } from "node:stream";
4
+ import { TestEvent } from "node:test/reporters";
5
+ import { URL } from "node:url";
6
+ import TestFn = test.TestFn;
7
+ import TestOptions = test.TestOptions;
8
+ function test(name?: string, fn?: TestFn): Promise<void>;
9
+ function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
10
+ function test(options?: TestOptions, fn?: TestFn): Promise<void>;
11
+ function test(fn?: TestFn): Promise<void>;
12
+ namespace test {
13
+ export { test };
14
+ export { suite as describe, test as it };
15
+ }
16
+ namespace test {
17
+ function run(options?: RunOptions): TestsStream;
18
+ function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
19
+ function suite(name?: string, fn?: SuiteFn): Promise<void>;
20
+ function suite(options?: TestOptions, fn?: SuiteFn): Promise<void>;
21
+ function suite(fn?: SuiteFn): Promise<void>;
22
+ namespace suite {
23
+ function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
24
+ function skip(name?: string, fn?: SuiteFn): Promise<void>;
25
+ function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
26
+ function skip(fn?: SuiteFn): Promise<void>;
27
+ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
28
+ function todo(name?: string, fn?: SuiteFn): Promise<void>;
29
+ function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
30
+ function todo(fn?: SuiteFn): Promise<void>;
31
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
32
+ function only(name?: string, fn?: SuiteFn): Promise<void>;
33
+ function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
34
+ function only(fn?: SuiteFn): Promise<void>;
35
+ function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
36
+ function expectFailure(name?: string, fn?: SuiteFn): Promise<void>;
37
+ function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise<void>;
38
+ function expectFailure(fn?: SuiteFn): Promise<void>;
39
+ }
40
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
41
+ function skip(name?: string, fn?: TestFn): Promise<void>;
42
+ function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
43
+ function skip(fn?: TestFn): Promise<void>;
44
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
45
+ function todo(name?: string, fn?: TestFn): Promise<void>;
46
+ function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
47
+ function todo(fn?: TestFn): Promise<void>;
48
+ function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
49
+ function only(name?: string, fn?: TestFn): Promise<void>;
50
+ function only(options?: TestOptions, fn?: TestFn): Promise<void>;
51
+ function only(fn?: TestFn): Promise<void>;
52
+ function expectFailure(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
53
+ function expectFailure(name?: string, fn?: TestFn): Promise<void>;
54
+ function expectFailure(options?: TestOptions, fn?: TestFn): Promise<void>;
55
+ function expectFailure(fn?: TestFn): Promise<void>;
56
+ type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise<void>;
57
+ type SuiteFn = (s: SuiteContext) => void | Promise<void>;
58
+ interface TestShard {
59
+ index: number;
60
+ total: number;
61
+ }
62
+ interface RunOptions {
63
+ concurrency?: number | boolean | undefined;
64
+ cwd?: string | undefined;
65
+ files?: readonly string[] | undefined;
66
+ forceExit?: boolean | undefined;
67
+ globPatterns?: readonly string[] | undefined;
68
+ inspectPort?: number | (() => number) | undefined;
69
+ isolation?: "process" | "none" | undefined;
70
+ only?: boolean | undefined;
71
+ setup?: ((reporter: TestsStream) => void | Promise<void>) | undefined;
72
+ execArgv?: readonly string[] | undefined;
73
+ argv?: readonly string[] | undefined;
74
+ signal?: AbortSignal | undefined;
75
+ testNamePatterns?: string | RegExp | ReadonlyArray<string | RegExp> | undefined;
76
+ testSkipPatterns?: string | RegExp | ReadonlyArray<string | RegExp> | undefined;
77
+ timeout?: number | undefined;
78
+ watch?: boolean | undefined;
79
+ shard?: TestShard | undefined;
80
+ rerunFailuresFilePath?: string | undefined;
81
+ coverage?: boolean | undefined;
82
+ coverageExcludeGlobs?: string | readonly string[] | undefined;
83
+ coverageIncludeGlobs?: string | readonly string[] | undefined;
84
+ lineCoverage?: number | undefined;
85
+ branchCoverage?: number | undefined;
86
+ functionCoverage?: number | undefined;
87
+ env?: NodeJS.ProcessEnv | undefined;
88
+ }
89
+ interface TestsStreamEventMap extends ReadableEventMap {
90
+ "data": [
91
+ data: TestEvent
92
+ ];
93
+ "test:coverage": [
94
+ data: EventData.TestCoverage
95
+ ];
96
+ "test:complete": [
97
+ data: EventData.TestComplete
98
+ ];
99
+ "test:dequeue": [
100
+ data: EventData.TestDequeue
101
+ ];
102
+ "test:diagnostic": [
103
+ data: EventData.TestDiagnostic
104
+ ];
105
+ "test:enqueue": [
106
+ data: EventData.TestEnqueue
107
+ ];
108
+ "test:fail": [
109
+ data: EventData.TestFail
110
+ ];
111
+ "test:interrupted": [
112
+ data: EventData.TestInterrupted
113
+ ];
114
+ "test:pass": [
115
+ data: EventData.TestPass
116
+ ];
117
+ "test:plan": [
118
+ data: EventData.TestPlan
119
+ ];
120
+ "test:start": [
121
+ data: EventData.TestStart
122
+ ];
123
+ "test:stderr": [
124
+ data: EventData.TestStderr
125
+ ];
126
+ "test:stdout": [
127
+ data: EventData.TestStdout
128
+ ];
129
+ "test:summary": [
130
+ data: EventData.TestSummary
131
+ ];
132
+ "test:watch:drained": [
133
+ ];
134
+ "test:watch:restarted": [
135
+ ];
136
+ }
137
+ interface TestsStream extends Readable {
138
+ addListener<E extends keyof TestsStreamEventMap>(eventName: E, listener: (...args: TestsStreamEventMap[E]) => void): this;
139
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
140
+ emit<E extends keyof TestsStreamEventMap>(eventName: E, ...args: TestsStreamEventMap[E]): boolean;
141
+ emit(eventName: string | symbol, ...args: any[]): boolean;
142
+ listenerCount<E extends keyof TestsStreamEventMap>(eventName: E, listener?: (...args: TestsStreamEventMap[E]) => void): number;
143
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
144
+ listeners<E extends keyof TestsStreamEventMap>(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[];
145
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
146
+ off<E extends keyof TestsStreamEventMap>(eventName: E, listener: (...args: TestsStreamEventMap[E]) => void): this;
147
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
148
+ on<E extends keyof TestsStreamEventMap>(eventName: E, listener: (...args: TestsStreamEventMap[E]) => void): this;
149
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
150
+ once<E extends keyof TestsStreamEventMap>(eventName: E, listener: (...args: TestsStreamEventMap[E]) => void): this;
151
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
152
+ prependListener<E extends keyof TestsStreamEventMap>(eventName: E, listener: (...args: TestsStreamEventMap[E]) => void): this;
153
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
154
+ prependOnceListener<E extends keyof TestsStreamEventMap>(eventName: E, listener: (...args: TestsStreamEventMap[E]) => void): this;
155
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
156
+ rawListeners<E extends keyof TestsStreamEventMap>(eventName: E): ((...args: TestsStreamEventMap[E]) => void)[];
157
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
158
+ removeAllListeners<E extends keyof TestsStreamEventMap>(eventName?: E): this;
159
+ removeAllListeners(eventName?: string | symbol): this;
160
+ removeListener<E extends keyof TestsStreamEventMap>(eventName: E, listener: (...args: TestsStreamEventMap[E]) => void): this;
161
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
162
+ }
163
+ namespace EventData {
164
+ interface Error extends globalThis.Error {
165
+ cause: unknown;
166
+ }
167
+ interface LocationInfo {
168
+ column?: number;
169
+ file?: string;
170
+ line?: number;
171
+ }
172
+ interface TestDiagnostic extends LocationInfo {
173
+ message: string;
174
+ nesting: number;
175
+ level: "info" | "warn" | "error";
176
+ }
177
+ interface TestCoverage {
178
+ summary: {
179
+ files: Array<{
180
+ path: string;
181
+ totalLineCount: number;
182
+ totalBranchCount: number;
183
+ totalFunctionCount: number;
184
+ coveredLineCount: number;
185
+ coveredBranchCount: number;
186
+ coveredFunctionCount: number;
187
+ coveredLinePercent: number;
188
+ coveredBranchPercent: number;
189
+ coveredFunctionPercent: number;
190
+ functions: Array<{
191
+ name: string;
192
+ line: number;
193
+ count: number;
194
+ }>;
195
+ branches: Array<{
196
+ line: number;
197
+ count: number;
198
+ }>;
199
+ lines: Array<{
200
+ line: number;
201
+ count: number;
202
+ }>;
203
+ }>;
204
+ thresholds: {
205
+ function: number;
206
+ branch: number;
207
+ line: number;
208
+ };
209
+ totals: {
210
+ totalLineCount: number;
211
+ totalBranchCount: number;
212
+ totalFunctionCount: number;
213
+ coveredLineCount: number;
214
+ coveredBranchCount: number;
215
+ coveredFunctionCount: number;
216
+ coveredLinePercent: number;
217
+ coveredBranchPercent: number;
218
+ coveredFunctionPercent: number;
219
+ };
220
+ workingDirectory: string;
221
+ };
222
+ nesting: number;
223
+ }
224
+ interface TestComplete extends LocationInfo {
225
+ details: {
226
+ passed: boolean;
227
+ duration_ms: number;
228
+ error?: Error;
229
+ type?: "suite" | "test";
230
+ };
231
+ name: string;
232
+ nesting: number;
233
+ testNumber: number;
234
+ todo?: string | boolean;
235
+ skip?: string | boolean;
236
+ }
237
+ interface TestDequeue extends LocationInfo {
238
+ name: string;
239
+ nesting: number;
240
+ type: "suite" | "test";
241
+ }
242
+ interface TestEnqueue extends LocationInfo {
243
+ name: string;
244
+ nesting: number;
245
+ type: "suite" | "test";
246
+ }
247
+ interface TestFail extends LocationInfo {
248
+ details: {
249
+ duration_ms: number;
250
+ error: Error;
251
+ type?: "suite" | "test";
252
+ attempt?: number;
253
+ };
254
+ name: string;
255
+ nesting: number;
256
+ testNumber: number;
257
+ todo?: string | boolean;
258
+ skip?: string | boolean;
259
+ }
260
+ interface TestInterrupted {
261
+ tests: TestStart[];
262
+ }
263
+ interface TestPass extends LocationInfo {
264
+ details: {
265
+ duration_ms: number;
266
+ type?: "suite" | "test";
267
+ attempt?: number;
268
+ passed_on_attempt?: number;
269
+ };
270
+ name: string;
271
+ nesting: number;
272
+ testNumber: number;
273
+ todo?: string | boolean;
274
+ skip?: string | boolean;
275
+ }
276
+ interface TestPlan extends LocationInfo {
277
+ nesting: number;
278
+ count: number;
279
+ }
280
+ interface TestStart extends LocationInfo {
281
+ name: string;
282
+ nesting: number;
283
+ }
284
+ interface TestStderr {
285
+ file: string;
286
+ message: string;
287
+ }
288
+ interface TestStdout {
289
+ file: string;
290
+ message: string;
291
+ }
292
+ interface TestSummary {
293
+ counts: {
294
+ cancelled: number;
295
+ passed: number;
296
+ skipped: number;
297
+ suites: number;
298
+ tests: number;
299
+ todo: number;
300
+ topLevel: number;
301
+ };
302
+ duration_ms: number;
303
+ file: string | undefined;
304
+ success: boolean;
305
+ }
306
+ }
307
+ interface TestContext {
308
+ readonly assert: TestContextAssert;
309
+ before(fn?: TestContextHookFn, options?: HookOptions): void;
310
+ beforeEach(fn?: TestContextHookFn, options?: HookOptions): void;
311
+ after(fn?: TestContextHookFn, options?: HookOptions): void;
312
+ afterEach(fn?: TestContextHookFn, options?: HookOptions): void;
313
+ diagnostic(message: string): void;
314
+ readonly filePath: string | undefined;
315
+ readonly fullName: string;
316
+ readonly name: string;
317
+ readonly passed: boolean;
318
+ readonly error: EventData.Error | null;
319
+ readonly attempt: number;
320
+ readonly workerId: number | undefined;
321
+ plan(count: number, options?: TestContextPlanOptions): void;
322
+ runOnly(shouldRunOnlyTests: boolean): void;
323
+ readonly signal: AbortSignal;
324
+ skip(message?: string): void;
325
+ todo(message?: string): void;
326
+ test: typeof test;
327
+ waitFor<T>(condition: () => T, options?: TestContextWaitForOptions): Promise<Awaited<T>>;
328
+ readonly mock: MockTracker;
329
+ }
330
+ interface TestContextAssert extends Pick<typeof import("assert"), AssertMethodNames> {
331
+ fileSnapshot(value: any, path: string, options?: AssertSnapshotOptions): void;
332
+ snapshot(value: any, options?: AssertSnapshotOptions): void;
333
+ [name: string]: (...args: any[]) => void;
334
+ }
335
+ interface AssertSnapshotOptions {
336
+ serializers?: ReadonlyArray<(value: any) => any> | undefined;
337
+ }
338
+ interface TestContextPlanOptions {
339
+ wait?: boolean | number | undefined;
340
+ }
341
+ interface TestContextWaitForOptions {
342
+ interval?: number | undefined;
343
+ timeout?: number | undefined;
344
+ }
345
+ interface SuiteContext {
346
+ readonly filePath: string | undefined;
347
+ readonly fullName: string;
348
+ readonly name: string;
349
+ readonly signal: AbortSignal;
350
+ }
351
+ interface TestOptions {
352
+ concurrency?: number | boolean | undefined;
353
+ expectFailure?: boolean | string | AssertPredicate | undefined;
354
+ only?: boolean | undefined;
355
+ signal?: AbortSignal | undefined;
356
+ skip?: boolean | string | undefined;
357
+ timeout?: number | undefined;
358
+ todo?: boolean | string | undefined;
359
+ plan?: number | undefined;
360
+ }
361
+ function before(fn?: HookFn, options?: HookOptions): void;
362
+ function after(fn?: HookFn, options?: HookOptions): void;
363
+ function beforeEach(fn?: HookFn, options?: HookOptions): void;
364
+ function afterEach(fn?: HookFn, options?: HookOptions): void;
365
+ type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any;
366
+ type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any;
367
+ interface HookOptions {
368
+ signal?: AbortSignal | undefined;
369
+ timeout?: number | undefined;
370
+ }
371
+ interface MockFunctionOptions {
372
+ times?: number | undefined;
373
+ }
374
+ interface MockMethodOptions extends MockFunctionOptions {
375
+ getter?: boolean | undefined;
376
+ setter?: boolean | undefined;
377
+ }
378
+ type Mock<F extends Function> = F & {
379
+ mock: MockFunctionContext<F>;
380
+ };
381
+ interface MockModuleOptions {
382
+ cache?: boolean | undefined;
383
+ exports?: object | undefined;
384
+ defaultExport?: any;
385
+ namedExports?: object | undefined;
386
+ }
387
+ interface MockTracker {
388
+ fn<F extends Function = (...args: any[]) => undefined>(original?: F, options?: MockFunctionOptions): Mock<F>;
389
+ fn<F extends Function = (...args: any[]) => undefined, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
390
+ method<MockedObject extends object, MethodName extends FunctionPropertyNames<MockedObject>>(object: MockedObject, methodName: MethodName, options?: MockFunctionOptions): MockedObject[MethodName] extends Function ? Mock<MockedObject[MethodName]> : never;
391
+ method<MockedObject extends object, MethodName extends FunctionPropertyNames<MockedObject>, Implementation extends Function>(object: MockedObject, methodName: MethodName, implementation: Implementation, options?: MockFunctionOptions): MockedObject[MethodName] extends Function ? Mock<MockedObject[MethodName] | Implementation> : never;
392
+ method<MockedObject extends object>(object: MockedObject, methodName: keyof MockedObject, options: MockMethodOptions): Mock<Function>;
393
+ method<MockedObject extends object>(object: MockedObject, methodName: keyof MockedObject, implementation: Function, options: MockMethodOptions): Mock<Function>;
394
+ getter<MockedObject extends object, MethodName extends keyof MockedObject>(object: MockedObject, methodName: MethodName, options?: MockFunctionOptions): Mock<() => MockedObject[MethodName]>;
395
+ getter<MockedObject extends object, MethodName extends keyof MockedObject, Implementation extends Function>(object: MockedObject, methodName: MethodName, implementation?: Implementation, options?: MockFunctionOptions): Mock<(() => MockedObject[MethodName]) | Implementation>;
396
+ setter<MockedObject extends object, MethodName extends keyof MockedObject>(object: MockedObject, methodName: MethodName, options?: MockFunctionOptions): Mock<(value: MockedObject[MethodName]) => void>;
397
+ setter<MockedObject extends object, MethodName extends keyof MockedObject, Implementation extends Function>(object: MockedObject, methodName: MethodName, implementation?: Implementation, options?: MockFunctionOptions): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
398
+ module(specifier: string | URL, options?: MockModuleOptions): MockModuleContext;
399
+ property<MockedObject extends object, PropertyName extends keyof MockedObject>(object: MockedObject, property: PropertyName, value?: MockedObject[PropertyName]): MockedObject & {
400
+ mock: MockPropertyContext<MockedObject[PropertyName]>;
401
+ };
402
+ reset(): void;
403
+ restoreAll(): void;
404
+ readonly timers: MockTimers;
405
+ }
406
+ const mock: MockTracker;
407
+ interface MockFunctionCall<F extends Function, ReturnType = F extends (...args: any) => infer T ? T : F extends abstract new (...args: any) => infer T ? T : unknown, Args = F extends (...args: infer Y) => any ? Y : F extends abstract new (...args: infer Y) => any ? Y : unknown[]> {
408
+ arguments: Args;
409
+ error: unknown | undefined;
410
+ result: ReturnType | undefined;
411
+ stack: Error;
412
+ target: F extends abstract new (...args: any) => any ? F : undefined;
413
+ this: unknown;
414
+ }
415
+ interface MockFunctionContext<F extends Function> {
416
+ readonly calls: MockFunctionCall<F>[];
417
+ callCount(): number;
418
+ mockImplementation(implementation: F): void;
419
+ mockImplementationOnce(implementation: F, onCall?: number): void;
420
+ resetCalls(): void;
421
+ restore(): void;
422
+ }
423
+ interface MockModuleContext {
424
+ restore(): void;
425
+ }
426
+ class MockPropertyContext<PropertyType = any> {
427
+ readonly accesses: Array<{
428
+ type: "get" | "set";
429
+ value: PropertyType;
430
+ stack: Error;
431
+ }>;
432
+ accessCount(): number;
433
+ mockImplementation(value: PropertyType): void;
434
+ mockImplementationOnce(value: PropertyType, onAccess?: number): void;
435
+ resetAccesses(): void;
436
+ restore(): void;
437
+ }
438
+ interface MockTimersOptions {
439
+ apis: ReadonlyArray<"setInterval" | "setTimeout" | "setImmediate" | "Date">;
440
+ now?: number | Date | undefined;
441
+ }
442
+ interface MockTimers {
443
+ enable(options?: MockTimersOptions): void;
444
+ setTime(milliseconds: number): void;
445
+ reset(): void;
446
+ tick(milliseconds: number): void;
447
+ runAll(): void;
448
+ [Symbol.dispose](): void;
449
+ }
450
+ namespace assert {
451
+ function register(name: string, fn: (this: TestContext, ...args: any[]) => void): void;
452
+ }
453
+ namespace snapshot {
454
+ function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void;
455
+ function setResolveSnapshotPath(fn: (path: string | undefined) => string): void;
456
+ }
457
+ }
458
+ type FunctionPropertyNames<T> = {
459
+ [K in keyof T]: T[K] extends Function ? K : never;
460
+ }[keyof T];
461
+ export = test;
462
+ }
@@ -0,0 +1,16 @@
1
+ declare module "node:timers/promises" {
2
+ import { TimerOptions } from "node:timers";
3
+ function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
4
+ function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
5
+ function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator<T>;
6
+ interface Scheduler {
7
+ wait(delay: number, options?: {
8
+ signal?: AbortSignal;
9
+ }): Promise<void>;
10
+ yield(): Promise<void>;
11
+ }
12
+ const scheduler: Scheduler;
13
+ }
14
+ declare module "timers/promises" {
15
+ export * from "node:timers/promises";
16
+ }
@@ -0,0 +1,43 @@
1
+ declare module "node:timers" {
2
+ import { Abortable } from "node:events";
3
+ import * as promises from "node:timers/promises";
4
+ export interface TimerOptions extends Abortable {
5
+ ref?: boolean | undefined;
6
+ }
7
+ global {
8
+ namespace NodeJS {
9
+ interface Immediate extends RefCounted, Disposable {
10
+ hasRef(): boolean;
11
+ ref(): this;
12
+ unref(): this;
13
+ [Symbol.dispose](): void;
14
+ _onImmediate(...args: any[]): void;
15
+ }
16
+ interface Timer extends RefCounted {
17
+ hasRef(): boolean;
18
+ refresh(): this;
19
+ [Symbol.toPrimitive](): number;
20
+ }
21
+ interface Timeout extends RefCounted, Disposable, Timer {
22
+ close(): this;
23
+ hasRef(): boolean;
24
+ ref(): this;
25
+ refresh(): this;
26
+ unref(): this;
27
+ [Symbol.toPrimitive](): number;
28
+ [Symbol.dispose](): void;
29
+ _onTimeout(...args: any[]): void;
30
+ }
31
+ }
32
+ }
33
+ import clearImmediate = globalThis.clearImmediate;
34
+ import clearInterval = globalThis.clearInterval;
35
+ import clearTimeout = globalThis.clearTimeout;
36
+ import setImmediate = globalThis.setImmediate;
37
+ import setInterval = globalThis.setInterval;
38
+ import setTimeout = globalThis.setTimeout;
39
+ export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout };
40
+ }
41
+ declare module "timers" {
42
+ export * from "node:timers";
43
+ }