void 0.23.0 → 0.25.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/AGENTS_TEMPLATE.md +1 -1
- package/README.md +19 -106
- package/dist/{account-cmd-C84Ee8cO.mjs → account-cmd-DcR1ywt8.mjs} +5 -5
- package/dist/{auth-CSkdO2Bb.mjs → auth-7wuZ5ob8.mjs} +22 -49
- package/dist/auth-CdgZ9uag.mjs +2 -0
- package/dist/{auth-link-CioEg6uY.mjs → auth-link-Z6E5DYvM.mjs} +5 -6
- package/dist/{auth-router-BsR981d4.mjs → auth-router-BdM4avI8.mjs} +7 -7
- package/dist/{build-cmd-LzvNJORH.mjs → build-cmd-CEE7D-hM.mjs} +7 -8
- package/dist/{cache-C4MvnrMH.mjs → cache-TcZnBLtH.mjs} +6 -7
- package/dist/{cancel-deploy-abUxpP2n.mjs → cancel-deploy-CYoZmcmR.mjs} +4 -6
- package/dist/{cf-access-P0iZnu0q.mjs → cf-access-AHKBzmuu.mjs} +4 -48
- package/dist/{cf-access-DRsQRe6k.mjs → cf-access-TWNzXltp.mjs} +3 -11
- package/dist/cf-build-output-ChY6-XWP.mjs +2 -0
- package/dist/cli/cli.mjs +49 -46
- package/dist/cli/cloudflare-operation-process.mjs +16 -7
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-B4Me-9HE.mjs +2 -0
- package/dist/{client-RV8NVeB8.mjs → client-RsPo8wsP.mjs} +129 -33
- package/dist/{cloudflare-cmd-BcrVyTmJ.mjs → cloudflare-cmd-bhwCxAN6.mjs} +2 -2
- package/dist/{cloudflare-connect-B8uPZ4nx.mjs → cloudflare-connect-CuhRgk3k.mjs} +2 -2
- package/dist/{cloudflare-operations-AiWashgg.mjs → cloudflare-operations-BhbK6yTq.mjs} +1 -1
- package/dist/{cloudflare-operations-fxHb-byx.mjs → cloudflare-operations-CjaV4lZi.mjs} +2 -2
- package/dist/{connect-Bd4kJd9U.mjs → connect-DCvUmPXY.mjs} +13 -10
- package/dist/{create-project-Boczwj5r.mjs → create-project-C734I-Mu.mjs} +1 -1
- package/dist/{create-project-bMf6ffLZ.mjs → create-project-eAPgYq35.mjs} +13 -13
- package/dist/{db-8uG64XLl.mjs → db-C07GEdKF.mjs} +27 -30
- package/dist/{delete-NvbiyeJf.mjs → delete-pKMVsrpJ.mjs} +5 -6
- package/dist/deploy-BDu1vhSH.mjs +2 -0
- package/dist/{deploy-DzAIwqNU.mjs → deploy-DfsAe-T0.mjs} +9567 -9215
- package/dist/{dev-inbox-P0u4tM8Y.mjs → dev-inbox-D64ZKUod.mjs} +5 -6
- package/dist/{domain-y5Tvydvo.mjs → domain-D3uA9ize.mjs} +8 -8
- package/dist/{email-B3umsW75.mjs → email-z3o2cwjH.mjs} +8 -8
- package/dist/{env-BS6qYHDb.mjs → env-3Q8-_2IH.mjs} +7 -9
- package/dist/{env-types-C2_bIk_b.mjs → env-types-D5kds_OZ.mjs} +1 -1
- package/dist/{env-validation-DbTg7-ar.mjs → env-validation-cZBvGWaP.mjs} +1 -1
- package/dist/{env-validation-BPn7vk-V.mjs → env-validation-vBSQ8gw5.mjs} +3 -3
- package/dist/gen-ById9r2j.mjs +2 -0
- package/dist/{gen-B580--vC.mjs → gen-NjwoG9FK.mjs} +2 -4
- package/dist/{github-cmd-v45BdfKX.mjs → github-cmd-DquUq-b1.mjs} +15 -24
- package/dist/{headers-DWi2IXWx.mjs → headers-2rKda9Y6.mjs} +1 -1
- package/dist/help-DPGBwomV.mjs +2 -0
- package/dist/{help-daGKjXGk.mjs → help-DRZXC4fj.mjs} +8 -4
- package/dist/{inbound-aVHEUhKo.mjs → inbound-fRkqcXaC.mjs} +1 -1
- package/dist/index.d.mts +18 -14
- package/dist/index.mjs +2176 -2110
- package/dist/{info-B97bTX9N.mjs → info-BmA3_IFZ.mjs} +1 -3
- package/dist/{init-Bvy7zrBo.mjs → init-DT7yuuyl.mjs} +28 -27
- package/dist/{link-CDqqCjFl.mjs → link-CXOlqh2F.mjs} +6 -7
- package/dist/{list-CZj0dzKY.mjs → list-eEWVJEPn.mjs} +8 -9
- package/dist/{local-d1-2CMnpuW_.mjs → local-d1-Df4XpwhW.mjs} +1 -1
- package/dist/log-vqY3pqwI.mjs +29 -0
- package/dist/login-C98-sw79.mjs +2 -0
- package/dist/{login-UZKFM_u7.mjs → login-pWQHYVu2.mjs} +12 -10
- package/dist/{logs-CUZ6t9t3.mjs → logs-DnxVX7TR.mjs} +11 -13
- package/dist/migrate-CEu2X5DB.mjs +2 -0
- package/dist/{migrate-DHul7PRV.mjs → migrate-CV1on-yJ.mjs} +2 -4
- package/dist/{operator-args-CLgKGlwU.mjs → operator-args-CAVcmwUt.mjs} +12 -5
- package/dist/{operator-auth-8KnOVXVd.mjs → operator-auth-CkmTE3rt.mjs} +2 -2
- package/dist/{operator-client-DUwumHpQ.mjs → operator-client-LmwjxT6q.mjs} +3 -3
- package/dist/{operator-cmd-DBA6dl0m.mjs → operator-cmd-d-IEKgNk.mjs} +6 -6
- package/dist/{output-Dm_A4Tbv.mjs → output-BBsUwdyT.mjs} +22 -14
- package/dist/pages/client.d.mts +3 -0
- package/dist/pages/client.mjs +120 -29
- package/dist/pages/index.mjs +1 -1
- package/dist/{platform-args-BJdRtlLq.mjs → platform-args-Bzf8JPc2.mjs} +11 -3
- package/dist/platform-args-Cq6EjQro.mjs +2 -0
- package/dist/{platform-auth-config-B56E9YP1.mjs → platform-auth-config-0V0lA3pF.mjs} +7 -7
- package/dist/{platform-auth-protection-BDWO_aER.mjs → platform-auth-protection-DFeJ-JkK.mjs} +9 -9
- package/dist/{platform-auth-recovery-1gg4CSRe.mjs → platform-auth-recovery-ICy4muq6.mjs} +7 -7
- package/dist/{platform-cmd-Bt-1w6pY.mjs → platform-cmd-BPySFOew.mjs} +1 -1
- package/dist/{platform-cmd-DMcQStSc.mjs → platform-cmd-D7vSWMvV.mjs} +38 -28
- package/dist/platform-discovery-DDDUvnqp.mjs +27 -0
- package/dist/{platform-domain-BNkcz0OB.mjs → platform-domain-CUdY064e.mjs} +5 -5
- package/dist/{platform-lifecycle-BE6C_jxh.mjs → platform-lifecycle-BaUdTRPU.mjs} +1 -1
- package/dist/{platform-lifecycle-9OyBALhH.mjs → platform-lifecycle-Dm09JNkn.mjs} +4404 -3297
- package/dist/{platform-management-CjwLVQwN.mjs → platform-management-BSEc_ZeG.mjs} +48 -11
- package/dist/platform-management-Bp6aoH2C.mjs +2 -0
- package/dist/{platform-plans-config-BNGKGr4P.mjs → platform-plans-config-B0pOVQyW.mjs} +3 -3
- package/dist/{platform-recovery-D6KSpuFm.mjs → platform-recovery-WOZ95Uze.mjs} +4 -4
- package/dist/{platform-registry-QBa4DK32.mjs → platform-registry-KfNEF84O.mjs} +3 -3
- package/dist/{prepare-B5Mkic5u.mjs → prepare-39EvOhI6.mjs} +2 -4
- package/dist/prepare-CnjcTV2s.mjs +2 -0
- package/dist/{prepare-DOsL0CC9.mjs → prepare-DnaKBi--.mjs} +1 -1
- package/dist/{project-C0Fqu05O.mjs → project-BkbfDs0V.mjs} +15 -82
- package/dist/project-IOjBU8R6.mjs +2 -0
- package/dist/{project-cmd-CNzrqvBv.mjs → project-cmd-Bs5A392E.mjs} +21 -22
- package/dist/{project-team-DQOWPfQT.mjs → project-team-ohAWWaew.mjs} +8 -9
- package/dist/{project-token-CTDYU0Cc.mjs → project-token-CP01Jna6.mjs} +6 -9
- package/dist/{project-zero-trust-BNAkW-_0.mjs → project-zero-trust-BzkVgx35.mjs} +5 -6
- package/dist/prompts-6OSVA7DJ.mjs +2087 -0
- package/dist/prompts-ZAuJlyCj.mjs +2 -0
- package/dist/{provision-C4ORE7G7.mjs → provision-BEv0k-qz.mjs} +1 -1
- package/dist/{provision-CJFgTZY8.mjs → provision-Btj1jppf.mjs} +5 -7
- package/dist/{requests-MhxYnau8.mjs → requests-B3PBuGlX.mjs} +5 -6
- package/dist/{rollback-CJ6iSDoU.mjs → rollback-DDub9GsO.mjs} +9 -10
- package/dist/runtime/ai.mjs +3 -5
- package/dist/runtime/email/testing.mjs +2 -2
- package/dist/runtime/email.mjs +36 -18
- package/dist/runtime/remote/index.mjs +2 -2
- package/dist/runtime/routing.mjs +1 -1
- package/dist/{secret-Dli5fP0B.mjs → secret-3c72lY1U.mjs} +15 -16
- package/dist/{skills-D1II1Juz.mjs → skills-BPQUGClu.mjs} +1 -1
- package/dist/{subcommand-prompt-CY1C4fvl.mjs → subcommand-prompt-Dhom39bd.mjs} +40 -32
- package/dist/sveltekit.d.mts +1 -1
- package/dist/sveltekit.mjs +4 -9
- package/dist/{wrangler-7K-bW_DL.mjs → wrangler-DhUerFkW.mjs} +10 -15
- package/package.json +22 -23
- package/sandbox.Dockerfile +1 -1
- package/skills/void/SKILL.md +6 -1
- package/skills/void/docs/guide/ai.md +24 -86
- package/skills/void/docs/guide/auth.md +0 -2
- package/skills/void/docs/guide/database/d1.md +7 -7
- package/skills/void/docs/guide/deployment.md +58 -102
- package/skills/void/docs/guide/edge/headers.md +1 -1
- package/skills/void/docs/guide/email/domains.md +5 -1
- package/skills/void/docs/guide/email/sending.md +1 -1
- 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/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 +24 -9
- package/skills/void/docs/guide/platform/development/schema-ci.md +7 -1
- package/skills/void/docs/guide/platform/installation/ci.md +1 -1
- package/skills/void/docs/guide/platform/installation/credentials.md +10 -3
- package/skills/void/docs/guide/platform/installation/domains.md +8 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +2 -2
- package/skills/void/docs/guide/platform/installation/maintenance.md +37 -5
- package/skills/void/docs/guide/platform/installation/prerequisites.md +87 -14
- package/skills/void/docs/guide/platform/installation/setup.md +80 -10
- package/skills/void/docs/guide/quickstart.md +37 -80
- package/skills/void/docs/guide/remote-dev.md +1 -1
- package/skills/void/docs/guide/sandboxes.md +36 -46
- 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 +27 -0
- package/skills/void/docs/reference/api.md +1 -1
- package/skills/void/docs/reference/cli/auth.md +4 -3
- package/skills/void/docs/reference/cli/database.md +1 -1
- package/skills/void/docs/reference/cli/deploy.md +21 -1
- package/skills/void/docs/reference/cli/platform-installation.md +42 -27
- package/skills/void/docs/reference/cli/platform-operations.md +4 -8
- package/skills/void/docs/reference/cli/platform-zero-trust.md +14 -0
- package/skills/void/docs/reference/cli/platform.md +5 -0
- package/skills/void/docs/reference/config.md +1 -1
- package/skills/void/docs/reference/resource-inference.md +11 -8
- package/dist/auth-CCjt0hcq.mjs +0 -2
- package/dist/cf-build-output-_0HNWysu.mjs +0 -2
- package/dist/client-Cu7jWiF1.mjs +0 -2
- package/dist/deploy-bjXdFCtn.mjs +0 -2
- package/dist/dist-BuDuKZJv.mjs +0 -2
- package/dist/dist-CTBk70IR.mjs +0 -1310
- package/dist/gen-BVaUUumi.mjs +0 -2
- package/dist/help-DofyZuY7.mjs +0 -2
- package/dist/log-ChfPKsVd.mjs +0 -26
- package/dist/login-DYt_An22.mjs +0 -2
- package/dist/migrate-8_2u55MD.mjs +0 -2
- package/dist/platform-args-D3RXyR6h.mjs +0 -2
- package/dist/platform-management-CnyTdcWX.mjs +0 -2
- package/dist/prepare-cgvDMtSb.mjs +0 -2
- package/dist/project-BuUwfj6f.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/gen-BVaUUumi.mjs
DELETED
package/dist/help-DofyZuY7.mjs
DELETED
package/dist/log-ChfPKsVd.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//#region src/log.ts
|
|
2
|
-
const tag = "\x1B[1m\x1B[35m[void]\x1B[39m\x1B[22m";
|
|
3
|
-
const timeFormat = new Intl.DateTimeFormat(void 0, {
|
|
4
|
-
hour: "numeric",
|
|
5
|
-
minute: "numeric",
|
|
6
|
-
second: "numeric"
|
|
7
|
-
});
|
|
8
|
-
let showTimestamp = true;
|
|
9
|
-
function setShowTimestamp(value) {
|
|
10
|
-
showTimestamp = value;
|
|
11
|
-
}
|
|
12
|
-
function prefix() {
|
|
13
|
-
if (!showTimestamp) return tag;
|
|
14
|
-
return `\x1b[2m${timeFormat.format()}\x1b[22m ${tag}`;
|
|
15
|
-
}
|
|
16
|
-
function voidLog(msg) {
|
|
17
|
-
console.log(`${prefix()} ${msg}`);
|
|
18
|
-
}
|
|
19
|
-
function voidWarn(msg) {
|
|
20
|
-
console.log(`${prefix()} \x1b[33m${msg}\x1b[39m`);
|
|
21
|
-
}
|
|
22
|
-
function voidError(msg) {
|
|
23
|
-
console.log(`${prefix()} \x1b[31m${msg}\x1b[39m`);
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { voidWarn as i, voidError as n, voidLog as r, setShowTimestamp as t };
|
package/dist/login-DYt_An22.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { c as selectAuthoritativePlatformManifest, s as runInstalledPlatformCommand, u as verifyPlatformInstallationOwnership } from "./platform-management-CjwLVQwN.mjs";
|
|
2
|
-
export { runInstalledPlatformCommand, selectAuthoritativePlatformManifest, verifyPlatformInstallationOwnership };
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# Environment migration
|
|
2
|
-
|
|
3
|
-
Use `.env` for local development and remote secrets for server-side production values.
|
|
4
|
-
|
|
5
|
-
## 1. Back up and consolidate values
|
|
6
|
-
|
|
7
|
-
Before changing any dotenv files, securely back up the production values you need to migrate outside the project directory. Keep them out of Git. Do not delete the original files until the upload and verification in step 3 succeed.
|
|
8
|
-
|
|
9
|
-
Merge the values you still need locally into `.env`:
|
|
10
|
-
|
|
11
|
-
```text
|
|
12
|
-
.env.local
|
|
13
|
-
.env.development
|
|
14
|
-
.env.development.local
|
|
15
|
-
→ .env
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Keep the legacy files for now. You will remove them in step 5, after migrating their values.
|
|
19
|
-
|
|
20
|
-
Ensure `.env` is ignored by Git:
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
.env
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## 2. Update `env.ts`
|
|
27
|
-
|
|
28
|
-
Remove `.secret()` and `.public()` from `env.ts` before running secret commands.
|
|
29
|
-
|
|
30
|
-
Change:
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
export default defineEnv({
|
|
34
|
-
STRIPE_KEY: string().secret(),
|
|
35
|
-
VITE_API_ORIGIN: url().public(),
|
|
36
|
-
});
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
to:
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
export default defineEnv({
|
|
43
|
-
STRIPE_KEY: string(),
|
|
44
|
-
VITE_API_ORIGIN: url(),
|
|
45
|
-
});
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Server keys have no `VITE_` prefix; client keys do.
|
|
49
|
-
|
|
50
|
-
## 3. Upload server secrets
|
|
51
|
-
|
|
52
|
-
For managed Void projects, upload each non-client schema key:
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
void secret put DATABASE_URL
|
|
56
|
-
void secret put STRIPE_KEY
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
To migrate a production file in one pass, prepare a copy outside the project directory containing only server keys declared in `env.ts`, then upload it:
|
|
60
|
-
|
|
61
|
-
```sh
|
|
62
|
-
void secret sync /secure/path/production-secrets.txt
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The sync command validates every entry against `env.ts`. It rejects undeclared names, invalid values, and client-prefixed names. Keep client-prefixed values for step 4 instead of including them in this file.
|
|
66
|
-
|
|
67
|
-
For direct Cloudflare deployments, select Cloudflare and use the same commands:
|
|
68
|
-
|
|
69
|
-
```sh
|
|
70
|
-
void connect --platform cloudflare
|
|
71
|
-
void secret put DATABASE_URL
|
|
72
|
-
void secret put STRIPE_KEY
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
After the upload succeeds, confirm that all expected server names appear in the remote store:
|
|
76
|
-
|
|
77
|
-
```sh
|
|
78
|
-
void secret list
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
If an upload fails or a name is missing, keep the source values and retry before continuing.
|
|
82
|
-
|
|
83
|
-
For direct Cloudflare deployments, remove the migrated server keys from `cloudflare.vars` in `void.config.ts` after confirming the upload. Void now treats any schema-declared server key in Worker `vars` as an error.
|
|
84
|
-
|
|
85
|
-
## 4. Set client build values
|
|
86
|
-
|
|
87
|
-
Move `VITE_*` production values to CI/build-shell variables, or make the value an explicit schema default:
|
|
88
|
-
|
|
89
|
-
```sh
|
|
90
|
-
export VITE_API_ORIGIN=https://api.example.com
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Keep these variables set for the remote check and deployment in step 5. Client values are compiled into browser assets and are public.
|
|
94
|
-
|
|
95
|
-
These values are also available during server rendering. Do not upload them as remote secrets.
|
|
96
|
-
|
|
97
|
-
## 5. Remove old files and verify
|
|
98
|
-
|
|
99
|
-
Once the local values are in `.env`, the server values are uploaded and listed remotely, and the client values are available to the build, delete every `.env.*` file, `.env.example`, and `.dev.vars*` file from the project. Keep the secure backup until verification succeeds. Environment checks and deployment reject these old files.
|
|
100
|
-
|
|
101
|
-
Use `env.ts` as the checked-in list of names, types, defaults, and requiredness. `void env example` is no longer supported.
|
|
102
|
-
|
|
103
|
-
Then verify:
|
|
104
|
-
|
|
105
|
-
```sh
|
|
106
|
-
void env check
|
|
107
|
-
void env check --remote
|
|
108
|
-
void deploy
|
|
109
|
-
```
|
|
@@ -3,8 +3,8 @@ import { copyFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync,
|
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
|
-
import { spawn, spawnSync } from "node:child_process";
|
|
7
6
|
import { isDeepStrictEqual } from "node:util";
|
|
7
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
8
8
|
import { getWorkerBundleDir, normalizeDirectoryName, readBuildOutput, writeAssets, writeContainerConfig, writeRootConfig, writeWorkerConfig } from "@cloudflare/build-output-utils";
|
|
9
9
|
import { InputConfigSchema, OutputContainerSchema } from "@cloudflare/config";
|
|
10
10
|
import ignore from "ignore";
|