import { PackageType, NpmClientType, NpmClient } from '../types'; /** * For details about how this works consult issue * https://github.com/smapiot/piral/issues/203 * @param root The project's root directory. * @param selected The proposed ("selected") npm client. */ export declare function determineNpmClient(root: string, selected?: NpmClientType): Promise; export declare function isMonorepoPackageRef(refName: string, client: NpmClient): Promise; export declare function installNpmDependencies(client: NpmClient, target?: string): Promise; export declare function installNpmPackageFromOptionalRegistry(packageRef: string, target: string, registry: string): Promise; export declare function uninstallNpmPackage(client: NpmClient, packageRef: string, target?: string, ...flags: Array): Promise; export declare function installNpmPackage(client: NpmClient, packageRef: string, target?: string, ...flags: Array): Promise; export declare function initNpmProject(client: NpmClient, projectName: string, target: string): Promise; export declare function publishNpmPackage(target?: string, file?: string, flags?: Array, interactive?: boolean): Promise; export declare function createNpmPackage(target?: string): Promise; export declare function findNpmTarball(packageRef: string): Promise; export declare function findSpecificVersion(packageName: string, version: string): Promise; export declare function findLatestVersion(packageName: string): Promise; export declare function isLocalPackage(baseDir: string, fullName: string): boolean; export declare function isNpmPackage(fullName: string): boolean; export declare function makeNpmAlias(name: string, version: string): string; export declare function isGitPackage(fullName: string): boolean; export declare function isRemotePackage(fullName: string): boolean; export declare function makeGitUrl(fullName: string): string; export declare function makeFilePath(basePath: string, fullName: string): string; /** * Looks at the provided package name and normalizes it * resulting in the following tuple: * [ * normalized / real package name, * found package version / version identifier, * indicator if an explicit version was used, * the used package type * ] * @param baseDir The base directory of the current operation. * @param fullName The provided package name. * @param client The used npm client. */ export declare function dissectPackageName(baseDir: string, fullName: string, client: NpmClient): Promise<[string, string, boolean, PackageType]>; /** * Looks at the current package name / version and * normalizes it resulting in the following tuple: * [ * normalized / real package name, * found package version / version identifier, * ] * @param baseDir The base directory of the current operation. * @param sourceName The used package name. * @param sourceVersion The used package version. * @param desired The desired package version. */ export declare function getCurrentPackageDetails(baseDir: string, sourceName: string, sourceVersion: string, desired: string, root: string): Promise<[string, undefined | string]>; export declare function tryResolvePackage(name: string, baseDir?: string): string; export declare function findPackageRoot(pck: string, baseDir: string): string; export declare function isLinkedPackage(name: string, type: PackageType, hadVersion: boolean, target: string): boolean; export declare function combinePackageRef(name: string, version: string, type: PackageType): string; export declare function getPackageName(root: string, name: string, type: PackageType): Promise; export declare function getFilePackageVersion(sourceName: string, root: string): string; export declare function getGitPackageVersion(sourceName: string): string; export declare function getPackageVersion(hadVersion: boolean, sourceName: string, sourceVersion: string, type: PackageType, root: string): string; export declare function makePiletExternals(root: string, dependencies: Record, fromEmulator: boolean, piralInfo: any): Promise>; export declare function mergeExternals(customExternals?: Array, coreExternals?: Array): string[]; export declare function makeExternals(root: string, dependencies: Record, externals: Array): Promise;