(options: CliRunOptions)
| 17 | } |
| 18 | |
| 19 | export async function runCliCommandWithOutput(options: CliRunOptions): Promise<{ |
| 20 | result: CommandRequestResult; |
| 21 | cliOutput?: CliOutput; |
| 22 | }> { |
| 23 | const input = readInputFromCli(options.command, options.positionals, options.flags); |
| 24 | const result = (await runCommand(options.client, options.command, input)) as CommandRequestResult; |
| 25 | return { |
| 26 | result, |
| 27 | cliOutput: formatCliOutput({ |
| 28 | name: options.command, |
| 29 | input, |
| 30 | result, |
| 31 | }), |
| 32 | }; |
| 33 | } |
no test coverage detected