Simplify telemetry to three game events

This commit is contained in:
2026-09-18 15:35:21 -04:00
parent 6d903adb31
commit 5bb49a776e
29 changed files with 658 additions and 1314 deletions
+2 -3
View File
@@ -79,13 +79,12 @@ describe('T6 config lifecycle in a mixed fleet', () => {
});
it('reads the T6 game log and keeps log path traversal checks', async () => {
const { resolveLogPath, gameLogKey } = await import('../../src/lib/server/fleet/logs.js');
const { scanMatchState } = await import('../../src/lib/server/fleet/match-log.js');
const { resolveLogPath, gameLogKey, tailLog } = await import('../../src/lib/server/fleet/logs.js');
const logs = join(fixture.t6, town, 'logs');
await mkdir(logs, { recursive: true });
await writeFile(join(logs, 'games_zm.log'), '0:00 InitGame:\n0:01 J;123;0;Player\n');
expect(resolveLogPath(town, gameLogKey(town))).toBe(resolve(logs, 'games_zm.log'));
expect(await scanMatchState(town)).toMatchObject({ kind: 'in-progress' });
expect((await tailLog(resolveLogPath(town, gameLogKey(town))!, 10))?.lines).toContain('0:01 J;123;0;Player');
expect(resolveLogPath('t6_/../../escape', 'games_zm')).toBeNull();
});
});