void 0.7.13 → 0.8.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.
Files changed (133) hide show
  1. package/dist/{agents-DqkFfc2c.mjs → agents-Dkgafwfr.mjs} +1 -1
  2. package/dist/{auth-cmd-bS88H4Lb.mjs → auth-cmd-B1-7r6ng.mjs} +3 -3
  3. package/dist/{better-auth-shared-D2JaoCs4.mjs → better-auth-shared-CbAF6sOM.mjs} +1 -1
  4. package/dist/{better-auth-shared-HXlHRw02.d.mts → better-auth-shared-Fzyk5yS1.d.mts} +2 -7
  5. package/dist/{cache-DUDCNty6.mjs → cache-CGYC-2LW.mjs} +5 -5
  6. package/dist/{cancel-deploy-DOuSbPwX.mjs → cancel-deploy-B4j31z7d.mjs} +4 -4
  7. package/dist/canonical-json-CEyQaVDa.mjs +13 -0
  8. package/dist/cli/cli.mjs +44 -31
  9. package/dist/{client-C_DYiXeu.mjs → client-C-nH6yz3.mjs} +5 -5
  10. package/dist/{collect-HqAuilH6.mjs → collect-9rO3JFNM.mjs} +1 -1
  11. package/dist/{config-DyUSwbeX.mjs → config--wXmVOoe.mjs} +10 -8
  12. package/dist/{config-CeRQg3Lz.mjs → config-BVEC0lti.mjs} +11 -2
  13. package/dist/{config-CvHtTM0q.mjs → config-hhMYPVRT.mjs} +3 -12
  14. package/dist/{create-project-hvFe6rbI.mjs → create-project-BGnQMy5N.mjs} +44 -18
  15. package/dist/{db-YEYSTfGw.mjs → db-CT5Xg6ds.mjs} +42 -37
  16. package/dist/{delete-XyM_VD9o.mjs → delete-eMGTHHB9.mjs} +5 -5
  17. package/dist/{deploy-CPAEgVQm.mjs → deploy-7EA_lKq9.mjs} +169 -99
  18. package/dist/{discover-CKGQpis8.mjs → discover-C8N1I4tK.mjs} +9 -6
  19. package/dist/{domain-Dvj7u8tr.mjs → domain-UfLrp2vc.mjs} +64 -22
  20. package/dist/{drizzle-Cx7cVwrE.mjs → drizzle-DmaANP4-.mjs} +1 -1
  21. package/dist/{env-Bjl0rzuf.mjs → env-Cvdbbm_N.mjs} +7 -7
  22. package/dist/{env-helpers-Dw95CU8e.d.mts → env-helpers-Bt9yYg5I.d.mts} +1 -1
  23. package/dist/{env-types-BSQghXbx.mjs → env-types-D6qI1ThV.mjs} +8 -19
  24. package/dist/{env-validation-Buy5pe3u.mjs → env-validation-DBJsxZLz.mjs} +4 -4
  25. package/dist/{gen-DU8NIdrH.mjs → gen-Cn2hZ8RR.mjs} +37 -31
  26. package/dist/{handler-DJTuxB10.d.mts → handler-BPhL8AmU.d.mts} +3 -3
  27. package/dist/{headers-CuVHn6Kl.mjs → headers-wAPJigtE.mjs} +3 -3
  28. package/dist/index.d.mts +3 -3
  29. package/dist/index.mjs +273 -104
  30. package/dist/{init-Br5DTaG7.mjs → init-DL6syXuF.mjs} +43 -31
  31. package/dist/{link-DdXqlUiJ.mjs → link-C5x1E-XZ.mjs} +5 -5
  32. package/dist/{list-9Bxa5Odn.mjs → list-ezL7hqDV.mjs} +5 -5
  33. package/dist/{login-C_MfDjhu.mjs → login-CkLr-AaI.mjs} +3 -3
  34. package/dist/{logs-DjqCpEER.mjs → logs-MnGILmLz.mjs} +4 -4
  35. package/dist/{mcp-vA0880_K.mjs → mcp-B84MmVAW.mjs} +3 -3
  36. package/dist/{node-gxRQXIRT.mjs → node-fpywdcbN.mjs} +6 -6
  37. package/dist/{output-D3g5otMC.mjs → output-DeiS4oEX.mjs} +1 -1
  38. package/dist/pages/client.d.mts +1 -1
  39. package/dist/pages/head-client.d.mts +1 -1
  40. package/dist/pages/head.d.mts +1 -1
  41. package/dist/pages/index.d.mts +28 -3
  42. package/dist/pages/index.mjs +6 -5
  43. package/dist/pages/islands-plugin.d.mts +1 -1
  44. package/dist/pages/islands-plugin.mjs +7 -5
  45. package/dist/pages/protocol.d.mts +2 -2
  46. package/dist/pages/protocol.mjs +1 -1
  47. package/dist/{pathe.M-eThtNZ-D-kmWkCS.mjs → pathe.M-eThtNZ-BrPhGF_K.mjs} +1 -1
  48. package/dist/plan-aD3wRDqF.mjs +271 -0
  49. package/dist/{plugin-inference-BexV6LL3.mjs → plugin-inference-Ba1uGdIy.mjs} +26 -20
  50. package/dist/{prepare-BEkH89oX.mjs → prepare-BrAISonG.mjs} +29 -19
  51. package/dist/{preset-CYQh93UF.mjs → preset-BRsCi8ZB.mjs} +10 -8
  52. package/dist/{project-DhB4A8_g.mjs → project-CH9pdo16.mjs} +1 -1
  53. package/dist/{project-cmd-CeXO06hG.mjs → project-cmd-JQUzv3qF.mjs} +10 -10
  54. package/dist/project-paths-CCMrHYQm.mjs +100 -0
  55. package/dist/{project-slug-KRvHQEQI.mjs → project-slug-De4UjtD9.mjs} +0 -1
  56. package/dist/{project-tsconfig-Bfy55qvs.mjs → project-tsconfig-HAGjfY6w.mjs} +10 -5
  57. package/dist/{protocol-D7r_deVZ.d.mts → protocol-mcSsdMij.d.mts} +3 -3
  58. package/dist/providers--_pvxpNN.d.mts +7 -0
  59. package/dist/{resolve-project-DdjLQ2tB.mjs → resolve-project-CNpUbUHd.mjs} +1 -1
  60. package/dist/{rollback-C8OSMxmq.mjs → rollback-CoAAvC18.mjs} +4 -4
  61. package/dist/{route-types-qVL-v-CB.mjs → route-types-jxRfWuCb.mjs} +1 -1
  62. package/dist/{runner-C0d3lJo1.mjs → runner-BkGBfr4e.mjs} +4 -2
  63. package/dist/{runner-pg-Bd_172vF.mjs → runner-pg-BXP0JpHW.mjs} +1 -1
  64. package/dist/runtime/ai.mjs +2 -2
  65. package/dist/runtime/auth.d.mts +1 -1
  66. package/dist/runtime/better-auth-pg.d.mts +1 -1
  67. package/dist/runtime/better-auth-pg.mjs +2 -2
  68. package/dist/runtime/better-auth.d.mts +1 -1
  69. package/dist/runtime/better-auth.mjs +2 -2
  70. package/dist/runtime/client.d.mts +2 -2
  71. package/dist/runtime/client.mjs +1 -1
  72. package/dist/runtime/env-helpers.d.mts +1 -1
  73. package/dist/runtime/env-public-client.d.mts +1 -1
  74. package/dist/runtime/env-public.d.mts +2 -2
  75. package/dist/runtime/env-public.mjs +1 -1
  76. package/dist/runtime/env.mjs +1 -1
  77. package/dist/runtime/fetch-stream.d.mts +1 -1
  78. package/dist/runtime/fetch-stream.mjs +1 -1
  79. package/dist/runtime/fetch.d.mts +1 -1
  80. package/dist/runtime/fetch.mjs +1 -1
  81. package/dist/runtime/handler.d.mts +1 -1
  82. package/dist/runtime/handler.mjs +1 -1
  83. package/dist/runtime/isr.mjs +1 -1
  84. package/dist/runtime/live.d.mts +2 -2
  85. package/dist/runtime/live.mjs +1 -1
  86. package/dist/runtime/migration-handler.d.mts +33 -1
  87. package/dist/runtime/migration-handler.mjs +332 -24
  88. package/dist/runtime/remote/index.mjs +1 -1
  89. package/dist/runtime/sandbox.d.mts +73 -3
  90. package/dist/runtime/sandbox.mjs +239 -3
  91. package/dist/runtime/validator.d.mts +1 -1
  92. package/dist/runtime/ws-server.d.mts +2 -2
  93. package/dist/runtime/ws.d.mts +3 -3
  94. package/dist/{scan-CKpylFj9.mjs → scan-2YmJkYAf.mjs} +4 -3
  95. package/dist/{scan-CkK1Hzpa.mjs → scan-DzzHqtiT.mjs} +82 -43
  96. package/dist/{secret-NDvlqAN2.mjs → secret-mz8t_CML.mjs} +5 -5
  97. package/dist/{skills-SAG0WyVn.mjs → skills-B_ynF4lA.mjs} +3 -3
  98. package/dist/{subcommand-prompt-q9T06dpg.mjs → subcommand-prompt-CPuV7tPW.mjs} +2 -2
  99. package/dist/sveltekit.mjs +1 -1
  100. package/dist/{validate-DW3ViKTA.mjs → validate-CNWm-PsL.mjs} +49 -9
  101. package/dist/{yarn-pnp-6LD6_3Ej.mjs → yarn-pnp-QgEYVC3V.mjs} +1 -1
  102. package/package.json +3 -2
  103. package/schema.json +5 -0
  104. package/skills/void/docs/guide/ai.md +1 -1
  105. package/skills/void/docs/guide/app-types.md +1 -1
  106. package/skills/void/docs/guide/database/postgresql.md +1 -1
  107. package/skills/void/docs/guide/edge/headers.md +1 -1
  108. package/skills/void/docs/guide/edge/static-assets.md +34 -0
  109. package/skills/void/docs/guide/sandboxes.md +3 -2
  110. package/skills/void/docs/guide/ssr.md +25 -2
  111. package/skills/void/docs/integrations/cloudflare.md +5 -3
  112. package/skills/void/docs/integrations/frameworks/overview.md +1 -1
  113. package/skills/void/docs/integrations/nodejs-bun-deno.md +10 -9
  114. package/skills/void/docs/reference/api.md +204 -13
  115. package/skills/void/docs/reference/cli.md +52 -6
  116. package/skills/void/docs/reference/config.md +27 -4
  117. package/skills/void/docs/reference/resource-inference.md +1 -1
  118. /package/dist/{auth-DmuALf16.d.mts → auth-SfRBhXan.d.mts} +0 -0
  119. /package/dist/{auth-migrations-BwLPwRgH.mjs → auth-migrations-BqJoGqGQ.mjs} +0 -0
  120. /package/dist/{cf-access-BW8K93Fm.mjs → cf-access-DKDsgwOU.mjs} +0 -0
  121. /package/dist/{defer-2ARBu8Et.mjs → defer-DkoEwda-.mjs} +0 -0
  122. /package/dist/{dist-q8b2Mjgb.mjs → dist-DR9sIMbM.mjs} +0 -0
  123. /package/dist/{dist-D2L3_KTK.mjs → dist-abzUneor.mjs} +0 -0
  124. /package/dist/{dotenv-HQNhRalS.mjs → dotenv-Bkoqyq9r.mjs} +0 -0
  125. /package/dist/{env-raw-DtfQ9E31.mjs → env-raw-zk5JQKZe.mjs} +0 -0
  126. /package/dist/{fetch-error-DZ868Xq4.d.mts → fetch-error-BbixZ9vW.d.mts} +0 -0
  127. /package/dist/{fetch-error-CEr0ACTl.mjs → fetch-error-rXermVU3.mjs} +0 -0
  128. /package/dist/{head-C7QW7UY1.d.mts → head-CZs8dMxG.d.mts} +0 -0
  129. /package/dist/{log-7ChR5Fbc.mjs → log-CWWZV4V1.mjs} +0 -0
  130. /package/dist/{magic-string.es-DS_lmuBe.mjs → magic-string.es-C1Fb0uxq.mjs} +0 -0
  131. /package/dist/{providers-BlFNPYen.mjs → providers-uC0PJg1c.mjs} +0 -0
  132. /package/dist/{standard-schema-D2qvCEYV.d.mts → standard-schema-WhHcCaqJ.d.mts} +0 -0
  133. /package/dist/{types-DG_Ynnyd.d.mts → types-C8wsi1hv.d.mts} +0 -0
