Files
WT-Offline/apps/launcher/src/main/workers/build-protocol.ts
T

27 lines
957 B
TypeScript

import type { AppErrorCode } from '@shared/errors.ts';
export interface BuildRequest {
readonly kind: 'build';
readonly stockPath: string;
readonly copyPath: string;
readonly dataPath: string;
readonly steamLibraryConfirmed: boolean;
readonly port: number;
readonly patches: string;
readonly networkHookLibrary: string;
readonly groundAiScripts: string;
readonly mapNavFolder?: string;
readonly decalCache?: string;
readonly hookLogging: boolean;
readonly acceptedUnavailable: readonly string[];
readonly modsDir?: string;
readonly enabledModIds?: readonly string[];
}
export type BuildCommand = BuildRequest | { readonly kind: 'write' };
export type BuildReply =
| { readonly kind: 'prepared'; readonly total: number }
| { readonly kind: 'progress'; readonly written: number; readonly total: number; readonly file: string }
| { readonly kind: 'written' }
| { readonly kind: 'failed'; readonly error: AppErrorCode };