mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
stub out some commands
This commit is contained in:
60
src/main.ts
Normal file
60
src/main.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
import * as program from 'commander';
|
||||
|
||||
program
|
||||
.version('1.0.0', '-v, --version');
|
||||
|
||||
program
|
||||
.command('login <email> <password>')
|
||||
.description('Log into a Bitwarden user account.')
|
||||
.option('-t, --two_factor <code>', '2FA code.')
|
||||
.action((email, password, cmd) => {
|
||||
console.log('Logging in...');
|
||||
console.log(email);
|
||||
console.log(password);
|
||||
console.log(cmd.two_factor);
|
||||
});
|
||||
|
||||
program
|
||||
.command('logout')
|
||||
.description('Log out of the current Bitwarden user account.')
|
||||
.action((cmd) => {
|
||||
console.log('Logging out...');
|
||||
});
|
||||
|
||||
program
|
||||
.command('list <object>')
|
||||
.description('List objects.')
|
||||
.action((object, cmd) => {
|
||||
console.log('Listing...');
|
||||
console.log(object);
|
||||
});
|
||||
|
||||
program
|
||||
.command('get <object> <id>')
|
||||
.description('Get an object.')
|
||||
.action((object, id, cmd) => {
|
||||
console.log('Getting...');
|
||||
console.log(object);
|
||||
console.log(id);
|
||||
});
|
||||
|
||||
program
|
||||
.command('edit <object> <id>')
|
||||
.description('Edit an object.')
|
||||
.action((object, id, cmd) => {
|
||||
console.log('Editing...');
|
||||
console.log(object);
|
||||
console.log(id);
|
||||
});
|
||||
|
||||
program
|
||||
.command('delete <object> <id>')
|
||||
.description('Delete an object.')
|
||||
.action((object, id, cmd) => {
|
||||
console.log('Deleting...');
|
||||
console.log(object);
|
||||
console.log(id);
|
||||
});
|
||||
|
||||
program
|
||||
.parse(process.argv);
|
||||
Reference in New Issue
Block a user