[Feat] Basic PLS lifecycle mgmt

This commit is contained in:
Minoricew
2025-06-06 02:05:04 +08:00
parent 839afa79e8
commit 6da8348b41
18 changed files with 739 additions and 271 deletions

View File

@@ -3,6 +3,7 @@ import type EventBus from "../../utils/eventBus";
import { HookedWindowsMap, UIHooksMap, WindowHooksMap } from "../main/core";
import { UIHooksObject } from "../render/uiHook";
import ConfigManager from "../../init/shared/configManager";
import { PLSStatus } from "./pls/status";
type MainProcessOnlyVal<T> = T;
type RendererProcessOnlyVal<T> = T;
@@ -15,6 +16,7 @@ interface GlobalHugoAuraInfo {
plsRules?: Record<any, any> | null;
plsSettings?: Record<any, any> | null;
plsStats?: PLSStatus | null;
plsWs?: RendererProcessOnlyVal<WebSocket>;
uiHooks?: MainProcessOnlyVal<UIHooksMap>;
windowHooks?: MainProcessOnlyVal<WindowHooksMap>;
version: RendererProcessOnlyVal<string>;

View File

@@ -1,3 +1,5 @@
import { RendererProcessOnlyVal } from "../global";
interface PLSStatus {
installed: boolean;
detached: boolean;