void 0.25.0 → 0.26.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 +1 -3
- package/README.md +19 -9
- package/dist/{account-cmd-DcR1ywt8.mjs → account-cmd-CfUXh_nU.mjs} +8 -7
- package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DKy02UY0.mjs} +21 -32
- package/dist/{application-routing-B7QEjqSR.mjs → application-routing-DQyUh_5S.mjs} +1 -1
- package/dist/{auth-7wuZ5ob8.mjs → auth-B5_tZLxT.mjs} +9 -9
- package/dist/{auth-CdgZ9uag.mjs → auth-BgX2qYSY.mjs} +1 -1
- package/dist/{auth-link-Z6E5DYvM.mjs → auth-link-D5RmKnzh.mjs} +5 -5
- package/dist/{auth-migrations-9vif1uj8.mjs → auth-migrations-BwHgeEsD.mjs} +8 -18
- package/dist/{auth-router-BdM4avI8.mjs → auth-router-Bap-pvbn.mjs} +6 -19
- package/dist/{better-auth-shared-BVkjZ3vM.d.mts → better-auth-shared-CPvWD3nG.d.mts} +0 -4
- package/dist/{better-auth-shared-hy6RPh9W.mjs → better-auth-shared-DPpj8zxc.mjs} +94 -16
- package/dist/{build-cmd-CEE7D-hM.mjs → build-cmd-B58c8iS8.mjs} +8 -7
- package/dist/{cache-TcZnBLtH.mjs → cache-Bo52trKF.mjs} +8 -8
- package/dist/{cancel-deploy-CYoZmcmR.mjs → cancel-deploy-BZNz3Q26.mjs} +6 -5
- package/dist/{cf-access-AHKBzmuu.mjs → cf-access-ngGqZpHZ.mjs} +11 -12
- package/dist/{cf-build-output-U8o1Gl6X.mjs → cf-build-output-DjvB_872.mjs} +62 -85
- package/dist/cf-build-output-H9a97vME.mjs +2 -0
- package/dist/cli/cli.mjs +48 -83
- package/dist/cli/cloudflare-operation-process.mjs +71 -77
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +5 -6
- package/dist/client-By4JjMw_.mjs +2 -0
- package/dist/{client-RsPo8wsP.mjs → client-C2Prx_Bi.mjs} +30 -8
- package/dist/{cloudflare-auth-Qdc7tw8F.mjs → cloudflare-auth-CuxfF6OA.mjs} +9 -17
- package/dist/{cloudflare-cmd-bhwCxAN6.mjs → cloudflare-cmd-lHqNlJGW.mjs} +6 -5
- package/dist/{cloudflare-config-Bktvwtpf.mjs → cloudflare-config-BmhBv3HV.mjs} +1 -1
- package/dist/{cloudflare-connect-CuhRgk3k.mjs → cloudflare-connect-2G3rL2rP.mjs} +4 -4
- package/dist/{cloudflare-operations-BhbK6yTq.mjs → cloudflare-operations-BlYLlowZ.mjs} +1 -1
- package/dist/{cloudflare-operations-CjaV4lZi.mjs → cloudflare-operations-CwI1bChl.mjs} +41 -70
- package/dist/{cloudflare-process-B-wekeR6.mjs → cloudflare-process-2-TfIEzB.mjs} +20 -22
- package/dist/{config-CyQ-wVd7.mjs → config-5r-YpMC-.mjs} +1 -1
- package/dist/{config-C_XRIPx2.mjs → config-B_ggY-IO.mjs} +3 -3
- package/dist/config-BtSFvXZx.mjs +2 -0
- package/dist/config-CLYAosnQ.mjs +78 -0
- package/dist/{config-BMHb8RCj.d.mts → config-CSa15FvD.d.mts} +1 -1
- package/dist/{config-Br_JZD6u.mjs → config-DiowPT80.mjs} +24 -30
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-B1f88wJA.mjs → config-write-AHGesphx.mjs} +8 -7
- package/dist/{connect-DCvUmPXY.mjs → connect-X0MUA1gk.mjs} +12 -11
- package/dist/{create-project-eAPgYq35.mjs → create-project-DxiyW6iX.mjs} +7 -7
- package/dist/{create-project-C734I-Mu.mjs → create-project-iwkbqiBU.mjs} +1 -1
- package/dist/{db-C07GEdKF.mjs → db-XnVMHzoV.mjs} +101 -133
- package/dist/{delete-pKMVsrpJ.mjs → delete-esYlMiSJ.mjs} +8 -8
- package/dist/{deploy-DfsAe-T0.mjs → deploy-BsEvnlJl.mjs} +2377 -2512
- package/dist/deploy-C1d-YTfp.mjs +2 -0
- package/dist/{dev-inbox-D64ZKUod.mjs → dev-inbox-CK-UuPob.mjs} +7 -16
- package/dist/{discover-BcPPiF1o.mjs → discover-CkCYv9T_.mjs} +1 -2
- package/dist/discover-EDUf6JJw.mjs +2 -0
- package/dist/{prompts-ZAuJlyCj.mjs → dist-Bx1z6Eva.mjs} +1 -1
- package/dist/{dist-AoCzRTJE.mjs → dist-Cegxq8gs.mjs} +8 -8
- package/dist/{prompts-6OSVA7DJ.mjs → dist-D3m88sjf.mjs} +10 -53
- package/dist/{domain-D3uA9ize.mjs → domain-CbbBWhWE.mjs} +29 -30
- package/dist/{dotenv-VQxupEUv.mjs → dotenv-BfU6eqFt.mjs} +20 -32
- package/dist/{drizzle-Beb2Am5S.mjs → drizzle-CF84FOVM.mjs} +16 -13
- package/dist/{email-z3o2cwjH.mjs → email-CpuT42g7.mjs} +24 -19
- package/dist/{email--tEtMoj_.mjs → email-d_Aux1vM.mjs} +1 -1
- package/dist/{entry-CF5wvH4w.mjs → entry-CMAkqBmU.mjs} +6 -6
- package/dist/{env-_v349JBd.mjs → env-BxocywBB.mjs} +25 -6
- package/dist/{env-D5liuQYR.mjs → env-DMA3cXZt.mjs} +1 -1
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{env-raw-Cx8ElDdj.mjs → env-raw-jZpP5n47.mjs} +1 -2
- package/dist/{env-types-D5kds_OZ.mjs → env-types-CwXgeMgL.mjs} +1 -1
- package/dist/{env-validation-cZBvGWaP.mjs → env-validation-CrVNjsPm.mjs} +1 -1
- package/dist/{env-validation-vBSQ8gw5.mjs → env-validation-Dxdx_5wo.mjs} +17 -21
- package/dist/{env-3Q8-_2IH.mjs → env-w9jOyGZn.mjs} +10 -9
- package/dist/{fetch-_SeGZao9.d.mts → fetch-BPCYVi3H.d.mts} +20 -1
- package/dist/{fetch-BIZJh7vR.mjs → fetch-sAcwjzLO.mjs} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-PGgz4uGz.mjs} +26 -24
- package/dist/{fetch-stream-Bjf0hoZb.d.mts → fetch-stream-obvZ7fvO.d.mts} +1 -16
- package/dist/{gen-NjwoG9FK.mjs → gen-DtkQhvQg.mjs} +40 -57
- package/dist/gen-dA9hW7AV.mjs +2 -0
- package/dist/{github-cmd-DquUq-b1.mjs → github-cmd-D_FsOFxq.mjs} +65 -164
- package/dist/{handler-DghKr6dU.mjs → handler-BHAn2fZJ.mjs} +1 -0
- package/dist/{handler-CZ4nAylQ.d.mts → handler-CNAwjRcW.d.mts} +5 -12
- package/dist/{head-Do8P4puT.d.mts → head-C8K_iGe6.d.mts} +1 -1
- package/dist/{head-D_QRR5Yd.mjs → head-D2VF4ApL.mjs} +29 -51
- package/dist/{headers-2rKda9Y6.mjs → headers-DlfR78Nu.mjs} +3 -3
- package/dist/{help-DRZXC4fj.mjs → help-CVFBTmBx.mjs} +23 -38
- package/dist/help-DzKUrQvk.mjs +2 -0
- package/dist/{inbound-fRkqcXaC.mjs → inbound-PfQDLXc5.mjs} +23 -24
- package/dist/index.d.mts +19 -2
- package/dist/index.mjs +632 -532
- package/dist/{info-BmA3_IFZ.mjs → info-PYWwkWyt.mjs} +4 -4
- package/dist/{init-DT7yuuyl.mjs → init-Bw-fRKGp.mjs} +161 -197
- package/dist/{limits-Bq5LG8Id.d.mts → limits-CFsDKQvU.d.mts} +1 -10
- package/dist/{limits-Cjuk2VPm.mjs → limits-D0vD1M9A.mjs} +1 -22
- package/dist/{link-CXOlqh2F.mjs → link-DlPG8iX3.mjs} +10 -10
- package/dist/{list-eEWVJEPn.mjs → list-2GN7_ueV.mjs} +11 -9
- package/dist/{live-CB1y5IuC.mjs → live-CgQuTpqD.mjs} +15 -16
- package/dist/{live-Chw1eIMv.d.mts → live-Du8jXwOW.d.mts} +4 -2
- package/dist/{local-d1-Df4XpwhW.mjs → local-d1-ga5O_idV.mjs} +2 -2
- package/dist/{login-pWQHYVu2.mjs → login-D-Q4xw3Q.mjs} +7 -7
- package/dist/login-Dc-wuTDq.mjs +2 -0
- package/dist/{logs-DnxVX7TR.mjs → logs-rd8J-OFh.mjs} +28 -11
- package/dist/migrate-BHp07yJE.mjs +2 -0
- package/dist/{migrate-CV1on-yJ.mjs → migrate-NLsjBbuM.mjs} +34 -20
- package/dist/{mime-D5Nmdzf7.mjs → mime-DxCznlJq.mjs} +45 -95
- package/dist/{node-BkyRWRx8.mjs → node-DJicPvPj.mjs} +5 -5
- package/dist/{operator-args-CAVcmwUt.mjs → operator-args-BNsW5gfp.mjs} +10 -1
- package/dist/{operator-auth-CkmTE3rt.mjs → operator-auth-AzVLbrr3.mjs} +4 -8
- package/dist/{operator-client-LmwjxT6q.mjs → operator-client-BQtzyG-g.mjs} +3 -3
- package/dist/{operator-cmd-d-IEKgNk.mjs → operator-cmd-B6f6Cg9Z.mjs} +45 -14
- package/dist/operator-cmd-Cwn50lOV.mjs +2 -0
- package/dist/{output-BBsUwdyT.mjs → output-C50ag2r3.mjs} +44 -2
- package/dist/pages/client.d.mts +19 -51
- package/dist/pages/client.mjs +204 -225
- package/dist/pages/head-client.d.mts +1 -1
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +6 -12
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +21 -25
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/{plan-NPpwZ_kc.mjs → plan-BhLO2p4w.mjs} +4 -3
- package/dist/plan-CH2G51je.mjs +2 -0
- package/dist/{platform-args-Bzf8JPc2.mjs → platform-args-BoZkWQnJ.mjs} +4 -2
- package/dist/platform-args-DYgITk0D.mjs +2 -0
- package/dist/{platform-auth-config-0V0lA3pF.mjs → platform-auth-config-n603OANg.mjs} +45 -40
- package/dist/{platform-auth-protection-DFeJ-JkK.mjs → platform-auth-protection-zxDr0hWW.mjs} +9 -8
- package/dist/{platform-auth-recovery-ICy4muq6.mjs → platform-auth-recovery-tw9lgtgE.mjs} +8 -7
- package/dist/{platform-cmd-D7vSWMvV.mjs → platform-cmd-B8-bCb7t.mjs} +48 -23
- package/dist/{platform-cmd-BPySFOew.mjs → platform-cmd-C00YM14r.mjs} +1 -1
- package/dist/{platform-discovery-DDDUvnqp.mjs → platform-discovery-BC0HCKYt.mjs} +18 -4
- package/dist/{platform-domain-CUdY064e.mjs → platform-domain-p0kobLV8.mjs} +6 -5
- package/dist/{platform-lifecycle-Dm09JNkn.mjs → platform-lifecycle-D_QEY32D.mjs} +906 -389
- package/dist/{platform-lifecycle-BaUdTRPU.mjs → platform-lifecycle-vFqtNPPa.mjs} +1 -1
- package/dist/{platform-management-BSEc_ZeG.mjs → platform-management-BdYblvvE.mjs} +175 -32
- package/dist/{platform-management-Bp6aoH2C.mjs → platform-management-oi-SvI3f.mjs} +1 -1
- package/dist/{platform-plans-config-B0pOVQyW.mjs → platform-plans-config-CjiFv5J4.mjs} +5 -4
- package/dist/{platform-recovery-WOZ95Uze.mjs → platform-recovery-PvNS9Nl2.mjs} +3 -3
- package/dist/{platform-registry-KfNEF84O.mjs → platform-registry-P387v42A.mjs} +17 -10
- package/dist/platform-setup-DVe42Ws7.mjs +299 -0
- package/dist/{plugin-inference-CXWnn79A.mjs → plugin-inference-BlQbOL0P.mjs} +43 -42
- package/dist/prepare-DRUV-g3X.mjs +2 -0
- package/dist/{prepare-DnaKBi--.mjs → prepare-Do96654b.mjs} +8 -8
- package/dist/{prepare-39EvOhI6.mjs → prepare-Dq9hTIbo.mjs} +4 -3
- package/dist/{prerender-render-D9qbLs2f.mjs → prerender-render-Ct20jftc.mjs} +17 -3
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-IOjBU8R6.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-BkbfDs0V.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-Bs5A392E.mjs → project-cmd-ti8_yTcA.mjs} +19 -19
- package/dist/{project-team-ohAWWaew.mjs → project-team-CDPE1Tsg.mjs} +15 -18
- package/dist/{project-token-CP01Jna6.mjs → project-token-CkZ1cN0Z.mjs} +14 -17
- package/dist/{project-tsconfig-B8GeM0RM.mjs → project-tsconfig-CVJhNMxs.mjs} +2 -1
- package/dist/{project-zero-trust-BzkVgx35.mjs → project-zero-trust-DdjLR61k.mjs} +12 -9
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BPZaNqBo.d.mts} +4 -2
- package/dist/{protocol-U7bfjHmA.mjs → protocol-CfaUwNs8.mjs} +46 -49
- package/dist/{providers-CJlNS3kT.mjs → providers-BXuhmuub.mjs} +1 -12
- package/dist/{provision-Btj1jppf.mjs → provision-BfaLiWbj.mjs} +51 -42
- package/dist/{provision-BEv0k-qz.mjs → provision-Wu9ZBk9L.mjs} +2 -3
- package/dist/{requests-B3PBuGlX.mjs → requests-DFAqyYy8.mjs} +5 -5
- package/dist/resolve-project-BIeYs9Cw.mjs +2 -0
- package/dist/{resolve-project-BG5ORGID.mjs → resolve-project-CP8rZs_p.mjs} +6 -1
- package/dist/{rollback-DDub9GsO.mjs → rollback-BKYXBduI.mjs} +30 -37
- package/dist/{route-types-Clm4WD0B.mjs → route-types-CbtsIeFn.mjs} +1 -1
- package/dist/route-url-BgPja1GS.d.mts +5 -0
- package/dist/route-url-BjGv_KKY.mjs +28 -0
- package/dist/runner-9wjsSZx-.mjs +2 -0
- package/dist/{runner-Ol0TNjk6.mjs → runner-DMBKSrRk.mjs} +2 -2
- package/dist/{runner-mysql-DmWchSWJ.mjs → runner-mysql-CEzKtmFb.mjs} +8 -8
- package/dist/{runner-mysql-CEG5JozK.mjs → runner-mysql-CkFqZ6CE.mjs} +1 -1
- package/dist/{runner-pg-Bh4AgZdj.mjs → runner-pg-BGYRFdRp.mjs} +1 -1
- package/dist/runtime/ai.d.mts +11 -12
- package/dist/runtime/ai.mjs +47 -113
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +4 -9
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +5 -10
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +3 -3
- package/dist/runtime/client-react.d.mts +2 -3
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.d.mts +2 -3
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.d.mts +2 -3
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.d.mts +2 -3
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.d.mts +2 -3
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.mjs +3 -10
- package/dist/runtime/email/testing.mjs +5 -5
- package/dist/runtime/email.d.mts +2 -1
- package/dist/runtime/email.mjs +11 -27
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +15 -20
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +2 -3
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +10 -11
- package/dist/runtime/limits.d.mts +2 -2
- package/dist/runtime/limits.mjs +2 -2
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-client.mjs +12 -22
- package/dist/runtime/live-server.mjs +27 -35
- package/dist/runtime/live.d.mts +2 -2
- package/dist/runtime/live.mjs +2 -2
- package/dist/runtime/migration-handler.mjs +35 -86
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.d.mts +2 -2
- package/dist/runtime/remote/binding-handler.mjs +8 -9
- package/dist/runtime/remote/index.mjs +27 -77
- package/dist/runtime/route-url.d.mts +2 -4
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +15 -26
- package/dist/runtime/sandbox.d.mts +1 -1
- package/dist/runtime/sandbox.mjs +14 -24
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +30 -61
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +1 -1
- package/dist/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
- package/dist/{scan-C7okrLyM.mjs → scan-C3uDzz6J.mjs} +21 -18
- package/dist/{secret-3c72lY1U.mjs → secret-BAt2KMmO.mjs} +15 -15
- package/dist/{skills-BPQUGClu.mjs → skills-BgVMvQdy.mjs} +2 -2
- package/dist/{sse-CQNaDFFV.mjs → sse-CMvCgjNk.mjs} +1 -1
- package/dist/{subcommand-prompt-Dhom39bd.mjs → subcommand-prompt-BSlnD1fI.mjs} +2 -2
- package/dist/sveltekit.d.mts +0 -2
- package/dist/terminal-log-text-D9ACPOuG.mjs +32 -0
- package/dist/validate-BJr9LfXy.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-C9qJArv7.mjs} +9 -28
- package/dist/{defer-YsYDUoii.mjs → validation-error-Dg9Recn1.mjs} +11 -11
- package/dist/{wrangler-DhUerFkW.mjs → wrangler-D9KTuqnv.mjs} +89 -194
- package/dist/{ws-CL1w7GXU.d.mts → ws-CChrrAU-.d.mts} +1 -1
- package/dist/{yarn-pnp-BV4AzNul.mjs → yarn-pnp-CUX_iTPA.mjs} +19 -27
- package/{skills/void/docs → docs}/guide/ai.md +69 -64
- package/{skills/void/docs → docs}/guide/app-types.md +1 -1
- package/{skills/void/docs → docs}/guide/auth.md +37 -1
- package/{skills/void/docs → docs}/guide/database/postgresql.md +2 -2
- package/{skills/void/docs → docs}/guide/database.md +23 -8
- package/{skills/void/docs → docs}/guide/edge/revalidation.md +1 -1
- package/{skills/void/docs → docs}/guide/edge/rewrites.md +2 -4
- package/{skills/void/docs → docs}/guide/email/receiving.md +2 -2
- package/{skills/void/docs → docs}/guide/email/sending.md +0 -2
- package/{skills/void/docs → docs}/guide/env-vars.md +4 -0
- package/{skills/void/docs → docs}/guide/jobs.md +2 -2
- package/{skills/void/docs → docs}/guide/live.md +12 -5
- package/{skills/void/docs → docs}/guide/pages-routing/actions-and-forms.md +21 -9
- package/{skills/void/docs → docs}/guide/pages-routing/loaders.md +7 -3
- package/{skills/void/docs → docs}/guide/pages-routing/markdown.md +15 -23
- package/{skills/void/docs → docs}/guide/pages-routing/overview.md +6 -4
- package/{skills/void/docs → docs}/guide/platform/administration/access.md +2 -10
- package/{skills/void/docs → docs}/guide/platform/administration/operations.md +3 -12
- package/{skills/void/docs → docs}/guide/platform/administration/projects.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/local.md +4 -2
- package/{skills/void/docs → docs}/guide/platform/development/runtime.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/development/schema-ci.md +1 -1
- package/{skills/void/docs → docs}/guide/platform/installation/credentials.md +2 -2
- package/{skills/void/docs → docs}/guide/platform/installation/domains.md +3 -1
- package/{skills/void/docs → docs}/guide/platform/installation/first-deployment.md +8 -2
- package/{skills/void/docs → docs}/guide/platform/installation/maintenance.md +7 -1
- package/{skills/void/docs → docs}/guide/platform/installation/setup.md +1 -1
- package/docs/guide/platform/installation/uninstall.md +102 -0
- package/{skills/void/docs → docs}/guide/project-collaboration.md +6 -2
- package/{skills/void/docs → docs}/guide/queues.md +0 -2
- package/{skills/void/docs → docs}/guide/remote-dev.md +5 -5
- package/{skills/void/docs → docs}/guide/sandboxes.md +41 -22
- package/{skills/void/docs → docs}/guide/sse.md +0 -2
- package/{skills/void/docs → docs}/guide/storage.md +7 -2
- package/{skills/void/docs → docs}/guide/websockets.md +4 -0
- package/docs/integrations/agents.md +37 -0
- package/{skills/void/docs → docs}/integrations/frameworks/astro.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/nuxt.md +6 -2
- package/{skills/void/docs → docs}/integrations/hono.md +15 -7
- package/{skills/void/docs → docs}/integrations/nodejs-bun-deno.md +1 -0
- package/{skills/void/docs → docs}/reference/api/auth.md +1 -1
- package/{skills/void/docs → docs}/reference/api/handlers.md +4 -2
- package/{skills/void/docs → docs}/reference/api/pages.md +4 -0
- package/{skills/void/docs → docs}/reference/api/resources.md +11 -14
- package/{skills/void/docs → docs}/reference/api.md +35 -34
- package/{skills/void/docs → docs}/reference/cli/auth.md +3 -6
- package/{skills/void/docs → docs}/reference/cli/database.md +3 -4
- package/{skills/void/docs → docs}/reference/cli/generate.md +1 -1
- package/{skills/void/docs → docs}/reference/cli/github.md +3 -12
- package/{skills/void/docs → docs}/reference/cli/platform-config.md +3 -3
- package/{skills/void/docs → docs}/reference/cli/platform-email.md +2 -3
- package/{skills/void/docs → docs}/reference/cli/platform-installation.md +15 -13
- package/{skills/void/docs → docs}/reference/cli/platform-operations.md +3 -0
- package/{skills/void/docs → docs}/reference/cli/platform-users.md +2 -2
- package/{skills/void/docs → docs}/reference/cli/platform.md +4 -2
- package/{skills/void/docs → docs}/reference/cli/project.md +5 -4
- package/{skills/void/docs → docs}/reference/cli/secrets.md +3 -3
- package/{skills/void/docs → docs}/reference/cli/setup.md +9 -11
- package/{skills/void/docs → docs}/reference/cli.md +2 -2
- package/{skills/void/docs → docs}/reference/config.md +13 -13
- package/{skills/void/docs → docs}/reference/resource-inference.md +2 -16
- package/package.json +34 -30
- package/schema.json +1 -1
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +4 -1
- package/skills/void/SKILL.md +11 -5
- package/dist/cf-build-output-ChY6-XWP.mjs +0 -2
- package/dist/client-B4Me-9HE.mjs +0 -2
- package/dist/config-0acf1oys.mjs +0 -2
- package/dist/config-D8MOgiQV.mjs +0 -32
- package/dist/deploy-BDu1vhSH.mjs +0 -2
- package/dist/discover-AMCBXivQ.mjs +0 -2
- package/dist/fetch-error-Sp1R4mZv.d.mts +0 -20
- package/dist/gen-ById9r2j.mjs +0 -2
- package/dist/help-DPGBwomV.mjs +0 -2
- package/dist/login-C98-sw79.mjs +0 -2
- package/dist/migrate-CEu2X5DB.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-Cq6EjQro.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/resolve-project-DtbidV4y.mjs +0 -2
- package/dist/route-url-CG7U-cRN.mjs +0 -15
- package/dist/runner-CXA9Fh8h.mjs +0 -2
- package/dist/validate-Dq_L3s0S.mjs +0 -2
- package/skills/void/docs/guide/platform/installation/uninstall.md +0 -69
- package/skills/void/docs/integrations/agents.md +0 -26
- package/dist/{runner-pg-D4OPlil-.mjs → runner-pg-DV8p_zjA.mjs} +4 -4
- package/{skills/void/docs → docs}/guide/database/d1.md +2 -2
- package/{skills/void/docs → docs}/guide/database/mysql.md +0 -0
- package/{skills/void/docs → docs}/guide/deployment.md +0 -0
- package/{skills/void/docs → docs}/guide/durable-state.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/headers.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/prerendering.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/redirects.md +0 -0
- package/{skills/void/docs → docs}/guide/edge/static-assets.md +0 -0
- package/{skills/void/docs → docs}/guide/email/domains.md +0 -0
- package/{skills/void/docs → docs}/guide/email.md +0 -0
- package/{skills/void/docs → docs}/guide/index.md +0 -0
- package/{skills/void/docs → docs}/guide/kv.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/head.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/islands.md +2 -2
- package/{skills/void/docs → docs}/guide/pages-routing/layouts.md +0 -0
- package/{skills/void/docs → docs}/guide/pages-routing/view-transitions.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/email.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/plans.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/administration/zero-trust.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/ci.md +0 -0
- package/{skills/void/docs → docs}/guide/platform/installation/prerequisites.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-administration.md +0 -0
- package/{skills/void/docs → docs}/guide/platform-development.md +0 -0
- package/{skills/void/docs → docs}/guide/quickstart.md +0 -0
- package/{skills/void/docs → docs}/guide/self-hosted-platform.md +0 -0
- package/{skills/void/docs → docs}/guide/server-routing.md +3 -3
- package/{skills/void/docs → docs}/guide/ssg.md +0 -0
- package/{skills/void/docs → docs}/guide/ssr.md +0 -0
- package/{skills/void/docs → docs}/guide/type-safety.md +0 -0
- package/{skills/void/docs → docs}/guide/typed-fetch.md +0 -0
- package/{skills/void/docs → docs}/index.md +0 -0
- package/{skills/void/docs → docs}/integrations/cloudflare.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/analog.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/overview.md +0 -0
- package/{skills/void/docs → docs}/integrations/frameworks/react-router.md +3 -3
- package/{skills/void/docs → docs}/integrations/frameworks/sveltekit.md +1 -1
- package/{skills/void/docs → docs}/integrations/frameworks/tanstack-start.md +2 -2
- package/{skills/void/docs → docs}/reference/api/client.md +0 -0
- package/{skills/void/docs → docs}/reference/api/database.md +2 -2
- /package/{skills/void/docs → docs}/reference/api/durable.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/env.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/plugin.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/rewrites.md +0 -0
- /package/{skills/void/docs → docs}/reference/api/types.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/deploy.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/domains.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/email.md +0 -0
- /package/{skills/void/docs → docs}/reference/cli/platform-zero-trust.md +0 -0
- /package/{skills/void/docs → docs}/reference/structure.md +0 -0
package/skills/void/SKILL.md
CHANGED
|
@@ -5,9 +5,12 @@ description: Build Void apps and use the Void CLI by loading the relevant bundle
|
|
|
5
5
|
|
|
6
6
|
# Void
|
|
7
7
|
|
|
8
|
-
Read only the guides needed for the user's task.
|
|
9
|
-
|
|
10
|
-
`
|
|
8
|
+
Read only the guides needed for the user's task. Prefer the app's installed
|
|
9
|
+
documentation at `node_modules/void/docs/` so it matches the app's Void version.
|
|
10
|
+
All `docs/` paths below are relative to that package's root. When using this
|
|
11
|
+
skill globally without a local Void installation, follow the skill's symlink to
|
|
12
|
+
its real directory and use `../../docs/` in the same Void package. If the skill
|
|
13
|
+
was copied without the package, use the guides at [https://void.cloud](https://void.cloud) instead.
|
|
11
14
|
|
|
12
15
|
Before running a Void command, find its group in `docs/reference/cli.md`, then
|
|
13
16
|
read the matching page under `docs/reference/cli/` for syntax, options, and
|
|
@@ -19,6 +22,8 @@ Use `void` and `@void/*` in imports, examples, and package manifests. Follow the
|
|
|
19
22
|
project's existing framework and deployment destination. Deploying to a Void
|
|
20
23
|
platform requires an explicit `void connect <url>` first; never infer a platform
|
|
21
24
|
from old examples, tokens, or project IDs.
|
|
25
|
+
Platform hostnames passed to `void connect` default to HTTPS; include `http://`
|
|
26
|
+
explicitly when connecting to a local HTTP platform.
|
|
22
27
|
For a one-time deployment elsewhere, connect to that platform, then set
|
|
23
28
|
`VOID_API_URL` for the deploy command and pass `--project <slug>`. This preserves
|
|
24
29
|
the app's existing saved destination, including when the target project is new.
|
|
@@ -78,7 +83,8 @@ the app's existing saved destination, including when the target project is new.
|
|
|
78
83
|
- Declare application environment keys in `env.ts` and access them through
|
|
79
84
|
`void/env`; follow `docs/guide/env-vars.md` for local and production values.
|
|
80
85
|
- For platform setup, follow the pages linked from
|
|
81
|
-
`docs/guide/self-hosted-platform.md`.
|
|
86
|
+
`docs/guide/self-hosted-platform.md`. Use `void platform list` to find the
|
|
87
|
+
installation slug for maintenance. For recovery, use its documented resume
|
|
82
88
|
or repair workflow and preserve the installation's credentials and resources.
|
|
83
89
|
- Use `--plan` to review platform changes. If an operation has an uncertain
|
|
84
90
|
outcome, inspect its status and events before retrying.
|
|
@@ -87,4 +93,4 @@ If the user invokes this skill without a task, inspect the app's local structure
|
|
|
87
93
|
configuration, and saved deployment destination, give a brief status, and ask
|
|
88
94
|
what they want to work on.
|
|
89
95
|
|
|
90
|
-
|
|
96
|
+
Await AI and Sandbox operations normally. Usage limits reject with `UsageLimit` from `void/limits`; Void routes and Pages actions automatically return HTTP 429. Optionally catch with `instanceof UsageLimit` for a fallback or custom response. In Pages, prefer the adapter’s `Form` with `useForm()` so action failures remain visible and entered data is preserved. See `docs/guide/ai.md`, `docs/guide/sandboxes.md`, and `docs/guide/pages-routing/actions-and-forms.md`.
|
package/dist/client-B4Me-9HE.mjs
DELETED
package/dist/config-0acf1oys.mjs
DELETED
package/dist/config-D8MOgiQV.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { a as join, l as relative } from "./dist-BVqXeR_h.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
|
|
3
|
-
import { n as schemaSpecifier, t as discoverSchema } from "./discover-BcPPiF1o.mjs";
|
|
4
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
5
|
-
//#region src/drizzle/config.ts
|
|
6
|
-
/**
|
|
7
|
-
* Write a temporary drizzle-kit config to `.void/drizzle.config.json`.
|
|
8
|
-
* All paths are relative to the project root (drizzle-kit resolves
|
|
9
|
-
* relative to `--config` file location, so we use project-root-relative).
|
|
10
|
-
*
|
|
11
|
-
* @returns Absolute path to the written config file.
|
|
12
|
-
*/
|
|
13
|
-
function writeDrizzleConfig(root, dbPath, dialect = "sqlite", options) {
|
|
14
|
-
const paths = readProjectPaths(root);
|
|
15
|
-
const schema = discoverSchema(root, paths);
|
|
16
|
-
const schemaPaths = [...schema ? [schemaSpecifier(schema, root)] : [], ...(options?.additionalSchemas ?? []).map((path) => `./${relative(root, path)}`)];
|
|
17
|
-
if (schemaPaths.length === 0) throw new Error(`db: No Drizzle schema found. Create ${paths.sourceRelative("db/schema.ts")} or run \`void gen model <name>\`.`);
|
|
18
|
-
const outDir = join(root, ".void");
|
|
19
|
-
mkdirSync(outDir, { recursive: true });
|
|
20
|
-
const config = {
|
|
21
|
-
dialect,
|
|
22
|
-
schema: schemaPaths.length === 1 ? schemaPaths[0] : schemaPaths,
|
|
23
|
-
out: `./${relative(root, paths.migrationsDir)}`,
|
|
24
|
-
migrations: { prefix: "timestamp" },
|
|
25
|
-
dbCredentials: { url: dbPath }
|
|
26
|
-
};
|
|
27
|
-
const configPath = join(outDir, "drizzle.config.json");
|
|
28
|
-
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
29
|
-
return configPath;
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { writeDrizzleConfig as t };
|
package/dist/deploy-BDu1vhSH.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/fetch-error.d.ts
|
|
2
|
-
type FetchResponse<T = unknown> = Response & {
|
|
3
|
-
_data?: T;
|
|
4
|
-
};
|
|
5
|
-
type FetchError<T = unknown> = Error & {
|
|
6
|
-
request?: RequestInfo;
|
|
7
|
-
options?: RequestInit & Record<string, unknown>;
|
|
8
|
-
response?: FetchResponse<T>;
|
|
9
|
-
data?: T;
|
|
10
|
-
status?: number;
|
|
11
|
-
statusText?: string;
|
|
12
|
-
statusCode?: number;
|
|
13
|
-
statusMessage?: string;
|
|
14
|
-
};
|
|
15
|
-
type FetchErrorConstructor = new <T = unknown>(message: string, opts?: {
|
|
16
|
-
cause: unknown;
|
|
17
|
-
}) => FetchError<T>;
|
|
18
|
-
declare const FetchError: FetchErrorConstructor;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { FetchError as t };
|
package/dist/gen-ById9r2j.mjs
DELETED
package/dist/help-DPGBwomV.mjs
DELETED
package/dist/login-C98-sw79.mjs
DELETED
package/dist/plan-D1Q5rf-r.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/route-url.ts
|
|
2
|
-
/** Expand complete route tokens without changing query strings or fragments. */
|
|
3
|
-
function interpolateRouteParams(path, params) {
|
|
4
|
-
if (!params) return path;
|
|
5
|
-
const suffixIndex = path.search(/[?#]/);
|
|
6
|
-
const pathname = suffixIndex === -1 ? path : path.slice(0, suffixIndex);
|
|
7
|
-
const suffix = suffixIndex === -1 ? "" : path.slice(suffixIndex);
|
|
8
|
-
return pathname.replace(/(^|\/):([^/{}]+)(\{\.\+\})?(?=\/|$)/g, (token, prefix, name, catchAll) => {
|
|
9
|
-
if (!Object.hasOwn(params, name)) return token;
|
|
10
|
-
const value = params[name];
|
|
11
|
-
return prefix + (catchAll ? value.split("/").map(encodeURIComponent).join("/") : encodeURIComponent(value));
|
|
12
|
-
}) + suffix;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { interpolateRouteParams as t };
|
package/dist/runner-CXA9Fh8h.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { i as openSqliteDatabase, n as getAppliedMigrations, o as runMigrations, r as getMiniflareDatabasePath, t as getApplicationTables } from "./runner-Ol0TNjk6.mjs";
|
|
2
|
-
export { getApplicationTables, getAppliedMigrations, getMiniflareDatabasePath, openSqliteDatabase, runMigrations };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
outline: deep
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Disable and Uninstall
|
|
6
|
-
|
|
7
|
-
To pause a platform without removing its data:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
void platform disable [id] --plan
|
|
11
|
-
void platform disable [id]
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Disabled platforms reject application traffic while retaining domains and routes. Repair and upgrade preserve that state. Restore traffic with:
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
void platform enable [id] --plan
|
|
18
|
-
void platform enable [id]
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Add `--yes` to commands that make changes in a non-interactive shell.
|
|
22
|
-
|
|
23
|
-
While disabled, the platform retries queue batches after five minutes instead of delivering them to apps. Queue retention and retry limits still apply. For a long pause, plan a dead-letter queue or another way to recover messages.
|
|
24
|
-
|
|
25
|
-
## Uninstall
|
|
26
|
-
|
|
27
|
-
Preview removal before applying it:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
void platform uninstall [id] --plan
|
|
31
|
-
void platform uninstall [id]
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Uninstall blocks platform traffic, removes Queues that no remaining platform Worker uses, and records the resources left for you to review. By default, Workers, the Queues they use, KV, R2, Hyperdrive, the dispatch namespace, and AI Gateway remain in your account. Adopted resources, external PostgreSQL, zones, DNS records, routes, custom domains, and Cloudflare Access resources are always retained.
|
|
35
|
-
|
|
36
|
-
To also remove eligible data resources owned by the installer:
|
|
37
|
-
|
|
38
|
-
```sh
|
|
39
|
-
void platform uninstall [id] --purge-data
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Even with `--purge-data`, Void retains Workers, the Queues they use, R2, AI Gateway, DNS records, routes, custom domains, Access resources, adopted resources, external PostgreSQL, and zones. Review those in the Cloudflare dashboard if you want to remove them.
|
|
43
|
-
|
|
44
|
-
### Remove retained resources
|
|
45
|
-
|
|
46
|
-
Cloudflare refuses to delete a resource while a platform Worker still uses it. In the Cloudflare dashboard, remove what is left in this order, skipping anything already gone:
|
|
47
|
-
|
|
48
|
-
1. Delete the platform DNS record, Worker routes, and custom domains.
|
|
49
|
-
2. Open each platform Queue and remove the platform API Worker from its consumers.
|
|
50
|
-
3. Delete the platform Workers.
|
|
51
|
-
4. Delete the platform Queues.
|
|
52
|
-
5. Delete the application Workers in the dispatch namespace, then delete the namespace.
|
|
53
|
-
6. Delete the platform KV namespaces and Hyperdrive configuration.
|
|
54
|
-
7. Empty the R2 bucket, then delete it.
|
|
55
|
-
8. Delete the AI Gateway.
|
|
56
|
-
|
|
57
|
-
If installation configured Cloudflare Access, the uninstall plan lists its recorded applications and service tokens with their ownership and IDs. Review them in Zero Trust after uninstall. Remove installer-created resources only when nothing else uses them; resources connected from an existing company setup remain under their owner's control.
|
|
58
|
-
|
|
59
|
-
Uninstall does not remove the applications created for [project Zero Trust](/guide/platform/administration/zero-trust). While Zero Trust is enabled or still has Access applications, uninstall and `--plan` stop before any change and list those applications. Run `void platform zero-trust disable` first. Uninstall reads this from the installation database, so it also stops when the database cannot be reached.
|
|
60
|
-
|
|
61
|
-
::: details Why some resources require manual cleanup
|
|
62
|
-
|
|
63
|
-
Resources that may have been shared or repurposed require manual review before deletion. Void verifies ownership, keeps those resources in place, and blocks platform traffic.
|
|
64
|
-
|
|
65
|
-
If removal is interrupted, rerun the command to continue. If a resource has changed ownership, resolve the reported conflict before retrying.
|
|
66
|
-
|
|
67
|
-
External PostgreSQL and its data always remain under your control.
|
|
68
|
-
|
|
69
|
-
:::
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
outline: deep
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Using Void with Coding Agents
|
|
6
|
-
|
|
7
|
-
`void init` gives your coding agent Void instructions and reference docs. To add or refresh just that setup, run:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npx void init --agents
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Void updates `AGENTS.md` with development guidance and links to the docs, preserving your existing instructions.
|
|
14
|
-
|
|
15
|
-
The complete Markdown docs ship with the installed package at `node_modules/void/skills/void/docs/`. Agents can read them directly, even without a linked skill.
|
|
16
|
-
|
|
17
|
-
## Skills
|
|
18
|
-
|
|
19
|
-
Skills point your agent to the commands and docs it needs for the task. They link to the installed `void` package, so the guidance matches the version your app uses.
|
|
20
|
-
|
|
21
|
-
Void ships two skills:
|
|
22
|
-
|
|
23
|
-
- **`void`:** commands and docs for app development.
|
|
24
|
-
- **`migrate-vite-cloudflare-to-void`:** migration skill for converting existing `@cloudflare/vite-plugin` apps to Void.
|
|
25
|
-
|
|
26
|
-
Skills are linked automatically by `void init --agents` when it detects a supported agent's configuration. For example, Claude Code uses `.claude/skills/`. If no agent is detected, skill linking is skipped and `AGENTS.md` points directly to the bundled docs.
|
|
@@ -8,10 +8,6 @@ async function readPgAppliedMigrations(client) {
|
|
|
8
8
|
throw error;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Apply unapplied SQL migrations via a connected PostgreSQL client.
|
|
13
|
-
* Each migration runs in its own transaction (BEGIN/COMMIT).
|
|
14
|
-
*/
|
|
15
11
|
async function getPgAppliedMigrations(url) {
|
|
16
12
|
const { Client } = await import("pg");
|
|
17
13
|
const client = new Client({ connectionString: url });
|
|
@@ -22,6 +18,10 @@ async function getPgAppliedMigrations(url) {
|
|
|
22
18
|
await client.end();
|
|
23
19
|
}
|
|
24
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Apply unapplied SQL migrations via a connected PostgreSQL client.
|
|
23
|
+
* Each migration runs in its own transaction (BEGIN/COMMIT).
|
|
24
|
+
*/
|
|
25
25
|
async function applyPgMigrations(client, migrations) {
|
|
26
26
|
if (migrations.length === 0) return [];
|
|
27
27
|
await client.query(`CREATE TABLE IF NOT EXISTS _void_migrations (name TEXT PRIMARY KEY, applied_at TEXT NOT NULL)`);
|
|
@@ -29,8 +29,8 @@ See [Database commands](../../reference/cli/database.md#database) for the full w
|
|
|
29
29
|
D1 supports batching multiple statements into a single round-trip:
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
|
-
import { db, eq } from 'void/db';
|
|
33
32
|
import { users, posts } from '@schema';
|
|
33
|
+
import { db, eq } from 'void/db';
|
|
34
34
|
|
|
35
35
|
await db.batch([
|
|
36
36
|
db.delete(posts).where(eq(posts.userId, userId)),
|
|
@@ -51,9 +51,9 @@ Use `env.DB` from `cloudflare:workers` with another query library or the raw D1
|
|
|
51
51
|
### Kysely
|
|
52
52
|
|
|
53
53
|
```ts
|
|
54
|
+
import { env } from 'cloudflare:workers';
|
|
54
55
|
import { Kysely } from 'kysely';
|
|
55
56
|
import { D1Dialect } from 'kysely-d1';
|
|
56
|
-
import { env } from 'cloudflare:workers';
|
|
57
57
|
|
|
58
58
|
const db = new Kysely<Database>({ dialect: new D1Dialect({ database: env.DB }) });
|
|
59
59
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -135,10 +135,10 @@ let { posts } = $props();
|
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
```tsx [Solid]
|
|
138
|
+
import { For } from 'solid-js';
|
|
138
139
|
// pages/blog/index.island.tsx
|
|
139
140
|
import Counter from './_Counter' with { island: 'load' };
|
|
140
141
|
import PostForm from './_PostForm' with { island: 'visible' };
|
|
141
|
-
import { For } from 'solid-js';
|
|
142
142
|
|
|
143
143
|
export default function BlogIndex(props) {
|
|
144
144
|
return (
|
|
@@ -181,9 +181,9 @@ The `island` attribute value controls _when_ the component hydrates:
|
|
|
181
181
|
| `"media:(query)"` | CSS media query matches | Responsive components (e.g., mobile-only) |
|
|
182
182
|
|
|
183
183
|
```tsx
|
|
184
|
+
import Comments from './_Comments' with { island: 'visible' };
|
|
184
185
|
import CookieBanner from './_CookieBanner' with { island: 'idle' };
|
|
185
186
|
import MobileMenu from './_MobileMenu' with { island: 'media:(max-width: 768px)' };
|
|
186
|
-
import Comments from './_Comments' with { island: 'visible' };
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
## Server Handlers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -43,10 +43,10 @@ export const GET = defineHandler((c) => {
|
|
|
43
43
|
A file can export multiple methods:
|
|
44
44
|
|
|
45
45
|
```ts
|
|
46
|
+
import { users } from '@schema';
|
|
46
47
|
// routes/api/users/index.ts → GET + POST /api/users
|
|
47
48
|
import { defineHandler } from 'void';
|
|
48
49
|
import { db } from 'void/db';
|
|
49
|
-
import { users } from '@schema';
|
|
50
50
|
|
|
51
51
|
export const GET = defineHandler(async () => {
|
|
52
52
|
return await db.select().from(users);
|
|
@@ -77,10 +77,10 @@ Return values are automatically converted:
|
|
|
77
77
|
`defineHandler.withValidator()` adds input validation for `body`, `query`, and `params`. The recommended approach is to derive validators from your [Drizzle schema](./database.md#schema-derived-validators), which keeps validation in sync with the database.
|
|
78
78
|
|
|
79
79
|
```ts
|
|
80
|
+
import { users, insertUserSchema } from '@schema';
|
|
80
81
|
// routes/api/users/index.ts
|
|
81
82
|
import { defineHandler } from 'void';
|
|
82
83
|
import { db } from 'void/db';
|
|
83
|
-
import { users, insertUserSchema } from '@schema';
|
|
84
84
|
|
|
85
85
|
export const POST = defineHandler.withValidator({
|
|
86
86
|
body: insertUserSchema,
|
|
@@ -216,9 +216,9 @@ defineHandler(middleware1, middleware2, handler);
|
|
|
216
216
|
Middleware runs in order. Each can short-circuit (return a response without calling `next()`) or post-process (modify the response after `await next()`). Both `defineMiddleware`-wrapped functions and raw Hono `MiddlewareHandler` functions are accepted.
|
|
217
217
|
|
|
218
218
|
```ts
|
|
219
|
+
import { cors } from 'hono/cors';
|
|
219
220
|
// routes/api/stats.ts
|
|
220
221
|
import { defineHandler } from 'void';
|
|
221
|
-
import { cors } from 'hono/cors';
|
|
222
222
|
|
|
223
223
|
export const GET = defineHandler(cors({ origin: 'https://app.example.com' }), (c) => ({
|
|
224
224
|
stats: '...',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -27,8 +27,8 @@ Void provides the local Cloudflare binding runtime. `nitro-cloudflare-dev` creat
|
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
29
|
import { resolve } from 'node:path';
|
|
30
|
-
import { defineConfig } from 'vite';
|
|
31
30
|
import analog from '@analogjs/platform';
|
|
31
|
+
import { defineConfig } from 'vite';
|
|
32
32
|
import { voidPlugin } from 'void';
|
|
33
33
|
|
|
34
34
|
export default defineConfig({
|
|
@@ -90,8 +90,8 @@ Void-managed auth is not supported in framework mode yet. Use Better Auth's offi
|
|
|
90
90
|
```ts
|
|
91
91
|
// src/app/pages/users.server.ts
|
|
92
92
|
import type { PageServerLoad } from '@analogjs/router';
|
|
93
|
-
import { db } from 'void/db';
|
|
94
93
|
import { users } from '@schema';
|
|
94
|
+
import { db } from 'void/db';
|
|
95
95
|
|
|
96
96
|
export const load = async ({ event }: PageServerLoad) => {
|
|
97
97
|
return { users: await db.select().from(users) };
|
|
@@ -117,9 +117,9 @@ Declare variables in `env.ts` and read them with `import { env } from "void/env"
|
|
|
117
117
|
You can also access raw Cloudflare bindings via the H3 event context or the `cloudflare:workers` module:
|
|
118
118
|
|
|
119
119
|
```ts
|
|
120
|
+
import { env } from 'cloudflare:workers';
|
|
120
121
|
// src/server/routes/api/users.ts
|
|
121
122
|
import { eventHandler } from 'h3';
|
|
122
|
-
import { env } from 'cloudflare:workers';
|
|
123
123
|
|
|
124
124
|
export default eventHandler(async () => {
|
|
125
125
|
const { results } = await env.DB.prepare('SELECT * FROM users').all();
|
|
File without changes
|
|
@@ -24,8 +24,8 @@ npm install -D void
|
|
|
24
24
|
### 3. Configure `vite.config.ts`
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
|
-
import { defineConfig } from 'vite';
|
|
28
27
|
import { reactRouter } from '@react-router/dev/vite';
|
|
28
|
+
import { defineConfig } from 'vite';
|
|
29
29
|
import { voidPlugin } from 'void';
|
|
30
30
|
|
|
31
31
|
export default defineConfig({
|
|
@@ -52,9 +52,9 @@ Void-managed auth is not supported in framework mode yet. Use Better Auth's offi
|
|
|
52
52
|
### Database
|
|
53
53
|
|
|
54
54
|
```tsx
|
|
55
|
-
import type { Route } from './+types/users';
|
|
56
|
-
import { db } from 'void/db';
|
|
57
55
|
import { users } from '@schema';
|
|
56
|
+
import { db } from 'void/db';
|
|
57
|
+
import type { Route } from './+types/users';
|
|
58
58
|
|
|
59
59
|
export async function loader({}: Route.LoaderArgs) {
|
|
60
60
|
return { users: await db.select().from(users) };
|
|
@@ -91,9 +91,9 @@ Void-managed auth is not supported in framework mode yet. Use Better Auth's offi
|
|
|
91
91
|
### Database
|
|
92
92
|
|
|
93
93
|
```ts
|
|
94
|
+
import { users } from '@schema';
|
|
94
95
|
// src/routes/users/+page.server.ts
|
|
95
96
|
import { db } from 'void/db';
|
|
96
|
-
import { users } from '@schema';
|
|
97
97
|
|
|
98
98
|
export async function load() {
|
|
99
99
|
return { users: await db.select().from(users) };
|
|
@@ -24,9 +24,9 @@ npm install -D void
|
|
|
24
24
|
### 3. Configure `vite.config.ts`
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
|
-
import { defineConfig } from 'vite';
|
|
28
27
|
import { tanstackStart } from '@tanstack/react-start/plugin';
|
|
29
28
|
import react from '@vitejs/plugin-react';
|
|
29
|
+
import { defineConfig } from 'vite';
|
|
30
30
|
import { voidPlugin } from 'void';
|
|
31
31
|
|
|
32
32
|
export default defineConfig({
|
|
@@ -54,9 +54,9 @@ Void-managed auth is not supported in framework mode yet. Use Better Auth's offi
|
|
|
54
54
|
### Database
|
|
55
55
|
|
|
56
56
|
```tsx
|
|
57
|
+
import { users } from '@schema';
|
|
57
58
|
import { createServerFn } from '@tanstack/react-start';
|
|
58
59
|
import { db } from 'void/db';
|
|
59
|
-
import { users } from '@schema';
|
|
60
60
|
|
|
61
61
|
const getUsers = createServerFn().handler(async () => {
|
|
62
62
|
return db.select().from(users);
|
|
File without changes
|
|
@@ -11,8 +11,8 @@ Imported from `"void/db"`. The `db` export is a [Drizzle ORM](https://orm.drizzl
|
|
|
11
11
|
Default Drizzle instance, pre-wired with your schema from `db/schema.ts`.
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { db } from 'void/db';
|
|
15
14
|
import { users } from '@schema';
|
|
15
|
+
import { db } from 'void/db';
|
|
16
16
|
|
|
17
17
|
const allUsers = await db.select().from(users).all();
|
|
18
18
|
```
|
|
@@ -30,8 +30,8 @@ Creates a Drizzle instance for the active dialect.
|
|
|
30
30
|
For D1 projects, pass a specific D1 binding. Use this when you have multiple D1 databases or need a non-default binding.
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
|
-
import { createDb } from 'void/db';
|
|
34
33
|
import { env } from 'cloudflare:workers';
|
|
34
|
+
import { createDb } from 'void/db';
|
|
35
35
|
|
|
36
36
|
const db = createDb(env.MY_OTHER_DB);
|
|
37
37
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|