The command line vault (Windows, macOS, & Linux).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
591 B

import * as program from 'commander';
import { VaultTimeoutService } from 'jslib/abstractions/vaultTimeout.service';
import { Response } from 'jslib/cli/models/response';
import { MessageResponse } from 'jslib/cli/models/response/messageResponse';
export class LockCommand {
constructor(private vaultTimeoutService: VaultTimeoutService) { }
async run(cmd: program.Command) {
await this.vaultTimeoutService.lock();
process.env.BW_SESSION = null;
const res = new MessageResponse('Your vault is locked.', null);
return Response.success(res);
}
}