@voltro/cli 0.51.0 → 0.52.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 (164) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/dist/{agentsMd-D6yD7IQv.js → agentsMd-0l980yhL.js} +4 -1
  3. package/dist/agentsMd-SDDSkyl4.js +2 -0
  4. package/dist/apiBuild-BYBpL7Pz.js +2 -0
  5. package/dist/{apiBuild-CPDHXF72.js → apiBuild-CSFI8QGq.js} +3 -3
  6. package/dist/bin.js +1 -1
  7. package/dist/build-CPgcMQug.js +793 -0
  8. package/dist/checkCommand-2SbqzukH.js +2 -0
  9. package/dist/{checkCommand-DNuPiWMc.js → checkCommand-COmqc2cB.js} +92 -46
  10. package/dist/{cloudCmd-F4YJeqM3.js → cloudCmd-QUXh-b5w.js} +1 -1
  11. package/dist/codegen-CctkDO-1.js +2 -0
  12. package/dist/{codegen-CrMXs4hb.js → codegen-VF479Cnb.js} +1 -1
  13. package/dist/{codegenCommand-BNBHcNNj.js → codegenCommand-DCdG2JN-.js} +12 -12
  14. package/dist/{codemodRunner-BDVixlSw.js → codemodRunner-r7J9lIa7.js} +588 -540
  15. package/dist/{commands-B1OiS9bX.js → commands-Cc_nV8WI.js} +35 -35
  16. package/dist/{dashboardCommand-C-vvPY1B.js → dashboardCommand-C-gKvwqh.js} +5 -5
  17. package/dist/{dataCommand-C1GxXW5q.js → dataCommand-BgpBHnlB.js} +27 -27
  18. package/dist/dbCommand-DNb6yeOG.js +2 -0
  19. package/dist/{dbCommand-If4Y1xQ-.js → dbCommand-sHedr-NJ.js} +2 -2
  20. package/dist/dev--A3nsxA3.js +3 -0
  21. package/dist/{dev-kdAg9Q7l.js → dev-CRHoCEiy.js} +2142 -2103
  22. package/dist/doctorCommand-CqoWA2p5.js +2 -0
  23. package/dist/{doctorCommand-nKmeW78u.js → doctorCommand-DtfJ3FA6.js} +314 -234
  24. package/dist/{dormancyCommand-CY3wa_SW.js → dormancyCommand-Drn7o0No.js} +1 -1
  25. package/dist/{embeddingsCommand-BDLIgje_.js → embeddingsCommand-Z-jO1fWN.js} +1 -1
  26. package/dist/{envCommand-C6V_xVlT.js → envCommand-D4gCrrTZ.js} +8 -8
  27. package/dist/{evolveCommand-D3c4DSfN.js → evolveCommand-CMROeKeA.js} +2 -2
  28. package/dist/fileConventions-DOqD3lPS.js +34 -0
  29. package/dist/{fileTaxonomy-CJfgOllU.js → fileTaxonomy-DvDUV9wq.js} +1 -1
  30. package/dist/frameworkTableAssembly-C6ETawPR.js +2 -0
  31. package/dist/{frameworkTableAssembly-BwJVEKLr.js → frameworkTableAssembly-w-XnLa3q.js} +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/{infoCommand-BnRFEF1o.js → infoCommand-DXM868o_.js} +1 -1
  34. package/dist/inspectMetrics-CGF94puw.js +143 -0
  35. package/dist/{metaCommands-CfRLra0s.js → metaCommands-C6RFmF1r.js} +2 -2
  36. package/dist/{migrate-DehuBakM.js → migrate-D0F-eTlK.js} +2 -2
  37. package/dist/{pageConvention-cEiRxdab.js → pageConvention-CzUiSbtU.js} +1 -1
  38. package/dist/{privacyCommand-XejDMvmu.js → privacyCommand-DGdopOI6.js} +1 -1
  39. package/dist/{projectScaffold-mIX_DpSe.js → projectScaffold-B4dmTlwT.js} +1 -1
  40. package/dist/{projectScaffold-BIl97_E6.js → projectScaffold-EzlErR4E.js} +1 -1
  41. package/dist/{renderModeScan-D7J1B7Kw.js → renderModeScan-CcH2X1_D.js} +25 -10
  42. package/dist/{renderProfile-1OWWAAtx.js → renderProfile-Ck32Fzxr.js} +2 -2
  43. package/dist/{runtimeTrace-ZsBU7Tkx.js → runtimeTrace-BPQyCmC5.js} +1 -1
  44. package/dist/{sdkgen-O4XqWOjM.js → sdkgen-Se88ifTd.js} +1 -1
  45. package/dist/serveCommand-DLc-BznW.js +2 -0
  46. package/dist/{serveCommand-DdiYNBBu.js → serveCommand-DkP3OT0W.js} +885 -868
  47. package/dist/serveEntry.js +1 -1
  48. package/dist/start-DfL3fOiN.js +3 -0
  49. package/dist/start-jw89Xbqy.js +1339 -0
  50. package/dist/startEntry.js +1 -1
  51. package/dist/{staticCommand-Dr2M6tpU.js → staticCommand-BwNEDlSU.js} +1 -1
  52. package/dist/{test-rXFq4S76.js → test-f3amja6a.js} +1 -1
  53. package/dist/updateCommand-5gFVfK5q.js +2 -0
  54. package/dist/{updateCommand-Bs322Q78.js → updateCommand-BMk2e4ky.js} +1 -1
  55. package/dist/{webDev-B-ubQEMX.js → webDev-BgWL9gKV.js} +1156 -835
  56. package/dist/webDev-CZbTsDcH.js +2 -0
  57. package/dist/{webhooksCommand-FLYY9IXh.js → webhooksCommand-CoIO3jbj.js} +1 -1
  58. package/package.json +30 -17
  59. package/templates/AGENTS.core.md +11 -0
  60. package/templates/AGENTS.md +15 -4
  61. package/templates/agent-docs/_index.md +4 -4
  62. package/templates/agent-docs/_manifest.json +11 -11
  63. package/templates/agent-docs/cli.md +96 -14
  64. package/templates/agent-docs/data.md +210 -7
  65. package/templates/agent-docs/database/schema.md +1 -1
  66. package/templates/agent-docs/database/seedsdialects.md +1 -1
  67. package/templates/agent-docs/deployment.md +22 -3
  68. package/templates/agent-docs/introduction.md +46 -0
  69. package/templates/agent-docs/local-first-mobile.md +34 -7
  70. package/templates/agent-docs/plugins/ai-flows.md +1 -1
  71. package/templates/agent-docs/plugins/audit.md +5 -5
  72. package/templates/agent-docs/plugins/cdc-out.md +2 -2
  73. package/templates/agent-docs/plugins/{versioning.md → row-history.md} +22 -22
  74. package/templates/agent-docs/plugins/storage.md +2 -2
  75. package/templates/agent-docs/plugins.md +29 -7
  76. package/templates/agent-docs/reference.md +39 -2
  77. package/templates/agent-docs/routing.md +341 -47
  78. package/templates/agent-docs/schema-driven-ui.md +78 -2
  79. package/templates/agent-docs/security.md +125 -8
  80. package/templates/agent-docs/templates/apibackends.md +14 -14
  81. package/templates/agent-docs/templates/overview.md +1 -1
  82. package/templates/agent-docs/whats-new.md +76 -53
  83. package/templates/apps/api-ai/package.json +6 -7
  84. package/templates/apps/api-ai/tests/summarize.test.ts +1 -1
  85. package/templates/apps/api-auth/package.json +8 -8
  86. package/templates/apps/api-backend/package.json +7 -7
  87. package/templates/apps/api-backend-deactivation/package.json +7 -7
  88. package/templates/apps/api-backend-mail/package.json +8 -8
  89. package/templates/apps/api-backend-mariadb/package.json +9 -9
  90. package/templates/apps/api-backend-sqlite/package.json +8 -8
  91. package/templates/apps/api-backend-storage/package.json +8 -8
  92. package/templates/apps/api-cms/package.json +9 -10
  93. package/templates/apps/api-collab/package.json +8 -8
  94. package/templates/apps/api-data-advanced/package.json +8 -8
  95. package/templates/apps/api-durable/package.json +8 -8
  96. package/templates/apps/api-feature-flags/package.json +9 -9
  97. package/templates/apps/api-governance/package.json +8 -8
  98. package/templates/apps/api-kv/package.json +8 -8
  99. package/templates/apps/api-moderation/package.json +8 -8
  100. package/templates/apps/api-observability/package.json +8 -8
  101. package/templates/apps/api-ratelimit/package.json +8 -8
  102. package/templates/apps/api-rbac/package.json +8 -8
  103. package/templates/apps/api-rest/package.json +7 -7
  104. package/templates/apps/{api-versioning → api-row-history}/README.md +3 -3
  105. package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.server.ts +1 -1
  106. package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.server.ts +1 -1
  107. package/templates/apps/{api-versioning → api-row-history}/app.config.ts +3 -3
  108. package/templates/apps/{api-versioning → api-row-history}/database/schema.ts +1 -1
  109. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.server.ts +1 -1
  110. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.ts +1 -1
  111. package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.ts +1 -1
  112. package/templates/apps/{api-versioning → api-row-history}/package.json +8 -8
  113. package/templates/apps/api-row-history/template.json +6 -0
  114. package/templates/apps/{api-versioning → api-row-history}/tests/documents.create.test.ts +1 -1
  115. package/templates/apps/api-saas/app.config.ts +1 -0
  116. package/templates/apps/api-saas/package.json +10 -11
  117. package/templates/apps/api-saas-starter/package.json +10 -10
  118. package/templates/apps/api-search/package.json +8 -8
  119. package/templates/apps/api-status/package.json +8 -8
  120. package/templates/apps/api-webhooks/package.json +9 -9
  121. package/templates/apps/changelog/package.json +6 -6
  122. package/templates/apps/edge-functions/package.json +2 -2
  123. package/templates/apps/frontend-admin/package.json +8 -8
  124. package/templates/apps/frontend-app/package.json +9 -9
  125. package/templates/apps/frontend-auth/package.json +8 -8
  126. package/templates/apps/frontend-blank/package.json +7 -7
  127. package/templates/apps/frontend-cms/package.json +9 -9
  128. package/templates/apps/frontend-collab/package.json +10 -10
  129. package/templates/apps/frontend-collab/src/pages/page.test.tsx +10 -9
  130. package/templates/apps/frontend-collab/src/pages/page.tsx +42 -65
  131. package/templates/apps/frontend-contact/package.json +7 -7
  132. package/templates/apps/frontend-dashboard/package.json +7 -7
  133. package/templates/apps/frontend-docs/package.json +6 -7
  134. package/templates/apps/frontend-i18n/package.json +6 -6
  135. package/templates/apps/frontend-landing/package.json +6 -7
  136. package/templates/apps/frontend-portal/package.json +8 -8
  137. package/templates/apps/frontend-saas/package.json +8 -8
  138. package/templates/apps/frontend-spa/package.json +7 -7
  139. package/templates/apps/frontend-ssr/package.json +7 -7
  140. package/templates/apps/frontend-ssr-api/package.json +8 -8
  141. package/templates/apps/frontend-static-blog/package.json +6 -6
  142. package/templates/apps/frontend-status/package.json +8 -8
  143. package/templates/apps/mobile-app/package.json +4 -4
  144. package/dist/agentsMd-Bu_XQgVf.js +0 -2
  145. package/dist/apiBuild-GDKuGOMV.js +0 -2
  146. package/dist/build-DETLZAFt.js +0 -752
  147. package/dist/checkCommand-CWcnDArJ.js +0 -2
  148. package/dist/codegen-DiMn2KkZ.js +0 -2
  149. package/dist/dbCommand-C27HIsGE.js +0 -2
  150. package/dist/dev-CK522MV5.js +0 -3
  151. package/dist/doctorCommand-BK4l18eG.js +0 -2
  152. package/dist/fileConventions-Cof68_BL.js +0 -33
  153. package/dist/frameworkTableAssembly-CVDB2hCq.js +0 -2
  154. package/dist/inspectMetrics-CfdKLh6t.js +0 -72
  155. package/dist/serveCommand-BRnPCxVd.js +0 -2
  156. package/dist/start-BLNmWkLa.js +0 -1154
  157. package/dist/start-Dzicuyw8.js +0 -3
  158. package/dist/updateCommand-eXB35SEv.js +0 -2
  159. package/dist/webDev-DposiF3j.js +0 -2
  160. package/templates/apps/api-versioning/template.json +0 -6
  161. /package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.ts +0 -0
  162. /package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.ts +0 -0
  163. /package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.server.ts +0 -0
  164. /package/templates/apps/{api-versioning → api-row-history}/tsconfig.json +0 -0
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, o as n } from "./checkCommand-COmqc2cB.js";
2
+ export { t as offlineManifest, e as runCheckCommand, n as toInput };
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./cliArgs-D4p8n7EE.js";
2
- import { a as t, l as n } from "./codegen-CrMXs4hb.js";
2
+ import { a as t, l as n } from "./codegen-VF479Cnb.js";
3
3
  import { r } from "./appGraph-yRuKjOba.js";
