@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/.github/workflows/update-cookie-db.yml +94 -0
- package/CHANGELOG.md +44 -0
- package/CLAUDE.md +18 -0
- package/Dockerfile +1 -0
- package/README.md +11 -10
- package/dist/classifiers/cookie-lookup.d.ts +8 -0
- package/dist/classifiers/cookie-lookup.d.ts.map +1 -0
- package/dist/classifiers/cookie-lookup.js +50 -0
- package/dist/classifiers/cookie-lookup.js.map +1 -0
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +1 -1
- package/dist/data/open-cookie-database.json +25614 -0
- package/dist/report/generator.d.ts +1 -0
- package/dist/report/generator.d.ts.map +1 -1
- package/dist/report/generator.js +100 -4
- package/dist/report/generator.js.map +1 -1
- package/dist/report/html.d.ts.map +1 -1
- package/dist/report/html.js +16 -2
- package/dist/report/html.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/scripts/copy-data.mjs +4 -0
- package/scripts/update-cookie-db.mjs +15 -0
- package/src/classifiers/cookie-lookup.ts +72 -0
- package/src/cli.ts +8 -3
- package/src/data/open-cookie-database.json +25614 -0
- package/src/report/generator.ts +119 -6
- package/src/report/html.ts +16 -2
- package/src/types.ts +1 -1
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(
|
|
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}`));
|