import type { Config } from "../config";
import type { BaseConfig } from "../program";
import type { FileSystem } from './fs';
import { Logger } from "../logger";
type GlobOptions = {
    cwd?: AbsolutePath;
    ignore?: string[];
};
export declare class RunLogger extends Logger {
    proc: {
        (...messages: unknown[]): void;
        count: number;
    };
    copy: {
        (...messages: unknown[]): void;
        count: number;
    };
}
/**
 * This is transferable context for build command.
 * Use this context to communicate with lower data processing levels.
 */
export declare class Run<TConfig = BaseConfig> {
    readonly logger: RunLogger;
    readonly config: Config<BaseConfig & TConfig>;
    readonly fs: FileSystem;
    readonly normalize: (path: RelativePath) => NormalizedPath;
    readonly input: AbsolutePath;
    readonly originalInput: AbsolutePath;
    protected scopes: Map<string, AbsolutePath>;
    constructor(config: Config<BaseConfig & TConfig>);
    /**
     * This method is especially written in sync mode to use in run.write method.
     */
    exists(path: AbsolutePath): boolean;
    /**
     * Run.input bounded read helper
     *
     * Asserts file path is in project scope.
     *
     * @throws {InsecureAccessError}
     * @param {AbsolutePath} path - unixlike absolute path to file
     *
     * @returns {Promise<string>}
     */
    read(path: AbsolutePath): Promise<string>;
    /**
     * Run.input bounded write helper.
     *
     * Asserts file path is in project scope.
     * Drops hardlinks (unlink before write).
     * Creates directory for file.
     * Uses atomic write via temporary file + rename to prevent concurrent writes.
     *
     * @param {AbsolutePath} path - unixlike absolute path to file
     * @param {string} content - file content
     * @param {boolean} force - ignore file exists
     *
     * @returns {Promise<void>}
     */
    write(path: AbsolutePath, content: string, force?: boolean): Promise<void>;
    /**
     * Glob wrapper with some default settings
     *
     * @param {string | string[]} pattern
     * @param {GlobOptions} options
     *
     * @returns {NormalizedPath[]}
     */
    glob(pattern: string | string[], options: GlobOptions): Promise<NormalizedPath[]>;
    copy(from: AbsolutePath, to: AbsolutePath, ignore?: string[]): Promise<[string, string][]>;
    /**
     * Remove selected file or directory.
     */
    remove(path: AbsolutePath): Promise<void>;
    realpath(path: AbsolutePath): Promise<AbsolutePath>;
    realpathSync(path: AbsolutePath): AbsolutePath;
    private assertProjectScope;
}
export {};
