1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

encode command

This commit is contained in:
Kyle Spearrin
2018-05-14 17:13:57 -04:00
parent 85770b7cbb
commit 9b99c299e4
3 changed files with 45 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import { Response } from './models/response';
import { ListResponse } from './models/response/listResponse';
import { StringResponse } from './models/response/stringResponse';
import { TemplateResponse } from './models/response/templateResponse';
import { EncodeCommand } from './commands/encode.command';
export class Program {
constructor(private main: Main) { }
@@ -87,6 +88,15 @@ export class Program {
this.processResponse(response);
});
program
.command('encode')
.description('Base64 encode stdin.')
.action(async (object, id, cmd) => {
const command = new EncodeCommand();
const response = await command.run(cmd);
this.processResponse(response);
});
program
.parse(process.argv);
}