(record: Record<string, unknown>, stepNumber: number)
| 100 | } |
| 101 | |
| 102 | function 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 | |
| 114 | function readLegacyPositionals(value: unknown, stepNumber: number): string[] | undefined { |
| 115 | if (value === undefined) return undefined; |
no outgoing calls
no test coverage detected
searching dependent graphs…