void 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/{account-cmd-CjyxcGkM.mjs → account-cmd-C84Ee8cO.mjs} +4 -4
- package/dist/{scan-ClYmX3sa.mjs → application-analysis-BVsVqc11.mjs} +135 -18
- package/dist/application-routing-B7QEjqSR.mjs +27 -0
- package/dist/{auth-CZuiVsFh.mjs → auth-CCjt0hcq.mjs} +1 -1
- package/dist/{auth-DLNN0D3Z.mjs → auth-CSkdO2Bb.mjs} +4 -47
- package/dist/{auth-link-BLO4ptzo.mjs → auth-link-CioEg6uY.mjs} +4 -4
- package/dist/{auth-router-ZUg9MF_U.mjs → auth-router-BsR981d4.mjs} +4 -4
- package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
- package/dist/{build-cmd-BxR5FROK.mjs → build-cmd-LzvNJORH.mjs} +17 -5
- package/dist/{cache-D0sWhgKI.mjs → cache-C4MvnrMH.mjs} +2 -2
- package/dist/{cancel-deploy-D4NUqFbi.mjs → cancel-deploy-abUxpP2n.mjs} +2 -2
- package/dist/{cf-build-output-BJ6yGEIS.mjs → cf-build-output-BPqOT964.mjs} +2 -1
- package/dist/cf-build-output-_0HNWysu.mjs +2 -0
- package/dist/cli/cli.mjs +80 -455
- package/dist/cli/{cf-compat.mjs → cloudflare-operation-process.mjs} +442 -421
- package/dist/cli/env-schema-probe.d.mts +2 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-Cu7jWiF1.mjs +2 -0
- package/dist/{client-BTZ3XkrB.mjs → client-RV8NVeB8.mjs} +140 -21
- package/dist/{cloudflare-auth-DQkqoMYa.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -38
- package/dist/{cloudflare-cmd-BKlfGHAy.mjs → cloudflare-cmd-BcrVyTmJ.mjs} +5 -5
- package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
- package/dist/{cloudflare-connect-Ctmrw579.mjs → cloudflare-connect-B8uPZ4nx.mjs} +3 -3
- package/dist/{cloudflare-operations-BT6OWFBk.mjs → cloudflare-operations-AiWashgg.mjs} +1 -1
- package/dist/{cloudflare-operations-B9tzgjmf.mjs → cloudflare-operations-fxHb-byx.mjs} +116 -172
- package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
- package/dist/{config-VavjpDnp.d.mts → config-BMHb8RCj.d.mts} +1 -0
- package/dist/config-C_XRIPx2.mjs +89 -0
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-Dg-WkW-C.mjs → connect-Bd4kJd9U.mjs} +5 -5
- package/dist/{create-project-DdoqwFLF.mjs → create-project-Boczwj5r.mjs} +1 -1
- package/dist/{create-project-l9J7pbtm.mjs → create-project-bMf6ffLZ.mjs} +2 -2
- package/dist/{db-gp2sCXyN.mjs → db-8uG64XLl.mjs} +21 -21
- package/dist/{delete-TTedbH6B.mjs → delete-NvbiyeJf.mjs} +2 -2
- package/dist/{deploy-CH-o2CaZ.mjs → deploy-DzAIwqNU.mjs} +908 -582
- package/dist/{deploy-B19L2Bra.mjs → deploy-bjXdFCtn.mjs} +1 -1
- package/dist/{domain-JRF59P_r.mjs → domain-y5Tvydvo.mjs} +3 -3
- package/dist/{email-Bo6G9LOZ.mjs → email-B3umsW75.mjs} +13 -28
- package/dist/{env-BYOrWQnv.mjs → env-BS6qYHDb.mjs} +4 -4
- package/dist/{env-public-BxU_0yTL.d.mts → env-public-BX_r8HR6.d.mts} +1 -1
- package/dist/{env-validation-BB4GkLxn.mjs → env-validation-BPn7vk-V.mjs} +18 -71
- package/dist/{env-validation-BXge7uyK.mjs → env-validation-DbTg7-ar.mjs} +1 -1
- package/dist/{fetch-CXDChK7B.mjs → fetch-BIZJh7vR.mjs} +2 -2
- package/dist/{fetch-stream-AOByI7Ki.mjs → fetch-stream-IvCYKyQL.mjs} +24 -4
- package/dist/{gen-sCtlCOdA.mjs → gen-B580--vC.mjs} +2 -2
- package/dist/gen-BVaUUumi.mjs +2 -0
- package/dist/{github-cmd-0-7PexDq.mjs → github-cmd-v45BdfKX.mjs} +2 -2
- package/dist/{handler-HEcZsaij.d.mts → handler-CZ4nAylQ.d.mts} +1 -1
- package/dist/help-DofyZuY7.mjs +2 -0
- package/dist/{help-GKtwl07I.mjs → help-daGKjXGk.mjs} +229 -747
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +288 -1502
- package/dist/info-B97bTX9N.mjs +113 -0
- package/dist/{init-FZx3Elvz.mjs → init-Bvy7zrBo.mjs} +46 -15
- package/dist/limits-Bq5LG8Id.d.mts +27 -0
- package/dist/limits-Cjuk2VPm.mjs +68 -0
- package/dist/{link-BrQfb_CU.mjs → link-CDqqCjFl.mjs} +3 -3
- package/dist/{list-D44jmIAM.mjs → list-CZj0dzKY.mjs} +3 -3
- package/dist/{live-CKJlvlNp.d.mts → live-Chw1eIMv.d.mts} +1 -1
- package/dist/{local-d1-Bg9OzEEO.mjs → local-d1-2CMnpuW_.mjs} +2 -2
- package/dist/login-DYt_An22.mjs +2 -0
- package/dist/{login-CAsAsQ-_.mjs → login-UZKFM_u7.mjs} +3 -3
- package/dist/{logs-BjKvFnVM.mjs → logs-CUZ6t9t3.mjs} +3 -3
- package/dist/migrate-8_2u55MD.mjs +2 -0
- package/dist/{migrate-BPITvDJN.mjs → migrate-DHul7PRV.mjs} +2 -1
- package/dist/{node-Dt7z256D.mjs → node-BkyRWRx8.mjs} +1 -1
- package/dist/operator-args-CLgKGlwU.mjs +690 -0
- package/dist/{operator-cmd-BK5CCiT9.mjs → operator-cmd-DBA6dl0m.mjs} +68 -22
- package/dist/pages/client.d.mts +34 -2
- package/dist/pages/client.mjs +59 -3
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -308
- package/dist/{parse-filename-DioPHiR9.mjs → parse-filename-CUbj-1MP.mjs} +35 -1
- package/dist/plan-D1Q5rf-r.mjs +2 -0
- package/dist/plan-NPpwZ_kc.mjs +58 -0
- package/dist/platform-args-BJdRtlLq.mjs +506 -0
- package/dist/platform-args-D3RXyR6h.mjs +2 -0
- package/dist/{platform-auth-config-BlN8xTdD.mjs → platform-auth-config-B56E9YP1.mjs} +3 -3
- package/dist/{platform-auth-protection-7d5aV2Jg.mjs → platform-auth-protection-BDWO_aER.mjs} +2 -2
- package/dist/{platform-auth-recovery-Dxij8ZbR.mjs → platform-auth-recovery-1gg4CSRe.mjs} +3 -3
- package/dist/{platform-cmd-E0FuL212.mjs → platform-cmd-Bt-1w6pY.mjs} +1 -1
- package/dist/{platform-cmd-B3hwKrFK.mjs → platform-cmd-DMcQStSc.mjs} +24 -3
- package/dist/{platform-domain-D6Xcy9ZX.mjs → platform-domain-BNkcz0OB.mjs} +2 -2
- package/dist/{platform-lifecycle-k0E0xoxx.mjs → platform-lifecycle-9OyBALhH.mjs} +327 -215
- package/dist/{platform-lifecycle-DMh_qrry.mjs → platform-lifecycle-BE6C_jxh.mjs} +1 -1
- package/dist/{platform-management-Brz_BDiT.mjs → platform-management-CjwLVQwN.mjs} +6 -3
- package/dist/{platform-management-DOtss0BN.mjs → platform-management-CnyTdcWX.mjs} +1 -1
- package/dist/platform-plans-config-BNGKGr4P.mjs +359 -0
- package/dist/{platform-recovery-BvtcXON5.mjs → platform-recovery-D6KSpuFm.mjs} +2 -2
- package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
- package/dist/{prepare-C-6YZyyg.mjs → prepare-B5Mkic5u.mjs} +1 -1
- package/dist/{prepare-CRhJbVrG.mjs → prepare-DOsL0CC9.mjs} +4 -20
- package/dist/prepare-cgvDMtSb.mjs +2 -0
- package/dist/{project-cmd-BZLCqOqw.mjs → project-cmd-CNzrqvBv.mjs} +16 -16
- package/dist/{project-team-BvgM0WoX.mjs → project-team-DQOWPfQT.mjs} +2 -2
- package/dist/{project-token-l5DqK6Az.mjs → project-token-CTDYU0Cc.mjs} +2 -2
- package/dist/{project-zero-trust-v6Mvpp8y.mjs → project-zero-trust-BNAkW-_0.mjs} +2 -2
- package/dist/{protocol-BBa6cstI.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
- package/dist/protocol-U7bfjHmA.mjs +331 -0
- package/dist/{provision-Fr9pRqce.mjs → provision-C4ORE7G7.mjs} +1 -1
- package/dist/{provision-C4IGqkBf.mjs → provision-CJFgTZY8.mjs} +89 -198
- package/dist/{requests-DN-BbNiM.mjs → requests-MhxYnau8.mjs} +2 -2
- package/dist/resource-name-C7LVpcRm.mjs +11 -0
- package/dist/{rollback-D7rzSaZM.mjs → rollback-CJ6iSDoU.mjs} +3 -3
- package/dist/route-url-CG7U-cRN.mjs +15 -0
- package/dist/{runner-B8wXwWlo.mjs → runner-CXA9Fh8h.mjs} +1 -1
- package/dist/{runner-p-dMs2UN.mjs → runner-Ol0TNjk6.mjs} +2 -2
- package/dist/runtime/ai.d.mts +12 -8
- package/dist/runtime/ai.mjs +84 -17
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/durable.d.mts +3 -1
- package/dist/runtime/durable.mjs +4 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/kv.mjs +0 -1
- package/dist/runtime/limits.d.mts +2 -0
- package/dist/runtime/limits.mjs +2 -0
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +25 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +62 -42
- package/dist/runtime/route-url.d.mts +4 -0
- package/dist/runtime/route-url.mjs +2 -0
- package/dist/runtime/routing.d.mts +180 -0
- package/dist/runtime/routing.mjs +1082 -0
- package/dist/runtime/sandbox-container.d.mts +1 -1
- package/dist/runtime/sandbox-container.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +3 -3
- package/dist/runtime/sandbox.mjs +75 -45
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +4 -2
- package/dist/runtime/ws-server.mjs +27 -2
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/runtime/ws.mjs +8 -6
- package/dist/{sandbox-qpNBT8a3.d.mts → sandbox-XZAqzFlG.d.mts} +11 -8
- package/dist/{sandbox-container-DdNEBfCc.d.mts → sandbox-container-Bo0eiFKz.d.mts} +2 -1
- package/dist/{sandbox-container-4fdqLnyb.mjs → sandbox-container-C6ItmVuN.mjs} +4 -2
- package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
- package/dist/{secret-BOtOl_cb.mjs → secret-Dli5fP0B.mjs} +4 -4
- package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
- package/dist/validate-Dq_L3s0S.mjs +2 -0
- package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
- package/dist/{wrangler-DQF1vKyf.mjs → wrangler-7K-bW_DL.mjs} +8 -239
- package/dist/{ws-BoY7vQML.d.mts → ws-CL1w7GXU.d.mts} +13 -2
- package/package.json +15 -8
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
- package/skills/void/SKILL.md +50 -135
- package/skills/void/docs/guide/ai.md +94 -84
- package/skills/void/docs/guide/app-types.md +3 -32
- package/skills/void/docs/guide/auth.md +12 -116
- package/skills/void/docs/guide/database/d1.md +9 -54
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +5 -26
- package/skills/void/docs/guide/database.md +23 -75
- package/skills/void/docs/guide/deployment.md +27 -113
- package/skills/void/docs/guide/durable-state.md +43 -18
- package/skills/void/docs/guide/edge/headers.md +3 -47
- package/skills/void/docs/guide/edge/prerendering.md +5 -20
- package/skills/void/docs/guide/edge/redirects.md +11 -64
- package/skills/void/docs/guide/edge/revalidation.md +5 -18
- package/skills/void/docs/guide/edge/rewrites.md +56 -284
- package/skills/void/docs/guide/edge/static-assets.md +22 -72
- package/skills/void/docs/guide/email/domains.md +112 -0
- package/skills/void/docs/guide/email/receiving.md +139 -0
- package/skills/void/docs/guide/email/sending.md +231 -0
- package/skills/void/docs/guide/email.md +13 -619
- package/skills/void/docs/guide/env-migration.md +11 -11
- package/skills/void/docs/guide/env-vars.md +9 -29
- package/skills/void/docs/guide/index.md +0 -15
- package/skills/void/docs/guide/jobs.md +3 -18
- package/skills/void/docs/guide/kv.md +5 -11
- package/skills/void/docs/guide/live.md +5 -56
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +78 -125
- package/skills/void/docs/guide/pages-routing/head.md +10 -10
- package/skills/void/docs/guide/pages-routing/islands.md +6 -36
- package/skills/void/docs/guide/pages-routing/layouts.md +6 -128
- package/skills/void/docs/guide/pages-routing/loaders.md +3 -19
- package/skills/void/docs/guide/pages-routing/markdown.md +13 -171
- package/skills/void/docs/guide/pages-routing/overview.md +7 -17
- package/skills/void/docs/guide/pages-routing/view-transitions.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +1 -4
- package/skills/void/docs/guide/platform/administration/email.md +35 -8
- package/skills/void/docs/guide/platform/administration/operations.md +26 -4
- package/skills/void/docs/guide/platform/administration/plans.md +126 -0
- package/skills/void/docs/guide/platform/administration/projects.md +5 -2
- package/skills/void/docs/guide/platform/administration/zero-trust.md +23 -152
- package/skills/void/docs/guide/platform/development/runtime.md +3 -13
- package/skills/void/docs/guide/platform/development/schema-ci.md +0 -58
- package/skills/void/docs/guide/platform/installation/credentials.md +6 -4
- package/skills/void/docs/guide/platform/installation/domains.md +30 -2
- package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
- package/skills/void/docs/guide/platform/installation/prerequisites.md +20 -15
- package/skills/void/docs/guide/platform/installation/setup.md +9 -5
- package/skills/void/docs/guide/platform-administration.md +1 -0
- package/skills/void/docs/guide/queues.md +7 -9
- package/skills/void/docs/guide/quickstart.md +38 -37
- package/skills/void/docs/guide/remote-dev.md +4 -9
- package/skills/void/docs/guide/sandboxes.md +29 -21
- package/skills/void/docs/guide/server-routing.md +9 -72
- package/skills/void/docs/guide/sse.md +4 -18
- package/skills/void/docs/guide/ssg.md +3 -15
- package/skills/void/docs/guide/ssr.md +14 -62
- package/skills/void/docs/guide/storage.md +9 -4
- package/skills/void/docs/guide/type-safety.md +3 -14
- package/skills/void/docs/guide/typed-fetch.md +3 -7
- package/skills/void/docs/guide/websockets.md +68 -40
- package/skills/void/docs/integrations/agents.md +3 -3
- package/skills/void/docs/integrations/cloudflare.md +85 -316
- package/skills/void/docs/integrations/frameworks/analog.md +5 -64
- package/skills/void/docs/integrations/frameworks/astro.md +4 -73
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -62
- package/skills/void/docs/integrations/frameworks/overview.md +11 -54
- package/skills/void/docs/integrations/frameworks/react-router.md +5 -60
- package/skills/void/docs/integrations/frameworks/sveltekit.md +6 -65
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +4 -62
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -69
- package/skills/void/docs/reference/api/auth.md +156 -0
- package/skills/void/docs/reference/api/client.md +87 -0
- package/skills/void/docs/reference/api/database.md +95 -0
- package/skills/void/docs/reference/api/durable.md +46 -0
- package/skills/void/docs/reference/api/env.md +50 -0
- package/skills/void/docs/reference/api/handlers.md +254 -0
- package/skills/void/docs/reference/api/pages.md +241 -0
- package/skills/void/docs/reference/api/plugin.md +39 -0
- package/skills/void/docs/reference/api/resources.md +109 -0
- package/skills/void/docs/reference/api/rewrites.md +76 -0
- package/skills/void/docs/reference/api/types.md +92 -0
- package/skills/void/docs/reference/api.md +56 -1218
- package/skills/void/docs/reference/cli/auth.md +88 -0
- package/skills/void/docs/reference/cli/database.md +128 -0
- package/skills/void/docs/reference/cli/deploy.md +85 -0
- package/skills/void/docs/reference/cli/domains.md +41 -0
- package/skills/void/docs/reference/cli/email.md +129 -0
- package/skills/void/docs/reference/cli/generate.md +116 -0
- package/skills/void/docs/reference/cli/github.md +189 -0
- package/skills/void/docs/reference/cli/platform-config.md +92 -0
- package/skills/void/docs/reference/cli/platform-email.md +81 -0
- package/skills/void/docs/reference/cli/platform-installation.md +127 -0
- package/skills/void/docs/reference/cli/platform-operations.md +90 -0
- package/skills/void/docs/reference/cli/platform-users.md +89 -0
- package/skills/void/docs/reference/cli/platform-zero-trust.md +45 -0
- package/skills/void/docs/reference/cli/platform.md +70 -0
- package/skills/void/docs/reference/cli/project.md +214 -0
- package/skills/void/docs/reference/cli/secrets.md +76 -0
- package/skills/void/docs/reference/cli/setup.md +70 -0
- package/skills/void/docs/reference/cli.md +32 -1682
- package/skills/void/docs/reference/config.md +12 -18
- package/skills/void/docs/reference/resource-inference.md +3 -58
- package/skills/void/docs/reference/structure.md +14 -41
- package/dist/canonical-json-DuDiiUsQ.mjs +0 -13
- package/dist/client-Czz8o5jP.mjs +0 -2
- package/dist/gen-CNJ62MM7.mjs +0 -2
- package/dist/help-CmZzxUba.mjs +0 -2
- package/dist/login-CGcRKEoi.mjs +0 -2
- package/dist/migrate-CYfbKkXh.mjs +0 -2
- package/dist/plan-BEZ8VJW0.mjs +0 -256
- package/dist/plan-DpuOr14e.mjs +0 -2
- package/dist/prepare-Bm3iq-u4.mjs +0 -2
- package/dist/validate-EKmJWxmy.mjs +0 -2
- /package/dist/cli/{cf-compat.d.mts → cloudflare-operation-process.d.mts} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Connections and Authentication {#connect}
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
void connect
|
|
9
|
+
void connect https://platform.example.com
|
|
10
|
+
void connect --platform cloudflare
|
|
11
|
+
void connect --platform void
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Connect a project to its deployment destination. With no arguments, choose Cloudflare or a Void platform interactively. A URL selects a Void platform directly. `--platform void` offers saved platforms and an option to enter another URL.
|
|
15
|
+
|
|
16
|
+
For Cloudflare, Void signs in through the browser when needed, selects an accessible account, and saves `cloudflare.account_id` in `void.config.ts` or resolved state in `void.lock.json`. It shares this setup with `void init`. An existing account selection is preserved; conflicting or inaccessible account settings must be resolved before continuing.
|
|
17
|
+
|
|
18
|
+
For a Void platform, Void checks the connection and signs you in through your browser when needed. It saves credentials in your system keychain separately for each platform.
|
|
19
|
+
|
|
20
|
+
The deployment preference is saved in `.void/project.json`. Connecting to another Void platform preserves an existing project link; the CLI explains when that link or an environment override still selects a different destination. Use `void project link` to explicitly choose a project. Cloudflare selection also retains existing Void project metadata so you can switch back later.
|
|
21
|
+
|
|
22
|
+
In a non-interactive shell, supply a URL or explicit target. Cloudflare requires usable credentials and an unambiguous account (`CLOUDFLARE_ACCOUNT_ID` when needed). For a Void platform, provide `VOID_TOKEN` with a matching `VOID_API_URL`, or reuse a valid origin-scoped keychain session. Use `void connect <url> --no-login` to save the verified connection without authenticating; this option is only available for Void platforms.
|
|
23
|
+
|
|
24
|
+
## Authentication {#authentication}
|
|
25
|
+
|
|
26
|
+
`void auth login`, `void auth status`, and `void auth logout` use the destination
|
|
27
|
+
saved for the current project by `void init` or `void connect`. If no destination
|
|
28
|
+
is saved, interactive commands let you choose Cloudflare or a connected Void
|
|
29
|
+
platform. In a non-interactive shell, pass `--platform cloudflare|void` or use
|
|
30
|
+
the explicit `void cloudflare` and `void account` commands. Choosing a destination
|
|
31
|
+
for authentication does not change the project's deploy target.
|
|
32
|
+
|
|
33
|
+
`void auth whoami`, `void auth link`, and `void auth token` remain supported for
|
|
34
|
+
existing scripts. `whoami` follows the selected destination; `link` and `token`
|
|
35
|
+
are Void account operations. Prefer `void auth status`, `void account link`, and
|
|
36
|
+
`void account token` in new scripts.
|
|
37
|
+
|
|
38
|
+
## Void platform account {#void-platform-account}
|
|
39
|
+
|
|
40
|
+
### `void account login` {#void-account-login}
|
|
41
|
+
|
|
42
|
+
Browser login through one of the platform's currently enabled methods. The token is saved in the operating-system keychain, scoped to the platform origin. Login fails closed when no keychain is available instead of writing the token to a plaintext file; headless environments use `VOID_TOKEN` from their secret manager.
|
|
43
|
+
|
|
44
|
+
If an older CLI login is no longer recognized after updating Void, run `void account login` again. Your saved platform and project links remain unchanged.
|
|
45
|
+
|
|
46
|
+
Set `VOID_API_URL` alongside `VOID_TOKEN` to identify the platform that issued it.
|
|
47
|
+
A token without an API URL is only used for Void Cloud's production API; a saved
|
|
48
|
+
connection or project cannot forward it to another platform. To use a platform's
|
|
49
|
+
saved login instead, unset `VOID_TOKEN`.
|
|
50
|
+
|
|
51
|
+
This is optional if you already completed auth during `void connect` or the interactive `void init` flow.
|
|
52
|
+
|
|
53
|
+
### `void account link [connection-id]` {#void-account-link-connection-id}
|
|
54
|
+
|
|
55
|
+
Link another enabled login method to your current account. Sign in again if your
|
|
56
|
+
session is no longer recent, complete the additional provider's browser login,
|
|
57
|
+
and confirm the displayed identity. With no connection ID, choose an enabled
|
|
58
|
+
method interactively. The optional dashboard exposes the same flow in **Account**.
|
|
59
|
+
|
|
60
|
+
### `void account logout` {#void-account-logout}
|
|
61
|
+
|
|
62
|
+
Removes saved credentials.
|
|
63
|
+
|
|
64
|
+
### `void account whoami` {#void-account-whoami}
|
|
65
|
+
|
|
66
|
+
Prints your current login.
|
|
67
|
+
|
|
68
|
+
### `void account token` {#void-account-token}
|
|
69
|
+
|
|
70
|
+
Copies your human auth token to the system clipboard. It is intended for
|
|
71
|
+
interactive troubleshooting and remains subject to login-method revocation. Do
|
|
72
|
+
not combine it with a Cloudflare Access service token for CI; machine Access
|
|
73
|
+
proof cannot turn a human Void token into an automation identity. Create a
|
|
74
|
+
project-scoped credential with `void project token create` instead.
|
|
75
|
+
|
|
76
|
+
## Cloudflare authentication {#cloudflare-authentication}
|
|
77
|
+
|
|
78
|
+
Use Void's Cloudflare commands to sign in and manage credentials. No separate Cloudflare CLI is needed. Browser credentials are encrypted and protected by your system keychain.
|
|
79
|
+
|
|
80
|
+
- `void cloudflare login` — sign in through your browser or switch Cloudflare users.
|
|
81
|
+
- `void cloudflare status` — show your identity, credential source, accessible accounts, and deployment account.
|
|
82
|
+
- `void cloudflare logout` — remove the local browser session.
|
|
83
|
+
|
|
84
|
+
Interactive `void connect --platform cloudflare`, `void init`, and `void deploy --platform cloudflare` invoke the same login flow automatically when necessary. Non-interactive CI must set `CLOUDFLARE_API_TOKEN`.
|
|
85
|
+
|
|
86
|
+
Signing in changes the browser session, not `account_id` in the project configuration. Check `void cloudflare status` after switching users; if the new user cannot access the pinned account, resolve the project target separately before deploying.
|
|
87
|
+
|
|
88
|
+
An API token or global API key pair in the environment takes precedence over browser credentials. Explicit browser login stops with the names of these overrides; remove them from that shell before signing in. `status` reports the active credential source, and `logout` warns if environment credentials remain active. Explicit browser login requires an interactive terminal; automatic deployment checks continue to reuse valid sessions.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Database {#database}
|
|
6
|
+
|
|
7
|
+
## `void db push` {#void-db-push}
|
|
8
|
+
|
|
9
|
+
Apply your Drizzle schema directly to the development database without creating migration files. D1 updates the local database; PostgreSQL and MySQL use `DATABASE_URL` from `.env`.
|
|
10
|
+
|
|
11
|
+
Use this for quick schema iteration while prototyping. Before deploying, generate and review migration files with `void db generate`.
|
|
12
|
+
|
|
13
|
+
## `void db generate` {#void-db-generate}
|
|
14
|
+
|
|
15
|
+
Generate SQL migration files from schema changes.
|
|
16
|
+
|
|
17
|
+
Compares your schema with the last Drizzle snapshot and writes migrations under `db/migrations/`. It includes Void-managed auth tables and configured auth plugins, even without an application schema. Review and commit the generated files before deploying.
|
|
18
|
+
|
|
19
|
+
For SQLite, Void checks that the migration history applies to a fresh database. If generation fails this check, the previous SQL, snapshots, and journal are restored. If an existing migration fails, repair that unapplied migration first: rerunning generation compares snapshots and does not repair existing SQL. This check does not verify that a migration preserves existing data; review table rebuilds and foreign-key actions carefully.
|
|
20
|
+
|
|
21
|
+
## `void db status` {#void-db-status}
|
|
22
|
+
|
|
23
|
+
Show migration status. Displays which migrations are applied or pending locally, then uses the saved deployment target for remote status: the hosted API for Void projects, the pinned D1 database and its configured migration table for direct Cloudflare SQLite projects, or the shell `DATABASE_URL` for direct Cloudflare PostgreSQL/MySQL projects. If the remote credential or service is unavailable, local status is still shown.
|
|
24
|
+
|
|
25
|
+
## `void db reset` {#void-db-reset}
|
|
26
|
+
|
|
27
|
+
Drop the local D1 database and re-apply all migrations. Does not affect the remote database.
|
|
28
|
+
|
|
29
|
+
## `void db seed` {#void-db-seed}
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
void db seed [--file <path>]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Reset the local database, re-apply all migrations, then execute a seed file.
|
|
36
|
+
|
|
37
|
+
If `--file` is omitted, Void looks for default seed files in this order: `db/seed.ts`, `db/seed.mts`, `db/seed.js`, `db/seed.mjs`, `db/seed.sql`.
|
|
38
|
+
|
|
39
|
+
If more than one default seed file exists, the CLI stops and asks you to pass `--file <path>`.
|
|
40
|
+
|
|
41
|
+
Programmatic seed modules must export either a default function or a named `seed` function.
|
|
42
|
+
|
|
43
|
+
## `void db execute` {#void-db-execute}
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
void db execute <sql>
|
|
47
|
+
void db execute --file <path>
|
|
48
|
+
void db execute --remote <sql>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Run ad-hoc SQL against the database. Provide SQL inline or from a file. SELECT queries display results as a formatted table; other statements execute silently.
|
|
52
|
+
|
|
53
|
+
By default, targets the local database. Pass `--remote` to run against the deployed database selected in `.void/project.json`:
|
|
54
|
+
|
|
55
|
+
- **Void platform D1 projects**: routes the query through the selected platform's registered proxy using your auth token. Void Cloud's proxy is `proxy.void.cloud`; a self-hosted platform uses its own proxy URL.
|
|
56
|
+
- **Direct Cloudflare D1 projects**: invokes Cloudflare against the pinned D1 binding from `void.config.ts` or `void.lock.json`.
|
|
57
|
+
- **Hosted PostgreSQL and MySQL projects**: fetches the stored connection string from the platform and connects directly.
|
|
58
|
+
- **Direct Cloudflare PostgreSQL and MySQL projects**: uses `DATABASE_URL` from the current shell; Cloudflare cannot return the password from Hyperdrive.
|
|
59
|
+
|
|
60
|
+
For destructive statements (`DELETE`, `UPDATE`, `DROP`, etc.) when running in a TTY, you will be prompted to confirm before the query is sent to the deployed database. Non-TTY environments (CI) skip the prompt.
|
|
61
|
+
|
|
62
|
+
## `void db migrate` {#void-db-migrate}
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
void db migrate [--remote]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Apply pending migrations to the local database without resetting. Unlike `void db reset`, this preserves existing data and only runs migrations that haven't been applied yet.
|
|
69
|
+
|
|
70
|
+
Pass `--remote` to apply pending migrations to the saved target. Hosted projects require a Void login and link. Direct Cloudflare D1 projects use the binding's configured migration directory, table, and pattern; direct PostgreSQL and MySQL projects use the shell `DATABASE_URL`.
|
|
71
|
+
|
|
72
|
+
## `void db studio` {#void-db-studio}
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
void db studio [--remote]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Open [Drizzle Studio](https://orm.drizzle.team/docs/drizzle-kit-studio) for the database. Launches a web-based GUI for browsing and editing your data.
|
|
79
|
+
|
|
80
|
+
By default, targets the local database. Pass `--remote` to open Studio against the deployed database:
|
|
81
|
+
|
|
82
|
+
- **PostgreSQL and MySQL projects**: fetch the stored connection string from the platform and open Studio against it. If the URL isn't stored yet, run `void db set-url` first.
|
|
83
|
+
- **D1 projects**: remote Studio is not yet supported. Use `void db execute --remote` for ad-hoc queries against your deployed D1 database.
|
|
84
|
+
|
|
85
|
+
On direct Cloudflare PostgreSQL/MySQL targets, remote Studio uses `DATABASE_URL` from the current shell. Direct D1 Studio remains unsupported; use `void db execute --remote`.
|
|
86
|
+
|
|
87
|
+
## `void db rename-migrations` {#void-db-rename-migrations}
|
|
88
|
+
|
|
89
|
+
Rename existing migrations from the old numeric prefix format (`0001_name.sql`) to timestamp-based format (`20260410161500_name.sql`). Updates local tracking table and remote records if logged in with a linked project.
|
|
90
|
+
|
|
91
|
+
## `void db connect` {#void-db-connect}
|
|
92
|
+
|
|
93
|
+
Connect an existing PostgreSQL/MySQL database or provision one through an adapter:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
void db connect 'postgresql://user:password@host/database'
|
|
97
|
+
NEON_API_KEY=... void db connect --provider neon --name my-app
|
|
98
|
+
void db connect --provider @acme/void-db-provider --region region-id
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The command saves `DATABASE_URL` in `.env`. When authenticated with a linked Void project, it also updates the encrypted deployment URL; pass `--local-only` to skip that sync. `neon` is built in. Other adapters are project dependencies or local modules exporting a `DatabaseProviderAdapter` from `void/database-provider`.
|
|
102
|
+
|
|
103
|
+
Provider-created credentials are never printed. For direct Cloudflare deploys, configure the same URL as a protected `DATABASE_URL` in the shell or CI environment that runs deploy.
|
|
104
|
+
|
|
105
|
+
## `void db set-url` {#void-db-set-url}
|
|
106
|
+
|
|
107
|
+
Update the PostgreSQL or MySQL connection string for deployment. Available for projects with `"database": "pg"` or `"database": "mysql"`.
|
|
108
|
+
|
|
109
|
+
Prompts for a connection string and sends it to the platform API to create or update the Hyperdrive configuration.
|
|
110
|
+
|
|
111
|
+
## `void db export` {#void-db-export}
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
void db export [--output <path>] [--no-data] [--no-schema] [--table <name>]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Dump the local database as SQL. Outputs to stdout by default (pipeable), or to a file with `--output`.
|
|
118
|
+
|
|
119
|
+
Data exports preserve SQLite AUTOINCREMENT and PostgreSQL SERIAL and identity counters, including IDs consumed by deleted rows. SQLite schema exports include indexes, views, and triggers. PostgreSQL schema exports preserve column types, generated columns, identity definitions, serial sequences, constraints, and indexes. `--no-schema` restores counter values into an existing schema; `--no-data` starts counters at their schema-defined starting values.
|
|
120
|
+
|
|
121
|
+
For PostgreSQL schemas with views, triggers, custom types, functions, or standalone sequences, use `pg_dump` for a complete backup. `void db export` reports these objects before writing a schema dump.
|
|
122
|
+
|
|
123
|
+
| Flag | Purpose |
|
|
124
|
+
| ----------------- | ---------------------------------- |
|
|
125
|
+
| `--output <path>` | Write to a file instead of stdout |
|
|
126
|
+
| `--no-data` | Schema only (no INSERT statements) |
|
|
127
|
+
| `--no-schema` | Data only (no CREATE TABLE) |
|
|
128
|
+
| `--table <name>` | Export a single table |
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Deployment {#deploy}
|
|
6
|
+
|
|
7
|
+
## `void deploy` {#void-deploy}
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
void deploy [--project <name>] [--dir <path>] [--spa] [--skip-build] [--debug]
|
|
11
|
+
void deploy [--platform <cloudflare|void>] [--require-email]
|
|
12
|
+
void deploy --platform cloudflare --atomic
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Auto-detects your project type and chooses the right pipeline. See [Supported App Types](../../guide/app-types.md) and [Deployment](../../guide/deployment.md) for details.
|
|
16
|
+
|
|
17
|
+
On an upgraded Void platform, an accepted deployment continues if the CLI disconnects. The CLI automatically reconnects to its progress. Pressing Ctrl+C stops observation; use `void project cancel` to request cancellation and `void project status` to inspect the result. If interrupted execution requires recovery, wait for its result before deploying again.
|
|
18
|
+
|
|
19
|
+
For an existing Void Worker, `void deploy` can link the Worker and migrate its root Cloudflare config. Keep the first deployment focused on the existing app. See [Deploy an existing Worker](../../integrations/cloudflare.md#deploy-an-existing-worker) for requirements and the ISR cache choice.
|
|
20
|
+
|
|
21
|
+
For Drizzle projects, deploy performs a read-only schema drift check. If a new migration would be generated, deploy stops and tells you to run `void db generate`, review the migration, commit it yourself, and rerun `void deploy`.
|
|
22
|
+
|
|
23
|
+
| Flag | Purpose |
|
|
24
|
+
| ------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| `--platform <cloudflare\|void>` | Override the platform stored in `.void/project.json` |
|
|
26
|
+
| `--project <name>` | Target a specific Void project by slug; not supported with `--platform cloudflare` |
|
|
27
|
+
| `--dir <path>` | Deploy a pre-built static directory (skips build) |
|
|
28
|
+
| `--spa` | Use SPA mode instead of SSG for static deploys |
|
|
29
|
+
| `--skip-build` | Skip the build step; on Cloudflare this is supported for static/SPA/SSG deploys only |
|
|
30
|
+
| `--require-email` | Fail when email cannot be set up instead of deploying without it; requires `--platform cloudflare` |
|
|
31
|
+
| `--atomic` | Publish an existing Durable Object Worker directly; readiness is checked after traffic changes |
|
|
32
|
+
| `--debug` | Mirror the structured deploy log to stderr (also written to `~/.void/logs/`) |
|
|
33
|
+
|
|
34
|
+
`--atomic` applies to one deployment. For an existing Durable Object Worker that consistently cannot stage, set `deploy: { cloudflare: { mode: 'atomic' } }` in `void.config.ts` so plain `void deploy` uses atomic publication. The default is `staged`.
|
|
35
|
+
|
|
36
|
+
Every deploy writes a JSONL log to `~/.void/logs/`. Failures print the log path and relevant details. Use `--debug` or `VOID_DEPLOY_DEBUG=1` to mirror it to stderr.
|
|
37
|
+
|
|
38
|
+
Keep credentials out of build commands and register them as CI secrets so your CI provider can mask them in logs.
|
|
39
|
+
|
|
40
|
+
Platform resolution precedence:
|
|
41
|
+
|
|
42
|
+
1. `--platform <cloudflare|void>`
|
|
43
|
+
2. `platform` in `.void/project.json`
|
|
44
|
+
3. Void for projects initialized by an older SDK without a saved platform
|
|
45
|
+
|
|
46
|
+
Selecting Skip deployment setup stores `"platform": "none"`; a later `void deploy` stops with guidance until a platform override is provided.
|
|
47
|
+
|
|
48
|
+
For the Void platform, project resolution precedence is:
|
|
49
|
+
|
|
50
|
+
1. `--project <name>`
|
|
51
|
+
2. `VOID_PROJECT`
|
|
52
|
+
3. linked project in `.void/project.json`
|
|
53
|
+
|
|
54
|
+
If no project is linked and no override is provided, CLI prompts to link or create one. In CI (non-TTY), `void deploy` errors out instead — set `VOID_PROJECT` or pass `--project <slug>`.
|
|
55
|
+
|
|
56
|
+
## `void deploy --platform cloudflare` {#void-deploy-platform-cloudflare}
|
|
57
|
+
|
|
58
|
+
Build and deploy to your Cloudflare account using `void.config.ts`:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
void deploy --platform cloudflare
|
|
62
|
+
void deploy --platform cloudflare --require-email # fail instead of deploying without email
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Void signs you in through your browser when needed and saves the selected account. In CI, set `CLOUDFLARE_API_TOKEN` and, if the token can access several accounts, `CLOUDFLARE_ACCOUNT_ID`.
|
|
66
|
+
|
|
67
|
+
| Option or setting | Cloudflare behavior |
|
|
68
|
+
| ------------------------------ | -------------------------------------------------------------------------------------- |
|
|
69
|
+
| `--dir`, `--spa` | Deploy static output through a small Worker and Workers Assets |
|
|
70
|
+
| `--skip-build` | Reuse existing static, SPA, or SSG output; unavailable for Worker apps |
|
|
71
|
+
| `--project` | Unavailable; the Worker and account come from `void.config.ts` and `void.lock.json` |
|
|
72
|
+
| Named environments | Unavailable; use the top-level `cloudflare` config |
|
|
73
|
+
| `CLOUDFLARE_WORKERS_SUBDOMAIN` | Needed in fresh CI when versions have no preview URL; cached locally after a deploy |
|
|
74
|
+
| `--require-email` | Fail instead of deploying without email when the email step cannot run, as in CI |
|
|
75
|
+
| `DATABASE_URL` | Required in the deploy environment for PostgreSQL or MySQL provisioning and migrations |
|
|
76
|
+
|
|
77
|
+
The token needs Workers Scripts: Edit, read access to bound resources, and edit access to products Void provisions. Commit `void.lock.json` after the first deploy before using other machines or CI.
|
|
78
|
+
|
|
79
|
+
Use `void secret put <NAME>` for production server values. Local `.env` values are never deployed. Run `void db generate` and commit schema changes before deploying.
|
|
80
|
+
|
|
81
|
+
Sandbox requires [Workers Paid](https://dash.cloudflare.com/?to=/:account/workers/plans), Docker, and Containers access. API tokens need Account / Containers: Edit and Account / Cloudchamber: Edit.
|
|
82
|
+
|
|
83
|
+
For email, set `email.from` and run `void email setup --platform cloudflare` locally. Commit the lock file and pass `--require-email` in CI. See [Email setup](../../guide/email/domains.md#your-own-cloudflare-account).
|
|
84
|
+
|
|
85
|
+
For Access credentials, Hyperdrive permissions, readiness, and rollback, see [Cloudflare deployment](../../integrations/cloudflare.md#deploy-to-your-own-cloudflare-account).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Custom Domains {#custom-domains}
|
|
6
|
+
|
|
7
|
+
## `void domain add` {#void-domain-add}
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
void domain add <hostname> [--project <name>]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Add a custom domain to the saved target. Hosted Void projects print the DNS records needed for SaaS hostname validation. Direct Cloudflare projects add a `custom_domain` route and immediately synchronize only the route configuration, leaving cron, queue, and workflow triggers unchanged; Cloudflare manages the DNS record and TLS certificate in a zone on the pinned account. Convert a legacy singular `route` field to a `routes` array first so adding the domain cannot shadow the existing route.
|
|
14
|
+
|
|
15
|
+
> Wildcard custom hostnames (`*.example.com`) are not supported — register each subdomain individually.
|
|
16
|
+
|
|
17
|
+
## `void domain delete` {#void-domain-delete}
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
void domain delete <hostname> [--project <name>]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Direct Cloudflare projects apply the change immediately. Deleting the final custom domain uses your browser session from `void cloudflare login` or an API token with Workers Scripts: Edit permission. If Cloudflare rejects the change, Void attempts to restore the previous domain configuration and reports whether recovery succeeded.
|
|
24
|
+
|
|
25
|
+
## `void domain list` {#void-domain-list}
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
void domain list [--project <name>]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
List all custom domains. Hosted projects show active/pending state from the platform; direct Cloudflare projects list the custom-domain routes currently configured in `void.config.ts`.
|
|
32
|
+
|
|
33
|
+
## `void domain status` {#void-domain-status}
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
void domain status <hostname> [--project <name>] [--verbose]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Show domain verification and TLS certificate status, including DNS records to configure and any required action. Domains activate automatically once verification and certificate issuance finish.
|
|
40
|
+
|
|
41
|
+
For direct Cloudflare projects, status reports whether the route is present in the Void Cloudflare config. It does not claim to inspect remote certificate issuance; Cloudflare owns that state and exposes it in the dashboard. `--project` is hosted-only.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Email {#email}
|
|
6
|
+
|
|
7
|
+
Inspect email usage and manage the recipients a project is allowed to send to. See [Email](../../guide/email.md) for the runtime API.
|
|
8
|
+
|
|
9
|
+
Project resolution for email commands follows the same order as deploy (`--project`, `VOID_PROJECT`, linked project). `void email setup` and `void email status --platform cloudflare` are the exception: they act on your own Cloudflare account through your Cloudflare sign-in (`void cloudflare login`) and need no Void project.
|
|
10
|
+
|
|
11
|
+
## `void email usage` {#void-email-usage}
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
void email usage [--project <name>]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Show the current month's recipient attempts and inbound receipts, the monthly attempt limit, and how much of it is left. Reserved submissions count toward the limit; started attempts remain charged even if delivery fails or its outcome is unknown. A suspended project is flagged in the output.
|
|
18
|
+
|
|
19
|
+
## `void email logs` {#void-email-logs}
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
void email logs [--limit <n>] [--project <name>]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Show recent email operation metadata retained for 30 days: timestamp, direction, operation ID, recipient, and state. `--limit` accepts 1–100. Subjects, bodies, and attachments are not stored. Provider acceptance does not confirm mailbox delivery; inspect unknown outcomes before retrying.
|
|
26
|
+
|
|
27
|
+
## `void email destinations` {#void-email-destinations}
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
void email destinations [--project <name>]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
List the project's recipient addresses and their state (`verified`, `pending`, or `failed`). Outbound mail is only delivered to verified addresses.
|
|
34
|
+
|
|
35
|
+
## `void email allow` {#void-email-allow}
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
void email allow <address> [--project <name>]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Add one recipient to the project's destination list. Cloudflare emails that address a verification link — the recipient clicks it, with no Void or Cloudflare account required. Then run `void email destinations`: the listing is what records the click, and until it has, a send to that address returns `UNVERIFIED_DESTINATION` for that recipient. If the link did not arrive or has expired, run `void email allow <address>` again while the address is still pending — the CLI re-sends the link, or tells you how to get a fresh one.
|
|
42
|
+
|
|
43
|
+
The project owner's email is added automatically when the project is created, so it skips this step but not the verification: unless Cloudflare already had it verified for an earlier project of yours, click the link it mailed and run `void email destinations`; until then a send to yourself returns `UNVERIFIED_DESTINATION` for that recipient.
|
|
44
|
+
|
|
45
|
+
## `void email disallow` {#void-email-disallow}
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
void email disallow <address> [--project <name>]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Remove one recipient from the project's destination list. New sends to that address are refused immediately; previously admitted attempts may finish. No deploy is involved.
|
|
52
|
+
|
|
53
|
+
## `void email domain` {#void-email-domain}
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
void email domain <add|status|list|sync|rotate-secret|remove> [<domain>] [--project <name>]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Send and receive at your own domain on a Cloudflare zone you own, registered to the project. Void platform only — on your own Cloudflare account the mail domain comes from `email.from` instead (see `void email setup`). The walkthrough is [Your own domain on the platform](../../guide/email/domains.md#your-own-domain-on-the-platform).
|
|
60
|
+
|
|
61
|
+
### `void email domain add` {#void-email-domain-add}
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
void email domain add <domain> [--project <name>]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Register an exact domain with the project using a scoped Cloudflare API token. The CLI opens a token template, accepts a masked paste or newly copied token, and asks you to confirm account and zone restrictions. Credentials are encrypted for the zone connection. Custom inbound email requires a Cloudflare zone apex because its catch-all does not cover subdomains. Foreign MX records and catch-alls are preserved; use another zone apex or the platform shared mail address when the apex already receives mail. Each custom apex belongs to one project. Setup returns an operation ID so an interrupted request can be checked without restarting the operation.
|
|
68
|
+
|
|
69
|
+
### `void email domain status` {#void-email-domain-status}
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
void email domain status <domain> [--project <name>]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Show the recorded inbound, outbound, and management readiness, observation times, and latest operation. Use `sync` to reconcile setup and refresh readiness.
|
|
76
|
+
|
|
77
|
+
### `void email domain list` {#void-email-domain-list}
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
void email domain list [--project <name>]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
List the project's registered email domains and readiness.
|
|
84
|
+
|
|
85
|
+
### `void email domain sync` {#void-email-domain-sync}
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
void email domain sync <domain> [--project <name>]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Reconcile the domain connection and refresh readiness. Sync does not rotate its secret. A blocked or uncertain operation exits unsuccessfully and names the operation to inspect.
|
|
92
|
+
|
|
93
|
+
### `void email domain rotate-secret` {#void-email-domain-rotate-secret}
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
void email domain rotate-secret <domain> [--project <name>]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Rotate the connection secret shared by this domain and other domains on the same zone. Inbound delivery must be ready; run `void email domain sync <domain>` first if setup is incomplete. Inspect an uncertain result before retrying.
|
|
100
|
+
|
|
101
|
+
### `void email domain remove` {#void-email-domain-remove}
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
void email domain remove <domain> [--project <name>]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Disable the domain assignment and record cleanup. Zone resources used by another domain remain available. Unfinished or uncertain cleanup remains recorded until it can be reconciled safely.
|
|
108
|
+
|
|
109
|
+
## `void email status` {#void-email-status}
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
void email status --platform cloudflare
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Check the domain configured in `email.from`: permissions, DNS, routing, sending, handler addresses, and the email binding. Exits unsuccessfully when setup is incomplete. Workers Free setup can be ready with sending limited to verified destinations; run `void email setup --platform cloudflare` after upgrading to Workers Paid.
|
|
116
|
+
|
|
117
|
+
Without `--platform cloudflare` (or with `--platform void`) the command is not available yet; on the Void platform use `void email usage` and `void email destinations`.
|
|
118
|
+
|
|
119
|
+
## `void email setup` {#void-email-setup}
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
void email setup --platform cloudflare
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Set up email before deploying from CI. Requires `email.from` in `void.config.ts`, an interactive terminal, and Cloudflare email permissions.
|
|
126
|
+
|
|
127
|
+
Void shows the planned DNS, routing, plus-addressing, and sending changes and asks before applying them. Commit `void.lock.json`, then run `void deploy --platform cloudflare --require-email` in CI.
|
|
128
|
+
|
|
129
|
+
On Workers Free, inbound mail and sends to verified recipients remain available. Run this command again after upgrading to Workers Paid to enable arbitrary recipients. See [Email setup](../../guide/email/domains.md#your-own-cloudflare-account).
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Code Generation {#code-generation}
|
|
6
|
+
|
|
7
|
+
## `void gen model` {#void-gen-model}
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
void gen model <name> [columns...]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Scaffold a Drizzle table, list and create routes, and a route to fetch one row by ID.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
void gen model posts title:string body:text published:boolean
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Creates:
|
|
20
|
+
|
|
21
|
+
- `db/schema/posts.ts`: a table with `id`, `createdAt`, `updatedAt`, and your columns
|
|
22
|
+
- An export from `db/schema.ts`
|
|
23
|
+
- `routes/api/posts/index.ts`: `GET` for list and `POST` for insert with validation
|
|
24
|
+
- `routes/api/posts/[id].ts`: `GET` by id with `404` handling
|
|
25
|
+
- Regenerated `.void/db.d.ts`
|
|
26
|
+
|
|
27
|
+
The generated routes automatically detect your validation library from `package.json` (`valibot`, `zod`, or `arktype`). If none is found, you will be prompted to choose one or skip validation. Run `void db push` to apply the schema locally, or `void db generate` to create migrations before deploying.
|
|
28
|
+
|
|
29
|
+
Column format: `name:type` or `name:type?` (nullable). Types: `string`, `text`, `datetime`, `integer`, `boolean`, `real`, `blob`.
|
|
30
|
+
|
|
31
|
+
Model names must be lowercase alphanumeric with underscores (e.g. `posts`, `user_roles`). Existing files are never overwritten.
|
|
32
|
+
|
|
33
|
+
## `void gen migration` {#void-gen-migration}
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
void gen migration <name>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Create an empty migration file with a timestamp prefix (`YYYYMMDDHHMMSS`).
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
void gen migration add_avatar_to_users
|
|
43
|
+
# → db/migrations/20260410161500_add_avatar_to_users.sql
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Existing projects using the old numeric prefix (`0001_`, `0002_`, ...) can rename with `void db rename-migrations`.
|
|
47
|
+
|
|
48
|
+
## `void gen route` {#void-gen-route}
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
void gen route <path> [--methods get,post,...]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Create a route file with `defineHandler` exports. Defaults to GET.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
void gen route api/health
|
|
58
|
+
void gen route api/users --methods get,post,delete
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Creates `routes/<path>.ts` with an exported handler for each method. Supported methods: `get`, `post`, `put`, `patch`, `delete`.
|
|
62
|
+
|
|
63
|
+
## `void gen middleware` {#void-gen-middleware}
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
void gen middleware <name>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Create a numbered middleware file with `defineMiddleware` default export.
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
void gen middleware auth
|
|
73
|
+
# → middleware/01.auth.ts (or 02, 03, etc.)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The prefix is auto-detected from existing middleware files.
|
|
77
|
+
|
|
78
|
+
## `void gen ssr` {#void-gen-ssr}
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
void gen ssr [--react | --vue | --svelte | --solid]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Scaffold SSR entry points and a minimal App component for your framework.
|
|
85
|
+
|
|
86
|
+
Creates three files:
|
|
87
|
+
|
|
88
|
+
- `src/main.ssr.{tsx,ts}`: server entry with `defineRender`
|
|
89
|
+
- `src/main.client.{tsx,ts}`: client entry with hydration
|
|
90
|
+
- `src/App.{tsx,vue,svelte}`: minimal interactive component
|
|
91
|
+
|
|
92
|
+
If no flag is provided, the framework is auto-detected from `package.json` dependencies.
|
|
93
|
+
|
|
94
|
+
## `void gen cron` {#void-gen-cron}
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
void gen cron <name>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Create a cron job file in `crons/` with `defineScheduled` and a placeholder cron expression.
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
void gen cron hourly-sync
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## `void gen queue` {#void-gen-queue}
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
void gen queue <name>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Create a queue consumer file in `queues/` with `defineQueue`, a `Message` interface, and commented-out batch options.
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
void gen queue emails
|
|
116
|
+
```
|