@@ -16,11 +16,14 @@ Use this page as a command reference. If you are setting up a project for the fi
16
16
  | `void prepare` | Generate `.void` artifacts without starting Vite |
17
17
  | `void gen model <name> [cols...]` | Scaffold migration + CRUD routes |
18
18
  | `void gen route <path>` | Create an API route |
19
+ | `void db push` | Apply schema directly without migration files |
20
+ | `void db generate` | Generate SQL migrations from schema changes |
19
21
  | `void db status` | Show local/remote migration status |
20
22
  | `void db reset` | Drop and re-apply all migrations |
21
23
  | `void db seed` | Reset + seed local database |
22
24
  | `void db studio` | Open Drizzle Studio for local database |
23
25
  | `void secret put <name=value>` | Set a production secret |
26
+ | `void secret list` | List production secrets |
24
27
  | `void secret sync .env.local` | Bulk upload secrets from dotenv file |
25
28
  | `void env check [--remote]` | Validate env.ts schema |
26
29
  | `void env types` | Regenerate .void/env.d.ts from env.ts |
@@ -29,7 +32,9 @@ Use this page as a command reference. If you are setting up a project for the fi
29
32
  | `void project link` | Link directory to a project |
30
33
  | `void project logs` | Show runtime logs from deployed project |
