mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 11:25:56 +00:00
feat(preview): implement CSM Modules Preview standalone edition with Controlled Build Engine, SQL review gate, and test realm integration
This commit is contained in:
1 parent
0f0f9e6fe2
commit
bd98d3eb73
14 files changed
+1949
-638
No files matched your search
@@ -57,7 +57,7 @@ const en = {
|
||||
"realm.recovery": "A realm switch was interrupted. Select a realm to recover the saved configuration.",
|
||||
"realm.unsupported": "Unavailable on Wildcard / Warcraft Reborn: class mechanics have not been validated.",
|
||||
"realm.experimental": "Experimental on Wildcard / Warcraft Reborn · gameplay compatibility is not yet verified.",
|
||||
"app.name": "CoA Server Manager",
|
||||
"app.name": "CSM Modules Preview",
|
||||
|
||||
"nav.overview": "Overview",
|
||||
"nav.bots": "Bots",
|
||||
|
||||
@@ -60,6 +60,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
|
||||
"realm.recovery": "Переключение прервалось. Выберите реалм, чтобы восстановить сохранённые настройки.",
|
||||
"realm.unsupported": "Недоступен в Wildcard / Warcraft Reborn: классовые механики ещё не проверены.",
|
||||
"realm.experimental": "Экспериментально в Wildcard / Warcraft Reborn · игровая совместимость пока не проверена.",
|
||||
"app.name": "CSM Modules Preview",
|
||||
"nav.overview": "Обзор",
|
||||
"nav.bots": "Боты",
|
||||
"nav.server": "Конфигурация сервера",
|
||||
|
||||
@@ -291,6 +291,61 @@ export interface CompatibilityReport {
|
||||
recommended_actions: string[];
|
||||
}
|
||||
|
||||
export interface ToolchainStatus {
|
||||
msvc_available: boolean;
|
||||
vcvars64_path?: string | null;
|
||||
cmake_available: boolean;
|
||||
cmake_path?: string | null;
|
||||
ninja_available: boolean;
|
||||
ninja_path?: string | null;
|
||||
sdk_available: boolean;
|
||||
sdk_dir?: string | null;
|
||||
sdk_abi_fingerprint?: string | null;
|
||||
ready: boolean;
|
||||
diagnostic_message: string;
|
||||
}
|
||||
|
||||
export interface BuildErrorDiagnostic {
|
||||
file: string;
|
||||
line: number;
|
||||
error_code: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface BuildResult {
|
||||
success: boolean;
|
||||
module_id: string;
|
||||
module_name: string;
|
||||
version: string;
|
||||
package_path?: string | null;
|
||||
dll_path?: string | null;
|
||||
dll_sha256?: string | null;
|
||||
abi_fingerprint?: string | null;
|
||||
duration_seconds: number;
|
||||
errors: BuildErrorDiagnostic[];
|
||||
log_output: string[];
|
||||
verification_status?: VerificationStatus | null;
|
||||
}
|
||||
|
||||
export interface InstalledPreviewPlugin {
|
||||
id: string;
|
||||
name: string;
|
||||
version: string;
|
||||
enabled: boolean;
|
||||
sha256: string;
|
||||
store_path: string;
|
||||
conf_files: string[];
|
||||
}
|
||||
|
||||
export interface PreviewInstallResult {
|
||||
success: boolean;
|
||||
module_id: string;
|
||||
enabled: boolean;
|
||||
sql_applied: boolean;
|
||||
message: string;
|
||||
sql_plan?: any;
|
||||
}
|
||||
|
||||
export interface ModuleSetting {
|
||||
key: string;
|
||||
value: string;
|
||||
@@ -638,6 +693,20 @@ export const api = {
|
||||
consoleRisk: (command: string) => invoke<"normal" | "dangerous">("console_risk", { command }),
|
||||
consoleCommand: (id: string, command: string, confirmed: boolean) => invoke<string>("console_command", { id, command, confirmed }),
|
||||
previewPreset: (id: string, scope: Scope, preset: string) => invoke<PresetPreview>("preview_preset", { id, scope, preset }),
|
||||
previewToolchainStatus: () => invoke<ToolchainStatus>("preview_toolchain_status"),
|
||||
previewRegisterTestRealm: (path?: string) => invoke<ServerSummary>("preview_register_test_realm", { path: path ?? null }),
|
||||
previewBuildModule: (realmId: string, sourceUrlOrPath: string) =>
|
||||
invoke<BuildResult>("preview_build_module", { realmId, sourceUrlOrPath }),
|
||||
previewInstallModule: (realmId: string, moduleId: string, version: string, applySql: boolean) =>
|
||||
invoke<PreviewInstallResult>("preview_install_module", { realmId, moduleId, version, applySql }),
|
||||
previewToggleModule: (realmId: string, moduleId: string, enable: boolean) =>
|
||||
invoke<string>("preview_toggle_module", { realmId, moduleId, enable }),
|
||||
previewRemoveModule: (realmId: string, moduleId: string) =>
|
||||
invoke<string>("preview_remove_module", { realmId, moduleId }),
|
||||
previewListInstalledPlugins: (realmId: string) =>
|
||||
invoke<InstalledPreviewPlugin[]>("preview_list_installed_plugins", { realmId }),
|
||||
previewExportDiagnostics: (realmId?: string) =>
|
||||
invoke<string>("preview_export_diagnostics", { realmId: realmId ?? null }),
|
||||
};
|
||||
|
||||
export function asUiError(e: unknown): UiError {
|
||||
|
||||
+806
-596
File diff suppressed because it is too large.
Load diff
@@ -103,7 +103,10 @@ export function Shell(props: {
|
||||
<nav className="flex w-60 shrink-0 flex-col border-r border-line bg-[#0b0c0e] p-3" aria-label={t("nav.main")}>
|
||||
<div className="flex items-center gap-2 px-3 pb-4 pt-2 text-sm font-semibold tracking-wide text-gold">
|
||||
<img src={logo} alt="" aria-hidden className="h-7 w-7" />
|
||||
{t("app.name")}
|
||||
<div className="flex flex-col">
|
||||
<span className="leading-tight">{t("app.name")}</span>
|
||||
<span className="text-[10px] font-mono font-normal tracking-wider text-sky-400">PREVIEW EDITION</span>
|
||||
</div>
|
||||
</div>
|
||||
<ul className="flex flex-col gap-0.5">
|
||||
{NAV.filter((n) => !hiddenPages.includes(n.id) && (n.id !== "dashboard" || botModule === "playerbots")).map(({ id, label, icon: Icon }) => (
|
||||
|
||||
Reference in new issue
Block a user