MCPcopy Index your code
hub / github.com/callstack/agent-device / runCliCommandWithOutput

Function runCliCommandWithOutput

src/commands/cli-runner.ts:19–33  ·  view source on GitHub ↗
(options: CliRunOptions)

Source from the content-addressed store, hash-verified

17}
18
19export 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}

Callers 2

runCliCommandFunction · 0.85

Calls 3

readInputFromCliFunction · 0.90
runCommandFunction · 0.90
formatCliOutputFunction · 0.90

Tested by

no test coverage detected