Skip to content

@saflib/workflows


Variable: CommandStepMachine

const CommandStepMachine: StateMachine<CommandStepContext, AnyEventObject, {[key: string]: undefined | ActorRefFromLogic<PromiseActorLogic<unknown, NonReducibleUnknown, EventObject>> | ActorRefFromLogic<PromiseActorLogic<"Dry run" | { shouldContinue: boolean; }, CommandStepContext, EventObject>>; }, Values<{ noop: { id: undefined | string; logic: PromiseActorLogic<unknown, NonReducibleUnknown, EventObject>; src: "noop"; }; runCommand: { id: undefined | string; logic: PromiseActorLogic<"Dry run" | { shouldContinue: boolean; }, CommandStepContext, EventObject>; src: "runCommand"; }; }>, { params: LogParams; type: "log"; }, never, never, "done" | "standby" | "runCommand" | "printBefore", string, CommandStepInput & WorkflowInput, WorkflowOutput, EventObject, MetaObject, { context: (__namedParameters) => object; id: "command-step"; initial: "printBefore"; output: (__namedParameters) => object; states: { done: { type: "final"; }; printBefore: { entry: ActionFunction<CommandStepContext, AnyEventObject, AnyEventObject, undefined, never, never, never, never, never>; on: { printBefore: { actions: { params: (event) => object; type: "log"; }; target: "runCommand"; }; }; }; runCommand: { invoke: { input: (__namedParameters) => CommandStepContext; onDone: { actions: readonly [{ params: (event) => object; type: "log"; }, ActionFunction<CommandStepContext, DoneActorEvent<"Dry run" | { shouldContinue: ...; }, string>, AnyEventObject, undefined, Values<{ noop: { id: ...; logic: ...; src: ...; }; runCommand: { id: ...; logic: ...; src: ...; }; }>, never, never, never, never>]; target: "done"; }; onError: { actions: readonly [{ params: (event) => object; type: "log"; }]; target: "standby"; }; src: "runCommand"; }; }; standby: { on: { continue: { target: "printBefore"; }; prompt: { actions: readonly [(__namedParameters) => void]; }; }; }; }; }>

Runs a shell command as part of a workflow. Stops the workflow if the command fails.