mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-04 23:18:44 +08:00
feat(plugin): scope virtual instance frontend
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user