void 1.3.0 → 1.4.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 (152) hide show
  1. package/dist/{account-cmd-B4i71m7k.mjs → account-cmd-HP8bixYo.mjs} +3 -3
  2. package/dist/{application-analysis-DYdVoMAY.mjs → application-analysis-DDOQwiXk.mjs} +11 -7
  3. package/dist/{application-routing-C8EqRDfv.mjs → application-routing-4719u_kf.mjs} +1 -1
  4. package/dist/auth-g2TQbDLD.d.mts +70 -0
  5. package/dist/{auth-link-BKwHPbdv.mjs → auth-link-CedYpDCy.mjs} +3 -3
  6. package/dist/{auth-router-DqLx8E0F.mjs → auth-router-vafo7x8w.mjs} +11 -6
  7. package/dist/{better-auth-shared-DVk2DkTW.d.mts → better-auth-shared-BHB8kiTE.d.mts} +1 -1
  8. package/dist/{build-cmd-Dy4psnt1.mjs → build-cmd-9vUAQ1_V.mjs} +1 -1
  9. package/dist/{cache-DV37S6dl.mjs → cache-jvwLNb0h.mjs} +1 -1
  10. package/dist/{cancel-deploy-DMPyu1Vt.mjs → cancel-deploy-Dw0UmWKO.mjs} +1 -1
  11. package/dist/{cf-build-output-Bapzc_8Z.mjs → cf-build-output-XpNR9zoh.mjs} +20 -4
  12. package/dist/cf-build-output-bd8Uwv1P.mjs +1 -0
  13. package/dist/{cf-worker-settings-BECvvTVd.mjs → cf-worker-settings-Dg27RzyT.mjs} +11 -5
  14. package/dist/cli/cli.mjs +25 -25
  15. package/dist/cli/cloudflare-operation-process.mjs +9 -3
  16. package/dist/cli/env-schema-probe.mjs +2 -2
  17. package/dist/{client-BEMtySaV.mjs → client-B3LnB_bE.mjs} +1 -1
  18. package/dist/client-BZb9j66F.mjs +1 -0
  19. package/dist/{cloudflare-auth-Byo_0_N9.mjs → cloudflare-auth-DyD_kVFr.mjs} +1 -1
  20. package/dist/{cloudflare-cmd-BaqIigwI.mjs → cloudflare-cmd-D-b_u3T4.mjs} +2 -2
  21. package/dist/{cloudflare-config-DchHxPTo.mjs → cloudflare-config-CH1AylZT.mjs} +14 -3
  22. package/dist/{cloudflare-connect-pNLQmr_e.mjs → cloudflare-connect-zTJh8UnN.mjs} +2 -2
  23. package/dist/{cloudflare-operations-vP3b5CQf.mjs → cloudflare-operations-Bc-7fN44.mjs} +4 -4
  24. package/dist/{cloudflare-operations-PCM4wucv.mjs → cloudflare-operations-BtulCNOg.mjs} +1 -1
  25. package/dist/{config-BU6hMu1W.mjs → config-BV2ASlpn.mjs} +1 -1
  26. package/dist/{config-Du88-7Y8.d.mts → config-CAdZVTLN.d.mts} +2 -0
  27. package/dist/config-D-6q7EBH.mjs +87 -0
  28. package/dist/{config-DHgSEWT7.mjs → config-OFOAimzt.mjs} +5 -3
  29. package/dist/config-entry.d.mts +1 -1
  30. package/dist/{config-BIaXIkkv.mjs → config-tqMM6DwY.mjs} +1 -1
  31. package/dist/{connect-DwVsBvVh.mjs → connect-BOM6zvFX.mjs} +4 -4
  32. package/dist/{create-project-CjzbBlTv.mjs → create-project-Bxd02EHN.mjs} +1 -1
  33. package/dist/{create-project-CgrnvzyA.mjs → create-project-C2K0DN2O.mjs} +1 -1
  34. package/dist/{db-rvo64snS.mjs → db-Cdvr3zwG.mjs} +16 -16
  35. package/dist/{db-types-NGxPwnlt.mjs → db-types-0eCiqYb1.mjs} +1 -1
  36. package/dist/{delete-DWX6dP4M.mjs → delete-lETE6Tpt.mjs} +1 -1
  37. package/dist/deploy-CX94CmKa.mjs +2 -0
  38. package/dist/{deploy-hRPvw8ci.mjs → deploy-CdM-LAxX.mjs} +260 -95
  39. package/dist/{deploy-managed-static-CDYA2p3L.mjs → deploy-managed-static-DjeBFG2c.mjs} +24 -17
  40. package/dist/{deploy-transport-JCxw7QDi.mjs → deploy-transport-DIq_gFTP.mjs} +13 -12
  41. package/dist/deploy.d.mts +2 -0
  42. package/dist/deploy.mjs +7 -5
  43. package/dist/{dispatch-OVLeWW8K.mjs → dispatch-CLa2LThw.mjs} +5 -5
  44. package/dist/{domain-CH5iBD9Y.mjs → domain-DyhNtdYf.mjs} +2 -2
  45. package/dist/{email-CbTO1l78.mjs → email-DM2wDcBN.mjs} +6 -6
  46. package/dist/{email-cloudflare-B8-pq_-W.mjs → email-cloudflare-PMbAev9Q.mjs} +20 -7
  47. package/dist/{env-BBdw236G.mjs → env-78hbN-oI.mjs} +3 -3
  48. package/dist/{env-validation-XcukUlFM.mjs → env-validation-B3VobvXm.mjs} +1 -0
  49. package/dist/{env-validation-BfBVvBNe.mjs → env-validation-BUfFZ6bt.mjs} +1 -1
  50. package/dist/error-pages-CLIJ7aYq.mjs +37 -0
  51. package/dist/gen-BhWBT4iu.mjs +1 -0
  52. package/dist/{gen-CCx3t2Ju.mjs → gen-CFmsUsW1.mjs} +3 -3
  53. package/dist/{github-cmd-BzkRLkbg.mjs → github-cmd-De-_IWbM.mjs} +1 -1
  54. package/dist/{handler-CQv5YDS0.d.mts → handler-BHktmuTL.d.mts} +3 -1
  55. package/dist/{headers-D522zd0A.mjs → headers--vaK_chu.mjs} +1 -1
  56. package/dist/index.d.mts +2 -2
  57. package/dist/index.mjs +68 -33
  58. package/dist/{info-oBm8yK8J.mjs → info-Yg0-V5Rs.mjs} +3 -3
  59. package/dist/{init-CBp_uMve.mjs → init-CDiJQycf.mjs} +31 -16
  60. package/dist/{link-Dt_QXmM4.mjs → link-Dllip08S.mjs} +2 -2
  61. package/dist/{list-DF6asTdt.mjs → list-BYRP6am0.mjs} +2 -2
  62. package/dist/{live-CXJ9yC98.d.mts → live-BllfDuzA.d.mts} +2 -2
  63. package/dist/{local-d1-CUhH3qtj.mjs → local-d1-CAwAs9GH.mjs} +1 -1
  64. package/dist/login-BAPmYnb7.mjs +1 -0
  65. package/dist/{login-BjSyhXlT.mjs → login-PcFy5mlC.mjs} +2 -2
  66. package/dist/{logs-DmvBl6xA.mjs → logs-DmJTBhed.mjs} +2 -2
  67. package/dist/{migrate-BXRHpYwR.mjs → migrate-B8S2xTcb.mjs} +5 -66
  68. package/dist/migrate-BIYTPQE6.mjs +1 -0
  69. package/dist/nitro.mjs +4 -4
  70. package/dist/{node-DtD7ZiPf.mjs → node-CDOPrGSl.mjs} +3 -3
  71. package/dist/operator-cmd-CjazwOyb.mjs +1 -0
  72. package/dist/{operator-cmd-DjZKGGgN.mjs → operator-cmd-DmkmS2wL.mjs} +2 -2
  73. package/dist/pages/client.d.mts +17 -2
  74. package/dist/pages/client.mjs +26 -1
  75. package/dist/pages/index.d.mts +17 -1
  76. package/dist/pages/index.mjs +95 -4
  77. package/dist/pages/protocol.d.mts +2 -2
  78. package/dist/{platform-auth-config-BgnuMbml.mjs → platform-auth-config-CImnfohz.mjs} +3 -3
  79. package/dist/{platform-auth-protection-NjRejttU.mjs → platform-auth-protection-BogLhtHi.mjs} +2 -2
  80. package/dist/{platform-auth-recovery-Ug12d9W5.mjs → platform-auth-recovery-B-mEaWEi.mjs} +2 -2
  81. package/dist/{platform-cmd-BYKLMPCn.mjs → platform-cmd-CV8NxIIn.mjs} +1 -1
  82. package/dist/{platform-cmd-HByuZAO7.mjs → platform-cmd-DZK2ixMl.mjs} +3 -3
  83. package/dist/{platform-domain-DLSQ8GF8.mjs → platform-domain-CRvelPGE.mjs} +2 -2
  84. package/dist/{platform-lifecycle-3dwFJmnq.mjs → platform-lifecycle-CPYY7E9B.mjs} +8 -8
  85. package/dist/{platform-lifecycle-BRqcxerG.mjs → platform-lifecycle-DwXq7kZt.mjs} +1 -1
  86. package/dist/{platform-management-ZZ6bQM5j.mjs → platform-management-BOnGbMSM.mjs} +1 -1
  87. package/dist/{platform-management-ZK6XcbCo.mjs → platform-management-lXdgGgAM.mjs} +1 -1
  88. package/dist/{platform-recovery-8vNE5dNN.mjs → platform-recovery-noaALXnE.mjs} +2 -2
  89. package/dist/{prepare-5BR7Splm.mjs → prepare-BuOS18AM.mjs} +1 -1
  90. package/dist/{prepare-Dseww74N.mjs → prepare-D604Yiyr.mjs} +11 -7
  91. package/dist/prepare-DU-tOpS5.mjs +1 -0
  92. package/dist/{project-cmd-CjLNNxwe.mjs → project-cmd-DBYqAIbe.mjs} +13 -13
  93. package/dist/{project-team-DE5drjcl.mjs → project-team-BjCLgTRC.mjs} +1 -1
  94. package/dist/{project-token-XEYEXfiJ.mjs → project-token-BB6PwaA9.mjs} +1 -1
  95. package/dist/{project-tsconfig-Itv1f4WC.mjs → project-tsconfig-CVvk6Z_e.mjs} +24 -2
  96. package/dist/{project-zero-trust-6VPU8zmV.mjs → project-zero-trust-CWDh1P_t.mjs} +1 -1
  97. package/dist/{protocol-BekmFxCI.d.mts → protocol-D5XDySYu.d.mts} +1 -1
  98. package/dist/{provision-Chq0NRAV.mjs → provision-DfxLCg-d.mjs} +1 -1
  99. package/dist/{provision-B7UFrBH7.mjs → provision-DztLJ97X.mjs} +24 -8
  100. package/dist/{requests-CG-Pj8ze.mjs → requests-D_pbzDyz.mjs} +1 -1
  101. package/dist/{rollback-CIrm2txZ.mjs → rollback-CjfIYsJx.mjs} +2 -2
  102. package/dist/{route-types--PAOzHlH.mjs → route-types-DvEGmPif.mjs} +61 -3
  103. package/dist/runtime/auth.d.mts +2 -2
  104. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  105. package/dist/runtime/better-auth-pg.d.mts +1 -1
  106. package/dist/runtime/better-auth.d.mts +1 -1
  107. package/dist/runtime/client-react.d.mts +1 -1
  108. package/dist/runtime/client-solid.d.mts +1 -1
  109. package/dist/runtime/client-svelte.d.mts +1 -1
  110. package/dist/runtime/client-vue.d.mts +1 -1
  111. package/dist/runtime/client.d.mts +1 -1
  112. package/dist/runtime/handler.d.mts +1 -1
  113. package/dist/runtime/live-client.d.mts +1 -1
  114. package/dist/runtime/live.d.mts +1 -1
  115. package/dist/runtime/routing.d.mts +5 -4
  116. package/dist/runtime/routing.mjs +10 -70
  117. package/dist/runtime/validator.d.mts +1 -1
  118. package/dist/runtime/ws-server.d.mts +3 -3
  119. package/dist/runtime/ws.d.mts +1 -1
  120. package/dist/runtime/ws.mjs +4 -2
  121. package/dist/{secret-BL6g7mF5.mjs → secret-3X0PxmuX.mjs} +9 -12
  122. package/dist/{version-metadata-DmaZNTYW.mjs → version-metadata-D2vfMQzv.mjs} +2 -1
  123. package/dist/{wrangler-CDiEBCdS.mjs → wrangler-I-scB_1t.mjs} +80 -12
  124. package/dist/wrangler-UnwdISay.mjs +1 -0
  125. package/dist/{wrapper-CEiDeCqD.mjs → wrapper-BBl1rC32.mjs} +3 -3
  126. package/dist/{ws-D1zWiB_P.d.mts → ws-B3ClMVDh.d.mts} +3 -2
  127. package/docs/guide/auth.md +1 -1
  128. package/docs/guide/edge/redirects.md +22 -0
  129. package/docs/guide/pages-routing/actions-and-forms.md +24 -0
  130. package/docs/guide/platform/installation/maintenance.md +3 -1
  131. package/docs/guide/server-routing.md +2 -0
  132. package/docs/guide/ssg.md +8 -0
  133. package/docs/integrations/cloudflare.md +16 -7
  134. package/docs/reference/api/auth.md +6 -2
  135. package/docs/reference/api/deploy.md +9 -5
  136. package/docs/reference/api/pages.md +2 -0
  137. package/docs/reference/cli/deploy.md +10 -9
  138. package/docs/reference/config.md +11 -1
  139. package/package.json +8 -7
  140. package/schema.json +4 -0
  141. package/skills/void/SKILL.md +1 -1
  142. package/dist/auth-DkcFflXV.d.mts +0 -42
  143. package/dist/cf-build-output-DlBkWdNU.mjs +0 -1
  144. package/dist/client-DyxPQnF_.mjs +0 -1
  145. package/dist/config-BTu1o3Dc.mjs +0 -49
  146. package/dist/deploy-CtHE2A3R.mjs +0 -2
  147. package/dist/gen-TgXy93Rr.mjs +0 -1
  148. package/dist/login-Cdo8Aco1.mjs +0 -1
  149. package/dist/migrate-COPncCGx.mjs +0 -1
  150. package/dist/operator-cmd-DDiX7Y3f.mjs +0 -1
  151. package/dist/prepare-B3VrSF1Z.mjs +0 -1
  152. package/dist/wrangler-DOPr4jyI.mjs +0 -1
