void 1.12.0 → 1.12.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 (123) hide show
  1. package/dist/{account-cmd-D_0qJ9fx.mjs → account-cmd-BU1Fy_Bf.mjs} +4 -4
  2. package/dist/{application-analysis-Cx2S63z5.mjs → application-analysis-DVeN8yoi.mjs} +1 -1
  3. package/dist/{application-routing-BAXpnawu.mjs → application-routing-KKw4Y84h.mjs} +1 -1
  4. package/dist/{auth-Boz0lrb3.mjs → auth-A7cZ8aXA.mjs} +1 -1
  5. package/dist/{auth-DlLDymuc.mjs → auth-CqwJwItO.mjs} +1 -1
  6. package/dist/{auth-link-C97r9p2N.mjs → auth-link-Duu2NvN5.mjs} +4 -4
  7. package/dist/{auth-router-BmzEgzYx.mjs → auth-router-vgtOdb9j.mjs} +1 -1
  8. package/dist/{build-cmd-BaFsyZrz.mjs → build-cmd-B7OJ0U5R.mjs} +2 -2
  9. package/dist/build-id-4IV4hC1-.mjs +13 -0
  10. package/dist/{cache-xO711ATQ.mjs → cache-wSpi3aeM.mjs} +2 -2
  11. package/dist/{cancel-deploy-Di11ynsr.mjs → cancel-deploy-DMWzkAlb.mjs} +2 -2
  12. package/dist/{cf-access-FaIm95jA.mjs → cf-access-DHklo7Rg.mjs} +33 -19
  13. package/dist/{cf-build-output-Ca201_n1.mjs → cf-build-output-Cso7Vh-t.mjs} +4 -2
  14. package/dist/cf-build-output-Wpk_e5CI.mjs +1 -0
  15. package/dist/cli/cli.mjs +1 -1
  16. package/dist/cli/cloudflare-operation-process.mjs +1 -1
  17. package/dist/cli/db-execute-process.d.mts +2 -0
  18. package/dist/cli/db-execute-process.mjs +57 -0
  19. package/dist/{cli-main-DlW6lB8s.mjs → cli-main-BrChcpE3.mjs} +37 -344
  20. package/dist/{client-ImIe7Mjq.mjs → client-DE2m2ldh.mjs} +4 -4
  21. package/dist/{client-DkYzDEC0.mjs → client-eLZwqkPH.mjs} +1 -1
  22. package/dist/{cloudflare-operations-BF0PSErW.mjs → cloudflare-operations-BIRQkYwL.mjs} +14 -8
  23. package/dist/cloudflare-operations-ByjFGats.mjs +1 -0
  24. package/dist/{connect-DDRQGfFE.mjs → connect-D0V0o40j.mjs} +4 -4
  25. package/dist/{create-project-CY7sP8sI.mjs → create-project-8FdN6D2i.mjs} +2 -2
  26. package/dist/{create-project-Dro3K-az.mjs → create-project-CbuDH5Hv.mjs} +1 -1
  27. package/dist/{db-DmlaWVBu.mjs → db-BNPIjLkK.mjs} +1348 -69
  28. package/dist/db-args-BvMwAber.mjs +1 -0
  29. package/dist/db-args-CiQVg8SJ.mjs +321 -0
  30. package/dist/{delete-Uuq9ch6o.mjs → delete-WtLEfap2.mjs} +2 -2
  31. package/dist/{deploy-B9E7_rHC.mjs → deploy-BgSbagIP.mjs} +14 -14
  32. package/dist/{deploy-BB3rsZbP.mjs → deploy-Do6FWqon.mjs} +1 -1
  33. package/dist/{deploy-managed-static-IKZyuc1W.mjs → deploy-managed-static-BWBsxOww.mjs} +5 -5
  34. package/dist/{deploy-security-notice-C3LalelR.mjs → deploy-security-notice-IRGy6Edf.mjs} +2 -2
  35. package/dist/deploy.mjs +4 -4
  36. package/dist/{domain-B_xY1yZ5.mjs → domain-mweyYXSw.mjs} +3 -3
  37. package/dist/{email-BIC15L7a.mjs → email-DcQNP40O.mjs} +5 -5
  38. package/dist/{email-cloudflare-C447nOqq.mjs → email-cloudflare-DeYH3Ke7.mjs} +2 -2
  39. package/dist/{env-DJPZYHT5.mjs → env-DaAoYR2-.mjs} +3 -3
  40. package/dist/{gen-DiTZlDx8.mjs → gen-aOtHhZLD.mjs} +1 -1
  41. package/dist/gen-vhBDHs3q.mjs +1 -0
  42. package/dist/{github-cmd-DPmby8x-.mjs → github-cmd-BR19Ffdz.mjs} +2 -2
  43. package/dist/{help-9wfMyXHb.mjs → help-DvClCzqL.mjs} +9 -1
  44. package/dist/help-fKPzcTJv.mjs +1 -0
  45. package/dist/index.mjs +16 -206
  46. package/dist/{info-BWEWaOBo.mjs → info-P6MBiVJi.mjs} +2 -2
  47. package/dist/{init-BuTPVLPO.mjs → init-C8YpkGIP.mjs} +63 -18
  48. package/dist/installed-packages-tfmYd-cC.mjs +198 -0
  49. package/dist/{link-BiesPyT4.mjs → link-Dyz9IGcM.mjs} +3 -3
  50. package/dist/{list-CkonftPQ.mjs → list-VGYBMjmx.mjs} +4 -4
  51. package/dist/{login-BSOSah1j.mjs → login-CWFr-G2I.mjs} +3 -3
  52. package/dist/login-DECm3e9b.mjs +1 -0
  53. package/dist/{logs-HOBUnroa.mjs → logs-kS1wuR4b.mjs} +3 -3
  54. package/dist/module-references-DWQmO6TW.mjs +27 -0
  55. package/dist/{mysql-sql-CB52k8tQ.mjs → mysql-lock-D8xtnI-D.mjs} +1 -118
  56. package/dist/mysql-sql-BIE7bc4Z.mjs +124 -0
  57. package/dist/{operator-ai-logging-ZDqqhnIq.mjs → operator-ai-logging-DD0n6zc2.mjs} +3 -3
  58. package/dist/{operator-args-DCkWbgT-.mjs → operator-args-nvetCWuz.mjs} +1 -1
  59. package/dist/{operator-auth-BjoPLgja.mjs → operator-auth-DMvn-y9X.mjs} +1 -1
  60. package/dist/{operator-client-DzebIntv.mjs → operator-client-dFNnXfyB.mjs} +4 -3
  61. package/dist/operator-cmd-CVfK5U0B.mjs +1 -0
  62. package/dist/{operator-cmd-AZoeI9Pl.mjs → operator-cmd-a7yOf2tH.mjs} +13 -9
  63. package/dist/{operator-security-Bo26FP01.mjs → operator-security-D5MToU0p.mjs} +1 -1
  64. package/dist/pages/client.mjs +77 -9
  65. package/dist/pages/index.d.mts +6 -0
  66. package/dist/pages/index.mjs +276 -6
  67. package/dist/pages/protocol.mjs +1 -1
  68. package/dist/platform-args-CMwMoiLp.mjs +1 -0
  69. package/dist/{platform-args-lwCyQ6Xy.mjs → platform-args-CvZSuhYS.mjs} +1 -1
  70. package/dist/{platform-auth-config-DLRMPw1G.mjs → platform-auth-config-CpszX-Ne.mjs} +7 -7
  71. package/dist/{platform-auth-protection-HSmLmD3d.mjs → platform-auth-protection-DA6Tw8Og.mjs} +5 -5
  72. package/dist/{platform-auth-recovery-BXPhTlKa.mjs → platform-auth-recovery-Cztrb1JC.mjs} +4 -4
  73. package/dist/{platform-cmd-DJ-fOYhL.mjs → platform-cmd-m6Asj6nO.mjs} +6 -6
  74. package/dist/{platform-cmd-CqRjxFEU.mjs → platform-cmd-u1j88ggF.mjs} +1 -1
  75. package/dist/{platform-domain-CRsRJOws.mjs → platform-domain-DJSznNTA.mjs} +2 -2
  76. package/dist/{platform-lifecycle-bx_kpqo7.mjs → platform-lifecycle-BC-9p58d.mjs} +1 -1
  77. package/dist/{platform-lifecycle-fau3VKv6.mjs → platform-lifecycle-GFeXv3NC.mjs} +58 -11
  78. package/dist/{platform-management-BRGhD-oF.mjs → platform-management-BwHkz46V.mjs} +1 -1
  79. package/dist/{platform-management-CnKBdDx5.mjs → platform-management-DX1zINou.mjs} +4 -4
  80. package/dist/{platform-plans-config-2C3_5EDs.mjs → platform-plans-config-DiydtNKY.mjs} +3 -3
  81. package/dist/{platform-recovery-poxgOOAY.mjs → platform-recovery-CnzBbudV.mjs} +2 -2
  82. package/dist/{platform-setup-DYylapHD.mjs → platform-setup-Lph9i-rh.mjs} +1 -1
  83. package/dist/{plugin-inference-7O11_E4H.mjs → plugin-inference-COlq96WJ.mjs} +2 -27
  84. package/dist/prepare-DcwigRUS.mjs +1 -0
  85. package/dist/{prepare-DWjn1Lzd.mjs → prepare-WvijE289.mjs} +1 -1
  86. package/dist/{prepare-BbvlKreR.mjs → prepare-co1o1FFd.mjs} +1 -1
  87. package/dist/{project-cmd-DyUEFi2b.mjs → project-cmd-BWJTplpc.mjs} +18 -18
  88. package/dist/{project-security-DZEQgnsS.mjs → project-security-BV1xfj1K.mjs} +1 -1
  89. package/dist/{project-security--tYGFPGo.mjs → project-security-CY_aahvW.mjs} +2 -2
  90. package/dist/{project-team-BszTHgzC.mjs → project-team-BlIFXlmT.mjs} +2 -2
  91. package/dist/{project-token-DBDy4NdV.mjs → project-token-CMsB7I1-.mjs} +2 -2
  92. package/dist/{project-zero-trust-D9sUouij.mjs → project-zero-trust-BI6pdpx4.mjs} +2 -2
  93. package/dist/{protocol-CE3wP-H1.mjs → protocol-4rEnumif.mjs} +10 -3
  94. package/dist/{redirect-DD825Stf.mjs → redirect-Dyvuil0Q.mjs} +5 -2
  95. package/dist/{requests-CBokjiOi.mjs → requests-CfmJxNYg.mjs} +2 -2
  96. package/dist/{rollback-CEeHNFUn.mjs → rollback-DL5HuAsM.mjs} +3 -3
  97. package/dist/{runner-mysql-3XDKrn-g.mjs → runner-mysql-D549vGGm.mjs} +2 -1
  98. package/dist/{runner-mysql-r688x6Y9.mjs → runner-mysql-DOjbj-N1.mjs} +1 -1
  99. package/dist/runtime/db/migrations/mysql-handler.mjs +2 -1
  100. package/dist/runtime/routing/index.mjs +2 -2
  101. package/dist/{secret-Deqo3n_N.mjs → secret-C-WBaUSS.mjs} +3 -3
  102. package/docs/guide/jobs.md +1 -1
  103. package/docs/guide/pages-routing/actions-and-forms.md +36 -15
  104. package/docs/guide/pages-routing/errors.md +3 -1
  105. package/docs/guide/pages-routing/overview.md +20 -0
  106. package/docs/guide/platform/administration/zero-trust.md +1 -1
  107. package/docs/guide/platform/installation/maintenance.md +3 -3
  108. package/docs/guide/queues.md +1 -1
  109. package/docs/integrations/frameworks/sveltekit.md +1 -1
  110. package/docs/reference/api/pages.md +4 -0
  111. package/docs/reference/cli/database.md +42 -6
  112. package/docs/reference/cli/platform-security.md +1 -1
  113. package/docs/reference/cli/platform-zero-trust.md +4 -3
  114. package/docs/reference/cli/setup.md +4 -0
  115. package/package.json +7 -7
  116. package/dist/cf-build-output-Dy7N0hQN.mjs +0 -1
  117. package/dist/cloudflare-operations-dpRD-2Px.mjs +0 -1
  118. package/dist/gen-CQDiPi8m.mjs +0 -1
  119. package/dist/help-Dy3w4rPq.mjs +0 -1
  120. package/dist/login-DWCZeCX9.mjs +0 -1
  121. package/dist/operator-cmd-DEnHFmJF.mjs +0 -1
  122. package/dist/platform-args-DNbNZ_RR.mjs +0 -1
  123. package/dist/prepare-BmG2E6TI.mjs +0 -1
