import { ProgressEvent } from '../types'; import { InstallResult } from './action-install'; export type RemoveOptions = { /** * Working directory; used to discover config file and resolve output paths. */ cwd: string; /** * When true, removes all set entries. Mutually exclusive with packageSpec. */ all?: boolean; /** * Package spec to remove. Version/ref is ignored during matching, so both * "xdrs-core" and "xdrs-core@1.0.0" match an entry whose package field * starts with "xdrs-core". Required when all is not true. */ packageSpec?: string; /** * Optional: restrict removal to entries whose output.path equals this value. * When omitted, all entries for the package are removed. */ outputPath?: string; /** * Optional: restrict removal to entries that contain ALL of these preset tags. */ presets?: string[]; /** * Explicit path to the config file. When omitted, the config is auto-discovered * via cosmiconfig (same as the `install` command). */ configFilePath: string; lockfilePath: string; dryRun?: boolean; verbose?: boolean; onProgress?: (event: ProgressEvent) => void; }; export type RemoveSummary = { /** Number of config entries that were removed (or would be removed in dry-run). */ removedEntries: number; /** Result from the subsequent install run that cleared the output directories. */ install: InstallResult; /** True when the lock file was deleted (only possible on --all with full cleanup). */ lockfileDeleted?: boolean; /** True when the config file was deleted (only possible on --all with full cleanup). */ configFileDeleted?: boolean; }; /** * Remove matching config entries and run a full install with the remaining entries * so that the lockfile is updated and removed files are deleted from output directories. * * Steps: * 1. Discover the config file path (unless `configFilePath` is supplied). Throws when * no config file is found — the config file is required for this command. * 2. Partition the config sets: when `all=true`, all entries are removed; otherwise * entries matching `packageSpec` (plus optional `outputPath` / `presets` filters) * are removed. Throws when no matching entries are found. * 3. Rewrite the config file on disk with only the `toKeep` entries. * 4. Call `actionInstall` with the remaining entries (`frozenLockfile: false`) * so the lockfile is updated and files for removed entries are deleted from disk. * * This has the same effect as manually deleting the matching sets from the config * file and running `filedist install`. */ export declare function actionRemove(options: RemoveOptions): Promise; //# sourceMappingURL=action-remove.d.ts.map