floating-live 0.17.0-alpha.8 → 0.17.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/event/types.d.ts
CHANGED
package/dist/plugin/manager.js
CHANGED
|
@@ -46,6 +46,7 @@ export class PluginManager {
|
|
|
46
46
|
// 将插件数据注册到列表中
|
|
47
47
|
this.list.set(pluginName, {
|
|
48
48
|
plugin,
|
|
49
|
+
role,
|
|
49
50
|
context: pluginCtx,
|
|
50
51
|
exposes,
|
|
51
52
|
unremovable: unremovable || false,
|
|
@@ -114,6 +115,7 @@ export class PluginManager {
|
|
|
114
115
|
const exposes = await plugin.expose?.(pluginCtx);
|
|
115
116
|
this.list.set(pluginName, {
|
|
116
117
|
plugin,
|
|
118
|
+
role,
|
|
117
119
|
context: pluginCtx,
|
|
118
120
|
exposes,
|
|
119
121
|
unremovable: unremovable,
|
|
@@ -171,7 +173,7 @@ export class PluginManager {
|
|
|
171
173
|
// 从列表中移除插件
|
|
172
174
|
this.list.delete(pluginName);
|
|
173
175
|
// 移除插件注册事件
|
|
174
|
-
this.app.emit("plugin:unregister", { pluginName });
|
|
176
|
+
this.app.emit("plugin:unregister", { pluginName, role: pluginData.role });
|
|
175
177
|
// 如果有whenRegister的回调,调用whenUnregistered函数并将回调函数从列表中移除
|
|
176
178
|
const callbackMap = this.whenRegisterMap.get(pluginName);
|
|
177
179
|
if (callbackMap) {
|
package/dist/plugin/types.d.ts
CHANGED