void 0.28.0 → 1.0.3

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 (212) hide show
  1. package/dist/{account-cmd-Ci00cncT.mjs → account-cmd-BTcUzv9L.mjs} +4 -4
  2. package/dist/{application-analysis-D72ZQfMZ.mjs → application-analysis-AB_YYWgH.mjs} +1 -1
  3. package/dist/{application-routing-Dy589Vgn.mjs → application-routing-L7V-TFhZ.mjs} +1 -1
  4. package/dist/auth-Cbqi1iVX.mjs +1 -0
  5. package/dist/{auth-link-DWr6Afao.mjs → auth-link-DUJuvRx5.mjs} +4 -4
  6. package/dist/{auth-router-DP14wVkZ.mjs → auth-router-CIxiMG7i.mjs} +3 -3
  7. package/dist/{build-cmd-Cr3FJxv0.mjs → build-cmd-BkIv25PA.mjs} +3 -3
  8. package/dist/{cache-D0Tt28cn.mjs → cache-Ctzfig-W.mjs} +3 -3
  9. package/dist/{cancel-deploy-CJKvk7AN.mjs → cancel-deploy-CD9o-SsC.mjs} +2 -2
  10. package/dist/cf-build-output-BU3hqdHu.mjs +1 -0
  11. package/dist/cli/cli.mjs +31 -31
  12. package/dist/cli/cloudflare-operation-process.mjs +2 -2
  13. package/dist/cli/env-schema-probe.d.mts +2 -1
  14. package/dist/cli/env-schema-probe.mjs +2 -2
  15. package/dist/client-B60PwCC4.mjs +1 -0
  16. package/dist/{cloudflare-cmd-CTrn-lXJ.mjs → cloudflare-cmd-BIAF_BIY.mjs} +2 -2
  17. package/dist/{cloudflare-connect-BosmCNlq.mjs → cloudflare-connect-WjwnVOJA.mjs} +1 -1
  18. package/dist/{cloudflare-operations-BKdSfNBN.mjs → cloudflare-operations-B42EZeJy.mjs} +3 -3
  19. package/dist/cloudflare-operations-CrSUFRzJ.mjs +1 -0
  20. package/dist/collect-Cae8A7Zr.mjs +1 -0
  21. package/dist/config-QrJWu0IX.mjs +1 -0
  22. package/dist/{connect-nukQSoEO.mjs → connect-CKtk-EZe.mjs} +5 -5
  23. package/dist/create-project-B-ewF_Af.mjs +1 -0
  24. package/dist/{create-project-D4APeBwX.mjs → create-project-yInGo72M.mjs} +3 -3
  25. package/dist/database-provider.mjs +1 -2
  26. package/dist/{db-27RztQLy.mjs → db-7I_gfdVq.mjs} +37 -38
  27. package/dist/db-types-Bb4WBWIs.mjs +49 -0
  28. package/dist/{delete-BbsZFZIw.mjs → delete-Cy-M1u-r.mjs} +3 -3
  29. package/dist/deploy-9lgfhrXS.mjs +2 -0
  30. package/dist/{deploy-B06EQq4t.mjs → deploy-BYYlnsiy.mjs} +176 -21
  31. package/dist/{deploy-managed-static-CGswbcay.mjs → deploy-managed-static-Ca4TFdmx.mjs} +24 -706
  32. package/dist/{deploy-transport-BiicfoQW.mjs → deploy-transport-DWlWBe6M.mjs} +1 -1
  33. package/dist/deploy.mjs +4 -4
  34. package/dist/discover-ClzFSwns.mjs +1 -0
  35. package/dist/dispatch-DrTTk8Xg.mjs +431 -0
  36. package/dist/{dist-D3m88sjf.mjs → dist-BVdsO7Py.mjs} +5 -6
  37. package/dist/dist-CfgIkieS.mjs +1 -0
  38. package/dist/{domain-Bfq9n03H.mjs → domain-CZGxPv9u.mjs} +4 -4
  39. package/dist/edge.mjs +1 -2
  40. package/dist/{email-DIwaQU4P.mjs → email-DzyNVuoU.mjs} +6 -6
  41. package/dist/{email-cloudflare-CH053RxK.mjs → email-cloudflare-DfG6UEMm.mjs} +1 -1
  42. package/dist/{env-BhdWMrNy.mjs → env-0jrMQJI_.mjs} +5 -2
  43. package/dist/{env-C6ipBLp3.mjs → env-Nx3yf50r.mjs} +4 -4
  44. package/dist/{env-raw-Cklzcde3.mjs → env-raw-D74P4ebM.mjs} +12 -1
  45. package/dist/env-validation-BT7z-qpQ.mjs +1 -0
  46. package/dist/{env-validation-cE0zcmzO.mjs → env-validation-DYxjz_Wo.mjs} +2 -0
  47. package/dist/{gen-CnN1Xidx.mjs → gen-CufHEf42.mjs} +2 -2
  48. package/dist/gen-sXyp5DFO.mjs +1 -0
  49. package/dist/generate-ClI89brV.mjs +1 -0
  50. package/dist/{github-cmd-BdkU4Nhe.mjs → github-cmd-FU8EjFyU.mjs} +3 -3
  51. package/dist/{help-Bug7pyK_.mjs → help-BT2hovNI.mjs} +9 -5
  52. package/dist/help-i2YGGnTH.mjs +1 -0
  53. package/dist/{inbound-DmkTQeWp.mjs → inbound-BuTfm11U.mjs} +1 -1
  54. package/dist/index.mjs +551 -303
  55. package/dist/{info-CujPwtMe.mjs → info-l249eUdH.mjs} +1 -1
  56. package/dist/{init-ZWOJvc-Z.mjs → init-D0A6M64Q.mjs} +60 -14
  57. package/dist/{isr-config-DPjXM8J2.mjs → isr-config-fZaJJ8t7.mjs} +1 -30
  58. package/dist/{link-UEc7bnF4.mjs → link-WMoJFf4i.mjs} +4 -4
  59. package/dist/{list-CuWeOnzk.mjs → list-CQ2EQEHL.mjs} +4 -4
  60. package/dist/{live-BxLX-JqJ.mjs → live-BcHoTDFe.mjs} +1 -1
  61. package/dist/{local-d1-BM3p74mm.mjs → local-d1-BxvQYEFi.mjs} +1 -1
  62. package/dist/{login-CZ2Cqa-D.mjs → login-C2T1oVG-.mjs} +3 -3
  63. package/dist/login-XD844Xs-.mjs +1 -0
  64. package/dist/{logs-TihRcLTk.mjs → logs-DnC1d7xB.mjs} +3 -3
  65. package/dist/{migrate-uFwojusJ.mjs → migrate-BDIprOYd.mjs} +2 -2
  66. package/dist/migrate-BRwU-blY.mjs +1 -0
  67. package/dist/mysql-migration-sql-BIS5vbNk.mjs +241 -0
  68. package/dist/nitro.d.mts +30 -0
  69. package/dist/nitro.mjs +88 -0
  70. package/dist/{node-DoKbo1SZ.mjs → node-cPadMgUO.mjs} +3 -3
  71. package/dist/operator-cmd-D6gnZsnK.mjs +1 -0
  72. package/dist/{operator-cmd-C5lCctnc.mjs → operator-cmd-DHieWtFp.mjs} +5 -5
  73. package/dist/{output-FNHKw5Ac.mjs → output-Ba6ZbrzY.mjs} +1 -1
  74. package/dist/pages/head.mjs +1 -2
  75. package/dist/pages/prefetch.mjs +1 -2
  76. package/dist/pages/serialize.mjs +1 -2
  77. package/dist/plan-CKX_jWnD.mjs +1 -0
  78. package/dist/platform-args-B0HeTh0C.mjs +1 -0
  79. package/dist/{platform-args-C6Mb_I3a.mjs → platform-args-CaCL_1Ch.mjs} +9 -2
  80. package/dist/{platform-auth-config-CJmNkFT2.mjs → platform-auth-config-Z16-I8nT.mjs} +6 -6
  81. package/dist/{platform-auth-protection-D5wvsI-Y.mjs → platform-auth-protection-BXwZiJSF.mjs} +4 -4
  82. package/dist/{platform-auth-recovery-D_0I3n-1.mjs → platform-auth-recovery-CXjfqyOv.mjs} +4 -4
  83. package/dist/{platform-cmd-DxxZO6e5.mjs → platform-cmd-DaAOiWTl.mjs} +7 -7
  84. package/dist/platform-cmd-PT4YwMLM.mjs +1 -0
  85. package/dist/{platform-domain-zLXnW1G_.mjs → platform-domain-CxpvUeo0.mjs} +4 -4
  86. package/dist/{platform-lifecycle-DOW-wLfx.mjs → platform-lifecycle-DBiS0cJd.mjs} +317 -99
  87. package/dist/platform-lifecycle-u9pMOvxC.mjs +1 -0
  88. package/dist/{platform-management-t7HKy4-U.mjs → platform-management-DhEFdQAf.mjs} +67 -9
  89. package/dist/platform-management-DvBS83rC.mjs +1 -0
  90. package/dist/{platform-plans-config-CNH6zbPX.mjs → platform-plans-config-BWn1S2Rv.mjs} +2 -2
  91. package/dist/{platform-recovery-DeucI7A9.mjs → platform-recovery-BUGOB4RC.mjs} +2 -2
  92. package/dist/{platform-setup-CTf6MMT9.mjs → platform-setup-YvN9VQXV.mjs} +3 -3
  93. package/dist/prepare-CYT6tAzD.mjs +1 -0
  94. package/dist/{prepare-CSH9dKTI.mjs → prepare-DEB5SeVJ.mjs} +3 -2
  95. package/dist/{prepare-C4zfwks4.mjs → prepare-PQCgsny0.mjs} +3 -3
  96. package/dist/prerender-render.mjs +1 -2
  97. package/dist/{project-cmd-Dq75AXzy.mjs → project-cmd-DVatD8Ev.mjs} +16 -16
  98. package/dist/project-slug-6cyz8E7k.mjs +1 -0
  99. package/dist/{project-team-B3_QcStG.mjs → project-team-DJrWEAG1.mjs} +3 -3
  100. package/dist/{project-token-CvsRvv2I.mjs → project-token-CBgLBuL6.mjs} +3 -3
  101. package/dist/project-zdB3fs9G.mjs +1 -0
  102. package/dist/{project-zero-trust-D1ICiwN_.mjs → project-zero-trust-92gLtZ25.mjs} +3 -3
  103. package/dist/{provision-DDh7ITVS.mjs → provision-BnSSkiED.mjs} +1 -1
  104. package/dist/{requests-3CL3BuZh.mjs → requests-7W1Pygt2.mjs} +2 -2
  105. package/dist/resolve-project-PnhzMtY6.mjs +1 -0
  106. package/dist/{resolve-project-C_Cu7E8a.mjs → resolve-project-WpwkCB_c.mjs} +1 -1
  107. package/dist/{rollback-Ce1d_0J9.mjs → rollback-BcASVnwP.mjs} +3 -3
  108. package/dist/{route-types-IrBuwJ7u.mjs → route-types-BZi26DVS.mjs} +2 -49
  109. package/dist/{runner-DcVDrzuR.mjs → runner-CabsQ-iM.mjs} +15 -6
  110. package/dist/runner-So9mYfcm.mjs +1 -0
  111. package/dist/runner-mysql-BhRaONkO.mjs +146 -0
  112. package/dist/runner-mysql-DWwE8jKi.mjs +1 -0
  113. package/dist/{runner-pg-CPd-CB_F.mjs → runner-pg-BRemq_GX.mjs} +2 -2
  114. package/dist/runner-pg-_Xncr3H5.mjs +1 -0
  115. package/dist/runtime/ai.mjs +15 -4
  116. package/dist/runtime/auth-client-react.mjs +1 -2
  117. package/dist/runtime/auth-client-solid.mjs +1 -2
  118. package/dist/runtime/auth-client-svelte.mjs +1 -2
  119. package/dist/runtime/auth-client-vue.mjs +1 -2
  120. package/dist/runtime/auth-client.mjs +1 -2
  121. package/dist/runtime/auth.mjs +1 -2
  122. package/dist/runtime/better-auth-mysql.mjs +4 -1
  123. package/dist/runtime/db.mjs +6 -2
  124. package/dist/runtime/durable.d.mts +2 -1
  125. package/dist/runtime/durable.mjs +1 -1
  126. package/dist/runtime/email/testing.mjs +1 -1
  127. package/dist/runtime/email-protocol.mjs +1 -2
  128. package/dist/runtime/email.mjs +1 -1
  129. package/dist/runtime/env-public.mjs +2 -2
  130. package/dist/runtime/env.mjs +1 -2
  131. package/dist/runtime/isr.mjs +1 -1
  132. package/dist/runtime/kv.mjs +1 -1
  133. package/dist/runtime/limits.mjs +1 -2
  134. package/dist/runtime/live-client.d.mts +2 -1
  135. package/dist/runtime/live-server.d.mts +2 -1
  136. package/dist/runtime/live-server.mjs +1 -1
  137. package/dist/runtime/live.mjs +1 -2
  138. package/dist/runtime/log.d.mts +2 -1
  139. package/dist/runtime/migration-handler-mysql.mjs +38 -8
  140. package/dist/runtime/migration-handler.mjs +1 -2
  141. package/dist/runtime/queues.mjs +1 -1
  142. package/dist/runtime/response.mjs +1 -2
  143. package/dist/runtime/route-url.mjs +1 -2
  144. package/dist/runtime/routing.d.mts +2 -1
  145. package/dist/runtime/sandbox-container.mjs +1 -2
  146. package/dist/runtime/sandbox.mjs +3 -3
  147. package/dist/runtime/seed.d.mts +2 -1
  148. package/dist/runtime/sse.mjs +1 -2
  149. package/dist/runtime/storage.mjs +1 -1
  150. package/dist/runtime/validator.mjs +1 -2
  151. package/dist/runtime/ws-server.d.mts +2 -1
  152. package/dist/runtime/ws-server.mjs +1 -1
  153. package/dist/{secret-B5J8bBsI.mjs → secret-bg73f1Ge.mjs} +5 -5
  154. package/dist/{skills-BJsan98C.mjs → skills-C_yRTg0g.mjs} +1 -1
  155. package/dist/{subcommand-prompt-gQ-NDA-u.mjs → subcommand-prompt-Bm3ZlYgA.mjs} +2 -2
  156. package/dist/sveltekit.d.mts +2 -1
  157. package/dist/validate-BQFdf0Pi.mjs +1 -0
  158. package/dist/wrapper-CwhpNWtH.mjs +663 -0
  159. package/docs/guide/ai.md +8 -2
  160. package/docs/guide/database/mysql.md +14 -3
  161. package/docs/guide/database.md +1 -5
  162. package/docs/guide/durable-state.md +9 -5
  163. package/docs/guide/platform/installation/credentials.md +18 -2
  164. package/docs/guide/platform/installation/domains.md +1 -1
  165. package/docs/guide/platform/installation/maintenance.md +38 -1
  166. package/docs/guide/platform/installation/prerequisites.md +6 -2
  167. package/docs/guide/platform/installation/setup.md +23 -1
  168. package/docs/guide/platform/installation/uninstall.md +6 -1
  169. package/docs/guide/sandboxes.md +1 -1
  170. package/docs/guide/self-hosted-platform.md +1 -1
  171. package/docs/integrations/cloudflare.md +2 -2
  172. package/docs/integrations/frameworks/analog.md +3 -11
  173. package/docs/integrations/frameworks/nuxt.md +7 -10
  174. package/docs/integrations/nodejs-bun-deno.md +2 -0
  175. package/docs/reference/api.md +1 -0
  176. package/docs/reference/cli/platform-installation.md +18 -6
  177. package/docs/reference/config.md +2 -0
  178. package/package.json +34 -28
  179. package/sandbox.Dockerfile +1 -1
  180. package/skills/void/SKILL.md +1 -1
  181. package/dist/auth-wn6F8dB8.mjs +0 -2
  182. package/dist/cf-build-output-2u583yJK.mjs +0 -2
  183. package/dist/client-C1BjRn3g.mjs +0 -2
  184. package/dist/cloudflare-operations-Ds-lX3Ts.mjs +0 -2
  185. package/dist/collect-NUlJMpLY.mjs +0 -2
  186. package/dist/config-CNnrSMYm.mjs +0 -2
  187. package/dist/create-project-DL7YXpjj.mjs +0 -2
  188. package/dist/deploy-Db2ALnQP.mjs +0 -3
  189. package/dist/discover-CTUiSsfG.mjs +0 -2
  190. package/dist/dist-Bx1z6Eva.mjs +0 -2
  191. package/dist/env-validation-CTn-HhG1.mjs +0 -2
  192. package/dist/gen-F8pSZnhc.mjs +0 -2
  193. package/dist/generate-Rii9klHB.mjs +0 -2
  194. package/dist/help-s9q7LTcu.mjs +0 -2
  195. package/dist/login-DhK7o1oJ.mjs +0 -2
  196. package/dist/migrate-BgT-hmu8.mjs +0 -2
  197. package/dist/operator-cmd-Cjk5DiRx.mjs +0 -2
  198. package/dist/plan-CH2G51je.mjs +0 -2
  199. package/dist/platform-args-Cm7x-fot.mjs +0 -2
  200. package/dist/platform-cmd-Cuj4oUVo.mjs +0 -2
  201. package/dist/platform-lifecycle-_gfnjUBr.mjs +0 -2
  202. package/dist/platform-management-CYrLvTGH.mjs +0 -2
  203. package/dist/prepare-dr9uxQSV.mjs +0 -2
  204. package/dist/project-DiiOBZPF.mjs +0 -2
  205. package/dist/project-slug-DofjTFd-.mjs +0 -2
  206. package/dist/resolve-project-B9Hr0D3n.mjs +0 -2
  207. package/dist/runner-B5huK2eC.mjs +0 -2
  208. package/dist/runner-mysql-CCtyI0p6.mjs +0 -55
  209. package/dist/runner-mysql-CaJq-hd6.mjs +0 -2
  210. package/dist/runner-pg-BJhFZZG4.mjs +0 -2
  211. package/dist/validate-C9xtFOYR.mjs +0 -2
  212. package/dist/{sandbox-container-DBKIqDEK.mjs → sandbox-container-a9LRUtii.mjs} +1 -1
