void 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/{account-cmd-DRhmCWcm.mjs → account-cmd-D903EEWQ.mjs} +2 -2
  2. package/dist/{application-analysis-HRFsZOv3.mjs → application-analysis-DlUG-XNT.mjs} +5 -17
  3. package/dist/{application-routing-P4TggvWp.mjs → application-routing-GCBSwXA9.mjs} +1 -1
  4. package/dist/{auth-link-CVXP1G6G.mjs → auth-link-g9J7MSmP.mjs} +2 -2
  5. package/dist/{auth-router-D1pGdbvB.mjs → auth-router-DMZbG9Qn.mjs} +2 -2
  6. package/dist/cli/cli.mjs +23 -23
  7. package/dist/cli/env-schema-probe.mjs +3 -3
  8. package/dist/{cloudflare-auth-CEu-1Ps_.mjs → cloudflare-auth-CuS42-9A.mjs} +1 -1
  9. package/dist/{cloudflare-cmd-fZ6AMSWk.mjs → cloudflare-cmd-DTF19-j-.mjs} +3 -3
  10. package/dist/{cloudflare-config-eQunqX6A.mjs → cloudflare-config-Ce8j5S7V.mjs} +2 -2
  11. package/dist/{cloudflare-connect-9OZe4XVQ.mjs → cloudflare-connect-BN4dHp8i.mjs} +2 -2
  12. package/dist/{cloudflare-operations-CrskD4_O.mjs → cloudflare-operations-DrZGzQap.mjs} +5 -5
  13. package/dist/{cloudflare-operations-oLvAd9Nd.mjs → cloudflare-operations-laxRA8HN.mjs} +1 -1
  14. package/dist/{cloudflare-process-DjJ638A-.mjs → cloudflare-process-D9aC-jXr.mjs} +2 -2
  15. package/dist/{config-BBlVXZCU.mjs → config-CNDjO-15.mjs} +3 -3
  16. package/dist/{config-BgysUhnm.mjs → config-DMR0i3Z2.mjs} +1 -1
  17. package/dist/{config-BITKQ3O6.mjs → config-hL-S-Y9D.mjs} +5 -5
  18. package/dist/{config-WlvEcL82.mjs → config-s6TkpSat.mjs} +2 -2
  19. package/dist/{connect-CKvmkl2R.mjs → connect-DHepM7Xs.mjs} +3 -3
  20. package/dist/{db-cq5RW4Vy.mjs → db-CqfT6lhV.mjs} +18 -18
  21. package/dist/{db-types-C_8amnB0.mjs → db-types-DRmxBJ2K.mjs} +1 -1
  22. package/dist/deploy-DMhOyebt.mjs +2 -0
  23. package/dist/{deploy-D_gEojD2.mjs → deploy-La_Ly8g_.mjs} +38 -35
  24. package/dist/{deploy-managed-static-BHVbB_-A.mjs → deploy-managed-static-CESLfKHN.mjs} +13 -13
  25. package/dist/{deploy-transport-DEyOUfac.mjs → deploy-transport-DcI6LXhY.mjs} +2 -2
  26. package/dist/deploy.mjs +6 -6
  27. package/dist/discover-1DJD4YXD.mjs +1 -0
  28. package/dist/{discover-Dhkzxgdt.mjs → discover-CVFCWU7W.mjs} +1 -1
  29. package/dist/{dispatch-BNLB5_Gm.mjs → dispatch-DM4Xdd2l.mjs} +5 -5
  30. package/dist/{domain-BlH90Ods.mjs → domain-BD1KOQL3.mjs} +1 -1
  31. package/dist/{email-Bkq8ZL1p.mjs → email-XAspopcj.mjs} +6 -6
  32. package/dist/{email-cloudflare-MvJIxrwx.mjs → email-cloudflare-RxIQoPc9.mjs} +3 -3
  33. package/dist/{entry-CBZsCy3O.mjs → entry-DFBca6aS.mjs} +1 -1
  34. package/dist/{env-AvuCSeCH.mjs → env-DrYUh55t.mjs} +3 -3
  35. package/dist/{env-types-DqzVBKnS.mjs → env-types-Bd8DkQhl.mjs} +1 -1
  36. package/dist/{env-validation-C8Cmvas0.mjs → env-validation-Bosj7EVg.mjs} +1 -1
  37. package/dist/{env-validation-GV1oD4EV.mjs → env-validation-Del3C8AY.mjs} +2 -2
  38. package/dist/gen-BbT1Ku1P.mjs +1 -0
  39. package/dist/{gen-BD-dfjxY.mjs → gen-DSkScMIz.mjs} +4 -4
  40. package/dist/{handler-CKeTtYID.mjs → handler-DnI_au0K.mjs} +1 -1
  41. package/dist/{headers-CuTEdP9C.mjs → headers--cbz6iZ8.mjs} +1 -1
  42. package/dist/index.mjs +21 -21
  43. package/dist/{info-CJxua_db.mjs → info-BpxpsX0B.mjs} +4 -4
  44. package/dist/{init-B-4CluYx.mjs → init-DpVXO5S-.mjs} +12 -12
  45. package/dist/{list-BYSOo9fm.mjs → list-BFQ0gcML.mjs} +1 -1
  46. package/dist/{local-d1-BLgsNUj9.mjs → local-d1-CLVPP6v7.mjs} +1 -1
  47. package/dist/login-BX2gzHUt.mjs +1 -0
  48. package/dist/{login-CJopTWX4.mjs → login-RIw7ffPe.mjs} +1 -1
  49. package/dist/{logs-DE0weBsR.mjs → logs-B2OeLS4X.mjs} +1 -1
  50. package/dist/migrate-CUGMGaIM.mjs +1 -0
  51. package/dist/{migrate-ChHHZBTi.mjs → migrate-DiI50Chz.mjs} +4 -4
  52. package/dist/nitro.mjs +3 -3
  53. package/dist/{node-CZ6lGNLn.mjs → node-Bc-dBAGL.mjs} +2 -2
  54. package/dist/{operator-cmd-BUqsdk2K.mjs → operator-cmd-CEI5Aaza.mjs} +2 -2
  55. package/dist/operator-cmd-oTT2MA9G.mjs +1 -0
  56. package/dist/pages/client.d.mts +2 -0
  57. package/dist/pages/client.mjs +6 -3
  58. package/dist/pages/index.mjs +9 -5
  59. package/dist/pages/islands-plugin.mjs +1 -1
  60. package/dist/{platform-auth-config-K4m_LE8b.mjs → platform-auth-config-ZrYm8KVs.mjs} +3 -3
  61. package/dist/{platform-auth-protection-KF5Vo-1I.mjs → platform-auth-protection-t6mdY4nn.mjs} +2 -2
  62. package/dist/{platform-auth-recovery-BOdFrl7R.mjs → platform-auth-recovery-XeBmPTXx.mjs} +2 -2
  63. package/dist/{platform-cmd-DpCHawGF.mjs → platform-cmd-C7BevP9b.mjs} +1 -1
  64. package/dist/{platform-cmd-Ds3EAV5t.mjs → platform-cmd-EXehmSYA.mjs} +3 -3
  65. package/dist/{platform-domain-rWJshybd.mjs → platform-domain-DR263ObA.mjs} +2 -2
  66. package/dist/{platform-lifecycle-D9RdGub1.mjs → platform-lifecycle-BvU_TNji.mjs} +9 -9
  67. package/dist/{platform-lifecycle-BH34I0rh.mjs → platform-lifecycle-CN4aXldN.mjs} +1 -1
  68. package/dist/{platform-management-BRefdHGD.mjs → platform-management-_UE1_GM8.mjs} +1 -1
  69. package/dist/{platform-management-BfLW0Zlo.mjs → platform-management-yS2sve3V.mjs} +1 -1
  70. package/dist/{platform-recovery-DZuZGJtt.mjs → platform-recovery-CPVk9-Q4.mjs} +2 -2
  71. package/dist/{plugin-inference-CdLbxZL_.mjs → plugin-inference-bQ1Be840.mjs} +4 -7
  72. package/dist/{prepare-BMGeKL16.mjs → prepare-BkRhDnxw.mjs} +1 -1
  73. package/dist/prepare-CZRVGNld.mjs +1 -0
  74. package/dist/{prepare-BJW-f1f1.mjs → prepare-D8L9AQbw.mjs} +9 -9
  75. package/dist/{project-cmd-B_bUyZ3J.mjs → project-cmd-DH3CuFC6.mjs} +4 -4
  76. package/dist/{project-paths-CdGv9Tmi.mjs → project-paths-G0yut6Zz.mjs} +12 -8
  77. package/dist/{project-tsconfig-Cf2NFjlM.mjs → project-tsconfig-BMveFb4b.mjs} +1 -1
  78. package/dist/{provision-BbCzpbXs.mjs → provision-B0HqoRuI.mjs} +2 -2
  79. package/dist/{provision-DQF6Kw-6.mjs → provision-CYhZR_Mn.mjs} +1 -1
  80. package/dist/{rollback-BgL0wY1J.mjs → rollback-AVwiMAkk.mjs} +1 -1
  81. package/dist/{route-types-CZc1YXjF.mjs → route-types-e69EqY88.mjs} +1 -1
  82. package/dist/runtime/handler.mjs +1 -1
  83. package/dist/runtime/routing.mjs +2 -2
  84. package/dist/{scan-X2rDDRNa.mjs → scan-F0psanp7.mjs} +60 -14
  85. package/dist/{secret-CPq-B_vp.mjs → secret-szNdoeKa.mjs} +2 -2
  86. package/dist/{version-metadata-C8hLzQkv.mjs → version-metadata-BC3LK7Y-.mjs} +1 -1
  87. package/dist/wrangler-CQ5c-MtJ.mjs +1 -0
  88. package/dist/{wrangler-DESSbN8L.mjs → wrangler-Gn4EoY4-.mjs} +3 -3
  89. package/dist/{wrapper-C9SUxoj7.mjs → wrapper-B9W9RE8z.mjs} +3 -3
  90. package/docs/guide/edge/headers.md +3 -1
  91. package/docs/guide/edge/redirects.md +1 -0
  92. package/docs/guide/edge/static-assets.md +1 -1
  93. package/docs/guide/pages-routing/actions-and-forms.md +14 -0
  94. package/docs/guide/server-routing.md +14 -0
  95. package/docs/reference/api/pages.md +8 -0
  96. package/docs/reference/api/rewrites.md +3 -1
  97. package/package.json +7 -7
  98. package/dist/deploy-B029oHlE.mjs +0 -2
  99. package/dist/discover-D4mQthao.mjs +0 -1
  100. package/dist/gen-CIHXh9I8.mjs +0 -1
  101. package/dist/login-BpbYeu-n.mjs +0 -1
  102. package/dist/migrate-HdA6Kh2p.mjs +0 -1
  103. package/dist/operator-cmd-wBYyp8iQ.mjs +0 -1
  104. package/dist/prepare-BdxJJCMv.mjs +0 -1
  105. package/dist/wrangler-DUB3MGHV.mjs +0 -1
