diff options
| author | Leo Goetz <dev@leogtz.de> | 2026-05-24 06:50:57 +0200 |
|---|---|---|
| committer | Leo Goetz <dev@leogtz.de> | 2026-05-24 06:50:57 +0200 |
| commit | ca8537af0ab596fddd8d72e6630f278326ef5360 (patch) | |
| tree | 170d9f82b28f292f40785e33b3981121b6793c3c /src/commands | |
| parent | d05bfaf95fb666fea02c8aceae3ce02c9e315d3d (diff) | |
feat: added fix functionality
Diffstat (limited to 'src/commands')
| -rw-r--r-- | src/commands/fix.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/commands/fix.ts b/src/commands/fix.ts new file mode 100644 index 0000000..94ab2e4 --- /dev/null +++ b/src/commands/fix.ts @@ -0,0 +1,14 @@ +import type { Command } from "commander"; +import { fixDependencies } from "../actions/fixDependencies.js"; +import { outputFixes } from "../actions/output.js"; + +export const fix = (program: Command) => { + program + .command("fix") + .description("Runs 'npm audit fix' on each project") + .option("-f, --force", "Uses 'npm audit fix --force' on each project") + .action(async (options) => { + let tests = await fixDependencies(options.force); + outputFixes(tests); + }); +}; |
