@decantr/cli 2.1.0 → 2.1.1
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 +2 -2
- package/dist/{chunk-KGEEYXSU.js → chunk-DPFORHLL.js} +2 -2
- package/dist/{chunk-5QM6XDZU.js → chunk-GOX5EJ56.js} +100 -4
- package/dist/{chunk-ZUUJ24YU.js → chunk-JYEEXSUX.js} +6 -1
- package/dist/{chunk-X2HIXQAY.js → chunk-LLQCXOHK.js} +1 -1
- package/dist/{heal-MQ56WYX4.js → heal-NWQNJ6PU.js} +2 -2
- package/dist/{health-DCT625XN.js → health-WJJ55W3H.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{studio-CI7OOGHV.js → studio-FJNGWWRM.js} +3 -3
- package/package.json +3 -3
package/dist/bin.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collectCheckIssues
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LLQCXOHK.js";
|
|
4
4
|
import {
|
|
5
5
|
sendProjectHealthCiFailedTelemetry,
|
|
6
6
|
sendProjectHealthPromptTelemetry,
|
|
7
7
|
sendProjectHealthReportTelemetry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JYEEXSUX.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/health.ts
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
sendCliCommandTelemetry,
|
|
27
27
|
sendNewProjectCompletedTelemetry,
|
|
28
28
|
writeDoctrineMap
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JYEEXSUX.js";
|
|
30
30
|
|
|
31
31
|
// src/index.ts
|
|
32
32
|
import { existsSync as existsSync26, mkdirSync as mkdirSync12, readdirSync as readdirSync6, readFileSync as readFileSync19, writeFileSync as writeFileSync15 } from "fs";
|
|
@@ -7074,8 +7074,10 @@ ${BOLD6}Usage:${RESET13}
|
|
|
7074
7074
|
decantr registry get-pack <manifest|scaffold|review|section|page|mutation> [id] [--namespace <namespace>] [--json] [--essence <path>] [--write-context]
|
|
7075
7075
|
decantr registry critique-file <file> [--namespace <namespace>] [--json] [--essence <path>] [--treatments <path>]
|
|
7076
7076
|
decantr registry audit-project [--namespace <namespace>] [--json] [--essence <path>] [--dist <path>] [--sources <dir>]
|
|
7077
|
+
decantr health [--format text|json|markdown] [--ci] [--fail-on error|warn|none]
|
|
7077
7078
|
decantr health init-ci [--force] [--project <path>] [--fail-on <error|warn|none>] [--cli-version <version|latest>]
|
|
7078
7079
|
decantr content-health [--json] [--markdown] [--ci]
|
|
7080
|
+
decantr studio [--port 4319] [--host 127.0.0.1]
|
|
7079
7081
|
decantr rules preview [--project=<path>]
|
|
7080
7082
|
decantr rules apply [--project=<path>]
|
|
7081
7083
|
decantr validate [path]
|
|
@@ -7208,6 +7210,88 @@ ${BOLD6}Examples:${RESET13}
|
|
|
7208
7210
|
decantr rules apply --project=apps/web
|
|
7209
7211
|
`);
|
|
7210
7212
|
}
|
|
7213
|
+
function isCommandHelpRequest(args) {
|
|
7214
|
+
return args[1] === "help" || args.slice(1).some((arg) => arg === "--help" || arg === "-h");
|
|
7215
|
+
}
|
|
7216
|
+
function cmdHealthHelp() {
|
|
7217
|
+
console.log(`
|
|
7218
|
+
${BOLD6}decantr health${RESET13} \u2014 Generate a local Project Health report
|
|
7219
|
+
|
|
7220
|
+
${BOLD6}Usage:${RESET13}
|
|
7221
|
+
decantr health [--format text|json|markdown] [--output <file>]
|
|
7222
|
+
decantr health --json
|
|
7223
|
+
decantr health --markdown
|
|
7224
|
+
decantr health --ci [--fail-on error|warn|none]
|
|
7225
|
+
decantr health --prompt <finding-id>
|
|
7226
|
+
decantr health init-ci [--force] [--project <path>] [--fail-on error|warn|none] [--cli-version <version|latest>]
|
|
7227
|
+
|
|
7228
|
+
${BOLD6}Options:${RESET13}
|
|
7229
|
+
--format Output format: text, json, or markdown
|
|
7230
|
+
--json Emit JSON report
|
|
7231
|
+
--markdown Emit markdown report
|
|
7232
|
+
--output Write the selected report format to a file
|
|
7233
|
+
--ci Enable CI exit-code behavior
|
|
7234
|
+
--fail-on CI threshold: error, warn, or none
|
|
7235
|
+
--prompt Print an AI-ready remediation prompt for a finding
|
|
7236
|
+
|
|
7237
|
+
${BOLD6}Examples:${RESET13}
|
|
7238
|
+
decantr health
|
|
7239
|
+
decantr health --json
|
|
7240
|
+
decantr health --markdown --output decantr-health.md
|
|
7241
|
+
decantr health --ci --fail-on error
|
|
7242
|
+
decantr health --prompt audit-essence-missing
|
|
7243
|
+
decantr health init-ci --project apps/web
|
|
7244
|
+
`);
|
|
7245
|
+
}
|
|
7246
|
+
function cmdContentHealthHelp() {
|
|
7247
|
+
console.log(`
|
|
7248
|
+
${BOLD6}decantr content-health${RESET13} \u2014 Generate a local registry content health report
|
|
7249
|
+
|
|
7250
|
+
${BOLD6}Usage:${RESET13}
|
|
7251
|
+
decantr content-health [--format text|json|markdown] [--output <file>]
|
|
7252
|
+
decantr content-health --json
|
|
7253
|
+
decantr content-health --markdown
|
|
7254
|
+
decantr content-health --ci [--fail-on error|warn|none]
|
|
7255
|
+
decantr content-health --prompt <finding-id>
|
|
7256
|
+
|
|
7257
|
+
${BOLD6}Options:${RESET13}
|
|
7258
|
+
--format Output format: text, json, or markdown
|
|
7259
|
+
--json Emit JSON report
|
|
7260
|
+
--markdown Emit markdown report
|
|
7261
|
+
--output Write the selected report format to a file
|
|
7262
|
+
--ci Enable CI exit-code behavior
|
|
7263
|
+
--fail-on CI threshold: error, warn, or none
|
|
7264
|
+
--prompt Print an AI-ready remediation prompt for a finding
|
|
7265
|
+
|
|
7266
|
+
${BOLD6}Examples:${RESET13}
|
|
7267
|
+
decantr content-health
|
|
7268
|
+
decantr content-health --json
|
|
7269
|
+
decantr content-health --markdown --output content-health.md
|
|
7270
|
+
decantr content-health --ci --fail-on error
|
|
7271
|
+
`);
|
|
7272
|
+
}
|
|
7273
|
+
function cmdStudioHelp() {
|
|
7274
|
+
console.log(`
|
|
7275
|
+
${BOLD6}decantr studio${RESET13} \u2014 Run a local Project Health dashboard
|
|
7276
|
+
|
|
7277
|
+
${BOLD6}Usage:${RESET13}
|
|
7278
|
+
decantr studio [--port 4319] [--host 127.0.0.1]
|
|
7279
|
+
|
|
7280
|
+
${BOLD6}Options:${RESET13}
|
|
7281
|
+
--port Local port to bind; defaults to 4319
|
|
7282
|
+
--host Local host to bind; defaults to 127.0.0.1
|
|
7283
|
+
|
|
7284
|
+
${BOLD6}Endpoints:${RESET13}
|
|
7285
|
+
GET /
|
|
7286
|
+
GET /api/health
|
|
7287
|
+
POST /api/refresh
|
|
7288
|
+
|
|
7289
|
+
${BOLD6}Examples:${RESET13}
|
|
7290
|
+
decantr studio
|
|
7291
|
+
decantr studio --port 4320
|
|
7292
|
+
decantr studio --host 127.0.0.1 --port 4319
|
|
7293
|
+
`);
|
|
7294
|
+
}
|
|
7211
7295
|
async function main() {
|
|
7212
7296
|
const args = process.argv.slice(2);
|
|
7213
7297
|
const command = args[0];
|
|
@@ -7333,7 +7417,7 @@ async function main() {
|
|
|
7333
7417
|
`${YELLOW9}Note: \`decantr heal\` is deprecated. Use \`decantr check\` instead.${RESET13}`
|
|
7334
7418
|
);
|
|
7335
7419
|
}
|
|
7336
|
-
const { cmdHeal } = await import("./heal-
|
|
7420
|
+
const { cmdHeal } = await import("./heal-NWQNJ6PU.js");
|
|
7337
7421
|
const telemetryFlag = args.includes("--telemetry");
|
|
7338
7422
|
const brownfieldFlag = args.includes("--brownfield");
|
|
7339
7423
|
await cmdHeal(process.cwd(), { telemetry: telemetryFlag, brownfield: brownfieldFlag });
|
|
@@ -7341,7 +7425,11 @@ async function main() {
|
|
|
7341
7425
|
}
|
|
7342
7426
|
case "health": {
|
|
7343
7427
|
try {
|
|
7344
|
-
|
|
7428
|
+
if (isCommandHelpRequest(args)) {
|
|
7429
|
+
cmdHealthHelp();
|
|
7430
|
+
break;
|
|
7431
|
+
}
|
|
7432
|
+
const { cmdHealth, parseHealthArgs } = await import("./health-WJJ55W3H.js");
|
|
7345
7433
|
await cmdHealth(process.cwd(), parseHealthArgs(args));
|
|
7346
7434
|
} catch (e) {
|
|
7347
7435
|
console.error(error3(e.message));
|
|
@@ -7351,6 +7439,10 @@ async function main() {
|
|
|
7351
7439
|
}
|
|
7352
7440
|
case "content-health": {
|
|
7353
7441
|
try {
|
|
7442
|
+
if (isCommandHelpRequest(args)) {
|
|
7443
|
+
cmdContentHealthHelp();
|
|
7444
|
+
break;
|
|
7445
|
+
}
|
|
7354
7446
|
const { cmdContentHealth, parseContentHealthArgs } = await import("./content-health-QQHBR6XG.js");
|
|
7355
7447
|
await cmdContentHealth(process.cwd(), parseContentHealthArgs(args));
|
|
7356
7448
|
} catch (e) {
|
|
@@ -7361,7 +7453,11 @@ async function main() {
|
|
|
7361
7453
|
}
|
|
7362
7454
|
case "studio": {
|
|
7363
7455
|
try {
|
|
7364
|
-
|
|
7456
|
+
if (isCommandHelpRequest(args)) {
|
|
7457
|
+
cmdStudioHelp();
|
|
7458
|
+
break;
|
|
7459
|
+
}
|
|
7460
|
+
const { cmdStudio, parseStudioArgs } = await import("./studio-FJNGWWRM.js");
|
|
7365
7461
|
await cmdStudio(process.cwd(), parseStudioArgs(args));
|
|
7366
7462
|
} catch (e) {
|
|
7367
7463
|
console.error(error3(e.message));
|
|
@@ -90,7 +90,7 @@ async function captureCliTelemetryEvent(input) {
|
|
|
90
90
|
async function sendCliCommandTelemetry(input) {
|
|
91
91
|
const projectRoot = resolveCliTelemetryProjectRoot(input.projectRoot ?? process.cwd(), input.args);
|
|
92
92
|
const command = normalizeCommand(input.args[0]);
|
|
93
|
-
if (!isOptedIn(projectRoot) || !command || command === "help" || command === "version") {
|
|
93
|
+
if (!isOptedIn(projectRoot) || !command || command === "help" || command === "version" || isHelpOrVersionProbe(input.args)) {
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
const properties = buildCliLifecycleProperties({
|
|
@@ -395,6 +395,11 @@ function normalizeCommand(command) {
|
|
|
395
395
|
if (command === "--version" || command === "-v") return "version";
|
|
396
396
|
return command;
|
|
397
397
|
}
|
|
398
|
+
function isHelpOrVersionProbe(args) {
|
|
399
|
+
if (args.some((arg) => arg === "--help" || arg === "-h")) return true;
|
|
400
|
+
if (args[1] === "help") return true;
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
398
403
|
function inferFlagValue(args, flag) {
|
|
399
404
|
const equalsPrefix = `${flag}=`;
|
|
400
405
|
const inline = args.find((arg) => arg.startsWith(equalsPrefix));
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
renderProjectHealthCiWorkflow,
|
|
9
9
|
shouldFailHealth,
|
|
10
10
|
writeProjectHealthCiWorkflow
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-DPFORHLL.js";
|
|
12
|
+
import "./chunk-LLQCXOHK.js";
|
|
13
|
+
import "./chunk-JYEEXSUX.js";
|
|
14
14
|
export {
|
|
15
15
|
cmdHealth,
|
|
16
16
|
createProjectHealthReport,
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-GOX5EJ56.js";
|
|
2
2
|
import "./chunk-WDA4SHIQ.js";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-JYEEXSUX.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProjectHealthReport
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-DPFORHLL.js";
|
|
4
|
+
import "./chunk-LLQCXOHK.js";
|
|
5
5
|
import {
|
|
6
6
|
sendStudioHealthRefreshedTelemetry,
|
|
7
7
|
sendStudioStartedTelemetry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JYEEXSUX.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/studio.ts
|
|
11
11
|
import { createServer } from "http";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decantr/cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Decantr CLI - scaffold, audit, inspect Project Health, and maintain Decantr projects from the terminal",
|
|
5
5
|
"author": "Decantr AI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ajv": "^8.20.0",
|
|
34
34
|
"@decantr/core": "2.0.0",
|
|
35
|
-
"@decantr/
|
|
35
|
+
"@decantr/telemetry": "2.1.0",
|
|
36
36
|
"@decantr/registry": "2.0.0",
|
|
37
37
|
"@decantr/verifier": "2.0.0",
|
|
38
|
-
"@decantr/
|
|
38
|
+
"@decantr/essence-spec": "2.0.1"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsup",
|