@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,28 @@
1
+ declare module "node:readline/promises" {
2
+ import { Abortable } from "node:events";
3
+ import { CompleterResult, Direction, Interface as _Interface, ReadLineOptions as _ReadLineOptions, } from "node:readline";
4
+ class Interface extends _Interface {
5
+ question(query: string): Promise<string>;
6
+ question(query: string, options: Abortable): Promise<string>;
7
+ }
8
+ class Readline {
9
+ constructor(stream: NodeJS.WritableStream, options?: {
10
+ autoCommit?: boolean | undefined;
11
+ });
12
+ clearLine(dir: Direction): this;
13
+ clearScreenDown(): this;
14
+ commit(): Promise<void>;
15
+ cursorTo(x: number, y?: number): this;
16
+ moveCursor(dx: number, dy: number): this;
17
+ rollback(): this;
18
+ }
19
+ type Completer = (line: string) => CompleterResult | Promise<CompleterResult>;
20
+ interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> {
21
+ completer?: Completer | undefined;
22
+ }
23
+ function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): Interface;
24
+ function createInterface(options: ReadLineOptions): Interface;
25
+ }
26
+ declare module "readline/promises" {
27
+ export * from "node:readline/promises";
28
+ }
@@ -0,0 +1,94 @@
1
+ declare module "node:readline" {
2
+ import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
3
+ interface Key {
4
+ sequence?: string | undefined;
5
+ name?: string | undefined;
6
+ ctrl?: boolean | undefined;
7
+ meta?: boolean | undefined;
8
+ shift?: boolean | undefined;
9
+ }
10
+ interface InterfaceEventMap {
11
+ "close": [
12
+ ];
13
+ "error": [
14
+ error: Error
15
+ ];
16
+ "history": [
17
+ history: string[]
18
+ ];
19
+ "line": [
20
+ input: string
21
+ ];
22
+ "pause": [
23
+ ];
24
+ "resume": [
25
+ ];
26
+ "SIGCONT": [
27
+ ];
28
+ "SIGINT": [
29
+ ];
30
+ "SIGTSTP": [
31
+ ];
32
+ }
33
+ class Interface implements EventEmitter, Disposable {
34
+ protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
35
+ protected constructor(options: ReadLineOptions);
36
+ readonly terminal: boolean;
37
+ readonly line: string;
38
+ readonly cursor: number;
39
+ getPrompt(): string;
40
+ setPrompt(prompt: string): void;
41
+ prompt(preserveCursor?: boolean): void;
42
+ question(query: string, callback: (answer: string) => void): void;
43
+ question(query: string, options: Abortable, callback: (answer: string) => void): void;
44
+ pause(): this;
45
+ resume(): this;
46
+ close(): void;
47
+ [Symbol.dispose](): void;
48
+ write(data: string | Buffer, key?: Key): void;
49
+ write(data: undefined | null | string | Buffer, key: Key): void;
50
+ getCursorPos(): CursorPos;
51
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
52
+ }
53
+ interface Interface extends InternalEventEmitter<InterfaceEventMap> {
54
+ }
55
+ type ReadLine = Interface;
56
+ type Completer = (line: string) => CompleterResult;
57
+ type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
58
+ type CompleterResult = [
59
+ string[],
60
+ string
61
+ ];
62
+ interface ReadLineOptions {
63
+ input: NodeJS.ReadableStream;
64
+ output?: NodeJS.WritableStream | undefined;
65
+ completer?: Completer | AsyncCompleter | undefined;
66
+ terminal?: boolean | undefined;
67
+ history?: string[] | undefined;
68
+ historySize?: number | undefined;
69
+ removeHistoryDuplicates?: boolean | undefined;
70
+ prompt?: string | undefined;
71
+ crlfDelay?: number | undefined;
72
+ escapeCodeTimeout?: number | undefined;
73
+ tabSize?: number | undefined;
74
+ signal?: AbortSignal | undefined;
75
+ }
76
+ function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
77
+ function createInterface(options: ReadLineOptions): Interface;
78
+ function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
79
+ type Direction = -1 | 0 | 1;
80
+ interface CursorPos {
81
+ rows: number;
82
+ cols: number;
83
+ }
84
+ function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
85
+ function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
86
+ function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
87
+ function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
88
+ }
89
+ declare module "node:readline" {
90
+ export * as promises from "node:readline/promises";
91
+ }
92
+ declare module "readline" {
93
+ export * from "node:readline";
94
+ }
@@ -0,0 +1,104 @@
1
+ declare module "node:repl" {
2
+ import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline";
3
+ import { InspectOptions } from "node:util";
4
+ import { Context } from "node:vm";
5
+ interface ReplOptions {
6
+ prompt?: string | undefined;
7
+ input?: NodeJS.ReadableStream | undefined;
8
+ output?: NodeJS.WritableStream | undefined;
9
+ terminal?: boolean | undefined;
10
+ eval?: REPLEval | undefined;
11
+ preview?: boolean | undefined;
12
+ useColors?: boolean | undefined;
13
+ useGlobal?: boolean | undefined;
14
+ ignoreUndefined?: boolean | undefined;
15
+ writer?: REPLWriter | undefined;
16
+ completer?: Completer | AsyncCompleter | undefined;
17
+ replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
18
+ breakEvalOnSigint?: boolean | undefined;
19
+ handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined;
20
+ }
21
+ type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
22
+ type REPLWriter = (this: REPLServer, obj: any) => string;
23
+ const writer: REPLWriter & {
24
+ options: InspectOptions;
25
+ };
26
+ type REPLCommandAction = (this: REPLServer, text: string) => void;
27
+ interface REPLCommand {
28
+ help?: string | undefined;
29
+ action: REPLCommandAction;
30
+ }
31
+ interface REPLServerSetupHistoryOptions {
32
+ filePath?: string | undefined;
33
+ size?: number | undefined;
34
+ removeHistoryDuplicates?: boolean | undefined;
35
+ onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined;
36
+ }
37
+ interface REPLServerEventMap extends InterfaceEventMap {
38
+ "exit": [
39
+ ];
40
+ "reset": [
41
+ context: Context
42
+ ];
43
+ }
44
+ class REPLServer extends Interface {
45
+ private constructor();
46
+ readonly context: Context;
47
+ readonly inputStream: NodeJS.ReadableStream;
48
+ readonly outputStream: NodeJS.WritableStream;
49
+ readonly input: NodeJS.ReadableStream;
50
+ readonly output: NodeJS.WritableStream;
51
+ readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
52
+ readonly editorMode: boolean;
53
+ readonly underscoreAssigned: boolean;
54
+ readonly last: any;
55
+ readonly underscoreErrAssigned: boolean;
56
+ readonly lastError: any;
57
+ readonly eval: REPLEval;
58
+ readonly useColors: boolean;
59
+ readonly useGlobal: boolean;
60
+ readonly ignoreUndefined: boolean;
61
+ readonly writer: REPLWriter;
62
+ readonly completer: Completer | AsyncCompleter;
63
+ readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
64
+ defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
65
+ displayPrompt(preserveCursor?: boolean): void;
66
+ clearBufferedCommand(): void;
67
+ setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void;
68
+ setupHistory(historyConfig?: REPLServerSetupHistoryOptions, callback?: (err: Error | null, repl: this) => void): void;
69
+ addListener<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
70
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
71
+ emit<E extends keyof REPLServerEventMap>(eventName: E, ...args: REPLServerEventMap[E]): boolean;
72
+ emit(eventName: string | symbol, ...args: any[]): boolean;
73
+ listenerCount<E extends keyof REPLServerEventMap>(eventName: E, listener?: (...args: REPLServerEventMap[E]) => void): number;
74
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
75
+ listeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
76
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
77
+ off<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
78
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
79
+ on<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
80
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
81
+ once<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
82
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
83
+ prependListener<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
84
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
85
+ prependOnceListener<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
86
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
87
+ rawListeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
88
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
89
+ removeAllListeners<E extends keyof REPLServerEventMap>(eventName?: E): this;
90
+ removeAllListeners(eventName?: string | symbol): this;
91
+ removeListener<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
92
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
93
+ }
94
+ const REPL_MODE_SLOPPY: unique symbol;
95
+ const REPL_MODE_STRICT: unique symbol;
96
+ function start(options?: string | ReplOptions): REPLServer;
97
+ class Recoverable extends SyntaxError {
98
+ err: Error;
99
+ constructor(err: Error);
100
+ }
101
+ }
102
+ declare module "repl" {
103
+ export * from "node:repl";
104
+ }
@@ -0,0 +1,11 @@
1
+ declare module "node:sea" {
2
+ type AssetKey = string;
3
+ function isSea(): boolean;
4
+ function getAsset(key: AssetKey): ArrayBuffer;
5
+ function getAsset(key: AssetKey, encoding: string): string;
6
+ function getAssetAsBlob(key: AssetKey, options?: {
7
+ type: string;
8
+ }): Blob;
9
+ function getRawAsset(key: AssetKey): ArrayBuffer;
10
+ function getAssetKeys(): string[];
11
+ }
@@ -0,0 +1,183 @@
1
+ declare module "node:sqlite" {
2
+ import { PathLike } from "node:fs";
3
+ type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView;
4
+ type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array;
5
+ interface DatabaseSyncOptions {
6
+ open?: boolean | undefined;
7
+ enableForeignKeyConstraints?: boolean | undefined;
8
+ enableDoubleQuotedStringLiterals?: boolean | undefined;
9
+ readOnly?: boolean | undefined;
10
+ allowExtension?: boolean | undefined;
11
+ timeout?: number | undefined;
12
+ readBigInts?: boolean | undefined;
13
+ returnArrays?: boolean | undefined;
14
+ allowBareNamedParameters?: boolean | undefined;
15
+ allowUnknownNamedParameters?: boolean | undefined;
16
+ defensive?: boolean | undefined;
17
+ limits?: NodeJS.PartialOptions<DatabaseLimits> | undefined;
18
+ }
19
+ interface DatabaseLimits {
20
+ length: number;
21
+ sqlLength: number;
22
+ column: number;
23
+ exprDepth: number;
24
+ compoundSelect: number;
25
+ vdbeOp: number;
26
+ functionArg: number;
27
+ attach: number;
28
+ likePatternLength: number;
29
+ variableNumber: number;
30
+ triggerDepth: number;
31
+ }
32
+ interface CreateSessionOptions {
33
+ table?: string | undefined;
34
+ db?: string | undefined;
35
+ }
36
+ interface ApplyChangesetOptions {
37
+ filter?: ((tableName: string) => boolean) | undefined;
38
+ onConflict?: ((conflictType: number) => number) | undefined;
39
+ }
40
+ interface FunctionOptions {
41
+ deterministic?: boolean | undefined;
42
+ directOnly?: boolean | undefined;
43
+ useBigIntArguments?: boolean | undefined;
44
+ varargs?: boolean | undefined;
45
+ }
46
+ interface AggregateOptions<T extends SQLInputValue = SQLInputValue> extends FunctionOptions {
47
+ start: T | (() => T);
48
+ step: (accumulator: T, ...args: SQLOutputValue[]) => T;
49
+ result?: ((accumulator: T) => SQLInputValue) | undefined;
50
+ inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined;
51
+ }
52
+ interface PrepareOptions {
53
+ readBigInts?: boolean | undefined;
54
+ returnArrays?: boolean | undefined;
55
+ allowBareNamedParameters?: boolean | undefined;
56
+ allowUnknownNamedParameters?: boolean | undefined;
57
+ }
58
+ class DatabaseSync implements Disposable {
59
+ constructor(path: PathLike, options?: DatabaseSyncOptions);
60
+ aggregate(name: string, options: AggregateOptions): void;
61
+ aggregate<T extends SQLInputValue>(name: string, options: AggregateOptions<T>): void;
62
+ close(): void;
63
+ loadExtension(path: string): void;
64
+ enableLoadExtension(allow: boolean): void;
65
+ enableDefensive(active: boolean): void;
66
+ location(dbName?: string): string | null;
67
+ exec(sql: string): void;
68
+ function(name: string, options: FunctionOptions, fn: (...args: SQLOutputValue[]) => SQLInputValue): void;
69
+ function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void;
70
+ setAuthorizer(callback: ((actionCode: number, arg1: string | null, arg2: string | null, dbName: string | null, triggerOrView: string | null) => number) | null): void;
71
+ readonly isOpen: boolean;
72
+ readonly isTransaction: boolean;
73
+ readonly limits: DatabaseLimits;
74
+ open(): void;
75
+ prepare(sql: string, options?: PrepareOptions): StatementSync;
76
+ createTagStore(maxSize?: number): SQLTagStore;
77
+ createSession(options?: CreateSessionOptions): Session;
78
+ applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean;
79
+ [Symbol.dispose](): void;
80
+ }
81
+ interface Session {
82
+ changeset(): NodeJS.NonSharedUint8Array;
83
+ patchset(): NodeJS.NonSharedUint8Array;
84
+ close(): void;
85
+ [Symbol.dispose](): void;
86
+ }
87
+ interface SQLTagStore {
88
+ all(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): Record<string, SQLOutputValue>[];
89
+ get(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): Record<string, SQLOutputValue> | undefined;
90
+ iterate(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): NodeJS.Iterator<Record<string, SQLOutputValue>>;
91
+ run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges;
92
+ readonly size: number;
93
+ readonly capacity: number;
94
+ readonly db: DatabaseSync;
95
+ clear(): void;
96
+ }
97
+ interface StatementColumnMetadata {
98
+ column: string | null;
99
+ database: string | null;
100
+ name: string;
101
+ table: string | null;
102
+ type: string | null;
103
+ }
104
+ interface StatementResultingChanges {
105
+ changes: number | bigint;
106
+ lastInsertRowid: number | bigint;
107
+ }
108
+ class StatementSync {
109
+ private constructor();
110
+ all(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue>[];
111
+ all(namedParameters: Record<string, SQLInputValue>, ...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue>[];
112
+ columns(): StatementColumnMetadata[];
113
+ readonly expandedSQL: string;
114
+ get(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue> | undefined;
115
+ get(namedParameters: Record<string, SQLInputValue>, ...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue> | undefined;
116
+ iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator<Record<string, SQLOutputValue>>;
117
+ iterate(namedParameters: Record<string, SQLInputValue>, ...anonymousParameters: SQLInputValue[]): NodeJS.Iterator<Record<string, SQLOutputValue>>;
118
+ run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges;
119
+ run(namedParameters: Record<string, SQLInputValue>, ...anonymousParameters: SQLInputValue[]): StatementResultingChanges;
120
+ setAllowBareNamedParameters(enabled: boolean): void;
121
+ setAllowUnknownNamedParameters(enabled: boolean): void;
122
+ setReturnArrays(enabled: boolean): void;
123
+ setReadBigInts(enabled: boolean): void;
124
+ readonly sourceSQL: string;
125
+ }
126
+ interface BackupOptions {
127
+ source?: string | undefined;
128
+ target?: string | undefined;
129
+ rate?: number | undefined;
130
+ progress?: ((progressInfo: BackupProgressInfo) => void) | undefined;
131
+ }
132
+ interface BackupProgressInfo {
133
+ totalPages: number;
134
+ remainingPages: number;
135
+ }
136
+ function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise<number>;
137
+ namespace constants {
138
+ const SQLITE_CHANGESET_DATA: number;
139
+ const SQLITE_CHANGESET_NOTFOUND: number;
140
+ const SQLITE_CHANGESET_CONFLICT: number;
141
+ const SQLITE_CHANGESET_FOREIGN_KEY: number;
142
+ const SQLITE_CHANGESET_OMIT: number;
143
+ const SQLITE_CHANGESET_REPLACE: number;
144
+ const SQLITE_CHANGESET_ABORT: number;
145
+ const SQLITE_DENY: number;
146
+ const SQLITE_IGNORE: number;
147
+ const SQLITE_OK: number;
148
+ const SQLITE_CREATE_INDEX: number;
149
+ const SQLITE_CREATE_TABLE: number;
150
+ const SQLITE_CREATE_TEMP_INDEX: number;
151
+ const SQLITE_CREATE_TEMP_TABLE: number;
152
+ const SQLITE_CREATE_TEMP_TRIGGER: number;
153
+ const SQLITE_CREATE_TEMP_VIEW: number;
154
+ const SQLITE_CREATE_TRIGGER: number;
155
+ const SQLITE_CREATE_VIEW: number;
156
+ const SQLITE_DELETE: number;
157
+ const SQLITE_DROP_INDEX: number;
158
+ const SQLITE_DROP_TABLE: number;
159
+ const SQLITE_DROP_TEMP_INDEX: number;
160
+ const SQLITE_DROP_TEMP_TABLE: number;
161
+ const SQLITE_DROP_TEMP_TRIGGER: number;
162
+ const SQLITE_DROP_TEMP_VIEW: number;
163
+ const SQLITE_DROP_TRIGGER: number;
164
+ const SQLITE_DROP_VIEW: number;
165
+ const SQLITE_INSERT: number;
166
+ const SQLITE_PRAGMA: number;
167
+ const SQLITE_READ: number;
168
+ const SQLITE_SELECT: number;
169
+ const SQLITE_TRANSACTION: number;
170
+ const SQLITE_UPDATE: number;
171
+ const SQLITE_ATTACH: number;
172
+ const SQLITE_DETACH: number;
173
+ const SQLITE_ALTER_TABLE: number;
174
+ const SQLITE_REINDEX: number;
175
+ const SQLITE_ANALYZE: number;
176
+ const SQLITE_CREATE_VTABLE: number;
177
+ const SQLITE_DROP_VTABLE: number;
178
+ const SQLITE_FUNCTION: number;
179
+ const SQLITE_SAVEPOINT: number;
180
+ const SQLITE_COPY: number;
181
+ const SQLITE_RECURSIVE: number;
182
+ }
183
+ }
@@ -0,0 +1,13 @@
1
+ declare module "node:stream/consumers" {
2
+ import { Blob, NonSharedBuffer } from "node:buffer";
3
+ import { ReadableStream } from "node:stream/web";
4
+ function arrayBuffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
5
+ function blob(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<Blob>;
6
+ function buffer(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NonSharedBuffer>;
7
+ function bytes(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NodeJS.NonSharedUint8Array>;
8
+ function json(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
9
+ function text(stream: ReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
10
+ }
11
+ declare module "stream/consumers" {
12
+ export * from "node:stream/consumers";
13
+ }
@@ -0,0 +1,240 @@
1
+ declare module "node:stream/iter" {
2
+ const broadcastProtocol: unique symbol;
3
+ const drainableProtocol: unique symbol;
4
+ const shareProtocol: unique symbol;
5
+ const shareSyncProtocol: unique symbol;
6
+ const toAsyncStreamable: unique symbol;
7
+ const toStreamable: unique symbol;
8
+ type Source = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncSource> | AsyncIterable<Source> | Streamable | AsyncStreamable;
9
+ type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncSource> | Streamable;
10
+ type Transform = StatelessTransformFn | StatefulTransform;
11
+ type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform;
12
+ type TransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncTransformResult> | AsyncIterable<TransformResult>;
13
+ type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncTransformResult>;
14
+ interface AsyncStreamable {
15
+ [toAsyncStreamable](): Source;
16
+ }
17
+ interface Broadcastable {
18
+ [broadcastProtocol](options: BroadcastOptions): Broadcast;
19
+ }
20
+ interface Drainable {
21
+ [drainableProtocol](): Promise<boolean> | null;
22
+ }
23
+ interface Shareable {
24
+ [shareProtocol](options: ShareOptions): Share;
25
+ }
26
+ interface Streamable {
27
+ [toStreamable](): SyncSource;
28
+ }
29
+ interface SyncShareable {
30
+ [shareSyncProtocol](options: ShareSyncOptions): SyncShare;
31
+ }
32
+ type BackpressurePolicy = "strict" | "block" | "drop-oldest" | "drop-newest";
33
+ type ByteReadableStream = AsyncIterable<Uint8Array[]>;
34
+ type SyncByteReadableStream = Iterable<Uint8Array[]>;
35
+ interface WriteOptions {
36
+ signal?: AbortSignal;
37
+ }
38
+ interface PushStreamOptions {
39
+ highWaterMark?: number;
40
+ backpressure?: BackpressurePolicy;
41
+ signal?: AbortSignal;
42
+ }
43
+ interface PullOptions {
44
+ signal?: AbortSignal;
45
+ }
46
+ interface PipeToOptions {
47
+ signal?: AbortSignal;
48
+ preventClose?: boolean;
49
+ preventFail?: boolean;
50
+ }
51
+ interface PipeToSyncOptions {
52
+ preventClose?: boolean;
53
+ preventFail?: boolean;
54
+ }
55
+ interface ConsumeOptions {
56
+ signal?: AbortSignal;
57
+ limit?: number;
58
+ }
59
+ interface ConsumeSyncOptions {
60
+ limit?: number;
61
+ }
62
+ interface TextConsumeOptions extends ConsumeOptions {
63
+ encoding?: string;
64
+ }
65
+ interface TextConsumeSyncOptions extends ConsumeSyncOptions {
66
+ encoding?: string;
67
+ }
68
+ interface MergeOptions {
69
+ signal?: AbortSignal;
70
+ }
71
+ interface BroadcastOptions {
72
+ highWaterMark?: number;
73
+ backpressure?: BackpressurePolicy;
74
+ signal?: AbortSignal;
75
+ }
76
+ interface ShareOptions {
77
+ highWaterMark?: number;
78
+ backpressure?: BackpressurePolicy;
79
+ signal?: AbortSignal;
80
+ }
81
+ interface ShareSyncOptions {
82
+ highWaterMark?: number;
83
+ backpressure?: BackpressurePolicy;
84
+ }
85
+ interface DuplexDirectionOptions {
86
+ highWaterMark?: number;
87
+ backpressure?: BackpressurePolicy;
88
+ }
89
+ interface DuplexOptions {
90
+ highWaterMark?: number;
91
+ backpressure?: BackpressurePolicy;
92
+ a?: DuplexDirectionOptions;
93
+ b?: DuplexDirectionOptions;
94
+ signal?: AbortSignal;
95
+ }
96
+ interface TransformCallbackOptions {
97
+ signal: AbortSignal;
98
+ }
99
+ interface StatelessTransformFn {
100
+ (chunks: Uint8Array[] | null, options: TransformCallbackOptions): Promise<TransformResult | null> | TransformResult | null;
101
+ }
102
+ interface SyncStatelessTransformFn {
103
+ (chunks: Uint8Array[] | null): SyncTransformResult | null;
104
+ }
105
+ interface StatefulTransform {
106
+ transform(source: AsyncIterable<Uint8Array[] | null>, options: TransformCallbackOptions): AsyncIterable<TransformResult>;
107
+ }
108
+ interface SyncStatefulTransform {
109
+ transform(source: Iterable<Uint8Array[] | null>): Iterable<SyncTransformResult>;
110
+ }
111
+ interface PushWriter extends Writer, Drainable {
112
+ }
113
+ interface PushStreamResult {
114
+ writer: PushWriter;
115
+ readable: ByteReadableStream;
116
+ }
117
+ interface BroadcastWriter extends Writer, Drainable {
118
+ }
119
+ interface BroadcastResult {
120
+ writer: BroadcastWriter;
121
+ broadcast: Broadcast;
122
+ }
123
+ interface Writer extends Disposable, AsyncDisposable {
124
+ readonly desiredSize: number | null;
125
+ write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
126
+ writev(chunks: Array<Uint8Array | string>, options?: WriteOptions): Promise<void>;
127
+ writeSync(chunk: Uint8Array | string): boolean;
128
+ writevSync(chunks: Array<Uint8Array | string>): boolean;
129
+ end(options?: WriteOptions): Promise<number>;
130
+ endSync(): number;
131
+ fail(reason?: any): void;
132
+ }
133
+ interface PartialWriter extends Partial<Writer> {
134
+ write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
135
+ }
136
+ interface SyncWriter extends Disposable {
137
+ readonly desiredSize: number | null;
138
+ writeSync(chunk: Uint8Array | string): number;
139
+ writevSync(chunks: Array<Uint8Array | string>): number;
140
+ endSync(): number;
141
+ fail(reason?: any): void;
142
+ }
143
+ interface PartialSyncWriter extends Partial<SyncWriter> {
144
+ writeSync(chunk: Uint8Array | string): number;
145
+ }
146
+ interface Broadcast extends Disposable {
147
+ readonly consumerCount: number;
148
+ readonly bufferSize: number;
149
+ push(...args: any[]): ByteReadableStream;
150
+ cancel(reason?: any): void;
151
+ }
152
+ interface Share extends Disposable {
153
+ readonly consumerCount: number;
154
+ readonly bufferSize: number;
155
+ pull(...args: any[]): ByteReadableStream;
156
+ cancel(reason?: any): void;
157
+ }
158
+ interface SyncShare extends Disposable {
159
+ readonly consumerCount: number;
160
+ readonly bufferSize: number;
161
+ pull(...args: any): SyncByteReadableStream;
162
+ cancel(reason?: any): void;
163
+ }
164
+ interface DuplexChannel extends AsyncDisposable {
165
+ readonly writer: Writer;
166
+ readonly readable: ByteReadableStream;
167
+ close(): Promise<void>;
168
+ }
169
+ function push(...transforms: Transform[]): PushStreamResult;
170
+ function push(...args: [
171
+ ...transforms: Transform[],
172
+ options: PushStreamOptions
173
+ ]): PushStreamResult;
174
+ function from(input: Source): ByteReadableStream;
175
+ function fromSync(input: SyncSource): SyncByteReadableStream;
176
+ function pull(source: Source, ...transforms: Transform[]): ByteReadableStream;
177
+ function pull(source: Source, ...args: [
178
+ ...transforms: Transform[],
179
+ options: PullOptions
180
+ ]): ByteReadableStream;
181
+ function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream;
182
+ function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise<number>;
183
+ function pipeTo(source: Source, ...args: [
184
+ ...transforms: Transform[],
185
+ writer: PartialWriter
186
+ ]): Promise<number>;
187
+ function pipeTo(source: Source, ...args: [
188
+ ...transforms: Transform[],
189
+ writer: PartialWriter,
190
+ options: PipeToOptions
191
+ ]): Promise<number>;
192
+ function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number;
193
+ function pipeToSync(source: SyncSource, ...args: [
194
+ ...transforms: SyncTransform[],
195
+ writer: PartialSyncWriter
196
+ ]): number;
197
+ function pipeToSync(source: SyncSource, ...args: [
198
+ ...transforms: SyncTransform[],
199
+ writer: PartialSyncWriter,
200
+ options: PipeToSyncOptions
201
+ ]): number;
202
+ function bytes(source: Source, options?: ConsumeOptions): Promise<Uint8Array>;
203
+ function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array;
204
+ function text(source: Source, options?: TextConsumeOptions): Promise<string>;
205
+ function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string;
206
+ function arrayBuffer(source: Source, options?: ConsumeOptions): Promise<ArrayBuffer>;
207
+ function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer;
208
+ function array(source: Source, options?: ConsumeOptions): Promise<Uint8Array[]>;
209
+ function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[];
210
+ function tap(callback: StatelessTransformFn): StatelessTransformFn;
211
+ function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn;
212
+ function merge(...sources: Source[]): ByteReadableStream;
213
+ function merge(...args: [
214
+ ...sources: Source[],
215
+ options: MergeOptions
216
+ ]): ByteReadableStream;
217
+ function ondrain(drainable: any): Promise<boolean> | null;
218
+ function broadcast(options?: BroadcastOptions): BroadcastResult;
219
+ function share(source: Source, options?: ShareOptions): Share;
220
+ function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare;
221
+ function duplex(options?: DuplexOptions): [
222
+ DuplexChannel,
223
+ DuplexChannel
224
+ ];
225
+ namespace Broadcast {
226
+ function from(input: ByteReadableStream | SyncByteReadableStream | Broadcastable, options?: BroadcastOptions): BroadcastResult;
227
+ }
228
+ namespace Share {
229
+ function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share;
230
+ }
231
+ namespace SyncShare {
232
+ function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare;
233
+ }
234
+ namespace Stream {
235
+ export { array, arrayBuffer, arrayBufferSync, arraySync, broadcast, broadcastProtocol, bytes, bytesSync, drainableProtocol, duplex, from, fromSync, merge, ondrain, pipeTo, pipeToSync, pull, pullSync, push, share, shareProtocol, shareSync, shareSyncProtocol, tap, tapSync, text, textSync, toAsyncStreamable, toStreamable, };
236
+ }
237
+ }
238
+ declare module "stream/iter" {
239
+ export * from "node:stream/iter";
240
+ }