void 1.8.0 → 1.9.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 (222) hide show
  1. package/dist/{account-cmd-CZKntRH2.mjs → account-cmd-BEMOdwtl.mjs} +3 -3
  2. package/dist/{application-analysis-CyTagJQM.mjs → application-analysis-3VVsflWZ.mjs} +5 -5
  3. package/dist/{application-routing-BLrMVpqi.mjs → application-routing-CJRlXCc2.mjs} +1 -1
  4. package/dist/{auth-Bk9VGtQW.d.mts → auth-CV9kXHKe.d.mts} +3 -1
  5. package/dist/{auth-DyWp-fSo.mjs → auth-aMuFOZeI.mjs} +8 -2
  6. package/dist/{auth-link-BOaQWMKw.mjs → auth-link-B1IynRW5.mjs} +3 -3
  7. package/dist/{auth-router-D0-VcmDs.mjs → auth-router-DVaWJdRB.mjs} +2 -2
  8. package/dist/{better-auth-shared-CdVyCUou.mjs → better-auth-shared-C7LHvF4L.mjs} +1 -1
  9. package/dist/{better-auth-shared-CQFdtguU.d.mts → better-auth-shared-ajs3LNrY.d.mts} +1 -1
  10. package/dist/{build-cmd-JTsXXf2F.mjs → build-cmd-Dq8tdqQG.mjs} +1 -1
  11. package/dist/{cache-D0m3Z_Xf.mjs → cache-DGMnskX7.mjs} +1 -1
  12. package/dist/{cancel-deploy-Ce6Os4fa.mjs → cancel-deploy-96S5hD1E.mjs} +1 -1
  13. package/dist/cli/cli.mjs +1 -1
  14. package/dist/cli/env-schema-probe.mjs +3 -3
  15. package/dist/{cli-main-rkrJy2Ge.mjs → cli-main-CQRLxZAu.mjs} +28 -28
  16. package/dist/client-66c0RLDM.mjs +1 -0
  17. package/dist/{client-SZPyj4X_.mjs → client-D6w5x7hM.mjs} +7 -7
  18. package/dist/{cloudflare-auth-7jTqy9Bx.mjs → cloudflare-auth-pNvmT6kL.mjs} +1 -1
  19. package/dist/{cloudflare-cmd-ChPLQcTP.mjs → cloudflare-cmd-BuuHUM4z.mjs} +3 -3
  20. package/dist/{cloudflare-config-DtOGAbeB.mjs → cloudflare-config-PxbinLLE.mjs} +2 -2
  21. package/dist/{cloudflare-connect-Co93VYTo.mjs → cloudflare-connect-D1QOosLd.mjs} +2 -2
  22. package/dist/{cloudflare-operations-CXaDKYj2.mjs → cloudflare-operations-G5AObYzF.mjs} +5 -5
  23. package/dist/{cloudflare-operations-DATekLwI.mjs → cloudflare-operations-I4t3mt4R.mjs} +1 -1
  24. package/dist/{cloudflare-process-DmTxZR-N.mjs → cloudflare-process-wcnaQ5JG.mjs} +2 -2
  25. package/dist/{config-wo2EaH0X.mjs → config-C1DPf8EK.mjs} +1 -1
  26. package/dist/{config-CTlUaXWZ.d.mts → config-CCWVY7DY.d.mts} +1 -1
  27. package/dist/{config-5oSQhZNj.mjs → config-CzFdJYNA.mjs} +1 -1
  28. package/dist/{config-DcqUBGCb.mjs → config-DlWQ_hIJ.mjs} +3 -3
  29. package/dist/{config-eeDzKBS9.mjs → config-Do7gJI3T.mjs} +2 -2
  30. package/dist/config-entry.d.mts +1 -1
  31. package/dist/{connect-DlvXt1JR.mjs → connect-4uImOwut.mjs} +4 -4
  32. package/dist/{create-project-CC_7hmYJ.mjs → create-project-BaUzZnLZ.mjs} +1 -1
  33. package/dist/{create-project-DzY05xqC.mjs → create-project-CQMyzTvK.mjs} +1 -1
  34. package/dist/{db-FhyYGcJJ.mjs → db-DEpDeDsi.mjs} +19 -19
  35. package/dist/{db-types-sVwEpyPR.mjs → db-types-BpPYAx0B.mjs} +1 -1
  36. package/dist/{delete-CModjyOC.mjs → delete-BVD2kI82.mjs} +1 -1
  37. package/dist/deploy-Dr_Qamzw.mjs +2 -0
  38. package/dist/{deploy-Cz9TEzZy.mjs → deploy-Dyeo5soA.mjs} +24 -75
  39. package/dist/{deploy-managed-static-DlxxXkAM.mjs → deploy-managed-static-Kn73R83A.mjs} +20 -20
  40. package/dist/{deploy-transport-DUvm6-CR.mjs → deploy-transport-BpKBs_KR.mjs} +2 -2
  41. package/dist/deploy.mjs +6 -6
  42. package/dist/discover-Diq0l6TZ.mjs +1 -0
  43. package/dist/{discover-CVFCWU7W.mjs → discover-Vd18lHsj.mjs} +1 -1
  44. package/dist/{dispatch-CCiaAnSK.mjs → dispatch-BBfb519j.mjs} +5 -5
  45. package/dist/{domain-DvdZPA50.mjs → domain-BTIdyUVk.mjs} +2 -2
  46. package/dist/{email-ASpNrfLd.mjs → email-DvrS-I0U.mjs} +7 -7
  47. package/dist/{email-cloudflare-kqoN9jst.mjs → email-cloudflare-DAGpgzY1.mjs} +3 -3
  48. package/dist/{entry-BweGTCgj.mjs → entry-DMgR7XOf.mjs} +1 -1
  49. package/dist/{env-Bpkg3G5i.mjs → env-D7vORwpn.mjs} +4 -4
  50. package/dist/{env-types-Dz9qkiOn.mjs → env-types-WEZw5D-r.mjs} +1 -1
  51. package/dist/{env-validation-CN386Utu.mjs → env-validation-DKDcpxbt.mjs} +1 -1
  52. package/dist/{env-validation-BpCCQE_6.mjs → env-validation-DeYNRp1d.mjs} +3 -3
  53. package/dist/{gen-upKJChvd.mjs → gen-DimkGNve.mjs} +4 -4
  54. package/dist/gen-DmEeVEs4.mjs +1 -0
  55. package/dist/{github-cmd-BvMOlb8Z.mjs → github-cmd-D-zs6VQr.mjs} +1 -1
  56. package/dist/{handler-BO7Od-z9.d.mts → handler-6fzr_ikp.d.mts} +3 -3
  57. package/dist/{head-MeF_5M_3.d.mts → head-CVO92KEx.d.mts} +14 -3
  58. package/dist/{head-5XPcnG-j.mjs → head-CWJhfUwV.mjs} +62 -3
  59. package/dist/{headers-COGEDoMN.mjs → headers-Q0kZDpk8.mjs} +1 -1
  60. package/dist/{help-TPCjTu6e.mjs → help-Cgdcd-SG.mjs} +4 -4
  61. package/dist/help-Cp3K5m1w.mjs +1 -0
  62. package/dist/index.d.mts +4 -4
  63. package/dist/index.mjs +23 -23
  64. package/dist/{info-EsDyihwf.mjs → info-BbxQ34kk.mjs} +4 -4
  65. package/dist/{init-a4lVagrb.mjs → init-zyRj3QRw.mjs} +14 -14
  66. package/dist/{link-CE55DDzS.mjs → link-DAFXuIER.mjs} +2 -2
  67. package/dist/{list-CxRthQks.mjs → list-BTIcC3W9.mjs} +2 -2
  68. package/dist/{live-Kc55iuOQ.d.mts → live-DBybyDt0.d.mts} +2 -2
  69. package/dist/{live-CYJ4KGoR.mjs → live-Dw7NF1t2.mjs} +1 -1
  70. package/dist/load-user-env-ztmIyiLx.mjs +34 -0
  71. package/dist/{local-d1-CFcH9Bx3.mjs → local-d1-BnVb7Fem.mjs} +1 -1
  72. package/dist/login-DBs8JuSl.mjs +1 -0
  73. package/dist/{login-AfcSGSmE.mjs → login-DOE-MkeK.mjs} +2 -2
  74. package/dist/{logs-BgRJuvb1.mjs → logs-CUsjihc3.mjs} +2 -2
  75. package/dist/migrate-BYhoIK9R.mjs +1 -0
  76. package/dist/{migrate-BNAh6m_C.mjs → migrate-DtoKdGas.mjs} +4 -4
  77. package/dist/nitro.mjs +3 -3
  78. package/dist/{node-CXFUw0Uz.mjs → node-D9dPyUr0.mjs} +2 -2
  79. package/dist/operator-ai-logging-DFTEp81Z.mjs +121 -0
  80. package/dist/{operator-args-DGTuCdSE.mjs → operator-args-BCCohcz3.mjs} +3 -2
  81. package/dist/{operator-cmd-C-viB7Si.mjs → operator-cmd-CQOQrUiO.mjs} +26 -6
  82. package/dist/operator-cmd-xCACDtT1.mjs +1 -0
  83. package/dist/pages/client.d.mts +1 -1
  84. package/dist/pages/client.mjs +15 -13
  85. package/dist/pages/head.d.mts +2 -2
  86. package/dist/pages/head.mjs +1 -1
  87. package/dist/pages/index.d.mts +2 -2
  88. package/dist/pages/index.mjs +5 -5
  89. package/dist/pages/islands-plugin.d.mts +5 -1
  90. package/dist/pages/islands-plugin.mjs +6 -2
  91. package/dist/pages/protocol.d.mts +2 -2
  92. package/dist/pages/protocol.mjs +1 -1
  93. package/dist/platform-args-DSi4_M8n.mjs +1 -0
  94. package/dist/{platform-args-CiYeZmc5.mjs → platform-args-DtpHS_75.mjs} +1 -1
  95. package/dist/{platform-auth-config-Dt2qEc2w.mjs → platform-auth-config-fLwIS5VG.mjs} +3 -3
  96. package/dist/{platform-auth-protection-B7TaF-PZ.mjs → platform-auth-protection-BTRI_YwD.mjs} +2 -2
  97. package/dist/{platform-auth-recovery-suXSteJ6.mjs → platform-auth-recovery-DPK2Mvmo.mjs} +2 -2
  98. package/dist/{platform-cmd-DuAsIxbU.mjs → platform-cmd-BLy5uCa-.mjs} +1 -1
  99. package/dist/{platform-cmd-9rvYBBtr.mjs → platform-cmd-HS_FSthn.mjs} +5 -5
  100. package/dist/{platform-domain-DhH_vDr6.mjs → platform-domain-CHpcq_qg.mjs} +2 -2
  101. package/dist/{platform-lifecycle-3uI-E2bF.mjs → platform-lifecycle-B6LUBwjS.mjs} +1 -1
  102. package/dist/{platform-lifecycle-CXmXe2xt.mjs → platform-lifecycle-D2RS7DE0.mjs} +236 -26
  103. package/dist/{platform-management-PdrgDQTe.mjs → platform-management-C-T0ch4y.mjs} +1 -1
  104. package/dist/{platform-management-BBCHfwji.mjs → platform-management-d3ETv3Dw.mjs} +14 -14
  105. package/dist/{platform-plans-config-BGwkXYDM.mjs → platform-plans-config-B7yJQKf7.mjs} +114 -30
  106. package/dist/{platform-recovery-C8NxXGRR.mjs → platform-recovery-DS5CAsly.mjs} +2 -2
  107. package/dist/{plugin-inference-CErfTgEx.mjs → plugin-inference-DZHmVe1f.mjs} +3 -3
  108. package/dist/{prepare-BDKWZgfL.mjs → prepare-AVM4Hj3T.mjs} +8 -8
  109. package/dist/prepare-BSXKz6m8.mjs +1 -0
  110. package/dist/{prepare-BLrzXjIl.mjs → prepare-DMk8NAO-.mjs} +1 -1
  111. package/dist/{project-cmd-DzGvxXKH.mjs → project-cmd-TQKAOTMV.mjs} +15 -15
  112. package/dist/{project-paths-G0yut6Zz.mjs → project-paths-CUhCPMpK.mjs} +33 -2
  113. package/dist/{project-team-C5XtHbZk.mjs → project-team-B1OKeb-T.mjs} +1 -1
  114. package/dist/{project-token-B4D5yhHQ.mjs → project-token-RW_wpmN-.mjs} +1 -1
  115. package/dist/{project-tsconfig-nhnTWO_Y.mjs → project-tsconfig-MyRJgufB.mjs} +1 -1
  116. package/dist/{project-zero-trust--0LvktDg.mjs → project-zero-trust-TNc66p0_.mjs} +1 -1
  117. package/dist/{protocol-B1Tvc9-x.mjs → protocol-IPSWHolJ.mjs} +54 -19
  118. package/dist/{protocol-Cg2I81NA.d.mts → protocol-YS3tbxWE.d.mts} +2 -2
  119. package/dist/{provision-CAcrauvr.mjs → provision-BLdkpFT4.mjs} +1 -1
  120. package/dist/{provision-C3yiHdld.mjs → provision-bgQTi5QZ.mjs} +2 -2
  121. package/dist/redirect-Dqb4fEc5.mjs +80 -0
  122. package/dist/{requests-CrRiTgQA.mjs → requests-Cj15-yrI.mjs} +1 -1
  123. package/dist/{rollback-BsmQyj-Q.mjs → rollback-CYnkng7B.mjs} +2 -2
  124. package/dist/{route-types-CgtlFCDz.mjs → route-types-C6eAOmOj.mjs} +1 -1
  125. package/dist/runtime/auth.d.mts +1 -1
  126. package/dist/runtime/auth.mjs +1 -1
  127. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  128. package/dist/runtime/better-auth-mysql.mjs +1 -1
  129. package/dist/runtime/better-auth-pg.d.mts +1 -1
  130. package/dist/runtime/better-auth-pg.mjs +1 -1
  131. package/dist/runtime/better-auth.d.mts +1 -1
  132. package/dist/runtime/better-auth.mjs +1 -1
  133. package/dist/runtime/client-react.d.mts +1 -1
  134. package/dist/runtime/client-solid.d.mts +1 -1
  135. package/dist/runtime/client-svelte.d.mts +1 -1
  136. package/dist/runtime/client-vue.d.mts +1 -1
  137. package/dist/runtime/client.d.mts +1 -1
  138. package/dist/runtime/handler.d.mts +1 -1
  139. package/dist/runtime/live-client.d.mts +1 -1
  140. package/dist/runtime/live-server.mjs +1 -1
  141. package/dist/runtime/live.d.mts +1 -1
  142. package/dist/runtime/live.mjs +1 -1
  143. package/dist/runtime/routing.d.mts +2 -2
  144. package/dist/runtime/routing.mjs +6 -5
  145. package/dist/runtime/validator.d.mts +1 -1
  146. package/dist/runtime/ws-server.d.mts +3 -3
  147. package/dist/runtime/ws-server.mjs +1 -1
  148. package/dist/runtime/ws.d.mts +1 -1
  149. package/dist/{scan-BJ3bj6aP.mjs → scan-4YOxDaw2.mjs} +2 -2
  150. package/dist/{secret-D0g5oBsP.mjs → secret-BSf7dgg_.mjs} +3 -3
  151. package/dist/{action-key-ByZ6DDld.mjs → url-DaehRGKR.mjs} +43 -1
  152. package/dist/{version-metadata-eUd6Ar_U.mjs → version-metadata-CeftH0fQ.mjs} +1 -1
  153. package/dist/{wrangler-k40T7XTQ.mjs → wrangler-B1gkT_wC.mjs} +3 -3
  154. package/dist/wrangler-fNGvPTlO.mjs +1 -0
  155. package/dist/{wrapper-CVMZarxf.mjs → wrapper-xJ4LP5A7.mjs} +3 -3
  156. package/dist/{ws--U7QicYy.d.mts → ws-C2zy0QBf.d.mts} +2 -2
  157. package/docs/guide/ai.md +1 -1
  158. package/docs/guide/app-types.md +1 -1
  159. package/docs/guide/auth.md +22 -27
  160. package/docs/guide/database/d1.md +4 -2
  161. package/docs/guide/database.md +29 -27
  162. package/docs/guide/deployment.md +2 -2
  163. package/docs/guide/edge/headers.md +3 -3
  164. package/docs/guide/edge/prerendering.md +5 -5
  165. package/docs/guide/edge/redirects.md +1 -1
  166. package/docs/guide/edge/revalidation.md +4 -2
  167. package/docs/guide/edge/rewrites.md +1 -1
  168. package/docs/guide/edge/static-assets.md +4 -0
  169. package/docs/guide/email/sending.md +4 -2
  170. package/docs/guide/live.md +1 -1
  171. package/docs/guide/pages-routing/actions-and-forms.md +25 -7
  172. package/docs/guide/pages-routing/errors.md +17 -9
  173. package/docs/guide/pages-routing/head.md +44 -1
  174. package/docs/guide/pages-routing/islands.md +3 -1
  175. package/docs/guide/pages-routing/layouts.md +2 -2
  176. package/docs/guide/pages-routing/loaders.md +3 -1
  177. package/docs/guide/pages-routing/markdown.md +5 -3
  178. package/docs/guide/pages-routing/overview.md +14 -21
  179. package/docs/guide/platform/administration/connected-apps.md +10 -3
  180. package/docs/guide/platform/administration/email.md +1 -1
  181. package/docs/guide/platform/administration/plans.md +34 -1
  182. package/docs/guide/platform/administration/projects.md +6 -2
  183. package/docs/guide/platform/installation/credentials.md +12 -10
  184. package/docs/guide/platform/installation/maintenance.md +7 -1
  185. package/docs/guide/platform/installation/setup.md +8 -7
  186. package/docs/guide/queues.md +1 -1
  187. package/docs/guide/server-routing.md +2 -2
  188. package/docs/guide/sse.md +1 -1
  189. package/docs/guide/ssg.md +17 -6
  190. package/docs/guide/storage.md +1 -1
  191. package/docs/guide/testing.md +9 -7
  192. package/docs/guide/type-safety.md +23 -21
  193. package/docs/integrations/cloudflare.md +6 -2
  194. package/docs/integrations/frameworks/nuxt.md +1 -1
  195. package/docs/integrations/hono.md +21 -0
  196. package/docs/integrations/nodejs-bun-deno.md +4 -4
  197. package/docs/reference/api/auth.md +22 -4
  198. package/docs/reference/api/database.md +2 -2
  199. package/docs/reference/api/pages.md +17 -13
  200. package/docs/reference/api/resources.md +1 -1
  201. package/docs/reference/api/rewrites.md +8 -4
  202. package/docs/reference/api.md +1 -1
  203. package/docs/reference/cli/deploy.md +4 -2
  204. package/docs/reference/cli/platform-config.md +3 -3
  205. package/docs/reference/cli/platform-users.md +58 -11
  206. package/docs/reference/cli.md +1 -1
  207. package/docs/reference/config.md +7 -3
  208. package/package.json +7 -7
  209. package/skills/void/SKILL.md +1 -1
  210. package/dist/client-D1Vz1Zep.mjs +0 -1
  211. package/dist/deploy-DMieisRu.mjs +0 -2
  212. package/dist/discover-1DJD4YXD.mjs +0 -1
  213. package/dist/gen-M5fNQKfH.mjs +0 -1
  214. package/dist/help-CItQVDL4.mjs +0 -1
  215. package/dist/load-user-env-CSwdofj0.mjs +0 -48
  216. package/dist/login-ZHsAm-I6.mjs +0 -1
  217. package/dist/migrate-BflbbZQK.mjs +0 -1
  218. package/dist/operator-cmd-D6qNuJ_z.mjs +0 -1
  219. package/dist/platform-args-DJvF1-kl.mjs +0 -1
  220. package/dist/prepare-a1_5usAn.mjs +0 -1
  221. package/dist/url-CuoEn0o3.mjs +0 -43
  222. package/dist/wrangler-R3kMdJfw.mjs +0 -1