31
34
  | `void project rollback` | Roll back to a previous deployment |
35
+ | `void project cancel` | Cancel an active deployment |
32
36
  | `void project purge-cache` | Purge all cached pages |
37
+ | `void mcp` | Start the Void MCP server |
33
38
  | `void init` | Setup wizard for new or existing projects |
34
39
 
35
40
  ## Binary Invocation
@@ -184,6 +189,17 @@ Roll back to a previous deployment. Traffic instantly switches to the target dep
184
189
 
185
190
  Only **retained** deployments can be rolled back to. The number of retained deployments depends on your plan (free: 1, solo: 5, pro: 25, unlimited for sponsored/custom).
186
191
 
192
+ ### `void project cancel [deployId]`
193
+
194
+ ```
195
+ void project cancel [deployId]
196
+ ```
197
+
198
+ Cancel an active deployment.
199
+
200
+ - If `[deployId]` is omitted, shows an interactive select menu of active deployments for the linked project
201
+ - If `[deployId]` is provided, cancels that deployment directly
202
+
187
203
  ### `void project delete [name]`
188
204
 
189
205
  Permanently delete a project and all its resources (databases, KV namespaces, R2 buckets, deployments). Requires typing the project slug to confirm.
@@ -234,6 +250,18 @@ That fallback is mainly for projects that skipped Void project setup during `voi
234
250
 
235
251
  ## Database
236
252
 
253
+ ### `void db push`
254
+
255
+ Apply your Drizzle schema directly to the development database without creating migration files. For D1 projects, this updates the local D1 database used by dev. For PostgreSQL projects, this uses `DATABASE_URL` from `.env.local`.
256
+
257
+ Use this for quick schema iteration while prototyping. Before deploying, generate and review migration files with `void db generate`.
258
+
259
+ ### `void db generate`
260
+
261
+ Generate SQL migration files from schema changes.
262
+
263
+ The command compares your current `db/schema.ts` or `db/schema/` modules against the last generated Drizzle snapshot and writes new migration artifacts under `db/migrations/`. Review and commit the generated files before deploying.
264
+
237
265
  ### `void db status`
238
266
 
239
267
  Show migration status. Displays which migrations are applied or pending locally. When logged in and linked to a project, also shows remote status.
@@ -418,6 +446,14 @@ void gen queue emails
418
446
 
419
447
  ## Secrets
420
448
 
449
+ ### `void secret list`
450
+
451
+ ```
452
+ void secret list [--project <name>]
453
+ ```
454
+
455
+ List the production secrets configured for the project. Secret values are never printed.
456
+
421
457
  ### `void secret put`
422
458
 
423
459
  ```
@@ -539,10 +575,12 @@ List all custom domains and their status (active/pending).
539
575
  ### `void domain status`
540
576
 
541
577
  ```
542
- void domain status <hostname> [--project <name>]
578
+ void domain status <hostname> [--project <name>] [--verbose]
543
579
  ```
544
580
 
545
- Check verification and SSL status for a specific domain. Shows hostname, status, SSL status, and any verification errors.
581
+ Check verification and SSL status for a specific domain. Prints a rolled-up state (`awaiting_dns`, `verifying_dns`, `issuing_cert`, `deploying_cert`, `awaiting_deployment`, `active`, `error`, or `pending`) with a one-line diagnostic explaining what Cloudflare is doing and any user action required. When DNS records are still pending, the command also prints the exact TXT records to add at your DNS provider.
582
+
583
+ Pass `--verbose` to additionally print the raw multi-line status breakdown (DB status, SSL status, ownership state, verification errors) underneath the rollup.
546
584
 
547
585
  Project resolution for domain commands follows the same order as deploy (`--project`, `VOID_PROJECT`, linked project).
548
586
 
@@ -558,9 +596,17 @@ Runs all agent setup steps:
558
596
 
559
597
  If no agent is detected, `void init --agents` asks you to choose from Claude Code, Cursor, Codex, Gemini CLI, or Generic.
