/** * Abstraction for fetching the latest published version of a package. * * The default implementation uses `npm view`; tests can substitute a * stub that returns a fixed version string. */ export interface VersionSource { getLatestVersion(packageName: string): Promise; } /** * Fetches the latest version of a package from the npm registry * by shelling out to `npm view version`. * * `--prefer-online` is passed so npm always fetches from the registry * rather than serving a stale cached result. This matters in long-running * server processes (e.g. Railway) where the npm cache may be populated * with an old version from the initial install. */ export declare class NpmVersionSource implements VersionSource { /** @throws When the npm CLI exits non-zero or returns an empty string. */ getLatestVersion(packageName: string): Promise; } //# sourceMappingURL=version-source.d.ts.map