void 0.1.6 → 0.7.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 (333) hide show
  1. package/AGENT_PROMPT.md +15 -0
  2. package/README.md +62 -123
  3. package/dist/auth-BdsJ0Aff.d.mts +43 -0
  4. package/dist/auth-cmd-Dx8oPKZC.mjs +43 -0
  5. package/dist/auth-migrations-BAtAck2g.mjs +117 -0
  6. package/dist/better-auth-shared-C9_GHSkR.d.mts +71 -0
  7. package/dist/better-auth-shared-CdYmQGry.mjs +163 -0
  8. package/dist/cache-W82I8ihI.mjs +47 -0
  9. package/dist/cancel-deploy-BOBTqqh0.mjs +59 -0
  10. package/dist/cf-access-Dee5cXxL.mjs +22 -0
  11. package/dist/chunk-DJd-R1mw.mjs +34 -0
  12. package/dist/cli/cli.d.mts +1 -0
  13. package/dist/cli/cli.mjs +1807 -0
  14. package/dist/client-snXOjrp1.mjs +565 -0
  15. package/dist/collect-CjeZgz5D.mjs +55 -0
  16. package/dist/config-BIa9HwVX.mjs +573 -0
  17. package/dist/config-BzM9Dy7T.mjs +37 -0
  18. package/dist/config-CvHtTM0q.mjs +30 -0
  19. package/dist/create-project-BIA15W7z.mjs +90 -0
  20. package/dist/db-DsRoMcfN.mjs +895 -0
  21. package/dist/defer-DcxEsVH1.mjs +49 -0
  22. package/dist/delete-DAP6yDc7.mjs +64 -0
  23. package/dist/deploy-BPKblFx6.mjs +2424 -0
  24. package/dist/discover-B7FkXBLB.mjs +40 -0
  25. package/dist/dist-DUyXJLkq.mjs +2667 -0
  26. package/dist/dist-Dayj3gCK.mjs +1287 -0
  27. package/dist/domain-BGofcQ6I.mjs +79 -0
  28. package/dist/dotenv-DwO4ti0Z.mjs +173 -0
  29. package/dist/drizzle-NnudE_UN.mjs +232 -0
  30. package/dist/env-CyG3tvU0.mjs +301 -0
  31. package/dist/env-helpers-Dr9Y7RnE.d.mts +52 -0
  32. package/dist/env-raw-BDL4TvdN.mjs +32 -0
  33. package/dist/env-types-DknSA4SO.mjs +64 -0
  34. package/dist/env-validation-DJKjR_8q.mjs +163 -0
  35. package/dist/fetch-error-BQ8sZ5Nd.mjs +266 -0
  36. package/dist/fetch-error-CVZ5CGA-.d.mts +20 -0
  37. package/dist/gen-U0Ktr4Zd.mjs +761 -0
  38. package/dist/handler-B0ds0OHJ.d.mts +269 -0
  39. package/dist/head-P-egrtFE.d.mts +45 -0
  40. package/dist/headers-DCXc7mDs.mjs +279 -0
  41. package/dist/index.d.mts +32 -0
  42. package/dist/index.mjs +4695 -0
  43. package/dist/init-C7wS5iGP.mjs +2625 -0
  44. package/dist/link-p2R6NbgN.mjs +49 -0
  45. package/dist/list-Bfel-QLc.mjs +113 -0
  46. package/dist/log-DXdqnmhF.mjs +26 -0
  47. package/dist/login-CkcXUiIu.mjs +72 -0
  48. package/dist/logs-DmkrRvx6.mjs +98 -0
  49. package/dist/magic-string.es-D6g9UnIy.mjs +1011 -0
  50. package/dist/mcp-CaQzfeUi.mjs +373 -0
  51. package/dist/node-DDfXj10V.mjs +54 -0
  52. package/dist/output-BwlcIYSR.mjs +139 -0
  53. package/dist/pages/client.d.mts +198 -0
  54. package/dist/pages/client.mjs +980 -0
  55. package/dist/pages/head-client.d.mts +15 -0
  56. package/dist/pages/head-client.mjs +90 -0
  57. package/dist/pages/head.d.mts +2 -0
  58. package/dist/pages/head.mjs +112 -0
  59. package/dist/pages/index.d.mts +38 -0
  60. package/dist/pages/index.mjs +76 -0
  61. package/dist/pages/islands-plugin.d.mts +50 -0
  62. package/dist/pages/islands-plugin.mjs +195 -0
  63. package/dist/pages/prefetch.d.mts +31 -0
  64. package/dist/pages/prefetch.mjs +90 -0
  65. package/dist/pages/protocol.d.mts +3 -0
  66. package/dist/pages/protocol.mjs +193 -0
  67. package/dist/pages/serialize.d.mts +10 -0
  68. package/dist/pages/serialize.mjs +14 -0
  69. package/dist/pathe.M-eThtNZ-D-kmWkCS.mjs +150 -0
  70. package/dist/plugin-inference-oZ6Ybu2_.mjs +2447 -0
  71. package/dist/prepare-BAtWufvm.mjs +99 -0
  72. package/dist/preset-D4I73kT4.mjs +221 -0
  73. package/dist/project-TqORyHn8.mjs +72 -0
  74. package/dist/project-cmd-B7lQp3F3.mjs +67 -0
  75. package/dist/project-slug-CKam8lF9.mjs +11 -0
  76. package/dist/project-tsconfig-DfkESbDL.mjs +63 -0
  77. package/dist/protocol-BWzXs2A2.d.mts +34 -0
  78. package/dist/providers-B3aMxWzP.mjs +67 -0
  79. package/dist/resolve-project-Br5BR03U.mjs +29 -0
  80. package/dist/rollback-gyC59l7U.mjs +92 -0
  81. package/dist/route-types-DReF1gUY.mjs +255 -0
  82. package/dist/routes-stub.d.mts +55 -0
  83. package/dist/routes-stub.mjs +1 -0
  84. package/dist/runner-6Ep3fNQu.mjs +123 -0
  85. package/dist/runner-pg-D0wWHYnr.mjs +57 -0
  86. package/dist/runtime/ai.d.mts +127 -0
  87. package/dist/runtime/ai.mjs +348 -0
  88. package/dist/runtime/auth-client-react.d.mts +8 -0
  89. package/dist/runtime/auth-client-react.mjs +6 -0
  90. package/dist/runtime/auth-client-solid.d.mts +8 -0
  91. package/dist/runtime/auth-client-solid.mjs +6 -0
  92. package/dist/runtime/auth-client-svelte.d.mts +8 -0
  93. package/dist/runtime/auth-client-svelte.mjs +6 -0
  94. package/dist/runtime/auth-client-vue.d.mts +8 -0
  95. package/dist/runtime/auth-client-vue.mjs +6 -0
  96. package/dist/runtime/auth-client.d.mts +8 -0
  97. package/dist/runtime/auth-client.mjs +6 -0
  98. package/dist/runtime/auth.d.mts +2 -0
  99. package/dist/runtime/auth.mjs +22 -0
  100. package/dist/runtime/better-auth-pg.d.mts +11 -0
  101. package/dist/runtime/better-auth-pg.mjs +51 -0
  102. package/dist/runtime/better-auth.d.mts +11 -0
  103. package/dist/runtime/better-auth.mjs +33 -0
  104. package/dist/runtime/client.d.mts +6 -0
  105. package/dist/runtime/client.mjs +5 -0
  106. package/dist/runtime/db-pg.d.mts +2 -0
  107. package/dist/runtime/db-pg.mjs +1 -0
  108. package/dist/runtime/db.d.mts +17 -0
  109. package/dist/runtime/db.mjs +30 -0
  110. package/dist/runtime/drizzle-arktype.d.mts +1 -0
  111. package/dist/runtime/drizzle-arktype.mjs +2 -0
  112. package/dist/runtime/drizzle-valibot.d.mts +1 -0
  113. package/dist/runtime/drizzle-valibot.mjs +2 -0
  114. package/dist/runtime/drizzle-zod.d.mts +1 -0
  115. package/dist/runtime/drizzle-zod.mjs +2 -0
  116. package/dist/runtime/env-helpers.d.mts +2 -0
  117. package/dist/runtime/env-helpers.mjs +173 -0
  118. package/dist/runtime/env-public-client.d.mts +22 -0
  119. package/dist/runtime/env-public-client.mjs +54 -0
  120. package/dist/runtime/env-public.d.mts +143 -0
  121. package/dist/runtime/env-public.mjs +366 -0
  122. package/dist/runtime/env.d.mts +13 -0
  123. package/dist/runtime/env.mjs +51 -0
  124. package/dist/runtime/fetch-stream.d.mts +51 -0
  125. package/dist/runtime/fetch-stream.mjs +81 -0
  126. package/dist/runtime/fetch.d.mts +59 -0
  127. package/dist/runtime/fetch.mjs +18 -0
  128. package/dist/runtime/handler.d.mts +3 -0
  129. package/dist/runtime/handler.mjs +85 -0
  130. package/dist/runtime/isr.d.mts +26 -0
  131. package/dist/runtime/isr.mjs +43 -0
  132. package/dist/runtime/kv.d.mts +48 -0
  133. package/dist/runtime/kv.mjs +106 -0
  134. package/dist/runtime/log.d.mts +24 -0
  135. package/dist/runtime/log.mjs +31 -0
  136. package/dist/runtime/migration-handler-pg.d.mts +6 -0
  137. package/dist/runtime/migration-handler-pg.mjs +85 -0
  138. package/dist/runtime/migration-handler.d.mts +19 -0
  139. package/dist/runtime/migration-handler.mjs +92 -0
  140. package/dist/runtime/queues.d.mts +7 -0
  141. package/dist/runtime/queues.mjs +8 -0
  142. package/dist/runtime/remote/binding-handler.d.mts +15 -0
  143. package/dist/runtime/remote/binding-handler.mjs +208 -0
  144. package/dist/runtime/remote/index.d.mts +8 -0
  145. package/dist/runtime/remote/index.mjs +461 -0
  146. package/dist/runtime/response.d.mts +14 -0
  147. package/dist/runtime/response.mjs +30 -0
  148. package/dist/runtime/sandbox.d.mts +17 -0
  149. package/dist/runtime/sandbox.mjs +19 -0
  150. package/dist/runtime/schema-d1.d.mts +1 -0
  151. package/dist/runtime/schema-d1.mjs +2 -0
  152. package/dist/runtime/schema-pg.d.mts +1 -0
  153. package/dist/runtime/schema-pg.mjs +2 -0
  154. package/dist/runtime/seed.d.mts +30 -0
  155. package/dist/runtime/seed.mjs +6 -0
  156. package/dist/runtime/storage.d.mts +7 -0
  157. package/dist/runtime/storage.mjs +14 -0
  158. package/dist/runtime/validator.d.mts +2 -0
  159. package/dist/runtime/validator.mjs +72 -0
  160. package/dist/runtime/ws-server.d.mts +26 -0
  161. package/dist/runtime/ws-server.mjs +296 -0
  162. package/dist/runtime/ws.d.mts +123 -0
  163. package/dist/runtime/ws.mjs +103 -0
  164. package/dist/scan-Ba4hFwlH.mjs +324 -0
  165. package/dist/scan-C6HMEIdW.mjs +318 -0
  166. package/dist/secret-CeRSukgM.mjs +109 -0
  167. package/dist/skills-ipldjlKE.mjs +62 -0
  168. package/dist/standard-schema-9CRjx-uR.d.mts +42 -0
  169. package/dist/subcommand-prompt-BKjuNAPb.mjs +349 -0
  170. package/dist/sveltekit.d.mts +20 -0
  171. package/dist/sveltekit.mjs +61 -0
  172. package/dist/types-mHOEwpW4.d.mts +57 -0
  173. package/dist/validate-CaMavMxu.mjs +146 -0
  174. package/dist/yarn-pnp-BFqMV_bl.mjs +196 -0
  175. package/getting-started-prompt.txt +26 -0
  176. package/package.json +322 -30
  177. package/schema.json +364 -0
  178. package/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
  179. package/skills/void/SKILL.md +75 -0
  180. package/skills/void/command/void.md +7 -0
  181. package/skills/void/docs/guide/ai.md +235 -0
  182. package/skills/void/docs/guide/app-types.md +103 -0
  183. package/skills/void/docs/guide/auth.md +257 -0
  184. package/skills/void/docs/guide/database/d1.md +106 -0
  185. package/skills/void/docs/guide/database/postgresql.md +106 -0
  186. package/skills/void/docs/guide/database.md +418 -0
  187. package/skills/void/docs/guide/deployment.md +98 -0
  188. package/skills/void/docs/guide/edge/headers.md +79 -0
  189. package/skills/void/docs/guide/edge/prerendering.md +83 -0
  190. package/skills/void/docs/guide/edge/redirects.md +116 -0
  191. package/skills/void/docs/guide/edge/revalidation.md +131 -0
  192. package/skills/void/docs/guide/edge/rewrites.md +354 -0
  193. package/skills/void/docs/guide/edge/static-assets.md +72 -0
  194. package/skills/void/docs/guide/env-vars.md +298 -0
  195. package/skills/void/docs/guide/index.md +80 -0
  196. package/skills/void/docs/guide/jobs.md +91 -0
  197. package/skills/void/docs/guide/kv.md +107 -0
  198. package/skills/void/docs/guide/pages-routing/actions-and-forms.md +419 -0
  199. package/skills/void/docs/guide/pages-routing/head.md +130 -0
  200. package/skills/void/docs/guide/pages-routing/islands.md +405 -0
  201. package/skills/void/docs/guide/pages-routing/layouts.md +362 -0
  202. package/skills/void/docs/guide/pages-routing/loaders.md +267 -0
  203. package/skills/void/docs/guide/pages-routing/markdown.md +625 -0
  204. package/skills/void/docs/guide/pages-routing/overview.md +236 -0
  205. package/skills/void/docs/guide/pages-routing/view-transitions.md +140 -0
  206. package/skills/void/docs/guide/queues.md +140 -0
  207. package/skills/void/docs/guide/quickstart.md +233 -0
  208. package/skills/void/docs/guide/remote-dev.md +67 -0
  209. package/skills/void/docs/guide/sandboxes.md +82 -0
  210. package/skills/void/docs/guide/server-routing.md +246 -0
  211. package/skills/void/docs/guide/ssg.md +74 -0
  212. package/skills/void/docs/guide/ssr.md +105 -0
  213. package/skills/void/docs/guide/storage.md +67 -0
  214. package/skills/void/docs/guide/type-safety.md +179 -0
  215. package/skills/void/docs/guide/typed-fetch.md +113 -0
  216. package/skills/void/docs/guide/websockets.md +190 -0
  217. package/skills/void/docs/index.md +48 -0
  218. package/skills/void/docs/integrations/agents.md +84 -0
  219. package/skills/void/docs/integrations/cloudflare.md +284 -0
  220. package/skills/void/docs/integrations/frameworks/analog.md +182 -0
  221. package/skills/void/docs/integrations/frameworks/astro.md +197 -0
  222. package/skills/void/docs/integrations/frameworks/nuxt.md +164 -0
  223. package/skills/void/docs/integrations/frameworks/overview.md +136 -0
  224. package/skills/void/docs/integrations/frameworks/react-router.md +137 -0
  225. package/skills/void/docs/integrations/frameworks/sveltekit.md +191 -0
  226. package/skills/void/docs/integrations/frameworks/tanstack-start.md +140 -0
  227. package/skills/void/docs/integrations/hono.md +97 -0
  228. package/skills/void/docs/integrations/nodejs-bun-deno.md +210 -0
  229. package/skills/void/docs/node_modules/@iconify/vue/README.md +408 -0
  230. package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +5 -0
  231. package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +103 -0
  232. package/skills/void/docs/node_modules/oxc-minify/README.md +78 -0
  233. package/skills/void/docs/node_modules/reka-ui/README.md +80 -0
  234. package/skills/void/docs/node_modules/vitepress/README.md +28 -0
  235. package/skills/void/docs/node_modules/vitepress/template/api-examples.md +49 -0
  236. package/skills/void/docs/node_modules/vitepress/template/index.md +28 -0
  237. package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +85 -0
  238. package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +101 -0
  239. package/skills/void/docs/node_modules/void/AGENTS.md +204 -0
  240. package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +15 -0
  241. package/skills/void/docs/node_modules/void/README.md +89 -0
  242. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +591 -0
  243. package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +375 -0
  244. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +174 -0
  245. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +37 -0
  246. package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +135 -0
  247. package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +189 -0
  248. package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +143 -0
  249. package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +1272 -0
  250. package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +19 -0
  251. package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +15 -0
  252. package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +15 -0
  253. package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +15 -0
  254. package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +22 -0
  255. package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +69 -0
  256. package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +152 -0
  257. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +9 -0
  258. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +9 -0
  259. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +15 -0
  260. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +24 -0
  261. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +565 -0
  262. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +124 -0
  263. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +600 -0
  264. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +386 -0
  265. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +95 -0
  266. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +101 -0
  267. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathe/README.md +73 -0
  268. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +15 -0
  269. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +25 -0
  270. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tsdown/README.md +55 -0
  271. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/LICENSE.md +2230 -0
  272. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/README.md +20 -0
  273. package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +58 -0
  274. package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +165 -0
  275. package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +20 -0
  276. package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +32 -0
  277. package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +99 -0
  278. package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +108 -0
  279. package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +51 -0
  280. package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +79 -0
  281. package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +44 -0
  282. package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +51 -0
  283. package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +65 -0
  284. package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +390 -0
  285. package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +48 -0
  286. package/skills/void/docs/node_modules/void/node_modules/hono/README.md +85 -0
  287. package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +452 -0
  288. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +76 -0
  289. package/{LICENSE → skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md} +21 -21
  290. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +364 -0
  291. package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +41 -0
  292. package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +325 -0
  293. package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +398 -0
  294. package/skills/void/docs/node_modules/void/node_modules/pathe/README.md +73 -0
  295. package/skills/void/docs/node_modules/void/node_modules/pg/README.md +95 -0
  296. package/skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md +21 -0
  297. package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +135 -0
  298. package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +21 -0
  299. package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +25 -0
  300. package/skills/void/docs/node_modules/void/node_modules/tsdown/README.md +55 -0
  301. package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +9 -0
  302. package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +94 -0
  303. package/skills/void/docs/node_modules/void/node_modules/vite/LICENSE.md +2230 -0
  304. package/skills/void/docs/node_modules/void/node_modules/vite/README.md +20 -0
  305. package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +63 -0
  306. package/skills/void/docs/node_modules/void/node_modules/zod/README.md +191 -0
  307. package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
  308. package/skills/void/docs/node_modules/void/skills/void/SKILL.md +75 -0
  309. package/skills/void/docs/node_modules/void/skills/void/command/void.md +7 -0
  310. package/skills/void/docs/reference/api.md +917 -0
  311. package/skills/void/docs/reference/cli.md +561 -0
  312. package/skills/void/docs/reference/config.md +408 -0
  313. package/skills/void/docs/reference/resource-inference.md +149 -0
  314. package/skills/void/docs/reference/structure.md +176 -0
  315. package/.npmignore +0 -29
  316. package/.travis.yml +0 -9
  317. package/favicon.ico +0 -0
  318. package/index.js +0 -14
  319. package/lib/Job.js +0 -150
  320. package/lib/Void.js +0 -99
  321. package/lib/scan.js +0 -19
  322. package/test/credentials.js +0 -20
  323. package/test/job.js +0 -64
  324. package/test/static/dir1/test6.html +0 -0
  325. package/test/static/dir2/test7.html +0 -0
  326. package/test/static/dir2/test8.html +0 -0
  327. package/test/static/dir2/test9.html +0 -0
  328. package/test/static/test1.html +0 -0
  329. package/test/static/test2.html +0 -0
  330. package/test/static/test3.html +0 -0
  331. package/test/void.js +0 -31
  332. /package/{test/static/dir1/test4.html → skills/void/docs/integrations/auth-providers.md} +0 -0
  333. /package/{test/static/dir1/test5.html → skills/void/docs/integrations/payment-processors.md} +0 -0