@@ -1,11 +1,30 @@
1
1
  import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
+ import { a as utcTime } from "./operator-ai-logging-DFTEp81Z.mjs";
2
3
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-CD3pap65.mjs";
3
4
  import { n as OperatorClient, r as OperatorClientError } from "./operator-client-XvXTkea6.mjs";
4
5
  import { m as printSuccess } from "./output-DNVILSz2.mjs";
5
6
  import { stripVTControlCharacters } from "node:util";
6
7
  import { readFile } from "node:fs/promises";
7
8
  import { PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanId } from "@void/platform/plans";
9
+ import { AI_LOGGING_MODES, parsePlanAiLoggingInput } from "@void/platform/ai-logging";
8
10
  // src/cli/platform-plans-config.ts
11
+ const aiLoggingLabels = {
12
+ inherit: "inherit (AI Gateway setting)",
13
+ off: "off",
14
+ metadata: "metadata (no prompts or responses)",
15
+ full: "full (prompts and responses)"
16
+ };
17
+ function planAiLogging$1(modes, planId) {
18
+ const mode = modes && Object.hasOwn(modes, planId) ? modes[planId] : void 0;
19
+ return typeof mode === "string" ? stripVTControlCharacters(mode) : "inherit";
20
+ }
21
+ function aiLoggingPending(listing) {
22
+ return Boolean(listing.aiLogging?.publish && !listing.aiLogging.publish.complete);
23
+ }
24
+ /** Refuses plan AI logging on a platform whose API would refuse or drop it. */
25
+ function assertPlanAiLoggingSupported(listing, body) {
26
+ if (body.aiLogging !== void 0 && !listing.aiLogging) throw new Error("platform: This platform does not support plan AI logging defaults. Upgrade the platform first with `void platform upgrade`.");
27
+ }
9
28
  const limitLabels = {
10
29
  requestsPerMonth: "Requests per billing month",
11
30
  cpuMsPerRequest: "Default CPU per request (ms)",
@@ -26,7 +45,8 @@ function limitValue(value, key) {
26
45
  function shortSlugsLabel(allowed) {
27
46
  return allowed ? "allowed" : "not allowed";
28
47
  }
29
- function writePlanDiff(from, to, write) {
48
+ function writePlanDiff(from, to, write, aiLogging) {
49
+ if (aiLogging && aiLogging.from !== aiLogging.to) write(`AI Gateway logging: ${aiLogging.from} → ${aiLogging.to}`);
30
50
  if (from.buildInstanceType !== to.buildInstanceType) write(`Build size: ${from.buildInstanceType} → ${to.buildInstanceType}`);
31
51
  if (from.allowShortSlugs !== to.allowShortSlugs) write(`Short project slugs: ${shortSlugsLabel(from.allowShortSlugs)} → ${shortSlugsLabel(to.allowShortSlugs)}`);
32
52
  for (const key of PLAN_EDITABLE_LIMIT_KEYS) if (from.limits[key] !== to.limits[key]) write(`${limitLabels[key]}: ${limitValue(from.limits[key], key)} → ${limitValue(to.limits[key], key)}`);
@@ -42,11 +62,21 @@ function showListing(listing, json) {
42
62
  console.log(`${label(plan)} — ${count} accounts`);
43
63
  }
44
64
  if (listing.catalog.reconciliation && !listing.catalog.reconciliation.complete) console.log("Account updates are pending. Run void platform config plans sync --yes.");
65
+ if (aiLoggingPending(listing)) console.log(`AI logging publish is pending for ${listing.aiLogging.remaining} projects. Run void platform config plans sync --yes.`);
45
66
  }
46
- function showPreview(preview, before, write = console.error) {
67
+ function showPreview(preview, before, beforeAiLogging, write = console.error) {
47
68
  const after = preview.catalog;
69
+ const change = preview.aiLogging;
70
+ const afterAiLogging = change?.modes;
71
+ const savedAiLogging = change?.modesBefore ?? beforeAiLogging;
72
+ const aiLogging = (from, to) => afterAiLogging ? {
73
+ from: planAiLogging$1(savedAiLogging, from),
74
+ to: planAiLogging$1(afterAiLogging, to)
75
+ } : void 0;
48
76
  write(`Change: ${preview.action} ${preview.target}`);
49
77
  write(`Accounts affected: ${preview.affectedAccounts}`);
78
+ const publish = preview.aiLoggingPublish;
79
+ if (typeof publish?.remaining === "number" && publish.remaining > 0) write(`AI logging settings to publish: ${publish.remaining} projects`);
50
80
  for (const warning of preview.warnings ?? []) write(stripVTControlCharacters(warning));
51
81
  if (typeof preview.usageSampleSize === "number" && preview.usageSampleSize > 0) write(`Usage preview samples ${preview.usageSampleSize} accounts.`);
52
82
  if (before.defaultPlanId !== after.defaultPlanId) write(`Default for new accounts: ${before.defaultPlanId} → ${after.defaultPlanId}`);
@@ -56,18 +86,19 @@ function showPreview(preview, before, write = console.error) {
56
86
  write(`Add ${label(plan)}; build size ${plan.buildInstanceType}`);
57
87
  for (const key of PLAN_EDITABLE_LIMIT_KEYS) write(` ${limitLabels[key]}: ${limitValue(plan.limits[key], key)}`);
58
88
  write(` Short project slugs: ${shortSlugsLabel(plan.allowShortSlugs)}`);
89
+ if (afterAiLogging) write(` AI Gateway logging: ${planAiLogging$1(afterAiLogging, plan.id)}`);
59
90
  continue;
60
91
  }
61
92
  if (previous.name !== plan.name) write(`Name: ${previous.name} → ${plan.name}`);
62
93
  if (previous.archived !== plan.archived) write(`${plan.id}: ${plan.archived ? "archive for new assignments" : "restore assignments"}`);
63
- writePlanDiff(previous, plan, write);
94
+ writePlanDiff(previous, plan, write, aiLogging(plan.id, plan.id));
64
95
  }
65
96
  for (const plan of before.plans) if (!after.plans.some((entry) => entry.id === plan.id)) {
66
97
  write(`Remove ${label(plan)}`);
67
98
  const replacement = after.plans.find((entry) => entry.id === preview.replacementPlanId);
68
99
  if (replacement) {
69
100
  write(`Move accounts to ${label(replacement)}`);
70
- writePlanDiff(plan, replacement, write);
101
+ writePlanDiff(plan, replacement, write, aiLogging(plan.id, replacement.id));
71
102
  }
72
103
  }
73
104
  for (const account of preview.overLimitAccounts ?? []) write(`Already above proposed limits: ${stripVTControlCharacters(account.login)} (${account.id}): ${account.reasons.join(", ")}`);
@@ -93,7 +124,7 @@ async function choosePlan(catalog, message, options = {}) {
93
124
  }))
94
125
  }));
