import type { CommandHandlerMap } from '@pnpm/cli.command'; import { type GlobalPackageInfo } from '@pnpm/global.packages'; import type { CreateStoreControllerOptions } from '@pnpm/store.connection-manager'; import { type ResolutionPolicyViolation } from './installGlobalPackages.js'; export type GlobalAddOptions = CreateStoreControllerOptions & { bin?: string; globalPkgDir?: string; registriesByScope: Record; /** Already merged with the `--allow-build` selectors by `add`'s handler. */ allowBuilds?: Record; saveExact?: boolean; savePrefix?: string; rootProjectManifest?: unknown; handleResolutionPolicyViolations?: (violations: readonly ResolutionPolicyViolation[]) => Promise; updateResolutionPolicyManifest?: (violations: readonly ResolutionPolicyViolation[], dir: string) => Promise; }; export declare function handleGlobalAdd(opts: GlobalAddOptions, params: string[], commands: CommandHandlerMap): Promise; export interface InstallGroupContext { opts: GlobalAddOptions; globalDir: string; globalBinDir: string; allowBuilds: Record; params: string[]; } export declare function installGroup(ctx: InstallGroupContext, commands: CommandHandlerMap): Promise; export declare function getReplacementAliases(aliases: string[]): string[]; export declare function shouldReplaceExistingGlobalInstall(pkg: GlobalPackageInfo, aliases: string[], replacementAliases: string[]): boolean; export declare function resolveLocalParam(param: string, baseDir: string): string;