@psnext/slingcli 3.3.20260911-1 → 3.3.20260914-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 (420) hide show
  1. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-VDBOM5UG.js → chunk-BRL3MDQL.js} +1 -1
  2. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
  3. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  4. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  5. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +79 -32
  6. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  7. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  8. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  9. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  10. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  11. package/node_modules/@smithy/core/package.json +1 -1
  12. package/node_modules/@types/node/README.md +2 -2
  13. package/node_modules/@types/node/assert/strict.d.ts +13 -56
  14. package/node_modules/@types/node/assert.d.ts +189 -190
  15. package/node_modules/@types/node/async_hooks.d.ts +151 -43
  16. package/node_modules/@types/node/buffer.buffer.d.ts +12 -13
  17. package/node_modules/@types/node/buffer.d.ts +103 -237
  18. package/node_modules/@types/node/child_process.d.ts +39 -154
  19. package/node_modules/@types/node/cluster.d.ts +238 -384
  20. package/node_modules/@types/node/console.d.ts +45 -404
  21. package/node_modules/@types/node/constants.d.ts +3 -10
  22. package/node_modules/@types/node/crypto.d.ts +1000 -1593
  23. package/node_modules/@types/node/dgram.d.ts +133 -81
  24. package/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
  25. package/node_modules/@types/node/dns/promises.d.ts +9 -15
  26. package/node_modules/@types/node/dns.d.ts +136 -183
  27. package/node_modules/@types/node/domain.d.ts +12 -32
  28. package/node_modules/@types/node/events.d.ts +872 -840
  29. package/node_modules/@types/node/ffi.d.ts +486 -0
  30. package/node_modules/@types/node/fs/promises.d.ts +256 -85
  31. package/node_modules/@types/node/fs.d.ts +865 -525
  32. package/node_modules/@types/node/globals.d.ts +12 -34
  33. package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
  34. package/node_modules/@types/node/http.d.ts +433 -312
  35. package/node_modules/@types/node/http2.d.ts +545 -891
  36. package/node_modules/@types/node/https.d.ts +64 -243
  37. package/node_modules/@types/node/index.d.ts +25 -7
  38. package/node_modules/@types/node/inspector/promises.d.ts +35 -0
  39. package/node_modules/@types/node/inspector.d.ts +70 -58
  40. package/node_modules/@types/node/inspector.generated.d.ts +764 -410
  41. package/node_modules/@types/node/module.d.ts +54 -219
  42. package/node_modules/@types/node/net.d.ts +208 -222
  43. package/node_modules/@types/node/os.d.ts +41 -49
  44. package/node_modules/@types/node/package.json +13 -3
  45. package/node_modules/@types/node/path/posix.d.ts +8 -0
  46. package/node_modules/@types/node/path/win32.d.ts +8 -0
  47. package/node_modules/@types/node/path.d.ts +119 -141
  48. package/node_modules/@types/node/perf_hooks.d.ts +339 -690
  49. package/node_modules/@types/node/process.d.ts +389 -205
  50. package/node_modules/@types/node/punycode.d.ts +3 -31
  51. package/node_modules/@types/node/querystring.d.ts +3 -16
  52. package/node_modules/@types/node/quic.d.ts +2153 -0
  53. package/node_modules/@types/node/readline/promises.d.ts +3 -6
  54. package/node_modules/@types/node/readline.d.ts +66 -152
  55. package/node_modules/@types/node/repl.d.ts +101 -109
  56. package/node_modules/@types/node/sea.d.ts +1 -116
  57. package/node_modules/@types/node/sqlite.d.ts +486 -68
  58. package/node_modules/@types/node/stream/consumers.d.ts +91 -15
  59. package/node_modules/@types/node/stream/iter.d.ts +452 -0
  60. package/node_modules/@types/node/stream/promises.d.ts +136 -15
  61. package/node_modules/@types/node/stream/web.d.ts +197 -454
  62. package/node_modules/@types/node/stream.d.ts +603 -491
  63. package/node_modules/@types/node/string_decoder.d.ts +3 -43
  64. package/node_modules/@types/node/test/reporters.d.ts +59 -0
  65. package/node_modules/@types/node/test.d.ts +513 -292
  66. package/node_modules/@types/node/timers/promises.d.ts +3 -18
  67. package/node_modules/@types/node/timers.d.ts +3 -141
  68. package/node_modules/@types/node/tls.d.ts +166 -257
  69. package/node_modules/@types/node/trace_events.d.ts +3 -97
  70. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
  71. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  72. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
  73. package/node_modules/@types/node/ts5.6/index.d.ts +26 -6
  74. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  75. package/node_modules/@types/node/ts5.7/index.d.ts +118 -0
  76. package/node_modules/@types/node/tty.d.ts +61 -43
  77. package/node_modules/@types/node/url.d.ts +156 -584
  78. package/node_modules/@types/node/util/types.d.ts +558 -0
  79. package/node_modules/@types/node/util.d.ts +170 -1099
  80. package/node_modules/@types/node/v8.d.ts +175 -36
  81. package/node_modules/@types/node/vfs.d.ts +211 -0
  82. package/node_modules/@types/node/vm.d.ts +292 -209
  83. package/node_modules/@types/node/wasi.d.ts +24 -74
  84. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
  85. package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  86. package/node_modules/@types/node/web-globals/console.d.ts +9 -0
  87. package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  88. package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  89. package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  90. package/node_modules/@types/node/web-globals/events.d.ts +9 -0
  91. package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
  92. package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  93. package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  94. package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
  95. package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  96. package/node_modules/@types/node/web-globals/streams.d.ts +97 -0
  97. package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  98. package/node_modules/@types/node/web-globals/url.d.ts +24 -0
  99. package/node_modules/@types/node/worker_threads.d.ts +257 -407
  100. package/node_modules/@types/node/zlib/iter.d.ts +131 -0
  101. package/node_modules/@types/node/zlib.d.ts +24 -165
  102. package/node_modules/undici-types/agent.d.ts +12 -13
  103. package/node_modules/undici-types/api.d.ts +26 -26
  104. package/node_modules/undici-types/balanced-pool.d.ts +13 -12
  105. package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
  106. package/node_modules/undici-types/client-stats.d.ts +15 -0
  107. package/node_modules/undici-types/client.d.ts +63 -37
  108. package/node_modules/undici-types/connector.d.ts +5 -2
  109. package/node_modules/undici-types/cookies.d.ts +3 -1
  110. package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
  111. package/node_modules/undici-types/dispatcher.d.ts +136 -139
  112. package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  113. package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  114. package/node_modules/undici-types/errors.d.ts +92 -54
  115. package/node_modules/undici-types/eventsource.d.ts +9 -4
  116. package/node_modules/undici-types/fetch.d.ts +51 -25
  117. package/node_modules/undici-types/formdata.d.ts +7 -7
  118. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  119. package/node_modules/undici-types/global-origin.d.ts +5 -5
  120. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  121. package/node_modules/undici-types/handlers.d.ts +10 -9
  122. package/node_modules/undici-types/header.d.ts +162 -1
  123. package/node_modules/undici-types/index.d.ts +69 -47
  124. package/node_modules/undici-types/interceptors.d.ts +72 -9
  125. package/node_modules/undici-types/mock-agent.d.ts +36 -18
  126. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  127. package/node_modules/undici-types/mock-client.d.ts +6 -4
  128. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  129. package/node_modules/undici-types/mock-interceptor.d.ts +26 -21
  130. package/node_modules/undici-types/mock-pool.d.ts +6 -4
  131. package/node_modules/undici-types/package.json +1 -1
  132. package/node_modules/undici-types/patch.d.ts +0 -4
  133. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  134. package/node_modules/undici-types/pool.d.ts +14 -14
  135. package/node_modules/undici-types/proxy-agent.d.ts +14 -6
  136. package/node_modules/undici-types/readable.d.ts +19 -16
  137. package/node_modules/undici-types/retry-agent.d.ts +1 -1
  138. package/node_modules/undici-types/retry-handler.d.ts +19 -10
  139. package/node_modules/undici-types/round-robin-pool.d.ts +39 -0
  140. package/node_modules/undici-types/snapshot-agent.d.ts +113 -0
  141. package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
  142. package/node_modules/undici-types/util.d.ts +3 -3
  143. package/node_modules/undici-types/utility.d.ts +7 -0
  144. package/node_modules/undici-types/webidl.d.ts +148 -30
  145. package/node_modules/undici-types/websocket.d.ts +48 -10
  146. package/node_modules/zod/README.md +2 -2
  147. package/node_modules/zod/package.json +1 -1
  148. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  149. package/node_modules/zod/src/v4/classic/schemas.ts +14 -30
  150. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +1 -0
  151. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +2 -11
  152. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -4
  153. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +22 -0
  154. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +1 -1
  155. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  156. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +53 -137
  157. package/node_modules/zod/src/v4/classic/tests/string.test.ts +70 -1
  158. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +87 -35
  159. package/node_modules/zod/src/v4/core/api.ts +21 -29
  160. package/node_modules/zod/src/v4/core/checks.ts +61 -1
  161. package/node_modules/zod/src/v4/core/compile.ts +35 -24
  162. package/node_modules/zod/src/v4/core/core.ts +1 -3
  163. package/node_modules/zod/src/v4/core/json-schema-processors.ts +9 -63
  164. package/node_modules/zod/src/v4/core/memoizer.ts +2 -5
  165. package/node_modules/zod/src/v4/core/regexes.ts +4 -0
  166. package/node_modules/zod/src/v4/core/schemas.ts +36 -109
  167. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  168. package/node_modules/zod/src/v4/core/tests/compile.test.ts +177 -0
  169. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  170. package/node_modules/zod/src/v4/core/to-json-schema.ts +1 -1
  171. package/node_modules/zod/src/v4/core/util.ts +0 -4
  172. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  173. package/node_modules/zod/src/v4/core/visit.ts +0 -11
  174. package/node_modules/zod/src/v4/locales/ar.ts +1 -0
  175. package/node_modules/zod/src/v4/locales/az.ts +1 -0
  176. package/node_modules/zod/src/v4/locales/be.ts +1 -0
  177. package/node_modules/zod/src/v4/locales/bg.ts +1 -0
  178. package/node_modules/zod/src/v4/locales/bn.ts +1 -0
  179. package/node_modules/zod/src/v4/locales/ca.ts +1 -0
  180. package/node_modules/zod/src/v4/locales/ckb.ts +1 -0
  181. package/node_modules/zod/src/v4/locales/cs.ts +1 -0
  182. package/node_modules/zod/src/v4/locales/da.ts +1 -0
  183. package/node_modules/zod/src/v4/locales/de.ts +1 -0
  184. package/node_modules/zod/src/v4/locales/el.ts +1 -0
  185. package/node_modules/zod/src/v4/locales/en.ts +1 -0
  186. package/node_modules/zod/src/v4/locales/eo.ts +1 -0
  187. package/node_modules/zod/src/v4/locales/es.ts +1 -0
  188. package/node_modules/zod/src/v4/locales/fa.ts +1 -0
  189. package/node_modules/zod/src/v4/locales/fi.ts +1 -0
  190. package/node_modules/zod/src/v4/locales/fr-CA.ts +1 -0
  191. package/node_modules/zod/src/v4/locales/fr.ts +1 -0
  192. package/node_modules/zod/src/v4/locales/gu.ts +1 -0
  193. package/node_modules/zod/src/v4/locales/he.ts +1 -0
  194. package/node_modules/zod/src/v4/locales/hi.ts +1 -0
  195. package/node_modules/zod/src/v4/locales/hr.ts +1 -0
  196. package/node_modules/zod/src/v4/locales/hu.ts +1 -0
  197. package/node_modules/zod/src/v4/locales/hy.ts +1 -0
  198. package/node_modules/zod/src/v4/locales/id.ts +1 -0
  199. package/node_modules/zod/src/v4/locales/is.ts +1 -0
  200. package/node_modules/zod/src/v4/locales/it.ts +1 -0
  201. package/node_modules/zod/src/v4/locales/ja.ts +1 -0
  202. package/node_modules/zod/src/v4/locales/ka.ts +1 -0
  203. package/node_modules/zod/src/v4/locales/km.ts +1 -0
  204. package/node_modules/zod/src/v4/locales/kn.ts +1 -0
  205. package/node_modules/zod/src/v4/locales/ko.ts +1 -0
  206. package/node_modules/zod/src/v4/locales/lt.ts +1 -0
  207. package/node_modules/zod/src/v4/locales/mk.ts +1 -0
  208. package/node_modules/zod/src/v4/locales/ms.ts +1 -0
  209. package/node_modules/zod/src/v4/locales/ne.ts +1 -0
  210. package/node_modules/zod/src/v4/locales/nl.ts +1 -0
  211. package/node_modules/zod/src/v4/locales/nn.ts +1 -0
  212. package/node_modules/zod/src/v4/locales/no.ts +1 -0
  213. package/node_modules/zod/src/v4/locales/ota.ts +1 -0
  214. package/node_modules/zod/src/v4/locales/pl.ts +1 -0
  215. package/node_modules/zod/src/v4/locales/ps.ts +1 -0
  216. package/node_modules/zod/src/v4/locales/pt-BR.ts +1 -0
  217. package/node_modules/zod/src/v4/locales/pt.ts +1 -0
  218. package/node_modules/zod/src/v4/locales/ro.ts +1 -0
  219. package/node_modules/zod/src/v4/locales/ru.ts +1 -0
  220. package/node_modules/zod/src/v4/locales/sk.ts +1 -0
  221. package/node_modules/zod/src/v4/locales/sl.ts +1 -0
  222. package/node_modules/zod/src/v4/locales/sv.ts +1 -0
  223. package/node_modules/zod/src/v4/locales/ta.ts +1 -0
  224. package/node_modules/zod/src/v4/locales/tg.ts +1 -0
  225. package/node_modules/zod/src/v4/locales/th.ts +1 -0
  226. package/node_modules/zod/src/v4/locales/tk.ts +1 -0
  227. package/node_modules/zod/src/v4/locales/tr.ts +1 -0
  228. package/node_modules/zod/src/v4/locales/uk.ts +1 -0
  229. package/node_modules/zod/src/v4/locales/ur.ts +1 -0
  230. package/node_modules/zod/src/v4/locales/uz.ts +1 -0
  231. package/node_modules/zod/src/v4/locales/vi.ts +1 -0
  232. package/node_modules/zod/src/v4/locales/yo.ts +1 -0
  233. package/node_modules/zod/src/v4/locales/zh-CN.ts +1 -0
  234. package/node_modules/zod/src/v4/locales/zh-TW.ts +1 -0
  235. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  236. package/node_modules/zod/src/v4/mini/schemas.ts +12 -23
  237. package/node_modules/zod/src/v4/mini/tests/index.test.ts +56 -0
  238. package/node_modules/zod/src/v4/mini/tests/string.test.ts +7 -0
  239. package/node_modules/zod/v4/classic/checks.cjs +2 -1
  240. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  241. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  242. package/node_modules/zod/v4/classic/checks.js +1 -1
  243. package/node_modules/zod/v4/classic/schemas.cjs +11 -15
  244. package/node_modules/zod/v4/classic/schemas.d.cts +4 -6
  245. package/node_modules/zod/v4/classic/schemas.d.ts +4 -6
  246. package/node_modules/zod/v4/classic/schemas.js +9 -13
  247. package/node_modules/zod/v4/core/api.cjs +11 -23
  248. package/node_modules/zod/v4/core/api.d.cts +8 -4
  249. package/node_modules/zod/v4/core/api.d.ts +8 -4
  250. package/node_modules/zod/v4/core/api.js +11 -23
  251. package/node_modules/zod/v4/core/checks.cjs +32 -1
  252. package/node_modules/zod/v4/core/checks.d.cts +16 -0
  253. package/node_modules/zod/v4/core/checks.d.ts +16 -0
  254. package/node_modules/zod/v4/core/checks.js +31 -0
  255. package/node_modules/zod/v4/core/compile.cjs +12 -17
  256. package/node_modules/zod/v4/core/compile.js +13 -18
  257. package/node_modules/zod/v4/core/core.cjs +1 -1
  258. package/node_modules/zod/v4/core/core.js +1 -1
  259. package/node_modules/zod/v4/core/json-schema-processors.cjs +8 -44
  260. package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -1
  261. package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -1
  262. package/node_modules/zod/v4/core/json-schema-processors.js +8 -43
  263. package/node_modules/zod/v4/core/memoizer.cjs +2 -5
  264. package/node_modules/zod/v4/core/memoizer.js +2 -5
  265. package/node_modules/zod/v4/core/regexes.cjs +4 -2
  266. package/node_modules/zod/v4/core/regexes.d.cts +1 -0
  267. package/node_modules/zod/v4/core/regexes.d.ts +1 -0
  268. package/node_modules/zod/v4/core/regexes.js +2 -0
  269. package/node_modules/zod/v4/core/schemas.cjs +33 -73
  270. package/node_modules/zod/v4/core/schemas.d.cts +7 -22
  271. package/node_modules/zod/v4/core/schemas.d.ts +7 -22
  272. package/node_modules/zod/v4/core/schemas.js +30 -72
  273. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -1
  274. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -3
  275. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -3
  276. package/node_modules/zod/v4/core/to-json-schema.js +1 -1
  277. package/node_modules/zod/v4/core/util.cjs +0 -4
  278. package/node_modules/zod/v4/core/util.js +0 -4
  279. package/node_modules/zod/v4/core/versions.cjs +1 -1
  280. package/node_modules/zod/v4/core/versions.js +1 -1
  281. package/node_modules/zod/v4/core/visit.cjs +0 -12
  282. package/node_modules/zod/v4/core/visit.js +0 -12
  283. package/node_modules/zod/v4/locales/ar.cjs +1 -0
  284. package/node_modules/zod/v4/locales/ar.js +1 -0
  285. package/node_modules/zod/v4/locales/az.cjs +1 -0
  286. package/node_modules/zod/v4/locales/az.js +1 -0
  287. package/node_modules/zod/v4/locales/be.cjs +1 -0
  288. package/node_modules/zod/v4/locales/be.js +1 -0
  289. package/node_modules/zod/v4/locales/bg.cjs +1 -0
  290. package/node_modules/zod/v4/locales/bg.js +1 -0
  291. package/node_modules/zod/v4/locales/bn.cjs +1 -0
  292. package/node_modules/zod/v4/locales/bn.js +1 -0
  293. package/node_modules/zod/v4/locales/ca.cjs +1 -0
  294. package/node_modules/zod/v4/locales/ca.js +1 -0
  295. package/node_modules/zod/v4/locales/ckb.cjs +1 -0
  296. package/node_modules/zod/v4/locales/ckb.js +1 -0
  297. package/node_modules/zod/v4/locales/cs.cjs +1 -0
  298. package/node_modules/zod/v4/locales/cs.js +1 -0
  299. package/node_modules/zod/v4/locales/da.cjs +1 -0
  300. package/node_modules/zod/v4/locales/da.js +1 -0
  301. package/node_modules/zod/v4/locales/de.cjs +1 -0
  302. package/node_modules/zod/v4/locales/de.js +1 -0
  303. package/node_modules/zod/v4/locales/el.cjs +1 -0
  304. package/node_modules/zod/v4/locales/el.js +1 -0
  305. package/node_modules/zod/v4/locales/en.cjs +1 -0
  306. package/node_modules/zod/v4/locales/en.js +1 -0
  307. package/node_modules/zod/v4/locales/eo.cjs +1 -0
  308. package/node_modules/zod/v4/locales/eo.js +1 -0
  309. package/node_modules/zod/v4/locales/es.cjs +1 -0
  310. package/node_modules/zod/v4/locales/es.js +1 -0
  311. package/node_modules/zod/v4/locales/fa.cjs +1 -0
  312. package/node_modules/zod/v4/locales/fa.js +1 -0
  313. package/node_modules/zod/v4/locales/fi.cjs +1 -0
  314. package/node_modules/zod/v4/locales/fi.js +1 -0
  315. package/node_modules/zod/v4/locales/fr-CA.cjs +1 -0
  316. package/node_modules/zod/v4/locales/fr-CA.js +1 -0
  317. package/node_modules/zod/v4/locales/fr.cjs +1 -0
  318. package/node_modules/zod/v4/locales/fr.js +1 -0
  319. package/node_modules/zod/v4/locales/gu.cjs +1 -0
  320. package/node_modules/zod/v4/locales/gu.js +1 -0
  321. package/node_modules/zod/v4/locales/he.cjs +1 -0
  322. package/node_modules/zod/v4/locales/he.js +1 -0
  323. package/node_modules/zod/v4/locales/hi.cjs +1 -0
  324. package/node_modules/zod/v4/locales/hi.js +1 -0
  325. package/node_modules/zod/v4/locales/hr.cjs +1 -0
  326. package/node_modules/zod/v4/locales/hr.js +1 -0
  327. package/node_modules/zod/v4/locales/hu.cjs +1 -0
  328. package/node_modules/zod/v4/locales/hu.js +1 -0
  329. package/node_modules/zod/v4/locales/hy.cjs +1 -0
  330. package/node_modules/zod/v4/locales/hy.js +1 -0
  331. package/node_modules/zod/v4/locales/id.cjs +1 -0
  332. package/node_modules/zod/v4/locales/id.js +1 -0
  333. package/node_modules/zod/v4/locales/is.cjs +1 -0
  334. package/node_modules/zod/v4/locales/is.js +1 -0
  335. package/node_modules/zod/v4/locales/it.cjs +1 -0
  336. package/node_modules/zod/v4/locales/it.js +1 -0
  337. package/node_modules/zod/v4/locales/ja.cjs +1 -0
  338. package/node_modules/zod/v4/locales/ja.js +1 -0
  339. package/node_modules/zod/v4/locales/ka.cjs +1 -0
  340. package/node_modules/zod/v4/locales/ka.js +1 -0
  341. package/node_modules/zod/v4/locales/km.cjs +1 -0
  342. package/node_modules/zod/v4/locales/km.js +1 -0
  343. package/node_modules/zod/v4/locales/kn.cjs +1 -0
  344. package/node_modules/zod/v4/locales/kn.js +1 -0
  345. package/node_modules/zod/v4/locales/ko.cjs +1 -0
  346. package/node_modules/zod/v4/locales/ko.js +1 -0
  347. package/node_modules/zod/v4/locales/lt.cjs +1 -0
  348. package/node_modules/zod/v4/locales/lt.js +1 -0
  349. package/node_modules/zod/v4/locales/mk.cjs +1 -0
  350. package/node_modules/zod/v4/locales/mk.js +1 -0
  351. package/node_modules/zod/v4/locales/ms.cjs +1 -0
  352. package/node_modules/zod/v4/locales/ms.js +1 -0
  353. package/node_modules/zod/v4/locales/ne.cjs +1 -0
  354. package/node_modules/zod/v4/locales/ne.js +1 -0
  355. package/node_modules/zod/v4/locales/nl.cjs +1 -0
  356. package/node_modules/zod/v4/locales/nl.js +1 -0
  357. package/node_modules/zod/v4/locales/nn.cjs +1 -0
  358. package/node_modules/zod/v4/locales/nn.js +1 -0
  359. package/node_modules/zod/v4/locales/no.cjs +1 -0
  360. package/node_modules/zod/v4/locales/no.js +1 -0
  361. package/node_modules/zod/v4/locales/ota.cjs +1 -0
  362. package/node_modules/zod/v4/locales/ota.js +1 -0
  363. package/node_modules/zod/v4/locales/pl.cjs +1 -0
  364. package/node_modules/zod/v4/locales/pl.js +1 -0
  365. package/node_modules/zod/v4/locales/ps.cjs +1 -0
  366. package/node_modules/zod/v4/locales/ps.js +1 -0
  367. package/node_modules/zod/v4/locales/pt-BR.cjs +1 -0
  368. package/node_modules/zod/v4/locales/pt-BR.js +1 -0
  369. package/node_modules/zod/v4/locales/pt.cjs +1 -0
  370. package/node_modules/zod/v4/locales/pt.js +1 -0
  371. package/node_modules/zod/v4/locales/ro.cjs +1 -0
  372. package/node_modules/zod/v4/locales/ro.js +1 -0
  373. package/node_modules/zod/v4/locales/ru.cjs +1 -0
  374. package/node_modules/zod/v4/locales/ru.js +1 -0
  375. package/node_modules/zod/v4/locales/sk.cjs +1 -0
  376. package/node_modules/zod/v4/locales/sk.js +1 -0
  377. package/node_modules/zod/v4/locales/sl.cjs +1 -0
  378. package/node_modules/zod/v4/locales/sl.js +1 -0
  379. package/node_modules/zod/v4/locales/sv.cjs +1 -0
  380. package/node_modules/zod/v4/locales/sv.js +1 -0
  381. package/node_modules/zod/v4/locales/ta.cjs +1 -0
  382. package/node_modules/zod/v4/locales/ta.js +1 -0
  383. package/node_modules/zod/v4/locales/tg.cjs +1 -0
  384. package/node_modules/zod/v4/locales/tg.js +1 -0
  385. package/node_modules/zod/v4/locales/th.cjs +1 -0
  386. package/node_modules/zod/v4/locales/th.js +1 -0
  387. package/node_modules/zod/v4/locales/tk.cjs +1 -0
  388. package/node_modules/zod/v4/locales/tk.js +1 -0
  389. package/node_modules/zod/v4/locales/tr.cjs +1 -0
  390. package/node_modules/zod/v4/locales/tr.js +1 -0
  391. package/node_modules/zod/v4/locales/uk.cjs +1 -0
  392. package/node_modules/zod/v4/locales/uk.js +1 -0
  393. package/node_modules/zod/v4/locales/ur.cjs +1 -0
  394. package/node_modules/zod/v4/locales/ur.js +1 -0
  395. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  396. package/node_modules/zod/v4/locales/uz.js +1 -0
  397. package/node_modules/zod/v4/locales/vi.cjs +1 -0
  398. package/node_modules/zod/v4/locales/vi.js +1 -0
  399. package/node_modules/zod/v4/locales/yo.cjs +1 -0
  400. package/node_modules/zod/v4/locales/yo.js +1 -0
  401. package/node_modules/zod/v4/locales/zh-CN.cjs +1 -0
  402. package/node_modules/zod/v4/locales/zh-CN.js +1 -0
  403. package/node_modules/zod/v4/locales/zh-TW.cjs +1 -0
  404. package/node_modules/zod/v4/locales/zh-TW.js +1 -0
  405. package/node_modules/zod/v4/mini/checks.cjs +2 -1
  406. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  407. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  408. package/node_modules/zod/v4/mini/checks.js +1 -1
  409. package/node_modules/zod/v4/mini/schemas.cjs +11 -13
  410. package/node_modules/zod/v4/mini/schemas.d.cts +1 -4
  411. package/node_modules/zod/v4/mini/schemas.d.ts +1 -4
  412. package/node_modules/zod/v4/mini/schemas.js +9 -11
  413. package/package.json +2 -2
  414. package/slingshot/index.js +183 -182
  415. package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  416. package/node_modules/@types/node/compatibility/index.d.ts +0 -9
  417. package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  418. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  419. package/node_modules/undici-types/file.d.ts +0 -39
  420. package/node_modules/undici-types/filereader.d.ts +0 -54
