void 1.2.0 → 1.3.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 (169) hide show
  1. package/dist/{account-cmd-CdUll_35.mjs → account-cmd-B4i71m7k.mjs} +3 -3
  2. package/dist/{application-analysis-fEqoSeMp.mjs → application-analysis-DYdVoMAY.mjs} +8 -6
  3. package/dist/{application-routing-DAhNP4u3.mjs → application-routing-C8EqRDfv.mjs} +3 -1
  4. package/dist/{auth-link-C87vGXM-.mjs → auth-link-BKwHPbdv.mjs} +3 -3
  5. package/dist/{auth-router-6I81r-ix.mjs → auth-router-DqLx8E0F.mjs} +2 -2
  6. package/dist/{better-auth-shared-D-6z0q0f.mjs → better-auth-shared-7FM3Uk2N.mjs} +48 -2
  7. package/dist/{build-cmd-ex1g-j_e.mjs → build-cmd-Dy4psnt1.mjs} +1 -1
  8. package/dist/{cache-oHzrnY3z.mjs → cache-DV37S6dl.mjs} +1 -1
  9. package/dist/{cancel-deploy-viAMD0Q_.mjs → cancel-deploy-DMPyu1Vt.mjs} +1 -1
  10. package/dist/{cf-build-output-BhVxldCw.mjs → cf-build-output-Bapzc_8Z.mjs} +102 -1
  11. package/dist/cf-build-output-DlBkWdNU.mjs +1 -0
  12. package/dist/cli/cli.mjs +41 -32
  13. package/dist/cli/cloudflare-operation-process.mjs +27 -6
  14. package/dist/cli/env-schema-probe.mjs +2 -2
  15. package/dist/{client-BEkdj1kx.mjs → client-BEMtySaV.mjs} +8 -1
  16. package/dist/client-DyxPQnF_.mjs +1 -0
  17. package/dist/{cloudflare-cmd-DMzCv12s.mjs → cloudflare-cmd-BaqIigwI.mjs} +1 -1
  18. package/dist/{cloudflare-connect-CCRTVg-I.mjs → cloudflare-connect-pNLQmr_e.mjs} +1 -1
  19. package/dist/{cloudflare-operations-DsSaw2BT.mjs → cloudflare-operations-PCM4wucv.mjs} +1 -1
  20. package/dist/{cloudflare-operations-Dh9dEHJj.mjs → cloudflare-operations-vP3b5CQf.mjs} +3 -3
  21. package/dist/config-BTu1o3Dc.mjs +49 -0
  22. package/dist/{config-DQfHOKh9.d.mts → config-Du88-7Y8.d.mts} +2 -1
  23. package/dist/config-entry.d.mts +1 -1
  24. package/dist/{connect-k7R2rPVA.mjs → connect-DwVsBvVh.mjs} +4 -4
  25. package/dist/{create-project-DTuy-l0z.mjs → create-project-CgrnvzyA.mjs} +1 -1
  26. package/dist/{create-project-DV71ol5d.mjs → create-project-CjzbBlTv.mjs} +1 -1
  27. package/dist/{db-DVOkLH5X.mjs → db-rvo64snS.mjs} +13 -13
  28. package/dist/{delete-BbP5eopu.mjs → delete-DWX6dP4M.mjs} +1 -1
  29. package/dist/deploy-CtHE2A3R.mjs +2 -0
  30. package/dist/{deploy-7H32EnUs.mjs → deploy-hRPvw8ci.mjs} +229 -69
  31. package/dist/{deploy-managed-static-DlvcvnQT.mjs → deploy-managed-static-CDYA2p3L.mjs} +30 -14
  32. package/dist/{deploy-transport-BzGEj0Ge.mjs → deploy-transport-JCxw7QDi.mjs} +3 -3
  33. package/dist/deploy.mjs +4 -3
  34. package/dist/{dispatch-DoUnxTNo.mjs → dispatch-OVLeWW8K.mjs} +71 -2
  35. package/dist/{domain-CA2wBgra.mjs → domain-CH5iBD9Y.mjs} +2 -2
  36. package/dist/{email-DXpCc77w.mjs → email-CbTO1l78.mjs} +58 -9
  37. package/dist/{email-cloudflare-D03g2TkS.mjs → email-cloudflare-B8-pq_-W.mjs} +106 -5
  38. package/dist/{env-DgOQ9_8S.mjs → env-BBdw236G.mjs} +3 -3
  39. package/dist/{env-BJjULvL0.mjs → env-BaMz0j7H.mjs} +6 -1
  40. package/dist/{env-validation-BmsdCZEk.mjs → env-validation-BfBVvBNe.mjs} +1 -1
  41. package/dist/{env-validation-Dwq3PJzK.mjs → env-validation-XcukUlFM.mjs} +1 -1
  42. package/dist/{gen-BfmcIi2g.mjs → gen-CCx3t2Ju.mjs} +1 -1
  43. package/dist/gen-TgXy93Rr.mjs +1 -0
  44. package/dist/{github-cmd-CY9LUqLh.mjs → github-cmd-BzkRLkbg.mjs} +1 -1
  45. package/dist/{handler-BbkSPzGF.d.mts → handler-CQv5YDS0.d.mts} +1 -1
  46. package/dist/{help-CxSlPpzJ.mjs → help-CKbrhZha.mjs} +16 -1
  47. package/dist/help-qOZr3wng.mjs +1 -0
  48. package/dist/index.d.mts +2 -4
  49. package/dist/index.mjs +317 -122
  50. package/dist/{info-7VDlhtyy.mjs → info-oBm8yK8J.mjs} +2 -2
  51. package/dist/{init-DxYyOs4-.mjs → init-CBp_uMve.mjs} +217 -197
  52. package/dist/{link-Ddmod1dZ.mjs → link-Dt_QXmM4.mjs} +2 -2
  53. package/dist/{list-MogaugiO.mjs → list-DF6asTdt.mjs} +2 -2
  54. package/dist/{live-Bt8Y_0bg.d.mts → live-CXJ9yC98.d.mts} +1 -1
  55. package/dist/{local-d1-BHBnKWRb.mjs → local-d1-CUhH3qtj.mjs} +1 -1
  56. package/dist/{login-Cttnagmm.mjs → login-BjSyhXlT.mjs} +2 -2
  57. package/dist/login-Cdo8Aco1.mjs +1 -0
  58. package/dist/{logs-CAszUWZI.mjs → logs-DmvBl6xA.mjs} +2 -2
  59. package/dist/{migrate-DyT2jJ8y.mjs → migrate-BXRHpYwR.mjs} +1 -1
  60. package/dist/migrate-COPncCGx.mjs +1 -0
  61. package/dist/nitro.mjs +2 -2
  62. package/dist/{node-WB7c2N4L.mjs → node-DtD7ZiPf.mjs} +4 -4
  63. package/dist/{operator-args-UnE8Y2eK.mjs → operator-args-BsJIYXaT.mjs} +8 -1
  64. package/dist/operator-cmd-DDiX7Y3f.mjs +1 -0
  65. package/dist/{operator-cmd-skshjMGl.mjs → operator-cmd-DjZKGGgN.mjs} +4 -3
  66. package/dist/pages/client.d.mts +21 -4
  67. package/dist/pages/client.mjs +174 -35
  68. package/dist/pages/index.d.mts +18 -2
  69. package/dist/pages/index.mjs +2 -52
  70. package/dist/pages/islands-plugin.d.mts +1 -1
  71. package/dist/pages/islands-plugin.mjs +9 -3
  72. package/dist/pages/protocol.d.mts +2 -2
  73. package/dist/platform-args-BC8_hsDj.mjs +1 -0
  74. package/dist/{platform-args-DVbVClZl.mjs → platform-args-BMD2gjc_.mjs} +1 -1
  75. package/dist/{platform-auth-config-C-pm5Qzx.mjs → platform-auth-config-BgnuMbml.mjs} +3 -3
  76. package/dist/{platform-auth-protection-SHhvim1L.mjs → platform-auth-protection-NjRejttU.mjs} +2 -2
  77. package/dist/{platform-auth-recovery-DXVWs-wA.mjs → platform-auth-recovery-Ug12d9W5.mjs} +2 -2
  78. package/dist/{platform-cmd-PiNRkopU.mjs → platform-cmd-BYKLMPCn.mjs} +1 -1
  79. package/dist/{platform-cmd-D5I1beUX.mjs → platform-cmd-HByuZAO7.mjs} +4 -4
  80. package/dist/{platform-domain-jpmBfZeb.mjs → platform-domain-DLSQ8GF8.mjs} +2 -2
  81. package/dist/{platform-lifecycle-DyKmuNY6.mjs → platform-lifecycle-3dwFJmnq.mjs} +102 -40
  82. package/dist/{platform-lifecycle-DH3Yr1qQ.mjs → platform-lifecycle-BRqcxerG.mjs} +1 -1
  83. package/dist/{platform-management-7m-PLaPJ.mjs → platform-management-ZK6XcbCo.mjs} +1 -1
  84. package/dist/{platform-management--vDwSn35.mjs → platform-management-ZZ6bQM5j.mjs} +1 -1
  85. package/dist/{platform-recovery-BiNpZZab.mjs → platform-recovery-8vNE5dNN.mjs} +2 -2
  86. package/dist/{plugin-inference-DUjCd55H.mjs → plugin-inference-CeiB6BG5.mjs} +53 -18
  87. package/dist/{prepare-BcAE5Sdj.mjs → prepare-5BR7Splm.mjs} +1 -1
  88. package/dist/prepare-B3VrSF1Z.mjs +1 -0
  89. package/dist/{prepare-DA-17DhO.mjs → prepare-Dseww74N.mjs} +4 -4
  90. package/dist/{prerender-render-Cijv7UFo.mjs → prerender-render-CaShbHJ3.mjs} +13 -1
  91. package/dist/prerender-render.d.mts +1 -0
  92. package/dist/prerender-render.mjs +1 -1
  93. package/dist/{project-cmd-DA4K5faU.mjs → project-cmd-CjLNNxwe.mjs} +15 -15
  94. package/dist/{project-team-CQBNveX3.mjs → project-team-DE5drjcl.mjs} +1 -1
  95. package/dist/{project-token-CCalFyQf.mjs → project-token-XEYEXfiJ.mjs} +1 -1
  96. package/dist/{project-zero-trust-DPnkiEuT.mjs → project-zero-trust-6VPU8zmV.mjs} +1 -1
  97. package/dist/{protocol-BBDpJz3G.d.mts → protocol-BekmFxCI.d.mts} +2 -2
  98. package/dist/{provision-DtROpNNI.mjs → provision-B7UFrBH7.mjs} +1 -1
  99. package/dist/{provision-BFLCrnUp.mjs → provision-Chq0NRAV.mjs} +1 -1
  100. package/dist/{requests-BpH0kImL.mjs → requests-CG-Pj8ze.mjs} +1 -1
  101. package/dist/{rollback-CXS1tAa-.mjs → rollback-CIrm2txZ.mjs} +2 -2
  102. package/dist/{route-types-BZi26DVS.mjs → route-types--PAOzHlH.mjs} +49 -28
  103. package/dist/routes-stub.d.mts +22 -13
  104. package/dist/runtime/better-auth-mysql.mjs +1 -1
  105. package/dist/runtime/better-auth-pg.mjs +1 -1
  106. package/dist/runtime/better-auth.mjs +1 -1
  107. package/dist/runtime/handler.d.mts +1 -1
  108. package/dist/runtime/live-client.d.mts +1 -1
  109. package/dist/runtime/live.d.mts +1 -1
  110. package/dist/runtime/log.mjs +19 -1
  111. package/dist/runtime/routing.d.mts +2 -2
  112. package/dist/runtime/routing.mjs +4 -3
  113. package/dist/runtime/validator.d.mts +1 -1
  114. package/dist/runtime/ws-server.d.mts +1 -1
  115. package/dist/runtime/ws.d.mts +1 -1
  116. package/dist/{scan-8IzYXiU_.mjs → scan-N9WzdcAl.mjs} +302 -23
  117. package/dist/{secret-BbXHfLAt.mjs → secret-BL6g7mF5.mjs} +3 -3
  118. package/dist/static-asset-marker-Btf-6oCD.mjs +32 -0
  119. package/dist/{types-7AIz0OZu.d.mts → types-w72dljaA.d.mts} +6 -1
  120. package/dist/{version-metadata-tS39iW09.mjs → version-metadata-DmaZNTYW.mjs} +1 -1
  121. package/dist/worker-conditions-AWFRcFxR.mjs +11 -0
  122. package/dist/{wrangler-F96NnLyb.mjs → wrangler-CDiEBCdS.mjs} +2 -1
  123. package/dist/wrangler-DOPr4jyI.mjs +1 -0
  124. package/dist/{wrapper-D3sZyh2C.mjs → wrapper-CEiDeCqD.mjs} +6 -10
  125. package/dist/{ws-BH-im_tX.d.mts → ws-D1zWiB_P.d.mts} +1 -1
  126. package/docs/guide/auth.md +3 -1
  127. package/docs/guide/edge/static-assets.md +10 -0
  128. package/docs/guide/email/domains.md +1 -1
  129. package/docs/guide/email/receiving.md +2 -0
  130. package/docs/guide/email/sending.md +1 -1
  131. package/docs/guide/pages-routing/actions-and-forms.md +19 -13
  132. package/docs/guide/pages-routing/markdown.md +2 -0
  133. package/docs/guide/pages-routing/overview.md +34 -3
  134. package/docs/guide/platform/administration/email.md +18 -0
  135. package/docs/guide/platform/installation/prerequisites.md +9 -4
  136. package/docs/guide/platform/installation/uninstall.md +2 -0
  137. package/docs/guide/queues.md +13 -1
  138. package/docs/guide/quickstart.md +26 -1
  139. package/docs/guide/sandboxes.md +2 -2
  140. package/docs/guide/server-routing.md +38 -2
  141. package/docs/guide/type-safety.md +7 -7
  142. package/docs/guide/websockets.md +4 -2
  143. package/docs/reference/api/pages.md +4 -4
  144. package/docs/reference/cli/email.md +13 -0
  145. package/docs/reference/cli/platform-email.md +2 -2
  146. package/docs/reference/cli.md +2 -1
  147. package/docs/reference/structure.md +3 -1
  148. package/package.json +8 -7
  149. package/sandbox.Dockerfile +1 -1
  150. package/templates/assets/icons.svg +49 -0
  151. package/templates/assets/react.svg +1 -0
  152. package/templates/assets/solid.svg +1 -0
  153. package/templates/assets/stack.svg +35 -0
  154. package/templates/assets/svelte.svg +1 -0
  155. package/templates/assets/void.svg +5 -0
  156. package/templates/assets/vue.svg +1 -0
  157. package/dist/cf-build-output-BJHuSsVN.mjs +0 -1
  158. package/dist/client-BiRDZTSd.mjs +0 -1
  159. package/dist/config-CyUJzi3q.mjs +0 -32
  160. package/dist/deploy-CE0Ev0Ob.mjs +0 -2
  161. package/dist/gen-NrOlWZaG.mjs +0 -1
  162. package/dist/help-BeAFFE5C.mjs +0 -1
  163. package/dist/login-DgDwlKc_.mjs +0 -1
  164. package/dist/migrate-n49ZeS1X.mjs +0 -1
  165. package/dist/operator-cmd-d2MvJOrl.mjs +0 -1
  166. package/dist/parse-filename-DioPHiR9.mjs +0 -77
  167. package/dist/platform-args-kQrgxScY.mjs +0 -1
  168. package/dist/prepare-C4I0f--h.mjs +0 -1
  169. package/dist/wrangler-BLb3_luP.mjs +0 -1
