mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
sub out create command
This commit is contained in:
@@ -9,10 +9,11 @@ import { SyncCommand } from './commands/sync.command';
|
||||
import { Main } from './main';
|
||||
|
||||
import { Response } from './models/response';
|
||||
import { CreateCommand } from './commands/create.command';
|
||||
import { EncodeCommand } from './commands/encode.command';
|
||||
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) { }
|
||||
@@ -70,6 +71,15 @@ export class Program {
|
||||
this.processResponse(response);
|
||||
});
|
||||
|
||||
program
|
||||
.command('create <object> <encodedData>')
|
||||
.description('Create an object.')
|
||||
.action(async (object, encodedData, cmd) => {
|
||||
const command = new CreateCommand(this.main.cipherService, this.main.folderService);
|
||||
const response = await command.run(object, encodedData, cmd);
|
||||
this.processResponse(response);
|
||||
});
|
||||
|
||||
program
|
||||
.command('edit <object> <id>')
|
||||
.description('Edit an object.')
|
||||
|
||||
Reference in New Issue
Block a user