@@ -0,0 +1,99 @@
1
+ import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
+ import { n as cliTitle } from "./output-BwlcIYSR.mjs";
3
+ import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-CvHtTM0q.mjs";
4
+ import { c as R, g as ge, u as Se, y as ye } from "./dist-Dayj3gCK.mjs";
5
+ import { c as getDatabaseDialect, f as readConfig } from "./config-BIa9HwVX.mjs";
6
+ import { t as scanRoutes } from "./scan-C6HMEIdW.mjs";
7
+ import { n as detectFramework, r as inferProjectBindings, t as FRAMEWORK_SCAN_DIRS } from "./plugin-inference-oZ6Ybu2_.mjs";
8
+ import { i as generateDbDts, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-DReF1gUY.mjs";
9
+ import { n as ensureProjectTsconfig } from "./project-tsconfig-DfkESbDL.mjs";
10
+ import { t as discoverSchema } from "./discover-B7FkXBLB.mjs";
11
+ import { n as generateEnvTypes, t as findEnvFile } from "./env-types-DknSA4SO.mjs";
12
+ import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-NnudE_UN.mjs";
13
+ import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
14
+ import { fileURLToPath } from "node:url";
15
+ import { loadEnv } from "vite";
16
+ //#region src/codegen/prepare.ts
17
+ function writeGeneratedFile(outDir, fileName, content, written) {
18
+ mkdirSync(outDir, { recursive: true });
19
+ writeFileSync(join(outDir, fileName), content);
20
+ written.push(join(".void", fileName));
21
+ }
22
+ function removeGeneratedFile(outDir, fileName, removed) {
23
+ const filePath = join(outDir, fileName);
24
+ if (!existsSync(filePath)) return;
25
+ rmSync(filePath, { force: true });
26
+ removed.push(join(".void", fileName));
27
+ }
28
+ async function prepareProject(root) {
29
+ const config = readConfig(root);
30
+ const outDir = join(root, ".void");
31
+ const written = [];
32
+ const removed = [];
33
+ mkdirSync(outDir, { recursive: true });
34
+ const detectedFramework = detectFramework(root);
35
+ const bindings = inferProjectBindings(root, config.inference?.bindings ? { bindings: config.inference.bindings } : void 0, config.inference?.scanDirs ?? (detectedFramework ? FRAMEWORK_SCAN_DIRS : void 0));
36
+ const authConfigPath = findVoidAuthConfig(root);
37
+ const authEnabled = bindings.needsAuth || authConfigPath !== null || config.auth !== void 0;
38
+ const dialect = getDatabaseDialect(config);
39
+ const envFile = findEnvFile(root);
40
+ if (envFile) {
41
+ const { dts } = generateEnvTypes(envFile, outDir);
42
+ writeGeneratedFile(outDir, "env.d.ts", dts, written);
43
+ } else removeGeneratedFile(outDir, "env.d.ts", removed);
44
+ const scan = await scanRoutes(root, { output: config.output });
45
+ const hasRouteTypes = scan.routes.length > 0 || (scan.websockets?.length ?? 0) > 0 || scan.pages.pages.length > 0;
46
+ if (hasRouteTypes) {
47
+ const { dts } = generateRouteTypes(scan, join(root, "routes"), outDir, join(root, "pages"));
48
+ writeGeneratedFile(outDir, "routes.d.ts", dts, written);
49
+ } else removeGeneratedFile(outDir, "routes.d.ts", removed);
50
+ if (scan.queues.length > 0) writeGeneratedFile(outDir, "queues.d.ts", generateQueueTypes(scan.queues, join(root, "queues"), outDir), written);
51
+ else removeGeneratedFile(outDir, "queues.d.ts", removed);
52
+ const schema = discoverSchema(root);
53
+ const hasDbRuntime = schema != null || authEnabled;
54
+ if (hasDbRuntime) {
55
+ generateDbDts(outDir, schema, dialect);
56
+ written.push(join(".void", "db.d.ts"));
57
+ } else removeGeneratedFile(outDir, "db.d.ts", removed);
58
+ if (authEnabled) {
59
+ const authRuntime = {
60
+ dialect,
61
+ providers: config.auth?.providers ?? null,
62
+ userConfig: await loadVoidAuthConfig(authConfigPath)
63
+ };
64
+ const env = loadEnv("development", root, "");
65
+ const schemaPath = join(outDir, "better-auth-schema.ts");
66
+ const databasePath = join(outDir, "better-auth-db.ts");
67
+ const drizzleAdapterPath = fileURLToPath(import.meta.resolve("better-auth/adapters/drizzle"));
68
+ writeFileSync(schemaPath, generateVoidAuthDrizzleSchema(authRuntime, env));
69
+ writeFileSync(databasePath, generateVoidAuthDatabaseModule({
70
+ dialect,
71
+ schemaImportPath: schemaPath,
72
+ drizzleAdapterPath
73
+ }));
74
+ written.push(join(".void", "better-auth-schema.ts"));
75
+ written.push(join(".void", "better-auth-db.ts"));
76
+ } else {
77
+ removeGeneratedFile(outDir, "better-auth-schema.ts", removed);
78
+ removeGeneratedFile(outDir, "better-auth-db.ts", removed);
79
+ }
80
+ ensureProjectTsconfig(root, hasRouteTypes, hasDbRuntime, schema != null);
81
+ written.push(join(".void", "tsconfig.json"));
82
+ return {
83
+ written,
84
+ removed
85
+ };
86
+ }
87
+ //#endregion
88
+ //#region src/cli/prepare.ts
89
+ async function runPrepareCommand(root, _args) {
90
+ console.log();
91
+ ge(cliTitle("prepare"));
92
+ const result = await prepareProject(root);
93
+ if (result.written.length > 0) Se(result.written.join("\n"), "Wrote");
94
+ if (result.removed.length > 0) Se(result.removed.join("\n"), "Removed stale files");
95
+ if (result.written.length === 0 && result.removed.length === 0) R.info("No generated files changed.");
96
+ ye("Project codegen is ready.");
97
+ }
98
+ //#endregion
99
+ export { runPrepareCommand };
@@ -0,0 +1,221 @@
1
+ import { a as join, s as resolve } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
+ import { o as hasSsrEntry } from "./plugin-inference-oZ6Ybu2_.mjs";
3
+ import { existsSync, readFileSync } from "node:fs";
4
+ //#region src/cli/preset.ts
5
+ /**
6
+ * Known output conventions for SSGs.
7
+ * Keyed by the SSG name — detection iterates in insertion order.
8
+ */
9
+ const SSG_PRESETS = {
10
+ vitepress: {
11
+ dep: "vitepress",
12
+ buildCommand: "vitepress build",
13
+ outputDir: ".vitepress/dist",
14
+ appType: "static",
15
+ resolve(root) {
16
+ if (existsSync(join(root, "docs/.vitepress"))) return {
17
+ buildCommand: "vitepress build docs",
18
+ outputDir: "docs/.vitepress/dist"
19
+ };
20
+ }
21
+ },
22
+ docusaurus: {
23
+ dep: "@docusaurus/core",
24
+ buildCommand: "docusaurus build",
25
+ outputDir: "build",
26
+ appType: "static"
27
+ }
28
+ };
29
+ /**
30
+ * Known output conventions for meta-frameworks.
31
+ * Keyed by the framework name from `detectFramework()`.
32
+ *
33
+ * Class A frameworks (tanstack-start, react-router, vinext) use the project's
34
+ * Vite-compatible build command (`vite build` or `vp build`) and have their
35
+ * output structure determined by the framework's Vite plugin.
36
+ *
37
+ * Class B/C frameworks (sveltekit, nuxt, analog, astro) use their own build CLI
38
+ * and have framework-specific output conventions.
39
+ */
40
+ const FRAMEWORK_PRESETS = {
41
+ "tanstack-start": {
42
+ buildCommand: "vite build",
43
+ workerDir: "dist/server",
44
+ workerMain: "index.js",
45
+ assetsDir: "dist/client"
46
+ },
47
+ "react-router": {
48
+ buildCommand: "vite build",
49
+ workerDir: "build/server",
50
+ workerMain: "index.js",
51
+ assetsDir: "build/client"
52
+ },
53
+ "vinext-app": {
54
+ buildCommand: "vite build",
55
+ workerDir: "dist/rsc",
56
+ workerMain: "index.js",
57
+ assetsDir: "dist/client"
58
+ },
59
+ "vinext-pages": {
60
+ buildCommand: "vite build",
61
+ workerDir: "dist/ssr",
62
+ workerMain: "index.js",
63
+ assetsDir: "dist/client"
64
+ },
65
+ sveltekit: {
66
+ buildCommand: "vite build",
67
+ workerDir: ".svelte-kit/cloudflare",
68
+ workerMain: "_worker.js",
69
+ assetsDir: ".svelte-kit/cloudflare",
70
+ hashedAssetsPrefix: "_app/immutable",
71
+ bundle: true
72
+ },
73
+ nuxt: {
74
+ buildCommand: "nuxt build",
75
+ workerDir: ".output/server",
76
+ workerMain: "index.mjs",
77
+ assetsDir: ".output/public",
78
+ hashedAssetsPrefix: "_nuxt"
79
+ },
80
+ analog: {
81
+ buildCommand: "vite build",
82
+ workerDir: "dist/analog/server",
83
+ workerMain: "index.mjs",
84
+ assetsDir: "dist/analog/public",
85
+ hashedAssetsPrefix: "assets"
86
+ },
87
+ astro: {
88
+ buildCommand: "astro build",
89
+ workerDir: "dist/server",
90
+ workerMain: "entry.mjs",
91
+ assetsDir: "dist/client",
92
+ hashedAssetsPrefix: "_astro"
93
+ }
94
+ };
95
+ /**
96
+ * Resolve a project-local command, rewriting `vite` to `vp` when the project
97
+ * depends on Vite+ and preferring node_modules/.bin when available.
98
+ */
99
+ function resolveProjectCommand(root, command) {
100
+ const [bin, ...args] = command.trim().split(/\s+/);
101
+ const resolvedBin = localBin(root, resolveCommandBin(root, bin));
102
+ return args.length > 0 ? `${resolvedBin} ${args.join(" ")}` : resolvedBin;
103
+ }
104
+ /**
105
+ * Format a user-facing command string, rewriting `vite` to `vp` when the
106
+ * project depends on Vite+ without expanding to an absolute local bin path.
107
+ */
108
+ function formatProjectCommand(root, command) {
109
+ const [bin, ...args] = command.trim().split(/\s+/);
110
+ const formattedBin = resolveCommandBin(root, bin);
111
+ return args.length > 0 ? `${formattedBin} ${args.join(" ")}` : formattedBin;
112
+ }
113
+ /**
114
+ * Detect a static deploy preset based on the project root.
115
+ * Returns null when the project requires a full worker deploy.
116
+ */
117
+ function detectPreset(root, options) {
118
+ if (options?.dir) return {
119
+ buildCommand: null,
120
+ outputDir: resolve(root, options.dir),
121
+ appType: options.spa ? "spa" : "static"
122
+ };
123
+ const pkg = readPackageJson(root);
124
+ if (pkg) {
125
+ const allDeps = getAllDeps(pkg);
126
+ for (const preset of Object.values(SSG_PRESETS)) if (preset.dep in allDeps) {
127
+ const overrides = preset.resolve?.(root);
128
+ const cmd = overrides?.buildCommand ?? preset.buildCommand;
129
+ const out = overrides?.outputDir ?? preset.outputDir;
130
+ return {
131
+ buildCommand: resolveProjectCommand(root, cmd),
132
+ outputDir: resolve(root, out),
133
+ appType: preset.appType
134
+ };
135
+ }
136
+ }
137
+ if (hasBackendFiles(root)) return null;
138
+ if (pkg && hasViteLike(pkg)) return {
139
+ buildCommand: resolveProjectScriptCommand(root, "build") ?? resolveProjectCommand(root, "vite build"),
140
+ outputDir: resolve(root, "dist"),
141
+ appType: "spa"
142
+ };
143
+ if (existsSync(join(root, "dist/index.html"))) return {
144
+ buildCommand: null,
145
+ outputDir: resolve(root, "dist"),
146
+ appType: options?.spa ? "spa" : "static"
147
+ };
148
+ if (existsSync(join(root, "index.html"))) return {
149
+ buildCommand: null,
150
+ outputDir: root,
151
+ appType: options?.spa ? "spa" : "static"
152
+ };
153
+ return null;
154
+ }
155
+ /**
156
+ * Resolve a local node_modules/.bin executable path.
157
+ * Falls back to bare command name if the bin doesn't exist locally.
158
+ */
159
+ function localBin(root, name) {
160
+ const bin = join(root, "node_modules", ".bin", name);
161
+ return existsSync(bin) ? bin : name;
162
+ }
163
+ function resolveCommandBin(root, name) {
164
+ if (name === "vite") return detectViteBinary(root);
165
+ return name;
166
+ }
167
+ function readPackageJson(root) {
168
+ try {
169
+ return JSON.parse(readFileSync(join(root, "package.json"), "utf-8"));
170
+ } catch {
171
+ return null;
172
+ }
173
+ }
174
+ function getAllDeps(pkg) {
175
+ return {
176
+ ...pkg.dependencies ?? {},
177
+ ...pkg.devDependencies ?? {}
178
+ };
179
+ }
180
+ function detectPackageManager(root) {
181
+ if (existsSync(join(root, "pnpm-lock.yaml"))) return "pnpm";
182
+ if (existsSync(join(root, "yarn.lock"))) return "yarn";
183
+ if (existsSync(join(root, "bun.lock")) || existsSync(join(root, "bun.lockb"))) return "bun";
184
+ return "npm";
185
+ }
186
+ function resolveProjectScriptCommand(root, scriptName) {
187
+ const script = readPackageJson(root)?.scripts;
188
+ if (!script || typeof script !== "object" || Array.isArray(script)) return null;
189
+ if (typeof script[scriptName] !== "string") return null;
190
+ switch (detectPackageManager(root)) {
191
+ case "pnpm": return `pnpm ${scriptName}`;
192
+ case "yarn": return `yarn ${scriptName}`;
193
+ case "bun": return `bun run ${scriptName}`;
194
+ default: return `npm run ${scriptName}`;
195
+ }
196
+ }
197
+ function hasViteLike(pkg) {
198
+ const deps = getAllDeps(pkg);
199
+ return "vite" in deps || "vite-plus" in deps;
200
+ }
201
+ function detectViteBinary(root) {
202
+ const pkg = readPackageJson(root);
203
+ if (pkg) {
204
+ if ("vite-plus" in getAllDeps(pkg)) return "vp";
205
+ }
206
+ return "vite";
207
+ }
208
+ /**
209
+ * Check whether the project has backend files that require a full worker deploy.
210
+ */
211
+ function hasBackendFiles(root) {
212
+ if (existsSync(join(root, "routes"))) return true;
213
+ if (existsSync(join(root, "pages"))) return true;
214
+ if (existsSync(join(root, "middleware"))) return true;
215
+ if (existsSync(join(root, "crons"))) return true;
216
+ if (existsSync(join(root, "queues"))) return true;
217
+ if (hasSsrEntry(root)) return true;
218
+ return false;
219
+ }
220
+ //#endregion
221
+ export { resolveProjectCommand as i, detectPreset as n, formatProjectCommand as r, FRAMEWORK_PRESETS as t };
@@ -0,0 +1,72 @@
1
+ import { n as __exportAll } from "./chunk-DJd-R1mw.mjs";
2
+ import { a as join, n as dirname } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
3
+ import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
4
+ //#region src/cli/project.ts
5
+ var project_exports = /* @__PURE__ */ __exportAll({
6
+ isVoidInternalStaging: () => isVoidInternalStaging,
7
+ readProjectConfig: () => readProjectConfig,
8
+ removeProjectConfig: () => removeProjectConfig,
9
+ writeProjectConfig: () => writeProjectConfig
10
+ });
11
+ const PROJECT_FILE = ".void/project.json";
12
+ function readProjectConfigFile(root) {
13
+ const filePath = join(root, PROJECT_FILE);
14
+ try {
15
+ const raw = readFileSync(filePath, "utf-8");
16
+ const config = JSON.parse(raw);
17
+ if (typeof config !== "object" || config === null || Array.isArray(config)) return null;
18
+ return config;
19
+ } catch {
20
+ return null;
21
+ }
22
+ }
23
+ /**
24
+ * Read the project config from the project root.
25
+ * Returns null if no project.json exists.
26
+ * A file containing only internal metadata is not treated as a linked project.
27
+ */
28
+ function readProjectConfig(root) {
29
+ const config = readProjectConfigFile(root);
30
+ if (!config || typeof config.projectId !== "string" || typeof config.slug !== "string") return null;
31
+ const result = {
32
+ projectId: config.projectId,
33
+ slug: config.slug
34
+ };
35
+ if (config.voidInternalStaging === true) result.voidInternalStaging = true;
36
+ return result;
37
+ }
38
+ /**
39
+ * Internal-only platform developers' staging switch.
40
+ * This intentionally lives with the project link state, not public void.json.
41
+ */
42
+ function isVoidInternalStaging(root) {
43
+ return readProjectConfigFile(root)?.voidInternalStaging === true;
44
+ }
45
+ /**
46
+ * Write the project config to the project root.
47
+ */
48
+ function writeProjectConfig(root, config) {
49
+ const filePath = join(root, PROJECT_FILE);
50
+ const existing = readProjectConfigFile(root);
51
+ const next = {
52
+ projectId: config.projectId,
53
+ slug: config.slug
54
+ };
55
+ if (config.voidInternalStaging === true || existing?.voidInternalStaging === true) next.voidInternalStaging = true;
56
+ mkdirSync(dirname(filePath), { recursive: true });
57
+ writeFileSync(filePath, JSON.stringify(next, null, 2) + "\n");
58
+ }
59
+ /**
60
+ * Remove the project config file. Returns true if removed, false if it didn't exist.
61
+ */
62
+ function removeProjectConfig(root) {
63
+ const filePath = join(root, PROJECT_FILE);
64
+ try {
65
+ rmSync(filePath);
66
+ return true;
67
+ } catch {
68
+ return false;
69
+ }
70
+ }
71
+ //#endregion
72
+ export { writeProjectConfig as a, removeProjectConfig as i, project_exports as n, readProjectConfig as r, isVoidInternalStaging as t };
@@ -0,0 +1,67 @@
1
+ import { i as dim, l as tablePrefix, n as cliTitle, s as import_picocolors } from "./output-BwlcIYSR.mjs";
2
+ import { c as R, g as ge, y as ye } from "./dist-Dayj3gCK.mjs";
3
+ import { n as PlatformClient, o as getSiteDomain, s as getToken } from "./client-snXOjrp1.mjs";
4
+ //#region src/cli/projects.ts
5
+ async function runProjectsCommand(root) {
6
+ console.log();
7
+ ge(cliTitle("project list"));
8
+ const token = getToken(root);
9
+ if (!token) {
10
+ R.error("Not logged in. Run `void auth login` first.");
11
+ process.exit(1);
12
+ }
13
+ const projects = await new PlatformClient(token, { root }).listProjects();
14
+ if (projects.length === 0) {
15
+ ye("No projects found.");
16
+ return;
17
+ }
18
+ const rows = projects.map((p) => ({
19
+ slug: p.slug,
20
+ appType: p.type ?? "worker",
21
+ url: p.custom_domain ? `https://${p.custom_domain}` : `https://${p.slug}.${getSiteDomain(root)}`
22
+ }));
23
+ const slugWidth = Math.max(4, ...rows.map((r) => r.slug.length));
24
+ const typeWidth = Math.max(4, ...rows.map((r) => r.appType.length));
25
+ const prefix = tablePrefix();
26
+ const header = `${prefix}${dim(`${"slug".padEnd(slugWidth)} ${"type".padEnd(typeWidth)} url`)}`;
27
+ const lines = rows.map((row) => `${prefix}${import_picocolors.default.green(row.slug)}${"".padEnd(slugWidth - row.slug.length)} ${row.appType.padEnd(typeWidth)} ${row.url}`);
28
+ console.log(prefix);
29
+ console.log(header);
30
+ for (const line of lines) console.log(line);
31
+ ye(`${projects.length} project(s)`);
32
+ }
33
+ //#endregion
34
+ //#region src/cli/project-cmd.ts
35
+ async function runProjectCommand(root, args) {
36
+ if (args.subcommand === "status") {
37
+ const { runListCommand } = await import("./list-Bfel-QLc.mjs");
38
+ return runListCommand(root, args.name || void 0);
39
+ }
40
+ if (args.subcommand === "link") {
41
+ const { runLink } = await import("./link-p2R6NbgN.mjs");
42
+ return runLink(root, args.name || void 0);
43
+ }
44
+ if (args.subcommand === "list") return runProjectsCommand(root);
45
+ if (args.subcommand === "logs") {
46
+ const { runLogsCommand } = await import("./logs-DmkrRvx6.mjs");
47
+ return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
48
+ }
49
+ if (args.subcommand === "rollback") {
50
+ const { runRollbackCommand } = await import("./rollback-gyC59l7U.mjs");
51
+ return runRollbackCommand(root, args.deployId || void 0);
52
+ }
53
+ if (args.subcommand === "cancel") {
54
+ const { runCancelDeployCommand } = await import("./cancel-deploy-BOBTqqh0.mjs");
55
+ return runCancelDeployCommand(root, args.deployId || void 0);
56
+ }
57
+ if (args.subcommand === "delete") {
58
+ const { runDeleteCommand } = await import("./delete-DAP6yDc7.mjs");
59
+ return runDeleteCommand(root, args.name || void 0, { force: args.force });
60
+ }
61
+ if (args.subcommand === "purge-cache") {
62
+ const { runPurgeCacheCommand } = await import("./cache-W82I8ihI.mjs");
63
+ return runPurgeCacheCommand(root, args.projectSlug || void 0);
64
+ }
65
+ }
66
+ //#endregion
67
+ export { runProjectCommand };
@@ -0,0 +1,11 @@
1
+ import { n as __exportAll } from "./chunk-DJd-R1mw.mjs";
2
+ //#region src/cli/project-slug.ts
3
+ var project_slug_exports = /* @__PURE__ */ __exportAll({ validateProjectSlug: () => validateProjectSlug });
4
+ function validateProjectSlug(value) {
5
+ const slug = (value ?? "").trim();
6
+ if (slug.length === 0) return "Project slug is required.";
7
+ if (!(slug.length === 1 ? /^[a-z0-9]$/.test(slug) : /^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(slug))) return "Slug must be lowercase alphanumeric with dashes.";
8
+ if (slug.length <= 5) return "Slugs of 5 characters or fewer require a paid plan. Use at least 6 characters.";
9
+ }
10
+ //#endregion
11
+ export { validateProjectSlug as n, project_slug_exports as t };
@@ -0,0 +1,63 @@
1
+ import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
2
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
3
+ //#region src/codegen/project-tsconfig.ts
4
+ /**
5
+ * Build the generated .void/tsconfig.json contents. Lists the generated
6
+ * declaration files so TypeScript discovers them via the `files` field
7
+ * (which is inherited by `extends`, unlike `include`).
8
+ *
9
+ * @param hasRouteTypes - When true, include routes.d.ts. When omitted,
10
+ * auto-detect by checking for a routes/ directory.
11
+ * @param hasDrizzle - When true, configure `@schema` paths for the user's
12
+ * Drizzle schema.
13
+ */
14
+ function createProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options = {}) {
15
+ const outDir = join(root, ".void");
16
+ const includeRoutes = hasRouteTypes ?? existsSync(join(root, "routes"));
17
+ const includeQueues = existsSync(join(root, "queues"));
18
+ const includeMd = existsSync(join(outDir, "md.d.ts"));
19
+ const includeEnv = existsSync(join(outDir, "env.d.ts"));
20
+ const tsconfig = { files: [
21
+ ...includeRoutes ? ["routes.d.ts"] : [],
22
+ ...hasDb ? ["db.d.ts"] : [],
23
+ ...includeQueues ? ["queues.d.ts"] : [],
24
+ ...includeMd ? ["md.d.ts"] : [],
25
+ ...includeEnv ? ["env.d.ts"] : []
26
+ ] };
27
+ if (hasDb) {
28
+ const paths = {};
29
+ if (options.redirectDbModule !== false) paths["void/db"] = ["./db.d.ts"];
30
+ if (hasSchema) {
31
+ paths["@schema"] = [existsSync(join(root, "db", "schema")) && !existsSync(join(root, "db", "schema.ts")) ? "../db/schema/index.ts" : "../db/schema.ts"];
32
+ paths["@schema/*"] = ["../db/schema/*"];
33
+ }
34
+ tsconfig.compilerOptions = { paths };
35
+ }
36
+ if (includeRoutes) {
37
+ const compilerOptions = tsconfig.compilerOptions ??= {};
38
+ const paths = compilerOptions.paths ??= {};
39
+ paths["void/routes"] = ["./routes.d.ts"];
40
+ }
41
+ if (includeQueues) {
42
+ const compilerOptions = tsconfig.compilerOptions ??= {};
43
+ const paths = compilerOptions.paths ??= {};
44
+ paths["void/queues"] = ["./queues.d.ts"];
45
+ }
46
+ if (includeMd) {
47
+ const compilerOptions = tsconfig.compilerOptions ??= {};
48
+ const paths = compilerOptions.paths ??= {};
49
+ paths["@void/md/pages"] = ["./md.d.ts"];
50
+ }
51
+ return tsconfig;
52
+ }
53
+ /**
54
+ * Ensure .void/tsconfig.json exists so the user's root tsconfig can extend it.
55
+ */
56
+ function ensureProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options = {}) {
57
+ const outDir = join(root, ".void");
58
+ mkdirSync(outDir, { recursive: true });
59
+ const tsconfig = createProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options);
60
+ writeFileSync(join(outDir, "tsconfig.json"), JSON.stringify(tsconfig, null, 2) + "\n");
61
+ }
62
+ //#endregion
63
+ export { ensureProjectTsconfig as n, createProjectTsconfig as t };
@@ -0,0 +1,34 @@
1
+ import { n as HeadDescriptor, t as HeadConfig } from "./head-P-egrtFE.mjs";
2
+ import { n as CloudContext, t as CloudBindings } from "./handler-B0ds0OHJ.mjs";
3
+
4
+ //#region src/pages/protocol.d.ts
5
+ /** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
6
+ declare function safeJsonStringify(value: unknown): string;
7
+ interface PageObject {
8
+ component: string;
9
+ props: Record<string, unknown>;
10
+ shared: Record<string, unknown>;
11
+ url: string;
12
+ errors: Record<string, string> | null;
13
+ head?: HeadDescriptor;
14
+ deferred?: Array<string>;
15
+ deferredKeys?: Record<string, string>;
16
+ }
17
+ type PageRenderResult = string | ReadableStream<Uint8Array>;
18
+ type PageHandler = ((c: CloudContext) => unknown | Promise<unknown>) | undefined;
19
+ type PageHeadHandler = ((c: CloudContext, props: Record<string, unknown>) => HeadDescriptor | undefined) | undefined;
20
+ type AssetTags = {
21
+ css: string;
22
+ preloads: string;
23
+ body: string;
24
+ };
25
+ type RenderPage = (pageObj: PageObject, assetTags: AssetTags) => Promise<PageRenderResult>;
26
+ type GetAssetTags = (req: Request, env: CloudBindings, componentId: string) => Promise<AssetTags>;
27
+ /** Flatten withValidator's { issues: [{ slot, issues: [{ message, path }] }] } into { field: message } */
28
+ declare function flattenValidationErrors(body: unknown): Record<string, string>;
29
+ /** Handle GET page request — run handler, return page object or SSR HTML */
30
+ declare function handlePageGet(handler: PageHandler, headFn: PageHeadHandler, c: CloudContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, island?: boolean): Promise<Response>;
31
+ /** Handle POST/PUT/DELETE page request — run mutation, then re-run GET or redirect */
32
+ declare function handlePageMutation(mutationHandler: PageHandler, getHandler: PageHandler, headFn: PageHeadHandler, c: CloudContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, island?: boolean): Promise<Response>;
33
+ //#endregion
34
+ export { handlePageMutation as a, handlePageGet as i, PageRenderResult as n, safeJsonStringify as o, flattenValidationErrors as r, PageObject as t };
@@ -0,0 +1,67 @@
1
+ //#region src/auth/providers.ts
2
+ const VOID_SOCIAL_AUTH_PROVIDERS = [
3
+ "apple",
4
+ "atlassian",
5
+ "cognito",
6
+ "discord",
7
+ "dropbox",
8
+ "facebook",
9
+ "figma",
10
+ "github",
11
+ "gitlab",
12
+ "google",
13
+ "huggingface",
14
+ "kakao",
15
+ "kick",
16
+ "line",
17
+ "linear",
18
+ "linkedin",
19
+ "microsoft",
20
+ "naver",
21
+ "notion",
22
+ "paybin",
23
+ "paypal",
24
+ "polar",
25
+ "railway",
26
+ "reddit",
27
+ "roblox",
28
+ "salesforce",
29
+ "slack",
30
+ "spotify",
31
+ "tiktok",
32
+ "twitch",
33
+ "twitter",
34
+ "vercel",
35
+ "vk",
36
+ "zoom"
37
+ ];
38
+ const VOID_EMAIL_AUTH_PROVIDER = "email";
39
+ const VOID_AUTH_PROVIDERS = [VOID_EMAIL_AUTH_PROVIDER, ...VOID_SOCIAL_AUTH_PROVIDERS];
40
+ const VOID_SOCIAL_AUTH_PROVIDER_SET = new Set(VOID_SOCIAL_AUTH_PROVIDERS);
41
+ const VOID_AUTH_PROVIDER_SET = new Set(VOID_AUTH_PROVIDERS);
42
+ function isVoidSocialAuthProvider(value) {
43
+ return VOID_SOCIAL_AUTH_PROVIDER_SET.has(value);
44
+ }
45
+ function isVoidAuthProvider(value) {
46
+ return VOID_AUTH_PROVIDER_SET.has(value);
47
+ }
48
+ function getVoidAuthProviderEnvNames(provider) {
49
+ const normalized = provider.toUpperCase().replaceAll("-", "_");
50
+ const envNames = {
51
+ clientId: `AUTH_${normalized}_CLIENT_ID`,
52
+ clientSecret: `AUTH_${normalized}_CLIENT_SECRET`
53
+ };
54
+ if (provider === "github") return {
55
+ ...envNames,
56
+ legacyClientId: "GITHUB_OAUTH_ID",
57
+ legacyClientSecret: "GITHUB_OAUTH_SECRET"
58
+ };
59
+ if (provider === "google") return {
60
+ ...envNames,
61
+ legacyClientId: "GOOGLE_OAUTH_ID",
62
+ legacyClientSecret: "GOOGLE_OAUTH_SECRET"
63
+ };
64
+ return envNames;
65
+ }
66
+ //#endregion
67
+ export { isVoidSocialAuthProvider as a, isVoidAuthProvider as i, VOID_EMAIL_AUTH_PROVIDER as n, getVoidAuthProviderEnvNames as r, VOID_AUTH_PROVIDERS as t };
@@ -0,0 +1,29 @@
1
+ import { n as __exportAll } from "./chunk-DJd-R1mw.mjs";
2
+ import { a as join } from "./pathe.M-eThtNZ-D-kmWkCS.mjs";
3
+ import { readFileSync } from "node:fs";
4
+ //#region src/cli/resolve-project.ts
5
+ var resolve_project_exports = /* @__PURE__ */ __exportAll({
6
+ getRequestedProjectSlug: () => getRequestedProjectSlug,
7
+ inferDefaultSlug: () => inferDefaultSlug,
8
+ resolveProjectBySlug: () => resolveProjectBySlug
9
+ });
10
+ function getRequestedProjectSlug(options) {
11
+ const cliSlug = options?.projectSlug?.trim();
12
+ if (cliSlug) return cliSlug;
13
+ const envSlug = process.env.VOID_PROJECT?.trim();
14
+ if (envSlug) return envSlug;
15
+ return null;
16
+ }
17
+ function resolveProjectBySlug(projects, slug) {
18
+ const project = projects.find((candidate) => candidate.slug === slug);
19
+ return project ? {
20
+ projectId: project.id,
21
+ slug: project.slug
22
+ } : null;
23
+ }
24
+ function inferDefaultSlug(root) {
25
+ const pkgPath = join(root, "package.json");
26
+ return (JSON.parse(readFileSync(pkgPath, "utf-8")).name ?? "my-app").replace(/^@[^/]+\//, "").replace(/[^a-z0-9-]/g, "-");
27
+ }
28
+ //#endregion
29
+ export { resolve_project_exports as i, inferDefaultSlug as n, resolveProjectBySlug as r, getRequestedProjectSlug as t };