///
import { PortablePath } from '@yarnpkg/fslib';
import { CommandClass } from 'clipanion';
import { Writable, Readable } from 'stream';
import { SettingsDefinition, PluginConfiguration } from './Configuration';
import { Fetcher } from './Fetcher';
import { Linker } from './Linker';
import { Project } from './Project';
import { Resolver } from './Resolver';
import { Locator } from './types';
declare type ProcessEnvironment = {
[key: string]: string;
};
export declare type CommandContext = {
cwd: PortablePath;
plugins: PluginConfiguration;
quiet: boolean;
stdin: Readable;
stdout: Writable;
stderr: Writable;
};
export interface FetcherPlugin {
new (): Fetcher;
}
export interface LinkerPlugin {
new (): Linker;
}
export interface ResolverPlugin {
new (): Resolver;
}
export declare type Hooks = {
setupScriptEnvironment?: (project: Project, env: ProcessEnvironment, makePathWrapper: (name: string, argv0: string, args: Array) => Promise) => Promise;
wrapScriptExecution?: (executor: () => Promise, project: Project, locator: Locator, scriptName: string, extra: {
script: string;
args: Array;
cwd: PortablePath;
env: ProcessEnvironment;
stdin: Readable | null;
stdout: Writable;
stderr: Writable;
}) => Promise<() => Promise>;
afterAllInstalled?: (project: Project) => void;
};
export declare type Plugin = {
configuration?: {
[key: string]: SettingsDefinition;
};
commands?: Array>;
fetchers?: Array;
linkers?: Array;
resolvers?: Array;
hooks?: PluginHooks;
};
export {};