void 0.10.13 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_TEMPLATE.md +6 -0
- package/{skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md → LICENSE} +1 -1
- package/README.md +34 -8
- package/dist/{auth-qgMlYp7Z.d.mts → auth-DkcFflXV.d.mts} +10 -11
- package/dist/auth-W9WII-mN.mjs +630 -0
- package/dist/{auth-cmd-BqsdZJp5.mjs → auth-cmd-CAH62yDU.mjs} +4 -3
- package/dist/{auth-migrations-BTZ-ATvQ.mjs → auth-migrations-9vif1uj8.mjs} +53 -12
- package/dist/{better-auth-shared-BQooDxbw.mjs → better-auth-shared-CYw1T3k4.mjs} +7 -10
- package/dist/{better-auth-shared-DealXecJ.d.mts → better-auth-shared-DSCeohOK.d.mts} +10 -5
- package/dist/{build-cmd-Bujrv5q-.mjs → build-cmd-CJvZvPQO.mjs} +6 -4
- package/dist/{cache-C11V8Fxq.mjs → cache-BlNeQjuP.mjs} +9 -5
- package/dist/{cancel-deploy-fwFYF04b.mjs → cancel-deploy-CmlAZ9P6.mjs} +3 -2
- package/dist/cf-access-AJ1ehiFR.mjs +42 -0
- package/dist/cf-access-DsSsZUPr.mjs +67 -0
- package/dist/cli/cli.d.mts +1 -1
- package/dist/cli/cli.mjs +1735 -165
- package/dist/cli/env-schema-probe.d.mts +48 -61
- package/dist/cli/env-schema-probe.mjs +10 -58
- package/dist/{client-Gb71-XkG.mjs → client-Clirrol3.mjs} +120 -463
- package/dist/cloudflare-auth-B1QtTO1b.mjs +217 -0
- package/dist/cloudflare-cmd-B6_OZx2V.mjs +62 -0
- package/dist/cloudflare-connect-j5D4hhrG.mjs +56 -0
- package/dist/cloudflare-operations-CPTpRW6d.mjs +566 -0
- package/dist/{config-qHGgPuWT.mjs → config-BQFq7QvD.mjs} +75 -41
- package/dist/{config-CutEMNGJ.mjs → config-NOG_U1aK.mjs} +10 -15
- package/dist/connect-C04Wdy_h.mjs +79 -0
- package/dist/{create-project-DsYvl3TB.mjs → create-project-ChGZ1DFd.mjs} +26 -16
- package/dist/database-provider.d.mts +21 -0
- package/dist/database-provider.mjs +6 -0
- package/dist/{db-C0i0sYMS.mjs → db-D2d_mUsB.mjs} +612 -117
- package/dist/{delete-mh6p-zkQ.mjs → delete-D8GigDk8.mjs} +9 -6
- package/dist/{deploy-jBJT1fUT.mjs → deploy-iXZ3F0N6.mjs} +3252 -1995
- package/dist/dev-inbox-DkgRWLkW.mjs +307 -0
- package/dist/{discover-CJHyvYfR.mjs → discover-xvfrgJeo.mjs} +3 -3
- package/dist/{magic-string.es-ZQjdJFFn.mjs → dist-BR1quN_w.mjs} +570 -216
- package/dist/{dist-DaKKDf8D.mjs → dist-BrsS7cai.mjs} +17 -2
- package/dist/{dist-BuiRJkTd.mjs → dist-m40_XgNh.mjs} +48 -33
- package/dist/{domain-DiaNQbrl.mjs → domain-B1VmoSr0.mjs} +41 -4
- package/dist/dotenv-VQxupEUv.mjs +181 -0
- package/dist/edge.d.mts +2 -0
- package/dist/edge.mjs +2 -0
- package/dist/email-Ce6SQq-i.mjs +182 -0
- package/dist/email-uKyQYUVY.mjs +1016 -0
- package/dist/{entry-D7yy4xVH.mjs → entry-DU3oDoQ3.mjs} +2 -2
- package/dist/env-BcQzYgoG.mjs +73 -0
- package/dist/env-D4Emu-M_.mjs +95 -0
- package/dist/env-helpers-CyKtOBpj.d.mts +22 -0
- package/dist/env-public-D_6u46fX.d.mts +135 -0
- package/dist/{env-types-QBj-ndax.mjs → env-types-BNPhro-M.mjs} +2 -2
- package/dist/{env-validation-Dea3v3ej.mjs → env-validation-ENpMy6Ez.mjs} +68 -122
- package/dist/{gen-BzXf3Jh2.mjs → gen-DI2YwdBM.mjs} +70 -15
- package/dist/generate-RTK8_kK1.mjs +47 -0
- package/dist/{github-cmd-DKcGUNsj.mjs → github-cmd-xItS5Zwf.mjs} +39 -31
- package/dist/{handler-Cjh8uM3Y.d.mts → handler-D1hLsObx.d.mts} +124 -122
- package/dist/{head-nmvOgFjd.d.mts → head-Do8P4puT.d.mts} +9 -8
- package/dist/{headers-ChAADPQu.mjs → headers-D8QfRX9Y.mjs} +12 -10
- package/dist/inbound-2d0zi2yS.mjs +706 -0
- package/dist/inbound-afAcWeQ9.d.mts +363 -0
- package/dist/index.d.mts +61 -34
- package/dist/index.mjs +1012 -293
- package/dist/{init-7JCAcKNQ.mjs → init-BD-9THgn.mjs} +329 -271
- package/dist/link-RMdgjF1v.mjs +52 -0
- package/dist/{list-CPwFDZ_c.mjs → list-3F52R_yO.mjs} +37 -5
- package/dist/{runner-kapo9aPs.mjs → local-d1-D2I6Ox5F.mjs} +116 -6
- package/dist/{login-BT3H8PN3.mjs → login-pV69H-ZO.mjs} +17 -15
- package/dist/{logs-Bt313ax7.mjs → logs-DFHHD6wE.mjs} +16 -2
- package/dist/mime-BJD7d_qL.mjs +1216 -0
- package/dist/neon-DHwd2zvC.mjs +54 -0
- package/dist/{node-pRg81HqV.mjs → node-Dk3H2jmU.mjs} +29 -8
- package/dist/operator-cmd-DYWRbWUA.mjs +348 -0
- package/dist/{agents-CtgBYqld.mjs → output-tFQLLj26.mjs} +676 -211
- package/dist/{package-json-Cx1osYo6.mjs → package-json-CPoWX79C.mjs} +1 -1
- package/dist/pages/client.d.mts +43 -41
- package/dist/pages/client.mjs +40 -33
- package/dist/pages/head-client.d.mts +10 -12
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +37 -14
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +25 -27
- package/dist/pages/islands-plugin.mjs +6 -4
- package/dist/pages/prefetch.d.mts +6 -7
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -1
- package/dist/pages/serialize.d.mts +7 -8
- package/dist/platform-cmd-DxJ2FRwR.mjs +123 -0
- package/dist/platform-domain-ChvbJkdy.mjs +228 -0
- package/dist/platform-lifecycle-DN4MzJF_.mjs +4450 -0
- package/dist/platform-management-Db2PXw0B.mjs +698 -0
- package/dist/platform-recovery-C_YO-tIs.mjs +99 -0
- package/dist/{plugin-inference-DMeavIJ6.mjs → plugin-inference-BDRfZngg.mjs} +35 -19
- package/dist/prepare-BfJvFUtJ.mjs +14 -0
- package/dist/{prepare-BvvgAz-3.mjs → prepare-CBetXvsN.mjs} +15 -24
- package/dist/{preset-BjyR3lzz.mjs → preset-lAy0B0BQ.mjs} +25 -212
- package/dist/{project-cmd-D_w-4w5B.mjs → project-cmd-Mo0V9yKS.mjs} +25 -12
- package/dist/{project-paths-BQd7OmIo.mjs → project-paths-SK8nMHPp.mjs} +3 -1
- package/dist/{project-tsconfig-B-QtXjLQ.mjs → project-tsconfig-Ql2XsSQp.mjs} +2 -2
- package/dist/{protocol-Bnb0LFp3.d.mts → protocol-C-pqYJjE.d.mts} +3 -4
- package/dist/{provision-CPx2ZxsH.mjs → provision-Blnstcm2.mjs} +78 -45
- package/dist/r2-conditions-D1Wk8i7b.mjs +30 -0
- package/dist/{requests-B8sZxaFM.mjs → requests-BcKOVpRg.mjs} +5 -3
- package/dist/{resolve-project-BBMtLLV9.mjs → resolve-project--Vxawf7z.mjs} +2 -2
- package/dist/rollback-Bx85-0xh.mjs +166 -0
- package/dist/{rolldown-runtime-DJK8HYOj.mjs → rolldown-runtime-rQ84J-ij.mjs} +1 -1
- package/dist/{route-types-z1jtHEi_.mjs → route-types-Da-DpyUp.mjs} +77 -25
- package/dist/routes-stub.d.mts +22 -23
- package/dist/runner-mysql-7BPUNGmL.mjs +61 -0
- package/dist/{runner-pg-CHM76xuC.mjs → runner-pg-BkEza-dX.mjs} +18 -6
- package/dist/runtime/ai.d.mts +21 -14
- package/dist/runtime/ai.mjs +5 -4
- package/dist/runtime/auth-client-react.d.mts +3 -5
- package/dist/runtime/auth-client-solid.d.mts +3 -5
- package/dist/runtime/auth-client-svelte.d.mts +3 -5
- package/dist/runtime/auth-client-vue.d.mts +3 -5
- package/dist/runtime/auth-client.d.mts +3 -5
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +10 -0
- package/dist/runtime/better-auth-mysql.mjs +49 -0
- package/dist/runtime/better-auth-pg.d.mts +8 -9
- package/dist/runtime/better-auth-pg.mjs +2 -2
- package/dist/runtime/better-auth.d.mts +8 -9
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- package/dist/runtime/db-mysql.d.mts +2 -0
- package/dist/runtime/db-mysql.mjs +1 -0
- package/dist/runtime/db.d.mts +10 -11
- package/dist/runtime/durable.d.mts +47 -0
- package/dist/runtime/durable.mjs +146 -0
- package/dist/runtime/email/testing.d.mts +112 -0
- package/dist/runtime/email/testing.mjs +283 -0
- package/dist/runtime/email.d.mts +30 -0
- package/dist/runtime/email.mjs +573 -0
- package/dist/runtime/env-helpers.d.mts +2 -2
- package/dist/runtime/env-helpers.mjs +5 -42
- package/dist/runtime/env-public-client.d.mts +10 -11
- package/dist/runtime/env-public-client.mjs +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +104 -49
- package/dist/runtime/env.d.mts +19 -18
- package/dist/runtime/env.mjs +15 -2
- package/dist/runtime/fetch-stream.d.mts +20 -21
- package/dist/runtime/fetch.d.mts +15 -16
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/isr.d.mts +21 -22
- package/dist/runtime/isr.mjs +26 -8
- package/dist/runtime/kv.d.mts +9 -10
- package/dist/runtime/live-client.d.mts +5 -7
- package/dist/runtime/live-client.mjs +9 -7
- package/dist/runtime/live-server.d.mts +4 -5
- package/dist/runtime/live.d.mts +22 -24
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.d.mts +16 -17
- package/dist/runtime/migration-handler-mysql.d.mts +4 -0
- package/dist/runtime/migration-handler-mysql.mjs +81 -0
- package/dist/runtime/migration-handler-pg.d.mts +2 -4
- package/dist/runtime/migration-handler.d.mts +5 -6
- package/dist/runtime/migration-handler.mjs +4 -3
- package/dist/runtime/queues.d.mts +3 -4
- package/dist/runtime/queues.mjs +2 -1
- package/dist/runtime/remote/binding-handler.d.mts +10 -12
- package/dist/runtime/remote/binding-handler.mjs +24 -3
- package/dist/runtime/remote/index.d.mts +5 -6
- package/dist/runtime/remote/index.mjs +21 -18
- package/dist/runtime/response.d.mts +10 -11
- package/dist/runtime/sandbox.d.mts +56 -55
- package/dist/runtime/sandbox.mjs +57 -49
- package/dist/runtime/schema-mysql.d.mts +1 -0
- package/dist/runtime/schema-mysql.mjs +2 -0
- package/dist/runtime/seed.d.mts +14 -9
- package/dist/runtime/sse-client.d.mts +6 -7
- package/dist/runtime/sse.d.mts +11 -12
- package/dist/runtime/storage.d.mts +3 -4
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +12 -12
- package/dist/runtime/ws-server.mjs +32 -4
- package/dist/runtime/ws.d.mts +19 -21
- package/dist/{scan-ChWt4pX1.mjs → scan-BMH4rzlv.mjs} +42 -19
- package/dist/{scan-NU4xKGci.mjs → scan-CpK-57ug.mjs} +5 -4
- package/dist/{secret-Dt32J6RI.mjs → secret-ByhJ9AMl.mjs} +62 -5
- package/dist/{skills-CLjN0uUO.mjs → skills-Q46GZMO-.mjs} +6 -4
- package/dist/sqlite-validation-BzKMWnO4.mjs +25 -0
- package/dist/{standard-schema-DJ0HW7QP.d.mts → standard-schema-Fo_vCAZh.d.mts} +6 -6
- package/dist/{subcommand-prompt-BzV8iQZo.mjs → subcommand-prompt-WfySCQ7S.mjs} +67 -48
- package/dist/sveltekit.d.mts +12 -11
- package/dist/sveltekit.mjs +1 -1
- package/dist/types-BAp5AEBU.d.mts +79 -0
- package/dist/types-CKWnYgfy.d.mts +1 -0
- package/dist/{validate-Cw_RLeTj.mjs → validate-tBBN_dXH.mjs} +4 -3
- package/dist/wrangler--imS8n0d.mjs +1796 -0
- package/dist/{yarn-pnp-DJn3SAHF.mjs → yarn-pnp-DxSInkzL.mjs} +1 -1
- package/package.json +79 -65
- package/schema.json +22 -3
- package/skills/void/SKILL.md +59 -2
- package/skills/void/docs/guide/ai.md +32 -14
- package/skills/void/docs/guide/app-types.md +6 -6
- package/skills/void/docs/guide/auth.md +14 -16
- package/skills/void/docs/guide/database/d1.md +6 -0
- package/skills/void/docs/guide/database/mysql.md +60 -0
- package/skills/void/docs/guide/database/postgresql.md +14 -9
- package/skills/void/docs/guide/database.md +39 -26
- package/skills/void/docs/guide/deployment.md +99 -25
- package/skills/void/docs/guide/durable-state.md +140 -0
- package/skills/void/docs/guide/edge/headers.md +5 -5
- package/skills/void/docs/guide/edge/prerendering.md +2 -0
- package/skills/void/docs/guide/edge/revalidation.md +21 -6
- package/skills/void/docs/guide/edge/rewrites.md +18 -14
- package/skills/void/docs/guide/edge/static-assets.md +12 -10
- package/skills/void/docs/guide/email.md +640 -0
- package/skills/void/docs/guide/env-migration.md +109 -0
- package/skills/void/docs/guide/env-vars.md +70 -248
- package/skills/void/docs/guide/index.md +15 -17
- package/skills/void/docs/guide/jobs.md +8 -5
- package/skills/void/docs/guide/live.md +7 -15
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +8 -4
- package/skills/void/docs/guide/pages-routing/islands.md +3 -3
- package/skills/void/docs/guide/pages-routing/loaders.md +6 -4
- package/skills/void/docs/guide/pages-routing/overview.md +7 -7
- package/skills/void/docs/guide/platform-administration.md +212 -0
- package/skills/void/docs/guide/platform-development.md +264 -0
- package/skills/void/docs/guide/queues.md +10 -10
- package/skills/void/docs/guide/quickstart.md +46 -67
- package/skills/void/docs/guide/remote-dev.md +8 -6
- package/skills/void/docs/guide/sandboxes.md +33 -16
- package/skills/void/docs/guide/self-hosted-platform.md +553 -0
- package/skills/void/docs/guide/server-routing.md +5 -5
- package/skills/void/docs/guide/sse.md +4 -4
- package/skills/void/docs/guide/ssg.md +5 -3
- package/skills/void/docs/guide/storage.md +2 -2
- package/skills/void/docs/guide/websockets.md +15 -7
- package/skills/void/docs/index.md +3 -3
- package/skills/void/docs/integrations/agents.md +6 -64
- package/skills/void/docs/integrations/cloudflare.md +165 -146
- package/skills/void/docs/integrations/frameworks/analog.md +4 -4
- package/skills/void/docs/integrations/frameworks/astro.md +5 -5
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -5
- package/skills/void/docs/integrations/frameworks/overview.md +3 -3
- package/skills/void/docs/integrations/frameworks/react-router.md +3 -3
- package/skills/void/docs/integrations/frameworks/sveltekit.md +3 -3
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +2 -2
- package/skills/void/docs/integrations/nodejs-bun-deno.md +11 -4
- package/skills/void/docs/reference/api.md +42 -6
- package/skills/void/docs/reference/cli.md +665 -160
- package/skills/void/docs/reference/config.md +67 -27
- package/skills/void/docs/reference/resource-inference.md +13 -9
- package/skills/void/docs/reference/structure.md +9 -11
- package/AGENT_PROMPT.md +0 -19
- package/dist/cf-access-Bqw81xAf.mjs +0 -22
- package/dist/env-CZy5MorI.mjs +0 -299
- package/dist/env-helpers-z4stu8uc.d.mts +0 -52
- package/dist/env-mask-Dd47NbR6.mjs +0 -90
- package/dist/env-public-BfiLcMBk.d.mts +0 -140
- package/dist/link-CdGHSIy-.mjs +0 -45
- package/dist/mcp-DoM3_nhd.mjs +0 -377
- package/dist/project-paths-GpziKeQQ.d.mts +0 -25
- package/dist/providers-BNKRacMr.d.mts +0 -7
- package/dist/proxy-D-3_D-Gl.mjs +0 -5
- package/dist/rollback-CkvTFXx5.mjs +0 -90
- package/dist/runtime/isr-cache.d.mts +0 -207
- package/dist/runtime/isr-cache.mjs +0 -523
- package/dist/types-lLjNE9Qp.d.mts +0 -51
- package/getting-started-prompt.txt +0 -28
- package/skills/void/command/void.md +0 -7
- package/skills/void/docs/integrations/auth-providers.md +0 -0
- package/skills/void/docs/integrations/payment-processors.md +0 -0
- package/skills/void/docs/node_modules/@iconify/vue/README.md +0 -408
- package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +0 -5
- package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +0 -103
- package/skills/void/docs/node_modules/oxc-minify/README.md +0 -78
- package/skills/void/docs/node_modules/reka-ui/README.md +0 -80
- package/skills/void/docs/node_modules/vitepress/README.md +0 -28
- package/skills/void/docs/node_modules/vitepress/template/api-examples.md +0 -49
- package/skills/void/docs/node_modules/vitepress/template/index.md +0 -28
- package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +0 -85
- package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +0 -101
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +0 -19
- package/skills/void/docs/node_modules/void/CLAUDE.md +0 -221
- package/skills/void/docs/node_modules/void/README.md +0 -90
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +0 -685
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +0 -396
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +0 -219
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +0 -37
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +0 -189
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +0 -143
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +0 -1272
- package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +0 -19
- package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +0 -22
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +0 -153
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +0 -565
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +0 -127
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +0 -600
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +0 -386
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +0 -95
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-footnote/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +0 -64
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +0 -25
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +0 -16
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +0 -220
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +0 -70
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +0 -26
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +0 -17
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +0 -18
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/build.md +0 -40
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +0 -107
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +0 -62
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +0 -341
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/dev.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +0 -175
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +0 -167
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/fmt.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/implode.md +0 -23
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +0 -134
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +0 -199
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/lint.md +0 -50
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +0 -197
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +0 -356
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/test.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/vpx.md +0 -66
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/why.md +0 -39
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/index.md +0 -12
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/team.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/generator/README.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/monorepo/README.md +0 -29
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +0 -58
- package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +0 -32
- package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +0 -99
- package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +0 -79
- package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +0 -44
- package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +0 -65
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +0 -403
- package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +0 -48
- package/skills/void/docs/node_modules/void/node_modules/hono/README.md +0 -85
- package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +0 -452
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +0 -76
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +0 -325
- package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +0 -398
- package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +0 -64
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +0 -96
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +0 -183
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +0 -25
- package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +0 -94
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +0 -16
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +0 -220
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +0 -70
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +0 -26
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +0 -17
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +0 -18
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/build.md +0 -40
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +0 -107
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +0 -62
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +0 -341
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/dev.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +0 -175
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +0 -167
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/fmt.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/implode.md +0 -23
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +0 -134
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +0 -199
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/lint.md +0 -50
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +0 -197
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +0 -356
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/test.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/vpx.md +0 -66
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/why.md +0 -39
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/index.md +0 -12
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/team.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/generator/README.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/monorepo/README.md +0 -29
- package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +0 -63
- package/skills/void/docs/node_modules/void/node_modules/zod/README.md +0 -191
- package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +0 -175
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +0 -76
- package/skills/void/docs/node_modules/void/skills/void/command/void.md +0 -7
- package/skills/void/docs/node_modules/void/test/e2e/README.md +0 -85
|
@@ -1,191 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,175 +0,0 @@
|
|
|
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`). The suffix restricts the route to that environment, so only use it for handlers that must not ship to the other one.
|
|
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.
|
|
@@ -1,76 +0,0 @@
|
|
|
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 with Vite+ as the default scaffold toolchain. 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
|
-
| Self-host deploy to own Cloudflare account | `docs/integrations/cloudflare.md`, `docs/reference/cli.md` |
|
|
53
|
-
| Project status, deployment history | `docs/reference/cli.md` |
|
|
54
|
-
| Cache purging | `docs/reference/cli.md` |
|
|
55
|
-
| Project logs, runtime errors | `docs/reference/cli.md` |
|
|
56
|
-
| Secrets management (put/sync/delete) | `docs/reference/cli.md`, `docs/guide/env-vars.md` |
|
|
57
|
-
| Typed env vars (`defineEnv`, `env.ts`) | `docs/guide/env-vars.md` |
|
|
58
|
-
| Custom domain setup | `docs/reference/cli.md` |
|
|
59
|
-
| Database status, reset, seed, export | `docs/reference/cli.md`, `docs/guide/database.md` |
|
|
60
|
-
| Auth login/logout/whoami | `docs/reference/cli.md` |
|
|
61
|
-
| Overview / introduction | `docs/guide/index.md` |
|
|
62
|
-
| API surface details | `docs/reference/api.md` |
|
|
63
|
-
| Meta framework integration | `docs/integrations/frameworks/*.md` |
|
|
64
|
-
| Coding agent setup | `docs/integrations/agents.md` |
|
|
65
|
-
| Node.js / Bun / Deno targets | `docs/integrations/nodejs-bun-deno.md` |
|
|
66
|
-
| ORMs and external databases | `docs/integrations/orms-and-external-dbs.md` |
|
|
67
|
-
| Project structure and conventions | `docs/reference/structure.md` |
|
|
68
|
-
| Resource/binding inference | `docs/reference/resource-inference.md` |
|
|
69
|
-
|
|
70
|
-
## Working Rules
|
|
71
|
-
|
|
72
|
-
- 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.
|
|
73
|
-
- Never guess or infer `void` CLI command names or flags. Always consult `docs/reference/cli.md` for the exact command before running it.
|
|
74
|
-
- For multi-topic tasks, combine only the needed doc files.
|
|
75
|
-
- If docs and memory differ, follow docs.
|
|
76
|
-
- **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.
|
|
@@ -1,7 +0,0 @@
|
|
|
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.
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# `packages/void/test/e2e`
|
|
2
|
-
|
|
3
|
-
Gated live-account end-to-end tests. These run REAL Cloudflare operations against a REAL account, so
|
|
4
|
-
they **skip unless credentials are present**. Locally that means exporting the env vars below; in CI
|
|
5
|
-
they run on **pushes to `main`** (see [In CI](#in-ci)).
|
|
6
|
-
|
|
7
|
-
## `cloudflare-deploy-live.test.ts`
|
|
8
|
-
|
|
9
|
-
Deploys `playground/spa` (D1 + KV + cron) to the target account via `void deploy --backend cloudflare`,
|
|
10
|
-
verifies the live worker answers HTTP 200, then deletes the worker and every resource it created.
|
|
11
|
-
|
|
12
|
-
It does **not** drive `--provision`: that path fails closed in non-interactive shells by design (a
|
|
13
|
-
spawned CLI has no TTY, and CI cannot commit back the ids a create would mint). So the test plays the
|
|
14
|
-
provisioner's role itself — it creates the id-bearing D1 + KV directly with `wrangler … create`,
|
|
15
|
-
writes their real ids into the app's root config exactly as `--provision` would, then runs the
|
|
16
|
-
CI-safe `void deploy --backend cloudflare` (no `--provision`). That exercises the real
|
|
17
|
-
build → tamper-guard → remote-migrations → `wrangler deploy` pipeline end to end.
|
|
18
|
-
|
|
19
|
-
### Prerequisites
|
|
20
|
-
|
|
21
|
-
The suite is skipped unless BOTH env vars are set:
|
|
22
|
-
|
|
23
|
-
| Env var | Purpose |
|
|
24
|
-
| ------------------------ | -------------------------------------------------------------------------- |
|
|
25
|
-
| `VOID_E2E_CF_TOKEN` | Cloudflare API token that can create + delete Workers Scripts, D1, and KV. |
|
|
26
|
-
| `VOID_E2E_CF_ACCOUNT_ID` | Cloudflare account id to deploy into. |
|
|
27
|
-
|
|
28
|
-
The token needs, on that account, **Workers Scripts: Edit**, **D1: Edit**, and **Workers KV Storage:
|
|
29
|
-
Edit** (Edit implies read, covering the ownership/teardown list calls). Cron triggers ride along with
|
|
30
|
-
the worker deploy — no extra permission.
|
|
31
|
-
|
|
32
|
-
The account must also have a **workers.dev subdomain** already registered (with its wildcard TLS cert
|
|
33
|
-
provisioned). Without one, `wrangler deploy` uploads the worker but cannot publish a public URL, and
|
|
34
|
-
the HTTP-200 assertion has nothing to hit. Opening the Workers & Pages dashboard once registers a
|
|
35
|
-
subdomain automatically; a freshly-registered subdomain takes a few minutes for its cert to go live,
|
|
36
|
-
during which the first run may see a TLS handshake failure — rerun once the cert is ready.
|
|
37
|
-
|
|
38
|
-
With no env vars the suite SKIPS cleanly (0 run, N skipped).
|
|
39
|
-
|
|
40
|
-
### Running it
|
|
41
|
-
|
|
42
|
-
```sh
|
|
43
|
-
# Ensure the CLI is built first (dist/cli/cli.mjs):
|
|
44
|
-
vp run build:core
|
|
45
|
-
|
|
46
|
-
VOID_E2E_CF_TOKEN=... VOID_E2E_CF_ACCOUNT_ID=... vp test run packages/void/test/e2e
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### In CI
|
|
50
|
-
|
|
51
|
-
`VOID_E2E_CF_TOKEN` and `VOID_E2E_CF_ACCOUNT_ID` are **environment secrets** on the `cloudflare-e2e`
|
|
52
|
-
GitHub Environment (not repo secrets), and a dedicated `live-e2e` job in `.github/workflows/ci.yml`
|
|
53
|
-
consumes them — the main `test` job carries no creds at all. Two layers keep the account token off
|
|
54
|
-
untrusted code:
|
|
55
|
-
|
|
56
|
-
- The `live-e2e` job runs only on a direct push to `main` (`github.event_name == 'push' && github.ref
|
|
57
|
-
== 'refs/heads/main'`), so `pull_request` runs, tag pushes, and `workflow_call` (release) skip it.
|
|
58
|
-
- The `cloudflare-e2e` environment's deployment branch policy allows `main` **only**, enforced by
|
|
59
|
-
GitHub server-side on the run's ref. A `pull_request` run's ref is `refs/pull/<n>/merge`, so it can
|
|
60
|
-
never reach the secret **even if a PR edits this workflow** — the expression-level gate alone would
|
|
61
|
-
be bypassable that way; the environment ref-check is the real boundary.
|
|
62
|
-
|
|
63
|
-
So the credentialed live deploy runs on every merge to `main`; everywhere else the creds are empty and
|
|
64
|
-
the suite SKIPS (the `test` job still imports the file and skips it). The `live-e2e` job itself is
|
|
65
|
-
fail-closed — a preflight step errors if either credential is empty (a missing, deleted, or
|
|
66
|
-
not-yet-rotated secret), so a misconfigured gate is loud instead of a silent green skip. Each
|
|
67
|
-
`live-e2e` run also gets `VOID_E2E_RUN_ID = <run-id>-<attempt>` for the unique per-run resource names
|
|
68
|
-
below.
|
|
69
|
-
|
|
70
|
-
### Resource naming & cleanup
|
|
71
|
-
|
|
72
|
-
Each run derives a UNIQUE resource name — `void-e2e-cf-deploy-<suffix>` — so overlapping runs never
|
|
73
|
-
collide on remote resources. The suffix is `VOID_E2E_RUN_ID` (CI: `<run-id>-<attempt>`) or, locally, a
|
|
74
|
-
timestamp + random. Derived names mirror the provisioner: `<name>-db` (D1), `<name>-kv` (KV). The
|
|
75
|
-
shared `void-e2e-cf-deploy-` prefix keeps every resource greppable, so an orphan from a hard-killed run
|
|
76
|
-
is easy to find and `wrangler delete`. A pre-run ownership gate refuses to start if the run's names
|
|
77
|
-
already exist (failing closed on any lookup it cannot confirm), so the test never adopts or deletes a
|
|
78
|
-
resource it does not own. Teardown runs even when the deploy or an assertion fails.
|
|
79
|
-
|
|
80
|
-
> **Local concurrency:** unique names isolate _remote_ resources, but a run also snapshots and
|
|
81
|
-
> overwrites the shared `playground/spa/wrangler.jsonc` and builds in place. Do **not** run two live
|
|
82
|
-
> e2e invocations against the same checkout at once — they would race that file. CI is unaffected (each
|
|
83
|
-
> runner is an isolated checkout, and only the single `main`-push `live-e2e` job deploys). The deploy
|
|
84
|
-
> test also asserts the returned host's worker label equals this run's `WORKER_NAME`, so a clobbered
|
|
85
|
-
> overlay fails loudly instead of validating another run's worker.
|