update jslib

This commit is contained in:
Kyle Spearrin 2020-09-23 11:59:30 -04:00
parent 0e5cc66b67
commit 7733b95a71
3 changed files with 6 additions and 4 deletions

2
jslib

@ -1 +1 @@
Subproject commit 5e0a2d1d998b5d36b093f3eff032453421680a41
Subproject commit 5cb3e9c965269a7e442536fa1b6ba00add2c7153

View File

@ -6,6 +6,7 @@ import { CryptoFunctionService } from 'jslib/abstractions/cryptoFunction.service
import { EnvironmentService } from 'jslib/abstractions/environment.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { SyncService } from 'jslib/abstractions/sync.service';
import { MessageResponse } from 'jslib/cli/models/response/messageResponse';
@ -20,9 +21,9 @@ export class LoginCommand extends BaseLoginCommand {
constructor(authService: AuthService, apiService: ApiService,
cryptoFunctionService: CryptoFunctionService, syncService: SyncService,
i18nService: I18nService, environmentService: EnvironmentService,
passwordGenerationService: PasswordGenerationService) {
passwordGenerationService: PasswordGenerationService, platformUtilsService: PlatformUtilsService) {
super(authService, apiService, i18nService, environmentService, passwordGenerationService,
cryptoFunctionService, 'cli');
cryptoFunctionService, platformUtilsService, 'cli');
this.validatedParams = async () => {
const key = await cryptoFunctionService.randomBytes(64);
process.env.BW_SESSION = Utils.fromBufferToB64(key);

View File

@ -136,7 +136,8 @@ export class Program extends BaseProgram {
await this.exitIfAuthed();
const command = new LoginCommand(this.main.authService, this.main.apiService,
this.main.cryptoFunctionService, this.main.syncService, this.main.i18nService,
this.main.environmentService, this.main.passwordGenerationService);
this.main.environmentService, this.main.passwordGenerationService,
this.main.platformUtilsService);
const response = await command.run(email, password, cmd);
this.processResponse(response);
}