feat(scripts): add emit-data-map compliance script + tests
Adds scripts/compliance/emit-data-map.mjs which walks Payload collection configs (packages/*/integrations/cms/collections/*.ts), applies PAYLOAD_AUTH_PII_DEFAULTS + custom.authPii overrides, and emits a deterministic YAML PII inventory at compliance/data-map.yml. Supports --print (stdout) and --check (diff vs committed, exit 1 on mismatch) modes. Ships with 26 unit tests covering happy path, auth defaults, authPii overrides, --check match/mismatch, and empty collections. Wired as `compliance:data-map` root package script. Adds @typescript-eslint/parser to root devDependencies (already in workspace via core-eslint, now made explicit for scripts/ usage). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"generatedAt": "2026-05-18T19:03:46.644Z",
|
||||
"commit": "464df9a",
|
||||
"generatedAt": "2026-05-18T19:42:59.601Z",
|
||||
"commit": "3a73634",
|
||||
"repo": {
|
||||
"statements": 96.43,
|
||||
"statements": 96.47,
|
||||
"branches": 91.71,
|
||||
"functions": 96.81,
|
||||
"lines": 96.43,
|
||||
"lines": 96.47,
|
||||
"counts": {
|
||||
"lf": 4205,
|
||||
"lh": 4055,
|
||||
"lf": 4254,
|
||||
"lh": 4104,
|
||||
"brf": 808,
|
||||
"brh": 741,
|
||||
"fnf": 251,
|
||||
@@ -31,13 +31,13 @@
|
||||
}
|
||||
},
|
||||
"@repo/blog": {
|
||||
"statements": 96.36,
|
||||
"statements": 96.35,
|
||||
"branches": 88.65,
|
||||
"functions": 100,
|
||||
"lines": 96.36,
|
||||
"lines": 96.35,
|
||||
"counts": {
|
||||
"lf": 741,
|
||||
"lh": 714,
|
||||
"lf": 739,
|
||||
"lh": 712,
|
||||
"brf": 141,
|
||||
"brh": 125,
|
||||
"fnf": 29,
|
||||
@@ -73,13 +73,13 @@
|
||||
}
|
||||
},
|
||||
"@repo/marketing-pages": {
|
||||
"statements": 95.64,
|
||||
"statements": 95.93,
|
||||
"branches": 83.93,
|
||||
"functions": 100,
|
||||
"lines": 95.64,
|
||||
"lines": 95.93,
|
||||
"counts": {
|
||||
"lf": 711,
|
||||
"lh": 680,
|
||||
"lf": 762,
|
||||
"lh": 731,
|
||||
"brf": 112,
|
||||
"brh": 94,
|
||||
"fnf": 32,
|
||||
|
||||
Reference in New Issue
Block a user