4
4
  import { n as i } from "./cliOutput-D1tSBoRM.js";
5
5
  import { n as a, o, r as s, t as c } from "./inspectFetch-EMuhTG_9.js";
6
- import { r as l } from "./fileTaxonomy-CJfgOllU.js";
7
- import { S as u } from "./doctorCommand-nKmeW78u.js";
6
+ import { r as l } from "./fileTaxonomy-DvDUV9wq.js";
7
+ import { S as u } from "./doctorCommand-DtfJ3FA6.js";
8
8
  import { resolve as d } from "node:path";
9
9
  import { readdirSync as f, statSync as p } from "node:fs";
10
10
  import { isReactivityChannelKey as m } from "@voltro/protocol";
@@ -125,12 +125,31 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
125
125
  } catch {
126
126
  return null;
127
127
  }
128
- }, C = (e) => {
129
- let { exercised: t, total: n } = e.coverage, r = `\nobserved: ${t}/${n} procedures exercised (${n === 0 ? 0 : Math.round(t / n * 100)}%)`;
130
- if (e.diagnostics.length === 0) return `${r}\n no declared/observed mismatches${e.unexercised.length > 0 ? `\n ${e.unexercised.length} unexercised no recording, so nothing is claimed about them` : ""}`;
131
- let i = e.diagnostics.map((e) => ` ${e.node}${e.file === void 0 ? "" : ` (${e.file})`}\n` + e.breaks.map((e) => ` ${e}`).join("\n") + `\n fix: ${e.fix}`), a = e.unexercised.length > 0 ? `\n ${e.unexercised.length} unexercised — no recording, so nothing is claimed about them` : "";
132
- return `${r}\n${i.join("\n")}${a}`;
133
- }, w = (e, t) => ({
128
+ }, C = {
129
+ unexercised: (e) => `${e} never ran no observation exists, so nothing is claimed about them`,
130
+ unobservedReads: (e) => `${e} ran with no table access recordedindistinguishable from touching nothing, so nothing is claimed about them either`
131
+ }, w = (e, t) => {
132
+ let n = e.filter((e) => !t.has(e)).sort();
133
+ return n.length === 0 ? `\ndeclared vs live: all ${e.length} source-declared tags are registered on the server` : `\ndeclared vs live: ${n.length} of ${e.length} source-declared tags are NOT registered on the server\n` + n.map((e) => ` ⚠ ${e} — a generated client calls this and gets "Unknown request tag"`).join("\n") + "\n fix: if the server runs older code, redeploy; if it is current, plugin route registration was dropped — check the boot line \"plugin routes registered\"";
134
+ }, T = (e) => {
135
+ let { exercised: t, total: n } = e.coverage;
136
+ if (n === 0) return "\nobserved: no procedures declared — nothing to compare";
137
+ let r = `\nobserved: ${t}/${n} procedures exercised (${Math.round(t / n * 100)}%)`, i = Object.keys(C).map((t) => [t, e[t].length]).filter(([, e]) => e > 0), a = i.reduce((e, [, t]) => e + t, t), o = [...i.map(([e, t]) => ` ${C[e](t)}`), ...a === n ? [] : [` ⚠ ${n - a} of the declared procedures are in none of the counts above — that is a defect in \`voltro check\`, please report it`]].join("\n");
138
+ if (e.diagnostics.length > 0) {
139
+ let n = e.diagnostics.length;
140
+ return [
141
+ r,
142
+ ` ${n} declared/observed mismatch${n === 1 ? "" : "es"} among the ${t} that ran`,
143
+ ...e.diagnostics.map((e) => ` ${e.node}${e.file === void 0 ? "" : ` (${e.file})`}\n` + e.breaks.map((e) => ` ${e}`).join("\n") + `\n fix: ${e.fix}`),
144
+ ...o === "" ? [] : [o]
145
+ ].join("\n");
146
+ }
147
+ return [
148
+ r,
149
+ t === 0 ? " nothing was compared — a declaration is only checked against a procedure that RAN" : ` no declared/observed mismatch among the ${t} that ran`,
150
+ ...o === "" ? [] : [o]
151
+ ].join("\n");
152
+ }, E = (e, t) => ({
134
153
  tables: (t.tables ?? []).map((e) => e.name),
135
154
  frameworkOwnedTables: (t.tables ?? []).filter((e) => e.framework === !0 || e.name.startsWith("_voltro_") || x.has(e.name)).map((e) => e.name),
136
155
  scopes: e.scopes ?? [],
@@ -147,27 +166,41 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
147
166
  ...e.internal === !0 ? { internal: !0 } : {}
148
167
  };
149
168
  })
