mirror of https://github.com/bitwarden/cli.git
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
551 B
17 lines
551 B
import * as program from 'commander'; |
|
|
|
import { LockService } from 'jslib/abstractions/lock.service'; |
|
|
|
import { Response } from 'jslib/cli/models/response'; |
|
import { MessageResponse } from 'jslib/cli/models/response/messageResponse'; |
|
|
|
export class LockCommand { |
|
constructor(private lockService: LockService) { } |
|
|
|
async run(cmd: program.Command) { |
|
await this.lockService.lock(); |
|
process.env.BW_SESSION = null; |
|
const res = new MessageResponse('Your vault is locked.', null); |
|
return Response.success(res); |
|
} |
|
}
|
|
|