void 0.10.12 → 0.20.0

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 (431) 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-CYVhSNFy.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-CkVD1uOh.mjs} +6 -4
  11. package/dist/{cache-C11V8Fxq.mjs → cache-QcUfR-ff.mjs} +9 -5
  12. package/dist/{cancel-deploy-fwFYF04b.mjs → cancel-deploy-DsvWKFTe.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 +1592 -153
  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-CyCHWSO_.mjs} +61 -463
  20. package/dist/cloudflare-auth-DRkGe7-s.mjs +170 -0
  21. package/dist/cloudflare-cmd-D3ME2GAe.mjs +62 -0
  22. package/dist/cloudflare-connect-BivMefMA.mjs +56 -0
  23. package/dist/cloudflare-operations-CPTpRW6d.mjs +566 -0
  24. package/dist/{config-BkTvs43g.mjs → config-BQFq7QvD.mjs} +85 -41
  25. package/dist/{config-CutEMNGJ.mjs → config-NOG_U1aK.mjs} +10 -15
  26. package/dist/connect-D9Yr-T5f.mjs +79 -0
  27. package/dist/{create-project-DsYvl3TB.mjs → create-project-DMV-csEm.mjs} +26 -16
  28. package/dist/database-provider.d.mts +21 -0
  29. package/dist/database-provider.mjs +6 -0
  30. package/dist/{db-DOiJMRt2.mjs → db-BxoUWL0F.mjs} +600 -115
  31. package/dist/{delete-mh6p-zkQ.mjs → delete-iJOqxBz1.mjs} +9 -6
  32. package/dist/{deploy-u7Rv9q_q.mjs → deploy-CcDoeBIf.mjs} +3451 -1986
  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-gu_iaHmn.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-r6DHJyAB.mjs +262 -0
  44. package/dist/{entry-D7yy4xVH.mjs → entry-DU3oDoQ3.mjs} +2 -2
  45. package/dist/env-D4Emu-M_.mjs +95 -0
  46. package/dist/env-DmU2To0C.mjs +73 -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-o_w-8yI8.mjs → gen-BKw6qHIg.mjs} +70 -15
  52. package/dist/{github-cmd-DKcGUNsj.mjs → github-cmd-DJS5Ab-H.mjs} +39 -31
  53. package/dist/{handler-Cjh8uM3Y.d.mts → handler-D1hLsObx.d.mts} +124 -122
  54. package/dist/{head-nmvOgFjd.d.mts → head-Do8P4puT.d.mts} +9 -8
  55. package/dist/{headers-nsHIFixA.mjs → headers-D8QfRX9Y.mjs} +12 -10
  56. package/dist/inbound-BJ70in1n.d.mts +354 -0
  57. package/dist/inbound-CNKxb3FY.mjs +694 -0
  58. package/dist/index.d.mts +61 -34
  59. package/dist/index.mjs +1048 -321
  60. package/dist/{init-3rgHKBVi.mjs → init-Dx5cgKqK.mjs} +329 -271
  61. package/dist/link-D_rm5sRH.mjs +52 -0
  62. package/dist/{list-CPwFDZ_c.mjs → list-M8XShti7.mjs} +37 -5
  63. package/dist/{runner-kapo9aPs.mjs → local-d1-BE8KBbMy.mjs} +116 -6
  64. package/dist/{login-BT3H8PN3.mjs → login-C8-UuLnp.mjs} +17 -15
  65. package/dist/{logs-Bt313ax7.mjs → logs-DwFU7dMW.mjs} +16 -2
  66. package/dist/mime-BJD7d_qL.mjs +1216 -0
  67. package/dist/neon-DHwd2zvC.mjs +54 -0
  68. package/dist/{node-Da0UcsGA.mjs → node-BkaXcpAc.mjs} +29 -8
  69. package/dist/operator-cmd-DYWRbWUA.mjs +348 -0
  70. package/dist/{agents-CtgBYqld.mjs → output-tFQLLj26.mjs} +676 -211
  71. package/dist/{package-json-Cx1osYo6.mjs → package-json-CPoWX79C.mjs} +1 -1
  72. package/dist/pages/client.d.mts +43 -41
  73. package/dist/pages/client.mjs +40 -33
  74. package/dist/pages/head-client.d.mts +10 -12
  75. package/dist/pages/head.d.mts +1 -1
  76. package/dist/pages/index.d.mts +37 -14
  77. package/dist/pages/index.mjs +5 -5
  78. package/dist/pages/islands-plugin.d.mts +25 -27
  79. package/dist/pages/islands-plugin.mjs +6 -4
  80. package/dist/pages/prefetch.d.mts +6 -7
  81. package/dist/pages/protocol.d.mts +2 -2
  82. package/dist/pages/protocol.mjs +2 -1
  83. package/dist/pages/serialize.d.mts +7 -8
  84. package/dist/platform-cmd-BEOVv1PN.mjs +123 -0
  85. package/dist/platform-domain-BszUfiS8.mjs +228 -0
  86. package/dist/platform-lifecycle-CjSr6xf0.mjs +4450 -0
  87. package/dist/platform-management-W30iCaTL.mjs +698 -0
  88. package/dist/platform-recovery-pHHv4ZSg.mjs +99 -0
  89. package/dist/{plugin-inference-DMeavIJ6.mjs → plugin-inference-BDRfZngg.mjs} +35 -19
  90. package/dist/prepare-BfJvFUtJ.mjs +14 -0
  91. package/dist/{prepare-BoKHgMNx.mjs → prepare-CBetXvsN.mjs} +15 -24
  92. package/dist/{preset-BjyR3lzz.mjs → preset-lAy0B0BQ.mjs} +25 -212
  93. package/dist/{project-cmd-D_w-4w5B.mjs → project-cmd-DCpk1cDt.mjs} +25 -12
  94. package/dist/{project-paths-BQd7OmIo.mjs → project-paths-SK8nMHPp.mjs} +3 -1
  95. package/dist/{project-tsconfig-B-QtXjLQ.mjs → project-tsconfig-Ql2XsSQp.mjs} +2 -2
  96. package/dist/{protocol-Bnb0LFp3.d.mts → protocol-C-pqYJjE.d.mts} +3 -4
  97. package/dist/{provision-rShh6MKY.mjs → provision-Blnstcm2.mjs} +78 -45
  98. package/dist/r2-conditions-D1Wk8i7b.mjs +30 -0
  99. package/dist/{requests-B8sZxaFM.mjs → requests-Dn8Vheh1.mjs} +5 -3
  100. package/dist/{resolve-project-BBMtLLV9.mjs → resolve-project--Vxawf7z.mjs} +2 -2
  101. package/dist/rollback-CtlPXEBi.mjs +166 -0
  102. package/dist/{rolldown-runtime-DJK8HYOj.mjs → rolldown-runtime-rQ84J-ij.mjs} +1 -1
  103. package/dist/{route-types-COI2DsZv.mjs → route-types-Da-DpyUp.mjs} +85 -26
  104. package/dist/routes-stub.d.mts +22 -23
  105. package/dist/runner-mysql-CgRFl3s6.mjs +61 -0
  106. package/dist/{runner-pg-CHM76xuC.mjs → runner-pg-DCkWPsWS.mjs} +18 -6
  107. package/dist/runtime/ai.d.mts +21 -14
  108. package/dist/runtime/ai.mjs +5 -4
  109. package/dist/runtime/auth-client-react.d.mts +3 -5
  110. package/dist/runtime/auth-client-solid.d.mts +3 -5
  111. package/dist/runtime/auth-client-svelte.d.mts +3 -5
  112. package/dist/runtime/auth-client-vue.d.mts +3 -5
  113. package/dist/runtime/auth-client.d.mts +3 -5
  114. package/dist/runtime/auth.d.mts +1 -1
  115. package/dist/runtime/better-auth-mysql.d.mts +10 -0
  116. package/dist/runtime/better-auth-mysql.mjs +49 -0
  117. package/dist/runtime/better-auth-pg.d.mts +8 -9
  118. package/dist/runtime/better-auth-pg.mjs +2 -2
  119. package/dist/runtime/better-auth.d.mts +8 -9
  120. package/dist/runtime/better-auth.mjs +2 -2
  121. package/dist/runtime/client-react.d.mts +1 -1
  122. package/dist/runtime/client-solid.d.mts +1 -1
  123. package/dist/runtime/client-svelte.d.mts +1 -1
  124. package/dist/runtime/client-vue.d.mts +1 -1
  125. package/dist/runtime/client.d.mts +1 -1
  126. package/dist/runtime/db-mysql.d.mts +2 -0
  127. package/dist/runtime/db-mysql.mjs +1 -0
  128. package/dist/runtime/db.d.mts +10 -11
  129. package/dist/runtime/durable.d.mts +47 -0
  130. package/dist/runtime/durable.mjs +146 -0
  131. package/dist/runtime/email/testing.d.mts +112 -0
  132. package/dist/runtime/email/testing.mjs +283 -0
  133. package/dist/runtime/email.d.mts +30 -0
  134. package/dist/runtime/email.mjs +573 -0
  135. package/dist/runtime/env-helpers.d.mts +2 -2
  136. package/dist/runtime/env-helpers.mjs +5 -42
  137. package/dist/runtime/env-public-client.d.mts +10 -11
  138. package/dist/runtime/env-public-client.mjs +1 -1
  139. package/dist/runtime/env-public.d.mts +2 -2
  140. package/dist/runtime/env-public.mjs +104 -49
  141. package/dist/runtime/env.d.mts +19 -18
  142. package/dist/runtime/env.mjs +15 -2
  143. package/dist/runtime/fetch-stream.d.mts +20 -21
  144. package/dist/runtime/fetch.d.mts +15 -16
  145. package/dist/runtime/handler.d.mts +1 -1
  146. package/dist/runtime/isr.d.mts +21 -22
  147. package/dist/runtime/isr.mjs +26 -8
  148. package/dist/runtime/kv.d.mts +9 -10
  149. package/dist/runtime/live-client.d.mts +5 -7
  150. package/dist/runtime/live-client.mjs +9 -7
  151. package/dist/runtime/live-server.d.mts +4 -5
  152. package/dist/runtime/live.d.mts +22 -24
  153. package/dist/runtime/live.mjs +1 -1
  154. package/dist/runtime/log.d.mts +16 -17
  155. package/dist/runtime/migration-handler-mysql.d.mts +4 -0
  156. package/dist/runtime/migration-handler-mysql.mjs +81 -0
  157. package/dist/runtime/migration-handler-pg.d.mts +2 -4
  158. package/dist/runtime/migration-handler.d.mts +5 -6
  159. package/dist/runtime/migration-handler.mjs +4 -3
  160. package/dist/runtime/queues.d.mts +3 -4
  161. package/dist/runtime/queues.mjs +2 -1
  162. package/dist/runtime/remote/binding-handler.d.mts +10 -12
  163. package/dist/runtime/remote/binding-handler.mjs +24 -3
  164. package/dist/runtime/remote/index.d.mts +5 -6
  165. package/dist/runtime/remote/index.mjs +21 -18
  166. package/dist/runtime/response.d.mts +10 -11
  167. package/dist/runtime/sandbox.d.mts +56 -55
  168. package/dist/runtime/sandbox.mjs +57 -49
  169. package/dist/runtime/schema-mysql.d.mts +1 -0
  170. package/dist/runtime/schema-mysql.mjs +2 -0
  171. package/dist/runtime/seed.d.mts +14 -9
  172. package/dist/runtime/sse-client.d.mts +6 -7
  173. package/dist/runtime/sse.d.mts +11 -12
  174. package/dist/runtime/storage.d.mts +3 -4
  175. package/dist/runtime/validator.d.mts +1 -1
  176. package/dist/runtime/ws-server.d.mts +12 -12
  177. package/dist/runtime/ws-server.mjs +32 -4
  178. package/dist/runtime/ws.d.mts +19 -21
  179. package/dist/{scan-DYXkrasO.mjs → scan-BMH4rzlv.mjs} +53 -31
  180. package/dist/{scan-DEwlM_Xy.mjs → scan-CpK-57ug.mjs} +9 -5
  181. package/dist/{secret-Dt32J6RI.mjs → secret-BqTxGqki.mjs} +62 -5
  182. package/dist/{skills-CLjN0uUO.mjs → skills-Q46GZMO-.mjs} +6 -4
  183. package/dist/{standard-schema-DJ0HW7QP.d.mts → standard-schema-Fo_vCAZh.d.mts} +6 -6
  184. package/dist/{subcommand-prompt-BzV8iQZo.mjs → subcommand-prompt-WfySCQ7S.mjs} +67 -48
  185. package/dist/sveltekit.d.mts +12 -11
  186. package/dist/sveltekit.mjs +1 -1
  187. package/dist/types-BAp5AEBU.d.mts +79 -0
  188. package/dist/types-CKWnYgfy.d.mts +1 -0
  189. package/dist/{validate-Cw_RLeTj.mjs → validate-Bihr8WBi.mjs} +3 -3
  190. package/dist/wrangler--imS8n0d.mjs +1796 -0
  191. package/dist/{yarn-pnp-DJn3SAHF.mjs → yarn-pnp-DxSInkzL.mjs} +1 -1
  192. package/package.json +79 -65
  193. package/schema.json +35 -3
  194. package/skills/migrate-vite-cloudflare-to-void/SKILL.md +1 -1
  195. package/skills/void/SKILL.md +59 -2
  196. package/skills/void/docs/guide/ai.md +32 -14
  197. package/skills/void/docs/guide/app-types.md +6 -6
  198. package/skills/void/docs/guide/auth.md +14 -16
  199. package/skills/void/docs/guide/database/d1.md +6 -0
  200. package/skills/void/docs/guide/database/mysql.md +60 -0
  201. package/skills/void/docs/guide/database/postgresql.md +14 -9
  202. package/skills/void/docs/guide/database.md +39 -26
  203. package/skills/void/docs/guide/deployment.md +163 -22
  204. package/skills/void/docs/guide/durable-state.md +140 -0
  205. package/skills/void/docs/guide/edge/headers.md +5 -5
  206. package/skills/void/docs/guide/edge/prerendering.md +2 -0
  207. package/skills/void/docs/guide/edge/revalidation.md +21 -6
  208. package/skills/void/docs/guide/edge/rewrites.md +18 -14
  209. package/skills/void/docs/guide/edge/static-assets.md +23 -8
  210. package/skills/void/docs/guide/email.md +609 -0
  211. package/skills/void/docs/guide/env-migration.md +109 -0
  212. package/skills/void/docs/guide/env-vars.md +70 -248
  213. package/skills/void/docs/guide/index.md +15 -17
  214. package/skills/void/docs/guide/jobs.md +8 -5
  215. package/skills/void/docs/guide/live.md +7 -15
  216. package/skills/void/docs/guide/pages-routing/actions-and-forms.md +8 -4
  217. package/skills/void/docs/guide/pages-routing/islands.md +3 -3
  218. package/skills/void/docs/guide/pages-routing/loaders.md +6 -4
  219. package/skills/void/docs/guide/pages-routing/overview.md +7 -7
  220. package/skills/void/docs/guide/platform-administration.md +212 -0
  221. package/skills/void/docs/guide/platform-development.md +235 -0
  222. package/skills/void/docs/guide/queues.md +10 -10
  223. package/skills/void/docs/guide/quickstart.md +46 -67
  224. package/skills/void/docs/guide/remote-dev.md +8 -6
  225. package/skills/void/docs/guide/sandboxes.md +33 -16
  226. package/skills/void/docs/guide/self-hosted-platform.md +553 -0
  227. package/skills/void/docs/guide/server-routing.md +25 -5
  228. package/skills/void/docs/guide/sse.md +4 -4
  229. package/skills/void/docs/guide/ssg.md +5 -3
  230. package/skills/void/docs/guide/storage.md +2 -2
  231. package/skills/void/docs/guide/websockets.md +18 -7
  232. package/skills/void/docs/index.md +3 -3
  233. package/skills/void/docs/integrations/agents.md +6 -64
  234. package/skills/void/docs/integrations/cloudflare.md +165 -146
  235. package/skills/void/docs/integrations/frameworks/analog.md +4 -4
  236. package/skills/void/docs/integrations/frameworks/astro.md +5 -5
  237. package/skills/void/docs/integrations/frameworks/nuxt.md +5 -5
  238. package/skills/void/docs/integrations/frameworks/overview.md +3 -3
  239. package/skills/void/docs/integrations/frameworks/react-router.md +3 -3
  240. package/skills/void/docs/integrations/frameworks/sveltekit.md +3 -3
  241. package/skills/void/docs/integrations/frameworks/tanstack-start.md +2 -2
  242. package/skills/void/docs/integrations/nodejs-bun-deno.md +11 -4
  243. package/skills/void/docs/reference/api.md +42 -6
  244. package/skills/void/docs/reference/cli.md +637 -159
  245. package/skills/void/docs/reference/config.md +80 -25
  246. package/skills/void/docs/reference/resource-inference.md +13 -9
  247. package/skills/void/docs/reference/structure.md +10 -11
  248. package/AGENT_PROMPT.md +0 -19
  249. package/dist/cf-access-Bqw81xAf.mjs +0 -22
  250. package/dist/env-CZy5MorI.mjs +0 -299
  251. package/dist/env-helpers-z4stu8uc.d.mts +0 -52
  252. package/dist/env-mask-Dd47NbR6.mjs +0 -90
  253. package/dist/env-public-BfiLcMBk.d.mts +0 -140
  254. package/dist/link-CdGHSIy-.mjs +0 -45
  255. package/dist/mcp-DoM3_nhd.mjs +0 -377
  256. package/dist/project-paths-GpziKeQQ.d.mts +0 -25
  257. package/dist/providers-BNKRacMr.d.mts +0 -7
  258. package/dist/proxy-D-3_D-Gl.mjs +0 -5
  259. package/dist/rollback-CkvTFXx5.mjs +0 -90
  260. package/dist/runtime/isr-cache.d.mts +0 -207
  261. package/dist/runtime/isr-cache.mjs +0 -523
  262. package/dist/types-lLjNE9Qp.d.mts +0 -51
  263. package/getting-started-prompt.txt +0 -28
  264. package/skills/void/command/void.md +0 -7
  265. package/skills/void/docs/integrations/auth-providers.md +0 -0
  266. package/skills/void/docs/integrations/payment-processors.md +0 -0
  267. package/skills/void/docs/node_modules/@iconify/vue/README.md +0 -408
  268. package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +0 -5
  269. package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +0 -103
  270. package/skills/void/docs/node_modules/oxc-minify/README.md +0 -78
  271. package/skills/void/docs/node_modules/reka-ui/README.md +0 -80
  272. package/skills/void/docs/node_modules/vitepress/README.md +0 -28
  273. package/skills/void/docs/node_modules/vitepress/template/api-examples.md +0 -49
  274. package/skills/void/docs/node_modules/vitepress/template/index.md +0 -28
  275. package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +0 -85
  276. package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +0 -101
  277. package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +0 -19
  278. package/skills/void/docs/node_modules/void/CLAUDE.md +0 -219
  279. package/skills/void/docs/node_modules/void/README.md +0 -90
  280. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +0 -685
  281. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +0 -396
  282. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +0 -219
  283. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +0 -37
  284. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +0 -135
  285. package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +0 -189
  286. package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +0 -143
  287. package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +0 -1272
  288. package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +0 -19
  289. package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +0 -15
  290. package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +0 -15
  291. package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +0 -15
  292. package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +0 -51
  293. package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +0 -22
  294. package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +0 -69
  295. package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +0 -153
  296. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +0 -9
  297. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +0 -9
  298. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +0 -15
  299. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +0 -24
  300. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +0 -565
  301. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +0 -127
  302. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +0 -600
  303. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +0 -386
  304. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +0 -95
  305. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +0 -101
  306. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-footnote/README.md +0 -135
  307. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +0 -64
  308. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +0 -15
  309. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +0 -25
  310. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +0 -16
  311. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +0 -220
  312. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +0 -21
  313. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +0 -35
  314. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +0 -70
  315. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +0 -20
  316. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +0 -35
  317. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +0 -26
  318. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +0 -17
  319. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +0 -364
  320. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +0 -15
  321. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +0 -18
  322. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
  323. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/build.md +0 -40
  324. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +0 -107
  325. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +0 -60
  326. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +0 -62
  327. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
  328. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +0 -341
  329. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/dev.md +0 -24
  330. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +0 -175
  331. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +0 -167
  332. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/fmt.md +0 -41
  333. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
  334. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
  335. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/implode.md +0 -23
  336. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +0 -134
  337. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +0 -199
  338. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/lint.md +0 -50
  339. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
  340. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +0 -197
  341. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
  342. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +0 -69
  343. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +0 -356
  344. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/test.md +0 -35
  345. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
  346. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
  347. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/vpx.md +0 -66
  348. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/why.md +0 -39
  349. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/index.md +0 -12
  350. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/team.md +0 -35
  351. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/generator/README.md +0 -35
  352. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/monorepo/README.md +0 -29
  353. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +0 -58
  354. package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +0 -165
  355. package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +0 -20
  356. package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +0 -32
  357. package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +0 -99
  358. package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +0 -108
  359. package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +0 -51
  360. package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +0 -79
  361. package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +0 -44
  362. package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +0 -51
  363. package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +0 -65
  364. package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +0 -403
  365. package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +0 -48
  366. package/skills/void/docs/node_modules/void/node_modules/hono/README.md +0 -85
  367. package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +0 -452
  368. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +0 -76
  369. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md +0 -21
  370. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +0 -364
  371. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +0 -41
  372. package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +0 -325
  373. package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +0 -398
  374. package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +0 -64
  375. package/skills/void/docs/node_modules/void/node_modules/pg/README.md +0 -96
  376. package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +0 -135
  377. package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +0 -21
  378. package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +0 -108
  379. package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +0 -183
  380. package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +0 -25
  381. package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +0 -9
  382. package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +0 -94
  383. package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +0 -16
  384. package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +0 -220
  385. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +0 -21
  386. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +0 -35
  387. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +0 -70
  388. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +0 -20
  389. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +0 -35
  390. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +0 -26
  391. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +0 -17
  392. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +0 -364
  393. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +0 -15
  394. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +0 -18
  395. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
  396. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/build.md +0 -40
  397. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +0 -107
  398. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +0 -60
  399. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +0 -62
  400. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
  401. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +0 -341
  402. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/dev.md +0 -24
  403. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +0 -175
  404. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +0 -167
  405. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/fmt.md +0 -41
  406. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
  407. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
  408. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/implode.md +0 -23
  409. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +0 -134
  410. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +0 -199
  411. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/lint.md +0 -50
  412. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
  413. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +0 -197
  414. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
  415. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +0 -69
  416. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +0 -356
  417. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/test.md +0 -35
  418. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
  419. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
  420. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/vpx.md +0 -66
  421. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/why.md +0 -39
  422. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/index.md +0 -12
  423. package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/team.md +0 -35
  424. package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/generator/README.md +0 -35
  425. package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/monorepo/README.md +0 -29
  426. package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +0 -63
  427. package/skills/void/docs/node_modules/void/node_modules/zod/README.md +0 -191
  428. package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +0 -175
  429. package/skills/void/docs/node_modules/void/skills/void/SKILL.md +0 -76
  430. package/skills/void/docs/node_modules/void/skills/void/command/void.md +0 -7
  431. package/skills/void/docs/node_modules/void/test/e2e/README.md +0 -85
