@voltro/cli 0.51.0 → 0.52.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 +127 -0
- package/dist/{agentsMd-D6yD7IQv.js → agentsMd-0l980yhL.js} +4 -1
- package/dist/agentsMd-SDDSkyl4.js +2 -0
- package/dist/apiBuild-BYBpL7Pz.js +2 -0
- package/dist/{apiBuild-CPDHXF72.js → apiBuild-CSFI8QGq.js} +3 -3
- package/dist/bin.js +1 -1
- package/dist/build-CPgcMQug.js +793 -0
- package/dist/checkCommand-2SbqzukH.js +2 -0
- package/dist/{checkCommand-DNuPiWMc.js → checkCommand-COmqc2cB.js} +92 -46
- package/dist/{cloudCmd-F4YJeqM3.js → cloudCmd-QUXh-b5w.js} +1 -1
- package/dist/codegen-CctkDO-1.js +2 -0
- package/dist/{codegen-CrMXs4hb.js → codegen-VF479Cnb.js} +1 -1
- package/dist/{codegenCommand-BNBHcNNj.js → codegenCommand-DCdG2JN-.js} +12 -12
- package/dist/{codemodRunner-BDVixlSw.js → codemodRunner-r7J9lIa7.js} +588 -540
- package/dist/{commands-B1OiS9bX.js → commands-Cc_nV8WI.js} +35 -35
- package/dist/{dashboardCommand-C-vvPY1B.js → dashboardCommand-C-gKvwqh.js} +5 -5
- package/dist/{dataCommand-C1GxXW5q.js → dataCommand-BgpBHnlB.js} +27 -27
- package/dist/dbCommand-DNb6yeOG.js +2 -0
- package/dist/{dbCommand-If4Y1xQ-.js → dbCommand-sHedr-NJ.js} +2 -2
- package/dist/dev--A3nsxA3.js +3 -0
- package/dist/{dev-kdAg9Q7l.js → dev-CRHoCEiy.js} +2142 -2103
- package/dist/doctorCommand-CqoWA2p5.js +2 -0
- package/dist/{doctorCommand-nKmeW78u.js → doctorCommand-DtfJ3FA6.js} +314 -234
- package/dist/{dormancyCommand-CY3wa_SW.js → dormancyCommand-Drn7o0No.js} +1 -1
- package/dist/{embeddingsCommand-BDLIgje_.js → embeddingsCommand-Z-jO1fWN.js} +1 -1
- package/dist/{envCommand-C6V_xVlT.js → envCommand-D4gCrrTZ.js} +8 -8
- package/dist/{evolveCommand-D3c4DSfN.js → evolveCommand-CMROeKeA.js} +2 -2
- package/dist/fileConventions-DOqD3lPS.js +34 -0
- package/dist/{fileTaxonomy-CJfgOllU.js → fileTaxonomy-DvDUV9wq.js} +1 -1
- package/dist/frameworkTableAssembly-C6ETawPR.js +2 -0
- package/dist/{frameworkTableAssembly-BwJVEKLr.js → frameworkTableAssembly-w-XnLa3q.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{infoCommand-BnRFEF1o.js → infoCommand-DXM868o_.js} +1 -1
- package/dist/inspectMetrics-CGF94puw.js +143 -0
- package/dist/{metaCommands-CfRLra0s.js → metaCommands-C6RFmF1r.js} +2 -2
- package/dist/{migrate-DehuBakM.js → migrate-D0F-eTlK.js} +2 -2
- package/dist/{pageConvention-cEiRxdab.js → pageConvention-CzUiSbtU.js} +1 -1
- package/dist/{privacyCommand-XejDMvmu.js → privacyCommand-DGdopOI6.js} +1 -1
- package/dist/{projectScaffold-mIX_DpSe.js → projectScaffold-B4dmTlwT.js} +1 -1
- package/dist/{projectScaffold-BIl97_E6.js → projectScaffold-EzlErR4E.js} +1 -1
- package/dist/{renderModeScan-D7J1B7Kw.js → renderModeScan-CcH2X1_D.js} +25 -10
- package/dist/{renderProfile-1OWWAAtx.js → renderProfile-Ck32Fzxr.js} +2 -2
- package/dist/{runtimeTrace-ZsBU7Tkx.js → runtimeTrace-BPQyCmC5.js} +1 -1
- package/dist/{sdkgen-O4XqWOjM.js → sdkgen-Se88ifTd.js} +1 -1
- package/dist/serveCommand-DLc-BznW.js +2 -0
- package/dist/{serveCommand-DdiYNBBu.js → serveCommand-DkP3OT0W.js} +885 -868
- package/dist/serveEntry.js +1 -1
- package/dist/start-DfL3fOiN.js +3 -0
- package/dist/start-jw89Xbqy.js +1339 -0
- package/dist/startEntry.js +1 -1
- package/dist/{staticCommand-Dr2M6tpU.js → staticCommand-BwNEDlSU.js} +1 -1
- package/dist/{test-rXFq4S76.js → test-f3amja6a.js} +1 -1
- package/dist/updateCommand-5gFVfK5q.js +2 -0
- package/dist/{updateCommand-Bs322Q78.js → updateCommand-BMk2e4ky.js} +1 -1
- package/dist/{webDev-B-ubQEMX.js → webDev-BgWL9gKV.js} +1156 -835
- package/dist/webDev-CZbTsDcH.js +2 -0
- package/dist/{webhooksCommand-FLYY9IXh.js → webhooksCommand-CoIO3jbj.js} +1 -1
- package/package.json +30 -17
- package/templates/AGENTS.core.md +11 -0
- package/templates/AGENTS.md +15 -4
- package/templates/agent-docs/_index.md +4 -4
- package/templates/agent-docs/_manifest.json +11 -11
- package/templates/agent-docs/cli.md +96 -14
- package/templates/agent-docs/data.md +210 -7
- package/templates/agent-docs/database/schema.md +1 -1
- package/templates/agent-docs/database/seedsdialects.md +1 -1
- package/templates/agent-docs/deployment.md +22 -3
- package/templates/agent-docs/introduction.md +46 -0
- package/templates/agent-docs/local-first-mobile.md +34 -7
- package/templates/agent-docs/plugins/ai-flows.md +1 -1
- package/templates/agent-docs/plugins/audit.md +5 -5
- package/templates/agent-docs/plugins/cdc-out.md +2 -2
- package/templates/agent-docs/plugins/{versioning.md → row-history.md} +22 -22
- package/templates/agent-docs/plugins/storage.md +2 -2
- package/templates/agent-docs/plugins.md +29 -7
- package/templates/agent-docs/reference.md +39 -2
- package/templates/agent-docs/routing.md +341 -47
- package/templates/agent-docs/schema-driven-ui.md +78 -2
- package/templates/agent-docs/security.md +125 -8
- package/templates/agent-docs/templates/apibackends.md +14 -14
- package/templates/agent-docs/templates/overview.md +1 -1
- package/templates/agent-docs/whats-new.md +76 -53
- package/templates/apps/api-ai/package.json +6 -7
- package/templates/apps/api-ai/tests/summarize.test.ts +1 -1
- 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 +9 -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-versioning → api-row-history}/README.md +3 -3
- package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.server.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.server.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/app.config.ts +3 -3
- package/templates/apps/{api-versioning → api-row-history}/database/schema.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.server.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/mutations/documents.create.mutation.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.ts +1 -1
- package/templates/apps/{api-versioning → api-row-history}/package.json +8 -8
- package/templates/apps/api-row-history/template.json +6 -0
- package/templates/apps/{api-versioning → api-row-history}/tests/documents.create.test.ts +1 -1
- package/templates/apps/api-saas/app.config.ts +1 -0
- package/templates/apps/api-saas/package.json +10 -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-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-collab/src/pages/page.test.tsx +10 -9
- package/templates/apps/frontend-collab/src/pages/page.tsx +42 -65
- 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 +6 -7
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +6 -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/agentsMd-Bu_XQgVf.js +0 -2
- package/dist/apiBuild-GDKuGOMV.js +0 -2
- package/dist/build-DETLZAFt.js +0 -752
- package/dist/checkCommand-CWcnDArJ.js +0 -2
- package/dist/codegen-DiMn2KkZ.js +0 -2
- package/dist/dbCommand-C27HIsGE.js +0 -2
- package/dist/dev-CK522MV5.js +0 -3
- package/dist/doctorCommand-BK4l18eG.js +0 -2
- package/dist/fileConventions-Cof68_BL.js +0 -33
- package/dist/frameworkTableAssembly-CVDB2hCq.js +0 -2
- package/dist/inspectMetrics-CfdKLh6t.js +0 -72
- package/dist/serveCommand-BRnPCxVd.js +0 -2
- package/dist/start-BLNmWkLa.js +0 -1154
- package/dist/start-Dzicuyw8.js +0 -3
- package/dist/updateCommand-eXB35SEv.js +0 -2
- package/dist/webDev-DposiF3j.js +0 -2
- package/templates/apps/api-versioning/template.json +0 -6
- /package/templates/apps/{api-versioning → api-row-history}/actions/documents.asOf.action.ts +0 -0
- /package/templates/apps/{api-versioning → api-row-history}/actions/documents.history.action.ts +0 -0
- /package/templates/apps/{api-versioning → api-row-history}/mutations/documents.update.mutation.server.ts +0 -0
- /package/templates/apps/{api-versioning → api-row-history}/tsconfig.json +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./cliArgs-D4p8n7EE.js";
|
|
2
|
-
import { a as t, l as n } from "./codegen-
|
|
2
|
+
import { a as t, l as n } from "./codegen-VF479Cnb.js";
|
|
3
3
|
import { r } from "./appGraph-yRuKjOba.js";
|
|
4
4
|
import { n as i } from "./cliOutput-D1tSBoRM.js";
|
|
5
5
|
import { n as a, o, r as s, t as c } from "./inspectFetch-EMuhTG_9.js";
|
|
6
|
-
import { r as l } from "./fileTaxonomy-
|
|
7
|
-
import { S as u } from "./doctorCommand-
|
|
6
|
+
import { r as l } from "./fileTaxonomy-DvDUV9wq.js";
|
|
7
|
+
import { S as u } from "./doctorCommand-DtfJ3FA6.js";
|
|
8
8
|
import { resolve as d } from "node:path";
|
|
9
9
|
import { readdirSync as f, statSync as p } from "node:fs";
|
|
10
10
|
import { isReactivityChannelKey as m } from "@voltro/protocol";
|
|
@@ -125,12 +125,31 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
|
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
}, C =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
128
|
+
}, C = {
|
|
129
|
+
unexercised: (e) => `${e} never ran — no observation exists, so nothing is claimed about them`,
|
|
130
|
+
unobservedReads: (e) => `${e} ran with no table access recorded — indistinguishable from touching nothing, so nothing is claimed about them either`
|
|
131
|
+
}, w = (e, t) => {
|
|
132
|
+
let n = e.filter((e) => !t.has(e)).sort();
|
|
133
|
+
return n.length === 0 ? `\ndeclared vs live: all ${e.length} source-declared tags are registered on the server` : `\ndeclared vs live: ${n.length} of ${e.length} source-declared tags are NOT registered on the server\n` + n.map((e) => ` ⚠ ${e} — a generated client calls this and gets "Unknown request tag"`).join("\n") + "\n fix: if the server runs older code, redeploy; if it is current, plugin route registration was dropped — check the boot line \"plugin routes registered\"";
|
|
134
|
+
}, T = (e) => {
|
|
135
|
+
let { exercised: t, total: n } = e.coverage;
|
|
136
|
+
if (n === 0) return "\nobserved: no procedures declared — nothing to compare";
|
|
137
|
+
let r = `\nobserved: ${t}/${n} procedures exercised (${Math.round(t / n * 100)}%)`, i = Object.keys(C).map((t) => [t, e[t].length]).filter(([, e]) => e > 0), a = i.reduce((e, [, t]) => e + t, t), o = [...i.map(([e, t]) => ` ${C[e](t)}`), ...a === n ? [] : [` ⚠ ${n - a} of the declared procedures are in none of the counts above — that is a defect in \`voltro check\`, please report it`]].join("\n");
|
|
138
|
+
if (e.diagnostics.length > 0) {
|
|
139
|
+
let n = e.diagnostics.length;
|
|
140
|
+
return [
|
|
141
|
+
r,
|
|
142
|
+
` ${n} declared/observed mismatch${n === 1 ? "" : "es"} among the ${t} that ran`,
|
|
143
|
+
...e.diagnostics.map((e) => ` ${e.node}${e.file === void 0 ? "" : ` (${e.file})`}\n` + e.breaks.map((e) => ` ${e}`).join("\n") + `\n fix: ${e.fix}`),
|
|
144
|
+
...o === "" ? [] : [o]
|
|
145
|
+
].join("\n");
|
|
146
|
+
}
|
|
147
|
+
return [
|
|
148
|
+
r,
|
|
149
|
+
t === 0 ? " nothing was compared — a declaration is only checked against a procedure that RAN" : ` no declared/observed mismatch among the ${t} that ran`,
|
|
150
|
+
...o === "" ? [] : [o]
|
|
151
|
+
].join("\n");
|
|
152
|
+
}, E = (e, t) => ({
|
|
134
153
|
tables: (t.tables ?? []).map((e) => e.name),
|
|
135
154
|
frameworkOwnedTables: (t.tables ?? []).filter((e) => e.framework === !0 || e.name.startsWith("_voltro_") || x.has(e.name)).map((e) => e.name),
|
|
136
155
|
scopes: e.scopes ?? [],
|
|
@@ -147,27 +166,41 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
|
|
|
147
166
|
...e.internal === !0 ? { internal: !0 } : {}
|
|
148
167
|
};
|
|
149
168
|
})
|
|
150
|
-
}),
|
|
169
|
+
}), D = (e) => e.length === 0 ? "✓ voltro check: no issues" : e.map((e) => {
|
|
151
170
|
let t = e.severity === "error" ? "✗ error" : "⚠ warn", n = e.file ? ` (${e.file})` : "";
|
|
152
171
|
return `${t} ${e.rule} ${e.node}${n}\n ${e.breaks.join("; ")}\n fix: ${e.fix}`;
|
|
153
|
-
}).join("\n"),
|
|
154
|
-
let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
172
|
+
}).join("\n"), O = async (e) => {
|
|
173
|
+
let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev--A3nsxA3.js"), { buildRpcEntry: i } = await import("./manifestBuild-CPjhvM62.js"), { buildCapabilityManifest: a } = await import("./inspect-CuGDYES0.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = await r(e).then((e) => e?.plugins ?? []).catch(() => []);
|
|
174
|
+
try {
|
|
175
|
+
let { mergePluginRoutesInto: e } = await import("./dev--A3nsxA3.js");
|
|
176
|
+
e({
|
|
177
|
+
plugins: c,
|
|
178
|
+
queries: s.queries,
|
|
179
|
+
mutations: s.mutations,
|
|
180
|
+
actions: s.actions,
|
|
181
|
+
streams: s.streams,
|
|
182
|
+
log: { info: () => {} }
|
|
183
|
+
});
|
|
184
|
+
} catch (e) {
|
|
185
|
+
console.warn(`\n⚠ plugin rpc routes could not be merged — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`);
|
|
186
|
+
}
|
|
187
|
+
let l = (t, n, r) => i(t, n, r.startsWith("plugin:") ? r : o(e, r)), u = [
|
|
188
|
+
...s.queries.map((e) => l(e.descriptor, "query", e.file)),
|
|
189
|
+
...s.mutations.map((e) => l(e.descriptor, "mutation", e.file)),
|
|
190
|
+
...s.actions.map((e) => l(e.descriptor, "action", e.file)),
|
|
191
|
+
...s.streams.map((e) => l(e.descriptor, "stream", e.file))
|
|
192
|
+
], { assembleFrameworkTables: d } = await import("./frameworkTableAssembly-C6ETawPR.js"), f = await d({ root: e }).catch((e) => (console.warn(`\n⚠ plugin tables could not be collected — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`), [])), p = new Set(s.tables.map((e) => e.tableName)), m = [...[...p].map((e) => ({ name: e })), ...f.map((e) => e.tableName).filter((e) => !p.has(e)).map((e) => ({
|
|
160
193
|
name: e,
|
|
161
194
|
framework: !0
|
|
162
|
-
}))],
|
|
195
|
+
}))], h = c;
|
|
163
196
|
return {
|
|
164
|
-
manifest: a(
|
|
197
|
+
manifest: a(u, s.workflows.map((t) => ({
|
|
165
198
|
tag: t.definition.name ?? "",
|
|
166
199
|
file: o(e, t.file)
|
|
167
|
-
})), [],
|
|
168
|
-
tables: { tables:
|
|
200
|
+
})), [], h),
|
|
201
|
+
tables: { tables: m }
|
|
169
202
|
};
|
|
170
|
-
},
|
|
203
|
+
}, k = async (t) => {
|
|
171
204
|
let f = t.flatMap((e) => e === "--json" ? ["--format", "json"] : [e]), p = a(f);
|
|
172
205
|
if ("error" in p) return console.error(`voltro check: ${p.error}`), 1;
|
|
173
206
|
let { process: m, target: h, rest: g } = s(p.rest), _;
|
|
@@ -187,21 +220,27 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
|
|
|
187
220
|
};
|
|
188
221
|
else return console.error("voltro check --diff: expected removeTable:<name> | removeProcedure:<tag> | removeScope:<name>"), 1;
|
|
189
222
|
}
|
|
190
|
-
let v = e(g, ["--diff"]) ?? process.cwd(), x = g.includes("--offline"),
|
|
191
|
-
if (
|
|
223
|
+
let v = e(g, ["--diff"]) ?? process.cwd(), x = g.includes("--offline"), C = x ? [] : await o(m, h), k, A;
|
|
224
|
+
if (C.length === 0) {
|
|
192
225
|
if (!x && h !== void 0) return console.error("voltro check: --url given but no api reachable there."), 1;
|
|
193
226
|
try {
|
|
194
|
-
let e = await
|
|
195
|
-
|
|
227
|
+
let e = await O(d(v));
|
|
228
|
+
k = e.manifest, A = e.tables;
|
|
196
229
|
} catch (e) {
|
|
197
230
|
return console.error(`voltro check: could not assemble the graph from source: ${e.message}`), console.error(" Start `voltro dev` to check against a running api instead."), 1;
|
|
198
231
|
}
|
|
199
232
|
} else {
|
|
200
|
-
let e =
|
|
233
|
+
let e = C[0], [t, n] = await Promise.all([c(e, "/_voltro/inspect/manifest"), c(e, "/_voltro/inspect/data/tables")]);
|
|
201
234
|
if (t.kind === "err") return console.error(`voltro check: manifest fetch failed: ${t.error}`), 1;
|
|
202
|
-
|
|
235
|
+
k = t.data, A = n.kind === "ok" ? n.data : { tables: [] };
|
|
203
236
|
}
|
|
204
|
-
let
|
|
237
|
+
let j = E(k, A), M = r(j, _), N = "";
|
|
238
|
+
if (C.length > 0) try {
|
|
239
|
+
N = w(((await O(d(v))).manifest.procedures ?? []).map((e) => e.tag), new Set((k.procedures ?? []).map((e) => e.tag)));
|
|
240
|
+
} catch {
|
|
241
|
+
N = "\ndeclared vs live: skipped — no app source at this root to compare against";
|
|
242
|
+
}
|
|
243
|
+
let P = [...l(v).findings.map((e) => ({
|
|
205
244
|
rule: e.rule,
|
|
206
245
|
node: e.file,
|
|
207
246
|
file: e.file,
|
|
@@ -215,28 +254,35 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
|
|
|
215
254
|
breaks: [e.kind === "suffixed-outside-pages" ? "a page.tsx outside src/pages/ never routes" : "no test beside it"],
|
|
216
255
|
fix: e.kind === "suffixed-outside-pages" ? "move it under src/pages/ into the directory whose route it serves, or rename it — page.tsx is reserved" : "write the test with the file — the name is derivable",
|
|
217
256
|
severity: e.kind === "suffixed-outside-pages" ? "error" : "warn"
|
|
218
|
-
}))],
|
|
257
|
+
}))], F = (await n(v, b(v))).map((e) => ({
|
|
219
258
|
rule: "client/not-browser-safe",
|
|
220
259
|
node: e.file,
|
|
221
260
|
file: e.file,
|
|
222
261
|
breaks: [`reaches the server-only '${e.violation.specifier}' — chain: ${e.violation.chain.join(" → ")}`],
|
|
223
262
|
fix: "move the server-only code behind a *.server.ts, or drop the .client suffix — an unmarked file makes no claim",
|
|
224
263
|
severity: "error"
|
|
225
|
-
})),
|
|
226
|
-
...
|
|
227
|
-
...
|
|
228
|
-
...
|
|
229
|
-
],
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
264
|
+
})), I = [
|
|
265
|
+
...M.diagnostics,
|
|
266
|
+
...P,
|
|
267
|
+
...F
|
|
268
|
+
], L = M.ok && !P.some((e) => e.severity === "error") && F.length === 0, R = await S(d(v)), z = R === null ? null : y(j.procedures, R);
|
|
269
|
+
if (p.format === "json") {
|
|
270
|
+
let e = z === null ? {
|
|
271
|
+
...M,
|
|
272
|
+
ok: L,
|
|
273
|
+
diagnostics: I
|
|
274
|
+
} : {
|
|
275
|
+
...M,
|
|
276
|
+
ok: L,
|
|
277
|
+
diagnostics: I,
|
|
278
|
+
observed: z
|
|
279
|
+
};
|
|
280
|
+
i(N === "" ? e : {
|
|
281
|
+
...e,
|
|
282
|
+
declaredVsLive: N.trim()
|
|
283
|
+
});
|
|
284
|
+
} else console.log(D(I)), z !== null && console.log(T(z)), N !== "" && console.log(N), console.log(L ? "\nvoltro check: OK" : "\nvoltro check: FAILED (errors above)");
|
|
285
|
+
return +!L;
|
|
240
286
|
};
|
|
241
287
|
//#endregion
|
|
242
|
-
export {
|
|
288
|
+
export { k as a, O as i, w as n, E as o, T as r, C as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e, t } from "./cliArgs-D4p8n7EE.js";
|
|
2
2
|
import { a as n, i as r, n as i, r as a, t as o } from "./cloudClient-DWL-Hw_T.js";
|
|
3
3
|
import { n as s } from "./cliOutput-D1tSBoRM.js";
|
|
4
|
-
import { d as c, f as l, o as u } from "./projectScaffold-
|
|
4
|
+
import { d as c, f as l, o as u } from "./projectScaffold-B4dmTlwT.js";
|
|
5
5
|
import { basename as d, join as f, resolve as p } from "node:path";
|
|
6
6
|
import { promises as m } from "node:fs";
|
|
7
7
|
import { ansi as h } from "@voltro/logger";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as e, o as t, y as n } from "./fileConventions-
|
|
1
|
+
import { b as e, o as t, y as n } from "./fileConventions-DOqD3lPS.js";
|
|
2
2
|
import { dirname as r, join as i, relative as a, resolve as o } from "node:path";
|
|
3
3
|
import { promises as s, readFileSync as c } from "node:fs";
|
|
4
4
|
import { pathToFileURL as l } from "node:url";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as o } from "./frameworkTableAssembly-
|
|
4
|
-
import { i as s, r as c } from "./codegen-
|
|
1
|
+
import { Cn as e, Sn as t, V as n, l as r, u as i } from "./dev-CRHoCEiy.js";
|
|
2
|
+
import { Ct as a } from "./webDev-BgWL9gKV.js";
|
|
3
|
+
import { n as o } from "./frameworkTableAssembly-w-XnLa3q.js";
|
|
4
|
+
import { i as s, r as c } from "./codegen-VF479Cnb.js";
|
|
5
5
|
import { basename as l, join as u, relative as d, resolve as f } from "node:path";
|
|
6
6
|
import { promises as p } from "node:fs";
|
|
7
7
|
import { pathToFileURL as m } from "node:url";
|
|
@@ -100,21 +100,21 @@ var h = "voltro.mobile.ts", g = u(".framework", "mobileApis.generated.ts"), _ =
|
|
|
100
100
|
file: i,
|
|
101
101
|
apis: r.map(([e]) => e)
|
|
102
102
|
};
|
|
103
|
-
}, x = (e, t) => t.kind === "wrote" ? `voltro codegen: wrote ${d(e, t.file)} (apis ${t.apis.join(", ")})` : t.kind === "refused" ? `voltro codegen: ${t.reason} — refusing to write.` : `voltro codegen: no ${h} here — not a mobile app.`, S = async (
|
|
104
|
-
let { config: i, present: a, error: o } = await
|
|
103
|
+
}, x = (e, t) => t.kind === "wrote" ? `voltro codegen: wrote ${d(e, t.file)} (apis ${t.apis.join(", ")})` : t.kind === "refused" ? `voltro codegen: ${t.reason} — refusing to write.` : `voltro codegen: no ${h} here — not a mobile app.`, S = async (t) => {
|
|
104
|
+
let { config: i, present: a, error: o } = await r(t);
|
|
105
105
|
if (a && i === null) return {
|
|
106
106
|
kind: "refused",
|
|
107
107
|
reason: "app.config.ts exists but could not be loaded" + (o === void 0 ? "" : ` — ${o instanceof Error ? o.message : String(o)}`)
|
|
108
108
|
};
|
|
109
|
-
let s = i?.plugins ?? [], { pluginContributions: u, pluginErrorImports: d, pluginRpcImports: f } = await
|
|
110
|
-
root:
|
|
109
|
+
let s = i?.plugins ?? [], { pluginContributions: u, pluginErrorImports: d, pluginRpcImports: f } = await n(s, i?.name ?? l(t), t), p = await c({
|
|
110
|
+
root: t,
|
|
111
111
|
...u.length > 0 ? { pluginContributions: u } : {},
|
|
112
112
|
...d.length > 0 ? { pluginErrorImports: d } : {},
|
|
113
113
|
...f.length > 0 ? { pluginRpcImports: f } : {},
|
|
114
114
|
...i?.name === void 0 ? {} : { apiName: i.name }
|
|
115
115
|
});
|
|
116
116
|
if (!p) return { kind: "nothing-to-write" };
|
|
117
|
-
let m = await C(
|
|
117
|
+
let m = await C(t, i), h = await e(p, m);
|
|
118
118
|
return {
|
|
119
119
|
kind: "wrote",
|
|
120
120
|
file: p,
|
|
@@ -124,9 +124,9 @@ var h = "voltro.mobile.ts", g = u(".framework", "mobileApis.generated.ts"), _ =
|
|
|
124
124
|
tables: m.size,
|
|
125
125
|
dts: h
|
|
126
126
|
};
|
|
127
|
-
}, C = async (e,
|
|
128
|
-
let
|
|
129
|
-
return
|
|
127
|
+
}, C = async (e, n) => {
|
|
128
|
+
let r = await s(e), { tables: a } = await i(r), c = await o({ root: e });
|
|
129
|
+
return t(a, c, n?.analytics?.tables ?? []);
|
|
130
130
|
}, w = async (e) => {
|
|
131
131
|
let t = f(e.find((e) => !e.startsWith("-")) ?? process.cwd()), n = await b(t);
|
|
132
132
|
if (n.kind !== "not-a-mobile-app") return console.log(x(t, n)), n.kind === "wrote" ? 0 : 1;
|