cnpmcore
Version:
Private NPM Registry for Enterprise
24 lines (23 loc) • 1.16 kB
TypeScript
import { PackageVersion } from '../core/entity/PackageVersion.ts';
import type { PaddingSemVer } from '../core/entity/PaddingSemVer.ts';
import type { SqlRange } from '../core/entity/SqlRange.ts';
export declare class PackageVersionRepository {
private readonly Package;
private readonly PackageVersion;
private readonly PackageTag;
findHaveNotPaddingVersion(id?: number): Promise<PackageVersion[]>;
fixPaddingVersion(pkgVersionId: string, paddingSemver: PaddingSemVer): Promise<void>;
findVersionByTag(scope: string, name: string, tag: string): Promise<string | undefined>;
/**
* find all versions of a package
* @param scope - the scope of the package
* @param name - the name of the package
* @returns the versions of the package
*/
findAllVersions(scope: string, name: string): Promise<string[]>;
/**
* if sql version not contains prerelease, find the max version
*/
findMaxSatisfyVersion(scope: string, name: string, sqlRange: SqlRange): Promise<string | undefined>;
findSatisfyVersionsWithPrerelease(scope: string, name: string, sqlRange: SqlRange): Promise<string[]>;
}