@moonwall/cli
Version:
Testing framework for the Moon family of projects
59 lines (58 loc) • 1.85 kB
TypeScript
import type { ChopsticksLaunchSpec, DevLaunchSpec, RepoSpec, ZombieLaunchSpec, LaunchOverrides } from "@moonwall/types";
export declare function parseZombieCmd(launchSpec: ZombieLaunchSpec): {
cmd: string;
};
export declare class LaunchCommandParser {
private args;
private cmd;
private launch;
private launchSpec;
private launchOverrides?;
constructor(options: {
launchSpec: DevLaunchSpec;
additionalRepos?: RepoSpec[];
launchOverrides?: LaunchOverrides;
});
private overrideArg;
withPorts(): Promise<this>;
withDefaultForkConfig(): LaunchCommandParser;
withLaunchOverrides(): LaunchCommandParser;
private print;
private applyForkOptions;
/**
* Cache startup artifacts if enabled in launchSpec.
* This uses an Effect-based service that caches artifacts by binary hash.
*
* When cacheStartupArtifacts is enabled, this generates:
* 1. Precompiled WASM for the runtime
* 2. Raw chain spec to skip genesis WASM compilation
*
* This reduces startup from ~3s to ~200ms (~10x improvement).
*/
withStartupCache(): Promise<LaunchCommandParser>;
build(): {
cmd: string;
args: string[];
launch: boolean;
};
static create(options: {
launchSpec: DevLaunchSpec;
additionalRepos?: RepoSpec[];
launchOverrides?: LaunchOverrides;
verbose?: boolean;
}): Promise<{
cmd: string;
args: string[];
launch: boolean;
}>;
}
export declare function parseChopsticksRunCmd(launchSpecs: ChopsticksLaunchSpec[]): {
cmd: string;
args: string[];
launch: boolean;
};
/**
* Get a free port with availability checking
* Uses async port allocation for better collision avoidance
*/
export declare const getFreePort: () => Promise<number>;