UNPKG

3.04 kBTypeScriptView Raw
1import { ChildProcess, ExecFileOptions, SpawnOptions } from "child_process";
2import _debug from "debug";
3export { safeStringifyJson } from "builder-util-runtime";
4export { TmpDir } from "temp-file";
5export * from "./log";
6export { Arch, getArchCliNames, toLinuxArchString, getArchSuffix, ArchType, archFromString, defaultArchFromString } from "./arch";
7export { AsyncTaskManager } from "./asyncTaskManager";
8export { DebugLogger } from "./DebugLogger";
9export { httpExecutor, NodeHttpExecutor } from "./nodeHttpExecutor";
10export * from "./promise";
11export * from "./arch";
12export * from "./fs";
13export { asArray } from "builder-util-runtime";
14export { deepAssign } from "./deepAssign";
15export { getPath7za, getPath7x } from "./7za";
16export declare const debug7z: _debug.Debugger;
17export declare function serializeToYaml(object: any, skipInvalid?: boolean, noRefs?: boolean): string;
18export declare function removePassword(input: string): string;
19export declare function exec(file: string, args?: Array<string> | null, options?: ExecFileOptions, isLogOutIfDebug?: boolean): Promise<string>;
20export interface ExtraSpawnOptions {
21 isPipeInput?: boolean;
22}
23export declare function doSpawn(command: string, args: Array<string>, options?: SpawnOptions, extraOptions?: ExtraSpawnOptions): ChildProcess;
24export declare function spawnAndWrite(command: string, args: Array<string>, data: string, options?: SpawnOptions): Promise<any>;
25export declare function spawn(command: string, args?: Array<string> | null, options?: SpawnOptions, extraOptions?: ExtraSpawnOptions): Promise<any>;
26export declare class ExecError extends Error {
27 readonly exitCode: number;
28 alreadyLogged: boolean;
29 constructor(command: string, exitCode: number, out: string, errorOut: string, code?: string);
30}
31type Nullish = null | undefined;
32export declare function use<T, R>(value: T | Nullish, task: (value: T) => R): R | null;
33export declare function isEmptyOrSpaces(s: string | null | undefined): s is "" | null | undefined;
34export declare function isTokenCharValid(token: string): boolean;
35export declare function addValue<K, T>(map: Map<K, Array<T>>, key: K, value: T): void;
36export declare function replaceDefault(inList: Array<string> | null | undefined, defaultList: Array<string>): Array<string>;
37export declare function getPlatformIconFileName(value: string | null | undefined, isMac: boolean): string | null | undefined;
38export declare function isPullRequest(): boolean | "" | undefined;
39export declare function isEnvTrue(value: string | null | undefined): boolean;
40export declare class InvalidConfigurationError extends Error {
41 constructor(message: string, code?: string);
42}
43export declare function executeAppBuilder(args: Array<string>, childProcessConsumer?: (childProcess: ChildProcess) => void, extraOptions?: SpawnOptions, maxRetries?: number): Promise<string>;
44export declare function retry<T>(task: () => Promise<T>, retryCount: number, interval: number, backoff?: number, attempt?: number, shouldRetry?: (e: any) => boolean): Promise<T>;