import { CommandLineAction, type ICommandLineActionOptions } from '@rushstack/ts-command-line';
import { type ITerminal } from '@rushstack/terminal';
import type { RushConfiguration } from '../../api/RushConfiguration';
import { EventHooksManager } from '../../logic/EventHooksManager';
import { RushCommandLineParser } from '../RushCommandLineParser';
import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
import type { RushSession } from '../../pluginFramework/RushSession';
import type { IRushCommand } from '../../pluginFramework/RushLifeCycle';
export interface IBaseRushActionOptions extends ICommandLineActionOptions {
    /**
     * By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously
     * in the same repo folder.  (For example, it would be a mistake to run "rush install" and "rush build" at the
     * same time.)  If your command makes sense to run concurrently with other operations,
     * set safeForSimultaneousRushProcesses=true to disable this protection.  In particular, this is needed for
     * custom scripts that invoke other Rush commands.
     */
    safeForSimultaneousRushProcesses?: boolean;
    /**
     * The rush parser.
     */
    parser: RushCommandLineParser;
}
/**
 * The base class for a few specialized Rush command-line actions that
 * can be used without a rush.json configuration.
 */
export declare abstract class BaseConfiglessRushAction extends CommandLineAction implements IRushCommand {
    private _safeForSimultaneousRushProcesses;
    protected readonly rushConfiguration: RushConfiguration | undefined;
    protected readonly terminal: ITerminal;
    protected readonly rushSession: RushSession;
    protected readonly rushGlobalFolder: RushGlobalFolder;
    protected readonly parser: RushCommandLineParser;
    constructor(options: IBaseRushActionOptions);
    protected onExecuteAsync(): Promise<void>;
    /**
     * All Rush actions need to implement this method. This method runs after
     * environment has been set up by the base class.
     */
    protected abstract runAsync(): Promise<void>;
    private _ensureEnvironment;
}
/**
 * The base class that most Rush command-line actions should extend.
 */
export declare abstract class BaseRushAction extends BaseConfiglessRushAction {
    private _eventHooksManager;
    protected get eventHooksManager(): EventHooksManager;
    protected readonly rushConfiguration: RushConfiguration;
    protected onExecuteAsync(): Promise<void>;
    /**
     * If an error is encountered while trying to load plugins, it is saved in the `PluginManager.error`
     * property, so we can defer throwing it until when `_throwPluginErrorIfNeed()` is called.
     */
    private _throwPluginErrorIfNeed;
}
//# sourceMappingURL=BaseRushAction.d.ts.map