MCPcopy
hub / github.com/callstack/agent-device / waitForChildExit

Function waitForChildExit

src/daemon/app-log-stream.ts:5–13  ·  view source on GitHub ↗
(
  wait: Promise<ExecResult>,
  timeoutMs = 2_000,
)

Source from the content-addressed store, hash-verified

3import type { ExecResult } from '../utils/exec.ts';
4
5export async function waitForChildExit(
6 wait: Promise<ExecResult>,
7 timeoutMs = 2_000,
8): Promise<void> {
9 await Promise.race([
10 wait.then(() => undefined).catch(() => undefined),
11 new Promise<void>((resolve) => setTimeout(resolve, timeoutMs)),
12 ]);
13}
14
15function redactChunk(chunk: string, patterns: RegExp[]): string {
16 if (patterns.length === 0) return chunk;

Callers 3

startAndroidAppLogFunction · 0.90
stopAppLogFunction · 0.90
startAppleAppLogStreamFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected