@voltro/cli 0.52.0 → 0.53.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 +229 -0
- package/THIRD-PARTY-NOTICES.md +8311 -3318
- package/dist/{apiBuild-CSFI8QGq.js → apiBuild-CaPfoWku.js} +11 -5
- package/dist/apiBuild-DHtLXYx9.js +2 -0
- package/dist/bin.js +1 -1
- package/dist/build-D-OnvNMf.js +843 -0
- package/dist/{checkCommand-COmqc2cB.js → checkCommand-C5elt0tW.js} +6 -6
- package/dist/{checkCommand-2SbqzukH.js → checkCommand-D2ZduVlh.js} +1 -1
- package/dist/codegen-BWpt3VgF.js +2 -0
- package/dist/{codegen-VF479Cnb.js → codegen-FEk8AZHb.js} +2 -2
- package/dist/{codegenCommand-DCdG2JN-.js → codegenCommand-BOiWQ5hz.js} +4 -4
- package/dist/{codemodRunner-r7J9lIa7.js → codemodRunner-BjtB2lq6.js} +109 -11
- package/dist/{commands-Cc_nV8WI.js → commands-DyxAmhP0.js} +30 -30
- package/dist/{dashboardCommand-C-gKvwqh.js → dashboardCommand-BdKTyT13.js} +5 -5
- package/dist/{dataCommand-BgpBHnlB.js → dataCommand-Bab9X7s8.js} +2 -2
- package/dist/{dbCommand-sHedr-NJ.js → dbCommand-06O2finM.js} +277 -236
- package/dist/dbCommand-B1EXBC6f.js +2 -0
- package/dist/{dev-CRHoCEiy.js → dev-C6LGF4iY.js} +3006 -2426
- package/dist/{dev--A3nsxA3.js → dev-GjJWAYo2.js} +1 -1
- package/dist/doctorCommand-B0hX0tdz.js +2 -0
- package/dist/{doctorCommand-DtfJ3FA6.js → doctorCommand-etMkflRc.js} +101 -69
- package/dist/{dormancyCommand-Drn7o0No.js → dormancyCommand-UwZ1AZzB.js} +1 -1
- package/dist/{embeddingsCommand-Z-jO1fWN.js → embeddingsCommand-C70zWHwo.js} +1 -1
- package/dist/{envCommand-D4gCrrTZ.js → envCommand-dSyKvRkM.js} +18 -18
- package/dist/{evolveCommand-CMROeKeA.js → evolveCommand-CG0_ebO5.js} +2 -2
- package/dist/fileConventions-DASGEmj-.js +35 -0
- package/dist/{fileTaxonomy-DvDUV9wq.js → fileTaxonomy-B7uxipWS.js} +55 -55
- package/dist/fontPipeline-LxIHa1vo.js +2 -0
- package/dist/fontPipeline-Tsh8kZfA.js +152 -0
- package/dist/frameworkTableAssembly-C_7Z-rMs.js +2 -0
- package/dist/{frameworkTableAssembly-w-XnLa3q.js → frameworkTableAssembly-DKx3ba3S.js} +5 -5
- package/dist/imagePipeline-B_GVJgm6.js +2 -0
- package/dist/imagePipeline-CBZmjT4i.js +127 -0
- package/dist/index.js +1 -1
- package/dist/{infoCommand-DXM868o_.js → infoCommand-_53iOc_j.js} +1 -1
- package/dist/{inspect-CtL_xTbu.js → inspect-Bd8-9wsi.js} +1 -1
- package/dist/inspect-CuoDInfZ.js +2 -0
- package/dist/{inspectGateHint-BjnFubmH.js → inspectGateHint-4LxkNtrz.js} +1 -1
- package/dist/manifestBuild-C4-J1-m_.js +2 -0
- package/dist/{manifestBuild-CuU1VrSm.js → manifestBuild-Cqgsx2bM.js} +1 -1
- package/dist/{metaCommands-C6RFmF1r.js → metaCommands-Cn2oboG4.js} +8 -2
- package/dist/{migrate-D0F-eTlK.js → migrate-Cko9rswM.js} +2 -2
- package/dist/{pageConvention-CzUiSbtU.js → pageConvention-C938S8oC.js} +1 -1
- package/dist/{privacyCommand-DGdopOI6.js → privacyCommand-DWTQMC6R.js} +2 -2
- package/dist/{probeCommand-C9gazU0H.js → probeCommand-DkGGLknv.js} +83 -24
- package/dist/{renderModeScan-CcH2X1_D.js → renderModeScan-CUbOeOAg.js} +3 -1
- package/dist/{renderProfile-Ck32Fzxr.js → renderProfile-CskIgAfn.js} +2 -2
- package/dist/{runtimeTrace-BPQyCmC5.js → runtimeTrace-c0APJz7E.js} +1 -1
- package/dist/{sdkgen-Se88ifTd.js → sdkgen-BiQCgIEr.js} +1 -1
- package/dist/{serveCommand-DkP3OT0W.js → serveCommand-CueKQgzl.js} +869 -805
- package/dist/serveCommand-DsnrVN3U.js +2 -0
- package/dist/serveEntry.js +1 -1
- package/dist/start-BJzZLbt8.js +3 -0
- package/dist/start-ekPan8BT.js +1510 -0
- package/dist/startEntry.js +1 -1
- package/dist/{staticCommand-BwNEDlSU.js → staticCommand-xlSL-IWk.js} +1 -1
- package/dist/{test-f3amja6a.js → test-BWPQcRoB.js} +1 -1
- package/dist/updateCommand-Bqql_rsQ.js +2 -0
- package/dist/{updateCommand-BMk2e4ky.js → updateCommand-C_8I8Rzo.js} +139 -115
- package/dist/webDev-C7jWJ5dX.js +2 -0
- package/dist/{webDev-BgWL9gKV.js → webDev-oczpugbx.js} +1455 -922
- package/dist/{webhooksCommand-CoIO3jbj.js → webhooksCommand-4SVPDjKg.js} +1 -1
- package/package.json +60 -19
- package/templates/AGENTS.md +5 -3
- package/templates/agent-docs/_index.md +5 -3
- package/templates/agent-docs/_manifest.json +20 -4
- package/templates/agent-docs/ai.md +2 -2
- package/templates/agent-docs/authentication.md +1 -1
- package/templates/agent-docs/cli.md +2 -2
- package/templates/agent-docs/configuration.md +17 -0
- package/templates/agent-docs/data.md +470 -26
- package/templates/agent-docs/database/advancedqueries.md +7 -7
- package/templates/agent-docs/database/columntypes.md +2 -2
- package/templates/agent-docs/database/querying.md +1 -1
- package/templates/agent-docs/database/schema.md +1 -1
- package/templates/agent-docs/database/seedsdialects.md +1 -1
- package/templates/agent-docs/database/transactions.md +3 -3
- package/templates/agent-docs/deployment.md +8 -0
- package/templates/agent-docs/internationalization.md +2 -2
- package/templates/agent-docs/introduction.md +7 -1
- package/templates/agent-docs/local-first-mobile.md +102 -4
- package/templates/agent-docs/observability.md +2 -0
- package/templates/agent-docs/plugins/auth.md +1 -1
- package/templates/agent-docs/plugins/comments.md +142 -0
- package/templates/agent-docs/plugins/notifications.md +47 -4
- package/templates/agent-docs/plugins/presence.md +16 -3
- package/templates/agent-docs/plugins/prometheus.md +1 -1
- package/templates/agent-docs/plugins/queue.md +129 -0
- package/templates/agent-docs/plugins.md +11 -7
- package/templates/agent-docs/reference.md +16 -4
- package/templates/agent-docs/routing.md +527 -3
- package/templates/agent-docs/schema-driven-ui.md +214 -3
- package/templates/agent-docs/security.md +3 -3
- package/templates/agent-docs/whats-new.md +160 -66
- package/templates/apps/api-ai/package.json +6 -6
- 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 -9
- 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-row-history/package.json +8 -8
- package/templates/apps/api-saas/package.json +10 -10
- 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/app.config.ts +26 -2
- package/templates/apps/changelog/content/releases/{0.1.0.mdx → v0-1-0.mdx} +0 -1
- package/templates/apps/changelog/content/releases/{0.2.0.mdx → v0-2-0.mdx} +0 -1
- package/templates/apps/changelog/package.json +8 -8
- package/templates/apps/changelog/src/collections/releases.collection.ts +48 -0
- package/templates/apps/changelog/src/globals.d.ts +1 -1
- package/templates/apps/changelog/src/locales/de.ts +1 -1
- package/templates/apps/changelog/src/locales/en.ts +1 -1
- package/templates/apps/changelog/src/pages/[locale]/[slug]/page.tsx +7 -4
- package/templates/apps/changelog/src/pages/[locale]/mirrors.test.tsx +13 -41
- package/templates/apps/changelog/src/pages/[slug]/page.test.tsx +26 -51
- package/templates/apps/changelog/src/pages/[slug]/page.tsx +21 -19
- package/templates/apps/changelog/src/pages/page.test.tsx +14 -37
- package/templates/apps/changelog/src/pages/page.tsx +18 -12
- 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/content/docs/de/guides/first-page.md +4 -0
- package/templates/apps/frontend-docs/content/docs/de/intro/getting-started.md +4 -0
- package/templates/apps/frontend-docs/content/docs/en/guides/first-page.md +4 -0
- package/templates/apps/frontend-docs/content/docs/en/intro/getting-started.md +4 -0
- package/templates/apps/frontend-docs/package.json +8 -6
- package/templates/apps/frontend-docs/src/collections/docs.collection.ts +21 -0
- package/templates/apps/frontend-docs/src/locales/de.ts +0 -5
- package/templates/apps/frontend-docs/src/locales/en.ts +0 -5
- package/templates/apps/frontend-docs/src/pages/[locale]/docs/[...slug]/page.tsx +17 -9
- package/templates/apps/frontend-docs/src/pages/[locale]/mirrors.test.tsx +10 -5
- package/templates/apps/frontend-docs/src/pages/[locale]/page.tsx +8 -0
- package/templates/apps/frontend-docs/src/pages/docs/[...slug]/page.test.tsx +53 -15
- package/templates/apps/frontend-docs/src/pages/docs/[...slug]/page.tsx +27 -33
- package/templates/apps/frontend-docs/src/pages/page.test.tsx +17 -3
- package/templates/apps/frontend-docs/src/pages/page.tsx +16 -12
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +6 -6
- 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/content/posts/cms-to-ssg.md +12 -0
- package/templates/apps/frontend-static-blog/content/posts/hello-static.md +12 -0
- package/templates/apps/frontend-static-blog/content/posts/islands-not-hydration.md +14 -0
- package/templates/apps/frontend-static-blog/package.json +8 -6
- package/templates/apps/frontend-static-blog/src/collections/posts.collection.ts +27 -0
- package/templates/apps/frontend-static-blog/src/pages/[locale]/blog/[slug]/page.tsx +7 -4
- package/templates/apps/frontend-static-blog/src/pages/[locale]/mirrors.test.tsx +7 -1
- package/templates/apps/frontend-static-blog/src/pages/blog/[slug]/page.test.tsx +19 -9
- package/templates/apps/frontend-static-blog/src/pages/blog/[slug]/page.tsx +19 -21
- package/templates/apps/frontend-static-blog/src/pages/page.test.tsx +18 -5
- package/templates/apps/frontend-static-blog/src/pages/page.tsx +21 -14
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/mobile-app/package.json +4 -4
- package/dist/apiBuild-BYBpL7Pz.js +0 -2
- package/dist/build-CPgcMQug.js +0 -793
- package/dist/codegen-CctkDO-1.js +0 -2
- package/dist/dbCommand-DNb6yeOG.js +0 -2
- package/dist/doctorCommand-CqoWA2p5.js +0 -2
- package/dist/fileConventions-DOqD3lPS.js +0 -34
- package/dist/frameworkTableAssembly-C6ETawPR.js +0 -2
- package/dist/inspect-CuGDYES0.js +0 -2
- package/dist/manifestBuild-CPjhvM62.js +0 -2
- package/dist/serveCommand-DLc-BznW.js +0 -2
- package/dist/start-DfL3fOiN.js +0 -3
- package/dist/start-jw89Xbqy.js +0 -1339
- package/dist/updateCommand-5gFVfK5q.js +0 -2
- package/dist/webDev-CZbTsDcH.js +0 -2
- package/templates/apps/changelog/scripts/generate-rss.mjs +0 -38
- package/templates/apps/changelog/src/lib/releases.ts +0 -21
- package/templates/apps/frontend-static-blog/src/content/posts.ts +0 -64
package/dist/startEntry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./cliRuntime-Dh7UDinH.js";
|
|
2
|
-
import { t } from "./renderProfile-
|
|
2
|
+
import { t } from "./renderProfile-CskIgAfn.js";
|
|
3
3
|
import { t as n } from "./commandRunner-BLAEFLjp.js";
|
|
4
4
|
import { join as r, relative as i, resolve as a } from "node:path";
|
|
5
5
|
import { Effect as o } from "effect";
|
|
@@ -79,7 +79,7 @@ var d = l({ scope: "voltro:test" }), f = (e) => {
|
|
|
79
79
|
}, C = async (e) => {
|
|
80
80
|
let t = m(e);
|
|
81
81
|
if (!o(t.root)) return console.error(`voltro test: no such directory: ${t.root}`), 1;
|
|
82
|
-
let { checkRpcGroupFreshness: n } = await import("./codegen-
|
|
82
|
+
let { checkRpcGroupFreshness: n } = await import("./codegen-BWpt3VgF.js"), r = await n(t.root);
|
|
83
83
|
if (r.kind === "stale") return console.error(`voltro test: ${r.file} is stale — ${r.reason}.`), console.error(" The tests would run against the previously generated procedure group, pass, and prove nothing about the descriptors you just edited.\n Run `voltro codegen` (or boot `voltro dev` once) and try again."), 1;
|
|
84
84
|
d.info("running vitest", {
|
|
85
85
|
root: t.root,
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./codemodRunner-
|
|
1
|
+
import { n as e, r as t, t as n } from "./codemodRunner-BjtB2lq6.js";
|
|
2
2
|
import { basename as r, dirname as i, join as a, relative as o, resolve as s } from "node:path";
|
|
3
3
|
import { existsSync as c, readFileSync as l, readdirSync as u, statSync as d, writeFileSync as f } from "node:fs";
|
|
4
4
|
import { totalmem as p } from "node:os";
|
|
5
5
|
import { execFileSync as m, spawnSync as h } from "node:child_process";
|
|
6
|
-
//#region src/
|
|
7
|
-
var g =
|
|
6
|
+
//#region src/codemods/packageRenames.ts
|
|
7
|
+
var g = [{
|
|
8
|
+
at: "0.52.0",
|
|
9
|
+
from: "@voltro/plugin-versioning",
|
|
10
|
+
to: "@voltro/plugin-row-history"
|
|
11
|
+
}], _ = (e) => {
|
|
8
12
|
let t = /^\s*(?:\^|~|>=|=|v)?\s*(\d+)\.(\d+)\.(\d+)/.exec(e);
|
|
9
13
|
if (t && !/\|\||\s<|\s-\s/.test(e)) return [
|
|
10
14
|
Number(t[1]),
|
|
11
15
|
Number(t[2]),
|
|
12
16
|
Number(t[3])
|
|
13
17
|
];
|
|
14
|
-
},
|
|
18
|
+
}, v = (e, t) => e[0] === t[0] ? e[1] === t[1] ? e[2] < t[2] : e[1] < t[1] : e[0] < t[0], y = (e) => e.flatMap(({ name: e, peerDependencies: t }) => Object.entries(t ?? {}).filter(([e]) => !e.startsWith("@voltro/")).map(([t, n]) => ({
|
|
15
19
|
peer: t,
|
|
16
20
|
range: n,
|
|
17
21
|
requiredBy: e
|
|
18
|
-
}))),
|
|
22
|
+
}))), b = (e, t) => {
|
|
19
23
|
let n = /* @__PURE__ */ new Map();
|
|
20
24
|
for (let e of t) {
|
|
21
25
|
let t = n.get(e.peer);
|
|
@@ -25,7 +29,7 @@ var g = (e) => {
|
|
|
25
29
|
for (let [e, t] of n) {
|
|
26
30
|
let n = t.map((e) => ({
|
|
27
31
|
r: e,
|
|
28
|
-
floor:
|
|
32
|
+
floor: _(e.range)
|
|
29
33
|
})).filter((e) => e.floor !== void 0);
|
|
30
34
|
if (n.length !== 0) {
|
|
31
35
|
if (new Set(n.map((e) => e.r.range)).size > 1) {
|
|
@@ -44,8 +48,8 @@ var g = (e) => {
|
|
|
44
48
|
if (r) for (let [n, o] of i) {
|
|
45
49
|
let i = r[n];
|
|
46
50
|
if (i === void 0) continue;
|
|
47
|
-
let s =
|
|
48
|
-
!s || !c ||
|
|
51
|
+
let s = _(i), c = _(o.range);
|
|
52
|
+
!s || !c || v(s, c) && a.push({
|
|
49
53
|
path: t,
|
|
50
54
|
section: e,
|
|
51
55
|
peer: n,
|
|
@@ -58,21 +62,21 @@ var g = (e) => {
|
|
|
58
62
|
alignments: a,
|
|
59
63
|
conflicts: r
|
|
60
64
|
};
|
|
61
|
-
},
|
|
65
|
+
}, x = (e, t) => {
|
|
62
66
|
for (let n of t.alignments) {
|
|
63
67
|
let t = e.find((e) => e.path === n.path);
|
|
64
68
|
if (!t) continue;
|
|
65
69
|
let r = t.pkg[n.section];
|
|
66
70
|
r && n.peer in r && (r[n.peer] = n.to);
|
|
67
71
|
}
|
|
68
|
-
},
|
|
72
|
+
}, S = (e, t, n) => {
|
|
69
73
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
70
74
|
for (let a of e) {
|
|
71
75
|
if (t.has(a.peer) || r.has(a.peer)) continue;
|
|
72
76
|
let e = n(a.peer);
|
|
73
77
|
if (e === void 0) continue;
|
|
74
|
-
let o =
|
|
75
|
-
!o || !s || !
|
|
78
|
+
let o = _(a.range), s = _(e);
|
|
79
|
+
!o || !s || !v(s, o) || (r.add(a.peer), i.push({
|
|
76
80
|
peer: a.peer,
|
|
77
81
|
required: a.range,
|
|
78
82
|
installed: e,
|
|
@@ -80,18 +84,18 @@ var g = (e) => {
|
|
|
80
84
|
}));
|
|
81
85
|
}
|
|
82
86
|
return i;
|
|
83
|
-
},
|
|
87
|
+
}, C = /^(workspace:|catalog:|link:|file:|npm:|portal:)/, w = /* @__PURE__ */ new Set([
|
|
84
88
|
"pnpm",
|
|
85
89
|
"npm",
|
|
86
90
|
"yarn",
|
|
87
91
|
"bun"
|
|
88
|
-
]),
|
|
92
|
+
]), T = [
|
|
89
93
|
["pnpm-lock.yaml", "pnpm"],
|
|
90
94
|
["yarn.lock", "yarn"],
|
|
91
95
|
["bun.lock", "bun"],
|
|
92
96
|
["bun.lockb", "bun"],
|
|
93
97
|
["package-lock.json", "npm"]
|
|
94
|
-
],
|
|
98
|
+
], E = (e) => {
|
|
95
99
|
let t = [], n = s(e);
|
|
96
100
|
for (; t.push(n), !c(a(n, ".git"));) {
|
|
97
101
|
let e = i(n);
|
|
@@ -99,21 +103,21 @@ var g = (e) => {
|
|
|
99
103
|
n = e;
|
|
100
104
|
}
|
|
101
105
|
return t;
|
|
102
|
-
},
|
|
103
|
-
for (let t of
|
|
106
|
+
}, D = (e) => {
|
|
107
|
+
for (let t of E(e)) {
|
|
104
108
|
let e = a(t, "package.json");
|
|
105
109
|
if (c(e)) try {
|
|
106
110
|
let t = JSON.parse(l(e, "utf8")).packageManager;
|
|
107
111
|
if (typeof t == "string") {
|
|
108
112
|
let e = t.split("@")[0]?.trim();
|
|
109
|
-
if (e &&
|
|
113
|
+
if (e && w.has(e)) return e;
|
|
110
114
|
}
|
|
111
115
|
} catch {}
|
|
112
|
-
for (let [e, n] of
|
|
116
|
+
for (let [e, n] of T) if (c(a(t, e))) return n;
|
|
113
117
|
}
|
|
114
118
|
return "npm";
|
|
115
|
-
},
|
|
116
|
-
for (let t of
|
|
119
|
+
}, O = 4, k = (e) => {
|
|
120
|
+
for (let t of E(e)) {
|
|
117
121
|
if (c(a(t, "pnpm-workspace.yaml")) || c(a(t, "pnpm-workspace.yml"))) return t;
|
|
118
122
|
let e = a(t, "package.json");
|
|
119
123
|
if (c(e)) try {
|
|
@@ -121,10 +125,10 @@ var g = (e) => {
|
|
|
121
125
|
if (Array.isArray(n) ? n.length > 0 : typeof n == "object" && n) return t;
|
|
122
126
|
} catch {}
|
|
123
127
|
}
|
|
124
|
-
},
|
|
128
|
+
}, A = (e) => {
|
|
125
129
|
let n = [], r = (e, i) => {
|
|
126
130
|
let o = a(e, "package.json");
|
|
127
|
-
if (c(o) && n.push(o), i >=
|
|
131
|
+
if (c(o) && n.push(o), i >= O) return;
|
|
128
132
|
let s;
|
|
129
133
|
try {
|
|
130
134
|
s = u(e);
|
|
@@ -143,7 +147,7 @@ var g = (e) => {
|
|
|
143
147
|
}
|
|
144
148
|
};
|
|
145
149
|
return r(s(e), 0), n;
|
|
146
|
-
},
|
|
150
|
+
}, ee = (e) => {
|
|
147
151
|
try {
|
|
148
152
|
return m("git", ["status", "--porcelain"], {
|
|
149
153
|
cwd: e,
|
|
@@ -226,20 +230,33 @@ var g = (e) => {
|
|
|
226
230
|
]]];
|
|
227
231
|
}, I = (e) => {
|
|
228
232
|
try {
|
|
229
|
-
let t = JSON.parse(e)?.codemods;
|
|
230
|
-
if (!Array.isArray(
|
|
231
|
-
let
|
|
232
|
-
for (let e of
|
|
233
|
+
let t = JSON.parse(e), n = t?.codemods;
|
|
234
|
+
if (!Array.isArray(n)) return;
|
|
235
|
+
let r = [];
|
|
236
|
+
for (let e of n) {
|
|
233
237
|
let t = e;
|
|
234
238
|
if (typeof t.version != "string" || typeof t.id != "string") return;
|
|
235
|
-
|
|
239
|
+
r.push({
|
|
236
240
|
version: t.version,
|
|
237
241
|
id: t.id,
|
|
238
242
|
title: typeof t.title == "string" ? t.title : t.id,
|
|
239
243
|
kind: t.kind === "transform" ? "transform" : "manual"
|
|
240
244
|
});
|
|
241
245
|
}
|
|
242
|
-
|
|
246
|
+
let i = t?.renames, a = [];
|
|
247
|
+
if (Array.isArray(i)) for (let e of i) {
|
|
248
|
+
let t = e;
|
|
249
|
+
if (typeof t.at != "string" || typeof t.from != "string" || typeof t.to != "string") return;
|
|
250
|
+
a.push({
|
|
251
|
+
at: t.at,
|
|
252
|
+
from: t.from,
|
|
253
|
+
to: t.to
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
codemods: r,
|
|
258
|
+
renames: a
|
|
259
|
+
};
|
|
243
260
|
} catch {
|
|
244
261
|
return;
|
|
245
262
|
}
|
|
@@ -256,16 +273,16 @@ var g = (e) => {
|
|
|
256
273
|
}));
|
|
257
274
|
if (e !== void 0) return e;
|
|
258
275
|
} catch {}
|
|
259
|
-
}, R = (e, t, r) => e.filter((e) => n(t, e.version) < 0 && n(e.version, r) <= 0), z = (e, t = "npm") => {
|
|
276
|
+
}, R = (e, t, r) => e.filter((e) => n(t, e.version) < 0 && n(e.version, r) <= 0), z = (e, t, r) => e.filter((e) => n(t, e.at) < 0 && n(e.at, r) <= 0), B = (e, t = "npm") => {
|
|
260
277
|
for (let [n, r] of P(e, t, t === "yarn" ? N() : 1)) {
|
|
261
278
|
let e = M(n, r);
|
|
262
279
|
if (e) return e;
|
|
263
280
|
}
|
|
264
|
-
},
|
|
281
|
+
}, V = (e) => JSON.parse(l(e, "utf8")), H = [
|
|
265
282
|
"app.config.ts",
|
|
266
283
|
"app.config.tsx",
|
|
267
284
|
"app.config.js"
|
|
268
|
-
],
|
|
285
|
+
], U = (e) => {
|
|
269
286
|
let t = s(e);
|
|
270
287
|
for (;;) {
|
|
271
288
|
let e = i(t);
|
|
@@ -273,15 +290,15 @@ var g = (e) => {
|
|
|
273
290
|
t = e;
|
|
274
291
|
let n = a(t, "package.json");
|
|
275
292
|
if (c(n)) try {
|
|
276
|
-
if (
|
|
293
|
+
if (G(V(n)).length > 0) return t;
|
|
277
294
|
} catch {}
|
|
278
295
|
}
|
|
279
|
-
},
|
|
296
|
+
}, W = (e) => {
|
|
280
297
|
let t = a(e, "node_modules", "@voltro", "cli", "package.json");
|
|
281
298
|
if (!c(t)) return;
|
|
282
|
-
let n =
|
|
299
|
+
let n = V(t).version;
|
|
283
300
|
return typeof n == "string" ? n : void 0;
|
|
284
|
-
},
|
|
301
|
+
}, G = (e) => {
|
|
285
302
|
let t = [];
|
|
286
303
|
for (let n of ["dependencies", "devDependencies"]) {
|
|
287
304
|
let r = e[n];
|
|
@@ -292,26 +309,26 @@ var g = (e) => {
|
|
|
292
309
|
});
|
|
293
310
|
}
|
|
294
311
|
return t;
|
|
295
|
-
},
|
|
312
|
+
}, te = (e, t, n, i) => {
|
|
296
313
|
let s = a(e, "node_modules", "@voltro");
|
|
297
314
|
if (!c(s)) return 0;
|
|
298
315
|
let l = [];
|
|
299
316
|
for (let e of u(s)) {
|
|
300
317
|
let t = a(s, e, "package.json");
|
|
301
318
|
if (c(t)) try {
|
|
302
|
-
let n =
|
|
319
|
+
let n = V(t);
|
|
303
320
|
l.push({
|
|
304
321
|
name: n.name ?? `@voltro/${e}`,
|
|
305
322
|
peerDependencies: n.peerDependencies
|
|
306
323
|
});
|
|
307
324
|
} catch {}
|
|
308
325
|
}
|
|
309
|
-
let d =
|
|
326
|
+
let d = y(l), p = b(t, d), m = /* @__PURE__ */ new Set();
|
|
310
327
|
for (let { pkg: e } of t) for (let t of ["dependencies", "devDependencies"]) for (let n of Object.keys(e[t] ?? {})) m.add(n);
|
|
311
|
-
let h =
|
|
328
|
+
let h = S(d, m, (t) => {
|
|
312
329
|
let n = a(e, "node_modules", ...t.split("/"), "package.json");
|
|
313
330
|
if (c(n)) try {
|
|
314
|
-
return
|
|
331
|
+
return V(n).version;
|
|
315
332
|
} catch {
|
|
316
333
|
return;
|
|
317
334
|
}
|
|
@@ -329,42 +346,51 @@ var g = (e) => {
|
|
|
329
346
|
if (p.alignments.length === 0) return 0;
|
|
330
347
|
console.log("\nAligning peer dependencies the framework requires:");
|
|
331
348
|
for (let t of p.alignments) console.log(` ${t.peer} ${t.from} → ${t.to} (${o(e, t.path) || r(t.path)})`);
|
|
332
|
-
|
|
349
|
+
x(t, p);
|
|
333
350
|
let g = new Set(p.alignments.map((e) => e.path));
|
|
334
351
|
for (let e of t) g.has(e.path) && f(e.path, JSON.stringify(e.pkg, null, 2) + "\n");
|
|
335
352
|
console.log(`\nRe-installing with ${n} so the aligned ranges resolve…`);
|
|
336
353
|
let _ = i(n, e);
|
|
337
354
|
return _ !== 0 && (console.error(`\nvoltro update: ${n} install failed after aligning peer dependencies.`), console.error(" The package.json changes above ARE written; re-run the install yourself.")), _;
|
|
338
|
-
}, K = (e, t, n) =>
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
355
|
+
}, K = (e, t, n, r = []) => G(e).map(({ name: e, spec: i }) => {
|
|
356
|
+
if (C.test(i)) return {
|
|
357
|
+
name: e,
|
|
358
|
+
from: i,
|
|
359
|
+
to: i,
|
|
360
|
+
skipped: "non-registry spec"
|
|
361
|
+
};
|
|
362
|
+
let a = n ? "" : /^[\^~]/.exec(i)?.[0] ?? "", o = r.find((t) => t.from === e);
|
|
363
|
+
return o === void 0 ? {
|
|
364
|
+
name: e,
|
|
365
|
+
from: i,
|
|
366
|
+
to: `${a}${t}`
|
|
367
|
+
} : {
|
|
368
|
+
name: e,
|
|
369
|
+
from: i,
|
|
370
|
+
to: `${a}${t}`,
|
|
371
|
+
renamedTo: o.to
|
|
372
|
+
};
|
|
373
|
+
}), ne = (e, t) => {
|
|
348
374
|
for (let n of t) if (!n.skipped) for (let t of ["dependencies", "devDependencies"]) {
|
|
349
375
|
let r = e[t];
|
|
350
|
-
r && n.name in r && (r[n.name] = n.to);
|
|
376
|
+
r && n.name in r && (n.renamedTo === void 0 ? r[n.name] = n.to : (delete r[n.name], r[n.renamedTo] = n.to));
|
|
351
377
|
}
|
|
352
|
-
}, q = (e, t, n) => e.map(({ path: e, pkg:
|
|
378
|
+
}, q = (e, t, n, r = []) => e.map(({ path: e, pkg: i }) => ({
|
|
353
379
|
path: e,
|
|
354
|
-
entries: K(
|
|
380
|
+
entries: K(i, t, n, r)
|
|
355
381
|
})).filter((e) => e.entries.length > 0), J = (e, t) => {
|
|
356
382
|
let n = new Map(e.map((e) => [e.path, e])), r = [];
|
|
357
383
|
for (let e of t) {
|
|
358
384
|
let t = n.get(e.path);
|
|
359
|
-
t && (
|
|
385
|
+
t && (ne(t.pkg, e.entries), r.push(t));
|
|
360
386
|
}
|
|
361
387
|
return r;
|
|
362
|
-
},
|
|
388
|
+
}, re = /* @__PURE__ */ new Set([
|
|
363
389
|
"--to",
|
|
364
390
|
"--from",
|
|
365
391
|
"--root",
|
|
366
392
|
"--only"
|
|
367
|
-
]),
|
|
393
|
+
]), ie = /* @__PURE__ */ new Set([
|
|
368
394
|
"--dry-run",
|
|
369
395
|
"--force",
|
|
370
396
|
"--exact",
|
|
@@ -373,7 +399,7 @@ var g = (e) => {
|
|
|
373
399
|
"--no-install",
|
|
374
400
|
"--help",
|
|
375
401
|
"-h"
|
|
376
|
-
]),
|
|
402
|
+
]), ae = (e) => {
|
|
377
403
|
let t, n, r = process.cwd(), i = [], a = [], o = [], c = (e) => {
|
|
378
404
|
for (let t of e.split(",")) t.length > 0 && a.push(t);
|
|
379
405
|
};
|
|
@@ -381,13 +407,13 @@ var g = (e) => {
|
|
|
381
407
|
let l = e[a];
|
|
382
408
|
if (l === void 0) continue;
|
|
383
409
|
let u = l.indexOf("="), d = u > 0 ? l.slice(0, u) : l, f = u > 0 ? l.slice(u + 1) : void 0;
|
|
384
|
-
if (
|
|
410
|
+
if (re.has(d)) {
|
|
385
411
|
let i = f ?? e[++a] ?? "";
|
|
386
412
|
d === "--to" ? t = i : d === "--from" ? n = i : d === "--root" ? r = s(i === "" ? "." : i) : c(i);
|
|
387
413
|
continue;
|
|
388
414
|
}
|
|
389
415
|
if (d.startsWith("-")) {
|
|
390
|
-
|
|
416
|
+
ie.has(d) || o.push(d);
|
|
391
417
|
continue;
|
|
392
418
|
}
|
|
393
419
|
i.push(l);
|
|
@@ -404,24 +430,24 @@ var g = (e) => {
|
|
|
404
430
|
...t === void 0 ? {} : { to: t },
|
|
405
431
|
...n === void 0 ? {} : { from: n }
|
|
406
432
|
};
|
|
407
|
-
}, Y = "voltro update [app] [flags]\n\nUpgrade an app to a newer framework release: bump every @voltro/* dependency,\ninstall, and run the codemods shipped with the target version.\n\nIn a workspace (pnpm-workspace.yaml, or a package.json \"workspaces\" field),\nEVERY member package.json that declares @voltro/* is bumped in lockstep and the\ninstall runs once at the workspace root — so api / web / shared packages never\nend up on different framework versions.\n\nFlags:\n --to <version> Target version (default: the latest published version).\n --from <version> Source version — overrides the detected installed version.\n Use it after a hand-edited bump so the codemods for the\n delta you actually crossed still run.\n --root <dir> App directory to update (default: the current directory).\n A positional [app] does the same.\n --dry-run Print the plan — every package.json that would be bumped,\n plus the codemods the target version puts IN RANGE — and\n write nothing. Installs nothing. Allowed on a dirty tree,\n which is the point: it is how you decide whether to stash.\n --force Proceed on a dirty working tree, and re-run even when the\n installed version already equals the target.\n --exact Pin exact versions (drop the ^ / ~ range prefix).\n --no-install Write the version bump, then stop — do not run the package\n manager. For a containerised / offline install: run your own\n install, then: voltro update --codemods-only --from <old>\n\n --only <id> Run only the named codemod(s) — repeatable, or comma-\n separated. Ids are what --dry-run prints. Combine with\n --codemods-only to take the load-bearing half first.\n\n --codemods-only Run ONLY the codemods for [from, to] against the installed\n tree — no version bump, no install. The recovery path after\n a manual bump, or after a failed install. Alias:\n --run-codemods.\n\nMemory: the codemod pass parses source, so it wants heap in proportion to the\nfiles it touches. It sizes the child's --max-old-space-size from THIS machine —\nnode's own default caps near 4 GB however much RAM is installed — so you should\nnot need to set anything. If it still runs out it says so and names the knob;\nNODE_OPTIONS=--max-old-space-size=<MB> overrides, and --only / --root narrow the\npass instead of enlarging it.\n -h, --help Print this help.\n\nExamples:\n voltro update\n voltro update --to 0.6.0 --dry-run\n voltro update --codemods-only --from 0.5.0 --to 0.6.0\n\nAfter updating: run `voltro db apply` (NOT db migrate) to reconcile changed\nframework tables, then your typecheck.",
|
|
408
|
-
let n = t.latestVersion ??
|
|
433
|
+
}, Y = "voltro update [app] [flags]\n\nUpgrade an app to a newer framework release: bump every @voltro/* dependency,\ninstall, and run the codemods shipped with the target version.\n\nIn a workspace (pnpm-workspace.yaml, or a package.json \"workspaces\" field),\nEVERY member package.json that declares @voltro/* is bumped in lockstep and the\ninstall runs once at the workspace root — so api / web / shared packages never\nend up on different framework versions.\n\nFlags:\n --to <version> Target version (default: the latest published version).\n --from <version> Source version — overrides the detected installed version.\n Use it after a hand-edited bump so the codemods for the\n delta you actually crossed still run.\n --root <dir> App directory to update (default: the current directory).\n A positional [app] does the same.\n --dry-run Print the plan — every package.json that would be bumped,\n plus the codemods the target version puts IN RANGE — and\n write nothing. Installs nothing. Allowed on a dirty tree,\n which is the point: it is how you decide whether to stash.\n --force Proceed on a dirty working tree, and re-run even when the\n installed version already equals the target.\n --exact Pin exact versions (drop the ^ / ~ range prefix).\n --no-install Write the version bump, then stop — do not run the package\n manager. For a containerised / offline install: run your own\n install, then: voltro update --codemods-only --from <old>\n\n --only <id> Run only the named codemod(s) — repeatable, or comma-\n separated. Ids are what --dry-run prints. Combine with\n --codemods-only to take the load-bearing half first.\n\n --codemods-only Run ONLY the codemods for [from, to] against the installed\n tree — no version bump, no install. The recovery path after\n a manual bump, or after a failed install. Alias:\n --run-codemods.\n\nMemory: the codemod pass parses source, so it wants heap in proportion to the\nfiles it touches. It sizes the child's --max-old-space-size from THIS machine —\nnode's own default caps near 4 GB however much RAM is installed — so you should\nnot need to set anything. If it still runs out it says so and names the knob;\nNODE_OPTIONS=--max-old-space-size=<MB> overrides, and --only / --root narrow the\npass instead of enlarging it.\n -h, --help Print this help.\n\nExamples:\n voltro update\n voltro update --to 0.6.0 --dry-run\n voltro update --codemods-only --from 0.5.0 --to 0.6.0\n\nAfter updating: run `voltro db apply` (NOT db migrate) to reconcile changed\nframework tables, then your typecheck.", oe = (e) => e.includes("--help") || e.includes("-h"), se = async (e, t = {}) => {
|
|
434
|
+
let n = t.latestVersion ?? B, i = t.isGitClean ?? ee, s = t.install ?? ((e, t) => h(e, ["install"], {
|
|
409
435
|
cwd: t,
|
|
410
436
|
stdio: "inherit"
|
|
411
437
|
}).status ?? 1);
|
|
412
|
-
if (
|
|
413
|
-
let l =
|
|
438
|
+
if (oe(e)) return console.log(Y), 0;
|
|
439
|
+
let l = ae(e);
|
|
414
440
|
if (l.unknownFlags.length > 0) return console.error(`voltro update: unknown flag ${l.unknownFlags.join(", ")}`), console.error(" Run `voltro update --help` for the flags this command accepts."), 1;
|
|
415
441
|
let u = a(l.root, "package.json");
|
|
416
442
|
if (!c(u)) {
|
|
417
|
-
let e =
|
|
443
|
+
let e = H.find((e) => c(a(l.root, e))), t = e === void 0 ? void 0 : U(l.root);
|
|
418
444
|
return e !== void 0 && t !== void 0 ? (console.error(`voltro update: ${e} is here, but this directory has no package.json.`), console.error(" That is a supported layout — one root manifest, apps carrying only their"), console.error(" app.config.ts. The bump belongs to the manifest that declares @voltro/*, and"), console.error(" the codemods run across every app beneath it:"), console.error(` voltro update --root ${t}`), 1) : (console.error(`voltro update: no package.json at ${l.root}`), 1);
|
|
419
445
|
}
|
|
420
|
-
let d =
|
|
446
|
+
let d = V(u), p = G(d);
|
|
421
447
|
if (p.length === 0) {
|
|
422
|
-
let e =
|
|
448
|
+
let e = H.find((e) => c(a(l.root, e)));
|
|
423
449
|
if (e !== void 0) {
|
|
424
|
-
let t =
|
|
450
|
+
let t = U(l.root);
|
|
425
451
|
return console.error(`voltro update: ${e} is here, but ${r(u)} declares no @voltro/* dependency.`), console.error(" This IS a Voltro app — its dependencies are just declared further up, which"), console.error(" is a supported layout (one root manifest, apps carrying only app.config.ts)."), console.error(" Nothing can be bumped HERE: a bump rewrites dependency ranges, and this file"), console.error(" has none."), t === void 0 ? (console.error(" No ancestor package.json declares @voltro/* either. Add the dependencies to"), console.error(" the manifest that owns this workspace, then run update from there.")) : (console.error(" Run it where they are declared — that manifest covers every app beneath it:"), console.error(` voltro update --root ${t}`)), 1;
|
|
426
452
|
}
|
|
427
453
|
return console.error("voltro update: no @voltro/* dependencies here — not a Voltro app."), 1;
|
|
@@ -430,78 +456,76 @@ var g = (e) => {
|
|
|
430
456
|
if (l.codemodsOnly) console.warn("voltro update: working tree is not clean — the codemod diff will be mixed in"), console.warn(" with your existing changes. Review with `git diff` before committing; the"), console.warn(" codemods rewrite source and nothing here separates their edits from yours."), console.warn(" (Use --dry-run first, or --only <id> to take one codemod at a time.)");
|
|
431
457
|
else return console.error("voltro update: working tree is not clean. Commit/stash first so you can review the"), console.error(" codemod diff — or re-run with --force (not recommended) or --dry-run (preview only)."), console.error(" Only running the codemods? `--codemods-only` proceeds on a dirty tree with a warning —"), console.error(" it rewrites source without bumping or installing."), 1;
|
|
432
458
|
}
|
|
433
|
-
let m =
|
|
434
|
-
if (!
|
|
435
|
-
let
|
|
436
|
-
if (!
|
|
437
|
-
if (l.codemodsOnly) return
|
|
459
|
+
let m = k(l.root), _ = m ?? l.root, v = () => W(l.root) ?? (m ? W(m) : void 0), y = l.from ?? v() ?? /^\d+\.\d+\.\d+$/.exec(p.find((e) => e.name === "@voltro/cli")?.spec.replace(/^[\^~]/, "") ?? "")?.[0];
|
|
460
|
+
if (!y) return console.error("voltro update: could not determine the source framework version."), console.error(" Run your package manager install first, or pass --from <version>."), 1;
|
|
461
|
+
let b = D(l.root), x = l.to ?? (l.codemodsOnly ? v() : void 0) ?? n("@voltro/cli", b);
|
|
462
|
+
if (!x) return console.error(`voltro update: could not resolve the latest @voltro/cli version via ${b}.`), console.error(" Pin an explicit target with --to <version>."), 1;
|
|
463
|
+
if (l.codemodsOnly) return y === x ? (console.log(`voltro update: --codemods-only with from === to (${x}) — no delta, nothing to apply.`), console.log(" Pass --from <earlier-version> to re-run the codemods you skipped."), 0) : (console.log(`voltro update: re-applying codemods ${y} → ${x} (no version bump)…`), $([
|
|
438
464
|
"--root",
|
|
439
465
|
l.root,
|
|
440
466
|
"--from",
|
|
441
|
-
|
|
467
|
+
y,
|
|
442
468
|
"--to",
|
|
443
|
-
|
|
469
|
+
x,
|
|
444
470
|
...l.dryRun ? ["--dry-run"] : [],
|
|
445
471
|
...l.only.length > 0 ? ["--only", l.only.join(",")] : []
|
|
446
472
|
]));
|
|
447
|
-
if (
|
|
448
|
-
let
|
|
449
|
-
for (let e of
|
|
450
|
-
if (
|
|
451
|
-
|
|
473
|
+
if (y === x && !l.force) return console.log(`voltro update: already on ${x} — nothing to do.`), console.log(" (Bumped @voltro/* by hand? Re-run the skipped codemods with"), console.log(" `voltro update --codemods-only --from <earlier-version>`.)"), 0;
|
|
474
|
+
let S = [u, ...m ? A(m) : []], C = [], w = /* @__PURE__ */ new Set();
|
|
475
|
+
for (let e of S) if (!w.has(e)) {
|
|
476
|
+
if (w.add(e), e === u) {
|
|
477
|
+
C.push({
|
|
452
478
|
path: e,
|
|
453
479
|
pkg: d
|
|
454
480
|
});
|
|
455
481
|
continue;
|
|
456
482
|
}
|
|
457
483
|
try {
|
|
458
|
-
|
|
484
|
+
C.push({
|
|
459
485
|
path: e,
|
|
460
|
-
pkg:
|
|
486
|
+
pkg: V(e)
|
|
461
487
|
});
|
|
462
488
|
} catch {}
|
|
463
489
|
}
|
|
464
|
-
let
|
|
465
|
-
console.log(`voltro update: ${
|
|
466
|
-
let
|
|
467
|
-
m && console.log(` workspace: ${m} (${
|
|
468
|
-
for (let e of
|
|
469
|
-
let t =
|
|
470
|
-
|
|
471
|
-
for (let n of e.entries.filter((e) => !e.skipped)) console.log(`${t}${n.name}: ${n.from} → ${n.to}`);
|
|
490
|
+
let T = L(x, b), E = z(T?.renames ?? g, y, x), O = q(C, x, l.exact, E);
|
|
491
|
+
console.log(`voltro update: ${y} → ${x}`);
|
|
492
|
+
let j = O.length > 1;
|
|
493
|
+
m && console.log(` workspace: ${m} (${O.length} package.json with @voltro/* deps)`);
|
|
494
|
+
for (let e of O) {
|
|
495
|
+
let t = j ? " " : " ";
|
|
496
|
+
j && console.log(` ${o(_, e.path) || e.path}`);
|
|
497
|
+
for (let n of e.entries.filter((e) => !e.skipped)) console.log(n.renamedTo === void 0 ? `${t}${n.name}: ${n.from} → ${n.to}` : `${t}${n.name} → ${n.renamedTo}: ${n.from} → ${n.to} (renamed in this release)`);
|
|
472
498
|
for (let n of e.entries.filter((e) => e.skipped)) console.log(`${t}${n.name}: kept (${n.skipped})`);
|
|
473
499
|
}
|
|
474
|
-
console.log(` package manager: ${
|
|
475
|
-
let D = L(b, y);
|
|
476
|
-
if (D === void 0) console.log(` codemods: applied from ${b} after install`), console.log(` (could not preview — ${b} publishes no codemod manifest, or the registry`), console.log(" could not be reached. This is NOT the same as \"no codemods\".)");
|
|
500
|
+
if (console.log(` package manager: ${b}`), console.log(` install runs in: ${_}`), T === void 0) console.log(` codemods: applied from ${x} after install`), console.log(` (could not preview — ${x} publishes no codemod manifest, or the registry`), console.log(" could not be reached. This is NOT the same as \"no codemods\".)");
|
|
477
501
|
else {
|
|
478
|
-
let e = R(
|
|
479
|
-
if (e.length === 0) console.log(` codemods: none in range for ${
|
|
502
|
+
let e = R(T.codemods, y, x);
|
|
503
|
+
if (e.length === 0) console.log(` codemods: none in range for ${y} → ${x}`);
|
|
480
504
|
else {
|
|
481
|
-
console.log(` codemods: ${e.length} in range for ${
|
|
505
|
+
console.log(` codemods: ${e.length} in range for ${y} → ${x}`);
|
|
482
506
|
for (let t of e) console.log(` ${t.kind === "transform" ? "✎" : "☰"} ${t.id} — ${t.title}`);
|
|
483
507
|
console.log(" ✎ rewrites source · ☰ prints written steps"), console.log(" In RANGE, not necessarily applicable: each one still tests your source"), console.log(" before doing anything. This is the upper bound on what a run can touch.");
|
|
484
508
|
}
|
|
485
509
|
}
|
|
486
510
|
if (l.dryRun) return console.log("\n(dry-run — nothing written, nothing installed.)"), 0;
|
|
487
|
-
for (let e of J(
|
|
488
|
-
if (l.noInstall) return console.log(`\nvoltro update: bumped ${
|
|
489
|
-
console.log(`\nInstalling with ${
|
|
490
|
-
let
|
|
491
|
-
if (
|
|
492
|
-
let
|
|
493
|
-
if (
|
|
494
|
-
let
|
|
495
|
-
if (
|
|
511
|
+
for (let e of J(C, O)) f(e.path, JSON.stringify(e.pkg, null, 2) + "\n");
|
|
512
|
+
if (l.noInstall) return console.log(`\nvoltro update: bumped ${O.length} package.json to ${x}. Install NOT run (--no-install).`), console.log(" The tree is half-upgraded until you finish both steps:"), console.log(" 1. install however this project installs (container, CI image, offline mirror)"), console.log(` 2. voltro update --codemods-only --from ${y} --to ${x}`), console.log(" Step 2 is not optional: the codemods for this jump ship INSIDE the target"), console.log(" version, so nothing could have run them before the install put them on disk."), 0;
|
|
513
|
+
console.log(`\nInstalling with ${b} in ${_}…`);
|
|
514
|
+
let M = s(b, _);
|
|
515
|
+
if (M !== 0) return console.error(`\nvoltro update: ${b} install failed in ${_}.`), console.error(` • package.json was bumped to ${x} (${O.length} file${O.length === 1 ? "" : "s"}).`), console.error(" • CODEMODS WERE NOT APPLIED — they ship inside the target version, which the"), console.error(" failed install did not put on disk, so there was nothing to run."), T === void 0 && (console.error(" • The manifest could not be fetched, so a package RENAMED in the target"), console.error(" would still be pinned under its OLD name here — that reads as"), console.error(" NO_MATCHING_VERSION on a package whose latest is the previous release."), console.error(" If that is this failure: rename the dependency in package.json, install,"), console.error(" then run the codemods below.")), console.error(" Fix the install, re-run it, then apply the codemods you are missing:"), console.error(` voltro update --codemods-only --from ${y} --to ${x}`), console.error(" If this project's install CANNOT run on this host — a containerised install"), console.error(" with its own store, an offline mirror — use `--no-install` next time: it writes"), console.error(" the bump, says so, and leaves the install to you."), M;
|
|
516
|
+
let N = te(_, C, b, s);
|
|
517
|
+
if (N !== 0) return N;
|
|
518
|
+
let P = [l.root, _].map((e) => a(e, "node_modules", ".bin", "voltro")).find((e) => c(e));
|
|
519
|
+
if (P) {
|
|
496
520
|
console.log("\nApplying codemods…");
|
|
497
|
-
let e = h(
|
|
521
|
+
let e = h(P, [
|
|
498
522
|
"_apply-codemods",
|
|
499
523
|
"--root",
|
|
500
524
|
l.root,
|
|
501
525
|
"--from",
|
|
502
|
-
|
|
526
|
+
y,
|
|
503
527
|
"--to",
|
|
504
|
-
|
|
528
|
+
x,
|
|
505
529
|
...l.only.length > 0 ? ["--only", l.only.join(",")] : []
|
|
506
530
|
], {
|
|
507
531
|
cwd: l.root,
|
|
@@ -516,9 +540,9 @@ var g = (e) => {
|
|
|
516
540
|
"--root",
|
|
517
541
|
l.root,
|
|
518
542
|
"--from",
|
|
519
|
-
|
|
543
|
+
y,
|
|
520
544
|
"--to",
|
|
521
|
-
|
|
545
|
+
x,
|
|
522
546
|
...l.only.length > 0 ? ["--only", l.only.join(",")] : []
|
|
523
547
|
]);
|
|
524
548
|
return console.log("\n✓ update complete. Next:"), console.log(" • voltro db apply # reconcile any changed framework tables (NOT db migrate)"), console.log(" • <your typecheck> # verify the codemods + your code compile against the new API"), 0;
|
|
@@ -548,7 +572,7 @@ with \`--only\` / \`--root\`.`;
|
|
|
548
572
|
}
|
|
549
573
|
}
|
|
550
574
|
return n;
|
|
551
|
-
},
|
|
575
|
+
}, ce = (e) => {
|
|
552
576
|
let t = (t) => Q(e, t)[0];
|
|
553
577
|
return {
|
|
554
578
|
root: s(t("--root") ?? process.cwd()),
|
|
@@ -558,7 +582,7 @@ with \`--only\` / \`--root\`.`;
|
|
|
558
582
|
only: Q(e, "--only").flatMap((e) => e.split(",")).filter((e) => e.length > 0)
|
|
559
583
|
};
|
|
560
584
|
}, $ = async (t) => {
|
|
561
|
-
let n =
|
|
585
|
+
let n = ce(t), r = await e({
|
|
562
586
|
root: n.root,
|
|
563
587
|
from: n.from,
|
|
564
588
|
to: n.to,
|
|
@@ -585,4 +609,4 @@ with \`--only\` / \`--root\`.`;
|
|
|
585
609
|
return n.dryRun && console.log("\n(dry-run — no files written)"), 0;
|
|
586
610
|
};
|
|
587
611
|
//#endregion
|
|
588
|
-
export { X as a,
|
|
612
|
+
export { A as _, X as a, k as c, q as d, z as f, Z as g, P as h, R as i, F as l, se as m, U as n, D as o, $ as p, J as r, L as s, Y as t, K as u };
|