declare module "electron-builder-util/out/promise" { export function printErrorAndExit(error: Error): void export function executeFinally(promise: Promise, task: (errorOccurred: boolean) => Promise): Promise export class NestedError extends Error { constructor(errors: Array, message?: string) } export function orNullIfFileNotExist(promise: Promise): Promise export function orIfFileNotExist(promise: Promise, fallbackValue: T): Promise } declare module "electron-builder-util/out/log" { import BluebirdPromise from "bluebird-lst" export function setPrinter(value: ((message: string) => void) | null): void export function warn(message: string): void export function log(message: string): void export function subTask(title: string, promise: BluebirdPromise | Promise): BluebirdPromise export function task(title: string, promise: BluebirdPromise | Promise): BluebirdPromise } declare module "electron-builder-util/out/tmp" { export class TmpDir { private tempPrefixPromise private tempFiles getTempFile(suffix: string): Promise cleanup(): Promise } } declare module "electron-builder-util" { /// import { ChildProcess, SpawnOptions } from "child_process" export { TmpDir } from "electron-builder-util/out/tmp" export { log, warn, task, subTask } from "electron-builder-util/out/log" export { Lazy } from "electron-builder-http" export const debug: debug.Debugger export const debug7z: debug.Debugger export interface BaseExecOptions { cwd?: string env?: any stdio?: any } export interface ExecOptions extends BaseExecOptions { customFds?: any encoding?: string timeout?: number maxBuffer?: number killSignal?: string } export function removePassword(input: string): string export function exec(file: string, args?: Array | null, options?: ExecOptions, isLogOutIfDebug?: boolean): Promise export interface ExtraSpawnOptions { isDebugEnabled?: boolean isPipeInput?: boolean } export function doSpawn(command: string, args: Array, options?: SpawnOptions, extraOptions?: ExtraSpawnOptions): ChildProcess export function spawn(command: string, args?: Array | null, options?: SpawnOptions, extraOptions?: ExtraSpawnOptions): Promise export function handleProcess(event: string, childProcess: ChildProcess, command: string, resolve: ((value?: any) => void) | null, reject: (reason?: any) => void): void export function use(value: T | null, task: (it: T) => R): R | null export function debug7zArgs(command: "a" | "x"): Array export let tmpDirCounter: number export function getTempName(prefix?: string | null | undefined): string export function isEmptyOrSpaces(s: string | null | undefined): s is "" | null | undefined export function isTokenCharValid(token: string): boolean export function asArray(v: null | undefined | T | Array): Array export function getCacheDirectory(): string export function smarten(s: string): string export function addValue(map: Map>, key: K, value: T): void export function replaceDefault(inList: Array | null | undefined, defaultList: Array): Array export function getPlatformIconFileName(value: string | null | undefined, isMac: boolean): string | null | undefined export function isPullRequest(): boolean | "" | undefined export function safeStringifyJson(data: any, skippedNames?: Set): string } declare module "electron-builder-util/out/fs" { /// import { Stats } from "fs-extra-p" export const MAX_FILE_REQUESTS = 8 export const CONCURRENCY: { concurrency: number } export type FileTransformer = (path: string) => Promise | null | string | Buffer export type Filter = (file: string, stat: Stats) => boolean export function unlinkIfExists(file: string): Promise export function statOrNull(file: string): Promise export function exists(file: string): Promise export interface FileConsumer { consume(file: string, fileStat: Stats, parent: string, siblingNames: Array): any /** * @default false */ isIncludeDir?: boolean } export function walk(initialDirPath: string, filter?: Filter | null, consumer?: FileConsumer): Promise> export function copyFile(src: string, dest: string, isEnsureDir?: boolean): Promise /** * Hard links is used if supported and allowed. * File permission is fixed — allow execute for all if owner can, allow read for all if owner can. * * ensureDir is not called, dest parent dir must exists */ export function copyOrLinkFile(src: string, dest: string, stats?: Stats | null, isUseHardLink?: boolean): Promise export class FileCopier { private readonly isUseHardLinkFunction private readonly transformer isUseHardLink: boolean constructor(isUseHardLinkFunction?: ((file: string) => boolean) | undefined, transformer?: FileTransformer | null | undefined) copy(src: string, dest: string, stat: Stats | undefined): Promise } /** * Empty directories is never created. * Hard links is used if supported and allowed. */ export function copyDir(src: string, destination: string, filter?: Filter | null, transformer?: FileTransformer | null, isUseHardLink?: (file: string) => boolean): Promise export const DO_NOT_USE_HARD_LINKS: (file: string) => boolean export interface Link { readonly link: string readonly file: string } } declare module "electron-builder-util/out/nodeHttpExecutor" { /// import { CancellationToken, DownloadOptions, HttpExecutor } from "electron-builder-http" import { ClientRequest } from "http" import { RequestOptions } from "https" export class NodeHttpExecutor extends HttpExecutor { private httpsAgentPromise download(url: string, destination: string, options?: DownloadOptions): Promise doApiRequest(options: RequestOptions, cancellationToken: CancellationToken, requestProcessor: (request: ClientRequest, reject: (error: Error) => void) => void, redirectCount?: number): Promise protected doRequest(options: any, callback: (response: any) => void): any } export const httpExecutor: NodeHttpExecutor } declare module "electron-builder-util/out/binDownload" { export function getBinFromBintray(name: string, version: string, sha2: string): Promise export function getBinFromGithub(name: string, version: string, checksum: string): Promise export function getBin(name: string, dirName: string, url: string, checksum: string): Promise } declare module "electron-builder-util/out/deepAssign" { export function deepAssign(target: T, ...objects: Array): T }