void 0.24.0 → 0.26.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 +19 -106
- package/dist/{account-cmd-vJhh5lrb.mjs → account-cmd-CDry3B5V.mjs} +5 -5
- package/dist/{application-analysis-BVsVqc11.mjs → application-analysis-DC2yPvzY.mjs} +1 -1
- package/dist/{application-routing-B7QEjqSR.mjs → application-routing-C9khgLiS.mjs} +1 -1
- package/dist/{auth-DX3JURcX.mjs → auth-B60QDbjg.mjs} +1 -1
- package/dist/{auth-CQkSDS50.mjs → auth-D52yG7hl.mjs} +3 -3
- package/dist/{auth-link-D75t9wO2.mjs → auth-link-DjeOptYi.mjs} +5 -6
- package/dist/{auth-router-ClfhL1J7.mjs → auth-router-BRxIuqDi.mjs} +7 -7
- package/dist/{build-cmd-zMi1iFnS.mjs → build-cmd-Ce3C8huo.mjs} +6 -7
- package/dist/{cache-ZtQmyxVV.mjs → cache-CS8Yxr5a.mjs} +6 -7
- package/dist/{cancel-deploy-Box0kkEV.mjs → cancel-deploy-mZsD88Xa.mjs} +4 -6
- package/dist/{cf-access-BGe5sWXF.mjs → cf-access-YTlqvAsk.mjs} +1 -1
- package/dist/cf-build-output-ChY6-XWP.mjs +2 -0
- package/dist/cli/cli.mjs +45 -45
- package/dist/cli/cloudflare-operation-process.mjs +3 -3
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/client-BxVixJBI.mjs +2 -0
- package/dist/{client-DKAsFA4X.mjs → client-mC-dFGDD.mjs} +103 -25
- package/dist/{cloudflare-cmd-CmY8dGkd.mjs → cloudflare-cmd-bhwCxAN6.mjs} +2 -2
- package/dist/{cloudflare-connect-IiR3ZieC.mjs → cloudflare-connect-CuhRgk3k.mjs} +2 -2
- package/dist/{cloudflare-operations-DzH-A966.mjs → cloudflare-operations-DYa3coIk.mjs} +2 -2
- package/dist/{cloudflare-operations-BCdXSsmo.mjs → cloudflare-operations-DoQrVHAt.mjs} +1 -1
- package/dist/{connect-B-usTnlF.mjs → connect-H6EvP62X.mjs} +12 -9
- package/dist/{create-project-CYOOAYcn.mjs → create-project-B2kk9Q0o.mjs} +6 -6
- package/dist/{create-project-FWbf5Olo.mjs → create-project-Dbb4uiN-.mjs} +1 -1
- package/dist/{db-Ck2eZ2iB.mjs → db-DpCKZto0.mjs} +35 -38
- package/dist/{delete-sK56qtzZ.mjs → delete-CxlSvsvW.mjs} +6 -7
- package/dist/{deploy-gCVaiJbS.mjs → deploy-CeEbnv4b.mjs} +9249 -8925
- package/dist/deploy-qmiLE1G1.mjs +2 -0
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-DFfQE8jg.mjs → domain-B_9VgOm6.mjs} +8 -8
- package/dist/{email-CdnhUHvJ.mjs → email-BokHgjKj.mjs} +7 -7
- package/dist/{env-DmGdHi5i.mjs → env-BdTc-K2L.mjs} +7 -8
- package/dist/{env-public-BX_r8HR6.d.mts → env-public-DR7ZM6d-.d.mts} +1 -1
- package/dist/{env-validation-zZOCcQVZ.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/{fetch-stream-IvCYKyQL.mjs → fetch-stream-Nm3hkZbT.mjs} +8 -1
- package/dist/{gen-CshAkukR.mjs → gen-BhDlTpwW.mjs} +2 -4
- package/dist/gen-qCBwH3fZ.mjs +2 -0
- package/dist/{github-cmd-DftuEvIt.mjs → github-cmd-hhkTzlGS.mjs} +7 -16
- package/dist/{handler-CZ4nAylQ.d.mts → handler-BeK3weD4.d.mts} +1 -1
- package/dist/{help-Dotbf6iz.mjs → help-Bv44e2tm.mjs} +13 -9
- package/dist/help-Dw5f9Xrg.mjs +2 -0
- package/dist/index.d.mts +19 -15
- package/dist/index.mjs +2225 -2142
- package/dist/{info-B97bTX9N.mjs → info-DhtTKh65.mjs} +2 -4
- package/dist/{init-BTQEZZGJ.mjs → init-BMf4T03q.mjs} +17 -18
- 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-B46sYH0K.mjs → link-BqYsSS_I.mjs} +6 -7
- package/dist/{list-BnPrIsU_.mjs → list-_kBToO-l.mjs} +10 -10
- package/dist/{live-Chw1eIMv.d.mts → live-iAuEH1hd.d.mts} +1 -1
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-fGxYrVD6.mjs} +2 -2
- package/dist/login-D7meQg_3.mjs +2 -0
- package/dist/{login-BuiMyUrx.mjs → login-DFuo-RWO.mjs} +9 -7
- package/dist/{logs-CZG9d-ic.mjs → logs-DYgnh6dH.mjs} +7 -8
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-q4_njtaW.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{node-BkyRWRx8.mjs → node-C6Q6e1Es.mjs} +1 -1
- package/dist/{operator-args-B3BTmSoi.mjs → operator-args-DdY54Bgb.mjs} +1 -1
- package/dist/{operator-auth-7erYc6Lt.mjs → operator-auth-2dsGlTT5.mjs} +4 -8
- package/dist/{operator-client-CpHjTd0t.mjs → operator-client-BFqpp6z0.mjs} +3 -3
- package/dist/{operator-cmd-DGqPJUD3.mjs → operator-cmd-CUGHXrQf.mjs} +27 -9
- package/dist/operator-cmd-DRPvhpjM.mjs +2 -0
- package/dist/{output-CbM85T4k.mjs → output-BvdaehtE.mjs} +28 -4
- package/dist/pages/client.d.mts +4 -1
- package/dist/pages/client.mjs +120 -29
- 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/{plan-NPpwZ_kc.mjs → plan-CJGEeTEI.mjs} +2 -2
- package/dist/plan-COtUvdMA.mjs +2 -0
- package/dist/{platform-args-3k8X9-H_.mjs → platform-args-DSV2p4nY.mjs} +4 -2
- package/dist/platform-args-Dcy_5b_Y.mjs +2 -0
- package/dist/{platform-auth-config-DDrxUy4m.mjs → platform-auth-config-Bosx7U1h.mjs} +20 -19
- package/dist/{platform-auth-protection-BLadnnct.mjs → platform-auth-protection-DcbL_LW_.mjs} +8 -8
- package/dist/{platform-auth-recovery-CmCzX2Fl.mjs → platform-auth-recovery-WfTZ8K6o.mjs} +7 -7
- package/dist/{platform-cmd-DMDEc9uS.mjs → platform-cmd-DbKtQb_4.mjs} +73 -38
- package/dist/{platform-cmd-pMTRhvYs.mjs → platform-cmd-dyFUof0t.mjs} +1 -1
- package/dist/platform-discovery-BC0HCKYt.mjs +41 -0
- package/dist/{platform-domain-Di6EYrQl.mjs → platform-domain-Bsq43AJp.mjs} +5 -4
- package/dist/{platform-lifecycle-BFdSi9Qt.mjs → platform-lifecycle--5gWmDoI.mjs} +1 -1
- package/dist/{platform-lifecycle-BBoNzojY.mjs → platform-lifecycle-Cfi0o6xM.mjs} +4605 -3527
- package/dist/platform-management-Bbwf6-Dq.mjs +2 -0
- package/dist/{platform-management-CWOQOWXm.mjs → platform-management-BrF9STZp.mjs} +211 -31
- package/dist/{platform-plans-config-Vl9BP3H4.mjs → platform-plans-config-DU-8nC2Y.mjs} +3 -3
- package/dist/{platform-recovery-BJnQJEtQ.mjs → platform-recovery-DQAqAQYu.mjs} +3 -3
- package/dist/{platform-registry-DkPPXfp_.mjs → platform-registry-P387v42A.mjs} +18 -11
- package/dist/prepare-BBknoZI1.mjs +2 -0
- package/dist/{prepare-CBLT3CHH.mjs → prepare-BMrRWLwP.mjs} +3 -4
- package/dist/{prepare-DnaKBi--.mjs → prepare-WoUubFKL.mjs} +1 -1
- package/dist/{project-DsblYifa.mjs → project-BiaPQ7ur.mjs} +1 -1
- package/dist/{project-DKG5Ra8p.mjs → project-DQstYTxO.mjs} +1 -1
- package/dist/{project-cmd-DxnXstAq.mjs → project-cmd-BbH2LptN.mjs} +21 -22
- package/dist/{project-team-BmHcaALJ.mjs → project-team-Yiww3-go.mjs} +8 -9
- package/dist/{project-token-GionZlBI.mjs → project-token-BrtT2NkY.mjs} +6 -9
- package/dist/{project-zero-trust-JLCjVQA7.mjs → project-zero-trust-nYJ2V2nc.mjs} +5 -6
- package/dist/{prompts-BNUoTiaf.mjs → prompts-6OSVA7DJ.mjs} +58 -15
- package/dist/{prompts-2TGE6oXx.mjs → prompts-ZAuJlyCj.mjs} +1 -1
- package/dist/{protocol-CjF_iI9X.d.mts → protocol-BX8t2jiw.d.mts} +1 -1
- package/dist/{provision-CVku1JFU.mjs → provision-DMTPG8Rh.mjs} +1 -1
- package/dist/{provision-CaoxO_U7.mjs → provision-VeqAC77A.mjs} +18 -8
- package/dist/{requests-BOjIVAeF.mjs → requests-TIz_jtSu.mjs} +5 -6
- package/dist/{rollback-CwR3pLj3.mjs → rollback-dBqICPzj.mjs} +9 -10
- package/dist/{runner-Ol0TNjk6.mjs → runner--2KF6Kua.mjs} +1 -1
- package/dist/{runner-CXA9Fh8h.mjs → runner-voIltZrY.mjs} +1 -1
- package/dist/runtime/ai.d.mts +10 -11
- package/dist/runtime/ai.mjs +13 -18
- package/dist/runtime/client-react.mjs +1 -1
- package/dist/runtime/client-solid.mjs +1 -1
- package/dist/runtime/client-svelte.mjs +1 -1
- package/dist/runtime/client-vue.mjs +1 -1
- package/dist/runtime/client.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/email.mjs +35 -17
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- 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.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +33 -7
- package/dist/runtime/routing.d.mts +1 -1
- package/dist/runtime/routing.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +1 -1
- package/dist/runtime/sandbox.mjs +12 -22
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-XZAqzFlG.d.mts → sandbox-C5LFoJMf.d.mts} +7 -7
- package/dist/{scan-C7okrLyM.mjs → scan-C8dA7iM4.mjs} +10 -6
- package/dist/{secret-ByWJWBUG.mjs → secret-AKnNXNP5.mjs} +15 -16
- package/dist/{skills-C1PlclPt.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-klFCfcor.mjs → subcommand-prompt-B6WS9Aoz.mjs} +2 -2
- package/dist/sveltekit.d.mts +1 -1
- package/dist/sveltekit.mjs +4 -9
- package/dist/validate-pna7R3Pv.mjs +2 -0
- package/dist/{validate-ctOrgiS3.mjs → validate-ymhap6M_.mjs} +1 -1
- package/dist/{wrangler-7K-bW_DL.mjs → wrangler-DhUerFkW.mjs} +10 -15
- package/dist/{ws-CL1w7GXU.d.mts → ws-C79j4aED.d.mts} +1 -1
- package/package.json +21 -21
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +5 -2
- package/skills/void/docs/guide/ai.md +78 -137
- package/skills/void/docs/guide/app-types.md +1 -1
- package/skills/void/docs/guide/auth.md +0 -2
- package/skills/void/docs/guide/database/d1.md +7 -7
- package/skills/void/docs/guide/database.md +15 -0
- package/skills/void/docs/guide/deployment.md +58 -124
- package/skills/void/docs/guide/env-vars.md +1 -5
- package/skills/void/docs/guide/index.md +19 -18
- package/skills/void/docs/guide/kv.md +0 -2
- package/skills/void/docs/guide/live.md +2 -0
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +49 -47
- package/skills/void/docs/guide/pages-routing/overview.md +2 -2
- package/skills/void/docs/guide/platform/administration/email.md +0 -2
- package/skills/void/docs/guide/platform/administration/operations.md +11 -22
- package/skills/void/docs/guide/platform/administration/plans.md +1 -5
- package/skills/void/docs/guide/platform/administration/zero-trust.md +1 -4
- package/skills/void/docs/guide/platform/development/schema-ci.md +7 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +2 -2
- package/skills/void/docs/guide/platform/installation/first-deployment.md +5 -1
- package/skills/void/docs/guide/platform/installation/maintenance.md +33 -11
- package/skills/void/docs/guide/platform/installation/prerequisites.md +79 -7
- package/skills/void/docs/guide/platform/installation/setup.md +1 -1
- package/skills/void/docs/guide/platform/installation/uninstall.md +44 -11
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/sandboxes.md +75 -66
- package/skills/void/docs/guide/self-hosted-platform.md +20 -0
- package/skills/void/docs/guide/websockets.md +0 -2
- package/skills/void/docs/integrations/frameworks/overview.md +2 -2
- package/skills/void/docs/integrations/frameworks/sveltekit.md +40 -25
- package/skills/void/docs/integrations/nodejs-bun-deno.md +7 -2
- package/skills/void/docs/reference/api/resources.md +38 -14
- package/skills/void/docs/reference/api.md +35 -34
- package/skills/void/docs/reference/cli/auth.md +3 -1
- package/skills/void/docs/reference/cli/deploy.md +1 -1
- package/skills/void/docs/reference/cli/platform-config.md +2 -2
- package/skills/void/docs/reference/cli/platform-installation.md +14 -12
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform.md +9 -2
- package/skills/void/docs/reference/cli.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +12 -8
- package/dist/cf-build-output-_0HNWysu.mjs +0 -2
- package/dist/client-B9UBI03V.mjs +0 -2
- package/dist/deploy-irP5q0-x.mjs +0 -2
- package/dist/gen-DvQTWzDU.mjs +0 -2
- package/dist/help-mabuIV98.mjs +0 -2
- package/dist/login-DIy9Sb-U.mjs +0 -2
- package/dist/migrate-BCiJ8w0f.mjs +0 -2
- package/dist/plan-D1Q5rf-r.mjs +0 -2
- package/dist/platform-args-DdnM6WIf.mjs +0 -2
- package/dist/platform-management-DG47jys8.mjs +0 -2
- package/dist/prepare-CnjcTV2s.mjs +0 -2
- package/dist/validate-Dq_L3s0S.mjs +0 -2
- package/skills/void/docs/guide/env-migration.md +0 -109
- package/dist/{cf-build-output-BPqOT964.mjs → cf-build-output-U8o1Gl6X.mjs} +1 -1
- package/dist/{env-validation-C_8tPdhs.mjs → env-validation-vBSQ8gw5.mjs} +1 -1
|
@@ -11,9 +11,7 @@ void platform auth login
|
|
|
11
11
|
void platform config plans
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Choose a plan to inspect or edit it, copy one into a new plan, or choose the default for new accounts.
|
|
15
|
-
|
|
16
|
-
Inspection and previews are available immediately after a platform upgrade. Allow 15 minutes before applying changes.
|
|
14
|
+
Choose a plan to inspect or edit it, copy one into a new plan, or choose the default for new accounts. Changes require no app or platform redeploy.
|
|
17
15
|
|
|
18
16
|
## Use the Dashboard
|
|
19
17
|
|
|
@@ -90,8 +88,6 @@ Storage figures shown for D1, R2, and KV are informational and cannot be edited
|
|
|
90
88
|
|
|
91
89
|
The preview shows the affected account count and checks a sample for accounts already above a proposed quota. Lowering a quota can restrict existing apps, including accounts outside that sample. Usage history and billing periods are preserved, so a plan change does not reset usage. Manual administrator suspensions remain in effect.
|
|
92
90
|
|
|
93
|
-
After the initial platform upgrade, request quota accounting includes unlimited plans too. For an account that was unlimited before that upgrade, its quota counter may not include earlier requests in the current billing period. Historical analytics remain available. When introducing its first cap, allow for the remaining period or wait until its next billing period.
|
|
94
|
-
|
|
95
91
|
## Archive or Remove a Plan
|
|
96
92
|
|
|
97
93
|
Archive a plan to stop assigning it to new accounts while preserving its current accounts:
|
|
@@ -8,10 +8,7 @@ Project Zero Trust puts Cloudflare Access in front of the hostnames of projects
|
|
|
8
8
|
|
|
9
9
|
This is separate from the Access login and protection for the platform API. Projects deployed directly to Cloudflare are not affected.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
reuses the platform policy or helps you select separate company rules, and finishes
|
|
13
|
-
setup before opening traffic. Existing installations keep their settings when
|
|
14
|
-
upgraded; use this page to configure app access if it has not been set up yet.
|
|
11
|
+
Choose app access during `void platform install`, or configure it later using this page. The installer reuses the platform policy or helps you select separate company rules, and finishes setup before opening traffic.
|
|
15
12
|
|
|
16
13
|
If you choose public apps in an account with Default-Deny, Void manages scoped
|
|
17
14
|
public rules instead. New projects and custom domains remain public automatically.
|
|
@@ -14,7 +14,13 @@ vp run --filter @voidcloud/api db:generate
|
|
|
14
14
|
|
|
15
15
|
Review the generated SQL and migration journal before committing them. Released migrations are append-only. An upgrade applies new migrations while the previous Workers may still serve requests, so schema changes must remain compatible with that code.
|
|
16
16
|
|
|
17
|
-
`platform/packages/api/drizzle/compatibility.json` records which earlier runtimes have been verified against the new schema. Add an edge only after testing that compatibility. The runtime build checks that the migration files and recorded schema history agree.
|
|
17
|
+
`platform/packages/api/drizzle/compatibility.json` records which earlier runtimes have been verified against the new schema. Add an edge only after testing that compatibility. The runtime build checks that the migration files and recorded schema history agree.
|
|
18
|
+
|
|
19
|
+
## Runtime artifact contract
|
|
20
|
+
|
|
21
|
+
`@void/platform` contains installation manifests, resource naming, discovery contracts, Worker configuration, and deployable bundles under the `./installer` export. Platform source lives in `platform/packages/`.
|
|
22
|
+
|
|
23
|
+
Runtime artifacts include migration SQL, its journal, and a rollback compatibility manifest. Drizzle authoring snapshots remain in the source tree. Migrations are forward-only; compatibility edges in `platform/packages/api/drizzle/compatibility.json` must be tested against the earlier runtime before publication. The build verifies schema lineage and hashes the journal and SQL files.
|
|
18
24
|
|
|
19
25
|
## CI in a Fork
|
|
20
26
|
|
|
@@ -8,7 +8,7 @@ Keep one password-manager entry for this platform. Paste the saved values into t
|
|
|
8
8
|
|
|
9
9
|
## Cloudflare API Tokens {#runtime-token-permissions}
|
|
10
10
|
|
|
11
|
-
For a domain installation or Cloudflare Access setup, the installer guides you through creating separate management and runtime tokens using Cloudflare's [API token setup](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). Its links preselect the permissions and suggest names based on your platform's display name
|
|
11
|
+
For a domain installation or Cloudflare Access setup, the installer guides you through creating separate management and runtime tokens using Cloudflare's [API token setup](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). Its links preselect the permissions and suggest names based on your platform's display name, but Cloudflare's form cannot preselect a zone: for a domain installation, change the zone policy from **All Domains** to **Specified Domains** and select your zone. If Void will create the zone, keep **All Domains** on both tokens: the zone does not exist yet, and the runtime token needs it to purge cache. Save the tokens in your password manager and paste them into the masked CLI prompts.
|
|
12
12
|
|
|
13
13
|
For workers.dev testing with the default API hostname, browser login can authorize
|
|
14
14
|
infrastructure setup. Void also checks account-wide Access requirements; if the
|
|
@@ -21,7 +21,7 @@ Browser login does not grant AI Gateway access. Include **Account → AI Gateway
|
|
|
21
21
|
|
|
22
22
|
The management token lets your CLI install and maintain the platform. The runtime token is stored as a Worker secret so the platform can deploy apps after you close your terminal. They are separate credentials.
|
|
23
23
|
|
|
24
|
-
Compare each token's form with the permission checklist below
|
|
24
|
+
Compare each token's form with the permission checklist below. The installer saves a management token entered at the prompt in this installation’s encrypted local checkpoint and reuses it on resume. Upgrades, repairs, and other lifecycle maintenance also use that saved management token. During installation, a rejected token can be replaced at the prompt. An explicit `CLOUDFLARE_API_TOKEN` or `CF_API_TOKEN` takes precedence. Keep your password-manager copy for maintenance or another machine; scripts supply it through `CLOUDFLARE_API_TOKEN`.
|
|
25
25
|
|
|
26
26
|
::: details Permissions to select for each token
|
|
27
27
|
|
|
@@ -34,7 +34,11 @@ void project token create --name ci --expires-in 30
|
|
|
34
34
|
|
|
35
35
|
Store the printed `VOID_TOKEN` and `VOID_API_URL` in the CI secret manager, then
|
|
36
36
|
run `void connect "$VOID_API_URL" --no-login` before deploying in each fresh CI
|
|
37
|
-
environment. Project files do not replace this connection step.
|
|
37
|
+
environment. Project files do not replace this connection step. CI cannot answer
|
|
38
|
+
the project prompt, so choose the project before `void deploy`: set `VOID_PROJECT`,
|
|
39
|
+
pass `--project <slug>`, or commit `.void/project.json` from `void project link`.
|
|
40
|
+
New apps ignore `.void` in `.gitignore`; to commit the link, replace that line
|
|
41
|
+
with `.void/*` and `!.void/project.json`. Rotate with `void project token renew <id>` and revoke with
|
|
38
42
|
`void project token revoke <id>`. A human login token is not a CI credential.
|
|
39
43
|
|
|
40
44
|
If Cloudflare Access protects the platform, Access proof and the project
|
|
@@ -6,7 +6,7 @@ outline: deep
|
|
|
6
6
|
|
|
7
7
|
## Resume, repair, recover, and upgrade
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Run `void platform list` to find the installation slug beside its name. Lifecycle commands accept this slug, an installation ID, or a saved connection ID. You can omit the selector when only one installation is configured. With several installations, choose one interactively or pass its slug or ID in CI.
|
|
10
10
|
|
|
11
11
|
### Resume an installation
|
|
12
12
|
|
|
@@ -42,11 +42,6 @@ secret manager to an object keyed by each exact API/proxy origin, with
|
|
|
42
42
|
and stops if the gate still rejects its checks. Account-wide Default-Deny and
|
|
43
43
|
deployed-application policies remain your responsibility.
|
|
44
44
|
|
|
45
|
-
If **System Status** reports `proxy HTTP 302 (redirect)` on an older Access-protected
|
|
46
|
-
installation, upgrade with `void platform upgrade <id>`. Current installations use
|
|
47
|
-
a private connection for the dashboard's proxy health check. Keep the proxy's
|
|
48
|
-
Access protection enabled.
|
|
49
|
-
|
|
50
45
|
### Expired administrator setup code
|
|
51
46
|
|
|
52
47
|
Resume an unfinished installation with `void platform install --resume --name <id>`.
|
|
@@ -68,7 +63,7 @@ Repair recreates missing infrastructure that the installer owns. It does not res
|
|
|
68
63
|
|
|
69
64
|
### Upgrade the platform
|
|
70
65
|
|
|
71
|
-
Keep the platform runtime current when updating the Void CLI.
|
|
66
|
+
Keep the platform runtime current when updating the Void CLI.
|
|
72
67
|
|
|
73
68
|
Use the installed CLI's packaged runtime to upgrade:
|
|
74
69
|
|
|
@@ -79,6 +74,8 @@ void platform upgrade [id]
|
|
|
79
74
|
|
|
80
75
|
An upgrade validates the runtime, applies supported pending migrations, deploys the Workers, and checks their health. Existing Worker secrets are preserved.
|
|
81
76
|
|
|
77
|
+
Before starting, Void checks access to the installation's Cloudflare account, Workers, and existing R2 buckets. If credentials are rejected, set `CLOUDFLARE_API_TOKEN` to a management token scoped to that account and retry. This overrides the installation's saved management token.
|
|
78
|
+
|
|
82
79
|
::: details Migration safety, credential rotation, and interrupted upgrades
|
|
83
80
|
|
|
84
81
|
Some upgrades briefly put the platform into maintenance mode. Traffic resumes after the new version passes health checks. If an upgrade is interrupted during maintenance, rerun the same command to complete it.
|
|
@@ -92,10 +89,6 @@ manager so they can also restore a missing Worker during repair.
|
|
|
92
89
|
|
|
93
90
|
Database migrations only move forward. Void checks compatibility before upgrading and tells you if an intermediate release is needed. If deployment fails, it attempts to restore the previous Workers against the compatible database schema. Retrying does not repeat completed migrations.
|
|
94
91
|
|
|
95
|
-
Upgrades automatically enable managed Sandboxes. The platform runtime token needs Account / Containers: Edit and Account / Cloudchamber: Edit, and the Cloudflare account must use Workers Paid before its first Sandbox application deploy. The upgrade itself does not probe Containers access, so platforms that do not deploy Sandbox applications need no additional plan or permissions.
|
|
96
|
-
|
|
97
|
-
When upgrading from a release that used tenant-owned Sandbox containers, the upgrade may first ask you to finish the legacy cleanup. Follow the [`sandbox-drain` instructions](../../../reference/cli/platform-operations.md#operator-system), then rerun the upgrade. Administrator login remains available during that maintenance step.
|
|
98
|
-
|
|
99
92
|
After a successful upgrade, you can restore a declared-compatible earlier runtime without reversing migrations:
|
|
100
93
|
|
|
101
94
|
```sh
|
|
@@ -107,6 +100,35 @@ Keep the earlier runtime files if you need rollback. If the installed version is
|
|
|
107
100
|
|
|
108
101
|
:::
|
|
109
102
|
|
|
103
|
+
### Follow upgrade and rollback progress
|
|
104
|
+
|
|
105
|
+
Watching progress is optional: a running upgrade or rollback proceeds through
|
|
106
|
+
the CLI without action on the status page. During maintenance, navigating the
|
|
107
|
+
admin UI automatically redirects to `/admin/status`. You can also open it
|
|
108
|
+
directly on your platform API origin and sign in as an administrator.
|
|
109
|
+
|
|
110
|
+
The read-only page shows the saved operation, source and target versions, and
|
|
111
|
+
the traffic state reported by the API. It refreshes automatically every five
|
|
112
|
+
seconds while visible. If updates fail, it keeps the last confirmed snapshot
|
|
113
|
+
and marks it as out of date. Normal administrator changes remain paused.
|
|
114
|
+
|
|
115
|
+
Sign-in and status remain available while the API and authentication database
|
|
116
|
+
are reachable. An operation completing
|
|
117
|
+
does not confirm every project's health. A disabled installation keeps traffic
|
|
118
|
+
paused after an upgrade or rollback.
|
|
119
|
+
|
|
120
|
+
If an operation fails or waits for DNS or Sandbox drain work, the CLI prints
|
|
121
|
+
the recovery instructions and command needed to resume. Resolve the reported
|
|
122
|
+
problem, then resume with the same runtime files. For a custom rollback, retain
|
|
123
|
+
the source runtime files too. `void platform status <id>` also prints locally saved progress
|
|
124
|
+
before checking the live API; this local checkpoint can be out of date if another
|
|
125
|
+
administrator changed the installation.
|
|
126
|
+
|
|
127
|
+
When application traffic is paused, visitors receive a temporary-unavailability
|
|
128
|
+
page with a **Try again** link. API requests and form submissions still receive
|
|
129
|
+
HTTP 503 responses. Void does not automatically replay requests; visitors who
|
|
130
|
+
submitted a form should check its result before submitting it again.
|
|
131
|
+
|
|
110
132
|
### Manage an installation from another machine
|
|
111
133
|
|
|
112
134
|
Use `discover` to restore the administrator's local installation records:
|
|
@@ -73,16 +73,88 @@ Use any PostgreSQL provider that accepts connections from your computer and Clou
|
|
|
73
73
|
2. Open the provider's connection details and select the primary database. Use a direct connection or a session-mode pooler, not transaction pooling. The connection must work from both your computer and Cloudflare.
|
|
74
74
|
3. Copy the PostgreSQL connection URL, including the password and SSL settings, into your password manager. Paste only the URL—not a surrounding `psql` command—into Void's `PostgreSQL DATABASE_URL` prompt, as the provider gives it, including SSL settings such as `sslmode=verify-full`. A Hyperdrive that Void creates trusts only public certificate authorities, so if your database uses a private certificate authority, use a separately managed Hyperdrive, as described below.
|
|
75
75
|
|
|
76
|
-
| Provider
|
|
77
|
-
|
|
|
78
|
-
| [PlanetScale Postgres](https://planetscale.com/docs/postgres/connecting)
|
|
79
|
-
| [Neon](https://neon.com/docs/get-started-with-neon/connect-neon)
|
|
80
|
-
| [Supabase](https://supabase.com/docs/guides/database/connecting-to-postgres) | Open **Connect** and use the direct connection where IPv6 is available, or the **Session pooler** on port `5432` for IPv4 connectivity. Do not select the transaction pooler on `6543`. Replace the password placeholder with your database password. |
|
|
81
|
-
|
|
82
|
-
For a dedicated Supabase project, [disable the Data API](https://supabase.com/docs/guides/api/securing-your-api#disable-the-data-api) so the platform's tables are not exposed through Supabase's auto-generated endpoints. Void uses the PostgreSQL connection, not Supabase API keys.
|
|
76
|
+
| Provider | Connection setup |
|
|
77
|
+
| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
78
|
+
| [PlanetScale Postgres](https://planetscale.com/docs/postgres/connecting) | Choose **Postgres**, not Vitess/MySQL. Open **Connect**, create role credentials, and use the direct primary connection on port `5432`, not PgBouncer on `6432`. |
|
|
79
|
+
| [Neon](https://neon.com/docs/get-started-with-neon/connect-neon) | Open **Connect**, select the database and owner role, and turn **connection pooling off**. |
|
|
83
80
|
|
|
84
81
|
Once installation claims the database, continue using that same database for resume and maintenance commands. Uninstall never deletes external PostgreSQL.
|
|
85
82
|
|
|
83
|
+
### Use a provider CLI
|
|
84
|
+
|
|
85
|
+
You can create the database and retrieve its connection URL from either provider's CLI instead of its dashboard.
|
|
86
|
+
|
|
87
|
+
::: details PlanetScale Postgres
|
|
88
|
+
|
|
89
|
+
Install the latest [PlanetScale CLI](https://planetscale.com/docs/cli/planetscale-environment-setup). On macOS, use `brew install pscale`; the installation guide also covers Linux and Windows.
|
|
90
|
+
|
|
91
|
+
Sign in and list your organizations and regions:
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
pscale auth login
|
|
95
|
+
pscale org list
|
|
96
|
+
pscale region list --org <organization>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Replace `<organization>` with your organization slug and choose a region. List the available Postgres cluster sizes and their prices for that region:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
pscale size cluster list --org <organization> --engine postgresql --region <region>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Create a dedicated Postgres database with your chosen cluster size, then create a role with permission to create and migrate Void's tables:
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
pscale database create void-platform \
|
|
109
|
+
--org <organization> \
|
|
110
|
+
--engine postgresql \
|
|
111
|
+
--region <region> \
|
|
112
|
+
--cluster-size <cluster-size> \
|
|
113
|
+
--wait
|
|
114
|
+
|
|
115
|
+
pscale role create void-platform main void_owner \
|
|
116
|
+
--org <organization> \
|
|
117
|
+
--inherited-roles postgres
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Save the **DATABASE URL** printed by the role-creation command in your password manager and paste it into Void's `PostgreSQL DATABASE_URL` prompt. Use the direct primary connection on port `5432` with `sslmode=verify-full`. The role's password is shown when it is created, so save it before closing the terminal.
|
|
121
|
+
|
|
122
|
+
See PlanetScale's [database commands](https://planetscale.com/docs/cli/database) and [role commands](https://planetscale.com/docs/cli/role) for more options.
|
|
123
|
+
|
|
124
|
+
:::
|
|
125
|
+
|
|
126
|
+
::: details Neon
|
|
127
|
+
|
|
128
|
+
Install the latest [Neon CLI](https://neon.com/docs/cli/install) and sign in:
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
pnpm add --global neon@latest
|
|
132
|
+
neon login
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Create a dedicated project, database, and owner role. Replace `<region-id>` with one of Neon's [supported regions](https://neon.com/docs/cli/projects#create), such as `aws-us-east-2`:
|
|
136
|
+
|
|
137
|
+
```sh
|
|
138
|
+
neon projects create --name void-platform \
|
|
139
|
+
--database void_platform \
|
|
140
|
+
--role void_owner \
|
|
141
|
+
--region-id <region-id>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Use the project ID from the output to retrieve a direct primary connection URL with TLS certificate verification:
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
neon connection-string --project-id <project-id> \
|
|
148
|
+
--database-name void_platform \
|
|
149
|
+
--role-name void_owner \
|
|
150
|
+
--endpoint-type read_write \
|
|
151
|
+
--ssl verify-full
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Save the printed URL in your password manager and paste it into Void's `PostgreSQL DATABASE_URL` prompt. Keep this connection unpooled. See Neon's [connection-string command](https://neon.com/docs/cli/connection-string) for more options.
|
|
155
|
+
|
|
156
|
+
:::
|
|
157
|
+
|
|
86
158
|
### Use an existing Hyperdrive
|
|
87
159
|
|
|
88
160
|
The installer can create Hyperdrive for you or use one you manage separately. For an existing configuration:
|
|
@@ -12,7 +12,7 @@ For workers.dev testing, start the interactive install and choose your login met
|
|
|
12
12
|
void platform install --workers-dev
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
For a domain installation or Access setup, Void guides you to create a management API token and paste it into a masked prompt. Browser login can preview DNS, but cannot change it or configure Access. The token-creation link preselects the permissions for your choices
|
|
15
|
+
For a domain installation or Access setup, Void guides you to create a management API token and paste it into a masked prompt. Browser login can preview DNS, but cannot change it or configure Access. The token-creation link preselects the permissions for your choices. When using an existing domain, change the zone policy from **All Domains** to **Specified Domains** and select your zone, as the CLI prompt describes. No shell environment variable is needed for interactive installation.
|
|
16
16
|
|
|
17
17
|
::: details Use an existing management token from the shell
|
|
18
18
|
|
|
@@ -11,7 +11,9 @@ void platform disable [id] --plan
|
|
|
11
11
|
void platform disable [id]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Disabled platforms reject application traffic while retaining domains and routes. Repair and upgrade preserve that state.
|
|
14
|
+
Disabled platforms reject application traffic while retaining domains and routes. The platform API also rejects requests, so CLI commands that use it, including login and deploy, fail until you enable the platform again. Only the administrator status page at `<api-url>/admin/status` and administrator sign-in stay available. Repair and upgrade preserve that state.
|
|
15
|
+
|
|
16
|
+
Enabling redeploys the platform Workers from the selected runtime, verifies them, and then restores traffic. Pass `--runtime <path>` to enable with a custom platform build:
|
|
15
17
|
|
|
16
18
|
```sh
|
|
17
19
|
void platform enable [id] --plan
|
|
@@ -31,7 +33,9 @@ void platform uninstall [id] --plan
|
|
|
31
33
|
void platform uninstall [id]
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
Uninstall blocks platform traffic, removes Queues that no remaining platform Worker uses, and
|
|
36
|
+
Uninstall blocks platform traffic, removes Queues that no remaining platform Worker uses, and lists the resources left for you to review. Use `--plan` to review deletions and retained resources before making changes. By default, Workers, the Queues they use, KV, R2, Hyperdrive, the dispatch namespace, and AI Gateway remain in your account. Adopted resources, external PostgreSQL, and zones are always retained. Email Routing settings are retained; `--purge-resources` removes only the rules that send mail to the platform. DNS records, routes, custom domains, and Cloudflare Access resources are retained unless you use `--purge-resources`.
|
|
37
|
+
|
|
38
|
+
When uninstall finishes, the record of what was kept stays at `~/.void/platforms/<account-id>/<installation-id>.json`. Without `--purge-data`, the encrypted credentials file `<installation-id>.recovery.enc` next to it is kept too. Delete both once you have finished the manual cleanup below.
|
|
35
39
|
|
|
36
40
|
To also remove eligible data resources owned by the installer:
|
|
37
41
|
|
|
@@ -39,20 +43,49 @@ To also remove eligible data resources owned by the installer:
|
|
|
39
43
|
void platform uninstall [id] --purge-data
|
|
40
44
|
```
|
|
41
45
|
|
|
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
|
|
46
|
+
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, or use `--purge-resources`.
|
|
47
|
+
|
|
48
|
+
### Remove everything Void created
|
|
49
|
+
|
|
50
|
+
To delete every Cloudflare resource the installation created:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
void platform uninstall [id] --purge-resources --plan
|
|
54
|
+
void platform uninstall [id] --purge-resources
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`--purge-resources` includes `--purge-data`. It also deletes the platform Workers, Queues, the application Workers left in the dispatch namespace, the R2 bucket and its objects, the AI Gateway, the platform DNS record, Worker routes and custom domains, and the Access applications and service tokens the installer created. The plan lists each resource in deletion order, and everything that stays. If Cloudflare shows that the AI Gateway was created after installation, for example because it was deleted and created again under the same name, it is kept and listed.
|
|
58
|
+
|
|
59
|
+
If the platform sends email, it first deletes the Email Routing rules in the sender domain's zone that send mail to the platform email gateway Worker, and resets such a catch-all rule to drop mail. It leaves Email Routing enabled and keeps the sender domain's MX, SPF, and DKIM records.
|
|
60
|
+
|
|
61
|
+
It never removes zones, adopted resources, external PostgreSQL, other Email Routing settings, Analytics Engine datasets, Access policies or identity providers you chose, or API tokens. Revoke the API tokens you created for the platform afterward.
|
|
62
|
+
|
|
63
|
+
Before making changes, `--purge-resources` checks that no projects remain and that it can read the resources it plans to delete. Delete any projects with `void project delete <name>` first.
|
|
64
|
+
|
|
65
|
+
Set `CLOUDFLARE_API_TOKEN` to a token with the Edit permissions listed by `--plan`. Browser login cannot delete DNS records or Access resources. Access resources in a separate identity account need permissions in that account; email-enabled platforms also need **Zone → Email Routing Rules → Edit** for the sender domain's zone.
|
|
66
|
+
|
|
67
|
+
The read checks cannot verify Edit permissions. If a deletion is denied, uninstall may have already disabled traffic or removed resources. Update the token permissions and rerun the command to resume.
|
|
68
|
+
|
|
69
|
+
If a route, custom domain, DNS record, or Access resource no longer matches what the installation recorded, for example a route that now sends traffic to another Worker, it is kept and listed with the reason, and uninstall continues. Do not run `--purge-resources` while someone else is changing the platform's Workers, routes, or custom domains: a change made after Void checks a resource and before it deletes it is not detected.
|
|
70
|
+
|
|
71
|
+
If Cloudflare refuses a deletion, for example because a Worker you created yourself still sends logs to the platform tail Worker, uninstall stops and names the resource. Fix it, then rerun the same command to continue.
|
|
72
|
+
|
|
73
|
+
If a plain or `--purge-data` uninstall stopped before it finished, rerun it with `--purge-resources` to also delete what it kept. Once an uninstall finishes, use the manual steps below instead.
|
|
43
74
|
|
|
44
75
|
### Remove retained resources
|
|
45
76
|
|
|
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:
|
|
77
|
+
After an uninstall without `--purge-resources`, 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
78
|
|
|
48
79
|
1. Delete the platform DNS record, Worker routes, and custom domains.
|
|
49
|
-
2.
|
|
50
|
-
3.
|
|
51
|
-
4. Delete the platform
|
|
52
|
-
5. Delete the
|
|
53
|
-
6. Delete the
|
|
54
|
-
7.
|
|
55
|
-
8. Delete the
|
|
80
|
+
2. If the platform sends email, open **Email Routing** for the sender domain's zone. Delete the routing rules and any catch-all rule that send mail to the platform email gateway Worker. Then remove the sender subdomain from Email Routing, or disable Email Routing if you enabled it only for the platform.
|
|
81
|
+
3. Open each platform Queue and remove the platform API Worker from its consumers.
|
|
82
|
+
4. Delete the platform Workers, except the tail Worker (its name ends in `-tail`).
|
|
83
|
+
5. Delete the platform Queues.
|
|
84
|
+
6. Delete the application Workers in the dispatch namespace, then delete the namespace.
|
|
85
|
+
7. Delete the tail Worker. Cloudflare refuses while other Workers still send logs to it.
|
|
86
|
+
8. Delete the platform KV namespaces and Hyperdrive configuration.
|
|
87
|
+
9. Empty the R2 bucket, then delete it.
|
|
88
|
+
10. Delete the AI Gateway.
|
|
56
89
|
|
|
57
90
|
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
91
|
|
|
@@ -4,65 +4,51 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Quickstart
|
|
6
6
|
|
|
7
|
-
Create a Void app, run it locally, and deploy it. You can also [add Void to an existing Vite app](#adding-to-an-existing-vite-app).
|
|
7
|
+
Create a Void app, run it locally, and deploy it. You can also [add Void to an existing Vite app](#adding-to-an-existing-vite-app).
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Create an app
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
In an empty directory, install Void and run setup:
|
|
12
12
|
|
|
13
13
|
::: code-group
|
|
14
14
|
|
|
15
15
|
```sh [npm]
|
|
16
16
|
npm install -D void
|
|
17
|
+
npx void init
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
```sh [pnpm]
|
|
20
21
|
pnpm add -D void
|
|
22
|
+
pnpm void init
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
```sh [yarn]
|
|
24
26
|
yarn add -D void
|
|
27
|
+
yarn void init
|
|
25
28
|
```
|
|
26
29
|
|
|
27
30
|
```sh [bun]
|
|
28
31
|
bun add -D void
|
|
32
|
+
bunx void init
|
|
29
33
|
```
|
|
30
34
|
|
|
31
35
|
:::
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
::: code-group
|
|
36
|
-
|
|
37
|
-
```sh [npm]
|
|
38
|
-
npx void init
|
|
39
|
-
```
|
|
37
|
+
Choose your UI framework, a starter, and a deployment target. Vite+ is the default build tool. D1 is a good first database: it runs locally without a separate database server. Choose Cloudflare to deploy to your own account, or skip deployment setup for now.
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
pnpm void init
|
|
43
|
-
```
|
|
39
|
+
With pnpm, `pnpm create void my-app` also creates the project directory and configures native build permissions for you.
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
yarn void init
|
|
47
|
-
```
|
|
41
|
+
## Run locally
|
|
48
42
|
|
|
49
|
-
```sh
|
|
50
|
-
|
|
43
|
+
```sh
|
|
44
|
+
npm run dev
|
|
51
45
|
```
|
|
52
46
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Void asks you to choose Vite+ or Vite, a UI framework, a starter, and a deployment target. Vite+ is the default. D1 needs no local database server; choose PostgreSQL or MySQL if you use an external database. You can skip deployment setup and decide later.
|
|
56
|
-
|
|
57
|
-
With pnpm, you can start with `pnpm create void my-app`. It configures native build permissions before installing Void.
|
|
58
|
-
|
|
59
|
-
The examples below use `void` for brevity. Outside package scripts, run the local binary with `npx void`, `pnpm void`, `yarn void`, or `bunx void`. Keep Void installed in the project so the CLI and app use the same version.
|
|
47
|
+
Open `http://localhost:5173`. In a Pages starter, `pages/` contains your UI and companion `.server.ts` files contain its server loaders and actions. Loaders return data to page components as typed props.
|
|
60
48
|
|
|
61
|
-
##
|
|
49
|
+
## Call a server route
|
|
62
50
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Database-backed starters include `routes/api/hello.ts`. You can edit its `GET` handler, or create this file if you started with Static Pages:
|
|
51
|
+
Edit `routes/api/hello.ts`, or create it if your starter doesn't include it:
|
|
66
52
|
|
|
67
53
|
```ts
|
|
68
54
|
import { defineHandler } from 'void';
|
|
@@ -72,75 +58,46 @@ export const GET = defineHandler(() => {
|
|
|
72
58
|
});
|
|
73
59
|
```
|
|
74
60
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```sh
|
|
78
|
-
npm run dev
|
|
79
|
-
```
|
|
61
|
+
Visit `http://localhost:5173/api/hello` to see the response. From your client code, call it with Void's typed fetch:
|
|
80
62
|
|
|
81
|
-
|
|
63
|
+
```ts
|
|
64
|
+
import { fetch } from 'void/client';
|
|
82
65
|
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
const { message } = await fetch('/api/hello');
|
|
67
|
+
```
|
|
85
68
|
|
|
86
|
-
|
|
69
|
+
The file path defines the URL, and the handler defines the response type. Change `message` in the handler and TypeScript checks the client against the new shape.
|
|
87
70
|
|
|
88
|
-
|
|
71
|
+
Database starters also include `db/schema.ts`. Its Drizzle schema defines your tables and query types; Void runs a local database and provisions one when you deploy.
|
|
89
72
|
|
|
90
|
-
|
|
91
|
-
void deploy
|
|
92
|
-
```
|
|
73
|
+
## Deploy
|
|
93
74
|
|
|
94
|
-
If you
|
|
75
|
+
If you chose a target during setup:
|
|
95
76
|
|
|
96
77
|
```sh
|
|
97
|
-
void deploy
|
|
78
|
+
npx void deploy
|
|
98
79
|
```
|
|
99
80
|
|
|
100
|
-
|
|
81
|
+
If you skipped setup, select your Cloudflare account:
|
|
101
82
|
|
|
102
83
|
```sh
|
|
103
|
-
void
|
|
104
|
-
void project link
|
|
105
|
-
void deploy
|
|
84
|
+
npx void deploy --platform cloudflare
|
|
106
85
|
```
|
|
107
86
|
|
|
108
|
-
Void builds the app, provisions
|
|
109
|
-
|
|
110
|
-
See [Deployment](./deployment.md) for CI setup and rollback.
|
|
111
|
-
|
|
112
|
-
## Using with Coding Agents
|
|
113
|
-
|
|
114
|
-
`void init` detects your coding agent and installs its instructions and skills. If no agent is detected, use the bundled docs linked in `AGENTS.md`. In agents that support it, load the `/void` skill and describe the app you want to build. See [Coding Agents](../integrations/agents) for setup details.
|
|
87
|
+
Void opens your browser to sign in when needed, builds the app, provisions resources, applies migrations, and prints the deployed URL. Later deploys use the saved target. See [Deployment](./deployment.md) for team platforms, CI, and rollback.
|
|
115
88
|
|
|
116
|
-
##
|
|
89
|
+
## Adding to an existing Vite app
|
|
117
90
|
|
|
118
|
-
|
|
91
|
+
Install Void and run `void init` with your package manager as shown [above](#create-an-app). Setup adds `voidPlugin()` to your Vite config and creates the remaining project files. If the config needs a manual edit, the CLI shows the change to make.
|
|
119
92
|
|
|
120
|
-
|
|
93
|
+
For a meta framework such as TanStack Start, React Router, or SvelteKit, follow its [integration guide](../integrations/frameworks/overview.md).
|
|
121
94
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Enable the plugin in `vite.config.ts`:
|
|
125
|
-
|
|
126
|
-
```ts
|
|
127
|
-
import { defineConfig } from 'vite';
|
|
128
|
-
import { voidPlugin } from 'void';
|
|
129
|
-
|
|
130
|
-
export default defineConfig({
|
|
131
|
-
plugins: [voidPlugin()],
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Then run `void init` with your package manager to configure the remaining project files.
|
|
95
|
+
## Next steps
|
|
136
96
|
|
|
137
|
-
|
|
97
|
+
- [Pages Routing](./pages-routing/overview.md): loaders, layouts, and forms
|
|
98
|
+
- [Server Routing](./server-routing.md): params, middleware, and validation
|
|
99
|
+
- [Database](./database.md): queries and migrations
|
|
100
|
+
- [Environment Variables](./env-vars.md): local values and production secrets
|
|
101
|
+
- [Coding Agents](../integrations/agents.md): use Void's bundled docs and skills
|
|
138
102
|
|
|
139
103
|
If a manual pnpm install reports blocked build scripts, run `pnpm approve-builds` for `esbuild`, `sharp`, and `workerd`. Set `better-sqlite3: false` in `pnpm-workspace.yaml`'s `allowBuilds`; Void uses its bundled binaries.
|
|
140
|
-
|
|
141
|
-
## Next steps
|
|
142
|
-
|
|
143
|
-
- To understand what kind of apps are supported: [Supported App Types](./app-types)
|
|
144
|
-
- [Server Routing](./server-routing): dynamic params, middleware, and validation
|
|
145
|
-
- [Database](./database): queries, migrations, and generated types
|
|
146
|
-
- [Type Safety](./type-safety): end-to-end typed fetch client
|