95
126
  }
96
- async function changesInput(args, plan) {
127
+ async function changesInput(args, plan, listing) {
97
128
  if (args.file) {
98
129
  const input = JSON.parse(await readFile(args.file, "utf8"));
99
130
  if (!input || typeof input !== "object" || Array.isArray(input)) throw new Error("platform: A plan file must contain a JSON object.");
@@ -102,8 +133,14 @@ async function changesInput(args, plan) {
102
133
  "name",
103
134
  "limits",
104
135
  "buildInstanceType",
105
- "allowShortSlugs"
106
- ].includes(key)) throw new Error(`platform: Unknown plan field ${key}. Use name, limits, buildInstanceType, or allowShortSlugs.`);
136
+ "allowShortSlugs",
137
+ "aiLogging"
138
+ ].includes(key)) throw new Error(`platform: Unknown plan field ${key}. Use name, limits, buildInstanceType, allowShortSlugs, or aiLogging.`);
139
+ try {
140
+ parsePlanAiLoggingInput(object.aiLogging);
141
+ } catch (error) {
142
+ throw new Error(`platform: ${error.message}`);
143
+ }
107
144
  if (object.allowShortSlugs !== void 0 && typeof object.allowShortSlugs !== "boolean") throw new Error("platform: allowShortSlugs must be a boolean.");
