fix(config): resolve remote hierarchy in memory for every profile

This commit is contained in:
2026-09-05 21:21:24 +08:00
parent 62328b6fd6
commit 053302c5df
27 changed files with 286 additions and 143 deletions
@@ -5,12 +5,12 @@ import type { ConfigFetcher } from '../../YouleNexus/assets/framework/config/rem
test('resolveBootstrap:显式 hostKind 透传严格 RuntimeConfig,并保留 profile 元数据', async () => {
const fetcher: ConfigFetcher = {
async fetch() { return { data: { urlserver: '5.5.5.5:5000' } }; },
async fetch() { return { player_server_tcp: '5.5.5.5:5000' }; },
};
const result = await resolveBootstrap({
mode: 'debug', hostKind: 'h5', win: {}, search: '?profile=local', fetcher,
});
assert.equal(result.source, 'direct');
assert.equal(result.source, 'remote');
assert.equal(result.profile.name, 'local');
assert.deepEqual(result.servers, ['ws://127.0.0.1:3088']);
});