mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
Extract the monolithic main.ts (~1000 lines) into focused modules: - electron/constants.ts - Window sizing, port defaults, filenames - electron/state.ts - Shared state container - electron/utils/ - Port availability and icon utilities - electron/security/ - API key management - electron/windows/ - Window bounds and main window creation - electron/server/ - Backend and static server management - electron/ipc/ - IPC handlers with shared channel constants Benefits: - Improved testability with isolated modules - Better discoverability and maintainability - Single source of truth for IPC channels (used by both main and preload) - Clear separation of concerns Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
723 B
TypeScript
27 lines
723 B
TypeScript
/**
|
|
* IPC handlers aggregator
|
|
*
|
|
* Registers all IPC handlers in one place.
|
|
*/
|
|
|
|
import { registerDialogHandlers } from './dialog-handlers';
|
|
import { registerShellHandlers } from './shell-handlers';
|
|
import { registerAppHandlers } from './app-handlers';
|
|
import { registerAuthHandlers } from './auth-handlers';
|
|
import { registerWindowHandlers } from './window-handlers';
|
|
import { registerServerHandlers } from './server-handlers';
|
|
|
|
export { IPC_CHANNELS } from './channels';
|
|
|
|
/**
|
|
* Register all IPC handlers
|
|
*/
|
|
export function registerAllHandlers(): void {
|
|
registerDialogHandlers();
|
|
registerShellHandlers();
|
|
registerAppHandlers();
|
|
registerAuthHandlers();
|
|
registerWindowHandlers();
|
|
registerServerHandlers();
|
|
}
|