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
@@ -0,0 +1,363 @@
1
+ import { Email } from "postal-mime";
2
+ //#region src/runtime/email/types.d.ts
3
+ /**
4
+ * Public types for the void/email module.
5
+ *
6
+ * The runtime entrypoint (../email.ts) re-exports these so that consumers
7
+ * can import them via `import type { SendEmailOptions } from "void/email"`.
8
+ */
9
+ type Address = string | {
10
+ email: string;
11
+ name?: string;
12
+ };
13
+ interface Attachment {
14
+ filename: string;
15
+ content: string | Uint8Array | ArrayBuffer | Blob;
16
+ contentType?: string;
17
+ contentId?: string;
18
+ disposition?: "attachment" | "inline";
19
+ }
20
+ interface SendEmailOptions {
21
+ /**
22
+ * Sender envelope address. Optional — when omitted, the framework
23
+ * substitutes `<__VOID_PROJECT_SLUG>+noreply@<__VOID_EMAIL_DOMAIN>`
24
+ * from the two platform-injected bindings (the project slug and the
25
+ * mail domain configured for this environment). Outside a deployed
26
+ * worker, or whenever either binding is missing, `sendEmail` returns
27
+ * `INVALID_FROM` — it never falls back to a baked-in domain.
28
+ */
29
+ from?: Address;
30
+ to: Address | Array<Address>;
31
+ subject: string;
32
+ text?: string;
33
+ html?: string;
34
+ replyTo?: Address;
35
+ cc?: Address | Array<Address>;
36
+ bcc?: Address | Array<Address>;
37
+ headers?: Record<string, string>;
38
+ attachments?: Array<Attachment>;
39
+ /**
40
+ * Per-call escape hatch for local development. When true, bypasses the
41
+ * `void dev` in-memory inbox for this one send.
42
+ *
43
+ * It does not deliver. `void dev` binds no send transport at all: the
44
+ * platform's `__VOID_PROXY` service binding is added only on a deployed
45
+ * worker, and the own-account `SEND_EMAIL` binding is stripped under
46
+ * `serve`. With the inbox skipped there is nothing to fall through to,
47
+ * so the call returns `BINDING_MISSING`. To verify real delivery, deploy
48
+ * and send from the deployed worker.
49
+ *
50
+ * Has no effect outside `void dev` (production always sends; the dev
51
+ * inbox is registered only when `void dev` is running).
52
+ */
53
+ sendInDev?: boolean;
54
+ }
55
+ type SendEmailErrorCode = "BINDING_MISSING" | "INVALID_FROM" | "INVALID_TO" | "UNVERIFIED_DESTINATION" | "MIME_ERROR" | "QUOTA_EXCEEDED" | "UPSTREAM_ERROR";
56
+ interface SendEmailError {
57
+ code: SendEmailErrorCode;
58
+ message: string;
59
+ cause?: unknown;
60
+ }
61
+ /**
62
+ * One successful CF envelope send. The `to`/`cc`/`bcc` fan-out produces one
63
+ * of these per recipient, since the CF `EmailMessage` envelope is
64
+ * single-recipient.
65
+ */
66
+ interface SendEmailDelivery {
67
+ recipient: string;
68
+ messageId: string;
69
+ }
70
+ /**
71
+ * Per-recipient outcome for a multi-recipient send. `ok: true` carries the
72
+ * CF-issued messageId; `ok: false` carries the error for that specific
73
+ * recipient (e.g. one address is unverified while others succeed).
74
+ */
75
+ type SendEmailRecipientResult = {
76
+ recipient: string;
77
+ ok: true;
78
+ messageId: string;
79
+ } | {
80
+ recipient: string;
81
+ ok: false;
82
+ error: SendEmailError;
83
+ };
84
+ /**
85
+ * Result of `sendEmail`.
86
+ *
87
+ * Three discriminated cases — narrow with `result.ok`, then check whether
88
+ * `'error' in result` (pre-flight failure, no sends attempted) or
89
+ * `'deliveries' in result` (per-recipient failure, some may have succeeded):
90
+ *
91
+ * - `{ ok: true, ids }` — every envelope succeeded.
92
+ * - `{ ok: false, error }` — pre-flight failure (validation, MIME,
93
+ * missing binding); no envelopes attempted.
94
+ * - `{ ok: false, deliveries }` — sends were attempted; at least one failed.
95
+ * `deliveries` carries the per-recipient
96
+ * outcome so callers can safely retry only
97
+ * the failed ones. There is no aggregate
98
+ * top-level error — distinct recipients can
99
+ * fail with distinct errors, and picking one
100
+ * would be arbitrary.
101
+ */
102
+ type SendEmailResult = {
103
+ ok: true;
104
+ ids: Array<SendEmailDelivery>;
105
+ } | {
106
+ ok: false;
107
+ error: SendEmailError;
108
+ } | {
109
+ ok: false;
110
+ deliveries: Array<SendEmailRecipientResult>;
111
+ };
112
+ /**
113
+ * Normalized representation produced by validation, consumed by both the
114
+ * MIME builder and the dev inbox.
115
+ */
116
+ interface NormalizedEmail {
117
+ from: {
118
+ email: string;
119
+ name?: string;
120
+ };
121
+ to: Array<{
122
+ email: string;
123
+ name?: string;
124
+ }>;
125
+ cc: Array<{
126
+ email: string;
127
+ name?: string;
128
+ }>;
129
+ bcc: Array<{
130
+ email: string;
131
+ name?: string;
132
+ }>;
133
+ replyTo?: {
134
+ email: string;
135
+ name?: string;
136
+ };
137
+ subject: string;
138
+ text?: string;
139
+ html?: string;
140
+ headers: Record<string, string>;
141
+ attachments: Array<NormalizedAttachment>;
142
+ /**
143
+ * Internal-only threading headers, set by `replyEmail`/`buildReplyMessage`.
144
+ * The MIME builder emits these as proper `In-Reply-To` / `References`
145
+ * top-level headers. User-supplied `headers` with these names are
146
+ * always dropped (they're in `RESERVED_HEADERS`); this field is the
147
+ * supported channel for the trusted reply path.
148
+ */
149
+ threading?: {
150
+ inReplyTo?: string;
151
+ references?: string;
152
+ };
153
+ }
154
+ interface NormalizedAttachment {
155
+ filename: string;
156
+ contentType: string;
157
+ bytes: Uint8Array;
158
+ contentId?: string;
159
+ disposition: "attachment" | "inline";
160
+ }
161
+ //#endregion
162
+ //#region src/runtime/email/inbound.d.ts
163
+ interface EmailHandlerInfo {
164
+ /**
165
+ * Captured params from dynamic / tagged route segments. For example, a
166
+ * handler at `email/support+[ticket].ts` invoked for `support+abc-123@…`
167
+ * receives `{ ticket: "abc-123" }`. Empty `{}` for static handlers and
168
+ * `_default`.
169
+ */
170
+ params: Record<string, string>;
171
+ }
172
+ type EmailHandler = (message: ForwardableEmailMessage, env: unknown, ctx: ExecutionContext, info?: EmailHandlerInfo) => void | Promise<void>;
173
+ /**
174
+ * Identity helper that types the inbound email handler. Use as the default
175
+ * export of `email/<address>.ts` or `email/_default.ts`.
176
+ */
177
+ declare function defineEmail(handler: EmailHandler): EmailHandler;
178
+ type ParsedEmail = Email;
179
+ type ParseEmailErrorCode = "INBOUND_TOO_LARGE" | "PARSE_FAILED";
180
+ /**
181
+ * Typed error thrown by `parseEmail`. Lets handler authors distinguish
182
+ * "too big" from "malformed body" without string-matching error messages.
183
+ */
184
+ declare class ParseEmailError extends Error {
185
+ readonly code: ParseEmailErrorCode;
186
+ constructor(code: ParseEmailErrorCode, message: string, options?: {
187
+ cause?: unknown;
188
+ });
189
+ }
190
+ /**
191
+ * Parse a `ForwardableEmailMessage` into structured fields. postal-mime is
192
+ * loaded lazily so workers that never call this don't bundle it.
193
+ *
194
+ * For proxy messages (built via `createMessageProxy`) the raw bytes are
195
+ * cached on first read so subsequent `parseEmail`/`message.raw` accesses
196
+ * still work. For real CF `ForwardableEmailMessage`s the raw stream is
197
+ * one-shot.
198
+ */
199
+ declare function parseEmail(message: ForwardableEmailMessage): Promise<ParsedEmail>;
200
+ /**
201
+ * Serialized inbound email message — sent from the platform router to the
202
+ * user worker over RPC. Every field is in workerd's RPC `BaseType`
203
+ * allowlist (string, plain object, ReadableStream<Uint8Array>, number).
204
+ */
205
+ interface EmailEnvelope {
206
+ from: string;
207
+ to: string;
208
+ /** Headers serialized as a plain object so they cross RPC. */
209
+ headers: Record<string, string>;
210
+ /**
211
+ * Raw RFC 5322 bytes. Pre-buffered by the router so it's replayable on the
212
+ * receiving side (`parseEmail` consumes the stream once; if the handler
213
+ * also calls `parseEmail` directly, the platform tee'd a fresh stream per
214
+ * delivery).
215
+ */
216
+ raw: ReadableStream<Uint8Array> | Uint8Array;
217
+ rawSize: number;
218
+ /**
219
+ * The registered custom domain this message arrived on, set only by the
220
+ * platform's relay lane (`POST /email/relay` — design doc 0078, "Custom
221
+ * domains on Cloudflare"). Undefined on the platform mail zone. A relayed
222
+ * recipient carries no `<slug>+` prefix, so the generated dispatcher runs
223
+ * in no-prefix mode for it (Mode B item 4) and `replyEmail` defaults
224
+ * `from` to the address that received it, on this domain.
225
+ */
226
+ viaDomain?: string;
227
+ }
228
+ /**
229
+ * What the user handler decided to do with a message. Returned from the
230
+ * worker's `email(envelope)` RPC method as an array (handlers may chain
231
+ * multiple actions, e.g. forward then reply); the router enacts each on the
232
+ * real `ForwardableEmailMessage` in order.
233
+ */
234
+ type EmailAction = {
235
+ type: "reject";
236
+ reason: string;
237
+ } | {
238
+ type: "forward";
239
+ to: string;
240
+ headers?: Record<string, string>;
241
+ } | {
242
+ type: "reply";
243
+ from: string;
244
+ to: string;
245
+ raw: Uint8Array;
246
+ };
247
+ interface MessageProxy {
248
+ message: ForwardableEmailMessage;
249
+ getActions(): Array<EmailAction>;
250
+ }
251
+ interface CreateMessageProxyOptions {
252
+ /**
253
+ * Project slug stripped from the `<slug>+<tag>` recipient by the
254
+ * dispatcher. When set, `message.to` is rewritten to the bare
255
+ * `<tag>@<domain>` form so user handlers see clean addresses (the slug
256
+ * is platform-internal). The original `<slug>+<tag>@<domain>` is
257
+ * preserved on a non-enumerable `__voidPlatformTo` property for
258
+ * diagnostics.
259
+ */
260
+ slug?: string;
261
+ }
262
+ /**
263
+ * Build a proxy `ForwardableEmailMessage` from an envelope. The proxy's
264
+ * `setReject` / `forward` / `reply` methods don't dispatch directly — they
265
+ * record `EmailAction` entries that the router (which holds the real
266
+ * message) enacts after the handler returns.
267
+ *
268
+ * `reply()` accepts a duck-typed `{ from, to, raw }` with `raw` a
269
+ * `Uint8Array` or `ReadableStream` — what `replyEmail()` passes. It does NOT
270
+ * accept a native `EmailMessage` from `cloudflare:email`: that class exposes
271
+ * only `from` and `to` (workers-types declares nothing else, and the body
272
+ * has no public accessor), so its bytes cannot be recorded here, and nothing
273
+ * could carry them over RPC to the platform router. The reply MIME bytes are
274
+ * buffered before being recorded so the action is fully self-contained.
275
+ *
276
+ * When `opts.slug` is provided, `message.to` is rewritten to remove the
277
+ * platform-injected `<slug>+` prefix so handlers see `<tag>@<domain>`
278
+ * instead of `<slug>+<tag>@<domain>`. The original wire-form recipient is
279
+ * preserved on a non-enumerable `__voidPlatformTo` property.
280
+ */
281
+ declare function createMessageProxy(envelope: EmailEnvelope, opts?: CreateMessageProxyOptions): MessageProxy;
282
+ interface ReplyEmailOptions {
283
+ /**
284
+ * On the managed platform (a `__VOID_PROJECT_SLUG` is injected) defaults
285
+ * to `<__VOID_PROJECT_SLUG>+noreply@<__VOID_EMAIL_DOMAIN>`, and THROWS
286
+ * when the domain binding is absent — a reply sender is never guessed.
287
+ *
288
+ * There, an override must stay on your own slug. The platform accepts a
289
+ * reply sender whose local-part before the first `+` equals the slug the
290
+ * message was delivered to; anything else is dropped silently. In
291
+ * particular `message.to` is the STRIPPED address (`<tag>@<domain>`), so
292
+ * passing it here is exactly the shape the platform rejects.
293
+ *
294
+ * Without a slug (your own Cloudflare account, local harnesses) the
295
+ * default is the address the message was delivered to, `message.to` —
296
+ * a real address on your own zone.
297
+ */
298
+ from?: Address;
299
+ /**
300
+ * Defaults to the original `message.from` envelope address. A reply is a
301
+ * single-recipient message — for fan-out, build a fresh `sendEmail()` call.
302
+ */
303
+ to?: Address;
304
+ /**
305
+ * Defaults to `Re: <original-subject>` (no double-prefix). The original is
306
+ * remote-sender controlled, so the default is best-effort: control
307
+ * characters become a space, and a subject over 4096 characters, or an
308
+ * ASCII one too long to fold, falls back to a bare `Re:`. Pass `subject`
309
+ * to control it exactly.
310
+ */
311
+ subject?: string;
312
+ text?: string;
313
+ html?: string;
314
+ /**
315
+ * Custom headers; threading headers (`In-Reply-To`, `References`) are
316
+ * added automatically, best-effort: an inbound id too long for a header
317
+ * line is dropped, and a `References` chain over 8 KiB keeps only its
318
+ * newest ids.
319
+ */
320
+ headers?: Record<string, string>;
321
+ attachments?: Array<Attachment>;
322
+ }
323
+ /**
324
+ * Send a threading-aware reply to an inbound message. Builds the reply MIME
325
+ * (correct `In-Reply-To` / `References` / `Subject: Re: …`) and records a
326
+ * reply intent on the message proxy. The platform router enacts the reply
327
+ * via the real `ForwardableEmailMessage.reply()` once the handler returns.
328
+ *
329
+ * The threading headers are best-effort, since the inbound values they are
330
+ * built from are remote-sender controlled: an id no header line can carry
331
+ * is dropped, and a `References` chain over 8 KiB keeps only its newest
332
+ * ids. The reply is sent either way.
333
+ */
334
+ declare function replyEmail(message: ForwardableEmailMessage, opts: ReplyEmailOptions): Promise<void>;
335
+ /**
336
+ * Whether `value` is a real `ForwardableEmailMessage` — one Cloudflare
337
+ * delivered to this worker's `email()` directly — rather than an
338
+ * `EmailEnvelope` from the platform router. Functions do not survive RPC,
339
+ * so their presence is the discriminator.
340
+ */
341
+ declare function isForwardableEmailMessage(value: unknown): value is ForwardableEmailMessage;
342
+ /**
343
+ * Replay recorded `EmailAction`s on a real `ForwardableEmailMessage`, in
344
+ * order. The proxy already made `setReject` terminal (earlier forward/reply
345
+ * entries are purged, later ones dropped), so a reject is never followed by
346
+ * anything. `reply` needs a genuine `EmailMessage` — Cloudflare rejects a
347
+ * duck-typed object — so `cloudflare:email` is loaded here, and only when
348
+ * a reply was recorded.
349
+ *
350
+ * The `new Headers()` below is the one step this loop constructs from
351
+ * handler input, and it cannot fail on a recorded action: the proxy's
352
+ * `forward()` already ran the record through that constructor, so a bad
353
+ * record failed inside the handler, before any replay. (`EmailMessage`
354
+ * construction neither validates nor reads its stream — measured under
355
+ * workerd.) A reject's reason reaches the native `setReject()` as the proxy
356
+ * recorded it — already sliced and stripped the way the platform router
357
+ * would (`normalizeRejectReason`), so the SMTP reply is the same in both
358
+ * deployments. What Cloudflare itself refuses at `forward()` / `reply()`
359
+ * still throws out of the loop, as any native call would.
360
+ */
361
+ declare function enactEmailActions(message: ForwardableEmailMessage, actions: ReadonlyArray<EmailAction>): Promise<void>;
362
+ //#endregion
363
+ export { SendEmailRecipientResult as C, SendEmailOptions as S, Attachment as _, MessageProxy as a, SendEmailError as b, ParsedEmail as c, defineEmail as d, enactEmailActions as f, Address as g, replyEmail as h, EmailHandlerInfo as i, ReplyEmailOptions as l, parseEmail as m, EmailEnvelope as n, ParseEmailError as o, isForwardableEmailMessage as p, EmailHandler as r, ParseEmailErrorCode as s, EmailAction as t, createMessageProxy as u, NormalizedEmail as v, SendEmailResult as w, SendEmailErrorCode as x, SendEmailDelivery as y };
package/dist/index.d.mts CHANGED
@@ -1,44 +1,71 @@
1
- import { n as HeadDescriptor } from "./head-nmvOgFjd.mjs";
2
- import { r as AuthUser } from "./auth-qgMlYp7Z.mjs";
3
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-Cjh8uM3Y.mjs";
1
+ import { n as HeadDescriptor } from "./head-Do8P4puT.mjs";
2
+ import { r as AuthUser } from "./auth-DkcFflXV.mjs";
3
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-D1hLsObx.mjs";
4
4
  import { QueueMap } from "./runtime/queues.mjs";
