void 0.10.13 → 0.20.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 (432) hide show
  1. package/AGENTS_TEMPLATE.md +6 -0
  2. package/{skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md → LICENSE} +1 -1
  3. package/README.md +34 -8
  4. package/dist/{auth-qgMlYp7Z.d.mts → auth-DkcFflXV.d.mts} +10 -11
  5. package/dist/auth-W9WII-mN.mjs +630 -0
  6. package/dist/{auth-cmd-BqsdZJp5.mjs → auth-cmd-CAH62yDU.mjs} +4 -3
  7. package/dist/{auth-migrations-BTZ-ATvQ.mjs → auth-migrations-9vif1uj8.mjs} +53 -12
  8. package/dist/{better-auth-shared-BQooDxbw.mjs → better-auth-shared-CYw1T3k4.mjs} +7 -10
  9. package/dist/{better-auth-shared-DealXecJ.d.mts → better-auth-shared-DSCeohOK.d.mts} +10 -5
  10. package/dist/{build-cmd-Bujrv5q-.mjs → build-cmd-CJvZvPQO.mjs} +6 -4
  11. package/dist/{cache-C11V8Fxq.mjs → cache-BlNeQjuP.mjs} +9 -5
  12. package/dist/{cancel-deploy-fwFYF04b.mjs → cancel-deploy-CmlAZ9P6.mjs} +3 -2
  13. package/dist/cf-access-AJ1ehiFR.mjs +42 -0
  14. package/dist/cf-access-DsSsZUPr.mjs +67 -0
  15. package/dist/cli/cli.d.mts +1 -1
  16. package/dist/cli/cli.mjs +1735 -165
  17. package/dist/cli/env-schema-probe.d.mts +48 -61
  18. package/dist/cli/env-schema-probe.mjs +10 -58
  19. package/dist/{client-Gb71-XkG.mjs → client-Clirrol3.mjs} +120 -463
  20. package/dist/cloudflare-auth-B1QtTO1b.mjs +217 -0
  21. package/dist/cloudflare-cmd-B6_OZx2V.mjs +62 -0
  22. package/dist/cloudflare-connect-j5D4hhrG.mjs +56 -0
  23. package/dist/cloudflare-operations-CPTpRW6d.mjs +566 -0
  24. package/dist/{config-qHGgPuWT.mjs → config-BQFq7QvD.mjs} +75 -41
  25. package/dist/{config-CutEMNGJ.mjs → config-NOG_U1aK.mjs} +10 -15
  26. package/dist/connect-C04Wdy_h.mjs +79 -0
  27. package/dist/{create-project-DsYvl3TB.mjs → create-project-ChGZ1DFd.mjs} +26 -16
  28. package/dist/database-provider.d.mts +21 -0
  29. package/dist/database-provider.mjs +6 -0
  30. package/dist/{db-C0i0sYMS.mjs → db-D2d_mUsB.mjs} +612 -117
  31. package/dist/{delete-mh6p-zkQ.mjs → delete-D8GigDk8.mjs} +9 -6
  32. package/dist/{deploy-jBJT1fUT.mjs → deploy-iXZ3F0N6.mjs} +3252 -1995
  33. package/dist/dev-inbox-DkgRWLkW.mjs +307 -0
  34. package/dist/{discover-CJHyvYfR.mjs → discover-xvfrgJeo.mjs} +3 -3
  35. package/dist/{magic-string.es-ZQjdJFFn.mjs → dist-BR1quN_w.mjs} +570 -216
  36. package/dist/{dist-DaKKDf8D.mjs → dist-BrsS7cai.mjs} +17 -2
  37. package/dist/{dist-BuiRJkTd.mjs → dist-m40_XgNh.mjs} +48 -33
  38. package/dist/{domain-DiaNQbrl.mjs → domain-B1VmoSr0.mjs} +41 -4
  39. package/dist/dotenv-VQxupEUv.mjs +181 -0
  40. package/dist/edge.d.mts +2 -0
  41. package/dist/edge.mjs +2 -0
  42. package/dist/email-Ce6SQq-i.mjs +182 -0
  43. package/dist/email-uKyQYUVY.mjs +1016 -0
  44. package/dist/{entry-D7yy4xVH.mjs → entry-DU3oDoQ3.mjs} +2 -2
  45. package/dist/env-BcQzYgoG.mjs +73 -0
  46. package/dist/env-D4Emu-M_.mjs +95 -0
  47. package/dist/env-helpers-CyKtOBpj.d.mts +22 -0
  48. package/dist/env-public-D_6u46fX.d.mts +135 -0
  49. package/dist/{env-types-QBj-ndax.mjs → env-types-BNPhro-M.mjs} +2 -2
  50. package/dist/{env-validation-Dea3v3ej.mjs → env-validation-ENpMy6Ez.mjs} +68 -122
  51. package/dist/{gen-BzXf3Jh2.mjs → gen-DI2YwdBM.mjs} +70 -15
  52. package/dist/generate-RTK8_kK1.mjs +47 -0
  53. package/dist/{github-cmd-DKcGUNsj.mjs → github-cmd-xItS5Zwf.mjs} +39 -31
  54. package/dist/{handler-Cjh8uM3Y.d.mts → handler-D1hLsObx.d.mts} +124 -122
  55. package/dist/{head-nmvOgFjd.d.mts → head-Do8P4puT.d.mts} +9 -8
  56. package/dist/{headers-ChAADPQu.mjs → headers-D8QfRX9Y.mjs} +12 -10
  57. package/dist/inbound-2d0zi2yS.mjs +706 -0
  58. package/dist/inbound-afAcWeQ9.d.mts +363 -0
  59. package/dist/index.d.mts +61 -34
  60. package/dist/index.mjs +1012 -293
  61. package/dist/{init-7JCAcKNQ.mjs → init-BD-9THgn.mjs} +329 -271
  62. package/dist/link-RMdgjF1v.mjs +52 -0
  63. package/dist/{list-CPwFDZ_c.mjs → list-3F52R_yO.mjs} +37 -5
  64. package/dist/{runner-kapo9aPs.mjs → local-d1-D2I6Ox5F.mjs} +116 -6
  65. package/dist/{login-BT3H8PN3.mjs → login-pV69H-ZO.mjs} +17 -15
  66. package/dist/{logs-Bt313ax7.mjs → logs-DFHHD6wE.mjs} +16 -2
  67. package/dist/mime-BJD7d_qL.mjs +1216 -0
  68. package/dist/neon-DHwd2zvC.mjs +54 -0
  69. package/dist/{node-pRg81HqV.mjs → node-Dk3H2jmU.mjs} +29 -8
  70. package/dist/operator-cmd-DYWRbWUA.mjs +348 -0
  71. package/dist/{agents-CtgBYqld.mjs → output-tFQLLj26.mjs} +676 -211
  72. package/dist/{package-json-Cx1osYo6.mjs → package-json-CPoWX79C.mjs} +1 -1
  73. package/dist/pages/client.d.mts +43 -41
  74. package/dist/pages/client.mjs +40 -33
  75. package/dist/pages/head-client.d.mts +10 -12
  76. package/dist/pages/head.d.mts +1 -1
  77. package/dist/pages/index.d.mts +37 -14
  78. package/dist/pages/index.mjs +5 -5
  79. package/dist/pages/islands-plugin.d.mts +25 -27
  80. package/dist/pages/islands-plugin.mjs +6 -4
  81. package/dist/pages/prefetch.d.mts +6 -7
  82. package/dist/pages/protocol.d.mts +2 -2
  83. package/dist/pages/protocol.mjs +2 -1
  84. package/dist/pages/serialize.d.mts +7 -8
  85. package/dist/platform-cmd-DxJ2FRwR.mjs +123 -0
  86. package/dist/platform-domain-ChvbJkdy.mjs +228 -0
  87. package/dist/platform-lifecycle-DN4MzJF_.mjs +4450 -0
  88. package/dist/platform-management-Db2PXw0B.mjs +698 -0
  89. package/dist/platform-recovery-C_YO-tIs.mjs +99 -0
  90. package/dist/{plugin-inference-DMeavIJ6.mjs → plugin-inference-BDRfZngg.mjs} +35 -19
  91. package/dist/prepare-BfJvFUtJ.mjs +14 -0
  92. package/dist/{prepare-BvvgAz-3.mjs → prepare-CBetXvsN.mjs} +15 -24
  93. package/dist/{preset-BjyR3lzz.mjs → preset-lAy0B0BQ.mjs} +25 -212
  94. package/dist/{project-cmd-D_w-4w5B.mjs → project-cmd-Mo0V9yKS.mjs} +25 -12
  95. package/dist/{project-paths-BQd7OmIo.mjs → project-paths-SK8nMHPp.mjs} +3 -1
  96. package/dist/{project-tsconfig-B-QtXjLQ.mjs → project-tsconfig-Ql2XsSQp.mjs} +2 -2
  97. package/dist/{protocol-Bnb0LFp3.d.mts → protocol-C-pqYJjE.d.mts} +3 -4
  98. package/dist/{provision-CPx2ZxsH.mjs → provision-Blnstcm2.mjs} +78 -45
  99. package/dist/r2-conditions-D1Wk8i7b.mjs +30 -0
  100. package/dist/{requests-B8sZxaFM.mjs → requests-BcKOVpRg.mjs} +5 -3
  101. package/dist/{resolve-project-BBMtLLV9.mjs → resolve-project--Vxawf7z.mjs} +2 -2
  102. package/dist/rollback-Bx85-0xh.mjs +166 -0
  103. package/dist/{rolldown-runtime-DJK8HYOj.mjs → rolldown-runtime-rQ84J-ij.mjs} +1 -1
  104. package/dist/{route-types-z1jtHEi_.mjs → route-types-Da-DpyUp.mjs} +77 -25
  105. package/dist/routes-stub.d.mts +22 -23
  106. package/dist/runner-mysql-7BPUNGmL.mjs +61 -0
  107. package/dist/{runner-pg-CHM76xuC.mjs → runner-pg-BkEza-dX.mjs} +18 -6
  108. package/dist/runtime/ai.d.mts +21 -14
  109. package/dist/runtime/ai.mjs +5 -4
  110. package/dist/runtime/auth-client-react.d.mts +3 -5
  111. package/dist/runtime/auth-client-solid.d.mts +3 -5
  112. package/dist/runtime/auth-client-svelte.d.mts +3 -5
  113. package/dist/runtime/auth-client-vue.d.mts +3 -5
  114. package/dist/runtime/auth-client.d.mts +3 -5
  115. package/dist/runtime/auth.d.mts +1 -1
  116. package/dist/runtime/better-auth-mysql.d.mts +10 -0
  117. package/dist/runtime/better-auth-mysql.mjs +49 -0
  118. package/dist/runtime/better-auth-pg.d.mts +8 -9
  119. package/dist/runtime/better-auth-pg.mjs +2 -2
  120. package/dist/runtime/better-auth.d.mts +8 -9
  121. package/dist/runtime/better-auth.mjs +2 -2
  122. package/dist/runtime/client-react.d.mts +1 -1
  123. package/dist/runtime/client-solid.d.mts +1 -1
  124. package/dist/runtime/client-svelte.d.mts +1 -1
  125. package/dist/runtime/client-vue.d.mts +1 -1
  126. package/dist/runtime/client.d.mts +1 -1
  127. package/dist/runtime/db-mysql.d.mts +2 -0
  128. package/dist/runtime/db-mysql.mjs +1 -0
  129. package/dist/runtime/db.d.mts +10 -11
  130. package/dist/runtime/durable.d.mts +47 -0
  131. package/dist/runtime/durable.mjs +146 -0
  132. package/dist/runtime/email/testing.d.mts +112 -0
  133. package/dist/runtime/email/testing.mjs +283 -0
  134. package/dist/runtime/email.d.mts +30 -0
  135. package/dist/runtime/email.mjs +573 -0
  136. package/dist/runtime/env-helpers.d.mts +2 -2
  137. package/dist/runtime/env-helpers.mjs +5 -42
  138. package/dist/runtime/env-public-client.d.mts +10 -11
  139. package/dist/runtime/env-public-client.mjs +1 -1
  140. package/dist/runtime/env-public.d.mts +2 -2
  141. package/dist/runtime/env-public.mjs +104 -49
  142. package/dist/runtime/env.d.mts +19 -18
  143. package/dist/runtime/env.mjs +15 -2
  144. package/dist/runtime/fetch-stream.d.mts +20 -21
  145. package/dist/runtime/fetch.d.mts +15 -16
  146. package/dist/runtime/handler.d.mts +1 -1
  147. package/dist/runtime/isr.d.mts +21 -22
  148. package/dist/runtime/isr.mjs +26 -8
  149. package/dist/runtime/kv.d.mts +9 -10
  150. package/dist/runtime/live-client.d.mts +5 -7
  151. package/dist/runtime/live-client.mjs +9 -7
  152. package/dist/runtime/live-server.d.mts +4 -5
  153. package/dist/runtime/live.d.mts +22 -24
  154. package/dist/runtime/live.mjs +1 -1
  155. package/dist/runtime/log.d.mts +16 -17
  156. package/dist/runtime/migration-handler-mysql.d.mts +4 -0
  157. package/dist/runtime/migration-handler-mysql.mjs +81 -0
  158. package/dist/runtime/migration-handler-pg.d.mts +2 -4
  159. package/dist/runtime/migration-handler.d.mts +5 -6
  160. package/dist/runtime/migration-handler.mjs +4 -3
  161. package/dist/runtime/queues.d.mts +3 -4
  162. package/dist/runtime/queues.mjs +2 -1
  163. package/dist/runtime/remote/binding-handler.d.mts +10 -12
  164. package/dist/runtime/remote/binding-handler.mjs +24 -3
  165. package/dist/runtime/remote/index.d.mts +5 -6
  166. package/dist/runtime/remote/index.mjs +21 -18
  167. package/dist/runtime/response.d.mts +10 -11
  168. package/dist/runtime/sandbox.d.mts +56 -55
  169. package/dist/runtime/sandbox.mjs +57 -49
  170. package/dist/runtime/schema-mysql.d.mts +1 -0
  171. package/dist/runtime/schema-mysql.mjs +2 -0
  172. package/dist/runtime/seed.d.mts +14 -9
  173. package/dist/runtime/sse-client.d.mts +6 -7
  174. package/dist/runtime/sse.d.mts +11 -12
  175. package/dist/runtime/storage.d.mts +3 -4
  176. package/dist/runtime/validator.d.mts +1 -1
  177. package/dist/runtime/ws-server.d.mts +12 -12
  178. package/dist/runtime/ws-server.mjs +32 -4
  179. package/dist/runtime/ws.d.mts +19 -21
  180. package/dist/{scan-ChWt4pX1.mjs → scan-BMH4rzlv.mjs} +42 -19
  181. package/dist/{scan-NU4xKGci.mjs → scan-CpK-57ug.mjs} +5 -4
  182. package/dist/{secret-Dt32J6RI.mjs → secret-ByhJ9AMl.mjs} +62 -5
  183. package/dist/{skills-CLjN0uUO.mjs → skills-Q46GZMO-.mjs} +6 -4
  184. package/dist/sqlite-validation-BzKMWnO4.mjs +25 -0
  185. package/dist/{standard-schema-DJ0HW7QP.d.mts → standard-schema-Fo_vCAZh.d.mts} +6 -6
  186. package/dist/{subcommand-prompt-BzV8iQZo.mjs → subcommand-prompt-WfySCQ7S.mjs} +67 -48
  187. package/dist/sveltekit.d.mts +12 -11
  188. package/dist/sveltekit.mjs +1 -1
  189. package/dist/types-BAp5AEBU.d.mts +79 -0
  190. package/dist/types-CKWnYgfy.d.mts +1 -0
  191. package/dist/{validate-Cw_RLeTj.mjs → validate-tBBN_dXH.mjs} +4 -3
  192. package/dist/wrangler--imS8n0d.mjs +1796 -0
  193. package/dist/{yarn-pnp-DJn3SAHF.mjs → yarn-pnp-DxSInkzL.mjs} +1 -1
  194. package/package.json +79 -65
  195. package/schema.json +22 -3
  196. package/skills/void/SKILL.md +59 -2
  197. package/skills/void/docs/guide/ai.md +32 -14
  198. package/skills/void/docs/guide/app-types.md +6 -6
  199. package/skills/void/docs/guide/auth.md +14 -16
  200. package/skills/void/docs/guide/database/d1.md +6 -0
  201. package/skills/void/docs/guide/database/mysql.md +60 -0
  202. package/skills/void/docs/guide/database/postgresql.md +14 -9
  203. package/skills/void/docs/guide/database.md +39 -26
  204. package/skills/void/docs/guide/deployment.md +99 -25
  205. package/skills/void/docs/guide/durable-state.md +140 -0
  206. package/skills/void/docs/guide/edge/headers.md +5 -5
  207. package/skills/void/docs/guide/edge/prerendering.md +2 -0
  208. package/skills/void/docs/guide/edge/revalidation.md +21 -6
  209. package/skills/void/docs/guide/edge/rewrites.md +18 -14
  210. package/skills/void/docs/guide/edge/static-assets.md +12 -10
  211. package/skills/void/docs/guide/email.md +640 -0
  212. package/skills/void/docs/guide/env-migration.md +109 -0
  213. package/skills/void/docs/guide/env-vars.md +70 -248
  214. package/skills/void/docs/guide/index.md +15 -17
  215. package/skills/void/docs/guide/jobs.md +8 -5
  216. package/skills/void/docs/guide/live.md +7 -15
  217. package/skills/void/docs/guide/pages-routing/actions-and-forms.md +8 -4
  218. package/skills/void/docs/guide/pages-routing/islands.md +3 -3
  219. package/skills/void/docs/guide/pages-routing/loaders.md +6 -4
  220. package/skills/void/docs/guide/pages-routing/overview.md +7 -7
  221. package/skills/void/docs/guide/platform-administration.md +212 -0
  222. package/skills/void/docs/guide/platform-development.md +264 -0
  223. package/skills/void/docs/guide/queues.md +10 -10
  224. package/skills/void/docs/guide/quickstart.md +46 -67
  225. package/skills/void/docs/guide/remote-dev.md +8 -6
  226. package/skills/void/docs/guide/sandboxes.md +33 -16
  227. package/skills/void/docs/guide/self-hosted-platform.md +553 -0
  228. package/skills/void/docs/guide/server-routing.md +5 -5
  229. package/skills/void/docs/guide/sse.md +4 -4
  230. package/skills/void/docs/guide/ssg.md +5 -3
  231. package/skills/void/docs/guide/storage.md +2 -2
  232. package/skills/void/docs/guide/websockets.md +15 -7
  233. package/skills/void/docs/index.md +3 -3
  234. package/skills/void/docs/integrations/agents.md +6 -64
  235. package/skills/void/docs/integrations/cloudflare.md +165 -146
  236. package/skills/void/docs/integrations/frameworks/analog.md +4 -4
  237. package/skills/void/docs/integrations/frameworks/astro.md +5 -5
  238. package/skills/void/docs/integrations/frameworks/nuxt.md +5 -5
  239. package/skills/void/docs/integrations/frameworks/overview.md +3 -3
  240. package/skills/void/docs/integrations/frameworks/react-router.md +3 -3
  241. package/skills/void/docs/integrations/frameworks/sveltekit.md +3 -3
  242. package/skills/void/docs/integrations/frameworks/tanstack-start.md +2 -2
  243. package/skills/void/docs/integrations/nodejs-bun-deno.md +11 -4
  244. package/skills/void/docs/reference/api.md +42 -6
  245. package/skills/void/docs/reference/cli.md +665 -160
  246. package/skills/void/docs/reference/config.md +67 -27
  247. package/skills/void/docs/reference/resource-inference.md +13 -9
  248. package/skills/void/docs/reference/structure.md +9 -11
  249. package/AGENT_PROMPT.md +0 -19
  250. package/dist/cf-access-Bqw81xAf.mjs +0 -22
  251. package/dist/env-CZy5MorI.mjs +0 -299
  252. package/dist/env-helpers-z4stu8uc.d.mts +0 -52
  253. package/dist/env-mask-Dd47NbR6.mjs +0 -90
  254. package/dist/env-public-BfiLcMBk.d.mts +0 -140
  255. package/dist/link-CdGHSIy-.mjs +0 -45
  256. package/dist/mcp-DoM3_nhd.mjs +0 -377
  257. package/dist/project-paths-GpziKeQQ.d.mts +0 -25
  258. package/dist/providers-BNKRacMr.d.mts +0 -7
  259. package/dist/proxy-D-3_D-Gl.mjs +0 -5
  260. package/dist/rollback-CkvTFXx5.mjs +0 -90
  261. package/dist/runtime/isr-cache.d.mts +0 -207
  262. package/dist/runtime/isr-cache.mjs +0 -523
  263. package/dist/types-lLjNE9Qp.d.mts +0 -51
  264. package/getting-started-prompt.txt +0 -28
  265. package/skills/void/command/void.md +0 -7
  266. package/skills/void/docs/integrations/auth-providers.md +0 -0
  267. package/skills/void/docs/integrations/payment-processors.md +0 -0
  268. package/skills/void/docs/node_modules/@iconify/vue/README.md +0 -408
  269. package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +0 -5
  270. package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +0 -103
  271. package/skills/void/docs/node_modules/oxc-minify/README.md +0 -78
  272. package/skills/void/docs/node_modules/reka-ui/README.md +0 -80
  273. package/skills/void/docs/node_modules/vitepress/README.md +0 -28
  274. package/skills/void/docs/node_modules/vitepress/template/api-examples.md +0 -49
  275. package/skills/void/docs/node_modules/vitepress/template/index.md +0 -28
  276. package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +0 -85
  277. package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +0 -101
  278. package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +0 -19
  279. package/skills/void/docs/node_modules/void/CLAUDE.md +0 -221
  280. package/skills/void/docs/node_modules/void/README.md +0 -90
  281. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +0 -685
  282. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +0 -396
  283. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +0 -219
  284. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +0 -37
  285. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +0 -135
  286. package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +0 -189
  287. package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +0 -143
  288. package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +0 -1272
  289. package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +0 -19
  290. package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +0 -15
  291. package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +0 -15
  292. package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +0 -15
  293. package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +0 -51
  294. package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +0 -22
  295. package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +0 -69
  296. package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +0 -153
  297. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +0 -9
  298. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +0 -9
  299. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +0 -15
  300. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +0 -24
  301. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +0 -565
  302. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +0 -127
  303. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +0 -600
  304. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +0 -386
  305. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +0 -95
  306. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +0 -101
  307. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-footnote/README.md +0 -135
  308. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +0 -64
  309. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +0 -15
  310. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +0 -25
  311. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +0 -16
  312. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +0 -220
  313. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +0 -21
  314. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +0 -35
  315. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +0 -70
  316. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +0 -20
  317. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +0 -35
  318. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +0 -26
  319. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +0 -17
  320. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +0 -364
  321. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +0 -15
  322. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +0 -18
  323. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
  324. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/build.md +0 -40
  325. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +0 -107
  326. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +0 -60
  327. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +0 -62
  328. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
  329. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +0 -341
  330. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/dev.md +0 -24
  331. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +0 -175
  332. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +0 -167
  333. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/fmt.md +0 -41
  334. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
  335. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
  336. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/implode.md +0 -23
  337. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +0 -134
  338. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +0 -199
  339. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/lint.md +0 -50
  340. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
  341. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +0 -197
  342. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
  343. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +0 -69
  344. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +0 -356
  345. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/test.md +0 -35
  346. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
  347. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
  348. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/vpx.md +0 -66
  349. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/why.md +0 -39
  350. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/index.md +0 -12
  351. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/team.md +0 -35
  352. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/generator/README.md +0 -35
  353. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/monorepo/README.md +0 -29
  354. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +0 -58
  355. package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +0 -165
  356. package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +0 -20
  357. package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +0 -32
  358. package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +0 -99
  359. package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +0 -108
  360. package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +0 -51
  361. package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +0 -79
  362. package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +0 -44
  363. package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +0 -51
  364. package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +0 -65
  365. package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +0 -403
  366. package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +0 -48
  367. package/skills/void/docs/node_modules/void/node_modules/hono/README.md +0 -85
  368. package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +0 -452
  369. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +0 -76
  370. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md +0 -21
  371. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +0 -364
  372. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +0 -41
  373. package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +0 -325
  374. package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +0 -398
  375. package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +0 -64
  376. package/skills/void/docs/node_modules/void/node_modules/pg/README.md +0 -96
  377. package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +0 -135
  378. package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +0 -21
  379. package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +0 -108
  380. package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +0 -183
  381. package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +0 -25
  382. package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +0 -9
  383. package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +0 -94
  384. package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +0 -16
  385. package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +0 -220
  386. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +0 -21
  387. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +0 -35
  388. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +0 -70
  389. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +0 -20
  390. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +0 -35
  391. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +0 -26
  392. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +0 -17
  393. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +0 -364
  394. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +0 -15
  395. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +0 -18
  396. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
  397. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/build.md +0 -40
  398. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +0 -107
  399. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +0 -60
  400. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +0 -62
  401. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
  402. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +0 -341
  403. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/dev.md +0 -24
  404. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +0 -175
  405. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +0 -167
  406. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/fmt.md +0 -41
  407. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
  408. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
  409. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/implode.md +0 -23
  410. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +0 -134
  411. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +0 -199
  412. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/lint.md +0 -50
  413. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
  414. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +0 -197
  415. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
  416. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +0 -69
  417. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +0 -356
  418. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/test.md +0 -35
  419. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
  420. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
  421. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/vpx.md +0 -66
  422. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/why.md +0 -39
  423. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/index.md +0 -12
  424. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/team.md +0 -35
  425. package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/generator/README.md +0 -35
  426. package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/monorepo/README.md +0 -29
  427. package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +0 -63
  428. package/skills/void/docs/node_modules/void/node_modules/zod/README.md +0 -191
  429. package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +0 -175
  430. package/skills/void/docs/node_modules/void/skills/void/SKILL.md +0 -76
  431. package/skills/void/docs/node_modules/void/skills/void/command/void.md +0 -7
  432. package/skills/void/docs/node_modules/void/test/e2e/README.md +0 -85
