@voltro/cli 0.57.0 → 0.59.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 (110) hide show
  1. package/CHANGELOG.md +256 -0
  2. package/dist/apiBuild-B9OvhITV.js +2 -0
  3. package/dist/{apiBuild-DDr2aNFd.js → apiBuild-BU5cd-Fn.js} +52 -50
  4. package/dist/bin.js +1 -1
  5. package/dist/build-uRMZrT8z.js +1066 -0
  6. package/dist/{checkCommand-BISqx1OJ.js → checkCommand-C1CQc8lD.js} +1 -1
  7. package/dist/{checkCommand-DUtMWjcR.js → checkCommand-DC7k1_hP.js} +3 -3
  8. package/dist/{codegenCommand-DnVuDxwT.js → codegenCommand-kS3Twuc9.js} +7 -7
  9. package/dist/{codemodRunner-BlQPfjzA.js → codemodRunner-kNnh1I7_.js} +1227 -911
  10. package/dist/{commands-CRbxgxv0.js → commands-cu34ENUT.js} +21 -21
  11. package/dist/{dashboardCommand-Bf_-Ne3P.js → dashboardCommand-gG1y4PFG.js} +5 -5
  12. package/dist/{dataCommand-BoBJJ-Gb.js → dataCommand-hNOGKz4K.js} +6 -6
  13. package/dist/{dev-DOEJXicj.js → dev-Ce2gEziv.js} +2422 -2419
  14. package/dist/dev-Dff_pdik.js +3 -0
  15. package/dist/{doctorCommand-BrWu67JZ.js → doctorCommand-CGjefPmk.js} +505 -284
  16. package/dist/doctorCommand-DXnNpKQT.js +2 -0
  17. package/dist/{dormancyCommand-xn2y-pJm.js → dormancyCommand-DYgI0Kf-.js} +3 -3
  18. package/dist/{embeddingsCommand-Cn5MbRDM.js → embeddingsCommand-yJivQSrI.js} +2 -2
  19. package/dist/{envCommand-UJmJIbs9.js → envCommand-ORJUf8r_.js} +8 -8
  20. package/dist/{evolveCommand-Db30twUy.js → evolveCommand-8CuFBlbQ.js} +2 -2
  21. package/dist/index.js +1 -1
  22. package/dist/{infoCommand-BjVXpMlP.js → infoCommand-D02A4WI2.js} +1 -1
  23. package/dist/inspect-CZvsmp8t.js +2 -0
  24. package/dist/{inspect-DZnan87F.js → inspect-PcC5J-Dl.js} +6 -7
  25. package/dist/manifestBuild-AUh31bFU.js +2 -0
  26. package/dist/{manifestBuild-DnbFKF6w.js → manifestBuild-BwiS4iYm.js} +1 -1
  27. package/dist/{probeCommand-C5fuN6Z2.js → probeCommand-BUYzc0CT.js} +1 -1
  28. package/dist/{runtimeTrace-BQL_lfz6.js → runtimeTrace-DDuKJgVi.js} +1 -1
  29. package/dist/{sdkgen-CMUPrDjH.js → sdkgen-vq1fF9D_.js} +1 -1
  30. package/dist/serveCommand-1R52mo6F.js +2 -0
  31. package/dist/{serveCommand-B_w-Mpb_.js → serveCommand-Dr4KXmTS.js} +726 -725
  32. package/dist/serveEntry.js +1 -1
  33. package/dist/{start-s25GAIgn.js → start-C75w6ftA.js} +1 -1
  34. package/dist/{start-YaUehtDV.js → start-DNtIlBcn.js} +641 -609
  35. package/dist/startEntry.js +1 -1
  36. package/dist/{updateCommand-C9n_Z_oG.js → updateCommand-Bw3mCUDT.js} +1 -1
  37. package/dist/updateCommand-inInBIAh.js +2 -0
  38. package/dist/webDev-Bzb8ZFus.js +2 -0
  39. package/dist/{webDev-BgdkyjP6.js → webDev-CBN9KkyQ.js} +154 -146
  40. package/dist/{webhooksCommand-CYXTNvXq.js → webhooksCommand-BPJQOGTe.js} +1 -1
  41. package/package.json +73 -19
  42. package/templates/AGENTS.md +1 -1
  43. package/templates/agent-docs/_index.md +1 -1
  44. package/templates/agent-docs/_manifest.json +1 -1
  45. package/templates/agent-docs/ai.md +223 -0
  46. package/templates/agent-docs/authentication.md +34 -0
  47. package/templates/agent-docs/cli.md +7 -6
  48. package/templates/agent-docs/data.md +30 -0
  49. package/templates/agent-docs/database/transactions.md +48 -0
  50. package/templates/agent-docs/observability.md +13 -2
  51. package/templates/agent-docs/plugins/auth-supabase.md +21 -0
  52. package/templates/agent-docs/plugins/sentry.md +131 -9
  53. package/templates/agent-docs/schema-driven-ui.md +29 -0
  54. package/templates/agent-docs/whats-new.md +26 -165
  55. package/templates/apps/api-ai/package.json +6 -6
  56. package/templates/apps/api-auth/package.json +8 -8
  57. package/templates/apps/api-backend/package.json +7 -7
  58. package/templates/apps/api-backend-deactivation/package.json +7 -7
  59. package/templates/apps/api-backend-mail/package.json +8 -8
  60. package/templates/apps/api-backend-mariadb/package.json +9 -9
  61. package/templates/apps/api-backend-sqlite/package.json +8 -8
  62. package/templates/apps/api-backend-storage/package.json +8 -8
  63. package/templates/apps/api-cms/package.json +9 -9
  64. package/templates/apps/api-collab/package.json +8 -8
  65. package/templates/apps/api-data-advanced/package.json +8 -8
  66. package/templates/apps/api-durable/package.json +8 -8
  67. package/templates/apps/api-feature-flags/package.json +9 -9
  68. package/templates/apps/api-governance/package.json +8 -8
  69. package/templates/apps/api-kv/package.json +8 -8
  70. package/templates/apps/api-moderation/package.json +8 -8
  71. package/templates/apps/api-observability/package.json +8 -8
  72. package/templates/apps/api-ratelimit/package.json +8 -8
  73. package/templates/apps/api-rbac/package.json +8 -8
  74. package/templates/apps/api-rest/package.json +7 -7
  75. package/templates/apps/api-row-history/package.json +8 -8
  76. package/templates/apps/api-saas/package.json +11 -11
  77. package/templates/apps/api-saas-starter/package.json +10 -10
  78. package/templates/apps/api-search/package.json +8 -8
  79. package/templates/apps/api-status/package.json +8 -8
  80. package/templates/apps/api-webhooks/package.json +9 -9
  81. package/templates/apps/changelog/package.json +7 -7
  82. package/templates/apps/edge-functions/package.json +2 -2
  83. package/templates/apps/frontend-admin/package.json +7 -7
  84. package/templates/apps/frontend-app/package.json +8 -8
  85. package/templates/apps/frontend-auth/package.json +7 -7
  86. package/templates/apps/frontend-blank/package.json +6 -6
  87. package/templates/apps/frontend-cms/package.json +8 -8
  88. package/templates/apps/frontend-collab/package.json +9 -9
  89. package/templates/apps/frontend-contact/package.json +7 -7
  90. package/templates/apps/frontend-dashboard/package.json +6 -6
  91. package/templates/apps/frontend-docs/package.json +8 -8
  92. package/templates/apps/frontend-i18n/package.json +6 -6
  93. package/templates/apps/frontend-landing/package.json +7 -7
  94. package/templates/apps/frontend-portal/package.json +7 -7
  95. package/templates/apps/frontend-saas/package.json +7 -7
  96. package/templates/apps/frontend-spa/package.json +6 -6
  97. package/templates/apps/frontend-ssr/package.json +6 -6
  98. package/templates/apps/frontend-ssr-api/package.json +7 -7
  99. package/templates/apps/frontend-static-blog/package.json +8 -8
  100. package/templates/apps/frontend-status/package.json +7 -7
  101. package/templates/apps/mobile-app/package.json +4 -4
  102. package/dist/apiBuild-B83Cb2Rv.js +0 -2
  103. package/dist/build-QKP6Bm0J.js +0 -872
  104. package/dist/dev-Bl9HqtV7.js +0 -3
  105. package/dist/doctorCommand-DrQv9SL3.js +0 -2
  106. package/dist/inspect-B0hL41s0.js +0 -2
  107. package/dist/manifestBuild-UXrnUcXP.js +0 -2
  108. package/dist/serveCommand-Dtb48ffg.js +0 -2
  109. package/dist/updateCommand-DsXEAHbd.js +0 -2
  110. package/dist/webDev-B6ZMX42w.js +0 -2
