@voltro/cli 0.51.0 → 0.53.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 (233) hide show
  1. package/CHANGELOG.md +356 -0
  2. package/THIRD-PARTY-NOTICES.md +8311 -3318
  3. package/dist/{agentsMd-D6yD7IQv.js → agentsMd-0l980yhL.js} +4 -1
  4. package/dist/agentsMd-SDDSkyl4.js +2 -0
  5. package/dist/{apiBuild-CPDHXF72.js → apiBuild-CaPfoWku.js} +11 -5
  6. package/dist/apiBuild-DHtLXYx9.js +2 -0
  7. package/dist/bin.js +1 -1
  8. package/dist/build-D-OnvNMf.js +843 -0
  9. package/dist/{checkCommand-DNuPiWMc.js → checkCommand-C5elt0tW.js} +92 -46
  10. package/dist/checkCommand-D2ZduVlh.js +2 -0
  11. package/dist/{cloudCmd-F4YJeqM3.js → cloudCmd-QUXh-b5w.js} +1 -1
  12. package/dist/codegen-BWpt3VgF.js +2 -0
  13. package/dist/{codegen-CrMXs4hb.js → codegen-FEk8AZHb.js} +2 -2
  14. package/dist/{codegenCommand-BNBHcNNj.js → codegenCommand-BOiWQ5hz.js} +12 -12
  15. package/dist/{codemodRunner-BDVixlSw.js → codemodRunner-BjtB2lq6.js} +691 -545
  16. package/dist/{commands-B1OiS9bX.js → commands-DyxAmhP0.js} +36 -36
  17. package/dist/{dashboardCommand-C-vvPY1B.js → dashboardCommand-BdKTyT13.js} +3 -3
  18. package/dist/{dataCommand-C1GxXW5q.js → dataCommand-Bab9X7s8.js} +27 -27
  19. package/dist/{dbCommand-If4Y1xQ-.js → dbCommand-06O2finM.js} +277 -236
  20. package/dist/dbCommand-B1EXBC6f.js +2 -0
  21. package/dist/{dev-kdAg9Q7l.js → dev-C6LGF4iY.js} +2998 -2379
  22. package/dist/dev-GjJWAYo2.js +3 -0
  23. package/dist/doctorCommand-B0hX0tdz.js +2 -0
  24. package/dist/{doctorCommand-nKmeW78u.js → doctorCommand-etMkflRc.js} +332 -220
  25. package/dist/{dormancyCommand-CY3wa_SW.js → dormancyCommand-UwZ1AZzB.js} +1 -1
  26. package/dist/{embeddingsCommand-BDLIgje_.js → embeddingsCommand-C70zWHwo.js} +1 -1
  27. package/dist/{envCommand-C6V_xVlT.js → envCommand-dSyKvRkM.js} +15 -15
  28. package/dist/{evolveCommand-D3c4DSfN.js → evolveCommand-CG0_ebO5.js} +2 -2
  29. package/dist/fileConventions-DASGEmj-.js +35 -0
  30. package/dist/{fileTaxonomy-CJfgOllU.js → fileTaxonomy-B7uxipWS.js} +55 -55
  31. package/dist/fontPipeline-LxIHa1vo.js +2 -0
  32. package/dist/fontPipeline-Tsh8kZfA.js +152 -0
  33. package/dist/frameworkTableAssembly-C_7Z-rMs.js +2 -0
  34. package/dist/{frameworkTableAssembly-BwJVEKLr.js → frameworkTableAssembly-DKx3ba3S.js} +5 -5
  35. package/dist/imagePipeline-B_GVJgm6.js +2 -0
  36. package/dist/imagePipeline-CBZmjT4i.js +127 -0
  37. package/dist/index.js +1 -1
  38. package/dist/{infoCommand-BnRFEF1o.js → infoCommand-_53iOc_j.js} +1 -1
  39. package/dist/{inspect-CtL_xTbu.js → inspect-Bd8-9wsi.js} +1 -1
  40. package/dist/inspect-CuoDInfZ.js +2 -0
  41. package/dist/{inspectGateHint-BjnFubmH.js → inspectGateHint-4LxkNtrz.js} +1 -1
  42. package/dist/inspectMetrics-CGF94puw.js +143 -0
  43. package/dist/manifestBuild-C4-J1-m_.js +2 -0
  44. package/dist/{manifestBuild-CuU1VrSm.js → manifestBuild-Cqgsx2bM.js} +1 -1
  45. package/dist/{metaCommands-CfRLra0s.js → metaCommands-Cn2oboG4.js} +9 -3
  46. package/dist/{migrate-DehuBakM.js → migrate-Cko9rswM.js} +2 -2
  47. package/dist/{pageConvention-cEiRxdab.js → pageConvention-C938S8oC.js} +1 -1
  48. package/dist/{privacyCommand-XejDMvmu.js → privacyCommand-DWTQMC6R.js} +2 -2
  49. package/dist/{probeCommand-C9gazU0H.js → probeCommand-DkGGLknv.js} +83 -24
  50. package/dist/{projectScaffold-mIX_DpSe.js → projectScaffold-B4dmTlwT.js} +1 -1
  51. package/dist/{projectScaffold-BIl97_E6.js → projectScaffold-EzlErR4E.js} +1 -1
  52. package/dist/{renderModeScan-D7J1B7Kw.js → renderModeScan-CUbOeOAg.js} +28 -11
  53. package/dist/{renderProfile-1OWWAAtx.js → renderProfile-CskIgAfn.js} +2 -2
  54. package/dist/{runtimeTrace-ZsBU7Tkx.js → runtimeTrace-c0APJz7E.js} +1 -1
  55. package/dist/{sdkgen-O4XqWOjM.js → sdkgen-BiQCgIEr.js} +1 -1
  56. package/dist/serveCommand-CueKQgzl.js +2443 -0
  57. package/dist/serveCommand-DsnrVN3U.js +2 -0
  58. package/dist/serveEntry.js +1 -1
  59. package/dist/start-BJzZLbt8.js +3 -0
  60. package/dist/start-ekPan8BT.js +1510 -0
  61. package/dist/startEntry.js +1 -1
  62. package/dist/{staticCommand-Dr2M6tpU.js → staticCommand-xlSL-IWk.js} +1 -1
  63. package/dist/{test-rXFq4S76.js → test-BWPQcRoB.js} +1 -1
  64. package/dist/updateCommand-Bqql_rsQ.js +2 -0
  65. package/dist/{updateCommand-Bs322Q78.js → updateCommand-C_8I8Rzo.js} +139 -115
  66. package/dist/webDev-C7jWJ5dX.js +2 -0
  67. package/dist/{webDev-B-ubQEMX.js → webDev-oczpugbx.js} +1767 -913
  68. package/dist/{webhooksCommand-FLYY9IXh.js → webhooksCommand-4SVPDjKg.js} +1 -1
  69. package/package.json +72 -18
  70. package/templates/AGENTS.core.md +11 -0
  71. package/templates/AGENTS.md +19 -6
  72. package/templates/agent-docs/_index.md +8 -6
  73. package/templates/agent-docs/_manifest.json +31 -15
  74. package/templates/agent-docs/ai.md +2 -2
  75. package/templates/agent-docs/authentication.md +1 -1
  76. package/templates/agent-docs/cli.md +97 -15
  77. package/templates/agent-docs/configuration.md +17 -0
  78. package/templates/agent-docs/data.md +680 -33
  79. package/templates/agent-docs/database/advancedqueries.md +7 -7
  80. package/templates/agent-docs/database/columntypes.md +2 -2
  81. package/templates/agent-docs/database/querying.md +1 -1
  82. package/templates/agent-docs/database/schema.md +2 -2
  83. package/templates/agent-docs/database/seedsdialects.md +2 -2
  84. package/templates/agent-docs/database/transactions.md +3 -3
  85. package/templates/agent-docs/deployment.md +30 -3
  86. package/templates/agent-docs/internationalization.md +2 -2
  87. package/templates/agent-docs/introduction.md +52 -0
  88. package/templates/agent-docs/local-first-mobile.md +132 -7
  89. package/templates/agent-docs/observability.md +2 -0
  90. package/templates/agent-docs/plugins/ai-flows.md +1 -1
  91. package/templates/agent-docs/plugins/audit.md +5 -5
  92. package/templates/agent-docs/plugins/auth.md +1 -1
  93. package/templates/agent-docs/plugins/cdc-out.md +2 -2
  94. package/templates/agent-docs/plugins/comments.md +142 -0
  95. package/templates/agent-docs/plugins/notifications.md +47 -4
  96. package/templates/agent-docs/plugins/presence.md +16 -3
  97. package/templates/agent-docs/plugins/prometheus.md +1 -1
  98. package/templates/agent-docs/plugins/queue.md +129 -0
  99. package/templates/agent-docs/plugins/{versioning.md → row-history.md} +22 -22
  100. package/templates/agent-docs/plugins/storage.md +2 -2
  101. package/templates/agent-docs/plugins.md +38 -12
  102. package/templates/agent-docs/reference.md +54 -5
  103. package/templates/agent-docs/routing.md +868 -50
  104. package/templates/agent-docs/schema-driven-ui.md +292 -5
  105. package/templates/agent-docs/security.md +125 -8
  106. package/templates/agent-docs/templates/apibackends.md +14 -14
  107. package/templates/agent-docs/templates/overview.md +1 -1
  108. package/templates/agent-docs/whats-new.md +171 -54
  109. package/templates/apps/api-ai/package.json +6 -7
  110. package/templates/apps/api-ai/tests/summarize.test.ts +1 -1
  111. package/templates/apps/api-auth/package.json +8 -8
  112. package/templates/apps/api-backend/package.json +7 -7
  113. package/templates/apps/api-backend-deactivation/package.json +7 -7
  114. package/templates/apps/api-backend-mail/package.json +8 -8
  115. package/templates/apps/api-backend-mariadb/package.json +9 -9
  116. package/templates/apps/api-backend-sqlite/package.json +8 -8
  117. package/templates/apps/api-backend-storage/package.json +8 -8
  118. package/templates/apps/api-cms/package.json +9 -10
  119. package/templates/apps/api-collab/package.json +8 -8
  120. package/templates/apps/api-data-advanced/package.json +8 -8
  121. package/templates/apps/api-durable/package.json +8 -8
  122. package/templates/apps/api-feature-flags/package.json +9 -9
  123. package/templates/apps/api-governance/package.json +8 -8
  124. package/templates/apps/api-kv/package.json +8 -8
  125. package/templates/apps/api-moderation/package.json +8 -8
  126. package/templates/apps/api-observability/package.json +8 -8
  127. package/templates/apps/api-ratelimit/package.json +8 -8
  128. package/templates/apps/api-rbac/package.json +8 -8
  129. package/templates/apps/api-rest/package.json +7 -7
  130. package/templates/apps/{api-versioning → api-row-history}/README.md +3 -3
  131. package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.server.ts +1 -1
  132. package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.server.ts +1 -1
  133. package/templates/apps/{api-versioning → api-row-history}/app.config.ts +3 -3
  134. package/templates/apps/{api-versioning → api-row-history}/database/schema.ts +1 -1
  135. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.server.ts +1 -1
  136. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.ts +1 -1
  137. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.ts +1 -1
  138. package/templates/apps/{api-versioning → api-row-history}/package.json +8 -8
  139. package/templates/apps/api-row-history/template.json +6 -0
  140. package/templates/apps/{api-versioning → api-row-history}/tests/documents.create.test.ts +1 -1
  141. package/templates/apps/api-saas/app.config.ts +1 -0
  142. package/templates/apps/api-saas/package.json +10 -11
  143. package/templates/apps/api-saas-starter/package.json +10 -10
  144. package/templates/apps/api-search/package.json +8 -8
  145. package/templates/apps/api-status/package.json +8 -8
  146. package/templates/apps/api-webhooks/package.json +9 -9
  147. package/templates/apps/changelog/app.config.ts +26 -2
  148. package/templates/apps/changelog/content/releases/{0.1.0.mdx → v0-1-0.mdx} +0 -1
  149. package/templates/apps/changelog/content/releases/{0.2.0.mdx → v0-2-0.mdx} +0 -1
  150. package/templates/apps/changelog/package.json +8 -8
  151. package/templates/apps/changelog/src/collections/releases.collection.ts +48 -0
  152. package/templates/apps/changelog/src/globals.d.ts +1 -1
  153. package/templates/apps/changelog/src/locales/de.ts +1 -1
  154. package/templates/apps/changelog/src/locales/en.ts +1 -1
  155. package/templates/apps/changelog/src/pages/[locale]/[slug]/page.tsx +7 -4
  156. package/templates/apps/changelog/src/pages/[locale]/mirrors.test.tsx +13 -41
  157. package/templates/apps/changelog/src/pages/[slug]/page.test.tsx +26 -51
  158. package/templates/apps/changelog/src/pages/[slug]/page.tsx +21 -19
  159. package/templates/apps/changelog/src/pages/page.test.tsx +14 -37
  160. package/templates/apps/changelog/src/pages/page.tsx +18 -12
  161. package/templates/apps/edge-functions/package.json +2 -2
  162. package/templates/apps/frontend-admin/package.json +8 -8
  163. package/templates/apps/frontend-app/package.json +9 -9
  164. package/templates/apps/frontend-auth/package.json +8 -8
  165. package/templates/apps/frontend-blank/package.json +7 -7
  166. package/templates/apps/frontend-cms/package.json +9 -9
  167. package/templates/apps/frontend-collab/package.json +10 -10
  168. package/templates/apps/frontend-collab/src/pages/page.test.tsx +10 -9
  169. package/templates/apps/frontend-collab/src/pages/page.tsx +42 -65
  170. package/templates/apps/frontend-contact/package.json +7 -7
  171. package/templates/apps/frontend-dashboard/package.json +7 -7
  172. package/templates/apps/frontend-docs/content/docs/de/guides/first-page.md +4 -0
  173. package/templates/apps/frontend-docs/content/docs/de/intro/getting-started.md +4 -0
  174. package/templates/apps/frontend-docs/content/docs/en/guides/first-page.md +4 -0
  175. package/templates/apps/frontend-docs/content/docs/en/intro/getting-started.md +4 -0
  176. package/templates/apps/frontend-docs/package.json +8 -7
  177. package/templates/apps/frontend-docs/src/collections/docs.collection.ts +21 -0
  178. package/templates/apps/frontend-docs/src/locales/de.ts +0 -5
  179. package/templates/apps/frontend-docs/src/locales/en.ts +0 -5
  180. package/templates/apps/frontend-docs/src/pages/[locale]/docs/[...slug]/page.tsx +17 -9
  181. package/templates/apps/frontend-docs/src/pages/[locale]/mirrors.test.tsx +10 -5
  182. package/templates/apps/frontend-docs/src/pages/[locale]/page.tsx +8 -0
  183. package/templates/apps/frontend-docs/src/pages/docs/[...slug]/page.test.tsx +53 -15
  184. package/templates/apps/frontend-docs/src/pages/docs/[...slug]/page.tsx +27 -33
  185. package/templates/apps/frontend-docs/src/pages/page.test.tsx +17 -3
  186. package/templates/apps/frontend-docs/src/pages/page.tsx +16 -12
  187. package/templates/apps/frontend-i18n/package.json +6 -6
  188. package/templates/apps/frontend-landing/package.json +6 -7
  189. package/templates/apps/frontend-portal/package.json +8 -8
  190. package/templates/apps/frontend-saas/package.json +8 -8
  191. package/templates/apps/frontend-spa/package.json +7 -7
  192. package/templates/apps/frontend-ssr/package.json +7 -7
  193. package/templates/apps/frontend-ssr-api/package.json +8 -8
  194. package/templates/apps/frontend-static-blog/content/posts/cms-to-ssg.md +12 -0
  195. package/templates/apps/frontend-static-blog/content/posts/hello-static.md +12 -0
  196. package/templates/apps/frontend-static-blog/content/posts/islands-not-hydration.md +14 -0
  197. package/templates/apps/frontend-static-blog/package.json +8 -6
  198. package/templates/apps/frontend-static-blog/src/collections/posts.collection.ts +27 -0
  199. package/templates/apps/frontend-static-blog/src/pages/[locale]/blog/[slug]/page.tsx +7 -4
  200. package/templates/apps/frontend-static-blog/src/pages/[locale]/mirrors.test.tsx +7 -1
  201. package/templates/apps/frontend-static-blog/src/pages/blog/[slug]/page.test.tsx +19 -9
  202. package/templates/apps/frontend-static-blog/src/pages/blog/[slug]/page.tsx +19 -21
  203. package/templates/apps/frontend-static-blog/src/pages/page.test.tsx +18 -5
  204. package/templates/apps/frontend-static-blog/src/pages/page.tsx +21 -14
  205. package/templates/apps/frontend-status/package.json +8 -8
  206. package/templates/apps/mobile-app/package.json +4 -4
  207. package/dist/agentsMd-Bu_XQgVf.js +0 -2
  208. package/dist/apiBuild-GDKuGOMV.js +0 -2
  209. package/dist/build-DETLZAFt.js +0 -752
  210. package/dist/checkCommand-CWcnDArJ.js +0 -2
  211. package/dist/codegen-DiMn2KkZ.js +0 -2
  212. package/dist/dbCommand-C27HIsGE.js +0 -2
  213. package/dist/dev-CK522MV5.js +0 -3
  214. package/dist/doctorCommand-BK4l18eG.js +0 -2
  215. package/dist/fileConventions-Cof68_BL.js +0 -33
  216. package/dist/frameworkTableAssembly-CVDB2hCq.js +0 -2
  217. package/dist/inspect-CuGDYES0.js +0 -2
  218. package/dist/inspectMetrics-CfdKLh6t.js +0 -72
  219. package/dist/manifestBuild-CPjhvM62.js +0 -2
  220. package/dist/serveCommand-BRnPCxVd.js +0 -2
  221. package/dist/serveCommand-DdiYNBBu.js +0 -2362
  222. package/dist/start-BLNmWkLa.js +0 -1154
  223. package/dist/start-Dzicuyw8.js +0 -3
  224. package/dist/updateCommand-eXB35SEv.js +0 -2
  225. package/dist/webDev-DposiF3j.js +0 -2
  226. package/templates/apps/api-versioning/template.json +0 -6
  227. package/templates/apps/changelog/scripts/generate-rss.mjs +0 -38
  228. package/templates/apps/changelog/src/lib/releases.ts +0 -21
  229. package/templates/apps/frontend-static-blog/src/content/posts.ts +0 -64
  230. /package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.ts +0 -0
  231. /package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.ts +0 -0
  232. /package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.server.ts +0 -0
  233. /package/templates/apps/{api-versioning → api-row-history}/tsconfig.json +0 -0
