refactor: restructure to monorepo with apps and packages directories - Move companion app to apps/companion with electron-vite - Move domain/application/infrastructure to packages/ - Fix ELECTRON_RUN_AS_NODE env var issue for VS Code terminal - Remove legacy esbuild bundler (replaced by electron-vite) - Update workspace scripts in root package.json

This commit is contained in:
2025-11-22 00:25:06 +01:00
parent d20554df55
commit 7eae6e3bd4
39 changed files with 515 additions and 1939 deletions

View File

@@ -0,0 +1,31 @@
import { StepId } from '../../domain/value-objects/StepId';
import {
NavigationResult,
FormFillResult,
ClickResult,
WaitResult,
ModalResult,
AutomationResult,
} from './AutomationResults';
export interface IBrowserAutomation {
navigateToPage(url: string): Promise<NavigationResult>;
fillFormField(fieldName: string, value: string): Promise<FormFillResult>;
clickElement(selector: string): Promise<ClickResult>;
waitForElement(selector: string, maxWaitMs?: number): Promise<WaitResult>;
handleModal(stepId: StepId, action: string): Promise<ModalResult>;
/**
* Execute a complete workflow step with all required browser operations.
* Uses IRacingSelectorMap to locate elements and performs appropriate actions.
*
* @param stepId - The step to execute (1-18)
* @param config - Session configuration with form field values
* @returns AutomationResult with success/failure and metadata
*/
executeStep?(stepId: StepId, config: Record<string, unknown>): Promise<AutomationResult>;
connect?(): Promise<void>;
disconnect?(): Promise<void>;
isConnected?(): boolean;
}