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

Function readLegacyCommand

src/cli/batch-steps.ts:92–100  ·  view source on GitHub ↗
(value: unknown, stepNumber: number)

Source from the content-addressed store, hash-verified

90}
91
92function readLegacyCommand(value: unknown, stepNumber: number): CommandName {
93 const command = typeof value === 'string' ? value.trim().toLowerCase() : '';
94 if (!command) throw new AppError('INVALID_ARGS', `Batch step ${stepNumber} requires command.`);
95 if (isCommandName(command)) return command;
96 throw new AppError(
97 'INVALID_ARGS',
98 `Batch step ${stepNumber} command is not available through command batch: ${String(value)}`,
99 );
100}
101
102function assertLegacyBatchStepKeys(record: Record<string, unknown>, stepNumber: number): void {
103 const unknownKeys = Object.keys(record).filter(

Callers 1

readLegacyCliBatchStepFunction · 0.85

Calls 1

isCommandNameFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…