150
- }), T = (e) => e.length === 0 ? "✓ voltro check: no issues" : e.map((e) => {
169
+ }), D = (e) => e.length === 0 ? "✓ voltro check: no issues" : e.map((e) => {
151
170
  let t = e.severity === "error" ? "✗ error" : "⚠ warn", n = e.file ? ` (${e.file})` : "";
152
171
  return `${t} ${e.rule} ${e.node}${n}\n ${e.breaks.join("; ")}\n fix: ${e.fix}`;
153
- }).join("\n"), E = async (e) => {
154
- let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-CK522MV5.js"), { buildRpcEntry: i } = await import("./manifestBuild-CPjhvM62.js"), { buildCapabilityManifest: a } = await import("./inspect-CuGDYES0.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = (t, n, r) => i(t, n, o(e, r)), l = [
155
- ...s.queries.map((e) => c(e.descriptor, "query", e.file)),
156
- ...s.mutations.map((e) => c(e.descriptor, "mutation", e.file)),
157
- ...s.actions.map((e) => c(e.descriptor, "action", e.file)),
158
- ...s.streams.map((e) => c(e.descriptor, "stream", e.file))
159
- ], { assembleFrameworkTables: u } = await import("./frameworkTableAssembly-CVDB2hCq.js"), d = await u({ root: e }).catch((e) => (console.warn(`\n⚠ plugin tables could not be collected — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`), [])), f = new Set(s.tables.map((e) => e.tableName)), p = [...[...f].map((e) => ({ name: e })), ...d.map((e) => e.tableName).filter((e) => !f.has(e)).map((e) => ({
172
+ }).join("\n"), O = async (e) => {
173
+ let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev--A3nsxA3.js"), { buildRpcEntry: i } = await import("./manifestBuild-CPjhvM62.js"), { buildCapabilityManifest: a } = await import("./inspect-CuGDYES0.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = await r(e).then((e) => e?.plugins ?? []).catch(() => []);
174
+ try {
175
+ let { mergePluginRoutesInto: e } = await import("./dev--A3nsxA3.js");
176
+ e({
177
+ plugins: c,
178
+ queries: s.queries,
179
+ mutations: s.mutations,
180
+ actions: s.actions,
181
+ streams: s.streams,
182
+ log: { info: () => {} }
183
+ });
184
+ } catch (e) {
185
+ console.warn(`\n⚠ plugin rpc routes could not be merged — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`);
186
+ }
187
+ let l = (t, n, r) => i(t, n, r.startsWith("plugin:") ? r : o(e, r)), u = [
188
+ ...s.queries.map((e) => l(e.descriptor, "query", e.file)),
189
+ ...s.mutations.map((e) => l(e.descriptor, "mutation", e.file)),
190
+ ...s.actions.map((e) => l(e.descriptor, "action", e.file)),
191
+ ...s.streams.map((e) => l(e.descriptor, "stream", e.file))
192
+ ], { assembleFrameworkTables: d } = await import("./frameworkTableAssembly-C6ETawPR.js"), f = await d({ root: e }).catch((e) => (console.warn(`\n⚠ plugin tables could not be collected — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`), [])), p = new Set(s.tables.map((e) => e.tableName)), m = [...[...p].map((e) => ({ name: e })), ...f.map((e) => e.tableName).filter((e) => !p.has(e)).map((e) => ({
160
193
  name: e,
161
194
  framework: !0
162
- }))], m = await r(e).then((e) => e?.plugins ?? []).catch(() => []);
195
+ }))], h = c;
163
196
  return {
164
- manifest: a(l, s.workflows.map((t) => ({
197
+ manifest: a(u, s.workflows.map((t) => ({
165
198
  tag: t.definition.name ?? "",
166
199
  file: o(e, t.file)
167
- })), [], m),
168
- tables: { tables: p }
200
+ })), [], h),
201
+ tables: { tables: m }
169
202
  };
