@voltro/cli 0.39.0 → 0.40.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 (106) hide show
  1. package/CHANGELOG.md +210 -0
  2. package/dist/agentsMd-Bu_XQgVf.js +2 -0
  3. package/dist/{agentsMd-7zI2h5l9.js → agentsMd-D6yD7IQv.js} +31 -14
  4. package/dist/apiBuild-BIyGkym8.js +2 -0
  5. package/dist/{apiBuild-DGalUk9v.js → apiBuild-C8xBEYbL.js} +2 -2
  6. package/dist/bin.js +1 -1
  7. package/dist/{build-CfF6t0UM.js → build-CkhFGnKA.js} +168 -165
  8. package/dist/{checkCommand-CBtynBKW.js → checkCommand-BcXJa2IS.js} +3 -3
  9. package/dist/{checkCommand-BV56Pcc1.js → checkCommand-QbHshOac.js} +1 -1
  10. package/dist/{cloudCmd-C42gaO8s.js → cloudCmd-F4YJeqM3.js} +1 -1
  11. package/dist/{codegenCommand-W7SDdiAQ.js → codegenCommand-DF2OJh3O.js} +2 -2
  12. package/dist/{codemodRunner-D-jTyvWo.js → codemodRunner-BcOvi4A2.js} +103 -0
  13. package/dist/{commands-BD9eBRY3.js → commands-7Z7-HOE3.js} +30 -30
  14. package/dist/{dashboardCommand-7qGylm0F.js → dashboardCommand-CUycH6dR.js} +5 -5
  15. package/dist/{dataCommand-C_F2DYxe.js → dataCommand-By78lscK.js} +1 -1
  16. package/dist/{dev-alhkKoEX.js → dev-D8JSKlBM.js} +1 -1
  17. package/dist/{dev-gqpnzVhI.js → dev-Dh1NuYx1.js} +1569 -1569
  18. package/dist/{doctorCommand-Bvs-BQrM.js → doctorCommand-C-8-Z9D6.js} +55 -42
  19. package/dist/doctorCommand-FhQ7EVYL.js +2 -0
  20. package/dist/{dormancyCommand-B-PPHc9Q.js → dormancyCommand-A79Odglm.js} +1 -1
  21. package/dist/{embeddingsCommand-OKY6XjUf.js → embeddingsCommand-CoiyHfkY.js} +1 -1
  22. package/dist/{envCommand-B1-Zm85H.js → envCommand-B6d0s-jZ.js} +8 -8
  23. package/dist/{evolveCommand-C4-NlFbd.js → evolveCommand-BC5a9lxX.js} +2 -2
  24. package/dist/frameworkTableAssembly-DgylYh9_.js +2 -0
  25. package/dist/index.js +1 -1
  26. package/dist/{infoCommand-CTo8Jnhq.js → infoCommand-ZqSVzJZ4.js} +1 -1
  27. package/dist/{metaCommands-DUYR--Ts.js → metaCommands-CfRLra0s.js} +1 -1
  28. package/dist/{projectScaffold-BEhhHjPr.js → projectScaffold-BIl97_E6.js} +1 -1
  29. package/dist/{projectScaffold-BvhLOrLq.js → projectScaffold-mIX_DpSe.js} +1 -1
  30. package/dist/{runtimeTrace-DzZOCd94.js → runtimeTrace-BslKJjDY.js} +1 -1
  31. package/dist/{sdkgen-C4roLErM.js → sdkgen-DQ8uEmmn.js} +1 -1
  32. package/dist/serveCommand-BmvEQCMS.js +2 -0
  33. package/dist/{serveCommand-B6TATyCj.js → serveCommand-Dqb9Ku1-.js} +657 -657
  34. package/dist/serveEntry.js +1 -1
  35. package/dist/{start-BNuTWdRd.js → start-BA7txHhY.js} +1 -1
  36. package/dist/{start-ft_KzFTd.js → start-dkNYKtgQ.js} +342 -318
  37. package/dist/startEntry.js +1 -1
  38. package/dist/updateCommand-BauSVxPp.js +2 -0
  39. package/dist/{updateCommand-CHBmCB17.js → updateCommand-eoGpZr3E.js} +1 -1
  40. package/dist/webDev-CBbKs4dZ.js +2 -0
  41. package/dist/{webDev-CTpSY-e_.js → webDev-bybjZA0o.js} +240 -186
  42. package/dist/{webhooksCommand-BVvOtZ1B.js → webhooksCommand-DubZWNOx.js} +1 -1
  43. package/package.json +29 -17
  44. package/templates/AGENTS.md +1 -1
  45. package/templates/agent-docs/_index.md +1 -1
  46. package/templates/agent-docs/authentication.md +13 -4
  47. package/templates/agent-docs/data.md +43 -0
  48. package/templates/agent-docs/routing.md +40 -0
  49. package/templates/agent-docs/whats-new.md +91 -157
  50. package/templates/apps/api-ai/package.json +7 -7
  51. package/templates/apps/api-auth/package.json +8 -8
  52. package/templates/apps/api-backend/package.json +7 -7
  53. package/templates/apps/api-backend-deactivation/package.json +7 -7
  54. package/templates/apps/api-backend-mail/package.json +8 -8
  55. package/templates/apps/api-backend-mariadb/package.json +9 -9
  56. package/templates/apps/api-backend-sqlite/package.json +8 -8
  57. package/templates/apps/api-backend-storage/package.json +8 -8
  58. package/templates/apps/api-cms/package.json +10 -10
  59. package/templates/apps/api-collab/package.json +8 -8
  60. package/templates/apps/api-data-advanced/package.json +8 -8
  61. package/templates/apps/api-durable/package.json +8 -8
  62. package/templates/apps/api-durable/startup/warm.startup.tsx +16 -2
  63. package/templates/apps/api-durable/tests/orders.place.test.ts +17 -4
  64. package/templates/apps/api-feature-flags/package.json +9 -9
  65. package/templates/apps/api-governance/package.json +8 -8
  66. package/templates/apps/api-kv/package.json +8 -8
  67. package/templates/apps/api-moderation/package.json +8 -8
  68. package/templates/apps/api-observability/package.json +8 -8
  69. package/templates/apps/api-ratelimit/package.json +8 -8
  70. package/templates/apps/api-rbac/package.json +8 -8
  71. package/templates/apps/api-rest/package.json +7 -7
  72. package/templates/apps/api-saas/package.json +11 -11
  73. package/templates/apps/api-saas-starter/package.json +10 -10
  74. package/templates/apps/api-search/package.json +8 -8
  75. package/templates/apps/api-status/package.json +8 -8
  76. package/templates/apps/api-versioning/package.json +8 -8
  77. package/templates/apps/api-webhooks/package.json +9 -9
  78. package/templates/apps/changelog/package.json +6 -6
  79. package/templates/apps/changelog/src/pages/[slug]/page.test.tsx +8 -1
  80. package/templates/apps/edge-functions/package.json +2 -2
  81. package/templates/apps/frontend-admin/package.json +8 -8
  82. package/templates/apps/frontend-app/package.json +9 -9
  83. package/templates/apps/frontend-auth/package.json +8 -8
  84. package/templates/apps/frontend-blank/package.json +7 -7
  85. package/templates/apps/frontend-cms/package.json +9 -9
  86. package/templates/apps/frontend-collab/package.json +10 -10
  87. package/templates/apps/frontend-contact/package.json +7 -7
  88. package/templates/apps/frontend-dashboard/package.json +7 -7
  89. package/templates/apps/frontend-docs/package.json +7 -7
  90. package/templates/apps/frontend-i18n/package.json +6 -6
  91. package/templates/apps/frontend-landing/package.json +7 -7
  92. package/templates/apps/frontend-portal/package.json +8 -8
  93. package/templates/apps/frontend-saas/package.json +8 -8
  94. package/templates/apps/frontend-spa/package.json +7 -7
  95. package/templates/apps/frontend-ssr/package.json +7 -7
  96. package/templates/apps/frontend-ssr-api/package.json +8 -8
  97. package/templates/apps/frontend-static-blog/package.json +6 -6
  98. package/templates/apps/frontend-status/package.json +8 -8
  99. package/templates/apps/mobile-app/package.json +4 -4
  100. package/dist/agentsMd-BFCXh2gl.js +0 -2
  101. package/dist/apiBuild-2GvK8CUB.js +0 -2
  102. package/dist/doctorCommand-CVXfRrng.js +0 -2
  103. package/dist/frameworkTableAssembly-YyVe32Cb.js +0 -2
  104. package/dist/serveCommand-CNR0gI9V.js +0 -2
  105. package/dist/updateCommand-6FMU2klq.js +0 -2
  106. package/dist/webDev-id3I5PvG.js +0 -2
