import { AttachMents, Manifest, Version, Versions } from '@verdaccio/types'; export declare const STORAGE: { PACKAGE_FILE_NAME: string; FILE_EXIST_ERROR: string; NO_SUCH_FILE_ERROR: string; DEFAULT_REVISION: string; }; /** * Create a new package in the storage, return a boilerplate package * @param name package name * @returns {Manifest} */ export declare function generatePackageTemplate(name: string): Manifest; /** * Normalize package properties, tags, revision id. * @param {Object} pkg package reference. */ export declare function normalizePackage(pkg: Manifest): Manifest; export declare function generateRevision(rev: string): string; export declare function getLatestReadme(pkg: Manifest): string; export declare function cleanUpReadme(version: any): Version; export declare const WHITELIST: string[]; export declare function cleanUpLinksRef(result: Manifest, keepUpLinkData?: boolean): Manifest; export declare function checkPackageRemote(name: string, isAllowPublishOffline: boolean, syncMetadata: Function): Promise; export declare function mergeUplinkTimeIntoLocal(localMetadata: Manifest, remoteMetadata: Manifest): any; export declare function mergeUplinkTimeIntoLocalNext(cacheManifest: Manifest, remoteManifest: Manifest): Manifest; export declare function updateUpLinkMetadata(uplinkId: any, manifest: Manifest, etag: string): { _uplinks: {}; _distfiles: import("@verdaccio/types").DistFiles; _rev: string; _id?: string | undefined; name: string; description?: string | undefined; 'dist-tags': import("@verdaccio/types").GenericBody; time: import("@verdaccio/types").GenericBody; versions: Versions; maintainers?: import("@verdaccio/types").Author[] | undefined; readme?: string | undefined; users?: import("@verdaccio/types").PackageUsers | undefined; access?: any; bugs?: { url: string; } | undefined; license?: string | undefined; homepage?: string | undefined; repository?: string | { type?: string | undefined; url: string; directory?: string | undefined; } | undefined; keywords?: string[] | undefined; author?: string | import("@verdaccio/types").Author | undefined; _attachments: AttachMents; }; export declare function prepareSearchPackage(data: Manifest): any; export declare function isDifferentThanOne(versions: Versions | AttachMents): boolean; export declare function hasInvalidPublishBody(manifest: Pick): boolean; /** * Function gets a local info and an info from uplinks and tries to merge it exported for unit tests only. * @param {*} local * @param {*} remoteManifest * @param {*} config configuration file */ export declare function mergeVersions(cacheManifest: Manifest, remoteManifest: Manifest): Manifest; /** * Normalize dist-tags. * * There is a legacy behaviour where the dist-tags could be an array, in such * case, the array is orderded and the highest version becames the * latest. * * The dist-tag tags must be plain strigs, if the latest is empty (for whatever reason) is * normalized to be the highest version available. * * This function cleans up every invalid version on dist-tags, but does not remove * invalid versions from the manifest. * * @param {*} data */ export declare function normalizeDistTags(manifest: Manifest): Manifest; export declare function hasDeprecatedVersions(pkgInfo: Manifest): boolean; export declare function isDeprecatedManifest(manifest: Manifest): boolean;