• Creates a pipeline from a given collection of steps. To be valid, the collection of steps must satisfy the following set of constraints (which should be logical, when you consider what a pipeline should achieve):

    1. the collection of steps is not empty
    2. all IPipelineStepOrder#name|names of steps are unique for the given pipeline
    3. all IPipelineStepOrder#dependencies|dependencies of all steps are exist
    4. there are no cycles in the dependency graph
    5. the target of a IPipelineStepOrder#decorates|step's decoration exists
    6. if a IPipelineStepOrder#decorates|decoration applies, all of its IPipelineStepOrder#dependencies|dependencies are already in the pipeline
    7. in the resulting pipeline, there is a strict cut between steps that are executed PipelineStepStage#OncePerFile|once per file and PipelineStepStage#OncePerRequest|once per request.

    Type Parameters

    Parameters

    • Rest...steps: T

    Returns Pipeline<T[number]>

    The function will try to order your collection steps so that all the constraints hold. If it succeeds it will return the resulting pipeline, otherwise it will throw an InvalidPipelineError.

    InvalidPipelineError If any of the constraints listed above are not satisfied.