import { type CreateNodes, type TargetConfiguration } from '@nx/devkit'; import { type Shebang } from './shebang'; export interface ScriptPluginOptions { /** Runs claimed scripts in watch mode as continuous targets. Defaults to `true`. */ watch?: boolean; } export interface ScriptPluginDefinition { /** Prefix of the plugin's cache file. */ cacheName: string; technology: string; /** Only files whose shebang the plugin claims become targets. */ claims(shebang: Shebang): boolean; /** `file` is relative to the target's cwd. */ command(file: string, shebang: Shebang, watch: boolean): string; /** Targets not tied to a shebang; claimed scripts win on name clashes. */ extraTargets?(projectRoot: string, workspaceRoot: string, options: T): Promise; } export type ScriptTargets = Record; export declare function createScriptNodes(definition: ScriptPluginDefinition): CreateNodes; /** * Quotes a path for a shell command when the shell would split or expand it. * Double quotes keep spaces intact in sh and cmd.exe; cmd.exe still expands `%VAR%`. */ export declare function quoteShellArg(arg: string): string;