void 0.28.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -2,7 +2,7 @@ import { a as join } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
3
3
  import { t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-BJjULvL0.mjs";
4
4
  import { i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-DIrqEHQo.mjs";
5
- import { a as deleteEnvVarCaseAware, d as resolvePinnedApiBaseUrl, t as assertNoTransportRedirectInProjectDotenv, u as provisionEnv } from "./provision-DDh7ITVS.mjs";
5
+ import { a as deleteEnvVarCaseAware, d as resolvePinnedApiBaseUrl, t as assertNoTransportRedirectInProjectDotenv, u as provisionEnv } from "./provision-BnSSkiED.mjs";
6
6
  import { readWranglerTopLevelString } from "@void/deploy-cloudflare";
7
7
  //#region src/cli/deploy-transport.ts
8
8
  /**
package/dist/deploy.mjs CHANGED
@@ -2,9 +2,9 @@ import { a as join, c as resolve } from "./dist-ipQi0Q8y.mjs";
2
2
  import { c as isNodeTarget, d as readConfig } from "./config-Bx_1SpnO.mjs";
3
3
  import { o as validateSsrEntry } from "./entry-ehmBvs5w.mjs";
4
4
  import { r as hasEmailHandlers } from "./email-BcjSyAL0.mjs";
5
- import { a as resolveDistDir, c as hasApiRoutes, l as hasDocumentRoutes, n as collectRevalidate, o as resolveWorkerDirName, u as resolveAssetConfig } from "./isr-config-DPjXM8J2.mjs";
6
- import { t as analyzeApplication } from "./application-routing-Dy589Vgn.mjs";
7
- import { I as toManifestSchedulesAndQueues, L as validateDeployMigrations, M as resolveDeployWranglerCompat, b as assertWorkerMainUploaded, f as mergeAndLintRoutingRules, h as assertDeploySchemaDriftFree, j as resolveDeployWorkerMain, o as collectAndHashAssets, r as assertManagedDurableStateSupported, s as collectWorkerFiles, t as assembleVoidManifest } from "./deploy-managed-static-CGswbcay.mjs";
5
+ import { a as resolveDistDir, c as hasDocumentRoutes, l as resolveAssetConfig, n as collectRevalidate, o as resolveWorkerDirName, s as hasApiRoutes } from "./isr-config-fZaJJ8t7.mjs";
6
+ import { t as analyzeApplication } from "./application-routing-L7V-TFhZ.mjs";
7
+ import { I as toManifestSchedulesAndQueues, L as validateDeployMigrations, M as resolveDeployWranglerCompat, a as collectAndHashAssets, b as assertWorkerMainUploaded, d as mergeAndLintRoutingRules, h as assertDeploySchemaDriftFree, j as resolveDeployWorkerMain, o as collectWorkerFiles, t as assembleVoidManifest } from "./deploy-managed-static-Ca4TFdmx.mjs";
8
8
  import { existsSync } from "node:fs";
9
9
  import { createDeployArtifact } from "@void/deploy-core";
10
10
  //#region src/deploy.ts
@@ -13,7 +13,6 @@ async function prepareDeployArtifact(root = process.cwd()) {
13
13
  root = resolve(root);
14
14
  const config = readConfig(root);
15
15
  if (isNodeTarget(config.target) || config.output === "static") throw new Error("Artifact preparation requires a Void Cloudflare Worker build.");
16
- assertManagedDurableStateSupported(root);
17
16
  const analysis = await analyzeApplication(root, {
18
17
  config,
19
18
  environment: "prod"
@@ -46,6 +45,7 @@ async function prepareDeployArtifact(root = process.cwd()) {
46
45
  queues,
47
46
  dialect,
48
47
  webSockets: websockets,
48
+ durableObjects: analysis.durableObjects,
49
49
  ssr: ssr || scan.routes.length > 0 || scan.middleware.length > 0 || websockets.length > 0 || authEnabled,
50
50
  revalidate: collectRevalidate(config, pages ? scan.pages : null),
51
51
  assetConfig: resolveAssetConfig({
@@ -0,0 +1 @@
1
+ export { t as discoverSchema } from "./discover-D2PGT63u.mjs";
@@ -0,0 +1,431 @@
1
+ import { a as join, i as isAbsolute, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
2
+ import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
3
+ import { d as readConfig, f as resolveBindingNames, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
4
+ import { i as voidWarn } from "./log-vqY3pqwI.mjs";
5
+ import { n as ensureProjectTsconfig } from "./project-tsconfig-bveqhlYA.mjs";
6
+ import { n as generateDbDts, t as DRIZZLE_OPERATORS } from "./db-types-Bb4WBWIs.mjs";
7
+ import { t as discoverSchema } from "./discover-D2PGT63u.mjs";
8
+ import { createRequire } from "node:module";
9
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
10
+ import { fileURLToPath } from "node:url";
11
+ import { normalizePath } from "vite";
12
+ //#region src/plugin-drizzle.ts
13
+ const drizzleD1Resolved = fileURLToPath(import.meta.resolve("drizzle-orm/d1"));
14
+ const drizzleOrmResolved = fileURLToPath(import.meta.resolve("drizzle-orm"));
15
+ const envModuleResolved = fileURLToPath(import.meta.resolve("#self/_env"));
16
+ const drizzleNodePgResolved = fileURLToPath(import.meta.resolve("drizzle-orm/node-postgres"));
17
+ const drizzleMysql2Resolved = fileURLToPath(import.meta.resolve("drizzle-orm/mysql2"));
18
+ const VIRTUAL_DB_ID = "\0virtual:void-db";
19
+ const VIRTUAL_SCHEMA_DB_ID = "\0virtual:void-db-schema";
20
+ const REQUEST_POOL_PROXY = `
21
+ function requestPool(resolve, own = {}) {
22
+ const has = new Map();
23
+ let prototype;
24
+ return new Proxy({}, {
25
+ get(_, prop) {
26
+ if (Object.hasOwn(own, prop)) return own[prop];
27
+ const pool = resolve();
28
+ const value = Reflect.get(pool, prop);
29
+ return typeof value === "function" ? value.bind(pool) : value;
30
+ },
31
+ has(_, prop) {
32
+ if (Object.hasOwn(own, prop)) return true;
33
+ if (!has.has(prop)) has.set(prop, Reflect.has(resolve(), prop));
34
+ return has.get(prop);
35
+ },
36
+ getPrototypeOf: () => (prototype ??= Object.getPrototypeOf(resolve())),
37
+ });
38
+ }
39
+ `;
40
+ /**
41
+ * The app's `void/db` module for its dialect, schema and D1 binding. Resolving and loading
42
+ * have no side effects, so the Vite plugin and `voidDbBundlerPlugin` share them.
43
+ */
44
+ function createVoidDbModule(root, dialect, options, paths = readProjectPaths(root)) {
45
+ const schema = discoverSchema(root, paths);
46
+ const hasDbRuntime = schema != null || options.forceVirtualDb === true || dialect !== "sqlite";
47
+ const d1BindingName = options.d1BindingName ?? "DB";
48
+ return {
49
+ schema,
50
+ hasDbRuntime,
51
+ resolveId(id, importer) {
52
+ if (id === "void/db") {
53
+ if (!hasDbRuntime) return;
54
+ if (schema && importer) {
55
+ const normalizedImporter = normalizePath(importer);
56
+ const normalizedSchemaPath = normalizePath(schema.path);
57
+ if (schema.type === "file" && normalizedImporter === normalizedSchemaPath) return VIRTUAL_SCHEMA_DB_ID;
58
+ if (schema.type === "directory" && normalizedImporter.startsWith(normalizedSchemaPath)) return VIRTUAL_SCHEMA_DB_ID;
59
+ }
60
+ return VIRTUAL_DB_ID;
61
+ }
62
+ if (schema && (id === "@schema" || id.startsWith("@schema/"))) {
63
+ if (id === "@schema") return schema.path;
64
+ return join(schema.path, id.slice(8));
65
+ }
66
+ },
67
+ load: {
68
+ filter: { id: /^\0virtual:void-db(?:-schema)?$/ },
69
+ handler(id) {
70
+ if (id === VIRTUAL_SCHEMA_DB_ID) return `
71
+ export { ${DRIZZLE_OPERATORS} } from ${JSON.stringify(drizzleOrmResolved)};
72
+ export const db = {};
73
+ export function createDb() {
74
+ throw new Error("db: createDb() is unavailable when importing void/db from a schema file.");
75
+ }
76
+ `;
77
+ const schemaImport = schema ? `import * as schema from ${JSON.stringify(schema.path)};` : "";
78
+ const drizzleConfig = schema ? ", { schema }" : "";
79
+ if (dialect === "mysql") {
80
+ const mysqlDrizzleConfig = schema ? ", schema, mode: \"default\"" : "";
81
+ return `
82
+ import { drizzle } from ${JSON.stringify(drizzleMysql2Resolved)};
83
+ import { getRuntimeBinding, getRuntimeRequestResource } from ${JSON.stringify(envModuleResolved)};
84
+ ${schemaImport}
85
+ export { ${DRIZZLE_OPERATORS} } from ${JSON.stringify(drizzleOrmResolved)};
86
+
87
+ const _requestResourceKey = {};
88
+
89
+ function getConnectionString() {
90
+ const url = getRuntimeBinding("DATABASE_URL");
91
+ if (url) return url;
92
+ const hd = getRuntimeBinding("HYPERDRIVE");
93
+ if (hd?.connectionString) return hd.connectionString;
94
+ throw new Error("db: MySQL is not configured. Add DATABASE_URL to .env for local dev, or configure Hyperdrive for production.");
95
+ }
96
+
97
+ // mysql2 closes idle connections only from a timer that it starts when it builds a pool with
98
+ // maxIdle below connectionLimit, and that timer runs until the pool ends: workerd rejects it in
99
+ // global scope, and nothing ends Void's pools. Time each connection from its release instead,
100
+ // which runs in the request that ran the query.
101
+ function closeIdleConnections(pool, idleTimeout) {
102
+ const timers = new WeakMap();
103
+ pool.on("release", (connection) => {
104
+ const timer = setTimeout(() => connection.destroy(), idleTimeout);
105
+ // A Node script that ends its pool exits without waiting for this timer.
106
+ timer.unref?.();
107
+ timers.set(connection, timer);
108
+ });
109
+ pool.on("acquire", (connection) => clearTimeout(timers.get(connection)));
110
+ return pool;
111
+ }
112
+
113
+ function createPools() {
114
+ const pool = closeIdleConnections(
115
+ drizzle({
116
+ connection: {
117
+ uri: getConnectionString(),
118
+ connectionLimit: 1,
119
+ // Workers forbid eval, which mysql2 uses to build its row parsers.
120
+ disableEval: true,
121
+ },
122
+ }).$client,
123
+ 1000,
124
+ );
125
+ return { pool, promisePool: pool.promise() };
126
+ }
127
+
128
+ function getPools() {
129
+ // Framework entries that Void does not own run outside its request scope:
130
+ // they get a client for each use, never one shared across requests.
131
+ return getRuntimeRequestResource(_requestResourceKey, createPools, createPools);
132
+ }
133
+ ${REQUEST_POOL_PROXY}
134
+ const promiseClient = requestPool(() => getPools().promisePool);
135
+ // drizzle asks for the promise API while it builds the database, which can run in global
136
+ // scope. No request exists there to own a pool, so answer without one.
137
+ const client = requestPool(() => getPools().pool, { promise: () => promiseClient });
138
+
139
+ let instance;
140
+
141
+ export const db = new Proxy({}, {
142
+ get(_, prop) {
143
+ // drizzle reports a query's errors as "Failed query", so build the request's pool here:
144
+ // a missing connection string then throws its own message. Outside a request, build none.
145
+ getRuntimeRequestResource(_requestResourceKey, createPools, () => undefined);
146
+ instance ??= drizzle({ client${mysqlDrizzleConfig} });
147
+ const value = Reflect.get(instance, prop);
148
+ return typeof value === "function" ? value.bind(instance) : value;
149
+ },
150
+ });
151
+
152
+ export function createDb(connectionString) {
153
+ const db = drizzle({ connection: { uri: connectionString, disableEval: true }${mysqlDrizzleConfig} });
154
+ // 60 seconds is mysql2's own idleTimeout default.
155
+ closeIdleConnections(db.$client, 60000);
156
+ return db;
157
+ }
158
+ `;
159
+ }
160
+ if (dialect === "postgresql") return `
161
+ import { drizzle } from ${JSON.stringify(drizzleNodePgResolved)};
162
+ import { getRuntimeBinding, getRuntimeRequestResource } from ${JSON.stringify(envModuleResolved)};
163
+ ${schemaImport}
164
+ export { ${DRIZZLE_OPERATORS} } from ${JSON.stringify(drizzleOrmResolved)};
165
+
166
+ const _requestResourceKey = {};
167
+
168
+ function getConnectionString() {
169
+ const url = getRuntimeBinding("DATABASE_URL");
170
+ if (url) return url;
171
+ const hd = getRuntimeBinding("HYPERDRIVE");
172
+ if (hd?.connectionString) return hd.connectionString;
173
+ throw new Error("db: PostgreSQL is not configured. Add DATABASE_URL to .env for local dev, or configure Hyperdrive for production.");
174
+ }
175
+
176
+ function createPool() {
177
+ return drizzle({
178
+ connection: {
179
+ connectionString: getConnectionString(),
180
+ max: 1,
181
+ idleTimeoutMillis: 1000,
182
+ },
183
+ }).$client;
184
+ }
185
+
186
+ function getPool() {
187
+ // Framework entries that Void does not own run outside its request scope:
188
+ // they get a client for each use, never one shared across requests.
189
+ return getRuntimeRequestResource(_requestResourceKey, createPool, createPool);
190
+ }
191
+ ${REQUEST_POOL_PROXY}
192
+ let instance;
193
+
194
+ export const db = new Proxy({}, {
195
+ get(_, prop) {
196
+ // drizzle reports a query's errors as "Failed query", so build the request's pool here:
197
+ // a missing connection string then throws its own message. Outside a request, build none.
198
+ getRuntimeRequestResource(_requestResourceKey, createPool, () => undefined);
199
+ instance ??= drizzle({ client: requestPool(getPool)${schema ? ", schema" : ""} });
200
+ const value = Reflect.get(instance, prop);
201
+ return typeof value === "function" ? value.bind(instance) : value;
202
+ },
203
+ });
204
+
205
+ export function createDb(connectionString) {
206
+ return drizzle(connectionString${drizzleConfig});
207
+ }
208
+ `;
209
+ return `
210
+ import { drizzle } from ${JSON.stringify(drizzleD1Resolved)};
211
+ import { getRuntimeRequestResource, requireRuntimeBinding } from ${JSON.stringify(envModuleResolved)};
212
+ ${schemaImport}
213
+ export { ${DRIZZLE_OPERATORS} } from ${JSON.stringify(drizzleOrmResolved)};
214
+
215
+ const _requestResourceKey = {};
216
+
217
+ export const db = new Proxy({}, {
218
+ get(_, prop) {
219
+ const instance = getRuntimeRequestResource(
220
+ _requestResourceKey,
221
+ () => createDb(requireRuntimeBinding(${JSON.stringify(d1BindingName)})),
222
+ () => createPrimaryDb(requireRuntimeBinding(${JSON.stringify(d1BindingName)}))
223
+ );
224
+ return Reflect.get(instance, prop);
225
+ },
226
+ });
227
+
228
+ export function createDb(d1) {
229
+ return drizzle(d1.withSession("first-unconstrained")${drizzleConfig});
230
+ }
231
+
232
+ function createPrimaryDb(d1) {
233
+ return drizzle(d1.withSession("first-primary")${drizzleConfig});
234
+ }
235
+ `;
236
+ }
237
+ }
238
+ };
239
+ }
240
+ /**
241
+ * Vite plugin for Drizzle integration.
242
+ *
243
+ * - Intercepts `void/db` imports in SSR/worker environments and serves
244
+ * a virtual module that creates a Drizzle DB instance, using the user's
245
+ * schema when present.
246
+ * - Generates `.void/db.d.ts` with proper Drizzle types.
247
+ * - Sets up `@schema` Vite alias for convenient imports when a schema exists.
248
+ * - Updates `.void/tsconfig.json` with TypeScript paths.
249
+ */
250
+ function drizzlePlugin(root, hasRouteTypes, dialect = "sqlite", options = {}) {
251
+ const outDir = join(root, ".void");
252
+ const paths = readProjectPaths(root);
253
+ const dbModule = createVoidDbModule(root, dialect, options, paths);
254
+ const { schema, hasDbRuntime } = dbModule;
255
+ ensureProjectTsconfig(root, hasRouteTypes, hasDbRuntime, schema != null, {
256
+ redirectDbModule: options.redirectDbTypePaths,
257
+ paths
258
+ });
259
+ if (hasDbRuntime) generateDbDts(outDir, schema ?? null, dialect);
260
+ return {
261
+ name: "void:drizzle",
262
+ enforce: "pre",
263
+ config() {
264
+ if (!schema) return;
265
+ return { resolve: { alias: { "@schema": schema.path } } };
266
+ },
267
+ resolveId: {
268
+ filter: { id: /^(void\/db|@schema)/ },
269
+ handler(id, importer) {
270
+ if (id === "void/db" && this.environment?.name === "client") return;
271
+ const resolved = dbModule.resolveId(id, importer);
272
+ if (resolved === VIRTUAL_DB_ID && dialect !== "sqlite" && options.nitroBundlesServer && this.environment?.mode === "build") return {
273
+ id,
274
+ external: true
275
+ };
276
+ return resolved;
277
+ }
278
+ },
279
+ load: dbModule.load,
280
+ async configureServer() {
281
+ if (!schema) return;
282
+ const migrationsDir = paths.migrationsDir;
283
+ if (!(existsSync(migrationsDir) && readdirSync(migrationsDir).some((f) => f.endsWith(".sql")))) {
284
+ if (dialect === "sqlite") {
285
+ const { getApplicationTables, getMiniflareDatabasePath } = await import("./runner-So9mYfcm.mjs");
286
+ if ((await getApplicationTables(getMiniflareDatabasePath(options.localD1PersistRoot ?? join(root, ".void"), options.localD1DatabaseId ?? "local")).catch(() => [])).length > 0) return;
287
+ }
288
+ voidWarn(`Schema found but no migrations in ${paths.sourceRelative("db/migrations")}/.\n \`void db push\` syncs the schema to your local DB without creating migration files.
289
+ Run \`void db generate\` to create migration files for dev startup and deploy.`);
290
+ }
291
+ }
292
+ };
293
+ }
294
+ /**
295
+ * `void/db` and `@schema` for bundles that do not run Void's Vite plugins: Nitro's (Nuxt and
296
+ * Analog server routes, through `void/nitro`) and the cron and queue handler bundle that deploys
297
+ * build. Without it they load the package's static `void/db`, a D1 client without the app's
298
+ * schema. It reads the dialect, schema and D1 binding from the project, as the Vite plugin does.
299
+ * Its hooks are plain Rollup hooks; Vite also needs `enforce` to run them before its resolver.
300
+ *
301
+ * For a bundle that runs in workerd, `sqlDriver` builds a copy of the PostgreSQL or MySQL driver
302
+ * from its entry file, and the plugin serves that module for `pg` or `mysql2` (for
303
+ * `mysql2/promise`, the promise API from the same build). Each import gets the copy that the
304
+ * bundler resolves for it: the generated client's drizzle-orm gets the one it depends on, and an
305
+ * app's own import gets the app's version.
306
+ */
307
+ function voidDbBundlerPlugin(root, options = {}) {
308
+ const config = options.config ?? readConfig(root);
309
+ const dialect = getDatabaseDialect(config);
310
+ const d1BindingName = resolveBindingNames(config.inference?.bindings)?.d1;
311
+ const dbModule = createVoidDbModule(root, dialect, {
312
+ d1BindingName,
313
+ forceVirtualDb: d1BindingName !== void 0
314
+ }, resolveProjectPaths(root, config));
315
+ const driverPackage = dialect === "postgresql" ? "pg" : dialect === "mysql" ? "mysql2" : void 0;
316
+ const drivers = /* @__PURE__ */ new Map();
317
+ const driverDirs = [];
318
+ return {
319
+ name: "void:db",
320
+ enforce: "pre",
321
+ async resolveId(id, importer, resolveOptions) {
322
+ const promiseApi = driverPackage === "mysql2" && MYSQL2_PROMISE.test(id);
323
+ if ((id === driverPackage || promiseApi) && options.sqlDriver && dialect !== "sqlite") {
324
+ const custom = resolveOptions?.custom;
325
+ const resolved = await this.resolve(id, importer, {
326
+ ...resolveOptions,
327
+ skipSelf: true,
328
+ custom: {
329
+ ...custom,
330
+ "node-resolve": {
331
+ ...custom?.["node-resolve"],
332
+ isRequire: true
333
+ }
334
+ }
335
+ });
336
+ const entry = resolved && !resolved.external ? resolvePackageEntry(driverPackage, resolved.id) : void 0;
337
+ if (entry === void 0) return resolved;
338
+ let driver = drivers.get(entry);
339
+ if (!driver) {
340
+ assertWorkerDriver(driverPackage, entry, root, importer);
341
+ driver = options.sqlDriver(dialect, entry).then((path) => {
342
+ driverDirs.push(`${normalizePath(dirname(path))}/`);
343
+ return path;
344
+ });
345
+ drivers.set(entry, driver);
346
+ }
347
+ return promiseApi ? (await driver).replace(/mysql2\.mjs$/, "promise.mjs") : driver;
348
+ }
349
+ if (id.startsWith("node:") && importer && driverDirs.some((dir) => normalizePath(importer).startsWith(dir))) return {
350
+ id,
351
+ external: true
352
+ };
353
+ const resolved = dbModule.resolveId(id, importer);
354
+ if (resolved !== void 0 && id !== "void/db") return this.resolve(resolved, importer, { skipSelf: true });
355
+ return resolved ?? null;
356
+ },
357
+ load(id) {
358
+ if (id !== VIRTUAL_DB_ID && id !== VIRTUAL_SCHEMA_DB_ID) return null;
359
+ return dbModule.load.handler(id);
360
+ }
361
+ };
362
+ }
363
+ /** mysql2's promise API, which `bundleWorkerSqlDriver` builds next to the driver. */
364
+ const MYSQL2_PROMISE = /^mysql2\/promise(?:\.js)?$/;
365
+ /**
366
+ * The first driver versions that run in Workers: pg 8.11 brings pg-cloudflare, its socket there,
367
+ * and mysql2 3.13 the `disableEval` option, without which it compiles its parsers with
368
+ * `new Function`, which workerd forbids.
369
+ */
370
+ const WORKER_DRIVER_MINIMUM = {
371
+ pg: [8, 11],
372
+ mysql2: [3, 13]
373
+ };
374
+ /** Throw when the driver whose entry file is `entry` is older than Workers need. */
375
+ function assertWorkerDriver(name, entry, root, importer) {
376
+ let version;
377
+ try {
378
+ const packageJson = createRequire(entry).resolve(`${name}/package.json`);
379
+ ({version} = JSON.parse(readFileSync(packageJson, "utf8")));
380
+ } catch {
381
+ return;
382
+ }
383
+ const match = /^(\d+)\.(\d+)\./.exec(version ?? "");
384
+ const [major, minor] = WORKER_DRIVER_MINIMUM[name];
385
+ if (!match || Number(match[1]) > major || Number(match[1]) === major && Number(match[2]) >= minor) return;
386
+ const source = importer ? ` Imported by ${relative(root, importer)}.` : "";
387
+ throw new Error(`${name} ${version} cannot run in Cloudflare Workers, which need ${name} ${major}.${minor} or later. Upgrade ${name}.${source}`);
388
+ }
389
+ /**
390
+ * The CommonJS entry of package `name`, from `file` inside one of its copies (which a bundler may
391
+ * have resolved to an ES module entry), or undefined if `file` is not on disk.
392
+ */
393
+ function resolvePackageEntry(name, file) {
394
+ if (!isAbsolute(file)) return;
395
+ try {
396
+ return createRequire(file).resolve(name);
397
+ } catch {
398
+ return;
399
+ }
400
+ }
401
+ //#endregion
402
+ //#region src/queues/dispatch.ts
403
+ /**
404
+ * Emit the queue-name resolver used by generated native workers and framework
405
+ * wrappers. Hosted relays send the exact logical name. Native Queue events may
406
+ * expose a project-prefixed physical name, so fallback matching selects the
407
+ * unique longest known `-name` suffix. Unknown or ambiguous inputs fail closed.
408
+ */
409
+ function generateQueueResolverSource(queueNames) {
410
+ return `const __queueNames = ${JSON.stringify(queueNames)};
411
+ function __resolveQueueIndex(queueName) {
412
+ if (typeof queueName !== "string") return -1;
413
+ const exact = __queueNames.indexOf(queueName);
414
+ if (exact !== -1) return exact;
415
+ let match = -1;
416
+ let matchLength = -1;
417
+ for (let i = 0; i < __queueNames.length; i++) {
418
+ const name = __queueNames[i];
419
+ if (!queueName.endsWith("-" + name)) continue;
420
+ if (name.length > matchLength) {
421
+ match = i;
422
+ matchLength = name.length;
423
+ } else if (name.length === matchLength) {
424
+ match = -1;
425
+ }
426
+ }
427
+ return match;
428
+ }`;
429
+ }
430
+ //#endregion
431
+ export { drizzlePlugin as n, voidDbBundlerPlugin as r, generateQueueResolverSource as t };
@@ -4,8 +4,7 @@ import "node:fs";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { stripVTControlCharacters, styleText } from "node:util";
6
6
  import process$1, { stdin, stdout } from "node:process";
7
- import * as l from "node:readline";
8
- import l__default from "node:readline";
7
+ import l__default, * as l from "node:readline";
9
8
  import { ReadStream } from "node:tty";
10
9
  //#region ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
11
10
  const getCodePointsLength$1 = (() => {
@@ -803,7 +802,7 @@ var n = class extends y {
803
802
  }
804
803
  };
805
804
  //#endregion
806
- //#region ../../node_modules/.pnpm/@voidzero-dev+vite-plus-prompts@1.1.0_patch_hash=396e9a3b8f1c6fa1cbcbc9cef53b838feb28dc9dc7dd99b67d87c108854bc49a/node_modules/@voidzero-dev/vite-plus-prompts/dist/index.mjs
805
+ //#region ../../node_modules/.pnpm/@voidzero-dev+vite-plus-prompts@1.2.0/node_modules/@voidzero-dev/vite-plus-prompts/dist/index.mjs
807
806
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
808
807
  const isAmbiguous = (x) => {
809
808
  return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
@@ -1510,13 +1509,13 @@ const box = (message = "", title = "", opts) => {
1510
1509
  * piped output never see these markers as content (they only update the
1511
1510
  * window title, which the runner's PTY captures).
1512
1511
  *
1513
- * Protocol (shared with vite-task's `pty_terminal_test_client` crate):
1514
- * `OSC 2 ; pty-terminal-test:<32-hex-id>:<base64url(name)> ST`. The runner
1512
+ * Protocol (shared with vite-task's `vt_pty_terminal_test_client` crate):
1513
+ * `OSC 2 ; vt-pty-terminal-test:<32-hex-id>:<base64url(name)> ST`. The runner
1515
1514
  * decodes the title with `decode_milestone_title`, ignoring ordinary title
1516
1515
  * updates. A fresh random id per emission keeps repeated milestones with the
1517
1516
  * same name observable as distinct title changes through Windows ConPTY.
1518
1517
  */
1519
- const MILESTONE_TITLE_MARKER = "pty-terminal-test:";
1518
+ const MILESTONE_TITLE_MARKER = "vt-pty-terminal-test:";
1520
1519
  const OSC2_OPEN = "\x1B]2;";
1521
1520
  const ST = "\x1B\\";
1522
1521
  const MILESTONES_ENABLED = process.env.VP_EMIT_MILESTONES === "1";
@@ -0,0 +1 @@
1
+ export { tt as isCancel, L as log, K as select, X as text } from "./dist-BVdsO7Py.mjs";
@@ -1,9 +1,9 @@
1
1
  import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
- import { L as log } from "./dist-D3m88sjf.mjs";
4
- import { f as import_picocolors, m as printSuccess, p as note } from "./output-FNHKw5Ac.mjs";
3
+ import { L as log } from "./dist-BVdsO7Py.mjs";
4
+ import { f as import_picocolors, m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
5
5
  import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
6
- import { i as resolveCommandProjectId } from "./resolve-project-C_Cu7E8a.mjs";
6
+ import { i as resolveCommandProjectId } from "./resolve-project-WpwkCB_c.mjs";
7
7
  //#region src/cli/domain.ts
8
8
  async function runDomainCommand(root, args) {
9
9
  const platform = readDeploymentPlatform(root);
@@ -25,7 +25,7 @@ async function runDomainCommand(root, args) {
25
25
  }
26
26
  async function runCloudflareDomainCommand(root, args) {
27
27
  if (args.projectSlug) throw new Error("domain: --project selects a Void platform project and is not used for direct Cloudflare apps.");
28
- const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-Ds-lX3Ts.mjs");
28
+ const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-CrSUFRzJ.mjs");
29
29
  if (args.subcommand === "add") {
30
30
  const result = await changeCloudflareDomain(root, args.hostname, "add");
31
31
  note("Cloudflare Custom Domains manages the DNS record and TLS certificate in the zone on your account.", "Cloudflare Domain");
package/dist/edge.mjs CHANGED
@@ -1,2 +1 @@
1
- import { createStaticEdgeHandler } from "@void/edge";
2
- export { createStaticEdgeHandler };
1
+ export { createStaticEdgeHandler } from "@void/edge";
@@ -4,13 +4,13 @@ import { d as readConfig } from "./config-Bx_1SpnO.mjs";
4
4
  import { i as scanEmailHandlersSync } from "./email-BcjSyAL0.mjs";
5
5
  import { j as writeProvisionedWranglerConfig } from "./wrangler-BYs07Rxy.mjs";
6
6
  import { c as getToken, u as openBrowser } from "./auth-B6iOCjKI.mjs";
7
- import { A as confirm, L as log, U as password, tt as isCancel } from "./dist-D3m88sjf.mjs";
8
- import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-FNHKw5Ac.mjs";
9
- import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-CH053RxK.mjs";
7
+ import { A as confirm, L as log, U as password, tt as isCancel } from "./dist-BVdsO7Py.mjs";
8
+ import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
9
+ import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-DfG6UEMm.mjs";
10
10
  import { n as PlatformApiError, r as PlatformClient } from "./client-DM9Kcf4e.mjs";
11
- import { i as resolveCommandProjectId } from "./resolve-project-C_Cu7E8a.mjs";
12
- import { o as resolveDeployTransport } from "./deploy-transport-BiicfoQW.mjs";
13
- import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-B06EQq4t.mjs";
11
+ import { i as resolveCommandProjectId } from "./resolve-project-WpwkCB_c.mjs";
12
+ import { o as resolveDeployTransport } from "./deploy-transport-DWlWBe6M.mjs";
13
+ import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-BYYlnsiy.mjs";
14
14
  import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
15
15
  import { tmpdir } from "node:os";
16
16
  import { execSync } from "node:child_process";
@@ -2,7 +2,7 @@ import { n as __toESM } from "./rolldown-runtime-DXIUcv95.mjs";
2
2
  import { a as join, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
3
3
  import { t as require_picocolors } from "./picocolors-BTps1_gs.mjs";
4
4
  import { d as readConfig } from "./config-Bx_1SpnO.mjs";
5
- import { i as collectFiles } from "./isr-config-DPjXM8J2.mjs";
5
+ import { i as collectFiles } from "./isr-config-fZaJJ8t7.mjs";
6
6
  import { i as voidWarn, r as voidLog } from "./log-vqY3pqwI.mjs";
7
7
  import { i as readProjectIdField } from "./project-rqDnVsJN.mjs";
8
8
  import { p as findBindingNameOwner, u as ensureWranglerCompat } from "./wrangler-BYs07Rxy.mjs";
@@ -1,4 +1,4 @@
1
- import { a as getRawRuntimeEnv, i as envContext, n as INTERNAL_BINDING_PREFIXES, o as isIsrActive, r as asEnv, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-Cklzcde3.mjs";
1
+ import { a as getRawRuntimeEnv, i as envContext, n as INTERNAL_BINDING_PREFIXES, o as isIsrActive, r as asEnv, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-D74P4ebM.mjs";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/runtime/env.ts
4
4
  /**
@@ -8,7 +8,10 @@ import { AsyncLocalStorage } from "node:async_hooks";
8
8
  * Internal platform bindings (__VOID_*, __PROJECT_*) are filtered
9
9
  * from getRuntimeEnv() and blocked in getRuntimeBinding().
10
10
  */
11
- const runtimeRequestContext = new AsyncLocalStorage();
11
+ const REQUEST_SCOPE_SYMBOL = Symbol.for("void.runtimeRequestScope.v1");
12
+ const shared = globalThis;
13
+ shared[REQUEST_SCOPE_SYMBOL] ??= new AsyncLocalStorage();
14
+ const runtimeRequestContext = shared[REQUEST_SCOPE_SYMBOL];
12
15
  /** @internal Reuse a resource only within the current runtime request. */
13
16
  function getRuntimeRequestResource(key, initialize, outsideScope) {
14
17
  const scope = runtimeRequestContext.getStore();
@@ -1,11 +1,11 @@
1
1
  import { a as join } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
3
3
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
4
- import { H as outro, L as log } from "./dist-D3m88sjf.mjs";
5
- import { m as printSuccess, p as note } from "./output-FNHKw5Ac.mjs";
4
+ import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
5
+ import { m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
6
6
  import { r as generateEnvTypes, t as findEnvFile } from "./env-types-DS2_y4X8.mjs";
7
7
  import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
8
- import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-cE0zcmzO.mjs";
8
+ import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-DYxjz_Wo.mjs";
9
9
  import { mkdirSync, writeFileSync } from "node:fs";
10
10
  //#region src/cli/env.ts
11
11
  async function runEnvCommand(root, args) {
@@ -25,7 +25,7 @@ async function runCheck(root, useRemoteSecrets) {
25
25
  const platform = readDeploymentPlatform(root);
26
26
  if (platform === "none") throw new Error("env: Deployment is disabled. Run `void init` to choose a platform.");
27
27
  if (platform === "cloudflare") {
28
- const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-Ds-lX3Ts.mjs");
28
+ const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-CrSUFRzJ.mjs");
29
29
  remoteSecrets = await listCloudflareSecrets(resolveCloudflareOperationContext(root));
30
30
  } else {
31
31
  const token = getToken(root);
@@ -17,7 +17,18 @@ const INTERNAL_BINDING_EXACT_NAMES = ["ISR_CACHE"];
17
17
  function isIsrActive(rawEnv) {
18
18
  return rawEnv.__VOID_ISR_DEPLOYMENT_ID != null;
19
19
  }
20
- const envContext = new AsyncLocalStorage();
20
+ /**
21
+ * One process or isolate can evaluate this module more than once: Vite's SSR module
22
+ * runner keeps its own copy beside a package it leaves external, and a dependency
23
+ * optimizer reload re-evaluates it while a request is in flight. Every copy must read
24
+ * the env of the current request, so the store lives on `globalThis`, like
25
+ * `authContext`. Two Void versions in one process share it: change the key when the
26
+ * store shape changes.
27
+ */
28
+ const ENV_CONTEXT_SYMBOL = Symbol.for("void.envContext.v1");
29
+ const shared = globalThis;
30
+ shared[ENV_CONTEXT_SYMBOL] ??= new AsyncLocalStorage();
31
+ const envContext = shared[ENV_CONTEXT_SYMBOL];
21
32
  let cloudflareEnv;
22
33
  if (typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") import("cloudflare:workers").then((mod) => {
23
34
  cloudflareEnv = asEnv(mod.env) ?? void 0;
@@ -0,0 +1 @@
1
+ export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-DYxjz_Wo.mjs";