@@ -1,10 +1,9 @@
1
- import { n as __exportAll } from "./rolldown-runtime-DJK8HYOj.mjs";
2
- import { a as join, c as resolve, n as dirname } from "./dist-DaKKDf8D.mjs";
1
+ import { n as __exportAll } from "./rolldown-runtime-rQ84J-ij.mjs";
2
+ import { l as resolve, n as dirname, o as join } from "./dist-BrsS7cai.mjs";
3
3
  import { i as voidWarn } from "./log-ChfPKsVd.mjs";
4
- import { c as mergeAndExpand, l as parseDotenvFile, o as resolveWranglerArgv } from "./preset-BjyR3lzz.mjs";
5
- import { t as findEnvFile } from "./env-types-QBj-ndax.mjs";
6
- import { getSecretOverride } from "./runtime/env-helpers.mjs";
7
- import { t as isLikelySecretKey } from "./env-mask-Dd47NbR6.mjs";
4
+ import { t as findEnvFile } from "./env-types-BNPhro-M.mjs";
5
+ import { a as loadLocalEnv, i as isClientEnvKey, r as findLegacyEnvFiles } from "./env-D4Emu-M_.mjs";
6
+ import { o as resolveWranglerArgv } from "./preset-lAy0B0BQ.mjs";
8
7
  import { existsSync, readFileSync } from "node:fs";