package/dist/nitro.mjs ADDED
@@ -0,0 +1,88 @@
1
+ import { a as join, n as dirname } from "./dist-ipQi0Q8y.mjs";
2
+ import { d as readConfig, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
3
+ import { r as voidDbBundlerPlugin } from "./dispatch-DrTTk8Xg.mjs";
4
+ import { n as bundleWorkerSqlDriver } from "./wrapper-CwhpNWtH.mjs";
5
+ import { fileURLToPath } from "node:url";
6
+ import { normalizePath } from "vite";
7
+ import { resolve } from "node:path/win32";
8
+ //#region src/nitro.ts
9
+ const envModuleFile = fileURLToPath(import.meta.resolve("#self/_env"));
10
+ const packageDistDir = `${normalizePath(dirname(dirname(envModuleFile)))}/`;
11
+ const REQUEST_SCOPE_PLUGIN = "#void/nitro-request-scope";
12
+ const NODEJS_COMPAT_FLAGS = /* @__PURE__ */ new Set(["nodejs_compat", "nodejs_compat_v2"]);
13
+ /**
14
+ * `path` as Nitro's Rollup names its modules: with backslashes on Windows, as its node-resolve
15
+ * plugin returns them. That plugin looks up an absolute import, such as the `global` polyfill
16
+ * Nitro adds to pg, by walking up from the importer to a package.json. From a module named with
17
+ * forward slashes there, the walk does not stop at the drive root, so it never ends when no
18
+ * package.json is above the module.
19
+ */
20
+ function nitroModuleId(path) {
21
+ return process.platform === "win32" ? resolve(path) : path;
22
+ }
23
+ /**
24
+ * A Nitro runtime plugin that runs each request in Void's request scope, as the Class A wrapper
25
+ * does, so void/db keeps one PostgreSQL or MySQL client per request instead of one per query.
26
+ */
27
+ function requestScopePluginSource() {
28
+ return `import { withRuntimeEnv } from ${JSON.stringify(envModuleFile)};
29
+
30
+ export default function voidRequestScope(nitroApp) {
31
+ const handler = nitroApp.h3App.handler;
32
+ // Nitro's Cloudflare entry and dev plugins keep the env here; a dev plugin may first set a
33
+ // promise of it.
34
+ nitroApp.h3App.handler = async (event) =>
35
+ withRuntimeEnv(await globalThis.__env__, () => handler(event));
36
+ }
37
+ `;
38
+ }
39
+ /**
40
+ * Keep Void's `node:async_hooks` imports for workerd's own module. With its `cloudflare.nodeCompat`
41
+ * option off, Nitro bundles a stub whose AsyncLocalStorage loses the request scope at the first
42
+ * await.
43
+ */
44
+ const nativeAsyncHooksPlugin = {
45
+ name: "void:nitro-async-hooks",
46
+ resolveId(id, importer) {
47
+ if (id === "node:async_hooks" && importer !== void 0 && normalizePath(importer).startsWith(packageDistDir)) return {
48
+ id,
49
+ external: true
50
+ };
51
+ return null;
52
+ }
53
+ };
54
+ /**
55
+ * Nitro module for apps whose server routes Nitro bundles (Nuxt and Analog). Nitro's bundler
56
+ * does not run Vite plugins, so without this module `void/db` in a server route, page server
57
+ * load or cron job is the package's D1 client without the app's schema. Register it in the
58
+ * Nitro config: `modules: ['void/nitro']`.
59
+ */
60
+ const voidNitroModule = {
61
+ name: "void",
62
+ setup(nitro) {
63
+ const { options } = nitro;
64
+ const config = readConfig(options.rootDir);
65
+ const dialect = getDatabaseDialect(config);
66
+ const workerd = !options.dev && options.exportConditions?.includes("workerd") === true;
67
+ const plugins = [voidDbBundlerPlugin(options.rootDir, {
68
+ config,
69
+ ...workerd && { sqlDriver: async (sqlDialect, entry) => nitroModuleId(await bundleWorkerSqlDriver(sqlDialect, entry, join(options.buildDir, "void"))) }
70
+ })];
71
+ const nodeCompat = (flags) => flags?.some((flag) => NODEJS_COMPAT_FLAGS.has(flag)) === true;
72
+ const cloudflareFlags = config.cloudflare?.compatibility_flags;
73
+ if (workerd && (dialect !== "sqlite" || nodeCompat(cloudflareFlags) && nodeCompat(config.worker?.compatibility_flags ?? cloudflareFlags))) {
74
+ options.cloudflare ??= {};
75
+ options.cloudflare.nodeCompat ??= true;
76
+ }
77
+ if (dialect !== "sqlite") {
78
+ options.virtual[REQUEST_SCOPE_PLUGIN] = requestScopePluginSource();
79
+ options.plugins.push(REQUEST_SCOPE_PLUGIN);
80
+ if (workerd) plugins.push(nativeAsyncHooksPlugin);
81
+ }
82
+ const rollupConfig = options.rollupConfig ??= {};
83
+ const existing = rollupConfig.plugins;
84
+ rollupConfig.plugins = [...plugins, ...Array.isArray(existing) ? existing : existing ? [existing] : []];
85
+ }
86
+ };
87
+ //#endregion
88
+ export { voidNitroModule as default };
@@ -1,11 +1,11 @@
1
1
  import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-D0GY5ItR.mjs";
2
2
  import { d as readConfig } from "./config-Bx_1SpnO.mjs";
3
- import { r as getMiniflareDatabasePath } from "./runner-DcVDrzuR.mjs";
3
+ import { r as getMiniflareDatabasePath } from "./runner-CabsQ-iM.mjs";
4
4
  import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
5
5
  import { r as resolveVoidAuthMigrationSchema } from "./drizzle-CF84FOVM.mjs";
6
6
  import { a as pgMigrationRunner, i as mysqlMigrationRunner, n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-Cgs0k6lS.mjs";
7
7
  //#region src/auth/node.ts
8
- async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, configPath = findVoidAuthConfig(root)) {
8
+ async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, configPath = findVoidAuthConfig(root), databaseUrl) {
9
9
  const authConfig = await loadVoidAuthConfig(configPath);
10
10
  const runtime = {
11
11
  dialect,
@@ -34,7 +34,7 @@ async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId
34
34
  }
35
35
  return;
36
36
  }
37
- const connectionString = typeof env.DATABASE_URL === "string" && env.DATABASE_URL.length > 0 ? env.DATABASE_URL : void 0;
37
+ const connectionString = databaseUrl ?? (typeof env.DATABASE_URL === "string" && env.DATABASE_URL.length > 0 ? env.DATABASE_URL : void 0);
38
38
  if (!connectionString) return;
39
39
  if (dialect === "mysql") {
40
40
  const { createConnection } = await import("mysql2/promise");
@@ -0,0 +1 @@
1
+ export { a as runOperatorCommand } from "./operator-cmd-DHieWtFp.mjs";
@@ -1,4 +1,4 @@
1
- import { h as sanitizeTerminalText, m as printSuccess } from "./output-FNHKw5Ac.mjs";
1
+ import { h as sanitizeTerminalText, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
2
2
  import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
3
3
  import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-Cr2zCc-J.mjs";
4
4
  import { createHash } from "node:crypto";
@@ -163,9 +163,9 @@ async function runAuth(origin, args) {
163
163
  if (args.action === "login" || args.action === "token" && args.tokenStdin) {
164
164
  if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
165
165
  const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
166
- const { discoverPlatform } = await import("./platform-cmd-Cuj4oUVo.mjs");
167
- const { selectPlatformLoginMethod } = await import("./login-DhK7o1oJ.mjs");
168
- const { runPlatformLogin } = await import("./auth-wn6F8dB8.mjs");
166
+ const { discoverPlatform } = await import("./platform-cmd-PT4YwMLM.mjs");
167
+ const { selectPlatformLoginMethod } = await import("./login-XD844Xs-.mjs");
168
+ const { runPlatformLogin } = await import("./auth-Cbqi1iVX.mjs");
169
169
  return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.provider)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
170
170
  })();
171
171
  const session = await exchangeOperatorSession(origin, apiToken);
@@ -344,7 +344,7 @@ async function migrateDeploymentAssets(client, origin, args) {
344
344
  }
345
345
  async function runOperatorCommand(args) {
346
346
  if (!args.action) {
347
- const { printHelpPage } = await import("./help-s9q7LTcu.mjs");
347
+ const { printHelpPage } = await import("./help-i2YGGnTH.mjs");
348
348
  printHelpPage(["platform", args.group]);
349
349
  return;
350
350
  }
@@ -1,6 +1,6 @@
1
1
  import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
2
2
  import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
3
- import { B as note$1, H as outro, L as log, P as isCI, nt as settings, q as spinner } from "./dist-D3m88sjf.mjs";
3
+ import { B as note$1, H as outro, L as log, P as isCI, nt as settings, q as spinner } from "./dist-BVdsO7Py.mjs";
4
4
  import { stripVTControlCharacters } from "node:util";
5
5
  import terminalLink from "terminal-link";
6
6
  //#region src/cli/output.ts
@@ -1,2 +1 @@
1
- import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-D2VF4ApL.mjs";
2
- export { renderBodyAttrs, renderHeadToString, renderHtmlAttrs, resolveHead };
1
+ export { t as renderBodyAttrs, n as renderHeadToString, r as renderHtmlAttrs, i as resolveHead } from "../head-D2VF4ApL.mjs";
@@ -1,2 +1 @@
1
- import { n as parseCacheFor, t as PrefetchCache } from "../prefetch-Bsc_Pb6c.mjs";
2
- export { PrefetchCache, parseCacheFor };
1
+ export { t as PrefetchCache, n as parseCacheFor } from "../prefetch-Bsc_Pb6c.mjs";
@@ -1,2 +1 @@
1
- import { t as serializePageData } from "../serialize-BtQyaYoC.mjs";
2
- export { serializePageData };
1
+ export { t as serializePageData } from "../serialize-BtQyaYoC.mjs";
@@ -0,0 +1 @@
1
+ export { n as buildMigrationPlanBundle } from "./plan-BhLO2p4w.mjs";
@@ -0,0 +1 @@
1
+ export { t as parsePlatformArgs } from "./platform-args-CaCL_1Ch.mjs";
@@ -212,7 +212,7 @@ const platformSubcommands = [
212
212
  {
213
213
  name: "repair",
214
214
  arg: "[id]",
215
- description: "Reconcile a platform or configure its dashboard origin"
215
+ description: "Reconcile a platform, its dashboard origin, or unfinished login setup"
216
216
  },
217
217
  {
218
218
  name: "disable",
@@ -255,6 +255,7 @@ function parseLifecycleSelector(rest, subcommand) {
255
255
  const positional = [];
256
256
  let runtime = "";
257
257
  let fromRuntime = "";
258
+ let authConfig;
258
259
  let dashboardUrl;
259
260
  for (let index = 0; index < rest.length; index++) {
260
261
  const arg = rest[index];
@@ -267,6 +268,10 @@ function parseLifecycleSelector(rest, subcommand) {
267
268
  const [value, next] = readValue(rest, index, arg);
268
269
  dashboardUrl = normalizePlatformDashboardUrl(value);
269
270
  index = next;
271
+ } else if (arg === "--auth-config" && subcommand === "repair") {
272
+ const [value, next] = readValue(rest, index, arg);
273
+ authConfig = value;
274
+ index = next;
270
275
  } else if (arg === "--from-runtime" && subcommand === "rollback") {
271
276
  const [value, next] = readValue(rest, index, arg);
272
277
  fromRuntime = value;
@@ -279,6 +284,7 @@ function parseLifecycleSelector(rest, subcommand) {
279
284
  ...parsed,
280
285
  runtime,
281
286
  fromRuntime,
287
+ ...authConfig !== void 0 ? { authConfig } : {},
282
288
  ...dashboardUrl !== void 0 ? { dashboardUrl } : {}
283
289
  };
284
290
  }
@@ -372,7 +378,7 @@ function parsePlatformArgs(args) {
372
378
  };
373
379
  }
374
380
  if (subcommand === "upgrade" || subcommand === "rollback" || subcommand === "repair" || subcommand === "disable" || subcommand === "enable") {
375
- const { selector, plan, runtime, fromRuntime, yes, dashboardUrl } = parseLifecycleSelector(rest, subcommand);
381
+ const { selector, plan, runtime, fromRuntime, yes, authConfig, dashboardUrl } = parseLifecycleSelector(rest, subcommand);
376
382
  return subcommand === "rollback" ? {
377
383
  subcommand,
378
384
  selector,
@@ -386,6 +392,7 @@ function parsePlatformArgs(args) {
386
392
  plan,
387
393
  runtime,
388
394
  yes,
395
+ ...authConfig !== void 0 ? { authConfig } : {},
389
396
  ...dashboardUrl !== void 0 ? { dashboardUrl } : {}
390
397
  };
391
398
  }
@@ -1,10 +1,10 @@
1
1
  import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
2
- import { A as confirm, K as select, U as password, X as text, z as multiselect } from "./dist-D3m88sjf.mjs";
3
- import { l as formatUrl, m as printSuccess } from "./output-FNHKw5Ac.mjs";
2
+ import { A as confirm, K as select, U as password, X as text, z as multiselect } from "./dist-BVdsO7Py.mjs";
3
+ import { l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
4
4
  import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
5
5
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
6
- import { i as humanLines } from "./operator-cmd-C5lCctnc.mjs";
7
- import { o as platformPromptAnswer } from "./platform-setup-CTf6MMT9.mjs";
6
+ import { i as humanLines } from "./operator-cmd-DHieWtFp.mjs";
7
+ import { o as platformPromptAnswer } from "./platform-setup-YvN9VQXV.mjs";
8
8
  import { parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration } from "@void/platform";
9
9
  import { stripVTControlCharacters } from "node:util";
10
10
  import { setTimeout } from "node:timers/promises";
@@ -142,11 +142,11 @@ async function configurationInput(args, existing) {
142
142
  }
143
143
  async function runPlatformAuthConfig(args) {
144
144
  if (args.action === "recover") {
145
- const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-D_0I3n-1.mjs");
145
+ const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-CXjfqyOv.mjs");
146
146
  return runPlatformAuthRecovery(args);
147
147
  }
148
148
  if (args.action === "protection") {
149
- const { runPlatformProtectionConfig } = await import("./platform-auth-protection-D5wvsI-Y.mjs");
149
+ const { runPlatformProtectionConfig } = await import("./platform-auth-protection-BXwZiJSF.mjs");
150
150
  return runPlatformProtectionConfig(args);
151
151
  }
152
152
  const origin = resolveOperatorOrigin(args.connection);
@@ -1,12 +1,12 @@
1
1
  import { S as writePendingInstallationSecrets, c as normalizePlatformApiUrl, m as readInstallationRecoverySecrets, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
2
2
  import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
3
3
  import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
4
- import { A as confirm, tt as isCancel } from "./dist-D3m88sjf.mjs";
5
- import { m as printSuccess } from "./output-FNHKw5Ac.mjs";
4
+ import { A as confirm, tt as isCancel } from "./dist-BVdsO7Py.mjs";
5
+ import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
6
6
  import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
7
7
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
8
- import { F as checkpointPlatformAccessResources, I as parsePlatformAccessSetupSpec, L as preparePlatformAccessSetup, N as resolvePlatformCloudflareCredential, n as resolvePlatformInstallDatabaseUrl, s as acquirePlatformDatabaseLifecycleLock, z as PlatformCloudflareClient } from "./platform-lifecycle-DOW-wLfx.mjs";
9
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-t7HKy4-U.mjs";
8
+ import { G as PlatformCloudflareClient, H as parsePlatformAccessSetupSpec, R as resolvePlatformCloudflareCredential, U as preparePlatformAccessSetup, V as checkpointPlatformAccessResources, n as resolvePlatformInstallDatabaseUrl, u as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-DBiS0cJd.mjs";
9
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-DhEFdQAf.mjs";
10
10
  import { parsePlatformAccessProtection, platformProtectionProofMessage } from "@void/platform";
11
11
  import { createHmac } from "node:crypto";
12
12
  import { readFile } from "node:fs/promises";
@@ -1,10 +1,10 @@
1
1
  import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
2
2
  import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
3
- import { A as confirm, tt as isCancel } from "./dist-D3m88sjf.mjs";
4
- import { l as formatUrl, m as printSuccess } from "./output-FNHKw5Ac.mjs";
3
+ import { A as confirm, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
+ import { l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
5
5
  import { a as resolveOperatorOrigin } from "./operator-auth-Cr2zCc-J.mjs";
6
- import { N as resolvePlatformCloudflareCredential, c as acquirePlatformDatabaseLifecycleLockConnection, l as platformDatabaseClientUrl, n as resolvePlatformInstallDatabaseUrl, z as PlatformCloudflareClient } from "./platform-lifecycle-DOW-wLfx.mjs";
7
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-t7HKy4-U.mjs";
6
+ import { G as PlatformCloudflareClient, R as resolvePlatformCloudflareCredential, d as acquirePlatformDatabaseLifecycleLockConnection, f as platformDatabaseClientUrl, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-DBiS0cJd.mjs";
7
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-DhEFdQAf.mjs";
8
8
  import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
9
9
  import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
10
10
  import { setTimeout } from "node:timers/promises";
@@ -1,8 +1,8 @@
1
1
  import { b as selectPlatformConnection, c as normalizePlatformApiUrl, i as getActivePlatformConnection, l as platformConnectionSlug, o as listInstallationManifests, s as listPlatformConnections, y as savePlatformConnection } from "./platform-registry-B9mWX9LO.mjs";
2
2
  import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
3
3
  import { r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
4
- import { K as select, L as log, X as text, tt as isCancel } from "./dist-D3m88sjf.mjs";
5
- import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-FNHKw5Ac.mjs";
4
+ import { K as select, L as log, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
5
+ import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
6
6
  import { n as readPlatformDiscoveryResponse, t as PlatformDisabledError } from "./platform-discovery-CHhNs8Nn.mjs";
7
7
  //#region src/cli/platform-cmd.ts
8
8
  function normalizePlatformInputUrl(input) {
@@ -96,19 +96,19 @@ async function runPlatformCommand(_root, args) {
96
96
  }]
97
97
  });
98
98
  if (isCancel(group)) return;
99
- const { parsePlatformArgs } = await import("./platform-args-Cm7x-fot.mjs");
99
+ const { parsePlatformArgs } = await import("./platform-args-B0HeTh0C.mjs");
100
100
  return runPlatformCommand(_root, parsePlatformArgs(["config", group]));
101
101
  }
102
- const { runPlatformPlansConfig } = await import("./platform-plans-config-CNH6zbPX.mjs");
102
+ const { runPlatformPlansConfig } = await import("./platform-plans-config-BWn1S2Rv.mjs");
103
103
  await runPlatformPlansConfig(args);
104
104
  return;
105
105
  }
106
- const { runPlatformAuthConfig } = await import("./platform-auth-config-CJmNkFT2.mjs");
106
+ const { runPlatformAuthConfig } = await import("./platform-auth-config-Z16-I8nT.mjs");
107
107
  await runPlatformAuthConfig(args);
108
108
  return;
109
109
  }
110
110
  if (args.subcommand === "operator") {
111
- const { runOperatorCommand } = await import("./operator-cmd-Cjk5DiRx.mjs");
111
+ const { runOperatorCommand } = await import("./operator-cmd-D6gnZsnK.mjs");
112
112
  await runOperatorCommand(args);
113
113
  return;
114
114
  }
@@ -176,7 +176,7 @@ async function runPlatformCommand(_root, args) {
176
176
  console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
177
177
  return;
178
178
  }
179
- const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-_gfnjUBr.mjs");
179
+ const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-u9pMOvxC.mjs");
180
180
  await runPlatformLifecycleCommand(args);
181
181
  }
182
182
  function showSavedInstallationStatus(manifest) {
@@ -0,0 +1 @@
1
+ export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-DaAOiWTl.mjs";
@@ -1,9 +1,9 @@
1
1
  import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-B9mWX9LO.mjs";
2
2
  import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
3
- import { A as confirm, X as text, tt as isCancel } from "./dist-D3m88sjf.mjs";
4
- import { m as printSuccess, p as note } from "./output-FNHKw5Ac.mjs";
5
- import { M as assertPlatformOperatorCredentialCanApplyPlan, N as resolvePlatformCloudflareCredential, b as recordPlatformWorkerTraffic, h as createPlatformHealthProbeToken, n as resolvePlatformInstallDatabaseUrl, s as acquirePlatformDatabaseLifecycleLock, t as assertNoninteractivePlatformMutationAcknowledged, v as recordResource, x as createPlatformInstallPlan, z as PlatformCloudflareClient } from "./platform-lifecycle-DOW-wLfx.mjs";
6
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-t7HKy4-U.mjs";
3
+ import { A as confirm, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
+ import { m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
5
+ import { G as PlatformCloudflareClient, L as assertPlatformOperatorCredentialCanApplyPlan, R as resolvePlatformCloudflareCredential, S as recordResource, T as createPlatformInstallPlan, n as resolvePlatformInstallDatabaseUrl, t as assertNoninteractivePlatformMutationAcknowledged, u as acquirePlatformDatabaseLifecycleLock, w as recordPlatformWorkerTraffic, y as createPlatformHealthProbeToken } from "./platform-lifecycle-DBiS0cJd.mjs";
6
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-DhEFdQAf.mjs";
7
7
  import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
8
8
  //#region src/cli/platform-domain.ts
9
9
  function platformDomainTarget(manifest, domain, zone, dedicatedZone) {