import { Logger } from '../utils/logger';
import { LernaGraph, Service } from '../lerna';
export interface IPackage {
    name: string;
    version: string;
    path: string;
    children: IPackage[];
    parent: IPackage;
    local: boolean;
    duplicate?: boolean;
}
declare type RawTree = IRawPackage;
declare type RawDependencies = {
    [packageName: string]: IRawPackage;
};
interface IRawPackage {
    name: string;
    version: string;
    missing?: boolean;
    link?: string;
    path: string;
    dependencies: RawDependencies;
}
export declare type Tree = IPackage[];
export declare class Packager {
    private readonly _tree;
    private readonly _shaken;
    private readonly _services;
    private readonly _graph;
    private readonly _logger;
    constructor(graph: LernaGraph, services: Service[] | Service, logger: Logger);
    getTree(serviceName: string): Tree;
    setTree(serviceName: string, tree: Tree): void;
    bundle(level?: number): Promise<void>;
    generateZip(service: Service, level: number): Promise<number>;
    static getDependenciesTreeFromNPM(cwd: string): Promise<RawTree>;
    buildDependenciesTree(service: Service): Promise<Tree>;
    shake(service: Service): Tree;
    print(service: Service, printDuplicates?: boolean): string;
}
export {};
