(steps: unknown[])
| 28 | } |
| 29 | |
| 30 | function normalizeCliBatchSteps(steps: unknown[]): BatchStep[] { |
| 31 | let sawLegacyStep = false; |
| 32 | const normalized = steps.map((step, index) => { |
| 33 | if (isStructuredBatchStepShape(step)) return readStructuredBatchStep(step, index + 1); |
| 34 | const legacyStep = readLegacyCliBatchStep(step, index + 1); |
| 35 | sawLegacyStep = true; |
| 36 | return legacyStepToStructuredStep(legacyStep); |
| 37 | }); |
| 38 | if (sawLegacyStep) { |
| 39 | process.stderr.write( |
| 40 | 'Warning: batch steps using positionals/flags are deprecated and will be removed in the next major version. Use {"command":"...","input":{...}} steps instead.\n', |
| 41 | ); |
| 42 | } |
| 43 | return normalized; |
| 44 | } |
| 45 | |
| 46 | function legacyStepToStructuredStep(legacyStep: LegacyCliBatchStep): BatchStep { |
| 47 | const input = readInputFromCli( |
no test coverage detected
searching dependent graphs…