///
import { ChildProcess, ExecOptions, SpawnOptions } from 'child_process';
export { checksum } from '@xmcl/core';
export declare function missing(target: string): Promise;
export declare function ensureDir(target: string): Promise;
export interface SpawnJavaOptions {
/**
* The java exectable path. It will use `java` by default.
*
* @defaults "java"
*/
java?: string;
/**
* The spawn process function. Used for spawn the java process at the end.
*
* By default, it will be the spawn function from "child_process" module. You can use this option to change the 3rd party spawn like [cross-spawn](https://www.npmjs.com/package/cross-spawn)
*/
spawn?: (command: string, args?: ReadonlyArray, options?: SpawnOptions) => ChildProcess;
}
export declare function ensureFile(target: string): Promise;
export declare function normalizeArray(arr?: T | T[]): T[];
export declare function spawnProcess(spawnJavaOptions: SpawnJavaOptions, args: string[], options?: ExecOptions): Promise;
export declare function waitProcess(process: ChildProcess): Promise;
/**
* Join two urls
*/
export declare function joinUrl(a: string, b: string): string;
export interface ParallelTaskOptions {
throwErrorImmediately?: boolean;
}
/**
* Shared install options
*/
export interface InstallOptions {
/**
* When you want to install a version over another one.
*
* Like, you want to install liteloader over a forge version.
* You should fill this with that forge version id.
*/
inheritsFrom?: string;
/**
* Override the newly installed version id.
*
* If this is absent, the installed version id will be either generated or provided by installer.
*/
versionId?: string;
}
export declare function errorToString(e: any): any;
//# sourceMappingURL=utils.d.ts.map