@chatbi-v/core 2.1.3 → 2.1.4
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1706,6 +1706,7 @@ var PluginManager = class {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
} finally {
|
|
1708
1708
|
this.isInitializing = false;
|
|
1709
|
+
this.notify();
|
|
1709
1710
|
}
|
|
1710
1711
|
}
|
|
1711
1712
|
/**
|
|
@@ -1752,8 +1753,9 @@ var PluginManager = class {
|
|
|
1752
1753
|
* 加载插件列表
|
|
1753
1754
|
* @param configs 插件配置
|
|
1754
1755
|
* @param registry 插件注册表 (动态导入函数)
|
|
1756
|
+
* @param notify 是否在加载完成后触发通知,默认为 true
|
|
1755
1757
|
*/
|
|
1756
|
-
async loadPlugins(configs, registry) {
|
|
1758
|
+
async loadPlugins(configs, registry, notify = true) {
|
|
1757
1759
|
logger6.info("\u5F00\u59CB\u52A0\u8F7D\u63D2\u4EF6...");
|
|
1758
1760
|
const localLoadPromises = Object.entries(registry).map(async ([registryId, importFn]) => {
|
|
1759
1761
|
try {
|
|
@@ -1787,7 +1789,9 @@ var PluginManager = class {
|
|
|
1787
1789
|
this.register(plugin, false);
|
|
1788
1790
|
}
|
|
1789
1791
|
});
|
|
1790
|
-
|
|
1792
|
+
if (notify) {
|
|
1793
|
+
this.notify();
|
|
1794
|
+
}
|
|
1791
1795
|
logger6.info(`\u63D2\u4EF6\u52A0\u8F7D\u5B8C\u6210\uFF0C\u5171\u52A0\u8F7D ${this.plugins.size} \u4E2A\u63D2\u4EF6`);
|
|
1792
1796
|
}
|
|
1793
1797
|
/**
|
|
@@ -2632,7 +2636,7 @@ var usePluginLoader = (options) => {
|
|
|
2632
2636
|
const { configManager: configManager2 } = await import("./config-manager-3TKURRUT.mjs");
|
|
2633
2637
|
configManager2.set("system", options.systemConfig);
|
|
2634
2638
|
}
|
|
2635
|
-
await pluginManager.loadPlugins(pluginConfigs, finalRegistry);
|
|
2639
|
+
await pluginManager.loadPlugins(pluginConfigs, finalRegistry, false);
|
|
2636
2640
|
await pluginManager.initPlugins(sharedContext);
|
|
2637
2641
|
setPluginsLoaded(true);
|
|
2638
2642
|
logger10.info("Plugins loaded successfully");
|