@donotdev/cli 0.0.20 → 0.0.21
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/README.md +31 -0
- package/dependencies-matrix.json +86 -19
- package/dist/bin/commands/agent-setup.js +2 -2
- package/dist/bin/commands/build.js +6 -6
- package/dist/bin/commands/bump.js +491 -69
- package/dist/bin/commands/cacheout.js +6 -6
- package/dist/bin/commands/coach.js +6 -6
- package/dist/bin/commands/create-app.js +23 -15
- package/dist/bin/commands/create-project.js +101 -16
- package/dist/bin/commands/db.js +142136 -0
- package/dist/bin/commands/deploy.js +336 -126
- package/dist/bin/commands/dev.js +6 -6
- package/dist/bin/commands/doctor.js +140 -33
- package/dist/bin/commands/emu.js +6 -6
- package/dist/bin/commands/format.js +6 -6
- package/dist/bin/commands/get-demo.js +11 -6
- package/dist/bin/commands/make-admin.js +14210 -13770
- package/dist/bin/commands/preview.js +6 -6
- package/dist/bin/commands/seed.js +142426 -0
- package/dist/bin/commands/setup-cicd.js +8904 -0
- package/dist/bin/commands/setup.js +256 -212
- package/dist/bin/commands/staging.js +343 -127
- package/dist/bin/commands/sync-secrets.js +55 -33
- package/dist/bin/commands/type-check.js +6 -6
- package/dist/bin/commands/wai.js +6 -6
- package/dist/bin/dndev.js +76 -11
- package/dist/bin/donotdev.js +21 -12
- package/dist/index.js +437 -142
- package/package.json +1 -1
- package/templates/app-demo/.env.example +1 -0
- package/templates/{root-consumer → app-demo}/entities/ExampleEntity.ts.example +15 -9
- package/templates/app-demo/index.html.example +1 -1
- package/templates/app-dndev/index.html.example +164 -0
- package/templates/app-dndev/public/logo.svg.example +1 -0
- package/templates/app-dndev/public/manifest.json.example +10 -0
- package/templates/app-dndev/src/App.tsx.example +35 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +181 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +209 -0
- package/templates/app-dndev/src/components/Kanban.css.example +385 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +32 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +68 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +228 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +714 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +49 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +107 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +352 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +126 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +147 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +115 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +366 -0
- package/templates/app-dndev/src/config/app.ts.example +103 -0
- package/templates/app-dndev/src/config/commands.ts.example +171 -0
- package/templates/app-dndev/src/config/legal.ts.example +170 -0
- package/templates/app-dndev/src/config/providers.ts.example +7 -0
- package/templates/app-dndev/src/globals.css.example +10 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +144 -0
- package/templates/app-dndev/src/main.tsx.example +21 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +640 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +658 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +347 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +33 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +137 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +64 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +386 -0
- package/templates/app-dndev/src/themes.css.example +161 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +341 -0
- package/templates/app-dndev/tsconfig.json.example +9 -0
- package/templates/app-dndev/vite.config.ts.example +24 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/index.html.example +1 -1
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/functions-supabase/supabase/functions/.env.example +0 -2
- package/templates/root-consumer/.claude/commands/grill.md.example +86 -8
- package/templates/root-consumer/.dndev.secrets.example +32 -0
- package/templates/root-consumer/.gitignore.example +3 -0
- package/templates/root-consumer/AI.md.example +4 -0
- package/templates/root-consumer/entities/index.ts.example +2 -5
- package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +4 -0
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +23 -20
- package/templates/root-consumer/guides/dndev/INDEX.md.example +1 -0
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +3 -7
- package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +115 -0
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +41 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +13 -18
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +17 -12
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
- package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +185 -251
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +26 -8
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +66 -49
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +6 -5
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +9 -9
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +1 -1
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +7 -6
- package/templates/root-consumer/guides/wai-way/context_map.json.example +51 -20
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +138 -0
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +103 -0
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +140 -0
- /package/templates/{root-consumer → app-demo}/entities/Contact.ts.example +0 -0
- /package/templates/{root-consumer → app-demo}/entities/demo.ts.example +0 -0
|
@@ -255,7 +255,7 @@ function m(e2, u2) {
|
|
|
255
255
|
const t = e2;
|
|
256
256
|
t.isTTY && t.setRawMode(u2);
|
|
257
257
|
}
|
|
258
|
-
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A,
|
|
258
|
+
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, kD, $D, H, SD;
|
|
259
259
|
var init_dist = __esm({
|
|
260
260
|
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
261
261
|
init_utils();
|
|
@@ -492,12 +492,14 @@ var init_dist = __esm({
|
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
494
|
A = /* @__PURE__ */ new WeakMap();
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
495
|
+
kD = Object.defineProperty;
|
|
496
|
+
$D = (e2, u2, t) => u2 in e2 ? kD(e2, u2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[u2] = t;
|
|
497
|
+
H = (e2, u2, t) => ($D(e2, typeof u2 != "symbol" ? u2 + "" : u2, t), t);
|
|
498
|
+
SD = class extends x {
|
|
499
499
|
constructor(u2) {
|
|
500
|
-
super(u2, false),
|
|
500
|
+
super(u2, false), H(this, "options"), H(this, "cursor", 0), this.options = u2.options, this.value = [...u2.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: t }) => t === u2.cursorAt), 0), this.on("key", (t) => {
|
|
501
|
+
t === "a" && this.toggleAll();
|
|
502
|
+
}), this.on("cursor", (t) => {
|
|
501
503
|
switch (t) {
|
|
502
504
|
case "left":
|
|
503
505
|
case "up":
|
|
@@ -507,15 +509,22 @@ var init_dist = __esm({
|
|
|
507
509
|
case "right":
|
|
508
510
|
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
|
|
509
511
|
break;
|
|
512
|
+
case "space":
|
|
513
|
+
this.toggleValue();
|
|
514
|
+
break;
|
|
510
515
|
}
|
|
511
|
-
this.changeValue();
|
|
512
516
|
});
|
|
513
517
|
}
|
|
514
518
|
get _value() {
|
|
515
|
-
return this.options[this.cursor];
|
|
519
|
+
return this.options[this.cursor].value;
|
|
520
|
+
}
|
|
521
|
+
toggleAll() {
|
|
522
|
+
const u2 = this.value.length === this.options.length;
|
|
523
|
+
this.value = u2 ? [] : this.options.map((t) => t.value);
|
|
516
524
|
}
|
|
517
|
-
|
|
518
|
-
|
|
525
|
+
toggleValue() {
|
|
526
|
+
const u2 = this.value.includes(this._value);
|
|
527
|
+
this.value = u2 ? this.value.filter((t) => t !== this._value) : [...this.value, this._value];
|
|
519
528
|
}
|
|
520
529
|
};
|
|
521
530
|
}
|
|
@@ -527,7 +536,7 @@ import y2 from "node:process";
|
|
|
527
536
|
function ce() {
|
|
528
537
|
return y2.platform !== "win32" ? y2.env.TERM !== "linux" : !!y2.env.CI || !!y2.env.WT_SESSION || !!y2.env.TERMINUS_SUBLIME || y2.env.ConEmuTask === "{cmd::Cmder}" || y2.env.TERM_PROGRAM === "Terminus-Sublime" || y2.env.TERM_PROGRAM === "vscode" || y2.env.TERM === "xterm-256color" || y2.env.TERM === "alacritty" || y2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
529
538
|
}
|
|
530
|
-
var import_picocolors, import_sisteransi2, V2, u, le, L2, W2, C, ue, o, d2, k2, P2, A2, T, F, $e, _2, me, de, pe, q, D, U, K2, b2, G2, ye,
|
|
539
|
+
var import_picocolors, import_sisteransi2, V2, u, le, L2, W2, C, ue, o, d2, k2, P2, A2, T, F, $e, _2, me, de, pe, q, D, U, K2, b2, G2, ye, fe, xe, Ie, Se, M2, J;
|
|
531
540
|
var init_dist2 = __esm({
|
|
532
541
|
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
533
542
|
init_utils();
|
|
@@ -600,32 +609,40 @@ ${import_picocolors.default.cyan(d2)}
|
|
|
600
609
|
}
|
|
601
610
|
} }).prompt();
|
|
602
611
|
};
|
|
603
|
-
|
|
612
|
+
fe = (t) => {
|
|
604
613
|
const n = (r2, i) => {
|
|
605
614
|
const s = r2.label ?? String(r2.value);
|
|
606
|
-
|
|
607
|
-
case "selected":
|
|
608
|
-
return `${import_picocolors.default.dim(s)}`;
|
|
609
|
-
case "active":
|
|
610
|
-
return `${import_picocolors.default.green(k2)} ${s} ${r2.hint ? import_picocolors.default.dim(`(${r2.hint})`) : ""}`;
|
|
611
|
-
case "cancelled":
|
|
612
|
-
return `${import_picocolors.default.strikethrough(import_picocolors.default.dim(s))}`;
|
|
613
|
-
default:
|
|
614
|
-
return `${import_picocolors.default.dim(P2)} ${import_picocolors.default.dim(s)}`;
|
|
615
|
-
}
|
|
615
|
+
return i === "active" ? `${import_picocolors.default.cyan(A2)} ${s} ${r2.hint ? import_picocolors.default.dim(`(${r2.hint})`) : ""}` : i === "selected" ? `${import_picocolors.default.green(T)} ${import_picocolors.default.dim(s)} ${r2.hint ? import_picocolors.default.dim(`(${r2.hint})`) : ""}` : i === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(s))}` : i === "active-selected" ? `${import_picocolors.default.green(T)} ${s} ${r2.hint ? import_picocolors.default.dim(`(${r2.hint})`) : ""}` : i === "submitted" ? `${import_picocolors.default.dim(s)}` : `${import_picocolors.default.dim(F)} ${import_picocolors.default.dim(s)}`;
|
|
616
616
|
};
|
|
617
|
-
return new
|
|
617
|
+
return new SD({ options: t.options, initialValues: t.initialValues, required: t.required ?? true, cursorAt: t.cursorAt, validate(r2) {
|
|
618
|
+
if (this.required && r2.length === 0) return `Please select at least one option.
|
|
619
|
+
${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`;
|
|
620
|
+
}, render() {
|
|
618
621
|
const r2 = `${import_picocolors.default.gray(o)}
|
|
619
622
|
${b2(this.state)} ${t.message}
|
|
620
|
-
|
|
623
|
+
`, i = (s, c) => {
|
|
624
|
+
const a = this.value.includes(s.value);
|
|
625
|
+
return c && a ? n(s, "active-selected") : a ? n(s, "selected") : n(s, c ? "active" : "inactive");
|
|
626
|
+
};
|
|
621
627
|
switch (this.state) {
|
|
622
628
|
case "submit":
|
|
623
|
-
return `${r2}${import_picocolors.default.gray(o)} ${
|
|
624
|
-
case "cancel":
|
|
625
|
-
|
|
626
|
-
${import_picocolors.default.gray(o)}
|
|
629
|
+
return `${r2}${import_picocolors.default.gray(o)} ${this.options.filter(({ value: s }) => this.value.includes(s)).map((s) => n(s, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`;
|
|
630
|
+
case "cancel": {
|
|
631
|
+
const s = this.options.filter(({ value: c }) => this.value.includes(c)).map((c) => n(c, "cancelled")).join(import_picocolors.default.dim(", "));
|
|
632
|
+
return `${r2}${import_picocolors.default.gray(o)} ${s.trim() ? `${s}
|
|
633
|
+
${import_picocolors.default.gray(o)}` : ""}`;
|
|
634
|
+
}
|
|
635
|
+
case "error": {
|
|
636
|
+
const s = this.error.split(`
|
|
637
|
+
`).map((c, a) => a === 0 ? `${import_picocolors.default.yellow(d2)} ${import_picocolors.default.yellow(c)}` : ` ${c}`).join(`
|
|
638
|
+
`);
|
|
639
|
+
return `${r2 + import_picocolors.default.yellow(o)} ${G2({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: i }).join(`
|
|
640
|
+
${import_picocolors.default.yellow(o)} `)}
|
|
641
|
+
${s}
|
|
642
|
+
`;
|
|
643
|
+
}
|
|
627
644
|
default:
|
|
628
|
-
return `${r2}${import_picocolors.default.cyan(o)} ${G2({
|
|
645
|
+
return `${r2}${import_picocolors.default.cyan(o)} ${G2({ options: this.options, cursor: this.cursor, maxItems: t.maxItems, style: i }).join(`
|
|
629
646
|
${import_picocolors.default.cyan(o)} `)}
|
|
630
647
|
${import_picocolors.default.cyan(d2)}
|
|
631
648
|
`;
|
|
@@ -670,7 +687,7 @@ ${import_picocolors.default.gray(d2)} ${t}
|
|
|
670
687
|
}, error: (t) => {
|
|
671
688
|
M2.message(t, { symbol: import_picocolors.default.red(K2) });
|
|
672
689
|
} };
|
|
673
|
-
|
|
690
|
+
J = `${import_picocolors.default.gray(o)} `;
|
|
674
691
|
}
|
|
675
692
|
});
|
|
676
693
|
|
|
@@ -6951,7 +6968,7 @@ var init_PathResolver = __esm({
|
|
|
6951
6968
|
}
|
|
6952
6969
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
6953
6970
|
let writeContent;
|
|
6954
|
-
if (
|
|
6971
|
+
if (Buffer.isBuffer(content)) {
|
|
6955
6972
|
writeContent = content;
|
|
6956
6973
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
6957
6974
|
writeContent = JSON.stringify(content, null, 2);
|
|
@@ -6960,7 +6977,7 @@ var init_PathResolver = __esm({
|
|
|
6960
6977
|
}
|
|
6961
6978
|
try {
|
|
6962
6979
|
return await safeExecuteAsync(async () => {
|
|
6963
|
-
if (
|
|
6980
|
+
if (Buffer.isBuffer(writeContent)) {
|
|
6964
6981
|
await fs.promises.writeFile(normalizedPath, writeContent);
|
|
6965
6982
|
} else {
|
|
6966
6983
|
await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
|
|
@@ -7012,7 +7029,7 @@ var init_PathResolver = __esm({
|
|
|
7012
7029
|
}
|
|
7013
7030
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7014
7031
|
let writeContent;
|
|
7015
|
-
if (
|
|
7032
|
+
if (Buffer.isBuffer(content)) {
|
|
7016
7033
|
writeContent = content;
|
|
7017
7034
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7018
7035
|
writeContent = JSON.stringify(content, null, 2);
|
|
@@ -7020,7 +7037,7 @@ var init_PathResolver = __esm({
|
|
|
7020
7037
|
writeContent = String(content);
|
|
7021
7038
|
}
|
|
7022
7039
|
try {
|
|
7023
|
-
if (
|
|
7040
|
+
if (Buffer.isBuffer(writeContent)) {
|
|
7024
7041
|
fs.writeFileSync(normalizedPath, writeContent);
|
|
7025
7042
|
} else {
|
|
7026
7043
|
fs.writeFileSync(normalizedPath, writeContent, "utf8");
|
|
@@ -7888,7 +7905,7 @@ var init_pathResolver = __esm({
|
|
|
7888
7905
|
});
|
|
7889
7906
|
|
|
7890
7907
|
// packages/tooling/src/bundler/utils.ts
|
|
7891
|
-
import { Buffer
|
|
7908
|
+
import { Buffer } from "node:buffer";
|
|
7892
7909
|
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7893
7910
|
import { createRequire as createRequire3 } from "node:module";
|
|
7894
7911
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
@@ -7905,7 +7922,7 @@ var init_utils = __esm({
|
|
|
7905
7922
|
globalThis.require = require2;
|
|
7906
7923
|
globalThis.__filename = __filename;
|
|
7907
7924
|
globalThis.__dirname = __dirname;
|
|
7908
|
-
globalThis.Buffer =
|
|
7925
|
+
globalThis.Buffer = Buffer;
|
|
7909
7926
|
globalThis.process = process;
|
|
7910
7927
|
if (typeof global === "undefined") {
|
|
7911
7928
|
globalThis.global = globalThis;
|
|
@@ -7926,16 +7943,17 @@ async function askForConfirmation(message, defaultValue = false) {
|
|
|
7926
7943
|
}
|
|
7927
7944
|
return result;
|
|
7928
7945
|
}
|
|
7929
|
-
async function
|
|
7946
|
+
async function askForMultiSelection(message, choices, defaultIndices = []) {
|
|
7930
7947
|
const options = choices.map((choice) => ({
|
|
7931
7948
|
value: choice.value,
|
|
7932
7949
|
label: choice.title,
|
|
7933
7950
|
hint: choice.hint
|
|
7934
7951
|
}));
|
|
7935
|
-
const
|
|
7952
|
+
const initialValues = defaultIndices.map((i) => choices[i]?.value).filter(Boolean);
|
|
7953
|
+
const result = await fe({
|
|
7936
7954
|
message,
|
|
7937
7955
|
options,
|
|
7938
|
-
|
|
7956
|
+
initialValues: initialValues.length > 0 ? initialValues : void 0
|
|
7939
7957
|
});
|
|
7940
7958
|
if (pD(result)) {
|
|
7941
7959
|
xe("Operation cancelled.");
|
|
@@ -8032,6 +8050,16 @@ function flattenGroups(groups) {
|
|
|
8032
8050
|
}
|
|
8033
8051
|
return flat;
|
|
8034
8052
|
}
|
|
8053
|
+
function resolveGroup(groupName, matrix) {
|
|
8054
|
+
return matrix.groups[groupName]?.packages || {};
|
|
8055
|
+
}
|
|
8056
|
+
function resolveGroups(groupNames, matrix) {
|
|
8057
|
+
const result = {};
|
|
8058
|
+
for (const groupName of groupNames) {
|
|
8059
|
+
Object.assign(result, resolveGroup(groupName, matrix));
|
|
8060
|
+
}
|
|
8061
|
+
return result;
|
|
8062
|
+
}
|
|
8035
8063
|
function getMigrationGuide(currentMajor, targetMajor, mode) {
|
|
8036
8064
|
const matrixResult = loadMatrix(mode);
|
|
8037
8065
|
if (!matrixResult) return void 0;
|
|
@@ -8102,12 +8130,376 @@ function compareVersions(current, expected) {
|
|
|
8102
8130
|
return { behind: false, ahead: false, equal: true, isMajor: false };
|
|
8103
8131
|
}
|
|
8104
8132
|
|
|
8133
|
+
// packages/tooling/src/utils/dependency-resolver.ts
|
|
8134
|
+
init_utils();
|
|
8135
|
+
function applyConditionals(template, options) {
|
|
8136
|
+
if (!template.conditional) return [];
|
|
8137
|
+
const groups = [];
|
|
8138
|
+
for (const [groupName, condition] of Object.entries(template.conditional)) {
|
|
8139
|
+
if (condition.includes("===")) {
|
|
8140
|
+
const [key, value] = condition.split("===").map((s) => s.trim());
|
|
8141
|
+
if (key && options[key] === value?.replace(/['"]/g, "")) {
|
|
8142
|
+
groups.push(groupName);
|
|
8143
|
+
}
|
|
8144
|
+
} else if (options[condition]) {
|
|
8145
|
+
groups.push(groupName);
|
|
8146
|
+
}
|
|
8147
|
+
}
|
|
8148
|
+
return groups;
|
|
8149
|
+
}
|
|
8150
|
+
function generateScripts(templateName, options) {
|
|
8151
|
+
const scripts = {};
|
|
8152
|
+
if (templateName.includes("vite")) {
|
|
8153
|
+
scripts.dev = "vite";
|
|
8154
|
+
scripts.build = "vite build";
|
|
8155
|
+
scripts.preview = "vite preview";
|
|
8156
|
+
scripts.lint = "eslint src/";
|
|
8157
|
+
scripts["type-check"] = "tsc --noEmit";
|
|
8158
|
+
} else if (templateName.includes("nextjs")) {
|
|
8159
|
+
scripts.dev = "next dev";
|
|
8160
|
+
scripts.build = "next build";
|
|
8161
|
+
scripts.preview = "next start";
|
|
8162
|
+
scripts.lint = "eslint src/";
|
|
8163
|
+
scripts["type-check"] = "tsc --noEmit";
|
|
8164
|
+
} else if (templateName.includes("expo")) {
|
|
8165
|
+
scripts.dev = "expo start";
|
|
8166
|
+
scripts.start = "expo start";
|
|
8167
|
+
scripts.android = "expo start --android";
|
|
8168
|
+
scripts.ios = "expo start --ios";
|
|
8169
|
+
scripts.web = "expo start --web";
|
|
8170
|
+
scripts.build = "expo export";
|
|
8171
|
+
scripts.lint = "eslint .";
|
|
8172
|
+
scripts["type-check"] = "tsc --noEmit";
|
|
8173
|
+
} else if (templateName === "consumer-root") {
|
|
8174
|
+
scripts.dev = "dndev dev";
|
|
8175
|
+
scripts.build = "turbo run build";
|
|
8176
|
+
scripts.lint = "turbo run lint";
|
|
8177
|
+
scripts["type-check"] = "dndev tc";
|
|
8178
|
+
} else if (templateName.includes("functions")) {
|
|
8179
|
+
scripts.build = "node build.mjs";
|
|
8180
|
+
scripts["build:tsc"] = "tsc";
|
|
8181
|
+
if (templateName.includes("firebase") || options.platform === "firebase") {
|
|
8182
|
+
scripts.serve = "firebase emulators:start --only functions";
|
|
8183
|
+
scripts.dev = "firebase emulators:start --only functions --inspect-functions";
|
|
8184
|
+
} else {
|
|
8185
|
+
scripts.dev = "vercel dev";
|
|
8186
|
+
}
|
|
8187
|
+
} else if (templateName === "demo") {
|
|
8188
|
+
scripts.dev = "vite";
|
|
8189
|
+
scripts.build = "tsc --noEmit && vite build --mode production";
|
|
8190
|
+
scripts.preview = "vite preview";
|
|
8191
|
+
scripts["type-check"] = "tsc --noEmit";
|
|
8192
|
+
} else if (templateName === "dndev") {
|
|
8193
|
+
scripts.dev = "vite";
|
|
8194
|
+
scripts.build = "tsc --noEmit && vite build --mode production";
|
|
8195
|
+
scripts.preview = "vite preview";
|
|
8196
|
+
scripts["type-check"] = "tsc --noEmit";
|
|
8197
|
+
} else if (templateName === "entities") {
|
|
8198
|
+
}
|
|
8199
|
+
return scripts;
|
|
8200
|
+
}
|
|
8201
|
+
function generatePackageJson(templateName, mode, options = {}) {
|
|
8202
|
+
const matrixResult = loadMatrix(mode);
|
|
8203
|
+
if (!matrixResult) {
|
|
8204
|
+
throw new Error(
|
|
8205
|
+
"dependencies-matrix.json not found. This command requires the matrix file."
|
|
8206
|
+
);
|
|
8207
|
+
}
|
|
8208
|
+
const { matrix } = matrixResult;
|
|
8209
|
+
const template = matrix.templateMapping?.[templateName];
|
|
8210
|
+
if (!template) {
|
|
8211
|
+
throw new Error(`Template "${templateName}" not found in matrix`);
|
|
8212
|
+
}
|
|
8213
|
+
const dependencies = {};
|
|
8214
|
+
const devDependencies = {};
|
|
8215
|
+
const peerDependencies = {};
|
|
8216
|
+
const addDeps = (target, groupNames) => {
|
|
8217
|
+
if (!groupNames) return;
|
|
8218
|
+
const resolved = resolveGroups(groupNames, matrix);
|
|
8219
|
+
for (const [name, version] of Object.entries(resolved)) {
|
|
8220
|
+
target[name] = version.startsWith("^") ? version : `^${version}`;
|
|
8221
|
+
}
|
|
8222
|
+
};
|
|
8223
|
+
addDeps(dependencies, template.dependencies);
|
|
8224
|
+
addDeps(devDependencies, template.devDependencies);
|
|
8225
|
+
addDeps(peerDependencies, template.peerDependencies);
|
|
8226
|
+
const conditionalGroups = applyConditionals(template, options);
|
|
8227
|
+
for (const groupName of conditionalGroups) {
|
|
8228
|
+
let target = dependencies;
|
|
8229
|
+
if (template.devDependencies?.includes(groupName)) target = devDependencies;
|
|
8230
|
+
if (template.peerDependencies?.includes(groupName))
|
|
8231
|
+
target = peerDependencies;
|
|
8232
|
+
addDeps(target, [groupName]);
|
|
8233
|
+
}
|
|
8234
|
+
const scripts = generateScripts(templateName, options);
|
|
8235
|
+
let packageName = "unknown";
|
|
8236
|
+
if (templateName === "consumer-root" && options.projectName) {
|
|
8237
|
+
packageName = options.projectName;
|
|
8238
|
+
} else if (templateName.includes("functions") && options.appName) {
|
|
8239
|
+
packageName = `${options.appName}-functions`;
|
|
8240
|
+
} else if (options.appName) {
|
|
8241
|
+
packageName = `${options.appName}-app`;
|
|
8242
|
+
} else if (templateName === "entities") {
|
|
8243
|
+
packageName = "entities";
|
|
8244
|
+
}
|
|
8245
|
+
const result = {
|
|
8246
|
+
name: packageName,
|
|
8247
|
+
version: matrix.version,
|
|
8248
|
+
private: true,
|
|
8249
|
+
type: "module",
|
|
8250
|
+
scripts,
|
|
8251
|
+
dependencies,
|
|
8252
|
+
devDependencies
|
|
8253
|
+
};
|
|
8254
|
+
if (Object.keys(peerDependencies).length > 0) {
|
|
8255
|
+
result.peerDependencies = peerDependencies;
|
|
8256
|
+
}
|
|
8257
|
+
if (templateName === "consumer-root") {
|
|
8258
|
+
result.packageManager = "bun@1.3.5";
|
|
8259
|
+
result.engines = { node: ">=24.0.0", bun: ">=1.3.0" };
|
|
8260
|
+
result.workspaces = ["apps/*", "entities"];
|
|
8261
|
+
}
|
|
8262
|
+
if (templateName === "entities") {
|
|
8263
|
+
result.main = "./index.ts";
|
|
8264
|
+
result.types = "./index.ts";
|
|
8265
|
+
}
|
|
8266
|
+
if (templateName.includes("vite") || templateName.includes("nextjs") || templateName.includes("expo") || templateName.includes("functions")) {
|
|
8267
|
+
if (!dependencies.entities) {
|
|
8268
|
+
dependencies.entities = "workspace:*";
|
|
8269
|
+
}
|
|
8270
|
+
}
|
|
8271
|
+
if (templateName.includes("functions")) {
|
|
8272
|
+
result.main = "lib/index.js";
|
|
8273
|
+
result.engines = { node: "22" };
|
|
8274
|
+
if (options.appName) {
|
|
8275
|
+
const platform = templateName.includes("vercel") ? "Vercel" : "Firebase";
|
|
8276
|
+
result.description = `${options.appName} ${platform} Functions`;
|
|
8277
|
+
}
|
|
8278
|
+
if (mode === "development") {
|
|
8279
|
+
const workspacePkgs = [
|
|
8280
|
+
"@donotdev/functions",
|
|
8281
|
+
"@donotdev/types",
|
|
8282
|
+
"@donotdev/utils",
|
|
8283
|
+
"@donotdev/core"
|
|
8284
|
+
];
|
|
8285
|
+
for (const pkg of workspacePkgs) {
|
|
8286
|
+
if (dependencies[pkg]) dependencies[pkg] = "workspace:*";
|
|
8287
|
+
if (devDependencies[pkg]) devDependencies[pkg] = "workspace:*";
|
|
8288
|
+
}
|
|
8289
|
+
}
|
|
8290
|
+
}
|
|
8291
|
+
if (mode === "published") {
|
|
8292
|
+
const overrides = {};
|
|
8293
|
+
for (const [groupName, group] of Object.entries(matrix.groups || {})) {
|
|
8294
|
+
if (groupName.startsWith("@donotdev/")) {
|
|
8295
|
+
const version = group.packages?.[groupName];
|
|
8296
|
+
if (version) {
|
|
8297
|
+
overrides[groupName] = version.replace(/^\^/, "");
|
|
8298
|
+
}
|
|
8299
|
+
}
|
|
8300
|
+
}
|
|
8301
|
+
if (matrix.overrides) {
|
|
8302
|
+
Object.assign(overrides, matrix.overrides);
|
|
8303
|
+
}
|
|
8304
|
+
if (Object.keys(overrides).length > 0) {
|
|
8305
|
+
result.overrides = overrides;
|
|
8306
|
+
}
|
|
8307
|
+
}
|
|
8308
|
+
return result;
|
|
8309
|
+
}
|
|
8310
|
+
|
|
8105
8311
|
// packages/tooling/src/maintenance/bump.ts
|
|
8106
8312
|
init_utils();
|
|
8107
8313
|
init_cli_input();
|
|
8108
8314
|
init_cli_output();
|
|
8109
8315
|
init_pathResolver();
|
|
8110
8316
|
|
|
8317
|
+
// packages/tooling/src/maintenance/sync-apps.ts
|
|
8318
|
+
init_utils();
|
|
8319
|
+
init_cli_output();
|
|
8320
|
+
init_errors();
|
|
8321
|
+
init_pathResolver();
|
|
8322
|
+
var PRESERVE_MAP = {
|
|
8323
|
+
demo: [],
|
|
8324
|
+
dndev: ["commands.ts"]
|
|
8325
|
+
};
|
|
8326
|
+
var SKIP_PATTERNS = ["package.json.example", ".generated.log"];
|
|
8327
|
+
function getAppTemplateSource(appName) {
|
|
8328
|
+
try {
|
|
8329
|
+
const templatesRoot = getTemplatesRoot();
|
|
8330
|
+
const templateDir = joinPath(templatesRoot, `app-${appName}`);
|
|
8331
|
+
if (pathExists(templateDir)) {
|
|
8332
|
+
return normalizePath(templateDir);
|
|
8333
|
+
}
|
|
8334
|
+
} catch {
|
|
8335
|
+
}
|
|
8336
|
+
const appRoot = getAppRoot();
|
|
8337
|
+
if (appRoot) {
|
|
8338
|
+
const directPath = joinPath(
|
|
8339
|
+
appRoot,
|
|
8340
|
+
"node_modules",
|
|
8341
|
+
"@donotdev",
|
|
8342
|
+
"cli",
|
|
8343
|
+
"templates",
|
|
8344
|
+
`app-${appName}`
|
|
8345
|
+
);
|
|
8346
|
+
if (pathExists(directPath)) {
|
|
8347
|
+
return normalizePath(directPath);
|
|
8348
|
+
}
|
|
8349
|
+
}
|
|
8350
|
+
return null;
|
|
8351
|
+
}
|
|
8352
|
+
function syncPackageJson(appName, destRoot, dryRun) {
|
|
8353
|
+
const executionMode = detectExecutionMode();
|
|
8354
|
+
const packageJsonPath = joinPath(destRoot, "package.json");
|
|
8355
|
+
const newPkg = generatePackageJson(appName, executionMode, {
|
|
8356
|
+
appName,
|
|
8357
|
+
template: "vite",
|
|
8358
|
+
includeFunctions: false
|
|
8359
|
+
});
|
|
8360
|
+
if (pathExists(packageJsonPath)) {
|
|
8361
|
+
const existing = parsePackageJson(packageJsonPath);
|
|
8362
|
+
if (!existing) {
|
|
8363
|
+
if (dryRun) {
|
|
8364
|
+
log.info(`[DRY RUN] Would regenerate: apps/${appName}/package.json`);
|
|
8365
|
+
return true;
|
|
8366
|
+
}
|
|
8367
|
+
writePackageJson(packageJsonPath, newPkg);
|
|
8368
|
+
log.info(`Regenerated: apps/${appName}/package.json`);
|
|
8369
|
+
return true;
|
|
8370
|
+
}
|
|
8371
|
+
let changed = false;
|
|
8372
|
+
for (const field of ["dependencies", "devDependencies"]) {
|
|
8373
|
+
const newDeps = newPkg[field];
|
|
8374
|
+
if (!newDeps) continue;
|
|
8375
|
+
const existingDeps = existing[field] ?? {};
|
|
8376
|
+
for (const [pkg, version] of Object.entries(newDeps)) {
|
|
8377
|
+
if (existingDeps[pkg] === "workspace:*") continue;
|
|
8378
|
+
if (existingDeps[pkg] !== version) {
|
|
8379
|
+
existingDeps[pkg] = version;
|
|
8380
|
+
changed = true;
|
|
8381
|
+
}
|
|
8382
|
+
}
|
|
8383
|
+
existing[field] = existingDeps;
|
|
8384
|
+
}
|
|
8385
|
+
if (changed) {
|
|
8386
|
+
if (dryRun) {
|
|
8387
|
+
log.info(
|
|
8388
|
+
`[DRY RUN] Would update deps in: apps/${appName}/package.json`
|
|
8389
|
+
);
|
|
8390
|
+
} else {
|
|
8391
|
+
writePackageJson(packageJsonPath, existing);
|
|
8392
|
+
log.info(`Updated deps: apps/${appName}/package.json`);
|
|
8393
|
+
}
|
|
8394
|
+
}
|
|
8395
|
+
return changed;
|
|
8396
|
+
}
|
|
8397
|
+
if (dryRun) {
|
|
8398
|
+
log.info(`[DRY RUN] Would create: apps/${appName}/package.json`);
|
|
8399
|
+
return true;
|
|
8400
|
+
}
|
|
8401
|
+
writePackageJson(packageJsonPath, newPkg);
|
|
8402
|
+
log.info(`Created: apps/${appName}/package.json`);
|
|
8403
|
+
return true;
|
|
8404
|
+
}
|
|
8405
|
+
async function syncApp(appName, options = {}) {
|
|
8406
|
+
const { dryRun } = options;
|
|
8407
|
+
let synced = 0;
|
|
8408
|
+
let preserved = 0;
|
|
8409
|
+
let errors = 0;
|
|
8410
|
+
const appRoot = getAppRoot();
|
|
8411
|
+
if (!appRoot) {
|
|
8412
|
+
log.error("Could not determine project root");
|
|
8413
|
+
return { synced, preserved, errors: 1 };
|
|
8414
|
+
}
|
|
8415
|
+
const sourceRoot = getAppTemplateSource(appName);
|
|
8416
|
+
if (!sourceRoot) {
|
|
8417
|
+
log.warn(
|
|
8418
|
+
`Template for app-${appName} not found. Is @donotdev/cli installed?`
|
|
8419
|
+
);
|
|
8420
|
+
return { synced, preserved, errors: 1 };
|
|
8421
|
+
}
|
|
8422
|
+
const destRoot = normalizePath(joinPath(appRoot, "apps", appName));
|
|
8423
|
+
if (!pathExists(destRoot)) {
|
|
8424
|
+
log.info(`apps/${appName}/ does not exist \u2014 creating from template`);
|
|
8425
|
+
if (!dryRun) {
|
|
8426
|
+
await ensureDir(destRoot);
|
|
8427
|
+
}
|
|
8428
|
+
}
|
|
8429
|
+
try {
|
|
8430
|
+
if (syncPackageJson(appName, destRoot, dryRun ?? false)) {
|
|
8431
|
+
synced++;
|
|
8432
|
+
}
|
|
8433
|
+
} catch (error2) {
|
|
8434
|
+
errors++;
|
|
8435
|
+
log.error(
|
|
8436
|
+
`Error generating package.json for apps/${appName}:`,
|
|
8437
|
+
DoNotDevError.from(
|
|
8438
|
+
error2,
|
|
8439
|
+
"package.json generation failed",
|
|
8440
|
+
"file-operation-error"
|
|
8441
|
+
)
|
|
8442
|
+
);
|
|
8443
|
+
}
|
|
8444
|
+
const preserveFiles = PRESERVE_MAP[appName];
|
|
8445
|
+
try {
|
|
8446
|
+
const sourceFiles = await glob("**/*.example", {
|
|
8447
|
+
cwd: sourceRoot,
|
|
8448
|
+
absolute: true,
|
|
8449
|
+
onlyFiles: true
|
|
8450
|
+
});
|
|
8451
|
+
for (const sourceFile of sourceFiles) {
|
|
8452
|
+
const relativePath = normalizePath(sourceFile).replace(
|
|
8453
|
+
sourceRoot + "/",
|
|
8454
|
+
""
|
|
8455
|
+
);
|
|
8456
|
+
if (SKIP_PATTERNS.some((p2) => relativePath.includes(p2))) {
|
|
8457
|
+
continue;
|
|
8458
|
+
}
|
|
8459
|
+
const destRelative = relativePath.endsWith(".example") ? relativePath.slice(0, -8) : relativePath;
|
|
8460
|
+
const destFile = joinPath(destRoot, destRelative);
|
|
8461
|
+
const shouldPreserve = preserveFiles.some(
|
|
8462
|
+
(f) => destRelative.endsWith(f)
|
|
8463
|
+
);
|
|
8464
|
+
if (shouldPreserve && pathExists(destFile)) {
|
|
8465
|
+
if (dryRun) {
|
|
8466
|
+
log.info(`[DRY RUN] Would preserve: apps/${appName}/${destRelative}`);
|
|
8467
|
+
} else {
|
|
8468
|
+
log.info(`Preserving: apps/${appName}/${destRelative}`);
|
|
8469
|
+
}
|
|
8470
|
+
preserved++;
|
|
8471
|
+
continue;
|
|
8472
|
+
}
|
|
8473
|
+
if (!pathExists(sourceFile)) continue;
|
|
8474
|
+
const content = await read(sourceFile, { format: "text" });
|
|
8475
|
+
if (!content) continue;
|
|
8476
|
+
if (pathExists(destFile)) {
|
|
8477
|
+
const existing = await read(destFile, { format: "text" });
|
|
8478
|
+
if (existing === content) continue;
|
|
8479
|
+
}
|
|
8480
|
+
if (dryRun) {
|
|
8481
|
+
log.info(`[DRY RUN] Would sync: apps/${appName}/${destRelative}`);
|
|
8482
|
+
} else {
|
|
8483
|
+
await ensureDir(getDirname(destFile));
|
|
8484
|
+
await write(destFile, content, { format: "text", overwrite: true });
|
|
8485
|
+
log.info(`Synced: apps/${appName}/${destRelative}`);
|
|
8486
|
+
}
|
|
8487
|
+
synced++;
|
|
8488
|
+
}
|
|
8489
|
+
} catch (error2) {
|
|
8490
|
+
errors++;
|
|
8491
|
+
log.error(
|
|
8492
|
+
`Error syncing app-${appName}:`,
|
|
8493
|
+
DoNotDevError.from(
|
|
8494
|
+
error2,
|
|
8495
|
+
`Failed to sync app-${appName}`,
|
|
8496
|
+
"file-operation-error"
|
|
8497
|
+
)
|
|
8498
|
+
);
|
|
8499
|
+
}
|
|
8500
|
+
return { synced, preserved, errors };
|
|
8501
|
+
}
|
|
8502
|
+
|
|
8111
8503
|
// packages/tooling/src/maintenance/sync-docs.ts
|
|
8112
8504
|
init_utils();
|
|
8113
8505
|
init_cli_output();
|
|
@@ -8384,41 +8776,45 @@ async function main(options = {}) {
|
|
|
8384
8776
|
}
|
|
8385
8777
|
let updatePackages = false;
|
|
8386
8778
|
let updateDocs = false;
|
|
8779
|
+
let updateDemoApp = false;
|
|
8780
|
+
let updateCockpitApp = false;
|
|
8387
8781
|
if (dryRun) {
|
|
8388
8782
|
updatePackages = true;
|
|
8389
8783
|
updateDocs = true;
|
|
8784
|
+
updateDemoApp = true;
|
|
8785
|
+
updateCockpitApp = true;
|
|
8390
8786
|
} else {
|
|
8391
|
-
const
|
|
8392
|
-
{
|
|
8393
|
-
title: "Update packages",
|
|
8394
|
-
value: "packages",
|
|
8395
|
-
hint: "Update @donotdev/* packages and dependencies"
|
|
8396
|
-
},
|
|
8397
|
-
{
|
|
8398
|
-
title: "Sync documentation",
|
|
8399
|
-
value: "docs",
|
|
8400
|
-
hint: "Sync guides, commands, and agents from framework"
|
|
8401
|
-
},
|
|
8402
|
-
{
|
|
8403
|
-
title: "Both",
|
|
8404
|
-
value: "both",
|
|
8405
|
-
hint: "Update packages and sync documentation"
|
|
8406
|
-
}
|
|
8407
|
-
];
|
|
8408
|
-
const selection = await askForSelection(
|
|
8787
|
+
const selections = await askForMultiSelection(
|
|
8409
8788
|
"What would you like to update?",
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8789
|
+
[
|
|
8790
|
+
{
|
|
8791
|
+
title: "Packages",
|
|
8792
|
+
value: "packages",
|
|
8793
|
+
hint: "Update @donotdev/* packages and dependencies"
|
|
8794
|
+
},
|
|
8795
|
+
{
|
|
8796
|
+
title: "Documentation",
|
|
8797
|
+
value: "docs",
|
|
8798
|
+
hint: "Sync guides, commands, and agents from framework"
|
|
8799
|
+
},
|
|
8800
|
+
{
|
|
8801
|
+
title: "Demo app",
|
|
8802
|
+
value: "demo",
|
|
8803
|
+
hint: "Sync demo showcase app from latest template"
|
|
8804
|
+
},
|
|
8805
|
+
{
|
|
8806
|
+
title: "Cockpit app",
|
|
8807
|
+
value: "cockpit",
|
|
8808
|
+
hint: "Sync dndev cockpit app from latest template"
|
|
8809
|
+
}
|
|
8810
|
+
],
|
|
8811
|
+
[0, 1]
|
|
8812
|
+
// Default: packages + docs
|
|
8413
8813
|
);
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
} else if (selection === "both") {
|
|
8419
|
-
updatePackages = true;
|
|
8420
|
-
updateDocs = true;
|
|
8421
|
-
}
|
|
8814
|
+
updatePackages = selections.includes("packages");
|
|
8815
|
+
updateDocs = selections.includes("docs");
|
|
8816
|
+
updateDemoApp = selections.includes("demo");
|
|
8817
|
+
updateCockpitApp = selections.includes("cockpit");
|
|
8422
8818
|
}
|
|
8423
8819
|
if (updatePackages) {
|
|
8424
8820
|
const files = globSync("**/package.json", {
|
|
@@ -8502,6 +8898,30 @@ async function main(options = {}) {
|
|
|
8502
8898
|
log.warn("Some documentation files could not be synced");
|
|
8503
8899
|
}
|
|
8504
8900
|
}
|
|
8901
|
+
if (updateDemoApp) {
|
|
8902
|
+
log.info("\n\u{1F3A8} Syncing demo app...");
|
|
8903
|
+
const result = await syncApp("demo", { dryRun });
|
|
8904
|
+
if (result.synced > 0) {
|
|
8905
|
+
log.success(`Synced ${result.synced} file(s) in apps/demo`);
|
|
8906
|
+
} else if (result.errors === 0) {
|
|
8907
|
+
log.info("Demo app up to date");
|
|
8908
|
+
}
|
|
8909
|
+
if (result.preserved > 0) {
|
|
8910
|
+
log.info(`Preserved ${result.preserved} customized file(s)`);
|
|
8911
|
+
}
|
|
8912
|
+
}
|
|
8913
|
+
if (updateCockpitApp) {
|
|
8914
|
+
log.info("\n\u{1F6F8} Syncing cockpit app...");
|
|
8915
|
+
const result = await syncApp("dndev", { dryRun });
|
|
8916
|
+
if (result.synced > 0) {
|
|
8917
|
+
log.success(`Synced ${result.synced} file(s) in apps/dndev`);
|
|
8918
|
+
} else if (result.errors === 0) {
|
|
8919
|
+
log.info("Cockpit app up to date");
|
|
8920
|
+
}
|
|
8921
|
+
if (result.preserved > 0) {
|
|
8922
|
+
log.info(`Preserved ${result.preserved} customized file(s)`);
|
|
8923
|
+
}
|
|
8924
|
+
}
|
|
8505
8925
|
Se("");
|
|
8506
8926
|
return 0;
|
|
8507
8927
|
}
|
|
@@ -8560,7 +8980,9 @@ ${majorUpdates.length} major update(s) available (manual review required):`
|
|
|
8560
8980
|
for (const [file, packageKeys] of updatedFiles) {
|
|
8561
8981
|
const pkg = parsePackageJson(file);
|
|
8562
8982
|
if (!pkg) {
|
|
8563
|
-
log.warn(
|
|
8983
|
+
log.warn(
|
|
8984
|
+
`Could not parse ${file} \u2014 skipping updates for this file`
|
|
8985
|
+
);
|
|
8564
8986
|
continue;
|
|
8565
8987
|
}
|
|
8566
8988
|
let changed = false;
|