@cms-lab/cli 1.2.5 → 1.2.6
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 +2 -0
- package/dist/bin.js +1 -1
- package/dist/{chunk-4XXHRNEA.js → chunk-3XQEUDBT.js} +28 -1
- package/dist/index.js +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -59,6 +59,8 @@ CI strictness can be raised with `--fail-on warning`, `--max-warnings <count>`,
|
|
|
59
59
|
Exports include local HTML (`--report`), share-safe local HTML
|
|
60
60
|
(`--report --share-report`), Markdown (`--markdown`), JUnit XML (`--junit`),
|
|
61
61
|
and redacted Slack incoming webhook summaries (`--slack-webhook <url>`).
|
|
62
|
+
Terminal, JSON, Markdown, and HTML outputs include repeated-finding summaries
|
|
63
|
+
when many documents hit the same content type/template issue.
|
|
62
64
|
Share-safe HTML redacts CMS source IDs and local project paths while keeping
|
|
63
65
|
diagnostic codes, severity, route paths, and field paths visible. Slack
|
|
64
66
|
notifications send counts and diagnostic codes only, never raw CMS payloads,
|
package/dist/bin.js
CHANGED
|
@@ -35,6 +35,20 @@ function renderMarkdownSummary(result, status) {
|
|
|
35
35
|
lines.push("No diagnostics found.", "");
|
|
36
36
|
return lines.join("\n");
|
|
37
37
|
}
|
|
38
|
+
const repeatedGroups = (result.diagnosticGroups ?? []).filter(
|
|
39
|
+
(group) => group.count > 1
|
|
40
|
+
);
|
|
41
|
+
if (repeatedGroups.length > 0) {
|
|
42
|
+
lines.push("## Repeated Findings", "");
|
|
43
|
+
lines.push("| Group | Code | Count | Examples |");
|
|
44
|
+
lines.push("| --- | --- | ---: | --- |");
|
|
45
|
+
for (const group of repeatedGroups) {
|
|
46
|
+
lines.push(
|
|
47
|
+
`| ${escapeMarkdown(group.label)} | ${escapeMarkdown(group.code)} | ${group.count} | ${escapeMarkdown(group.examples.join(", "))} |`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
lines.push("");
|
|
51
|
+
}
|
|
38
52
|
lines.push("## Diagnostics", "");
|
|
39
53
|
lines.push("| Severity | Code | Message | Source |");
|
|
40
54
|
lines.push("| --- | --- | --- | --- |");
|
|
@@ -506,6 +520,7 @@ function formatPrettyResult(result, options = {}) {
|
|
|
506
520
|
result.diagnostics.filter((diagnostic) => diagnostic.severity === "info"),
|
|
507
521
|
paint.cyan
|
|
508
522
|
);
|
|
523
|
+
appendRepeatedGroups(lines, result.diagnosticGroups ?? [], paint.bold);
|
|
509
524
|
lines.push("");
|
|
510
525
|
lines.push("summary");
|
|
511
526
|
lines.push(` errors ${result.summary.errors}`);
|
|
@@ -564,6 +579,18 @@ function appendGroup(lines, title, diagnostics, color) {
|
|
|
564
579
|
}
|
|
565
580
|
lines.push("");
|
|
566
581
|
}
|
|
582
|
+
function appendRepeatedGroups(lines, groups, formatTitle) {
|
|
583
|
+
const repeated = groups.filter((group) => group.count > 1);
|
|
584
|
+
if (repeated.length === 0) {
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
lines.push(formatTitle("repeated"));
|
|
588
|
+
for (const group of repeated) {
|
|
589
|
+
const examples = group.examples.length > 0 ? ` (${group.examples.join(", ")})` : "";
|
|
590
|
+
lines.push(` ${group.label} - ${group.code} x${group.count}${examples}`);
|
|
591
|
+
}
|
|
592
|
+
lines.push("");
|
|
593
|
+
}
|
|
567
594
|
function plural2(value, singular) {
|
|
568
595
|
return value === 1 ? singular : `${singular}s`;
|
|
569
596
|
}
|
|
@@ -578,7 +605,7 @@ var noColor = {
|
|
|
578
605
|
// src/index.ts
|
|
579
606
|
async function runCli(argv, dependencies = {}) {
|
|
580
607
|
let exitCode = 0;
|
|
581
|
-
const program = new Command().name("cms-lab").description("Catch CMS bugs before deploy.").version("1.2.
|
|
608
|
+
const program = new Command().name("cms-lab").description("Catch CMS bugs before deploy.").version("1.2.6").exitOverride().configureOutput({
|
|
582
609
|
writeOut: (text) => writeStdout(dependencies, text),
|
|
583
610
|
writeErr: (text) => writeStderr(dependencies, text)
|
|
584
611
|
});
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cms-lab/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Catch CMS bugs before deploy.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"commander": "^14.0.2",
|
|
49
49
|
"picocolors": "^1.1.1",
|
|
50
|
-
"@cms-lab/
|
|
51
|
-
"@cms-lab/core": "1.2.
|
|
52
|
-
"@cms-lab/
|
|
53
|
-
"@cms-lab/
|
|
54
|
-
"@cms-lab/prismic": "1.2.
|
|
55
|
-
"@cms-lab/
|
|
56
|
-
"@cms-lab/sanity": "1.2.
|
|
57
|
-
"@cms-lab/
|
|
58
|
-
"@cms-lab/
|
|
50
|
+
"@cms-lab/directus": "1.2.6",
|
|
51
|
+
"@cms-lab/core": "1.2.6",
|
|
52
|
+
"@cms-lab/next": "1.2.6",
|
|
53
|
+
"@cms-lab/reporter": "1.2.6",
|
|
54
|
+
"@cms-lab/prismic": "1.2.6",
|
|
55
|
+
"@cms-lab/wordpress": "1.2.6",
|
|
56
|
+
"@cms-lab/sanity": "1.2.6",
|
|
57
|
+
"@cms-lab/contentful": "1.2.6",
|
|
58
|
+
"@cms-lab/strapi": "1.2.6"
|
|
59
59
|
},
|
|
60
60
|
"author": "Afaq Rashid",
|
|
61
61
|
"scripts": {
|