import { type Options as ExecaOptions } from 'execa'; export interface PackageManagerConstructor { new (cwd: string): PackageManager; } export declare enum PackageManagerType { NPM = 0, PNPM = 1, RUSH = 2, YARN = 3 } export declare abstract class PackageManager { protected readonly cwd: string; abstract readonly friendlyName: string; abstract readonly type: PackageManagerType; protected abstract readonly cliName: string; protected abstract readonly packageName: string; protected abstract readonly installCommand: string; protected abstract readonly installDevFlag: string; protected abstract readonly uninstallCommand: string; protected readonly runCommand: string; protected readonly initCommand: string; protected readonly showCommand: string; protected abstract readonly syncCommand: string; /** if set to true, debug info will print to stderr, default is process.stderr.isTTY */ displayBeforeCommandRun: boolean; /** detect if this package manager is used by current project */ detect(): Promise; protected abstract _detect(): Promise; constructor(cwd: string); protected _detectFile(file: string): Promise; /** spawn package manager binary, with inherit stdio */ invokeCli(cmd: string, ...args: string[]): Promise; /** spawn package manager binary, mute output */ protected _invokeErrorLater(cmd: string, args: string[], spawnOptions?: Omit): Promise; protected _invoke(cmd: string, args: string[], spawnOptions?: ExecaOptions): Promise; private __invoke; /** run scripts in package.json, by package manager */ run(script: string, ...args: string[]): Promise; /** install packages * * add packages into package.json * * if "-D" or "--dev" in `packages`, add them to devDependencies **/ install(...packages: string[]): Promise; uninstall(...packages: string[]): Promise; /** run package init command, normally this will create a new package.json, and maybe ask some questions */ init(...args: string[]): Promise; /** detect this package manager callable (installed and in PATH) */ exists(): Promise; /** sync package.json to node_modules, eg: npm i */ sync(...args: string[]): Promise; /** show package info from NPM registry */ show(...args: string[]): Promise; } //# sourceMappingURL=packageManager.d.ts.map