import type { OutputFile } from 'esbuild';
import type { ViteBuildResult } from '../../build/vite/definitions';
import type { CliAsset } from '../config/cli-options';
export declare const renderFileModeLabel: {
    created: string;
    updated: string;
    deleted: string;
    copied: string;
};
/** A single file inside a file map */
export type VirtualFile = {
    content: Buffer;
    mode?: keyof typeof renderFileModeLabel;
    sourceMap?: Buffer;
};
/**
 * The path represents a unix styled path relative to the app root
 */
export type FileMap = Record<string, VirtualFile>;
export type ImmutableFileMap = Readonly<{
    readonly [path: string]: Readonly<VirtualFile>;
}>;
export type FileManager = {
    fileExists: (filepath: string) => boolean;
    throwIfFileDoesNotExist: (filepath: string) => void;
    getFile: (filepath: string) => VirtualFile;
    getFileName: (filepath: string) => string;
    getFilePathsByRegex: (regex: RegExp | string) => string[];
    getFileMap: () => ImmutableFileMap;
    setFile: (filepath: string, content: Buffer) => void;
    setFiles: (files: Record<string, VirtualFile>) => void;
    mapEsbuildOutputFiles: (outputFiles: OutputFile[] | undefined, root: string, outdir: string) => FileManager;
    mapViteOutputFiles: (result: ViteBuildResult, distDir: string) => FileManager;
    deleteFile: (filepath: string) => void;
    writeFileToDisc: (filepath: string) => Promise<void>;
    writeFileMapToDisc: (root: string, dryRun?: boolean) => Promise<void>;
    addAssetFiles: (options: {
        root: string;
        assetConfigs: CliAsset[];
        distDir: string;
    }) => Promise<void>;
    resetFileMap: () => void;
};
/**
 * This function should only be used for creating fileMap helpers that are not shared across more than one module
 */
export declare function createFileManager(initFileMap?: FileMap): FileManager;
export declare const fileMapManagerSingleton: FileManager;