@@ -34,12 +34,14 @@ function createProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options =
34
34
  const includeQueues = existsSync(pathsConfig.queuesDir);
35
35
  const includeMd = existsSync(join(outDir, "md.d.ts"));
36
36
  const includeEnv = existsSync(join(outDir, "env.d.ts"));
37
+ const includeAuth = existsSync(join(outDir, "auth.d.ts"));
37
38
  const tsconfig = { files: [
38
39
  ...includeRoutes ? ["routes.d.ts"] : [],
39
40
  ...hasDb ? ["db.d.ts"] : [],
40
41
  ...includeQueues ? ["queues.d.ts"] : [],
41
42
  ...includeMd ? ["md.d.ts"] : [],
42
- ...includeEnv ? ["env.d.ts"] : []
43
+ ...includeEnv ? ["env.d.ts"] : [],
44
+ ...includeAuth ? ["auth.d.ts"] : []
43
45
  ] };
44
46
  if (hasDb) {
45
47
  const paths = {};
@@ -77,5 +79,25 @@ function ensureProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options =
77
79
  const tsconfig = createProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options);
78
80
  return writeFileIfChanged(join(root, ".void", "tsconfig.json"), JSON.stringify(tsconfig, null, 2) + "\n");
79
81
  }
82
+ /**
83
+ * Add or drop `auth.d.ts` in an existing .void/tsconfig.json to match whether
84
+ * `.void/auth.d.ts` exists, keeping every other entry as written. The dev/build
85
+ * routing plugin uses this after it writes or removes auth.d.ts, so it does not
86
+ * recompute the routes/db choices the Drizzle plugin or `void prepare` made.
87
+ * A missing or unreadable tsconfig is left for those writers to create.
88
+ */
89
+ function syncAuthTypesInProjectTsconfig(root) {
90
+ const outDir = join(root, ".void");
91
+ const tsconfigPath = join(outDir, "tsconfig.json");
92
+ let tsconfig;
93
+ try {
94
+ tsconfig = JSON.parse(readFileSync(tsconfigPath, "utf8"));
95
+ } catch {
96
+ return false;
97
+ }
98
+ const others = (Array.isArray(tsconfig.files) ? tsconfig.files : []).filter((file) => file !== "auth.d.ts");
99
+ tsconfig.files = existsSync(join(outDir, "auth.d.ts")) ? [...others, "auth.d.ts"] : others;
100
+ return writeFileIfChanged(tsconfigPath, JSON.stringify(tsconfig, null, 2) + "\n");
101
+ }
80
102
  //#endregion
