@voltro/cli 0.37.0 → 0.38.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 (104) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/dist/{apiBuild-DGsShRuF.js → apiBuild-CvacV4zA.js} +2 -2
  3. package/dist/apiBuild-ttSDDOGp.js +2 -0
  4. package/dist/bin.js +1 -1
  5. package/dist/bootRefusal-pgvDxlrU.js +7 -0
  6. package/dist/{build-CiFA-E19.js → build-_LoTC1s0.js} +30 -30
  7. package/dist/{checkCommand-CLPTzYqM.js → checkCommand-Pjk5sBl2.js} +2 -2
  8. package/dist/{checkCommand-CIPYyNyc.js → checkCommand-wibtQx-N.js} +1 -1
  9. package/dist/{codegenCommand-BxS3sCeJ.js → codegenCommand-C60m_LCp.js} +1 -1
  10. package/dist/{codemodRunner-cyqu5oxr.js → codemodRunner-CXgQ-ecJ.js} +314 -201
  11. package/dist/{commands-BwG9A9Vv.js → commands-DaZVi9wi.js} +20 -20
  12. package/dist/{dashboardCommand-C7U146xQ.js → dashboardCommand-Dxy_kmoW.js} +3 -3
  13. package/dist/{dataCommand-BOwd8_aJ.js → dataCommand-D6-Ha2lf.js} +1 -1
  14. package/dist/{dev-BV6XNYKf.js → dev-CAOoXOkc.js} +1 -1
  15. package/dist/{dev-bwDgSObH.js → dev-E7Eo5GHc.js} +261 -260
  16. package/dist/doctorCommand-Cjl8Yii8.js +2 -0
  17. package/dist/{doctorCommand-BXyrtN2l.js → doctorCommand-gmDyALFL.js} +10 -10
  18. package/dist/{dormancyCommand-BDdRRLsa.js → dormancyCommand-CE6wG8lj.js} +1 -1
  19. package/dist/{embeddingsCommand-CjWGcAE6.js → embeddingsCommand-C3uAuf6N.js} +1 -1
  20. package/dist/{envCommand-B_TeG297.js → envCommand-DzuWh8ya.js} +19 -19
  21. package/dist/{evolveCommand-D6N-WfA4.js → evolveCommand-DPLqcYb2.js} +2 -2
  22. package/dist/index.js +1 -1
  23. package/dist/{infoCommand-BHKTprrx.js → infoCommand-CmczGj_l.js} +1 -1
  24. package/dist/{runtimeTrace-WYV7qYvz.js → runtimeTrace-6jfznSzr.js} +1 -1
  25. package/dist/{sdkgen-TM5sSdf7.js → sdkgen-CEJZZQUA.js} +1 -1
  26. package/dist/serveCommand-DNRF2nDI.js +2 -0
  27. package/dist/{serveCommand-CyZsXL1l.js → serveCommand-DnY4VS3D.js} +541 -540
  28. package/dist/serveEntry.js +1 -1
  29. package/dist/{start-BgN62boB.js → start-CidwCcjl.js} +1 -1
  30. package/dist/{start-T4VesWiM.js → start-RCh6qKFe.js} +24 -24
  31. package/dist/startEntry.js +1 -1
  32. package/dist/startup.d.ts +40 -1
  33. package/dist/startup.js +2 -2
  34. package/dist/startupRunner-CEqQq7ax.js +108 -0
  35. package/dist/updateCommand-B0J_T9Vs.js +2 -0
  36. package/dist/{updateCommand-9GHHsmDf.js → updateCommand-CmksX7m_.js} +1 -1
  37. package/dist/{webDev-Dybxew86.js → webDev-BKdD7c_a.js} +689 -691
  38. package/dist/webDev-CcJfdSjl2.js +2 -0
  39. package/dist/{webhooksCommand-CHWSPk5z.js → webhooksCommand-BHeaF1ZJ.js} +1 -1
  40. package/package.json +29 -17
  41. package/templates/AGENTS.md +1 -1
  42. package/templates/agent-docs/_index.md +1 -1
  43. package/templates/agent-docs/plugins/audit.md +4 -0
  44. package/templates/agent-docs/plugins/auth.md +4 -6
  45. package/templates/agent-docs/reference.md +3 -2
  46. package/templates/agent-docs/whats-new.md +49 -47
  47. package/templates/apps/api-ai/package.json +7 -7
  48. package/templates/apps/api-auth/package.json +8 -8
  49. package/templates/apps/api-backend/package.json +7 -7
  50. package/templates/apps/api-backend-deactivation/package.json +7 -7
  51. package/templates/apps/api-backend-mail/package.json +8 -8
  52. package/templates/apps/api-backend-mariadb/package.json +9 -9
  53. package/templates/apps/api-backend-sqlite/package.json +8 -8
  54. package/templates/apps/api-backend-storage/package.json +8 -8
  55. package/templates/apps/api-cms/package.json +10 -10
  56. package/templates/apps/api-cms/tests/content.write.test.ts +16 -2
  57. package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +11 -5
  58. package/templates/apps/api-collab/package.json +8 -8
  59. package/templates/apps/api-collab/tests/documents.setBody.test.ts +8 -2
  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-feature-flags/package.json +9 -9
  63. package/templates/apps/api-governance/package.json +8 -8
  64. package/templates/apps/api-kv/package.json +8 -8
  65. package/templates/apps/api-moderation/package.json +8 -8
  66. package/templates/apps/api-observability/package.json +8 -8
  67. package/templates/apps/api-ratelimit/package.json +8 -8
  68. package/templates/apps/api-rbac/package.json +8 -8
  69. package/templates/apps/api-rest/package.json +7 -7
  70. package/templates/apps/api-saas/package.json +11 -11
  71. package/templates/apps/api-saas-starter/package.json +10 -10
  72. package/templates/apps/api-search/package.json +8 -8
  73. package/templates/apps/api-status/package.json +8 -8
  74. package/templates/apps/api-versioning/mutations/documents.update.mutation.server.ts +7 -5
  75. package/templates/apps/api-versioning/package.json +8 -8
  76. package/templates/apps/api-webhooks/package.json +9 -9
  77. package/templates/apps/changelog/package.json +6 -6
  78. package/templates/apps/edge-functions/package.json +2 -2
  79. package/templates/apps/frontend-admin/package.json +8 -8
  80. package/templates/apps/frontend-app/package.json +9 -9
  81. package/templates/apps/frontend-auth/package.json +8 -8
  82. package/templates/apps/frontend-blank/package.json +7 -7
  83. package/templates/apps/frontend-cms/package.json +9 -9
  84. package/templates/apps/frontend-collab/package.json +10 -10
  85. package/templates/apps/frontend-contact/package.json +7 -7
  86. package/templates/apps/frontend-dashboard/package.json +7 -7
  87. package/templates/apps/frontend-docs/package.json +7 -7
  88. package/templates/apps/frontend-i18n/package.json +6 -6
  89. package/templates/apps/frontend-landing/package.json +7 -7
  90. package/templates/apps/frontend-portal/package.json +8 -8
  91. package/templates/apps/frontend-saas/package.json +8 -8
  92. package/templates/apps/frontend-spa/package.json +7 -7
  93. package/templates/apps/frontend-ssr/package.json +7 -7
  94. package/templates/apps/frontend-ssr-api/package.json +8 -8
  95. package/templates/apps/frontend-static-blog/package.json +6 -6
  96. package/templates/apps/frontend-status/package.json +8 -8
  97. package/templates/apps/mobile-app/package.json +3 -3
  98. package/templates/patches/@effect__cluster@0.60.0.patch +51 -3
  99. package/dist/apiBuild-D0f6hYbH.js +0 -2
  100. package/dist/doctorCommand-C4L61G_L.js +0 -2
  101. package/dist/serveCommand-qumm7jdF.js +0 -2
  102. package/dist/startupRunner-DPGFchOa.js +0 -71
  103. package/dist/updateCommand-BN0tkl9-.js +0 -2
  104. package/dist/webDev-BcykISYQ2.js +0 -2
