From bb5e48b29c6bf9c85ad03d5e692b64d8bce3aa54 Mon Sep 17 00:00:00 2001 From: npc0-hue Date: Sat, 22 Aug 2026 17:09:31 +0800 Subject: [PATCH] fix SCUM supervised stdout capture --- plugins/examples/scum-server-plugin/actions/start.json | 4 ++-- plugins/examples/scum-server-plugin/bin/scum-start.cmd | 2 +- plugins/examples/scum-server-plugin/manifest.json | 2 +- plugins/tests/manifest-validation.test.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/examples/scum-server-plugin/actions/start.json b/plugins/examples/scum-server-plugin/actions/start.json index 241d4de..f2a352b 100644 --- a/plugins/examples/scum-server-plugin/actions/start.json +++ b/plugins/examples/scum-server-plugin/actions/start.json @@ -2,7 +2,7 @@ "version": 1, "action": "start", "mode": "supervised", - "outputMode": "console", + "outputMode": "pipes", "executableKey": "bin/scum-start.cmd", "arguments": [], "environment": { @@ -11,7 +11,7 @@ "SERVER_EXECUTABLE_REF": "SCUM/Binaries/Win64/SCUMServer.exe", "SERVER_PORT_FIELD": "gamePort", "SERVER_MAX_PLAYERS_FIELD": "maxPlayers", - "SERVER_LOG_FLAG": "-log" + "SERVER_LOG_FLAG": "-log -stdout -FullStdOutLogOutput" }, "timeoutMs": 30000 } diff --git a/plugins/examples/scum-server-plugin/bin/scum-start.cmd b/plugins/examples/scum-server-plugin/bin/scum-start.cmd index 9a10ff5..395e446 100755 --- a/plugins/examples/scum-server-plugin/bin/scum-start.cmd +++ b/plugins/examples/scum-server-plugin/bin/scum-start.cmd @@ -8,7 +8,7 @@ if "%SERVER_INSTALL_DIR%"=="" set "SERVER_INSTALL_DIR=%SERVER_ROOT_WINDOWS%" set "SERVER_INSTALL_DIR_WINDOWS=%SERVER_INSTALL_DIR:/=\%" if "%SERVER_CREATE_GAMEPORT%"=="" set "SERVER_CREATE_GAMEPORT=7779" 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_EXE_MARKER=%SERVER_ROOT_WINDOWS%\.scum-exe-path" diff --git a/plugins/examples/scum-server-plugin/manifest.json b/plugins/examples/scum-server-plugin/manifest.json index 8e15929..25103b1 100644 --- a/plugins/examples/scum-server-plugin/manifest.json +++ b/plugins/examples/scum-server-plugin/manifest.json @@ -3,7 +3,7 @@ "id": "game.scum", "name": "SCUM Server", "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", "tags": [ "scum", diff --git a/plugins/tests/manifest-validation.test.ts b/plugins/tests/manifest-validation.test.ts index be9a821..76b6ed5 100644 --- a/plugins/tests/manifest-validation.test.ts +++ b/plugins/tests/manifest-validation.test.ts @@ -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(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(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).toContain("call :stop_matching_scum"); expect(installScript).toContain("Get-CimInstance Win32_Process"); @@ -482,7 +482,7 @@ describe("plugin manifest validation", () => { const serialized = JSON.stringify(manifest).toLowerCase(); 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(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([