From c3cb0ca317a52a740bf9625ca9df43f5c2306548 Mon Sep 17 00:00:00 2001 From: Leo Goetz Date: Fri, 8 May 2026 15:48:37 +0200 Subject: inital commit --- src/commands/check.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/commands/check.ts (limited to 'src/commands/check.ts') diff --git a/src/commands/check.ts b/src/commands/check.ts new file mode 100644 index 0000000..cfa3cb1 --- /dev/null +++ b/src/commands/check.ts @@ -0,0 +1,19 @@ +import type { Command } from "commander"; +import { checkDependencies } from "../actions/checkDependencies.js"; +import { outputSummary } from "../actions/outputSummary.js"; +import { sendAuditEmail } from "../actions/sendEmail.js"; + +export const check = (program: Command) => { + program + .command("check") + .description("Checks given repos for security updates and logs output.") + .option("-e, --email", "Send Email Report via the configured Email.") + .action(async (cmd) => { + const data = await checkDependencies(); + if (cmd.email) { + sendAuditEmail(data); + } else { + outputSummary(data); + } + }); +}; -- cgit v1.3.1