@slashgear/gdpr-cookie-scanner 3.4.0 → 3.5.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/src/cli.ts CHANGED
@@ -26,7 +26,11 @@ program
26
26
  )
27
27
  .option("-l, --locale <locale>", "Browser locale for language detection", "fr-FR")
28
28
  .option("-v, --verbose", "Show detailed output", false)
29
- .option("-f, --format <formats>", "Output formats: md, html, json, pdf (comma-separated)", "html")
29
+ .option(
30
+ "-f, --format <formats>",
31
+ "Output formats: md, html, json, pdf, csv (comma-separated)",
32
+ "html",
33
+ )
30
34
  .option(
31
35
  "--viewport <preset>",
32
36
  "Viewport preset: desktop (1280×900), tablet (768×1024), mobile (390×844)",
@@ -69,7 +73,7 @@ program
69
73
  console.log(styleText("gray", ` Viewport : ${viewport}`));
70
74
  console.log();
71
75
 
72
- const validFormats = new Set<ReportFormat>(["md", "html", "json", "pdf"]);
76
+ const validFormats = new Set<ReportFormat>(["md", "html", "json", "pdf", "csv"]);
73
77
  const formats = (opts.format as string)
74
78
  .split(",")
75
79
  .map((f) => f.trim().toLowerCase())
@@ -77,7 +81,7 @@ program
77
81
 
78
82
  if (formats.length === 0) {
79
83
  console.error(
80
- styleText("red", " Invalid --format value. Valid options: md, html, json, pdf"),
84
+ styleText("red", " Invalid --format value. Valid options: md, html, json, pdf, csv"),
81
85
  );
82
86
  process.exit(2);
83
87
  }
@@ -141,6 +145,7 @@ program
141
145
  html: "HTML",
142
146
  json: "JSON",
143
147
  pdf: "PDF",
148
+ csv: "CSV",
144
149
  };
145
150
  for (const [fmt, path] of Object.entries(paths)) {
146
151
  console.log(styleText("green", ` ${(labels[fmt] ?? fmt).padEnd(8)} ${path}`));