@@ -36,6 +36,7 @@ async function fetchPages(url, options, followGetRedirects = true) {
36
36
  headers
37
37
  };
38
38
  let redirectedTo;
39
+ const finalMethod = () => (init.method ?? "GET").toUpperCase();
39
40
  for (let redirects = 0; redirects <= 20; redirects++) {
40
41
  const response = await fetch(url.split("#")[0], init);
41
42
  const status = Number(response.headers.get(REDIRECT_HEADER));
@@ -49,7 +50,8 @@ async function fetchPages(url, options, followGetRedirects = true) {
49
50
  }
50
51
  return {
51
52
  response,
52
- redirectedTo
53
+ redirectedTo,
54
+ method: finalMethod()
53
55
  };
54
56
  }
55
57
  await response.body?.cancel();
@@ -66,7 +68,8 @@ async function fetchPages(url, options, followGetRedirects = true) {
66
68
  const get = status === 303 && method !== "GET" && method !== "HEAD" || (status === 301 || status === 302) && method === "POST";
67
69
  if (!isSameOrigin(destination, window.location.origin) || !followGetRedirects && (get || method === "GET" || method === "HEAD")) return {
68
70
  response,
69
- redirectedTo
71
+ redirectedTo,
72
+ method: finalMethod()
70
73
  };
71
74
  if (get) {
72
75
  for (const name of Object.keys(headers)) if (/^content-(?:type|length|encoding|language|location)$/i.test(name)) delete headers[name];
@@ -1,6 +1,6 @@
1
1
  import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
2
- import { c as getToken } from "./auth-DlLDymuc.mjs";
3
- import { r as PlatformClient } from "./client-ImIe7Mjq.mjs";
2
+ import { c as getToken } from "./auth-CqwJwItO.mjs";
3
+ import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
4
  import { h as import_picocolors, o as dim } from "./output-BZLnu0z8.mjs";
5
5
  import { r as readProjectConfig } from "./project-dh9431bN.mjs";
6
6
  // src/cli/requests.ts
@@ -1,6 +1,6 @@
1
1
  import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
- import { c as getToken } from "./auth-DlLDymuc.mjs";
3
- import { r as PlatformClient } from "./client-ImIe7Mjq.mjs";
2
+ import { c as getToken } from "./auth-CqwJwItO.mjs";
3
+ import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
4
  import { a as createSpinner, c as formatCount, d as formatRelativeTime, o as dim, y as printSuccess } from "./output-BZLnu0z8.mjs";
5
5
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-dh9431bN.mjs";
6
6
  // src/cli/rollback.ts
@@ -78,7 +78,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
78
78
  }
79
79
  }