@@ -1,14 +1,14 @@
1
1
  import { c as getToken, f as removeToken } from "./auth-B6iOCjKI.mjs";
2
2
  import { L as log } from "./dist-Cor9XGoz.mjs";
3
- import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
3
+ import { r as PlatformClient } from "./client-BEMtySaV.mjs";
4
4
  import { m as printSuccess } from "./output-BpgYODYx.mjs";
5
- import { n as runLoginCommand } from "./login-Cttnagmm.mjs";
5
+ import { n as runLoginCommand } from "./login-BjSyhXlT.mjs";
6
6
  import { execSync } from "node:child_process";
7
7
  //#region src/cli/account-cmd.ts
8
8
  async function runAccountCommand(root, args) {
9
9
  switch (args.subcommand) {
10
10
  case "login": return runLoginCommand(root);
11
- case "link": return import("./auth-link-C87vGXM-.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
11
+ case "link": return import("./auth-link-BKwHPbdv.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
12
12
  case "logout":
13
13
  if (removeToken(root)) printSuccess("Logged out.");
14
14
  else log.info("Not logged in.");
@@ -1,16 +1,15 @@
1
1
  import { a as join, i as isAbsolute, t as basename } from "./dist-ipQi0Q8y.mjs";
2
- import { c as scanWebSocketRoutesSync, d as readResourceDefinition, f as listConventionFiles, i as inferProjectBindings, m as needsApplicationDatabase, n as FRAMEWORK_SCAN_DIRS, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-DUjCd55H.mjs";
2
+ import { c as scanWebSocketRoutesSync, d as readResourceDefinition, f as listConventionFiles, h as needsApplicationDatabase, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as listRouteFiles, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-CeiB6BG5.mjs";
3
3
  import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
4
- import { t as findVoidAuthConfig } from "./config-CyUJzi3q.mjs";
4
+ import { r as findVoidAuthConfig } from "./config-BTu1o3Dc.mjs";
5
5
  import { l as getDatabaseDialect, m as resolveBindingNames } from "./config-DHgSEWT7.mjs";
6
6
  import { n as globSync } from "./dist-D15hFhP0.mjs";
7
+ import { m as parseRouteFilename, n as scanPages, p as isRouteEnabledForEnvironment } from "./scan-N9WzdcAl.mjs";
7
8
  import { n as isIdentifier, o as moduleExportName } from "./ast-CsZ_q_gc.mjs";
8
9
  import { a as staticLiteral, i as staticExportInitializers, o as unwrapStaticExpression, t as bindingNames } from "./ast-bindings-C3yaPs1y.mjs";
9
10
  import { n as resourceNameWords } from "./resource-name-C7LVpcRm.mjs";
10
11
  import { t as collectMigrations } from "./collect-Dew86qce.mjs";
11
- import { n as parseRouteFilename, t as isRouteEnabledForEnvironment } from "./parse-filename-DioPHiR9.mjs";
12
12
  import { i as scanEmailHandlersSync } from "./email-B9ayYQEG.mjs";
13
- import { t as scanPages } from "./scan-8IzYXiU_.mjs";
14
13
  import { existsSync, readFileSync, readdirSync } from "node:fs";
15
14
  import { fileURLToPath } from "node:url";
16
15
  import { parseSync } from "vite";
@@ -203,7 +202,9 @@ async function scanRoutes(root, options) {
203
202
  const { paths, inventory } = options;
204
203
  const pages = await scanPages(root, {
205
204
  output: options.output,
206
- paths
205
+ paths,
206
+ checkRoutes: options.checkPageRoutes,
207
+ environment: options.environment
207
208
  });
208
209
  const routes = inventory.routes.map((route) => ({
209
210
  ...route,
@@ -219,7 +220,7 @@ function scanMiddlewareSync(root, paths = readProjectPaths(root)) {
219
220
  return parseMiddlewareDefinitions(globSync("**/*.{ts,mts,js,mjs}", { cwd: paths.middlewareDir }));
220
221
  }
221
222
  function scanRoutePatternsSync(root, paths = readProjectPaths(root), environment) {
222
- return listConventionFiles(paths.routesDir).filter((f) => !isWebSocketPatternFile(f)).map((f) => parseRouteFilename(f)).filter((route) => isRouteEnabledForEnvironment(route, environment)).sort(compareRouteSpecificity);
223
+ return listRouteFiles(paths.routesDir).filter((f) => !isWebSocketPatternFile(f)).map((f) => parseRouteFilename(f)).filter((route) => isRouteEnabledForEnvironment(route, environment)).sort(compareRouteSpecificity);
223
224
  }
224
225
  const DEFAULT_SANDBOX_CLASS_NAME = "SandboxV1";
225
226
  const DEFAULT_SANDBOX_CONTAINER_NAME = "void-sandbox-v1";
@@ -318,6 +319,7 @@ function analyzeApplicationSync(root, options) {
318
319
  const inferred = inferProjectBindings(root, {
319
320
  paths,
320
321
  environment,
322
+ filterPages: !framework,
321
323
  bindings: config.inference?.bindings
322
324
  }, scanDirs);
323
325
  const authConfigPath = findVoidAuthConfig(root, paths);
@@ -1,10 +1,12 @@
1
- import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-fEqoSeMp.mjs";
1
+ import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-DYdVoMAY.mjs";
2
2
  //#region src/application-routing.ts
3
3
  /** Complete route/page analysis using the same resource and handler inventories. */
4
4
  async function completeApplicationAnalysis(analysis) {
5
5
  const scan = await scanRoutes(analysis.root, {
6
6
  output: analysis.config.output,
7
7
  paths: analysis.paths,
8
+ checkPageRoutes: !analysis.framework,
9
+ environment: analysis.framework ? void 0 : analysis.environment,
8
10
  inventory: {
9
11
  routes: analysis.routes,
10
12
  middleware: analysis.middleware,
@@ -1,9 +1,9 @@
1
1
  import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-B6iOCjKI.mjs";
2
2
  import { L as log } from "./dist-Cor9XGoz.mjs";
3
- import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
3
+ import { r as PlatformClient } from "./client-BEMtySaV.mjs";
4
4
  import { l as formatUrl } from "./output-BpgYODYx.mjs";
5
- import { r as selectPlatformLoginMethod } from "./login-Cttnagmm.mjs";
6
- import { t as discoverPlatform } from "./platform-cmd-D5I1beUX.mjs";
5
+ import { r as selectPlatformLoginMethod } from "./login-BjSyhXlT.mjs";
6
+ import { t as discoverPlatform } from "./platform-cmd-HByuZAO7.mjs";
7
7
  //#region src/cli/auth-link.ts
8
8
  async function runAuthLink(root, connectionId) {
9
9
  const token = getToken(root);
@@ -39,11 +39,11 @@ async function chooseDestination(root, args, interactive) {
39
39
  async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
40
40
  const destination = await chooseDestination(root, args, interactive);
41
41
  if (destination.platform === "cloudflare") {
42
- const { runCloudflareCommand } = await import("./cloudflare-cmd-DMzCv12s.mjs");
42
+ const { runCloudflareCommand } = await import("./cloudflare-cmd-BaqIigwI.mjs");
43
43
  await runCloudflareCommand(root, { subcommand: args.subcommand });
44
44
  return;
45
45
  }
46
- const { runAccountCommand } = await import("./account-cmd-CdUll_35.mjs");
46
+ const { runAccountCommand } = await import("./account-cmd-B4i71m7k.mjs");
47
47
  const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
48
48
  if (!destination.apiUrl) {
49
49
  await runAccountCommand(root, { subcommand });
@@ -1,4 +1,5 @@
1
1
  import { i as getVoidAuthProviderSettingEnvNames, o as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-BUHwJlmM.mjs";
2
+ import { t as isUnchangedStaticAsset } from "./static-asset-marker-Btf-6oCD.mjs";
2
3
  import { t as authContext } from "./auth-3sGB0zJ1.mjs";
3
4
  import { randomBytes, scrypt, timingSafeEqual } from "node:crypto";
4
5
  import { betterAuth } from "better-auth";
@@ -104,8 +105,15 @@ function resolveSocialProviders(env, configuredProviders) {
104
105
  }
105
106
  return Object.keys(providers).length > 0 ? providers : void 0;
106
107
  }
107
- function appendAuthHeaders(c, source, includeCachePolicy) {
108
+ function appendAuthHeaders(c, source, includeCachePolicy, staticAsset) {
108
109
  if (!source) return;
110
+ if (staticAsset) {
111
+ source.forEach((value, key) => {
112
+ if (!["cache-control", "pragma"].includes(key.toLowerCase())) c.header(key, value, { append: key.toLowerCase() === "set-cookie" });
113
+ });
114
+ if (includeCachePolicy) c.header("Cache-Control", source.has("set-cookie") ? "private, no-store" : privateCachePolicy(c.res.headers.get("cache-control")));
115
+ return;
116
+ }
109
117
  const routeDirectives = bareCacheDirectives(c.res.headers.get("cache-control"));
110
118
  const keepRoutePolicy = routeDirectives.has("no-store") || routeDirectives.has("private") && routeDirectives.has("no-cache");
111
119
  source.forEach((value, key) => {
@@ -123,6 +131,44 @@ function bareCacheDirectives(policy) {
123
131
  const directives = (policy ?? "").match(/(?:[^",]|"(?:[^"\\]|\\.)*"?)+/g) ?? [];
124
132
  return new Set(directives.map((directive) => directive.trim().toLowerCase()).filter((directive) => !directive.includes("=")));
125
133
  }
134
+ /**
135
+ * The same policy for one browser only: `public`, `proxy-revalidate`,
136
+ * `s-maxage` and a field-scoped `private` give way to a leading `private`.
137
+ * A policy that is already private or no-store stays as it is.
138
+ */
139
+ function privateCachePolicy(policy) {
140
+ const directives = splitCacheDirectives(policy ?? "");
141
+ if (directives.length === 0) return "private, no-store";
142
+ const lowered = directives.map((directive) => directive.toLowerCase());
143
+ if (lowered.includes("private") || lowered.includes("no-store")) return policy;
144
+ return ["private", ...directives.filter((_directive, index) => {
145
+ const directive = lowered[index];
146
+ const equals = directive.indexOf("=");
147
+ const name = (equals === -1 ? directive : directive.slice(0, equals)).trim();
148
+ return ![
149
+ "public",
150
+ "proxy-revalidate",
151
+ "s-maxage",
152
+ "private"
153
+ ].includes(name);
154
+ })].join(", ");
155
+ }
156
+ function splitCacheDirectives(policy) {
157
+ const directives = [];
158
+ let start = 0;
159
+ let quoted = false;
160
+ for (let index = 0; index < policy.length; index++) {
161
+ const char = policy[index];
162
+ if (quoted && char === "\\") index++;
163
+ else if (char === "\"") quoted = !quoted;
164
+ else if (char === "," && !quoted) {
165
+ directives.push(policy.slice(start, index));
166
+ start = index + 1;
167
+ }
168
+ }
169
+ directives.push(policy.slice(start));
170
+ return directives.map((directive) => directive.trim()).filter(Boolean);
171
+ }
126
172
  function resolveUserConfig(userConfig, defaults, request, env, dialect) {
127
173
  const mergeEmailAndPasswordDefaults = (options) => {
128
174
  if (!defaults.emailAndPassword?.password || !options.emailAndPassword) return options;
@@ -282,7 +328,7 @@ function createVoidAuthRuntime(dialect, applyMigrations) {
282
328
  "authorization",
283
329
  "cf-access-jwt-assertion"
284
330
  ].some((header) => c.req.raw.headers.has(header));
285
- appendAuthHeaders(c, result.headers, state !== null || credentialed || result.headers?.has("set-cookie") === true);
331
+ appendAuthHeaders(c, result.headers, state !== null || credentialed || result.headers?.has("set-cookie") === true, isUnchangedStaticAsset(c));
286
332
  }
287
333
  async function handleVoidAuthRequest(c, runtime, database) {
288
334
  const existingAuth = c.get("__voidAuth");
@@ -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 { n as PlatformApiError, r as PlatformClient } from "./client-BEkdj1kx.mjs";
4
+ import { n as PlatformApiError, r as PlatformClient } from "./client-BEMtySaV.mjs";
5
5
  import { f as import_picocolors, i as dim, m as printSuccess } from "./output-BpgYODYx.mjs";
6
6
  import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
7
7
  import { appendFileSync, writeFileSync } from "node:fs";
@@ -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 { L as log } from "./dist-Cor9XGoz.mjs";
4
- import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
4
+ import { r as PlatformClient } from "./client-BEMtySaV.mjs";
5
5
  import { m as printSuccess, o as formatCount, r as createSpinner } from "./output-BpgYODYx.mjs";
6
6
  import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
7
7
  //#region src/cli/cache.ts
@@ -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 { A as confirm, H as outro, L as log, tt as isCancel } from "./dist-Cor9XGoz.mjs";
4
- import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
4
+ import { r as PlatformClient } from "./client-BEMtySaV.mjs";
5
5
  import { m as printSuccess } from "./output-BpgYODYx.mjs";
6
6
  //#region src/cli/cancel-deploy.ts
7
7
  const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
@@ -1,9 +1,10 @@
1
1
  import { a as join, c as resolve, i as isAbsolute, n as dirname, r as extname, s as relative, t as basename } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-DeWj5F9Y.mjs";
3
+ import { t as WORKER_CONDITIONS } from "./worker-conditions-AWFRcFxR.mjs";
3
4
  import { copyFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
4
5
  import { fileURLToPath } from "node:url";
5
6
  import { isRecord } from "@void/deploy-core";
6
- import { randomUUID } from "node:crypto";
7
+ import { randomBytes, randomUUID } from "node:crypto";
7
8
  import { tmpdir } from "node:os";
8
9
  import { isDeepStrictEqual } from "node:util";
9
10
  import { spawn, spawnSync } from "node:child_process";
@@ -529,6 +530,104 @@ async function prepareNativeBuildOutput(source, accountId, mode) {
529
530
  throw error;
530
531
  }
531
532
  }
533
+ const ADDITIONAL_MODULE_FILTER = /\.(?:wasm(?:\?module)?|bin|txt|html|sql)$/;
534
+ const ADDITIONAL_MODULE_EXTENSIONS = /* @__PURE__ */ new Set([
535
+ ".wasm",
536
+ ".bin",
537
+ ".txt",
538
+ ".html",
539
+ ".sql"
540
+ ]);
541
+ /** Keep letters, digits, `.`, `_` and `-`: the name ends up inside a JS import string. */
542
+ function safeFileStem(stem) {
543
+ let safe = "";
544
+ for (const char of stem) {
545
+ const code = char.charCodeAt(0);
546
+ safe += code >= 48 && code <= 57 || code >= 65 && code <= 90 || code >= 97 && code <= 122 || char === "." || char === "_" || char === "-" ? char : "_";
547
+ }
548
+ return safe || "module";
549
+ }
550
+ /** The file behind a resolved id that is uploaded as a Worker module, if it is one. */
551
+ function additionalModulePath(id) {
552
+ const query = id.indexOf("?");
553
+ const path = query === -1 ? id : id.slice(0, query);
554
+ if (query !== -1 && !(id.slice(query) === "?module" && path.endsWith(".wasm"))) return;
555
+ return ADDITIONAL_MODULE_EXTENSIONS.has(extname(path)) ? path : void 0;
556
+ }
557
+ /**
558
+ * Keep Wasm, data and text imports out of the bundle and emit each file beside it, as
559
+ * `@cloudflare/vite-plugin` does, so `copyBundle` uploads them as Worker modules.
560
+ */
561
+ function additionalModulesPlugin() {
562
+ const marker = `__VOID_MODULE_${randomBytes(8).toString("hex")}__`;
563
+ const paths = [];
564
+ const keys = /* @__PURE__ */ new Map();
565
+ const fileNames = /* @__PURE__ */ new Map();
566
+ const usedFileNames = /* @__PURE__ */ new Set();
567
+ return {
568
+ name: "void:additional-modules",
569
+ enforce: "pre",
570
+ resolveId: {
571
+ filter: { id: [ADDITIONAL_MODULE_FILTER, /^#/] },
572
+ async handler(source, importer, options) {
573
+ const resolved = await this.resolve(source, importer, options);
574
+ const path = resolved ? additionalModulePath(resolved.id) : void 0;
575
+ if (!path) return resolved;
576
+ let key = keys.get(path);
577
+ if (key === void 0) {
578
+ key = paths.push(path) - 1;
579
+ keys.set(path, key);
580
+ }
581
+ return {
582
+ id: `${marker}${key}${marker}`,
583
+ external: true
584
+ };
585
+ }
586
+ },
587
+ renderChunk: {
588
+ filter: { code: marker },
589
+ handler(code, chunk) {
590
+ const emit = (path) => {
591
+ let fileName = fileNames.get(path);
592
+ if (fileName === void 0) {
593
+ const extension = extname(path);
594
+ const stem = safeFileStem(basename(path, extension));
595
+ fileName = stem + extension;
596
+ for (let count = 2; usedFileNames.has(fileName); count++) fileName = `${stem}${count}${extension}`;
597
+ usedFileNames.add(fileName);
598
+ fileNames.set(path, fileName);
599
+ this.emitFile({
600
+ type: "asset",
601
+ fileName,
602
+ originalFileName: path,
603
+ source: readFileSync(path)
604
+ });
605
+ }
606
+ return fileName;
607
+ };
608
+ let output = "";
609
+ let cursor = 0;
610
+ let start = code.indexOf(marker);
611
+ while (start !== -1) {
612
+ const keyStart = start + marker.length;
613
+ const end = code.indexOf(marker, keyStart);
614
+ if (end === -1) break;
615
+ const keyText = code.slice(keyStart, end);
616
+ const path = keyText === String(Number(keyText)) ? paths[Number(keyText)] : void 0;
617
+ if (path === void 0) {
618
+ start = code.indexOf(marker, keyStart);
619
+ continue;
620
+ }
621
+ const importPath = relative(dirname(chunk.fileName), emit(path));
622
+ output += code.slice(cursor, start) + (importPath.startsWith(".") ? importPath : `./${importPath}`);
623
+ cursor = end + marker.length;
624
+ start = code.indexOf(marker, cursor);
625
+ }
626
+ return output + code.slice(cursor);
627
+ }
628
+ }
629
+ };
630
+ }
532
631
  /** Bundle a generated Worker entry with Vite, then hand the result to `prepareCfBuildOutput`. */
533
632
  async function prepareBundledBuildOutput(options) {
534
633
  const scratch = mkdtempSync(join(tmpdir(), options.scratchPrefix));
@@ -539,6 +638,8 @@ async function prepareBundledBuildOutput(options) {
539
638
  root: options.projectRoot,
540
639
  publicDir: false,
541
640
  logLevel: "error",
641
+ plugins: [additionalModulesPlugin()],
642
+ resolve: { conditions: [...WORKER_CONDITIONS, "production"] },
542
643
  build: {
543
644
  outDir: scratch,
544
645
  emptyOutDir: true,
@@ -0,0 +1 @@
1
+ export { t as prepareCfBuildOutput } from "./cf-build-output-Bapzc_8Z.mjs";
package/dist/cli/cli.mjs CHANGED
@@ -4,10 +4,10 @@ import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-Q-k0
4
4
  import { n as getOwnVersion } from "../agents-CuNtT0D_.mjs";
5
5
  import { f as import_picocolors, l as formatUrl } from "../output-BpgYODYx.mjs";
6
6
  import { n as isD1Bookmark } from "../cf-command-values-ByHk0xg4.mjs";
7
- import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-CxSlPpzJ.mjs";
7
+ import { i as printVoidHeader, n as printGlobalHelp, r as printHelpPage, t as getHelpPath } from "../help-CKbrhZha.mjs";
8
8
  import { r as OperatorClientError } from "../operator-client-C-ROjk1I.mjs";
9
- import { n as operatorGroups } from "../operator-args-UnE8Y2eK.mjs";
10
- import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-DVbVClZl.mjs";
9
+ import { n as operatorGroups } from "../operator-args-BsJIYXaT.mjs";
10
+ import { n as platformSubcommands, t as parsePlatformArgs } from "../platform-args-BMD2gjc_.mjs";
11
11
  import { parseArgs } from "node:util";
12
12
  //#region src/cli/account-args.ts
13
13
  const accountSubcommands = [
@@ -627,6 +627,11 @@ const emailSubcommands = [
627
627
  arg: "<address>",
628
628
  description: "Remove a verified recipient"
629
629
  },
630
+ {
631
+ name: "alias",
632
+ arg: "[name]",
633
+ description: "Show the shared mail address, or set a shorter permanent name for it"
634
+ },
630
635
  {
631
636
  name: "domain",
632
637
  arg: "<add|status|list|sync|rotate-secret|remove>",
@@ -649,6 +654,7 @@ const EMAIL_SUBCOMMANDS = [
649
654
  "destinations",
650
655
  "allow",
651
656
  "disallow",
657
+ "alias",
652
658
  "domain",
653
659
  "status",
654
660
  "setup"
@@ -685,11 +691,12 @@ function readFlagValue(rest, i, flag) {
685
691
  }
686
692
  function parseEmailArgs(args) {
687
693
  const subcommand = args[0];
688
- if (!subcommand || !EMAIL_SUBCOMMANDS.includes(subcommand)) throw new Error("email: Usage: void email <usage|logs|destinations|allow|disallow|domain|status|setup> [args] [--project <name>] [--limit <n>] [--platform cloudflare].");
694
+ if (!subcommand || !EMAIL_SUBCOMMANDS.includes(subcommand)) throw new Error("email: Usage: void email <usage|logs|destinations|allow|disallow|alias|domain|status|setup> [args] [--project <name>] [--limit <n>] [--platform cloudflare].");
689
695
  let limit;
690
696
  const projectValues = [];
691
697
  const platformValues = [];
692
698
  const positional = [];
699
+ let yes = false;
693
700
  const rest = args.slice(1);
694
701
  for (let i = 0; i < rest.length; i++) if (rest[i] === "--project" || rest[i]?.startsWith("--project=")) {
695
702
  const { value, next } = readFlagValue(rest, i, "--project");
@@ -708,7 +715,8 @@ function parseEmailArgs(args) {
708
715
  if (value === void 0) throw new Error("email: --platform requires a value ('cloudflare' or 'void').");
709
716
  platformValues.push(value);
710
717
  i = next;
711
- } else if (rest[i] === "--backend" || rest[i]?.startsWith("--backend=")) throw new Error("email: Unknown option '--backend'.");
718
+ } else if (rest[i] === "--yes" && subcommand === "alias") yes = true;
719
+ else if (rest[i] === "--backend" || rest[i]?.startsWith("--backend=")) throw new Error("email: Unknown option '--backend'.");
712
720
  else if (rest[i] === "--subdomain" || rest[i]?.startsWith("--subdomain=")) throw new Error("email: Unknown option '--subdomain'.");
713
721
  else positional.push(rest[i]);
714
722
  if (projectValues.length > 1) throw new Error("email: --project can only be specified once.");
@@ -741,7 +749,8 @@ function parseEmailArgs(args) {
741
749
  projectSlug,
742
750
  limit,
743
751
  address,
744
- platform
752
+ platform,
753
+ ...yes ? { yes } : {}
745
754
  };
746
755
  }
747
756
  /**
@@ -1632,19 +1641,19 @@ const args = process.argv.slice(2);
1632
1641
  const command = args[0];
1633
1642
  const helpPath = getHelpPath(args);
1634
1643
  const subcommandGroups = {
1635
- auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-6I81r-ix.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
1636
- account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-CdUll_35.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
1637
- platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-PiNRkopU.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
1638
- cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-DMzCv12s.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
1639
- project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-DA4K5faU.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
1640
- secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BbXHfLAt.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
1641
- domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CA2wBgra.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
1642
- email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-DXpCc77w.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
1643
- db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-DVOkLH5X.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
1644
- env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-DgOQ9_8S.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
1645
- gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-NrOlWZaG.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
1646
- github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-CY9LUqLh.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
1647
- build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-ex1g-j_e.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
1644
+ auth: () => runSubcommandGroup("auth", authSubcommands, parseAuthArgs, (root, parsed) => import("../auth-router-DqLx8E0F.mjs").then(({ runAuthRouter }) => runAuthRouter(root, parsed))),
1645
+ account: () => runSubcommandGroup("account", accountSubcommands, parseAccountArgs, (root, parsed) => import("../account-cmd-B4i71m7k.mjs").then(({ runAccountCommand }) => runAccountCommand(root, parsed))),
1646
+ platform: () => runSubcommandGroup("platform", platformSubcommands, parsePlatformArgs, (root, parsed) => import("../platform-cmd-BYKLMPCn.mjs").then(({ runPlatformCommand }) => runPlatformCommand(root, parsed))),
1647
+ cloudflare: () => runSubcommandGroup("cloudflare", cloudflareSubcommands, parseCloudflareArgs, (root, parsed) => import("../cloudflare-cmd-BaqIigwI.mjs").then(({ runCloudflareCommand }) => runCloudflareCommand(root, parsed))),
1648
+ project: () => runSubcommandGroup("project", projectSubcommands, parseProjectArgs, (root, parsed) => import("../project-cmd-CjLNNxwe.mjs").then(({ runProjectCommand }) => runProjectCommand(root, parsed))),
1649
+ secret: () => runSubcommandGroup("secret", secretSubcommands, parseSecretArgs, (root, parsed) => import("../secret-BL6g7mF5.mjs").then(({ runSecretCommand }) => runSecretCommand(root, parsed))),
1650
+ domain: () => runSubcommandGroup("domain", domainSubcommands, parseDomainArgs, (root, parsed) => import("../domain-CH5iBD9Y.mjs").then(({ runDomainCommand }) => runDomainCommand(root, parsed))),
1651
+ email: () => runSubcommandGroup("email", emailSubcommands, parseEmailArgs, (root, parsed) => import("../email-CbTO1l78.mjs").then(({ runEmailCommand }) => runEmailCommand(root, parsed))),
1652
+ db: () => runSubcommandGroup("db", dbSubcommands, parseDbArgs, (root, parsed) => import("../db-rvo64snS.mjs").then(({ runDbCommand }) => runDbCommand(root, parsed))),
1653
+ env: () => runSubcommandGroup("env", envSubcommands, parseEnvArgs, (root, parsed) => import("../env-BBdw236G.mjs").then(({ runEnvCommand }) => runEnvCommand(root, parsed))),
1654
+ gen: () => runSubcommandGroup("gen", genSubcommands, parseGenArgs, (root, parsed) => import("../gen-TgXy93Rr.mjs").then(({ runGenCommand }) => runGenCommand(root, parsed))),
1655
+ github: () => runSubcommandGroup("github", githubSubcommands, parseGithubArgs, (root, parsed) => import("../github-cmd-BzkRLkbg.mjs").then(({ runGithubCommand }) => runGithubCommand(root, parsed))),
1656
+ build: () => runSubcommandGroup("build", buildSubcommands, parseBuildArgs, (root, parsed) => import("../build-cmd-Dy4psnt1.mjs").then(({ runBuildCommand }) => runBuildCommand(root, parsed)))
1648
1657
  };
1649
1658
  if (helpPath) {
1650
1659
  if (helpPath.length === 0) printGlobalHelp();
@@ -1663,7 +1672,7 @@ if (helpPath) {
1663
1672
  log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
1664
1673
  process.exit(1);
1665
1674
  }
1666
- import("../deploy-CE0Ev0Ob.mjs").then(({ runDeploy }) => {
1675
+ import("../deploy-CtHE2A3R.mjs").then(({ runDeploy }) => {
1667
1676
  runDeploy(root, deployArgs).catch((err) => {
1668
1677
  log.error(formatCloudflareUserMessage(err.message ?? String(err)));
1669
1678
  process.exit(1);
@@ -1671,14 +1680,14 @@ if (helpPath) {
1671
1680
  });
1672
1681
  } else if (command === "connect") (async () => {
1673
1682
  const parsed = parseConnectArgs(args.slice(1));
1674
- const { runConnectCommand } = await import("../connect-k7R2rPVA.mjs");
1683
+ const { runConnectCommand } = await import("../connect-DwVsBvVh.mjs");
1675
1684
  await runConnectCommand(process.cwd(), parsed);
1676
1685
  })().catch((err) => {
1677
1686
  log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
1678
1687
  process.exit(1);
1679
1688
  });
1680
1689
  else if (command && Object.hasOwn(subcommandGroups, command)) subcommandGroups[command]();
1681
- else if (command === "info") import("../info-7VDlhtyy.mjs").then(async ({ runInfoCommand }) => {
1690
+ else if (command === "info") import("../info-oBm8yK8J.mjs").then(async ({ runInfoCommand }) => {
1682
1691
  try {
1683
1692
  await runInfoCommand(process.cwd(), parseInfoArgs(args.slice(1)));
1684
1693
  } catch (err) {
@@ -1699,7 +1708,7 @@ else if (command === "prepare") {
1699
1708
  log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
1700
1709
  process.exit(1);
1701
1710
  }
1702
- import("../prepare-BcAE5Sdj.mjs").then(({ runPrepareCommand }) => {
1711
+ import("../prepare-5BR7Splm.mjs").then(({ runPrepareCommand }) => {
1703
1712
  runPrepareCommand(root).catch((err) => {
1704
1713
  log.error(formatCloudflareUserMessage(err.message ?? String(err)));
1705
1714
  process.exit(1);
@@ -1707,7 +1716,7 @@ else if (command === "prepare") {
1707
1716
  });
1708
1717
  } else if (command === "init") {
1709
1718
  const root = process.cwd();
1710
- import("../init-DxYyOs4-.mjs").then(({ runInitCommand, parseInitArgs }) => {
1719
+ import("../init-CBp_uMve.mjs").then(({ runInitCommand, parseInitArgs }) => {
1711
1720
  let initArgs;
1712
1721
  try {
1713
1722
  initArgs = parseInitArgs(args.slice(1));
@@ -1725,7 +1734,7 @@ else if (command === "prepare") {
1725
1734
  log.error("migrate: This command takes no arguments.");
1726
1735
  process.exit(1);
1727
1736
  }
1728
- import("../migrate-n49ZeS1X.mjs").then(({ runMigrateCommand }) => {
1737
+ import("../migrate-COPncCGx.mjs").then(({ runMigrateCommand }) => {
1729
1738
  runMigrateCommand(process.cwd()).catch((err) => {
1730
1739
  log.error(formatCloudflareUserMessage(err instanceof Error ? err.message : String(err)));
1731
1740
  process.exit(1);
@@ -1800,7 +1809,7 @@ else if (command) {
1800
1809
  },
1801
1810
  {
1802
1811
  name: "email",
1803
- hint: "usage | logs | destinations | allow | disallow | domain | status | setup",
1812
+ hint: "usage | logs | destinations | allow | disallow | alias | domain | status | setup",
1804
1813
  description: "Inspect email activity and manage verified recipients"
1805
1814
  },
1806
1815
  {
@@ -1847,32 +1856,32 @@ else if (command) {
1847
1856
  if (Object.hasOwn(subcommandGroups, cmd)) return subcommandGroups[cmd]();
1848
1857
  switch (cmd) {
1849
1858
  case "connect": {
1850
- const { runConnectCommand } = await import("../connect-k7R2rPVA.mjs");
1859
+ const { runConnectCommand } = await import("../connect-DwVsBvVh.mjs");
1851
1860
  await runConnectCommand(root, parseConnectArgs([]));
1852
1861
  return;
1853
1862
  }
1854
1863
  case "init": {
1855
- const { runInitCommand, parseInitArgs } = await import("../init-DxYyOs4-.mjs");
1864
+ const { runInitCommand, parseInitArgs } = await import("../init-CBp_uMve.mjs");
1856
1865
  await runInitCommand(root, parseInitArgs([]));
1857
1866
  return;
1858
1867
  }
1859
1868
  case "migrate": {
1860
- const { runMigrateCommand } = await import("../migrate-n49ZeS1X.mjs");
1869
+ const { runMigrateCommand } = await import("../migrate-COPncCGx.mjs");
1861
1870
  await runMigrateCommand(root);
1862
1871
  return;
1863
1872
  }
1864
1873
  case "deploy": {
1865
- const { runDeploy } = await import("../deploy-CE0Ev0Ob.mjs");
1874
+ const { runDeploy } = await import("../deploy-CtHE2A3R.mjs");
1866
1875
  await runDeploy(root);
1867
1876
  return;
1868
1877
  }
1869
1878
  case "info": {
1870
- const { runInfoCommand } = await import("../info-7VDlhtyy.mjs");
1879
+ const { runInfoCommand } = await import("../info-oBm8yK8J.mjs");
1871
1880
  await runInfoCommand(root, parseInfoArgs([]));
1872
1881
  return;
1873
1882
  }
1874
1883
  case "prepare": {
1875
- const { runPrepareCommand } = await import("../prepare-BcAE5Sdj.mjs");
1884
+ const { runPrepareCommand } = await import("../prepare-5BR7Splm.mjs");
1876
1885
  await runPrepareCommand(root);
1877
1886
  return;
1878
1887
  }
@@ -254,7 +254,7 @@ async function withBuildOutput(raw, sourceMain, action) {
254
254
  }), { mode: 384 });
255
255
  const accountId = process.env.CLOUDFLARE_ACCOUNT_ID ?? raw.account_id;
256
256
  if (typeof accountId !== "string" || !accountId) throw new Error("Cloudflare account is not pinned for Worker deployment.");
257
- const { prepareCfBuildOutput } = await import("../cf-build-output-BJHuSsVN.mjs");
257
+ const { prepareCfBuildOutput } = await import("../cf-build-output-DlBkWdNU.mjs");
258
258
  const output = await prepareCfBuildOutput(scratch, accountId);
259
259
  if (!output) throw new Error("Could not prepare the Cloudflare Worker build output.");
260
260
  try {
@@ -530,6 +530,25 @@ function listAllResourcePages(command, extraFlags = []) {
530
530
  }
531
531
  throw new Error(`Cloudflare ${command.join(" ")} exceeded the supported page limit.`);
532
532
  }
533
+ /**
534
+ * Each consumer's Worker script name, or null for one that is not a Worker (HTTP pull).
535
+ * Undefined when the list is incomplete or unreadable; only queue naming needs it.
536
+ */
537
+ function queueConsumerWorkers(queue) {
538
+ const consumers = queue.consumers;
539
+ if (!Array.isArray(consumers) || queue.consumers_total_count !== void 0 && queue.consumers_total_count !== consumers.length) return;
540
+ const workers = [];
541
+ for (const entry of consumers) {
542
+ const consumer = object(entry);
543
+ const { script_name: scriptName, script } = consumer;
544
+ if (scriptName !== void 0 && (typeof scriptName !== "string" || !scriptName) || script !== void 0 && (typeof script !== "string" || !script) || scriptName !== void 0 && script !== void 0 && scriptName !== script) return;
545
+ const name = scriptName ?? script;
546
+ if (typeof name === "string" && (consumer.type === void 0 || consumer.type === "worker")) workers.push(name);
547
+ else if (name === void 0 && consumer.type === "http_pull") workers.push(null);
548
+ else return;
549
+ }
550
+ return workers;
551
+ }
533
552
  async function readAllQueues() {
534
553
  const queues = [];
535
554
  const seen = /* @__PURE__ */ new Set();
@@ -554,8 +573,7 @@ async function resources() {
554
573
  "d1",
555
574
  "query",
556
575
  d1Database(operation.database).id,
557
- "--sql",
558
- operation.sql
576
+ `--sql=${operation.sql}`
559
577
  ]);
560
578
  case "d1.migrations.list":
561
579
  case "d1.migrations.apply": {
@@ -718,9 +736,11 @@ async function resources() {
718
736
  ]);
719
737
  case "queues.info": {
720
738
  const queue = (await readAllQueues()).find((item) => item.queue_name === operation.name);
739
+ const consumers = queue && queueConsumerWorkers(queue);
721
740
  return queue ? result(0, "", "", {
722
741
  id: queue.queue_id,
723
- name: queue.queue_name
742
+ name: queue.queue_name,
743
+ ...consumers ? { consumers } : {}
724
744
  }) : {
725
745
  ...result(1, "", "Cloudflare Queue does not exist."),
726
746
  failure: "not-found"
@@ -944,7 +964,8 @@ async function workerHistory() {
944
964
  strategy: "percentage",
945
965
  versions,
946
966
  ...operation.message ? { annotations: { "workers/message": operation.message } } : {}
947
- })
967
+ }),
968
+ ...operation.bypassDeploymentChecks ? ["--bypass-deployment-checks"] : []
948
969
  ]);
949
970
  }
950
971
  default: throw new Error("Unsupported Cloudflare Worker history operation.");
@@ -1023,7 +1044,7 @@ async function workerChanges() {
1023
1044
  "create"
1024
1045
  ],
1025
1046
  "--prebuilt",
1026
- ...request.message ? ["--message", request.message] : [],
1047
+ ...request.message ? [`--message=${request.message}`] : [],
1027
1048
  ...request.secretsFilePath ? ["--secrets-file", request.secretsFilePath] : []
1028
1049
  ], directory, void 0, request.interactive === true));
1029
1050
  if (called.status !== 0 || request.interactive === true) return called;
@@ -109,7 +109,7 @@ function emitResult(result) {
109
109
  writeSync(RESULT_FD, JSON.stringify(result));
110
110
  }
111
111
  async function runFactsChild(root) {
112
- const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-BmsdCZEk.mjs");
112
+ const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-BfBVvBNe.mjs");
113
113
  try {
114
114
  emitResult({
115
115
  kind: "ok",
@@ -128,7 +128,7 @@ async function runFactsChild(root) {
128
128
  }
129
129
  /** The parent already found the emitted config, so a read failure here fails closed. */
130
130
  async function runValidateEmittedChild(root) {
131
- const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-BmsdCZEk.mjs");
131
+ const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-BfBVvBNe.mjs");
132
132
  const emitted = readEmittedWorkerVars(root);
133
133
  if (!emitted.ok) {
134
134
  emitResult({