mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-30 08:10:34 +01:00
parent
3ca6153270
commit
e41514db2f
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 08a856645b14c11c62c730e34075addc34520f13
|
||||
Subproject commit 62cc43fb46aecef078f3f5278502593b6abaf127
|
10
src/bw.ts
10
src/bw.ts
@ -131,7 +131,7 @@ export class Main {
|
||||
this.storageService, this.i18nService, this.cipherService);
|
||||
this.collectionService = new CollectionService(this.cryptoService, this.userService, this.storageService,
|
||||
this.i18nService);
|
||||
this.searchService = new SearchService(this.cipherService, this.logService);
|
||||
this.searchService = new SearchService(this.cipherService, this.logService, this.i18nService);
|
||||
this.policyService = new PolicyService(this.userService, this.storageService);
|
||||
this.sendService = new SendService(this.cryptoService, this.userService, this.apiService, this.fileUploadService,
|
||||
this.storageService, this.i18nService, this.cryptoFunctionService);
|
||||
@ -160,9 +160,9 @@ export class Main {
|
||||
async run() {
|
||||
await this.init();
|
||||
|
||||
this.program.register();
|
||||
this.vaultProgram.register();
|
||||
this.sendProgram.register();
|
||||
await this.program.register();
|
||||
await this.vaultProgram.register();
|
||||
await this.sendProgram.register();
|
||||
|
||||
program
|
||||
.parse(process.argv);
|
||||
@ -205,7 +205,7 @@ export class Main {
|
||||
this.authService.init();
|
||||
|
||||
const installedVersion = await this.storageService.get<string>(ConstantsService.installedVersionKey);
|
||||
const currentVersion = this.platformUtilsService.getApplicationVersion();
|
||||
const currentVersion = await this.platformUtilsService.getApplicationVersion();
|
||||
if (installedVersion == null || installedVersion !== currentVersion) {
|
||||
await this.storageService.save(ConstantsService.installedVersionKey, currentVersion);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export class Program extends BaseProgram {
|
||||
super(main.userService, writeLn);
|
||||
}
|
||||
|
||||
register() {
|
||||
async register() {
|
||||
program
|
||||
.option('--pretty', 'Format output. JSON is tabbed with two spaces.')
|
||||
.option('--raw', 'Return raw output instead of a descriptive message.')
|
||||
@ -41,7 +41,7 @@ export class Program extends BaseProgram {
|
||||
.option('--quiet', 'Don\'t return anything to stdout.')
|
||||
.option('--nointeraction', 'Do not prompt for interactive user input.')
|
||||
.option('--session <session>', 'Pass session key instead of reading from env.')
|
||||
.version(this.main.platformUtilsService.getApplicationVersion(), '-v, --version');
|
||||
.version(await this.main.platformUtilsService.getApplicationVersion(), '-v, --version');
|
||||
|
||||
program.on('option:pretty', () => {
|
||||
process.env.BW_PRETTY = 'true';
|
||||
|
@ -34,7 +34,7 @@ export class SendProgram extends Program {
|
||||
super(main);
|
||||
}
|
||||
|
||||
register() {
|
||||
async register() {
|
||||
program.addCommand(this.sendCommand());
|
||||
// receive is accessible both at `bw receive` and `bw send receive`
|
||||
program.addCommand(this.receiveCommand());
|
||||
|
@ -26,7 +26,7 @@ export class VaultProgram extends Program {
|
||||
super(main);
|
||||
}
|
||||
|
||||
register() {
|
||||
async register() {
|
||||
program
|
||||
.command('list <object>')
|
||||
.description('List an array of objects from the vault.')
|
||||
|
Loading…
Reference in New Issue
Block a user