80
80
  async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
81
- const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-dpRD-2Px.mjs");
81
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-ByjFGats.mjs");
82
82
  const context = resolveCloudflareOperationContext(root);
83
83
  const status = await readCloudflareWorkerStatus(context);
84
84
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -1,4 +1,5 @@
1
- import { a as mySqlMigrationLockError, o as mySqlMigrationLockName, s as readMySqlMigrationLease, t as splitMySqlMigrationSql } from "./mysql-sql-CB52k8tQ.mjs";
1
+ import { a as readMySqlMigrationLease, i as mySqlMigrationLockName, r as mySqlMigrationLockError } from "./mysql-lock-D8xtnI-D.mjs";
2
+ import { n as splitMySqlMigrationSql } from "./mysql-sql-BIE7bc4Z.mjs";
2
3
  import { t as collectMigrations } from "./collect-rNLybAnF.mjs";
3
4
  // src/migrations/runner-mysql.ts
4
5
  async function readMySqlAppliedMigrations(client) {
@@ -1 +1 @@
1
- export { t as applyMySqlMigrations, n as applyPendingMySqlMigrations, r as getMySqlAppliedMigrations, i as readMySqlAppliedMigrations, a as runMySqlMigrations, o as toMySqlClient, s as withMySqlMigrationLock, c as withMySqlMigrationLockAt } from "./runner-mysql-3XDKrn-g.mjs";
1
+ export { t as applyMySqlMigrations, n as applyPendingMySqlMigrations, r as getMySqlAppliedMigrations, i as readMySqlAppliedMigrations, a as runMySqlMigrations, o as toMySqlClient, s as withMySqlMigrationLock, c as withMySqlMigrationLockAt } from "./runner-mysql-D549vGGm.mjs";
@@ -1,4 +1,5 @@
1
- import { i as holdMySqlMigrationLease, n as splitMySqlMigrationStatements, r as acquireMySqlMigrationLease } from "../../../mysql-sql-CB52k8tQ.mjs";
1
+ import { n as holdMySqlMigrationLease, t as acquireMySqlMigrationLease } from "../../../mysql-lock-D8xtnI-D.mjs";
2
+ import { r as splitMySqlMigrationStatements } from "../../../mysql-sql-BIE7bc4Z.mjs";
2
3
  // src/runtime/db/migrations/mysql-handler.ts
3
4
  function createMigrationHandler(env, migrations, runAuthMigrations) {
4
5
  return async (request) => {
@@ -1,10 +1,10 @@
1
1
  import { a as hasActionKey, c as searchWithoutActionKey, i as actionKeySegment, l as searchWithoutPreservedQuery, o as markActionKey, r as PRESERVED_QUERY_HEADER, s as queryKey, t as decodePagePath } from "../../url-DBQluotE.mjs";
2
- import { n as pagesRedirectResponse } from "../../redirect-DD825Stf.mjs";
2
+ import { n as pagesRedirectResponse } from "../../redirect-Dyvuil0Q.mjs";
3
3
  import { i as authDependentRequests, n as markStaticAsset, r as SHARED_CACHE_HEADERS, t as isUnchangedStaticAsset } from "../../static-asset-marker-lxYeKvFP.mjs";
4
4
  import { t as VoidAssetRewriteError } from "../../handler-DCrDLzw2.mjs";
5
5
  import { t as convertReturnValue } from "../../response-CyXsGfOy.mjs";
6
6
  import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../../assets-Br6_BeFJ.mjs";
7
- import { i as recoverPageHttpException, n as handlePageGet, o as handlesPageLoaderNotFound, r as handlePageMutation, s as ownsLoaderNotFoundBoundary } from "../../protocol-CE3wP-H1.mjs";
7
+ import { i as recoverPageHttpException, n as handlePageGet, o as handlesPageLoaderNotFound, r as handlePageMutation, s as ownsLoaderNotFoundBoundary } from "../../protocol-4rEnumif.mjs";
8
8
  import { r as toUrlString, t as interpolateRouteParams } from "../../route-url-B41eQ8QI.mjs";
9
9
  import { t as renderDefaultErrorPage } from "../../error-pages-GORL6F_e.mjs";
10
10
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -1,6 +1,6 @@
1
1
  import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
- import { c as getToken } from "./auth-DlLDymuc.mjs";
3
- import { r as PlatformClient } from "./client-ImIe7Mjq.mjs";
2
+ import { c as getToken } from "./auth-CqwJwItO.mjs";
3
+ import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
4
  import { _ as validateSecretValues } from "./env-validation-D-v5_CWL.mjs";
5
5
  import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
6
6
  import { c as formatCount, g as note, y as printSuccess } from "./output-BZLnu0z8.mjs";
@@ -98,7 +98,7 @@ async function resolveSecretBackend(root, args) {
98
98
  }
99
99
  async function resolveCloudflareSecretBackend(root, args) {
100
100
  if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
101
- const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-dpRD-2Px.mjs");
101
+ const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-ByjFGats.mjs");
102
102
  const context = resolveCloudflareOperationContext(root);
103
103
  return {
104
104
  target: "Cloudflare Worker",
@@ -62,7 +62,7 @@ Content-Type: application/json
62
62
 
63
63
  Set `cron` to an expression exported by your job. A successful call returns `{ "ok": true }`.
64
64
 
65
- The endpoint requires a local dev trigger token. Void prints a paste-ready curl command with the current token when the dev server starts.
65
+ The endpoint requires a local dev trigger token. Void prints a paste-ready curl command with the current token when the dev server starts. The development trigger is unavailable in `vp preview` and `vite preview`.
66
66
 
67
67
  ```bash
68
68
  curl -X POST http://localhost:5173/__void/scheduled \
@@ -34,9 +34,9 @@ Middleware does not run again after the action. To change [shared data](./layout
34
34
 
35
35
  ## Form
36
36
 
37
- Pair `Form` with `useForm` to submit values and display validation and action errors. Inputs stay editable when a submission fails.
37
+ Pair `Form` with `useForm` to submit values. Inputs stay editable when a submission fails. `Form` shows an alert above the fields when there is an error. The alert shows the action error from `form.error` when present and joins the messages from `form.errors` otherwise.
38
38
 
39
- Import `Form` from your adapter. Pass `form` and, optionally, `method="put"`, `"patch"`, or `"delete"`; the default is `"post"`. Use `renderError` for a custom action-error renderer (a snippet in Svelte).
39
+ Import `Form` from your adapter. Pass `form` and optionally set `method` to `"put"`, `"patch"`, or `"delete"`. The default is `"post"`. Use `renderError` for custom action-error text (a snippet in Svelte). Field messages use the alert with or without `renderError`.
40
40
 
41
41
  ## `useForm`
42
42
 
@@ -66,14 +66,12 @@ export default function CreateUser() {
66
66
  value={form.data.name}
67
67
  onChange={(e) => form.setData('name', e.target.value)}
68
68
  />
69
- {form.errors.name && <span>{form.errors.name}</span>}
70
69
 
71
70
  <input
72
71
  name="email"
73
72
  value={form.data.email}
74
73
  onChange={(e) => form.setData('email', e.target.value)}
75
74
  />
76
- {form.errors.email && <span>{form.errors.email}</span>}
77
75
 
78
76
  <SubmitButton />
79
77
  </Form>
@@ -92,10 +90,7 @@ const form = useForm('/users', { name: '', email: '' });
92
90
  <template>
93
91
  <Form :form="form">
94
92
  <input v-model="form.data.name" />
95
- <span v-if="form.errors.name">{{ form.errors.name }}</span>
96
-
97
93
  <input v-model="form.data.email" />
98
- <span v-if="form.errors.email">{{ form.errors.email }}</span>
99
94
 
100
95
  <button :disabled="form.pending">Create</button>
101
96
  </Form>
@@ -112,10 +107,7 @@ const form = useForm('/users', { name: '', email: '' });
112
107
 
113
108
  <Form {form}>
114
109
  <input bind:value={form.data.name} />
115
- {#if form.errors.name}<span>{form.errors.name}</span>{/if}
116
-
117
110
  <input bind:value={form.data.email} />
118
- {#if form.errors.email}<span>{form.errors.email}</span>{/if}
119
111
 
120
112
  <button disabled={form.pending}>Create</button>
121
113
  </Form>
@@ -131,10 +123,7 @@ export default function CreateUser() {
131
123
  return (
132
124
  <Form form={form}>
133
125
  <input value={form.data.name} onInput={(e) => form.setData('name', e.target.value)} />
134
- {form.errors.name && <span>{form.errors.name}</span>}
135
-
136
126
  <input value={form.data.email} onInput={(e) => form.setData('email', e.target.value)} />
137
- {form.errors.email && <span>{form.errors.email}</span>}
138
127
 
139
128
  <button disabled={form.pending}>Create</button>
140
129
  </Form>
@@ -333,9 +322,41 @@ import { useForm } from '@void/react'; // or "@void/vue", "@void/svelte", "@void
333
322
  const form = useForm('/users', { name: '', email: '' }, { throwOnError: false });
334
323
  ```
335
324
 
336
- Validation errors appear in `form.errors`; other HTTP failures appear in `form.error`. `Form` displays the error for you. In React, `onError` also receives it.
325
+ Validation errors appear in `form.errors`. Other HTTP failures appear in `form.error`. In React, `onError` also receives the error.
326
+
327
+ Network errors and other unexpected failures still throw. Cancelled submissions don't set `form.error`.
328
+
329
+ When the alert shows field errors, rendering `form.errors.<field>` inside `Form` repeats the message. To show each message beside its input, use a plain `<form>` that submits with `form.post`. A plain form can submit during a retry delay unless you block submission yourself.
330
+
331
+ In React, pass `form.post` as the form's action.
332
+
333
+ ```tsx
334
+ import { useForm } from '@void/react';
335
+
336
+ export default function CreateUser() {
337
+ const form = useForm('/users', { name: '', email: '' });
338
+
339
+ return (
340
+ <form action={form.post}>
341
+ <input
342
+ name="name"
343
+ value={form.data.name}
344
+ onChange={(e) => form.setData('name', e.target.value)}
345
+ />
346
+ {form.errors.name && <span>{form.errors.name}</span>}
347
+
348
+ <input
349
+ name="email"
350
+ value={form.data.email}
351
+ onChange={(e) => form.setData('email', e.target.value)}
352
+ />
353
+ {form.errors.email && <span>{form.errors.email}</span>}
337
354
 
338
- Network errors and other unexpected failures still throw. Cancelled submissions don't set a form error.
355
+ <button disabled={form.pending}>Create</button>
356
+ </form>
357
+ );
358
+ }
359
+ ```
339
360
 
340
361
  Use `isVoidActionError()` to read an action error's `status` and `message`, including thrown errors:
341
362
 
@@ -92,7 +92,9 @@ Action errors that reach a client boundary keep their HTTP status and public mes
92
92
 
93
93
  ## HTTP exceptions
94
94
 
95
- Throw an `HTTPException` to show a specific error in your page's layout. For example, a suspended account can return `403` with an explanation:
95
+ Throw an `HTTPException` to show a specific error. Void renders the selected `_error` inside the page's layouts at or above the error component's directory, including any named layout at those positions. Deeper layouts are dropped. With `layout = false`, the error renders on its own. To keep a section's navigation, [add an `_error` in that section](#nested-errors).
96
+
97
+ A suspended account can return `403` with an explanation.
96
98
 
97
99
  ```ts
98
100
  // pages/account.server.ts
@@ -15,6 +15,8 @@ You can also use your own client-side router and call Void's APIs with [typed fe
15
15
 
16
16
  In an empty project, `void init` can set up Pages for you. Choose Vite+ or plain Vite, then React, Vue, Svelte, or Solid and a database or static starter. The generated app includes the matching Vite config and page files.
17
17
 
18
+ With TypeScript 7 and Vue 3.5’s default compiler, `_error.vue`, `_not-found.vue`, and regular components used by pages fail to compile when `defineProps<T>()` uses a type imported from a relative file or a package. New Vue starters default to TypeScript 6 so these imports work. In existing projects on TypeScript 7, install `typescript@6` or declare the props type in the component. [vuejs/core#15085](https://github.com/vuejs/core/pull/15085)
19
+
18
20
  If you're adding Pages mode manually, install a framework adapter alongside `void`:
19
21
 
20
22
  ::: code-group
@@ -128,6 +130,24 @@ Production deploys exclude resources used only by `.dev` pages and their compani
128
130
 
129
131
  The first request receives rendered HTML. Later navigations run the loader and update the page without reloading the document. Form submissions run an action, then refresh page props or redirect.
130
132
 
133
+ ### After a deploy
134
+
135
+ An open tab keeps the code it loaded. Deploy while it stays open, and its next navigation asks for chunks that no longer exist.
136
+
137
+ Void recovers that navigation. The tab sends the build it is running with each page request, and an answer from a different build makes it load the requested page as a document instead of rendering it. The destination keeps its query string and fragment, and the current page stays visible until the load starts.
138
+
139
+ These never reload the tab:
140
+
141
+ - A prefetch drops the response and lets the next navigation decide.
142
+ - A form submission keeps its response, so the action never runs twice. If the action redirects, the destination loads as a document.
143
+ - A failed request is not treated as a deploy.
144
+
145
+ If that document load still returns the old build, for example from a CDN that caches HTML across deploys, the tab shows an error page instead of reloading again. Keep HTML out of shared caches, or purge it on deploy.
146
+
147
+ Prerendered pages of an [`output: "static"`](../ssg.md) app are served as files and are not covered: a stale tab still reaches its error boundary there.
148
+
149
+ Recovery is on by default. Set `deployRecovery: false` in your framework plugin's options to keep your own [error boundaries](./errors.md) in charge instead.
150
+
131
151
  To opt a specific route out of server-rendered component HTML, export `ssr = false` from its companion `.server.ts` file:
132
152
 
133
153
  ```ts
@@ -22,7 +22,7 @@ choose to protect apps. To renew their token in Admin, leave the policy fields b
22
22
  - A Cloudflare Zero Trust organization in the account that hosts the platform, with the identity providers and reusable Access policies you want to use. Select at least one Allow policy that matches people by identity. Void rejects Bypass and Service Auth policies, and rules that allow Everyone or any service token.
23
23
  - A Cloudflare API token for that account with **Access: Apps and Policies Write** and **Access: Organizations, Identity Providers, and Groups Read**. Void keeps it separate from the platform runtime token, stores it encrypted, and never shows it again.
24
24
  - Free Access applications in the account. Cloudflare's default limit is 500 per account. Count the applications you already manage outside Void, then add the ones Void needs, as described in [Access Applications Void Creates](#access-applications-void-creates).
25
- - Platform API, proxy, and email gateway hostnames outside the project application domain. Configuration is rejected when project protection would cover one of them. Any other hostname under the project application domain also asks for sign-in, except the `/health` path of `void-platform-health.<your domain>`, which Void keeps open for its health checks and never serves from a project. New projects cannot use that name. A project that already uses it keeps every other path, protected or public like any other project.
25
+ - Platform API, proxy, and email gateway hostnames outside the project application domain. Configuration is rejected when project protection would cover one of them. Any other hostname under the project application domain also asks for sign-in, except `/health` and the paths under it on `void-platform-health.<your domain>`. Void keeps these open for its health checks and answers them itself, never from a project. New projects cannot use that name. A project that already uses it keeps its other paths, protected or public like any other project, but cannot serve paths that start with `/health`.
26
26
 
27
27
  ## Enable Zero Trust
28
28
 
@@ -30,9 +30,9 @@ that the application covers the printed API and proxy origins. A Cloudflare
30
30
  management API token does not authenticate an Access-protected HTTP request.
31
31
 
32
32
  For automatic setup, resuming also creates or verifies an Access exception
33
- limited to `/health` on the reserved dispatch health hostname. Void still requires
34
- its private probe token on that endpoint; requests without it cannot reach an
35
- application. This lets installation check routing while employee protection and
33
+ limited to `/health` and the paths under it on the reserved dispatch health
34
+ hostname. Void still requires its private probe token on that endpoint; requests
35
+ without it cannot reach an application. This lets installation check routing while employee protection and
36
36
  account-wide Default-Deny remain enabled. It does not bypass Access for an entire
37
37
  Worker or for deployed apps.
38
38
 
@@ -143,7 +143,7 @@ Content-Type: application/json
143
143
  { "queue": "<queue-name>", "messages": [{ "id": "1", "timestamp": <unix_ms>, "body": <any>, "attempts": 1 }] }
144
144
  ```
145
145
 
146
- The endpoint requires a local dev trigger token. Void prints a paste-ready curl command with the current token when the dev server starts.
146
+ The endpoint requires a local dev trigger token. Void prints a paste-ready curl command with the current token when the dev server starts. The development trigger is unavailable in `vp preview` and `vite preview`.
147
147
 
148
148
  ```bash
149
149
  curl -X POST http://localhost:5173/__void/queue \
@@ -21,7 +21,7 @@ cd my-app
21
21
  ### 2. Install dependencies
22
22
 
23
23
  ```bash
24
- npm install -D @sveltejs/adapter-cloudflare void
24
+ npm install -D @sveltejs/adapter-cloudflare@8 void
25
25
  ```
26
26
 
27
27
  ### 3. Configure `vite.config.ts`
@@ -91,6 +91,7 @@ interface VoidVueOptions {
91
91
  hoverDelay?: number; // default: 75 (ms)
92
92
  cacheFor?: number | string | [string, string]; // default: '30s'
93
93
  };
94
+ deployRecovery?: boolean; // reload a tab whose build is gone. default: true
94
95
  }
95
96
  ```
96
97
 
@@ -147,6 +148,7 @@ interface VoidReactOptions {
147
148
  hoverDelay?: number; // default: 75 (ms)
148
149
  cacheFor?: number | string | [string, string]; // default: '30s'
149
150
  };
151
+ deployRecovery?: boolean; // reload a tab whose build is gone. default: true
150
152
  }
151
153
  ```
152
154
 
@@ -232,6 +234,7 @@ interface VoidSvelteOptions {
232
234
  hoverDelay?: number; // default: 75 (ms)
233
235
  cacheFor?: number | string | [string, string]; // default: '30s'
234
236
  };
237
+ deployRecovery?: boolean; // reload a tab whose build is gone. default: true
235
238
  }
236
239
  ```
237
240
 
@@ -286,6 +289,7 @@ interface VoidSolidOptions {
286
289
  hoverDelay?: number; // default: 75 (ms)
287
290
  cacheFor?: number | string | [string, string]; // default: '30s'
288
291
  };
292
+ deployRecovery?: boolean; // reload a tab whose build is gone. default: true
289
293
  }
290
294
  ```
291
295
 
@@ -50,13 +50,13 @@ Programmatic seed modules must export either a default function or a named `seed
50
50
  ## `void db execute` {#void-db-execute}
51
51
 
52
52
  ```
53
- void db execute <sql>
54
- void db execute --file <path>
55
- void db execute --remote <sql> [--yes]
56
- void db execute --remote --file <path> [--yes]
53
+ void db execute <sql> [--json]
54
+ void db execute --file <path> [--json]
55
+ void db execute --remote <sql> [--yes] [--json]
56
+ void db execute --remote --file <path> [--yes] [--json]
57
57
  ```
58
58
 
59
- Run ad-hoc SQL against the database. Provide SQL inline or from a file. A statement that returns rows prints them as a formatted table, and statements that change data print nothing. SQL with several statements runs as a script without printed results.
59
+ Run ad-hoc SQL against the database. Provide SQL inline or from a file. A statement that returns rows prints them as a formatted table, and statements that change data print nothing. SQL with several statements runs as a script without printed results. Pass `--json` to get every statement's rows.
60
60
 
61
61
  By default, targets the local database. Pass `--remote` to run against the deployed database selected in `.void/project.json`:
62
62
 
@@ -69,13 +69,49 @@ On direct Cloudflare D1 deployments, a `--file` larger than 100 KB runs as a D1
69
69
 
70
70
  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. A TTY also asks before a D1 import, whatever the file contains. Pass `--yes` to skip the prompt. Non-TTY environments (CI) never prompt, so `--yes` is optional there.
71
71
 
72
+ ### JSON output {#void-db-execute-json}
73
+
74
+ Pass `--json` to read results from a script. stdout receives only a JSON array with one entry per statement, including statements in SQL with several statements. Prompts, warnings, errors and any other output, such as messages that `void.config.ts` or a process it starts prints, go to stderr, and a failure exits with a non-zero status.
75
+
76
+ ```sh
77
+ void db execute --json "select count(*) as total from users; select id from users limit 1"
78
+ ```
79
+
80
+ ```json
81
+ [
82
+ {
83
+ "results": [{ "total": 2 }],
84
+ "success": true,
85
+ "meta": { "changes": 0, "last_row_id": 0, "duration": 0.04 }
86
+ },
87
+ {
88
+ "results": [{ "id": 1 }],
89
+ "success": true,
90
+ "meta": { "changes": 0, "last_row_id": 0, "duration": 0.02 }
91
+ }
92
+ ]
93
+ ```
94
+
95
+ Each entry has the same shape as a D1 result and as an entry of `wrangler d1 execute --json`:
96
+
97
+ - `results`: the rows the statement returned, or `[]`. `NULL` prints as `null`, numbers and text keep their types, and binary values print as arrays of bytes. An integer outside ±9007199254740991, which a JSON number cannot hold exactly, prints as a string of its digits, and infinite or not-a-number values print as `"Infinity"`, `"-Infinity"` and `"NaN"`. PostgreSQL `bigint` and `numeric` values print as strings, in arrays too, and numbers in `json` and `jsonb` values keep the digits the database returned. MySQL dates and times print as the text MySQL returns, such as `"2024-01-02 03:04:05.123456"`. A remote D1 database returns values as D1's API reports them. A MySQL `CALL` is one entry, with the rows of every result set the procedure returns. So are an `EXECUTE` of a prepared `CALL`, and a compound statement that MariaDB runs outside a stored program, such as `BEGIN NOT ATOMIC ... END` or `IF ... END IF`.
98
+ - `success`: `true` for a statement that ran.
99
+ - `meta`: what the database reports about the statement. D1 databases report D1's metadata, such as `changes` and `last_row_id` (locally `changes`, `last_row_id` and `duration`). PostgreSQL reports `command` and `rowCount`, and MySQL reports `affectedRows` and `insertId` for a statement that changes data.
100
+
101
+ If a statement fails, stdout stays empty.
102
+
103
+ `--json` is not available for a direct Cloudflare D1 import of a file larger than 100 KB, which returns no rows. On a Void platform D1 database, `--remote --json` runs one statement per command; a `CREATE TRIGGER` counts as one statement. On MySQL, `--json` stops without running anything when it cannot tell which results belong to which statement:
104
+
105
+ - An `EXECUTE` runs a statement that the same SQL does not prepare from a quoted string, such as `PREPARE s FROM @sql`, and so may be a `CALL`. A procedure may prepare statements too, so after a `CALL`, prepare a statement again before you run it. Run SQL that prepares a statement from a variable without `--json`.
106
+ - A `SET sql_mode` sets anything other than a quoted list of modes, such as `SET sql_mode = @saved`, and a quoted string with a backslash after it reads as different statements in different modes, with a `CALL` or another statement that returns several results among them. Set `sql_mode` to a quoted list such as `'ANSI_QUOTES'`, or run that statement in a separate command.
107
+
72
108
  ## `void db migrate` {#void-db-migrate}
73
109
 
74
110
  ```
75
111
  void db migrate [--remote]
76
112
  ```
77
113
 
78
- Apply pending migrations to the local database without resetting. Unlike `void db reset`, this preserves existing data and only runs migrations that haven't been applied yet.
114
+ Apply pending migrations to the local database without resetting. Unlike `void db reset`, this preserves existing data and only runs migrations that haven't been applied yet. To allow a destructive migration, add `-- void:allow-destructive` on its own line in the SQL file.
79
115
 
80
116
  Pass `--remote` to apply pending migrations to the saved target. Hosted projects require a Void login and link. Direct Cloudflare D1 projects use the binding's configured migration directory, table, and pattern. The D1 binding must set `migrations_dir`. Direct PostgreSQL and MySQL projects use the shell `DATABASE_URL`.
81
117
 
@@ -17,7 +17,7 @@ void platform upgrade [id] --security-audits
17
17
  void platform repair [id] --security-audits
18
18
  ```
19
19
 
20
- This allows the feature and nothing more. No project is scanned until you set a scan mode. The runtime token needs the Containers permissions that the token page lists. Uninstalling the platform also deletes the scanner, its container applications, and the scanner images it copied.
20
+ This allows the feature and nothing more. No project is scanned until you set a scan mode. The runtime token needs the Containers permissions that the token page lists. Uninstalling the platform also deletes the scanner, its container applications, its scan copies, and the scanner images it copied.
21
21
 
22
22
  Then check the account and choose a mode:
23
23
 
@@ -50,9 +50,10 @@ hosts the platform. Omit `--protect-new-projects` to make new projects public
50
50
  by default. `--existing-projects` is required when you enable Zero Trust and
51
51
  rejected once it is enabled; later configuration changes keep each project's
52
52
  protection. `status` reports saved state; `--check` also compares it with
53
- Cloudflare Access. If status remains `configuring` or `disabling`, run
54
- `void platform zero-trust reconcile` to resume the saved operation. Protected
55
- projects support up to 100 custom domains.
53
+ Cloudflare Access. Large changes run in steps: `configure`, `reconcile`, and
54
+ `disable` can return while status is still `configuring` or `disabling`. Void
55
+ continues the change within a few minutes; run `void platform zero-trust reconcile`
56
+ to continue it right away. Protected projects support up to 100 custom domains.
56
57
 
57
58
  The token needs **Access: Apps and Policies Write** plus **Access:
58
59
  Organizations, Identity Providers, and Groups Read**, scoped to the platform's
@@ -49,8 +49,12 @@ void init --toolchain vite-plus --framework react --starter sqlite --deploy none
49
49
  npm create void@latest my-app -- --toolchain vite-plus --framework react --starter sqlite --deploy none
50
50
  ```
51
51
 
52
+ `npm create void <name>` takes a single directory name and creates it inside the current directory. Use up to 63 characters from `a-z`, `0-9`, and `-`, with a letter or digit at each end.
53
+
52
54
  For non-interactive scaffolding, choose `--deploy none` and run `void connect` later to sign in.
53
55
 
56
+ Vite+ is the recommended toolchain. Vite+ starters include [`@cloudflare/oxlint-config`](https://github.com/cloudflare/oxlint-config). Run `vp lint` to check your code.
57
+
54
58
  Vite+ projects install dependencies through `vp install`; no global Vite+ installation is required. Void preserves existing package-manager versions and lockfiles. New Vite+ projects without a package-manager configuration use pnpm without pinning a version.
55
59
 
56
60
  In an existing app, Void adds missing dependencies and scripts and updates the Vite config. If it cannot edit your config, it prints the snippet to add.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "Full-stack framework and deployment CLI for Cloudflare Workers, powered by Vite.",
5
5
  "homepage": "https://void.cloud",
6
6
  "bugs": {
@@ -357,11 +357,11 @@
357
357
  "@cloudflare/workers-types": "^5.20261125.1",
358
358
  "@cloudflare/workers-utils": "^0.57.0",
359
359
  "@napi-rs/keyring": "^2.1.2",
360
- "@void/deploy-cloudflare": "1.12.0",
361
- "@void/deploy-core": "1.12.0",
362
- "@void/edge": "1.12.0",
363
- "@void/isr": "1.12.0",
364
- "@void/platform": "1.12.0",
360
+ "@void/deploy-cloudflare": "1.12.1",
361
+ "@void/deploy-core": "1.12.1",
362
+ "@void/edge": "1.12.1",
363
+ "@void/isr": "1.12.1",
364
+ "@void/platform": "1.12.1",
365
365
  "better-auth": "^1.7.27",
366
366
  "better-sqlite3": "^13.2.0",
367
367
  "blake3-jit": "^1.1.1",
@@ -418,7 +418,7 @@
418
418
  "zod": "^4.6.7"
419
419
  },
420
420
  "peerDependencies": {
421
- "@void/md": "1.12.0",
421
+ "@void/md": "1.12.1",
422
422
  "arktype": ">=2.0.0",
423
423
  "valibot": ">=1.0.0-beta.7",
424
424
  "vite": "^8.0.0",
@@ -1 +0,0 @@
1
- export { t as prepareCfBuildOutput } from "./cf-build-output-Ca201_n1.mjs";
@@ -1 +0,0 @@
1
- export { t as activateCloudflareExistingVersion, n as applyCloudflareD1Migrations, r as changeCloudflareDomain, o as deleteCloudflareSecret, s as executeCloudflareD1Sql, c as importCloudflareD1Sql, l as listCloudflareDomains, u as listCloudflareSecrets, h as putCloudflareSecret, g as readCloudflareD1Migrations, _ as readCloudflareWorkerStatus, v as resolveCloudflareD1Context, y as resolveCloudflareOperationContext, b as restoreCloudflareD1Database, x as syncCloudflareSecrets, S as tailCloudflareWorker } from "./cloudflare-operations-BF0PSErW.mjs";
@@ -1 +0,0 @@
1
- export { r as runGenCommand } from "./gen-DiTZlDx8.mjs";
@@ -1 +0,0 @@
1
- export { r as printHelpPage } from "./help-9wfMyXHb.mjs";
@@ -1 +0,0 @@
1
- export { r as selectPlatformLoginMethod } from "./login-BSOSah1j.mjs";
@@ -1 +0,0 @@
1
- export { s as runOperatorCommand } from "./operator-cmd-AZoeI9Pl.mjs";
@@ -1 +0,0 @@
1
- export { t as parsePlatformArgs } from "./platform-args-lwCyQ6Xy.mjs";
@@ -1 +0,0 @@
1
- export { t as prepareProject } from "./prepare-BbvlKreR.mjs";