UNPKG

2.48 kBTypeScriptView Raw
1import { TSCommands, PackageInfo } from './interfaces';
2export declare type ExecEnv = {
3 [name: string]: string;
4};
5declare type ExecOpts = {
6 cmd: string;
7 args?: string[];
8 cwd?: string;
9 env?: ExecEnv;
10 stdio?: 'inherit';
11 timeout?: number;
12 detached?: boolean;
13};
14export declare function exec(opts: ExecOpts, log?: boolean): Promise<string>;
15export declare function fork(opts: ExecOpts): Promise<void>;
16export declare function runTSScript(cmd: TSCommands, args: string[]): Promise<void>;
17export declare function build(pkgInfo?: PackageInfo): Promise<void>;
18export declare function setup(): Promise<void>;
19export declare function yarnRun(script: string, args?: string[], cwd?: string, env?: Record<string, string>, log?: boolean): Promise<void>;
20export declare function runJest(cwd: string, argsMap: ArgsMap, env?: ExecEnv, extraArgs?: string[], debug?: boolean): Promise<void>;
21export declare function dockerPull(image: string, timeout?: number): Promise<void>;
22export declare function dockerStop(name: string): Promise<void>;
23export declare function dockerTag(from: string, to: string): Promise<void>;
24export declare function getContainerInfo(name: string): Promise<any>;
25export declare function dockerNetworkExists(name: string): Promise<boolean>;
26export declare function remoteDockerImageExists(image: string): Promise<boolean>;
27export declare type DockerRunOptions = {
28 name: string;
29 image: string;
30 ports?: (number | string)[];
31 tmpfs?: string[];
32 env?: ExecEnv;
33 network?: string;
34};
35export declare function dockerRun(opt: DockerRunOptions, tag?: string, debug?: boolean): Promise<() => void>;
36export declare function dockerContainerReady(name: string, upFor: number): Promise<boolean>;
37export declare function dockerBuild(tag: string, cacheFrom?: string[], target?: string, buildArg?: string): Promise<void>;
38export declare function dockerPush(image: string): Promise<void>;
39export declare function pgrep(name: string): Promise<string>;
40export declare function getCommitHash(): Promise<string>;
41export declare function gitDiff(files?: string[]): Promise<void>;
42export declare function getChangedFiles(...files: string[]): Promise<string[]>;
43export declare type ArgsMap = {
44 [key: string]: string | string[];
45};
46export declare function mapToArgs(input: ArgsMap): string[];
47export declare function yarnPublish(pkgInfo: PackageInfo, tag?: string, registry?: string): Promise<void>;
48export {};
49//# sourceMappingURL=scripts.d.ts.map
\No newline at end of file