Update jslib (#286)

* Update jslib

* Fix jslib update items
This commit is contained in:
Matt Gibson 2021-04-12 10:13:00 -05:00 committed by GitHub
parent 3ca6153270
commit e41514db2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

2
jslib

@ -1 +1 @@
Subproject commit 08a856645b14c11c62c730e34075addc34520f13
Subproject commit 62cc43fb46aecef078f3f5278502593b6abaf127

View File

@ -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);
}

View File

@ -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';

View File

@ -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());

View File

@ -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.')