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

Function assertLegacyBatchStepKeys

src/cli/batch-steps.ts:102–112  ·  view source on GitHub ↗
(record: Record<string, unknown>, stepNumber: number)

Source from the content-addressed store, hash-verified

100}
101
102function assertLegacyBatchStepKeys(record: Record<string, unknown>, stepNumber: number): void {
103 const unknownKeys = Object.keys(record).filter(
104 (key) => !['command', 'positionals', 'flags', 'runtime'].includes(key),
105 );
106 if (unknownKeys.length > 0) {
107 throw new AppError(
108 'INVALID_ARGS',
109 `Batch step ${stepNumber} has unknown legacy field(s): ${unknownKeys.join(', ')}.`,
110 );
111 }
112}
113
114function readLegacyPositionals(value: unknown, stepNumber: number): string[] | undefined {
115 if (value === undefined) return undefined;

Callers 1

readLegacyCliBatchStepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…