void 0.20.1 → 0.20.3
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/{auth-W9WII-mN.mjs → auth-DPl6kck4.mjs} +46 -26
- package/dist/{auth-cmd-CAH62yDU.mjs → auth-cmd-CzwquNiP.mjs} +5 -4
- package/dist/auth-link-ElDTgF7j.mjs +28 -0
- package/dist/{build-cmd-CJvZvPQO.mjs → build-cmd-BpJe6boP.mjs} +3 -3
- package/dist/{cache-BlNeQjuP.mjs → cache-D98YTqeE.mjs} +3 -3
- package/dist/{cancel-deploy-CmlAZ9P6.mjs → cancel-deploy-CPbEQLMG.mjs} +3 -3
- package/dist/cf-access-DRsQRe6k.mjs +75 -0
- package/dist/cli/cli.mjs +309 -1958
- package/dist/cli/env-schema-probe.mjs +11 -2
- package/dist/client-BQBrZoCX.mjs +989 -0
- package/dist/{cloudflare-auth-B1QtTO1b.mjs → cloudflare-auth-6M5llVPC.mjs} +2 -2
- package/dist/{cloudflare-cmd-B6_OZx2V.mjs → cloudflare-cmd-4RPGN3KB.mjs} +2 -2
- package/dist/{cloudflare-connect-j5D4hhrG.mjs → cloudflare-connect-t1UU5svD.mjs} +2 -2
- package/dist/{cloudflare-operations-CPTpRW6d.mjs → cloudflare-operations-BzWnlC1_.mjs} +1 -1
- package/dist/{config-BQFq7QvD.mjs → config-uNGuFsI2.mjs} +1 -1
- package/dist/{connect-C04Wdy_h.mjs → connect-WCQZ_u3m.mjs} +6 -6
- package/dist/{create-project-ChGZ1DFd.mjs → create-project-D0oXA090.mjs} +7 -7
- package/dist/{db-D2d_mUsB.mjs → db-DJ-9qs3S.mjs} +47 -30
- package/dist/{delete-D8GigDk8.mjs → delete-BZ4-WaGm.mjs} +3 -3
- package/dist/{deploy-iXZ3F0N6.mjs → deploy-BAhhcg5q.mjs} +135 -117
- package/dist/{dev-inbox-DkgRWLkW.mjs → dev-inbox-P0u4tM8Y.mjs} +1 -1
- package/dist/{domain-B1VmoSr0.mjs → domain-BxAyhxXN.mjs} +4 -4
- package/dist/email-Bj7Cvdwp.mjs +795 -0
- package/dist/{env-D4Emu-M_.mjs → env-DBKmK4vc.mjs} +1 -0
- package/dist/{env-BcQzYgoG.mjs → env-DP_EErve.mjs} +5 -5
- package/dist/{env-validation-ENpMy6Ez.mjs → env-validation-CF6KvTRf.mjs} +3 -1
- package/dist/{gen-DI2YwdBM.mjs → gen-B_wPnVTK.mjs} +2 -2
- package/dist/{github-cmd-xItS5Zwf.mjs → github-cmd-C-z_xRrQ.mjs} +15 -21
- package/dist/{headers-D8QfRX9Y.mjs → headers-BAHwgHdW.mjs} +1 -1
- package/dist/help-CwOX-zmI.mjs +2216 -0
- package/dist/{inbound-afAcWeQ9.d.mts → inbound-CH5Mksyy.d.mts} +34 -48
- package/dist/{inbound-2d0zi2yS.mjs → inbound-aVHEUhKo.mjs} +130 -100
- package/dist/index.mjs +54 -17
- package/dist/{init-BD-9THgn.mjs → init-BGktCXgA.mjs} +11 -11
- package/dist/{link-RMdgjF1v.mjs → link-D2kbqhWb.mjs} +4 -4
- package/dist/{list-3F52R_yO.mjs → list-CvkK_G7k.mjs} +4 -4
- package/dist/{login-pV69H-ZO.mjs → login-WIjNc77c.mjs} +28 -10
- package/dist/{logs-DFHHD6wE.mjs → logs-dLUFCapG.mjs} +4 -4
- package/dist/{mime-BJD7d_qL.mjs → mime-D5Nmdzf7.mjs} +23 -9
- package/dist/{node-Dk3H2jmU.mjs → node-Ez5KW5rn.mjs} +2 -2
- package/dist/operator-auth-B3e08unv.mjs +52 -0
- package/dist/operator-client-LUZnlnYk.mjs +82 -0
- package/dist/{operator-cmd-DYWRbWUA.mjs → operator-cmd-CKJ7xIRs.mjs} +35 -55
- package/dist/{output-tFQLLj26.mjs → output-B0cfNSx5.mjs} +316 -2
- package/dist/pages/index.mjs +2 -2
- package/dist/platform-auth-config-CdVWRRJr.mjs +368 -0
- package/dist/platform-auth-protection-Drl0qhrn.mjs +219 -0
- package/dist/platform-auth-recovery-CmKEWpDo.mjs +310 -0
- package/dist/{platform-cmd-DxJ2FRwR.mjs → platform-cmd-5q_k56xS.mjs} +16 -6
- package/dist/{platform-domain-ChvbJkdy.mjs → platform-domain-4GiDlcqx.mjs} +4 -4
- package/dist/{platform-lifecycle-DN4MzJF_.mjs → platform-lifecycle-R9xAxvtG.mjs} +1716 -204
- package/dist/{platform-management-Db2PXw0B.mjs → platform-management-BfWsXHEW.mjs} +35 -7
- package/dist/{platform-recovery-C_YO-tIs.mjs → platform-recovery-CbK-I1FB.mjs} +6 -5
- package/dist/{prepare-CBetXvsN.mjs → prepare-CtDJjoOj.mjs} +2 -2
- package/dist/{prepare-BfJvFUtJ.mjs → prepare-blNRQvQl.mjs} +2 -2
- package/dist/prerender-render.d.mts +11 -0
- package/dist/prerender-render.mjs +111 -0
- package/dist/{project-cmd-Mo0V9yKS.mjs → project-cmd-CTdmnzvc.mjs} +32 -14
- package/dist/project-team-CGxsQe3_.mjs +132 -0
- package/dist/project-token-Cirx7uwZ.mjs +75 -0
- package/dist/{provision-Blnstcm2.mjs → provision-CSJOjjQk.mjs} +2 -0
- package/dist/{requests-BcKOVpRg.mjs → requests-4Nq59hOr.mjs} +3 -3
- package/dist/{rollback-Bx85-0xh.mjs → rollback-Dr7u0Ljx.mjs} +4 -4
- package/dist/runtime/ai.mjs +3 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +3 -3
- package/dist/runtime/email-protocol.d.mts +15 -0
- package/dist/runtime/email-protocol.mjs +70 -0
- package/dist/runtime/email.d.mts +2 -2
- package/dist/runtime/email.mjs +189 -96
- package/dist/runtime/remote/index.mjs +54 -11
- package/dist/runtime/sandbox.d.mts +4 -56
- package/dist/runtime/sandbox.mjs +81 -220
- package/dist/{secret-ByhJ9AMl.mjs → secret-AcPi-FoA.mjs} +5 -5
- package/dist/{skills-Q46GZMO-.mjs → skills-C0RvGjeE.mjs} +1 -1
- package/dist/{subcommand-prompt-WfySCQ7S.mjs → subcommand-prompt-Bmyn5Rlc.mjs} +1 -1
- package/package.json +12 -7
- package/skills/void/SKILL.md +35 -4
- package/skills/void/docs/guide/deployment.md +16 -14
- package/skills/void/docs/guide/email.md +114 -120
- package/skills/void/docs/guide/platform/administration/access.md +163 -0
- package/skills/void/docs/guide/platform/administration/email.md +121 -0
- package/skills/void/docs/guide/platform/administration/operations.md +97 -0
- package/skills/void/docs/guide/platform/administration/projects.md +54 -0
- package/skills/void/docs/guide/platform/development/local.md +119 -0
- package/skills/void/docs/guide/platform/development/runtime.md +124 -0
- package/skills/void/docs/guide/platform/development/schema-ci.md +95 -0
- package/skills/void/docs/guide/platform/installation/ci.md +55 -0
- package/skills/void/docs/guide/platform/installation/credentials.md +80 -0
- package/skills/void/docs/guide/platform/installation/domains.md +68 -0
- package/skills/void/docs/guide/platform/installation/first-deployment.md +82 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +137 -0
- package/skills/void/docs/guide/platform/installation/prerequisites.md +86 -0
- package/skills/void/docs/guide/platform/installation/setup.md +169 -0
- package/skills/void/docs/guide/platform/installation/uninstall.md +54 -0
- package/skills/void/docs/guide/platform-administration.md +6 -202
- package/skills/void/docs/guide/platform-development.md +5 -254
- package/skills/void/docs/guide/project-collaboration.md +94 -0
- package/skills/void/docs/guide/sandboxes.md +9 -24
- package/skills/void/docs/guide/self-hosted-platform.md +13 -542
- package/skills/void/docs/reference/api.md +34 -34
- package/skills/void/docs/reference/cli.md +276 -31
- package/skills/void/docs/reference/config.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +10 -10
- package/dist/cf-access-AJ1ehiFR.mjs +0 -42
- package/dist/cf-access-DsSsZUPr.mjs +0 -67
- package/dist/client-Clirrol3.mjs +0 -705
- package/dist/email-uKyQYUVY.mjs +0 -1016
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Runtime and Source Builds
|
|
6
|
+
|
|
7
|
+
## Deploying Your Runtime
|
|
8
|
+
|
|
9
|
+
Build the runtime. From a Git checkout, the build automatically records the current commit in the runtime manifest. An uncommitted checkout is recorded with a `-dirty` suffix:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
vp run build:core
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Build systems may set `VOID_PLATFORM_SOURCE_REVISION` when they need to override automatic detection with another immutable revision. A source archive without Git metadata builds normally but leaves the revision unrecorded.
|
|
16
|
+
|
|
17
|
+
The runtime is written to `packages/platform/dist/runtime`. Use the built CLI to preview a new installation from those files:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
void-dev platform install \
|
|
21
|
+
--name my-team \
|
|
22
|
+
--application-domain example.app \
|
|
23
|
+
--zone example.app \
|
|
24
|
+
--runtime packages/platform/dist/runtime \
|
|
25
|
+
--plan
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Before applying the plan, complete the [installation guides](/guide/self-hosted-platform). Run the command without `--plan` to install. For testing before your domain is ready, replace `--application-domain` and `--zone` with `--workers-dev`; PostgreSQL and the runtime/GitHub/R2 credentials are still needed. Use `void-dev` in place of `void` and keep `--runtime packages/platform/dist/runtime` on install and resume commands. For an interrupted installation, keep that runtime build available until it completes.
|
|
29
|
+
|
|
30
|
+
Later, run `void-dev platform domain set example.app`. Domain setup uses the existing installed runtime and needs no `--runtime`, rebuild, or app redeploy. It keeps the platform API URL and original workers.dev app URLs available.
|
|
31
|
+
|
|
32
|
+
For an existing installation, preview an upgrade using its connection ID:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
void-dev platform upgrade <installation-id> \
|
|
36
|
+
--runtime packages/platform/dist/runtime --plan
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Then run it without `--plan` to apply the upgrade. Source-built runtimes go through the same artifact, database, ownership, and health checks as released runtimes. The CLI preserves a disabled installation's state and records the source revision in its installation checkpoint.
|
|
40
|
+
|
|
41
|
+
## Optional GitHub Webhook Ingress for Access-Protected APIs
|
|
42
|
+
|
|
43
|
+
The core installer does not deploy the dashboard, GitHub App, build Containers,
|
|
44
|
+
or webhook ingress. Passing a source build with `--runtime` does not provision
|
|
45
|
+
their infrastructure, bindings, credentials, or platform capabilities. The
|
|
46
|
+
repository's hosted deployment scripts target Void Cloud; they are not a
|
|
47
|
+
general setup procedure for adding these services to a self-hosted platform.
|
|
48
|
+
Use the core CLI deployment workflow unless your fork supplies and maintains
|
|
49
|
+
that optional integration.
|
|
50
|
+
|
|
51
|
+
If your fork has added managed GitHub builds and Cloudflare Access protects its API hostname, GitHub cannot deliver directly
|
|
52
|
+
to `/webhooks/github`: GitHub does not present your Access credentials. Do not add
|
|
53
|
+
an Everyone or bypass policy to the API application.
|
|
54
|
+
|
|
55
|
+
The API source package includes an optional, path-isolated Worker for this case.
|
|
56
|
+
It accepts only `POST /github`, validates GitHub's signature over the raw body,
|
|
57
|
+
and forwards one authenticated internal operation over an API service binding.
|
|
58
|
+
The API independently verifies both that internal proof and GitHub's signature
|
|
59
|
+
before running the normal webhook handler. Installations without perimeter
|
|
60
|
+
protection can continue using the API's direct `/webhooks/github` endpoint.
|
|
61
|
+
|
|
62
|
+
To deploy the optional ingress:
|
|
63
|
+
|
|
64
|
+
1. Provision the GitHub App, build executors, API bindings, credentials, and
|
|
65
|
+
managed-build capability in your fork, then deploy its source API runtime
|
|
66
|
+
with the internal operation. A core install or upgrade alone does not add
|
|
67
|
+
managed builds.
|
|
68
|
+
2. Edit `platform/packages/api/wrangler.github-webhook-ingress.jsonc`. Give the
|
|
69
|
+
ingress a name unique to the installation and set its `API` service binding to
|
|
70
|
+
the exact installed API Worker name. Keep its public hostname separate from
|
|
71
|
+
every human/API hostname covered by Access.
|
|
72
|
+
3. Deploy it from the repository root:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
vp run --filter @voidcloud/api deploy:github-webhook-ingress --env production
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Use `--env staging` for the staging entries in the same config.
|
|
79
|
+
|
|
80
|
+
4. In the Cloudflare dashboard, add encrypted Worker secrets. Set the GitHub
|
|
81
|
+
App's existing `GITHUB_WEBHOOK_SECRET` on both the API and ingress Workers.
|
|
82
|
+
Generate a separate high-entropy value, such as `openssl rand -base64 32`,
|
|
83
|
+
and set it as `GITHUB_WEBHOOK_INGRESS_SECRET` on both Workers. Do not reuse a
|
|
84
|
+
platform management, JWT, Access, or GitHub webhook credential for that value.
|
|
85
|
+
5. In the GitHub App settings, keep **Content type** set to `application/json`,
|
|
86
|
+
keep the same webhook secret, and change **Webhook URL** to the isolated
|
|
87
|
+
ingress URL ending in `/github`. Use GitHub's test delivery and confirm a 2xx
|
|
88
|
+
response before relying on push builds.
|
|
89
|
+
|
|
90
|
+
The ingress has no login, dashboard, project, operator, proxy, or arbitrary
|
|
91
|
+
forwarding route. It does not make the GitHub integration part of the core
|
|
92
|
+
installer, provision build executors, create a GitHub App, configure Cloudflare
|
|
93
|
+
Access, or manage either Worker's secrets. Its body limit is 25 MiB, based on
|
|
94
|
+
GitHub's [documented 25 MB webhook payload cap](https://docs.github.com/en/webhooks/webhook-events-and-payloads#payload-cap);
|
|
95
|
+
malformed or larger deliveries are rejected before event processing.
|
|
96
|
+
|
|
97
|
+
## Deploying Source Builds from CI
|
|
98
|
+
|
|
99
|
+
Build `@void/platform` from your checkout and pass its runtime directory to `install`, `upgrade`, `repair`, `enable`, or `rollback` with `--runtime`. Custom runtimes get the same integrity, migration, health, and rollback checks as packaged releases.
|
|
100
|
+
|
|
101
|
+
Void records the runtime's manifest digest, whether it was packaged or custom, and its source revision. A build from a Git checkout automatically records `HEAD`, or `<HEAD>-dirty` when the checkout has uncommitted files. Build systems can set `VOID_PLATFORM_SOURCE_REVISION` to override automatic detection.
|
|
102
|
+
|
|
103
|
+
A fresh CI runner can discover the installation each time. Set `CLOUDFLARE_API_TOKEN` and `VOID_PLATFORM_DATABASE_URL` through its protected environment, then:
|
|
104
|
+
|
|
105
|
+
::: details CI commands and recovery inputs
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
vp run build:core
|
|
109
|
+
|
|
110
|
+
export VOID_PLATFORM_REGISTRY_DIR="$RUNNER_TEMP/void-platform-registry"
|
|
111
|
+
export VOID_PLATFORM_RECOVERY_KEY="$(openssl rand -base64 32)"
|
|
112
|
+
node packages/void/dist/cli/cli.mjs platform discover --account "$CLOUDFLARE_ACCOUNT_ID" \
|
|
113
|
+
--installation "$VOID_PLATFORM_INSTALLATION"
|
|
114
|
+
node packages/void/dist/cli/cli.mjs platform upgrade "$VOID_PLATFORM_INSTALLATION" \
|
|
115
|
+
--runtime packages/platform/dist/runtime --plan
|
|
116
|
+
node packages/void/dist/cli/cli.mjs platform upgrade "$VOID_PLATFORM_INSTALLATION" \
|
|
117
|
+
--runtime packages/platform/dist/runtime --yes
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Omit the installation selector only if the account has one discoverable installation. Run one deployment per installation at a time, and let it finish before starting the next. Cancelling during migrations or Worker rollout can leave an installation waiting for recovery.
|
|
121
|
+
|
|
122
|
+
Keep the management token, database URL, JWT signing secret, email signing secret for email-enabled installations, and complete project-encryption keyring in a protected CI environment. Upgrades inherit deployed Worker secrets. The original values are needed when recreating a missing Worker; configuration credentials are also needed when explicitly rotating them.
|
|
123
|
+
|
|
124
|
+
:::
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Schema and CI
|
|
6
|
+
|
|
7
|
+
## Changing the Platform Schema
|
|
8
|
+
|
|
9
|
+
The schema lives in `platform/packages/api/src/schema.ts`. Generate a migration after changing it:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
vp run --filter @voidcloud/api db:generate
|
|
13
|
+
```
|
|
14
|
+
|
|
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
|
+
|
|
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. See `packages/platform/README.md` for the manifest contract.
|
|
18
|
+
|
|
19
|
+
## CI in a Fork
|
|
20
|
+
|
|
21
|
+
The uncredentialed test workflows use GitHub-hosted runners in forks. They build and test the workspace without requiring Void Cloud accounts, tokens, or deployment access.
|
|
22
|
+
|
|
23
|
+
If your fork has a released platform version, set the repository variable
|
|
24
|
+
`VOID_PLATFORM_PRODUCTION_REF` to its immutable 40-character commit SHA. Platform
|
|
25
|
+
pull requests then create that version's database, seed representative user,
|
|
26
|
+
project, and encrypted-secret records, and apply the proposed migrations. The
|
|
27
|
+
check verifies existing data and runs the previous runtime against the upgraded
|
|
28
|
+
schema. Mutable branch or tag names are rejected.
|
|
29
|
+
|
|
30
|
+
Without an explicit SHA, required compatibility checks use the latest successful
|
|
31
|
+
GitHub deployment to `Prod` (or `VOID_PLATFORM_PRODUCTION_ENV`). They require
|
|
32
|
+
read access to deployment history and stop if no completed deployment is found.
|
|
33
|
+
Advancing the production branch does not change the selected baseline. Fork
|
|
34
|
+
workflows that call platform CI must grant `deployments: read` alongside
|
|
35
|
+
`contents: read`.
|
|
36
|
+
|
|
37
|
+
The upstream repository also contains workflows for deploying Void Cloud and publishing the official npm packages. Forks should configure their own release workflow around the built CLI and `platform upgrade --runtime`; the [source-build CI example](/guide/platform/development/runtime#deploying-source-builds-from-ci) shows the required inputs. Keep production credentials in protected environments restricted to the appropriate release refs.
|
|
38
|
+
|
|
39
|
+
Public releases use matching versions for the CLI, scaffolder, adapters, and
|
|
40
|
+
packaged platform. The publish workflow rejects mismatched versions and previously
|
|
41
|
+
unpublished `void` versions that npm cannot reuse. Stable versions use `latest`;
|
|
42
|
+
prereleases use their named channel, such as `beta` or `rc`. Numeric prereleases
|
|
43
|
+
use `next`. The scaffolder installs its exact matching CLI version, so
|
|
44
|
+
`create-void@beta` cannot silently select the stable CLI. Packaged platform
|
|
45
|
+
runtimes record the release commit as their source revision.
|
|
46
|
+
|
|
47
|
+
The npm release job uses [trusted publishing](https://docs.npmjs.com/trusted-publishers/)
|
|
48
|
+
from GitHub-hosted runners, with `id-token: write` and no stored npm publishing
|
|
49
|
+
token. Configure a trusted publisher for each public package using this
|
|
50
|
+
repository, `publish.yml`, and the `Release` environment, allowing direct
|
|
51
|
+
`npm publish`. A brand-new package
|
|
52
|
+
needs an initial authenticated publication before its trusted publisher can be
|
|
53
|
+
configured; subsequent releases use OIDC.
|
|
54
|
+
|
|
55
|
+
The managed build fallback CLI also derives its version from
|
|
56
|
+
`packages/void/package.json`; there are no separate version pins to update.
|
|
57
|
+
Build its image from the repository root with
|
|
58
|
+
`docker build --file platform/packages/api/container/Dockerfile .`.
|
|
59
|
+
The root `.dockerignore` limits that build context to the agent, Dockerfile,
|
|
60
|
+
and public SDK manifest.
|
|
61
|
+
|
|
62
|
+
Publishing requires both SDK CI and platform CI, including the platform unit and
|
|
63
|
+
API integration suites. Release tags also run the Windows SDK checks; a passing
|
|
64
|
+
SDK-only build cannot publish a changed control plane.
|
|
65
|
+
|
|
66
|
+
### Retrying a Release
|
|
67
|
+
|
|
68
|
+
To retry a failed release without moving an existing tag, add `+retry.N` to a
|
|
69
|
+
new Git tag, with `N` starting at `1`. Keep the package versions unchanged:
|
|
70
|
+
|
|
71
|
+
| Git tag | Package version | npm channel |
|
|
72
|
+
| ------------------------ | --------------- | ----------- |
|
|
73
|
+
| `v0.21.0` | `0.21.0` | `latest` |
|
|
74
|
+
| `v0.21.0+retry.1` | `0.21.0` | `latest` |
|
|
75
|
+
| `v0.21.0-beta.1+retry.2` | `0.21.0-beta.1` | `beta` |
|
|
76
|
+
|
|
77
|
+
For example, when the packages are at `0.21.0`, commit the release fix and tag
|
|
78
|
+
that commit:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
git tag -a 'v0.21.0+retry.1' -m 'Retry 0.21.0 publication.'
|
|
82
|
+
git push origin 'refs/tags/v0.21.0+retry.1'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The retry suffix belongs only in the Git tag, not in `package.json`. A `-1`
|
|
86
|
+
suffix is a distinct prerelease version, not a retry. Tag and package versions
|
|
87
|
+
are checked before dependency installation and the full CI jobs; retries still
|
|
88
|
+
run the normal release checks.
|
|
89
|
+
|
|
90
|
+
Retries publish only package versions that are still missing from npm. They
|
|
91
|
+
cannot replace an already-published version. If an earlier attempt partially
|
|
92
|
+
published the release and you changed its package contents, bump the version
|
|
93
|
+
instead of combining different contents under the same version.
|
|
94
|
+
|
|
95
|
+
For implementation history, use the design archive at `platform/meta/design-docs/README.md`. Its proposals explain earlier decisions; the source and current guides define the supported behavior.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Install from CI
|
|
6
|
+
|
|
7
|
+
For your first installation, follow the [interactive setup](/guide/platform/installation/setup). Use this page when automating a configured installation.
|
|
8
|
+
|
|
9
|
+
::: details Non-interactive inputs
|
|
10
|
+
|
|
11
|
+
Inject the following values from protected CI secrets. Do not commit them in a workflow or a plaintext secrets file.
|
|
12
|
+
|
|
13
|
+
| Environment variable | Value from the interactive setup |
|
|
14
|
+
| -------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `CLOUDFLARE_API_TOKEN` | Management API token |
|
|
16
|
+
| `VOID_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKEN` | Runtime API token |
|
|
17
|
+
| `VOID_PLATFORM_DATABASE_URL` | Dedicated PostgreSQL URL |
|
|
18
|
+
| `VOID_PLATFORM_R2_ACCESS_KEY_ID` | R2 Access Key ID |
|
|
19
|
+
| `VOID_PLATFORM_R2_SECRET_ACCESS_KEY` | R2 Secret Access Key |
|
|
20
|
+
| `VOID_PLATFORM_JWT_SECRET` | Original JWT signing secret |
|
|
21
|
+
| `VOID_PLATFORM_EMAIL_SIGNING_SECRET` | Dedicated email signing secret when email is enabled |
|
|
22
|
+
| `VOID_PLATFORM_PROJECT_SECRET_KEY` | Original base64-encoded project-encryption key |
|
|
23
|
+
| `VOID_PLATFORM_RECOVERY_KEY` | Base64-encoded 32-byte key for local encrypted recovery state when no keychain is available |
|
|
24
|
+
| `VOID_EMAIL_SENDER_DOMAIN` | Optional shared mail domain; requires `VOID_EMAIL_SHARED_ZONE_ID` |
|
|
25
|
+
| `VOID_EMAIL_SHARED_ZONE_ID` | Cloudflare zone ID for that mail domain; requires `VOID_EMAIL_SENDER_DOMAIN` |
|
|
26
|
+
|
|
27
|
+
For the default GitHub-only login, also set `VOID_PLATFORM_GITHUB_CLIENT_ID`,
|
|
28
|
+
`VOID_PLATFORM_GITHUB_CLIENT_SECRET`, and `VOID_PLATFORM_ADMIN_GITHUB_LOGIN`.
|
|
29
|
+
For Google, OIDC, or Access login, pass `--auth-config <path>` using the
|
|
30
|
+
[configuration format](/guide/platform/installation/setup#choose-login-methods).
|
|
31
|
+
Inject each `clientSecretEnv` named in that file from your CI secret manager.
|
|
32
|
+
Automatic Access protection may also need `VOID_PLATFORM_ACCESS_SETUP_TOKEN`
|
|
33
|
+
with the [setup permissions](/guide/platform/installation/setup#cloudflare-access).
|
|
34
|
+
|
|
35
|
+
Use that installation's saved signing and encryption keys on every resume or repair that needs them. After a keyring rotation, use the [complete keyring recovery inputs](/guide/platform/installation/maintenance#manage-an-installation-from-another-machine). The database claim and tables remain after uninstall; use a fresh database for a different installation.
|
|
36
|
+
|
|
37
|
+
Set both email values to enable email during install or upgrade. Later upgrades reuse the recorded values. If an email-enabled installation has no recorded values, supply both before upgrading.
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
void platform install \
|
|
41
|
+
--name team \
|
|
42
|
+
--display-name "Team Void" \
|
|
43
|
+
--account <account-id> \
|
|
44
|
+
--application-domain example.app \
|
|
45
|
+
--zone example.app \
|
|
46
|
+
--yes
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Mutations require `--yes` in CI; a read-only `--plan` does not. Custom runtimes also require `--runtime <directory>`. For a new installation, run `--plan` with the same account, name, and domain options as the unattended install. If you use `--auth-config`, pass the same file to both commands. Register the printed callback when creating a login provider's OAuth or OIDC client manually; automatic Access setup manages its own application. A custom API hostname is optional.
|
|
50
|
+
|
|
51
|
+
:::
|
|
52
|
+
|
|
53
|
+
## Customize the Platform
|
|
54
|
+
|
|
55
|
+
To change the platform's implementation or deploy your own build, follow [Platform Development](/guide/platform-development). It covers local development, source builds, and CI for a fork.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Credentials
|
|
6
|
+
|
|
7
|
+
Keep one password-manager entry for this platform. Paste the saved values into the installer when asked; most do not need shell environment variables.
|
|
8
|
+
|
|
9
|
+
## Cloudflare API Tokens {#runtime-token-permissions}
|
|
10
|
+
|
|
11
|
+
For a domain installation, create two custom tokens using Cloudflare's [API token setup](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). Name them **Void Platform Management** and **Void Platform Runtime**. Scope them to your selected account and application zone.
|
|
12
|
+
|
|
13
|
+
For workers.dev testing with the default API hostname, browser login can authorize installation: you only need to create the runtime token and R2 credentials below. Skip the zone permissions until you add a domain.
|
|
14
|
+
|
|
15
|
+
Browser login does not grant AI Gateway access. A preview can therefore show **inspect ai-gateway**: Void verifies that resource with the runtime token after you confirm installation, before creating any resources. Include **Account → AI Gateway → Edit** on that token. Other infrastructure continues using your browser login, and a normal API-token installation keeps using its management token when that token already has access.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
The runtime-token link preselects all required account permissions, including Workers Tail, Hyperdrive, and AI Gateway when needed. Review them against the short summary beside the link before creating the token. If the form differs, use that summary to correct it. For a domain installation, also select the indicated zone. See [Cloudflare's token template documentation](https://developers.cloudflare.com/fundamentals/api/how-to/account-owned-token-template/).
|
|
20
|
+
|
|
21
|
+
::: details Permissions to select for each token
|
|
22
|
+
|
|
23
|
+
Use the following permissions for the core platform. Cloudflare may label write access as **Edit** or **Write**, depending on the token screen; see its [permission reference](https://developers.cloudflare.com/fundamentals/api/reference/permissions/).
|
|
24
|
+
|
|
25
|
+
| Scope | Permission | Management | Runtime |
|
|
26
|
+
| ------- | ------------------ | ---------- | --------------------------------------- |
|
|
27
|
+
| Account | Account Settings | Read | Read |
|
|
28
|
+
| Account | Workers Scripts | Edit | Edit |
|
|
29
|
+
| Account | Workers Tail | Read | Read |
|
|
30
|
+
| Account | D1 | Edit | Edit |
|
|
31
|
+
| Account | Workers KV Storage | Edit | Edit |
|
|
32
|
+
| Account | Workers R2 Storage | Edit | Edit |
|
|
33
|
+
| Account | Queues | Edit | Edit |
|
|
34
|
+
| Account | Hyperdrive | Write | Write |
|
|
35
|
+
| Account | Account Analytics | Read | Read |
|
|
36
|
+
| Account | AI Gateway | Edit | Edit when installing with browser login |
|
|
37
|
+
| Zone | Zone | Read | — |
|
|
38
|
+
| Zone | DNS | Edit | — |
|
|
39
|
+
| Zone | Workers Routes | Edit | — |
|
|
40
|
+
| Zone | Cache Purge | — | Purge |
|
|
41
|
+
|
|
42
|
+
The management token also needs **Zone Edit** with authority to create zones if you ask Void to create the zone. If it already exists, use the selected zone with Zone Read and DNS Edit. Nested application domains additionally need **SSL and Certificates: Read** on the management token. A custom runtime that enables custom project domains needs **SSL and Certificates: Edit** on the runtime token; the core runtime does not enable that feature.
|
|
43
|
+
|
|
44
|
+
Enabling email lets administrators [register email domains for projects](/guide/platform/administration/email#registering-email-domains-for-projects) and lets projects register destination addresses through the runtime token. That needs **Email Routing Addresses: Edit** and **Email Sending: Edit** on the account, plus **Zone: Read**, **Zone Settings: Edit** and **Email Routing Rules: Edit** on the zones that will carry mail; the token link preselects them when email is enabled. Email Sending onboarding itself needs Workers Paid on the account.
|
|
45
|
+
|
|
46
|
+
To enable email, set `VOID_EMAIL_SENDER_DOMAIN` to the shared sender domain and `VOID_EMAIL_SHARED_ZONE_ID` to its Cloudflare zone ID when installing or upgrading. Void records both values for later upgrades and rejects attempts to replace them during an ordinary upgrade. The mail zone can differ from the application zone, but it must belong to the selected platform Cloudflare account; without an explicit mail-zone identity, shared inbound delivery stays unavailable. The dedicated email gateway is deployed in the platform account. Each customer zone uses its own ingress Worker to forward mail to that gateway.
|
|
47
|
+
|
|
48
|
+
The installer prepares the shared mail route and verifies inbound readiness before it opens platform traffic. If that setup fails, the installation remains disabled. Correct the reported Cloudflare permission, mail-zone configuration, or routing conflict, then rerun the same install or upgrade command; a fresh install resumes with `void platform install --resume --name <installation-id>`.
|
|
49
|
+
|
|
50
|
+
Void checks access before provisioning. If it reports a missing permission, update the token's permissions for the selected account or zone and retry.
|
|
51
|
+
|
|
52
|
+
:::
|
|
53
|
+
|
|
54
|
+
## R2 Upload Credentials
|
|
55
|
+
|
|
56
|
+
The installer opens the **R2 token creation** form directly, requesting an account token (or a user token if your role cannot create account tokens). Select **Object Read & Write**—the form starts with read-only access—and keep **Apply to all buckets in this account (including newly created buckets)** selected. This lets the token access the buckets Void creates afterward. Create the token and save its **Access Key ID** and **Secret Access Key**. These are different from the management/runtime tokens above. See [R2's token instructions](https://developers.cloudflare.com/r2/api/tokens/).
|
|
57
|
+
|
|
58
|
+
## Signing and Encryption Keys {#signing-and-encryption-keys}
|
|
59
|
+
|
|
60
|
+
The **JWT signing key** signs platform login tokens. The **Project encryption key** encrypts app secrets stored by your platform. Generate a separate key for each by running this command twice:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
openssl rand -base64 32
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Save each result in your password manager, then paste it into the corresponding installer prompt. The command generates 32 random bytes encoded as base64, suitable for either field. Keep the two original keys for recovery; do not regenerate them when resuming or upgrading.
|
|
67
|
+
|
|
68
|
+
::: details Generate the keys without printing them to your terminal
|
|
69
|
+
|
|
70
|
+
On macOS, this copies a suitable random value to the clipboard:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
openssl rand -base64 32 | pbcopy
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Paste it into your password manager as **JWT signing key**. Run the command again and save the second value as **Project encryption key**. On PowerShell, use `Set-Clipboard` instead of `pbcopy`. If OpenSSL is unavailable, use your secret manager's secure generator for 32 random bytes in base64, or `node -e 'process.stdout.write(require("node:crypto").randomBytes(32).toString("base64"))'`.
|
|
77
|
+
|
|
78
|
+
:::
|
|
79
|
+
|
|
80
|
+
When email is enabled, Void also creates an independent **Email signing key** for confirmation links and service-to-service email requests. The installer keeps it in encrypted recovery state. Set `VOID_PLATFORM_EMAIL_SIGNING_SECRET` to a separate value of at least 32 random bytes when you need an externally custodied copy, including a headless installation whose local recovery files will not persist.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Domains and Resources
|
|
6
|
+
|
|
7
|
+
## Adding a Domain
|
|
8
|
+
|
|
9
|
+
When your domain is ready, run:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
void platform domain set example.app --plan
|
|
13
|
+
void platform domain set example.app
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The command selects your installed platform (or offers a picker), finds or creates its zone, sets up DNS and routing, and verifies HTTPS before publishing the new application URLs. Set the management token as described in [installation setup](/guide/platform/installation/setup) when creating DNS or a zone. Grant the existing runtime token **Cache Purge: Purge** on the new zone; Void checks that permission through the running platform without asking you to paste its token again.
|
|
17
|
+
|
|
18
|
+
If nameservers or certificates are pending, follow the printed guidance and rerun the same command. Your workers.dev app URLs continue working during and after setup. Projects, deployments, secrets, and the platform API URL stay the same, so developers do not reconnect and configured login callbacks do not change. DNS and configuration changes may take time to propagate.
|
|
19
|
+
|
|
20
|
+
Use `--installation <id>` to select an installation explicitly, `--zone example.com` for an app domain such as `apps.example.com`, or `--dedicated-zone` for catch-all routing on a dedicated zone. Nested domains still need the wildcard certificate described below. This command adds the first domain; replacing an existing application domain is not currently supported. It uses the installed runtime and does not require `--runtime` or an app redeploy.
|
|
21
|
+
|
|
22
|
+
Browser login sessions are specific to each origin. Apps using their own OAuth providers may need to register their new callback URLs. Void's built-in auth uses the request origin automatically unless the app overrides that configuration.
|
|
23
|
+
|
|
24
|
+
### What Changes in Testing Mode?
|
|
25
|
+
|
|
26
|
+
Each deployed app gets a small forwarding Worker and its own `workers.dev` origin. It forwards requests, including WebSockets and SSE, through the same platform router. Names include installation and project IDs; a later project with the same slug cannot inherit a deleted project's test URL.
|
|
27
|
+
|
|
28
|
+
Testing origins use shared ISR storage but bypass the extra edge response cache because you cannot use your zone's purge API for `workers.dev`. Custom-domain requests use the normal edge cache after activation. Existing test URLs and forwarding Workers are retained when you add a domain; new apps then use the domain without creating more forwarding Workers. Like other platform Workers, forwarders are retained for manual cleanup on uninstall; platform disablement and project suspension still apply to their traffic.
|
|
29
|
+
|
|
30
|
+
## Other Domain Options
|
|
31
|
+
|
|
32
|
+
::: details Custom API hostname
|
|
33
|
+
|
|
34
|
+
Pass `--control-plane-domain platform.example.net` during installation. The hostname must belong to a zone the selected account and management token can manage. Omitting it keeps the API on `workers.dev`.
|
|
35
|
+
|
|
36
|
+
:::
|
|
37
|
+
|
|
38
|
+
### Using a Nested Application Domain
|
|
39
|
+
|
|
40
|
+
::: details Use apps.example.com within an existing company zone
|
|
41
|
+
|
|
42
|
+
An app at `my-app.apps.example.com` needs a certificate for `*.apps.example.com`. Universal SSL for `example.com` only covers first-level hostnames. Configure an active wildcard certificate with [Advanced Certificate Manager](https://developers.cloudflare.com/ssl/edge-certificates/advanced-certificate-manager/), a paid add-on, or use an existing custom wildcard certificate before installation:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
void platform install --application-domain apps.example.com --zone example.com --plan
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The management token needs **SSL and Certificates: Read** (or Edit) on that zone for the certificate check. Void does not order certificates or enable paid products automatically. Leave `--dedicated-zone` off: that flag is only for installations whose application domain is the entire zone and adds catch-all routes for otherwise unmatched traffic.
|
|
49
|
+
|
|
50
|
+
:::
|
|
51
|
+
|
|
52
|
+
## Cloudflare footprint
|
|
53
|
+
|
|
54
|
+
New platform resources use deterministic `void-<installation-name>-<role>` names where Cloudflare allows them, such as `void-team-api`. Choose an unused installation name in the account; Void stops on an unowned name conflict instead of replacing that resource. Existing installations keep their recorded names, including older names with suffixes.
|
|
55
|
+
|
|
56
|
+
| Resource | Count | Purpose |
|
|
57
|
+
| ----------------------------------------- | ------------------------------------: | --------------------------------------------------------------------------------------------- |
|
|
58
|
+
| Workers | 5, plus one per app using workers.dev | API/control plane, proxy, tail ingestion, dispatch, email gateway, and test-origin forwarders |
|
|
59
|
+
| KV namespaces | 3 | Routing, ISR cache, and static asset storage |
|
|
60
|
+
| R2 buckets | 1 | Static and deployment assets |
|
|
61
|
+
| Queues | 2 | Usage events and cron firing |
|
|
62
|
+
| Workers for Platforms dispatch namespaces | 1 | User application Workers |
|
|
63
|
+
| Hyperdrive configurations | 1 | External platform PostgreSQL |
|
|
64
|
+
| AI Gateways | 1 | Installation-isolated AI routing and metering |
|
|
65
|
+
| Proxied wildcard DNS records | 0 or 1 | Created only when an application domain is configured |
|
|
66
|
+
| Zones | 0 or 1 | Created only when the requested application zone is absent |
|
|
67
|
+
|
|
68
|
+
The API Worker uses four Durable Object classes for usage, cron scheduling, error monitoring, and concurrency. Worker bindings create the request and log datasets in Analytics Engine. The core installation doesn't create Container applications, a GitHub App, a dashboard Worker, or build Workers.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
outline: deep
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# First Deployment
|
|
6
|
+
|
|
7
|
+
First verify the new platform and sign in with the administrator login method selected during setup:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
void platform status
|
|
11
|
+
void platform auth login
|
|
12
|
+
void platform system health
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Administrator login is separate from the credentials used to deploy apps. In a new or unlinked Void app directory, connect using the installed API URL and deploy your first project:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
void connect https://void-company-api.example.workers.dev
|
|
19
|
+
void deploy --platform void --project my-first-app
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`void connect` validates the platform and signs you in when needed. Confirm project creation when deploy asks. To use a project that already exists, run `void project link` instead. An app already linked to another platform keeps its existing destination; use a fresh app directory for your first test.
|
|
23
|
+
|
|
24
|
+
The CLI stores login credentials in your system keychain, separately for each platform URL. With no URL, `void connect` offers Cloudflare or a Void platform; `void connect --platform void` offers saved platforms and an option to enter another URL.
|
|
25
|
+
|
|
26
|
+
For CI, create a bounded, project-scoped deploy credential while signed in as
|
|
27
|
+
the project owner:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
void project token create --name ci --expires-in 30
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Store the printed `VOID_TOKEN` and `VOID_API_URL` in the CI secret manager, then
|
|
34
|
+
use `void connect <url> --no-login` in a fresh checkout if connection metadata
|
|
35
|
+
is not committed. Rotate with `void project token renew <id>` and revoke with
|
|
36
|
+
`void project token revoke <id>`. A human login token is not a CI credential.
|
|
37
|
+
|
|
38
|
+
If Cloudflare Access protects the platform, Access proof and the project
|
|
39
|
+
credential are both required; the service token does not grant Void user or
|
|
40
|
+
operator authority. A deploy that uses prerendering or remote bindings calls
|
|
41
|
+
both the API and proxy, so store `VOID_ACCESS_CREDENTIALS` in the CI secret
|
|
42
|
+
manager with entries for both exact HTTPS origins. Include both entries even
|
|
43
|
+
when the same admitted service-token pair is used for both origins:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"https://void-company-api.example.workers.dev": {
|
|
48
|
+
"CF_ACCESS_CLIENT_ID": "<service-token client ID>",
|
|
49
|
+
"CF_ACCESS_CLIENT_SECRET": "<service-token client secret>"
|
|
50
|
+
},
|
|
51
|
+
"https://void-company-proxy.example.workers.dev": {
|
|
52
|
+
"CF_ACCESS_CLIENT_ID": "<service-token client ID>",
|
|
53
|
+
"CF_ACCESS_CLIENT_SECRET": "<service-token client secret>"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`VOID_ACCESS_ORIGIN` can scope credentials to one origin only; setting it to
|
|
59
|
+
the API origin does not authorize proxy requests.
|
|
60
|
+
|
|
61
|
+
Use these commands to inspect connections and installations:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
void platform list
|
|
65
|
+
void platform use [id]
|
|
66
|
+
void platform status [id]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Managing Access
|
|
70
|
+
|
|
71
|
+
After installation, sign in as the first administrator. For a teammate who uses GitHub, add their login to the signup allowlist:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
void platform auth login
|
|
75
|
+
void platform signup allow github teammate
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Void shows the proposed access change and asks you to confirm it. Once approved, `teammate` can connect to the platform's API URL and sign in with GitHub.
|
|
79
|
+
|
|
80
|
+
To see who can join, run `void platform signup show`. You can also allow an email address or a domain such as `*@example.com`. For an OIDC user without verified email, use `void platform signup allow identity <connection-id> <subject>`; the subject match is exact and the provider's domain or group restrictions still apply. Remove that grant with `void platform signup disallow identity <connection-id> <subject>`. `void platform signup open` permits public signup; `void platform signup restrict` requires an allowlist match again.
|
|
81
|
+
|
|
82
|
+
Your administrator session lasts for one hour. Use it to inspect users, projects, logs, and platform health. The [Platform Administration guide](/guide/platform-administration) walks through those workflows, previews, and automation. You can also open `<API origin>/admin/login` to use the browser admin UI.
|