import type { ITerminal } from '@rushstack/terminal';
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
import type { IOperationExecutionResult } from '../operations/IOperationExecutionResult';
/**
 * @internal
 */
export interface IOperationBuildCacheOptions {
    /**
     * The repo-wide configuration for the build cache.
     */
    buildCacheConfiguration: BuildCacheConfiguration;
    /**
     * The terminal to use for logging.
     */
    terminal: ITerminal;
    /**
     * If true, omit AppleDouble (`._*`) files from cache archives when running on macOS
     * and a companion file exists in the same directory.
     */
    excludeAppleDoubleFiles: boolean;
}
/**
 * @internal
 */
export type IProjectBuildCacheOptions = IOperationBuildCacheOptions & {
    /**
     * Value from rush-project.json
     */
    projectOutputFolderNames: ReadonlyArray<string>;
    /**
     * The project to be cached.
     */
    project: RushConfigurationProject;
    /**
     * The hash of all relevant inputs and configuration that uniquely identifies this execution.
     */
    operationStateHash: string;
    /**
     * The name of the phase that is being cached.
     */
    phaseName: string;
};
/**
 * @internal
 */
export declare class OperationBuildCache {
    private static _tarUtilityPromise;
    private readonly _project;
    private readonly _localBuildCacheProvider;
    private readonly _cloudBuildCacheProvider;
    private readonly _buildCacheEnabled;
    private readonly _cacheWriteEnabled;
    private readonly _projectOutputFolderNames;
    private readonly _cacheId;
    private readonly _excludeAppleDoubleFiles;
    private constructor();
    private static _tryGetTarUtility;
    get cacheId(): string | undefined;
    static getOperationBuildCache(options: IProjectBuildCacheOptions): OperationBuildCache;
    static forOperation(executionResult: IOperationExecutionResult, options: IOperationBuildCacheOptions): OperationBuildCache;
    tryRestoreFromCacheAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;
    trySetCacheEntryAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;
    /**
     * Walks the declared output folders of the project and collects a list of files.
     * @returns The list of output files as project-relative paths, or `undefined` if a
     *   symbolic link was encountered.
     */
    private _tryCollectPathsToCacheAsync;
    private _getTarLogFilePath;
    private static _getCacheId;
}
//# sourceMappingURL=OperationBuildCache.d.ts.map