@@ -1,47 +1,3 @@
1
- /**
2
- * The `node:sqlite` module facilitates working with SQLite databases.
3
- * To access it:
4
- *
5
- * ```js
6
- * import sqlite from 'node:sqlite';
7
- * ```
8
- *
9
- * This module is only available under the `node:` scheme. The following will not
10
- * work:
11
- *
12
- * ```js
13
- * import sqlite from 'sqlite';
14
- * ```
15
- *
16
- * The following example shows the basic usage of the `node:sqlite` module to open
17
- * an in-memory database, write data to the database, and then read the data back.
18
- *
19
- * ```js
20
- * import { DatabaseSync } from 'node:sqlite';
21
- * const database = new DatabaseSync(':memory:');
22
- *
23
- * // Execute SQL statements from strings.
24
- * database.exec(`
25
- * CREATE TABLE data(
26
- * key INTEGER PRIMARY KEY,
27
- * value TEXT
28
- * ) STRICT
29
- * `);
30
- * // Create a prepared statement to insert data into the database.
31
- * const insert = database.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
32
- * // Execute the prepared statement with bound values.
33
- * insert.run(1, 'hello');
34
- * insert.run(2, 'world');
35
- * // Create a prepared statement to read data from the database.
36
- * const query = database.prepare('SELECT * FROM data ORDER BY key');
37
- * // Execute the prepared statement and log the result set.
38
- * console.log(query.all());
39
- * // Prints: [ { key: 1, value: 'hello' }, { key: 2, value: 'world' } ]
40
- * ```
41
- * @since v22.5.0
42
- * @experimental
43
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/sqlite.js)
44
- */
45
1
  declare module "node:sqlite" {
46
2
  import { PathLike } from "node:fs";
47
3
  type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView;
@@ -92,37 +48,68 @@ declare module "node:sqlite" {
92
48
  * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of
93
49
  * time that SQLite will wait for a database lock to be released before
94
50
  * returning an error.
95
- * @since v22.16.0
51
+ * @since v24.0.0
96
52
  * @default 0
97
53
  */
98
54
  timeout?: number | undefined;
99
55
  /**
100
56
  * If `true`, integer fields are read as JavaScript `BigInt` values. If `false`,
101
57
  * integer fields are read as JavaScript numbers.
102
- * @since v22.18.0
58
+ * @since v24.4.0
103
59
  * @default false
104
60
  */
105
61
  readBigInts?: boolean | undefined;
106
62
  /**
107
63
  * If `true`, query results are returned as arrays instead of objects.
108
- * @since v22.18.0
64
+ * @since v24.4.0
109
65
  * @default false
110
66
  */
111
67
  returnArrays?: boolean | undefined;
112
68
  /**
113
69
  * If `true`, allows binding named parameters without the prefix
114
70
  * character (e.g., `foo` instead of `:foo`).
115
- * @since v22.18.0
71
+ * @since v24.4.40
116
72
  * @default true
117
73
  */
118
74
  allowBareNamedParameters?: boolean | undefined;
119
75
  /**
120
76
  * If `true`, unknown named parameters are ignored when binding.
121
77
  * If `false`, an exception is thrown for unknown named parameters.
122
- * @since v22.18.0
78
+ * @since v24.4.40
123
79
  * @default false
124
80
  */
125
81
  allowUnknownNamedParameters?: boolean | undefined;
82
+ /**
83
+ * If `true`, enables the defensive flag. When the defensive flag is enabled,
84
+ * language features that allow ordinary SQL to deliberately corrupt the database file are disabled.
85
+ * The defensive flag can also be set using `enableDefensive()`.
86
+ * @since v25.1.0
87
+ * @default true
88
+ */
89
+ defensive?: boolean | undefined;
90
+ /**
91
+ * Configuration for various SQLite limits. These limits
92
+ * can be used to prevent excessive resource consumption when handling
93
+ * potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html)
94
+ * in the SQLite documentation for details. Default values are determined by
95
+ * SQLite's compile-time defaults and may vary depending on how SQLite was
96
+ * built. The following properties are supported:
97
+ * @since v25.8.0
98
+ */
99
+ limits?: NodeJS.PartialOptions<DatabaseLimits> | undefined;
100
+ }
101
+ interface DatabaseLimits {
102
+ length: number;
103
+ sqlLength: number;
104
+ column: number;
105
+ exprDepth: number;
106
+ compoundSelect: number;
107
+ vdbeOp: number;
108
+ functionArg: number;
109
+ attach: number;
110
+ likePatternLength: number;
111
+ variableNumber: number;
112
+ triggerDepth: number;
126
113
  }
127
114
  interface CreateSessionOptions {
128
115
  /**
@@ -140,8 +127,12 @@ declare module "node:sqlite" {
140
127
  }
141
128
  interface ApplyChangesetOptions {
142
129
  /**
143
- * Skip changes that, when targeted table name is supplied to this function, return a truthy value.
144
- * By default, all changes are attempted.
130
+ * for each table affected by at least
131
+ * one change in the changeset, the `filter` callback is invoked with the
132
+ * table name as the first argument. If the return value is falsy, then no
133
+ * attempt is made to apply any changes to the table.
134
+ * Otherwise, if the return value is truthy or no `filter` callback is provided,
135
+ * all changes related to the table are attempted.
145
136
  * @since v22.12.0
146
137
  */
147
138
  filter?: ((tableName: string) => boolean) | undefined;
@@ -171,6 +162,13 @@ declare module "node:sqlite" {
171
162
  */
172
163
  onConflict?: ((conflictType: number) => number) | undefined;
173
164
  }
165
+ interface DeserializeOptions {
166
+ /**
167
+ * Name of the database to deserialize into.
168
+ * @default 'main'
169
+ */
170
+ dbName?: string | undefined;
171
+ }
174
172
  interface FunctionOptions {
175
173
  /**
176
174
  * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is
@@ -225,6 +223,28 @@ declare module "node:sqlite" {
225
223
  */
226
224
  inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined;
227
225
  }
226
+ interface PrepareOptions {
227
+ /**
228
+ * If `true`, integer fields are read as `BigInt`s.
229
+ * @since v25.5.0
230
+ */
231
+ readBigInts?: boolean | undefined;
232
+ /**
233
+ * If `true`, results are returned as arrays.
234
+ * @since v25.5.0
235
+ */
236
+ returnArrays?: boolean | undefined;
237
+ /**
238
+ * If `true`, allows binding named parameters without the prefix character.
239
+ * @since v25.5.0
240
+ */
241
+ allowBareNamedParameters?: boolean | undefined;
242
+ /**
243
+ * If `true`, unknown named parameters are ignored.
244
+ * @since v25.5.0
245
+ */
246
+ allowUnknownNamedParameters?: boolean | undefined;
247
+ }
228
248
  /**
229
249
  * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs
230
250
  * exposed by this class execute synchronously.
@@ -266,7 +286,7 @@ declare module "node:sqlite" {
266
286
  *
267
287
  * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 }
268
288
  * ```
269
- * @since v22.16.0
289
+ * @since v24.0.0
270
290
  * @param name The name of the SQLite function to create.
271
291
  * @param options Function configuration settings.
272
292
  */
@@ -282,10 +302,23 @@ declare module "node:sqlite" {
282
302
  * Loads a shared library into the database connection. This method is a wrapper
283
303
  * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the
284
304
  * `allowExtension` option when constructing the `DatabaseSync` instance.
305
+ *
306
+ * ```js
307
+ * import { DatabaseSync } from 'node:sqlite';
308
+ * const database = new DatabaseSync(':memory:', { allowExtension: true });
309
+ *
310
+ * // Load using the entry point derived from the filename.
311
+ * database.loadExtension('./decimal.dylib');
312
+ *
313
+ * // Override the entry point when the derived name does not match.
314
+ * database.loadExtension('./base64.dylib', 'sqlite3_base64_init');
285
315
  * @since v22.13.0
286
316
  * @param path The path to the shared library to load.
317
+ * @param entryPoint The name of the extension's entry-point function. When
318
+ * omitted, SQLite derives the entry point from the shared library's filename;
319
+ * pass this argument explicitly when the derived name does not match.
287
320
  */
288
- loadExtension(path: string): void;
321
+ loadExtension(path: string, entryPoint?: string): void;
289
322
  /**
290
323
  * Enables or disables the `loadExtension` SQL function, and the `loadExtension()`
291
324
  * method. When `allowExtension` is `false` when constructing, you cannot enable
@@ -294,9 +327,17 @@ declare module "node:sqlite" {
294
327
  * @param allow Whether to allow loading extensions.
295
328
  */
296
329
  enableLoadExtension(allow: boolean): void;
330
+ /**
331
+ * Enables or disables the defensive flag. When the defensive flag is active,
332
+ * language features that allow ordinary SQL to deliberately corrupt the database file are disabled.
333
+ * See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive) in the SQLite documentation for details.
334
+ * @since v25.1.0
335
+ * @param active Whether to set the defensive flag.
336
+ */
337
+ enableDefensive(active: boolean): void;
297
338
  /**
298
339
  * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html)
299
- * @since v22.16.0
340
+ * @since v24.0.0
300
341
  * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other
301
342
  * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`.
302
343
  * @returns The location of the database file. When using an in-memory database,
@@ -317,18 +358,75 @@ declare module "node:sqlite" {
317
358
  * @since v22.13.0
318
359
  * @param name The name of the SQLite function to create.
319
360
  * @param options Optional configuration settings for the function.
320
- * @param func The JavaScript function to call when the SQLite
321
- * function is invoked. The return value of this function should be a valid
322
- * SQLite data type: see
323
- * [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v22.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite).
324
- * The result defaults to `NULL` if the return value is `undefined`.
361
+ * @param fn The JavaScript function to call when the SQLite function is
362
+ * invoked. The return value of this function should be a valid SQLite data type:
363
+ * see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v26.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to
364
+ * `NULL` if the return value is `undefined`.
325
365
  */
326
366
  function(
327
367
  name: string,
328
368
  options: FunctionOptions,
329
- func: (...args: SQLOutputValue[]) => SQLInputValue,
369
+ fn: (...args: SQLOutputValue[]) => SQLInputValue,
370
+ ): void;
371
+ function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void;
372
+ /**
373
+ * Sets an authorizer callback that SQLite will invoke whenever it attempts to
374
+ * access data or modify the database schema through prepared statements.
375
+ * This can be used to implement security policies, audit access, or restrict certain operations.
376
+ * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html).
377
+ *
378
+ * When invoked, the callback receives five arguments:
379
+ *
380
+ * * `actionCode` {number} The type of operation being performed (e.g.,
381
+ * `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`).
382
+ * * `arg1` {string|null} The first argument (context-dependent, often a table name).
383
+ * * `arg2` {string|null} The second argument (context-dependent, often a column name).
384
+ * * `dbName` {string|null} The name of the database.
385
+ * * `triggerOrView` {string|null} The name of the trigger or view causing the access.
386
+ *
387
+ * The callback must return one of the following constants:
388
+ *
389
+ * * `SQLITE_OK` - Allow the operation.
390
+ * * `SQLITE_DENY` - Deny the operation (causes an error).
391
+ * * `SQLITE_IGNORE` - Ignore the operation (silently skip).
392
+ *
393
+ * ```js
394
+ * import { DatabaseSync, constants } from 'node:sqlite';
395
+ * const db = new DatabaseSync(':memory:');
396
+ *
397
+ * // Set up an authorizer that denies all table creation
398
+ * db.setAuthorizer((actionCode) => {
399
+ * if (actionCode === constants.SQLITE_CREATE_TABLE) {
400
+ * return constants.SQLITE_DENY;
401
+ * }
402
+ * return constants.SQLITE_OK;
403
+ * });
404
+ *
405
+ * // This will work
406
+ * db.prepare('SELECT 1').get();
407
+ *
408
+ * // This will throw an error due to authorization denial
409
+ * try {
410
+ * db.exec('CREATE TABLE blocked (id INTEGER)');
411
+ * } catch (err) {
412
+ * console.log('Operation blocked:', err.message);
413
+ * }
414
+ * ```
415
+ * @since v24.10.0
416
+ * @param callback The authorizer function to set, or `null` to
417
+ * clear the current authorizer.
418
+ */
419
+ setAuthorizer(
420
+ callback:
421
+ | ((
422
+ actionCode: number,
423
+ arg1: string | null,
424
+ arg2: string | null,
425
+ dbName: string | null,
426
+ triggerOrView: string | null,
427
+ ) => number)
428
+ | null,
330
429
  ): void;
331
- function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void;
332
430
  /**
333
431
  * Whether the database is currently open or not.
334
432
  * @since v22.15.0
@@ -337,23 +435,191 @@ declare module "node:sqlite" {
337
435
  /**
338
436
  * Whether the database is currently within a transaction. This method
339
437
  * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html).
340
- * @since v22.16.0
438
+ * @since v24.0.0
341
439
  */
342
440
  readonly isTransaction: boolean;
441
+ /**
442
+ * An object for getting and setting SQLite database limits at runtime.
443
+ * Each property corresponds to an SQLite limit and can be read or written.
444
+ *
445
+ * ```js
446
+ * const db = new DatabaseSync(':memory:');
447
+ *
448
+ * // Read current limit
449
+ * console.log(db.limits.length);
450
+ *
451
+ * // Set a new limit
452
+ * db.limits.sqlLength = 100000;
453
+ *
454
+ * // Reset a limit to its compile-time maximum
455
+ * db.limits.sqlLength = Infinity;
456
+ * ```
457
+ *
458
+ * Available properties: `length`, `sqlLength`, `column`, `exprDepth`,
459
+ * `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`,
460
+ * `variableNumber`, `triggerDepth`.
461
+ *
462
+ * Setting a property to `Infinity` resets the limit to its compile-time maximum value.
463
+ * @since v25.8.0
464
+ */
465
+ readonly limits: DatabaseLimits;
343
466
  /**
344
467
  * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
345
468
  * the constructor. An exception is thrown if the database is already open.
346
469
  * @since v22.5.0
347
470
  */
348
471
  open(): void;
472
+ /**
473
+ * Serializes the database into a binary representation, returned as a
474
+ * `Uint8Array`. This is useful for saving, cloning, or transferring an in-memory
475
+ * database. This method is a wrapper around [`sqlite3_serialize()`](https://sqlite.org/c3ref/serialize.html).
476
+ *
477
+ * ```js
478
+ * import { DatabaseSync } from 'node:sqlite';
479
+ *
480
+ * const db = new DatabaseSync(':memory:');
481
+ * db.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)');
482
+ * db.exec("INSERT INTO t VALUES (1, 'hello')");
483
+ * const buffer = db.serialize();
484
+ * console.log(buffer.length); // Prints the byte length of the database
485
+ * ```
486
+ * @since v26.1.0
487
+ * @param dbName Name of the database to serialize. This can be `'main'`
488
+ * (the default primary database) or any other database that has been added with
489
+ * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html). **Default:** `'main'`.
490
+ * @returns A binary representation of the database.
491
+ */
492
+ serialize(dbName?: string): NodeJS.NonSharedUint8Array;
493
+ /**
494
+ * Loads a serialized database into this connection, replacing the current
495
+ * database. The deserialized database is writable. Existing prepared statements
496
+ * are finalized before deserialization is attempted, even if the operation
497
+ * subsequently fails. This method is a wrapper around
498
+ * [`sqlite3_deserialize()`](https://sqlite.org/c3ref/deserialize.html).
499
+ *
500
+ * ```js
501
+ * import { DatabaseSync } from 'node:sqlite';
502
+ *
503
+ * const original = new DatabaseSync(':memory:');
504
+ * original.exec('CREATE TABLE t(key INTEGER PRIMARY KEY, value TEXT)');
505
+ * original.exec("INSERT INTO t VALUES (1, 'hello')");
506
+ * const buffer = original.serialize();
507
+ * original.close();
508
+ *
509
+ * const clone = new DatabaseSync(':memory:');
510
+ * clone.deserialize(buffer);
511
+ * console.log(clone.prepare('SELECT value FROM t').get());
512
+ * // Prints: { value: 'hello' }
513
+ * ```
514
+ * @since v26.1.0
515
+ * @param buffer A binary representation of a database, such as the
516
+ * output of `database.serialize()`.
517
+ * @param options Optional configuration for the deserialization.
518
+ */
519
+ deserialize(buffer: Uint8Array, options?: DeserializeOptions): void;
349
520
  /**
350
521
  * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper
351
522
  * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html).
352
523
  * @since v22.5.0
353
524
  * @param sql A SQL string to compile to a prepared statement.
525
+ * @param options Optional configuration for the prepared statement.
354
526
  * @return The prepared statement.
355
527
  */
356
- prepare(sql: string): StatementSync;
528
+ prepare(sql: string, options?: PrepareOptions): StatementSync;
529
+ /**
530
+ * Creates a new {@link SQLTagStore}, which is a Least Recently Used (LRU) cache
531
+ * for storing prepared statements. This allows for the efficient reuse of
532
+ * prepared statements by tagging them with a unique identifier.
533
+ *
534
+ * When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared
535
+ * statement for the corresponding SQL query string already exists in the cache.
536
+ * If it does, the cached statement is used. If not, a new prepared statement is
537
+ * created, executed, and then stored in the cache for future use. This mechanism
538
+ * helps to avoid the overhead of repeatedly parsing and preparing the same SQL
539
+ * statements.
540
+ *
541
+ * Tagged statements bind the placeholder values from the template literal as
542
+ * parameters to the underlying prepared statement. For example:
543
+ *
544
+ * ```js
545
+ * sqlTagStore.get`SELECT ${value}`;
546
+ * ```
547
+ *
548
+ * is equivalent to:
549
+ *
550
+ * ```js
551
+ * db.prepare('SELECT ?').get(value);
552
+ * ```
553
+ *
554
+ * However, in the first example, the tag store will cache the underlying prepared
555
+ * statement for future use.
556
+ *
557
+ * > **Note:** The `${value}` syntax in tagged statements _binds_ a parameter to
558
+ * > the prepared statement. This differs from its behavior in _untagged_ template
559
+ * > literals, where it performs string interpolation.
560
+ * >
561
+ * > ```js
562
+ * > // This a safe example of binding a parameter to a tagged statement.
563
+ * > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`;
564
+ * >
565
+ * > // This is an *unsafe* example of an untagged template string.
566
+ * > // `id` is interpolated into the query text as a string.
567
+ * > // This can lead to SQL injection and data corruption.
568
+ * > db.run(`INSERT INTO t1 (id) VALUES (${id})`);
569
+ * > ```
570
+ *
571
+ * The tag store will match a statement from the cache if the query strings
572
+ * (including the positions of any bound placeholders) are identical.
573
+ *
574
+ * ```js
575
+ * // The following statements will match in the cache:
576
+ * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
577
+ * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${12345} AND active = 1`;
578
+ *
579
+ * // The following statements will not match, as the query strings
580
+ * // and bound placeholders differ:
581
+ * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
582
+ * sqlTagStore.get`SELECT * FROM t1 WHERE id = 12345 AND active = 1`;
583
+ *
584
+ * // The following statements will not match, as matches are case-sensitive:
585
+ * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
586
+ * sqlTagStore.get`select * from t1 where id = ${id} and active = 1`;
587
+ * ```
588
+ *
589
+ * The only way of binding parameters in tagged statements is with the `${value}`
590
+ * syntax. Do not add parameter binding placeholders (`?` etc.) to the SQL query
591
+ * string itself.
592
+ *
593
+ * ```js
594
+ * import { DatabaseSync } from 'node:sqlite';
595
+ *
596
+ * const db = new DatabaseSync(':memory:');
597
+ * const sql = db.createSQLTagStore();
598
+ *
599
+ * db.exec('CREATE TABLE users (id INT, name TEXT)');
600
+ *
601
+ * // Using the 'run' method to insert data.
602
+ * // The tagged literal is used to identify the prepared statement.
603
+ * sql.run`INSERT INTO users VALUES (1, 'Alice')`;
604
+ * sql.run`INSERT INTO users VALUES (2, 'Bob')`;
605
+ *
606
+ * // Using the 'get' method to retrieve a single row.
607
+ * const name = 'Alice';
608
+ * const user = sql.get`SELECT * FROM users WHERE name = ${name}`;
609
+ * console.log(user); // { id: 1, name: 'Alice' }
610
+ *
611
+ * // Using the 'all' method to retrieve all rows.
612
+ * const allUsers = sql.all`SELECT * FROM users ORDER BY id`;
613
+ * console.log(allUsers);
614
+ * // [
615
+ * // { id: 1, name: 'Alice' },
616
+ * // { id: 2, name: 'Bob' }
617
+ * // ]
618
+ * ```
619
+ * @since v24.9.0
620
+ * @returns A new SQL tag store for caching prepared statements.
621
+ */
622
+ createTagStore(maxSize?: number): SQLTagStore;
357
623
  /**
358
624
  * Creates and attaches a session to the database. This method is a wrapper around
359
625
  * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and
@@ -369,6 +635,8 @@ declare module "node:sqlite" {
369
635
  * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html).
370
636
  *
371
637
  * ```js
638
+ * import { DatabaseSync } from 'node:sqlite';
639
+ *
372
640
  * const sourceDb = new DatabaseSync(':memory:');
373
641
  * const targetDb = new DatabaseSync(':memory:');
374
642
  *
@@ -395,7 +663,6 @@ declare module "node:sqlite" {
395
663
  * Closes the database connection. If the database connection is already closed
396
664
  * then this is a no-op.
397
665
  * @since v22.15.0
398
- * @experimental
399
666
  */
400
667
  [Symbol.dispose](): void;
401
668
  }
@@ -427,6 +694,107 @@ declare module "node:sqlite" {
427
694
  * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html).
428
695
  */
429
696
  close(): void;
697
+ /**
698
+ * Closes the session. If the session is already closed, does nothing.
699
+ * @since v24.9.0
700
+ */
701
+ [Symbol.dispose](): void;
702
+ }
703
+ /**
704
+ * This class represents a single LRU (Least Recently Used) cache for storing
705
+ * prepared statements.
706
+ *
707
+ * Instances of this class are created via the `database.createTagStore()`
708
+ * method, not by using a constructor. The store caches prepared statements based
709
+ * on the provided SQL query string. When the same query is seen again, the store
710
+ * retrieves the cached statement and safely applies the new values through
711
+ * parameter binding, thereby preventing attacks like SQL injection.
712
+ *
713
+ * The cache has a maxSize that defaults to 1000 statements, but a custom size can
714
+ * be provided (e.g., `database.createTagStore(100)`). All APIs exposed by this
715
+ * class execute synchronously.
716
+ * @since v24.9.0
717
+ */
718
+ interface SQLTagStore {
719
+ /**
720
+ * Executes the given SQL query and returns all resulting rows as an array of
721
+ * objects.
722
+ *
723
+ * This function is intended to be used as a template literal tag, not to be
724
+ * called directly.
725
+ * @since v24.9.0
726
+ * @param stringElements Template literal elements containing the SQL
727
+ * query.
728
+ * @param boundParameters Parameter values to be bound to placeholders in the template string.
729
+ * @returns An array of objects representing the rows returned by the query.
730
+ */
731
+ all(
732
+ stringElements: TemplateStringsArray,
733
+ ...boundParameters: SQLInputValue[]
734
+ ): Record<string, SQLOutputValue>[];
735
+ /**
736
+ * Executes the given SQL query and returns the first resulting row as an object.
737
+ *
738
+ * This function is intended to be used as a template literal tag, not to be
739
+ * called directly.
740
+ * @since v24.9.0
741
+ * @param stringElements Template literal elements containing the SQL
742
+ * query.
743
+ * @param boundParameters Parameter values to be bound to placeholders in the template string.
744
+ * @returns An object representing the first row returned by
745
+ * the query, or `undefined` if no rows are returned.
746
+ */
747
+ get(
748
+ stringElements: TemplateStringsArray,
749
+ ...boundParameters: SQLInputValue[]
750
+ ): Record<string, SQLOutputValue> | undefined;
751
+ /**
752
+ * Executes the given SQL query and returns an iterator over the resulting rows.
753
+ *
754
+ * This function is intended to be used as a template literal tag, not to be
755
+ * called directly.
756
+ * @since v24.9.0
757
+ * @param stringElements Template literal elements containing the SQL
758
+ * query.
759
+ * @param boundParameters Parameter values to be bound to placeholders in the template string.
760
+ * @returns An iterator that yields objects representing the rows returned by the query.
761
+ */
762
+ iterate(
763
+ stringElements: TemplateStringsArray,
764
+ ...boundParameters: SQLInputValue[]
765
+ ): NodeJS.Iterator<Record<string, SQLOutputValue>>;
766
+ /**
767
+ * Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE).
768
+ *
769
+ * This function is intended to be used as a template literal tag, not to be
770
+ * called directly.
771
+ * @since v24.9.0
772
+ * @param stringElements Template literal elements containing the SQL
773
+ * query.
774
+ * @param boundParameters Parameter values to be bound to placeholders in the template string.
775
+ * @returns An object containing information about the execution, including `changes` and `lastInsertRowid`.
776
+ */
777
+ run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges;
778
+ /**
779
+ * A read-only property that returns the number of prepared statements currently in the cache.
780
+ * @since v24.9.0
781
+ */
782
+ readonly size: number;
783
+ /**
784
+ * A read-only property that returns the maximum number of prepared statements the cache can hold.
785
+ * @since v24.9.0
786
+ */
787
+ readonly capacity: number;
788
+ /**
789
+ * A read-only property that returns the `DatabaseSync` object associated with this `SQLTagStore`.
790
+ * @since v24.9.0
791
+ */
792
+ readonly db: DatabaseSync;
793
+ /**
794
+ * Resets the LRU cache, clearing all stored prepared statements.
795
+ * @since v24.9.0
796
+ */
797
+ clear(): void;
430
798
  }
431
799
  interface StatementColumnMetadata {
432
800
  /**
@@ -507,7 +875,7 @@ declare module "node:sqlite" {
507
875
  /**
508
876
  * This method is used to retrieve information about the columns returned by the
509
877
  * prepared statement.
510
- * @since v22.16.0
878
+ * @since v23.11.0
511
879
  * @returns An array of objects. Each object corresponds to a column
512
880
  * in the prepared statement, and contains the following properties:
513
881
  */
@@ -596,7 +964,7 @@ declare module "node:sqlite" {
596
964
  /**
597
965
  * When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead
598
966
  * of objects.
599
- * @since v22.16.0
967
+ * @since v24.0.0
600
968
  * @param enabled Enables or disables the return of query results as arrays.
601
969
  */
602
970
  setReturnArrays(enabled: boolean): void;
@@ -670,13 +1038,14 @@ declare module "node:sqlite" {
670
1038
  *
671
1039
  * console.log('Backup completed', totalPagesTransferred);
672
1040
  * ```
673
- * @since v22.16.0
1041
+ * @since v23.8.0
674
1042
  * @param sourceDb The database to backup. The source database must be open.
675
1043
  * @param path The path where the backup will be created. If the file already exists,
676
1044
  * the contents will be overwritten.
677
1045
  * @param options Optional configuration for the backup. The
678
1046
  * following properties are supported:
679
- * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an error occurs.
1047
+ * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an
1048
+ * error occurs.
680
1049
  */
681
1050
  function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise<number>;
682
1051
  /**
@@ -718,5 +1087,54 @@ declare module "node:sqlite" {
718
1087
  * @since v22.12.0
719
1088
  */
720
1089
  const SQLITE_CHANGESET_ABORT: number;
1090
+ /**
1091
+ * Deny the operation and cause an error to be returned.
1092
+ * @since v24.10.0
1093
+ */
1094
+ const SQLITE_DENY: number;
1095
+ /**
1096
+ * Ignore the operation and continue as if it had never been requested.
1097
+ * @since 24.10.0
1098
+ */
1099
+ const SQLITE_IGNORE: number;
1100
+ /**
1101
+ * Allow the operation to proceed normally.
1102
+ * @since v24.10.0
1103
+ */
1104
+ const SQLITE_OK: number;
1105
+ const SQLITE_CREATE_INDEX: number;
1106
+ const SQLITE_CREATE_TABLE: number;
1107
+ const SQLITE_CREATE_TEMP_INDEX: number;
1108
+ const SQLITE_CREATE_TEMP_TABLE: number;
1109
+ const SQLITE_CREATE_TEMP_TRIGGER: number;
1110
+ const SQLITE_CREATE_TEMP_VIEW: number;
1111
+ const SQLITE_CREATE_TRIGGER: number;
1112
+ const SQLITE_CREATE_VIEW: number;
1113
+ const SQLITE_DELETE: number;
1114
+ const SQLITE_DROP_INDEX: number;
1115
+ const SQLITE_DROP_TABLE: number;
1116
+ const SQLITE_DROP_TEMP_INDEX: number;
1117
+ const SQLITE_DROP_TEMP_TABLE: number;
1118
+ const SQLITE_DROP_TEMP_TRIGGER: number;
1119
+ const SQLITE_DROP_TEMP_VIEW: number;
1120
+ const SQLITE_DROP_TRIGGER: number;
1121
+ const SQLITE_DROP_VIEW: number;
1122
+ const SQLITE_INSERT: number;
1123
+ const SQLITE_PRAGMA: number;
1124
+ const SQLITE_READ: number;
1125
+ const SQLITE_SELECT: number;
1126
+ const SQLITE_TRANSACTION: number;
1127
+ const SQLITE_UPDATE: number;
1128
+ const SQLITE_ATTACH: number;
1129
+ const SQLITE_DETACH: number;
1130
+ const SQLITE_ALTER_TABLE: number;
1131
+ const SQLITE_REINDEX: number;
1132
+ const SQLITE_ANALYZE: number;
1133
+ const SQLITE_CREATE_VTABLE: number;
1134
+ const SQLITE_DROP_VTABLE: number;
1135
+ const SQLITE_FUNCTION: number;
1136
+ const SQLITE_SAVEPOINT: number;
1137
+ const SQLITE_COPY: number;
1138
+ const SQLITE_RECURSIVE: number;
721
1139
  }
722
1140
  }