81
- export { ensureProjectTsconfig as n, writeFileIfChanged as r, createProjectTsconfig as t };
103
+ export { writeFileIfChanged as i, ensureProjectTsconfig as n, syncAuthTypesInProjectTsconfig as r, createProjectTsconfig as t };
@@ -1,7 +1,7 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
4
- import { r as PlatformClient } from "./client-BEMtySaV.mjs";
4
+ import { r as PlatformClient } from "./client-B3LnB_bE.mjs";
5
5
  import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
6
6
  import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
7
7
  //#region src/cli/project-zero-trust.ts
@@ -1,6 +1,6 @@
1
1
  import { n as HeadDescriptor, t as HeadConfig } from "./head-C8K_iGe6.mjs";
2
2
  import { a as PageRenderMode, t as DevCssAsset } from "./types-w72dljaA.mjs";
3
- import { n as CloudBindings, r as CloudContext } from "./handler-CQv5YDS0.mjs";
3
+ import { n as CloudBindings, r as CloudContext } from "./handler-BHktmuTL.mjs";
4
4
  //#region src/pages/protocol.d.ts
5
5
  /** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
6
6
  declare function safeJsonStringify(value: unknown): string;
@@ -1 +1 @@
1
- export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-B7UFrBH7.mjs";
1
+ export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-DztLJ97X.mjs";
@@ -1,6 +1,6 @@
1
1
  import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-ipQi0Q8y.mjs";
2
2
  import { i as voidWarn, r as voidLog } from "./log-BMwmN5Ae.mjs";
3
- import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-CDiEBCdS.mjs";
3
+ import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-I-scB_1t.mjs";
4
4
  import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
5
5
  import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-8jEYIeim.mjs";
6
6
  import { createRequire } from "node:module";
@@ -91,8 +91,9 @@ const defaultLogger = {
91
91
  warn: (msg) => voidWarn(msg)
92
92
  };
93
93
  /**
94
- * Env vars that move wrangler's API transport to another endpoint or select another config
95
- * env. Provisioning pins one base ({@link provisionEnv}) and rejects them in project dotenv.
94
+ * Env vars that move the Cloudflare CLI's API transport to another endpoint or select another
95
+ * config env. Provisioning pins one base ({@link provisionEnv}) and rejects them in project
96
+ * dotenv.
96
97
  */
