feat: integrate room framework and isolated subgame bundles
Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { BUILD_IDENTITY } from '../fixtures/build-identity.ts';
|
||||
import { STARTUP_CONFIG as EDITABLE_STARTUP_CONFIG } from '../../YouleNexus/assets/framework/config/profiles.ts';
|
||||
// 固定测试来源,允许开发者独立切换项目的 local/remote 开关。
|
||||
const STARTUP_CONFIG = Object.freeze({...EDITABLE_STARTUP_CONFIG, configSource:'remote' as const});
|
||||
@@ -10,7 +11,7 @@ test('resolveBootstrap:显式 hostKind 透传严格 RuntimeConfig,并保留
|
||||
const fetcher: ConfigFetcher = {
|
||||
async fetch() { return { player_server_tcp: '5.5.5.5:5000' }; },
|
||||
};
|
||||
const result = await resolveBootstrap({
|
||||
const result = await resolveBootstrap({buildIdentity:BUILD_IDENTITY,
|
||||
startupConfig:STARTUP_CONFIG, hostKind: 'h5', win: {}, search: '', fetcher,
|
||||
});
|
||||
assert.equal(result.source, 'remote');
|
||||
@@ -21,7 +22,7 @@ test('resolveBootstrap:显式 hostKind 透传严格 RuntimeConfig,并保留
|
||||
test('facade forwards the entire injected source and derives its compatibility label', async () => {
|
||||
for (const useLocalServer of [true,false]) {
|
||||
const startupConfig={...STARTUP_CONFIG,mode:'release' as const,useLocalServer,gameserver:'https://fixture.example/config.txt'};
|
||||
const result=await resolveBootstrap({startupConfig,isNative:false,win:{},search:'?mode=debug&profile=unknown&profile=local',fetcher:{async fetch(url){assert.equal(url,startupConfig.gameserver);return {player_server_tcp:'remote.example:3088'};}}});
|
||||
const result=await resolveBootstrap({buildIdentity:BUILD_IDENTITY,startupConfig,isNative:false,win:{},search:'?mode=debug&profile=unknown&profile=local',fetcher:{async fetch(url){assert.equal(url,startupConfig.gameserver);return {player_server_tcp:'remote.example:3088'};}}});
|
||||
assert.deepEqual(result.startupConfig,startupConfig); assert.equal(result.mode,'release');
|
||||
assert.equal(result.profile.name,useLocalServer?'local':'prod');
|
||||
assert.deepEqual(result.servers,useLocalServer?STARTUP_CONFIG.localServers:['ws://remote.example:3088']);
|
||||
|
||||
Reference in New Issue
Block a user