fix SCUM supervised stdout capture

This commit is contained in:
npc0-hue
2026-08-22 17:09:31 +08:00
parent 256f6267b5
commit bb5e48b29c
4 changed files with 6 additions and 6 deletions
@@ -2,7 +2,7 @@
"version": 1, "version": 1,
"action": "start", "action": "start",
"mode": "supervised", "mode": "supervised",
"outputMode": "console", "outputMode": "pipes",
"executableKey": "bin/scum-start.cmd", "executableKey": "bin/scum-start.cmd",
"arguments": [], "arguments": [],
"environment": { "environment": {
@@ -11,7 +11,7 @@
"SERVER_EXECUTABLE_REF": "SCUM/Binaries/Win64/SCUMServer.exe", "SERVER_EXECUTABLE_REF": "SCUM/Binaries/Win64/SCUMServer.exe",
"SERVER_PORT_FIELD": "gamePort", "SERVER_PORT_FIELD": "gamePort",
"SERVER_MAX_PLAYERS_FIELD": "maxPlayers", "SERVER_MAX_PLAYERS_FIELD": "maxPlayers",
"SERVER_LOG_FLAG": "-log" "SERVER_LOG_FLAG": "-log -stdout -FullStdOutLogOutput"
}, },
"timeoutMs": 30000 "timeoutMs": 30000
} }
@@ -8,7 +8,7 @@ if "%SERVER_INSTALL_DIR%"=="" set "SERVER_INSTALL_DIR=%SERVER_ROOT_WINDOWS%"
set "SERVER_INSTALL_DIR_WINDOWS=%SERVER_INSTALL_DIR:/=\%" set "SERVER_INSTALL_DIR_WINDOWS=%SERVER_INSTALL_DIR:/=\%"
if "%SERVER_CREATE_GAMEPORT%"=="" set "SERVER_CREATE_GAMEPORT=7779" if "%SERVER_CREATE_GAMEPORT%"=="" set "SERVER_CREATE_GAMEPORT=7779"
if "%SERVER_CREATE_MAXPLAYERS%"=="" set "SERVER_CREATE_MAXPLAYERS=128" if "%SERVER_CREATE_MAXPLAYERS%"=="" set "SERVER_CREATE_MAXPLAYERS=128"
if "%SERVER_LOG_FLAG%"=="" set "SERVER_LOG_FLAG=-log" if "%SERVER_LOG_FLAG%"=="" set "SERVER_LOG_FLAG=-log -stdout -FullStdOutLogOutput"
set "SCUM_INSTALL_UPDATE=%~dp0scum-install-update.cmd" set "SCUM_INSTALL_UPDATE=%~dp0scum-install-update.cmd"
set "SCUM_EXE_MARKER=%SERVER_ROOT_WINDOWS%\.scum-exe-path" set "SCUM_EXE_MARKER=%SERVER_ROOT_WINDOWS%\.scum-exe-path"
@@ -3,7 +3,7 @@
"id": "game.scum", "id": "game.scum",
"name": "SCUM Server", "name": "SCUM Server",
"description": "First-party SCUM game server operations plugin with platform-mediated lifecycle and companion bridge support.", "description": "First-party SCUM game server operations plugin with platform-mediated lifecycle and companion bridge support.",
"version": "0.1.8", "version": "0.1.11",
"kind": "game-plugin", "kind": "game-plugin",
"tags": [ "tags": [
"scum", "scum",
+2 -2
View File
@@ -219,7 +219,7 @@ describe("plugin manifest validation", () => {
expect(assetPaths).toEqual(expect.arrayContaining(["actions/install.json", "actions/start.json", "bin/scum-install-update.cmd", "bin/scum-start.cmd", "assets/map/scum-map-overview.jpg"])); expect(assetPaths).toEqual(expect.arrayContaining(["actions/install.json", "actions/start.json", "bin/scum-install-update.cmd", "bin/scum-start.cmd", "assets/map/scum-map-overview.jpg"]));
expect(installAction).toMatchObject({ executableKey: "bin/scum-install-update.cmd", environment: { SERVER_STEAM_APP_ID: "3792580", SERVER_STEAMCMD_UPDATE_ARGS: "+login anonymous +app_update 3792580 +quit" } }); expect(installAction).toMatchObject({ executableKey: "bin/scum-install-update.cmd", environment: { SERVER_STEAM_APP_ID: "3792580", SERVER_STEAMCMD_UPDATE_ARGS: "+login anonymous +app_update 3792580 +quit" } });
expect(installAction.timeoutMs).toBe(7200000); expect(installAction.timeoutMs).toBe(7200000);
expect(startAction).toMatchObject({ executableKey: "bin/scum-start.cmd", outputMode: "console", environment: { SERVER_LOG_FLAG: "-log" } }); expect(startAction).toMatchObject({ executableKey: "bin/scum-start.cmd", outputMode: "pipes", environment: { SERVER_LOG_FLAG: "-log -stdout -FullStdOutLogOutput" } });
expect(installScript).not.toContain("taskkill /IM SCUMServer.exe /F"); expect(installScript).not.toContain("taskkill /IM SCUMServer.exe /F");
expect(installScript).toContain("call :stop_matching_scum"); expect(installScript).toContain("call :stop_matching_scum");
expect(installScript).toContain("Get-CimInstance Win32_Process"); expect(installScript).toContain("Get-CimInstance Win32_Process");
@@ -482,7 +482,7 @@ describe("plugin manifest validation", () => {
const serialized = JSON.stringify(manifest).toLowerCase(); const serialized = JSON.stringify(manifest).toLowerCase();
expect(serialized).not.toContain("local-proof"); expect(serialized).not.toContain("local-proof");
expect(manifest.version).toBe("0.1.8"); expect(manifest.version).toBe("0.1.11");
expect(installAction.environment?.SERVER_TEMPLATE).toBe("scum-server"); expect(installAction.environment?.SERVER_TEMPLATE).toBe("scum-server");
expect(manifest.permissions).toEqual(expect.arrayContaining(["server.game-client.read", "server.game-client.command", "server.game-client.maintenance"])); expect(manifest.permissions).toEqual(expect.arrayContaining(["server.game-client.read", "server.game-client.command", "server.game-client.maintenance"]));
expect(manifest.gameClientBridge.commands.map((command) => command.type)).toEqual(expect.arrayContaining([ expect(manifest.gameClientBridge.commands.map((command) => command.type)).toEqual(expect.arrayContaining([