import type { IPostAction } from "./index";
export interface INPMDependency {
    /**
     * Request an NPM package to be installed to the project.
     */
    type: "npm-dependency";
    /**
     * A path to the node project.
     */
    project: string;
    /**
     * Wether the dependency is development or production.
     */
    dep: "prod" | "dev";
    /**
     * NPM package name.
     */
    id: string;
    /**
     * Compatible NPM version.
     */
    version: "*";
}
interface DependenciesForProjects {
    [projectPath: string]: DependenciesForProject;
}
interface DependenciesForProject {
    projectPath: string;
    devDeps: Dependencies;
    prodDeps: Dependencies;
}
interface Dependencies {
    [packageId: string]: PackageVersion;
}
declare type PackageVersion = string;
export declare function actionIsNPMDependency(action: IPostAction): action is INPMDependency;
/**
 * This method is useful to wrap the array of {@link IPostAction} into node spawn suitable `npm install ...` command args.
 * @param actions
 * @returns
 */
export declare function npmiCommandsForNPMPackageActions(actions: IPostAction[]): NPMICommand[];
export declare function groupNPMIPackageActions(actions: IPostAction[]): DependenciesForProjects;
export declare function groupNPMIPakcages(packages: INPMDependency[]): DependenciesForProjects;
export declare class NPMIClass implements NPMICommand {
    readonly command: "npm";
    readonly args: ReadonlyArray<string>;
    readonly options: {
        readonly cwd: string;
    };
    constructor(cwd: string, dependencies: ReadonlyArray<string>, dep: "prod" | "dev");
    toString(): string;
}
export interface NPMICommand {
    command: "npm";
    args: ReadonlyArray<string>;
    options: {
        cwd: string;
    };
    toString(): string;
}
export {};
