@epic-web/app-launcher
Version:
Utility for launching your applications on a per-test basis.
26 lines (25 loc) • 777 B
TypeScript
import { type ChildProcess } from 'node:child_process';
export interface AppProcessOptions {
command: string;
env?: Record<string, string>;
cwd?: string;
}
export declare const kUrl: unique symbol;
export declare const kLaunch: unique symbol;
export declare class AppProcess {
protected readonly options: AppProcessOptions;
private io?;
private [kUrl]?;
constructor(options: AppProcessOptions);
get url(): URL;
/**
* Spawns the child process with the configured application.
* @note This method must never be used publicly. Use `launcher.run()` instead.
*/
[kLaunch](): Promise<ChildProcess>;
/**
* Stop the running application.
*/
dispose(): Promise<void>;
[Symbol.asyncDispose](): Promise<void>;
}