@@ -0,0 +1,2 @@
1
+ import { b as e, y as t } from "./doctorCommand-CGjefPmk.js";
2
+ export { t as runDoctorCommand, e as runServePreflight };
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-DOEJXicj.js";
1
+ import { a as e, l as t } from "./dev-Ce2gEziv.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";
@@ -14,7 +14,7 @@ var l = [
14
14
  let d = o({ scope: "dormancy" }), f = {
15
15
  info: (e, t) => d.info(e, t ?? {}),
16
16
  warn: (e, t) => d.warn(e, t ?? {})
17
- }, p = a(r(u, l) ?? process.cwd()), m = await e(p), h = (process.env.DB_DIALECT ?? m?.store ?? "memory").toLowerCase();
17
+ }, p = a(r(u, l) ?? process.cwd()), m = await t(p), h = (process.env.DB_DIALECT ?? m?.store ?? "memory").toLowerCase();
18
18
  if (h === "memory") return d.error("voltro dormancy needs a SQL store (postgres/mysql/mariadb/mssql) — the orchestrator and the app share the `_voltro_wakeups` table, which an in-process `memory` store cannot do. Set DB_DIALECT or the app.config `store` field."), 2;
19
19
  let g = i({
20
20
  kind: "api",
@@ -23,7 +23,7 @@ var l = [
23
23
  flagPort: n(u, "--port")
24
24
  });
25
25
  for (let e of g.warnings) d.warn(e);
26
- let _ = g.port, v = Number(n(u, "--app-port") ?? _ + 1), y = Number(n(u, "--idle-grace-ms") ?? 6e4), b = Number(n(u, "--tick-ms") ?? 1e3), x = await t(m, void 0), S = s({
26
+ let _ = g.port, v = Number(n(u, "--app-port") ?? _ + 1), y = Number(n(u, "--idle-grace-ms") ?? 6e4), b = Number(n(u, "--tick-ms") ?? 1e3), x = await e(m, void 0), S = s({
27
27
  command: process.execPath,
28
28
  args: [
29
29
  process.argv[1],
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-DOEJXicj.js";
1
+ import { a as e, l as t } from "./dev-Ce2gEziv.js";
2
2
  import { Effect as n } from "effect";
3
3
  import { embedMany as r } from "@voltro/ai";
4
4
  //#region src/embeddingsBackfill.ts
@@ -58,7 +58,7 @@ var i = (e, t) => e.filter((e) => {
58
58
  }, c = async (i) => {
59
59
  let a = s(i);
60
60
  if ("error" in a) return console.error(a.error), 1;
61
- let c = process.cwd(), l = await e(c), u = await t(l, void 0), d = {
61
+ let c = process.cwd(), l = await t(c), u = await e(l, void 0), d = {
62
62
  all: (e) => u.query({ table: e }).then((e) => e.map((e) => ({
63
63
  ...e,
64
64
  id: String(e.id)
@@ -1,5 +1,5 @@
1
- import { c as e } from "./dev-DOEJXicj.js";
2
- import { Gt as t, Jt as n, Wt as r, qt as i } from "./webDev-BgdkyjP6.js";
1
+ import { l as e } from "./dev-Ce2gEziv.js";
2
+ import { Jt as t, Xt as n, Zt as r, qt as i } from "./webDev-CBN9KkyQ.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";
@@ -21,8 +21,8 @@ var u = s({ scope: "voltro:env" }), d = "# Environment for this app", f = async
21
21
  }, h = async (e) => {
22
22
  let t = await f(e);
23
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);
24
+ let n = i(t.name, t.input), r = `${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(r);
26
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}`);
@@ -38,10 +38,10 @@ var u = s({ scope: "voltro:env" }), d = "# Environment for this app", f = async
38
38
  }
39
39
  return await o.writeFile(s, i, "utf8"), u.info("wrote .env.example", { app: r.name }), 0;
40
40
  }, _ = async (t) => {
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);
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);
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 { i as t } from "./checkCommand-DUtMWjcR.js";
3
- import { i as n, n as r } from "./codemodRunner-BlQPfjzA.js";
2
+ import { i as t } from "./checkCommand-DC7k1_hP.js";
3
+ import { i as n, n as r } from "./codemodRunner-kNnh1I7_.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-CRbxgxv0.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-cu34ENUT.js";
2
2
  import { r as o } from "./templates-BTWZkJJT.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-C9n_Z_oG.js";
2
+ import { o as r } from "./updateCommand-Bw3mCUDT.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
@@ -0,0 +1,2 @@
1
+ import { i as e } from "./inspect-PcC5J-Dl.js";
2
+ export { e as buildCapabilityManifest };
@@ -372,6 +372,11 @@ var a = (e) => ({
372
372
  expected: e.expected,
373
373
  ...e.missing.length > 0 ? { missing: e.missing } : {},
374
374
  ...e.stale.length > 0 ? { stale: e.stale } : {},
375
+ ...e.departed.length > 0 ? { departed: e.departed.map((e) => ({
376
+ replicaId: e.replicaId,
377
+ ageMs: e.ageMs,
378
+ ...e.version === void 0 ? {} : { version: e.version }
379
+ })) } : {},
375
380
  ...e.versions === void 0 ? {} : { versions: e.versions },
376
381
  ...e.missing.length > 0 || e.stale.length > 0 ? { reason: [e.missing.length > 0 ? `${e.missing.length} replica(s) have written nothing readable` : "", e.stale.length > 0 ? `${e.stale.length} answer(s) are older than the freshness window` : ""].filter((e) => e !== "").join("; ") } : {}
377
382
  },
@@ -604,13 +609,7 @@ var a = (e) => ({
604
609
  }
605
610
  return {
606
611
  ...y(200, { resume: e.byReplica }, s),
607
- assembled: {
608
- responded: e.responded,
609
- expected: e.expected,
610
- missing: e.missing,
611
- stale: e.stale,
612
- versions: e.versions
613
- }
612
+ assembled: (({ byReplica: e, ...t }) => t)(e)
614
613
  };
615
614
  }
616
615
  return t.migrations === void 0 ? y(200, {
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./manifestBuild-BwiS4iYm.js";
2
+ export { e as buildRpcEntry };
@@ -1,4 +1,4 @@
1
- import { L as e } from "./inspect-DZnan87F.js";
1
+ import { L as e } from "./inspect-PcC5J-Dl.js";
2
2
  import { JSONSchema as t } from "effect";
3
3
  //#region src/manifestBuild.ts
4
4
  var n = (e) => {
@@ -108,7 +108,7 @@ server and in this shell.`);
108
108
  }, m = async (e) => {
109
109
  let t = /* @__PURE__ */ new Map();
110
110
  try {
111
- let { walk: n, loadDiscovered: r } = await import("./dev-Bl9HqtV7.js"), i = await r(await n(e), { root: e }), a = [
111
+ let { walk: n, loadDiscovered: r } = await import("./dev-Dff_pdik.js"), i = await r(await n(e), { root: e }), a = [
112
112
  ...i.queries,
113
113
  ...i.mutations,
114
114
  ...i.actions,
@@ -1,4 +1,4 @@
1
- import { n as e } from "./apiBuild-DDr2aNFd.js";
1
+ import { n as e } from "./apiBuild-BU5cd-Fn.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-BISqx1OJ.js"), { manifest: n } = await t(e);
425
+ let { offlineManifest: t } = await import("./checkCommand-C1CQc8lD.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-Dr4KXmTS.js";
2
+ export { e as runServeDispatch };