Skip to content

Commit

Permalink
chore: added dbzar command
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzano committed Sep 22, 2023
1 parent d54772e commit ded86eb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cli/commands/anon-file/anon-file.action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {type Command} from 'commander';
import {createLogger} from '../../../services/loggers/debug-logger';

const logger = createLogger(__filename);

export async function anonFileAction(this: Command) {
logger('processing file');
}
9 changes: 9 additions & 0 deletions src/cli/commands/anon-file/anon-file.command.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {Command} from 'commander';
import {anonFileAction} from './anon-file.action';

export const anonFileCommand = new Command('anon-file');

anonFileCommand
.description('Anonymize a single file')
.argument('[path]', 'file path')
.action(anonFileAction);
2 changes: 2 additions & 0 deletions src/cli/dbzar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import process from 'node:process';
import {Command} from 'commander';
import {anonColCommand} from './commands/anon-col/anon-col';
import {anonDbCommand} from './commands/anon-db/anon-db-command';
import {anonFileCommand} from './commands/anon-file/anon-file.command';

const program = new Command();

program.addCommand(anonColCommand);
program.addCommand(anonDbCommand);
program.addCommand(anonFileCommand);

program.parse(process.argv);

0 comments on commit ded86eb

Please sign in to comment.