@@ -0,0 +1,573 @@
1
+ import { i as normalizeEmail, n as MimeError, r as buildMime } from "../mime-BJD7d_qL.mjs";
2
+ import { a as DEV_INBOX_ENV_VAR, b as serializeCapturedMessage, c as DEV_INBOX_TOKEN_ENV_VAR, d as captureMessage, h as hasActiveSink, i as DEV_INBOX_CAPTURE_URL, p as dispatchToSinks } from "../dev-inbox-DkgRWLkW.mjs";
3
+ import { a as getRawRuntimeEnv } from "../env-raw-Cx8ElDdj.mjs";
4
+ import { a as defineEmail, c as parseEmail, i as createMessageProxy, l as replyEmail, o as enactEmailActions, r as ParseEmailError, s as isForwardableEmailMessage } from "../inbound-CNKxb3FY.mjs";
5
+ //#region src/runtime/email.ts
6
+ const VALID_SLUG = /^[a-z0-9](?:[a-z0-9-]{0,54}[a-z0-9])?$/;
7
+ function makeError(code, message, cause) {
8
+ return cause === void 0 ? {
9
+ code,
10
+ message
11
+ } : {
12
+ code,
13
+ message,
14
+ cause
15
+ };
16
+ }
17
+ function tryGetRawRuntimeEnv() {
18
+ try {
19
+ return getRawRuntimeEnv();
20
+ } catch {
21
+ return;
22
+ }
23
+ }
24
+ function readProjectSlug() {
25
+ const raw = tryGetRawRuntimeEnv()?.__VOID_PROJECT_SLUG;
26
+ if (typeof raw !== "string" || raw.length === 0) return;
27
+ return VALID_SLUG.test(raw) ? raw : void 0;
28
+ }
29
+ function readEmailDomain() {
30
+ const raw = tryGetRawRuntimeEnv()?.__VOID_EMAIL_DOMAIN;
31
+ return typeof raw === "string" && raw.length > 0 ? raw : void 0;
32
+ }
33
+ function readEmailFrom() {
34
+ const raw = tryGetRawRuntimeEnv()?.__VOID_EMAIL_FROM;
35
+ return typeof raw === "string" && raw.length > 0 ? raw : void 0;
36
+ }
37
+ const SEND_EMAIL_BINDING_NAME = "SEND_EMAIL";
38
+ function resolveSendEmailBinding(env) {
39
+ const binding = env?.[SEND_EMAIL_BINDING_NAME];
40
+ if (typeof binding !== "object" || binding === null) return;
41
+ return typeof binding.send === "function" ? binding : void 0;
42
+ }
43
+ /**
44
+ * Map an error thrown by the `send_email` binding to a framework code.
45
+ *
46
+ * Email Service throws `Error`s carrying a `code` (the `E_*` table in
47
+ * Cloudflare's Workers API reference); the older Email Routing sender
48
+ * throws message-only errors, so the destination-verification phrasing the
49
+ * platform proxy already keys on is kept as a fallback. Anything else is
50
+ * `UPSTREAM_ERROR` with the original error as `cause` — the framework has
51
+ * no way to act on a delivery failure or a service outage beyond
52
+ * reporting it.
53
+ *
54
+ * The platform proxy's `classifyUpstream` mirrors this table for its own
55
+ * binding, except the two sender codes: there `from` is pinned to the
56
+ * project sender, so a sender failure is the platform's to fix and stays
57
+ * `UPSTREAM_ERROR`. Keep the recipient and limit rows in lockstep.
58
+ */
59
+ function classifyBindingError(e) {
60
+ const message = e instanceof Error ? e.message : String(e);
61
+ switch (typeof e?.code === "string" ? e.code : "") {
62
+ case "E_RECIPIENT_NOT_ALLOWED": return makeError("UNVERIFIED_DESTINATION", message, e);
63
+ case "E_SENDER_NOT_VERIFIED":
64
+ case "E_SENDER_DOMAIN_NOT_AVAILABLE": return makeError("INVALID_FROM", message, e);
65
+ case "E_RATE_LIMIT_EXCEEDED":
66
+ case "E_DAILY_LIMIT_EXCEEDED": return makeError("QUOTA_EXCEEDED", message, e);
67
+ }
68
+ if (UNVERIFIED_DESTINATION_RE.test(message)) return makeError("UNVERIFIED_DESTINATION", message, e);
69
+ return makeError("UPSTREAM_ERROR", message, e);
70
+ }
71
+ const UNVERIFIED_DESTINATION_RE = /^[^\n]{0,200}destination address[^\n]{0,200}not (?:yet )?verified/i;
72
+ function bytesToReadableStream(bytes) {
73
+ return new ReadableStream({ start(controller) {
74
+ controller.enqueue(bytes);
75
+ controller.close();
76
+ } });
77
+ }
78
+ /**
79
+ * Deliver through the worker's own `SEND_EMAIL` binding. One `EmailMessage`
80
+ * per recipient, every recipient attempted, and the same `deliveries` shape
81
+ * the proxy returns so a caller retries the failed ones the same way in both
82
+ * modes. The stream is rebuilt per send because a `ReadableStream` is
83
+ * one-shot.
84
+ */
85
+ async function sendViaBinding(binding, from, recipients, raw, fallbackId) {
86
+ let EmailMessage;
87
+ try {
88
+ ({EmailMessage} = await import("cloudflare:email"));
89
+ } catch (e) {
90
+ return err("UPSTREAM_ERROR", `email: SEND_EMAIL is bound but cloudflare:email could not be loaded: ${e instanceof Error ? e.message : String(e)}`, e);
91
+ }
92
+ const deliveries = [];
93
+ for (const recipient of recipients) try {
94
+ const result = await binding.send(new EmailMessage(from, recipient, bytesToReadableStream(raw)));
95
+ const mid = typeof result?.messageId === "string" ? result.messageId : "";
96
+ deliveries.push({
97
+ recipient,
98
+ ok: true,
99
+ messageId: mid || fallbackId
100
+ });
101
+ } catch (e) {
102
+ deliveries.push({
103
+ recipient,
104
+ ok: false,
105
+ error: classifyBindingError(e)
106
+ });
107
+ }
108
+ if (deliveries.some((d) => !d.ok)) return {
109
+ ok: false,
110
+ deliveries
111
+ };
112
+ return {
113
+ ok: true,
114
+ ids: deliveries.map((d) => ({
115
+ recipient: d.recipient,
116
+ messageId: d.messageId
117
+ }))
118
+ };
119
+ }
120
+ /**
121
+ * Dedup recipients by lowercased email (CF won't collapse duplicate
122
+ * envelopes for us, and double-billing the quota for the same recipient
123
+ * is worse than the rare case where a user actually wanted Cc + Bcc to
124
+ * the same address — which doesn't change delivery semantics anyway).
125
+ */
126
+ function uniqueRecipients(normalized) {
127
+ const seen = /* @__PURE__ */ new Set();
128
+ const recipients = [];
129
+ for (const r of [
130
+ ...normalized.to,
131
+ ...normalized.cc,
132
+ ...normalized.bcc
133
+ ]) {
134
+ const lower = r.email.toLowerCase();
135
+ if (seen.has(lower)) continue;
136
+ seen.add(lower);
137
+ recipients.push(lower);
138
+ }
139
+ return recipients;
140
+ }
141
+ function newRequestId() {
142
+ const bytes = /* @__PURE__ */ new Uint8Array(8);
143
+ crypto.getRandomValues(bytes);
144
+ let hex = "";
145
+ for (const b of bytes) hex += b.toString(16).padStart(2, "0");
146
+ return `req_${Date.now().toString(36)}${hex}`;
147
+ }
148
+ function resolveDefaultFrom(opts) {
149
+ const supplied = opts.from;
150
+ if (!(supplied === void 0 || supplied === null || typeof supplied === "string" && supplied.trim() === "" || typeof supplied === "object" && supplied !== null && !("email" in supplied))) return opts;
151
+ const configured = readEmailFrom();
152
+ if (configured) return {
153
+ ...opts,
154
+ from: configured
155
+ };
156
+ const slug = readProjectSlug();
157
+ const domain = readEmailDomain();
158
+ if (!slug || !domain) {
159
+ if (supplied === null) {
160
+ const next = { ...opts };
161
+ delete next.from;
162
+ return next;
163
+ }
164
+ return opts;
165
+ }
166
+ return {
167
+ ...opts,
168
+ from: `${slug}+noreply@${domain}`
169
+ };
170
+ }
171
+ function err(code, message, cause) {
172
+ return {
173
+ ok: false,
174
+ error: makeError(code, message, cause)
175
+ };
176
+ }
177
+ function bytesToBase64(bytes) {
178
+ const CHUNK = 8192;
179
+ let binary = "";
180
+ for (let i = 0; i < bytes.byteLength; i += CHUNK) {
181
+ const slice = bytes.subarray(i, Math.min(i + CHUNK, bytes.byteLength));
182
+ binary += String.fromCharCode(...slice);
183
+ }
184
+ return btoa(binary);
185
+ }
186
+ function coerceErrorCode(code) {
187
+ return [
188
+ "BINDING_MISSING",
189
+ "INVALID_FROM",
190
+ "INVALID_TO",
191
+ "UNVERIFIED_DESTINATION",
192
+ "MIME_ERROR",
193
+ "QUOTA_EXCEEDED",
194
+ "UPSTREAM_ERROR"
195
+ ].includes(code) ? code : "UPSTREAM_ERROR";
196
+ }
197
+ /**
198
+ * The text of a refusal the proxy's middleware sent instead of a send
199
+ * response: `{ error: string, message?: string }`. `message` is the
200
+ * sentence written for a person (the capability gate's "This Void platform
201
+ * does not enable email."); `error` is the short code every such refusal
202
+ * carries. `null` when the body is not that shape.
203
+ */
204
+ function readProxyRefusal(body) {
205
+ if (typeof body !== "object" || body === null || Array.isArray(body)) return null;
206
+ const { error, message } = body;
207
+ if (typeof error !== "string" || error === "") return null;
208
+ return typeof message === "string" && message !== "" ? message : error;
209
+ }
210
+ function isValidProxyResponse(b) {
211
+ if (typeof b !== "object" || b === null) return false;
212
+ const r = b;
213
+ if (r.ok === true && Array.isArray(r.ids)) return true;
214
+ if (r.ok === false && typeof r.error === "object" && r.error !== null) return true;
215
+ if (r.ok === false && Array.isArray(r.deliveries)) return true;
216
+ return false;
217
+ }
218
+ /**
219
+ * Validate a per-recipient list from the proxy against the recipients this
220
+ * send asked for. Both list-bearing responses go through here — `ids` on
221
+ * `ok: true` and `deliveries` on a mid-batch `ok: false` — so the two cannot
222
+ * drift: the proxy builds both from the same per-recipient list, one entry
223
+ * per requested address, and a caller following the documented retry
224
+ * pattern (retry only `ok: false` entries) can act on an outcome only if
225
+ * every recipient has one.
226
+ *
227
+ * The rules shared by both shapes: the count equals the recipients sent;
228
+ * every entry is an object naming a requested recipient exactly once. The
229
+ * list is compared as a set against the unique, lowercased recipients the
230
+ * request carried and returned in the order the proxy gave it — order is
231
+ * not part of the contract (the proxy lists allowlist rejections before the
232
+ * sends it attempted). `readEntry` decides the rest of the entry's shape and
233
+ * returns `undefined` when it does not hold; `shape` names that shape in the
234
+ * reason.
235
+ *
236
+ * Anything else is a schema-skewed or corrupt proxy and is refused as a
237
+ * whole rather than trimmed to the entries that parse: a dropped entry is a
238
+ * recipient whose outcome the caller can neither trust nor retry. Entries
239
+ * are named by index only — the body is attached as `cause`, and a recipient
240
+ * string from a corrupt response is not a value to interpolate into an
241
+ * error message.
242
+ */
243
+ function readRecipientList(raw, recipients, shape, readEntry) {
244
+ if (raw.length !== recipients.length) return {
245
+ ok: false,
246
+ reason: `expected ${recipients.length} deliveries, got ${raw.length}`
247
+ };
248
+ const requested = new Set(recipients);
249
+ const seen = /* @__PURE__ */ new Set();
250
+ const entries = [];
251
+ for (const [i, d] of raw.entries()) {
252
+ const entry = typeof d === "object" && d !== null ? d : null;
253
+ const recipient = entry?.recipient;
254
+ if (entry === null || typeof recipient !== "string") return {
255
+ ok: false,
256
+ reason: `entry ${i} is not ${shape}`
257
+ };
258
+ const value = readEntry(entry, recipient);
259
+ if (value === void 0) return {
260
+ ok: false,
261
+ reason: `entry ${i} is not ${shape}`
262
+ };
263
+ if (!requested.has(recipient)) return {
264
+ ok: false,
265
+ reason: `entry ${i} names a recipient that was not requested`
266
+ };
267
+ if (seen.has(recipient)) return {
268
+ ok: false,
269
+ reason: `entry ${i} repeats a recipient`
270
+ };
271
+ seen.add(recipient);
272
+ entries.push(value);
273
+ }
274
+ return {
275
+ ok: true,
276
+ entries
277
+ };
278
+ }
279
+ /**
280
+ * The `ids` list of an `ok: true` response. The proxy answers `ok: true`
281
+ * only once every requested recipient passed its allowlist and
282
+ * `SEND_EMAIL.send()` confirmed each one, so every entry is
283
+ * `{ recipient, messageId }` with `messageId` always a string (`''` when
284
+ * Cloudflare returned none; that is the proxy's explicit convention, and the
285
+ * framework's own Message-ID stands in for it). An `ok: true` with a
286
+ * delivery missing would tell the caller a send was confirmed when it never
287
+ * was, and a success carries no per-recipient failure to retry from.
288
+ */
289
+ function readDeliveryList(raw, recipients, fallbackId) {
290
+ return readRecipientList(raw, recipients, "{ recipient: string, messageId: string }", (entry, recipient) => typeof entry.messageId === "string" ? {
291
+ recipient,
292
+ messageId: entry.messageId || fallbackId
293
+ } : void 0);
294
+ }
295
+ /**
296
+ * The `deliveries` list of a mid-batch `ok: false` response. Each entry is
297
+ * either a confirmed send (`ok: true`, `messageId` a string with the same
298
+ * `''` convention as above) or a failure (`ok: false`, `error` with a string
299
+ * `message`; the code is coerced, unknown values become `UPSTREAM_ERROR`).
300
+ * Both are the proxy's own outcome for that recipient; `ok` is what the
301
+ * caller retries on, so an entry that does not state it is not an outcome
302
+ * at all — treating it as failed would retry a recipient that may have been
303
+ * delivered, and treating it as delivered would silently lose one.
304
+ */
305
+ function readFailureDeliveries(raw, recipients, fallbackId) {
306
+ return readRecipientList(raw, recipients, "{ recipient: string, ok: true, messageId: string } | { recipient: string, ok: false, error: { message: string } }", (entry, recipient) => {
307
+ if (entry.ok === true) return typeof entry.messageId === "string" ? {
308
+ recipient,
309
+ ok: true,
310
+ messageId: entry.messageId || fallbackId
311
+ } : void 0;
312
+ if (entry.ok === false) {
313
+ const error = entry.error;
314
+ return typeof error === "object" && error !== null && typeof error.message === "string" ? {
315
+ recipient,
316
+ ok: false,
317
+ error: makeError(coerceErrorCode(error.code), error.message)
318
+ } : void 0;
319
+ }
320
+ });
321
+ }
322
+ async function readResponseAsResult(res, recipients, fallbackId) {
323
+ try {
324
+ let body;
325
+ try {
326
+ body = await res.json();
327
+ } catch {
328
+ return err("UPSTREAM_ERROR", `email: proxy returned ${res.status} with non-JSON body`);
329
+ }
330
+ if (!isValidProxyResponse(body)) {
331
+ const refusal = readProxyRefusal(body);
332
+ if (!res.ok && refusal !== null) return err("UPSTREAM_ERROR", `email: proxy returned ${res.status}: ${refusal}`, body);
333
+ return err("UPSTREAM_ERROR", `email: proxy returned malformed response (status ${res.status})`, body);
334
+ }
335
+ const malformedList = (reason) => err("UPSTREAM_ERROR", `email: proxy returned a malformed delivery list (${reason})`, body);
336
+ if (body.ok === true) {
337
+ const list = readDeliveryList(body.ids, recipients, fallbackId);
338
+ return list.ok ? {
339
+ ok: true,
340
+ ids: list.entries
341
+ } : malformedList(list.reason);
342
+ }
343
+ const failure = body;
344
+ if ("error" in failure && failure.error) {
345
+ const e = failure.error;
346
+ return err(coerceErrorCode(e.code), typeof e.message === "string" ? e.message : "email: upstream send failed");
347
+ }
348
+ const list = readFailureDeliveries(failure.deliveries, recipients, fallbackId);
349
+ return list.ok ? {
350
+ ok: false,
351
+ deliveries: list.entries
352
+ } : malformedList(list.reason);
353
+ } catch (e) {
354
+ return err("UPSTREAM_ERROR", `email: failed to parse proxy response (status ${res.status}): ${e instanceof Error ? e.message : String(e)}`, e);
355
+ }
356
+ }
357
+ /**
358
+ * Resolve the loopback into the `void dev` inbox, or `undefined` outside dev.
359
+ *
360
+ * `DEV_INBOX_ENV_VAR` is injected only when `viteCommand === 'serve'` and it
361
+ * names the worker's assets binding. In dev, `@cloudflare/vite-plugin` binds
362
+ * that name to a miniflare service whose implementation is the Vite dev
363
+ * server's Node middleware stack, so a fetch through it lands on the inbox
364
+ * middleware in the dev-server process — the only place the buffer exists.
365
+ * In a production build neither the var nor that wiring is present.
366
+ */
367
+ function resolveDevInbox(env) {
368
+ const bindingName = env?.[DEV_INBOX_ENV_VAR];
369
+ if (typeof bindingName !== "string" || bindingName.length === 0) return;
370
+ const binding = env?.[bindingName];
371
+ if (typeof binding !== "object" || binding === null) return;
372
+ if (typeof binding.fetch !== "function") return;
373
+ const token = env?.[DEV_INBOX_TOKEN_ENV_VAR];
374
+ return {
375
+ fetcher: binding,
376
+ token: typeof token === "string" && token.length > 0 ? token : void 0
377
+ };
378
+ }
379
+ const DEV_INBOX_TIMEOUT_MS = 5e3;
380
+ /** Bound on the error text a failed capture echoes from the dev server. */
381
+ const DEV_INBOX_ERROR_EXCERPT_CHARS = 200;
382
+ const DEV_INBOX_ERROR_EXCERPT_TIMEOUT_MS = 1e3;
383
+ /**
384
+ * First line of a refusal, so a 401 names the header it wanted. Reads ONE
385
+ * chunk under its own deadline: the main 5s race has already settled by the
386
+ * time the status is known, and a body that never arrives must not turn a
387
+ * clean error into a hung `sendEmail`.
388
+ */
389
+ async function readErrorExcerpt(res) {
390
+ let timer;
391
+ try {
392
+ const reader = res.body?.getReader();
393
+ if (!reader) return "";
394
+ const first = await Promise.race([reader.read().then(({ value }) => value), new Promise((resolve) => {
395
+ timer = setTimeout(() => resolve(void 0), DEV_INBOX_ERROR_EXCERPT_TIMEOUT_MS);
396
+ })]);
397
+ reader.cancel().catch(() => {});
398
+ if (!first) return "";
399
+ return new TextDecoder().decode(first).trim().split("\n")[0].slice(0, DEV_INBOX_ERROR_EXCERPT_CHARS);
400
+ } catch {
401
+ return "";
402
+ } finally {
403
+ if (timer !== void 0) clearTimeout(timer);
404
+ }
405
+ }
406
+ async function postToDevInbox(inbox, captured) {
407
+ let timer;
408
+ try {
409
+ const attempt = Promise.resolve(inbox.fetcher.fetch(`http://localhost${DEV_INBOX_CAPTURE_URL}`, {
410
+ method: "POST",
411
+ headers: {
412
+ "content-type": "application/json",
413
+ ...inbox.token !== void 0 && { ["x-void-dev-trigger"]: inbox.token }
414
+ },
415
+ body: serializeCapturedMessage(captured)
416
+ })).then((res) => ({
417
+ kind: "response",
418
+ res
419
+ }), (cause) => ({
420
+ kind: "error",
421
+ cause
422
+ }));
423
+ const settled = await Promise.race([attempt, new Promise((resolve) => {
424
+ timer = setTimeout(() => resolve({ kind: "timeout" }), DEV_INBOX_TIMEOUT_MS);
425
+ })]);
426
+ if (settled.kind === "timeout") return {
427
+ ok: false,
428
+ reason: `no response within ${DEV_INBOX_TIMEOUT_MS}ms`
429
+ };
430
+ if (settled.kind === "error") {
431
+ const cause = settled.cause;
432
+ return {
433
+ ok: false,
434
+ reason: cause instanceof Error ? cause.message : String(cause)
435
+ };
436
+ }
437
+ const { res } = settled;
438
+ if (!res.ok) {
439
+ const excerpt = await readErrorExcerpt(res);
440
+ return {
441
+ ok: false,
442
+ reason: `dev server responded ${res.status}${excerpt ? `: ${excerpt}` : ""}`
443
+ };
444
+ }
445
+ if (res.headers.get("x-void-email-inbox") !== "captured") return {
446
+ ok: false,
447
+ reason: "response did not come from the dev inbox"
448
+ };
449
+ return { ok: true };
450
+ } catch (e) {
451
+ return {
452
+ ok: false,
453
+ reason: e instanceof Error ? e.message : String(e)
454
+ };
455
+ } finally {
456
+ if (timer !== void 0) clearTimeout(timer);
457
+ }
458
+ }
459
+ /**
460
+ * Shared result shape for both capture paths (in-process sink and dev inbox).
461
+ *
462
+ * `ids` is built from the same deduplicated, lowercased list the two
463
+ * production transports send to, so code written against a captured result
464
+ * sees exactly what a deploy returns: one entry per unique address, keyed the
465
+ * way `sendViaBinding` and the proxy report it. Mapping every `to`/`cc`/`bcc`
466
+ * occurrence instead handed a test or `void dev` handler one success per
467
+ * occurrence in its original case — deliveries that never happen once
468
+ * deployed. The captured message itself keeps the original fields; the
469
+ * inbox displays what was asked for, the result reports what would be sent.
470
+ */
471
+ function capturedResult(normalized, captureId) {
472
+ const recipients = uniqueRecipients(normalized);
473
+ if (recipients.length === 0) return err("INVALID_TO", "email: 'to' must include at least one recipient.");
474
+ return {
475
+ ok: true,
476
+ ids: recipients.map((recipient) => ({
477
+ recipient,
478
+ messageId: captureId
479
+ }))
480
+ };
481
+ }
482
+ /**
483
+ * Send an email via the Void platform proxy.
484
+ *
485
+ * During `void dev` the message is captured by the local inbox
486
+ * (`/__void/inbox`) and never reaches the proxy; an in-process sink
487
+ * (`void/email/testing`) takes precedence over it. Pass `sendInDev: true` to
488
+ * override for a single call.
489
+ */
490
+ async function sendEmail(opts) {
491
+ const resolvedOpts = resolveDefaultFrom(opts);
492
+ if (resolvedOpts.from === void 0) return err("INVALID_FROM", "email: 'from' is required. Set it explicitly or deploy via Void so the platform-injected __VOID_PROJECT_SLUG and __VOID_EMAIL_DOMAIN can default it to <slug>+noreply@<domain>.");
493
+ const optsWithFrom = resolvedOpts;
494
+ let normalized;
495
+ try {
496
+ normalized = await normalizeEmail(optsWithFrom);
497
+ } catch (e) {
498
+ if (e instanceof MimeError) return err(e.code, e.message, e);
499
+ return err("MIME_ERROR", e instanceof Error ? e.message : String(e), e);
500
+ }
501
+ let raw;
502
+ let messageId;
503
+ try {
504
+ const built = buildMime(normalized);
505
+ raw = built.raw;
506
+ messageId = built.messageId;
507
+ } catch (e) {
508
+ if (e instanceof MimeError) return err(e.code, e.message, e);
509
+ return err("MIME_ERROR", e instanceof Error ? e.message : String(e), e);
510
+ }
511
+ const rawEnv = tryGetRawRuntimeEnv();
512
+ if (!opts.sendInDev && hasActiveSink()) {
513
+ const captured = captureMessage(normalized, raw, messageId);
514
+ dispatchToSinks(captured);
515
+ return capturedResult(normalized, captured.id);
516
+ }
517
+ const devInbox = opts.sendInDev ? void 0 : resolveDevInbox(rawEnv);
518
+ if (devInbox) {
519
+ const captured = captureMessage(normalized, raw, messageId);
520
+ const delivered = await postToDevInbox(devInbox, captured);
521
+ if (delivered.ok) return capturedResult(normalized, captured.id);
522
+ const message = `email: the void dev inbox at ${DEV_INBOX_CAPTURE_URL} is unreachable (${delivered.reason}), so nothing was captured and nothing was sent.`;
523
+ console.warn(`[void/email] ${message}`);
524
+ return err("UPSTREAM_ERROR", message);
525
+ }
526
+ const recipients = uniqueRecipients(normalized);
527
+ if (recipients.length === 0) return err("INVALID_TO", "email: 'to' must include at least one recipient.");
528
+ const sendBinding = resolveSendEmailBinding(rawEnv);
529
+ if (sendBinding) return sendViaBinding(sendBinding, normalized.from.email, recipients, raw, messageId);
530
+ const env = rawEnv;
531
+ const proxy = env?.__VOID_PROXY;
532
+ const projectId = env?.__PROJECT_ID;
533
+ const proxyToken = env?.__VOID_PROXY_TOKEN;
534
+ if (!proxy || !projectId || !proxyToken) return err("BINDING_MISSING", "email: neither SEND_EMAIL nor __VOID_PROXY is available, so nothing was sent. Deploy via Void to bind the platform proxy, or set `email.from` in void.json so `void deploy --platform cloudflare` provisions the SEND_EMAIL binding. Under `void dev` messages are captured by the local inbox at /__void/inbox instead — reaching this error there means that path was bypassed (`sendInDev: true`, which does not deliver: `void dev` binds no send transport at all, so there is nothing to fall through to) or unavailable (the worker has no assets binding to reach the dev server through).");
535
+ const requestId = newRequestId();
536
+ const fromDomain = normalized.from.email.split("@")[1] ?? "";
537
+ const body = {
538
+ projectId,
539
+ aiToken: proxyToken,
540
+ proxyToken,
541
+ from: normalized.from.email,
542
+ recipients,
543
+ mimeBase64: bytesToBase64(raw),
544
+ byteSize: raw.byteLength,
545
+ requestId,
546
+ fromDomain
547
+ };
548
+ let res;
549
+ try {
550
+ res = await proxy.fetch("https://email-proxy/email/send", {
551
+ method: "POST",
552
+ headers: { "content-type": "application/json" },
553
+ body: JSON.stringify(body)
554
+ });
555
+ } catch (e) {
556
+ return err("UPSTREAM_ERROR", `email: proxy unreachable: ${e instanceof Error ? e.message : String(e)}`, e);
557
+ }
558
+ return readResponseAsResult(res, recipients, messageId);
559
+ }
560
+ /**
561
+ * Build a normalized email + raw MIME for advanced callers who want to feed
562
+ * the message into a custom transport. Throws on invalid input.
563
+ */
564
+ async function createEmail(opts) {
565
+ if (opts.from === void 0) throw new MimeError("INVALID_FROM", "createEmail: 'from' is required (this entrypoint does not apply __VOID_PROJECT_SLUG defaulting).");
566
+ const email = await normalizeEmail(opts);
567
+ return {
568
+ email,
569
+ ...buildMime(email)
570
+ };
571
+ }
572
+ //#endregion
573
+ export { MimeError, ParseEmailError, createEmail, createMessageProxy, defineEmail, enactEmailActions, isForwardableEmailMessage, parseEmail, replyEmail, sendEmail };
@@ -1,2 +1,2 @@
1
- import { a as getSecretOverride, c as oneOf, i as email, l as string, n as SECRET_OVERRIDE_SYMBOL, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-z4stu8uc.mjs";
2
- export { EnvSchema, SECRET_OVERRIDE_SYMBOL, boolean, email, getSecretOverride, json, number, oneOf, string, url };
1
+ import { a as number, c as url, i as json, n as boolean, o as oneOf, r as email, s as string, t as EnvSchema } from "../env-helpers-CyKtOBpj.mjs";
2
+ export { EnvSchema, boolean, email, json, number, oneOf, string, url };
@@ -1,22 +1,6 @@
1
1
  //#region src/runtime/env-helpers.ts
2
- /**
3
- * Marker property read by the mask helpers. Present only on built-in
4
- * schema builders; third-party Standard Schema validators fall back to the
5
- * name/value heuristic (documented in `docs/guide/env-vars.md`).
6
- */
7
- const SECRET_OVERRIDE_SYMBOL = Symbol.for("void.env.secretOverride");
8
- /**
9
- * Pull the explicit `.secret()` / `.public()` flag off a Standard Schema
10
- * validator, if it was authored through our built-in helpers. Returns
11
- * `undefined` for third-party validators (valibot, zod, arktype, …) —
12
- * they are redacted purely via the heuristic.
13
- */
14
- function getSecretOverride(validator) {
15
- if (!validator || typeof validator !== "object") return;
16
- return validator[SECRET_OVERRIDE_SYMBOL];
17
- }
18
2
  function build(parse, state) {
19
- const schema = {
3
+ return {
20
4
  "~standard": {
21
5
  version: 1,
22
6
  vendor: "void",
@@ -34,41 +18,20 @@ function build(parse, state) {
34
18
  optional() {
35
19
  return build(parse, {
36
20
  optional: true,
37
- defaultValue: state.defaultValue,
38
- secretOverride: state.secretOverride
21
+ defaultValue: state.defaultValue
39
22
  });
40
23
  },
41
24
  default(value) {
42
25
  return build(parse, {
43
26
  optional: false,
44
- defaultValue: value,
45
- secretOverride: state.secretOverride
46
- });
47
- },
48
- secret() {
49
- return build(parse, {
50
- ...state,
51
- secretOverride: "secret"
52
- });
53
- },
54
- public() {
55
- return build(parse, {
56
- ...state,
57
- secretOverride: "public"
27
+ defaultValue: value
58
28
  });
59
29
  }
60
30
  };
61
- Object.defineProperty(schema, SECRET_OVERRIDE_SYMBOL, {
62
- value: state.secretOverride,
63
- enumerable: false,
64
- configurable: true
65
- });
66
- return schema;
67
31
  }
68
32
  const empty = () => ({
69
33
  optional: false,
70
- defaultValue: void 0,
71
- secretOverride: void 0
34
+ defaultValue: void 0
72
35
  });
73
36
  /** Required string env value. */
74
37
  function string() {
@@ -170,4 +133,4 @@ function json() {
170
133
  }, empty());
171
134
  }
172
135
  //#endregion
173
- export { SECRET_OVERRIDE_SYMBOL, boolean, email, getSecretOverride, json, number, oneOf, string, url };
136
+ export { boolean, email, json, number, oneOf, string, url };
@@ -1,15 +1,14 @@
1
- import { c as oneOf, i as email, l as string, o as json, r as boolean, s as number, t as EnvSchema, u as url } from "../env-helpers-z4stu8uc.mjs";
2
-
1
+ import { a as number, c as url, i as json, n as boolean, o as oneOf, r as email, s as string, t as EnvSchema } from "../env-helpers-CyKtOBpj.mjs";
3
2
  //#region src/runtime/env-public-client.d.ts
4
- declare const env: Record<string, unknown>;
3
+ export declare const env: Record<string, unknown>;
5
4
  /**
6
- * In client builds `defineEnv` is a no-op identity function — schema
7
- * registration only happens server-side. We still return the `env` proxy so
8
- * t3-style `export const env = defineEnv({...})` keeps working in shared
9
- * modules.
10
- */
11
- declare function defineEnv<S>(_schema: S): typeof env;
12
- declare class EnvValidationError extends Error {
5
+ * In client builds `defineEnv` is a no-op identity function — schema
6
+ * registration only happens server-side. We still return the `env` proxy so
7
+ * t3-style `export const env = defineEnv({...})` keeps working in shared
8
+ * modules.
9
+ */
10
+ export declare function defineEnv<S>(_schema: S): typeof env;
11
+ export declare class EnvValidationError extends Error {
13
12
  readonly key: string;
14
13
  readonly issues: Array<{
15
14
  message: string;
@@ -19,4 +18,4 @@ declare class EnvValidationError extends Error {
19
18
  }>);
20
19
  }
21
20
  //#endregion
22
- export { type EnvSchema, EnvValidationError, boolean, defineEnv, email, env, json, number, oneOf, string, url };
21
+ export { type EnvSchema, boolean, email, json, number, oneOf, string, url };
@@ -6,7 +6,7 @@ function getClientEnv() {
6
6
  function readClientKey(key) {
7
7
  const meta = getClientEnv();
8
8
  if (meta && key in meta) return meta[key];
9
- throw new Error(`env: Key '${key}' is not exposed to the client. Vite only injects keys matching the configured envPrefix (default: VITE_*). Either rename the key in env.ts to match envPrefix, or move this access to a server module.`);
9
+ throw new Error(`env: Key '${key}' is not exposed to the client. Void only exposes VITE_* schema keys to browser code. Either rename the key in env.ts with that prefix, or move this access to a server module.`);
10
10
  }
11
11
  const env = new Proxy({}, {
12
12
  get(_target, key) {