MCPcopy Create free account
hub / github.com/SethGammon/Citadel / main

Function main

scripts/verify-telemetry-integrity.js:70–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70function main() {
71 const args = parseArgs(process.argv);
72 if (args.help) {
73 process.stdout.write(`${usage()}\n`);
74 return;
75 }
76
77 const report = verifyProjectTelemetry(args.projectRoot, {
78 files: args.files,
79 });
80 const pass = report.totals.tampered === 0 &&
81 report.totals.invalid === 0 &&
82 (!args.strictLegacy || report.totals.legacy === 0);
83
84 if (args.json) {
85 process.stdout.write(`${JSON.stringify({ ...report, pass }, null, 2)}\n`);
86 } else {
87 process.stdout.write(render(report));
88 }
89
90 process.exitCode = pass ? 0 : 1;
91}
92
93if (require.main === module) {
94 main();

Callers 1

Calls 4

verifyProjectTelemetryFunction · 0.85
parseArgsFunction · 0.70
usageFunction · 0.70
renderFunction · 0.70

Tested by

no test coverage detected