108
145
  return {
109
146
  ...object,
@@ -136,9 +173,21 @@ async function changesInput(args, plan) {
136
173
  {
137
174
  value: "buildInstanceType",
138
175
  label: "Build instance size"
139
- }
176
+ },
177
+ ...listing?.aiLogging ? [{
178
+ value: "aiLogging",
179
+ label: `AI Gateway logging: ${planAiLogging$1(listing.aiLogging.modes, plan.id)}`
180
+ }] : []
140
181
  ]
141
182
  }));
183
+ if (field === "aiLogging") return { aiLogging: value(await select({
184
+ message: "AI Gateway logging for projects on this plan without a project setting:",
185
+ initialValue: planAiLogging$1(listing.aiLogging.modes, plan.id),
186
+ options: AI_LOGGING_MODES.map((mode) => ({
187
+ value: mode,
188
+ label: aiLoggingLabels[mode]
189
+ }))
190
+ })) };
142
191
  if (field === "name") return { name: parsePlanName(value(await text({
143
192
  message: "Plan name:",
144
193
  initialValue: plan.name
@@ -162,7 +211,9 @@ async function changesInput(args, plan) {
162
211
  }));
163
212
  return { limits: parsePlanLimitsPatch({ [field]: Number(input) }) };
164
213
  }
165
- async function apply(client, path, body, args, catalog) {
214
+ async function apply(client, path, body, args, listing) {
215
+ const { catalog } = listing;
216
+ assertPlanAiLoggingSupported(listing, body);
166
217
  if (!args.plan && !args.yes && (!process.stdin.isTTY || args.json)) throw new Error("platform: Configuration changes require --yes or --plan in non-interactive mode.");
167
218
  const preview = await client.request(path, {
168
219
  method: "POST",
@@ -173,54 +224,84 @@ async function apply(client, path, body, args, catalog) {
173
224
  });
174
225
  if (args.plan) {
175
226
  if (args.json) print(preview);
176
- else showPreview(preview, catalog, console.log);
227
+ else showPreview(preview, catalog, listing.aiLogging?.modes, console.log);
177
228
  return;
178
229
  }
179
230
  if (!Number.isSafeInteger(preview.expectedRevision)) throw new Error("platform: The platform returned an invalid plan revision.");
180
231
  if (!args.yes) {
181
- showPreview(preview, catalog);
232
+ showPreview(preview, catalog, listing.aiLogging?.modes);
182
233
  if (!value(await confirm({
183
234
  message: `Apply this change to ${client.origin}?`,
184
235
  initialValue: false
185
236
  }))) throw new Error("platform: Cancelled.");
186
237
  }
187
- let result = await client.request(path, {
188
- method: "POST",
189
- body: {
190
- ...body,
191
- expectedRevision: preview.expectedRevision
192
- }
238
+ let result = await save(client, path, {
239
+ ...body,
240
+ expectedRevision: preview.expectedRevision
193
241
  });
194
242
  const committedCatalog = result.catalog;
195
243
  if (!Number.isSafeInteger(committedCatalog?.revision)) throw new Error("platform: The platform returned an invalid saved plan revision. Inspect the catalog before retrying.");
196
244
  const committedRevision = committedCatalog.revision;
197
245
  const applied = result;
198
246
  let previousCursor = catalog.reconciliation?.cursor ?? null;
247
+ let published = 0;
248
+ let expectedBy = null;
199
249
  while (true) {
200
250
  const reconciliation = result.reconciliation;
201
- if (!reconciliation || reconciliation.complete !== false) break;
251
+ const aiLogging = result.aiLoggingPublish;
252
+ if (aiLogging && Number.isSafeInteger(aiLogging.processed)) published += aiLogging.processed;
253
+ if (typeof aiLogging?.expectedBy === "string") expectedBy = aiLogging.expectedBy;
254
+ const accountsPending = reconciliation?.complete === false;
255
+ if (!accountsPending && aiLogging?.complete !== false && !aiLogging?.error) break;
202
256
  const currentCatalog = result.catalog;
203
257
  const cursor = currentCatalog.reconciliation?.cursor ?? null;
204
- if (reconciliation.error || !Number.isSafeInteger(reconciliation.processed) || reconciliation.processed <= 0 || cursor === previousCursor || currentCatalog.revision !== committedRevision) {
258
+ const accountsStuck = accountsPending && (!progressed(reconciliation) || cursor === previousCursor);
259
+ const aiLoggingStuck = aiLogging?.complete === false ? !progressed(aiLogging) : !!aiLogging?.error;
260
+ if (accountsStuck || aiLoggingStuck || currentCatalog.revision !== committedRevision) {
205
261
  const pending = {
206
262
  ...applied,
207
263
  ...result
208
264
  };
209
265
  print(pending);
210
- throw new OperatorClientError("Plan configuration was saved, but account updates are pending. Run void platform config plans sync --yes.", "plan_sync_pending", void 0, pending);
266
+ throw new OperatorClientError(accountsStuck || !aiLoggingStuck ? "Plan configuration was saved, but account updates are pending. Run void platform config plans sync --yes." : "Plan configuration was saved, but the AI logging setting is not published to every project yet. Run void platform config plans sync --yes.", "plan_sync_pending", void 0, pending);
211
267
  }
212
- previousCursor = cursor;
213
- result = await client.request("/config/plans/sync", {
214
- method: "POST",
215
- body: { expectedRevision: committedRevision }
216
- });
268
+ if (accountsPending) previousCursor = cursor;
269
+ result = await save(client, "/config/plans/sync", { expectedRevision: committedRevision });
217
270
  }
218
271
  const completed = {
219
272
  ...applied,
220
273
  ...result
221
274
  };
222
275
  if (args.json) print(completed);
223
- else printSuccess(`Saved ${applied.action ?? "plans.sync"} ${applied.target ?? ""}. Account updates complete.`);
276
+ else {
277
+ printSuccess(`Saved ${applied.action ?? "plans.sync"} ${applied.target ?? ""}. Account updates complete.`);
278
+ const change = preview.aiLogging;
279
+ if (published > 0 || change?.planIds?.length || change?.includeUnknown) {
280
+ const by = utcTime(expectedBy);
281
+ console.log(`AI logging published to ${published} projects${by ? `; expected by ${by} (normally within 2 minutes)` : ""}.`);
282
+ }
283
+ }
284
+ }
285
+ /**
286
+ * Send a plan change or sync page. The API answers `ok: false` when the catalog saved but an
287
+ * account or AI logging page failed; that body still carries the saved catalog, so return it and
288
+ * let the caller name the resumption command instead of a generic partial failure.
289
+ */
290
+ async function save(client, path, body) {
291
+ try {
292
+ return await client.request(path, {
293
+ method: "POST",
294
+ body
295
+ });
296
+ } catch (error) {
297
+ const details = error instanceof OperatorClientError ? error.details : void 0;
298
+ if (error instanceof OperatorClientError && error.code === "partial_failure" && details && typeof details === "object" && "catalog" in details) return details;
299
+ throw error;
300
+ }
301
+ }
302
+ /** A sync step that wrote something and reported no error. */
303
+ function progressed(progress) {
304
+ return !progress.error && Number.isSafeInteger(progress.processed) && progress.processed > 0;
224
305
  }
225
306
  async function runPlatformPlansConfig(args) {
226
307
  const origin = resolveOperatorOrigin(args.connection);
@@ -248,9 +329,9 @@ async function runPlatformPlansConfig(args) {
248
329
  value: ":default",
249
330
  label: "Choose the default for new accounts"
250
331
  },
251
- ...catalog.reconciliation && !catalog.reconciliation.complete ? [{
332
+ ...catalog.reconciliation && !catalog.reconciliation.complete || aiLoggingPending(listing) ? [{
252
333
  value: ":sync",
253
- label: "Continue pending account updates"
334
+ label: "Continue pending account and AI logging updates"
254
335
  }] : []
255
336
  ]
256
337
  }));
@@ -319,6 +400,9 @@ async function runPlatformPlansConfig(args) {
319
400
  console.log(`Accounts: ${result.accounts}; build size: ${plan.buildInstanceType}`);
320
401
  console.log(`Short project slugs: ${shortSlugsLabel(plan.allowShortSlugs)}`);
321
402
  for (const key of PLAN_EDITABLE_LIMIT_KEYS) console.log(`${limitLabels[key]}: ${limitValue(plan.limits[key], key)}`);
403
+ if (typeof result.aiLogging === "string") console.log(`AI Gateway logging: ${stripVTControlCharacters(result.aiLogging)}`);
404
+ const publish = result.aiLoggingPublish;
405
+ if (publish && publish.complete === false) console.log(`AI logging publish pending: ${publish.remaining ?? 0} projects remaining${publish.error ? ` (${stripVTControlCharacters(publish.error)})` : ""}. Run void platform config plans sync --yes.`);
322
406
  }
323
407
  }
324
408
  return;
@@ -344,7 +428,7 @@ async function runPlatformPlansConfig(args) {
344
428
  } else if (args.action === "sync") path = "/config/plans/sync";
345
429
  else {
346
430
  if (!plan) throw new Error("platform: Plan not found. Run void platform config plans show.");
347
- if (args.action === "set") body = await changesInput(args, plan);
431
+ if (args.action === "set") body = await changesInput(args, plan, listing);
348
432
  else if (args.action === "archive" || args.action === "restore") {
349
433
  path = `/config/plans/${encodeURIComponent(args.target)}/archive`;
350
434
  body = { archived: args.action === "archive" };
@@ -358,6 +442,6 @@ async function runPlatformPlansConfig(args) {
358
442
  body = replacement ? { replacementPlanId: replacement } : {};
359
443
  }
360
444
  }
361
- await apply(client, path, body, args, catalog);
445
+ await apply(client, path, body, args, listing);
362
446
  }
363
447
  export { runPlatformPlansConfig };
@@ -1,6 +1,6 @@
1
1
  import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
2
- import { f as REMOTE_INSTALLATION_MANIFEST_KEY, k as createPlatformInstallPlan } from "./platform-lifecycle-CXmXe2xt.mjs";
3
- import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-BBCHfwji.mjs";
2
+ import { j as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-D2RS7DE0.mjs";
3
+ import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-d3ETv3Dw.mjs";
4
4
  import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DZ_2Xuqd.mjs";
5
5
  import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
6
6
  // src/cli/platform-recovery.ts
@@ -2,10 +2,10 @@ import { a as join, l as toSlash, s as relative } from "./dist-DMYe8CZJ.mjs";
2
2
  import { n as globSync } from "./dist-BWNkVq50.mjs";
3
3
  import { a as unwrapStaticExpression, c as walk, i as staticLiteral, s as bindingResolver } from "./static-exports-DFkzL-NX.mjs";
4
4
  import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-Cv0JwXqb.mjs";
5
- import { _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename, y as parseWebSocketFilename } from "./scan-BJ3bj6aP.mjs";
6
- import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
5
+ import { _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename, y as parseWebSocketFilename } from "./scan-4YOxDaw2.mjs";
6
+ import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
7
7
  import { n as resourceNameWords, t as isResourceName } from "./resource-name-DlJ9QXzg.mjs";
8
- import { r as getSsrServerEntryPath } from "./entry-BweGTCgj.mjs";
8
+ import { r as getSsrServerEntryPath } from "./entry-DMgR7XOf.mjs";
9
9
  import { existsSync, readFileSync } from "node:fs";
10
10
  import { parseSync } from "vite";
11
11
  // src/application-features.ts
@@ -1,14 +1,14 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { t as analyzeApplication } from "./application-routing-BLrMVpqi.mjs";
3
- import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-eeDzKBS9.mjs";
2
+ import { t as analyzeApplication } from "./application-routing-CJRlXCc2.mjs";
3
+ import { a as projectAuthConfigImporter, i as loadVoidAuthConfig } from "./config-Do7gJI3T.mjs";
4
4
  import { n as generateVoidAuthDrizzleSchema, t as generateVoidAuthDatabaseModule } from "./drizzle-DBSpPpU1.mjs";
5
- import { c as getDatabaseCasing, p as readConfig } from "./config-5oSQhZNj.mjs";
6
- import { t as discoverSchema } from "./discover-CVFCWU7W.mjs";
5
+ import { c as getDatabaseCasing, p as readConfig } from "./config-CzFdJYNA.mjs";
6
+ import { t as discoverSchema } from "./discover-Vd18lHsj.mjs";
7
7
  import { c as loadLocalEnv } from "./env-UqS-21xi.mjs";
8
- import { n as generateQueueTypes, o as generateBindingTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-CgtlFCDz.mjs";
9
- import { n as generateDbDts } from "./db-types-sVwEpyPR.mjs";
10
- import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-Dz9qkiOn.mjs";
11
- import { i as writeFileIfChanged, n as ensureProjectTsconfig } from "./project-tsconfig-nhnTWO_Y.mjs";
8
+ import { n as generateQueueTypes, o as generateBindingTypes, r as generateAuthTypes, t as generateRouteTypes } from "./route-types-C6eAOmOj.mjs";
9
+ import { n as generateDbDts } from "./db-types-BpPYAx0B.mjs";
10
+ import { n as findEnvFileForPaths, r as generateEnvTypes } from "./env-types-WEZw5D-r.mjs";
11
+ import { i as writeFileIfChanged, n as ensureProjectTsconfig } from "./project-tsconfig-MyRJgufB.mjs";
12
12
  import { existsSync, rmSync } from "node:fs";
13
13
  import { fileURLToPath } from "node:url";
14
14
  // src/codegen/prepare.ts
@@ -0,0 +1 @@
1
+ export { t as prepareProject } from "./prepare-AVM4Hj3T.mjs";
@@ -1,5 +1,5 @@
1
1
  import { L as log } from "./dist-STQXl8ck.mjs";
2
- import { t as prepareProject } from "./prepare-BDKWZgfL.mjs";
2
+ import { t as prepareProject } from "./prepare-AVM4Hj3T.mjs";
3
3
  import { m as printSuccess, p as note } from "./output-DNVILSz2.mjs";
4
4
  // src/cli/prepare.ts
5
5
  async function runPrepareCommand(root) {
@@ -1,7 +1,7 @@
1
1
  import { n as readDeploymentPlatform } from "./project-CLwxcEdq.mjs";
2
2
  import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
3
3
  import { c as getToken, s as getSiteDomain } from "./auth-CCk9Seol.mjs";
4
- import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
4
+ import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
5
5
  import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-DNVILSz2.mjs";
6
6
  // src/cli/projects.ts
7
7
  async function runProjectsCommand(root) {
@@ -37,77 +37,77 @@ 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-CxRthQks.mjs");
40
+ const { runListCommand } = await import("./list-BTIcC3W9.mjs");
41
41
  return runListCommand(root, args.name || void 0);
42
42
  }
43
43
  if (args.subcommand === "link") {
44
44
  if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
45
- const { runLink } = await import("./link-CE55DDzS.mjs");
45
+ const { runLink } = await import("./link-DAFXuIER.mjs");
46
46
  return runLink(root, args.name || void 0);
47
47
  }
48
48
  if (args.subcommand === "list") {
49
49
  if (cloudflare) {
50
- const { runListCommand } = await import("./list-CxRthQks.mjs");
50
+ const { runListCommand } = await import("./list-BTIcC3W9.mjs");
51
51
  return runListCommand(root);
52
52
  }
53
53
  return runProjectsCommand(root);
54
54
  }
55
55
  if (args.subcommand === "token") {
56
56
  if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
57
- const { runProjectTokenCommand } = await import("./project-token-B4D5yhHQ.mjs");
57
+ const { runProjectTokenCommand } = await import("./project-token-RW_wpmN-.mjs");
58
58
  return runProjectTokenCommand(root, args);
59
59
  }
60
60
  if (args.subcommand === "team") {
61
61
  if (args.action === "") {
62
- const { printHelpPage } = await import("./help-CItQVDL4.mjs");
62
+ const { printHelpPage } = await import("./help-Cp3K5m1w.mjs");
63
63
  printHelpPage(["project", "team"]);
64
64
  return;
65
65
  }
66
66
  const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
67
67
  if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
68
- const { runProjectTeamCommand } = await import("./project-team-C5XtHbZk.mjs");
68
+ const { runProjectTeamCommand } = await import("./project-team-B1OKeb-T.mjs");
69
69
  return runProjectTeamCommand(root, args);
70
70
  }
71
71
  if (args.subcommand === "zero-trust") {
72
72
  if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
73
73
  if (args.action === "") {
74
- const { printHelpPage } = await import("./help-CItQVDL4.mjs");
74
+ const { printHelpPage } = await import("./help-Cp3K5m1w.mjs");
75
75
  printHelpPage(["project", "zero-trust"]);
76
76
  return;
77
77
  }
78
78
  const action = args.action;
79
- const { runProjectZeroTrustCommand } = await import("./project-zero-trust--0LvktDg.mjs");
79
+ const { runProjectZeroTrustCommand } = await import("./project-zero-trust-TNc66p0_.mjs");
80
80
  return runProjectZeroTrustCommand(root, {
81
81
  ...args,
82
82
  action
83
83
  });
84
84
  }
85
85
  if (args.subcommand === "logs") {
86
- const { runLogsCommand } = await import("./logs-BgRJuvb1.mjs");
86
+ const { runLogsCommand } = await import("./logs-CUsjihc3.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") {
90
90
  if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
91
- const { runRequestsCommand } = await import("./requests-CrRiTgQA.mjs");
91
+ const { runRequestsCommand } = await import("./requests-Cj15-yrI.mjs");
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-BsmQyj-Q.mjs");
95
+ const { runRollbackCommand } = await import("./rollback-CYnkng7B.mjs");
96
96
  return runRollbackCommand(root, args.deployId || void 0, args.platform);
97
97
  }
98
98
  if (args.subcommand === "cancel") {
99
99
  if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
100
- const { runCancelDeployCommand } = await import("./cancel-deploy-Ce6Os4fa.mjs");
100
+ const { runCancelDeployCommand } = await import("./cancel-deploy-96S5hD1E.mjs");
101
101
  return runCancelDeployCommand(root, args.deployId || void 0);
102
102
  }
103
103
  if (args.subcommand === "delete") {
104
104
  if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
105
- const { runDeleteCommand } = await import("./delete-CModjyOC.mjs");
105
+ const { runDeleteCommand } = await import("./delete-BVD2kI82.mjs");
106
106
  return runDeleteCommand(root, args.name || void 0, { force: args.force });
107
107
  }
108
108
  if (args.subcommand === "purge-cache") {
109
109
  if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
110
- const { runPurgeCacheCommand } = await import("./cache-D0m3Z_Xf.mjs");
110
+ const { runPurgeCacheCommand } = await import("./cache-DGMnskX7.mjs");
111
111
  return runPurgeCacheCommand(root, args.projectSlug || void 0);
112
112
  }
113
113
  }
@@ -2,6 +2,35 @@ import { a as join, i as isAbsolute, o as normalize } from "./dist-DMYe8CZJ.mjs"
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { createJiti } from "jiti";
5
+ // src/host/alias-hint.ts
6
+ /**
7
+ * Detects tsconfig path aliases in module-resolution errors from files that
8
+ * Void loads outside Vite (`env.ts` through Node's `import()`, `void.config.ts`
9
+ * through jiti), neither of which resolves tsconfig `paths`.
10
+ *
11
+ * Node-only (lives under `host/`). Must not be imported from anything
12
+ * that ships in worker bundles.
13
+ */
14
+ /** Returns the failed specifier from a Node or jiti module-resolution error, or `null`. */
15
+ function extractFailedSpecifier(err) {
16
+ if (!(err instanceof Error)) return null;
17
+ const code = err.code;
18
+ if (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND" && code !== "ERR_PACKAGE_PATH_NOT_EXPORTED") return null;
19
+ const match = /Cannot find (?:package|module) '([^']+)'/.exec(err.message);
20
+ return match ? match[1] ?? null : null;
21
+ }
22
+ /** A specifier is alias-shaped if it isn't relative, absolute, a node: URL, or a valid bare package name. */
23
+ function looksLikeAlias(specifier) {
24
+ if (specifier.startsWith("./") || specifier.startsWith("../") || specifier.startsWith("/") || specifier.startsWith("node:") || specifier.startsWith("file:")) return false;
25
+ if (specifier.startsWith("@")) return !/^@[^/]+\/[^/]+/.test(specifier);
26
+ return specifier.startsWith("~") || specifier.startsWith("#");
27
+ }
28
+ /** The alias hint for a failed load of `file`, or `null` when the error isn't an alias import. */
29
+ function aliasHint(err, file) {
30
+ const specifier = extractFailedSpecifier(err);
31
+ if (!specifier || !looksLikeAlias(specifier)) return null;
32
+ return `Hint: '${specifier}' looks like a tsconfig path alias. ${file} does not resolve tsconfig "paths" — use a relative import (e.g. "./shared/...") instead.`;
33
+ }
5
34
  // src/config-loader.ts
6
35
  const LEGACY_CONFIG_FILE = "void.json";
7
36
  const TYPED_CONFIG_FILE = "void.config.ts";
@@ -36,7 +65,9 @@ function loadVoidConfig(root) {
36
65
  value: loadTypedVoidConfigFile(typedPath)
37
66
  };
38
67
  } catch (error) {
39
- throw new Error(`config: Could not load ${TYPED_CONFIG_FILE}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
68
+ const base = `config: Could not load ${TYPED_CONFIG_FILE}: ${error instanceof Error ? error.message : String(error)}`;
69
+ const hint = aliasHint(error, TYPED_CONFIG_FILE);
70
+ throw new Error(hint ? `${base}\n\n${hint}` : base, { cause: error });
40
71
  }
41
72
  try {
42
73
  return {
@@ -129,4 +160,4 @@ function assertNoRootSourceConventionConflicts(paths) {
129
160
  if (conflicts.length === 0) return;
130
161
  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.`);
131
162
  }
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 };
163
+ export { validateSourceDir as a, loadVoidConfig as c, resolveProjectPaths as i, aliasHint as l, readProjectPaths as n, TYPED_CONFIG_FILE as o, resolvePagesDir as r, loadTypedVoidConfigFile as s, assertNoRootSourceConventionConflicts as t };
@@ -1,6 +1,6 @@
1
1
  import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken, i as getAccountCredential } from "./auth-CCk9Seol.mjs";
3
- import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-SZPyj4X_.mjs";
3
+ import { c as parsePlatformErrorBody, l as platformErrorMessage, n as PlatformApiError, r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
4
  import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-DNVILSz2.mjs";
5
5
  import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
6
6
  import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
@@ -1,6 +1,6 @@
1
1
  import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken } from "./auth-CCk9Seol.mjs";
3
- import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
3
+ import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
4
  import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-DNVILSz2.mjs";
5
5
  import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
6
6
  import { r as requireProjectBySlug } from "./resolve-project-Da3OgCU1.mjs";
@@ -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-G0yut6Zz.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-CUhCPMpK.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,6 +1,6 @@
1
1
  import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken } from "./auth-CCk9Seol.mjs";
3
- import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
3
+ import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
4
  import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-DNVILSz2.mjs";
5
5
  import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
6
6
  import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";