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.
- package/AGENT_PROMPT.md +15 -0
- package/README.md +62 -123
- package/dist/auth-BdsJ0Aff.d.mts +43 -0
- package/dist/auth-cmd-Dx8oPKZC.mjs +43 -0
- package/dist/auth-migrations-BAtAck2g.mjs +117 -0
- package/dist/better-auth-shared-C9_GHSkR.d.mts +71 -0
- package/dist/better-auth-shared-CdYmQGry.mjs +163 -0
- package/dist/cache-W82I8ihI.mjs +47 -0
- package/dist/cancel-deploy-BOBTqqh0.mjs +59 -0
- package/dist/cf-access-Dee5cXxL.mjs +22 -0
- package/dist/chunk-DJd-R1mw.mjs +34 -0
- package/dist/cli/cli.d.mts +1 -0
- package/dist/cli/cli.mjs +1807 -0
- package/dist/client-snXOjrp1.mjs +565 -0
- package/dist/collect-CjeZgz5D.mjs +55 -0
- package/dist/config-BIa9HwVX.mjs +573 -0
- package/dist/config-BzM9Dy7T.mjs +37 -0
- package/dist/config-CvHtTM0q.mjs +30 -0
- package/dist/create-project-BIA15W7z.mjs +90 -0
- package/dist/db-DsRoMcfN.mjs +895 -0
- package/dist/defer-DcxEsVH1.mjs +49 -0
- package/dist/delete-DAP6yDc7.mjs +64 -0
- package/dist/deploy-BPKblFx6.mjs +2424 -0
- package/dist/discover-B7FkXBLB.mjs +40 -0
- package/dist/dist-DUyXJLkq.mjs +2667 -0
- package/dist/dist-Dayj3gCK.mjs +1287 -0
- package/dist/domain-BGofcQ6I.mjs +79 -0
- package/dist/dotenv-DwO4ti0Z.mjs +173 -0
- package/dist/drizzle-NnudE_UN.mjs +232 -0
- package/dist/env-CyG3tvU0.mjs +301 -0
- package/dist/env-helpers-Dr9Y7RnE.d.mts +52 -0
- package/dist/env-raw-BDL4TvdN.mjs +32 -0
- package/dist/env-types-DknSA4SO.mjs +64 -0
- package/dist/env-validation-DJKjR_8q.mjs +163 -0
- package/dist/fetch-error-BQ8sZ5Nd.mjs +266 -0
- package/dist/fetch-error-CVZ5CGA-.d.mts +20 -0
- package/dist/gen-U0Ktr4Zd.mjs +761 -0
- package/dist/handler-B0ds0OHJ.d.mts +269 -0
- package/dist/head-P-egrtFE.d.mts +45 -0
- package/dist/headers-DCXc7mDs.mjs +279 -0
- package/dist/index.d.mts +32 -0
- package/dist/index.mjs +4695 -0
- package/dist/init-C7wS5iGP.mjs +2625 -0
- package/dist/link-p2R6NbgN.mjs +49 -0
- package/dist/list-Bfel-QLc.mjs +113 -0
- package/dist/log-DXdqnmhF.mjs +26 -0
- package/dist/login-CkcXUiIu.mjs +72 -0
- package/dist/logs-DmkrRvx6.mjs +98 -0
- package/dist/magic-string.es-D6g9UnIy.mjs +1011 -0
- package/dist/mcp-CaQzfeUi.mjs +373 -0
- package/dist/node-DDfXj10V.mjs +54 -0
- package/dist/output-BwlcIYSR.mjs +139 -0
- package/dist/pages/client.d.mts +198 -0
- package/dist/pages/client.mjs +980 -0
- package/dist/pages/head-client.d.mts +15 -0
- package/dist/pages/head-client.mjs +90 -0
- package/dist/pages/head.d.mts +2 -0
- package/dist/pages/head.mjs +112 -0
- package/dist/pages/index.d.mts +38 -0
- package/dist/pages/index.mjs +76 -0
- package/dist/pages/islands-plugin.d.mts +50 -0
- package/dist/pages/islands-plugin.mjs +195 -0
- package/dist/pages/prefetch.d.mts +31 -0
- package/dist/pages/prefetch.mjs +90 -0
- package/dist/pages/protocol.d.mts +3 -0
- package/dist/pages/protocol.mjs +193 -0
- package/dist/pages/serialize.d.mts +10 -0
- package/dist/pages/serialize.mjs +14 -0
- package/dist/pathe.M-eThtNZ-D-kmWkCS.mjs +150 -0
- package/dist/plugin-inference-oZ6Ybu2_.mjs +2447 -0
- package/dist/prepare-BAtWufvm.mjs +99 -0
- package/dist/preset-D4I73kT4.mjs +221 -0
- package/dist/project-TqORyHn8.mjs +72 -0
- package/dist/project-cmd-B7lQp3F3.mjs +67 -0
- package/dist/project-slug-CKam8lF9.mjs +11 -0
- package/dist/project-tsconfig-DfkESbDL.mjs +63 -0
- package/dist/protocol-BWzXs2A2.d.mts +34 -0
- package/dist/providers-B3aMxWzP.mjs +67 -0
- package/dist/resolve-project-Br5BR03U.mjs +29 -0
- package/dist/rollback-gyC59l7U.mjs +92 -0
- package/dist/route-types-DReF1gUY.mjs +255 -0
- package/dist/routes-stub.d.mts +55 -0
- package/dist/routes-stub.mjs +1 -0
- package/dist/runner-6Ep3fNQu.mjs +123 -0
- package/dist/runner-pg-D0wWHYnr.mjs +57 -0
- package/dist/runtime/ai.d.mts +127 -0
- package/dist/runtime/ai.mjs +348 -0
- package/dist/runtime/auth-client-react.d.mts +8 -0
- package/dist/runtime/auth-client-react.mjs +6 -0
- package/dist/runtime/auth-client-solid.d.mts +8 -0
- package/dist/runtime/auth-client-solid.mjs +6 -0
- package/dist/runtime/auth-client-svelte.d.mts +8 -0
- package/dist/runtime/auth-client-svelte.mjs +6 -0
- package/dist/runtime/auth-client-vue.d.mts +8 -0
- package/dist/runtime/auth-client-vue.mjs +6 -0
- package/dist/runtime/auth-client.d.mts +8 -0
- package/dist/runtime/auth-client.mjs +6 -0
- package/dist/runtime/auth.d.mts +2 -0
- package/dist/runtime/auth.mjs +22 -0
- package/dist/runtime/better-auth-pg.d.mts +11 -0
- package/dist/runtime/better-auth-pg.mjs +51 -0
- package/dist/runtime/better-auth.d.mts +11 -0
- package/dist/runtime/better-auth.mjs +33 -0
- package/dist/runtime/client.d.mts +6 -0
- package/dist/runtime/client.mjs +5 -0
- package/dist/runtime/db-pg.d.mts +2 -0
- package/dist/runtime/db-pg.mjs +1 -0
- package/dist/runtime/db.d.mts +17 -0
- package/dist/runtime/db.mjs +30 -0
- package/dist/runtime/drizzle-arktype.d.mts +1 -0
- package/dist/runtime/drizzle-arktype.mjs +2 -0
- package/dist/runtime/drizzle-valibot.d.mts +1 -0
- package/dist/runtime/drizzle-valibot.mjs +2 -0
- package/dist/runtime/drizzle-zod.d.mts +1 -0
- package/dist/runtime/drizzle-zod.mjs +2 -0
- package/dist/runtime/env-helpers.d.mts +2 -0
- package/dist/runtime/env-helpers.mjs +173 -0
- package/dist/runtime/env-public-client.d.mts +22 -0
- package/dist/runtime/env-public-client.mjs +54 -0
- package/dist/runtime/env-public.d.mts +143 -0
- package/dist/runtime/env-public.mjs +366 -0
- package/dist/runtime/env.d.mts +13 -0
- package/dist/runtime/env.mjs +51 -0
- package/dist/runtime/fetch-stream.d.mts +51 -0
- package/dist/runtime/fetch-stream.mjs +81 -0
- package/dist/runtime/fetch.d.mts +59 -0
- package/dist/runtime/fetch.mjs +18 -0
- package/dist/runtime/handler.d.mts +3 -0
- package/dist/runtime/handler.mjs +85 -0
- package/dist/runtime/isr.d.mts +26 -0
- package/dist/runtime/isr.mjs +43 -0
- package/dist/runtime/kv.d.mts +48 -0
- package/dist/runtime/kv.mjs +106 -0
- package/dist/runtime/log.d.mts +24 -0
- package/dist/runtime/log.mjs +31 -0
- package/dist/runtime/migration-handler-pg.d.mts +6 -0
- package/dist/runtime/migration-handler-pg.mjs +85 -0
- package/dist/runtime/migration-handler.d.mts +19 -0
- package/dist/runtime/migration-handler.mjs +92 -0
- package/dist/runtime/queues.d.mts +7 -0
- package/dist/runtime/queues.mjs +8 -0
- package/dist/runtime/remote/binding-handler.d.mts +15 -0
- package/dist/runtime/remote/binding-handler.mjs +208 -0
- package/dist/runtime/remote/index.d.mts +8 -0
- package/dist/runtime/remote/index.mjs +461 -0
- package/dist/runtime/response.d.mts +14 -0
- package/dist/runtime/response.mjs +30 -0
- package/dist/runtime/sandbox.d.mts +17 -0
- package/dist/runtime/sandbox.mjs +19 -0
- package/dist/runtime/schema-d1.d.mts +1 -0
- package/dist/runtime/schema-d1.mjs +2 -0
- package/dist/runtime/schema-pg.d.mts +1 -0
- package/dist/runtime/schema-pg.mjs +2 -0
- package/dist/runtime/seed.d.mts +30 -0
- package/dist/runtime/seed.mjs +6 -0
- package/dist/runtime/storage.d.mts +7 -0
- package/dist/runtime/storage.mjs +14 -0
- package/dist/runtime/validator.d.mts +2 -0
- package/dist/runtime/validator.mjs +72 -0
- package/dist/runtime/ws-server.d.mts +26 -0
- package/dist/runtime/ws-server.mjs +296 -0
- package/dist/runtime/ws.d.mts +123 -0
- package/dist/runtime/ws.mjs +103 -0
- package/dist/scan-Ba4hFwlH.mjs +324 -0
- package/dist/scan-C6HMEIdW.mjs +318 -0
- package/dist/secret-CeRSukgM.mjs +109 -0
- package/dist/skills-ipldjlKE.mjs +62 -0
- package/dist/standard-schema-9CRjx-uR.d.mts +42 -0
- package/dist/subcommand-prompt-BKjuNAPb.mjs +349 -0
- package/dist/sveltekit.d.mts +20 -0
- package/dist/sveltekit.mjs +61 -0
- package/dist/types-mHOEwpW4.d.mts +57 -0
- package/dist/validate-CaMavMxu.mjs +146 -0
- package/dist/yarn-pnp-BFqMV_bl.mjs +196 -0
- package/getting-started-prompt.txt +26 -0
- package/package.json +322 -30
- package/schema.json +364 -0
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
- package/skills/void/SKILL.md +75 -0
- package/skills/void/command/void.md +7 -0
- package/skills/void/docs/guide/ai.md +235 -0
- package/skills/void/docs/guide/app-types.md +103 -0
- package/skills/void/docs/guide/auth.md +257 -0
- package/skills/void/docs/guide/database/d1.md +106 -0
- package/skills/void/docs/guide/database/postgresql.md +106 -0
- package/skills/void/docs/guide/database.md +418 -0
- package/skills/void/docs/guide/deployment.md +98 -0
- package/skills/void/docs/guide/edge/headers.md +79 -0
- package/skills/void/docs/guide/edge/prerendering.md +83 -0
- package/skills/void/docs/guide/edge/redirects.md +116 -0
- package/skills/void/docs/guide/edge/revalidation.md +131 -0
- package/skills/void/docs/guide/edge/rewrites.md +354 -0
- package/skills/void/docs/guide/edge/static-assets.md +72 -0
- package/skills/void/docs/guide/env-vars.md +298 -0
- package/skills/void/docs/guide/index.md +80 -0
- package/skills/void/docs/guide/jobs.md +91 -0
- package/skills/void/docs/guide/kv.md +107 -0
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +419 -0
- package/skills/void/docs/guide/pages-routing/head.md +130 -0
- package/skills/void/docs/guide/pages-routing/islands.md +405 -0
- package/skills/void/docs/guide/pages-routing/layouts.md +362 -0
- package/skills/void/docs/guide/pages-routing/loaders.md +267 -0
- package/skills/void/docs/guide/pages-routing/markdown.md +625 -0
- package/skills/void/docs/guide/pages-routing/overview.md +236 -0
- package/skills/void/docs/guide/pages-routing/view-transitions.md +140 -0
- package/skills/void/docs/guide/queues.md +140 -0
- package/skills/void/docs/guide/quickstart.md +233 -0
- package/skills/void/docs/guide/remote-dev.md +67 -0
- package/skills/void/docs/guide/sandboxes.md +82 -0
- package/skills/void/docs/guide/server-routing.md +246 -0
- package/skills/void/docs/guide/ssg.md +74 -0
- package/skills/void/docs/guide/ssr.md +105 -0
- package/skills/void/docs/guide/storage.md +67 -0
- package/skills/void/docs/guide/type-safety.md +179 -0
- package/skills/void/docs/guide/typed-fetch.md +113 -0
- package/skills/void/docs/guide/websockets.md +190 -0
- package/skills/void/docs/index.md +48 -0
- package/skills/void/docs/integrations/agents.md +84 -0
- package/skills/void/docs/integrations/cloudflare.md +284 -0
- package/skills/void/docs/integrations/frameworks/analog.md +182 -0
- package/skills/void/docs/integrations/frameworks/astro.md +197 -0
- package/skills/void/docs/integrations/frameworks/nuxt.md +164 -0
- package/skills/void/docs/integrations/frameworks/overview.md +136 -0
- package/skills/void/docs/integrations/frameworks/react-router.md +137 -0
- package/skills/void/docs/integrations/frameworks/sveltekit.md +191 -0
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +140 -0
- package/skills/void/docs/integrations/hono.md +97 -0
- package/skills/void/docs/integrations/nodejs-bun-deno.md +210 -0
- package/skills/void/docs/node_modules/@iconify/vue/README.md +408 -0
- package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +5 -0
- package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +103 -0
- package/skills/void/docs/node_modules/oxc-minify/README.md +78 -0
- package/skills/void/docs/node_modules/reka-ui/README.md +80 -0
- package/skills/void/docs/node_modules/vitepress/README.md +28 -0
- package/skills/void/docs/node_modules/vitepress/template/api-examples.md +49 -0
- package/skills/void/docs/node_modules/vitepress/template/index.md +28 -0
- package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +85 -0
- package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +101 -0
- package/skills/void/docs/node_modules/void/AGENTS.md +204 -0
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +15 -0
- package/skills/void/docs/node_modules/void/README.md +89 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +591 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +375 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +174 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +37 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +135 -0
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +189 -0
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +143 -0
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +1272 -0
- package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +19 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +22 -0
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +69 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +152 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +24 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +565 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +124 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +600 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +386 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +95 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +101 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathe/README.md +73 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +25 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tsdown/README.md +55 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/LICENSE.md +2230 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/README.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +58 -0
- package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +32 -0
- package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +99 -0
- package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +108 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +79 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +44 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +65 -0
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +390 -0
- package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +48 -0
- package/skills/void/docs/node_modules/void/node_modules/hono/README.md +85 -0
- package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +452 -0
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/{LICENSE → skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md} +21 -21
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +364 -0
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +325 -0
- package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +398 -0
- package/skills/void/docs/node_modules/void/node_modules/pathe/README.md +73 -0
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +95 -0
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md +21 -0
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +135 -0
- package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +21 -0
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +25 -0
- package/skills/void/docs/node_modules/void/node_modules/tsdown/README.md +55 -0
- package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +94 -0
- package/skills/void/docs/node_modules/void/node_modules/vite/LICENSE.md +2230 -0
- package/skills/void/docs/node_modules/void/node_modules/vite/README.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +63 -0
- package/skills/void/docs/node_modules/void/node_modules/zod/README.md +191 -0
- package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +75 -0
- package/skills/void/docs/node_modules/void/skills/void/command/void.md +7 -0
- package/skills/void/docs/reference/api.md +917 -0
- package/skills/void/docs/reference/cli.md +561 -0
- package/skills/void/docs/reference/config.md +408 -0
- package/skills/void/docs/reference/resource-inference.md +149 -0
- package/skills/void/docs/reference/structure.md +176 -0
- package/.npmignore +0 -29
- package/.travis.yml +0 -9
- package/favicon.ico +0 -0
- package/index.js +0 -14
- package/lib/Job.js +0 -150
- package/lib/Void.js +0 -99
- package/lib/scan.js +0 -19
- package/test/credentials.js +0 -20
- package/test/job.js +0 -64
- package/test/static/dir1/test6.html +0 -0
- package/test/static/dir2/test7.html +0 -0
- package/test/static/dir2/test8.html +0 -0
- package/test/static/dir2/test9.html +0 -0
- package/test/static/test1.html +0 -0
- package/test/static/test2.html +0 -0
- package/test/static/test3.html +0 -0
- package/test/void.js +0 -31
- /package/{test/static/dir1/test4.html → skills/void/docs/integrations/auth-providers.md} +0 -0
- /package/{test/static/dir1/test5.html → skills/void/docs/integrations/payment-processors.md} +0 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# void
|
|
2
|
+
|
|
3
|
+
Core Vite plugin — routing, inference, migrations, CLI.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
The main export `voidPlugin()` returns an array of Vite plugins. For the default Cloudflare target, this includes the `cloudflare()` plugin. For non-CF targets (`node`, `bun`, `deno`), it replaces `cloudflare()` with `nodeTargetPlugin()`:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
# Cloudflare (default)
|
|
11
|
+
voidPlugin() → [routingPlugin, migrationPlugin, cloudflare({...inferredBindings})]
|
|
12
|
+
|
|
13
|
+
# Node.js / Bun / Deno
|
|
14
|
+
voidPlugin() → [routingPlugin, prerenderPlugin, nodeTargetPlugin()]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Non-CF targets disable CF-only bindings (`void/db`, `void/kv`, `void/auth`, `void/storage`, `void/ai`, `void/env`, `void/ws`) at compile time. The `nodeTargetPlugin` provides a binding guard (compile-time errors for CF imports), a Vite dev server middleware (SSR-loads the Hono app), and a build entry generator for the target runtime.
|
|
18
|
+
|
|
19
|
+
### Runtime Framework
|
|
20
|
+
|
|
21
|
+
**Hono** is used as the runtime framework. The generated virtual module creates a Hono app with file-based routes and middleware. Route handlers receive a Hono `Context` object (`c`) and can use the full Hono API (`c.json()`, `c.text()`, `c.req.param()`, etc.) plus the Hono middleware ecosystem.
|
|
22
|
+
|
|
23
|
+
- `defineHandler(fn)` — wraps a route handler `(c: CloudContext) => R`, returns `TypedHandler<{}, R>`
|
|
24
|
+
- `defineHandler.withValidator(validators)(fn)` — validates body/query/params via Standard Schema before calling handler, returns `TypedHandler<V, R>` with phantom types for codegen
|
|
25
|
+
- `defineMiddleware(fn)` — wraps Hono middleware `(c, next) => void`
|
|
26
|
+
- Handlers can return plain objects/strings (auto-converted via `convertReturnValue`) or use Hono's `c.json()` / `c.text()` directly.
|
|
27
|
+
- Route files use **named HTTP method exports** (`export const GET`, `export const POST`, etc.) — one file per path, multiple methods per file.
|
|
28
|
+
|
|
29
|
+
### Source Layout
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
src/
|
|
33
|
+
index.ts # Main export: voidPlugin() → Plugin[]
|
|
34
|
+
config.ts # readConfig(), VoidConfig, convertHeadersConfig(), redirect/header helpers
|
|
35
|
+
plugin-routing.ts # Virtual module resolution, file watching, HMR, type codegen
|
|
36
|
+
plugin-node-target.ts # Non-CF deploy targets (Node.js, Bun, Deno) — binding guard, dev server, build entry
|
|
37
|
+
plugin-inference.ts # Binding inference orchestration (calls walk.ts)
|
|
38
|
+
plugin-migration.ts # Local migration runner on dev startup
|
|
39
|
+
standard-schema.ts # Inlined Standard Schema V1 types (no @standard-schema/spec dep)
|
|
40
|
+
routes-stub.ts # Empty RouteMap/WebSocketRouteMap interfaces (augmented by generated routes.d.ts)
|
|
41
|
+
router/
|
|
42
|
+
parse-filename.ts # Route filename → RouteDefinition (pure function)
|
|
43
|
+
detect-exports.ts # Detects named HTTP method exports (GET, POST, etc.) via parseSync
|
|
44
|
+
websocket.ts # .ws.ts scanner + DO class metadata extraction
|
|
45
|
+
scan.ts # Filesystem scanner using tinyglobby + export detection
|
|
46
|
+
compile.ts # Generates Hono app code + worker entry + websocket wiring
|
|
47
|
+
codegen/
|
|
48
|
+
route-types.ts # Generates .void/routes.d.ts (RouteMap + WebSocketRouteMap)
|
|
49
|
+
db-types.ts # (removed — Drizzle schema is now the type source)
|
|
50
|
+
queue-types.ts # Generates .void/queues.d.ts (QueueMap with payload types)
|
|
51
|
+
queues/
|
|
52
|
+
scan.ts # Queue file scanner (queues/ dir, name from filename + consumer options)
|
|
53
|
+
runtime/
|
|
54
|
+
handler.ts # defineHandler(), defineHandler.withValidator(), defineMiddleware(), defineHead(), defineQueue()
|
|
55
|
+
queues.ts # QueueMap stub interface + typed `queues` proxy using env.QUEUE_*
|
|
56
|
+
validator.ts # runValidation() — Standard Schema body/query/params validation
|
|
57
|
+
response.ts # convertReturnValue() — return → Response
|
|
58
|
+
fetch.ts # Typed fetch client for void/client
|
|
59
|
+
fetch-stream.ts # SSE stream consumer (fetchStream) for void/client
|
|
60
|
+
ws.ts # defineRoom(), defineWebSocket(), typed connect() client
|
|
61
|
+
ws-server.ts # DO runtime helpers for generated websocket routes
|
|
62
|
+
ai.ts # AI proxy — auto-detects backend (service binding / HTTPS / direct binding)
|
|
63
|
+
db.ts # Drizzle D1 instance (auto-wired with user schema via virtual module)
|
|
64
|
+
inference/
|
|
65
|
+
walk.ts # AST walking with vite's parseSync + estree-walker
|
|
66
|
+
migrations/
|
|
67
|
+
runner.ts # Applies pending migrations via drizzle-orm's programmatic migrate()
|
|
68
|
+
collect.ts # Reads .sql files from db/migrations/ dir, sorted by filename
|
|
69
|
+
validate.ts # Destructive-op detection + pragma enforcement
|
|
70
|
+
cli/
|
|
71
|
+
cli.ts # CLI entry: `void deploy|link|login`
|
|
72
|
+
deploy.ts # Orchestrator: build → collect/validate migrations → package → upload
|
|
73
|
+
project.ts # Reads/creates .void/project.json (projectId + slug only)
|
|
74
|
+
auth.ts # Token read/save + runLogin() (local server + browser OAuth)
|
|
75
|
+
login.ts # Login command UI (@clack/prompts)
|
|
76
|
+
package.ts # Packages dist/ into FormData (worker + assets + migrations + manifest)
|
|
77
|
+
agents.ts # Shared agent configs, detection, MCP config targets
|
|
78
|
+
client.ts # HTTP client for platform API
|
|
79
|
+
types.ts # DeployManifest, MigrationMeta types
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Key Design Decisions
|
|
83
|
+
|
|
84
|
+
- **Import redirection**: The routing plugin's `resolveId` hook redirects bare `"void"` imports to `void/handler` (the lightweight subpath). Without this, route files pull the entire plugin (vite, @cloudflare/vite-plugin, lightningcss) into the Worker bundle. Uses `import.meta.resolve()` to compute absolute paths at plugin init.
|
|
85
|
+
- **Pre-resolved paths in codegen**: Generated virtual module code uses absolute paths for `hono` and `void/response` (resolved via `import.meta.resolve()`). Virtual modules have no filesystem location, so bare specifiers can't resolve from them.
|
|
86
|
+
- **CF plugin API**: Worker config (`main`, `d1_databases`, `kv_namespaces`, `r2_buckets`) goes inside the `config` option of `cloudflare()`, NOT as top-level properties. `persistState` takes `{ path: string }`, not a raw string. The `config` option uses a **function form** `(resolved: WorkerConfig) => Partial<WorkerConfig>` so that bindings from the user's `wrangler.json` (if present) take precedence over inferred placeholder bindings.
|
|
87
|
+
- **Migration DB path**: Miniflare stores D1 data at a deterministic path computed from the `database_id` using HMAC-SHA256. The `getMiniflareDatabasePath()` function in `migrations/runner.ts` replicates this algorithm so migrations target `<persist-root>/v3/d1/miniflare-D1DatabaseObject/<hash>.sqlite` (for example `.void/v3/...` in default/class-A mode and `.wrangler/state/v3/...` in class-B/C framework mode).
|
|
88
|
+
- **Drizzle-first database**: Schema is defined in `db/schema.ts` (Drizzle table definitions). `void/db` exports a Drizzle D1 instance. `@schema` is an auto-configured alias for `db/schema.ts`. Migrations live in `db/migrations/`. CLI commands: `void db push` (prototype), `void db generate` (create migration files), `void db migrate` (apply locally). `drizzle-orm` and `drizzle-kit` ship with void.
|
|
89
|
+
- **Journal coherence invariant**: `db/migrations/*.sql` and `db/migrations/meta/_journal.json` must stay in sync — every `.sql` file has a matching journal entry (by `tag`) and vice versa. `assertJournalCoherence` in `src/migrations/validate.ts` is the gate, called from `deploy`, `db status`, `db migrate`, and `db reset`. The two CLI commands that mutate migration state — `void gen migration` and `void db rename-migrations` — are responsible for keeping the journal coherent themselves: the first appends a new entry when writing a file (failing loud if the journal is missing — run `drizzle-kit generate` first), the second rewrites `tag` values alongside the file renames and also renames the matching `meta/<prefix>_snapshot.json` (with byte-level rollback on failure). `gen migration` additionally copies the previous `meta/<idx:04d>_snapshot.json` forward to the new idx so drizzle-kit's drop/rollback tooling keeps working on mixed hand-written + drizzle projects; projects without prior snapshots are skipped silently. Drift will fail loudly before touching any remote DB. Motivated by [void-sdk/void#6](https://github.com/void-sdk/void/issues/6), where an orphan scaffolded `.sql` file half-applied against D1 and wedged the deploy.
|
|
90
|
+
|
|
91
|
+
### Package Exports
|
|
92
|
+
|
|
93
|
+
| Subpath | What |
|
|
94
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `void` | `voidPlugin()` named export + `defineHandler` + `defineMiddleware` + `defineHead` + `defineQueue` + `CloudContext` type |
|
|
96
|
+
| `void/handler` | `defineHandler()`, `defineHandler.withValidator()`, `defineMiddleware()`, `defineHead()`, types |
|
|
97
|
+
| `void/response` | `convertReturnValue()` |
|
|
98
|
+
| `void/validator` | `runValidation()`, `ValidatorSlots`, `HandlerInput` types |
|
|
99
|
+
| `void/routes` | Empty `RouteMap` + `WebSocketRouteMap` stubs (augmented by generated `routes.d.ts`) |
|
|
100
|
+
| `void/client` | Typed `fetch()` client + `fetchStream()` SSE consumer + `FetchError` |
|
|
101
|
+
| `void/ws` | `defineRoom()`, `defineWebSocket()`, typed `connect()`, and WebSocket context types |
|
|
102
|
+
| `void/db` | `db` Drizzle D1 instance (auto-wired with user schema) + `createDb()` for custom D1 bindings |
|
|
103
|
+
| `void/queues` | `queues` typed proxy + `QueueMap` stub interface (augmented by generated `queues.d.ts`) |
|
|
104
|
+
| `void/ai` | `ai` proxy — `ai.run()`, `ai.stream()`, `ai.models()` with auto-detected backend (service binding / HTTPS / direct) |
|
|
105
|
+
| `void/log` | `logger.error/warn/info(msg, fields?)` — emits stringified JSON to `console.*` so Cloudflare Tail captures level + msg |
|
|
106
|
+
| `void/env` | `defineEnv()`, typed `env` proxy, built-in schema helpers (`string`, `number`, `oneOf`, …) + global Cloudflare types |
|
|
107
|
+
|
|
108
|
+
The CLI binary is at `dist/cli/cli.mjs` (declared in `bin` field of package.json).
|
|
109
|
+
|
|
110
|
+
### Internal Staging Projects
|
|
111
|
+
|
|
112
|
+
Internal-only staging is selected per linked project with `.void/project.json`:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"projectId": "proj_...",
|
|
117
|
+
"slug": "my-app",
|
|
118
|
+
"voidInternalStaging": true
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
A pre-link file containing only `{ "voidInternalStaging": true }` is valid for Void platform developers who need `void auth login` or `void project link` to target staging before a project is linked.
|
|
123
|
+
|
|
124
|
+
When `voidInternalStaging` is true:
|
|
125
|
+
|
|
126
|
+
- **Token**: reads/writes `stagingToken` in `~/.void/config.json` instead of `token`
|
|
127
|
+
- **API URL**: defaults to `https://api.void.cloud` (prod); when staging is active, uses `https://api.staging.void.cloud` (unless overridden by `VOID_API_URL` or `api` config field)
|
|
128
|
+
- **Site domain**: uses `staging.void.app` for generated project URLs
|
|
129
|
+
- **Proxy**: injects staging proxy bindings for local dev AI and prerendering
|
|
130
|
+
|
|
131
|
+
Build output uses `.mjs` / `.d.mts` extensions (tsdown 0.20.3 default).
|
|
132
|
+
|
|
133
|
+
### Route Filename Parsing Rules
|
|
134
|
+
|
|
135
|
+
Applied in order to a path relative to `routes/`:
|
|
136
|
+
|
|
137
|
+
1. Strip extension (`.ts`, `.js`, `.mts`, `.mjs`)
|
|
138
|
+
2. Strip env suffix (`.dev`, `.prod`)
|
|
139
|
+
3. Strip trailing `index`
|
|
140
|
+
4. Remove route group dirs `(groupname)`
|
|
141
|
+
5. Convert `[param]` → `:param`, `[...param]` → `:param{.+}`, `[...]` → `*`
|
|
142
|
+
6. Prefix with `/`
|
|
143
|
+
|
|
144
|
+
HTTP methods are determined by **named exports** in each file (detected by `detect-exports.ts` via `parseSync`), not by filename suffixes. Files/dirs starting with `_` are ignored by the scanner.
|
|
145
|
+
|
|
146
|
+
## Code Generation (`void gen`)
|
|
147
|
+
|
|
148
|
+
Rails/Laravel-style scaffolding commands for common boilerplate:
|
|
149
|
+
|
|
150
|
+
| Command | Creates |
|
|
151
|
+
| -------------------------------------------------- | ----------------------------------------------------------- |
|
|
152
|
+
| `void gen model <name> [cols...]` | Drizzle table in `db/schema/` + barrel export + CRUD routes |
|
|
153
|
+
| `void gen migration <name>` | Empty migration file with auto-numbered prefix |
|
|
154
|
+
| `void gen route <path> [--methods get,post,...]` | Route file with `defineHandler` exports |
|
|
155
|
+
| `void gen middleware <name>` | Numbered middleware file with `defineMiddleware` |
|
|
156
|
+
| `void gen ssr [--react\|--vue\|--svelte\|--solid]` | SSR entry + client entry + App component |
|
|
157
|
+
| `void gen cron <name>` | Cron job file with `defineScheduled` in `crons/` |
|
|
158
|
+
| `void gen queue <name>` | Queue consumer file with `defineQueue` |
|
|
159
|
+
|
|
160
|
+
Column types for `gen model`: `string`, `text`, `datetime` → `text()`, `integer` → `integer()`, `boolean` → `integer({ mode: "boolean" })`, `real` → `real()`. Append `?` for nullable (omits `.notNull()`).
|
|
161
|
+
|
|
162
|
+
`gen model` creates Drizzle table definitions in `db/schema/` and updates the `db/schema.ts` barrel export. Auto-detects your validation library (valibot, zod, or arktype) from `package.json`. If none is found, prompts to choose one or skip validation.
|
|
163
|
+
|
|
164
|
+
Source: `src/cli/gen-args.ts` (arg parsing), `src/cli/gen.ts` (command runner). Tests: `test/unit/gen-args.test.ts`, `test/unit/gen.test.ts`.
|
|
165
|
+
|
|
166
|
+
## Coding Agent Integration
|
|
167
|
+
|
|
168
|
+
Void ships with first-class support for coding agents (Claude Code, Cursor, Codex, etc.):
|
|
169
|
+
|
|
170
|
+
- **`AGENT_PROMPT.md`** — compressed reference prompt shipped in the `void` npm package. Covers project structure, routing, DB, auth, typed fetch, KV/storage/queues/cron, CLI, and deployment.
|
|
171
|
+
- **`skills/`** — Claude Code skills shipped in the npm package:
|
|
172
|
+
- `void` — unified app + CLI skill covering project architecture, runtime APIs, deployment flows, and CLI operations (deploy, db, gen, secrets, domains, projects) with lazy-loaded reference files.
|
|
173
|
+
- `migrate-cloudflare-to-void` — guides migration from `@cloudflare/vite-plugin` to `void`.
|
|
174
|
+
- **`docs/`** — all 23 docs markdown files are included in the npm package at `node_modules/void/docs/`.
|
|
175
|
+
- **`void init --agents`** — runs all agent setup steps from a single detection/selection pass: injects Void instructions with versioned markers, symlinks skills from the `void` package, and writes MCP config (or prints manual commands/JSON for unsupported/generic agents).
|
|
176
|
+
- **`void init` in an empty directory** — scaffolds a Pages-mode starter (React, Vue, Svelte, or Solid), then lets you pick D1, PostgreSQL, or Static Pages before running the same setup flow.
|
|
177
|
+
|
|
178
|
+
Agent instructions use versioned markers (`<!--injected-by-void-v0.0.1-->` / `<!--/injected-by-void-->`) for safe update-in-place across version upgrades.
|
|
179
|
+
|
|
180
|
+
## Tests
|
|
181
|
+
|
|
182
|
+
| Test file | Covers |
|
|
183
|
+
| ------------------------------------------- | -------------------------------------------------------------- |
|
|
184
|
+
| `test/unit/parse-filename.test.ts` | Route filename parsing (21 tests) |
|
|
185
|
+
| `test/unit/scan.test.ts` | Filesystem scanning + queue consumers (13 tests) |
|
|
186
|
+
| `test/unit/detect-exports.test.ts` | Named HTTP method export detection (8 tests) |
|
|
187
|
+
| `test/unit/compile.test.ts` | Code generation + queue routes (10 tests) |
|
|
188
|
+
| `test/unit/response.test.ts` | Return value → Response (8 tests) |
|
|
189
|
+
| `test/unit/inference.test.ts` | AST-based binding inference + queues + AI (19 tests) |
|
|
190
|
+
| `test/unit/fetch-stream.test.ts` | SSE stream consumer (fetchStream) (5 tests) |
|
|
191
|
+
| `test/unit/validate-migrations.test.ts` | Destructive-op detection + pragma (12 tests) |
|
|
192
|
+
| `test/unit/collect-migrations.test.ts` | Migration file collection (4 tests) |
|
|
193
|
+
| `test/unit/validator.test.ts` | Standard Schema validation runtime (8 tests) |
|
|
194
|
+
| `test/unit/validator-real-schemas.test.ts` | Real schema validation (zod/valibot/arktype) (16 tests) |
|
|
195
|
+
| `test/unit/define-handler.test.ts` | defineHandler + middleware composition (18 tests) |
|
|
196
|
+
| `test/unit/fetch.test.ts` | Typed fetch client (9 tests) |
|
|
197
|
+
| `test/unit/ws.test.ts` | Typed websocket client (3 tests) |
|
|
198
|
+
| `test/unit/route-types.test.ts` | Route type codegen output (6 tests) |
|
|
199
|
+
| `test/unit/route-type-extraction.test.ts` | Type extraction pipeline (Serialize + ExtractInput) (14 tests) |
|
|
200
|
+
| `test/unit/db.test.ts` | Drizzle D1 instance + schema wiring (25 tests) |
|
|
201
|
+
| `test/unit/queue-types.test.ts` | Queue type codegen output (3 tests) |
|
|
202
|
+
| `test/unit/plugin-node-target.test.ts` | Node target plugin — binding guard, plugin creation (5 tests) |
|
|
203
|
+
| `test/integration/node-target.test.ts` | Node app playground — dev server + production build (5 tests) |
|
|
204
|
+
| `test/integration/queue-playground.test.ts` | Queue send → consumer → KV round-trip (1 test) |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## Void
|
|
2
|
+
|
|
3
|
+
This project uses [Void](https://void.cloud) — a fullstack Vite plugin + deployment platform for Cloudflare. `voidPlugin()` in `vite.config.ts` gives you file-based API routing on Hono (`routes/`), Inertia-inspired server-rendered pages with co-located loaders/actions (`pages/` + `@void/vue` or `@void/react`), auto-provisioned D1/KV/R2 bindings, first-class Drizzle ORM integration (schema in `db/schema.ts` -> `void/db` Drizzle instance -> typed routes -> typed fetch client), built-in auth, queues, cron jobs, edge caching (ISR), and one-command deploys via `npx void deploy`. For first-time setup, prefer `npx void init`; in an empty directory, install `void` first and let the interactive flow scaffold the starter, add the matching framework adapter, configure project files, handle auth, and link or create the deploy project before the first deploy. In an existing app, `void init` configures Void in place by adding missing Vite scripts and creating or patching `vite.config.*` with `voidPlugin()`. Use `void` and `@void/*` package names in source code and package manifests.
|
|
4
|
+
|
|
5
|
+
Database: define Drizzle tables in `db/schema.ts`, import `db` from `void/db` and tables from `@schema`. Use `void db push` for prototyping, `void db generate` for production migrations. `drizzle-orm` and `drizzle-kit` ship with void (no extra install). Migrations live in `db/migrations/`.
|
|
6
|
+
|
|
7
|
+
Env: declare every env key in `env.ts` at the project root via `defineEnv({ KEY: string(), ... })` from `void/env`. Read values via `import { env } from "void/env"`. Schema validation runs at dev start (warns) and on `void deploy` (hard error on missing prod secrets). Use `VITE_*` prefix for keys that should be exposed to client code.
|
|
8
|
+
|
|
9
|
+
CI/editor prep: run `void prepare` to generate `.void/routes.d.ts`, `.void/db.d.ts`, `.void/queues.d.ts`, `.void/env.d.ts`, and `.void/tsconfig.json` without booting Vite. Run it after `npm install` in CI or a fresh clone before typechecking; `vite dev` and `vite build` regenerate these during normal workflows.
|
|
10
|
+
|
|
11
|
+
Rewrites and redirects: declare static rules in `void.json` under `routing.redirects` / `routing.rewrites` / `routing.fallbacks`, or in a `public/_redirects` file. For dynamic rewrites, call `c.rewrite(path)` in a `defineMiddleware`.
|
|
12
|
+
|
|
13
|
+
Logs: surface app-level errors that should show up under `void project logs --level error` via `import { logger } from "void/log"` and `logger.error(msg, fields?)` (also `.warn` / `.info`). Anything caught and only persisted to your own DB is invisible to Cloudflare Tail; route it through `logger.*` or `console.*` so the platform can see it.
|
|
14
|
+
|
|
15
|
+
Full docs are in `node_modules/void/docs/`. If you have the `void` skill available, use it for a complete API reference covering project structure, routing, pages mode, database, auth, typed fetch, KV, storage, queues, cron jobs, CLI, configuration, and deployment.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# void
|
|
2
|
+
|
|
3
|
+
Vite plugin and CLI for building and deploying apps on Void.
|
|
4
|
+
|
|
5
|
+
## What It Covers
|
|
6
|
+
|
|
7
|
+
- file-based API routes from `routes/`
|
|
8
|
+
- Pages mode from `pages/`
|
|
9
|
+
- typed Drizzle access via `void/db`
|
|
10
|
+
- `crons/` and `queues/`
|
|
11
|
+
- URL redirects, rewrites, and fallbacks (`void.json` / `public/_redirects`, plus `c.rewrite()` from middleware)
|
|
12
|
+
- binding inference for D1, KV, R2, AI, auth, and queues
|
|
13
|
+
- remote bindings for local development
|
|
14
|
+
- deploy packaging for Void-hosted apps, static sites, and supported meta-frameworks
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
Install the Void CLI:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -D void
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If you run `void init` in an empty directory, the scaffold flow adds the matching Pages adapter and Vite dependencies for you.
|
|
25
|
+
|
|
26
|
+
Then run `npx void init`. In an empty directory, the full interactive flow can scaffold a starter, configure local project files, log you in, and link or create your Void project so the next step is just `npx void deploy`. In an existing app, it configures Void in place by adding missing Vite scripts and creating or patching `vite.config.*` with `voidPlugin()`.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
// vite.config.ts
|
|
30
|
+
import { defineConfig } from 'vite';
|
|
31
|
+
import { voidPlugin } from 'void';
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
plugins: [voidPlugin()],
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Core Surfaces
|
|
39
|
+
|
|
40
|
+
- `voidPlugin()` — Vite integration, routing, pages mode, codegen, migrations, packaging
|
|
41
|
+
- `void prepare` — generate `.void` artifacts for CI, editors, and fresh clones
|
|
42
|
+
- `void auth login` — platform auth
|
|
43
|
+
- `void deploy` — build and deploy
|
|
44
|
+
- `void db *` — local DB and migration commands
|
|
45
|
+
- `void project *` — link, status, logs, rollback, delete
|
|
46
|
+
|
|
47
|
+
Runtime helpers include:
|
|
48
|
+
|
|
49
|
+
- `defineHandler`
|
|
50
|
+
- `defineMiddleware`
|
|
51
|
+
- `defineScheduled`
|
|
52
|
+
- `defineQueue`
|
|
53
|
+
- `void/db`
|
|
54
|
+
- `void/kv`
|
|
55
|
+
- `void/storage`
|
|
56
|
+
- `void/ai`
|
|
57
|
+
- `void/isr`
|
|
58
|
+
- `void/client`
|
|
59
|
+
- `void/auth`
|
|
60
|
+
|
|
61
|
+
## Supported App Shapes
|
|
62
|
+
|
|
63
|
+
- native Void apps (`routes/`, `pages/`, `middleware/`, `crons/`, `queues/`)
|
|
64
|
+
- supported meta-framework deploy targets:
|
|
65
|
+
- TanStack Start
|
|
66
|
+
- React Router
|
|
67
|
+
- SvelteKit
|
|
68
|
+
- Nuxt
|
|
69
|
+
- Astro
|
|
70
|
+
- static and SPA deploys
|
|
71
|
+
- non-Cloudflare server targets (`node`, `bun`, `deno`)
|
|
72
|
+
|
|
73
|
+
There is Vinext-specific source in the repo, but it is intentionally on hold and not part of the current public support matrix.
|
|
74
|
+
|
|
75
|
+
## Database Model
|
|
76
|
+
|
|
77
|
+
`void/db` is Drizzle-first.
|
|
78
|
+
|
|
79
|
+
- D1 is the default managed database target
|
|
80
|
+
- framework apps can opt into PostgreSQL mode
|
|
81
|
+
- route types, DB types, and queue types are generated into `.void/*.d.ts`
|
|
82
|
+
|
|
83
|
+
## Documentation
|
|
84
|
+
|
|
85
|
+
Full docs live at [void.cloud/docs](https://void.cloud/docs).
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT
|