feat(plugin): scope virtual instance frontend

This commit is contained in:
jxxghp
2026-08-22 09:40:38 +08:00
parent 9b747c67a9
commit 19e8e06798
19 changed files with 256 additions and 37 deletions
+6
View File
@@ -13,6 +13,7 @@ export interface RemoteModule {
id: string
url: string
name?: string
source_plugin_id?: string
}
/**
@@ -29,6 +30,11 @@ async function fetchSingleRemoteModule(id: string): Promise<RemoteModule | null>
}
}
/** 获取远程模块身份信息,供全页宿主构造实例作用域 API。 */
export async function getRemoteModuleInfo(id: string): Promise<RemoteModule | null> {
return fetchSingleRemoteModule(id)
}
/** 发现并注册尚不可用的远程模块,同一 remote 同时只执行一次。 */
async function discoverAndRegisterRemote(id: string): Promise<boolean> {
const activeFlight = remoteRegistrationFlights.get(id)