/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
export interface ConfigFile {
    dest: string;
    src: string;
    user_managed: boolean;
}
export interface FeatureConfig {
    files?: ConfigFile[];
    patches?: unknown[];
}
export interface ExpectedFile {
    localPath: string;
    repoPath: string;
    userManaged: boolean;
}
export interface ExpectedOutput {
    files: ExpectedFile[];
    patches: unknown[];
}
export interface RenderTest {
    name: string;
    cr: string;
    args?: Record<string, unknown>;
}
export interface RenderTestsFile {
    tests: RenderTest[];
}
export interface RenderContext {
    /** Absolute path to the temp dir */
    getContextPath: () => string;
    /** Join a relative path inside the temp dir */
    join: (...p: string[]) => string;
    /** Read a file (raw / JSON / YAML) from the temp dir */
    getFile: <T = unknown>(relPath: string, opts?: {
        yaml?: boolean;
        json?: boolean;
    }) => Promise<T | string>;
    /** Absolute path of a file in the temp dir (no existence check) */
    getFilePath: (relPath: string) => string;
    /** Write a file (ensures parent dirs) */
    setFile: (relPath: string, contents: string | Buffer | NodeJS.ArrayBufferView) => Promise<void>;
    /** Whether a path exists in the temp dir */
    exists: (relPath: string) => Promise<boolean>;
    /** Convenience: read output.json from the temp dir */
    getOutputJson: <T = unknown>() => Promise<T>;
    /** List entries (name + isDir) in a subdirectory */
    list: (relPath?: string) => Promise<Array<{
        name: string;
        isDir: boolean;
    }>>;
    /** Optional cleanup */
    remove: () => Promise<void>;
}
declare function loadAndValidateRenderTests(featurePath: string): RenderTestsFile;
declare function resolveCrPath(featurePath: string, crRelPath: string): string;
export declare function listYamlFiles(dir: string): string[];
declare function loadYaml<T = unknown>(file: string): T;
declare function mkNamedTmp(...names: string[]): Promise<string>;
export declare function mkTmp(prefix?: string): Promise<string>;
declare function buildExpectedOutput(config: FeatureConfig, renderDir: string): ExpectedOutput;
export declare function createRenderContext(prefix?: string): Promise<RenderContext>;
declare const _default: {
    mkNamedTmp: typeof mkNamedTmp;
    loadYaml: typeof loadYaml;
    buildExpectedOutput: typeof buildExpectedOutput;
    loadAndValidateRenderTests: typeof loadAndValidateRenderTests;
    resolveCrPath: typeof resolveCrPath;
};
export default _default;
