You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
748 B
19 lines
748 B
import execa from 'execa';
|
|
|
|
declare type PackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun';
|
|
declare const AGENTS: readonly ["pnpm", "yarn", "npm", "pnpm@6", "yarn@berry", "bun"];
|
|
declare type Agent = typeof AGENTS[number];
|
|
declare function detectPackageManager(cwd?: string): Promise<Agent | null>;
|
|
|
|
interface InstallPackageOptions {
|
|
cwd?: string;
|
|
dev?: boolean;
|
|
silent?: boolean;
|
|
packageManager?: string;
|
|
packageManagerVersion?: string;
|
|
preferOffline?: boolean;
|
|
additionalArgs?: string[];
|
|
}
|
|
declare function installPackage(names: string | string[], options?: InstallPackageOptions): Promise<execa.ExecaReturnValue<string>>;
|
|
|
|
export { Agent, InstallPackageOptions, PackageManager, detectPackageManager, installPackage };
|
|
|