refactor(main): move IPC, CLI and app-ready wiring into assemblies (#311)

This commit is contained in:
sudacode authored and GitHub committed 2026-11-01 17:59:52 -08:00
1 parent 655510cf2e
commit 696462a82e
33 files changed
+3719 -2101

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import type { RegisterIpcRuntimeServicesParams } from '../ipc-runtime';
import type { CliCommandContextMainDeps } from '../runtime/cli-command-context-factory';
/** Renderer IPC handlers, minus the two the IPC composer builds itself. */
export type IpcHandlerDeps = Omit<
RegisterIpcRuntimeServicesParams['mainDeps'],
'handleMpvCommand' | 'runSubsyncManual'
>;
/**
* The IPC handlers one assembly provides. `Required` because most handlers are optional on
* the registration params, and a slice must not drop one silently.
*/
export type IpcSlice<K extends keyof IpcHandlerDeps> = Required<Pick<IpcHandlerDeps, K>>;
/** The CLI command handlers one assembly provides. */
export type CliSlice<K extends keyof CliCommandContextMainDeps> = Required<
Pick<CliCommandContextMainDeps, K>
>;