feat: wire lobby task and VIP prefab flows and sync UI assets

This commit is contained in:
2026-09-06 18:46:37 +08:00
parent 842c68ef55
commit 9c4510697c
184 changed files with 8348 additions and 19133 deletions
@@ -4,7 +4,7 @@ import {readFileSync} from 'node:fs';
import {runInNewContext} from 'node:vm';
import ts from 'typescript';
test('wire logs correctly label both directions and preserve transmitted frames',()=>{
test('wire frame logging stays muted and preserves transmitted frames',()=>{
for(const debugIO of [false,true]){
const logs:unknown[][]=[],sent:string[]=[],received:string[]=[];
let socket:any;
@@ -21,14 +21,9 @@ test('wire logs correctly label both directions and preserve transmitted frames'
transport.send(frame);socket.onmessage({data:frame});socket.onmessage({data:'{"com":"@serverheartbeat"}'});
assert.deepEqual(sent,[frame]);assert.equal(received[0],frame);
const frames=logs.filter(args=>String(args[0]).includes('包 '));
assert.equal(frames.length,debugIO?3:0);
if(debugIO){
assert.equal(frames[0][0],'[发包 C→S] agent/player_login');
assert.equal(frames[1][0],'[收包 S→C] agent/player_login');
assert.equal(frames[2][0],'[收包 S→C] @serverheartbeat');
assert.equal(typeof frames[0][2],'object');
}
else assert.equal(logs.length,0);
assert.equal(frames.length,0);
assert.equal(received[1],'{"com":"@serverheartbeat"}');
if(!debugIO)assert.equal(logs.length,0);
}
});