@@ -1,8 +1,8 @@
1
- import { Bt as e, Ht as t, Vt as n } from "./dev-gqpnzVhI.js";
2
- import { $ as r, Q as i, X as a, Z as o, s, t as c, y as l } from "./webDev-CTpSY-e_.js";
1
+ import { Bt as e, Ht as t, Vt as n } from "./dev-Dh1NuYx1.js";
2
+ import { et as r, nt as i, rt as a, s as o, t as s, tt as c, y as l } from "./webDev-bybjZA0o.js";
3
3
  import { w as u } from "./frameworkTableAssembly-oMPBKqlE.js";
4
4
  import { n as d } from "./pageConvention-cEiRxdab.js";
5
- import { r as f, u as p } from "./apiBuild-DGalUk9v.js";
5
+ import { r as f, u as p } from "./apiBuild-C8xBEYbL.js";
6
6
  import { n as m, r as h, t as g } from "./cliOutput-D1tSBoRM.js";
7
7
  import { n as _, t as ee } from "./tsconfigPaths-BWXBWgcl.js";
8
8
  import { n as te, r as ne } from "./fileTaxonomy-CJfgOllU.js";
@@ -1120,19 +1120,19 @@ var ce = /* @__PURE__ */ new Set([
1120
1120
  if (!S(t)) return [];
1121
1121
  let { pages: n, dirs: r } = await l(t), i = [];
1122
1122
  for (let a of n) {
1123
- if (!s(r, a.dirChain).some((e) => e.hasLayout)) continue;
1123
+ if (!o(r, a.dirChain).some((e) => e.hasLayout)) continue;
1124
1124
  let n;
1125
1125
  try {
1126
1126
  n = C(v(t, a.file), "utf8");
1127
1127
  } catch {
1128
1128
  continue;
1129
1129
  }
1130
- if (c.test(n)) continue;
1131
- let o = kt(n);
1132
- o !== null && i.push({
1130
+ if (s.test(n)) continue;
1131
+ let c = kt(n);
1132
+ c !== null && i.push({
1133
1133
  file: y(e, v(t, a.file)),
1134
1134
  pattern: a.pattern,
1135
- currentMode: o
1135
+ currentMode: c
1136
1136
  });
1137
1137
  }
1138
1138
  return i;
@@ -1249,7 +1249,7 @@ var ce = /* @__PURE__ */ new Set([
1249
1249
  let t = zt.get(e);
1250
1250
  if (t !== void 0) return t;
1251
1251
  let n = (async () => {
1252
- let { walk: t, loadDiscovered: n } = await import("./dev-alhkKoEX.js"), r = await t(e);
1252
+ let { walk: t, loadDiscovered: n } = await import("./dev-D8JSKlBM.js"), r = await t(e);
1253
1253
  return {
1254
1254
  files: r,
1255
1255
  discovered: await n(r)
@@ -1337,7 +1337,7 @@ var ce = /* @__PURE__ */ new Set([
1337
1337
  }
1338
1338
  }, J = async (r) => {
1339
1339
  try {
1340
- let { loadApiConfig: i } = await import("./dev-alhkKoEX.js"), { discovered: a } = await U(r), o = n(await i(r)), s = {
1340
+ let { loadApiConfig: i } = await import("./dev-D8JSKlBM.js"), { discovered: a } = await U(r), o = n(await i(r)), s = {
1341
1341
  queries: a.queries,
1342
1342
  mutations: a.mutations,
1343
1343
  actions: a.actions,
@@ -1421,7 +1421,7 @@ var ce = /* @__PURE__ */ new Set([
1421
1421
  }, Jt = async (e) => Ye({
1422
1422
  hasWorkflows: async () => (await U(e)).discovered.workflows.length > 0,
1423
1423
  openStore: async () => {
1424
- let { loadApiConfig: t, buildStore: n } = await import("./dev-alhkKoEX.js"), r = await t(e);
1424
+ let { loadApiConfig: t, buildStore: n } = await import("./dev-D8JSKlBM.js"), r = await t(e);
1425
1425
  if (r === null) throw Error("no app.config.ts in this directory");
1426
1426
  let i = await n(r, void 0);
1427
1427
  return {
@@ -1501,7 +1501,7 @@ var ce = /* @__PURE__ */ new Set([
1501
1501
  }
1502
1502
  }, en = async (e) => {
1503
1503
  try {
1504
- let { loadApiConfig: t } = await import("./dev-alhkKoEX.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1504
+ let { loadApiConfig: t } = await import("./dev-D8JSKlBM.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1505
1505
  if (typeof n != "string") return [];
1506
1506
  let [r, i] = n.split("#");
1507
1507
  if (r === void 0 || i === void 0) return [];
@@ -1511,14 +1511,23 @@ var ce = /* @__PURE__ */ new Set([
1511
1511
  return [];
1512
1512
  }
1513
1513
  }, Q = async (e) => {
1514
- let t = {
1514
+ let t = (e) => ({
1515
1515
  evaluated: !1,
1516
+ notEvaluated: e,
1516
1517
  vocabularySize: 0,
1517
1518
  findings: []
1518
- };
1519
+ });
1519
1520
  try {
1520
- let { offlineManifest: n, toInput: r } = await import("./checkCommand-BV56Pcc1.js"), { buildAppGraph: i, checkAppGraph: a } = await import("./appGraph-zuMGKVYX.js"), o = await n(e), s = r(o.manifest, o.tables), c = await en(e), l = [.../* @__PURE__ */ new Set([...s.scopes ?? [], ...c])];
1521
- if (l.length === 0) return t;
1521
+ let { offlineManifest: n, toInput: r } = await import("./checkCommand-QbHshOac.js"), { buildAppGraph: i, checkAppGraph: a } = await import("./appGraph-zuMGKVYX.js"), o = await n(e), s = r(o.manifest, o.tables), c = await en(e), l = [.../* @__PURE__ */ new Set([...s.scopes ?? [], ...c])];
1522
+ if (l.length === 0) {
1523
+ try {
1524
+ let { loadAppSchemaInputs: t } = await import("./frameworkTableAssembly-DgylYh9_.js");
1525
+ await t(e);
1526
+ } catch {
1527
+ return t("app-not-importable");
1528
+ }
1529
+ return t("no-vocabulary");
1530
+ }
1522
1531
  let u = i({
1523
1532
  ...s,
1524
1533
  scopes: l
@@ -1534,12 +1543,16 @@ var ce = /* @__PURE__ */ new Set([
1534
1543
  }))
1535
1544
  };
1536
1545
  } catch {
1537
- return t;
1546
+ return t("app-not-importable");
1538
1547
  }
1539
1548
  }, tn = async (e) => {
1540
- let { findings: t, evaluated: n } = await Q(e);
1549
+ let { findings: t, evaluated: n, notEvaluated: r } = await Q(e);
1541
1550
  if (!n) {
1542
- console.log(""), console.log("• scope vocabulary: none found — the unknown-scope rule did NOT run."), console.log(" It compares each procedure's required scopes against the scopes your"), console.log(" roles actually grant, and needs somewhere to read that set from."), console.log(" `@voltro/plugin-rbac` publishes it from its `roles` map; an app doing"), console.log(" RBAC without the plugin can point at its own:"), console.log(""), console.log(" // app.config.ts"), console.log(" doctor: { scopeVocabulary: './lib/teamRoles.ts#ALL_TEAM_SCOPES' }"), console.log(""), console.log(" Until then this section is NOT a clean bill of health — a procedure"), console.log(" requiring a scope no role grants is uncallable by everyone, and"), console.log(" nothing here would have told you.");
1551
+ if (console.log(""), r === "app-not-importable") {
1552
+ console.log("• scope vocabulary: NOT EVALUATED — `app.config.ts` could not be imported."), console.log(" This is not a statement about your scopes: the rule never got to read"), console.log(" them. The commonest cause is a config that demands its environment while"), console.log(" it is evaluated — an auth strategy reading a secret, say — so it imports"), console.log(" inside the container and not on a workstation."), console.log(""), console.log(" Run doctor where that environment exists, or make the config importable"), console.log(" without it. The same import failure is reported above for plugin tables;"), console.log(" both sections have this one cause.");
1553
+ return;
1554
+ }
1555
+ console.log("• scope vocabulary: none found — the unknown-scope rule did NOT run."), console.log(" It compares each procedure's required scopes against the scopes your"), console.log(" roles actually grant, and needs somewhere to read that set from."), console.log(" `@voltro/plugin-rbac` publishes it from its `roles` map; an app doing"), console.log(" RBAC without the plugin can point at its own:"), console.log(""), console.log(" // app.config.ts"), console.log(" doctor: { scopeVocabulary: './lib/teamRoles.ts#ALL_TEAM_SCOPES' }"), console.log(""), console.log(" Until then this section is NOT a clean bill of health — a procedure"), console.log(" requiring a scope no role grants is uncallable by everyone, and"), console.log(" nothing here would have told you.");
1543
1556
  return;
1544
1557
  }
1545
1558
  if (t.length !== 0) {
@@ -1559,7 +1572,7 @@ var ce = /* @__PURE__ */ new Set([
1559
1572
  if (n === void 0 || r.length === 0) return;
1560
1573
  let i = [];
1561
1574
  try {
1562
- let { loadApiConfig: t } = await import("./dev-alhkKoEX.js");
1575
+ let { loadApiConfig: t } = await import("./dev-D8JSKlBM.js");
1563
1576
  i = (await t(e))?.locales ?? [];
1564
1577
  } catch {
1565
1578
  return;
@@ -1575,7 +1588,7 @@ var ce = /* @__PURE__ */ new Set([
1575
1588
  }, rn = async (e) => {
1576
1589
  let { discovered: t } = await U(e), n = [];
1577
1590
  try {
1578
- let { loadApiConfig: t } = await import("./dev-alhkKoEX.js");
1591
+ let { loadApiConfig: t } = await import("./dev-D8JSKlBM.js");
1579
1592
  n = ((await t(e))?.plugins ?? []).map((e) => {
1580
1593
  let t = (e.extendSchema?.tables ?? []).map((e) => {
1581
1594
  let t = e;
@@ -1720,30 +1733,30 @@ var ce = /* @__PURE__ */ new Set([
1720
1733
  return n.unchecked.length > $ && console.log(` … and ${n.unchecked.length - $} more — \`voltro doctor --json\` prints every one (\`authz.unchecked\`).`), i === void 0 ? (console.log(`\nNo ${X} yet, so this run is advisory. To start the ratchet:`), console.log("\n voltro doctor --write-authz-allowlist\n"), console.log("That records today's unchecked handlers as DEBT and fails every run after on"), console.log("anything NEW. Fix a handler and its line stops mattering — the scan reports it as"), console.log("guarded whether or not the line is still there."), !1) : (console.log(`\n${n.unchecked.length} executor(s) with no access check are not in ${X}.`), console.log("Add a guard, or add the tag to that file if it is genuinely open."), console.log("\nBefore hand-rolling another check: `guards: [{ action, resourceType, resource }]`"), console.log("answers \"may this subject act on THIS row\" declaratively, and an app whose"), console.log("relationships live in its own tables registers its own tuple source rather than"), console.log("copying data into a framework table. See the authorization docs."), !0);
1721
1734
  }, un = async (e) => {
1722
1735
  if (e.includes("--help") || e.includes("-h")) return console.log(Rt), 0;
1723
- let t = e.includes("--strict"), n = e.find((e) => !e.startsWith("-")), s = b(n ?? process.cwd());
1736
+ let t = e.includes("--strict"), n = e.find((e) => !e.startsWith("-")), o = b(n ?? process.cwd());
1724
1737
  if (h(e)) return g(), m({
1725
- ...z(s),
1726
- spaCandidates: await B(s),
1727
- pageConvention: V(s),
1728
- fileTaxonomy: ne(s).findings,
1729
- junctionFks: (await W(s))?.issues ?? [],
1730
- eventDelivery: await G(s),
1731
- duplicateInstances: a(s),
1732
- versionSkew: o(s) ?? null,
1733
- serverOnly: (await q(s)).status,
1734
- accessDecisions: await J(s),
1735
- webhookVerification: await Y(s),
1736
- authz: await sn(s),
1737
- ungrantedScopes: await Q(s),
1738
- neverEmittedEvents: await Z(s),
1739
- stalledRuns: await Jt(s)
1738
+ ...z(o),
1739
+ spaCandidates: await B(o),
1740
+ pageConvention: V(o),
1741
+ fileTaxonomy: ne(o).findings,
1742
+ junctionFks: (await W(o))?.issues ?? [],
1743
+ eventDelivery: await G(o),
1744
+ duplicateInstances: r(o),
1745
+ versionSkew: c(o) ?? null,
1746
+ serverOnly: (await q(o)).status,
1747
+ accessDecisions: await J(o),
1748
+ webhookVerification: await Y(o),
1749
+ authz: await sn(o),
1750
+ ungrantedScopes: await Q(o),
1751
+ neverEmittedEvents: await Z(o),
1752
+ stalledRuns: await Jt(o)
1740
1753
  }), 0;
1741
- let c = tt(s, t);
1742
- Tt(s), wt(s), Lt(s), te(s), await jt(s), await Xt(s), await Yt(s), await Bt(s), await Ht(s), await Ut(s), await rn(s), await tn(s), await $t(s), await nn(s);
1743
- let l = await qt(s), u = await ln(s, e.includes("--write-authz-allowlist")), d = await Wt(s), f = await Kt(s), p = r(o(s));
1754
+ let s = tt(o, t);
1755
+ Tt(o), wt(o), Lt(o), te(o), await jt(o), await Xt(o), await Yt(o), await Bt(o), await Ht(o), await Ut(o), await rn(o), await tn(o), await $t(o), await nn(o);
1756
+ let l = await qt(o), u = await ln(o, e.includes("--write-authz-allowlist")), d = await Wt(o), f = await Kt(o), p = a(c(o));
1744
1757
  p !== void 0 && (console.log(""), console.log(p));
1745
- let _ = i(a(s));
1746
- return _ !== void 0 && console.log(`\n${_}`), l || u || d || f ? Math.max(c, 1) : c;
1758
+ let _ = i(r(o));
1759
+ return _ !== void 0 && console.log(`\n${_}`), l || u || d || f ? Math.max(s, 1) : s;
1747
1760
  };
1748
1761
  //#endregion
1749
1762
  export { q as C, B as S, Y as T, jt as _, sn as a, yt as b, G as c, vt as d, $e as f, Lt as g, Tt as h, J as i, Zt as l, wt as m, et as n, Z as o, W as p, Et as r, Qt as s, Rt as t, z as u, un as v, Q as w, V as x, tt as y };
@@ -0,0 +1,2 @@
1
+ import { v as e, y as t } from "./doctorCommand-C-8-Z9D6.js";
2
+ export { e as runDoctorCommand, t as runServePreflight };
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-gqpnzVhI.js";
1
+ import { c as e, i as t } from "./dev-Dh1NuYx1.js";
2
2
  import { n, t as r } from "./cliArgs-D4p8n7EE.js";
3
3
  import { r as i } from "./appPort-B_HpJ_ck.js";
4
4
  import { resolve as a } from "node:path";
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-gqpnzVhI.js";
1
+ import { c as e, i as t } from "./dev-Dh1NuYx1.js";
2
2
  import { Effect as n } from "effect";
3
3
  import { embedMany as r } from "@voltro/ai";
4
4
  //#region src/embeddingsBackfill.ts
@@ -1,5 +1,5 @@
1
- import { c as e } from "./dev-gqpnzVhI.js";
2
- import { at as t, ct as n, lt as r, ot as i } from "./webDev-CTpSY-e_.js";
1
+ import { c as e } from "./dev-Dh1NuYx1.js";
2
+ import { ft as t, lt as n, pt as r, ut as i } from "./webDev-bybjZA0o.js";
3
3
  import { join as a } from "node:path";
4
4
  import { promises as o } from "node:fs";
5
5
  import { createLogger as s } from "@voltro/logger";
@@ -19,9 +19,9 @@ var u = s({ scope: "voltro:env" }), d = "# Environment for this app", f = async
19
19
  }, p = (e, t) => e.length >= t ? e : e + " ".repeat(t - e.length), m = (e) => {
20
20
  process.stdout.write(`${e}\n`);
21
21
  }, h = async (e) => {
22
- let n = await f(e);
23
- if (!n) return u.error("no app.config.ts found in the current directory"), 1;
24
- let r = t(n.name, n.input), i = `${p("KEY", 32)} ${p("OWNER", 16)} ${p("ACCESS", 8)} ${p("REQ", 4)} SET`;
22
+ let t = await f(e);
23
+ if (!t) return u.error("no app.config.ts found in the current directory"), 1;
24
+ let r = n(t.name, t.input), i = `${p("KEY", 32)} ${p("OWNER", 16)} ${p("ACCESS", 8)} ${p("REQ", 4)} SET`;
25
25
  u.info(`env manifest — ${r.app} (${r.summary.total} vars, ${r.summary.set} set)`), m(i);
26
26
  for (let e of r.entries) {
27
27
  let t = e.isSet ? "✓" : e.satisfied ? "·" : "✗";
@@ -37,11 +37,11 @@ var u = s({ scope: "voltro:env" }), d = "# Environment for this app", f = async
37
37
  return await o.writeFile(t, r, "utf8"), u.warn(".env.example exists and is not framework-generated — wrote .env.example.generated instead", { hint: "merge it by hand, or pass --force to overwrite .env.example" }), 0;
38
38
  }
39
39
  return await o.writeFile(s, r, "utf8"), u.info("wrote .env.example", { app: n.name }), 0;
40
- }, _ = async (t) => {
41
- let i = await e(t).catch(() => null);
40
+ }, _ = async (n) => {
41
+ let i = await e(n).catch(() => null);
42
42
  if (!i) return u.error("no app.config.ts found in the current directory"), 1;
43
43
  let a = l(i.env) ? i.env : void 0;
44
- return a ? (i.type === "web" ? (await n(t, a), u.info("wrote src/voltro-env.d.ts (publicEnv augmentation)", { app: i.name ?? "app" })) : (await r(t, a), u.info("wrote env.generated.d.ts (serverEnv augmentation)", { app: i.name ?? "app" })), 0) : (u.warn("no `defineEnv` declared in app.config.ts — nothing to generate", { hint: "add `env: defineEnv({ ... })` to app.config.ts (see @voltro/env)" }), 0);
44
+ return a ? (i.type === "web" ? (await t(n, a), u.info("wrote src/voltro-env.d.ts (publicEnv augmentation)", { app: i.name ?? "app" })) : (await r(n, a), u.info("wrote env.generated.d.ts (serverEnv augmentation)", { app: i.name ?? "app" })), 0) : (u.warn("no `defineEnv` declared in app.config.ts — nothing to generate", { hint: "add `env: defineEnv({ ... })` to app.config.ts (see @voltro/env)" }), 0);
45
45
  }, v = () => {
46
46
  let e = c();
47
47
  return u.info(`${e.length} framework env vars for turbo.json globalPassThroughEnv:`), m(JSON.stringify([...e].sort(), null, 2)), u.info("merge these into the workspace turbo.json `globalPassThroughEnv` array (+ your own app vars)."), 0;
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./cliOutput-D1tSBoRM.js";
2
- import { t } from "./checkCommand-CBtynBKW.js";
3
- import { i as n, n as r } from "./codemodRunner-D-jTyvWo.js";
2
+ import { t } from "./checkCommand-BcXJa2IS.js";
3
+ import { i as n, n as r } from "./codemodRunner-BcOvi4A2.js";
4
4
  import { basename as i, join as a, resolve as o } from "node:path";
5
5
  import { branchNamespaceName as s, planBranchProvision as c } from "@voltro/database";
6
6
  import { readFile as l } from "node:fs/promises";
@@ -0,0 +1,2 @@
1
+ import { c as e, n as t } from "./frameworkTableAssembly-oMPBKqlE.js";
2
+ export { t as assembleFrameworkTables, e as loadAppSchemaInputs };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-BD9eBRY3.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-7Z7-HOE3.js";
2
2
  import { r as o } from "./templates-BR-fb4SP.js";
3
3
  //#region src/index.ts
4
4
  var s = "framework";
@@ -1,5 +1,5 @@
1
1
  import { n as e, r as t, t as n } from "./cliOutput-D1tSBoRM.js";
2
- import { o as r } from "./updateCommand-CHBmCB17.js";
2
+ import { o as r } from "./updateCommand-eoGpZr3E.js";
3
3
  import { join as i, resolve as a } from "node:path";
4
4
  import { readFileSync as o, readdirSync as s, statSync as c } from "node:fs";
5
5
  //#region src/infoCommand.ts
@@ -1,7 +1,7 @@
1
1
  import { i as e, n as t, r as n } from "./cliArgs-D4p8n7EE.js";
2
2
  import { t as r } from "./cliRuntime-Dh7UDinH.js";
3
3
  import { n as i } from "./renderProfile-1OWWAAtx.js";
4
- import { a, i as o } from "./projectScaffold-BvhLOrLq.js";
4
+ import { a, i as o } from "./projectScaffold-mIX_DpSe.js";
5
5
  import { t as s } from "./discover-C9XKJDco.js";
6
6
  import { basename as c, join as l, relative as u, resolve as d } from "node:path";
7
7
  import { createLogger as f } from "@voltro/logger";
@@ -1,2 +1,2 @@
1
- import { c as e, l as t, s as n } from "./projectScaffold-BvhLOrLq.js";
1
+ import { c as e, l as t, s as n } from "./projectScaffold-mIX_DpSe.js";
2
2
  export { n as runAddApp, e as runCreateProject, t as runListTemplates };
@@ -1,7 +1,7 @@
1
1
  import { a as e, i as t, n, r, t as i } from "./templates-BR-fb4SP.js";
2
2
  import { i as a, n as o, t as s } from "./cloudClient-DWL-Hw_T.js";
3
3
  import { t as c } from "./cliRuntime-Dh7UDinH.js";
4
- import { n as l } from "./agentsMd-7zI2h5l9.js";
4
+ import { n as l } from "./agentsMd-D6yD7IQv.js";
5
5
  import { n as u } from "./addCommand-C05L9tZh.js";
6
6
  import { a as d, n as f, r as p } from "./baselineCommand-Ck2Xm8M7.js";
7
7
  import { basename as m, dirname as h, join as g, resolve as _ } from "node:path";
@@ -1,4 +1,4 @@
1
- import { n as e } from "./apiBuild-DGalUk9v.js";
1
+ import { n as e } from "./apiBuild-C8xBEYbL.js";
2
2
  import { join as t, resolve as n, sep as r } from "node:path";
3
3
  import { existsSync as i, promises as a } from "node:fs";
4
4
  import { createLogger as o } from "@voltro/logger";
@@ -422,7 +422,7 @@ let package = Package(
422
422
  await l.mkdir(o(e), { recursive: !0 }), await l.writeFile(e, n.content, "utf8");
423
423
  }
424
424
  }, X = async (e) => {
425
- let { offlineManifest: t } = await import("./checkCommand-BV56Pcc1.js"), { manifest: n } = await t(e);
425
+ let { offlineManifest: t } = await import("./checkCommand-QbHshOac.js"), { manifest: n } = await t(e);
426
426
  return n;
427
427
  }, Z = async (e) => {
428
428
  let t = J(await (e.manifestProvider ?? X)(e.root), {
@@ -0,0 +1,2 @@
1
+ import { n as e } from "./serveCommand-Dqb9Ku1-.js";
2
+ export { e as runServeDispatch };