import { PortablePath } from '@yarnpkg/fslib'; import { Cache } from './Cache'; import { Configuration } from './Configuration'; import { Fetcher } from './Fetcher'; import { DependencyMeta } from './Manifest'; import { Report } from './Report'; import { Workspace } from './Workspace'; import { IdentHash, DescriptorHash, LocatorHash } from './types'; import { Descriptor, Ident, Locator, Package } from './types'; export declare type InstallOptions = { cache: Cache; fetcher?: Fetcher; report: Report; immutable?: boolean; lockfileOnly?: boolean; }; export declare class Project { readonly configuration: Configuration; readonly cwd: PortablePath; resolutionAliases: Map; workspaces: Array; workspacesByCwd: Map; workspacesByLocator: Map; workspacesByIdent: Map>; storedResolutions: Map; storedDescriptors: Map; storedPackages: Map; storedChecksums: Map; optionalBuilds: Set; static find(configuration: Configuration, startingCwd: PortablePath): Promise<{ project: Project; workspace: Workspace | null; locator: Locator; }>; constructor(projectCwd: PortablePath, { configuration }: { configuration: Configuration; }); private setupResolutions; private setupWorkspaces; private addWorkspace; get topLevelWorkspace(): Workspace; tryWorkspaceByCwd(workspaceCwd: PortablePath): Workspace | null; getWorkspaceByCwd(workspaceCwd: PortablePath): Workspace; getWorkspaceByFilePath(filePath: PortablePath): Workspace; tryWorkspaceByLocator(locator: Locator): Workspace | null; getWorkspaceByLocator(locator: Locator): Workspace; findWorkspacesByDescriptor(descriptor: Descriptor): Workspace[]; forgetTransientResolutions(): void; forgetVirtualResolutions(): void; getDependencyMeta(ident: Ident, version: string | null): DependencyMeta; findLocatorForLocation(cwd: PortablePath): Promise; resolveEverything({ cache, report, lockfileOnly }: InstallOptions): Promise; fetchEverything({ cache, report, fetcher: userFetcher }: InstallOptions): Promise; linkEverything({ cache, report }: InstallOptions): Promise; install(opts: InstallOptions): Promise; generateLockfile(): string; persistLockfile(): Promise; persist(): Promise; cacheCleanup({ cache, report }: InstallOptions): Promise; }