import { FiledistConfig, FiledistExtractEntry } from '../types'; /** Default bootstrap config filename. */ export declare const DEFAULT_CONFIG_FILENAME = ".filedist.yml"; /** Represents the structure of a .filedist.yml or .filedist-package.yml file. */ export type FiledistConfigFile = { version: number; sets: FiledistExtractEntry[]; }; /** Package config filename used by data packages to define their own sets. */ export declare const PACKAGE_CONFIG_FILENAME = ".filedist-package.yml"; /** * Load the default filedist bootstrap config (.filedist.yml) from the given directory. * Returns the FiledistConfig when found, or null when absent or empty. */ export declare function loadDefaultConfig(cwd: string): FiledistConfig | null; /** * Load a filedist bootstrap config from an explicit YAML file path. * Returns the FiledistConfig when found, or null when the file is empty or absent. */ export declare function loadFiledistConfigFile(filePath: string): FiledistConfig | null; /** * Load a filedist package config (.filedist-package.yml) from the given directory. * Data packages place this file in their root to define their sets, selectors, and presets. * Returns the FiledistConfig when found, or null when absent or empty. */ export declare function loadPackageConfig(directory: string): FiledistConfig | null; export declare function upsertFiledistConfigEntries(directory: string, configFilePath: string, addEntries: FiledistExtractEntry[]): Promise; /** * Strip the version/ref from a package spec string, leaving only the package name. * * Examples: * "my-pkg@^1.2.3" → "my-pkg" * "@scope/pkg@1.0.0" → "@scope/pkg" * "git:github.com/org/repo.git@main" → "git:github.com/org/repo.git" * "my-pkg" → "my-pkg" */ export declare function packageNameWithoutRef(spec: string): string; /** * Remove entries from the filedist YAML config file that match the given package name. * * - `packageSpec` is matched against each entry's `package` field after stripping * the version/ref from both sides, so "xdrs-core@1.0.0" and "xdrs-core" both * match entries whose package field starts with "xdrs-core". * - When `outputPath` is supplied, only entries whose `output.path` equals * `outputPath` are removed (allows targeting a specific entry when the same * package is installed to multiple output directories). * - Returns the number of entries removed. Zero means the config was unchanged. * - When `configFilePath` is not supplied, defaults to `.filedist.yml` in `directory`. * - Throws if the config file exists but cannot be parsed. */ export declare function removeFiledistConfigEntries(directory: string, packageSpec: string, outputPath?: string, configFilePath?: string): number; //# sourceMappingURL=config.d.ts.map