Skip to main content

abstractSerialPipeline <Options, Ctx, Input, Output>

Hierarchy

Index

Events

readonlyonAfterRun

onAfterRun: Event<unknown[], string> = ...

Called after the pipeline executes work units.

readonlyonBeforeRun

onBeforeRun: Event<[Input], string> = ...

Called before the pipeline executes work units.

readonlyonRunWorkUnit

onRunWorkUnit: Event<[WorkUnit<{}, Input, Output>, Input], string> = ...

Called before a single work unit is executed.

Other

constructor

  • new SerialPipeline<Options, Ctx, Input, Output>(context: Ctx, value?: Input, options?: Options): SerialPipeline<Options, Ctx, Input, Output>
  • Type parameters

    • Options: object
    • Ctx: Context
    • Input = unknown
    • Output = Input

readonlycontext

context: Ctx

readonlydebug

debug: Debugger

depth

depth: number = 0

index

index: number = 0

readonlyoptions

options: Readonly<Required<Options>>

Validated and configured options.

root

root: SerialPipeline<Options, Ctx, any, any> = ...

readonlyvalue

value: Input

id

  • get id(): string
  • Return a unique hierarchical ID.

blueprint

  • blueprint(schemas: __module): object

configure

  • configure(options?: Partial<Options> | (options: Required<Options>) => Partial<Options>): Readonly<Required<Options>>
  • Set an options object by merging the new partial and existing options with the defined blueprint, while running all validation checks. Freeze and return the options object.

    object.configure({ name: 'Boost' });

    object.configure((prevOptions) => ({
    nestedObject: {
    ...prevOptions.nestedObject,
    some: 'value',
    },
    }));

getWorkUnits

  • getWorkUnits(): WorkUnit<{}, Input, Output>[]
  • Traverse the linked list to return a list of work units in defined order.

monitor

  • Monitor all hierarchical pipelines, routines, and tasks being executed, by listening to all applicable events.

pipe

  • Pipe a work unit to be ran with the return value of the previous work unit.


    Type parameters

    • O

abstractrun

  • run(): Promise<Output>
  • Run and process the work units synchronously.