Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
update jslib
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Sep 23, 2020
1 parent 0e5cc66 commit 7733b95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/commands/login.command.ts
Expand Up @@ -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';
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/program.ts
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7733b95

Please sign in to comment.