@voltro/cli 0.36.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.
- package/CHANGELOG.md +182 -0
- package/dist/{apiBuild-DiE9zcj6.js → apiBuild-CvacV4zA.js} +2 -2
- package/dist/apiBuild-ttSDDOGp.js +2 -0
- package/dist/{baselineCommand-DIttzO8A.js → baselineCommand-C6NMt-oa.js} +1 -4
- package/dist/baselineCommand-Cfw2Afwm.js +2 -0
- package/dist/bin.js +1 -1
- package/dist/bootRefusal-pgvDxlrU.js +7 -0
- package/dist/{build-DBe6c7qC.js → build-_LoTC1s0.js} +31 -31
- package/dist/{checkCommand-BhG0gmUD.js → checkCommand-Pjk5sBl2.js} +3 -3
- package/dist/{checkCommand-BTA6P3Yr.js → checkCommand-wibtQx-N.js} +1 -1
- package/dist/{cloudCmd-Cvv5HGaZ.js → cloudCmd-NQSwe_Qk.js} +1 -1
- package/dist/{codegen-CYM3Zqrf.js → codegen-GYYcdpCg.js} +2 -2
- package/dist/codegen-uYrrDzQv.js +2 -0
- package/dist/{codegenCommand-DH-8ZXzR.js → codegenCommand-C60m_LCp.js} +2 -2
- package/dist/{codemodRunner-DjQGrdmg.js → codemodRunner-CXgQ-ecJ.js} +339 -167
- package/dist/{commands-Bp7utV-7.js → commands-DaZVi9wi.js} +74 -73
- package/dist/{dashboardCommand-D5Jwjmr1.js → dashboardCommand-Dxy_kmoW.js} +3 -3
- package/dist/{dataCommand-DnCm0B2C.js → dataCommand-D6-Ha2lf.js} +2 -2
- package/dist/{dbCommand-O8HA63s2.js → dbCommand-C4UW8cVN.js} +353 -351
- package/dist/dbCommand-CC-qNzpz.js +2 -0
- package/dist/{dev-BSFTgCQ5.js → dev-CAOoXOkc.js} +1 -1
- package/dist/{dev-Dc4cpmRl.js → dev-E7Eo5GHc.js} +262 -261
- package/dist/doctorCommand-Cjl8Yii8.js +2 -0
- package/dist/{doctorCommand-CNFtt3nR.js → doctorCommand-gmDyALFL.js} +10 -10
- package/dist/{dormancyCommand-6F6NsJKf.js → dormancyCommand-CE6wG8lj.js} +1 -1
- package/dist/{embeddingsCommand-DRRdneJD.js → embeddingsCommand-C3uAuf6N.js} +1 -1
- package/dist/{envCommand-TZzcyqZ-.js → envCommand-DzuWh8ya.js} +19 -19
- package/dist/{evolveCommand-iU35TPjT.js → evolveCommand-DPLqcYb2.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/{infoCommand-unqisJGp.js → infoCommand-CmczGj_l.js} +1 -1
- package/dist/inspectGateHint-BF6608UT.js +4 -0
- package/dist/{metaCommands-7MJfZ5cf.js → metaCommands-CIoQNlaQ.js} +1 -1
- package/dist/{migrate-BV7I-ZHZ.js → migrate-RwgUWXfc.js} +1 -1
- package/dist/{privacyCommand-C-Df56U_.js → privacyCommand-XejDMvmu.js} +4 -3
- package/dist/{probeCommand-CZfaaUOZ.js → probeCommand-BPEpwT32.js} +40 -39
- package/dist/{projectScaffold-DmzEKHib.js → projectScaffold-CxgtJvlb.js} +1 -1
- package/dist/{projectScaffold-LMMtaavR.js → projectScaffold-DDgWbNLe.js} +2 -2
- package/dist/{runtimeTrace-D5LJ_N55.js → runtimeTrace-6jfznSzr.js} +1 -1
- package/dist/{sdkgen-82xVuvbt.js → sdkgen-CEJZZQUA.js} +1 -1
- package/dist/serveCommand-DNRF2nDI.js +2 -0
- package/dist/{serveCommand-VVGcIMIw.js → serveCommand-DnY4VS3D.js} +541 -540
- package/dist/serveEntry.js +1 -1
- package/dist/{start-BgN62boB.js → start-CidwCcjl.js} +1 -1
- package/dist/{start-T4VesWiM.js → start-RCh6qKFe.js} +24 -24
- package/dist/startEntry.js +1 -1
- package/dist/startup.d.ts +40 -1
- package/dist/startup.js +2 -2
- package/dist/startupRunner-CEqQq7ax.js +108 -0
- package/dist/subcommandNames-CKG5Dz3a.js +27 -0
- package/dist/{templates-De8IR5-c.js → templates-BR-fb4SP.js} +1 -4
- package/dist/{test-CI6iDsYc.js → test-DIQ0jlkQ.js} +1 -1
- package/dist/updateCommand-B0J_T9Vs.js +2 -0
- package/dist/{updateCommand-CwnUK_mf.js → updateCommand-CmksX7m_.js} +1 -1
- package/dist/{webDev-Dybxew86.js → webDev-BKdD7c_a.js} +689 -691
- package/dist/webDev-CcJfdSjl2.js +2 -0
- package/dist/{webhooksCommand-di1CJVzu.js → webhooksCommand-BHeaF1ZJ.js} +1 -1
- package/package.json +35 -17
- package/templates/AGENTS.md +1 -1
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/cli.md +16 -0
- package/templates/agent-docs/data.md +30 -0
- package/templates/agent-docs/plugins/audit.md +50 -0
- package/templates/agent-docs/plugins/auth.md +4 -6
- package/templates/agent-docs/reference.md +3 -2
- package/templates/agent-docs/whats-new.md +59 -35
- 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-cms/tests/content.write.test.ts +16 -2
- package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +11 -5
- package/templates/apps/api-collab/package.json +8 -8
- package/templates/apps/api-collab/tests/documents.setBody.test.ts +8 -2
- 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/mutations/documents.update.mutation.server.ts +7 -5
- 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 +3 -3
- package/templates/patches/@effect__cluster@0.60.0.patch +51 -3
- package/dist/apiBuild-ZEZnCXn2.js +0 -2
- package/dist/baselineCommand-C2ClWZN3.js +0 -2
- package/dist/codegen-ChBi_hVa.js +0 -2
- package/dist/dbCommand-DS4b97Is.js +0 -2
- package/dist/doctorCommand-BYffQc0s.js +0 -2
- package/dist/serveCommand-CEBVP36A.js +0 -2
- package/dist/startupRunner-DPGFchOa.js +0 -71
- package/dist/updateCommand-CSBXVsYq.js +0 -2
- package/dist/webDev-BcykISYQ2.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Bt as e, Rt as t, zt as n } from "./dev-
|
|
2
|
-
import { $ as r, Q as i, X as a, Z as o, s, t as c, y as l } from "./webDev-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { c as e } from "./dev-
|
|
2
|
-
import { at as t, ct as n,
|
|
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
|
|
23
|
-
if (!
|
|
24
|
-
let
|
|
25
|
-
u.info(`env manifest — ${
|
|
26
|
-
for (let e of
|
|
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
|
|
31
|
-
}, g = async (e,
|
|
32
|
-
let
|
|
33
|
-
if (!
|
|
34
|
-
let
|
|
35
|
-
if (c !== null && !c.startsWith(d) && !
|
|
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,
|
|
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,
|
|
39
|
+
return await o.writeFile(s, i, "utf8"), u.info("wrote .env.example", { app: r.name }), 0;
|
|
40
40
|
}, _ = async (t) => {
|
|
41
|
-
let
|
|
42
|
-
if (!
|
|
43
|
-
let a = l(
|
|
44
|
-
return a ? (
|
|
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-
|
|
3
|
-
import { i as n, n as r } from "./codemodRunner-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-
|
|
2
|
-
import { r as o } from "./templates-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-DaZVi9wi.js";
|
|
2
|
+
import { r as o } from "./templates-BR-fb4SP.js";
|
|
3
3
|
//#region src/index.ts
|
|
4
4
|
var s = "framework";
|
|
5
5
|
//#endregion
|
|
@@ -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-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
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/inspectGateHint.ts
|
|
2
|
+
var e = (e) => e === 401 || e === 403, t = (e) => e === 403 ? "The inspect surface rejected the credential. VOLTRO_INSPECT_TOKEN must be set on the SERVER and in this shell, and the two values must match. (This is a framework gate, not a database permission.)" : "The inspect surface is gated and this request carried no credential. Set VOLTRO_INSPECT_TOKEN on the server and in this shell (same value), or pass --token.";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as n, t };
|
|
@@ -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-
|
|
4
|
+
import { a, i as o } from "./projectScaffold-DDgWbNLe.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";
|
|
@@ -76,7 +76,7 @@ var _ = /* @__PURE__ */ new Set([
|
|
|
76
76
|
return t(n);
|
|
77
77
|
}, T = async (e) => {
|
|
78
78
|
if (e.includes("--create-only")) return s(S(u(e.find((e) => !e.startsWith("-")) ?? process.cwd())), { scope: "voltro:migrate" });
|
|
79
|
-
let { runDbCommand: t } = await import("./dbCommand-
|
|
79
|
+
let { runDbCommand: t } = await import("./dbCommand-CC-qNzpz.js");
|
|
80
80
|
return t(["apply", ...e]);
|
|
81
81
|
};
|
|
82
82
|
//#endregion
|
|
@@ -136,11 +136,12 @@ var _ = d({ scope: "voltro:privacy" }), v = /* @__PURE__ */ new Set([
|
|
|
136
136
|
let s = a.data.entry;
|
|
137
137
|
return o(s ?? {}), s?.truncated !== void 0 && s.truncated.length > 0 ? (_.error(`voltro privacy erase: INCOMPLETE — the row cap was hit on ${s.truncated.join(", ")}. Re-run until 'truncated' is absent.`), 1) : 0;
|
|
138
138
|
}
|
|
139
|
-
}, A = async (e) => {
|
|
139
|
+
}, A = (e) => Object.prototype.hasOwnProperty.call(k, e), j = async (e) => {
|
|
140
140
|
let [t, ...n] = e;
|
|
141
141
|
if (t === void 0) return console.error("voltro privacy <subcommand> [args]"), console.error(" scope [root] [--subject-table <t>] [--depth <n>] [--exclude a,b] [--json]"), console.error(" Derive the DSAR subject graph from the schema — and print what it CANNOT see."), console.error(" export <subjectId> --url <app> [--token <t>] [--out <file>]"), console.error(" erase <subjectId> --url <app> [--token <t>] [--mode delete|anonymize] --confirm"), console.error(" Both run against the RUNNING app's admin-gated governance endpoint, so the"), console.error(" configured anonymize fields and the erasure log apply."), 1;
|
|
142
|
+
if (!A(t)) return console.error(`voltro privacy: unknown subcommand '${t}'`), 2;
|
|
142
143
|
let r = k[t];
|
|
143
|
-
return r
|
|
144
|
+
return r(n);
|
|
144
145
|
};
|
|
145
146
|
//#endregion
|
|
146
|
-
export {
|
|
147
|
+
export { j as runPrivacyCommand };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { n as e } from "./cliOutput-D1tSBoRM.js";
|
|
2
2
|
import { n as t, o as n, r, t as i } from "./inspectFetch-EMuhTG_9.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as a, t as o } from "./inspectGateHint-BF6608UT.js";
|
|
4
|
+
import { ansi as s } from "@voltro/logger";
|
|
4
5
|
//#region src/probeCommand.ts
|
|
5
|
-
var
|
|
6
|
-
console.log(`${
|
|
6
|
+
var c = () => {
|
|
7
|
+
console.log(`${s.bold("voltro probe")} — ask a RUNNING app whether its declared access is enforced
|
|
7
8
|
|
|
8
|
-
${
|
|
9
|
+
${s.bold("access")} call every guarded procedure with NO credentials and
|
|
9
10
|
report any that answer anyway
|
|
10
11
|
|
|
11
12
|
Options
|
|
@@ -19,9 +20,9 @@ it probes ANONYMOUSLY, so it cannot tell one scope from another. It answers
|
|
|
19
20
|
exactly one question — does a procedure that DECLARES a guard admit a caller
|
|
20
21
|
that presents nothing? A guard declared and never bound is the failure it finds.
|
|
21
22
|
|
|
22
|
-
The target must expose the inspect surface: set ${
|
|
23
|
+
The target must expose the inspect surface: set ${s.bold("VOLTRO_INSPECT_TOKEN")} on the
|
|
23
24
|
server and in this shell.`);
|
|
24
|
-
},
|
|
25
|
+
}, l = (e) => e.filter((e) => (e.guards ?? []).some((e) => e.kind !== "open")), u = (e) => {
|
|
25
26
|
if (e.kind === "err") return {
|
|
26
27
|
verdict: "inconclusive",
|
|
27
28
|
detail: "transport failure — the app did not answer"
|
|
@@ -56,16 +57,16 @@ server and in this shell.`);
|
|
|
56
57
|
verdict: "refused",
|
|
57
58
|
detail: `refused (${a})`
|
|
58
59
|
};
|
|
59
|
-
},
|
|
60
|
+
}, d = 0, f = (e) => ({
|
|
60
61
|
_tag: "Request",
|
|
61
|
-
id: String(++
|
|
62
|
+
id: String(++d),
|
|
62
63
|
tag: e,
|
|
63
64
|
payload: {},
|
|
64
65
|
headers: []
|
|
65
|
-
}),
|
|
66
|
-
let { verdict: n, detail: r } =
|
|
66
|
+
}), p = async (e, t) => {
|
|
67
|
+
let { verdict: n, detail: r } = u(await i(e, "/rpc", {
|
|
67
68
|
method: "POST",
|
|
68
|
-
body:
|
|
69
|
+
body: f(t.tag),
|
|
69
70
|
anonymous: !0
|
|
70
71
|
}));
|
|
71
72
|
return {
|
|
@@ -74,49 +75,49 @@ server and in this shell.`);
|
|
|
74
75
|
verdict: n,
|
|
75
76
|
detail: r
|
|
76
77
|
};
|
|
77
|
-
},
|
|
78
|
-
let
|
|
78
|
+
}, m = (t, n, r, i) => {
|
|
79
|
+
let a = n.filter((e) => e.verdict === "admitted"), o = n.filter((e) => e.verdict === "inconclusive"), c = n.filter((e) => e.verdict === "refused");
|
|
79
80
|
if (r === "json") e({
|
|
80
81
|
app: t,
|
|
81
82
|
probed: n.length,
|
|
82
83
|
refused: c.length,
|
|
83
|
-
admitted:
|
|
84
|
-
inconclusive:
|
|
84
|
+
admitted: a.length,
|
|
85
|
+
inconclusive: o.length,
|
|
85
86
|
results: n
|
|
86
87
|
});
|
|
87
|
-
else if (n.length === 0) console.log(`${
|
|
88
|
+
else if (n.length === 0) console.log(`${s.yellow("○")} ${t}: no guarded procedure to probe — every route is openAccess or undecided.`), console.log(" Undecided routes are `voltro check`'s finding, not this one's.");
|
|
88
89
|
else {
|
|
89
|
-
console.log(`${
|
|
90
|
-
for (let e of
|
|
91
|
-
for (let e of
|
|
92
|
-
console.log(` ${
|
|
90
|
+
console.log(`${s.bold(t)}: probed ${n.length} guarded procedure(s) with NO credentials`);
|
|
91
|
+
for (let e of a) console.log(` ${s.red("✗")} ${s.bold(e.tag)} — ${e.detail}`);
|
|
92
|
+
for (let e of o) console.log(` ${s.yellow("?")} ${e.tag} — ${e.detail}`);
|
|
93
|
+
console.log(` ${s.green("✓")} ${c.length} refused · ${s.yellow(String(o.length))} inconclusive · ${s.red(String(a.length))} admitted`);
|
|
93
94
|
}
|
|
94
|
-
return
|
|
95
|
+
return a.length > 0 ? (r !== "json" && console.error(`\n${s.red("A declared guard did not refuse an anonymous caller.")}\n The declaration and the behaviour disagree — the guard is on the descriptor and
|
|
95
96
|
nothing enforces it on this path. Check that the procedure is bound through the
|
|
96
|
-
dispatch spine (not a hand-mounted route), and that its guard list is not empty.`), 1) : i &&
|
|
97
|
+
dispatch spine (not a hand-mounted route), and that its guard list is not empty.`), 1) : i && o.length > 0 ? (r !== "json" && console.error(`\n${s.yellow("--strict:")} ${o.length} procedure(s) could not be judged.\n Their calls failed before the guard was reached (usually payload validation).
|
|
97
98
|
That is not evidence of enforcement, so under --strict it is not a pass.`), 1) : 0;
|
|
98
|
-
},
|
|
99
|
-
let
|
|
100
|
-
if ("error" in
|
|
101
|
-
let { format:
|
|
102
|
-
if (
|
|
103
|
-
let
|
|
104
|
-
if (
|
|
105
|
-
let
|
|
106
|
-
for (let e of
|
|
99
|
+
}, h = async (e) => {
|
|
100
|
+
let c = t(e);
|
|
101
|
+
if ("error" in c) return console.error(`voltro probe access: ${c.error}`), 1;
|
|
102
|
+
let { format: u } = c, { process: d, target: f, rest: h, error: g } = r(c.rest);
|
|
103
|
+
if (g !== void 0) return console.error(`voltro probe access: ${g}`), 1;
|
|
104
|
+
let _ = h.includes("--strict"), v = await n(d, f);
|
|
105
|
+
if (v.length === 0) return console.error("voltro probe access: no live api found.\n This command asks a RUNNING app what it does — there is nothing to ask a source tree.\n Start one (`voltro dev` / `voltro serve`), or address it directly with --url."), 1;
|
|
106
|
+
let y = 0;
|
|
107
|
+
for (let e of v) {
|
|
107
108
|
let t = await i(e, "/_voltro/inspect/manifest");
|
|
108
109
|
if (t.kind === "err" || t.status < 200 || t.status >= 300) {
|
|
109
|
-
console.error(`${
|
|
110
|
+
console.error(`${s.red("✗")} ${e.name}: could not read the manifest — ${t.kind === "err" ? t.error : `HTTP ${t.status}`}`), t.kind === "ok" && a(t.status) && console.error(` ${o(t.status)}`), y = 1;
|
|
110
111
|
continue;
|
|
111
112
|
}
|
|
112
|
-
let n =
|
|
113
|
-
for (let t of n) r.push(await
|
|
114
|
-
|
|
113
|
+
let n = l(t.data?.procedures ?? []), r = [];
|
|
114
|
+
for (let t of n) r.push(await p(e, t));
|
|
115
|
+
y = Math.max(y, m(e.name, r, u, _));
|
|
115
116
|
}
|
|
116
|
-
return
|
|
117
|
-
},
|
|
117
|
+
return y;
|
|
118
|
+
}, g = async (e) => {
|
|
118
119
|
let [t, ...n] = e;
|
|
119
|
-
return t === void 0 || t === "--help" || t === "-h" ? (
|
|
120
|
+
return t === void 0 || t === "--help" || t === "-h" ? (c(), +(t === void 0)) : t === "access" ? h(n) : (console.error(`voltro probe: unknown subcommand "${t}" (expected: access)`), 1);
|
|
120
121
|
};
|
|
121
122
|
//#endregion
|
|
122
|
-
export {
|
|
123
|
+
export { g as runProbeCommand };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e, l as t, s as n } from "./projectScaffold-
|
|
1
|
+
import { c as e, l as t, s as n } from "./projectScaffold-DDgWbNLe.js";
|
|
2
2
|
export { n as runAddApp, e as runCreateProject, t as runListTemplates };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./templates-
|
|
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
4
|
import { n as l } from "./agentsMd-mhQMF1bx.js";
|
|
5
5
|
import { n as u } from "./addCommand-BNeoeSxe.js";
|
|
6
|
-
import { a as d, n as f, r as p } from "./baselineCommand-
|
|
6
|
+
import { a as d, n as f, r as p } from "./baselineCommand-C6NMt-oa.js";
|
|
7
7
|
import { basename as m, dirname as h, join as g, resolve as _ } from "node:path";
|
|
8
8
|
import { existsSync as v, mkdirSync as y, promises as b, writeFileSync as x } from "node:fs";
|
|
9
9
|
import { createLogger as S } from "@voltro/logger";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./apiBuild-
|
|
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-
|
|
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), {
|