import { CoreModels } from 'tnp-core';
import { BaseNpmHelpers } from './base-npm-helpers';
import type { BaseProject } from './base-project';
export type DedupePackage = string | {
    package: string;
    excludeFrom?: string[];
    includeOnlyIn?: string[];
};
export declare class BaseNodeModules<NPM_HELPERS extends BaseNpmHelpers = BaseNpmHelpers> {
    /**
     * my-path/node_modules
     */
    protected cwd: string;
    protected npmHelpers: NPM_HELPERS;
    protected _npmHelpersType: NPM_HELPERS;
    constructor(
    /**
     * my-path/node_modules
     */
    cwd: string, npmHelpers: NPM_HELPERS);
    /**
     * cwd + node_modules
     */
    get path(): string;
    /**
     * Path to package inside node_modules folder
     * @example <project-path>/node_modules/<package-name>
     */
    pathFor(packageName: string | string[]): string;
    /**
     * real path of node_modules
     * if node_modules is a link
     * it will return real path.
     * if node_modules is folder = path
     */
    get realPath(): string;
    protected preventWrongLinkDestination(dest: string): string;
    linkToProject(project: Partial<BaseProject>): void;
    copyToProject(project: BaseProject): void;
    linkToLocation(location: string): void;
    makeSureInstalled(options?: Omit<CoreModels.NpmInstallOptions, 'pkg'>): Promise<void>;
    remove(options?: {
        skipQuestion?: boolean;
    }): Promise<void>;
    removePackage(packageInside: string): void;
    reinstall(options?: Omit<CoreModels.NpmInstallOptions, 'pkg'>): Promise<void>;
    get isLink(): boolean;
    unlinkNodeModulesWhenLinked(): void;
    get empty(): boolean;
    /**
     * @returns true if node_modules folder is empty
     * DEEP CHECK - also if node_modules is a link
     * and is not existent
     */
    isEmpty(): boolean;
    /**
     *  Prepare command for npm install
     * (or yarn install)
     */
    prepareCommand(options: CoreModels.NpmInstallOptions, cwd?: string): Promise<string>;
    /**
     *
     * @param rootDir
     * @param packageName
     * @returns absolute paths to package dirs
     */
    private findPackageDirs;
    dedupePackages(packagesConfig?: DedupePackage[], countOnly?: boolean, fake?: boolean): void;
}