@@ -1,3 +1,3 @@
1
1
  import { t as e } from "./loadEnv-D9nEOClM.js";
2
- import { t } from "./start-BLNmWkLa.js";
2
+ import { t } from "./start-ekPan8BT.js";
3
3
  export { e as loadDotEnv, t as runStartCommand };
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./cliRuntime-Dh7UDinH.js";
2
- import { t } from "./renderProfile-1OWWAAtx.js";
2
+ import { t } from "./renderProfile-CskIgAfn.js";
3
3
  import { t as n } from "./commandRunner-BLAEFLjp.js";
4
4
  import { join as r, relative as i, resolve as a } from "node:path";
5
5
  import { Effect as o } from "effect";
@@ -79,7 +79,7 @@ var d = l({ scope: "voltro:test" }), f = (e) => {
79
79
  }, C = async (e) => {
80
80
  let t = m(e);
81
81
  if (!o(t.root)) return console.error(`voltro test: no such directory: ${t.root}`), 1;
82
- let { checkRpcGroupFreshness: n } = await import("./codegen-DiMn2KkZ.js"), r = await n(t.root);
82
+ let { checkRpcGroupFreshness: n } = await import("./codegen-BWpt3VgF.js"), r = await n(t.root);
83
83
  if (r.kind === "stale") return console.error(`voltro test: ${r.file} is stale — ${r.reason}.`), console.error(" The tests would run against the previously generated procedure group, pass, and prove nothing about the descriptors you just edited.\n Run `voltro codegen` (or boot `voltro dev` once) and try again."), 1;
84
84
  d.info("running vitest", {
85
85
  root: t.root,
@@ -0,0 +1,2 @@
1
+ import { m as e, p as t } from "./updateCommand-C_8I8Rzo.js";
2
+ export { t as runApplyCodemods, e as runUpdateCommand };
@@ -1,21 +1,25 @@
1
- import { n as e, r as t, t as n } from "./codemodRunner-BDVixlSw.js";
1
+ import { n as e, r as t, t as n } from "./codemodRunner-BjtB2lq6.js";
2
2
  import { basename as r, dirname as i, join as a, relative as o, resolve as s } from "node:path";
3
3
  import { existsSync as c, readFileSync as l, readdirSync as u, statSync as d, writeFileSync as f } from "node:fs";
4
4
  import { totalmem as p } from "node:os";
5
5
  import { execFileSync as m, spawnSync as h } from "node:child_process";
6
- //#region src/peerAlignment.ts
7
- var g = (e) => {
6
+ //#region src/codemods/packageRenames.ts
7
+ var g = [{
8
+ at: "0.52.0",
9
+ from: "@voltro/plugin-versioning",
10
+ to: "@voltro/plugin-row-history"
11
+ }], _ = (e) => {
8
12
  let t = /^\s*(?:\^|~|>=|=|v)?\s*(\d+)\.(\d+)\.(\d+)/.exec(e);
9
13
  if (t && !/\|\||\s<|\s-\s/.test(e)) return [
10
14
  Number(t[1]),
11
15
  Number(t[2]),
12
16
  Number(t[3])
13
17
  ];
14
- }, _ = (e, t) => e[0] === t[0] ? e[1] === t[1] ? e[2] < t[2] : e[1] < t[1] : e[0] < t[0], v = (e) => e.flatMap(({ name: e, peerDependencies: t }) => Object.entries(t ?? {}).filter(([e]) => !e.startsWith("@voltro/")).map(([t, n]) => ({
18
+ }, v = (e, t) => e[0] === t[0] ? e[1] === t[1] ? e[2] < t[2] : e[1] < t[1] : e[0] < t[0], y = (e) => e.flatMap(({ name: e, peerDependencies: t }) => Object.entries(t ?? {}).filter(([e]) => !e.startsWith("@voltro/")).map(([t, n]) => ({
15
19
  peer: t,
16
20
  range: n,
17
21
  requiredBy: e
18
- }))), y = (e, t) => {
22
+ }))), b = (e, t) => {
19
23
  let n = /* @__PURE__ */ new Map();
20
24
  for (let e of t) {
21
25
  let t = n.get(e.peer);
@@ -25,7 +29,7 @@ var g = (e) => {
25
29
  for (let [e, t] of n) {
26
30
  let n = t.map((e) => ({
27
31
  r: e,
28
- floor: g(e.range)
32
+ floor: _(e.range)
29
33
  })).filter((e) => e.floor !== void 0);
30
34
  if (n.length !== 0) {
31
35
  if (new Set(n.map((e) => e.r.range)).size > 1) {
@@ -44,8 +48,8 @@ var g = (e) => {
44
48
  if (r) for (let [n, o] of i) {
45
49
  let i = r[n];
46
50
  if (i === void 0) continue;
47
- let s = g(i), c = g(o.range);
48
- !s || !c || _(s, c) && a.push({
51
+ let s = _(i), c = _(o.range);
52
+ !s || !c || v(s, c) && a.push({
49
53
  path: t,
50
54
  section: e,
51
55
  peer: n,
@@ -58,21 +62,21 @@ var g = (e) => {
58
62
  alignments: a,
59
63
  conflicts: r
60
64
  };
61
- }, b = (e, t) => {
65
+ }, x = (e, t) => {
62
66
  for (let n of t.alignments) {
63
67
  let t = e.find((e) => e.path === n.path);
64
68
  if (!t) continue;
65
69
  let r = t.pkg[n.section];
66
70
  r && n.peer in r && (r[n.peer] = n.to);
67
71
  }
68
- }, x = (e, t, n) => {
72
+ }, S = (e, t, n) => {
69
73
  let r = /* @__PURE__ */ new Set(), i = [];
70
74
  for (let a of e) {
71
75
  if (t.has(a.peer) || r.has(a.peer)) continue;
72
76
  let e = n(a.peer);
73
77
  if (e === void 0) continue;
74
- let o = g(a.range), s = g(e);
75
- !o || !s || !_(s, o) || (r.add(a.peer), i.push({
78
+ let o = _(a.range), s = _(e);
79
+ !o || !s || !v(s, o) || (r.add(a.peer), i.push({
76
80
  peer: a.peer,
77
81
  required: a.range,
78
82
  installed: e,
@@ -80,18 +84,18 @@ var g = (e) => {
80
84
  }));
81
85
  }
82
86
  return i;
83
- }, S = /^(workspace:|catalog:|link:|file:|npm:|portal:)/, C = /* @__PURE__ */ new Set([
87
+ }, C = /^(workspace:|catalog:|link:|file:|npm:|portal:)/, w = /* @__PURE__ */ new Set([
84
88
  "pnpm",
85
89
  "npm",
86
90
  "yarn",
87
91
  "bun"
88
- ]), w = [
92
+ ]), T = [
89
93
  ["pnpm-lock.yaml", "pnpm"],
90
94
  ["yarn.lock", "yarn"],
91
95
  ["bun.lock", "bun"],
92
96
  ["bun.lockb", "bun"],
93
97
  ["package-lock.json", "npm"]
94
- ], T = (e) => {
98
+ ], E = (e) => {
95
99
  let t = [], n = s(e);
96
100
  for (; t.push(n), !c(a(n, ".git"));) {
97
101
  let e = i(n);
@@ -99,21 +103,21 @@ var g = (e) => {
99
103
  n = e;
100
104
  }
101
105
  return t;
102
- }, E = (e) => {
103
- for (let t of T(e)) {
106
+ }, D = (e) => {
107
+ for (let t of E(e)) {
104
108
  let e = a(t, "package.json");
105
109
  if (c(e)) try {
106
110
  let t = JSON.parse(l(e, "utf8")).packageManager;
107
111
  if (typeof t == "string") {
108
112
  let e = t.split("@")[0]?.trim();
109
- if (e && C.has(e)) return e;
113
+ if (e && w.has(e)) return e;
110
114
  }
111
115
  } catch {}
112
- for (let [e, n] of w) if (c(a(t, e))) return n;
116
+ for (let [e, n] of T) if (c(a(t, e))) return n;
113
117
  }
114
118
  return "npm";
115
- }, D = 4, O = (e) => {
116
- for (let t of T(e)) {
119
+ }, O = 4, k = (e) => {
120
+ for (let t of E(e)) {
117
121
  if (c(a(t, "pnpm-workspace.yaml")) || c(a(t, "pnpm-workspace.yml"))) return t;
118
122
  let e = a(t, "package.json");
119
123
  if (c(e)) try {
@@ -121,10 +125,10 @@ var g = (e) => {
121
125
  if (Array.isArray(n) ? n.length > 0 : typeof n == "object" && n) return t;
122
126
  } catch {}
123
127
  }
124
- }, k = (e) => {
128
+ }, A = (e) => {
125
129
  let n = [], r = (e, i) => {
126
130
  let o = a(e, "package.json");
127
- if (c(o) && n.push(o), i >= D) return;
131
+ if (c(o) && n.push(o), i >= O) return;
128
132
  let s;
129
133
  try {
130
134
  s = u(e);
@@ -143,7 +147,7 @@ var g = (e) => {
143
147
  }
144
148
  };
145
149
  return r(s(e), 0), n;
146
- }, A = (e) => {
150
+ }, ee = (e) => {
147
151
  try {
148
152
  return m("git", ["status", "--porcelain"], {
149
153
  cwd: e,
@@ -226,20 +230,33 @@ var g = (e) => {
226
230
  ]]];
227
231
  }, I = (e) => {
228
232
  try {
229
- let t = JSON.parse(e)?.codemods;
230
- if (!Array.isArray(t)) return;
231
- let n = [];
232
- for (let e of t) {
233
+ let t = JSON.parse(e), n = t?.codemods;
234
+ if (!Array.isArray(n)) return;
235
+ let r = [];
236
+ for (let e of n) {
233
237
  let t = e;
234
238
  if (typeof t.version != "string" || typeof t.id != "string") return;
235
- n.push({
239
+ r.push({
236
240
  version: t.version,
237
241
  id: t.id,
238
242
  title: typeof t.title == "string" ? t.title : t.id,
239
243
  kind: t.kind === "transform" ? "transform" : "manual"
240
244
  });
241
245
  }
242
- return n;
246
+ let i = t?.renames, a = [];
247
+ if (Array.isArray(i)) for (let e of i) {
248
+ let t = e;
249
+ if (typeof t.at != "string" || typeof t.from != "string" || typeof t.to != "string") return;
250
+ a.push({
251
+ at: t.at,
252
+ from: t.from,
253
+ to: t.to
254
+ });
255
+ }
256
+ return {
257
+ codemods: r,
258
+ renames: a
259
+ };
243
260
  } catch {
244
261
  return;
245
262
  }
@@ -256,16 +273,16 @@ var g = (e) => {
256
273
  }));
257
274
  if (e !== void 0) return e;
258
275
  } catch {}
259
- }, R = (e, t, r) => e.filter((e) => n(t, e.version) < 0 && n(e.version, r) <= 0), z = (e, t = "npm") => {
276
+ }, R = (e, t, r) => e.filter((e) => n(t, e.version) < 0 && n(e.version, r) <= 0), z = (e, t, r) => e.filter((e) => n(t, e.at) < 0 && n(e.at, r) <= 0), B = (e, t = "npm") => {
260
277
  for (let [n, r] of P(e, t, t === "yarn" ? N() : 1)) {
261
278
  let e = M(n, r);
262
279
  if (e) return e;
263
280
  }
264
- }, B = (e) => JSON.parse(l(e, "utf8")), V = [
281
+ }, V = (e) => JSON.parse(l(e, "utf8")), H = [
265
282
  "app.config.ts",
266
283
  "app.config.tsx",
267
284
  "app.config.js"
268
- ], H = (e) => {
285
+ ], U = (e) => {
269
286
  let t = s(e);
270
287
  for (;;) {
271
288
  let e = i(t);
@@ -273,15 +290,15 @@ var g = (e) => {
273
290
  t = e;
274
291
  let n = a(t, "package.json");
275
292
  if (c(n)) try {
276
- if (W(B(n)).length > 0) return t;
293
+ if (G(V(n)).length > 0) return t;
277
294
  } catch {}
278
295
  }
279
- }, U = (e) => {
296
+ }, W = (e) => {
280
297
  let t = a(e, "node_modules", "@voltro", "cli", "package.json");
281
298
  if (!c(t)) return;
282
- let n = B(t).version;
299
+ let n = V(t).version;
283
300
  return typeof n == "string" ? n : void 0;
284
- }, W = (e) => {
301
+ }, G = (e) => {
285
302
  let t = [];
286
303
  for (let n of ["dependencies", "devDependencies"]) {
287
304
  let r = e[n];
@@ -292,26 +309,26 @@ var g = (e) => {
292
309
  });
293
310
  }
294
311
  return t;
295
- }, G = (e, t, n, i) => {
312
+ }, te = (e, t, n, i) => {
296
313
  let s = a(e, "node_modules", "@voltro");
297
314
  if (!c(s)) return 0;
298
315
  let l = [];
299
316
  for (let e of u(s)) {
300
317
  let t = a(s, e, "package.json");
301
318
  if (c(t)) try {
302
- let n = B(t);
319
+ let n = V(t);
303
320
  l.push({
304
321
  name: n.name ?? `@voltro/${e}`,
305
322
  peerDependencies: n.peerDependencies
306
323
  });
307
324
  } catch {}
308
325
  }
309
- let d = v(l), p = y(t, d), m = /* @__PURE__ */ new Set();
326
+ let d = y(l), p = b(t, d), m = /* @__PURE__ */ new Set();
310
327
  for (let { pkg: e } of t) for (let t of ["dependencies", "devDependencies"]) for (let n of Object.keys(e[t] ?? {})) m.add(n);
311
- let h = x(d, m, (t) => {
328
+ let h = S(d, m, (t) => {
312
329
  let n = a(e, "node_modules", ...t.split("/"), "package.json");
313
330
  if (c(n)) try {
314
- return B(n).version;
331
+ return V(n).version;
315
332
  } catch {
316
333
  return;
317
334
  }
@@ -329,42 +346,51 @@ var g = (e) => {
329
346
  if (p.alignments.length === 0) return 0;
330
347
  console.log("\nAligning peer dependencies the framework requires:");
331
348
  for (let t of p.alignments) console.log(` ${t.peer} ${t.from} → ${t.to} (${o(e, t.path) || r(t.path)})`);
332
- b(t, p);
349
+ x(t, p);
333
350
  let g = new Set(p.alignments.map((e) => e.path));
334
351
  for (let e of t) g.has(e.path) && f(e.path, JSON.stringify(e.pkg, null, 2) + "\n");
335
352
  console.log(`\nRe-installing with ${n} so the aligned ranges resolve…`);
336
353
  let _ = i(n, e);
337
354
  return _ !== 0 && (console.error(`\nvoltro update: ${n} install failed after aligning peer dependencies.`), console.error(" The package.json changes above ARE written; re-run the install yourself.")), _;
338
- }, K = (e, t, n) => W(e).map(({ name: e, spec: r }) => S.test(r) ? {
339
- name: e,
340
- from: r,
341
- to: r,
342
- skipped: "non-registry spec"
343
- } : {
344
- name: e,
345
- from: r,
346
- to: `${n ? "" : /^[\^~]/.exec(r)?.[0] ?? ""}${t}`
347
- }), ee = (e, t) => {
355
+ }, K = (e, t, n, r = []) => G(e).map(({ name: e, spec: i }) => {
356
+ if (C.test(i)) return {
357
+ name: e,
358
+ from: i,
359
+ to: i,
360
+ skipped: "non-registry spec"
361
+ };
362
+ let a = n ? "" : /^[\^~]/.exec(i)?.[0] ?? "", o = r.find((t) => t.from === e);
363
+ return o === void 0 ? {
364
+ name: e,
365
+ from: i,
366
+ to: `${a}${t}`
367
+ } : {
368
+ name: e,
369
+ from: i,
370
+ to: `${a}${t}`,
371
+ renamedTo: o.to
372
+ };
373
+ }), ne = (e, t) => {
348
374
  for (let n of t) if (!n.skipped) for (let t of ["dependencies", "devDependencies"]) {
349
375
  let r = e[t];
350
- r && n.name in r && (r[n.name] = n.to);
376
+ r && n.name in r && (n.renamedTo === void 0 ? r[n.name] = n.to : (delete r[n.name], r[n.renamedTo] = n.to));
351
377
  }
352
- }, q = (e, t, n) => e.map(({ path: e, pkg: r }) => ({
378
+ }, q = (e, t, n, r = []) => e.map(({ path: e, pkg: i }) => ({
353
379
  path: e,
354
- entries: K(r, t, n)
380
+ entries: K(i, t, n, r)
355
381
  })).filter((e) => e.entries.length > 0), J = (e, t) => {
356
382
  let n = new Map(e.map((e) => [e.path, e])), r = [];
357
383
  for (let e of t) {
358
384
  let t = n.get(e.path);
359
- t && (ee(t.pkg, e.entries), r.push(t));
385
+ t && (ne(t.pkg, e.entries), r.push(t));
360
386
  }
361
387
  return r;
362
- }, te = /* @__PURE__ */ new Set([
388
+ }, re = /* @__PURE__ */ new Set([
363
389
  "--to",
364
390
  "--from",
365
391
  "--root",
366
392
  "--only"
367
- ]), ne = /* @__PURE__ */ new Set([
393
+ ]), ie = /* @__PURE__ */ new Set([
368
394
  "--dry-run",
369
395
  "--force",
370
396
  "--exact",
@@ -373,7 +399,7 @@ var g = (e) => {
373
399
  "--no-install",
374
400
  "--help",
375
401
  "-h"
376
- ]), re = (e) => {
402
+ ]), ae = (e) => {
377
403
  let t, n, r = process.cwd(), i = [], a = [], o = [], c = (e) => {
378
404
  for (let t of e.split(",")) t.length > 0 && a.push(t);
379
405
  };
@@ -381,13 +407,13 @@ var g = (e) => {
381
407
  let l = e[a];
382
408
  if (l === void 0) continue;
383
409
  let u = l.indexOf("="), d = u > 0 ? l.slice(0, u) : l, f = u > 0 ? l.slice(u + 1) : void 0;
384
- if (te.has(d)) {
410
+ if (re.has(d)) {
385
411
  let i = f ?? e[++a] ?? "";
386
412
  d === "--to" ? t = i : d === "--from" ? n = i : d === "--root" ? r = s(i === "" ? "." : i) : c(i);
387
413
  continue;
388
414
  }
389
415
  if (d.startsWith("-")) {
390
- ne.has(d) || o.push(d);
416
+ ie.has(d) || o.push(d);
391
417
  continue;
392
418
  }
393
419
  i.push(l);
@@ -404,24 +430,24 @@ var g = (e) => {
404
430
  ...t === void 0 ? {} : { to: t },
405
431
  ...n === void 0 ? {} : { from: n }
406
432
  };
407
- }, Y = "voltro update [app] [flags]\n\nUpgrade an app to a newer framework release: bump every @voltro/* dependency,\ninstall, and run the codemods shipped with the target version.\n\nIn a workspace (pnpm-workspace.yaml, or a package.json \"workspaces\" field),\nEVERY member package.json that declares @voltro/* is bumped in lockstep and the\ninstall runs once at the workspace root — so api / web / shared packages never\nend up on different framework versions.\n\nFlags:\n --to <version> Target version (default: the latest published version).\n --from <version> Source version — overrides the detected installed version.\n Use it after a hand-edited bump so the codemods for the\n delta you actually crossed still run.\n --root <dir> App directory to update (default: the current directory).\n A positional [app] does the same.\n --dry-run Print the plan — every package.json that would be bumped,\n plus the codemods the target version puts IN RANGE — and\n write nothing. Installs nothing. Allowed on a dirty tree,\n which is the point: it is how you decide whether to stash.\n --force Proceed on a dirty working tree, and re-run even when the\n installed version already equals the target.\n --exact Pin exact versions (drop the ^ / ~ range prefix).\n --no-install Write the version bump, then stop — do not run the package\n manager. For a containerised / offline install: run your own\n install, then: voltro update --codemods-only --from <old>\n\n --only <id> Run only the named codemod(s) — repeatable, or comma-\n separated. Ids are what --dry-run prints. Combine with\n --codemods-only to take the load-bearing half first.\n\n --codemods-only Run ONLY the codemods for [from, to] against the installed\n tree — no version bump, no install. The recovery path after\n a manual bump, or after a failed install. Alias:\n --run-codemods.\n\nMemory: the codemod pass parses source, so it wants heap in proportion to the\nfiles it touches. It sizes the child's --max-old-space-size from THIS machine —\nnode's own default caps near 4 GB however much RAM is installed — so you should\nnot need to set anything. If it still runs out it says so and names the knob;\nNODE_OPTIONS=--max-old-space-size=<MB> overrides, and --only / --root narrow the\npass instead of enlarging it.\n -h, --help Print this help.\n\nExamples:\n voltro update\n voltro update --to 0.6.0 --dry-run\n voltro update --codemods-only --from 0.5.0 --to 0.6.0\n\nAfter updating: run `voltro db apply` (NOT db migrate) to reconcile changed\nframework tables, then your typecheck.", ie = (e) => e.includes("--help") || e.includes("-h"), ae = async (e, t = {}) => {
408
- let n = t.latestVersion ?? z, i = t.isGitClean ?? A, s = t.install ?? ((e, t) => h(e, ["install"], {
433
+ }, Y = "voltro update [app] [flags]\n\nUpgrade an app to a newer framework release: bump every @voltro/* dependency,\ninstall, and run the codemods shipped with the target version.\n\nIn a workspace (pnpm-workspace.yaml, or a package.json \"workspaces\" field),\nEVERY member package.json that declares @voltro/* is bumped in lockstep and the\ninstall runs once at the workspace root — so api / web / shared packages never\nend up on different framework versions.\n\nFlags:\n --to <version> Target version (default: the latest published version).\n --from <version> Source version — overrides the detected installed version.\n Use it after a hand-edited bump so the codemods for the\n delta you actually crossed still run.\n --root <dir> App directory to update (default: the current directory).\n A positional [app] does the same.\n --dry-run Print the plan — every package.json that would be bumped,\n plus the codemods the target version puts IN RANGE — and\n write nothing. Installs nothing. Allowed on a dirty tree,\n which is the point: it is how you decide whether to stash.\n --force Proceed on a dirty working tree, and re-run even when the\n installed version already equals the target.\n --exact Pin exact versions (drop the ^ / ~ range prefix).\n --no-install Write the version bump, then stop — do not run the package\n manager. For a containerised / offline install: run your own\n install, then: voltro update --codemods-only --from <old>\n\n --only <id> Run only the named codemod(s) — repeatable, or comma-\n separated. Ids are what --dry-run prints. Combine with\n --codemods-only to take the load-bearing half first.\n\n --codemods-only Run ONLY the codemods for [from, to] against the installed\n tree — no version bump, no install. The recovery path after\n a manual bump, or after a failed install. Alias:\n --run-codemods.\n\nMemory: the codemod pass parses source, so it wants heap in proportion to the\nfiles it touches. It sizes the child's --max-old-space-size from THIS machine —\nnode's own default caps near 4 GB however much RAM is installed — so you should\nnot need to set anything. If it still runs out it says so and names the knob;\nNODE_OPTIONS=--max-old-space-size=<MB> overrides, and --only / --root narrow the\npass instead of enlarging it.\n -h, --help Print this help.\n\nExamples:\n voltro update\n voltro update --to 0.6.0 --dry-run\n voltro update --codemods-only --from 0.5.0 --to 0.6.0\n\nAfter updating: run `voltro db apply` (NOT db migrate) to reconcile changed\nframework tables, then your typecheck.", oe = (e) => e.includes("--help") || e.includes("-h"), se = async (e, t = {}) => {
434
+ let n = t.latestVersion ?? B, i = t.isGitClean ?? ee, s = t.install ?? ((e, t) => h(e, ["install"], {
409
435
  cwd: t,
410
436
  stdio: "inherit"
411
437
  }).status ?? 1);
412
- if (ie(e)) return console.log(Y), 0;
413
- let l = re(e);
438
+ if (oe(e)) return console.log(Y), 0;
439
+ let l = ae(e);
414
440
  if (l.unknownFlags.length > 0) return console.error(`voltro update: unknown flag ${l.unknownFlags.join(", ")}`), console.error(" Run `voltro update --help` for the flags this command accepts."), 1;
415
441
  let u = a(l.root, "package.json");
416
442
  if (!c(u)) {
417
- let e = V.find((e) => c(a(l.root, e))), t = e === void 0 ? void 0 : H(l.root);
443
+ let e = H.find((e) => c(a(l.root, e))), t = e === void 0 ? void 0 : U(l.root);
418
444
  return e !== void 0 && t !== void 0 ? (console.error(`voltro update: ${e} is here, but this directory has no package.json.`), console.error(" That is a supported layout — one root manifest, apps carrying only their"), console.error(" app.config.ts. The bump belongs to the manifest that declares @voltro/*, and"), console.error(" the codemods run across every app beneath it:"), console.error(` voltro update --root ${t}`), 1) : (console.error(`voltro update: no package.json at ${l.root}`), 1);
419
445
  }
420
- let d = B(u), p = W(d);
446
+ let d = V(u), p = G(d);
421
447
  if (p.length === 0) {
422
- let e = V.find((e) => c(a(l.root, e)));
448
+ let e = H.find((e) => c(a(l.root, e)));
423
449
  if (e !== void 0) {
424
- let t = H(l.root);
450
+ let t = U(l.root);
425
451
  return console.error(`voltro update: ${e} is here, but ${r(u)} declares no @voltro/* dependency.`), console.error(" This IS a Voltro app — its dependencies are just declared further up, which"), console.error(" is a supported layout (one root manifest, apps carrying only app.config.ts)."), console.error(" Nothing can be bumped HERE: a bump rewrites dependency ranges, and this file"), console.error(" has none."), t === void 0 ? (console.error(" No ancestor package.json declares @voltro/* either. Add the dependencies to"), console.error(" the manifest that owns this workspace, then run update from there.")) : (console.error(" Run it where they are declared — that manifest covers every app beneath it:"), console.error(` voltro update --root ${t}`)), 1;
426
452
  }
427
453
  return console.error("voltro update: no @voltro/* dependencies here — not a Voltro app."), 1;
@@ -430,78 +456,76 @@ var g = (e) => {
430
456
  if (l.codemodsOnly) console.warn("voltro update: working tree is not clean — the codemod diff will be mixed in"), console.warn(" with your existing changes. Review with `git diff` before committing; the"), console.warn(" codemods rewrite source and nothing here separates their edits from yours."), console.warn(" (Use --dry-run first, or --only <id> to take one codemod at a time.)");
431
457
  else return console.error("voltro update: working tree is not clean. Commit/stash first so you can review the"), console.error(" codemod diff — or re-run with --force (not recommended) or --dry-run (preview only)."), console.error(" Only running the codemods? `--codemods-only` proceeds on a dirty tree with a warning —"), console.error(" it rewrites source without bumping or installing."), 1;
432
458
  }
433
- let m = O(l.root), g = m ?? l.root, _ = () => U(l.root) ?? (m ? U(m) : void 0), v = l.from ?? _() ?? /^\d+\.\d+\.\d+$/.exec(p.find((e) => e.name === "@voltro/cli")?.spec.replace(/^[\^~]/, "") ?? "")?.[0];
434
- if (!v) return console.error("voltro update: could not determine the source framework version."), console.error(" Run your package manager install first, or pass --from <version>."), 1;
435
- let y = E(l.root), b = l.to ?? (l.codemodsOnly ? _() : void 0) ?? n("@voltro/cli", y);
436
- if (!b) return console.error(`voltro update: could not resolve the latest @voltro/cli version via ${y}.`), console.error(" Pin an explicit target with --to <version>."), 1;
437
- if (l.codemodsOnly) return v === b ? (console.log(`voltro update: --codemods-only with from === to (${b}) — no delta, nothing to apply.`), console.log(" Pass --from <earlier-version> to re-run the codemods you skipped."), 0) : (console.log(`voltro update: re-applying codemods ${v} → ${b} (no version bump)…`), $([
459
+ let m = k(l.root), _ = m ?? l.root, v = () => W(l.root) ?? (m ? W(m) : void 0), y = l.from ?? v() ?? /^\d+\.\d+\.\d+$/.exec(p.find((e) => e.name === "@voltro/cli")?.spec.replace(/^[\^~]/, "") ?? "")?.[0];
460
+ if (!y) return console.error("voltro update: could not determine the source framework version."), console.error(" Run your package manager install first, or pass --from <version>."), 1;
461
+ let b = D(l.root), x = l.to ?? (l.codemodsOnly ? v() : void 0) ?? n("@voltro/cli", b);
462
+ if (!x) return console.error(`voltro update: could not resolve the latest @voltro/cli version via ${b}.`), console.error(" Pin an explicit target with --to <version>."), 1;
463
+ if (l.codemodsOnly) return y === x ? (console.log(`voltro update: --codemods-only with from === to (${x}) — no delta, nothing to apply.`), console.log(" Pass --from <earlier-version> to re-run the codemods you skipped."), 0) : (console.log(`voltro update: re-applying codemods ${y} → ${x} (no version bump)…`), $([
438
464
  "--root",
439
465
  l.root,
440
466
  "--from",
441
- v,
467
+ y,
442
468
  "--to",
443
- b,
469
+ x,
444
470
  ...l.dryRun ? ["--dry-run"] : [],
445
471
  ...l.only.length > 0 ? ["--only", l.only.join(",")] : []
446
472
  ]));
447
- if (v === b && !l.force) return console.log(`voltro update: already on ${b} — nothing to do.`), console.log(" (Bumped @voltro/* by hand? Re-run the skipped codemods with"), console.log(" `voltro update --codemods-only --from <earlier-version>`.)"), 0;
448
- let x = [u, ...m ? k(m) : []], S = [], C = /* @__PURE__ */ new Set();
449
- for (let e of x) if (!C.has(e)) {
450
- if (C.add(e), e === u) {
451
- S.push({
473
+ if (y === x && !l.force) return console.log(`voltro update: already on ${x} — nothing to do.`), console.log(" (Bumped @voltro/* by hand? Re-run the skipped codemods with"), console.log(" `voltro update --codemods-only --from <earlier-version>`.)"), 0;
474
+ let S = [u, ...m ? A(m) : []], C = [], w = /* @__PURE__ */ new Set();
475
+ for (let e of S) if (!w.has(e)) {
476
+ if (w.add(e), e === u) {
477
+ C.push({
452
478
  path: e,
453
479
  pkg: d
454
480
  });
455
481
  continue;
456
482
  }
457
483
  try {
458
- S.push({
484
+ C.push({
459
485
  path: e,
460
- pkg: B(e)
486
+ pkg: V(e)
461
487
  });
462
488
  } catch {}
463
489
  }
464
- let w = q(S, b, l.exact);
465
- console.log(`voltro update: ${v} → ${b}`);
466
- let T = w.length > 1;
467
- m && console.log(` workspace: ${m} (${w.length} package.json with @voltro/* deps)`);
468
- for (let e of w) {
469
- let t = T ? " " : " ";
470
- T && console.log(` ${o(g, e.path) || e.path}`);
471
- for (let n of e.entries.filter((e) => !e.skipped)) console.log(`${t}${n.name}: ${n.from} → ${n.to}`);
490
+ let T = L(x, b), E = z(T?.renames ?? g, y, x), O = q(C, x, l.exact, E);
491
+ console.log(`voltro update: ${y} → ${x}`);
492
+ let j = O.length > 1;
493
+ m && console.log(` workspace: ${m} (${O.length} package.json with @voltro/* deps)`);
494
+ for (let e of O) {
495
+ let t = j ? " " : " ";
496
+ j && console.log(` ${o(_, e.path) || e.path}`);
497
+ for (let n of e.entries.filter((e) => !e.skipped)) console.log(n.renamedTo === void 0 ? `${t}${n.name}: ${n.from} → ${n.to}` : `${t}${n.name} → ${n.renamedTo}: ${n.from} → ${n.to} (renamed in this release)`);
472
498
  for (let n of e.entries.filter((e) => e.skipped)) console.log(`${t}${n.name}: kept (${n.skipped})`);
473
499
  }
474
- console.log(` package manager: ${y}`), console.log(` install runs in: ${g}`);
475
- let D = L(b, y);
476
- if (D === void 0) console.log(` codemods: applied from ${b} after install`), console.log(` (could not preview — ${b} publishes no codemod manifest, or the registry`), console.log(" could not be reached. This is NOT the same as \"no codemods\".)");
500
+ if (console.log(` package manager: ${b}`), console.log(` install runs in: ${_}`), T === void 0) console.log(` codemods: applied from ${x} after install`), console.log(` (could not preview — ${x} publishes no codemod manifest, or the registry`), console.log(" could not be reached. This is NOT the same as \"no codemods\".)");
477
501
  else {
478
- let e = R(D, v, b);
479
- if (e.length === 0) console.log(` codemods: none in range for ${v} → ${b}`);
502
+ let e = R(T.codemods, y, x);
503
+ if (e.length === 0) console.log(` codemods: none in range for ${y} → ${x}`);
480
504
  else {
481
- console.log(` codemods: ${e.length} in range for ${v} → ${b}`);
505
+ console.log(` codemods: ${e.length} in range for ${y} → ${x}`);
482
506
  for (let t of e) console.log(` ${t.kind === "transform" ? "✎" : "☰"} ${t.id} — ${t.title}`);
483
507
  console.log(" ✎ rewrites source · ☰ prints written steps"), console.log(" In RANGE, not necessarily applicable: each one still tests your source"), console.log(" before doing anything. This is the upper bound on what a run can touch.");
484
508
  }
485
509
  }
486
510
  if (l.dryRun) return console.log("\n(dry-run — nothing written, nothing installed.)"), 0;
487
- for (let e of J(S, w)) f(e.path, JSON.stringify(e.pkg, null, 2) + "\n");
488
- if (l.noInstall) return console.log(`\nvoltro update: bumped ${w.length} package.json to ${b}. Install NOT run (--no-install).`), console.log(" The tree is half-upgraded until you finish both steps:"), console.log(" 1. install however this project installs (container, CI image, offline mirror)"), console.log(` 2. voltro update --codemods-only --from ${v} --to ${b}`), console.log(" Step 2 is not optional: the codemods for this jump ship INSIDE the target"), console.log(" version, so nothing could have run them before the install put them on disk."), 0;
489
- console.log(`\nInstalling with ${y} in ${g}…`);
490
- let j = s(y, g);
491
- if (j !== 0) return console.error(`\nvoltro update: ${y} install failed in ${g}.`), console.error(` • package.json was bumped to ${b} (${w.length} file${w.length === 1 ? "" : "s"}).`), console.error(" • CODEMODS WERE NOT APPLIED — they ship inside the target version, which the"), console.error(" failed install did not put on disk, so there was nothing to run."), console.error(" Fix the install, re-run it, then apply the codemods you are missing:"), console.error(` voltro update --codemods-only --from ${v} --to ${b}`), console.error(" If this project's install CANNOT run on this host — a containerised install"), console.error(" with its own store, an offline mirror — use `--no-install` next time: it writes"), console.error(" the bump, says so, and leaves the install to you."), j;
492
- let M = G(g, S, y, s);
493
- if (M !== 0) return M;
494
- let N = [l.root, g].map((e) => a(e, "node_modules", ".bin", "voltro")).find((e) => c(e));
495
- if (N) {
511
+ for (let e of J(C, O)) f(e.path, JSON.stringify(e.pkg, null, 2) + "\n");
512
+ if (l.noInstall) return console.log(`\nvoltro update: bumped ${O.length} package.json to ${x}. Install NOT run (--no-install).`), console.log(" The tree is half-upgraded until you finish both steps:"), console.log(" 1. install however this project installs (container, CI image, offline mirror)"), console.log(` 2. voltro update --codemods-only --from ${y} --to ${x}`), console.log(" Step 2 is not optional: the codemods for this jump ship INSIDE the target"), console.log(" version, so nothing could have run them before the install put them on disk."), 0;
513
+ console.log(`\nInstalling with ${b} in ${_}…`);
514
+ let M = s(b, _);
515
+ if (M !== 0) return console.error(`\nvoltro update: ${b} install failed in ${_}.`), console.error(` • package.json was bumped to ${x} (${O.length} file${O.length === 1 ? "" : "s"}).`), console.error(" • CODEMODS WERE NOT APPLIED — they ship inside the target version, which the"), console.error(" failed install did not put on disk, so there was nothing to run."), T === void 0 && (console.error(" • The manifest could not be fetched, so a package RENAMED in the target"), console.error(" would still be pinned under its OLD name here — that reads as"), console.error(" NO_MATCHING_VERSION on a package whose latest is the previous release."), console.error(" If that is this failure: rename the dependency in package.json, install,"), console.error(" then run the codemods below.")), console.error(" Fix the install, re-run it, then apply the codemods you are missing:"), console.error(` voltro update --codemods-only --from ${y} --to ${x}`), console.error(" If this project's install CANNOT run on this host — a containerised install"), console.error(" with its own store, an offline mirror — use `--no-install` next time: it writes"), console.error(" the bump, says so, and leaves the install to you."), M;
516
+ let N = te(_, C, b, s);
517
+ if (N !== 0) return N;
518
+ let P = [l.root, _].map((e) => a(e, "node_modules", ".bin", "voltro")).find((e) => c(e));
519
+ if (P) {
496
520
  console.log("\nApplying codemods…");
497
- let e = h(N, [
521
+ let e = h(P, [
498
522
  "_apply-codemods",
499
523
  "--root",
500
524
  l.root,
501
525
  "--from",
502
- v,
526
+ y,
503
527
  "--to",
504
- b,
528
+ x,
505
529
  ...l.only.length > 0 ? ["--only", l.only.join(",")] : []
506
530
  ], {
507
531
  cwd: l.root,
@@ -516,9 +540,9 @@ var g = (e) => {
516
540
  "--root",
517
541
  l.root,
518
542
  "--from",
519
- v,
543
+ y,
520
544
  "--to",
521
- b,
545
+ x,
522
546
  ...l.only.length > 0 ? ["--only", l.only.join(",")] : []
523
547
  ]);
524
548
  return console.log("\n✓ update complete. Next:"), console.log(" • voltro db apply # reconcile any changed framework tables (NOT db migrate)"), console.log(" • <your typecheck> # verify the codemods + your code compile against the new API"), 0;
@@ -548,7 +572,7 @@ with \`--only\` / \`--root\`.`;
548
572
  }
549
573
  }
550
574
  return n;
551
- }, oe = (e) => {
575
+ }, ce = (e) => {
552
576
  let t = (t) => Q(e, t)[0];
553
577
  return {
554
578
  root: s(t("--root") ?? process.cwd()),
@@ -558,7 +582,7 @@ with \`--only\` / \`--root\`.`;
558
582
  only: Q(e, "--only").flatMap((e) => e.split(",")).filter((e) => e.length > 0)
559
583
  };
560
584
  }, $ = async (t) => {
561
- let n = oe(t), r = await e({
585
+ let n = ce(t), r = await e({
562
586
  root: n.root,
563
587
  from: n.from,
564
588
  to: n.to,
@@ -585,4 +609,4 @@ with \`--only\` / \`--root\`.`;
585
609
  return n.dryRun && console.log("\n(dry-run — no files written)"), 0;
586
610
  };
587
611
  //#endregion
588
- export { X as a, O as c, q as d, $ as f, k as g, Z as h, R as i, F as l, P as m, H as n, E as o, ae as p, J as r, L as s, Y as t, K as u };
612
+ export { A as _, X as a, k as c, q as d, z as f, Z as g, P as h, R as i, F as l, se as m, U as n, D as o, $ as p, J as r, L as s, Y as t, K as u };
@@ -0,0 +1,2 @@
1
+ import { p as e, x as t, y as n } from "./webDev-oczpugbx.js";
2
+ export { e as loadConfig, n as tryRunWebServe, t as walkPagesTree };