@cms-lab/cli 1.2.2 → 1.2.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/README.md CHANGED
@@ -14,6 +14,7 @@ cms-lab init --cms strapi --router pages
14
14
  cms-lab doctor
15
15
  cms-lab doctor --debug --verbose 2
16
16
  cms-lab scan --report
17
+ cms-lab scan --report --share-report
17
18
  cms-lab scan --markdown
18
19
  cms-lab scan --junit
19
20
  cms-lab scan --slack-webhook "$CMS_LAB_SLACK_WEBHOOK"
@@ -52,10 +53,13 @@ unless `--include-sensitive-output` is passed explicitly.
52
53
  CI strictness can be raised with `--fail-on warning`, `--max-warnings <count>`,
53
54
  `--max-info <count>`, or `--strict`.
54
55
 
55
- Exports include local HTML (`--report`), Markdown (`--markdown`), JUnit XML
56
- (`--junit`), and redacted Slack incoming webhook summaries
57
- (`--slack-webhook <url>`). Slack notifications send counts and diagnostic codes
58
- only, never raw CMS payloads, local paths, or webhook URLs.
56
+ Exports include local HTML (`--report`), share-safe local HTML
57
+ (`--report --share-report`), Markdown (`--markdown`), JUnit XML (`--junit`),
58
+ and redacted Slack incoming webhook summaries (`--slack-webhook <url>`).
59
+ Share-safe HTML redacts CMS source IDs and local project paths while keeping
60
+ diagnostic codes, severity, route paths, and field paths visible. Slack
61
+ notifications send counts and diagnostic codes only, never raw CMS payloads,
62
+ local paths, or webhook URLs.
59
63
 
60
64
  `cms-lab agent-context` writes safe handoff files so coding agents can read the
61
65
  cms-lab docs, package links, route mappings, and safe project facts before
package/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "./chunk-SVTBRARJ.js";
4
+ } from "./chunk-M5O5QRR3.js";
5
5
 
6
6
  // src/bin.ts
7
7
  var exitCode = await runCli(process.argv.slice(2));
@@ -565,7 +565,7 @@ var noColor = {
565
565
  // src/index.ts
566
566
  async function runCli(argv, dependencies = {}) {
567
567
  let exitCode = 0;
568
- const program = new Command().name("cms-lab").description("Catch CMS bugs before deploy.").version("1.2.2").exitOverride().configureOutput({
568
+ const program = new Command().name("cms-lab").description("Catch CMS bugs before deploy.").version("1.2.3").exitOverride().configureOutput({
569
569
  writeOut: (text) => writeStdout(dependencies, text),
570
570
  writeErr: (text) => writeStderr(dependencies, text)
571
571
  });
@@ -597,6 +597,9 @@ Examples:
597
597
  ).option(
598
598
  "--report [path]",
599
599
  "Write an HTML report. Defaults to .cms-lab/report.html"
600
+ ).option(
601
+ "--share-report",
602
+ "Redact CMS source IDs and local project paths in the HTML report"
600
603
  ).option(
601
604
  "--markdown [path]",
602
605
  "Write a Markdown summary. Defaults to .cms-lab/summary.md"
@@ -809,7 +812,9 @@ async function runScan(options, dependencies) {
809
812
  });
810
813
  const status = exitCode === 0 ? "passed" : "failed";
811
814
  const endReport = debug.time("exports", 2);
812
- await maybeWriteReport(options.report, result, cwd);
815
+ await maybeWriteReport(options.report, result, cwd, {
816
+ share: Boolean(options.shareReport)
817
+ });
813
818
  await maybeWriteMarkdown(options.markdown, result, status, cwd);
814
819
  await maybeWriteJUnit(options.junit, result, cwd);
815
820
  const slackSent = await maybePostSlack({
@@ -1504,13 +1509,17 @@ function exitCodeForResult(result, options) {
1504
1509
  function thresholdExceeded(result, maxWarnings, maxInfo) {
1505
1510
  return maxWarnings !== void 0 && result.summary.warnings > maxWarnings || maxInfo !== void 0 && result.summary.info > maxInfo;
1506
1511
  }
1507
- async function maybeWriteReport(report, result, cwd) {
1512
+ async function maybeWriteReport(report, result, cwd, options = {}) {
1508
1513
  if (!report) {
1509
1514
  return;
1510
1515
  }
1511
1516
  const path = reportPathFromOption(report, cwd);
1512
1517
  await mkdir(dirname(path), { recursive: true });
1513
- await writeFile(path, renderHtmlReport(result), "utf8");
1518
+ await writeFile(
1519
+ path,
1520
+ renderHtmlReport(result, { privacy: options.share ? "share" : "full" }),
1521
+ "utf8"
1522
+ );
1514
1523
  }
1515
1524
  function reportPathFromOption(report, cwd) {
1516
1525
  return resolve(
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runCli
3
- } from "./chunk-SVTBRARJ.js";
3
+ } from "./chunk-M5O5QRR3.js";
4
4
  export {
5
5
  runCli
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cms-lab/cli",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
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/contentful": "1.2.2",
51
- "@cms-lab/directus": "1.2.2",
52
- "@cms-lab/next": "1.2.2",
53
- "@cms-lab/core": "1.2.2",
54
- "@cms-lab/reporter": "1.2.2",
55
- "@cms-lab/prismic": "1.2.2",
56
- "@cms-lab/sanity": "1.2.2",
57
- "@cms-lab/strapi": "1.2.2",
58
- "@cms-lab/wordpress": "1.2.2"
50
+ "@cms-lab/contentful": "1.2.3",
51
+ "@cms-lab/core": "1.2.3",
52
+ "@cms-lab/prismic": "1.2.3",
53
+ "@cms-lab/reporter": "1.2.3",
54
+ "@cms-lab/sanity": "1.2.3",
55
+ "@cms-lab/strapi": "1.2.3",
56
+ "@cms-lab/next": "1.2.3",
57
+ "@cms-lab/wordpress": "1.2.3",
58
+ "@cms-lab/directus": "1.2.3"
59
59
  },
60
60
  "author": "Afaq Rashid",
61
61
  "scripts": {