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

Function runReactDevtoolsCommand

src/cli/commands/react-devtools.ts:158–180  ·  view source on GitHub ↗
(
  args: string[],
  options: ReactDevtoolsCommandOptions = {},
)

Source from the content-addressed store, hash-verified

156}
157
158export async function runReactDevtoolsCommand(
159 args: string[],
160 options: ReactDevtoolsCommandOptions = {},
161): Promise<number> {
162 const cwd = options.cwd ?? process.cwd();
163 const env = options.env ?? process.env;
164 const exitCode = await withRemoteDevtoolsCompanion(args, options, async () => {
165 const result = await runCmdStreaming('npm', buildReactDevtoolsNpmExecArgs(args), {
166 cwd,
167 env,
168 allowFailure: true,
169 onStdoutChunk: (chunk) => {
170 process.stdout.write(chunk);
171 },
172 onStderrChunk: (chunk) => {
173 process.stderr.write(chunk);
174 },
175 });
176 return result.exitCode;
177 });
178 maybePrintRemoteIosWaitHint(args, options.flags, exitCode);
179 return exitCode;
180}

Callers 3

runCliFunction · 0.90

Calls 5

runCmdStreamingFunction · 0.90
writeMethod · 0.80

Tested by 1