97
98
  const TRANSPORT_REDIRECT_ENV_VARS = [
98
99
  "CLOUDFLARE_API_BASE_URL",
@@ -108,22 +109,36 @@ const TRANSPORT_REDIRECT_ENV_VARS = [
108
109
  const OUTPUT_FILE_ENV_VARS = ["WRANGLER_OUTPUT_FILE_PATH", "WRANGLER_OUTPUT_FILE_DIRECTORY"];
109
110
  /**
110
111
  * The one API base URL this provision uses, resolved like wrangler's `getCloudflareApiBaseUrl`
111
- * so the Hyperdrive REST lister and wrangler agree:
112
+ * so the Hyperdrive REST lister and the Cloudflare CLI agree:
112
113
  * 1. a present `CLOUDFLARE_API_BASE_URL` (then `CF_API_BASE_URL`) is used as-is, even empty;
113
114
  * 2. otherwise the staging and compliance selectors derive it, and invalid values fail;
114
115
  * 3. the config's `compliance_region` is always validated.
115
116
  */
116
117
  function resolvePinnedApiBaseUrl(env = process.env, configComplianceRegion) {
117
- const configRegion = configComplianceRegion !== void 0 ? assertComplianceChoice(configComplianceRegion, "the wrangler config \"compliance_region\"") : void 0;
118
+ const configRegion = configComplianceRegion !== void 0 ? assertComplianceChoice(configComplianceRegion, "the Cloudflare config \"compliance_region\"") : void 0;
118
119
  const direct = env.CLOUDFLARE_API_BASE_URL !== void 0 ? env.CLOUDFLARE_API_BASE_URL : env.CF_API_BASE_URL;
119
120
  if (direct !== void 0) return direct;
120
121
  return `https://api${resolveComplianceRegion(env, configRegion) === "fedramp_high" ? ".fed" : ""}${resolveApiEnvironment(env) === "staging" ? ".staging" : ""}.cloudflare.com/client/v4`;
121
122
  }
123
+ /**
124
+ * The compliance region that names the workers.dev host, resolved like wrangler's
125
+ * `getComplianceRegionSubdomain`. It reads the same inputs as {@link resolvePinnedApiBaseUrl},
126
+ * but a direct API base does not skip the region checks, because the base does not name the
127
+ * workers.dev host. Returns undefined for an invalid or conflicting region, so that a caller
128
+ * does not guess a host. Without a direct base, the API base resolution fails first.
129
+ */
130
+ function resolveWorkersDevComplianceRegion(env = process.env, configComplianceRegion) {
131
+ try {
132
+ return resolveComplianceRegion(env, configComplianceRegion !== void 0 ? assertComplianceChoice(configComplianceRegion, "the Cloudflare config \"compliance_region\"") : void 0);
133
+ } catch {
134
+ return;
135
+ }
136
+ }
122
137
  /** `WRANGLER_API_ENVIRONMENT` like wrangler: absent means production; other values fail. */
123
138
  function resolveApiEnvironment(env) {
124
139
  const raw = env.WRANGLER_API_ENVIRONMENT;
125
140
  if (raw === void 0) return "production";
126
- if (raw !== "production" && raw !== "staging") throw new Error(`provision: the WRANGLER_API_ENVIRONMENT environment variable must be one of "production" or "staging", got ${JSON.stringify(raw)}. wrangler rejects this value, so provisioning refuses to guess an endpoint; fix or unset it and retry.`);
141
+ if (raw !== "production" && raw !== "staging") throw new Error(`provision: the WRANGLER_API_ENVIRONMENT environment variable must be one of "production" or "staging", got ${JSON.stringify(raw)}. The Cloudflare tooling rejects this value, so provisioning refuses to guess an endpoint; fix or unset it and retry.`);
127
142
  return raw;
128
143
  }
129
144
  /** Compliance-region values wrangler accepts. */
@@ -136,7 +151,7 @@ function assertComplianceChoice(value, source) {
136
151
  function resolveComplianceRegion(env, configRegion) {
137
152
  const rawEnv = env.CLOUDFLARE_COMPLIANCE_REGION;
138
153
  const envRegion = rawEnv !== void 0 ? assertComplianceChoice(rawEnv, "the CLOUDFLARE_COMPLIANCE_REGION environment variable") : void 0;
139
- if (envRegion !== void 0 && configRegion !== void 0 && envRegion !== configRegion) throw new Error(`provision: the Cloudflare compliance region is set to conflicting values — the CLOUDFLARE_COMPLIANCE_REGION environment variable is ${JSON.stringify(envRegion)} but the wrangler config "compliance_region" is ${JSON.stringify(configRegion)}. wrangler refuses to run with a mismatched compliance region; reconcile them (remove one, or set them equal) and retry.`);
154
+ if (envRegion !== void 0 && configRegion !== void 0 && envRegion !== configRegion) throw new Error(`provision: the Cloudflare compliance region is set to conflicting values — the CLOUDFLARE_COMPLIANCE_REGION environment variable is ${JSON.stringify(envRegion)} but the Cloudflare config "compliance_region" is ${JSON.stringify(configRegion)}. The Cloudflare tooling refuses to run with a mismatched compliance region; reconcile them (remove one, or set them equal) and retry.`);
140
155
  return envRegion ?? configRegion ?? "public";
141
156
  }
142
157
  /** Project dotenv files the fence scans for `env`; provisioning selects no named env (`''`). */
@@ -198,6 +213,7 @@ function provisionEnv(ctx) {
198
213
  scrub("CF_ACCESS_TOKEN");
199
214
  scrub("VOID_ACCESS_CREDENTIALS");
200
215
  scrub("VOID_ACCESS_ORIGIN");
216
+ scrub("CF_ACCESS_READINESS_ORIGIN");
201
217
  for (const name of TRANSPORT_REDIRECT_ENV_VARS) scrub(name);
202
218
  for (const name of OUTPUT_FILE_ENV_VARS) scrub(name);
203
219
  scrub("WRANGLER_LOG_SANITIZE");
@@ -1794,4 +1810,4 @@ async function provisionCloudflareResourcesLocked(root, configPath, desired, opt
1794
1810
  };
1795
1811
  }
1796
1812
  //#endregion
1797
- export { provisionEnv as _, checkCloudflareProvisionDrift as a, enableD1ReadReplicationViaApi as c, isQueueConfirmedAbsent as d, isRealD1Id as f, provisionCloudflareResources as g, normalizeRunWranglerResult as h, assertValidResourceName as i, isAlreadyGoneKillError as l, isRealKvId as m, acquireProvisionLock as n, createDefaultRunWrangler as o, isRealHyperdriveId as p, assertNoTransportRedirectInProjectDotenv as r, deleteEnvVarCaseAware as s, WranglerQuarantineError as t, isQuarantineError as u, resolvePinnedApiBaseUrl as v, resolveProperLockfileKey as y };
1813
+ export { provisionEnv as _, checkCloudflareProvisionDrift as a, resolveWorkersDevComplianceRegion as b, enableD1ReadReplicationViaApi as c, isQueueConfirmedAbsent as d, isRealD1Id as f, provisionCloudflareResources as g, normalizeRunWranglerResult as h, assertValidResourceName as i, isAlreadyGoneKillError as l, isRealKvId as m, acquireProvisionLock as n, createDefaultRunWrangler as o, isRealHyperdriveId as p, assertNoTransportRedirectInProjectDotenv as r, deleteEnvVarCaseAware as s, WranglerQuarantineError as t, isQuarantineError as u, resolvePinnedApiBaseUrl as v, resolveProperLockfileKey as y };
@@ -1,7 +1,7 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
4
- import { r as PlatformClient } from "./client-BEMtySaV.mjs";
4
+ import { r as PlatformClient } from "./client-B3LnB_bE.mjs";
5
5
  import { f as import_picocolors, i as dim } from "./output-BpgYODYx.mjs";
6
6
  //#region src/cli/requests.ts
7
7
  async function runRequestsCommand(root, range, status) {
@@ -1,7 +1,7 @@
1
1
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-Cor9XGoz.mjs";
4
- import { r as PlatformClient } from "./client-BEMtySaV.mjs";
4
+ import { r as PlatformClient } from "./client-B3LnB_bE.mjs";
5
5
  import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-BpgYODYx.mjs";
6
6
  //#region src/cli/rollback.ts
7
7
  async function runRollbackCommand(root, deployId, explicitPlatform) {
@@ -74,7 +74,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
74
74
  }
75
75
  }
76
76
  async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
77
- const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-PCM4wucv.mjs");
77
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BtulCNOg.mjs");
78
78
  const context = resolveCloudflareOperationContext(root);
79
79
  const status = await readCloudflareWorkerStatus(context);
80
80
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -1,4 +1,60 @@
1
- import { s as relative } from "./dist-ipQi0Q8y.mjs";
1
+ import { a as join, s as relative } from "./dist-ipQi0Q8y.mjs";
2
+ import { i as writeFileIfChanged } from "./project-tsconfig-CVvk6Z_e.mjs";
3
+ import { existsSync, rmSync } from "node:fs";
4
+ //#region src/codegen/auth-types.ts
5
+ /**
6
+ * Generate `.void/auth.d.ts` content. Fills `void/auth`'s `VoidAuthTypes`
7
+ * registry with Better Auth inference from the app's `defineAuth` config
8
+ * (plugins, `user.additionalFields`, etc.), which `AuthUser` and `AuthSession`
9
+ * read from.
10
+ *
11
+ * Uses `typeof import(...)` on the auth config file so TypeScript handles the
12
+ * inference — codegen never analyses types itself. `better-auth` is reached
13
+ * through `void/auth`'s `InferAuthSession`, because apps usually do not depend
14
+ * on `better-auth` directly and could not resolve it from `.void/`.
15
+ *
16
+ * @param authFileAbs Absolute path to the user's auth config file.
17
+ * @param outDir Absolute path to the project's `.void/` directory.
18
+ */
19
+ function generateAuthTypes(authFileAbs, outDir) {
20
+ const importPath = relative(outDir, authFileAbs);
21
+ const lines = [];
22
+ lines.push("// Auto-generated by void — do not edit");
23
+ lines.push("export {}");
24
+ lines.push("");
25
+ lines.push("import type { InferAuthSession } from \"void/auth\";");
26
+ lines.push("");
27
+ lines.push(`type _VoidAuthSession = InferAuthSession<typeof import("${importPath}")["default"]>;`);
28
+ lines.push("");
29
+ lines.push("declare module \"void/auth\" {");
30
+ lines.push(" interface VoidAuthTypes {");
31
+ lines.push(" user: _VoidAuthSession[\"user\"];");
32
+ lines.push(" session: _VoidAuthSession[\"session\"];");
33
+ lines.push(" }");
34
+ lines.push("}");
35
+ lines.push("");
36
+ return { dts: lines.join("\n") };
37
+ }
38
+ function authTypesPath(outDir) {
39
+ return join(outDir, "auth.d.ts");
40
+ }
41
+ /** Remove `.void/auth.d.ts` when auth is disabled or the config file is gone. */
42
+ function removeAuthTypesIfPresent(outDir) {
43
+ const filePath = authTypesPath(outDir);
44
+ if (!existsSync(filePath)) return false;
45
+ rmSync(filePath, { force: true });
46
+ return true;
47
+ }
48
+ /**
49
+ * Write or remove `.void/auth.d.ts` from the current auth config path.
50
+ * Returns whether the file on disk changed.
51
+ */
52
+ function syncAuthTypesFile(authConfigPath, outDir) {
53
+ if (!authConfigPath) return removeAuthTypesIfPresent(outDir);
54
+ const { dts } = generateAuthTypes(authConfigPath, outDir);
55
+ return writeFileIfChanged(authTypesPath(outDir), dts);
56
+ }
57
+ //#endregion
2
58
  //#region src/codegen/queue-types.ts
3
59
  /**
4
60
  * Generate .void/queues.d.ts content.
@@ -136,7 +192,9 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
136
192
  lines.push(" ? false");
137
193
  lines.push(" : ResolveActionParams<U> extends Record<string, string> ? true : false;");
138
194
  lines.push("");
139
- lines.push(" type ActionFormBaseOptions = { resetOnSuccess?: boolean };");
195
+ lines.push(" type ActionFormBaseOptions = {");
196
+ lines.push(" resetOnSuccess?: boolean;");
197
+ lines.push(" };");
140
198
  lines.push("");
141
199
  lines.push(" export type ActionFormOptions<U extends string> = ActionFormBaseOptions &");
142
200
  lines.push(" (HasActionParams<U> extends true");
@@ -239,4 +297,4 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir) {
239
297
  return { dts: lines.join("\n") };
240
298
  }
241
299
  //#endregion
242
- export { generateQueueTypes as n, generateRouteTypes as t };
300
+ export { syncAuthTypesFile as a, removeAuthTypesIfPresent as i, generateQueueTypes as n, generateAuthTypes as r, generateRouteTypes as t };
@@ -1,2 +1,2 @@
1
- import { a as VoidAuthConfigContext, c as getSession, i as VoidAuthConfig, l as getUser, n as AuthState, o as authContext, r as AuthUser, s as defineAuth, t as AuthSession, u as requireAuth } from "../auth-DkcFflXV.mjs";
2
- export { AuthSession, AuthState, AuthUser, VoidAuthConfig, VoidAuthConfigContext, authContext, defineAuth, getSession, getUser, requireAuth };
1
+ import { a as VoidAuthConfig, c as authContext, d as getUser, f as requireAuth, i as InferAuthSession, l as defineAuth, n as AuthState, o as VoidAuthConfigContext, r as AuthUser, s as VoidAuthTypes, t as AuthSession, u as getSession } from "../auth-g2TQbDLD.mjs";
2
+ export { AuthSession, AuthState, AuthUser, InferAuthSession, VoidAuthConfig, VoidAuthConfigContext, VoidAuthTypes, authContext, defineAuth, getSession, getUser, requireAuth };
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-DVk2DkTW.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-BHB8kiTE.mjs";
2
2
  //#region src/runtime/better-auth-mysql.d.ts
3
3
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
4
4
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-DVk2DkTW.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-BHB8kiTE.mjs";
2
2
  //#region src/runtime/better-auth-pg.d.ts
3
3
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
4
4
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-DVk2DkTW.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-BHB8kiTE.mjs";
2
2
  //#region src/runtime/better-auth.d.ts
3
3
  export declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
4
4
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
@@ -1,4 +1,4 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
1
+ import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-g2TQbDLD.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-react-7GFffu8R.mjs";
3
3
  import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
4
  import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
@@ -1,4 +1,4 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
1
+ import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-g2TQbDLD.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-solid-DyTFL4cq.mjs";
3
3
  import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
4
  import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
@@ -1,4 +1,4 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
1
+ import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-g2TQbDLD.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-svelte-zetW0KIH.mjs";
3
3
  import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
4
  import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
@@ -1,4 +1,4 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
1
+ import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-g2TQbDLD.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-vue-bChShbQP.mjs";
3
3
  import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
4
  import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
@@ -1,4 +1,4 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-DkcFflXV.mjs";
1
+ import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-g2TQbDLD.mjs";
2
2
  import { n as createAuthClient, t as auth } from "../auth-client-Bawdj38n.mjs";
3
3
  import { c as FetchError, s as fetch } from "../fetch-CUX0tB78.mjs";
4
4
  import { t as fetchStream } from "../fetch-stream-DfkAzZf-.mjs";
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-CQv5YDS0.mjs";
2
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-BHktmuTL.mjs";
3
3
  export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,4 +1,4 @@
1
- import { t as LiveClientEvent } from "../live-CXJ9yC98.mjs";
1
+ import { t as LiveClientEvent } from "../live-BllfDuzA.mjs";
2
2
  //#region src/runtime/live-client.d.ts
3
3
  export type LiveSubscribeOptions<Data = unknown> = {
4
4
  id: string;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-CXJ9yC98.mjs";
2
+ import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-BllfDuzA.mjs";
3
3
  export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
@@ -1,16 +1,17 @@
1
- import { A as filterInternalBindings, M as createClientAssetTags, N as createManifestLoader, O as createAssetFallback, j as ClientAssetTags, k as createWorkerFetch } from "../handler-CQv5YDS0.mjs";
2
- import { a as handlePageMutation, i as handlePageGet } from "../protocol-BekmFxCI.mjs";
1
+ import { A as filterInternalBindings, M as createClientAssetTags, N as createManifestLoader, O as createAssetFallback, j as ClientAssetTags, k as createWorkerFetch } from "../handler-BHktmuTL.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet } from "../protocol-D5XDySYu.mjs";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { Context, Hono, MiddlewareHandler } from "hono";
5
5
  //#region src/runtime/routing-errors.d.ts
6
+ type ErrorPageStatus = 404 | 500;
6
7
  type ErrorRendererOptions = {
7
8
  dev?: boolean;
8
9
  projectRoot: string;
9
10
  homeDir: string;
10
11
  };
11
12
  type ErrorRenderer = {
12
- createResponse: (request: Request, status: number, title: string, error?: unknown) => Response;
13
- serveCustomPage: (context: Context, status: number, title: string, error?: unknown) => Promise<Response>;
13
+ createResponse: (request: Request, status: ErrorPageStatus, title: string, error?: unknown) => Response;
14
+ serveCustomPage: (context: Context, status: ErrorPageStatus, title: string, error?: unknown) => Promise<Response>;
14
15
  onError: (error: Error, context: Context) => Promise<Response> | Response;
15
16
  };
16
17
  /** Error rendering is shared by generated Pages apps; production never includes exception details. */
@@ -1,11 +1,12 @@
1
1
  import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-DdSFxoLp.mjs";
2
+ import { t as renderDefaultErrorPage } from "../error-pages-CLIJ7aYq.mjs";
2
3
  import { t as convertReturnValue } from "../response-Tn7rU0MV.mjs";
3
4
  import { i as searchWithoutActionKey, n as hasActionKey, r as markActionKey, t as actionKeySegment } from "../action-key-XZ9HkWAO.mjs";
4
5
  import { n as handlePageGet, r as handlePageMutation } from "../protocol-DimNxVRr.mjs";
5
6
  import { t as VoidAssetRewriteError } from "../handler-BZ1t7-Rv.mjs";
6
7
  import { n as markStaticAsset } from "../static-asset-marker-Btf-6oCD.mjs";
7
8
  import { AsyncLocalStorage } from "node:async_hooks";
8
- import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, substituteParams } from "@void/edge";
9
+ import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, redirectToHttps, substituteParams } from "@void/edge";
9
10
  //#region src/runtime/routing-worker.ts
10
11
  const ASSET_CONTENT_TYPES = {
11
12
  ".avif": "image/avif",
@@ -125,6 +126,10 @@ function createWorkerFetch(options) {
125
126
  const internal = await options.internalRoute(request, env, ctx);
126
127
  if (internal) return internal;
127
128
  if (discovery) return Response.json({ paths: await options.collectPrerenderPaths(request, env, ctx) });
129
+ if (options.alwaysUseHttps) {
130
+ const redirect = redirectToHttps(request);
131
+ if (redirect) return redirect;
132
+ }
128
133
  const userEnv = options.filterBindings(env);
129
134
  const render = async (req) => options.assets(req, env, await options.app.fetch(req, userEnv, ctx));
130
135
  if (options.isr && env.ISR_CACHE && request.headers.get("upgrade")?.toLowerCase() !== "websocket") {
@@ -681,7 +686,7 @@ function createErrorRenderer(options) {
681
686
  <aside class="__void-error-overlay" data-void-error-overlay role="dialog" aria-label="Void dev error overlay"><div class="__void-error-backdrop" data-void-error-backdrop></div><section class="__void-error-panel"><button type="button" class="__void-error-close" data-void-error-close aria-label="Minimize error overlay"><svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M3.757 3.757 12.243 12.243M12.243 3.757 3.757 12.243" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round"/></svg></button><header class="__void-error-header"><p class="__void-error-status">${escapeHtml(String(status) + ": " + title)}</p></header>${sections}</section><button type="button" class="__void-error-minimized" data-void-error-toggle aria-label="Show dev error overlay" aria-expanded="true">${escapeHtml(errorCountLabel)}</button><script>(function(){const script=document.currentScript;if(!(script instanceof HTMLScriptElement))return;const root=script.closest("[data-void-error-overlay]");if(!(root instanceof HTMLElement))return;const backdrop=root.querySelector("[data-void-error-backdrop]");const closeButton=root.querySelector("[data-void-error-close]");const toggle=root.querySelector("[data-void-error-toggle]");const setMinimized=(minimized)=>{root.classList.toggle("is-minimized", minimized);if(toggle instanceof HTMLElement)toggle.setAttribute("aria-expanded", minimized ? "false" : "true");};if(backdrop instanceof HTMLElement)backdrop.addEventListener("click",()=>setMinimized(true));if(closeButton instanceof HTMLElement)closeButton.addEventListener("click",()=>setMinimized(true));if(toggle instanceof HTMLElement)toggle.addEventListener("click",()=>setMinimized(false));})();<\/script></aside>`;
682
687
  }
683
688
  function injectDevErrorOverlay(html, overlay) {
684
- return /<\/body\s*>/i.test(html) ? html.replace(/<\/body\s*>/i, overlay + "</body>") : html + overlay;
689
+ return /<\/body\s*>/i.test(html) ? html.replace(/<\/body\s*>/i, () => overlay + "</body>") : html + overlay;
685
690
  }
686
691
  function getErrorAssetCss(error) {
687
692
  const tags = error && (typeof error === "object" || typeof error === "function") && "__voidPageAssetTags" in error ? error.__voidPageAssetTags : null;
@@ -689,76 +694,11 @@ function createErrorRenderer(options) {
689
694
  }
690
695
  function injectErrorAssetCss(html, css) {
691
696
  if (!css) return html;
692
- return /<\/head\s*>/i.test(html) ? html.replace(/<\/head\s*>/i, css + "</head>") : css + html;
697
+ return /<\/head\s*>/i.test(html) ? html.replace(/<\/head\s*>/i, () => css + "</head>") : css + html;
693
698
  }
694
699
  function renderErrorPage(status, title, error) {
695
- const heading = status + ": " + title;
696
- const prefix = status + ": ";
697
- const overlay = dev && status === 500 && error ? renderDevErrorOverlay(status, title, error) : "";
698
- return `<!doctype html>
699
- <html lang="en">
700
- <head>
701
- <meta charset="utf-8">
702
- <meta name="viewport" content="width=device-width, initial-scale=1">
703
- <title>${escapeHtml(heading)}</title>
704
- ${getErrorAssetCss(error)}
705
- <style>
706
- :root {
707
- color-scheme: light dark;
708
- font-family: ${ERROR_PAGE_FONT_STACK};
709
- background: #f5f5f5;
710
- color: #171717;
711
- }
712
- * { box-sizing: border-box; }
713
- body {
714
- margin: 0;
715
- min-block-size: 100dvh;
716
- display: grid;
717
- place-items: center;
718
- padding: 24px;
719
- background: radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(245, 245, 245, 0.96) 52%), linear-gradient(180deg, #fafafa 0%, #f1f1f1 100%);
720
- font: 500 16px/1.5 ${ERROR_PAGE_FONT_STACK};
721
- }
722
- main {
723
- inline-size: min(100%, 560px);
724
- padding: 32px 36px;
725
- border: 1px solid #d4d4d8;
726
- border-radius: 32px;
727
- corner-shape: squircle;
728
- background: rgba(255, 255, 255, 0.88);
729
- text-align: center;
730
- backdrop-filter: blur(12px);
731
- }
732
- h1 {
733
- margin: 0;
734
- font: 400 clamp(1.5rem, 1.2rem + 1vw, 2rem) / 1.1 ${ERROR_PAGE_FONT_STACK};
735
- letter-spacing: -0.03em;
736
- }
737
- strong {
738
- font-weight: 600;
739
- }
740
- @media (prefers-color-scheme: dark) {
741
- :root {
742
- background: #0a0a0a;
743
- color: #f5f5f5;
744
- }
745
- body {
746
- background: radial-gradient(circle at top, rgba(38, 38, 38, 0.96), rgba(10, 10, 10, 0.96) 52%), linear-gradient(180deg, #171717 0%, #0a0a0a 100%);
747
- }
748
- main {
749
- border-color: #27272a;
750
- background: rgba(23, 23, 23, 0.88);
751
- }
752
- }
753
- </style>
754
- </head>
755
- <body>
756
- <main>
757
- <h1><strong>${escapeHtml(prefix)}</strong>${escapeHtml(title)}</h1>
758
- </main>
759
- ${overlay}
760
- </body>
761
- </html>`;
700
+ const html = injectErrorAssetCss(renderDefaultErrorPage(status), getErrorAssetCss(error));
701
+ return dev && status === 500 && error ? injectDevErrorOverlay(html, renderDevErrorOverlay(status, title, error)) : html;
762
702
  }
763
703
  function createErrorResponse(request, status, title, error) {
764
704
  if (!shouldServeHtmlErrorPage(request)) return new Response(title, { status });
@@ -1,2 +1,2 @@
1
- import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-CQv5YDS0.mjs";
1
+ import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-BHktmuTL.mjs";
2
2
  export { HandlerInput, ValidatorSlots, runValidation };
@@ -1,6 +1,6 @@
1
- import { n as AuthState } from "../auth-DkcFflXV.mjs";
2
- import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-DVk2DkTW.mjs";
3
- import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-D1zWiB_P.mjs";
1
+ import { n as AuthState } from "../auth-g2TQbDLD.mjs";
2
+ import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-BHB8kiTE.mjs";
3
+ import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-B3ClMVDh.mjs";
4
4
  //#region src/runtime/ws-server.d.ts
5
5
  export type WebSocketRouteMeta = {
6
6
  name?: string;
@@ -1,2 +1,2 @@
1
- import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-D1zWiB_P.mjs";
1
+ import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-B3ClMVDh.mjs";
2
2
  export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
@@ -31,6 +31,7 @@ var VoidSocket = class {
31
31
  buffer = [];
32
32
  reconnectAttempts = 0;
33
33
  closedByUser = false;
34
+ reconnectTimer;
34
35
  constructor(url, options) {
35
36
  this.url = url;
36
37
  this.options = options;
@@ -69,7 +70,7 @@ var VoidSocket = class {
69
70
  if (this.options.maxReconnectAttempts != null && this.reconnectAttempts >= this.options.maxReconnectAttempts) return;
70
71
  this.reconnectAttempts += 1;
71
72
  const delay = this.options.reconnectDelayMs ?? 1e3;
72
- setTimeout(() => this.connect(), delay);
73
+ this.reconnectTimer = setTimeout(() => this.connect(), delay);
73
74
  });
74
75
  }
75
76
  send(event) {
@@ -81,6 +82,7 @@ var VoidSocket = class {
81
82
  }
82
83
  close(code, reason) {
83
84
  this.closedByUser = true;
85
+ clearTimeout(this.reconnectTimer);
84
86
  this.socket?.close(code, reason);
85
87
  }
86
88
  on(type, handler) {
@@ -100,7 +102,7 @@ function connect(path, options = {}) {
100
102
  const base = resolveBaseUrl(options.baseURL);
101
103
  const resolvedPath = interpolateRouteParams(path, options.params);
102
104
  const url = new URL(resolvedPath, base);
103
- url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
105
+ url.protocol = url.protocol === "https:" || url.protocol === "wss:" ? "wss:" : "ws:";
104
106
  return new VoidSocket(url.toString(), options);
105
107
  }
106
108
  //#endregion
@@ -1,11 +1,12 @@
1
1
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./dist-Cor9XGoz.mjs";
4
- import { r as PlatformClient } from "./client-BEMtySaV.mjs";
4
+ import { r as PlatformClient } from "./client-B3LnB_bE.mjs";
5
5
  import { m as printSuccess, o as formatCount, p as note } from "./output-BpgYODYx.mjs";
6
6
  import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
7
- import { _ as validateSecretValues } from "./env-validation-XcukUlFM.mjs";
7
+ import { _ as validateSecretValues } from "./env-validation-B3VobvXm.mjs";
8
8
  import { readFileSync } from "node:fs";
9
+ import { parseEnv } from "node:util";
9
10
  //#region src/cli/secret.ts
10
11
  async function runSecretCommand(root, args) {
11
12
  console.log();
@@ -93,7 +94,7 @@ async function resolveSecretBackend(root, args) {
93
94
  }
94
95
  async function resolveCloudflareSecretBackend(root, args) {
95
96
  if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
96
- const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-PCM4wucv.mjs");
97
+ const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-BtulCNOg.mjs");
97
98
  const context = resolveCloudflareOperationContext(root);
98
99
  return {
99
100
  target: "Cloudflare Worker",
@@ -104,17 +105,13 @@ async function resolveCloudflareSecretBackend(root, args) {
104
105
  };
105
106
  }
106
107
  const SECRET_KEY_RE = /^[A-Z][A-Z0-9_]*$/;
108
+ const UTF8_BOM = "";
107
109
  function parseDotenvFile(filePath) {
108
- const content = readFileSync(filePath, "utf-8");
109
110
  const secrets = [];
110
- for (const line of content.split("\n")) {
111
- const trimmed = line.trim();
112
- if (!trimmed || trimmed.startsWith("#")) continue;
113
- const eqIndex = trimmed.indexOf("=");
114
- if (eqIndex === -1) throw new Error(`secret: Invalid dotenv line '${trimmed}'. Add KEY=value.`);
115
- const key = trimmed.slice(0, eqIndex).trim();
116
- let value = trimmed.slice(eqIndex + 1).trim();
117
- if (value.startsWith("\"") && value.endsWith("\"") || value.startsWith("'") && value.endsWith("'")) value = value.slice(1, -1);
111
+ const raw = readFileSync(filePath, "utf-8");
112
+ const text = raw.startsWith(UTF8_BOM) ? raw.slice(1) : raw;
113
+ for (const [key, value] of Object.entries(parseEnv(text))) {
114
+ if (value === void 0) continue;
118
115
  if (!SECRET_KEY_RE.test(key)) throw new Error(`secret: Invalid secret name '${key}'. Use uppercase letters, digits, and underscores.`);
119
116
  secrets.push({
120
117
  name: key,
@@ -1,5 +1,5 @@
1
1
  import { a as join } from "./dist-ipQi0Q8y.mjs";
2
- import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-CDiEBCdS.mjs";
2
+ import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-I-scB_1t.mjs";
3
3
  //#region src/shared/untrusted-env.ts
4
4
  /** Authentication inputs that Wrangler may consume from the environment. */
5
5
  const WRANGLER_AUTH_CREDENTIAL_ENV_VARS = [
@@ -23,6 +23,7 @@ const UNTRUSTED_PROJECT_CODE_ENV_VARS = [
23
23
  "CF_ACCESS_CLIENT_SECRET",
24
24
  "VOID_ACCESS_CREDENTIALS",
25
25
  "VOID_ACCESS_ORIGIN",
26
+ "CF_ACCESS_READINESS_ORIGIN",
26
27
  "VOID_TOKEN",
27
28
  "DATABASE_URL",
28
29
  "ACTIONS_ID_TOKEN_REQUEST_URL",