170
- }, D = async (t) => {
203
+ }, k = async (t) => {
171
204
  let f = t.flatMap((e) => e === "--json" ? ["--format", "json"] : [e]), p = a(f);
172
205
  if ("error" in p) return console.error(`voltro check: ${p.error}`), 1;
173
206
  let { process: m, target: h, rest: g } = s(p.rest), _;
@@ -187,21 +220,27 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
187
220
  };
188
221
  else return console.error("voltro check --diff: expected removeTable:<name> | removeProcedure:<tag> | removeScope:<name>"), 1;
189
222
  }
190
- let v = e(g, ["--diff"]) ?? process.cwd(), x = g.includes("--offline"), D = x ? [] : await o(m, h), O, k;
191
- if (D.length === 0) {
223
+ let v = e(g, ["--diff"]) ?? process.cwd(), x = g.includes("--offline"), C = x ? [] : await o(m, h), k, A;
224
+ if (C.length === 0) {
192
225
  if (!x && h !== void 0) return console.error("voltro check: --url given but no api reachable there."), 1;
193
226
  try {
194
- let e = await E(d(v));
195
- O = e.manifest, k = e.tables;
227
+ let e = await O(d(v));
228
+ k = e.manifest, A = e.tables;
196
229
  } catch (e) {
197
230
  return console.error(`voltro check: could not assemble the graph from source: ${e.message}`), console.error(" Start `voltro dev` to check against a running api instead."), 1;
198
231
  }
199
232
  } else {
200
- let e = D[0], [t, n] = await Promise.all([c(e, "/_voltro/inspect/manifest"), c(e, "/_voltro/inspect/data/tables")]);
233
+ let e = C[0], [t, n] = await Promise.all([c(e, "/_voltro/inspect/manifest"), c(e, "/_voltro/inspect/data/tables")]);
201
234
  if (t.kind === "err") return console.error(`voltro check: manifest fetch failed: ${t.error}`), 1;
202
- O = t.data, k = n.kind === "ok" ? n.data : { tables: [] };
235
+ k = t.data, A = n.kind === "ok" ? n.data : { tables: [] };
203
236
  }
204
- let A = w(O, k), j = r(A, _), M = [...l(v).findings.map((e) => ({
237
+ let j = E(k, A), M = r(j, _), N = "";
238
+ if (C.length > 0) try {
239
+ N = w(((await O(d(v))).manifest.procedures ?? []).map((e) => e.tag), new Set((k.procedures ?? []).map((e) => e.tag)));
240
+ } catch {
241
+ N = "\ndeclared vs live: skipped — no app source at this root to compare against";
242
+ }
243
+ let P = [...l(v).findings.map((e) => ({
205
244
  rule: e.rule,
206
245
  node: e.file,
207
246
  file: e.file,
@@ -215,28 +254,35 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
215
254
  breaks: [e.kind === "suffixed-outside-pages" ? "a page.tsx outside src/pages/ never routes" : "no test beside it"],
216
255
  fix: e.kind === "suffixed-outside-pages" ? "move it under src/pages/ into the directory whose route it serves, or rename it — page.tsx is reserved" : "write the test with the file — the name is derivable",
217
256
  severity: e.kind === "suffixed-outside-pages" ? "error" : "warn"
218
- }))], N = (await n(v, b(v))).map((e) => ({
257
+ }))], F = (await n(v, b(v))).map((e) => ({
219
258
  rule: "client/not-browser-safe",
220
259
  node: e.file,
221
260
  file: e.file,
222
261
  breaks: [`reaches the server-only '${e.violation.specifier}' — chain: ${e.violation.chain.join(" → ")}`],
223
262
  fix: "move the server-only code behind a *.server.ts, or drop the .client suffix — an unmarked file makes no claim",
224
263
  severity: "error"
225
- })), P = [
226
- ...j.diagnostics,
227
- ...M,
228
- ...N
229
- ], F = j.ok && !M.some((e) => e.severity === "error") && N.length === 0, I = await S(d(v)), L = I === null ? null : y(A.procedures, I);
230
- return p.format === "json" ? i(L === null ? {
231
- ...j,
232
- ok: F,
233
- diagnostics: P
234
- } : {
235
- ...j,
236
- ok: F,
237
- diagnostics: P,
238
- observed: L
239
- }) : (console.log(T(P)), L !== null && console.log(C(L)), console.log(F ? "\nvoltro check: OK" : "\nvoltro check: FAILED (errors above)")), +!F;
264
+ })), I = [
265
+ ...M.diagnostics,
266
+ ...P,
267
+ ...F
268
+ ], L = M.ok && !P.some((e) => e.severity === "error") && F.length === 0, R = await S(d(v)), z = R === null ? null : y(j.procedures, R);
269
+ if (p.format === "json") {
270
+ let e = z === null ? {
271
+ ...M,
272
+ ok: L,
273
+ diagnostics: I
274
+ } : {
275
+ ...M,
276
+ ok: L,
277
+ diagnostics: I,
278
+ observed: z
279
+ };
280
+ i(N === "" ? e : {
281
+ ...e,
282
+ declaredVsLive: N.trim()
283
+ });
284
+ } else console.log(D(I)), z !== null && console.log(T(z)), N !== "" && console.log(N), console.log(L ? "\nvoltro check: OK" : "\nvoltro check: FAILED (errors above)");
285
+ return +!L;
240
286
  };
