@voltro/cli 0.44.1 → 0.46.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 +280 -1
- package/dist/{apiBuild-DvWreIQP.js → apiBuild-BKdd0I1Z.js} +2 -2
- package/dist/apiBuild-P2gewrfQ.js +2 -0
- package/dist/bin.d.ts +24 -0
- package/dist/bin.js +46 -11
- package/dist/{build-Ckc-FA7d.js → build-co6yadYz.js} +8 -8
- package/dist/{checkCommand-BNfEs4KG.js → checkCommand-B-eiW-G_.js} +12 -12
- package/dist/{checkCommand-AlbawIal.js → checkCommand-CXAXTjZL.js} +1 -1
- package/dist/codegen-DcE2li1i.js +2 -0
- package/dist/{codegen-CbpGCWLG.js → codegen-sbN1Y8PB.js} +37 -37
- package/dist/codegenCommand-CB6_3sX0.js +144 -0
- package/dist/{codemodRunner-BKTnaGOz.js → codemodRunner-DSZjgyCL.js} +49 -0
- package/dist/{commands-CYkHTox2.js → commands-C-hxgAGr.js} +24 -24
- package/dist/{dashboardCommand-DHDmlo9A.js → dashboardCommand-CEVO0GWF.js} +3 -3
- package/dist/{dataCommand-WFn8CM11.js → dataCommand-k0ezbQWa.js} +355 -250
- package/dist/{dbCommand-B237qI-j.js → dbCommand-BwkyNxn-.js} +110 -110
- package/dist/dbCommand-C2XK63Dd.js +2 -0
- package/dist/{dev-D-JZ6CGQ.js → dev-8hTEnN6s.js} +2154 -2076
- package/dist/{dev-BZO5aLdr.js → dev-DyoYst4j.js} +1 -1
- package/dist/devActivity.d.ts +24 -0
- package/dist/{doctorCommand-BlUyESpD.js → doctorCommand-B6D7HH1-.js} +249 -228
- package/dist/doctorCommand-Btl2Jz1a.js +2 -0
- package/dist/doctorSourceRelations-CPjSwYuZ.js +83 -0
- package/dist/{dormancyCommand-lQxdrU8C.js → dormancyCommand-CrPAwOgo.js} +1 -1
- package/dist/{embeddingsCommand-ByBTju6X.js → embeddingsCommand-DsSxsn_b.js} +1 -1
- package/dist/{envCommand-CpCbYAgR.js → envCommand-B_NPVGUf.js} +2 -2
- package/dist/{evalCommand-6RUfPen4.js → evalCommand-Db01Kbng.js} +24 -24
- package/dist/{evolveCommand-CBV3-TtK.js → evolveCommand-DUuaCIyn.js} +2 -2
- package/dist/{frameworkTableAssembly-oMPBKqlE.js → frameworkTableAssembly-BPlPfU07.js} +82 -78
- package/dist/frameworkTableAssembly-Bob3vj9R.js +2 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +1 -1
- package/dist/{infoCommand-DJoA9cKD.js → infoCommand-CuNl9cbh.js} +1 -1
- package/dist/inspectState.d.ts +24 -0
- package/dist/interruptedReplace-C1ZI84xi.js +27 -0
- package/dist/interruptedReplace-DNJ7MKph.js +2 -0
- package/dist/{migrate-DN47p2PG.js → migrate-CM1qwalu.js} +27 -27
- package/dist/{runtimeTrace-DJ9tPhrc.js → runtimeTrace-BRNM06vK.js} +1 -1
- package/dist/{sdkgen-7dr8-Onw.js → sdkgen-CRCw_XcR.js} +1 -1
- package/dist/{seedRunner-IdHEprqf.js → seedRunner-Dgsiwk_e.js} +59 -59
- package/dist/serveCommand-BNHMVXyp.js +2 -0
- package/dist/serveCommand-CHOr74WM.js +1928 -0
- package/dist/serveEntry.d.ts +24 -0
- package/dist/serveEntry.js +1 -1
- package/dist/{start-Ds3xyn8R.js → start-7HcSIKEp.js} +1 -1
- package/dist/{start-BAlGcjF5.js → start-DvlYDyAr.js} +1 -1
- package/dist/startEntry.d.ts +24 -0
- package/dist/startEntry.js +1 -1
- package/dist/startup.d.ts +24 -0
- package/dist/{test-CLYXrZ2F.js → test-CHb7UwvE.js} +1 -1
- package/dist/{updateCommand-BvRidHp6.js → updateCommand-BlyXavoG.js} +1 -1
- package/dist/updateCommand-CT5AvVg7.js +2 -0
- package/dist/{webDev-101csg6Q.js → webDev-B4IEMB0n.js} +6 -6
- package/dist/webDev-B79ji8M5.js +2 -0
- package/dist/{webhooksCommand-BfO_JF2b.js → webhooksCommand-BRrG_sGf.js} +1 -1
- package/package.json +29 -17
- package/templates/AGENTS.md +1 -1
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/cli.md +179 -3
- package/templates/agent-docs/data.md +103 -7
- package/templates/agent-docs/plugins/versioning.md +2 -0
- package/templates/agent-docs/whats-new.md +166 -6
- 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-XaW40W8x.js +0 -2
- package/dist/codegen-i8QGcHsi.js +0 -2
- package/dist/codegenCommand-iClXoRCW.js +0 -129
- package/dist/dbCommand-BvQeKQOb.js +0 -2
- package/dist/doctorCommand-BeLOwq7S.js +0 -2
- package/dist/frameworkTableAssembly-DgylYh9_.js +0 -2
- package/dist/serveCommand-BlnAlNQg.js +0 -1891
- package/dist/serveCommand-Dg_E1ev4.js +0 -2
- package/dist/updateCommand-DcKVmLVN.js +0 -2
- package/dist/webDev-BLKBO34K.js +0 -2
|
@@ -152,7 +152,7 @@ var p = /* @__PURE__ */ new Set(/* @__PURE__ */ "crypto.fs.path.os.net.http.http
|
|
|
152
152
|
return !1;
|
|
153
153
|
};
|
|
154
154
|
return t(e);
|
|
155
|
-
}, F = async (t) => {
|
|
155
|
+
}, F = async (e) => I(e), I = async (t) => {
|
|
156
156
|
let r = [], i = async (t) => {
|
|
157
157
|
let o = await a.readdir(t, { withFileTypes: !0 });
|
|
158
158
|
for (let a of o) {
|
|
@@ -162,8 +162,8 @@ var p = /* @__PURE__ */ new Set(/* @__PURE__ */ "crypto.fs.path.os.net.http.http
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
return await i(t), r;
|
|
165
|
-
},
|
|
166
|
-
let t = [], n = await
|
|
165
|
+
}, L = (e) => typeof e == "object" && !!e && "kind" in e && "name" in e && (e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream"), R = Symbol.for("@effect/workflow/Workflow"), z = (e) => typeof e == "object" && !!e && R in e && "name" in e && typeof e.name == "string", B = async (e) => Promise.all(e.map((e) => import(s(e).href))), V = async (e) => {
|
|
166
|
+
let t = [], n = await B(e);
|
|
167
167
|
for (let [r, i] of e.entries()) {
|
|
168
168
|
let e = n[r], a = /* @__PURE__ */ new Set();
|
|
169
169
|
for (let [n, r] of Object.entries(e)) {
|
|
@@ -171,7 +171,7 @@ var p = /* @__PURE__ */ new Set(/* @__PURE__ */ "crypto.fs.path.os.net.http.http
|
|
|
171
171
|
if (a.has(r)) continue;
|
|
172
172
|
a.add(r);
|
|
173
173
|
}
|
|
174
|
-
if (
|
|
174
|
+
if (L(r)) {
|
|
175
175
|
if (!l(r)) continue;
|
|
176
176
|
t.push({
|
|
177
177
|
file: i,
|
|
@@ -185,7 +185,7 @@ var p = /* @__PURE__ */ new Set(/* @__PURE__ */ "crypto.fs.path.os.net.http.http
|
|
|
185
185
|
exportName: n,
|
|
186
186
|
rpcTag: r.name,
|
|
187
187
|
kind: "event"
|
|
188
|
-
}) :
|
|
188
|
+
}) : z(r) && t.push({
|
|
189
189
|
file: i,
|
|
190
190
|
exportName: n,
|
|
191
191
|
rpcTag: r.name,
|
|
@@ -194,19 +194,19 @@ var p = /* @__PURE__ */ new Set(/* @__PURE__ */ "crypto.fs.path.os.net.http.http
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
return t;
|
|
197
|
-
},
|
|
198
|
-
let t = [], n = e.filter((e) => j.test(e)), r = await
|
|
197
|
+
}, H = async (e) => {
|
|
198
|
+
let t = [], n = e.filter((e) => j.test(e)), r = await B(n);
|
|
199
199
|
for (let [e, i] of n.entries()) for (let [n, a] of Object.entries(r[e])) f(a) && t.push({
|
|
200
200
|
file: i,
|
|
201
201
|
exportName: n,
|
|
202
202
|
name: a.name
|
|
203
203
|
});
|
|
204
204
|
return t;
|
|
205
|
-
},
|
|
205
|
+
}, U = (e) => {
|
|
206
206
|
let t = (e, t) => e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map((e, n) => (n === 0 && !t ? e.charAt(0).toLowerCase() : e.charAt(0).toUpperCase()) + e.slice(1)).join(""), n = e.split(".");
|
|
207
207
|
return `${t(n[0] ?? "rpc", !1)}${n.slice(1).map((e) => t(e, !0)).join("")}Rpc`;
|
|
208
|
-
},
|
|
209
|
-
let n = (e) => r(t, e.file).replace(/\\/g, "/"), i = e.filter((e) => !
|
|
208
|
+
}, W = /^[A-Za-z][A-Za-z0-9]*([._-][A-Za-z0-9]+)*$/, G = (e, t) => {
|
|
209
|
+
let n = (e) => r(t, e.file).replace(/\\/g, "/"), i = e.filter((e) => !W.test(e.rpcTag));
|
|
210
210
|
if (i.length > 0) throw Error(`invalid rpc tag — a procedure/workflow \`name\` must start with a letter and
|
|
211
211
|
use only letters, digits, and \`.\` \`-\` \`_\` separators (the tag becomes a JS
|
|
212
212
|
identifier in the generated rpcGroup):
|
|
@@ -214,7 +214,7 @@ identifier in the generated rpcGroup):
|
|
|
214
214
|
${i.map((e) => ` • "${e.rpcTag}" (${n(e)})`).join("\n")}\n`);
|
|
215
215
|
let a = /* @__PURE__ */ new Map();
|
|
216
216
|
for (let t of e) {
|
|
217
|
-
let e =
|
|
217
|
+
let e = U(t.rpcTag), n = a.get(e);
|
|
218
218
|
n ? n.push(t) : a.set(e, [t]);
|
|
219
219
|
}
|
|
220
220
|
let o = [...a.values()].filter((e) => new Set(e.map((e) => e.rpcTag)).size > 1);
|
|
@@ -222,8 +222,8 @@ ${i.map((e) => ` • "${e.rpcTag}" (${n(e)})`).join("\n")}\n`);
|
|
|
222
222
|
generated identifier (separators are normalized away). Rename one so they
|
|
223
223
|
differ by more than a \`.\`/\`-\`/\`_\`:
|
|
224
224
|
|
|
225
|
-
${o.map((e) => ` ${
|
|
226
|
-
},
|
|
225
|
+
${o.map((e) => ` ${U(e[0].rpcTag)}:\n` + e.map((e) => ` - "${e.rpcTag}" (${n(e)})`).join("\n")).join("\n\n")}\n`);
|
|
226
|
+
}, K = (e) => {
|
|
227
227
|
switch (e) {
|
|
228
228
|
case "query": return 0;
|
|
229
229
|
case "mutation": return 1;
|
|
@@ -232,7 +232,7 @@ ${o.map((e) => ` ${H(e[0].rpcTag)}:\n` + e.map((e) => ` - "${e.rpcTag}" (${
|
|
|
232
232
|
case "event": return 4;
|
|
233
233
|
case "workflow": return 5;
|
|
234
234
|
}
|
|
235
|
-
},
|
|
235
|
+
}, q = (e, t) => {
|
|
236
236
|
let n = /* @__PURE__ */ new Map();
|
|
237
237
|
for (let t of e) n.has(t.rpcTag) || n.set(t.rpcTag, t);
|
|
238
238
|
let i = [...n.keys()], a = (e) => r(t, n.get(e).file).replace(/\\/g, "/"), o = [];
|
|
@@ -247,8 +247,8 @@ can't be both a leaf and a namespace. Rename one side (e.g. give the
|
|
|
247
247
|
workflow/procedure a nested name like "<prefix>.run"):
|
|
248
248
|
|
|
249
249
|
${o.join("\n\n")}\n`);
|
|
250
|
-
},
|
|
251
|
-
let t = [...await
|
|
250
|
+
}, J = "// source-fingerprint: ", Y = async (e) => {
|
|
251
|
+
let t = [...await I(e)].sort(), n = d("sha1");
|
|
252
252
|
for (let i of t) {
|
|
253
253
|
let t = "";
|
|
254
254
|
try {
|
|
@@ -257,7 +257,7 @@ ${o.join("\n\n")}\n`);
|
|
|
257
257
|
n.update(`${r(e, i).replace(/\\/g, "/")}\u0000${t}\u0000`);
|
|
258
258
|
}
|
|
259
259
|
return n.digest("hex").slice(0, 16);
|
|
260
|
-
},
|
|
260
|
+
}, X = async (e) => {
|
|
261
261
|
let t = async (e) => {
|
|
262
262
|
let r = await a.readdir(e, { withFileTypes: !0 }).catch(() => []);
|
|
263
263
|
for (let t of r) if (!N.has(t.name) && t.isFile() && t.name === "rpcGroup.generated.ts") return n(e, t.name);
|
|
@@ -268,8 +268,8 @@ ${o.join("\n\n")}\n`);
|
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
return t(i(e));
|
|
271
|
-
},
|
|
272
|
-
let n = await
|
|
271
|
+
}, Z = async (e) => {
|
|
272
|
+
let n = await X(e);
|
|
273
273
|
if (n === void 0) return { kind: "absent" };
|
|
274
274
|
let r = "";
|
|
275
275
|
try {
|
|
@@ -282,7 +282,7 @@ ${o.join("\n\n")}\n`);
|
|
|
282
282
|
kind: "stale",
|
|
283
283
|
file: n,
|
|
284
284
|
reason: "the generated group carries no freshness stamp"
|
|
285
|
-
} : await
|
|
285
|
+
} : await Y(t(n)) === i ? {
|
|
286
286
|
kind: "fresh",
|
|
287
287
|
file: n
|
|
288
288
|
} : {
|
|
@@ -290,7 +290,7 @@ ${o.join("\n\n")}\n`);
|
|
|
290
290
|
file: n,
|
|
291
291
|
reason: "a descriptor changed since the group was generated"
|
|
292
292
|
};
|
|
293
|
-
},
|
|
293
|
+
}, Q = (e, n, i, a = [], s = [], c = !1, l = !1, u = [], f = "") => {
|
|
294
294
|
let p = s.length > 0, m = s.flatMap((e) => [{
|
|
295
295
|
file: e.file,
|
|
296
296
|
exportName: e.exportName,
|
|
@@ -307,20 +307,20 @@ ${o.join("\n\n")}\n`);
|
|
|
307
307
|
rpcTag: e.tag,
|
|
308
308
|
kind: e.kind
|
|
309
309
|
}));
|
|
310
|
-
|
|
310
|
+
q([
|
|
311
311
|
...i,
|
|
312
312
|
...m,
|
|
313
313
|
...g
|
|
314
|
-
], e),
|
|
314
|
+
], e), G([
|
|
315
315
|
...i,
|
|
316
316
|
...m,
|
|
317
317
|
...g
|
|
318
318
|
], e);
|
|
319
|
-
let _ = (e) => e.replace(/[^a-zA-Z0-9_$]/g, "_"), v = (e) => `__src_agent_${_(e.name)}`, y = (e) => `__agentRoutes_${_(e.name)}`, b = a.length > 0, x = a.map((e, t) => `import { ${e.name} as __pe${t} } from '${e.module}'`), S = b ? ", __voltroPluginErrors" : "", C = h.length > 0, w = h.map((e, t) => `import { ${e.name} as __prpc${t} } from '${e.module}'`), T = (e) => e === "query" ? "queryToRpc" : e === "mutation" ? "mutationToRpc" : "actionToRpc", E = h.map((e, t) => `export const ${
|
|
319
|
+
let _ = (e) => e.replace(/[^a-zA-Z0-9_$]/g, "_"), v = (e) => `__src_agent_${_(e.name)}`, y = (e) => `__agentRoutes_${_(e.name)}`, b = a.length > 0, x = a.map((e, t) => `import { ${e.name} as __pe${t} } from '${e.module}'`), S = b ? ", __voltroPluginErrors" : "", C = h.length > 0, w = h.map((e, t) => `import { ${e.name} as __prpc${t} } from '${e.module}'`), T = (e) => e === "query" ? "queryToRpc" : e === "mutation" ? "mutationToRpc" : "actionToRpc", E = h.map((e, t) => `export const ${U(e.tag)} = ${T(e.kind)}(__prpc${t}${S})`), D = h.map((e) => ` ${U(e.tag)},`), O = [...i].sort((e, t) => e.kind === t.kind ? e.rpcTag < t.rpcTag ? -1 : 1 : K(e.kind) - K(t.kind)), k = t(n), A = (e) => `__src_${U(e.rpcTag)}`, j = (e) => {
|
|
320
320
|
let t = `./${r(k, e.file).replace(/\\/g, "/").replace(/\.tsx?$/, "")}`;
|
|
321
321
|
return `import { ${e.exportName} as ${A(e)} } from '${t}'`;
|
|
322
322
|
}, M = (e) => {
|
|
323
|
-
let t =
|
|
323
|
+
let t = U(e.rpcTag), n = A(e);
|
|
324
324
|
return e.kind === "query" ? `export const ${t} = queryToRpc(${n}${S})` : e.kind === "mutation" ? `export const ${t} = mutationToRpc(${n}${S})` : e.kind === "action" ? `export const ${t} = actionToRpc(${n}${S})` : e.kind === "stream" ? `export const ${t} = streamToRpc(${n}${S})` : e.kind === "event" ? `export const ${t} = eventToRpc(${n}${S})` : [
|
|
325
325
|
`export const ${t} = Rpc.make('${e.rpcTag}', {`,
|
|
326
326
|
` payload: strictInput(${n}.payloadSchema),`,
|
|
@@ -349,16 +349,16 @@ ${o.join("\n\n")}\n`);
|
|
|
349
349
|
"__voltroConnectionSubmitToken",
|
|
350
350
|
"__voltroConnectionDisconnect"
|
|
351
351
|
] : [], V = [
|
|
352
|
-
...O.map((e) => ` ${
|
|
353
|
-
...s.flatMap((e) => [` ${
|
|
352
|
+
...O.map((e) => ` ${U(e.rpcTag)},`),
|
|
353
|
+
...s.flatMap((e) => [` ${U(`${e.name}.send`)},`, ` ${U(`${e.name}.messages`)},`]),
|
|
354
354
|
...I.map((e) => ` ${e},`),
|
|
355
355
|
...L.map((e) => ` ${e},`),
|
|
356
356
|
...z.map((e) => ` ${e},`),
|
|
357
357
|
...B.map((e) => ` ${e},`),
|
|
358
358
|
...D
|
|
359
|
-
].join("\n"),
|
|
360
|
-
(O.some((e) => e.kind === "mutation") || h.some((e) => e.kind === "mutation")) &&
|
|
361
|
-
let
|
|
359
|
+
].join("\n"), H = ["queryToRpc"];
|
|
360
|
+
(O.some((e) => e.kind === "mutation") || h.some((e) => e.kind === "mutation")) && H.push("mutationToRpc"), (O.some((e) => e.kind === "action") || F || p || h.some((e) => e.kind === "action")) && H.push("actionToRpc"), O.some((e) => e.kind === "stream") && H.push("streamToRpc"), O.some((e) => e.kind === "event") && H.push("eventToRpc"), F && H.push("strictInput", "WorkflowRunHandleSchema", "workflowCancelDescriptor", "workflowDomainEventsQueryDescriptor", "workflowEventDeliveriesQueryDescriptor", "workflowResumeDescriptor", "workflowRunEventsQueryDescriptor", "workflowRunQueryDescriptor", "workflowRunsQueryDescriptor", "workflowRunStepsQueryDescriptor", "workflowSignalDescriptor", "workflowUpdateDescriptor"), c && H.push("mutationToRpc", "undoLogQueryDescriptor", "undoApplyDescriptor", "undoRedoDescriptor"), R && H.push("mutationToRpc", "approvalsPendingQueryDescriptor", "approvalsDecideDescriptor"), l && H.push("mutationToRpc", "actionToRpc", "connectionsListQueryDescriptor", "connectionStartDescriptor", "connectionSubmitTokenDescriptor", "connectionDisconnectDescriptor"), (O.some((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream") || p || F || c || R || l || C) && H.push("normalizeDescriptor");
|
|
361
|
+
let W = [...new Set(H)].sort(), Y = [...O.filter((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream").map((e) => [e.rpcTag, A(e)]), ...s.flatMap((e) => [[`${e.name}.send`, `${y(e)}.send`], [`${e.name}.messages`, `${y(e)}.messages`]])], X = [
|
|
362
362
|
...F ? [
|
|
363
363
|
["__voltro.workflow.run", "workflowRunQueryDescriptor"],
|
|
364
364
|
["__voltro.workflow.runs", "workflowRunsQueryDescriptor"],
|
|
@@ -414,14 +414,14 @@ ${o.join("\n\n")}\n`);
|
|
|
414
414
|
} catch {}
|
|
415
415
|
return `${e.rpcTag}\u0000${t}`;
|
|
416
416
|
}).join("")).digest("hex").slice(0, 16)}`,
|
|
417
|
-
`${
|
|
417
|
+
`${J}${f}`,
|
|
418
418
|
"// Source files:",
|
|
419
419
|
...O.map((t) => `// - ${r(e, t.file).replace(/\\/g, "/")}`),
|
|
420
420
|
...s.map((t) => `// - ${r(e, t.file).replace(/\\/g, "/")} (agent)`),
|
|
421
421
|
"",
|
|
422
422
|
F ? "import { Rpc, RpcGroup } from '@effect/rpc'" : "import { RpcGroup } from '@effect/rpc'",
|
|
423
423
|
...F || P ? ["import { Schema } from 'effect'"] : [],
|
|
424
|
-
`import { ${
|
|
424
|
+
`import { ${W.join(", ")} } from '@voltro/protocol'`,
|
|
425
425
|
...p ? ["import { agentRouteDescriptors as __voltroAgentRoutes } from '@voltro/ai/agent'"] : [],
|
|
426
426
|
"",
|
|
427
427
|
...O.map(j),
|
|
@@ -466,7 +466,7 @@ ${o.join("\n\n")}\n`);
|
|
|
466
466
|
""
|
|
467
467
|
] : [],
|
|
468
468
|
...O.map(M),
|
|
469
|
-
...s.flatMap((e) => [`export const ${
|
|
469
|
+
...s.flatMap((e) => [`export const ${U(`${e.name}.send`)} = actionToRpc(${y(e)}.send${S})`, `export const ${U(`${e.name}.messages`)} = queryToRpc(${y(e)}.messages${S})`]),
|
|
470
470
|
...F ? [
|
|
471
471
|
"export const __voltroWorkflowRun = queryToRpc(workflowRunQueryDescriptor)",
|
|
472
472
|
"export const __voltroWorkflowRuns = queryToRpc(workflowRunsQueryDescriptor)",
|
|
@@ -560,8 +560,8 @@ ${o.join("\n\n")}\n`);
|
|
|
560
560
|
""
|
|
561
561
|
] : []
|
|
562
562
|
].join("\n");
|
|
563
|
-
},
|
|
564
|
-
let r = i(e.root), o = await
|
|
563
|
+
}, $ = async (e) => {
|
|
564
|
+
let r = i(e.root), o = await I(r), s = await V(o), c = await H(o), l = await P(r);
|
|
565
565
|
if (s.length === 0 && c.length === 0 && !l && (e.pluginRpcImports?.length ?? 0) === 0) return;
|
|
566
566
|
let d = ((e) => {
|
|
567
567
|
if (e.length === 0) return r;
|
|
@@ -580,7 +580,7 @@ ${o.join("\n\n")}\n`);
|
|
|
580
580
|
"workflows"
|
|
581
581
|
]), p = (e) => e.slice(e.lastIndexOf("/") + 1), m = d;
|
|
582
582
|
for (; m !== r && f.has(p(m));) m = m.slice(0, m.lastIndexOf("/")) || "/";
|
|
583
|
-
let h = i(e.outputFile ?? n(m, "rpcGroup.generated.ts")), g = [...new Map((e.pluginErrorImports ?? []).map((e) => [`${e.module}#${e.name}`, e])).values()], _ = [...new Map((e.pluginRpcImports ?? []).map((e) => [e.tag, e])).values()], v = await
|
|
583
|
+
let h = i(e.outputFile ?? n(m, "rpcGroup.generated.ts")), g = [...new Map((e.pluginErrorImports ?? []).map((e) => [`${e.module}#${e.name}`, e])).values()], _ = [...new Map((e.pluginRpcImports ?? []).map((e) => [e.tag, e])).values()], v = await Y(t(h)), y = Q(r, h, s, g, c, u(), l, _, v), b = [];
|
|
584
584
|
for (let t of e.pluginContributions ?? []) {
|
|
585
585
|
let e = null;
|
|
586
586
|
try {
|
|
@@ -602,4 +602,4 @@ ${o.join("\n\n")}\n`);
|
|
|
602
602
|
return S !== x && await a.writeFile(h, x, "utf8"), await D(h), h;
|
|
603
603
|
};
|
|
604
604
|
//#endregion
|
|
605
|
-
export {
|
|
605
|
+
export { w as a, C as c, F as i, T as l, Y as n, D as o, $ as r, E as s, Z as t };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { B as e, Sn as t, l as n, u as r, xn as i } from "./dev-8hTEnN6s.js";
|
|
2
|
+
import { dt as a } from "./webDev-B4IEMB0n.js";
|
|
3
|
+
import { r as o, u as s } from "./frameworkTableAssembly-BPlPfU07.js";
|
|
4
|
+
import { i as c, r as l } from "./codegen-sbN1Y8PB.js";
|
|
5
|
+
import { basename as u, join as d, relative as f, resolve as p } from "node:path";
|
|
6
|
+
import { promises as m } from "node:fs";
|
|
7
|
+
import { pathToFileURL as h } from "node:url";
|
|
8
|
+
//#region src/mobileCodegen.ts
|
|
9
|
+
var g = "voltro.mobile.ts", _ = d(".framework", "mobileApis.generated.ts"), v = (e) => e.replace(/[^a-zA-Z0-9]/g, "_"), y = async (e) => {
|
|
10
|
+
let t = d(e, g);
|
|
11
|
+
try {
|
|
12
|
+
await m.stat(t);
|
|
13
|
+
} catch {
|
|
14
|
+
return { present: !1 };
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
let e = (await import(`${h(t).href}?t=${Date.now()}`)).default;
|
|
18
|
+
return e === void 0 || typeof e != "object" || e.apis === void 0 ? {
|
|
19
|
+
present: !0,
|
|
20
|
+
error: /* @__PURE__ */ Error(`${g} has no default export with an \`apis\` map`)
|
|
21
|
+
} : {
|
|
22
|
+
present: !0,
|
|
23
|
+
binding: e
|
|
24
|
+
};
|
|
25
|
+
} catch (e) {
|
|
26
|
+
return {
|
|
27
|
+
present: !0,
|
|
28
|
+
error: e instanceof Error ? e : Error(String(e))
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}, b = (e, t) => {
|
|
32
|
+
let n = t.filter(([, e]) => e.package !== void 0).map(([e, t]) => {
|
|
33
|
+
let n = `${v(e)}Group`, r = `${v(e)}Descriptors`;
|
|
34
|
+
return `import { ${n === "appGroup" ? "appGroup" : `appGroup as ${n}`}, ${r === "appDescriptors" ? "appDescriptors" : `appDescriptors as ${r}`} } from '${t.package}/rpcGroup'`;
|
|
35
|
+
}), r = t.map(([e, t]) => t.package === void 0 ? ` // ${JSON.stringify(e)}: declared with \`url\` only — no local rpc surface to import.\n // Add \`package: '<the api package>'\` to ${g} to get typed hooks for it.` : ` { ${[
|
|
36
|
+
`name: ${JSON.stringify(e)}`,
|
|
37
|
+
`group: ${v(e)}Group`,
|
|
38
|
+
`descriptors: ${v(e)}Descriptors`,
|
|
39
|
+
`wsUrl: wsUrl(${JSON.stringify(e)})`
|
|
40
|
+
].join(", ")} },`), i = t.filter(([, e]) => e.url !== void 0).map(([e, t]) => ` ${JSON.stringify(e)}: ${JSON.stringify(t.url)},`);
|
|
41
|
+
return [
|
|
42
|
+
"// GENERATED BY `voltro codegen` — do not edit; regenerate with `voltro codegen`.",
|
|
43
|
+
"//",
|
|
44
|
+
`// The api bindings declared in ${g}. Only the BINDING is`,
|
|
45
|
+
"// generated: the procedure types ride the imports below, so a schema change",
|
|
46
|
+
"// in an api needs no regeneration here.",
|
|
47
|
+
"",
|
|
48
|
+
...n,
|
|
49
|
+
"import type { MobileApiBinding } from '@voltro/react-native'",
|
|
50
|
+
"",
|
|
51
|
+
"/** Every api this app talks to, bound to a runtime-resolved ws URL.",
|
|
52
|
+
" *",
|
|
53
|
+
" * The URL is a parameter because it differs per environment and `localhost`",
|
|
54
|
+
" * on a device is the DEVICE — see `resolveDevWsUrl` in @voltro/react-native. */",
|
|
55
|
+
"export const mobileApis = (",
|
|
56
|
+
" wsUrl: (apiName: string) => string,",
|
|
57
|
+
"): ReadonlyArray<MobileApiBinding> => [",
|
|
58
|
+
...r,
|
|
59
|
+
"]",
|
|
60
|
+
"",
|
|
61
|
+
"/** Api names in declaration order — the keys the hooks bind to. */",
|
|
62
|
+
`export const MOBILE_API_NAMES = [${t.map(([e]) => JSON.stringify(e)).join(", ")}] as const`,
|
|
63
|
+
...i.length > 0 ? [
|
|
64
|
+
"",
|
|
65
|
+
`/** URLs declared in ${g} for apis this app does not build. */`,
|
|
66
|
+
"export const MOBILE_API_URLS: Readonly<Record<string, string>> = {",
|
|
67
|
+
...i,
|
|
68
|
+
"}"
|
|
69
|
+
] : [],
|
|
70
|
+
""
|
|
71
|
+
].join("\n");
|
|
72
|
+
}, x = async (e) => {
|
|
73
|
+
let t = p(e), n = await y(t);
|
|
74
|
+
if (!n.present) return { kind: "not-a-mobile-app" };
|
|
75
|
+
if ("error" in n) return {
|
|
76
|
+
kind: "refused",
|
|
77
|
+
reason: `${g} could not be loaded — ${n.error.message}`
|
|
78
|
+
};
|
|
79
|
+
let r = Object.entries(n.binding.apis);
|
|
80
|
+
if (r.length === 0) return {
|
|
81
|
+
kind: "refused",
|
|
82
|
+
reason: `${g} declares no apis`
|
|
83
|
+
};
|
|
84
|
+
for (let [e, t] of r) if (t.package === void 0 && t.url === void 0) return {
|
|
85
|
+
kind: "refused",
|
|
86
|
+
reason: `api ${JSON.stringify(e)} declares neither \`package\` nor \`url\``
|
|
87
|
+
};
|
|
88
|
+
for (let [e, n] of r) if (n.package !== void 0 && await a(t, n.package) === null) return {
|
|
89
|
+
kind: "refused",
|
|
90
|
+
reason: `api ${JSON.stringify(e)}: ${n.package} is not a workspace dependency of this app. Add it to the app's package.json (\`"${n.package}": "workspace:*"\`) and install.`
|
|
91
|
+
};
|
|
92
|
+
let i = d(t, _), o = b(t, r);
|
|
93
|
+
await m.mkdir(d(t, ".framework"), { recursive: !0 });
|
|
94
|
+
let s = null;
|
|
95
|
+
try {
|
|
96
|
+
s = await m.readFile(i, "utf8");
|
|
97
|
+
} catch {}
|
|
98
|
+
return s !== o && await m.writeFile(i, o, "utf8"), {
|
|
99
|
+
kind: "wrote",
|
|
100
|
+
file: i,
|
|
101
|
+
apis: r.map(([e]) => e)
|
|
102
|
+
};
|
|
103
|
+
}, S = (e, t) => t.kind === "wrote" ? `voltro codegen: wrote ${f(e, t.file)} (apis ${t.apis.join(", ")})` : t.kind === "refused" ? `voltro codegen: ${t.reason} — refusing to write.` : `voltro codegen: no ${g} here — not a mobile app.`, C = async (r) => {
|
|
104
|
+
let { config: i, present: a, error: o } = await n(r);
|
|
105
|
+
if (a && i === null) return {
|
|
106
|
+
kind: "refused",
|
|
107
|
+
reason: "app.config.ts exists but could not be loaded" + (o === void 0 ? "" : ` — ${o instanceof Error ? o.message : String(o)}`)
|
|
108
|
+
};
|
|
109
|
+
let s = i?.plugins ?? [], { pluginContributions: c, pluginErrorImports: d, pluginRpcImports: f } = await e(s, i?.name ?? u(r), r), p = await l({
|
|
110
|
+
root: r,
|
|
111
|
+
...c.length > 0 ? { pluginContributions: c } : {},
|
|
112
|
+
...d.length > 0 ? { pluginErrorImports: d } : {},
|
|
113
|
+
...f.length > 0 ? { pluginRpcImports: f } : {},
|
|
114
|
+
...i?.name === void 0 ? {} : { apiName: i.name }
|
|
115
|
+
});
|
|
116
|
+
if (!p) return { kind: "nothing-to-write" };
|
|
117
|
+
let m = await w(r, i), h = await t(p, m);
|
|
118
|
+
return {
|
|
119
|
+
kind: "wrote",
|
|
120
|
+
file: p,
|
|
121
|
+
plugins: s.length,
|
|
122
|
+
errorSchemas: d.length,
|
|
123
|
+
routes: f.length,
|
|
124
|
+
tables: m.size,
|
|
125
|
+
dts: h
|
|
126
|
+
};
|
|
127
|
+
}, w = async (e, t) => {
|
|
128
|
+
let n = await c(e), { tables: a, featureMix: l } = await r(n), u = s({
|
|
129
|
+
nodeEnv: process.env.NODE_ENV,
|
|
130
|
+
declared: t?.schema
|
|
131
|
+
}), d = o({
|
|
132
|
+
mix: l,
|
|
133
|
+
plugins: t?.plugins ?? [],
|
|
134
|
+
gates: u
|
|
135
|
+
});
|
|
136
|
+
return i(a, d, t?.analytics?.tables ?? []);
|
|
137
|
+
}, T = async (e) => {
|
|
138
|
+
let t = p(e.find((e) => !e.startsWith("-")) ?? process.cwd()), n = await x(t);
|
|
139
|
+
if (n.kind !== "not-a-mobile-app") return console.log(S(t, n)), n.kind === "wrote" ? 0 : 1;
|
|
140
|
+
let r = await C(t);
|
|
141
|
+
return r.kind === "refused" ? (console.error(`voltro codegen: ${r.reason} — refusing to write.`), console.error(" The generated file would omit every plugin's error union and client routes, and would typecheck, so the omission would only surface as a missing error tag at runtime."), 1) : r.kind === "nothing-to-write" ? (console.log("voltro codegen: no rpc primitives found — nothing to write."), 0) : (console.log(`voltro codegen: wrote ${f(t, r.file)} (plugins ${r.plugins}, error schemas ${r.errorSchemas}, plugin routes ${r.routes})`), console.log(r.dts.action === "removed" ? ` removed ${f(t, r.dts.path)} — no tables declared, so \`source:\` is \`string\` again` : r.dts.action === "skipped" ? " no tables declared — `source:` stays `string`" : ` ${r.dts.action} ${f(t, r.dts.path)} (${r.tables} table name(s) typed for \`source:\`)`), r.plugins > 0 && r.errorSchemas === 0 && console.log(" note: no plugin contributed a cross-cutting error schema, so the wire error union carries only each procedure's own `error:`. Expected if none of your plugins declare `errorSchemas` — but `guards:` needs @voltro/plugin-rbac for its ScopeError to decode typed."), 0);
|
|
142
|
+
};
|
|
143
|
+
//#endregion
|
|
144
|
+
export { C as regenerateRpcGroup, T as runCodegenCommand };
|
|
@@ -5640,6 +5640,55 @@ var b = (e, t, n) => {
|
|
|
5640
5640
|
"emptied of its old rows and holding part of the new ones. If you relied on per-table resume for a replace,",
|
|
5641
5641
|
"that is the non-atomic path."
|
|
5642
5642
|
].join("\n")
|
|
5643
|
+
}),
|
|
5644
|
+
S({
|
|
5645
|
+
version: "0.45.0",
|
|
5646
|
+
id: "0.45.0/01_typed-source-table-name",
|
|
5647
|
+
title: "`source:` is typechecked against the app’s tables, from the next `voltro dev`",
|
|
5648
|
+
kind: "manual",
|
|
5649
|
+
appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => /\bsource\s*:/.test(e.getFullText())),
|
|
5650
|
+
note: [
|
|
5651
|
+
"`source:` on a query or stream is now typed against your app’s own tables.",
|
|
5652
|
+
"A name no table carries is a COMPILE error instead of a subscription that",
|
|
5653
|
+
"silently never updates.",
|
|
5654
|
+
"",
|
|
5655
|
+
"WHEN IT STARTS APPLYING",
|
|
5656
|
+
"",
|
|
5657
|
+
"Not now — at your next `voltro dev` (or `voltro codegen`). Those write",
|
|
5658
|
+
"`voltro-tables.generated.d.ts` beside the generated rpc group, and that file",
|
|
5659
|
+
"is what narrows the type. Until it exists, `source:` is `string`, exactly as",
|
|
5660
|
+
"it is today. This note exists because the error appears one command later",
|
|
5661
|
+
"than the upgrade that caused it.",
|
|
5662
|
+
"",
|
|
5663
|
+
"WHAT TO DO",
|
|
5664
|
+
"",
|
|
5665
|
+
"Boot once, then read what `tsc` flags. Each site is one of two things:",
|
|
5666
|
+
"",
|
|
5667
|
+
" • a name that is misspelled, or was renamed away — a REAL defect this",
|
|
5668
|
+
" just surfaced. That query’s view was never updating. Fix the name.",
|
|
5669
|
+
"",
|
|
5670
|
+
" • a source computed at runtime — correct as written. Annotate it",
|
|
5671
|
+
" `ReactivitySourceValue` (exported from `@voltro/protocol`), which is the",
|
|
5672
|
+
" wide `string | ReactivityChannel` shape.",
|
|
5673
|
+
"",
|
|
5674
|
+
"Reach for the second only when the value genuinely is not a literal. Widening",
|
|
5675
|
+
"a name you could have spelled turns a found defect back into a quiet one.",
|
|
5676
|
+
"",
|
|
5677
|
+
"Eager-loaded relations are a common source of the first kind: a query that",
|
|
5678
|
+
"loads a relation must also declare that relation’s table (and, for a",
|
|
5679
|
+
"many-to-many, the junction). `voltro doctor` reports those.",
|
|
5680
|
+
"",
|
|
5681
|
+
"To opt out entirely, delete `voltro-tables.generated.d.ts` and exclude it",
|
|
5682
|
+
"from your tsconfig; `source:` widens back to `string`."
|
|
5683
|
+
].join("\n")
|
|
5684
|
+
}),
|
|
5685
|
+
S({
|
|
5686
|
+
version: "0.46.0",
|
|
5687
|
+
id: "0.46.0/01_typed-aggregate-source",
|
|
5688
|
+
title: "an aggregate’s `incremental.source` is typechecked against the app’s tables",
|
|
5689
|
+
kind: "manual",
|
|
5690
|
+
appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => /\bincremental\s*:/.test(e.getFullText())),
|
|
5691
|
+
note: (/* @__PURE__ */ "An aggregate that opts into incremental maintenance names the table whose(CDC deltas drive it:(( incremental: { source: 'tasks', op: 'count' }((That name is now checked against your app’s tables, the same way a query’s(`source:` has been since 0.45.0.((WHY IT MATTERS MORE HERE((A name matching no table does not error. The runner subscribes to something(nothing writes, no delta ever arrives, and the aggregate quietly stops(tracking its input — while every read of it still succeeds and still returns(a number. There is no failing request to notice.((WHEN IT STARTS APPLYING((At your next `voltro dev` or `voltro codegen`, not at this upgrade — those(write `voltro-tables.generated.d.ts`, and that file is what narrows the type.(Until it exists the field is `string`, exactly as it is today.((WHAT TO DO((Boot once and read what `tsc` flags. A flagged name is either misspelled or(renamed away — a real defect, and that aggregate has not been maintaining —(or it is computed at runtime, in which case annotate it `string`.((The boot also warns now: an aggregate whose CDC source resolves to no table(is named in the same stale-`source:` warning queries and streams appear in.".split("(")).join("\n")
|
|
5643
5692
|
})
|
|
5644
5693
|
], Y = /* @__PURE__ */ new Set([
|
|
5645
5694
|
"node_modules",
|
|
@@ -91,7 +91,7 @@ var c = () => {
|
|
|
91
91
|
name: "dev",
|
|
92
92
|
summary: "Start the local development server (auto-discovers routes / mutations).",
|
|
93
93
|
status: "wired",
|
|
94
|
-
run: (e) => import("./dev-
|
|
94
|
+
run: (e) => import("./dev-DyoYst4j.js").then((t) => t.runDev(e)),
|
|
95
95
|
help: {
|
|
96
96
|
usage: "[app]",
|
|
97
97
|
examples: [["voltro dev", "boot the app in the current directory"], ["voltro dev apps/acme/api", "boot a specific app"]],
|
|
@@ -109,7 +109,7 @@ var c = () => {
|
|
|
109
109
|
name: "dashboard",
|
|
110
110
|
summary: "Serve the DevTools dashboard standalone (from @voltro/dashboard). Targets via VOLTRO_DASHBOARD_APPS; --port to override.",
|
|
111
111
|
status: "wired",
|
|
112
|
-
run: (e) => import("./dashboardCommand-
|
|
112
|
+
run: (e) => import("./dashboardCommand-CEVO0GWF.js").then((t) => t.runDashboardCommand(e)),
|
|
113
113
|
help: {
|
|
114
114
|
usage: "[--port <n>]",
|
|
115
115
|
flags: [["--port <n>", "port to serve the dashboard on"]],
|
|
@@ -121,7 +121,7 @@ var c = () => {
|
|
|
121
121
|
name: "check",
|
|
122
122
|
summary: "Verify the app graph (blast-radius checks) against a running api; LLM-shaped --json diagnostics. Flags: --json, --process <p>, --diff removeTable:<name>.",
|
|
123
123
|
status: "wired",
|
|
124
|
-
run: (e) => import("./checkCommand-
|
|
124
|
+
run: (e) => import("./checkCommand-CXAXTjZL.js").then((t) => t.runCheckCommand(e)),
|
|
125
125
|
help: {
|
|
126
126
|
usage: "[--json] [--offline] [--process <name>] [--diff removeTable:<name>]",
|
|
127
127
|
flags: [
|
|
@@ -139,7 +139,7 @@ var c = () => {
|
|
|
139
139
|
name: "eval",
|
|
140
140
|
summary: "Replay recorded agent/AI runs (*.eval.ts) against the current model, judge with assertions + an optional LLM judge, and gate the deploy (exit 1 on regression). Flags: --json, --branch [--pr <n>], --threshold <0..1>.",
|
|
141
141
|
status: "wired",
|
|
142
|
-
run: (e) => import("./evalCommand-
|
|
142
|
+
run: (e) => import("./evalCommand-Db01Kbng.js").then((t) => t.runEvalCommand(e)),
|
|
143
143
|
help: {
|
|
144
144
|
usage: "[--json] [--branch [--pr <n>]] [--threshold <0..1>]",
|
|
145
145
|
flags: [
|
|
@@ -155,7 +155,7 @@ var c = () => {
|
|
|
155
155
|
name: "webhooks",
|
|
156
156
|
summary: "Outbound-webhook artefacts. `consumer` generates the ZERO-DEPENDENCY Standard-Webhooks verification package a subscriber installs, from this app's own declared events; `events` lists the events a subscriber can register for. Usage: voltro webhooks <consumer|events> [path] [--out <dir>] [--name <pkg>] [--json].",
|
|
157
157
|
status: "wired",
|
|
158
|
-
run: (e) => import("./webhooksCommand-
|
|
158
|
+
run: (e) => import("./webhooksCommand-BRrG_sGf.js").then((t) => t.runWebhooksCommand(e)),
|
|
159
159
|
help: {
|
|
160
160
|
usage: "<consumer|events> [path] [--out <dir>] [--name <pkg>] [--json]",
|
|
161
161
|
flags: [
|
|
@@ -171,7 +171,7 @@ var c = () => {
|
|
|
171
171
|
name: "evolve",
|
|
172
172
|
summary: "Schema-evolution copilot: propose an observed-graph-driven codemod + a branch-verified backfill for a schema change (rename/retype/split/drop a column, rename a table). Dry-run by default; --write applies. Usage: voltro evolve rename-column <table>.<col> --to <newName> [--write] [--json].",
|
|
173
173
|
status: "wired",
|
|
174
|
-
run: (e) => import("./evolveCommand-
|
|
174
|
+
run: (e) => import("./evolveCommand-DUuaCIyn.js").then((t) => t.runEvolveCommand(e)),
|
|
175
175
|
help: {
|
|
176
176
|
usage: "<rename-column|rename-table|retype-column|split-column|drop-column> <target> [--to <new>] [--write]",
|
|
177
177
|
flags: [
|
|
@@ -188,7 +188,7 @@ var c = () => {
|
|
|
188
188
|
name: "codegen",
|
|
189
189
|
summary: "Emit rpcGroup.generated.ts from discovered route / mutation descriptors.",
|
|
190
190
|
status: "wired",
|
|
191
|
-
run: (e) => import("./codegenCommand-
|
|
191
|
+
run: (e) => import("./codegenCommand-CB6_3sX0.js").then((t) => t.runCodegenCommand(e)),
|
|
192
192
|
help: {
|
|
193
193
|
usage: "[app]",
|
|
194
194
|
examples: [["voltro codegen", "regenerate rpcGroup.generated.ts for the app in the cwd"]],
|
|
@@ -199,7 +199,7 @@ var c = () => {
|
|
|
199
199
|
name: "migrate",
|
|
200
200
|
summary: "Apply the declared schema to the database (alias of `db apply` — diffs declared vs live and emits the ALTERs). `--create-only` for the bootstrap-only CREATE TABLE IF NOT EXISTS path.",
|
|
201
201
|
status: "wired",
|
|
202
|
-
run: (e) => import("./migrate-
|
|
202
|
+
run: (e) => import("./migrate-CM1qwalu.js").then((t) => t.runMigrateCommand(e)),
|
|
203
203
|
help: {
|
|
204
204
|
usage: "[app] [--create-only]",
|
|
205
205
|
flags: [["--create-only", "only CREATE TABLE IF NOT EXISTS — never ALTER (bootstrap)"]],
|
|
@@ -211,7 +211,7 @@ var c = () => {
|
|
|
211
211
|
name: "test",
|
|
212
212
|
summary: "Run vitest against the app at the cwd (auto-discovers *.test.ts/tsx).",
|
|
213
213
|
status: "wired",
|
|
214
|
-
run: (e) => import("./test-
|
|
214
|
+
run: (e) => import("./test-CHb7UwvE.js").then((t) => t.runTestCommand(e)),
|
|
215
215
|
help: {
|
|
216
216
|
usage: "[dir] [filter…] [--watch] [-t <pattern>]",
|
|
217
217
|
flags: [
|
|
@@ -259,7 +259,7 @@ var c = () => {
|
|
|
259
259
|
name: "info",
|
|
260
260
|
summary: "Report versions (CLI, node, every installed @voltro/* — flags lockstep skew), package manager, and dialect. --json for CI. Exits 1 on version skew.",
|
|
261
261
|
status: "wired",
|
|
262
|
-
run: (e) => import("./infoCommand-
|
|
262
|
+
run: (e) => import("./infoCommand-CuNl9cbh.js").then((t) => t.runInfoCommand(e)),
|
|
263
263
|
help: {
|
|
264
264
|
usage: "[--json]",
|
|
265
265
|
flags: [["--json", "machine-readable report"]],
|
|
@@ -280,7 +280,7 @@ var c = () => {
|
|
|
280
280
|
name: "env",
|
|
281
281
|
summary: "Inspect/sync the typed-env manifest. Subcommands: check (default), sync (.env.example), types (env.generated.d.ts for CI tsc), turbo.",
|
|
282
282
|
status: "wired",
|
|
283
|
-
run: (e) => import("./envCommand-
|
|
283
|
+
run: (e) => import("./envCommand-B_NPVGUf.js").then((t) => t.runEnvCommand(e)),
|
|
284
284
|
help: {
|
|
285
285
|
usage: "[check|sync|types|turbo] [--force]",
|
|
286
286
|
flags: [["--force", "overwrite the generated file instead of refusing on a conflict"]],
|
|
@@ -309,12 +309,12 @@ var c = () => {
|
|
|
309
309
|
run: async (e) => {
|
|
310
310
|
let t = e.find((e) => !e.startsWith("-")) ?? process.cwd();
|
|
311
311
|
if (e.includes("--preflight")) {
|
|
312
|
-
let { runServePreflight: e } = await import("./doctorCommand-
|
|
312
|
+
let { runServePreflight: e } = await import("./doctorCommand-Btl2Jz1a.js");
|
|
313
313
|
return e(a(t), !0);
|
|
314
314
|
}
|
|
315
|
-
let { tryRunWebServe: n } = await import("./webDev-
|
|
315
|
+
let { tryRunWebServe: n } = await import("./webDev-B79ji8M5.js"), r = await n(a(t));
|
|
316
316
|
if (!r.ran) {
|
|
317
|
-
let { runServeDispatch: t } = await import("./serveCommand-
|
|
317
|
+
let { runServeDispatch: t } = await import("./serveCommand-BNHMVXyp.js");
|
|
318
318
|
return t(e);
|
|
319
319
|
}
|
|
320
320
|
return r.exitCode;
|
|
@@ -342,13 +342,13 @@ var c = () => {
|
|
|
342
342
|
handlesHelp: !0,
|
|
343
343
|
summary: "Preflight an app for production: the precompiled serve bundle, hand-rolled primitives (naming the shipped one), @voltro/* version skew, executors with no access check, `.serverOnly()` leaks, and junction-FK gaps.",
|
|
344
344
|
status: "wired",
|
|
345
|
-
run: (e) => import("./doctorCommand-
|
|
345
|
+
run: (e) => import("./doctorCommand-Btl2Jz1a.js").then((t) => t.runDoctorCommand(e))
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
name: "build",
|
|
349
349
|
summary: "Production build for a web app (vite build + per-page SSG pre-render).",
|
|
350
350
|
status: "wired",
|
|
351
|
-
run: (e) => import("./build-
|
|
351
|
+
run: (e) => import("./build-co6yadYz.js").then((t) => t.runBuildCommand(e)),
|
|
352
352
|
help: {
|
|
353
353
|
usage: "[app] [--target <t>]",
|
|
354
354
|
flags: [["--target <t>", "build target"]],
|
|
@@ -364,7 +364,7 @@ var c = () => {
|
|
|
364
364
|
name: "prune-runtime",
|
|
365
365
|
summary: "Trim a deployed web tree’s node_modules to the reachable runtime set (standalone image slimming).",
|
|
366
366
|
status: "wired",
|
|
367
|
-
run: (e) => import("./runtimeTrace-
|
|
367
|
+
run: (e) => import("./runtimeTrace-BRNM06vK.js").then((t) => t.runPruneRuntimeCommand(e)),
|
|
368
368
|
hidden: !0
|
|
369
369
|
},
|
|
370
370
|
{
|
|
@@ -382,7 +382,7 @@ var c = () => {
|
|
|
382
382
|
name: "dormancy",
|
|
383
383
|
summary: "Single-node scale-to-zero: front the API with a wake-orchestrator that stops the app when idle and brings it back on a request or a due wakeup (cron/workflow). Needs a SQL store. Flags: --port, --app-port, --idle-grace-ms, --tick-ms.",
|
|
384
384
|
status: "wired",
|
|
385
|
-
run: (e) => import("./dormancyCommand-
|
|
385
|
+
run: (e) => import("./dormancyCommand-CrPAwOgo.js").then((t) => t.runDormancyCommand(e)),
|
|
386
386
|
help: {
|
|
387
387
|
usage: "[app] [--port <n>] [--app-port <n>] [--idle-grace-ms <n>] [--tick-ms <n>]",
|
|
388
388
|
flags: [
|
|
@@ -399,7 +399,7 @@ var c = () => {
|
|
|
399
399
|
name: "start",
|
|
400
400
|
summary: "Production runtime: serves dist + SSR-on-demand for ssr/isr pages.",
|
|
401
401
|
status: "wired",
|
|
402
|
-
run: (e) => import("./start-
|
|
402
|
+
run: (e) => import("./start-DvlYDyAr.js").then((t) => t.runStartCommand(e)),
|
|
403
403
|
help: {
|
|
404
404
|
usage: "[app]",
|
|
405
405
|
examples: [["voltro start", "serve a built web app (dist + SSR-on-demand)"]],
|
|
@@ -453,7 +453,7 @@ var c = () => {
|
|
|
453
453
|
name: "db",
|
|
454
454
|
summary: "Database subcommands. Declarative flow: plan, apply, branch, plans, drift [--accept], squash, restore-snapshot. File migrations: generate [name], migrate, rollback, status, files, rollback-file. Data + housekeeping: seed, gc-snapshots, adopt. Credentials at rest: scan-credentials (find plaintext), encrypt-column (migrate a populated column onto .encrypted()).",
|
|
455
455
|
status: "wired",
|
|
456
|
-
run: (e) => import("./dbCommand-
|
|
456
|
+
run: (e) => import("./dbCommand-C2XK63Dd.js").then((t) => t.runDbCommand(e)),
|
|
457
457
|
help: {
|
|
458
458
|
usage: t(n),
|
|
459
459
|
examples: [
|
|
@@ -469,7 +469,7 @@ var c = () => {
|
|
|
469
469
|
name: "data",
|
|
470
470
|
summary: "Export/import + backup/restore of app data. Logical (rows + optional assets): export <dir> [--tenant <id>|--tables a,b] [--assets] [--compression zstd|gzip|none] [--consistency live|snapshot]; import <dir> [--assets] [--no-verify]. Native (rows ONLY — no blobs): backup <dir> / restore <dir> (pg_dump/mariadb-dump/…). Resumable; typed-NDJSON; content-addressed assets on the logical path.",
|
|
471
471
|
status: "wired",
|
|
472
|
-
run: (e) => import("./dataCommand-
|
|
472
|
+
run: (e) => import("./dataCommand-k0ezbQWa.js").then((t) => t.runDataCommand(e)),
|
|
473
473
|
help: {
|
|
474
474
|
usage: "<export|import|backup|restore> <dir> [options]",
|
|
475
475
|
flags: [
|
|
@@ -524,20 +524,20 @@ var c = () => {
|
|
|
524
524
|
handlesHelp: !0,
|
|
525
525
|
summary: "Upgrade the app to the latest framework: bump every @voltro/* dependency (across ALL workspace members, install once at the workspace root), then run the codemods shipped with the target version. Flags: --to <version>, --from <version>, --codemods-only, --dry-run, --force, --exact, --help. After: run `voltro db apply`.",
|
|
526
526
|
status: "wired",
|
|
527
|
-
run: (e) => import("./updateCommand-
|
|
527
|
+
run: (e) => import("./updateCommand-CT5AvVg7.js").then((t) => t.runUpdateCommand(e))
|
|
528
528
|
},
|
|
529
529
|
{
|
|
530
530
|
name: "_apply-codemods",
|
|
531
531
|
summary: "Internal: apply shipped codemods for a framework version jump (re-exec target of `voltro update`).",
|
|
532
532
|
status: "wired",
|
|
533
533
|
hidden: !0,
|
|
534
|
-
run: (e) => import("./updateCommand-
|
|
534
|
+
run: (e) => import("./updateCommand-CT5AvVg7.js").then((t) => t.runApplyCodemods(e))
|
|
535
535
|
},
|
|
536
536
|
{
|
|
537
537
|
name: "embeddings",
|
|
538
538
|
summary: "Embeddings tooling. Subcommand: backfill <table> --text <field> --vector <field> [--model <m>] [--model-field <f>] [--batch <n>] [--dry-run] — (re)embed rows the vectorEmbedding() mixin missed.",
|
|
539
539
|
status: "wired",
|
|
540
|
-
run: (e) => import("./embeddingsCommand-
|
|
540
|
+
run: (e) => import("./embeddingsCommand-DsSxsn_b.js").then((t) => t.runEmbeddingsCommand(e)),
|
|
541
541
|
help: {
|
|
542
542
|
usage: "backfill <table> --text <field> --vector <field> [--model <m>] [--batch <n>] [--dry-run]",
|
|
543
543
|
flags: [
|