import { type LockfileObject } from '@pnpm/lockfile.fs'; import { type LogBase } from '@pnpm/logger'; import { type IncludedDependencies, type Modules } from '@pnpm/modules-yaml'; import { type PatchGroupRecord } from '@pnpm/patching.config'; import { type HoistingLimits } from '@pnpm/real-hoist'; import { type StoreController } from '@pnpm/store-controller-types'; import { type DepPath, type HoistedDependencies, type IgnoredBuilds, type ProjectId, type ProjectManifest, type Registries, type SupportedArchitectures, type ProjectRootDir } from '@pnpm/types'; export { extendProjectsWithTargetDirs } from './extendProjectsWithTargetDirs.js'; export type { HoistingLimits }; export type ReporterFunction = (logObj: LogBase) => void; export interface Project { binsDir: string; buildIndex: number; manifest: ProjectManifest; modulesDir: string; id: ProjectId; pruneDirectDependencies?: boolean; rootDir: ProjectRootDir; } export interface HeadlessOptions { ignorePatchFailures?: boolean; neverBuiltDependencies?: string[]; ignoredBuiltDependencies?: string[]; onlyBuiltDependencies?: string[]; onlyBuiltDependenciesFile?: string; autoInstallPeers?: boolean; childConcurrency?: number; currentLockfile?: LockfileObject; currentEngine: { nodeVersion?: string; pnpmVersion: string; }; dedupeDirectDeps?: boolean; enablePnp?: boolean; engineStrict: boolean; excludeLinksFromLockfile?: boolean; extraBinPaths?: string[]; extraEnv?: Record; extraNodePaths?: string[]; preferSymlinkedExecutables?: boolean; hoistingLimits?: HoistingLimits; externalDependencies?: Set; ignoreDepScripts: boolean; ignoreScripts: boolean; ignorePackageManifest?: boolean; /** * When true, skip fetching local dependencies (file: protocol pointing to directories). * This is used by `pnpm fetch` which only downloads packages from the registry * and doesn't need local packages that won't be available (e.g., in Docker builds). */ ignoreLocalPackages?: boolean; include: IncludedDependencies; selectedProjectDirs: string[]; allProjects: Record; prunedAt?: string; hoistedDependencies: HoistedDependencies; hoistPattern?: string[]; publicHoistPattern?: string[]; currentHoistPattern?: string[]; currentPublicHoistPattern?: string[]; currentHoistedLocations?: Record; lockfileDir: string; modulesDir?: string; enableGlobalVirtualStore?: boolean; virtualStoreDir?: string; virtualStoreDirMaxLength: number; patchedDependencies?: PatchGroupRecord; scriptsPrependNodePath?: boolean | 'warn-only'; scriptShell?: string; shellEmulator?: boolean; storeController: StoreController; sideEffectsCacheRead: boolean; sideEffectsCacheWrite: boolean; symlink?: boolean; disableRelinkLocalDirDeps?: boolean; force: boolean; storeDir: string; rawConfig: object; unsafePerm: boolean; userAgent: string; registries: Registries; reporter?: ReporterFunction; packageManager: { name: string; version: string; }; pruneStore: boolean; pruneVirtualStore?: boolean; wantedLockfile?: LockfileObject; ownLifecycleHooksStdio?: 'inherit' | 'pipe'; pendingBuilds: string[]; resolveSymlinksInInjectedDirs?: boolean; skipped: Set; enableModulesDir?: boolean; nodeLinker?: 'isolated' | 'hoisted' | 'pnp'; useGitBranchLockfile?: boolean; useLockfile?: boolean; supportedArchitectures?: SupportedArchitectures; hoistWorkspacePackages?: boolean; modulesFile?: Modules | null; } export interface InstallationResultStats { added: number; removed: number; linkedToRoot: number; } export interface InstallationResult { stats: InstallationResultStats; ignoredBuilds: IgnoredBuilds | undefined; } export declare function headlessInstall(opts: HeadlessOptions): Promise;