241
287
  //#endregion
242
- export { D as n, w as r, E as t };
288
+ export { k as a, O as i, w as n, E as o, T as r, C as t };
@@ -1,7 +1,7 @@
1
1
  import { a as e, t } from "./cliArgs-D4p8n7EE.js";
2
2
  import { a as n, i as r, n as i, r as a, t as o } from "./cloudClient-DWL-Hw_T.js";
3
3
  import { n as s } from "./cliOutput-D1tSBoRM.js";
4
- import { d as c, f as l, o as u } from "./projectScaffold-mIX_DpSe.js";
4
+ import { d as c, f as l, o as u } from "./projectScaffold-B4dmTlwT.js";
5
5
  import { basename as d, join as f, resolve as p } from "node:path";
6
6
  import { promises as m } from "node:fs";
7
7
  import { ansi as h } from "@voltro/logger";
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./codegen-VF479Cnb.js";
2
+ export { e as checkRpcGroupFreshness };
@@ -1,4 +1,4 @@
1
- import { b as e, o as t, y as n } from "./fileConventions-Cof68_BL.js";
1
+ import { b as e, o as t, y as n } from "./fileConventions-DOqD3lPS.js";
2
2
  import { dirname as r, join as i, relative as a, resolve as o } from "node:path";
3
3
  import { promises as s, readFileSync as c } from "node:fs";
