2025-12-07 19:32:53 +02:00
|
|
|
import type { Express } from "express";
|
|
|
|
|
import type { Server } from "http";
|
|
|
|
|
|
|
|
|
|
export interface WebUiServerController {
|
|
|
|
|
expressApp: Express;
|
|
|
|
|
httpServer: Server;
|
|
|
|
|
getPort: () => number | null;
|
|
|
|
|
getOpenCodePort: () => number | null;
|
|
|
|
|
isReady: () => boolean;
|
|
|
|
|
restartOpenCode: () => Promise<void>;
|
|
|
|
|
stop: (options?: { exitProcess?: boolean }) => Promise<void>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface StartWebUiServerOptions {
|
|
|
|
|
port?: number;
|
|
|
|
|
attachSignals?: boolean;
|
|
|
|
|
exitOnShutdown?: boolean;
|
|
|
|
|
uiPassword?: string | null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export declare function startWebUiServer(
|
|
|
|
|
options?: StartWebUiServerOptions
|
|
|
|
|
): Promise<WebUiServerController>;
|
|
|
|
|
|
|
|
|
|
export declare function gracefulShutdown(options?: { exitProcess?: boolean }): Promise<void>;
|
|
|
|
|
export declare function setupProxy(app: Express): void;
|
|
|
|
|
export declare function restartOpenCode(): Promise<void>;
|
2026-03-12 19:40:22 +02:00
|
|
|
export declare function parseArgs(argv?: string[]): {
|
|
|
|
|
port: number;
|
|
|
|
|
uiPassword: string | null;
|
|
|
|
|
tryCfTunnel: boolean;
|
|
|
|
|
tunnelProvider?: string;
|
|
|
|
|
tunnelMode?: string;
|
|
|
|
|
tunnelConfigPath?: string | null;
|
|
|
|
|
tunnelToken?: string;
|
|
|
|
|
tunnelHostname?: string;
|
|
|
|
|
};
|