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

Function readBatchStepCommand

src/commands/batch/metadata.ts:141–154  ·  view source on GitHub ↗
(
  record: Record<string, unknown>,
  stepNumber: number,
  nestedCommands: readonly string[],
)

Source from the content-addressed store, hash-verified

139}
140
141function readBatchStepCommand(
142 record: Record<string, unknown>,
143 stepNumber: number,
144 nestedCommands: readonly string[],
145): string {
146 if (nestedCommands === STRUCTURED_BATCH_COMMAND_NAMES) {
147 return readStructuredBatchCommandName(record.command, stepNumber);
148 }
149 const command = record.command;
150 if (typeof command !== 'string' || !nestedCommands.includes(command)) {
151 throw new Error(`Expected command to be one of: ${nestedCommands.join(', ')}.`);
152 }
153 return command;
154}
155
156function readBatchStepRuntimeProperty(
157 record: Record<string, unknown>,

Callers 1

readBatchStepFunction · 0.70

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…