import type { ConfigData } from '../types/index.js';
import type { App } from '@gjsify/rolldown-plugin-gjsify';
import type { RolldownOutput } from 'rolldown';
export declare class BuildAction {
    readonly configData: ConfigData;
    constructor(configData?: ConfigData);
    /** Library mode */
    buildLibrary(): Promise<RolldownOutput[]>;
    /**
     * Parse the `--globals` value into { autoMode, extras }.
     * - `auto`             → { autoMode: true, extras: '' }
     * - `auto,dom`         → { autoMode: true, extras: 'dom' }
     * - `auto,dom,fetch`   → { autoMode: true, extras: 'dom,fetch' }
     * - `dom,fetch`        → { autoMode: false, extras: 'dom,fetch' }
     * - `none` / ``        → { autoMode: false, extras: '' }
     * - `undefined`        → { autoMode: true, extras: '' }  (default)
     */
    private parseGlobalsValue;
    /**
     * Resolve the `--globals` CLI list into a pre-computed inject stub path
     * that the orchestrator appends to its input list. Only runs for
     * `--app gjs` — Node and browser builds rely on native globals.
     *
     * Used only for the explicit-only path (no `auto` token in the value).
     * The auto path is handled in `buildApp` via the iterative multi-pass build.
     */
    private resolveGlobalsInject;
    /**
     * Post-processing: prepend the resolved shebang line and mark the
     * output executable. Runs for GJS and Node app builds with a single
     * outfile. The default line depends on the target — `gjs -m` for
     * `--app gjs`, `node` for `--app node` — so a single `shebang: true`
     * config produces a directly-executable bin for whichever target is
     * built. For GJS the shebang plugin already injects during bundling;
     * this hook is the safety net for anything that bypassed it (e.g.
     * user-supplied banners that out-ordered it) plus the chmod. For Node
     * there is no in-bundle plugin, so this hook is the sole injection point.
     */
    private applyShebang;
    /** Application mode */
    buildApp(app?: App, opts?: {
        watch?: boolean;
    }): Promise<RolldownOutput[]>;
    /**
     * Drive `rolldown.watch(...)`: rebuild on source change, apply the
     * post-bundle shebang hook on each successful build, surface errors
     * without exiting, clean up on SIGINT/SIGTERM. Resolves only when the
     * watcher closes — keeps the CLI process alive across rebuilds.
     */
    private runWatchLoop;
    start(buildType?: {
        library?: boolean;
        app?: App;
        watch?: boolean;
    }): Promise<RolldownOutput[]>;
}
