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

Function resolveDaemonRequestTimeoutMs

src/daemon/client/daemon-client.ts:124–134  ·  view source on GitHub ↗
(
  req: Omit<DaemonRequest, 'token'>,
)

Source from the content-addressed store, hash-verified

122}
123
124export function resolveDaemonRequestTimeoutMs(
125 req: Omit<DaemonRequest, 'token'>,
126): number | undefined {
127 if (req.command === PUBLIC_COMMANDS.test) return undefined;
128 if (typeof req.flags?.timeoutMs === 'number' && isExplicitTimeoutCommand(req.command)) {
129 return req.flags.timeoutMs;
130 }
131 if (req.command === PUBLIC_COMMANDS.prepare) return PREPARE_REQUEST_TIMEOUT_MS;
132 if (isInstallLikeCommand(req.command)) return INSTALL_REQUEST_TIMEOUT_MS;
133 return DAEMON_REQUEST_TIMEOUT_MS;
134}
135
136function isExplicitTimeoutCommand(command: string | undefined): boolean {
137 return (

Callers 2

sendToDaemonFunction · 0.85

Calls 2

isExplicitTimeoutCommandFunction · 0.85
isInstallLikeCommandFunction · 0.85

Tested by

no test coverage detected