void 0.8.11 → 0.9.1

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 (109) hide show
  1. package/dist/{auth-cmd-DE2YDAk0.mjs → auth-cmd-CPkWrQR9.mjs} +2 -2
  2. package/dist/{better-auth-shared-BXdg2Sur.d.mts → better-auth-shared-CmEQZs1T.d.mts} +2 -2
  3. package/dist/{cache-ChOUXuMY.mjs → cache-1SVxZ7BK.mjs} +2 -2
  4. package/dist/{cancel-deploy-g6bC-mpl.mjs → cancel-deploy-JaFClLr7.mjs} +1 -1
  5. package/dist/cli/cli.mjs +77 -40
  6. package/dist/{client-CCOKwNUz.mjs → client-DIfOFf1W.mjs} +6 -1
  7. package/dist/{create-project-DmGoYMqF.mjs → create-project-DCUrFJxa.mjs} +13 -5
  8. package/dist/{db-CSn2p-PN.mjs → db-DiddQC2v.mjs} +192 -20
  9. package/dist/{delete-D446r1rC.mjs → delete-CYknzwXU.mjs} +2 -2
  10. package/dist/{deploy-OPo_tSWl.mjs → deploy-CRU9fGjE.mjs} +22 -22
  11. package/dist/{domain-Digh83lu.mjs → domain-DxTc6HDn.mjs} +1 -1
  12. package/dist/{env-CJMOHUbW.mjs → env-Bvw0wMTI.mjs} +1 -1
  13. package/dist/{env-helpers-GICENGaN.d.mts → env-helpers-Bd2wVdxz.d.mts} +1 -1
  14. package/dist/{gen-DVPMPTL1.mjs → gen-CZdNWIaA.mjs} +1 -1
  15. package/dist/{handler-2mA_-sst.d.mts → handler-xflsMwWM.d.mts} +3 -3
  16. package/dist/index.d.mts +3 -3
  17. package/dist/index.mjs +242 -107
  18. package/dist/{init-BaXYK2PD.mjs → init-BHupO7Fm.mjs} +9 -9
  19. package/dist/{link-PClO4q2M.mjs → link-7MoXUMaI.mjs} +8 -10
  20. package/dist/{list-G03-pEN-.mjs → list-N2mCHv8q.mjs} +2 -2
  21. package/dist/{login-BZ1Yk9Xw.mjs → login-tt1OmNVg.mjs} +1 -1
  22. package/dist/{logs-D0a_HhLn.mjs → logs-Cl7q2CjZ.mjs} +1 -1
  23. package/dist/{mcp-BLsmImuJ.mjs → mcp-BXD35N2J.mjs} +1 -1
  24. package/dist/{node-x1AzR6Yf.mjs → node-CHWVVjO6.mjs} +3 -3
  25. package/dist/package-json-B2TD0JLu.mjs +44 -0
  26. package/dist/pages/client.d.mts +1 -1
  27. package/dist/pages/head-client.d.mts +1 -1
  28. package/dist/pages/head.d.mts +1 -1
  29. package/dist/pages/index.d.mts +2 -2
  30. package/dist/pages/index.mjs +1 -1
  31. package/dist/pages/islands-plugin.d.mts +1 -1
  32. package/dist/pages/protocol.d.mts +2 -2
  33. package/dist/pages/protocol.mjs +1 -1
  34. package/dist/{plugin-inference-Ba1uGdIy.mjs → plugin-inference-BUBhHt_1.mjs} +6 -2
  35. package/dist/{prepare-D8znEv3-.mjs → prepare-CrlAVbWS.mjs} +3 -3
  36. package/dist/{preset-BRsCi8ZB.mjs → preset-CIJG2O7a.mjs} +6 -21
  37. package/dist/{project-cmd-CErG1vM7.mjs → project-cmd-CLrqSbqj.mjs} +8 -8
  38. package/dist/{protocol-DXs_1QcC.d.mts → protocol-DYca39yJ.d.mts} +3 -3
  39. package/dist/proxy-M3pxItg2.mjs +5 -0
  40. package/dist/{rollback-BtiabraI.mjs → rollback-CEbAwbHK.mjs} +1 -1
  41. package/dist/{runner-DCYwTlee.mjs → runner-DLZ9E_cX.mjs} +11 -3
  42. package/dist/runtime/ai.mjs +1 -1
  43. package/dist/runtime/auth.d.mts +1 -1
  44. package/dist/runtime/better-auth-pg.d.mts +1 -1
  45. package/dist/runtime/better-auth-pg.mjs +3 -3
  46. package/dist/runtime/better-auth.d.mts +1 -1
  47. package/dist/runtime/better-auth.mjs +2 -2
  48. package/dist/runtime/client-react.d.mts +6 -0
  49. package/dist/runtime/client-react.mjs +5 -0
  50. package/dist/runtime/client-solid.d.mts +6 -0
  51. package/dist/runtime/client-solid.mjs +5 -0
  52. package/dist/runtime/client-svelte.d.mts +6 -0
  53. package/dist/runtime/client-svelte.mjs +5 -0
  54. package/dist/runtime/client-vue.d.mts +6 -0
  55. package/dist/runtime/client-vue.mjs +5 -0
  56. package/dist/runtime/client.d.mts +2 -2
  57. package/dist/runtime/client.mjs +1 -1
  58. package/dist/runtime/env-helpers.d.mts +1 -1
  59. package/dist/runtime/env-public-client.d.mts +1 -1
  60. package/dist/runtime/env-public.d.mts +2 -2
  61. package/dist/runtime/env-public.mjs +1 -1
  62. package/dist/runtime/env.mjs +1 -1
  63. package/dist/runtime/fetch-stream.d.mts +1 -1
  64. package/dist/runtime/fetch-stream.mjs +1 -1
  65. package/dist/runtime/fetch.d.mts +1 -1
  66. package/dist/runtime/fetch.mjs +1 -1
  67. package/dist/runtime/handler.d.mts +1 -1
  68. package/dist/runtime/handler.mjs +1 -1
  69. package/dist/runtime/isr.mjs +1 -1
  70. package/dist/runtime/live.d.mts +2 -2
  71. package/dist/runtime/live.mjs +1 -1
  72. package/dist/runtime/migration-handler-pg.mjs +1 -1
  73. package/dist/runtime/remote/index.d.mts +5 -1
  74. package/dist/runtime/remote/index.mjs +7 -4
  75. package/dist/runtime/sandbox.mjs +1 -1
  76. package/dist/runtime/validator.d.mts +1 -1
  77. package/dist/runtime/ws-server.d.mts +2 -2
  78. package/dist/runtime/ws.d.mts +3 -3
  79. package/dist/{scan-DzzHqtiT.mjs → scan-BNC_1OsY.mjs} +1 -1
  80. package/dist/{secret-CNnequJa.mjs → secret-C_uTY7xx.mjs} +2 -2
  81. package/dist/{skills-C38GxuGT.mjs → skills-BRKc--As.mjs} +1 -1
  82. package/package.json +22 -2
  83. package/skills/void/docs/guide/auth.md +3 -3
  84. package/skills/void/docs/guide/env-vars.md +4 -1
  85. package/skills/void/docs/integrations/cloudflare.md +3 -2
  86. package/skills/void/docs/reference/api.md +42 -30
  87. package/skills/void/docs/reference/cli.md +46 -28
  88. package/skills/void/docs/reference/config.md +1 -1
  89. package/skills/void/docs/reference/resource-inference.md +11 -11
  90. /package/dist/{agents-Dkgafwfr.mjs → agents-MhSzNMiC.mjs} +0 -0
  91. /package/dist/{auth-CHfPhSta.d.mts → auth-CDeb2XAl.d.mts} +0 -0
  92. /package/dist/{auth-migrations-BqJoGqGQ.mjs → auth-migrations-CuQkjjWE.mjs} +0 -0
  93. /package/dist/{better-auth-shared-CbAF6sOM.mjs → better-auth-shared-ChVbrq52.mjs} +0 -0
  94. /package/dist/{defer-DkoEwda-.mjs → defer-CouVukrf.mjs} +0 -0
  95. /package/dist/{drizzle-DmaANP4-.mjs → drizzle-2fs1qTgy.mjs} +0 -0
  96. /package/dist/{env-raw-zk5JQKZe.mjs → env-raw-RDkMnSTC.mjs} +0 -0
  97. /package/dist/{fetch-error-rXermVU3.mjs → fetch-error-BFIoojjf.mjs} +0 -0
  98. /package/dist/{fetch-error-7aWl0RiD.d.mts → fetch-error-CimrygMq.d.mts} +0 -0
  99. /package/dist/{head-DnTAP4p-.d.mts → head-BsSTGnIe.d.mts} +0 -0
  100. /package/dist/{headers-wAPJigtE.mjs → headers-Y0jshugF.mjs} +0 -0
  101. /package/dist/{pg-BDQxUp3Q.mjs → pg-CMZ_5wsC.mjs} +0 -0
  102. /package/dist/{project-slug-De4UjtD9.mjs → project-slug-rX3kTOfY.mjs} +0 -0
  103. /package/dist/{providers--6L9uf7j.d.mts → providers-3Kkv63Ha.d.mts} +0 -0
  104. /package/dist/{resolve-project-CNpUbUHd.mjs → resolve-project-D4O1_fZz.mjs} +0 -0
  105. /package/dist/{runner-pg-CJ04wNk5.mjs → runner-pg-Cv9V7ydr.mjs} +0 -0
  106. /package/dist/{standard-schema-BDiIJgp5.d.mts → standard-schema-Dnsh2vnl.d.mts} +0 -0
  107. /package/dist/{subcommand-prompt-BLewBtNI.mjs → subcommand-prompt-OD-x_Tsm.mjs} +0 -0
  108. /package/dist/{types-C0AOcrPN.d.mts → types-Dm9kep2X.d.mts} +0 -0
  109. /package/dist/{yarn-pnp-CLFC1T3p.mjs → yarn-pnp-0SwYgQxx.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { i as getRawRuntimeEnv, n as asEnv, r as envContext, t as INTERNAL_BINDING_PREFIXES } from "../env-raw-zk5JQKZe.mjs";
1
+ import { i as getRawRuntimeEnv, n as asEnv, r as envContext, t as INTERNAL_BINDING_PREFIXES } from "../env-raw-RDkMnSTC.mjs";
2
2
  //#region src/runtime/env.ts
3
3
  /**
4
4
  * Public runtime env API — exposed via "void/_env".
@@ -1,4 +1,4 @@
1
- import { t as FetchError } from "../fetch-error-7aWl0RiD.mjs";
1
+ import { t as FetchError } from "../fetch-error-CimrygMq.mjs";
2
2
  import { RouteMap } from "void/routes";
3
3
 
4
4
  //#region src/runtime/fetch-stream.d.ts
@@ -1,4 +1,4 @@
1
- import { n as ofetch, t as FetchError } from "../fetch-error-rXermVU3.mjs";
1
+ import { n as ofetch, t as FetchError } from "../fetch-error-BFIoojjf.mjs";
2
2
  //#region src/runtime/fetch-stream.ts
3
3
  /**
4
4
  * Consume an SSE endpoint as an async generator of text chunks.
@@ -1,4 +1,4 @@
1
- import { t as FetchError } from "../fetch-error-7aWl0RiD.mjs";
1
+ import { t as FetchError } from "../fetch-error-CimrygMq.mjs";
2
2
  import { RouteMap } from "void/routes";
3
3
 
4
4
  //#region src/runtime/fetch.d.ts
@@ -1,4 +1,4 @@
1
- import { n as ofetch, t as FetchError } from "../fetch-error-rXermVU3.mjs";
1
+ import { n as ofetch, t as FetchError } from "../fetch-error-BFIoojjf.mjs";
2
2
  //#region src/runtime/fetch.ts
3
3
  async function fetch(path, options) {
4
4
  let url = path;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { C as HandlerInput, S as ValidationError, _ as defineScheduled, a as QueueBatch, b as InferProps, c as RenderAssetTags, d as VoidAssetRewriteError, f as defineHandler, g as defineRender, h as defineQueue, i as CloudEnv, l as TypedHandler, m as defineMiddleware, n as CloudContext, o as QueueMessage, p as defineHead, r as CloudContextVariables, s as QueueRetryOptions, t as CloudBindings, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer } from "../handler-2mA_-sst.mjs";
2
+ import { C as HandlerInput, S as ValidationError, _ as defineScheduled, a as QueueBatch, b as InferProps, c as RenderAssetTags, d as VoidAssetRewriteError, f as defineHandler, g as defineRender, h as defineQueue, i as CloudEnv, l as TypedHandler, m as defineMiddleware, n as CloudContext, o as QueueMessage, p as defineHead, r as CloudContextVariables, s as QueueRetryOptions, t as CloudBindings, u as TypedQueueHandler, v as Deferred, w as ValidatorSlots, x as defer } from "../handler-xflsMwWM.mjs";
3
3
  export { CloudBindings, CloudContext, CloudContextVariables, CloudEnv, Deferred, HandlerInput, InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, ValidatorSlots, VoidAssetRewriteError, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,6 +1,6 @@
1
1
  import { convertReturnValue } from "./response.mjs";
2
2
  import { runValidation } from "./validator.mjs";
3
- import { i as ValidationError, n as defer } from "../defer-DkoEwda-.mjs";
3
+ import { i as ValidationError, n as defer } from "../defer-CouVukrf.mjs";
4
4
  //#region src/runtime/handler.ts
5
5
  /**
6
6
  * Thrown when `c.rewrite()` is called with a destination whose final path
@@ -1,4 +1,4 @@
1
- import { i as getRawRuntimeEnv } from "../env-raw-zk5JQKZe.mjs";
1
+ import { i as getRawRuntimeEnv } from "../env-raw-RDkMnSTC.mjs";
2
2
  //#region src/runtime/isr.ts
3
3
  /**
4
4
  * Revalidate ISR-cached pages on demand.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { r as AuthUser } from "../auth-CHfPhSta.mjs";
3
- import { i as CloudEnv, n as CloudContext } from "../handler-2mA_-sst.mjs";
2
+ import { r as AuthUser } from "../auth-CDeb2XAl.mjs";
3
+ import { i as CloudEnv, n as CloudContext } from "../handler-xflsMwWM.mjs";
4
4
 
5
5
  //#region src/runtime/live.d.ts
6
6
  type MaybePromise<T> = T | Promise<T>;
@@ -1,4 +1,4 @@
1
- import { i as getRawRuntimeEnv } from "../env-raw-zk5JQKZe.mjs";
1
+ import { i as getRawRuntimeEnv } from "../env-raw-RDkMnSTC.mjs";
2
2
  import { getUser } from "./auth.mjs";
3
3
  //#region src/runtime/live.ts
4
4
  let liveBindingName = "VOID_LIVE";
@@ -1,4 +1,4 @@
1
- import { t as disablePgPassFallback } from "../pg-BDQxUp3Q.mjs";
1
+ import { t as disablePgPassFallback } from "../pg-CMZ_5wsC.mjs";
2
2
  //#region src/runtime/migration-handler-pg.ts
3
3
  function createMigrationHandler(env, migrations, _dialect, runAuthMigrations) {
4
4
  return async (request) => {
@@ -3,6 +3,10 @@
3
3
  * Replace local D1/KV/R2 bindings with proxy-backed versions.
4
4
  * Called from the generated worker entry point when `__VOID_REMOTE` is set.
5
5
  */
6
- declare function createRemoteEnv(env: Record<string, unknown>): Record<string, unknown>;
6
+ declare function createRemoteEnv(env: Record<string, unknown>, bindingNames?: {
7
+ d1?: string;
8
+ kv?: string;
9
+ r2?: string;
10
+ }): Record<string, unknown>;
7
11
  //#endregion
8
12
  export { createRemoteEnv };
@@ -448,13 +448,16 @@ function makeR2ObjectBody(key, res) {
448
448
  * Replace local D1/KV/R2 bindings with proxy-backed versions.
449
449
  * Called from the generated worker entry point when `__VOID_REMOTE` is set.
450
450
  */
451
- function createRemoteEnv(env) {
451
+ function createRemoteEnv(env, bindingNames) {
452
452
  const client = new ProxyClient(env.__VOID_PROXY_URL, env.__VOID_TOKEN, env.__VOID_PROJECT_ID, env);
453
+ const d1Name = bindingNames?.d1 ?? "DB";
454
+ const kvName = bindingNames?.kv ?? "KV";
455
+ const r2Name = bindingNames?.r2 ?? "STORAGE";
453
456
  return {
454
457
  ...env,
455
- ...env.DB != null && { DB: new ProxyD1Database(client, "DB") },
456
- ...env.KV != null && { KV: new ProxyKVNamespace(client, "KV") },
457
- ...env.STORAGE != null && { STORAGE: new ProxyR2Bucket(client, "STORAGE") }
458
+ ...env[d1Name] != null && { [d1Name]: new ProxyD1Database(client, d1Name) },
459
+ ...env[kvName] != null && { [kvName]: new ProxyKVNamespace(client, kvName) },
460
+ ...env[r2Name] != null && { [r2Name]: new ProxyR2Bucket(client, r2Name) }
458
461
  };
459
462
  }
460
463
  //#endregion
@@ -1,4 +1,4 @@
1
- import { i as getRawRuntimeEnv } from "../env-raw-zk5JQKZe.mjs";
1
+ import { i as getRawRuntimeEnv } from "../env-raw-RDkMnSTC.mjs";
2
2
  import { requireRuntimeBinding } from "./env.mjs";
3
3
  import { Sandbox, getSandbox as getSandbox$1 } from "@cloudflare/sandbox";
4
4
  //#region src/runtime/sandbox.ts
@@ -1,2 +1,2 @@
1
- import { C as HandlerInput, T as runValidation, w as ValidatorSlots } from "../handler-2mA_-sst.mjs";
1
+ import { C as HandlerInput, T as runValidation, w as ValidatorSlots } from "../handler-xflsMwWM.mjs";
2
2
  export { HandlerInput, ValidatorSlots, runValidation };
@@ -1,5 +1,5 @@
1
- import { n as AuthState } from "../auth-CHfPhSta.mjs";
2
- import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-BXdg2Sur.mjs";
1
+ import { n as AuthState } from "../auth-CDeb2XAl.mjs";
2
+ import { i as VoidAuthRuntimeOptions, n as VoidAuthEnv } from "../better-auth-shared-CmEQZs1T.mjs";
3
3
  import { AnyWebSocketDefinition } from "./ws.mjs";
4
4
 
5
5
  //#region src/runtime/ws-server.d.ts
@@ -1,6 +1,6 @@
1
- import { r as AuthUser } from "../auth-CHfPhSta.mjs";
2
- import { t as StandardSchemaV1 } from "../standard-schema-BDiIJgp5.mjs";
3
- import { i as CloudEnv } from "../handler-2mA_-sst.mjs";
1
+ import { r as AuthUser } from "../auth-CDeb2XAl.mjs";
2
+ import { t as StandardSchemaV1 } from "../standard-schema-Dnsh2vnl.mjs";
3
+ import { i as CloudEnv } from "../handler-xflsMwWM.mjs";
4
4
  import { WebSocketRouteMap } from "void/routes";
5
5
 
6
6
  //#region src/runtime/ws.d.ts
@@ -1,7 +1,7 @@
1
1
  import { a as join, i as isAbsolute, t as basename } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
2
  import { n as readProjectPaths } from "./project-paths-CCMrHYQm.mjs";
3
3
  import { n as globSync, t as glob } from "./dist-DR9sIMbM.mjs";
4
- import { d as isCallExpression, f as isIdentifier, h as isObjectExpression, p as isLiteral } from "./plugin-inference-Ba1uGdIy.mjs";
4
+ import { d as isCallExpression, f as isIdentifier, h as isObjectExpression, p as isLiteral } from "./plugin-inference-BUBhHt_1.mjs";
5
5
  import { o as parseRouteFilename, s as parseWebSocketFilename, t as scanPages } from "./scan-2YmJkYAf.mjs";
6
6
  import { readFileSync } from "node:fs";
7
7
  import { parseSync } from "vite";
@@ -1,8 +1,8 @@
1
1
  import { n as cliTitle } from "./output-DeiS4oEX.mjs";
2
- import { c as getToken, n as PlatformClient } from "./client-CCOKwNUz.mjs";
2
+ import { c as getToken, n as PlatformClient } from "./client-DIfOFf1W.mjs";
3
3
  import { _ as me, c as R, g as ge, n as Ce, u as Se, v as ue, x as q, y as ye } from "./dist-abzUneor.mjs";
4
4
  import { r as readProjectConfig } from "./project-CH9pdo16.mjs";
5
- import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-CNpUbUHd.mjs";
5
+ import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D4O1_fZz.mjs";
6
6
  import { readFileSync } from "node:fs";
7
7
  //#region src/cli/secret.ts
8
8
  async function runSecretCommand(root, args) {
@@ -1,6 +1,6 @@
1
1
  import { a as join, s as relative } from "./pathe.M-eThtNZ-BrPhGF_K.mjs";
2
2
  import { c as R } from "./dist-abzUneor.mjs";
3
- import { r as getPackageDir } from "./agents-Dkgafwfr.mjs";
3
+ import { r as getPackageDir } from "./agents-MhSzNMiC.mjs";
4
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, readlinkSync, symlinkSync } from "node:fs";
5
5
  //#region src/cli/skills.ts
6
6
  function parseSkills(skillsDir) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "0.8.11",
3
+ "version": "0.9.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/voidzero-dev/void.git",
@@ -82,6 +82,26 @@
82
82
  "import": "./dist/runtime/client.mjs",
83
83
  "require": "./dist/runtime/client.mjs"
84
84
  },
85
+ "./client/react": {
86
+ "types": "./dist/runtime/client-react.d.mts",
87
+ "import": "./dist/runtime/client-react.mjs",
88
+ "require": "./dist/runtime/client-react.mjs"
89
+ },
90
+ "./client/vue": {
91
+ "types": "./dist/runtime/client-vue.d.mts",
92
+ "import": "./dist/runtime/client-vue.mjs",
93
+ "require": "./dist/runtime/client-vue.mjs"
94
+ },
95
+ "./client/svelte": {
96
+ "types": "./dist/runtime/client-svelte.d.mts",
97
+ "import": "./dist/runtime/client-svelte.mjs",
98
+ "require": "./dist/runtime/client-svelte.mjs"
99
+ },
100
+ "./client/solid": {
101
+ "types": "./dist/runtime/client-solid.d.mts",
102
+ "import": "./dist/runtime/client-solid.mjs",
103
+ "require": "./dist/runtime/client-solid.mjs"
104
+ },
85
105
  "./runtime/fetch": {
86
106
  "types": "./dist/runtime/fetch.d.mts",
87
107
  "import": "./dist/runtime/fetch.mjs",
@@ -333,7 +353,7 @@
333
353
  "valibot": ">=1.0.0-beta.7",
334
354
  "vite": "^8.0.0",
335
355
  "zod": "^3.25.0 || ^4.0.0",
336
- "@void/md": "0.8.11"
356
+ "@void/md": "0.9.1"
337
357
  },
338
358
  "peerDependenciesMeta": {
339
359
  "@void/md": {
@@ -229,12 +229,12 @@ Localhost dev uses a built-in fallback secret automatically. Outside the managed
229
229
  For advanced configuration, create `auth.ts` at the project root and export `defineAuth(...)`:
230
230
 
231
231
  ```ts
232
- import { defineAuth } from "void/auth";
232
+ import { defineAuth } from 'void/auth';
233
233
 
234
234
  export default defineAuth(({ defaults }) => ({
235
235
  ...defaults,
236
- trustedOrigins: ["https://example.com"],
237
- });
236
+ trustedOrigins: ['https://example.com'],
237
+ }));
238
238
  ```
239
239
 
240
240
  `defaults` already includes Void's conventions. Extend it explicitly instead of expecting a deep merge.
@@ -150,13 +150,16 @@ Remote secrets count as "present" for deploy validation — `void deploy` checks
150
150
 
151
151
  ## Defaults
152
152
 
153
- Schema defaults from `defineEnv({ PORT: number().default(3000) })` flow into both:
153
+ Schema defaults from `defineEnv({ PORT: number().default(3000) })` flow into:
154
154
 
155
155
  - The typed `env` proxy: `env.PORT` returns `3000` when no value is set.
156
156
  - Worker bindings (`c.env.PORT`, `process.env.PORT` on Node target): the
157
157
  default value is injected as a stringified `var` in dev, in `void deploy`
158
158
  manifests, and in prerender bindings, so any code path that reads the raw
159
159
  env sees the same fallback.
160
+ - Client-exposed keys (`VITE_*` by default, or your configured `envPrefix`):
161
+ defaults are added to Vite's client env, so browser code reading
162
+ `env.VITE_APP_TITLE` sees the same fallback.
160
163
 
161
164
  User-provided `.env` / shell values always win — defaults only fill gaps.
162
165
 
@@ -244,6 +244,7 @@ Create `wrangler.jsonc` in your project root with the resource IDs from step 1:
244
244
  "binding": "DB",
245
245
  "database_name": "my-app-db",
246
246
  "database_id": "<your-database-id>",
247
+ "migrations_dir": "./db/migrations",
247
248
  },
248
249
  ],
249
250
  "kv_namespaces": [
@@ -268,10 +269,10 @@ Only include the bindings your app actually uses. You can also add service bindi
268
269
  If your app uses D1, apply migrations before deploying:
269
270
 
270
271
  ```bash
271
- wrangler d1 migrations apply DB --remote
272
+ wrangler d1 migrations apply my-app-db --remote
272
273
  ```
273
274
 
274
- This uses the same `db/migrations/` directory that Void uses locally.
275
+ This uses the same `db/migrations/` directory that Void uses locally. `my-app-db` is the database name from your `wrangler.jsonc`; using the database name avoids accidentally applying migrations to the wrong binding.
275
276
 
276
277
  ### 4. Build and deploy
277
278
 
@@ -438,6 +438,17 @@ await auth.signOut();
438
438
 
439
439
  The exact client methods come from Better Auth. In pages apps, Void automatically chooses the framework-specific Better Auth client package when available.
440
440
 
441
+ For regular SPA apps that use Void for API/file routes without Void Pages mode, import the framework-specific client explicitly:
442
+
443
+ ```ts
444
+ import { auth } from 'void/client/react';
445
+ // or: 'void/client/vue'
446
+ // or: 'void/client/svelte'
447
+ // or: 'void/client/solid'
448
+ ```
449
+
450
+ Those subpaths keep the same `fetch`, `fetchStream`, and auth exports as `void/client`, but bind `auth` and `createAuthClient` to Better Auth's framework package.
451
+
441
452
  ### `createAuthClient`
442
453
 
443
454
  Imported from `"void/client"`. Re-export of Better Auth's `createAuthClient` for advanced usage.
@@ -1084,33 +1095,34 @@ See [Markdown Pages](../guide/pages-routing/markdown.md) for setup and framework
1084
1095
 
1085
1096
  This table lists app-facing imports. Exported implementation subpaths such as `void/pages*`, `void/runtime/*`, and `void/remote*` are used by adapters, generated entries, or internal runtime wiring and are not documented as application APIs.
1086
1097
 
1087
- | Import path | Contents |
1088
- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1089
- | `void` | `voidPlugin`, handler/type re-exports, `defer`, `Deferred`, `DeferredState`, `InferProps`, `HeadDescriptor` |
1090
- | `void/handler` | `defineHandler`, `defineMiddleware`, `defineScheduled`, `defineQueue`, `defineRender`, `defineHead`, types |
1091
- | `void/auth` | `defineAuth`, `getUser`, `getSession`, `requireAuth`, `AuthUser`, `AuthSession`, `AuthState` |
1092
- | `void/client` | `fetch`, `fetchStream`, `FetchError`, `auth`, `createAuthClient`, `AuthUser`, `AuthSession`, `AuthState` |
1093
- | `void/ws` | `defineRoom`, `defineWebSocket`, `connect`, WebSocket context and connection types |
1094
- | `void/sse` | `eventStream`, `formatSse`, `formatSseText`, `getLastEventId`, `SseStreamClosedError`, SSE message and stream types |
1095
- | `void/sse/client` | `connectEventStream`, browser `EventSource` wrapper types |
1096
- | `void/live` | `defineLiveStream`, SSE topic fanout runtime types. Server-only. |
1097
- | `void/live/client` | `connectLiveStream`, browser helper for one SSE connection plus POST subscribe/unsubscribe control. |
1098
- | `void/response` | `convertReturnValue` |
1099
- | `void/validator` | `runValidation`, `ValidatorSlots`, `HandlerInput` |
1100
- | `void/drizzle-zod` | Re-exports [`drizzle-zod`](https://orm.drizzle.team/docs/zod) for schema-derived Zod validators for Drizzle tables |
1101
- | `void/drizzle-valibot` | Re-exports [`drizzle-valibot`](https://orm.drizzle.team/docs/typebox) for schema-derived Valibot validators for Drizzle tables |
1102
- | `void/drizzle-arktype` | Re-exports [`drizzle-arktype`](https://orm.drizzle.team/docs/arktype) for schema-derived ArkType validators for Drizzle tables |
1103
- | `void/schema-d1` | Re-exports [`drizzle-orm/sqlite-core`](https://orm.drizzle.team/docs/column-types/sqlite) for D1 table and column builders |
1104
- | `void/schema-pg` | Re-exports [`drizzle-orm/pg-core`](https://orm.drizzle.team/docs/column-types/pg) for PostgreSQL table and column builders |
1105
- | `void/db` | `db` (Drizzle D1 or PostgreSQL instance for the active dialect), `createDb`, query operators (`eq`, `and`, `or`, `desc`, `like`, `inArray`, etc.) |
1106
- | `void/seed` | `defineSeed`, `SeedContext`, `SeedFn` for programmatic `void db seed` modules |
1107
- | `void/kv` | `kv`, `createKV`, typed KV client/map types |
1108
- | `void/storage` | `storage`, `createStorage` for the inferred R2 binding or a specific `R2Bucket` |
1109
- | `void/ai` | `ai`, `VoidAi`, model input and response types |
1110
- | `void/isr` | `revalidate(options)` for on-demand ISR cache invalidation |
1111
- | `void/log` | `logger` structured logging helper |
1112
- | `void/routes` | `RouteMap` and `WebSocketRouteMap` stubs (types only) |
1113
- | `void/queues` | `queues` proxy for sending messages to typed queues |
1114
- | `void/sandbox` | `getSandbox`, `sandbox`, `Sandbox`, and sandbox option types from the Cloudflare Sandbox SDK. `getSandbox(id)` resolves to the same Durable Object instance for a given `id` across all deploys and rollbacks. DO-level storage (`ctx.storage`) is durable; the container filesystem, processes, and exposed ports are tied to a single container lifetime and are lost on idle (`sleepAfter`, default `10m`), crash, or platform restart. See [Sandboxes › State persistence](../guide/sandboxes.md#state-persistence). |
1115
- | `void/env` | `defineEnv`, `env`, schema helpers (`string`, `number`, `boolean`, `url`, `email`, `oneOf`, `json`), and global Cloudflare env types |
1116
- | `void/sveltekit` | SvelteKit integration helpers: `withVoidTSConfig()` and `mergeVoidSvelteKitTsconfig()` |
1098
+ | Import path | Contents |
1099
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1100
+ | `void` | `voidPlugin`, handler/type re-exports, `defer`, `Deferred`, `DeferredState`, `InferProps`, `HeadDescriptor` |
1101
+ | `void/handler` | `defineHandler`, `defineMiddleware`, `defineScheduled`, `defineQueue`, `defineRender`, `defineHead`, types |
1102
+ | `void/auth` | `defineAuth`, `getUser`, `getSession`, `requireAuth`, `AuthUser`, `AuthSession`, `AuthState` |
1103
+ | `void/client` | `fetch`, `fetchStream`, `FetchError`, `auth`, `createAuthClient`, `AuthUser`, `AuthSession`, `AuthState` |
1104
+ | `void/client/{framework}` | Same as `void/client`, with framework-specific Better Auth clients for `react`, `vue`, `svelte`, and `solid` |
1105
+ | `void/ws` | `defineRoom`, `defineWebSocket`, `connect`, WebSocket context and connection types |
1106
+ | `void/sse` | `eventStream`, `formatSse`, `formatSseText`, `getLastEventId`, `SseStreamClosedError`, SSE message and stream types |
1107
+ | `void/sse/client` | `connectEventStream`, browser `EventSource` wrapper types |
1108
+ | `void/live` | `defineLiveStream`, SSE topic fanout runtime types. Server-only. |
1109
+ | `void/live/client` | `connectLiveStream`, browser helper for one SSE connection plus POST subscribe/unsubscribe control. |
1110
+ | `void/response` | `convertReturnValue` |
1111
+ | `void/validator` | `runValidation`, `ValidatorSlots`, `HandlerInput` |
1112
+ | `void/drizzle-zod` | Re-exports [`drizzle-zod`](https://orm.drizzle.team/docs/zod) for schema-derived Zod validators for Drizzle tables |
1113
+ | `void/drizzle-valibot` | Re-exports [`drizzle-valibot`](https://orm.drizzle.team/docs/typebox) for schema-derived Valibot validators for Drizzle tables |
1114
+ | `void/drizzle-arktype` | Re-exports [`drizzle-arktype`](https://orm.drizzle.team/docs/arktype) for schema-derived ArkType validators for Drizzle tables |
1115
+ | `void/schema-d1` | Re-exports [`drizzle-orm/sqlite-core`](https://orm.drizzle.team/docs/column-types/sqlite) for D1 table and column builders |
1116
+ | `void/schema-pg` | Re-exports [`drizzle-orm/pg-core`](https://orm.drizzle.team/docs/column-types/pg) for PostgreSQL table and column builders |
1117
+ | `void/db` | `db` (Drizzle D1 or PostgreSQL instance for the active dialect), `createDb`, query operators (`eq`, `and`, `or`, `desc`, `like`, `inArray`, etc.) |
1118
+ | `void/seed` | `defineSeed`, `SeedContext`, `SeedFn` for programmatic `void db seed` modules |
1119
+ | `void/kv` | `kv`, `createKV`, typed KV client/map types |
1120
+ | `void/storage` | `storage`, `createStorage` for the inferred R2 binding or a specific `R2Bucket` |
1121
+ | `void/ai` | `ai`, `VoidAi`, model input and response types |
1122
+ | `void/isr` | `revalidate(options)` for on-demand ISR cache invalidation |
1123
+ | `void/log` | `logger` structured logging helper |
1124
+ | `void/routes` | `RouteMap` and `WebSocketRouteMap` stubs (types only) |
1125
+ | `void/queues` | `queues` proxy for sending messages to typed queues |
1126
+ | `void/sandbox` | `getSandbox`, `sandbox`, `Sandbox`, and sandbox option types from the Cloudflare Sandbox SDK. `getSandbox(id)` resolves to the same Durable Object instance for a given `id` across all deploys and rollbacks. DO-level storage (`ctx.storage`) is durable; the container filesystem, processes, and exposed ports are tied to a single container lifetime and are lost on idle (`sleepAfter`, default `10m`), crash, or platform restart. See [Sandboxes › State persistence](../guide/sandboxes.md#state-persistence). |
1127
+ | `void/env` | `defineEnv`, `env`, schema helpers (`string`, `number`, `boolean`, `url`, `email`, `oneOf`, `json`), and global Cloudflare env types |
1128
+ | `void/sveltekit` | SvelteKit integration helpers: `withVoidTSConfig()` and `mergeVoidSvelteKitTsconfig()` |
@@ -10,32 +10,33 @@ Use this page as a command reference. If you are setting up a project for the fi
10
10
 
11
11
  ## Cheat Sheet
12
12
 
13
- | Command | Purpose |
14
- | --------------------------------- | ------------------------------------------------ |
15
- | `void deploy` | Build and deploy to Void |
16
- | `void prepare` | Generate `.void` artifacts without starting Vite |
17
- | `void gen model <name> [cols...]` | Scaffold migration + CRUD routes |
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 |
21
- | `void db status` | Show local/remote migration status |
22
- | `void db reset` | Drop and re-apply all migrations |
23
- | `void db seed` | Reset + seed local database |
24
- | `void db studio` | Open Drizzle Studio for local database |
25
- | `void secret put <name=value>` | Set a production secret |
26
- | `void secret list` | List production secrets |
27
- | `void secret sync .env.local` | Bulk upload secrets from dotenv file |
28
- | `void env check [--remote]` | Validate env.ts schema |
29
- | `void env types` | Regenerate .void/env.d.ts from env.ts |
30
- | `void env example` | Refresh the void-managed block in .env.example |
31
- | `void auth login` | Authenticate with Void |
32
- | `void project link` | Link directory to a project |
33
- | `void project logs` | Show runtime logs from deployed project |
34
- | `void project rollback` | Roll back to a previous deployment |
35
- | `void project cancel` | Cancel an active deployment |
36
- | `void project purge-cache` | Purge all cached pages |
37
- | `void mcp` | Start the Void MCP server |
38
- | `void init` | Setup wizard for new or existing projects |
13
+ | Command | Purpose |
14
+ | --------------------------------- | ------------------------------------------------------------------- |
15
+ | `void deploy` | Build and deploy to Void |
16
+ | `void prepare` | Generate `.void` artifacts without starting Vite |
17
+ | `void gen model <name> [cols...]` | Scaffold migration + CRUD routes |
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 |
21
+ | `void db status` | Show local/remote migration status |
22
+ | `void db reset` | Drop and re-apply all migrations |
23
+ | `void db seed` | Reset + seed local database |
24
+ | `void db execute <sql>` | Run SQL against the database (--remote for deployed) |
25
+ | `void db studio` | Open Drizzle Studio (--remote for the deployed PostgreSQL database) |
26
+ | `void secret put <name=value>` | Set a production secret |
27
+ | `void secret list` | List production secrets |
28
+ | `void secret sync .env.local` | Bulk upload secrets from dotenv file |
29
+ | `void env check [--remote]` | Validate env.ts schema |
30
+ | `void env types` | Regenerate .void/env.d.ts from env.ts |
31
+ | `void env example` | Refresh the void-managed block in .env.example |
32
+ | `void auth login` | Authenticate with Void |
33
+ | `void project link` | Link directory to a project |
34
+ | `void project logs` | Show runtime logs from deployed project |
35
+ | `void project rollback` | Roll back to a previous deployment |
36
+ | `void project cancel` | Cancel an active deployment |
37
+ | `void project purge-cache` | Purge all cached pages |
38
+ | `void mcp` | Start the Void MCP server |
39
+ | `void init` | Setup wizard for new or existing projects |
39
40
 
40
41
  ## Binary Invocation
41
42
 
@@ -289,9 +290,17 @@ Programmatic seed modules must export either a default function or a named `seed
289
290
  ```
290
291
  void db execute <sql>
291
292
  void db execute --file <path>
293
+ void db execute --remote <sql>
292
294
  ```
293
295
 
294
- Run ad-hoc SQL against the local D1 database. Provide SQL inline or from a file. SELECT queries display results as a formatted table; other statements execute silently.
296
+ Run ad-hoc SQL against the database. Provide SQL inline or from a file. SELECT queries display results as a formatted table; other statements execute silently.
297
+
298
+ By default, targets the local database. Pass `--remote` to run against the deployed database:
299
+
300
+ - **D1 projects**: routes the query through the Void proxy (`proxy.void.cloud/d1/query`) using your auth token. No Cloudflare credentials needed.
301
+ - **PostgreSQL projects**: fetches the stored connection string from the platform and connects directly. Requires that `void db set-url` has been run at least once (the platform stores the URL encrypted). If the URL isn't stored yet, you will see: _"Run `void db set-url` once to populate it, then retry."_
302
+
303
+ For destructive statements (`DELETE`, `UPDATE`, `DROP`, etc.) when running in a TTY, you will be prompted to confirm before the query is sent to the deployed database. Non-TTY environments (CI) skip the prompt.
295
304
 
296
305
  ### `void db migrate`
297
306
 
@@ -305,7 +314,16 @@ Pass `--remote` to apply pending migrations to the remote database instead. Requ
305
314
 
306
315
  ### `void db studio`
307
316
 
308
- Open [Drizzle Studio](https://orm.drizzle.team/docs/drizzle-kit-studio) for the local database. Launches a web-based GUI for browsing and editing your data.
317
+ ```
318
+ void db studio [--remote]
319
+ ```
320
+
321
+ Open [Drizzle Studio](https://orm.drizzle.team/docs/drizzle-kit-studio) for the database. Launches a web-based GUI for browsing and editing your data.
322
+
323
+ By default, targets the local database. Pass `--remote` to open Studio against the deployed database:
324
+
325
+ - **PostgreSQL projects**: fetches the stored connection string from the platform and opens Studio against it. Requires being logged in (`void auth login`) with a linked project. If the URL isn't stored yet, run `void db set-url` first.
326
+ - **D1 projects**: remote Studio is not yet supported. Use `void db execute --remote` for ad-hoc queries against your deployed D1 database.
309
327
 
310
328
  ### `void db rename-migrations`
311
329
 
@@ -399,7 +399,7 @@ Each binding accepts `true` (use default name), `false` (disable), or a string (
399
399
  | `storage` | `STORAGE` | `R2Bucket` | `"storage": "MY_BUCKET"` |
400
400
  | `ai` | `AI` | `Ai` | Boolean only |
401
401
 
402
- Custom names are used in the deploy manifest and in wrangler binding sync for local dev.
402
+ Custom names are used in the deploy manifest, Wrangler config generation/sync, remote binding proxying, internal migrations, and generated runtime helpers such as `void/db`, `void/kv`, and `void/storage`.
403
403
 
404
404
  #### `inference.build`
405
405
 
@@ -18,17 +18,17 @@ This runs once before plugins initialize, so the results are available to config
18
18
 
19
19
  ## Detected Bindings
20
20
 
21
- | Binding | Type | Detected by import | Detected by env access |
22
- | --------- | --------------------------------- | ------------------------------------------------------------------------- | -------------------------------- |
23
- | `DB` | `D1Database` | `import { db } from "void/db"` | `env.DB` or `c.env.DB` |
24
- | `KV` | `KVNamespace` | `import { kv } from "void/kv"` | `env.KV` or `c.env.KV` |
25
- | `STORAGE` | `R2Bucket` | `import { storage } from "void/storage"` | `env.STORAGE` or `c.env.STORAGE` |
26
- | `AI` | `Ai` | `import { ai } from "void/ai"` | `env.AI` or `c.env.AI` |
27
- | `SANDBOX` | `DurableObjectNamespace<Sandbox>` | `import { getSandbox } from "void/sandbox"` | `env.SANDBOX` or `c.env.SANDBOX` |
28
- | Auth | none | `import { ... } from "void/auth"` or `import { auth } from "void/client"` | none |
29
- | `QUEUE_*` | `Queue` | `import { queues } from "void/queues"` | `env.QUEUE_*` |
30
-
31
- Auth detection also triggers when importing the `auth` specifier from `void/client` (but not when importing only `fetch`).
21
+ | Binding | Type | Detected by import | Detected by env access |
22
+ | --------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
23
+ | `DB` | `D1Database` | `import { db } from "void/db"` | `env.DB` or `c.env.DB` |
24
+ | `KV` | `KVNamespace` | `import { kv } from "void/kv"` | `env.KV` or `c.env.KV` |
25
+ | `STORAGE` | `R2Bucket` | `import { storage } from "void/storage"` | `env.STORAGE` or `c.env.STORAGE` |
26
+ | `AI` | `Ai` | `import { ai } from "void/ai"` | `env.AI` or `c.env.AI` |
27
+ | `SANDBOX` | `DurableObjectNamespace<Sandbox>` | `import { getSandbox } from "void/sandbox"` | `env.SANDBOX` or `c.env.SANDBOX` |
28
+ | Auth | none | `import { ... } from "void/auth"` or `import { auth } from "void/client"` / `void/client/react` / `void/client/vue` / `void/client/svelte` / `void/client/solid` | none |
29
+ | `QUEUE_*` | `Queue` | `import { queues } from "void/queues"` | `env.QUEUE_*` |
30
+
31
+ Auth detection also triggers when importing the `auth` specifier from `void/client` or a framework-specific client subpath such as `void/client/react` (but not when importing only `fetch`).
32
32
 
33
33
  ## Scanned Directories
34
34
 
File without changes