( positionals: ReplayCommandParams['positionals'], flags: ReplayCommandParams['flags'], )
| 65 | } |
| 66 | |
| 67 | function validateReplayExportOptions( |
| 68 | positionals: ReplayCommandParams['positionals'], |
| 69 | flags: ReplayCommandParams['flags'], |
| 70 | ): void { |
| 71 | if (positionals.length > 2) { |
| 72 | throw new AppError( |
| 73 | 'INVALID_ARGS', |
| 74 | 'replay export accepts exactly one input path: replay export <file.ad>', |
| 75 | ); |
| 76 | } |
| 77 | if (flags.replayUpdate) { |
| 78 | throw new AppError('INVALID_ARGS', 'replay export does not support --update.'); |
| 79 | } |
| 80 | if (flags.replayMaestro) { |
| 81 | throw new AppError('INVALID_ARGS', 'replay export reads .ad files; omit --maestro.'); |
| 82 | } |
| 83 | if (flags.replayEnv?.length) { |
| 84 | throw new AppError('INVALID_ARGS', 'replay export does not evaluate --env substitutions.'); |
| 85 | } |
| 86 | const format = flags.replayExportFormat ?? 'maestro'; |
| 87 | if (format !== 'maestro') { |
| 88 | throw new AppError('INVALID_ARGS', `Unsupported replay export format: ${format}`); |
| 89 | } |
| 90 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…