MCPcopy Create free account
hub / github.com/callstack/agent-device / normalizeAlertWaitResult

Function normalizeAlertWaitResult

src/commands/system/runtime/system.ts:397–409  ·  view source on GitHub ↗
(result: BackendAlertResult)

Source from the content-addressed store, hash-verified

395}
396
397function normalizeAlertWaitResult(result: BackendAlertResult): SystemAlertCommandResult {
398 if (result.kind !== 'alertWait') {
399 throw new AppError('COMMAND_FAILED', 'system.alert wait returned an invalid backend result');
400 }
401 return {
402 kind: 'alertWait',
403 action: 'wait',
404 alert: result.alert,
405 ...(result.waitedMs !== undefined ? { waitedMs: result.waitedMs } : {}),
406 ...(result.timedOut !== undefined ? { timedOut: result.timedOut } : {}),
407 ...successText(result.alert ? 'Alert visible' : 'Alert wait timed out'),
408 };
409}
410
411function normalizeAlertHandledResult(
412 action: Exclude<BackendAlertAction, 'get' | 'wait'>,

Callers 1

normalizeAlertResultFunction · 0.85

Calls 1

successTextFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…