@decantr/cli 1.10.0 → 2.1.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/README.md +4 -1
- package/dist/bin.js +3 -3
- package/dist/{chunk-FLZVSNB5.js → chunk-5QM6XDZU.js} +3230 -3077
- package/dist/{chunk-K5KCZSEI.js → chunk-KGEEYXSU.js} +87 -9
- package/dist/{chunk-USOO77A5.js → chunk-WDA4SHIQ.js} +190 -283
- package/dist/{chunk-RSDCWAHD.js → chunk-X2HIXQAY.js} +9 -6
- package/dist/{chunk-DI2PLOJ6.js → chunk-ZUUJ24YU.js} +418 -180
- package/dist/{heal-5JHGCLDX.js → heal-MQ56WYX4.js} +2 -2
- package/dist/{health-SIKAOE2Z.js → health-DCT625XN.js} +3 -3
- package/dist/index.js +3 -3
- package/dist/{studio-EQSSNA6D.js → studio-CI7OOGHV.js} +21 -4
- package/dist/{upgrade-4NRDVD5N.js → upgrade-PL755AF7.js} +21 -41
- package/package.json +7 -7
- package/src/templates/decantr-health.workflow.yml.template +5 -5
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
scanRoutes,
|
|
11
11
|
scanStyling,
|
|
12
12
|
sendGuardMetrics
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZUUJ24YU.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/heal.ts
|
|
16
16
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
17
17
|
import { join as join2 } from "path";
|
|
18
|
-
import { evaluateGuard,
|
|
18
|
+
import { evaluateGuard, isV4, validateEssence } from "@decantr/essence-spec";
|
|
19
19
|
|
|
20
20
|
// src/brownfield-check.ts
|
|
21
21
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -141,7 +141,9 @@ function scanBrownfieldIssues(projectRoot, essence) {
|
|
|
141
141
|
suggestion: "Run `decantr analyze` to create `.decantr/ambient-context.json` and a proposal-backed report."
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
const hasBrownfieldArtifacts = Boolean(
|
|
144
|
+
const hasBrownfieldArtifacts = Boolean(
|
|
145
|
+
projectJson.initialized?.workflowMode === "brownfield-attach"
|
|
146
|
+
);
|
|
145
147
|
if (hasBrownfieldArtifacts && !existsSync(join(projectRoot, ".decantr", "doctrine-map.json"))) {
|
|
146
148
|
issues.push({
|
|
147
149
|
type: "warning",
|
|
@@ -231,6 +233,7 @@ function collectCheckIssues(projectRoot = process.cwd(), options = {}) {
|
|
|
231
233
|
message: err
|
|
232
234
|
});
|
|
233
235
|
}
|
|
236
|
+
return { essence, issues, missingEssence: false };
|
|
234
237
|
}
|
|
235
238
|
let interactionIssues = [];
|
|
236
239
|
try {
|
|
@@ -255,14 +258,14 @@ function collectCheckIssues(projectRoot = process.cwd(), options = {}) {
|
|
|
255
258
|
}
|
|
256
259
|
if (options.brownfield) {
|
|
257
260
|
try {
|
|
258
|
-
if (
|
|
261
|
+
if (isV4(essence)) {
|
|
259
262
|
const brownfieldIssues = scanBrownfieldIssues(projectRoot, essence);
|
|
260
263
|
issues.push(...brownfieldIssues);
|
|
261
264
|
} else {
|
|
262
265
|
issues.push({
|
|
263
266
|
type: "warning",
|
|
264
267
|
rule: "brownfield-check",
|
|
265
|
-
message: "Brownfield checks require
|
|
268
|
+
message: "Brownfield checks require an Essence v4.0.0 Decantr contract."
|
|
266
269
|
});
|
|
267
270
|
}
|
|
268
271
|
} catch (e) {
|
|
@@ -312,7 +315,7 @@ async function maybeSendTelemetry(projectRoot, essence, issues, options) {
|
|
|
312
315
|
optIn(projectRoot);
|
|
313
316
|
console.log(
|
|
314
317
|
`
|
|
315
|
-
${CYAN}Telemetry enabled.${RESET}
|
|
318
|
+
${CYAN}Telemetry enabled.${RESET} Decantr will send privacy-filtered CLI product telemetry for this project.`
|
|
316
319
|
);
|
|
317
320
|
console.log(`${DIM}Set "telemetry": false in .decantr/project.json to opt out.${RESET}`);
|
|
318
321
|
}
|