560
598
 
599
+ ### `void mcp`
600
+
601
+ ```
602
+ void mcp
603
+ ```
604
+
605
+ Start the Void MCP server over stdio for supported coding agents.
606
+
561
607
  ## Environment variables
562
608
 
563
- | Variable | Purpose | Default |
564
- | -------------- | ------------------------------------------------------------ | ------- |
565
- | `VOID_TOKEN` | Auth token override instead of saved config | none |
566
- | `VOID_PROJECT` | Default project slug for deploy, secret, and delete commands | none |
609
+ | Variable | Purpose | Default |
610
+ | -------------- | ------------------------------------------------------------------------- | ------- |
611
+ | `VOID_TOKEN` | Auth token override instead of saved config | none |
612
+ | `VOID_PROJECT` | Default project slug for deploy, secret, domain, and cache purge commands | none |
@@ -13,6 +13,7 @@ Project-level configuration lives in a `void.json` file at the project root. Mos
13
13
  ```json
14
14
  {
15
15
  "$schema": "./node_modules/void/schema.json",
16
+ "sourceDir": "src",
16
17
  "target": "cloudflare",
17
18
  "auth": {
18
19
  "providers": ["email", "github", "google"]
@@ -36,10 +37,24 @@ Project-level configuration lives in a `void.json` file at the project root. Mos
36
37
  }
37
38
  ```
38
39
 
39
- Add the `$schema` field for autocomplete and validation in your editor.
40
+ Add the `$schema` field for autocomplete and validation in your editor. The schema ships with the `void` package at `node_modules/void/schema.json` and is also exposed as the `void/schema.json` package subpath.
40
41
 
41
42
  ## Fields
42
43
 
44
+ ### `sourceDir`
45
+
46
+ Directory containing Void source conventions, relative to the project root.
47
+
48
+ When omitted, Void uses the existing project-root conventions: `pages/`, `routes/`, `middleware/`, `crons/`, `queues/`, `db/`, `auth.ts`, and `env.ts`.
49
+
50
+ When set, those conventions move under the configured directory:
51
+
52
+ ```json
53
+ { "sourceDir": "src" }
54
+ ```
55
+
56
+ With that config, Void reads `src/pages`, `src/routes`, `src/db/schema.ts`, `src/db/migrations`, `src/auth.ts`, and `src/env.ts`. Project files such as `void.json`, `vite.config.ts`, `package.json`, `tsconfig.json`, `wrangler.json`, `public/`, and `.env*` stay at the project root. Void does not scan both locations; if source conventions exist in both places during dev/build, remove one copy so the active source tree is unambiguous.
57
+
43
58
  ### `auth`