4
4
  import { pathToFileURL as l } from "node:url";
@@ -1,7 +1,7 @@
1
- import { B as e, Sn as t, l as n, u as r, xn as i } from "./dev-kdAg9Q7l.js";
2
- import { ft as a } from "./webDev-B-ubQEMX.js";
3
- import { n as o } from "./frameworkTableAssembly-BwJVEKLr.js";
4
- import { i as s, r as c } from "./codegen-CrMXs4hb.js";
1
+ import { Cn as e, Sn as t, V as n, l as r, u as i } from "./dev-CRHoCEiy.js";
2
+ import { Ct as a } from "./webDev-BgWL9gKV.js";
3
+ import { n as o } from "./frameworkTableAssembly-w-XnLa3q.js";
4
+ import { i as s, r as c } from "./codegen-VF479Cnb.js";
5
5
  import { basename as l, join as u, relative as d, resolve as f } from "node:path";
6
6
  import { promises as p } from "node:fs";
7
7
  import { pathToFileURL as m } from "node:url";
@@ -100,21 +100,21 @@ var h = "voltro.mobile.ts", g = u(".framework", "mobileApis.generated.ts"), _ =
100
100
  file: i,
101
101
  apis: r.map(([e]) => e)
102
102
  };
103
- }, x = (e, t) => t.kind === "wrote" ? `voltro codegen: wrote ${d(e, t.file)} (apis ${t.apis.join(", ")})` : t.kind === "refused" ? `voltro codegen: ${t.reason} — refusing to write.` : `voltro codegen: no ${h} here — not a mobile app.`, S = async (r) => {
104
- let { config: i, present: a, error: o } = await n(r);
103
+ }, x = (e, t) => t.kind === "wrote" ? `voltro codegen: wrote ${d(e, t.file)} (apis ${t.apis.join(", ")})` : t.kind === "refused" ? `voltro codegen: ${t.reason} — refusing to write.` : `voltro codegen: no ${h} here — not a mobile app.`, S = async (t) => {
104
+ let { config: i, present: a, error: o } = await r(t);
105
105
  if (a && i === null) return {
106
106
  kind: "refused",
107
107
  reason: "app.config.ts exists but could not be loaded" + (o === void 0 ? "" : ` — ${o instanceof Error ? o.message : String(o)}`)
108
108
  };
109
- let s = i?.plugins ?? [], { pluginContributions: u, pluginErrorImports: d, pluginRpcImports: f } = await e(s, i?.name ?? l(r), r), p = await c({
110
- root: r,
109
+ let s = i?.plugins ?? [], { pluginContributions: u, pluginErrorImports: d, pluginRpcImports: f } = await n(s, i?.name ?? l(t), t), p = await c({
110
+ root: t,
111
111
  ...u.length > 0 ? { pluginContributions: u } : {},
112
112
  ...d.length > 0 ? { pluginErrorImports: d } : {},
113
113
  ...f.length > 0 ? { pluginRpcImports: f } : {},
114
114
  ...i?.name === void 0 ? {} : { apiName: i.name }
115
115
  });
116
116
  if (!p) return { kind: "nothing-to-write" };
117
- let m = await C(r, i), h = await t(p, m);
117
+ let m = await C(t, i), h = await e(p, m);
118
118
  return {
119
119
  kind: "wrote",
120
120
  file: p,
@@ -124,9 +124,9 @@ var h = "voltro.mobile.ts", g = u(".framework", "mobileApis.generated.ts"), _ =
124
124
  tables: m.size,
125
125
  dts: h
126
126
  };
127
- }, C = async (e, t) => {
128
- let n = await s(e), { tables: a } = await r(n), c = await o({ root: e });
129
- return i(a, c, t?.analytics?.tables ?? []);
127
+ }, C = async (e, n) => {
128
+ let r = await s(e), { tables: a } = await i(r), c = await o({ root: e });
129
+ return t(a, c, n?.analytics?.tables ?? []);
130
130
  }, w = async (e) => {
131
131
  let t = f(e.find((e) => !e.startsWith("-")) ?? process.cwd()), n = await b(t);
132
132
  if (n.kind !== "not-a-mobile-app") return console.log(x(t, n)), n.kind === "wrote" ? 0 : 1;