@decantr/cli 3.5.1 → 3.5.3
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-PM7DKABI.js → chunk-4WT6AVKO.js} +14 -0
- package/dist/{chunk-MDQSTAP5.js → chunk-FE3N5MAO.js} +1 -1
- package/dist/{chunk-S3ZDXBRM.js → chunk-KFGL6DVJ.js} +30 -15
- package/dist/{chunk-EUEQMXN5.js → chunk-SUB3F5RO.js} +2 -2
- package/dist/{heal-YXWB6LTI.js → heal-M6V2I6DB.js} +1 -1
- package/dist/{health-5S2L44SX.js → health-RIOSZEJP.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/{studio-EN347SLA.js → studio-7JSGAGVX.js} +3 -3
- package/dist/{workspace-UIKTIWUN.js → workspace-PFUW4W65.js} +3 -3
- package/package.json +4 -4
package/dist/bin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-KFGL6DVJ.js";
|
|
3
3
|
import "./chunk-SIDKK73N.js";
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-FE3N5MAO.js";
|
|
5
|
+
import "./chunk-SUB3F5RO.js";
|
|
6
|
+
import "./chunk-4WT6AVKO.js";
|
|
@@ -508,6 +508,9 @@ function scanReactRouter(projectRoot) {
|
|
|
508
508
|
pathMatches.add(match[1]);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
+
for (const route of detectDeclarativeRouteSpecRoutes(content)) {
|
|
512
|
+
pathMatches.add(route);
|
|
513
|
+
}
|
|
511
514
|
for (const route of detectPathnameBranchRoutes(content)) {
|
|
512
515
|
pathMatches.add(route);
|
|
513
516
|
}
|
|
@@ -569,6 +572,17 @@ function detectPathnameBranchRoutes(content) {
|
|
|
569
572
|
}
|
|
570
573
|
return [...routes];
|
|
571
574
|
}
|
|
575
|
+
function detectDeclarativeRouteSpecRoutes(content) {
|
|
576
|
+
const routes = /* @__PURE__ */ new Set();
|
|
577
|
+
const hasRouteSpecSignal = content.includes("@wasp.sh/spec") || /\b(?:const|export\s+const)\s+\w*Spec\b/.test(content) || /\bapp\s*\(\s*\{[\s\S]*\bspec\s*:/.test(content);
|
|
578
|
+
if (!hasRouteSpecSignal) return [];
|
|
579
|
+
collectRouteLiterals(
|
|
580
|
+
/\broute\s*\(\s*["'`][^"'`]*["'`]\s*,\s*["'`](\/[^"'`]*)["'`]\s*,\s*page\s*\(/g,
|
|
581
|
+
content,
|
|
582
|
+
routes
|
|
583
|
+
);
|
|
584
|
+
return [...routes];
|
|
585
|
+
}
|
|
572
586
|
function hasReactRouterDependency(projectRoot) {
|
|
573
587
|
return hasDependency(projectRoot, ["react-router", "react-router-dom"]);
|
|
574
588
|
}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
listWorkspaceCandidates,
|
|
23
23
|
listWorkspaceProjects,
|
|
24
24
|
shouldFailWorkspaceHealth
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FE3N5MAO.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-SUB3F5RO.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-4WT6AVKO.js";
|
|
73
73
|
|
|
74
74
|
// src/index.ts
|
|
75
75
|
import { existsSync as existsSync29, mkdirSync as mkdirSync16, readdirSync as readdirSync8, readFileSync as readFileSync22, writeFileSync as writeFileSync19 } from "fs";
|
|
@@ -4474,13 +4474,16 @@ function inspectGraphArtifacts(appRoot, workspaceRoot) {
|
|
|
4474
4474
|
};
|
|
4475
4475
|
}
|
|
4476
4476
|
}
|
|
4477
|
-
function
|
|
4478
|
-
let projectArg;
|
|
4477
|
+
function parseDoctorProjectArg(args) {
|
|
4479
4478
|
for (let index = 1; index < args.length; index += 1) {
|
|
4480
4479
|
const arg = args[index];
|
|
4481
|
-
if (arg === "--project" && args[index + 1])
|
|
4482
|
-
|
|
4480
|
+
if (arg === "--project" && args[index + 1]) return args[index + 1];
|
|
4481
|
+
if (arg.startsWith("--project=")) return arg.slice("--project=".length);
|
|
4483
4482
|
}
|
|
4483
|
+
return void 0;
|
|
4484
|
+
}
|
|
4485
|
+
function buildDoctorReport(root, args) {
|
|
4486
|
+
const projectArg = parseDoctorProjectArg(args);
|
|
4484
4487
|
const workspaceMode = args.includes("--workspace");
|
|
4485
4488
|
const workspaceInfo = resolveWorkspaceInfo(root, projectArg);
|
|
4486
4489
|
const workspaceRoot = workspaceInfo.workspaceRoot;
|
|
@@ -4843,6 +4846,18 @@ ${BOLD3}Examples:${RESET4}
|
|
|
4843
4846
|
`);
|
|
4844
4847
|
}
|
|
4845
4848
|
async function cmdDoctor(args = ["doctor"], root = process.cwd()) {
|
|
4849
|
+
const projectArg = parseDoctorProjectArg(args);
|
|
4850
|
+
const workspaceMode = args.includes("--workspace");
|
|
4851
|
+
if (projectArg && !args.includes("--json")) {
|
|
4852
|
+
const workspaceInfo = resolveWorkspaceInfo(root, projectArg);
|
|
4853
|
+
const appRoot = workspaceMode ? workspaceInfo.workspaceRoot : workspaceInfo.appRoot;
|
|
4854
|
+
if (!existsSync15(appRoot)) {
|
|
4855
|
+
console.error(`${RED3}Project path does not exist: ${projectArg}${RESET4}`);
|
|
4856
|
+
console.error(`${DIM4}Run decantr workspace list to see detected app candidates.${RESET4}`);
|
|
4857
|
+
process.exitCode = 1;
|
|
4858
|
+
return;
|
|
4859
|
+
}
|
|
4860
|
+
}
|
|
4846
4861
|
const report = buildDoctorReport(root, args);
|
|
4847
4862
|
if (args.includes("--json")) {
|
|
4848
4863
|
console.log(JSON.stringify(report, null, 2));
|
|
@@ -11058,7 +11073,7 @@ async function cmdAdoptWorkflow(args) {
|
|
|
11058
11073
|
await cmdGraph(projectRoot, { displayRoot: process.cwd() });
|
|
11059
11074
|
if (process.exitCode && process.exitCode !== 0) return;
|
|
11060
11075
|
if (runVerify) {
|
|
11061
|
-
const { cmdHealth } = await import("./health-
|
|
11076
|
+
const { cmdHealth } = await import("./health-RIOSZEJP.js");
|
|
11062
11077
|
await cmdHealth(projectRoot, {
|
|
11063
11078
|
browser: runBrowser,
|
|
11064
11079
|
browserBaseUrl: baseUrl,
|
|
@@ -11132,7 +11147,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
11132
11147
|
return;
|
|
11133
11148
|
}
|
|
11134
11149
|
if (workspaceMode) {
|
|
11135
|
-
const { cmdWorkspace } = await import("./workspace-
|
|
11150
|
+
const { cmdWorkspace } = await import("./workspace-PFUW4W65.js");
|
|
11136
11151
|
await cmdWorkspace(process.cwd(), ["workspace", "health", ...withoutWorkflowOnlyFlags(args)]);
|
|
11137
11152
|
return;
|
|
11138
11153
|
}
|
|
@@ -11165,7 +11180,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
11165
11180
|
}
|
|
11166
11181
|
let guardExitCode;
|
|
11167
11182
|
if (brownfield) {
|
|
11168
|
-
const { cmdHeal, collectCheckIssues } = await import("./heal-
|
|
11183
|
+
const { cmdHeal, collectCheckIssues } = await import("./heal-M6V2I6DB.js");
|
|
11169
11184
|
if (quietOutput) {
|
|
11170
11185
|
const result = collectCheckIssues(workspaceInfo.appRoot, { brownfield: true });
|
|
11171
11186
|
guardExitCode = result.issues.some((issue) => issue.type === "error") ? 1 : void 0;
|
|
@@ -11175,7 +11190,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
11175
11190
|
process.exitCode = void 0;
|
|
11176
11191
|
}
|
|
11177
11192
|
}
|
|
11178
|
-
const { cmdHealth, parseHealthArgs } = await import("./health-
|
|
11193
|
+
const { cmdHealth, parseHealthArgs } = await import("./health-RIOSZEJP.js");
|
|
11179
11194
|
await cmdHealth(workspaceInfo.appRoot, parseHealthArgs(healthArgs));
|
|
11180
11195
|
if (localPatterns) {
|
|
11181
11196
|
const validation = validateLocalLaw(workspaceInfo.appRoot);
|
|
@@ -12812,7 +12827,7 @@ async function main() {
|
|
|
12812
12827
|
`${YELLOW13}Note: \`decantr heal\` is deprecated. Use \`decantr check\` instead.${RESET17}`
|
|
12813
12828
|
);
|
|
12814
12829
|
}
|
|
12815
|
-
const { cmdHeal } = await import("./heal-
|
|
12830
|
+
const { cmdHeal } = await import("./heal-M6V2I6DB.js");
|
|
12816
12831
|
const { flags } = parseLooseArgs(args);
|
|
12817
12832
|
const workspaceInfo = resolveWorkflowProject(flags, "check");
|
|
12818
12833
|
if (!workspaceInfo) break;
|
|
@@ -12837,7 +12852,7 @@ async function main() {
|
|
|
12837
12852
|
const { flags } = parseLooseArgs(args);
|
|
12838
12853
|
const workspaceInfo = resolveWorkflowProject(flags, "health");
|
|
12839
12854
|
if (!workspaceInfo) break;
|
|
12840
|
-
const { cmdHealth, parseHealthArgs } = await import("./health-
|
|
12855
|
+
const { cmdHealth, parseHealthArgs } = await import("./health-RIOSZEJP.js");
|
|
12841
12856
|
await cmdHealth(workspaceInfo.appRoot, parseHealthArgs(stripProjectArgs(args)));
|
|
12842
12857
|
} catch (e) {
|
|
12843
12858
|
console.error(error2(e.message));
|
|
@@ -12865,7 +12880,7 @@ async function main() {
|
|
|
12865
12880
|
cmdStudioHelp();
|
|
12866
12881
|
break;
|
|
12867
12882
|
}
|
|
12868
|
-
const { cmdStudio, parseStudioArgs } = await import("./studio-
|
|
12883
|
+
const { cmdStudio, parseStudioArgs } = await import("./studio-7JSGAGVX.js");
|
|
12869
12884
|
await cmdStudio(process.cwd(), parseStudioArgs(args));
|
|
12870
12885
|
} catch (e) {
|
|
12871
12886
|
console.error(error2(e.message));
|
|
@@ -12879,7 +12894,7 @@ async function main() {
|
|
|
12879
12894
|
cmdWorkspaceHelp();
|
|
12880
12895
|
break;
|
|
12881
12896
|
}
|
|
12882
|
-
const { cmdWorkspace } = await import("./workspace-
|
|
12897
|
+
const { cmdWorkspace } = await import("./workspace-PFUW4W65.js");
|
|
12883
12898
|
await cmdWorkspace(process.cwd(), args);
|
|
12884
12899
|
} catch (e) {
|
|
12885
12900
|
console.error(error2(e.message));
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
sendProjectHealthCiFailedTelemetry,
|
|
4
4
|
sendProjectHealthPromptTelemetry,
|
|
5
5
|
sendProjectHealthReportTelemetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4WT6AVKO.js";
|
|
7
7
|
|
|
8
8
|
// src/commands/health.ts
|
|
9
9
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -1836,7 +1836,7 @@ function pathAliasTargetCandidates(source, config) {
|
|
|
1836
1836
|
if (!source.startsWith(prefix) || !source.endsWith(suffix)) continue;
|
|
1837
1837
|
const matched = source.slice(prefix.length, source.length - suffix.length);
|
|
1838
1838
|
for (const target of alias.targets) {
|
|
1839
|
-
candidates.push(target.
|
|
1839
|
+
candidates.push(target.split("*").join(matched));
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
1842
|
if (config.baseUrl) {
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
renderProjectHealthCiWorkflow,
|
|
14
14
|
shouldFailHealth,
|
|
15
15
|
writeProjectHealthCiWorkflow
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-SUB3F5RO.js";
|
|
17
|
+
import "./chunk-4WT6AVKO.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-KFGL6DVJ.js";
|
|
2
2
|
import "./chunk-SIDKK73N.js";
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-FE3N5MAO.js";
|
|
4
|
+
import "./chunk-SUB3F5RO.js";
|
|
5
|
+
import "./chunk-4WT6AVKO.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkspaceHealthReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FE3N5MAO.js";
|
|
4
4
|
import {
|
|
5
5
|
createProjectHealthReport
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SUB3F5RO.js";
|
|
7
7
|
import {
|
|
8
8
|
sendStudioHealthRefreshedTelemetry,
|
|
9
9
|
sendStudioStartedTelemetry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4WT6AVKO.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/studio.ts
|
|
13
13
|
import { existsSync, 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-FE3N5MAO.js";
|
|
11
|
+
import "./chunk-SUB3F5RO.js";
|
|
12
|
+
import "./chunk-4WT6AVKO.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.5.
|
|
3
|
+
"version": "3.5.3",
|
|
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/essence-spec": "3.4.0",
|
|
52
53
|
"@decantr/core": "3.5.0",
|
|
54
|
+
"@decantr/verifier": "3.5.3",
|
|
53
55
|
"@decantr/registry": "3.4.0",
|
|
54
|
-
"@decantr/telemetry": "3.4.0"
|
|
55
|
-
"@decantr/verifier": "3.5.0",
|
|
56
|
-
"@decantr/essence-spec": "3.4.0"
|
|
56
|
+
"@decantr/telemetry": "3.4.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsup",
|