move import before export

This commit is contained in:
Kyle Spearrin 2018-08-06 10:47:11 -04:00
parent 887b1f1a6d
commit 59efdbd43e
1 changed files with 19 additions and 19 deletions

View File

@ -369,6 +369,25 @@ export class Program {
this.processResponse(response);
});
program
.command('import [format] [input] [password]')
.description('Import vault data from a file.')
.option('--formats', 'List formats')
.on('--help', () => {
writeLn('\n Examples:');
writeLn('');
writeLn(' bw import --formats');
writeLn(' bw import bitwardencsv ./from/source.csv');
writeLn(' bw import keepass2xml keepass_backup.xml myPassword123');
})
.action(async (format, filepath, password, cmd) => {
await this.exitIfLocked();
const command = new ImportCommand(this.main.cryptoService,
this.main.userService, this.main.importService);
const response = await command.run(format, filepath, password, cmd);
this.processResponse(response);
});
program
.command('export [password]')
.description('Export vault data to a CSV file.')
@ -390,25 +409,6 @@ export class Program {
this.processResponse(response);
});
program
.command('import [format] [input] [password]')
.description('Import vault data from a file.')
.option('--formats', 'List formats')
.on('--help', () => {
writeLn('\n Examples:');
writeLn('');
writeLn(' bw import --formats');
writeLn(' bw import bitwardencsv ./from/source.csv');
writeLn(' bw import keepass2xml keepass_backup.xml myPassword123');
})
.action(async (format, filepath, password, cmd) => {
await this.exitIfLocked();
const command = new ImportCommand(this.main.cryptoService,
this.main.userService, this.main.importService);
const response = await command.run(format, filepath, password, cmd);
this.processResponse(response);
});
program
.command('generate')
.description('Generate a password.')