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,20 @@
|
|
|
1
|
+
# Vite ⚡
|
|
2
|
+
|
|
3
|
+
> Next Generation Frontend Tooling
|
|
4
|
+
|
|
5
|
+
- 💡 Instant Server Start
|
|
6
|
+
- ⚡️ Lightning Fast HMR
|
|
7
|
+
- 🛠️ Rich Features
|
|
8
|
+
- 📦 Optimized Build
|
|
9
|
+
- 🔩 Universal Plugin Interface
|
|
10
|
+
- 🔑 Fully Typed APIs
|
|
11
|
+
|
|
12
|
+
Vite (French word for "quick", pronounced [`/viːt/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like "veet") is a build tool that aims to provide a faster and leaner development experience for modern web projects. It consists of two major parts:
|
|
13
|
+
|
|
14
|
+
- A dev server that provides [rich feature enhancements](https://vite.dev/guide/features) over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), for example extremely fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features#hot-module-replacement).
|
|
15
|
+
|
|
16
|
+
- A build command that bundles your code with [Rolldown](https://rolldown.rs), pre-configured to output highly optimized static assets for production.
|
|
17
|
+
|
|
18
|
+
In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.
|
|
19
|
+
|
|
20
|
+
[Read the Docs to Learn More](https://vite.dev).
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<h1 align="center"> ⛅️ wrangler </h1>
|
|
2
|
+
<section align="center" id="shieldio-badges">
|
|
3
|
+
<a href="https://www.npmjs.com/package/wrangler"><img alt="npm" src="https://img.shields.io/npm/dw/wrangler?style=flat-square"></a>
|
|
4
|
+
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/cloudflare/workers-sdk?style=flat-square">
|
|
5
|
+
<img alt="GitHub commit activity (branch)" src="https://img.shields.io/github/commit-activity/w/cloudflare/workers-sdk/main?style=flat-square">
|
|
6
|
+
<a href="https://discord.cloudflare.com"><img alt="Discord" src="https://img.shields.io/discord/595317990191398933?color=%23F48120&style=flat-square"></a>
|
|
7
|
+
</section>
|
|
8
|
+
|
|
9
|
+
`wrangler` is a command line tool for building [Cloudflare Workers](https://workers.cloudflare.com/).
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
To get started quickly with a Hello World worker, run the command below:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx wrangler init my-worker -y
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
For more info, visit our [Getting Started](https://developers.cloudflare.com/workers/get-started/guide/) guide.
|
|
20
|
+
|
|
21
|
+
<details><summary>Wrangler System Requirements</summary>
|
|
22
|
+
|
|
23
|
+
We support running the Wrangler CLI with the [Current, Active, and Maintenance](https://nodejs.org/en/about/previous-releases) versions of Node.js. Your Worker will always be executed in `workerd`, the open source Cloudflare Workers runtime.
|
|
24
|
+
|
|
25
|
+
Wrangler is only supported on macOS 13.5+, Windows 11, and Linux distros that support glib 2.35. This follows [`workerd`'s OS support policy](https://github.com/cloudflare/workerd?tab=readme-ov-file#running-workerd).
|
|
26
|
+
|
|
27
|
+
</details>
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
For the latest Wrangler documentation, [click here](https://developers.cloudflare.com/workers/wrangler/).
|
|
32
|
+
|
|
33
|
+
To read more about Workers in general:
|
|
34
|
+
|
|
35
|
+
- [Getting Started](https://developers.cloudflare.com/workers/get-started/guide/)
|
|
36
|
+
- [How Workers works](https://developers.cloudflare.com/workers/reference/how-workers-works/)
|
|
37
|
+
- [Observability](https://developers.cloudflare.com/workers/observability/)
|
|
38
|
+
- [Platform](https://developers.cloudflare.com/workers/platform/)
|
|
39
|
+
|
|
40
|
+
## Configuration
|
|
41
|
+
|
|
42
|
+
Wrangler is configured via a `wrangler.jsonc` (recommended), `wrangler.json` or `wrangler.toml` file in the project root. An example configuration generated by `npx wrangler init` or `npx create cloudflare` is as follows:
|
|
43
|
+
|
|
44
|
+
```jsonc
|
|
45
|
+
{
|
|
46
|
+
"$schema": "node_modules/wrangler/config-schema.json",
|
|
47
|
+
"name": "my-worker",
|
|
48
|
+
"main": "./src/index.ts",
|
|
49
|
+
"compatibility_date": "YYYY-MM-DD",
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
For more detailed information about configuration, refer to the [documentation](https://developers.cloudflare.com/workers/wrangler/configuration/).
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
|
|
57
|
+
The `wrangler` CLI offers various commands, the most popular being:
|
|
58
|
+
|
|
59
|
+
- `wrangler dev` to start a local development server, with live reloading and devtools.
|
|
60
|
+
|
|
61
|
+
- `wrangler deploy` to deploy a Worker to the Cloudflare's global network.
|
|
62
|
+
|
|
63
|
+
There are many more commands and options available, for a full list refer to the [official Cloudflare documentation](https://developers.cloudflare.com/workers/wrangler/commands/).
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="logo.svg" width="200px" align="center" alt="Zod logo" />
|
|
3
|
+
<h1 align="center">Zod</h1>
|
|
4
|
+
<p align="center">
|
|
5
|
+
TypeScript-first schema validation with static type inference
|
|
6
|
+
<br/>
|
|
7
|
+
by <a href="https://x.com/colinhacks">@colinhacks</a>
|
|
8
|
+
</p>
|
|
9
|
+
</p>
|
|
10
|
+
<br/>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://github.com/colinhacks/zod/actions?query=branch%3Amain"><img src="https://github.com/colinhacks/zod/actions/workflows/test.yml/badge.svg?event=push&branch=main" alt="Zod CI status" /></a>
|
|
14
|
+
<a href="https://opensource.org/licenses/MIT" rel="nofollow"><img src="https://img.shields.io/github/license/colinhacks/zod" alt="License"></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/zod" rel="nofollow"><img src="https://img.shields.io/npm/dw/zod.svg" alt="npm"></a>
|
|
16
|
+
<a href="https://discord.gg/KaSRdyX2vc" rel="nofollow"><img src="https://img.shields.io/discord/893487829802418277?label=Discord&logo=discord&logoColor=white" alt="discord server"></a>
|
|
17
|
+
<a href="https://github.com/colinhacks/zod" rel="nofollow"><img src="https://img.shields.io/github/stars/colinhacks/zod" alt="stars"></a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
<div align="center">
|
|
21
|
+
<a href="https://zod.dev/api">Docs</a>
|
|
22
|
+
<span> • </span>
|
|
23
|
+
<a href="https://discord.gg/RcG33DQJdf">Discord</a>
|
|
24
|
+
<span> • </span>
|
|
25
|
+
<a href="https://twitter.com/colinhacks">𝕏</a>
|
|
26
|
+
<span> • </span>
|
|
27
|
+
<a href="https://bsky.app/profile/zod.dev">Bluesky</a>
|
|
28
|
+
<br />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<br/>
|
|
32
|
+
<br/>
|
|
33
|
+
|
|
34
|
+
### [Read the docs →](https://zod.dev/api)
|
|
35
|
+
|
|
36
|
+
<br/>
|
|
37
|
+
<br/>
|
|
38
|
+
|
|
39
|
+
## What is Zod?
|
|
40
|
+
|
|
41
|
+
Zod is a TypeScript-first validation library. Define a schema and parse some data with it. You'll get back a strongly typed, validated result.
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import * as z from "zod";
|
|
45
|
+
|
|
46
|
+
const User = z.object({
|
|
47
|
+
name: z.string(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// some untrusted data...
|
|
51
|
+
const input = {
|
|
52
|
+
/* stuff */
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// the parsed result is validated and type safe!
|
|
56
|
+
const data = User.parse(input);
|
|
57
|
+
|
|
58
|
+
// so you can use it with confidence :)
|
|
59
|
+
console.log(data.name);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
<br/>
|
|
63
|
+
|
|
64
|
+
## Features
|
|
65
|
+
|
|
66
|
+
- Zero external dependencies
|
|
67
|
+
- Works in Node.js and all modern browsers
|
|
68
|
+
- Tiny: `2kb` core bundle (gzipped)
|
|
69
|
+
- Immutable API: methods return a new instance
|
|
70
|
+
- Concise interface
|
|
71
|
+
- Works with TypeScript and plain JS
|
|
72
|
+
- Built-in JSON Schema conversion
|
|
73
|
+
- Extensive ecosystem
|
|
74
|
+
|
|
75
|
+
<br/>
|
|
76
|
+
|
|
77
|
+
## Installation
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
npm install zod
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
<br/>
|
|
84
|
+
|
|
85
|
+
## Basic usage
|
|
86
|
+
|
|
87
|
+
Before you can do anything else, you need to define a schema. For the purposes of this guide, we'll use a simple object schema.
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import * as z from "zod";
|
|
91
|
+
|
|
92
|
+
const Player = z.object({
|
|
93
|
+
username: z.string(),
|
|
94
|
+
xp: z.number(),
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Parsing data
|
|
99
|
+
|
|
100
|
+
Given any Zod schema, use `.parse` to validate an input. If it's valid, Zod returns a strongly-typed _deep clone_ of the input.
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
Player.parse({ username: "billie", xp: 100 });
|
|
104
|
+
// => returns { username: "billie", xp: 100 }
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](https://zod.dev/api#refinements) or [transforms](https://zod.dev/api#transforms), you'll need to use the `.parseAsync()` method instead.
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
const schema = z.string().refine(async (val) => val.length <= 8);
|
|
111
|
+
|
|
112
|
+
await schema.parseAsync("hello");
|
|
113
|
+
// => "hello"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Handling errors
|
|
117
|
+
|
|
118
|
+
When validation fails, the `.parse()` method will throw a `ZodError` instance with granular information about the validation issues.
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
try {
|
|
122
|
+
Player.parse({ username: 42, xp: "100" });
|
|
123
|
+
} catch (err) {
|
|
124
|
+
if (err instanceof z.ZodError) {
|
|
125
|
+
err.issues;
|
|
126
|
+
/* [
|
|
127
|
+
{
|
|
128
|
+
expected: 'string',
|
|
129
|
+
code: 'invalid_type',
|
|
130
|
+
path: [ 'username' ],
|
|
131
|
+
message: 'Invalid input: expected string'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
expected: 'number',
|
|
135
|
+
code: 'invalid_type',
|
|
136
|
+
path: [ 'xp' ],
|
|
137
|
+
message: 'Invalid input: expected number'
|
|
138
|
+
}
|
|
139
|
+
] */
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
To avoid a `try/catch` block, you can use the `.safeParse()` method to get back a plain result object containing either the successfully parsed data or a `ZodError`. The result type is a [discriminated union](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions), so you can handle both cases conveniently.
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
const result = Player.safeParse({ username: 42, xp: "100" });
|
|
148
|
+
if (!result.success) {
|
|
149
|
+
result.error; // ZodError instance
|
|
150
|
+
} else {
|
|
151
|
+
result.data; // { username: string; xp: number }
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](https://zod.dev/api#refinements) or [transforms](https://zod.dev/api#transforms), you'll need to use the `.safeParseAsync()` method instead.
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
const schema = z.string().refine(async (val) => val.length <= 8);
|
|
159
|
+
|
|
160
|
+
await schema.safeParseAsync("hello");
|
|
161
|
+
// => { success: true; data: "hello" }
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Inferring types
|
|
165
|
+
|
|
166
|
+
Zod infers a static type from your schema definitions. You can extract this type with the `z.infer<>` utility and use it however you like.
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
const Player = z.object({
|
|
170
|
+
username: z.string(),
|
|
171
|
+
xp: z.number(),
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// extract the inferred type
|
|
175
|
+
type Player = z.infer<typeof Player>;
|
|
176
|
+
|
|
177
|
+
// use it in your code
|
|
178
|
+
const player: Player = { username: "billie", xp: 100 };
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
In some cases, the input & output types of a schema can diverge. For instance, the `.transform()` API can convert the input from one type to another. In these cases, you can extract the input and output types independently:
|
|
182
|
+
|
|
183
|
+
```ts
|
|
184
|
+
const mySchema = z.string().transform((val) => val.length);
|
|
185
|
+
|
|
186
|
+
type MySchemaIn = z.input<typeof mySchema>;
|
|
187
|
+
// => string
|
|
188
|
+
|
|
189
|
+
type MySchemaOut = z.output<typeof mySchema>; // equivalent to z.infer<typeof mySchema>
|
|
190
|
+
// number
|
|
191
|
+
```
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-cloudflare-to-void
|
|
3
|
+
description: Migrate an existing Vite app using @cloudflare/vite-plugin to Vite + void. Use when a project already runs on Cloudflare Workers but needs Void file-based routes, inferred bindings, and void deploy workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Migrate Vite + Cloudflare Plugin to Void
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
Use this skill when the user has an existing Vite app with `@cloudflare/vite-plugin` and wants to migrate to `void` with minimal breakage.
|
|
11
|
+
|
|
12
|
+
Do not use this for greenfield apps started via `npm install -D void` + `npx void init`.
|
|
13
|
+
|
|
14
|
+
## Inputs to gather first
|
|
15
|
+
|
|
16
|
+
Read these files before editing:
|
|
17
|
+
|
|
18
|
+
- `package.json`
|
|
19
|
+
- `vite.config.*`
|
|
20
|
+
- `wrangler.jsonc` (if present)
|
|
21
|
+
- Current worker entrypoint (`src/worker.*`, `src/index.*`, etc.)
|
|
22
|
+
- Any existing API handlers and migration SQL files
|
|
23
|
+
|
|
24
|
+
Confirm:
|
|
25
|
+
|
|
26
|
+
- existing routes/endpoints and HTTP methods
|
|
27
|
+
- bindings currently used (`DB`, `KV`, `R2`, etc.)
|
|
28
|
+
- whether the app uses framework SSR or only SPA + API
|
|
29
|
+
|
|
30
|
+
## Migration workflow
|
|
31
|
+
|
|
32
|
+
1. Update dependencies
|
|
33
|
+
|
|
34
|
+
- Remove `@cloudflare/vite-plugin` if it is only used for runtime/deploy.
|
|
35
|
+
- Add `void`.
|
|
36
|
+
- Keep existing framework plugins (React/Vue/Svelte/etc.).
|
|
37
|
+
|
|
38
|
+
2. Update Vite config
|
|
39
|
+
|
|
40
|
+
- Replace `cloudflare(...)` plugin usage with `voidPlugin()`.
|
|
41
|
+
- Keep plugin order stable unless there is a known conflict.
|
|
42
|
+
- Keep unrelated Vite settings unchanged.
|
|
43
|
+
|
|
44
|
+
Target shape:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import { defineConfig } from 'vite';
|
|
48
|
+
import { voidPlugin } from 'void';
|
|
49
|
+
|
|
50
|
+
export default defineConfig({
|
|
51
|
+
plugins: [voidPlugin()],
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
3. Migrate API surface to file-based routes
|
|
56
|
+
|
|
57
|
+
- Create `routes/` if missing.
|
|
58
|
+
- Convert each existing endpoint into route files:
|
|
59
|
+
- `routes/api/users.get.ts`
|
|
60
|
+
- `routes/api/users.post.ts`
|
|
61
|
+
- `routes/api/users/[id].get.ts`
|
|
62
|
+
- Use `defineHandler` from `void`.
|
|
63
|
+
- If there is shared logic, move it into regular modules and import from route files.
|
|
64
|
+
|
|
65
|
+
4. Migrate middleware
|
|
66
|
+
|
|
67
|
+
- Move request-wide middleware to `middleware/*.ts`.
|
|
68
|
+
- Export with `defineMiddleware`.
|
|
69
|
+
- Preserve behavior order by filename prefix when needed (`01.auth.ts`, `02.logger.ts`).
|
|
70
|
+
|
|
71
|
+
5. Preserve bindings with Void conventions
|
|
72
|
+
|
|
73
|
+
- Keep Cloudflare-style uppercase names on `c.env` (`DB`, `KV`, `STORAGE`, etc.).
|
|
74
|
+
- Remove manual binding config from Vite plugin config where Void now infers usage.
|
|
75
|
+
- Ensure route code actually references required bindings so inference can detect them.
|
|
76
|
+
|
|
77
|
+
6. Migrations
|
|
78
|
+
|
|
79
|
+
- Place SQL files in `migrations/` (sorted by filename).
|
|
80
|
+
- Keep destructive operations gated by explicit pragma if needed.
|
|
81
|
+
- If old migrations live elsewhere, copy/rename into this directory with stable ordering.
|
|
82
|
+
|
|
83
|
+
7. Deploy workflow migration
|
|
84
|
+
|
|
85
|
+
- Replace old deploy instructions with:
|
|
86
|
+
- `void auth login`
|
|
87
|
+
- `void deploy`
|
|
88
|
+
- If CI must target a specific project, use:
|
|
89
|
+
- `void deploy --project <slug>`
|
|
90
|
+
- or `VOID_PROJECT=<slug> void deploy`
|
|
91
|
+
|
|
92
|
+
8. Post-migration cleanup (remove obsolete Wrangler wiring)
|
|
93
|
+
|
|
94
|
+
- If the app no longer uses direct Wrangler workflows, remove `wrangler.jsonc`.
|
|
95
|
+
- Remove direct `wrangler` dependency/devDependency from `package.json` when it is only used for old deploy/dev scripts.
|
|
96
|
+
- Remove or rewrite npm scripts that call `wrangler` directly (for example old deploy/publish scripts).
|
|
97
|
+
- Keep Wrangler only if the project still has explicit non-Void workflows that require it.
|
|
98
|
+
|
|
99
|
+
## Routing behavior reference (use during file conversion)
|
|
100
|
+
|
|
101
|
+
Apply these filename rules exactly when mapping old handlers to `routes/`:
|
|
102
|
+
|
|
103
|
+
1. Extension and suffix parsing order
|
|
104
|
+
|
|
105
|
+
- Strip extension (`.ts`, `.js`, `.mts`, `.mjs`).
|
|
106
|
+
- Strip env suffix (`.dev`, `.prod`).
|
|
107
|
+
- Strip HTTP method suffix (`.get`, `.post`, `.put`, `.delete`, `.patch`).
|
|
108
|
+
- Strip trailing `index` segment.
|
|
109
|
+
- Remove route group segments `(group-name)` from URL path.
|
|
110
|
+
|
|
111
|
+
2. Method mapping
|
|
112
|
+
|
|
113
|
+
- `users.get.ts` matches only `GET /users`.
|
|
114
|
+
- `users.post.ts` matches only `POST /users`.
|
|
115
|
+
- `users.ts` matches all methods.
|
|
116
|
+
- Split multi-method handlers into one file per method when preserving behavior matters.
|
|
117
|
+
|
|
118
|
+
3. Dynamic and catch-all params
|
|
119
|
+
|
|
120
|
+
- `[id]` -> `:id`
|
|
121
|
+
- `[...slug]` -> catch-all named param
|
|
122
|
+
- `[...]` -> catch-all unnamed fallback
|
|
123
|
+
- Use folder nesting for multiple params: `routes/api/org/[org]/repo/[repo].get.ts`.
|
|
124
|
+
|
|
125
|
+
4. Route groups and organization
|
|
126
|
+
|
|
127
|
+
- Directories like `(internal)` are for code organization only and do not appear in URL.
|
|
128
|
+
- Use them when reorganizing large route sets without changing public paths.
|
|
129
|
+
|
|
130
|
+
5. Ignored files
|
|
131
|
+
|
|
132
|
+
- Files or directories starting with `_` are ignored by route scanner.
|
|
133
|
+
- Do not place active handlers under `_legacy`, `_draft`, etc.
|
|
134
|
+
|
|
135
|
+
6. Middleware behavior
|
|
136
|
+
|
|
137
|
+
- Middleware files live in `middleware/` and run in filename order.
|
|
138
|
+
- Prefix numerically if order is important (`01.auth.ts`, `02.logger.ts`).
|
|
139
|
+
|
|
140
|
+
7. Concrete mapping examples
|
|
141
|
+
|
|
142
|
+
- `src/worker.ts` handling `GET /api/users/:id` -> `routes/api/users/[id].get.ts`
|
|
143
|
+
- single handler switching on method for `/api/users` -> `routes/api/users.get.ts` and `routes/api/users.post.ts`
|
|
144
|
+
- legacy `GET /health` endpoint -> `routes/health.get.ts`
|
|
145
|
+
|
|
146
|
+
## Verification checklist
|
|
147
|
+
|
|
148
|
+
Run and validate:
|
|
149
|
+
|
|
150
|
+
1. `npm run dev` (or project dev command)
|
|
151
|
+
2. Exercise representative API routes locally.
|
|
152
|
+
3. `npm run build`
|
|
153
|
+
4. `void deploy` and verify live URL responds.
|
|
154
|
+
5. Confirm no deploy-critical scripts still depend on `wrangler`.
|
|
155
|
+
|
|
156
|
+
In the Void deploy output, verify:
|
|
157
|
+
|
|
158
|
+
- worker modules uploaded
|
|
159
|
+
- static assets uploaded
|
|
160
|
+
- migrations applied (if present)
|
|
161
|
+
|
|
162
|
+
## Common migration pitfalls
|
|
163
|
+
|
|
164
|
+
- Importing from the main `void` runtime in worker route files when a lighter handler import is expected by tooling.
|
|
165
|
+
- Forgetting to split method-specific handlers (`GET`/`POST`) into filename suffixes.
|
|
166
|
+
- Keeping old custom worker entry wiring that conflicts with generated route runtime.
|
|
167
|
+
- Binding names changed to lowercase (`db`) instead of expected uppercase (`DB`), breaking inference/provisioning.
|
|
168
|
+
|
|
169
|
+
## Deliverable format
|
|
170
|
+
|
|
171
|
+
When applying this migration, produce:
|
|
172
|
+
|
|
173
|
+
1. A change summary grouped by config/routes/migrations/CI.
|
|
174
|
+
2. A list of moved or newly created route files.
|
|
175
|
+
3. Exact commands to run locally and in CI.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: void
|
|
3
|
+
description: Void skill for app development and CLI operations. Use this skill to route user requests to the appropriate bundled Void docs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Void Skill
|
|
7
|
+
|
|
8
|
+
This skill is a router. Open the minimum relevant docs files under `docs/` and execute.
|
|
9
|
+
|
|
10
|
+
Docs in this skill are bundled from `docs/` during `void` package build and live at:
|
|
11
|
+
|
|
12
|
+
- `skills/void/docs/**/*.md`
|
|
13
|
+
|
|
14
|
+
## Command Naming
|
|
15
|
+
|
|
16
|
+
Use `void` in examples and commands in this skill. For first-time setup, prefer `void init` followed by `void deploy`; in an empty directory, install `void` first and let `void init` add the matching Pages adapter and starter dependencies. In an existing app, `void init` configures Void in place by adding missing Vite scripts and creating or patching `vite.config.*` with `voidPlugin()`. `void init` can also handle auth and project linking interactively.
|
|
17
|
+
|
|
18
|
+
Use `void` and `@void/*` in code examples and package manifests.
|
|
19
|
+
|
|
20
|
+
## No-Args Behavior
|
|
21
|
+
|
|
22
|
+
If invoked without a concrete task, do a brief app status check and report:
|
|
23
|
+
|
|
24
|
+
1. App type (`void`, `framework`, `spa`, `static`) using `docs/app-types.md` criteria.
|
|
25
|
+
2. Backend feature usage (`routes/`, `pages/`, `middleware/`, `migrations/`, `crons/`, `queues/`, SSR entries).
|
|
26
|
+
3. Runtime signals (`void/db`, `void/kv`, `void/storage`, queue usage).
|
|
27
|
+
4. Auth signals (`void/auth`, `auth` client imports, OAuth env vars).
|
|
28
|
+
5. Project linkage (`.void/project.json`) and config readiness (`void.json`, tsconfig extends).
|
|
29
|
+
6. Optional health checks (`void auth whoami`, `void db status` when relevant).
|
|
30
|
+
|
|
31
|
+
Then ask what to do next.
|
|
32
|
+
|
|
33
|
+
## Task Routing
|
|
34
|
+
|
|
35
|
+
| User intent | Docs file(s) |
|
|
36
|
+
| ----------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
37
|
+
| CLI command syntax, flags, env vars | `docs/reference/cli.md` |
|
|
38
|
+
| Initial setup, onboarding, first app | `docs/guide/quickstart.md`, `docs/reference/cli.md` |
|
|
39
|
+
| App type detection and mode behavior | `docs/guide/app-types.md`, `docs/reference/config.md` |
|
|
40
|
+
| Server/API routing and middleware | `docs/guide/server-routing.md`, `docs/integrations/hono.md` |
|
|
41
|
+
| Pages mode, loader/action, forms, layouts | `docs/guide/pages-routing/*.md`, `docs/guide/type-safety.md` |
|
|
42
|
+
| Database and migrations | `docs/guide/database.md`, `docs/guide/type-safety.md` |
|
|
43
|
+
| Typed fetch and end-to-end typing | `docs/guide/typed-fetch.md`, `docs/guide/type-safety.md` |
|
|
44
|
+
| Authentication | `docs/guide/auth.md`, `docs/guide/env-vars.md` |
|
|
45
|
+
| Cloudflare runtime bindings and config | `docs/integrations/cloudflare.md`, `docs/reference/config.md`, `docs/guide/env-vars.md` |
|
|
46
|
+
| AI inference (Workers AI, providers) | `docs/guide/ai.md` |
|
|
47
|
+
| KV / storage / queues / cron jobs | `docs/guide/kv.md`, `docs/guide/storage.md`, `docs/guide/queues.md`, `docs/guide/jobs.md` |
|
|
48
|
+
| SSR and caching | `docs/guide/ssr.md`, `docs/guide/edge/*.md` |
|
|
49
|
+
| Rewrites, redirects, fallbacks | `docs/guide/edge/rewrites.md`, `docs/guide/edge/redirects.md`, `docs/reference/config.md` |
|
|
50
|
+
| Static site generation | `docs/guide/ssg.md` |
|
|
51
|
+
| Deployment and CI | `docs/guide/deployment.md`, `docs/reference/cli.md` |
|
|
52
|
+
| Project status, deployment history | `docs/reference/cli.md` |
|
|
53
|
+
| Cache purging | `docs/reference/cli.md` |
|
|
54
|
+
| Project logs, runtime errors | `docs/reference/cli.md` |
|
|
55
|
+
| Secrets management (put/sync/delete) | `docs/reference/cli.md`, `docs/guide/env-vars.md` |
|
|
56
|
+
| Typed env vars (`defineEnv`, `env.ts`) | `docs/guide/env-vars.md` |
|
|
57
|
+
| Custom domain setup | `docs/reference/cli.md` |
|
|
58
|
+
| Database status, reset, seed, export | `docs/reference/cli.md`, `docs/guide/database.md` |
|
|
59
|
+
| Auth login/logout/whoami | `docs/reference/cli.md` |
|
|
60
|
+
| Overview / introduction | `docs/guide/index.md` |
|
|
61
|
+
| API surface details | `docs/reference/api.md` |
|
|
62
|
+
| Meta framework integration | `docs/integrations/frameworks/*.md` |
|
|
63
|
+
| Coding agent setup | `docs/integrations/agents.md` |
|
|
64
|
+
| Node.js / Bun / Deno targets | `docs/integrations/nodejs-bun-deno.md` |
|
|
65
|
+
| ORMs and external databases | `docs/integrations/orms-and-external-dbs.md` |
|
|
66
|
+
| Project structure and conventions | `docs/reference/structure.md` |
|
|
67
|
+
| Resource/binding inference | `docs/reference/resource-inference.md` |
|
|
68
|
+
|
|
69
|
+
## Working Rules
|
|
70
|
+
|
|
71
|
+
- For any task involving running `void` commands — including checking status, managing secrets, viewing logs, or deploying — open `docs/reference/cli.md` FIRST. Do not guess command syntax.
|
|
72
|
+
- Never guess or infer `void` CLI command names or flags. Always consult `docs/reference/cli.md` for the exact command before running it.
|
|
73
|
+
- For multi-topic tasks, combine only the needed doc files.
|
|
74
|
+
- If docs and memory differ, follow docs.
|
|
75
|
+
- **Env vars:** When the project has `env.ts`, the canonical access pattern is `import { env } from "void/env"`. Declare every env key in `env.ts` via `defineEnv({...})` so values are typed and validated. Do not introduce ad-hoc `process.env.X` or untyped `c.env.X` access in new code — add the key to `env.ts` first.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# `/void` Command Flow
|
|
2
|
+
|
|
3
|
+
1. Open `SKILL.md`.
|
|
4
|
+
2. If no task/arguments are provided, run the brief app status check from `SKILL.md`.
|
|
5
|
+
3. If a task is provided, route to the smallest relevant set of `docs/*.md` files.
|
|
6
|
+
4. For CLI syntax and flags, always use `docs/cli.md`.
|
|
7
|
+
5. Execute, verify, and report concise next actions.
|