9
8
  import { pathToFileURL } from "node:url";
10
9
  import { spawn } from "node:child_process";
@@ -77,7 +76,7 @@ async function loadUserEnvFile(envFile) {
77
76
  * Shared env-schema validation for CLI commands.
78
77
  *
79
78
  * Loads the user's `env.ts` (which calls `defineEnv` as a side effect),
80
- * collects sources of env values (`.env*` files, remote secrets), and
79
+ * validates the local `.env` or remote production-secret state, and
81
80
  * validates each declared key against the registered schema.
82
81
  *
83
82
  * Used by both `void deploy` (hard error on missing prod env) and
@@ -88,7 +87,6 @@ var env_validation_exports = /* @__PURE__ */ __exportAll({
88
87
  SelfHostFirstDeployError: () => SelfHostFirstDeployError,
89
88
  SelfHostSchemaError: () => SelfHostSchemaError,
90
89
  SelfHostSecretListError: () => SelfHostSecretListError,
91
- collectPlaintextVarWarningsFromVars: () => collectPlaintextVarWarningsFromVars,
92
90
  computeInvalidEmittedKeys: () => computeInvalidEmittedKeys,
93
91
  createDefaultSecretListRunner: () => createDefaultSecretListRunner,
94
92
  deriveSelfHostEnvContextFromVars: () => deriveSelfHostEnvContextFromVars,
@@ -96,23 +94,29 @@ var env_validation_exports = /* @__PURE__ */ __exportAll({
96
94
  dischargeSelfHostEnvContext: () => dischargeSelfHostEnvContext,
97
95
  fetchRemoteSecretNames: () => fetchRemoteSecretNames,
98
96
  formatEnvReport: () => formatEnvReport,
99
- getDeployEnvDefaults: () => getDeployEnvDefaults,
97
+ listSelfHostSecretNames: () => listSelfHostSecretNames,
100
98
  readEmittedWorkerVars: () => readEmittedWorkerVars,
101
99
  secretListEnv: () => secretListEnv,
102
100
  selfHostSchemaFailureMessage: () => selfHostSchemaFailureMessage,
103
- validateProdEnv: () => validateProdEnv
101
+ validateProdEnv: () => validateProdEnv,
102
+ validateSecretValues: () => validateSecretValues
104
103
  });
105
104
  /**
106
- * After the user's env.ts has been imported (via `validateProdEnv` or
107
- * `loadSchema`), read the registered schema's `.default(value)` entries.
108
- * Returns `{}` if no schema was registered.
105
+ * Validate plaintext while it is still available to `void secret put/sync`.
106
+ * Existing remote values remain unreadable and are validated again at worker boot.
109
107
  */
110
- async function getDeployEnvDefaults(root) {
108
+ async function validateSecretValues(root, entries) {
111
109
  const envFile = findEnvFile(root);
112
- if (!envFile) return {};
113
- const mod = await loadSchema(envFile);
114
- if (!mod) return {};
115
- return mod._getSchemaDefaults();
110
+ if (!envFile) throw new Error("secret: env.ts is required before setting production values.");
111
+ const schema = (await loadSchema(envFile))?._getRegisteredSchema();
112
+ if (!schema) throw new Error("secret: env.ts did not register a schema with defineEnv().");
113
+ for (const { name, value } of entries) {
114
+ if (isClientEnvKey(name)) throw new Error(`secret: ${name} is client-exposed. Set it in the build shell or give it a schema default.`);
115
+ const validator = schema[name];
116
+ if (!validator) throw new Error(`secret: ${name} is not declared in env.ts.`);
117
+ const result = validator["~standard"].validate(value);
118
+ if ((result instanceof Promise ? await result : result).issues) throw new Error(`secret: ${name} failed env.ts validation.`);
119
+ }
116
120
  }
117
121
  /** Load the registered schema by importing the user's env.ts. */
118
122
  async function loadSchema(envFile) {
@@ -130,11 +134,13 @@ function emptyReport() {
130
134
  };
131
135
  }
132
136
  /**
133
- * Validate the user's env schema against the union of .env files and
134
- * remote secret names. Remote secrets are treated as "present" (we can't
135
- * fetch their values), which is sufficient for the missing-key check.
137
+ * Validate local development against `.env` + the shell, or production
138
+ * against the build shell + remote secret names. `.env` is never a
139
+ * production source.
136
140
  */
137
141
  async function validateProdEnv(root, options) {
142
+ const legacyFiles = findLegacyEnvFiles(root);
143
+ if (legacyFiles.length > 0) throw new Error(`env: only .env is supported for local development. Remove ${legacyFiles.join(", ")} and follow the env migration guide.`);
138
144
  const envFile = findEnvFile(root);
139
145
  if (!envFile) return {
140
146
  hasSchema: false,
@@ -145,16 +151,16 @@ async function validateProdEnv(root, options) {
145
151
  hasSchema: false,
146
152
  report: emptyReport()
147
153
  };
148
- const merged = mergeAndExpand((options.productionOnly ? [".env", ".env.production"] : [
149
- ".env",
150
- ".env.local",
151
- ".env.production",
152
- ".env.production.local"
153
- ]).map((file) => parseDotenvFile(join(root, file), { expand: false })), { onWarn: (msg) => voidWarn(msg) });
154
+ const local = options.productionOnly ? {} : loadLocalEnv(root, { onWarn: (message) => voidWarn(message) });
155
+ const shell = options.productionOnly ? Object.fromEntries(Object.entries(process.env).filter(([key]) => isClientEnvKey(key))) : process.env;
156
+ const merged = {
157
+ ...local,
158
+ ...shell
159
+ };
154
160
  const report = await mod.validateAllEnv(merged);
155
161
  const remoteSet = new Set(options.remoteSecrets ?? []);
156
162
  if (remoteSet.size > 0 && report.missing.length > 0) {
157
- report.missing = report.missing.filter((key) => !remoteSet.has(key));
163
+ report.missing = report.missing.filter((key) => isClientEnvKey(key) || !remoteSet.has(key));
158
164
  if (report.missing.length === 0 && report.invalid.length === 0) report.valid = true;
159
165
  }
160
166
  return {
@@ -185,29 +191,6 @@ async function fetchRemoteSecretNames(client, projectId) {
185
191
  }
186
192
  }
187
193
  /**
188
- * A `scheme://user:password@host…` connection URL — the shape that carries a
189
- * live credential in a key nothing in the NAME heuristic would catch. The
190
- * motivating case is `DATABASE_URL`: `SECRET_KEY_RE` has no `URL`/`DATABASE`
191
- * branch, and the shared `isLikelySecretValue` cannot help either — its
192
- * `HIGH_ENTROPY_RE` character class excludes `@`, so a connection URL never
193
- * matches it. Both halves of the userinfo must be non-empty, so a bare
194
- * `postgres://host/db` or a password-less `https://user@host` is NOT flagged.
195
- *
196
- * Deliberately local to the DEPLOY-side warning rather than added to
197
- * `shared/env-mask.ts`: that module is also the runtime/managed redaction
198
- * heuristic, and widening it would change masking behaviour well outside this
199
- * warning.
200
- */
201
- const CREDENTIAL_URL_VALUE_RE = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^/\s:@]+:[^/\s@]+@/;
202
- /**
203
- * `true` when a var's VALUE is a connection URL carrying inline credentials.
204
- * Inspecting the value is safe here: only the KEY name ever leaves
205
- * {@link collectPlaintextVarWarningsFromVars}.
206
- */
207
- function isCredentialBearingUrlValue(value) {
208
- return typeof value === "string" && CREDENTIAL_URL_VALUE_RE.test(value);
209
- }
210
- /**
211
194
  * The required-key set, derived independently of how any validator treats
212
195
  * the empty string. A key is required iff its validator REJECTS the ABSENT
213
196
  * value (probe with `undefined`) — the SAME notion of "required" the managed
@@ -259,7 +242,7 @@ var SelfHostSecretListError = class extends Error {
259
242
  /**
260
243
  * FIRST-DEPLOY specialization of {@link SelfHostSecretListError}: the remote
261
244
  * secret list could not be fetched because the worker has NOT been deployed
262
- * yet. wrangler 4.107's `secret list` catches the API worker-not-found error
245
+ * yet. wrangler 4.131's `secret list` catches the API worker-not-found error
263
246
  * (codes 10007 / 10090 — `WORKER_NOT_FOUND` / `WORKER_LEGACY_ENVIRONMENT_NOT_FOUND`,
264
247
  * per `isWorkerNotFoundError` in wrangler-dist/cli.js) and rethrows a `UserError`
265
248
  * ("… not found. If this is a new Worker, run `wrangler deploy` first to create
@@ -283,8 +266,8 @@ var SelfHostFirstDeployError = class extends SelfHostSecretListError {
283
266
  };
284
267
  /**
285
268
  * The env schema is not satisfied for a self-host production deploy: required
286
- * keys are missing (not in `.env`/`.env.production` and not present as remote
287
- * worker secrets), local values are invalid, or an EMPTY local assignment would
269
+ * keys are missing from remote worker secrets, values are invalid, or an EMPTY
270
+ * plaintext assignment would
288
271
  * shadow a remote secret. The message and the attached `report` carry the
289
272
  * offending key NAMES plus stable, values-free reason codes only — never raw
290
273
  * input, never resolved values — so nothing on this path can echo a secret
@@ -365,22 +348,20 @@ async function deriveSelfHostSchemaFacts(root) {
365
348
  const envFile = findEnvFile(root);
366
349
  if (envFile == null) return {
367
350
  hasSchema: false,
368
- requiredKeys: [],
369
- secretKeys: []
351
+ serverKeys: [],
352
+ requiredKeys: []
370
353
  };
371
354
  const mod = await withSchemaBoundary("schema-load-failed", () => loadSchema(envFile));
372
355
  if (!mod) return {
373
356
  hasSchema: false,
374
- requiredKeys: [],
375
- secretKeys: []
357
+ serverKeys: [],
358
+ requiredKeys: []
376
359
  };
377
360
  const schema = mod._getRegisteredSchema() ?? {};
378
- const requiredKeys = await withSchemaBoundary("schema-validation-error", () => requiredSchemaKeys(schema));
379
- const secretKeys = Object.keys(schema).filter((key) => getSecretOverride(schema[key]) === "secret");
380
361
  return {
381
362
  hasSchema: true,
382
- requiredKeys: [...requiredKeys],
383
- secretKeys
363
+ serverKeys: Object.keys(schema).filter((key) => !isClientEnvKey(key)),
364
+ requiredKeys: [...await withSchemaBoundary("schema-validation-error", () => requiredSchemaKeys(schema))].filter((key) => !isClientEnvKey(key))
384
365
  };
385
366
  }
386
367
  /**
@@ -515,50 +496,6 @@ async function computeInvalidEmittedKeys(root, emittedVars) {
515
496
  for (const key of report.missing) if (Object.hasOwn(emittedVars, key)) invalid.add(key);
516
497
  return Array.from(invalid).sort((a, b) => a.localeCompare(b));
517
498
  }
518
- /**
519
- * Classify the secret-looking keys among the REAL worker `vars` the build baked
520
- * into `dist/ssr/wrangler.json` (ground truth). PURE: for each emitted var key, a
521
- * `.secret()`-flagged key ({@link SelfHostSchemaFacts.secretKeys}) is
522
- * `schema-secret`; otherwise the shared {@link isLikelySecretKey} name heuristic
523
- * applies (so a secret-looking key ships plaintext regardless of any schema, and
524
- * heuristic classification still works with no env.ts at all); failing both, a
525
- * VALUE shaped like a credential-bearing connection URL
526
- * ({@link isCredentialBearingUrlValue}) flags the key as `value-shape`, catching
527
- * the `DATABASE_URL`-class leak no name heuristic sees.
528
- *
529
- * KEYS ONLY leave here — a value may be INSPECTED to classify it, but is never
530
- * copied into the result, so no caller can format a value into a log.
531
- */
532
- function collectPlaintextVarWarningsFromVars(emittedVars, secretFlaggedKeys) {
533
- const flagged = new Set(secretFlaggedKeys);
534
- const keys = Object.keys(emittedVars);
535
- const secretKeys = [];
536
- for (const key of keys) {
537
- if (flagged.has(key)) {
538
- secretKeys.push({
539
- key,
540
- reason: "schema-secret"
541
- });
542
- continue;
543
- }
544
- if (isLikelySecretKey(key)) {
545
- secretKeys.push({
546
- key,
547
- reason: "heuristic"
548
- });
549
- continue;
550
- }
551
- if (isCredentialBearingUrlValue(emittedVars[key])) secretKeys.push({
552
- key,
553
- reason: "value-shape"
554
- });
555
- }
556
- secretKeys.sort((a, b) => a.key.localeCompare(b.key));
557
- return {
558
- secretKeys,
559
- totalVarKeys: keys.length
560
- };
561
- }
562
499
  /** Build a values-free invalid {@link EnvValidationReport} from key names only. */
563
500
  function invalidEnvReport(missing, invalidKeys) {
564
501
  return {
@@ -599,12 +536,7 @@ async function dischargeSelfHostEnvContext(context, options) {
599
536
  remoteSecretNames: null
600
537
  };
601
538
  }
602
- reconcileSelfHostWorkerName(options.configPath, options.workerName);
603
- const effectiveAccountId = reconcileSelfHostAccount(options.configPath, options.accountId);
604
- const remoteSecretNames = await fetchSelfHostSecretNames(options.runWrangler ?? createDefaultSecretListRunner(options.root, {
605
- accountId: effectiveAccountId,
606
- timeoutMs: options.timeoutMs
607
- }), options.configPath, context.absentRequired);
539
+ const remoteSecretNames = await listSelfHostSecretNames(options, context.absentRequired);
608
540
  const remoteSet = new Set(remoteSecretNames);
609
541
  const stillMissing = context.absentRequired.filter((key) => !remoteSet.has(key));
610
542
  if (stillMissing.length > 0 || invalidKeys.length > 0) throw selfHostEnvError(invalidEnvReport(stillMissing, invalidKeys));
@@ -616,7 +548,7 @@ async function dischargeSelfHostEnvContext(context, options) {
616
548
  /**
617
549
  * Read the pinned config's top-level `account_id` and reconcile it with
618
550
  * the caller's requested account, mirroring the provisioner's account gate
619
- * (provision.ts `provisionCloudflareResourcesLocked`). wrangler 4.107 gives the
551
+ * (provision.ts `provisionCloudflareResourcesLocked`). wrangler 4.131 gives the
620
552
  * config's `account_id` PRECEDENCE over `CLOUDFLARE_ACCOUNT_ID`, so a real
621
553
  * config-vs-requested mismatch is a fail-closed error (thrown BEFORE any spawn).
622
554
  * Returns the ONE effective account to pin (config wins, else requested), or
@@ -731,7 +663,7 @@ function selfHostEnvError(report) {
731
663
  lines.push("Invalid env vars:");
732
664
  for (const key of invalidKeys) lines.push(` • ${key} (${SELF_HOST_INVALID_REASON})`);
733
665
  }
734
- if (missing.length > 0) lines.push("", "Set each missing production secret with `wrangler secret put <NAME>`, or add a value to .env / .env.production.");
666
+ if (missing.length > 0) lines.push("", "Set each missing production secret with `void secret put <NAME>`.");
735
667
  const safeReport = {
736
668
  valid: report.valid,
737
669
  missing: report.missing,
@@ -759,7 +691,7 @@ function describeVarSource(source) {
759
691
  * The hard error for a REQUIRED key set to an EMPTY value (`FOO=""`) in
760
692
  * the effective build map. Values-free (key names + source KIND/filename only),
761
693
  * thrown ALWAYS — independent of whether the key exists as a remote secret. The
762
- * build bakes the empty string into plaintext `vars`, and wrangler 4.107 gives a
694
+ * build bakes the empty string into plaintext `vars`, and wrangler 4.131 gives a
763
695
  * config var precedence over a same-named remote secret (`checkRemoteSecretsOverride`
764
696
  * in wrangler-dist/cli.js warns "… will replace these remote secrets with the
765
697
  * configuration values"), so shipping this would ship an empty value for a
@@ -807,13 +739,11 @@ function firstDeployMessage(missingKeys) {
807
739
  ...sorted.map((key) => ` • ${key}`),
808
740
  "",
809
741
  "Bootstrap them on the draft Worker before deploying:",
810
- ...names.map((key) => ` wrangler secret put ${key}`),
811
- "",
812
- "or add a value to .env / .env.production, then run the deploy again."
742
+ ...names.map((key) => ` void secret put ${key}`)
813
743
  ].join("\n");
814
744
  }
815
745
  /**
816
- * The exact `wrangler secret list` argv. Verified against the wrangler 4.107.0
746
+ * The exact `wrangler secret list` argv. Verified against the wrangler 4.131.0
817
747
  * bundle (`wrangler-dist/cli.js`, `secretListCommand`):
818
748
  * - `secret list` accepts `--format` with choices `json`/`pretty`; `json` is
819
749
  * the default AND suppresses the banner (`printBanner` is format==='pretty'),
@@ -840,7 +770,7 @@ function secretListArgs(configPath) {
840
770
  ];
841
771
  }
842
772
  /**
843
- * wrangler 4.107's `secret list` worker-not-found signal. When the worker has
773
+ * wrangler 4.131's `secret list` worker-not-found signal. When the worker has
844
774
  * never been deployed, `fetchSecrets` throws the API worker-not-found error and
845
775
  * `secretListCommand.handler` — ONLY when `isWorkerNotFoundError(e)` is true
846
776
  * (`e.code === 10007` WORKER_NOT_FOUND or `10090`
@@ -879,7 +809,7 @@ function secretListFailureMessage(reason, detail) {
879
809
  switch (reason) {
880
810
  case "spawn-error": return `${base} (reason: spawn-error) — the wrangler process could not be started. Check that wrangler is installed and the pinned config path is valid.`;
881
811
  case "signal": return `${base} (reason: signal) — the process was terminated by ${detail.signal ?? "a signal"} before completing.`;
882
- case "nonzero-exit": return `${base} (reason: nonzero-exit, status ${detail.exitCode ?? "unknown"}). Re-run \`wrangler secret list -c <config>\` to see wrangler’s own diagnostics.`;
812
+ case "nonzero-exit": return `${base} (reason: nonzero-exit, status ${detail.exitCode ?? "unknown"}). Run \`void secret list\` to retry through Void and see the Cloudflare diagnostics.`;
883
813
  case "malformed-output": return `${base} (reason: malformed-output) — \`wrangler secret list --format=json\` did not return the expected JSON array of secret objects.`;
884
814
  }
885
815
  }
@@ -936,6 +866,22 @@ async function fetchSelfHostSecretNames(run, configPath, missingKeys) {
936
866
  return names;
937
867
  }
938
868
  /**
869
+ * List one pinned self-host Worker's remote secret names. Reconciles the root
870
+ * config's worker/account identity before spawning wrangler, then delegates to
871
+ * the same strict, values-free parser used by the production env gate.
872
+ *
873
+ * Exported so deploy-owned secret provisioning can share the exact same
874
+ * first-deploy and malformed-output classification without duplicating it.
875
+ */
876
+ async function listSelfHostSecretNames(options, missingKeys = []) {
877
+ reconcileSelfHostWorkerName(options.configPath, options.workerName);
878
+ const effectiveAccountId = reconcileSelfHostAccount(options.configPath, options.accountId);
879
+ return fetchSelfHostSecretNames(options.runWrangler ?? createDefaultSecretListRunner(options.root, {
880
+ accountId: effectiveAccountId,
881
+ timeoutMs: options.timeoutMs
882
+ }), options.configPath, missingKeys);
883
+ }
884
+ /**
939
885
  * Hard timeout for one `wrangler secret list` invocation — same bound as the
940
886
  * provisioner's per-command timeout. A hung wrangler must never hang the
941
887
  * whole deploy preflight.
@@ -1066,4 +1012,4 @@ function secretListEnv(accountId, platform) {
1066
1012
  return env;
1067
1013
  }
1068
1014
  //#endregion
1069
- export { collectPlaintextVarWarningsFromVars as a, env_validation_exports as c, getDeployEnvDefaults as d, readEmittedWorkerVars as f, loadUserEnvFile as h, SelfHostSecretListError as i, fetchRemoteSecretNames as l, validateProdEnv as m, SelfHostFirstDeployError as n, deriveSelfHostEnvContextFromVars as o, selfHostSchemaFailureMessage as p, SelfHostSchemaError as r, dischargeSelfHostEnvContext as s, SelfHostEnvValidationError as t, formatEnvReport as u };
1015
+ export { deriveSelfHostEnvContextFromVars as a, fetchRemoteSecretNames as c, readEmittedWorkerVars as d, selfHostSchemaFailureMessage as f, loadUserEnvFile as h, SelfHostSecretListError as i, formatEnvReport as l, validateSecretValues as m, SelfHostFirstDeployError as n, dischargeSelfHostEnvContext as o, validateProdEnv as p, SelfHostSchemaError as r, env_validation_exports as s, SelfHostEnvValidationError as t, listSelfHostSecretNames as u };
@@ -1,11 +1,11 @@
1
- import { a as join, n as dirname, s as relative } from "./dist-DaKKDf8D.mjs";
2
- import { D as outro, T as log, a as cliTitle, j as isCancel, k as select, w as intro, x as cancel } from "./agents-CtgBYqld.mjs";
3
- import { n as readProjectPaths } from "./project-paths-BQd7OmIo.mjs";
4
- import { n as ensureProjectTsconfig } from "./project-tsconfig-B-QtXjLQ.mjs";
5
- import { c as getDatabaseDialect, f as readConfig } from "./config-qHGgPuWT.mjs";
6
- import { n as writeDrizzleConfig } from "./config-CutEMNGJ.mjs";
7
- import { c as collectMigrations, n as listDrizzleArtifacts, t as assertJournalCoherence, u as readJournal } from "./validate-Cw_RLeTj.mjs";
8
- import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DJn3SAHF.mjs";
1
+ import { c as relative, n as dirname, o as join } from "./dist-BrsS7cai.mjs";
2
+ import { C as cancel, D as log, E as intro, F as isCancel, j as select, k as outro, r as cliTitle } from "./output-tFQLLj26.mjs";
3
+ import { n as readProjectPaths } from "./project-paths-SK8nMHPp.mjs";
4
+ import { c as getDatabaseDialect, f as readConfig } from "./config-BQFq7QvD.mjs";
5
+ import { n as ensureProjectTsconfig } from "./project-tsconfig-Ql2XsSQp.mjs";
6
+ import { c as collectMigrations, n as listDrizzleArtifacts, t as assertJournalCoherence, u as readJournal } from "./validate-tBBN_dXH.mjs";
7
+ import { n as writeDrizzleConfig } from "./config-NOG_U1aK.mjs";
8
+ import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DxSInkzL.mjs";
9
9
  import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
10
10
  import { fileURLToPath } from "node:url";
11
11
  import { spawnSync } from "node:child_process";
@@ -121,6 +121,37 @@ function drizzleImportsForColumnsPg(columns) {
121
121
  }
122
122
  return [...types].sort();
123
123
  }
124
+ function drizzleColumnDefMySql(col) {
125
+ const { name, type } = col;
126
+ switch (type) {
127
+ case "string":
128
+ case "text": return ` ${name}: text("${name}").notNull(),`;
129
+ case "integer": return ` ${name}: int("${name}").notNull(),`;
130
+ case "boolean": return ` ${name}: boolean("${name}").notNull().default(false),`;
131
+ case "real": return ` ${name}: double("${name}").notNull(),`;
132
+ default: return ` ${name}: text("${name}"),`;
133
+ }
134
+ }
135
+ function drizzleImportsForColumnsMySql(columns) {
136
+ const types = /* @__PURE__ */ new Set([
137
+ "int",
138
+ "text",
139
+ "timestamp"
140
+ ]);
141
+ for (const col of columns) switch (col.type) {
142
+ case "integer":
143
+ types.add("int");
144
+ break;
145
+ case "boolean":
146
+ types.add("boolean");
147
+ break;
148
+ case "real":
149
+ types.add("double");
150
+ break;
151
+ default: types.add("text");
152
+ }
153
+ return [...types].sort();
154
+ }
124
155
  function detectValidator(root) {
125
156
  const pkgPath = join(root, "package.json");
126
157
  if (!existsSync(pkgPath)) return null;
@@ -161,7 +192,7 @@ async function resolveValidator(root) {
161
192
  }
162
193
  ]
163
194
  });
164
- if (isCancel(choice)) {
195
+ if (isCancel(choice) || typeof choice === "symbol") {
165
196
  cancel("Cancelled.");
166
197
  process.exit(0);
167
198
  }
@@ -369,6 +400,23 @@ async function runModel(root, name, columns) {
369
400
  "});",
370
401
  ""
371
402
  ].join("\n");
403
+ } else if (dialect === "mysql") {
404
+ const colDefs = columns.map((col) => drizzleColumnDefMySql(col));
405
+ const columnImports = drizzleImportsForColumnsMySql(columns);
406
+ const allCols = [
407
+ ` id: int("id").autoincrement().primaryKey(),`,
408
+ ...colDefs,
409
+ ` createdAt: timestamp("created_at").notNull().defaultNow(),`,
410
+ ` updatedAt: timestamp("updated_at").notNull().defaultNow(),`
411
+ ];
412
+ content = [
413
+ `import { mysqlTable, ${columnImports.join(", ")} } from "void/schema-mysql";`,
414
+ "",
415
+ `export const ${name} = mysqlTable("${name}", {`,
416
+ ...allCols,
417
+ "});",
418
+ ""
419
+ ].join("\n");
372
420
  } else {
373
421
  const colDefs = columns.map((col) => drizzleColumnDef(col));
374
422
  const columnImports = drizzleImportsForColumns(columns);
@@ -412,7 +460,8 @@ function runMigration(root, name) {
412
460
  log.error(err instanceof Error ? err.message : String(err));
413
461
  process.exit(1);
414
462
  }
415
- if (existsSync(join(migrationsDir, "migrations.js"))) {
463
+ const bundlePath = join(migrationsDir, "migrations.js");
464
+ if (existsSync(bundlePath)) {
416
465
  log.error("Your project uses Drizzle's bundled migration format (db/migrations/migrations.js).\n`void gen migration` cannot add custom hand-written migrations to a bundled project\nbecause the bundle must be regenerated by drizzle-kit.\n\nEither run `drizzle-kit generate` to regenerate the bundle, or migrate away from\nbundled mode by deleting db/migrations/migrations.js and re-running `void db generate`.");
417
466
  process.exit(1);
418
467
  }
@@ -421,7 +470,8 @@ function runMigration(root, name) {
421
470
  const lastEntry = existingJournal.entries[existingJournal.entries.length - 1];
422
471
  const metaDir = join(migrationsDir, "meta");
423
472
  const lastSnapshotPrefix = lastEntry.tag.split("_")[0];
424
- if (!existsSync(join(metaDir, `${lastSnapshotPrefix}_snapshot.json`))) {
473
+ const prevSnapshotPath = join(metaDir, `${lastSnapshotPrefix}_snapshot.json`);
474
+ if (!existsSync(prevSnapshotPath)) {
425
475
  log.error(`db/migrations/meta/_journal.json's last entry is \`${lastEntry.tag}\` but the matching snapshot \`${lastSnapshotPrefix}_snapshot.json\` is missing under meta/.`);
426
476
  log.error("Restore the snapshot from version control, or regenerate migrations with `void db generate` before running `void gen migration`.");
427
477
  process.exit(1);
@@ -433,9 +483,10 @@ function runMigration(root, name) {
433
483
  let journalDialect;
434
484
  if (existingJournal.dialect === "sqlite") journalDialect = "sqlite";
435
485
  else if (existingJournal.dialect === "postgresql") journalDialect = "postgresql";
486
+ else if (existingJournal.dialect === "mysql") journalDialect = "mysql";
436
487
  else {
437
488
  log.error(`db/migrations/meta/_journal.json has an unsupported dialect: \`${existingJournal.dialect}\`.`);
438
- log.error("void supports `sqlite` and `postgresql` only. Restore the journal from version control, or drop db/migrations/ and regenerate from scratch.");
489
+ log.error("void supports `sqlite`, `postgresql`, and `mysql` only. Restore the journal from version control, or drop db/migrations/ and regenerate from scratch.");
439
490
  process.exit(1);
440
491
  }
441
492
  const configDialect = getDatabaseDialect(readConfig(root));
@@ -444,7 +495,9 @@ function runMigration(root, name) {
444
495
  log.error(`Generating a new custom migration now would append a snapshot in the wrong dialect. Revert void.json's \`database\` field to ${journalDialect}, or drop db/migrations/ and regenerate from scratch.`);
445
496
  process.exit(1);
446
497
  }
447
- const configPath = journalDialect === "postgresql" ? writeDrizzleConfig(root, "postgresql://dummy", "postgresql") : writeDrizzleConfig(root, ":memory:");
498
+ const authSchemaPath = join(root, ".void", "better-auth-schema.ts");
499
+ const additionalSchemas = existsSync(authSchemaPath) ? [authSchemaPath] : void 0;
500
+ const configPath = writeDrizzleConfig(root, journalDialect === "postgresql" ? "postgresql://dummy" : journalDialect === "mysql" ? "mysql://dummy" : ":memory:", journalDialect, { additionalSchemas });
448
501
  const childEnv = buildDrizzleKitSpawnEnv(root);
449
502
  const result = spawnSync(process.execPath, [
450
503
  drizzleKitBin,
@@ -494,7 +547,8 @@ function runMigration(root, name) {
494
547
  process.exit(1);
495
548
  }
496
549
  }
497
- writeIfNotExists(join(migrationsDir, `${`${getMigrationTimestamp(migrationsDir)}_${name}`}.sql`), `-- ${name}\n`);
550
+ const tag = `${getMigrationTimestamp(migrationsDir)}_${name}`;
551
+ writeIfNotExists(join(migrationsDir, `${tag}.sql`), `-- ${name}\n`);
498
552
  outro("Migration created.");
499
553
  }
500
554
  function runRoute(root, routePath, methods) {
@@ -512,7 +566,8 @@ ${methods.map((m) => {
512
566
  function runMiddleware(root, name) {
513
567
  const middlewareDir = readProjectPaths(root).middlewareDir;
514
568
  mkdirSync(middlewareDir, { recursive: true });
515
- writeIfNotExists(join(middlewareDir, `${getNextMiddlewareNumber(middlewareDir)}.${name}.ts`), `import { defineMiddleware } from "void";
569
+ const num = getNextMiddlewareNumber(middlewareDir);
570
+ writeIfNotExists(join(middlewareDir, `${num}.${name}.ts`), `import { defineMiddleware } from "void";
516
571
 
517
572
  export default defineMiddleware(async (c, next) => {
518
573
  // TODO: implement ${name} middleware
@@ -0,0 +1,47 @@
1
+ import { n as dirname, o as join } from "./dist-BrsS7cai.mjs";
2
+ import { c as collectMigrations } from "./validate-tBBN_dXH.mjs";
3
+ import { n as openMigrationValidationDatabase } from "./sqlite-validation-BzKMWnO4.mjs";
4
+ import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
5
+ //#region src/drizzle/generate.ts
6
+ function snapshotFiles(root) {
7
+ const files = /* @__PURE__ */ new Map();
8
+ if (existsSync(root)) {
9
+ for (const entry of readdirSync(root, {
10
+ recursive: true,
11
+ withFileTypes: true
12
+ })) if (entry.isFile()) {
13
+ const path = join(entry.parentPath, entry.name);
14
+ files.set(path, readFileSync(path));
15
+ }
16
+ }
17
+ return files;
18
+ }
19
+ /** Keep SQL and Drizzle's snapshot/journal together when generation fails validation. */
20
+ async function generateValidatedSqliteMigrations(migrationsDir, generate) {
21
+ try {
22
+ (await openMigrationValidationDatabase(collectMigrations(migrationsDir))).close();
23
+ } catch (cause) {
24
+ throw new Error(`${cause instanceof Error ? cause.message : String(cause)}\nRepair the unapplied migration before generating again. Drizzle diffs snapshots; rerunning generation does not repair existing SQL.`, { cause });
25
+ }
26
+ const existed = existsSync(migrationsDir);
27
+ const previous = snapshotFiles(migrationsDir);
28
+ try {
29
+ generate();
30
+ (await openMigrationValidationDatabase(collectMigrations(migrationsDir))).close();
31
+ } catch (cause) {
32
+ if (!existed) rmSync(migrationsDir, {
33
+ recursive: true,
34
+ force: true
35
+ });
36
+ else {
37
+ for (const path of snapshotFiles(migrationsDir).keys()) if (!previous.has(path)) rmSync(path);
38
+ for (const [path, contents] of previous) {
39
+ mkdirSync(dirname(path), { recursive: true });
40
+ writeFileSync(path, contents);
41
+ }
42
+ }
43
+ throw new Error(`${cause instanceof Error ? cause.message : String(cause)}\nMigration generation failed; previous SQL, snapshots and journal were restored. Review the schema change before retrying. For additive changes, use an additive migration rather than rebuilding existing tables.`, { cause });
44
+ }
45
+ }
46
+ //#endregion
47
+ export { generateValidatedSqliteMigrations };