import { FiledistExtractEntry } from '../types'; export type PackageTarget = { source: 'npm' | 'git' | 'local'; packageName: string; requestedVersion?: string; repository?: string; }; export type ResolvedPackageSource = { source: 'npm' | 'git' | 'local'; packageName: string; packageVersion: string; packagePath: string; }; export type SourceRuntime = { resolvePackage: (entry: FiledistExtractEntry, upgrade: boolean) => Promise; /** * Phase 2 sparse expansion: adds `patterns` to the sparse checkout of a previously * cloned git package and runs `git checkout` to materialise the newly matched files. * No-op when `patterns` is empty or the clone dir has no `.git` (e.g. npm package). */ expandGitSparseCheckout: (packagePath: string, patterns: string[]) => void; cleanup: () => void; /** * Returns all packages resolved during this runtime's lifetime. * Key is the original spec string (e.g. "eslint@^8"). Value contains source and resolved version. */ getResolvedPackages: () => Map; /** * Pin exact versions for known specs. When set, resolvePackage substitutes * the pinned version instead of resolving from npm/git registries. */ setLockedVersions: (locked: Map) => void; }; export declare function parsePackageTarget(spec: string): PackageTarget; export declare function createSourceRuntime(cwd: string, verbose?: boolean): SourceRuntime; //# sourceMappingURL=source.d.ts.map