@@ -0,0 +1 @@
1
+ export { r as selectPlatformLoginMethod } from "./login-RIw7ffPe.mjs";
@@ -30,7 +30,7 @@ async function selectPlatformLoginMethod(platform, requestedId) {
30
30
  }
31
31
  async function promptForLoginToken(root = process.cwd(), platform) {
32
32
  const apiUrl = platform?.apiUrl ?? getApiUrl(root);
33
- const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-DpCHawGF.mjs")).discoverPlatform(apiUrl));
33
+ const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-C7BevP9b.mjs")).discoverPlatform(apiUrl));
34
34
  const s = createSpinner();
35
35
  s.start(`Opening browser for ${providerName} login...`);
36
36
  try {
@@ -10,7 +10,7 @@ async function runLogsCommand(root, filter, range, deployment, level) {
10
10
  console.log();
11
11
  const platform = readDeploymentPlatform(root);
12
12
  if (platform === "cloudflare") {
13
- const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-oLvAd9Nd.mjs");
13
+ const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-laxRA8HN.mjs");
14
14
  if (range !== "1h") log.warn("Cloudflare tail streams live logs; --range does not select historical entries.");
15
15
  if (level && level !== "all" && level !== "error") log.warn("Cloudflare tail cannot filter individual console levels; showing all invocation logs.");
16
16
  await tailCloudflareWorker(resolveCloudflareOperationContext(root), {
@@ -0,0 +1 @@
1
+ export { n as runMigrateCommand } from "./migrate-DiI50Chz.mjs";
@@ -1,9 +1,9 @@
1
1
  import { a as join, n as dirname } from "./dist-DMYe8CZJ.mjs";
2
- import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-CdGv9Tmi.mjs";
3
- import { h as validateConfig } from "./config-BITKQ3O6.mjs";
2
+ import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-G0yut6Zz.mjs";
3
+ import { h as validateConfig } from "./config-hL-S-Y9D.mjs";
4
4
  import { t as parseJsoncObject } from "./generated-wrangler-config-CoDaaFsA.mjs";
5
- import { c as stashCloudflareDeployPointer, l as ensureGitignoreLines, n as VOID_LOCK_FILE, r as ignoreMaterializedCloudflareConfig, s as seedCloudflareConfig } from "./cloudflare-config-eQunqX6A.mjs";
6
- import { I as renderVoidConfig, P as GENERATED_MARKERS } from "./wrangler-DESSbN8L.mjs";
5
+ import { c as stashCloudflareDeployPointer, l as ensureGitignoreLines, n as VOID_LOCK_FILE, r as ignoreMaterializedCloudflareConfig, s as seedCloudflareConfig } from "./cloudflare-config-Ce8j5S7V.mjs";
6
+ import { I as renderVoidConfig, P as GENERATED_MARKERS } from "./wrangler-Gn4EoY4-.mjs";
7
7
  import { L as log } from "./dist-D23AAMxT.mjs";
8
8
  import { m as printSuccess } from "./output-BCdLioKP.mjs";
9
9
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
package/dist/nitro.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as join, n as dirname } from "./dist-DMYe8CZJ.mjs";
2
- import { l as getDatabaseDialect, p as readConfig } from "./config-BITKQ3O6.mjs";
3
- import { c as voidDbBundlerPlugin } from "./dispatch-BNLB5_Gm.mjs";
4
- import { n as bundleWorkerSqlDriver } from "./wrapper-C9SUxoj7.mjs";
2
+ import { l as getDatabaseDialect, p as readConfig } from "./config-hL-S-Y9D.mjs";
3
+ import { c as voidDbBundlerPlugin } from "./dispatch-DM4Xdd2l.mjs";
4
+ import { n as bundleWorkerSqlDriver } from "./wrapper-B9W9RE8z.mjs";
5
5
  import { normalizePath } from "vite";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import { resolve } from "node:path/win32";
@@ -1,6 +1,6 @@
1
1
  import { n as dirname } from "./dist-DMYe8CZJ.mjs";
2
- import { a as projectAuthConfigImporter, i as loadVoidAuthConfig, r as findVoidAuthConfig } from "./config-WlvEcL82.mjs";
3
- import { p as readConfig } from "./config-BITKQ3O6.mjs";
2
+ import { a as projectAuthConfigImporter, i as loadVoidAuthConfig, r as findVoidAuthConfig } from "./config-s6TkpSat.mjs";
3
+ import { p as readConfig } from "./config-hL-S-Y9D.mjs";
4
4
  import { r as getMiniflareDatabasePath } from "./runner-5MCSimKx.mjs";
5
5
  import { s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
6
6
  import { a as pgMigrationRunner, i as mysqlMigrationRunner, n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-DDeifS3v.mjs";
@@ -180,8 +180,8 @@ async function runAuth(origin, args) {
180
180
  if (args.action === "login" || args.action === "token" && args.tokenStdin) {
181
181
  if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
182
182
  const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
183
- const { discoverPlatform } = await import("./platform-cmd-DpCHawGF.mjs");
184
- const { selectPlatformLoginMethod } = await import("./login-BpbYeu-n.mjs");
183
+ const { discoverPlatform } = await import("./platform-cmd-C7BevP9b.mjs");
184
+ const { selectPlatformLoginMethod } = await import("./login-BX2gzHUt.mjs");
185
185
  const { runPlatformLogin } = await import("./auth-CL-p_rqV.mjs");
186
186
  return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.provider)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
187
187
  })();
@@ -0,0 +1 @@
1
+ export { a as runOperatorCommand } from "./operator-cmd-CEI5Aaza.mjs";
@@ -26,6 +26,7 @@ export declare class VoidActionError extends Error {
26
26
  });
27
27
  }
28
28
  export declare function categorizeActionError(status: number): ActionErrorHandlingScope;
29
+ export declare function isVoidActionError(error: unknown): error is VoidActionError;
29
30
  export declare function isCallSiteActionError(error: unknown): error is VoidActionError;
30
31
  export declare function isAbortError(error: unknown): boolean;
31
32
  type PageComponentModule = {
@@ -70,6 +71,7 @@ type PageNavigationEngineConfig = {
70
71
  layoutTree: Record<string, Array<string>>;
71
72
  routeMeta: Record<string, {
72
73
  island?: boolean;
74
+ prerender?: boolean;
73
75
  }>;
74
76
  /** Page id for a decoded pathname (see `decodePagePath`). */
75
77
  matchRoute(path: string): string | null;
@@ -37,8 +37,11 @@ function categorizeActionError(status) {
37
37
  default: return "boundary";
38
38
  }
39
39
  }
40
+ function isVoidActionError(error) {
41
+ return typeof error === "object" && error !== null && "name" in error && error.name === "VoidActionError" && "status" in error && typeof error.status === "number";
42
+ }
40
43
  function isCallSiteActionError(error) {
41
- return typeof error === "object" && error !== null && "name" in error && error.name === "VoidActionError" && "status" in error && typeof error.status === "number" && categorizeActionError(error.status) === "callSite";
44
+ return isVoidActionError(error) && categorizeActionError(error.status) === "callSite";
42
45
  }
43
46
  function isAbortError(error) {
44
47
  return typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
@@ -509,7 +512,7 @@ async function createPageNavigationEngine(config) {
509
512
  /** Route id for a non-island page that static page data can serve, or null. */
510
513
  function matchStaticPageId(fetchUrl) {
511
514
  const matchedId = matchRoute(fetchUrl || window.location.pathname + window.location.search);
512
- return matchedId && !routeMeta[matchedId]?.island && components[matchedId] ? matchedId : null;
515
+ return matchedId && !routeMeta[matchedId]?.island && routeMeta[matchedId]?.prerender !== false && components[matchedId] ? matchedId : null;
513
516
  }
514
517
  async function loadStaticPageDataFile(fetchUrl, signal) {
515
518
  const matchedId = matchStaticPageId(fetchUrl);
@@ -1558,4 +1561,4 @@ function initIslands(islands, hydrateFn) {
1558
1561
  if (loader) scheduleHydration(el, loader, props, strategy, hydrate);
1559
1562
  });
1560
1563
  }
1561
- export { VoidActionError, categorizeActionError, cloneFormValue, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorMessage, formRetryMessage, formSubmissionBlocked, getValidationErrors, handleLinkClick, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isModifiedEvent, linkActiveAttributes, linkPendingAttributes, linkPrefetchStrategies, mergeDataIntoHref, objectToFormData, observeLinkVisible, parseFormResetArgs, prefetchLink, refreshPage, resolveLink, scheduleFormRetry, scheduleHydration, ssrProxy, submitAction, submitIslandAction, toUrlString };
1564
+ export { VoidActionError, categorizeActionError, cloneFormValue, createActionClient, createPageNavigationEngine, createRouterFacade, createSsrRouter, createVoidRouter, formErrorMessage, formRetryMessage, formSubmissionBlocked, getValidationErrors, handleLinkClick, hasFiles, idleNavigationState, initIslands, interpolateRouteParams, isAbortError, isCallSiteActionError, isEqualFormValue, isFile, isFormResetOptions, isModifiedEvent, isVoidActionError, linkActiveAttributes, linkPendingAttributes, linkPrefetchStrategies, mergeDataIntoHref, objectToFormData, observeLinkVisible, parseFormResetArgs, prefetchLink, refreshPage, resolveLink, scheduleFormRetry, scheduleHydration, ssrProxy, submitAction, submitIslandAction, toUrlString };
@@ -1,8 +1,8 @@
1
1
  import { a as join, n as dirname } from "../dist-DMYe8CZJ.mjs";
2
- import { r as resolvePagesDir } from "../project-paths-CdGv9Tmi.mjs";
3
- import { p as readConfig } from "../config-BITKQ3O6.mjs";
4
- import { a as resolveLayoutChain, i as resolveEffectiveLayoutChain, n as scanPages, r as generateComponentManifest, s as resolveNamedLayout, t as pageFileEnvironment } from "../scan-X2rDDRNa.mjs";
5
- import { r as parseRedirectsFile } from "../headers-CuTEdP9C.mjs";
2
+ import { r as resolvePagesDir } from "../project-paths-G0yut6Zz.mjs";
3
+ import { p as readConfig } from "../config-hL-S-Y9D.mjs";
4
+ import { a as resolveLayoutChain, i as resolveEffectiveLayoutChain, n as scanPages, r as generateComponentManifest, s as resolveNamedLayout, t as pageFileEnvironment } from "../scan-F0psanp7.mjs";
5
+ import { r as parseRedirectsFile } from "../headers--cbz6iZ8.mjs";
6
6
  import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-5XPcnG-j.mjs";
7
7
  import { r as serializePageData } from "../serialize-DUuYuaY3.mjs";
8
8
  import { n as assertLinkPrefetchValue } from "../prefetch-Dx2jIbtg.mjs";
@@ -83,7 +83,11 @@ function createPagesPlugin(pagesDir, options) {
83
83
  }
84
84
  if (id === "\0" + CLIENT_ENTRY_ID) {
85
85
  if (!pageScan) return "";
86
- return options.generateClient(pageScan, resolveStaticPageDataBuildOptions(root, { publicDir: viteConfig?.publicDir }));
86
+ const staticPageData = isDev ? {
87
+ enabled: false,
88
+ fastPath: false
89
+ } : resolveStaticPageDataBuildOptions(root, { publicDir: viteConfig?.publicDir });
90
+ return options.generateClient(pageScan, staticPageData);
87
91
  }
88
92
  }
89
93
  },
@@ -1,5 +1,5 @@
1
1
  import { c as resolve, n as dirname, s as relative } from "../dist-DMYe8CZJ.mjs";
2
- import { c as editIslandSource, i as resolveEffectiveLayoutChain, l as findIslandImports, n as scanPages, u as findStaticCssImports } from "../scan-X2rDDRNa.mjs";
2
+ import { c as editIslandSource, i as resolveEffectiveLayoutChain, l as findIslandImports, n as scanPages, u as findStaticCssImports } from "../scan-F0psanp7.mjs";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  import { isCSSRequest, normalizePath } from "vite";
5
5
  // src/pages/islands-plugin.ts
@@ -3,7 +3,7 @@ import { A as confirm, K as select, U as password, X as text, z as multiselect }
3
3
  import { l as formatUrl, m as printSuccess } from "./output-BCdLioKP.mjs";
4
4
  import { n as OperatorClient } from "./operator-client-BIY4-N_6.mjs";
5
5
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-CfDcmzpo.mjs";
6
- import { i as humanLines } from "./operator-cmd-BUqsdk2K.mjs";
6
+ import { i as humanLines } from "./operator-cmd-CEI5Aaza.mjs";
7
7
  import { o as platformPromptAnswer } from "./platform-setup-Vw1AaUN8.mjs";
8
8
  import { parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration } from "@void/platform";
9
9
  import { stripVTControlCharacters } from "node:util";
@@ -142,11 +142,11 @@ async function configurationInput(args, existing) {
142
142
  }
143
143
  async function runPlatformAuthConfig(args) {
144
144
  if (args.action === "recover") {
145
- const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-BOdFrl7R.mjs");
145
+ const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-XeBmPTXx.mjs");
146
146
  return runPlatformAuthRecovery(args);
147
147
  }
148
148
  if (args.action === "protection") {
149
- const { runPlatformProtectionConfig } = await import("./platform-auth-protection-KF5Vo-1I.mjs");
149
+ const { runPlatformProtectionConfig } = await import("./platform-auth-protection-t6mdY4nn.mjs");
150
150
  return runPlatformProtectionConfig(args);
151
151
  }
152
152
  const origin = resolveOperatorOrigin(args.connection);
@@ -5,8 +5,8 @@ import { A as confirm, tt as isCancel } from "./dist-D23AAMxT.mjs";
5
5
  import { m as printSuccess } from "./output-BCdLioKP.mjs";
6
6
  import { n as OperatorClient } from "./operator-client-BIY4-N_6.mjs";
7
7
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-CfDcmzpo.mjs";
8
- import { G as checkpointPlatformAccessResources, H as resolvePlatformCloudflareCredential, K as parsePlatformAccessSetupSpec, Y as PlatformCloudflareClient, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, q as preparePlatformAccessSetup } from "./platform-lifecycle-D9RdGub1.mjs";
9
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-BRefdHGD.mjs";
8
+ import { G as checkpointPlatformAccessResources, H as resolvePlatformCloudflareCredential, K as parsePlatformAccessSetupSpec, Y as PlatformCloudflareClient, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, q as preparePlatformAccessSetup } from "./platform-lifecycle-BvU_TNji.mjs";
9
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-_UE1_GM8.mjs";
10
10
  import { parsePlatformAccessProtection, platformProtectionProofMessage } from "@void/platform";
11
11
  import { createHmac } from "node:crypto";
12
12
  import { readFile } from "node:fs/promises";
@@ -3,8 +3,8 @@ import { u as openBrowser } from "./auth-Dy8svcqQ.mjs";
3
3
  import { A as confirm, tt as isCancel } from "./dist-D23AAMxT.mjs";
4
4
  import { l as formatUrl, m as printSuccess } from "./output-BCdLioKP.mjs";
5
5
  import { a as resolveOperatorOrigin } from "./operator-auth-CfDcmzpo.mjs";
6
- import { H as resolvePlatformCloudflareCredential, Y as PlatformCloudflareClient, g as platformDatabaseClientUrl, h as acquirePlatformDatabaseLifecycleLockConnection, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-D9RdGub1.mjs";
7
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-BRefdHGD.mjs";
6
+ import { H as resolvePlatformCloudflareCredential, Y as PlatformCloudflareClient, g as platformDatabaseClientUrl, h as acquirePlatformDatabaseLifecycleLockConnection, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-BvU_TNji.mjs";
7
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-_UE1_GM8.mjs";
8
8
  import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
9
9
  import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
10
10
  import { setTimeout } from "node:timers/promises";
@@ -1 +1 @@
1
- export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-Ds3EAV5t.mjs";
1
+ export { t as discoverPlatform, r as runPlatformCommand } from "./platform-cmd-EXehmSYA.mjs";
@@ -103,12 +103,12 @@ async function runPlatformCommand(_root, args) {
103
103
  await runPlatformPlansConfig(args);
104
104
  return;
105
105
  }
106
- const { runPlatformAuthConfig } = await import("./platform-auth-config-K4m_LE8b.mjs");
106
+ const { runPlatformAuthConfig } = await import("./platform-auth-config-ZrYm8KVs.mjs");
107
107
  await runPlatformAuthConfig(args);
108
108
  return;
109
109
  }
110
110
  if (args.subcommand === "operator") {
111
- const { runOperatorCommand } = await import("./operator-cmd-wBYyp8iQ.mjs");
111
+ const { runOperatorCommand } = await import("./operator-cmd-oTT2MA9G.mjs");
112
112
  await runOperatorCommand(args);
113
113
  return;
114
114
  }
@@ -176,7 +176,7 @@ async function runPlatformCommand(_root, args) {
176
176
  console.log(`Capabilities: ${Object.entries(discovery.capabilities).filter(([, enabled]) => enabled).map(([name]) => name).join(", ")}`);
177
177
  return;
178
178
  }
179
- const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-BH34I0rh.mjs");
179
+ const { runPlatformLifecycleCommand } = await import("./platform-lifecycle-CN4aXldN.mjs");
180
180
  await runPlatformLifecycleCommand(args);
181
181
  }
182
182
  function showSavedInstallationStatus(manifest) {
@@ -2,8 +2,8 @@ import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock
2
2
  import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
3
3
  import { A as confirm, X as text, tt as isCancel } from "./dist-D23AAMxT.mjs";
4
4
  import { m as printSuccess, p as note } from "./output-BCdLioKP.mjs";
5
- import { C as createPlatformHealthProbeToken, E as recordResource, H as resolvePlatformCloudflareCredential, O as recordPlatformWorkerTraffic, V as assertPlatformOperatorCredentialCanApplyPlan, Y as PlatformCloudflareClient, k as createPlatformInstallPlan, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, t as assertNoninteractivePlatformMutationAcknowledged } from "./platform-lifecycle-D9RdGub1.mjs";
6
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-BRefdHGD.mjs";
5
+ import { C as createPlatformHealthProbeToken, E as recordResource, H as resolvePlatformCloudflareCredential, O as recordPlatformWorkerTraffic, V as assertPlatformOperatorCredentialCanApplyPlan, Y as PlatformCloudflareClient, k as createPlatformInstallPlan, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, t as assertNoninteractivePlatformMutationAcknowledged } from "./platform-lifecycle-BvU_TNji.mjs";
6
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest, o as resolveInstalledPlatformManifest } from "./platform-management-_UE1_GM8.mjs";
7
7
  import { PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, createApplicationRoutes, createPlatformDeploymentManifest, normalizeApplicationDomain } from "@void/platform";
8
8
  // src/cli/platform-domain.ts
9
9
  function platformDomainTarget(manifest, domain, zone, dedicatedZone) {
@@ -5,10 +5,10 @@ import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
5
5
  import { t as ensurePlatformAccessToken } from "./cf-access-BmBT2h8_.mjs";
6
6
  import { A as confirm, H as outro, K as select, L as log, U as password, X as text$1, tt as isCancel, z as multiselect } from "./dist-D23AAMxT.mjs";
7
7
  import { f as import_picocolors, l as formatUrl, m as printSuccess, n as cliCommandName, p as note, r as createSpinner, u as getErrorMessage } from "./output-BCdLioKP.mjs";
8
- import { l as resolveCloudflareOperationArgv } from "./cloudflare-process-DjJ638A-.mjs";
9
- import { o as createDefaultRunWrangler, v as resolvePinnedApiBaseUrl } from "./provision-BbCzpbXs.mjs";
8
+ import { l as resolveCloudflareOperationArgv } from "./cloudflare-process-D9aC-jXr.mjs";
9
+ import { o as createDefaultRunWrangler, v as resolvePinnedApiBaseUrl } from "./provision-B0HqoRuI.mjs";
10
10
  import { t as parsePlatformArgs } from "./platform-args-Cx1M-7bq.mjs";
11
- import { o as runCloudflareAuthCommand } from "./cloudflare-auth-CEu-1Ps_.mjs";
11
+ import { o as runCloudflareAuthCommand } from "./cloudflare-auth-CuS42-9A.mjs";
12
12
  import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
13
13
  import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-Vw1AaUN8.mjs";
14
14
  import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
@@ -5509,7 +5509,7 @@ async function verifyInstalledPlatformAccessProtection(input) {
5509
5509
  }
5510
5510
  const existingWorkers = input.plan.actions.filter((action) => action.kind === "worker" && action.action === "update").map((action) => action.name);
5511
5511
  if (existingWorkers.length) {
5512
- const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-KF5Vo-1I.mjs");
5512
+ const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-t6mdY4nn.mjs");
5513
5513
  await verifyProtectionWorkerOrigins({
5514
5514
  request: input.client.request.bind(input.client),
5515
5515
  listWorkerDomains: input.client.listWorkerDomains.bind(input.client),
@@ -7820,14 +7820,14 @@ function resolvePlatformInstallDatabaseUrl(checkpoint, manifest = null) {
7820
7820
  }
7821
7821
  async function runPlatformLifecycleCommand(commandArgs) {
7822
7822
  if (commandArgs.subcommand === "domain") {
7823
- const { runPlatformDomainCommand } = await import("./platform-domain-rWJshybd.mjs");
7823
+ const { runPlatformDomainCommand } = await import("./platform-domain-DR263ObA.mjs");
7824
7824
  await runPlatformDomainCommand(commandArgs);
7825
7825
  return;
7826
7826
  }
7827
7827
  if (commandArgs.subcommand === "discover") {
7828
7828
  const client = new PlatformCloudflareClient((await resolvePlatformCloudflareCredential()).token);
7829
7829
  const accountId = await selectAccount(await readAccounts(client), commandArgs.account);
7830
- const { recoverPlatformInstallations } = await import("./platform-recovery-DZuZGJtt.mjs");
7830
+ const { recoverPlatformInstallations } = await import("./platform-recovery-CPVk9-Q4.mjs");
7831
7831
  const recovered = await recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector);
7832
7832
  if (recovered.length === 0) {
7833
7833
  log.info(`No recoverable Void platform installations were found in ${accountId}.`);
@@ -7838,7 +7838,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
7838
7838
  return;
7839
7839
  }
7840
7840
  if (commandArgs.subcommand !== "install") {
7841
- const { runInstalledPlatformCommand } = await import("./platform-management-BfLW0Zlo.mjs");
7841
+ const { runInstalledPlatformCommand } = await import("./platform-management-yS2sve3V.mjs");
7842
7842
  await runInstalledPlatformCommand(commandArgs);
7843
7843
  return;
7844
7844
  }
@@ -8014,7 +8014,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8014
8014
  progress?.stop("Read the saved installation.");
8015
8015
  progress = void 0;
8016
8016
  if (authoritative) {
8017
- const { selectAuthoritativePlatformManifest } = await import("./platform-management-BfLW0Zlo.mjs");
8017
+ const { selectAuthoritativePlatformManifest } = await import("./platform-management-yS2sve3V.mjs");
8018
8018
  const selected = selectAuthoritativePlatformManifest(existing, authoritative);
8019
8019
  authoritativeProvisionIntents = true;
8020
8020
  if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
@@ -8462,7 +8462,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
8462
8462
  })).actions.filter((action) => action.kind === "worker"),
8463
8463
  revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
8464
8464
  verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
8465
- const { verifyPlatformInstallationOwnership } = await import("./platform-management-BfLW0Zlo.mjs");
8465
+ const { verifyPlatformInstallationOwnership } = await import("./platform-management-yS2sve3V.mjs");
8466
8466
  const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
8467
8467
  const previous = manifest.resources.find((resource) => resource.key === action.key);
8468
8468
  return action.action === "create" && previous && previous.name !== action.name;
@@ -1 +1 @@
1
- export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-D9RdGub1.mjs";
1
+ export { r as runPlatformLifecycleCommand } from "./platform-lifecycle-BvU_TNji.mjs";
@@ -3,7 +3,7 @@ import { t as ensurePlatformAccessToken } from "./cf-access-BmBT2h8_.mjs";
3
3
  import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-D23AAMxT.mjs";
4
4
  import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-BCdLioKP.mjs";
5
5
  import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
6
- import { $ as hyperdriveOriginMatches, A as dnsRecordConfigHash, B as turnOffInstalledProjectZeroTrust, C as createPlatformHealthProbeToken, D as platformTrafficAttachmentWorker, F as platformAdoptionIntentHash, H as resolvePlatformCloudflareCredential, I as r2BucketConfigHash, J as PlatformCloudflareApiError, L as resourceMarkerProblem, M as hasProvisionIntentStep, N as legacyResourceConfigHash, P as matchesRecordedR2Fingerprint, Q as hyperdriveOriginFromConnectionString, R as revalidatePlatformInstallAction, S as loadPlatformRuntime, T as resolveBootstrapGitHubId, U as verifyPlatformCloudflareCredential, V as assertPlatformOperatorCredentialCanApplyPlan, W as activatePlatformAccessCredentials, X as PlatformRuntimeTokenEmailPermissionError, Y as PlatformCloudflareClient, Z as hyperdriveOriginConfigHash, _ as readPlatformProjectSlugs, a as findPlatformWorkerOutsideChanges, b as formatZeroTrustApplications, c as uploadPlatformWorkerOutsideChanges, d as replacePendingInstallationAuthentication, et as verifyPlatformRuntimeTokenEmailPermissions, f as REMOTE_INSTALLATION_MANIFEST_KEY, j as formatPlatformInstallPlan, k as createPlatformInstallPlan, l as authenticationSetupRequestHash, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, o as formatPlatformWorkerOutsideChanges, p as installPlatform, s as reviewPlatformWorkerOutsideChanges, t as assertNoninteractivePlatformMutationAcknowledged, tt as verifyPlatformRuntimeTokenPermissions, u as readLoginReplacementFile, v as readPlatformProjectZeroTrustState, w as createPlatformInstallationSecrets, x as readPlatformDatabase, y as assertProjectZeroTrustAllowsUninstall, z as platformDatabaseNameFromOwnerUrl } from "./platform-lifecycle-D9RdGub1.mjs";
6
+ import { $ as hyperdriveOriginMatches, A as dnsRecordConfigHash, B as turnOffInstalledProjectZeroTrust, C as createPlatformHealthProbeToken, D as platformTrafficAttachmentWorker, F as platformAdoptionIntentHash, H as resolvePlatformCloudflareCredential, I as r2BucketConfigHash, J as PlatformCloudflareApiError, L as resourceMarkerProblem, M as hasProvisionIntentStep, N as legacyResourceConfigHash, P as matchesRecordedR2Fingerprint, Q as hyperdriveOriginFromConnectionString, R as revalidatePlatformInstallAction, S as loadPlatformRuntime, T as resolveBootstrapGitHubId, U as verifyPlatformCloudflareCredential, V as assertPlatformOperatorCredentialCanApplyPlan, W as activatePlatformAccessCredentials, X as PlatformRuntimeTokenEmailPermissionError, Y as PlatformCloudflareClient, Z as hyperdriveOriginConfigHash, _ as readPlatformProjectSlugs, a as findPlatformWorkerOutsideChanges, b as formatZeroTrustApplications, c as uploadPlatformWorkerOutsideChanges, d as replacePendingInstallationAuthentication, et as verifyPlatformRuntimeTokenEmailPermissions, f as REMOTE_INSTALLATION_MANIFEST_KEY, j as formatPlatformInstallPlan, k as createPlatformInstallPlan, l as authenticationSetupRequestHash, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, o as formatPlatformWorkerOutsideChanges, p as installPlatform, s as reviewPlatformWorkerOutsideChanges, t as assertNoninteractivePlatformMutationAcknowledged, tt as verifyPlatformRuntimeTokenPermissions, u as readLoginReplacementFile, v as readPlatformProjectZeroTrustState, w as createPlatformInstallationSecrets, x as readPlatformDatabase, y as assertProjectZeroTrustAllowsUninstall, z as platformDatabaseNameFromOwnerUrl } from "./platform-lifecycle-BvU_TNji.mjs";
7
7
  import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
8
8
  import { setTimeout } from "node:timers/promises";
9
9
  // src/cli/platform-teardown.ts
@@ -1 +1 @@
1
- export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-BRefdHGD.mjs";
1
+ export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-_UE1_GM8.mjs";
@@ -1,7 +1,7 @@
1
1
  import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DZ_2Xuqd.mjs";
2
2
  import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
3
- import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-D9RdGub1.mjs";
4
- import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-BRefdHGD.mjs";
3
+ import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-BvU_TNji.mjs";
4
+ import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-_UE1_GM8.mjs";
5
5
  import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
6
6
  // src/cli/platform-recovery.ts
7
7
  async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
@@ -1,11 +1,11 @@
1
1
  import { a as join, l as toSlash, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { n as readProjectPaths } from "./project-paths-CdGv9Tmi.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
3
3
  import { n as globSync } from "./dist-BWNkVq50.mjs";
4
- import { d as deriveFromSource, g as ROUTE_EXTENSIONS, h as parseWebSocketFilename, m as parseRouteFilename, p as isRouteEnabledForEnvironment, t as pageFileEnvironment } from "./scan-X2rDDRNa.mjs";
4
+ import { _ as ROUTE_EXTENSIONS, d as deriveFromSource, g as parseWebSocketFilename, h as parseRouteFilename, m as isRouteEnabledForEnvironment, p as compareRouteSpecificity, t as pageFileEnvironment } from "./scan-F0psanp7.mjs";
5
5
  import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-Cv0JwXqb.mjs";
6
6
  import { a as staticLiteral, n as bindingResolver, o as unwrapStaticExpression, r as walk } from "./ast-bindings-BkivMJIo.mjs";
7
7
  import { n as resourceNameWords, t as isResourceName } from "./resource-name-DlJ9QXzg.mjs";
8
- import { r as getSsrServerEntryPath } from "./entry-CBZsCy3O.mjs";
8
+ import { r as getSsrServerEntryPath } from "./entry-DFBca6aS.mjs";
9
9
  import { existsSync, readFileSync } from "node:fs";
10
10
  import { parseSync } from "vite";
11
11
  // src/application-features.ts
@@ -483,10 +483,7 @@ function buildWebSocketRoute(root, filePath, paths = readProjectPaths(root)) {
483
483
  };
484
484
  }
485
485
  function parseWebSocketFiles(root, files, paths = readProjectPaths(root), environment) {
486
- const routes = files.filter((f) => isWebSocketRouteFile(f)).filter((filePath) => isRouteEnabledForEnvironment(parseWebSocketFilename(filePath), environment)).map((filePath) => buildWebSocketRoute(root, filePath, paths)).sort((a, b) => {
487
- if (a.catchAll !== b.catchAll) return a.catchAll ? 1 : -1;
488
- return a.pattern.localeCompare(b.pattern);
489
- });
486
+ const routes = files.filter((f) => isWebSocketRouteFile(f)).filter((filePath) => isRouteEnabledForEnvironment(parseWebSocketFilename(filePath), environment)).map((filePath) => buildWebSocketRoute(root, filePath, paths)).sort(compareRouteSpecificity);
490
487
  const byClass = /* @__PURE__ */ new Map();
491
488
  for (const route of routes) {
492
489
  const previous = byClass.get(route.className) ?? [];
@@ -1,6 +1,6 @@
1
1
  import { L as log } from "./dist-D23AAMxT.mjs";
2
2
  import { m as printSuccess, p as note } from "./output-BCdLioKP.mjs";
3
- import { t as prepareProject } from "./prepare-BJW-f1f1.mjs";
3
+ import { t as prepareProject } from "./prepare-D8L9AQbw.mjs";
4
4
  // src/cli/prepare.ts
5
5
  async function runPrepareCommand(root) {
6
6
  console.log();
@@ -0,0 +1 @@
1
+ export { t as prepareProject } from "./prepare-D8L9AQbw.mjs";
@@ -1,13 +1,13 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { t as discoverSchema } from "./discover-Dhkzxgdt.mjs";
3
- import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-WlvEcL82.mjs";
4
- import { c as getDatabaseCasing, p as readConfig } from "./config-BITKQ3O6.mjs";
2
+ import { t as discoverSchema } from "./discover-CVFCWU7W.mjs";
3
+ import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-s6TkpSat.mjs";
4
+ import { c as getDatabaseCasing, p as readConfig } from "./config-hL-S-Y9D.mjs";
5
5
  import { s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
6
- import { i as writeFileIfChanged, n as ensureProjectTsconfig } from "./project-tsconfig-Cf2NFjlM.mjs";
7
- import { n as generateDbDts } from "./db-types-C_8amnB0.mjs";
8
- import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-DqzVBKnS.mjs";
9
- import { t as analyzeApplication } from "./application-routing-P4TggvWp.mjs";
10
- import { n as generateQueueTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-CZc1YXjF.mjs";
6
+ import { i as writeFileIfChanged, n as ensureProjectTsconfig } from "./project-tsconfig-BMveFb4b.mjs";
7
+ import { n as generateDbDts } from "./db-types-DRmxBJ2K.mjs";
8
+ import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-Bd8DkQhl.mjs";
9
+ import { t as analyzeApplication } from "./application-routing-GCBSwXA9.mjs";
10
+ import { n as generateQueueTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-e69EqY88.mjs";
11
11
  import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-lFdzSEa9.mjs";
12
12
  import { existsSync, rmSync } from "node:fs";
13
13
  import { fileURLToPath } from "node:url";
@@ -48,6 +48,7 @@ async function prepareProject(root) {
48
48
  if (hasDbRuntime) {
49
49
  if (generateDbDts(outDir, schema, dialect)) written.push(join(".void", "db.d.ts"));
50
50
  } else removeGeneratedFile(outDir, "db.d.ts", removed);
51
+ if (ensureProjectTsconfig(root, hasRouteTypes, hasDbRuntime, schema != null, { paths })) written.push(join(".void", "tsconfig.json"));
51
52
  if (authEnabled) {
52
53
  const authRuntime = {
53
54
  dialect,
@@ -71,7 +72,6 @@ async function prepareProject(root) {
71
72
  removeGeneratedFile(outDir, "better-auth-schema.ts", removed);
72
73
  removeGeneratedFile(outDir, "better-auth-db.ts", removed);
73
74
  }
74
- if (ensureProjectTsconfig(root, hasRouteTypes, hasDbRuntime, schema != null, { paths })) written.push(join(".void", "tsconfig.json"));
75
75
  return {
76
76
  written,
77
77
  removed
@@ -37,7 +37,7 @@ async function runProjectsCommand(root) {
37
37
  async function runProjectCommand(root, args) {
38
38
  const cloudflare = readDeploymentPlatform(root) === "cloudflare";
39
39
  if (args.subcommand === "status") {
40
- const { runListCommand } = await import("./list-BYSOo9fm.mjs");
40
+ const { runListCommand } = await import("./list-BFQ0gcML.mjs");
41
41
  return runListCommand(root, args.name || void 0);
42
42
  }
43
43
  if (args.subcommand === "link") {
@@ -47,7 +47,7 @@ async function runProjectCommand(root, args) {
47
47
  }
48
48
  if (args.subcommand === "list") {
49
49
  if (cloudflare) {
50
- const { runListCommand } = await import("./list-BYSOo9fm.mjs");
50
+ const { runListCommand } = await import("./list-BFQ0gcML.mjs");
51
51
  return runListCommand(root);
52
52
  }
53
53
  return runProjectsCommand(root);
@@ -83,7 +83,7 @@ async function runProjectCommand(root, args) {
83
83
  });
84
84
  }
85
85
  if (args.subcommand === "logs") {
86
- const { runLogsCommand } = await import("./logs-DE0weBsR.mjs");
86
+ const { runLogsCommand } = await import("./logs-B2OeLS4X.mjs");
87
87
  return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
88
88
  }
89
89
  if (args.subcommand === "requests") {
@@ -92,7 +92,7 @@ async function runProjectCommand(root, args) {
92
92
  return runRequestsCommand(root, args.range, args.status || void 0);
93
93
  }
94
94
  if (args.subcommand === "rollback") {
95
- const { runRollbackCommand } = await import("./rollback-BgL0wY1J.mjs");
95
+ const { runRollbackCommand } = await import("./rollback-AVwiMAkk.mjs");
96
96
  return runRollbackCommand(root, args.deployId || void 0, args.platform);
97
97
  }
98
98
  if (args.subcommand === "cancel") {
@@ -5,6 +5,10 @@ import { createJiti } from "jiti";
5
5
  // src/config-loader.ts
6
6
  const LEGACY_CONFIG_FILE = "void.json";
7
7
  const TYPED_CONFIG_FILE = "void.config.ts";
8
+ /** The file to name in messages about a project's settings. Only legacy projects use JSON. */
9
+ function getConfigFileName(root) {
10
+ return existsSync(join(root, "void.json")) ? LEGACY_CONFIG_FILE : TYPED_CONFIG_FILE;
11
+ }
8
12
  /** Evaluate a TypeScript config without requiring Void to be installed in the target project. */
9
13
  function loadTypedVoidConfigFile(path) {
10
14
  const sourceEntry = fileURLToPath(new URL("./config-entry.ts", import.meta.url));
@@ -72,18 +76,18 @@ const SOURCE_CONVENTIONS = /* @__PURE__ */ new Set([
72
76
  ...AUTH_CONFIG_FILES,
73
77
  ...ENV_CONFIG_FILES
74
78
  ]);
75
- function validateSourceDir(value) {
76
- if (value.trim() !== value || value.length === 0) throw new Error("config: \"sourceDir\" in void.json must be a non-empty relative directory.");
77
- if (value === "." || value === ".." || value.startsWith("../") || value.includes("/../") || value.endsWith("/..") || isAbsolute(value)) throw new Error(`config: "sourceDir" path '${value}' in void.json must be a relative directory.`);
79
+ function validateSourceDir(value, configFile = TYPED_CONFIG_FILE) {
80
+ if (value.trim() !== value || value.length === 0) throw new Error(`config: "sourceDir" in ${configFile} must be a non-empty relative directory.`);
81
+ if (value === "." || value === ".." || value.startsWith("../") || value.includes("/../") || value.endsWith("/..") || isAbsolute(value)) throw new Error(`config: "sourceDir" path '${value}' in ${configFile} must be a relative directory.`);
78
82
  const normalized = normalize(value).replace(/\/+$/, "");
79
- if (normalized === "" || normalized === ".") throw new Error(`config: "sourceDir" path '${value}' in void.json must be a relative directory.`);
83
+ if (normalized === "" || normalized === ".") throw new Error(`config: "sourceDir" path '${value}' in ${configFile} must be a relative directory.`);
80
84
  return normalized;
81
85
  }
82
- function getSourceDir(config) {
83
- return config?.sourceDir ? validateSourceDir(config.sourceDir) : "";
86
+ function getSourceDir(root, config) {
87
+ return config?.sourceDir ? validateSourceDir(config.sourceDir, getConfigFileName(root)) : "";
84
88
  }
85
89
  function resolveProjectPaths(root, config) {
86
- const sourceDir = getSourceDir(config);
90
+ const sourceDir = getSourceDir(root, config);
87
91
  const sourceRoot = sourceDir ? join(root, sourceDir) : root;
88
92
  const sourceRelative = (path) => sourceDir ? `${sourceDir}/${path}` : path;
89
93
  const envFileCandidates = sourceDir ? ENV_CONFIG_FILES.map((file) => join(sourceRoot, file)) : [...ENV_CONFIG_FILES.map((file) => join(root, file)), ...ENV_CONFIG_FILES.map((file) => join(root, "src", file))];
@@ -123,6 +127,6 @@ function assertNoRootSourceConventionConflicts(paths) {
123
127
  if (!paths.sourceDir) return;
124
128
  const conflicts = Array.from(SOURCE_CONVENTIONS).filter((convention) => existsSync(join(paths.root, convention)) && existsSync(join(paths.sourceRoot, convention)));
125
129
  if (conflicts.length === 0) return;
126
- throw new Error(`sourceDir: void.json sets "sourceDir": "${paths.sourceDir}", but convention path(s) also exist at the project root: ${conflicts.join(", ")}. Move them under "${paths.sourceDir}" or remove the root copy.`);
130
+ throw new Error(`sourceDir: ${getConfigFileName(paths.root)} sets "sourceDir": "${paths.sourceDir}", but convention path(s) also exist at the project root: ${conflicts.join(", ")}. Move them under "${paths.sourceDir}" or remove the root copy.`);
127
131
  }
128
132
  export { validateSourceDir as a, loadVoidConfig as c, resolveProjectPaths as i, readProjectPaths as n, TYPED_CONFIG_FILE as o, resolvePagesDir as r, loadTypedVoidConfigFile as s, assertNoRootSourceConventionConflicts as t };
@@ -1,5 +1,5 @@
1
1
  import { a as join, n as dirname, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { n as readProjectPaths } from "./project-paths-CdGv9Tmi.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
4
  // src/codegen/write-if-changed.ts
5
5
  function writeFileIfChanged(path, content) {
@@ -1,8 +1,8 @@
1
1
  import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
2
2
  import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
3
- import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-DESSbN8L.mjs";
3
+ import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-Gn4EoY4-.mjs";
4
4
  import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
5
- import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-DjJ638A-.mjs";
5
+ import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-D9aC-jXr.mjs";
6
6
  import { createRequire } from "node:module";
7
7
  import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
8
8
  import { isRecord } from "@void/deploy-core";
@@ -1 +1 @@
1
- export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-BbCzpbXs.mjs";
1
+ export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-B0HqoRuI.mjs";
@@ -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-oLvAd9Nd.mjs");
77
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-laxRA8HN.mjs");
78
78
  const context = resolveCloudflareOperationContext(root);
79
79
  const status = await readCloudflareWorkerStatus(context);
80
80
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -1,5 +1,5 @@
1
1
  import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { i as writeFileIfChanged } from "./project-tsconfig-Cf2NFjlM.mjs";
2
+ import { i as writeFileIfChanged } from "./project-tsconfig-BMveFb4b.mjs";
3
3
  import { existsSync, rmSync } from "node:fs";
4
4
  // src/codegen/auth-types.ts
5
5
  /**
@@ -1,3 +1,3 @@
1
1
  import { r as defer, t as ValidationError } from "../validation-error-uAAjlsiW.mjs";
2
- import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "../handler-CKeTtYID.mjs";
2
+ import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "../handler-DnI_au0K.mjs";
3
3
  export { ValidationError, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -3,7 +3,7 @@ import { t as renderDefaultErrorPage } from "../error-pages-COVBnzK7.mjs";
3
3
  import { t as convertReturnValue } from "../response-HmNjB30w.mjs";
4
4
  import { i as searchWithoutActionKey, n as hasActionKey, r as markActionKey, t as actionKeySegment } from "../action-key-XtKKbbsi.mjs";
5
5
  import { n as handlePageGet, r as handlePageMutation } from "../protocol-COyySMki.mjs";
6
- import { t as VoidAssetRewriteError } from "../handler-CKeTtYID.mjs";
6
+ import { t as VoidAssetRewriteError } from "../handler-DnI_au0K.mjs";
7
7
  import { i as authDependentRequests, n as markStaticAsset, r as SHARED_CACHE_HEADERS, t as isUnchangedStaticAsset } from "../static-asset-marker-DsQKz6lt.mjs";
8
8
  import { r as toUrlString } from "../route-url-CRDF-I0I.mjs";
9
9
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -838,7 +838,7 @@ function createRoutingRuntime(app, options = {}) {
838
838
  const redirect = context.redirect.bind(context);
839
839
  c.redirect = (destination, status) => {
840
840
  const location = toUrlString(destination);
841
- if (location.startsWith("/") && !location.startsWith("//")) return redirect(redirectLocation(c.req.raw, location, status), status);
841
+ if (location.startsWith("/") && !location.startsWith("//") && hasActionKey(c.req.raw)) return redirect(redirectLocation(c.req.raw, location, status), status);
842
842
  return redirect(location, status);
843
843
  };
844
844
  c.originalUrl = () => originalUrls.get(c.req.raw) ?? null;