nwixtoolset
Version:
Node module wrapper around the WIX Toolset executables.
64 lines (63 loc) • 2.13 kB
TypeScript
/// <reference types="node" />
import { StdioOptions } from "child_process";
/** Options for the inner spawn method. */
export interface RunOptions {
/** The current working directory to execute WIX exe binary on. */
cwd?: string;
/** The inner spawn stdio option. */
stdio?: StdioOptions;
}
/** Result of the wrapper. */
export interface RunResult {
/** The WIX exe exit code. */
code: number;
/** The WIX exe stdout content. */
stdout: string;
/** The WIX exe stderr content. */
stderr: string;
}
/** Custom error thrown by the executable. */
export declare type RunError = Error & RunResult & {
command: string;
args: string[];
};
/**
* Run given WIX executable by using raw arguments.
*
* @param exe The WIX executable to run.
* @param args The arguments to pass to bundler.
* @param [options] The options for child_process.spawn.
*/
export declare function run(exe: string, args: string[], options?: RunOptions): Promise<RunResult>;
/** Collections of RAW wrappers. */
export declare namespace raw {
/** Raw wrapper for the candle.exe. */
const candle: RawMethod;
/** Raw wrapper for the dark.exe. */
const dark: RawMethod;
/** Raw wrapper for the heat.exe. */
const heat: RawMethod;
/** Raw wrapper for the insignia.exe. */
const insignia: RawMethod;
/** Raw wrapper for the light.exe. */
const light: RawMethod;
/** Raw wrapper for the lit.exe. */
const lit: RawMethod;
/** Raw wrapper for the lux.exe. */
const lux: RawMethod;
/** Raw wrapper for the melt.exe. */
const melt: RawMethod;
/** Raw wrapper for the nit.exe. */
const nit: RawMethod;
/** Raw wrapper for the pyro.exe. */
const pyro: RawMethod;
/** Raw wrapper for the retina.exe. */
const retina: RawMethod;
/** Raw wrapper for the shine.exe. */
const shine: RawMethod;
/** Raw wrapper for the smoke.exe. */
const smoke: RawMethod;
/** Raw wrapper for the torch.exe. */
const torch: RawMethod;
type RawMethod = (args: string[], options?: RunOptions) => Promise<RunResult>;
}