@voltro/cli 0.50.0 → 0.51.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.
- package/CHANGELOG.md +160 -0
- package/dist/{apiBuild-CFYXo06U.js → apiBuild-CPDHXF72.js} +2 -2
- package/dist/apiBuild-GDKuGOMV.js +2 -0
- package/dist/appGraph-CFmFKHb2.js +2 -0
- package/dist/appGraph-yRuKjOba.js +111 -0
- package/dist/bin.js +1 -1
- package/dist/{build-CnSH-zru.js → build-DETLZAFt.js} +271 -240
- package/dist/{checkCommand-OL41BMIb.js → checkCommand-CWcnDArJ.js} +1 -1
- package/dist/{checkCommand-Do3SQbLx.js → checkCommand-DNuPiWMc.js} +56 -46
- package/dist/{codegenCommand-BJzaRz6q.js → codegenCommand-BNBHcNNj.js} +2 -2
- package/dist/{codemodRunner-De3k0pRd.js → codemodRunner-BDVixlSw.js} +278 -136
- package/dist/{commands-By23Ljny.js → commands-B1OiS9bX.js} +24 -23
- package/dist/{dashboardCommand-DN1rAABE.js → dashboardCommand-C-vvPY1B.js} +5 -5
- package/dist/{dataCommand-B93TUBIx.js → dataCommand-C1GxXW5q.js} +458 -384
- package/dist/dbCommand-C27HIsGE.js +2 -0
- package/dist/{dbCommand-Bf7Cy0mn.js → dbCommand-If4Y1xQ-.js} +1 -1
- package/dist/{dev-BWwE0QjK.js → dev-CK522MV5.js} +1 -1
- package/dist/{dev-1yu42ubu.js → dev-kdAg9Q7l.js} +1246 -1246
- package/dist/doctorCommand-BK4l18eG.js +2 -0
- package/dist/{doctorCommand-y-EbP8st.js → doctorCommand-nKmeW78u.js} +42 -26
- package/dist/{doctorSourceRelations-Dd48LPvO.js → doctorSourceRelations-c5mlN5HI.js} +66 -34
- package/dist/{dormancyCommand-Dc7KRNCG.js → dormancyCommand-CY3wa_SW.js} +1 -1
- package/dist/{embeddingsCommand-kPs132bB.js → embeddingsCommand-BDLIgje_.js} +1 -1
- package/dist/{envCommand-E12zSt51.js → envCommand-C6V_xVlT.js} +13 -13
- package/dist/{evolveCommand-B3nagPVc.js → evolveCommand-D3c4DSfN.js} +2 -2
- package/dist/{generateCommand-CcyvH2ve.js → generateCommand-DTNPGjxo.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{infoCommand-Cq0Yz98u.js → infoCommand-BnRFEF1o.js} +1 -1
- package/dist/{inspect-B7U7Cl_Z.js → inspect-CtL_xTbu.js} +1 -0
- package/dist/inspect-CuGDYES0.js +2 -0
- package/dist/manifestBuild-CPjhvM62.js +2 -0
- package/dist/{manifestBuild-BK42hu0k.js → manifestBuild-CuU1VrSm.js} +2 -2
- package/dist/{migrate-D3MK9BpK.js → migrate-DehuBakM.js} +1 -1
- package/dist/{runtimeTrace-BpLUcrfy.js → runtimeTrace-ZsBU7Tkx.js} +1 -1
- package/dist/{sdkgen-dl4-WKF6.js → sdkgen-O4XqWOjM.js} +1 -1
- package/dist/serveCommand-BRnPCxVd.js +2 -0
- package/dist/{serveCommand-8CTzQCY0.js → serveCommand-DdiYNBBu.js} +4 -4
- package/dist/serveEntry.js +1 -1
- package/dist/{start-7HcSIKEp.js → start-BLNmWkLa.js} +331 -327
- package/dist/{start-DvlYDyAr.js → start-Dzicuyw8.js} +1 -1
- package/dist/startEntry.js +1 -1
- package/dist/{updateCommand-i8JbrLAA.js → updateCommand-Bs322Q78.js} +1 -1
- package/dist/updateCommand-eXB35SEv.js +2 -0
- package/dist/{webDev-B4IEMB0n.js → webDev-B-ubQEMX.js} +283 -224
- package/dist/webDev-DposiF3j.js +2 -0
- package/dist/{webhooksCommand-B0bdyuQ4.js → webhooksCommand-FLYY9IXh.js} +1 -1
- package/package.json +41 -17
- package/templates/AGENTS.core.md +15 -5
- package/templates/AGENTS.md +16 -6
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/cli.md +92 -3
- package/templates/agent-docs/data.md +36 -0
- package/templates/agent-docs/internationalization.md +131 -13
- package/templates/agent-docs/whats-new.md +73 -27
- package/templates/apps/api-ai/package.json +7 -7
- package/templates/apps/api-auth/package.json +8 -8
- package/templates/apps/api-backend/package.json +7 -7
- package/templates/apps/api-backend-deactivation/package.json +7 -7
- package/templates/apps/api-backend-mail/package.json +8 -8
- package/templates/apps/api-backend-mariadb/package.json +9 -9
- package/templates/apps/api-backend-sqlite/package.json +8 -8
- package/templates/apps/api-backend-storage/package.json +8 -8
- package/templates/apps/api-cms/package.json +10 -10
- package/templates/apps/api-collab/package.json +8 -8
- package/templates/apps/api-data-advanced/package.json +8 -8
- package/templates/apps/api-durable/package.json +8 -8
- package/templates/apps/api-feature-flags/package.json +9 -9
- package/templates/apps/api-governance/package.json +8 -8
- package/templates/apps/api-kv/package.json +8 -8
- package/templates/apps/api-moderation/package.json +8 -8
- package/templates/apps/api-observability/package.json +8 -8
- package/templates/apps/api-ratelimit/package.json +8 -8
- package/templates/apps/api-rbac/package.json +8 -8
- package/templates/apps/api-rest/package.json +7 -7
- package/templates/apps/api-saas/package.json +11 -11
- package/templates/apps/api-saas-starter/package.json +10 -10
- package/templates/apps/api-search/package.json +8 -8
- package/templates/apps/api-status/package.json +8 -8
- package/templates/apps/api-versioning/package.json +8 -8
- package/templates/apps/api-webhooks/package.json +9 -9
- package/templates/apps/changelog/package.json +6 -6
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/package.json +8 -8
- package/templates/apps/frontend-app/package.json +9 -9
- package/templates/apps/frontend-auth/package.json +8 -8
- package/templates/apps/frontend-blank/package.json +7 -7
- package/templates/apps/frontend-cms/package.json +9 -9
- package/templates/apps/frontend-collab/package.json +10 -10
- package/templates/apps/frontend-contact/package.json +7 -7
- package/templates/apps/frontend-dashboard/package.json +7 -7
- package/templates/apps/frontend-docs/package.json +7 -7
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +7 -7
- package/templates/apps/frontend-portal/package.json +8 -8
- package/templates/apps/frontend-saas/package.json +8 -8
- package/templates/apps/frontend-spa/package.json +7 -7
- package/templates/apps/frontend-ssr/package.json +7 -7
- package/templates/apps/frontend-ssr-api/package.json +8 -8
- package/templates/apps/frontend-static-blog/package.json +6 -6
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/mobile-app/package.json +4 -4
- package/dist/apiBuild-BWo8KI6n.js +0 -2
- package/dist/appGraph-KGDPTuTy.js +0 -110
- package/dist/appGraph-zuMGKVYX.js +0 -2
- package/dist/dbCommand-Bnl7MSGC.js +0 -2
- package/dist/doctorCommand-BmovAwb7.js +0 -2
- package/dist/inspect-DUze25t0.js +0 -2
- package/dist/manifestBuild-j0n109tt.js +0 -2
- package/dist/serveCommand-C_WI4TTG.js +0 -2
- package/dist/updateCommand-D91-TZ7E.js +0 -2
- package/dist/webDev-B79ji8M5.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Ht as e, Ut as t, Vt as n } from "./dev-
|
|
2
|
-
import { at as r,
|
|
1
|
+
import { Ht as e, Ut as t, Vt as n } from "./dev-kdAg9Q7l.js";
|
|
2
|
+
import { at as r, ct as i, ot as a, s as o, st as s, t as c, w as l, y as u } from "./webDev-B-ubQEMX.js";
|
|
3
3
|
import { x as d } from "./frameworkTableAssembly-BwJVEKLr.js";
|
|
4
4
|
import { n as f } from "./pageConvention-cEiRxdab.js";
|
|
5
|
-
import { r as p, u as m } from "./apiBuild-
|
|
5
|
+
import { r as p, u as m } from "./apiBuild-CPDHXF72.js";
|
|
6
6
|
import { n as h, r as g, t as ee } from "./cliOutput-D1tSBoRM.js";
|
|
7
7
|
import { n as _, t as te } from "./tsconfigPaths-BWXBWgcl.js";
|
|
8
8
|
import { n as ne, r as re } from "./fileTaxonomy-CJfgOllU.js";
|
|
@@ -1350,7 +1350,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1350
1350
|
let t = Wt.get(e);
|
|
1351
1351
|
if (t !== void 0) return t;
|
|
1352
1352
|
let n = (async () => {
|
|
1353
|
-
let { walk: t, loadDiscovered: n } = await import("./dev-
|
|
1353
|
+
let { walk: t, loadDiscovered: n } = await import("./dev-CK522MV5.js"), r = await t(e);
|
|
1354
1354
|
return {
|
|
1355
1355
|
files: r,
|
|
1356
1356
|
discovered: await n(r)
|
|
@@ -1385,25 +1385,41 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1385
1385
|
};
|
|
1386
1386
|
}), qt = async (e) => {
|
|
1387
1387
|
try {
|
|
1388
|
-
let { missingRelationSources: t } = await import("./doctorSourceRelations-
|
|
1388
|
+
let { missingRelationSources: t } = await import("./doctorSourceRelations-c5mlN5HI.js"), { sourceKeys: n } = await import("@voltro/protocol"), { readFile: r } = await import("node:fs/promises"), { discovered: i } = await U(e), a = [], o = [];
|
|
1389
1389
|
for (let e of i.queries) {
|
|
1390
1390
|
let i = n(e.descriptor.source);
|
|
1391
1391
|
if (i.length === 0) continue;
|
|
1392
|
-
let
|
|
1393
|
-
if (
|
|
1394
|
-
let
|
|
1395
|
-
|
|
1392
|
+
let s = Jt(e.file);
|
|
1393
|
+
if (s === void 0) continue;
|
|
1394
|
+
let c = await r(s, "utf8").catch(() => null);
|
|
1395
|
+
if (c === null) continue;
|
|
1396
|
+
let l = t(e.descriptor.name, i, c);
|
|
1397
|
+
a.push(...l.findings), l.unresolved.length > 0 && o.push({
|
|
1398
|
+
procedure: e.descriptor.name,
|
|
1399
|
+
relations: l.unresolved
|
|
1400
|
+
});
|
|
1396
1401
|
}
|
|
1397
|
-
return
|
|
1402
|
+
return {
|
|
1403
|
+
findings: a,
|
|
1404
|
+
unresolved: o
|
|
1405
|
+
};
|
|
1398
1406
|
} catch {
|
|
1399
1407
|
return null;
|
|
1400
1408
|
}
|
|
1401
1409
|
}, Jt = (e) => e.endsWith(".ts") && !e.endsWith(".server.ts") ? `${e.slice(0, -3)}.server.ts` : void 0, Yt = async (e) => {
|
|
1402
1410
|
let t = await qt(e);
|
|
1403
|
-
if (t === null
|
|
1404
|
-
let
|
|
1405
|
-
|
|
1406
|
-
|
|
1411
|
+
if (t === null) return;
|
|
1412
|
+
let n = t.findings;
|
|
1413
|
+
if (n.length > 0) {
|
|
1414
|
+
let { describeMissingRelationSource: e } = await import("./doctorSourceRelations-c5mlN5HI.js");
|
|
1415
|
+
console.log(""), console.log(`\u2717 ${n.length} quer${n.length === 1 ? "y" : "ies"} load a relation they do not declare:`);
|
|
1416
|
+
for (let t of n) console.log(` ${e(t)}`);
|
|
1417
|
+
}
|
|
1418
|
+
if (t.unresolved.length > 0) {
|
|
1419
|
+
console.log(""), console.log(`\u26a0 ${t.unresolved.length} quer${t.unresolved.length === 1 ? "y" : "ies"} could not be fully checked — the base table is neither declared nor readable from the executor:`);
|
|
1420
|
+
for (let e of t.unresolved) console.log(` ${e.procedure}: ${e.relations.map((e) => `\`${e}\``).join(", ")} resolved against no table`);
|
|
1421
|
+
console.log(" declare the base table in `source:` and re-run — relations under it are unchecked until then.");
|
|
1422
|
+
}
|
|
1407
1423
|
}, W = async (e) => {
|
|
1408
1424
|
try {
|
|
1409
1425
|
let { discovered: t } = await U(e);
|
|
@@ -1459,7 +1475,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1459
1475
|
}
|
|
1460
1476
|
}, J = async (r) => {
|
|
1461
1477
|
try {
|
|
1462
|
-
let { loadApiConfig: i } = await import("./dev-
|
|
1478
|
+
let { loadApiConfig: i } = await import("./dev-CK522MV5.js"), { discovered: a } = await U(r), o = e(await i(r)), s = {
|
|
1463
1479
|
queries: a.queries,
|
|
1464
1480
|
mutations: a.mutations,
|
|
1465
1481
|
actions: a.actions,
|
|
@@ -1543,7 +1559,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1543
1559
|
}, nn = async (e) => nt({
|
|
1544
1560
|
hasWorkflows: async () => (await U(e)).discovered.workflows.length > 0,
|
|
1545
1561
|
openStore: async () => {
|
|
1546
|
-
let { loadApiConfig: t, buildStore: n } = await import("./dev-
|
|
1562
|
+
let { loadApiConfig: t, buildStore: n } = await import("./dev-CK522MV5.js"), r = await t(e);
|
|
1547
1563
|
if (r === null) throw Error("no app.config.ts in this directory");
|
|
1548
1564
|
let i = await n(r, void 0);
|
|
1549
1565
|
return {
|
|
@@ -1623,7 +1639,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1623
1639
|
}
|
|
1624
1640
|
}, ln = async (e) => {
|
|
1625
1641
|
try {
|
|
1626
|
-
let { loadApiConfig: t } = await import("./dev-
|
|
1642
|
+
let { loadApiConfig: t } = await import("./dev-CK522MV5.js"), n = (await t(e))?.doctor?.scopeVocabulary;
|
|
1627
1643
|
if (typeof n != "string") return [];
|
|
1628
1644
|
let [r, i] = n.split("#");
|
|
1629
1645
|
if (r === void 0 || i === void 0) return [];
|
|
@@ -1640,7 +1656,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1640
1656
|
findings: []
|
|
1641
1657
|
});
|
|
1642
1658
|
try {
|
|
1643
|
-
let { offlineManifest: n, toInput: r } = await import("./checkCommand-
|
|
1659
|
+
let { offlineManifest: n, toInput: r } = await import("./checkCommand-CWcnDArJ.js"), { buildAppGraph: i, checkAppGraph: a } = await import("./appGraph-CFmFKHb2.js"), o = await n(e), s = r(o.manifest, o.tables), c = await ln(e), l = [.../* @__PURE__ */ new Set([...s.scopes ?? [], ...c])];
|
|
1644
1660
|
if (l.length === 0) {
|
|
1645
1661
|
try {
|
|
1646
1662
|
let { loadAppSchemaInputs: t } = await import("./frameworkTableAssembly-CVDB2hCq.js");
|
|
@@ -1694,7 +1710,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1694
1710
|
if (n === void 0 || r.length === 0) return;
|
|
1695
1711
|
let i = [];
|
|
1696
1712
|
try {
|
|
1697
|
-
let { loadApiConfig: t } = await import("./dev-
|
|
1713
|
+
let { loadApiConfig: t } = await import("./dev-CK522MV5.js");
|
|
1698
1714
|
i = (await t(e))?.locales ?? [];
|
|
1699
1715
|
} catch {
|
|
1700
1716
|
return;
|
|
@@ -1712,7 +1728,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1712
1728
|
if (!S(t)) return !1;
|
|
1713
1729
|
let n = [];
|
|
1714
1730
|
try {
|
|
1715
|
-
let { walkPagesTree: e } = await import("./webDev-
|
|
1731
|
+
let { walkPagesTree: e } = await import("./webDev-DposiF3j.js");
|
|
1716
1732
|
n = (await e(t)).pages.map((e) => e.pattern);
|
|
1717
1733
|
} catch {
|
|
1718
1734
|
return !1;
|
|
@@ -1725,7 +1741,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1725
1741
|
}, pn = async (e) => {
|
|
1726
1742
|
let { discovered: t } = await U(e), n = [];
|
|
1727
1743
|
try {
|
|
1728
|
-
let { loadApiConfig: t } = await import("./dev-
|
|
1744
|
+
let { loadApiConfig: t } = await import("./dev-CK522MV5.js");
|
|
1729
1745
|
n = ((await t(e))?.plugins ?? []).map((e) => {
|
|
1730
1746
|
let t = (e.extendSchema?.tables ?? []).map((e) => {
|
|
1731
1747
|
let t = e;
|
|
@@ -1870,7 +1886,7 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1870
1886
|
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);
|
|
1871
1887
|
}, yn = async (e) => {
|
|
1872
1888
|
try {
|
|
1873
|
-
let { loadApiConfig: t } = await import("./dev-
|
|
1889
|
+
let { loadApiConfig: t } = await import("./dev-CK522MV5.js"), { decidedSchemaReport: n } = await import("./doctorDecidedSchema-BlbWgCD_.js"), r = await t(e);
|
|
1874
1890
|
return r == null ? null : n({
|
|
1875
1891
|
...r.schema ? { declared: r.schema } : {},
|
|
1876
1892
|
...r.store === void 0 ? {} : { store: r.store },
|
|
@@ -1895,8 +1911,8 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1895
1911
|
fileTaxonomy: re(o).findings,
|
|
1896
1912
|
junctionFks: (await W(o))?.issues ?? [],
|
|
1897
1913
|
eventDelivery: await G(o),
|
|
1898
|
-
duplicateInstances:
|
|
1899
|
-
versionSkew:
|
|
1914
|
+
duplicateInstances: r(o),
|
|
1915
|
+
versionSkew: a(o) ?? null,
|
|
1900
1916
|
serverOnly: (await q(o)).status,
|
|
1901
1917
|
accessDecisions: await J(o),
|
|
1902
1918
|
webhookVerification: await Y(o),
|
|
@@ -1908,9 +1924,9 @@ var le = /* @__PURE__ */ new Set([
|
|
|
1908
1924
|
}), 0;
|
|
1909
1925
|
let c = ct(o, t);
|
|
1910
1926
|
z(o), At(o), Ht(o), ne(o), await It(o), await an(o), await rn(o), await Gt(o), await Xt(o), await Yt(o), await bn(o), await Zt(o), await pn(o), await un(o), await cn(o), await dn(o);
|
|
1911
|
-
let l = await tn(o), u = await vn(o, e.includes("--write-authz-allowlist")), d = await Qt(o), f = await en(o), p = await fn(o), m =
|
|
1927
|
+
let l = await tn(o), u = await vn(o, e.includes("--write-authz-allowlist")), d = await Qt(o), f = await en(o), p = await fn(o), m = i(a(o));
|
|
1912
1928
|
m !== void 0 && (console.log(""), console.log(m));
|
|
1913
|
-
let _ =
|
|
1929
|
+
let _ = s(r(o));
|
|
1914
1930
|
return _ !== void 0 && console.log(`\n${_}`), l || u || d || p || f ? Math.max(c, 1) : c;
|
|
1915
1931
|
};
|
|
1916
1932
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getRelations as e } from "@voltro/database";
|
|
2
2
|
//#region src/doctorSourceRelations.ts
|
|
3
3
|
var t = (e) => {
|
|
4
|
-
let t =
|
|
4
|
+
let t = [];
|
|
5
5
|
for (let r = e.indexOf(".with("); r !== -1; r = e.indexOf(".with(", r + 1)) {
|
|
6
6
|
let i = n(e, r);
|
|
7
|
-
i !== void 0 && a(i
|
|
7
|
+
i !== void 0 && t.push(...a(i));
|
|
8
8
|
}
|
|
9
9
|
return t;
|
|
10
10
|
}, n = (e, t) => {
|
|
@@ -23,15 +23,31 @@ var t = (e) => {
|
|
|
23
23
|
"{([".includes(a) ? n++ : "})]".includes(a) ? n-- : a === "," && n === 0 && (t.push(e.slice(r, i)), r = i + 1);
|
|
24
24
|
}
|
|
25
25
|
return t.push(e.slice(r)), t.filter((e) => e.trim() !== "");
|
|
26
|
-
}, i = /^(?:'([A-Za-z_$][\w$]*)'|"([A-Za-z_$][\w$]*)"|([A-Za-z_$][\w$]*))$/, a = (e
|
|
26
|
+
}, i = /^(?:'([A-Za-z_$][\w$]*)'|"([A-Za-z_$][\w$]*)"|([A-Za-z_$][\w$]*))$/, a = (e) => {
|
|
27
|
+
let t = [];
|
|
27
28
|
for (let s of r(e)) {
|
|
28
29
|
let e = o(s), r = (e === -1 ? s : s.slice(0, e)).trim(), c = i.exec(r), l = c?.[1] ?? c?.[2] ?? c?.[3];
|
|
29
|
-
if (l === void 0
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
if (l === void 0) continue;
|
|
31
|
+
if (e === -1) {
|
|
32
|
+
t.push({
|
|
33
|
+
name: l,
|
|
34
|
+
nested: []
|
|
35
|
+
});
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
let u = s.slice(e + 1);
|
|
39
|
+
if (l === "with") {
|
|
40
|
+
let e = n(u, 0);
|
|
41
|
+
e !== void 0 && t.push(...a(e));
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
let d = u.indexOf("with"), f = d === -1 ? void 0 : n(u, d);
|
|
45
|
+
t.push({
|
|
46
|
+
name: l,
|
|
47
|
+
nested: f === void 0 ? [] : a(f)
|
|
48
|
+
});
|
|
34
49
|
}
|
|
50
|
+
return t;
|
|
35
51
|
}, o = (e) => {
|
|
36
52
|
let t = 0;
|
|
37
53
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -48,34 +64,50 @@ var t = (e) => {
|
|
|
48
64
|
return t;
|
|
49
65
|
}, c = (n, r, i) => {
|
|
50
66
|
let a = t(i);
|
|
51
|
-
if (a.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
if (a.length === 0) return {
|
|
68
|
+
findings: [],
|
|
69
|
+
unresolved: []
|
|
70
|
+
};
|
|
71
|
+
let o = new Set(r), c = [], u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set([...s(i), ...r]), p = (t, r, i) => {
|
|
72
|
+
for (let a of r) {
|
|
73
|
+
let r = /* @__PURE__ */ new Set();
|
|
74
|
+
for (let i of t) {
|
|
75
|
+
let t = e(i);
|
|
76
|
+
if (t === void 0) continue;
|
|
77
|
+
let s = t[a.name];
|
|
78
|
+
if (s === void 0) continue;
|
|
79
|
+
let d = l(s.target);
|
|
80
|
+
d !== void 0 && r.add(d);
|
|
81
|
+
let f = [{
|
|
82
|
+
table: d,
|
|
83
|
+
kind: "target"
|
|
84
|
+
}, {
|
|
85
|
+
table: l(s.through),
|
|
86
|
+
kind: "junction"
|
|
87
|
+
}];
|
|
88
|
+
for (let e of f) {
|
|
89
|
+
if (e.table === void 0 || o.has(e.table)) continue;
|
|
90
|
+
let t = `${a.name}:${e.table}`;
|
|
91
|
+
u.has(t) || (u.add(t), c.push({
|
|
92
|
+
procedure: n,
|
|
93
|
+
from: i,
|
|
94
|
+
relation: a.name,
|
|
95
|
+
missing: e.table,
|
|
96
|
+
kind: e.kind
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (r.size === 0) {
|
|
101
|
+
i && d.add(a.name);
|
|
102
|
+
continue;
|
|
75
103
|
}
|
|
104
|
+
a.nested.length > 0 && p(r, a.nested, !1);
|
|
76
105
|
}
|
|
77
|
-
}
|
|
78
|
-
return
|
|
106
|
+
};
|
|
107
|
+
return p(f, a, !0), {
|
|
108
|
+
findings: c,
|
|
109
|
+
unresolved: [...d].sort()
|
|
110
|
+
};
|
|
79
111
|
}, l = (e) => {
|
|
80
112
|
try {
|
|
81
113
|
let t = (typeof e == "function" ? e() : e)?.tableName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as e } from "./dev-
|
|
2
|
-
import { _t as t,
|
|
1
|
+
import { c as e } from "./dev-kdAg9Q7l.js";
|
|
2
|
+
import { _t as t, ht as n, mt as r, vt as i } from "./webDev-B-ubQEMX.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,27 +21,27 @@ 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 =
|
|
25
|
-
u.info(`env manifest — ${n.app} (${n.summary.total} vars, ${n.summary.set} set)`), m(
|
|
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
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
30
|
return n.summary.missingRequired > 0 ? (u.error(`${n.summary.missingRequired} required var(s) are unset`), 1) : 0;
|
|
31
31
|
}, g = async (e, t) => {
|
|
32
|
-
let
|
|
33
|
-
if (!
|
|
34
|
-
let i = r
|
|
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 = n(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
35
|
if (c !== null && !c.startsWith(d) && !t) {
|
|
36
36
|
let t = a(e, ".env.example.generated");
|
|
37
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, i, "utf8"), u.info("wrote .env.example", { app:
|
|
40
|
-
}, _ = async (
|
|
41
|
-
let
|
|
42
|
-
if (!
|
|
43
|
-
let a = l(
|
|
44
|
-
return a ? (
|
|
39
|
+
return await o.writeFile(s, i, "utf8"), u.info("wrote .env.example", { app: r.name }), 0;
|
|
40
|
+
}, _ = async (n) => {
|
|
41
|
+
let r = await e(n).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 t(n, a), u.info("wrote src/voltro-env.d.ts (publicEnv augmentation)", { app: r.name ?? "app" })) : (await i(n, 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-
|
|
3
|
-
import { i as n, n as r } from "./codemodRunner-
|
|
2
|
+
import { t } from "./checkCommand-DNuPiWMc.js";
|
|
3
|
+
import { i as n, n as r } from "./codemodRunner-BDVixlSw.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,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-
|
|
2
|
+
import { o as r } from "./updateCommand-Bs322Q78.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
|
|
@@ -172,6 +172,7 @@ var r = "/_voltro/inspect", i = () => process.env.VOLTRO_INSPECT === "off", a =
|
|
|
172
172
|
...e.source === void 0 ? {} : { source: e.source },
|
|
173
173
|
...e.targets === void 0 ? {} : { targets: e.targets },
|
|
174
174
|
...e.guards === void 0 ? {} : { guards: e.guards },
|
|
175
|
+
...e.internal === !0 ? { internal: !0 } : {},
|
|
175
176
|
...e.publicApi === void 0 ? {} : { publicApi: e.publicApi },
|
|
176
177
|
...e.exposeAsTool === void 0 ? {} : { exposeAsTool: e.exposeAsTool }
|
|
177
178
|
})),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as e } from "./inspect-
|
|
1
|
+
import { P as e } from "./inspect-CtL_xTbu.js";
|
|
2
2
|
import { JSONSchema as t } from "effect";
|
|
3
3
|
//#region src/manifestBuild.ts
|
|
4
4
|
var n = (e) => {
|
|
@@ -31,7 +31,7 @@ var n = (e) => {
|
|
|
31
31
|
}));
|
|
32
32
|
e.length > 0 && (s.targets = e);
|
|
33
33
|
}
|
|
34
|
-
s.guards = e(t.guards) ?? [], t.publicApi != null && typeof t.publicApi == "object" && (s.publicApi = t.publicApi);
|
|
34
|
+
s.guards = e(t.guards) ?? [], t.internal === !0 && (s.internal = !0), t.publicApi != null && typeof t.publicApi == "object" && (s.publicApi = t.publicApi);
|
|
35
35
|
let d = t.exposeAsTool;
|
|
36
36
|
return d === !0 ? s.exposeAsTool = { enabled: !0 } : typeof d == "object" && d && (s.exposeAsTool = d), s;
|
|
37
37
|
};
|
|
@@ -79,7 +79,7 @@ var _ = /* @__PURE__ */ new Set([
|
|
|
79
79
|
let t = u(e.find((e) => !e.startsWith("-")) ?? process.cwd());
|
|
80
80
|
return s(S(t), { scope: "voltro:migrate" });
|
|
81
81
|
}
|
|
82
|
-
let { runDbCommand: t } = await import("./dbCommand-
|
|
82
|
+
let { runDbCommand: t } = await import("./dbCommand-C27HIsGE.js");
|
|
83
83
|
return t(["apply", ...e]);
|
|
84
84
|
};
|
|
85
85
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./apiBuild-
|
|
1
|
+
import { n as e } from "./apiBuild-CPDHXF72.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-
|
|
425
|
+
let { offlineManifest: t } = await import("./checkCommand-CWcnDArJ.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), {
|
|
@@ -4,21 +4,21 @@ import { r as n, t as r } from "./appModuleLoader-C9r9mxZt.js";
|
|
|
4
4
|
import { t as i } from "./bootRefusal-pgvDxlrU.js";
|
|
5
5
|
import { n as a, r as o } from "./startupRunner-CEqQq7ax.js";
|
|
6
6
|
import { t as s } from "./interruptedReplace-C3O3M1MM.js";
|
|
7
|
-
import { $ as c, $t as l, A as u, At as d, Bt as f, C as ee, Cn as te, Ct as ne, D as p, Dt as m, E as h, En as re, Et as g, F as ie, Ft as ae, G as oe, Gt as se, H as _, Ht as ce, I as le, It as ue, J as de, Jt as v, K as y, Kt as fe, L as b, Lt as pe, M as me, Mt as he, N as ge, Nt as _e, O as ve, Ot as ye, P as be, Pt as xe, Q as Se, Qt as Ce, R as x, Rt as we, S as Te, St as Ee, T as De, Tn as Oe, Tt as S, U as ke, V as Ae, W as je, Wt as Me, X as Ne, Xt as Pe, Y as Fe, Yt as C, Z as Ie, Zt as Le, _ as w, _n as Re, _t as T, an as ze, at as Be, b as Ve, bn as He, bt as Ue, c as We, cn as Ge, ct as Ke, dn as qe, dt as Je, en as Ye, et as Xe, f as Ze, fn as Qe, ft as $e, g as et, gt as tt, h as nt, hn as rt, ht as it, i as at, in as ot, it as st, j as ct, jt as lt, k as ut, kt as dt, ln as ft, lt as pt, m as mt, mn as ht, mt as gt, nn as _t, nt as E, o as D, on as vt, ot as O, p as k, pn as yt, pt as bt, q as xt, qt as St, r as Ct, rn as A, rt as wt, sn as j, st as Tt, t as Et, tn as Dt, tt as Ot, u as kt, un as At, ut as jt, v as Mt, vn as Nt, vt as M, w as N, wn as Pt, wt as Ft, x as It, xn as Lt, xt as Rt, y as zt, yn as Bt, yt as Vt, zt as Ht } from "./dev-
|
|
7
|
+
import { $ as c, $t as l, A as u, At as d, Bt as f, C as ee, Cn as te, Ct as ne, D as p, Dt as m, E as h, En as re, Et as g, F as ie, Ft as ae, G as oe, Gt as se, H as _, Ht as ce, I as le, It as ue, J as de, Jt as v, K as y, Kt as fe, L as b, Lt as pe, M as me, Mt as he, N as ge, Nt as _e, O as ve, Ot as ye, P as be, Pt as xe, Q as Se, Qt as Ce, R as x, Rt as we, S as Te, St as Ee, T as De, Tn as Oe, Tt as S, U as ke, V as Ae, W as je, Wt as Me, X as Ne, Xt as Pe, Y as Fe, Yt as C, Z as Ie, Zt as Le, _ as w, _n as Re, _t as T, an as ze, at as Be, b as Ve, bn as He, bt as Ue, c as We, cn as Ge, ct as Ke, dn as qe, dt as Je, en as Ye, et as Xe, f as Ze, fn as Qe, ft as $e, g as et, gt as tt, h as nt, hn as rt, ht as it, i as at, in as ot, it as st, j as ct, jt as lt, k as ut, kt as dt, ln as ft, lt as pt, m as mt, mn as ht, mt as gt, nn as _t, nt as E, o as D, on as vt, ot as O, p as k, pn as yt, pt as bt, q as xt, qt as St, r as Ct, rn as A, rt as wt, sn as j, st as Tt, t as Et, tn as Dt, tt as Ot, u as kt, un as At, ut as jt, v as Mt, vn as Nt, vt as M, w as N, wn as Pt, wt as Ft, x as It, xn as Lt, xt as Rt, y as zt, yn as Bt, yt as Vt, zt as Ht } from "./dev-kdAg9Q7l.js";
|
|
8
8
|
import { n as Ut } from "./cliArgs-D4p8n7EE.js";
|
|
9
9
|
import { r as P } from "./appPort-B_HpJ_ck.js";
|
|
10
|
-
import {
|
|
10
|
+
import { gt as Wt, mt as Gt } from "./webDev-B-ubQEMX.js";
|
|
11
11
|
import { r as F } from "./dialectDriver-czCHYpeH.js";
|
|
12
12
|
import { i as Kt, n as qt } from "./connectionConfig-Bk9IC7D0.js";
|
|
13
13
|
import { c as Jt, n as I, o as Yt } from "./seedRunner-Dgsiwk_e.js";
|
|
14
14
|
import { b as Xt, d as Zt, h as Qt, m as $t, p as en, r as tn, y as nn } from "./frameworkTableAssembly-BwJVEKLr.js";
|
|
15
15
|
import { n as rn, r as an, t as on } from "./declaredSchemaGates-BlcwObhb.js";
|
|
16
16
|
import { S as sn, c as cn, n as ln, p as un, s as dn, x as fn } from "./fileConventions-Cof68_BL.js";
|
|
17
|
-
import { h as pn, o as mn } from "./inspect-
|
|
17
|
+
import { h as pn, o as mn } from "./inspect-CtL_xTbu.js";
|
|
18
18
|
import { n as hn } from "./mssqlClusterPatch-_4cE_nun.js";
|
|
19
19
|
import { i as gn, n as _n, r as vn, t as yn } from "./webhookDiscovery-CphsQe59.js";
|
|
20
20
|
import { t as bn } from "./inspectMetrics-CfdKLh6t.js";
|
|
21
|
-
import { r as xn, u as Sn } from "./apiBuild-
|
|
21
|
+
import { r as xn, u as Sn } from "./apiBuild-CPDHXF72.js";
|
|
22
22
|
import { t as Cn } from "./bootTiming-BdyP9nYw.js";
|
|
23
23
|
import { a as wn, o as Tn, t as En } from "./dataProfile-Du3ztYxv.js";
|
|
24
24
|
import L, { basename as Dn, join as On } from "node:path";
|
package/dist/serveEntry.js
CHANGED