44
59
 
45
60
  High-level Better Auth configuration.
@@ -222,7 +237,9 @@ Deploy target runtime. Defaults to `"cloudflare"`.
222
237
  | `"bun"` | Bun, using `Bun.serve()` |
223
238
  | `"deno"` | Deno, using `Deno.serve()` |
224
239
 
225
- Non-CF targets disable CF bindings (`void/db`, `void/kv`, `void/auth`, `void/storage`, `void/ai`, `void/sandbox`, `void/env`, `void/ws`). Importing any of these with a non-CF target produces a compile-time error. File-based routing, middleware, and `void/client` all work normally.
240
+ Non-CF targets disable CF binding imports (`void/db`, `void/kv`, `void/auth`, `void/storage`, `void/ai`, `void/sandbox`, `void/env`). Importing any of these with a non-CF target produces a compile-time error. File-based routing, middleware, and `void/client` all work normally.
241
+
242
+ Void-managed WebSocket route files (`*.ws.ts`) are Cloudflare-only because they compile to Durable Objects. The `void/ws` subpath itself is not blocked on non-CF targets so client-side `connect()` code can still be bundled where a browser-like `WebSocket` runtime is available.
226
243
 
227
244
  ```json
228
245
  { "target": "node" }
@@ -236,23 +253,29 @@ Curated Cloudflare Workers configuration. Cloudflare-targeted apps require an ex
236
253
  | --------------------- | ---------- | -------------------------------------- |
237
254
  | `compatibility_date` | `string` | Cloudflare Workers compatibility date |
238
255
  | `compatibility_flags` | `string[]` | Cloudflare Workers compatibility flags |
256
+ | `vars` | `object` | Plain-text worker variables |
239
257
 
240
258
  ```json
241
259
  {
242
260
  "worker": {
243
261
  "compatibility_date": "2025-12-01",
244
- "compatibility_flags": ["nodejs_compat"]
262
+ "compatibility_flags": ["nodejs_compat"],
263
+ "vars": {
264
+ "PUBLIC_API_BASE": "https://api.example.com"
265
+ }
245
266
  }
246
267
  }
247
268
  ```
248
269
 
270
+ `worker.vars` values must be strings. They are merged into Worker bindings before `.env` files are loaded, so project `.env` values override `worker.vars` for local dev/build. Do not put secrets here; use `env.ts` plus `void secret put` for production secrets.
271
+
249
272
  ### `routing`
250
273
 
251
274
  Routing and edge configuration for headers, redirects, rewrites, and caching.
252
275
 
253
276
  #### `routing.headers`
254
277
 
255
- Custom response headers for static assets. Keys are URL patterns, values are arrays of `"Name: value"` strings. See [Custom Headers](../guide/edge/headers) for details.
278
+ Custom response headers for dispatch-worker responses. Keys are URL patterns, values are arrays of `"Name: value"` strings. See [Custom Headers](../guide/edge/headers) for details.
256
279
 
257
280
  ```json
258
281
  {
@@ -26,7 +26,7 @@ This runs once before plugins initialize, so the results are available to config
26
26
  | `AI` | `Ai` | `import { ai } from "void/ai"` | `env.AI` or `c.env.AI` |
27
27
  | `SANDBOX` | `DurableObjectNamespace<Sandbox>` | `import { getSandbox } from "void/sandbox"` | `env.SANDBOX` or `c.env.SANDBOX` |
28
28
  | Auth | none | `import { ... } from "void/auth"` or `import { auth } from "void/client"` | none |
29
- | `QUEUE_*` | `Queue` | `import { ... } from "void/queue"` | `env.QUEUE_*` |
29
+ | `QUEUE_*` | `Queue` | `import { queues } from "void/queues"` | `env.QUEUE_*` |
30
30
 
31
31
  Auth detection also triggers when importing the `auth` specifier from `void/client` (but not when importing only `fetch`).
32
32
 
File without changes
File without changes
File without changes
File without changes