@voltro/cli 0.37.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 +92 -0
- package/dist/{apiBuild-DGsShRuF.js → apiBuild-CvacV4zA.js} +2 -2
- package/dist/apiBuild-ttSDDOGp.js +2 -0
- package/dist/bin.js +1 -1
- package/dist/bootRefusal-pgvDxlrU.js +7 -0
- package/dist/{build-CiFA-E19.js → build-_LoTC1s0.js} +30 -30
- package/dist/{checkCommand-CLPTzYqM.js → checkCommand-Pjk5sBl2.js} +2 -2
- package/dist/{checkCommand-CIPYyNyc.js → checkCommand-wibtQx-N.js} +1 -1
- package/dist/{codegenCommand-BxS3sCeJ.js → codegenCommand-C60m_LCp.js} +1 -1
- package/dist/{codemodRunner-cyqu5oxr.js → codemodRunner-CXgQ-ecJ.js} +314 -201
- package/dist/{commands-BwG9A9Vv.js → commands-DaZVi9wi.js} +20 -20
- package/dist/{dashboardCommand-C7U146xQ.js → dashboardCommand-Dxy_kmoW.js} +3 -3
- package/dist/{dataCommand-BOwd8_aJ.js → dataCommand-D6-Ha2lf.js} +1 -1
- package/dist/{dev-BV6XNYKf.js → dev-CAOoXOkc.js} +1 -1
- package/dist/{dev-bwDgSObH.js → dev-E7Eo5GHc.js} +261 -260
- package/dist/doctorCommand-Cjl8Yii8.js +2 -0
- package/dist/{doctorCommand-BXyrtN2l.js → doctorCommand-gmDyALFL.js} +10 -10
- package/dist/{dormancyCommand-BDdRRLsa.js → dormancyCommand-CE6wG8lj.js} +1 -1
- package/dist/{embeddingsCommand-CjWGcAE6.js → embeddingsCommand-C3uAuf6N.js} +1 -1
- package/dist/{envCommand-B_TeG297.js → envCommand-DzuWh8ya.js} +19 -19
- package/dist/{evolveCommand-D6N-WfA4.js → evolveCommand-DPLqcYb2.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{infoCommand-BHKTprrx.js → infoCommand-CmczGj_l.js} +1 -1
- package/dist/{runtimeTrace-WYV7qYvz.js → runtimeTrace-6jfznSzr.js} +1 -1
- package/dist/{sdkgen-TM5sSdf7.js → sdkgen-CEJZZQUA.js} +1 -1
- package/dist/serveCommand-DNRF2nDI.js +2 -0
- package/dist/{serveCommand-CyZsXL1l.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/updateCommand-B0J_T9Vs.js +2 -0
- package/dist/{updateCommand-9GHHsmDf.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-CHWSPk5z.js → webhooksCommand-BHeaF1ZJ.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/plugins/audit.md +4 -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 +49 -47
- 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-D0f6hYbH.js +0 -2
- package/dist/doctorCommand-C4L61G_L.js +0 -2
- package/dist/serveCommand-qumm7jdF.js +0 -2
- package/dist/startupRunner-DPGFchOa.js +0 -71
- package/dist/updateCommand-BN0tkl9-.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
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
|
|
@@ -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), {
|