UNPKG

2.82 kBTypeScriptView Raw
1/// <reference types="node" />
2import BluebirdPromise from "bluebird-lst";
3import { ChildProcess, SpawnOptions } from "child_process";
4import "source-map-support/register";
5export { TmpDir } from "temp-file";
6export { log, warn, task, subTask } from "./log";
7export { isMacOsSierra } from "./macosVersion";
8export { execWine, prepareWindowsExecutableArgs } from "./wine";
9export { Arch, toLinuxArchString, getArchSuffix, ArchType, archFromString } from "./arch";
10export declare const debug: debug.Debugger;
11export declare const debug7z: debug.Debugger;
12export interface BaseExecOptions {
13 cwd?: string;
14 env?: any;
15 stdio?: any;
16}
17export interface ExecOptions extends BaseExecOptions {
18 customFds?: any;
19 encoding?: string;
20 timeout?: number;
21 maxBuffer?: number;
22 killSignal?: string;
23}
24export declare function removePassword(input: string): string;
25export declare function exec(file: string, args?: Array<string> | null, options?: ExecOptions, isLogOutIfDebug?: boolean): Promise<string>;
26export interface ExtraSpawnOptions {
27 isDebugEnabled?: boolean;
28 isPipeInput?: boolean;
29}
30export declare function doSpawn(command: string, args: Array<string>, options?: SpawnOptions, extraOptions?: ExtraSpawnOptions): ChildProcess;
31export declare function spawnAndWrite(command: string, args: Array<string>, data: string, options?: SpawnOptions, isDebugEnabled?: boolean): BluebirdPromise<any>;
32export declare function spawn(command: string, args?: Array<string> | null, options?: SpawnOptions, extraOptions?: ExtraSpawnOptions): Promise<any>;
33export declare function handleProcess(event: string, childProcess: ChildProcess, command: string, resolve: ((value?: any) => void) | null, reject: (reason?: any) => void): void;
34export declare function use<T, R>(value: T | null, task: (it: T) => R): R | null;
35export declare function debug7zArgs(command: "a" | "x"): Array<string>;
36export declare function isEmptyOrSpaces(s: string | null | undefined): s is "" | null | undefined;
37export declare function isTokenCharValid(token: string): boolean;
38export declare function asArray<T>(v: null | undefined | T | Array<T>): Array<T>;
39export declare function getCacheDirectory(): string;
40export declare function smarten(s: string): string;
41export declare function addValue<K, T>(map: Map<K, Array<T>>, key: K, value: T): void;
42export declare function replaceDefault(inList: Array<string> | null | undefined, defaultList: Array<string>): Array<string>;
43export declare function getPlatformIconFileName(value: string | null | undefined, isMac: boolean): string | null | undefined;
44export declare function isPullRequest(): boolean | "" | undefined;
45export declare function safeStringifyJson(data: any, skippedNames?: Set<string>): string;
46export declare function isEnvTrue(value: string | null | undefined): boolean;