import { ExecutorContext, PromiseExecutor } from '@nx/devkit'; import { StormWorkspaceConfig } from '@storm-software/config/types'; import { BaseExecutorResult } from '@storm-software/workspace-tools/types'; import { Engine } from '@storm-stack/core/base/engine'; import { StormStackCommand, InlineConfig } from '@storm-stack/core/types/config'; import { StormStackBaseExecutorSchema } from './base-executor.schema.d.mjs'; type StormStackExecutorContext = ExecutorContext & { projectName: string; command: TCommand; options: TExecutorSchema; inlineConfig: InlineConfig; workspaceConfig: StormWorkspaceConfig; }; /** * A utility function to create a Storm Stack executor that can be used with the `withRunExecutor` function. * * @remarks * This function is designed to simplify the creation of Storm Stack executors by providing a consistent interface and error handling. * * @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.). * @param executorFn - The function that will be executed when the command is run. * @returns A Promise that resolves to the result of the executor function. */ declare function withStormStackExecutor(command: TCommand, executorFn: (context: StormStackExecutorContext, engine: Engine) => Promise | BaseExecutorResult | null | undefined): PromiseExecutor; export { type StormStackExecutorContext, withStormStackExecutor };