nanoservice-ts v0.1.0


nanoservice-ts / runner/src / Runner

Class: Runner

Defined in: core/runner/src/Runner.ts:7

Runner class that extends RunnerSteps to execute a series of NanoService steps.

Extends

Constructors

new Runner()

new Runner(steps): Runner

Defined in: core/runner/src/Runner.ts:15

Constructs a new Runner instance.

Parameters

steps

NodeBase[] = []

An array of NanoService steps to be executed.

Returns

Runner

Overrides

RunnerSteps.constructor

Methods

run()

run(ctx): Promise<Context>

Defined in: core/runner/src/Runner.ts:26

Executes the series of NanoService steps with the given context.

Parameters

ctx

Context

The context to be passed through the steps.

Returns

Promise<Context>

A promise that resolves to the final context after all steps have been executed.


runSteps()

runSteps(ctx, steps, deep, step_name): Promise<Context>

Defined in: core/runner/src/RunnerSteps.ts:15

Executes a series of steps in the given context.

Parameters

ctx

Context

The context in which the steps are executed.

steps

NodeBase[]

An array of NanoService steps to be executed.

deep

boolean = false

A boolean indicating whether the function is being called recursively for flow steps.

step_name

string = ""

The name of the current step being processed in a flow.

Returns

Promise<Context>

A promise that resolves to the updated context after all steps have been executed.

Throws

Throws a GlobalError if any step results in an error.

Inherited from

RunnerSteps.runSteps