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
package/README.md
CHANGED
|
@@ -1,124 +1,37 @@
|
|
|
1
1
|
# void
|
|
2
2
|
|
|
3
|
-
Vite
|
|
3
|
+
Build and deploy full-stack Vite apps on Cloudflare Workers. Void provides server routes, server-rendered pages, and typed access to databases, storage, and AI.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
`void platform auth login`, then manage users, signup access, projects, and logs.
|
|
7
|
-
Commands show a preview before applying changes and support `--json` for scripts.
|
|
8
|
-
See [Platform Administration](../../docs/guide/platform-administration.md) for a
|
|
9
|
-
walkthrough and the [CLI reference](../../docs/reference/cli/platform.md#operator-commands)
|
|
10
|
-
for every command.
|
|
5
|
+
## Getting Started
|
|
11
6
|
|
|
12
|
-
Use
|
|
13
|
-
Use `void platform config plans` to manage account plans, enforced limits, and the default for new accounts. See [Plans and Limits](../../docs/guide/platform/administration/plans.md).
|
|
14
|
-
Cloudflare Access protection has separate create/connect controls. Users can
|
|
15
|
-
link another enabled login to their account with `void account link`.
|
|
7
|
+
Use Node.js 24.21.0 or later. In an empty directory, run:
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- file-based API routes from `routes/`
|
|
20
|
-
- Pages mode from `pages/`
|
|
21
|
-
- typed Drizzle access via `void/db`
|
|
22
|
-
- `crons/` and `queues/`
|
|
23
|
-
- URL redirects, rewrites, and fallbacks (`void.config.ts` / `public/_redirects`, plus `c.rewrite()` from middleware)
|
|
24
|
-
- binding inference for D1, KV, R2, AI, auth, queues, and typed Durable Objects
|
|
25
|
-
- remote bindings for local development
|
|
26
|
-
- one target-aware deploy path for Void-hosted and direct Cloudflare apps
|
|
27
|
-
- automatic Cloudflare provisioning, verified Worker Version activation, and operational commands
|
|
28
|
-
|
|
29
|
-
## Quick Start
|
|
30
|
-
|
|
31
|
-
Install the Void CLI:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
9
|
+
```sh
|
|
34
10
|
npm install -D void
|
|
11
|
+
npx void init
|
|
12
|
+
npm run dev
|
|
35
13
|
```
|
|
36
14
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Init offers to initialize Git and suggests an optional initial commit command. Use `--git` or `--no-git` to choose without the Git prompt. Existing repositories are preserved; Void does not commit automatically.
|
|
40
|
-
|
|
41
|
-
To install a team platform, use `void platform install`. A domain is recommended; the visible workers.dev testing option is also available as `--workers-dev`. Add a domain later with `void platform domain set example.com`, preserving projects, deployments, and API connections. See the [platform setup guide](../../docs/guide/self-hosted-platform.md).
|
|
15
|
+
Choose a UI framework, starter, and deployment target. Then deploy:
|
|
42
16
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Then run `npx void init`. In an empty directory, the full interactive flow can scaffold a starter and configure local project files. It then asks where to deploy: Cloudflare (the default) writes `void.config.ts`, handles secure browser sign-in through Void's bundled tooling, and saves the selected account; Void asks for the API URL of an explicitly connected company platform (`void connect <url>` or `void platform install`). Existing `void.json` and root Wrangler JSON/JSONC files are migrated automatically; commit `void.config.ts` and `void.lock.json` when created. Back up `~/.void/platforms/` after installing a company platform because its owner-only recovery material contains runtime keys that Cloudflare cannot return. The next app step is just `npx void deploy`. Auth-enabled deploys preserve an existing `BETTER_AUTH_SECRET` or create a persistent encrypted secret when missing on either platform. Root `.env` is local-only; production server keys declared in `env.ts` use encrypted remote secret storage and are rejected as plaintext Worker vars. In an existing app, init configures Void in place by adding missing Vite scripts and creating or patching `vite.config.*` with `voidPlugin()`.
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
// vite.config.ts
|
|
49
|
-
import { defineConfig } from 'vite';
|
|
50
|
-
import { voidPlugin } from 'void';
|
|
51
|
-
|
|
52
|
-
export default defineConfig({
|
|
53
|
-
plugins: [voidPlugin()],
|
|
54
|
-
});
|
|
17
|
+
```sh
|
|
18
|
+
npx void deploy
|
|
55
19
|
```
|
|
56
20
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- `voidPlugin()` — Vite integration, routing, pages mode, codegen, migrations, packaging
|
|
60
|
-
- `void prepare` — generate `.void` artifacts for CI, editors, and fresh clones
|
|
61
|
-
- `void info [--json]` — discover persistent resource names before moving definitions
|
|
62
|
-
- `void auth login` — sign in to the project's saved Cloudflare or Void destination
|
|
63
|
-
- `void account login` — platform auth
|
|
64
|
-
- `void connect [url]` — choose Cloudflare or a Void platform, sign in, and save the deployment destination
|
|
65
|
-
- `void platform *` — list, select, inspect, install, recover, repair, upgrade, disable, and safely uninstall a company platform
|
|
66
|
-
- `void deploy` — build and deploy to the saved Cloudflare or Void target
|
|
67
|
-
- `void db *` — local DB and migration commands
|
|
68
|
-
- `void project *` — target-aware status, logs, rollback, managed-project operations, and scoped CI deploy credentials
|
|
69
|
-
- `void secret *` / `void domain *` — target-aware Worker secrets and custom domains
|
|
70
|
-
|
|
71
|
-
Runtime helpers include:
|
|
21
|
+
Void builds your app, provisions its resources, applies migrations, and prints the deployed URL.
|
|
72
22
|
|
|
73
|
-
|
|
74
|
-
- `defineMiddleware`
|
|
75
|
-
- `basicAuth`
|
|
76
|
-
- `defineScheduled`
|
|
77
|
-
- `defineQueue`
|
|
78
|
-
- `void/db`
|
|
79
|
-
- `void/kv`
|
|
80
|
-
- `void/storage`
|
|
81
|
-
- `void/durable`
|
|
82
|
-
- `void/ai`
|
|
83
|
-
- `void/isr`
|
|
84
|
-
- `void/client`
|
|
85
|
-
- `void/auth`
|
|
86
|
-
|
|
87
|
-
## Supported App Shapes
|
|
88
|
-
|
|
89
|
-
- native Void apps (`routes/`, `pages/`, `middleware/`, `crons/`, `queues/`)
|
|
90
|
-
- supported meta-framework deploy targets:
|
|
91
|
-
- TanStack Start
|
|
92
|
-
- React Router
|
|
93
|
-
- vinext App Router and Pages Router
|
|
94
|
-
- SvelteKit
|
|
95
|
-
- Nuxt
|
|
96
|
-
- Analog
|
|
97
|
-
- Astro
|
|
98
|
-
- static and SPA deploys
|
|
99
|
-
- non-Cloudflare server targets (`node`, `bun`, `deno`)
|
|
100
|
-
|
|
101
|
-
Direct Cloudflare deployments also support D1, KV, R2, Queues, Hyperdrive, auth, cron jobs, AI, ISR, typed SQLite Durable Objects, and WebSocket rooms. They upload an immutable Worker Version, probe it before activation (using a 0%-traffic version override when Durable Objects disable preview URLs), and retain version metadata for migration-aware rollback.
|
|
102
|
-
|
|
103
|
-
Durable State and WebSocket definitions accept optional `name` to preserve their resource identity when files move. Run `void info` and pin the displayed name before moving deployed code. See [Durable State](../../docs/guide/durable-state.md#rename-a-file-while-keeping-its-state) and [WebSockets](../../docs/guide/websockets.md#move-a-route-while-keeping-its-state), including how to preserve room instances when renaming route parameters.
|
|
104
|
-
|
|
105
|
-
Self-hosted platform upgrades verify every packaged PostgreSQL migration and require the live Drizzle history to be an exact prefix. Pending SQL is allowed only for an explicitly attested old-version/schema compatibility edge, runs in one transaction, and leaves the old Worker version authoritative until the target runtime passes discovery and health checks.
|
|
106
|
-
|
|
107
|
-
An upgrade that changes the authenticated usage protocol briefly gates application traffic while it verifies the complete Worker set. An interruption leaves the gate closed for the next resumable upgrade instead of enabling an unsigned compatibility path.
|
|
108
|
-
|
|
109
|
-
## Database Model
|
|
110
|
-
|
|
111
|
-
`void/db` is Drizzle-first.
|
|
112
|
-
|
|
113
|
-
- D1 is the default managed database target; development and local database commands share the configured binding ID and persistence directory
|
|
114
|
-
- apps can opt into PostgreSQL or MySQL mode
|
|
115
|
-
- route types, DB types, and queue types are generated into `.void/*.d.ts`
|
|
116
|
-
|
|
117
|
-
Node.js, Bun, and Deno Pages builds include production hydration assets. Deploy `dist/ssr` together with `dist/client`; the server loads its manifest and assets relative to the emitted module.
|
|
23
|
+
Follow the [Quickstart](https://void.cloud/guide/quickstart) for your first app or to add Void to an existing project.
|
|
118
24
|
|
|
119
25
|
## Documentation
|
|
120
26
|
|
|
121
|
-
|
|
27
|
+
- [Introduction](https://void.cloud/guide/)
|
|
28
|
+
- [Server routing](https://void.cloud/guide/server-routing) and [Pages routing](https://void.cloud/guide/pages-routing/overview)
|
|
29
|
+
- [Database](https://void.cloud/guide/database) and [type safety](https://void.cloud/guide/type-safety)
|
|
30
|
+
- [Deployment](https://void.cloud/guide/deployment)
|
|
31
|
+
- [Framework integrations](https://void.cloud/integrations/frameworks/overview)
|
|
32
|
+
- [API](https://void.cloud/reference/api) and [CLI](https://void.cloud/reference/cli) reference
|
|
33
|
+
|
|
34
|
+
To share a deployment platform with your team, see [Install a Void Platform](https://void.cloud/guide/self-hosted-platform).
|
|
122
35
|
|
|
123
36
|
## License
|
|
124
37
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as getToken, f as removeToken } from "./auth-
|
|
2
|
-
import { L as log } from "./prompts-
|
|
3
|
-
import {
|
|
4
|
-
import { n as runLoginCommand } from "./login-
|
|
1
|
+
import { c as getToken, f as removeToken } from "./auth-D52yG7hl.mjs";
|
|
2
|
+
import { L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
4
|
+
import { n as runLoginCommand } from "./login-DFuo-RWO.mjs";
|
|
5
5
|
import { execSync } from "node:child_process";
|
|
6
6
|
//#region src/cli/account-cmd.ts
|
|
7
7
|
async function runAccountCommand(root, args) {
|
|
8
8
|
switch (args.subcommand) {
|
|
9
9
|
case "login": return runLoginCommand(root);
|
|
10
|
-
case "link": return import("./auth-link-
|
|
10
|
+
case "link": return import("./auth-link-DjeOptYi.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
11
11
|
case "logout":
|
|
12
12
|
if (removeToken(root)) log.success("Logged out.");
|
|
13
13
|
else log.info("Not logged in.");
|
|
@@ -9,7 +9,7 @@ import { a as staticLiteral, i as staticExportInitializers, n as parseRouteFilen
|
|
|
9
9
|
import { n as resourceNameWords } from "./resource-name-C7LVpcRm.mjs";
|
|
10
10
|
import { t as collectMigrations } from "./collect-DiTn9yr6.mjs";
|
|
11
11
|
import { a as scanEmailHandlersSync, i as scanEmailHandlers, r as hasEmailHandlers } from "./email--tEtMoj_.mjs";
|
|
12
|
-
import { t as scanPages } from "./scan-
|
|
12
|
+
import { t as scanPages } from "./scan-C8dA7iM4.mjs";
|
|
13
13
|
import { o as isSandboxEnabled } from "./config-C_XRIPx2.mjs";
|
|
14
14
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
15
15
|
import { parseSync } from "vite";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-
|
|
1
|
+
import { n as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-DC2yPvzY.mjs";
|
|
2
2
|
//#region src/application-routing.ts
|
|
3
3
|
/** Complete route/page analysis using the same resource and handler inventories. */
|
|
4
4
|
async function completeApplicationAnalysis(analysis) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getApiUrl, m as runPlatformLogin, s as getSiteDomain } from "./auth-
|
|
1
|
+
import { a as getApiUrl, m as runPlatformLogin, s as getSiteDomain } from "./auth-D52yG7hl.mjs";
|
|
2
2
|
export { getApiUrl, getSiteDomain, runPlatformLogin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join } from "./dist-BVqXeR_h.mjs";
|
|
2
|
+
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, s as listPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-P387v42A.mjs";
|
|
3
|
+
import { i as readProjectPlatformUrl, r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
4
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as ensureCloudflaredToken } from "./cf-access-BGe5sWXF.mjs";
|
|
5
|
-
import { i as readProjectPlatformUrl, r as readProjectConfig } from "./project-DKG5Ra8p.mjs";
|
|
5
|
+
import { t as ensureCloudflaredToken } from "./cf-access-YTlqvAsk.mjs";
|
|
6
6
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { createHash, randomBytes } from "node:crypto";
|
|
8
8
|
import { homedir } from "node:os";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as getApiUrl, c as getToken, h as savePlatformToken, m as runPlatformLogin, u as openBrowser } from "./auth-
|
|
2
|
-
import { L as log } from "./prompts-
|
|
3
|
-
import {
|
|
4
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
5
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
1
|
+
import { a as getApiUrl, c as getToken, h as savePlatformToken, m as runPlatformLogin, u as openBrowser } from "./auth-D52yG7hl.mjs";
|
|
2
|
+
import { L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
4
|
+
import { r as selectPlatformLoginMethod } from "./login-DFuo-RWO.mjs";
|
|
5
|
+
import { t as discoverPlatform } from "./platform-cmd-DbKtQb_4.mjs";
|
|
6
6
|
import { execFile } from "node:child_process";
|
|
7
7
|
//#region src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
@@ -13,7 +13,6 @@ async function runAuthLink(root, connectionId) {
|
|
|
13
13
|
if (!platform.authentication) throw new Error("auth: This platform must be upgraded before linking login methods.");
|
|
14
14
|
const target = await selectPlatformLoginMethod(platform, connectionId);
|
|
15
15
|
const existing = await new PlatformClient(token, apiUrl).whoami();
|
|
16
|
-
if (!existing.id) throw new Error("auth: This platform does not support account linking.");
|
|
17
16
|
log.info(`Sign in again to ${existing.login} using an already linked login method.`);
|
|
18
17
|
const source = await selectPlatformLoginMethod(platform);
|
|
19
18
|
const freshToken = await runPlatformLogin(apiUrl, source.id, (url) => log.info(`Sign in: ${url}`));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as readDeploymentPlatform } from "./project-
|
|
3
|
-
import { K as select, tt as isCancel } from "./prompts-
|
|
1
|
+
import { s as listPlatformConnections } from "./platform-registry-P387v42A.mjs";
|
|
2
|
+
import { n as readDeploymentPlatform } from "./project-DQstYTxO.mjs";
|
|
3
|
+
import { K as select, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
4
4
|
//#region src/cli/auth-router.ts
|
|
5
5
|
async function chooseDestination(root, args, interactive) {
|
|
6
6
|
const saved = readDeploymentPlatform(root);
|
|
@@ -37,7 +37,7 @@ async function chooseDestination(root, args, interactive) {
|
|
|
37
37
|
}
|
|
38
38
|
async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
|
|
39
39
|
if (args.subcommand === "link") {
|
|
40
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
40
|
+
const { runAccountCommand } = await import("./account-cmd-CDry3B5V.mjs");
|
|
41
41
|
await runAccountCommand(root, {
|
|
42
42
|
subcommand: "link",
|
|
43
43
|
...args.connectionId ? { connectionId: args.connectionId } : {}
|
|
@@ -45,17 +45,17 @@ async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isT
|
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
if (args.subcommand === "token") {
|
|
48
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
48
|
+
const { runAccountCommand } = await import("./account-cmd-CDry3B5V.mjs");
|
|
49
49
|
await runAccountCommand(root, { subcommand: "token" });
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
const destination = await chooseDestination(root, args, interactive);
|
|
53
53
|
if (destination.platform === "cloudflare") {
|
|
54
|
-
const { runCloudflareCommand } = await import("./cloudflare-cmd-
|
|
54
|
+
const { runCloudflareCommand } = await import("./cloudflare-cmd-bhwCxAN6.mjs");
|
|
55
55
|
await runCloudflareCommand(root, { subcommand: args.subcommand === "whoami" || args.subcommand === "status" ? "status" : args.subcommand });
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
58
|
+
const { runAccountCommand } = await import("./account-cmd-CDry3B5V.mjs");
|
|
59
59
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
60
60
|
if (!destination.apiUrl) {
|
|
61
61
|
await runAccountCommand(root, { subcommand });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { H as outro, L as log
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { c as import_picocolors, i as dim } from "./output-BvdaehtE.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
//#region src/cli/build-cmd.ts
|
|
@@ -10,7 +10,7 @@ const POLL_MS = 1e3;
|
|
|
10
10
|
const BUILD_LOG_DRAIN_TIMEOUT_MS = 12e4;
|
|
11
11
|
function isBuildLogComplete(page) {
|
|
12
12
|
if (!page.terminal) return false;
|
|
13
|
-
if (page.logsComplete === null
|
|
13
|
+
if (page.logsComplete === null) throw new Error("This platform cannot confirm that the final build logs were captured. Ask its administrator to upgrade the platform runtime, or read the retained logs without --follow.");
|
|
14
14
|
return page.logsComplete === true;
|
|
15
15
|
}
|
|
16
16
|
function sleep(ms) {
|
|
@@ -74,7 +74,6 @@ async function runBuildCommand(root, args) {
|
|
|
74
74
|
}
|
|
75
75
|
async function runBuildLogsCommand(root, args) {
|
|
76
76
|
console.log();
|
|
77
|
-
intro(cliTitle("build logs"));
|
|
78
77
|
const token = getToken(root);
|
|
79
78
|
if (!token) {
|
|
80
79
|
log.error("Not logged in. Run `void account login` first.");
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { H as outro, L as log
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { H as outro, L as log } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
5
|
+
import { i as dim, o as formatCount, r as createSpinner } from "./output-BvdaehtE.mjs";
|
|
6
6
|
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-BG5ORGID.mjs";
|
|
7
7
|
//#region src/cli/cache.ts
|
|
8
8
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
9
9
|
console.log();
|
|
10
|
-
intro(cliTitle("project purge-cache"));
|
|
11
10
|
const token = getToken(root);
|
|
12
11
|
if (!token) {
|
|
13
12
|
log.error("Not logged in. Run `void account login` first.");
|
|
@@ -39,7 +38,7 @@ async function runPurgeCacheCommand(root, projectSlug) {
|
|
|
39
38
|
try {
|
|
40
39
|
const result = await client.purgeCache(projectId);
|
|
41
40
|
s.stop("Cache purged.");
|
|
42
|
-
log.success(`Purged ${result.purged
|
|
41
|
+
log.success(`Purged ${formatCount(result.purged, "cached page")}.`);
|
|
43
42
|
} catch (err) {
|
|
44
43
|
s.stop("Cache purge failed.");
|
|
45
44
|
log.error(err instanceof Error ? err.message : String(err));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { r as readProjectConfig } from "./project-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { A as confirm, H as outro, L as log,
|
|
4
|
-
import {
|
|
5
|
-
import { r as cliTitle } from "./output-CbM85T4k.mjs";
|
|
1
|
+
import { r as readProjectConfig } from "./project-DQstYTxO.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-D52yG7hl.mjs";
|
|
3
|
+
import { A as confirm, H as outro, L as log, tt as isCancel } from "./prompts-6OSVA7DJ.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-mC-dFGDD.mjs";
|
|
6
5
|
//#region src/cli/cancel-deploy.ts
|
|
7
6
|
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
8
7
|
"pending",
|
|
@@ -12,7 +11,6 @@ const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
|
12
11
|
]);
|
|
13
12
|
async function runCancelDeployCommand(root, deployId) {
|
|
14
13
|
console.log();
|
|
15
|
-
intro(cliTitle("project cancel"));
|
|
16
14
|
const token = getToken(root);
|
|
17
15
|
if (!token) {
|
|
18
16
|
log.error("Not logged in. Run `void account login` first.");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { T as writeKeyringPassword, c as normalizePlatformApiUrl, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-P387v42A.mjs";
|
|
1
2
|
import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
|
|
2
|
-
import { C as writeKeyringPassword, S as readKeyringPassword, c as platformCredentialAccount, s as normalizePlatformApiUrl } from "./platform-registry-DkPPXfp_.mjs";
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
4
|
//#region src/cli/cf-access.ts
|
|
5
5
|
const ACCESS_KEYRING_SERVICE = "dev.void.cli.access";
|
package/dist/cli/cli.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as join } from "../dist-BVqXeR_h.mjs";
|
|
3
|
-
import { L as log } from "../prompts-
|
|
3
|
+
import { L as log } from "../prompts-6OSVA7DJ.mjs";
|
|
4
4
|
import { n as getPackageDir } from "../agents-B_pX_HmQ.mjs";
|
|
5
5
|
import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0QoNQ.mjs";
|
|
6
|
-
import { c as import_picocolors } from "../output-
|
|
7
|
-
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-
|
|
8
|
-
import { r as OperatorClientError } from "../operator-client-
|
|
9
|
-
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-
|
|
6
|
+
import { c as import_picocolors } from "../output-BvdaehtE.mjs";
|
|
7
|
+
import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-Bv44e2tm.mjs";
|
|
8
|
+
import { r as OperatorClientError } from "../operator-client-BFqpp6z0.mjs";
|
|
9
|
+
import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-DSV2p4nY.mjs";
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
12
12
|
//#region src/cli/account-args.ts
|
|
@@ -1613,7 +1613,7 @@ async function runSubcommandGroup(command, subcommands, parse, run) {
|
|
|
1613
1613
|
const hasNamedSubcommand = args.slice(1).some((arg) => subcommands.some(({ name }) => name === arg));
|
|
1614
1614
|
try {
|
|
1615
1615
|
if ((!sub || sub.startsWith("-") && !hasNamedSubcommand) && process.stdin.isTTY) {
|
|
1616
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1616
|
+
const { promptSubcommand } = await import("../subcommand-prompt-B6WS9Aoz.mjs");
|
|
1617
1617
|
if (command === "platform" && !sub) log.info("A Void platform lets a team deploy Void apps to a shared Cloudflare account.\nThis command sets up and manages platforms. Join with `void connect <url>`.\nDocs: https://void.cloud/guide/self-hosted-platform");
|
|
1618
1618
|
const result = await promptSubcommand(command, subcommands);
|
|
1619
1619
|
if (!result) process.exit(0);
|
|
@@ -1655,7 +1655,7 @@ if (helpPath) {
|
|
|
1655
1655
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1656
1656
|
process.exit(1);
|
|
1657
1657
|
}
|
|
1658
|
-
import("../deploy-
|
|
1658
|
+
import("../deploy-qmiLE1G1.mjs").then(({ runDeploy }) => {
|
|
1659
1659
|
runDeploy(root, {
|
|
1660
1660
|
projectSlug: deployArgs.projectSlug,
|
|
1661
1661
|
dir: deployArgs.dir,
|
|
@@ -1673,26 +1673,26 @@ if (helpPath) {
|
|
|
1673
1673
|
});
|
|
1674
1674
|
} else if (command === "connect") (async () => {
|
|
1675
1675
|
const parsed = parseConnectArgs(args.slice(1));
|
|
1676
|
-
const { runConnectCommand } = await import("../connect-
|
|
1676
|
+
const { runConnectCommand } = await import("../connect-H6EvP62X.mjs");
|
|
1677
1677
|
await runConnectCommand(process.cwd(), parsed);
|
|
1678
1678
|
})().catch((err) => {
|
|
1679
1679
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1680
1680
|
process.exit(1);
|
|
1681
1681
|
});
|
|
1682
|
-
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-
|
|
1683
|
-
else if (command === "account") runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-
|
|
1684
|
-
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-
|
|
1685
|
-
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-
|
|
1686
|
-
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-
|
|
1687
|
-
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-
|
|
1688
|
-
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-
|
|
1689
|
-
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-
|
|
1690
|
-
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-
|
|
1691
|
-
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-
|
|
1692
|
-
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-
|
|
1693
|
-
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-
|
|
1694
|
-
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-
|
|
1695
|
-
else if (command === "info") import("../info-
|
|
1682
|
+
else if (command === "auth") runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-BRxIuqDi.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed)));
|
|
1683
|
+
else if (command === "account") runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-CDry3B5V.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed)));
|
|
1684
|
+
else if (command === "platform") runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-dyFUof0t.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed)));
|
|
1685
|
+
else if (command === "cloudflare") runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-bhwCxAN6.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed)));
|
|
1686
|
+
else if (command === "project") runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-BbH2LptN.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed)));
|
|
1687
|
+
else if (command === "secret") runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-AKnNXNP5.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed)));
|
|
1688
|
+
else if (command === "domain") runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-B_9VgOm6.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed)));
|
|
1689
|
+
else if (command === "email") runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-BokHgjKj.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed)));
|
|
1690
|
+
else if (command === "db") runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DpCKZto0.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed)));
|
|
1691
|
+
else if (command === "env") runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-BdTc-K2L.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed)));
|
|
1692
|
+
else if (command === "gen") runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-qCBwH3fZ.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed)));
|
|
1693
|
+
else if (command === "github") runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-hhkTzlGS.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed)));
|
|
1694
|
+
else if (command === "build") runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-Ce3C8huo.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)));
|
|
1695
|
+
else if (command === "info") import("../info-DhtTKh65.mjs").then(async ({ runInfoCommand }) => {
|
|
1696
1696
|
try {
|
|
1697
1697
|
await runInfoCommand(process.cwd(), parseInfoArgs(args.slice(1)));
|
|
1698
1698
|
} catch (err) {
|
|
@@ -1714,7 +1714,7 @@ else if (command === "prepare") {
|
|
|
1714
1714
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1715
1715
|
process.exit(1);
|
|
1716
1716
|
}
|
|
1717
|
-
import("../prepare-
|
|
1717
|
+
import("../prepare-BMrRWLwP.mjs").then(({ runPrepareCommand }) => {
|
|
1718
1718
|
runPrepareCommand(root, prepareArgs).catch((err) => {
|
|
1719
1719
|
log.error(formatCloudflareUserMessage(err.message ?? String(err)));
|
|
1720
1720
|
process.exit(1);
|
|
@@ -1722,7 +1722,7 @@ else if (command === "prepare") {
|
|
|
1722
1722
|
});
|
|
1723
1723
|
} else if (command === "init") {
|
|
1724
1724
|
const root = process.cwd();
|
|
1725
|
-
import("../init-
|
|
1725
|
+
import("../init-BMf4T03q.mjs").then(({ runInitCommand, parseInitArgs }) => {
|
|
1726
1726
|
let initArgs;
|
|
1727
1727
|
try {
|
|
1728
1728
|
initArgs = parseInitArgs(args.slice(1));
|
|
@@ -1740,7 +1740,7 @@ else if (command === "prepare") {
|
|
|
1740
1740
|
log.error("migrate: This command takes no arguments.");
|
|
1741
1741
|
process.exit(1);
|
|
1742
1742
|
}
|
|
1743
|
-
import("../migrate-
|
|
1743
|
+
import("../migrate-CEu2X5DB.mjs").then(({ runMigrateCommand }) => {
|
|
1744
1744
|
runMigrateCommand(process.cwd()).catch((err) => {
|
|
1745
1745
|
log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
|
|
1746
1746
|
process.exit(1);
|
|
@@ -1852,52 +1852,52 @@ else if (command === "prepare") {
|
|
|
1852
1852
|
];
|
|
1853
1853
|
(async () => {
|
|
1854
1854
|
printVoidHeader();
|
|
1855
|
-
const { promptSubcommand } = await import("../subcommand-prompt-
|
|
1855
|
+
const { promptSubcommand } = await import("../subcommand-prompt-B6WS9Aoz.mjs");
|
|
1856
1856
|
const result = await promptSubcommand("", topLevelCommands);
|
|
1857
1857
|
if (!result) process.exit(0);
|
|
1858
1858
|
const cmd = result.subcommand;
|
|
1859
1859
|
const root = process.cwd();
|
|
1860
1860
|
switch (cmd) {
|
|
1861
1861
|
case "connect": {
|
|
1862
|
-
const { runConnectCommand } = await import("../connect-
|
|
1862
|
+
const { runConnectCommand } = await import("../connect-H6EvP62X.mjs");
|
|
1863
1863
|
await runConnectCommand(root, parseConnectArgs([]));
|
|
1864
1864
|
return;
|
|
1865
1865
|
}
|
|
1866
1866
|
case "init": {
|
|
1867
|
-
const { runInitCommand, parseInitArgs } = await import("../init-
|
|
1867
|
+
const { runInitCommand, parseInitArgs } = await import("../init-BMf4T03q.mjs");
|
|
1868
1868
|
await runInitCommand(root, parseInitArgs([]));
|
|
1869
1869
|
return;
|
|
1870
1870
|
}
|
|
1871
1871
|
case "migrate": {
|
|
1872
|
-
const { runMigrateCommand } = await import("../migrate-
|
|
1872
|
+
const { runMigrateCommand } = await import("../migrate-CEu2X5DB.mjs");
|
|
1873
1873
|
await runMigrateCommand(root);
|
|
1874
1874
|
return;
|
|
1875
1875
|
}
|
|
1876
1876
|
case "deploy": {
|
|
1877
|
-
const { runDeploy } = await import("../deploy-
|
|
1877
|
+
const { runDeploy } = await import("../deploy-qmiLE1G1.mjs");
|
|
1878
1878
|
await runDeploy(root);
|
|
1879
1879
|
return;
|
|
1880
1880
|
}
|
|
1881
|
-
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-router-
|
|
1882
|
-
case "account": return runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (r, p) => import("../account-cmd-
|
|
1883
|
-
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-
|
|
1884
|
-
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-
|
|
1885
|
-
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-
|
|
1886
|
-
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-
|
|
1887
|
-
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-
|
|
1888
|
-
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-
|
|
1889
|
-
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-
|
|
1890
|
-
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-
|
|
1891
|
-
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-
|
|
1892
|
-
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-
|
|
1893
|
-
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-
|
|
1881
|
+
case "auth": return runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (r, p) => import("../auth-router-BRxIuqDi.mjs").then(({ runAuthRouter }) => runAuthRouter(r, p)));
|
|
1882
|
+
case "account": return runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (r, p) => import("../account-cmd-CDry3B5V.mjs").then(({ runAccountCommand }) => runAccountCommand(r, p)));
|
|
1883
|
+
case "platform": return runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (r, p) => import("../platform-cmd-dyFUof0t.mjs").then(({ runPlatformCommand }) => runPlatformCommand(r, p)));
|
|
1884
|
+
case "cloudflare": return runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (r, p) => import("../cloudflare-cmd-bhwCxAN6.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(r, p)));
|
|
1885
|
+
case "project": return runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (r, p) => import("../project-cmd-BbH2LptN.mjs").then(({ runProjectCommand }) => runProjectCommand(r, p)));
|
|
1886
|
+
case "secret": return runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (r, p) => import("../secret-AKnNXNP5.mjs").then(({ runSecretCommand }) => runSecretCommand(r, p)));
|
|
1887
|
+
case "domain": return runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (r, p) => import("../domain-B_9VgOm6.mjs").then(({ runDomainCommand }) => runDomainCommand(r, p)));
|
|
1888
|
+
case "github": return runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (r, p) => import("../github-cmd-hhkTzlGS.mjs").then(({ runGithubCommand }) => runGithubCommand(r, p)));
|
|
1889
|
+
case "build": return runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (r, p) => import("../build-cmd-Ce3C8huo.mjs").then(({ runBuildCommand }) => runBuildCommand(r, p)));
|
|
1890
|
+
case "email": return runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (r, p) => import("../email-BokHgjKj.mjs").then(({ runEmailCommand }) => runEmailCommand(r, p)));
|
|
1891
|
+
case "db": return runSubcommandGroup("db", dbSubcommands, parseDbArgs, (r, p) => import("../db-DpCKZto0.mjs").then(({ runDbCommand }) => runDbCommand(r, p)));
|
|
1892
|
+
case "env": return runSubcommandGroup("env", envSubcommands, parseEnvArgs, (r, p) => import("../env-BdTc-K2L.mjs").then(({ runEnvCommand }) => runEnvCommand(r, p)));
|
|
1893
|
+
case "gen": return runSubcommandGroup("gen", genSubcommands, parseGenArgs, (r, p) => import("../gen-qCBwH3fZ.mjs").then(({ runGenCommand }) => runGenCommand(r, p)));
|
|
1894
1894
|
case "info": {
|
|
1895
|
-
const { runInfoCommand } = await import("../info-
|
|
1895
|
+
const { runInfoCommand } = await import("../info-DhtTKh65.mjs");
|
|
1896
1896
|
await runInfoCommand(root, parseInfoArgs([]));
|
|
1897
1897
|
return;
|
|
1898
1898
|
}
|
|
1899
1899
|
case "prepare": {
|
|
1900
|
-
const { runPrepareCommand } = await import("../prepare-
|
|
1900
|
+
const { runPrepareCommand } = await import("../prepare-BMrRWLwP.mjs");
|
|
1901
1901
|
await runPrepareCommand(root, parsePrepareArgs([]));
|
|
1902
1902
|
return;
|
|
1903
1903
|
}
|
|
@@ -5,9 +5,9 @@ import { t as require_picocolors } from "../picocolors-BTps1_gs.mjs";
|
|
|
5
5
|
import { copyFileSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
|
-
import { spawn, spawnSync } from "node:child_process";
|
|
9
8
|
import { parse } from "jsonc-parser";
|
|
10
9
|
import { stripVTControlCharacters } from "node:util";
|
|
10
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
11
11
|
import { EnvHttpProxyAgent, fetch as fetch$1 } from "undici";
|
|
12
12
|
import { getCloudflareAuthUseKeyringFromEnv } from "@cloudflare/workers-auth";
|
|
13
13
|
import { createCfAuth, createCfProfileStore, readUserPreferences, setKeyringPreference } from "@cloudflare/workers-auth/cf";
|
|
@@ -219,7 +219,7 @@ async function withBuildOutput(raw, sourceMain, action) {
|
|
|
219
219
|
}), { mode: 384 });
|
|
220
220
|
const accountId = process.env.CLOUDFLARE_ACCOUNT_ID ?? raw.account_id;
|
|
221
221
|
if (typeof accountId !== "string" || !accountId) throw new Error("Cloudflare account is not pinned for Worker deployment.");
|
|
222
|
-
const { prepareCfBuildOutput } = await import("../cf-build-output-
|
|
222
|
+
const { prepareCfBuildOutput } = await import("../cf-build-output-ChY6-XWP.mjs");
|
|
223
223
|
const output = await prepareCfBuildOutput(scratch, accountId);
|
|
224
224
|
if (!output) throw new Error("Could not prepare the Cloudflare Worker build output.");
|
|
225
225
|
try {
|
|
@@ -304,7 +304,7 @@ async function cloudflareApiGet(path, failure, extraHeaders = {}) {
|
|
|
304
304
|
...proxy ? { dispatcher: proxy } : {}
|
|
305
305
|
});
|
|
306
306
|
const body = object(await response.json());
|
|
307
|
-
if (!response.ok || body.success !== true) throw new Error(failure);
|
|
307
|
+
if (!response.ok || body.success !== true) throw new Error(`${failure} (HTTP ${response.status})`);
|
|
308
308
|
return body;
|
|
309
309
|
} finally {
|
|
310
310
|
await proxy?.close();
|
|
@@ -169,7 +169,7 @@ function emitResult(result) {
|
|
|
169
169
|
* facts. The import stays isolated because env.ts is arbitrary project code.
|
|
170
170
|
*/
|
|
171
171
|
async function runFactsChild(root) {
|
|
172
|
-
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-
|
|
172
|
+
const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-cZBvGWaP.mjs");
|
|
173
173
|
try {
|
|
174
174
|
emitResult({
|
|
175
175
|
kind: "ok",
|
|
@@ -194,7 +194,7 @@ async function runFactsChild(root) {
|
|
|
194
194
|
* fault → fail closed as a values-free schema error.
|
|
195
195
|
*/
|
|
196
196
|
async function runValidateEmittedChild(root) {
|
|
197
|
-
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-
|
|
197
|
+
const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-cZBvGWaP.mjs");
|
|
198
198
|
const emitted = readEmittedWorkerVars(root);
|
|
199
199
|
if (!emitted.ok) {
|
|
200
200
|
emitResult({
|