void 1.12.0 → 1.12.2

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-CdJQba_Q.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-D9MWA_dj.mjs} +4 -4
  7. package/dist/{auth-router-BmzEgzYx.mjs → auth-router-FskgTU3B.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-DaLrQfPS.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-WG4TcR_d.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-BSuWV1PI.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-DtJeunLF.mjs} +14 -14
  32. package/dist/{deploy-BB3rsZbP.mjs → deploy-GT4CW5fs.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-DoDqRH6i.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-B2VZ2Hut.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-BbSQTZ6d.mjs +1 -0
  52. package/dist/{login-BSOSah1j.mjs → login-jUBgfvzk.mjs} +3 -3
  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-jnjzuJKX.mjs +1 -0
  62. package/dist/{operator-cmd-AZoeI9Pl.mjs → operator-cmd-wML5HNfS.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-Bv3oQ2gE.mjs} +7 -7
  71. package/dist/{platform-auth-protection-HSmLmD3d.mjs → platform-auth-protection-OqzfhXwx.mjs} +5 -5
  72. package/dist/{platform-auth-recovery-BXPhTlKa.mjs → platform-auth-recovery-rmIYjXST.mjs} +4 -4
  73. package/dist/{platform-cmd-CqRjxFEU.mjs → platform-cmd-B3rO4RhU.mjs} +1 -1
  74. package/dist/{platform-cmd-DJ-fOYhL.mjs → platform-cmd-D_4z2Ijv.mjs} +6 -6
  75. package/dist/{platform-domain-CRsRJOws.mjs → platform-domain-CUq9odbd.mjs} +2 -2
  76. package/dist/{platform-lifecycle-bx_kpqo7.mjs → platform-lifecycle-DOSYo0UI.mjs} +1 -1
  77. package/dist/{platform-lifecycle-fau3VKv6.mjs → platform-lifecycle-DuoVruij.mjs} +138 -43
  78. package/dist/{platform-management-BRGhD-oF.mjs → platform-management-D_gt3qLb.mjs} +1 -1
  79. package/dist/{platform-management-CnKBdDx5.mjs → platform-management-MmO9IubR.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-P_FVslfd.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 +5 -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
@@ -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.2",
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.2",
361
+ "@void/deploy-core": "1.12.2",
362
+ "@void/edge": "1.12.2",
363
+ "@void/isr": "1.12.2",
364
+ "@void/platform": "1.12.2",
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.2",
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";