@voltro/cli 0.37.0 → 0.39.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 (183) hide show
  1. package/CHANGELOG.md +316 -0
  2. package/THIRD-PARTY-NOTICES.md +80 -45
  3. package/dist/{addCommand-BNeoeSxe.js → addCommand-C05L9tZh.js} +2 -2
  4. package/dist/addCommand-C3MdJG-a.js +2 -0
  5. package/dist/{agentsMd-mhQMF1bx.js → agentsMd-7zI2h5l9.js} +3 -3
  6. package/dist/agentsMd-BFCXh2gl.js +2 -0
  7. package/dist/apiBuild-2GvK8CUB.js +2 -0
  8. package/dist/{apiBuild-DGsShRuF.js → apiBuild-DGalUk9v.js} +3 -3
  9. package/dist/baselineCommand-CXv680Dc.js +2 -0
  10. package/dist/{baselineCommand-C6NMt-oa.js → baselineCommand-Ck2Xm8M7.js} +18 -18
  11. package/dist/bin.js +1 -1
  12. package/dist/bootRefusal-pgvDxlrU.js +7 -0
  13. package/dist/{build-CiFA-E19.js → build-CfF6t0UM.js} +88 -81
  14. package/dist/{capabilitiesCommand-nq_pz5xd.js → capabilitiesCommand-D5gucwYa.js} +8 -8
  15. package/dist/{checkCommand-CIPYyNyc.js → checkCommand-BV56Pcc1.js} +1 -1
  16. package/dist/{checkCommand-CLPTzYqM.js → checkCommand-CBtynBKW.js} +34 -34
  17. package/dist/{cloudCmd-NQSwe_Qk.js → cloudCmd-C42gaO8s.js} +16 -16
  18. package/dist/{clusterCmd-D5wsCmA_.js → clusterCmd-DrVFCzSj.js} +8 -4
  19. package/dist/{codegen-GYYcdpCg.js → codegen-CbpGCWLG.js} +1 -1
  20. package/dist/codegen-i8QGcHsi.js +2 -0
  21. package/dist/codegenCommand-W7SDdiAQ.js +129 -0
  22. package/dist/{codemodRunner-cyqu5oxr.js → codemodRunner-D-jTyvWo.js} +679 -495
  23. package/dist/{commands-BwG9A9Vv.js → commands-BD9eBRY3.js} +48 -48
  24. package/dist/{connectionConfig-UFlIEiys.js → connectionConfig-Bk9IC7D0.js} +1 -1
  25. package/dist/{dashboardCommand-C7U146xQ.js → dashboardCommand-7qGylm0F.js} +3 -3
  26. package/dist/{dataCommand-BOwd8_aJ.js → dataCommand-C_F2DYxe.js} +14 -11
  27. package/dist/{dbCommand-C4UW8cVN.js → dbCommand-DSwGv9wS.js} +50 -49
  28. package/dist/dbCommand-DcqEyxju.js +2 -0
  29. package/dist/dev-alhkKoEX.js +3 -0
  30. package/dist/{dev-bwDgSObH.js → dev-gqpnzVhI.js} +2357 -2280
  31. package/dist/{dialectDriver-CgXnDfec.js → dialectDriver-czCHYpeH.js} +2 -1
  32. package/dist/{doctorCommand-BXyrtN2l.js → doctorCommand-Bvs-BQrM.js} +242 -238
  33. package/dist/doctorCommand-CVXfRrng.js +2 -0
  34. package/dist/{dormancyCommand-BDdRRLsa.js → dormancyCommand-B-PPHc9Q.js} +1 -1
  35. package/dist/{e2eCmd-BRabZww-.js → e2eCmd-uFHig1hV.js} +8 -2
  36. package/dist/{embeddingsCommand-CjWGcAE6.js → embeddingsCommand-OKY6XjUf.js} +6 -6
  37. package/dist/{envCommand-B_TeG297.js → envCommand-B1-Zm85H.js} +2 -2
  38. package/dist/{evolveCommand-D6N-WfA4.js → evolveCommand-C4-NlFbd.js} +6 -8
  39. package/dist/{generateCommand-DbgcUpGw.js → generateCommand-CcyvH2ve.js} +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/{infoCommand-BHKTprrx.js → infoCommand-CTo8Jnhq.js} +7 -7
  42. package/dist/inspect-B7U7Cl_Z.js +1192 -0
  43. package/dist/inspect-DUze25t0.js +2 -0
  44. package/dist/{inspectCmd-EHFZ9yYu.js → inspectCmd-niF97fAq.js} +5 -5
  45. package/dist/inspectGateHint-BjnFubmH.js +7 -0
  46. package/dist/{logFileSink-C_D2wRN1.js → logFileSink-B4uP8pvf.js} +1 -1
  47. package/dist/{logsCmd-D36xK7Zu.js → logsCmd-B6oNsfaZ.js} +10 -7
  48. package/dist/{manifestBuild-hpPLaGxV.js → manifestBuild-BK42hu0k.js} +1 -1
  49. package/dist/manifestBuild-j0n109tt.js +2 -0
  50. package/dist/{metaCommands-CIoQNlaQ.js → metaCommands-DUYR--Ts.js} +1 -1
  51. package/dist/{migrate-RwgUWXfc.js → migrate-BnPw2zC8.js} +7 -4
  52. package/dist/{packageCommand-Cug_3Ogl.js → packageCommand-9SVyvsSo.js} +3 -2
  53. package/dist/{probeCommand-BPEpwT32.js → probeCommand-C9gazU0H.js} +35 -24
  54. package/dist/{projectScaffold-CxgtJvlb.js → projectScaffold-BEhhHjPr.js} +1 -1
  55. package/dist/{projectScaffold-DDgWbNLe.js → projectScaffold-BvhLOrLq.js} +17 -15
  56. package/dist/{runtimeTrace-WYV7qYvz.js → runtimeTrace-DzZOCd94.js} +1 -1
  57. package/dist/{scheduleManifestCmd-D2x0CTTY.js → scheduleManifestCmd-kmWzrO_w.js} +6 -9
  58. package/dist/{sdkgen-TM5sSdf7.js → sdkgen-C4roLErM.js} +4 -4
  59. package/dist/{seedRunner-ZmLSqNe2.js → seedRunner-IdHEprqf.js} +1 -4
  60. package/dist/serveCommand-B6TATyCj.js +1770 -0
  61. package/dist/serveCommand-CNR0gI9V.js +2 -0
  62. package/dist/serveEntry.js +2 -2
  63. package/dist/{serverlessCommand-CfJZy6dS.js → serverlessCommand-DbJ7Plg9.js} +3 -3
  64. package/dist/{start-BgN62boB.js → start-BNuTWdRd.js} +1 -1
  65. package/dist/{start-T4VesWiM.js → start-ft_KzFTd.js} +240 -237
  66. package/dist/startEntry.js +1 -1
  67. package/dist/startup.d.ts +40 -1
  68. package/dist/startup.js +2 -2
  69. package/dist/startupRunner-CEqQq7ax.js +108 -0
  70. package/dist/{test-DIQ0jlkQ.js → test-CLYXrZ2F.js} +1 -1
  71. package/dist/{tracesCmd-DStmCJPi.js → tracesCmd-DgtgOUdi.js} +7 -4
  72. package/dist/{typecheckCommand-BlsWiCNq.js → typecheckCommand-BuCtT92o.js} +7 -7
  73. package/dist/updateCommand-6FMU2klq.js +2 -0
  74. package/dist/{updateCommand-9GHHsmDf.js → updateCommand-CHBmCB17.js} +5 -3
  75. package/dist/{webDev-Dybxew86.js → webDev-CTpSY-e_.js} +892 -856
  76. package/dist/webDev-id3I5PvG.js +2 -0
  77. package/dist/{webhookDiscovery-D7VaeMlz.js → webhookDiscovery-CphsQe59.js} +4 -6
  78. package/dist/{webhookDiscovery-CrGAfhIG.js → webhookDiscovery-il9ti-HE.js} +1 -1
  79. package/dist/{webhooksCommand-CHWSPk5z.js → webhooksCommand-BVvOtZ1B.js} +1 -1
  80. package/package.json +39 -21
  81. package/templates/AGENTS.md +2 -2
  82. package/templates/agent-docs/_index.md +2 -2
  83. package/templates/agent-docs/_manifest.json +2 -2
  84. package/templates/agent-docs/authentication.md +30 -0
  85. package/templates/agent-docs/cli.md +17 -13
  86. package/templates/agent-docs/data.md +44 -1
  87. package/templates/agent-docs/database/migrations.md +2 -2
  88. package/templates/agent-docs/database/seedsdialects.md +2 -2
  89. package/templates/agent-docs/deployment.md +21 -7
  90. package/templates/agent-docs/internationalization.md +10 -3
  91. package/templates/agent-docs/local-first-mobile.md +141 -20
  92. package/templates/agent-docs/plugins/audit.md +4 -0
  93. package/templates/agent-docs/plugins/auth.md +4 -6
  94. package/templates/agent-docs/plugins/mail.md +1 -1
  95. package/templates/agent-docs/plugins/ratelimit.md +1 -1
  96. package/templates/agent-docs/plugins.md +3 -1
  97. package/templates/agent-docs/reference.md +3 -2
  98. package/templates/agent-docs/releases.md +130 -1
  99. package/templates/agent-docs/routing.md +34 -2
  100. package/templates/agent-docs/templates/apibackends.md +1 -1
  101. package/templates/agent-docs/templates/mobile.md +1 -1
  102. package/templates/agent-docs/whats-new.md +178 -44
  103. package/templates/apps/api-ai/package.json +7 -7
  104. package/templates/apps/api-auth/package.json +8 -8
  105. package/templates/apps/api-backend/package.json +7 -7
  106. package/templates/apps/api-backend-deactivation/package.json +7 -7
  107. package/templates/apps/api-backend-mail/package.json +8 -8
  108. package/templates/apps/api-backend-mariadb/package.json +9 -9
  109. package/templates/apps/api-backend-sqlite/package.json +8 -8
  110. package/templates/apps/api-backend-storage/package.json +8 -8
  111. package/templates/apps/api-cms/package.json +10 -10
  112. package/templates/apps/api-cms/tests/content.write.test.ts +16 -2
  113. package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +11 -5
  114. package/templates/apps/api-collab/package.json +8 -8
  115. package/templates/apps/api-collab/tests/documents.setBody.test.ts +8 -2
  116. package/templates/apps/api-data-advanced/package.json +8 -8
  117. package/templates/apps/api-durable/package.json +8 -8
  118. package/templates/apps/api-feature-flags/package.json +9 -9
  119. package/templates/apps/api-governance/package.json +8 -8
  120. package/templates/apps/api-kv/package.json +8 -8
  121. package/templates/apps/api-moderation/package.json +8 -8
  122. package/templates/apps/api-observability/package.json +8 -8
  123. package/templates/apps/api-ratelimit/package.json +8 -8
  124. package/templates/apps/api-rbac/authz.ts +16 -1
  125. package/templates/apps/api-rbac/package.json +8 -8
  126. package/templates/apps/api-rest/package.json +7 -7
  127. package/templates/apps/api-saas/package.json +11 -11
  128. package/templates/apps/api-saas-starter/package.json +10 -10
  129. package/templates/apps/api-search/package.json +8 -8
  130. package/templates/apps/api-status/package.json +8 -8
  131. package/templates/apps/api-versioning/mutations/documents.update.mutation.server.ts +7 -5
  132. package/templates/apps/api-versioning/package.json +8 -8
  133. package/templates/apps/api-webhooks/package.json +9 -9
  134. package/templates/apps/changelog/package.json +6 -6
  135. package/templates/apps/edge-functions/package.json +2 -2
  136. package/templates/apps/frontend-admin/package.json +8 -8
  137. package/templates/apps/frontend-app/package.json +9 -9
  138. package/templates/apps/frontend-auth/package.json +8 -8
  139. package/templates/apps/frontend-blank/package.json +7 -7
  140. package/templates/apps/frontend-cms/package.json +9 -9
  141. package/templates/apps/frontend-collab/package.json +10 -10
  142. package/templates/apps/frontend-contact/package.json +7 -7
  143. package/templates/apps/frontend-dashboard/package.json +7 -7
  144. package/templates/apps/frontend-docs/package.json +7 -7
  145. package/templates/apps/frontend-i18n/package.json +6 -6
  146. package/templates/apps/frontend-landing/package.json +7 -7
  147. package/templates/apps/frontend-portal/package.json +8 -8
  148. package/templates/apps/frontend-saas/package.json +8 -8
  149. package/templates/apps/frontend-spa/package.json +7 -7
  150. package/templates/apps/frontend-ssr/package.json +7 -7
  151. package/templates/apps/frontend-ssr-api/package.json +8 -8
  152. package/templates/apps/frontend-static-blog/package.json +6 -6
  153. package/templates/apps/frontend-status/package.json +8 -8
  154. package/templates/apps/mobile-app/README.md +41 -17
  155. package/templates/apps/mobile-app/app.config.ts +1 -1
  156. package/templates/apps/mobile-app/package.json +15 -11
  157. package/templates/apps/mobile-app/src/app/_layout.tsx +44 -13
  158. package/templates/apps/mobile-app/src/app/index.tsx +1 -1
  159. package/templates/apps/mobile-app/src/app/settings.tsx +4 -1
  160. package/templates/apps/mobile-app/src/client.ts +74 -57
  161. package/templates/apps/mobile-app/src/lib/api.ts +4 -4
  162. package/templates/apps/mobile-app/src/lib/deeplinks.ts +6 -6
  163. package/templates/apps/mobile-app/src/persistence.ts +24 -3
  164. package/templates/apps/mobile-app/tsconfig.json +17 -3
  165. package/templates/patches/@effect__cluster@0.60.0.patch +51 -3
  166. package/dist/addCommand-aXSQveak.js +0 -2
  167. package/dist/agentsMd-BTchIZku.js +0 -2
  168. package/dist/apiBuild-D0f6hYbH.js +0 -2
  169. package/dist/baselineCommand-Cfw2Afwm.js +0 -2
  170. package/dist/codegen-uYrrDzQv.js +0 -2
  171. package/dist/codegenCommand-BxS3sCeJ.js +0 -30
  172. package/dist/dbCommand-CC-qNzpz.js +0 -2
  173. package/dist/dev-BV6XNYKf.js +0 -3
  174. package/dist/doctorCommand-C4L61G_L.js +0 -2
  175. package/dist/inspect-CjTYzAs_.js +0 -1190
  176. package/dist/inspect-P4pxoMaV.js +0 -2
  177. package/dist/inspectGateHint-BF6608UT.js +0 -4
  178. package/dist/manifestBuild-COkJoyAr.js +0 -2
  179. package/dist/serveCommand-CyZsXL1l.js +0 -1766
  180. package/dist/serveCommand-qumm7jdF.js +0 -2
  181. package/dist/startupRunner-DPGFchOa.js +0 -71
  182. package/dist/updateCommand-BN0tkl9-.js +0 -2
  183. package/dist/webDev-BcykISYQ2.js +0 -2
