(value: unknown, stepNumber: number)
| 90 | } |
| 91 | |
| 92 | function 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 | |
| 102 | function assertLegacyBatchStepKeys(record: Record<string, unknown>, stepNumber: number): void { |
| 103 | const unknownKeys = Object.keys(record).filter( |
no test coverage detected
searching dependent graphs…