5
5
  import { PluginConfig } from "@cloudflare/vite-plugin";
6
6
  import { Plugin } from "vite";
7
-
7
+ //#region src/router/parse-filename.d.ts
8
+ type RouteEnvironment = "dev" | "prod";
9
+ //#endregion
8
10
  //#region src/index.d.ts
9
11
  /**
10
- * Decide whether to inject a Workers AI binding into the built wrangler config.
11
- *
12
- * Build-only: dev/miniflare has no local Workers AI, so serve must never bind
13
- * `env.AI` (dev uses the P2 `__VOID_TOKEN` proxy path instead).
14
- *
15
- * `!resolvedAi` is load-bearing: mergeBindings' return is defu-merged over the
16
- * resolved root-wrangler config and wins, so skipping when the user already
17
- * declared an `ai` binding avoids clobbering theirs. `!resultAi` is harmless
18
- * defense-in-depth (nothing else in mergeBindings sets `result.ai`).
19
- */
20
- declare function shouldBindWorkersAi(command: string, needsAI: boolean, resolvedAi: unknown, resultAi: unknown): boolean;
12
+ * Decide whether to inject a Workers AI binding into the built wrangler config.
13
+ *
14
+ * Builds use the production binding. During dev, a project explicitly saved
15
+ * with the direct Cloudflare destination uses Cloudflare's remote binding;
16
+ * managed and unsaved projects keep using the Void HTTPS proxy.
17
+ *
18
+ * `!resolvedAi` is load-bearing: mergeBindings' return is defu-merged over the
19
+ * resolved root-wrangler config and wins, so skipping when the user already
20
+ * declared an `ai` binding avoids clobbering theirs. `!resultAi` is harmless
21
+ * defense-in-depth (nothing else in mergeBindings sets `result.ai`).
22
+ */
23
+ export declare function shouldBindWorkersAi(command: string, needsAI: boolean, resolvedAi: unknown, resultAi: unknown, directCloudflareDev?: boolean): boolean;
24
+ /**
25
+ * Decide whether to inject the `void dev` email-inbox loopback var.
26
+ *
27
+ * The dev inbox buffer lives in the Vite dev server's Node process;
28
+ * `sendEmail` runs in workerd and reaches it by fetching the inbox capture
29
+ * endpoint through the worker's assets binding, which
30
+ * `@cloudflare/vite-plugin` wires straight into the dev server's middleware
31
+ * stack. The var carries that binding's NAME (`ASSETS` for a Void app, or
32
+ * whatever a Class A framework's own wrangler config declares) and its
33
+ * presence is what arms the dev path at runtime — so it must never reach a
34
+ * production build's `wrangler.json`, exactly like the `__VOID_TOKEN`
35
+ * credential gate.
36
+ *
37
+ * Gated on `routeEnvironment`, not on `command`: `vite preview` also reports
38
+ * `command: 'serve'`, but it runs the BUILT worker whose assets binding is a
39
+ * real asset directory rather than a dev-server loopback. `routeEnvironment`
40
+ * is the existing `command === 'serve' && !isPreview` distinction.
41
+ *
42
+ * Without an assets binding there is no loopback, so injecting the var would
43
+ * only arm a path that must then fail; gate on it instead.
44
+ */
45
+ export declare function shouldInjectEmailDevInboxVar(routeEnvironment: RouteEnvironment, needsEmail: boolean | undefined, assetsBinding: string | undefined): boolean;
46
+ /** Resolve the runtime Workers AI binding, preserving a root Wrangler declaration. */
47
+ export declare function resolveWorkersAiBindingName(resolvedAi: unknown, configuredName?: string): string;
21
48
  /**
22
- * Void plugin — the main entry point.
23
- *
24
- * Composes:
25
- * 1. Routing plugin (file-based routing from routes/ and middleware/)
26
- * 2. Migration plugin (auto-apply .sql migrations on dev startup)
27
- * 3. @cloudflare/vite-plugin (workerd runtime, HMR, builds)
28
- *
29
- * Binding inference runs synchronously here so results are available
30
- * before the Cloudflare plugin initializes.
31
- *
32
- * If the user has a `wrangler.jsonc` / `wrangler.json` in their project root,
33
- * the Cloudflare plugin reads it and provides the resolved config to our
34
- * config function. Bindings already defined there (with real IDs for
35
- * production deployment) are preserved — we only add inferred bindings
36
- * that are missing. This allows `vite build && wrangler deploy` to work
37
- * for deploying directly to Cloudflare without the Void platform.
38
- */
39
- declare function voidPlugin(options?: {
49
+ * Void plugin — the main entry point.
50
+ *
51
+ * Composes:
52
+ * 1. Routing plugin (file-based routing from routes/ and middleware/)
53
+ * 2. Migration plugin (auto-apply .sql migrations on dev startup)
54
+ * 3. @cloudflare/vite-plugin (workerd runtime, HMR, builds)
55
+ *
56
+ * Binding inference runs synchronously here so results are available
57
+ * before the Cloudflare plugin initializes.
58
+ *
59
+ * If the user has a `wrangler.jsonc` / `wrangler.json` in their project root,
60
+ * the Cloudflare plugin reads it and provides the resolved config to our
61
+ * config function. Bindings already defined there (with real IDs for
62
+ * production deployment) are preserved — we only add inferred bindings
63
+ * that are missing. This allows `vite build && wrangler deploy` to work
64
+ * for deploying directly to Cloudflare without the Void platform.
65
+ */
66
+ export declare function voidPlugin(options?: {
40
67
  persistTo?: string;
41
68
  auxiliaryWorkers?: PluginConfig["auxiliaryWorkers"];
42
69
  }): Array<Plugin>;
43
70
  //#endregion
44
- export { type AuthUser, type BasicAuthOptions, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled, shouldBindWorkersAi, voidPlugin };
71
+ export { type AuthUser, type BasicAuthOptions, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };