1 |
|
2 | import { NativePath, PortablePath } from '@yarnpkg/fslib';
|
3 | import { Readable, Writable } from 'stream';
|
4 | import { Configuration } from './Configuration';
|
5 | import { Project } from './Project';
|
6 | import { Report } from './Report';
|
7 | import { Workspace } from './Workspace';
|
8 | import { Locator } from './types';
|
9 | export declare function makeScriptEnv({ project, binFolder, lifecycleScript }: {
|
10 | project?: Project;
|
11 | binFolder: PortablePath;
|
12 | lifecycleScript?: string;
|
13 | }): Promise<{
|
14 | [key: string]: string;
|
15 | } & {
|
16 | BERRY_BIN_FOLDER: string;
|
17 | }>;
|
18 | export declare function prepareExternalProject(cwd: PortablePath, outputPath: PortablePath, { configuration, report, workspace }: {
|
19 | configuration: Configuration;
|
20 | report: Report;
|
21 | workspace?: string | null;
|
22 | }): Promise<void>;
|
23 | declare type HasPackageScriptOption = {
|
24 | project: Project;
|
25 | };
|
26 | export declare function hasPackageScript(locator: Locator, scriptName: string, { project }: HasPackageScriptOption): Promise<boolean>;
|
27 | declare type ExecutePackageScriptOptions = {
|
28 | cwd?: PortablePath | undefined;
|
29 | project: Project;
|
30 | stdin: Readable | null;
|
31 | stdout: Writable;
|
32 | stderr: Writable;
|
33 | };
|
34 | export declare function executePackageScript(locator: Locator, scriptName: string, args: Array<string>, { cwd, project, stdin, stdout, stderr }: ExecutePackageScriptOptions): Promise<number>;
|
35 | export declare function executePackageShellcode(locator: Locator, command: string, args: Array<string>, { cwd, project, stdin, stdout, stderr }: ExecutePackageScriptOptions): Promise<number>;
|
36 | declare type ExecuteWorkspaceScriptOptions = {
|
37 | cwd?: PortablePath | undefined;
|
38 | stdin: Readable | null;
|
39 | stdout: Writable;
|
40 | stderr: Writable;
|
41 | };
|
42 | export declare function executeWorkspaceScript(workspace: Workspace, scriptName: string, args: Array<string>, { cwd, stdin, stdout, stderr }: ExecuteWorkspaceScriptOptions): Promise<number>;
|
43 | export declare function hasWorkspaceScript(workspace: Workspace, scriptName: string): boolean;
|
44 | declare type ExecuteWorkspaceLifecycleScriptOptions = {
|
45 | cwd?: PortablePath | undefined;
|
46 | report: Report;
|
47 | };
|
48 | export declare function executeWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, { cwd, report }: ExecuteWorkspaceLifecycleScriptOptions): Promise<void>;
|
49 | export declare function maybeExecuteWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, opts: ExecuteWorkspaceLifecycleScriptOptions): Promise<void>;
|
50 | declare type GetPackageAccessibleBinariesOptions = {
|
51 | project: Project;
|
52 | };
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | export declare function getPackageAccessibleBinaries(locator: Locator, { project }: GetPackageAccessibleBinariesOptions): Promise<Map<string, [Locator, NativePath]>>;
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | export declare function getWorkspaceAccessibleBinaries(workspace: Workspace): Promise<Map<string, [Locator, NativePath]>>;
|
66 | declare type ExecutePackageAccessibleBinaryOptions = {
|
67 | cwd: PortablePath;
|
68 | nodeArgs?: Array<string>;
|
69 | project: Project;
|
70 | stdin: Readable | null;
|
71 | stdout: Writable;
|
72 | stderr: Writable;
|
73 | };
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | export declare function executePackageAccessibleBinary(locator: Locator, binaryName: string, args: Array<string>, { cwd, project, stdin, stdout, stderr, nodeArgs }: ExecutePackageAccessibleBinaryOptions): Promise<number>;
|
86 | declare type ExecuteWorkspaceAccessibleBinaryOptions = {
|
87 | cwd: PortablePath;
|
88 | stdin: Readable | null;
|
89 | stdout: Writable;
|
90 | stderr: Writable;
|
91 | };
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | export declare function executeWorkspaceAccessibleBinary(workspace: Workspace, binaryName: string, args: Array<string>, { cwd, stdin, stdout, stderr }: ExecuteWorkspaceAccessibleBinaryOptions): Promise<number>;
|
100 | export {};
|