@@ -1,3 +1,3 @@
1
1
  import { t as e } from "./loadEnv-D9nEOClM.js";
2
- import { t } from "./start-T4VesWiM.js";
2
+ import { t } from "./start-ft_KzFTd.js";
3
3
  export { e as loadDotEnv, t as runStartCommand };
package/dist/startup.d.ts CHANGED
@@ -3,6 +3,35 @@ import { StartupContext } from '@voltro/runtime';
3
3
  import { StartupFn } from '@voltro/runtime';
4
4
  import { SyncLogger } from '@voltro/logger';
5
5
 
6
+ /**
7
+ * How long a startup may run before the boot refuses it.
8
+ *
9
+ * ── Why there is a ceiling at all, and why it used to be 2 seconds ─────────
10
+ *
11
+ * The old value was 2000 ms and it was not a ceiling — it was a RACE the boot
12
+ * always won. A startup slower than that was reported as fine and the boot
13
+ * moved on, so a rejection arriving afterwards had nothing left to refuse.
14
+ *
15
+ * That race existed to protect one shape: a startup that never returns because
16
+ * it holds a fiber until shutdown. Counted before changing it, that shape
17
+ * appears in ZERO of the four startups this framework ships — `warm.startup.tsx`
18
+ * (twice), `searchBackfill.startup.tsx` and the memory fixture's all return.
19
+ * `warm` is the one to copy: it starts an interval, hands the teardown back
20
+ * through `onShutdown`, and returns.
21
+ *
22
+ * So the race protected the shape we discourage and penalised the shape we
23
+ * teach — and the penalised one includes `searchBackfill`, our own example,
24
+ * which awaits a full-table query plus an index backfill and is the likeliest
25
+ * thing in the box to exceed two seconds. Slow AND failing put a consumer back
26
+ * in exactly the silent state this file was fixed for.
27
+ *
28
+ * 60 seconds because the number now has one job: turn "hangs forever" into
29
+ * something diagnosable. It must never fire for honest work, and a boot that
30
+ * refuses after a minute with a message naming the file beats one that waits
31
+ * for a fiber that is never coming.
32
+ */
33
+ export declare const DEFAULT_STARTUP_TIMEOUT_MS = 60000;
34
+
6
35
  export declare interface DiscoveredStartup {
7
36
  readonly file: string;
8
37
  readonly id: string;
@@ -13,7 +42,7 @@ export declare const loadStartupFiles: (files: ReadonlyArray<string>, log: SyncL
13
42
 
14
43
  /** Run every discovered startup. Returns a handle whose `shutdown()`
15
44
  * drains every registered teardown LIFO. */
16
- export declare const runStartups: (startups: ReadonlyArray<DiscoveredStartup>, store: DataStore, parentLog: SyncLogger) => Promise<StartupHandle>;
45
+ export declare const runStartups: (startups: ReadonlyArray<DiscoveredStartup>, store: DataStore, parentLog: SyncLogger, ceilingMs?: number) => Promise<StartupHandle>;
17
46
 
18
47
  export { StartupContext }
19
48
 
@@ -23,4 +52,14 @@ export declare interface StartupHandle {
23
52
  readonly shutdown: () => Promise<void>;
24
53
  }
25
54
 
55
+ /**
56
+ * The ceiling, from `VOLTRO_STARTUP_TIMEOUT_MS`.
57
+ *
58
+ * An app with a genuinely long backfill raises it; the env var is the whole
59
+ * knob, and the refusal names it so nobody has to find this constant. Not an
60
+ * `app.config.ts` field: this is an operational safety limit, not a design
61
+ * choice about the app, and the parameter below is the seam if that changes.
62
+ */
63
+ export declare const startupTimeoutMsFromEnv: (envValue: string | undefined) => number;
64
+
26
65
  export { }
package/dist/startup.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./startupRunner-DPGFchOa.js";
2
- export { t as loadStartupFiles, e as runStartups };
1
+ import { i as e, n as t, r as n, t as r } from "./startupRunner-CEqQq7ax.js";
2
+ export { r as DEFAULT_STARTUP_TIMEOUT_MS, t as loadStartupFiles, n as runStartups, e as startupTimeoutMsFromEnv };
@@ -0,0 +1,108 @@
1
+ import { n as e } from "./appModuleLoader-C9r9mxZt.js";
2
+ import { t } from "./bootRefusal-pgvDxlrU.js";
3
+ import { basename as n } from "node:path";
4
+ import { publishServerError as r } from "@voltro/protocol";
5
+ //#region src/startupRunner.ts
6
+ var i = (e) => e.replace(/\.startup\.tsx?$/, ""), a = async (r, a) => {
7
+ let o = [];
8
+ for (let a of r) {
9
+ let r;
10
+ try {
11
+ r = await e(a);
12
+ } catch (e) {
13
+ throw t(`startup file \`${a}\` could not be imported — refusing to boot.\n cause: ${e instanceof Error ? e.message : String(e)}\n
14
+ It was discovered as a startup, so whatever it registers is missing from this process. Skipping it would leave a server that looks healthy.`);
15
+ }
16
+ let s = r.default;
17
+ if (typeof s != "function") throw t(`startup file \`${a}\` has no default-exported function — refusing to boot.\n
18
+ The convention is a DEFAULT-exported function, not a \`defineX\` wrapper:
19
+
20
+ export default async (ctx) => { /* register here */ }
21
+
22
+ A named export is discovered and never runs, which is indistinguishable from a startup that ran and did nothing.`);
23
+ o.push({
24
+ file: a,
25
+ id: i(n(a)),
26
+ fn: s
27
+ });
28
+ }
29
+ return o;
30
+ }, o = 6e4, s = (e) => {
31
+ let t = Number(e);
32
+ return Number.isFinite(t) && t > 0 ? t : o;
33
+ }, c = async (e, n, i, a = s(process.env.VOLTRO_STARTUP_TIMEOUT_MS)) => {
34
+ let o = [];
35
+ for (let s of e) {
36
+ let e = i.child(`startup:${s.id}`), c = {
37
+ store: n,
38
+ log: e,
39
+ id: s.id,
40
+ onShutdown: (e) => {
41
+ o.push({
42
+ id: s.id,
43
+ cb: e
44
+ });
45
+ }
46
+ }, l, u = !1;
47
+ try {
48
+ let e = s.fn(c);
49
+ if (e instanceof Promise) {
50
+ let t, n = new Promise((e) => {
51
+ t = setTimeout(() => e("timeout"), a);
52
+ });
53
+ try {
54
+ u = await Promise.race([e.then(() => "done", (e) => (l = e, r({
55
+ error: e,
56
+ source: "startup",
57
+ name: s.id
58
+ }), "done")), n]) === "timeout";
59
+ } finally {
60
+ t !== void 0 && clearTimeout(t);
61
+ }
62
+ }
63
+ } catch (e) {
64
+ l = e, r({
65
+ error: e,
66
+ source: "startup",
67
+ name: s.id
68
+ });
69
+ }
70
+ if (l !== void 0) throw e.error("startup: failed", { file: s.file }, l), t(`startup \`${s.id}\` failed — refusing to boot.\n file: ${s.file}\n cause: ${l instanceof Error ? l.message : String(l)}\n
71
+ A startup is where an app REGISTERS things the request path depends on (\`setRowFilter\` is the one that matters most). Continuing past a failed one produces a server that looks healthy and is missing whatever the startup was there to install — which is why this used to be a warning and is now a refusal.
72
+
73
+ If this failure IS acceptable, catch it inside the startup function itself, where the decision is visible to a reviewer.`);
74
+ if (u) throw e.error("startup: never returned", {
75
+ file: s.file,
76
+ ceilingMs: a
77
+ }), t(`startup \`${s.id}\` did not return within ${a}ms — refusing to boot.\n file: ${s.file}\n
78
+ A startup must START its work and RETURN. Hand the teardown back through
79
+ \`onShutdown\` instead of awaiting forever:
80
+
81
+ export default async ({ store, log, onShutdown }) => {
82
+ const timer = setInterval(() => sync(store), 60_000)
83
+ onShutdown(() => clearInterval(timer))
84
+ }
85
+
86
+ Awaiting a fiber that resolves only on shutdown used to be allowed, and it
87
+ is what made a slow startup that then FAILED unreportable — the boot had
88
+ already moved on, so nothing was left to refuse.
89
+
90
+ If this startup is legitimately slower than ${a}ms, raise\nVOLTRO_STARTUP_TIMEOUT_MS — or, better, do the registration first and the
91
+ long work after, so a failure in the long half cannot hide a missing
92
+ registration.`);
93
+ e.info("startup: registered");
94
+ }
95
+ return { shutdown: async () => {
96
+ for (let e = o.length - 1; e >= 0; e--) {
97
+ let { id: t, cb: n } = o[e], r = i.child(`startup:${t}`);
98
+ try {
99
+ let e = n();
100
+ e instanceof Promise && await Promise.race([e, new Promise((e) => setTimeout(e, 5e3))]);
101
+ } catch (e) {
102
+ r.warn("startup: teardown threw", {}, e);
103
+ }
104
+ }
105
+ } };
106
+ };
107
+ //#endregion
108
+ export { s as i, a as n, c as r, o as t };
@@ -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-uYrrDzQv.js"), r = await n(t.root);
82
+ let { checkRpcGroupFreshness: n } = await import("./codegen-i8QGcHsi.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,
@@ -133,10 +133,13 @@ var a = (e) => {
133
133
  });
134
134
  g.sort((e, t) => t.startMs - e.startMs);
135
135
  let v = g.slice(0, a.tail);
136
- if (a.format === "json") return t(_.length > 0 ? {
137
- traces: v,
138
- fetchErrors: _
139
- } : { traces: v }, { pretty: !1 }), +(_.length === c.length);
136
+ if (a.format === "json") {
137
+ let e = _.length > 0 ? {
138
+ traces: v,
139
+ fetchErrors: _
140
+ } : { traces: v };
141
+ return t(e, { pretty: !1 }), +(_.length === c.length);
142
+ }
140
143
  m(v, a.color), v.length === 0 && console.error("voltro traces: no traces matched the given filters.");
141
144
  for (let e of _) {
142
145
  let t = `# fetch failed: ${e.name}: ${e.error}`;
@@ -7,13 +7,13 @@ import { spawn as c } from "node:child_process";
7
7
  //#region src/typecheckCommand.ts
8
8
  var l = o({ scope: "voltro:typecheck" }), u = (e) => {
9
9
  try {
10
- let t = r(n(s(r(i(e), "package.json")).resolve("typescript/package.json")), "bin", "tsc");
11
- return a(t) ? t : null;
10
+ let t = s(r(i(e), "package.json")).resolve("typescript/package.json"), o = r(n(t), "bin", "tsc");
11
+ return a(o) ? o : null;
12
12
  } catch {
13
13
  return null;
14
14
  }
15
15
  }, d = /* @__PURE__ */ new Set(["--project", "-p"]), f = (n, r = process.cwd()) => {
16
- let a = i(r, e(n, [...d])[0] ?? "."), o = t(n, "--project") ?? t(n, "-p"), s = [];
16
+ let a = e(n, [...d]), o = i(r, a[0] ?? "."), s = t(n, "--project") ?? t(n, "-p"), c = [];
17
17
  for (let e = 0; e < n.length; e++) {
18
18
  let t = n[e];
19
19
  if (t.startsWith("-")) {
@@ -22,13 +22,13 @@ var l = o({ scope: "voltro:typecheck" }), u = (e) => {
22
22
  !t.includes("=") && n[e + 1] !== void 0 && !n[e + 1].startsWith("-") && e++;
23
23
  continue;
24
24
  }
25
- s.push(t);
25
+ c.push(t);
26
26
  }
27
27
  }
28
28
  return {
29
- root: a,
30
- project: o,
31
- passthrough: s
29
+ root: o,
30
+ project: s,
31
+ passthrough: c
32
32
  };
33
33
  }, p = async (e) => {
34
34
  let t = f(e);
@@ -0,0 +1,2 @@
1
+ import { f as e, p as t } from "./updateCommand-CHBmCB17.js";
2
+ export { e as runApplyCodemods, t as runUpdateCommand };
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "./codemodRunner-cyqu5oxr.js";
1
+ import { n as e, r as t, t as n } from "./codemodRunner-D-jTyvWo.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";
@@ -426,8 +426,10 @@ var g = (e) => {
426
426
  }
427
427
  return console.error("voltro update: no @voltro/* dependencies here — not a Voltro app."), 1;
428
428
  }
429
- if (!l.dryRun && !l.force && !i(l.root)) 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.)");
430
- 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;
429
+ if (!l.dryRun && !l.force && !i(l.root)) {
430
+ 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
+ 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
+ }
431
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];
432
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;
433
435
  let y = E(l.root), b = l.to ?? (l.codemodsOnly ? _() : void 0) ?? n("@voltro/cli", y);