Function: runInputPipeline()
ts
function runInputPipeline<C>(
mw: Middleware<MiddlewareFn<C>>,
ctx: C,
label: string,
): Promise<string | undefined>;Defined in: batteries/tools/_shared/index.ts:211
Run an input pipeline over ctx. Returns the short-circuit string when a stage short-circuited, or undefined when the pipeline reached its terminal handler. A non-terminal pipeline (a stage that neither called next() nor short-circuited) throws — the caller converts it to an Error: string.
Type Parameters
| Type Parameter |
|---|
C |
Parameters
| Parameter | Type | Description |
|---|---|---|
mw | Middleware<MiddlewareFn<C>> | The Middleware instance holding the stages (a fresh .runner() is minted here). |
ctx | C | The mutable input context handed to each stage. |
label | string | Battery name, used in the non-terminal error message. |
Returns
Promise<string | undefined>
The short-circuit result string, or undefined if the pipeline ran to completion.