@decantr/cli 3.0.2 → 3.4.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/dist/bin.js +4 -4
- package/dist/{chunk-B2PJDAMS.js → chunk-EL4KSW7E.js} +1 -1
- package/dist/{chunk-7Z74ETDR.js → chunk-XINHWP4T.js} +141 -15
- package/dist/{chunk-4NDOHCYY.js → chunk-XUHPMETF.js} +547 -55
- package/dist/{chunk-GN63PIKK.js → chunk-ZBGL7RID.js} +44 -13
- package/dist/{heal-HHVVTVIH.js → heal-ZY4BX5HU.js} +1 -1
- package/dist/{health-DDT4RABT.js → health-H2256NIM.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/{studio-WDJ3BOCU.js → studio-UKSCSRX7.js} +3 -3
- package/dist/{workspace-3XNCMZ5L.js → workspace-SR6ZGG2E.js} +3 -3
- package/package.json +6 -6
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
listWorkspaceCandidates,
|
|
23
23
|
listWorkspaceProjects,
|
|
24
24
|
shouldFailWorkspaceHealth
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EL4KSW7E.js";
|
|
26
26
|
import {
|
|
27
27
|
acceptBrownfieldLocalLaw,
|
|
28
28
|
acceptStyleBridge,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
writeBrownfieldCodifyProposal,
|
|
53
53
|
writeHostedPatternMappingProposal,
|
|
54
54
|
writeStyleBridgeProposal
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-XUHPMETF.js";
|
|
56
56
|
import {
|
|
57
57
|
buildGuardRegistryContext,
|
|
58
58
|
createDoctrineMap,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
sendCliCommandTelemetry,
|
|
70
70
|
sendNewProjectCompletedTelemetry,
|
|
71
71
|
writeDoctrineMap
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-XINHWP4T.js";
|
|
73
73
|
|
|
74
74
|
// src/index.ts
|
|
75
75
|
import { existsSync as existsSync28, mkdirSync as mkdirSync15, readdirSync as readdirSync8, readFileSync as readFileSync21, writeFileSync as writeFileSync18 } from "fs";
|
|
@@ -1523,6 +1523,35 @@ function doctrineEffects(ambient) {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
return Object.keys(effects).length > 0 ? effects : void 0;
|
|
1525
1525
|
}
|
|
1526
|
+
function readRouteSource(projectRoot, file) {
|
|
1527
|
+
if (!file || file === ".") return "";
|
|
1528
|
+
try {
|
|
1529
|
+
return readFileSync4(join5(projectRoot, file), "utf-8");
|
|
1530
|
+
} catch {
|
|
1531
|
+
return "";
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
function publicSurfaceShell(input, code) {
|
|
1535
|
+
const hasFooter = input.layout.hasFooter || /\bfooter\b|<\s*Footer\b/i.test(code);
|
|
1536
|
+
const hasTopNav = input.layout.hasTopNav || /\b(?:topnav|top-nav|navbar|header)\b|<\s*(?:Header|Nav|Navbar)\b/i.test(code);
|
|
1537
|
+
if (hasTopNav && hasFooter) return "topnav-main-footer";
|
|
1538
|
+
if (hasTopNav) return "topnav-main";
|
|
1539
|
+
if (hasFooter) return "main-footer";
|
|
1540
|
+
return "main-only";
|
|
1541
|
+
}
|
|
1542
|
+
function routeShellPattern(input, route, classified, fallbackShell) {
|
|
1543
|
+
const code = readRouteSource(input.project.projectRoot, route.file);
|
|
1544
|
+
const routeEvidence = `${route.path} ${route.file} ${code}`;
|
|
1545
|
+
if (classified.role === "public" || /\b(?:pricing|plans|marketing|landing|public|hero|full-bleed|fullbleed|marketing-bleed)\b/i.test(
|
|
1546
|
+
routeEvidence
|
|
1547
|
+
)) {
|
|
1548
|
+
return publicSurfaceShell(input, code);
|
|
1549
|
+
}
|
|
1550
|
+
if (/\b(?:sidebar|side-nav|sidenav|app-frame|dashboard-shell)\b/i.test(routeEvidence)) {
|
|
1551
|
+
return fallbackShell;
|
|
1552
|
+
}
|
|
1553
|
+
return fallbackShell;
|
|
1554
|
+
}
|
|
1526
1555
|
function createBrownfieldProposal(input) {
|
|
1527
1556
|
const target = input.project.framework !== "unknown" ? input.project.framework : "generic-web";
|
|
1528
1557
|
const shell = input.layout.shellPattern || "observed-existing-shell";
|
|
@@ -1531,10 +1560,11 @@ function createBrownfieldProposal(input) {
|
|
|
1531
1560
|
const observedRoutes = input.routes.routes.length > 0 ? input.routes.routes : [{ path: "/", file: ".", hasLayout: false }];
|
|
1532
1561
|
for (const route of observedRoutes) {
|
|
1533
1562
|
const classified = routeDomain(route.path);
|
|
1563
|
+
const observedShell = routeShellPattern(input, route, classified, shell);
|
|
1534
1564
|
const section = sectionMap.get(classified.sectionId) ?? {
|
|
1535
1565
|
id: classified.sectionId,
|
|
1536
1566
|
role: classified.role,
|
|
1537
|
-
shell,
|
|
1567
|
+
shell: observedShell,
|
|
1538
1568
|
features: featuresForSection(classified.sectionId, input.features.detected),
|
|
1539
1569
|
description: classified.description,
|
|
1540
1570
|
pages: [],
|
|
@@ -1550,7 +1580,8 @@ function createBrownfieldProposal(input) {
|
|
|
1550
1580
|
route: route.path,
|
|
1551
1581
|
layout: ["existing-surface"],
|
|
1552
1582
|
directives: [
|
|
1553
|
-
`Observed source: ${route.file}. Treat this route as existing product surface, not scaffold territory
|
|
1583
|
+
`Observed source: ${route.file}. Treat this route as existing product surface, not scaffold territory.`,
|
|
1584
|
+
`Observed shell: ${observedShell}. Preserve this route's shell posture unless the user explicitly approves a layout migration.`
|
|
1554
1585
|
]
|
|
1555
1586
|
});
|
|
1556
1587
|
}
|
|
@@ -10828,7 +10859,7 @@ async function cmdAdoptWorkflow(args) {
|
|
|
10828
10859
|
await cmdGraph(projectRoot, { displayRoot: process.cwd() });
|
|
10829
10860
|
if (process.exitCode && process.exitCode !== 0) return;
|
|
10830
10861
|
if (runVerify) {
|
|
10831
|
-
const { cmdHealth } = await import("./health-
|
|
10862
|
+
const { cmdHealth } = await import("./health-H2256NIM.js");
|
|
10832
10863
|
await cmdHealth(projectRoot, {
|
|
10833
10864
|
browser: runBrowser,
|
|
10834
10865
|
browserBaseUrl: baseUrl,
|
|
@@ -10899,7 +10930,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
10899
10930
|
return;
|
|
10900
10931
|
}
|
|
10901
10932
|
if (workspaceMode) {
|
|
10902
|
-
const { cmdWorkspace } = await import("./workspace-
|
|
10933
|
+
const { cmdWorkspace } = await import("./workspace-SR6ZGG2E.js");
|
|
10903
10934
|
await cmdWorkspace(process.cwd(), ["workspace", "health", ...withoutWorkflowOnlyFlags(args)]);
|
|
10904
10935
|
return;
|
|
10905
10936
|
}
|
|
@@ -10932,7 +10963,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
10932
10963
|
}
|
|
10933
10964
|
let guardExitCode;
|
|
10934
10965
|
if (brownfield) {
|
|
10935
|
-
const { cmdHeal, collectCheckIssues } = await import("./heal-
|
|
10966
|
+
const { cmdHeal, collectCheckIssues } = await import("./heal-ZY4BX5HU.js");
|
|
10936
10967
|
if (quietOutput) {
|
|
10937
10968
|
const result = collectCheckIssues(workspaceInfo.appRoot, { brownfield: true });
|
|
10938
10969
|
guardExitCode = result.issues.some((issue) => issue.type === "error") ? 1 : void 0;
|
|
@@ -10942,7 +10973,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
10942
10973
|
process.exitCode = void 0;
|
|
10943
10974
|
}
|
|
10944
10975
|
}
|
|
10945
|
-
const { cmdHealth, parseHealthArgs } = await import("./health-
|
|
10976
|
+
const { cmdHealth, parseHealthArgs } = await import("./health-H2256NIM.js");
|
|
10946
10977
|
await cmdHealth(workspaceInfo.appRoot, parseHealthArgs(healthArgs));
|
|
10947
10978
|
if (localPatterns) {
|
|
10948
10979
|
const validation = validateLocalLaw(workspaceInfo.appRoot);
|
|
@@ -12445,7 +12476,7 @@ async function main() {
|
|
|
12445
12476
|
`${YELLOW12}Note: \`decantr heal\` is deprecated. Use \`decantr check\` instead.${RESET16}`
|
|
12446
12477
|
);
|
|
12447
12478
|
}
|
|
12448
|
-
const { cmdHeal } = await import("./heal-
|
|
12479
|
+
const { cmdHeal } = await import("./heal-ZY4BX5HU.js");
|
|
12449
12480
|
const { flags } = parseLooseArgs(args);
|
|
12450
12481
|
const workspaceInfo = resolveWorkflowProject(flags, "check");
|
|
12451
12482
|
if (!workspaceInfo) break;
|
|
@@ -12470,7 +12501,7 @@ async function main() {
|
|
|
12470
12501
|
const { flags } = parseLooseArgs(args);
|
|
12471
12502
|
const workspaceInfo = resolveWorkflowProject(flags, "health");
|
|
12472
12503
|
if (!workspaceInfo) break;
|
|
12473
|
-
const { cmdHealth, parseHealthArgs } = await import("./health-
|
|
12504
|
+
const { cmdHealth, parseHealthArgs } = await import("./health-H2256NIM.js");
|
|
12474
12505
|
await cmdHealth(workspaceInfo.appRoot, parseHealthArgs(stripProjectArgs(args)));
|
|
12475
12506
|
} catch (e) {
|
|
12476
12507
|
console.error(error2(e.message));
|
|
@@ -12498,7 +12529,7 @@ async function main() {
|
|
|
12498
12529
|
cmdStudioHelp();
|
|
12499
12530
|
break;
|
|
12500
12531
|
}
|
|
12501
|
-
const { cmdStudio, parseStudioArgs } = await import("./studio-
|
|
12532
|
+
const { cmdStudio, parseStudioArgs } = await import("./studio-UKSCSRX7.js");
|
|
12502
12533
|
await cmdStudio(process.cwd(), parseStudioArgs(args));
|
|
12503
12534
|
} catch (e) {
|
|
12504
12535
|
console.error(error2(e.message));
|
|
@@ -12512,7 +12543,7 @@ async function main() {
|
|
|
12512
12543
|
cmdWorkspaceHelp();
|
|
12513
12544
|
break;
|
|
12514
12545
|
}
|
|
12515
|
-
const { cmdWorkspace } = await import("./workspace-
|
|
12546
|
+
const { cmdWorkspace } = await import("./workspace-SR6ZGG2E.js");
|
|
12516
12547
|
await cmdWorkspace(process.cwd(), args);
|
|
12517
12548
|
} catch (e) {
|
|
12518
12549
|
console.error(error2(e.message));
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
renderProjectHealthCiWorkflow,
|
|
14
14
|
shouldFailHealth,
|
|
15
15
|
writeProjectHealthCiWorkflow
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-XUHPMETF.js";
|
|
17
|
+
import "./chunk-XINHWP4T.js";
|
|
18
18
|
export {
|
|
19
19
|
cmdHealth,
|
|
20
20
|
collectDesignTokenEvidence,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-ZBGL7RID.js";
|
|
2
2
|
import "./chunk-SIDKK73N.js";
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-EL4KSW7E.js";
|
|
4
|
+
import "./chunk-XUHPMETF.js";
|
|
5
|
+
import "./chunk-XINHWP4T.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkspaceHealthReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EL4KSW7E.js";
|
|
4
4
|
import {
|
|
5
5
|
createProjectHealthReport
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XUHPMETF.js";
|
|
7
7
|
import {
|
|
8
8
|
sendStudioHealthRefreshedTelemetry,
|
|
9
9
|
sendStudioStartedTelemetry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XINHWP4T.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/studio.ts
|
|
13
13
|
import { readFileSync } from "fs";
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
listWorkspaceProjects,
|
|
8
8
|
parseWorkspaceArgs,
|
|
9
9
|
shouldFailWorkspaceHealth
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-EL4KSW7E.js";
|
|
11
|
+
import "./chunk-XUHPMETF.js";
|
|
12
|
+
import "./chunk-XINHWP4T.js";
|
|
13
13
|
export {
|
|
14
14
|
cmdWorkspace,
|
|
15
15
|
createWorkspaceHealthReport,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decantr/cli",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Decantr CLI - adopt, verify, graph, and govern frontend codebases touched by AI agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decantr",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"ajv": "^8.20.0",
|
|
52
|
-
"@decantr/core": "3.0
|
|
53
|
-
"@decantr/
|
|
54
|
-
"@decantr/
|
|
55
|
-
"@decantr/
|
|
56
|
-
"@decantr/
|
|
52
|
+
"@decantr/core": "3.4.0",
|
|
53
|
+
"@decantr/telemetry": "3.4.0",
|
|
54
|
+
"@decantr/registry": "3.4.0",
|
|
55
|
+
"@decantr/verifier": "3.4.0",
|
|
56
|
+
"@decantr/essence-spec": "3.4.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsup",
|