UNPKG

@sprucelabs/spruce-cli

Version:

Command line interface for building Spruce skills.

26 lines (25 loc) 942 B
import { GlobalEmitter } from '../GlobalEmitter'; import { GraphicsInterface } from '../types/cli.types'; import ActionFactory from './ActionFactory'; import FeatureInstaller from './FeatureInstaller'; import { FeatureCode, FeatureAction } from './features.types'; export default class ActionExecuter { private emitter; private ui; private actions; private featureInstallerFactory; private shouldAutoHandleDependencies; private shouldThrowOnListenerError; constructor(options: ActionExecuterOptions); private getFeatureInstaller; private execute; Action<F extends FeatureCode>(featureCode: F, actionCode: string): FeatureAction; } export interface ActionExecuterOptions { ui: GraphicsInterface; emitter: GlobalEmitter; actionFactory: ActionFactory; featureInstallerFactory: () => FeatureInstaller; shouldAutoHandleDependencies?: boolean; shouldThrowOnListenerError?: boolean; }