UNPKG

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