@@ -0,0 +1,2 @@
1
+ import { v as e, y as t } from "./doctorCommand-gmDyALFL.js";
2
+ export { e as runDoctorCommand, t as runServePreflight };
@@ -1,8 +1,8 @@
1
- import { Bt as e, Rt as t, zt as n } from "./dev-bwDgSObH.js";
2
- import { $ as r, Q as i, X as a, Z as o, s, t as c, y as l } from "./webDev-Dybxew86.js";
1
+ import { Bt as e, Rt as t, zt as n } from "./dev-E7Eo5GHc.js";
2
+ import { $ as r, Q as i, X as a, Z as o, s, t as c, y as l } from "./webDev-BKdD7c_a.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-DGsShRuF.js";
5
+ import { r as f, u as p } from "./apiBuild-CvacV4zA.js";
6
6
  import { n as m, r as h, t as g } from "./cliOutput-D1tSBoRM.js";
7
7
  import { n as ee, t as te } from "./tsconfigPaths-BWXBWgcl.js";
8
8
  import { n as ne, r as re } from "./fileTaxonomy-CJfgOllU.js";
@@ -1245,7 +1245,7 @@ var le = /* @__PURE__ */ new Set([
1245
1245
  let t = zt.get(e);
1246
1246
  if (t !== void 0) return t;
1247
1247
  let n = (async () => {
1248
- let { walk: t, loadDiscovered: n } = await import("./dev-BV6XNYKf.js"), r = await t(e);
1248
+ let { walk: t, loadDiscovered: n } = await import("./dev-CAOoXOkc.js"), r = await t(e);
1249
1249
  return {
1250
1250
  files: r,
1251
1251
  discovered: await n(r)
@@ -1333,7 +1333,7 @@ var le = /* @__PURE__ */ new Set([
1333
1333
  }
1334
1334
  }, J = async (r) => {
1335
1335
  try {
1336
- let { loadApiConfig: i } = await import("./dev-BV6XNYKf.js"), { discovered: a } = await U(r), o = n(await i(r)), s = {
1336
+ let { loadApiConfig: i } = await import("./dev-CAOoXOkc.js"), { discovered: a } = await U(r), o = n(await i(r)), s = {
1337
1337
  queries: a.queries,
1338
1338
  mutations: a.mutations,
1339
1339
  actions: a.actions,
@@ -1417,7 +1417,7 @@ var le = /* @__PURE__ */ new Set([
1417
1417
  }, Jt = async (e) => Xe({
1418
1418
  hasWorkflows: async () => (await U(e)).discovered.workflows.length > 0,
1419
1419
  openStore: async () => {
1420
- let { loadApiConfig: t, buildStore: n } = await import("./dev-BV6XNYKf.js"), r = await t(e);
1420
+ let { loadApiConfig: t, buildStore: n } = await import("./dev-CAOoXOkc.js"), r = await t(e);
1421
1421
  if (r === null) throw Error("no app.config.ts in this directory");
1422
1422
  let i = await n(r, void 0);
1423
1423
  return {
@@ -1497,7 +1497,7 @@ var le = /* @__PURE__ */ new Set([
1497
1497
  }
1498
1498
  }, en = async (e) => {
1499
1499
  try {
1500
- let { loadApiConfig: t } = await import("./dev-BV6XNYKf.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1500
+ let { loadApiConfig: t } = await import("./dev-CAOoXOkc.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1501
1501
  if (typeof n != "string") return [];
1502
1502
  let [r, i] = n.split("#");
1503
1503
  if (r === void 0 || i === void 0) return [];
@@ -1513,7 +1513,7 @@ var le = /* @__PURE__ */ new Set([
1513
1513
  findings: []
1514
1514
  };
1515
1515
  try {
1516
- let { offlineManifest: n, toInput: r } = await import("./checkCommand-CIPYyNyc.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])];
1516
+ let { offlineManifest: n, toInput: r } = await import("./checkCommand-wibtQx-N.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])];
1517
1517
  if (l.length === 0) return t;
1518
1518
  let u = i({
1519
1519
  ...s,
@@ -1555,7 +1555,7 @@ var le = /* @__PURE__ */ new Set([
1555
1555
  if (n === void 0 || r.length === 0) return;
1556
1556
  let i = [];
1557
1557
  try {
1558
- let { loadApiConfig: t } = await import("./dev-BV6XNYKf.js");
1558
+ let { loadApiConfig: t } = await import("./dev-CAOoXOkc.js");
1559
1559
  i = (await t(e))?.locales ?? [];
1560
1560
  } catch {
1561
1561
  return;
@@ -1571,7 +1571,7 @@ var le = /* @__PURE__ */ new Set([
1571
1571
  }, rn = async (e) => {
1572
1572
  let { discovered: t } = await U(e), n = [];
1573
1573
  try {
1574
- let { loadApiConfig: t } = await import("./dev-BV6XNYKf.js");
1574
+ let { loadApiConfig: t } = await import("./dev-CAOoXOkc.js");
1575
1575
  n = ((await t(e))?.plugins ?? []).map((e) => {
1576
1576
  let t = (e.extendSchema?.tables ?? []).map((e) => {
1577
1577
  let t = e;
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-bwDgSObH.js";
1
+ import { c as e, i as t } from "./dev-E7Eo5GHc.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-bwDgSObH.js";
1
+ import { c as e, i as t } from "./dev-E7Eo5GHc.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-bwDgSObH.js";
2
- import { at as t, ct as n, lt as r, ot as i } from "./webDev-Dybxew86.js";
1
+ import { c as e } from "./dev-E7Eo5GHc.js";
2
+ import { at as t, ct as n, it as r, st as i } from "./webDev-BKdD7c_a.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,29 +19,29 @@ 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`;
25
- u.info(`env manifest — ${r.app} (${r.summary.total} vars, ${r.summary.set} set)`), m(i);
26
- for (let e of r.entries) {
22
+ let t = await f(e);
23
+ if (!t) return u.error("no app.config.ts found in the current directory"), 1;
24
+ let n = r(t.name, t.input), i = `${p("KEY", 32)} ${p("OWNER", 16)} ${p("ACCESS", 8)} ${p("REQ", 4)} SET`;
25
+ u.info(`env manifest — ${n.app} (${n.summary.total} vars, ${n.summary.set} set)`), m(i);
26
+ for (let e of n.entries) {
27
27
  let t = e.isSet ? "✓" : e.satisfied ? "·" : "✗";
28
28
  m(`${p(e.key, 32)} ${p(e.owner, 16)} ${p(e.access, 8)} ${p(e.required ? "yes" : "", 4)} ${t}`);
29
29
  }
30
- return r.summary.missingRequired > 0 ? (u.error(`${r.summary.missingRequired} required var(s) are unset`), 1) : 0;
31
- }, g = async (e, t) => {
32
- let n = await f(e);
33
- if (!n) return u.error("no app.config.ts found in the current directory"), 1;
34
- let r = i(n.input, ["Environment for this app — generated from app.config.ts `env` + plugin declarations.", "Regenerate with `voltro env sync`. Copy to `.env` and fill in the blanks."]), s = a(e, ".env.example"), c = await o.readFile(s, "utf8").catch(() => null);
35
- if (c !== null && !c.startsWith(d) && !t) {
30
+ return n.summary.missingRequired > 0 ? (u.error(`${n.summary.missingRequired} required var(s) are unset`), 1) : 0;
31
+ }, g = async (e, n) => {
32
+ let r = await f(e);
33
+ if (!r) return u.error("no app.config.ts found in the current directory"), 1;
34
+ let i = t(r.input, ["Environment for this app — generated from app.config.ts `env` + plugin declarations.", "Regenerate with `voltro env sync`. Copy to `.env` and fill in the blanks."]), s = a(e, ".env.example"), c = await o.readFile(s, "utf8").catch(() => null);
35
+ if (c !== null && !c.startsWith(d) && !n) {
36
36
  let t = a(e, ".env.example.generated");
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;
37
+ return await o.writeFile(t, i, "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
- return await o.writeFile(s, r, "utf8"), u.info("wrote .env.example", { app: n.name }), 0;
39
+ return await o.writeFile(s, i, "utf8"), u.info("wrote .env.example", { app: r.name }), 0;
40
40
  }, _ = async (t) => {
41
- let i = await e(t).catch(() => null);
42
- if (!i) return u.error("no app.config.ts found in the current directory"), 1;
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);
41
+ let r = await e(t).catch(() => null);
42
+ if (!r) return u.error("no app.config.ts found in the current directory"), 1;
43
+ let a = l(r.env) ? r.env : void 0;
44
+ return a ? (r.type === "web" ? (await i(t, a), u.info("wrote src/voltro-env.d.ts (publicEnv augmentation)", { app: r.name ?? "app" })) : (await n(t, a), u.info("wrote env.generated.d.ts (serverEnv augmentation)", { app: r.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-CLPTzYqM.js";
3
- import { i as n, n as r } from "./codemodRunner-cyqu5oxr.js";
2
+ import { t } from "./checkCommand-Pjk5sBl2.js";
3
+ import { i as n, n as r } from "./codemodRunner-CXgQ-ecJ.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";
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-BwG9A9Vv.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-DaZVi9wi.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-9GHHsmDf.js";
2
+ import { o as r } from "./updateCommand-CmksX7m_.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,4 +1,4 @@
1
- import { n as e } from "./apiBuild-DGsShRuF.js";
1
+ import { n as e } from "./apiBuild-CvacV4zA.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-CIPYyNyc.js"), { manifest: n } = await t(e);
425
+ let { offlineManifest: t } = await import("./checkCommand-wibtQx-N.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-DnY4VS3D.js";
2
+ export { e as runServeDispatch };