@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.d.mts
CHANGED
|
@@ -1222,8 +1222,9 @@ declare class PluginManager {
|
|
|
1222
1222
|
* 加载插件列表
|
|
1223
1223
|
* @param configs 插件配置
|
|
1224
1224
|
* @param registry 插件注册表 (动态导入函数)
|
|
1225
|
+
* @param notify 是否在加载完成后触发通知,默认为 true
|
|
1225
1226
|
*/
|
|
1226
|
-
loadPlugins(configs: Record<string, any>, registry: Record<string, () => Promise<any
|
|
1227
|
+
loadPlugins(configs: Record<string, any>, registry: Record<string, () => Promise<any>>, notify?: boolean): Promise<void>;
|
|
1227
1228
|
/**
|
|
1228
1229
|
* 加载远程插件
|
|
1229
1230
|
* @param pluginId 插件 ID
|
package/dist/index.d.ts
CHANGED
|
@@ -1222,8 +1222,9 @@ declare class PluginManager {
|
|
|
1222
1222
|
* 加载插件列表
|
|
1223
1223
|
* @param configs 插件配置
|
|
1224
1224
|
* @param registry 插件注册表 (动态导入函数)
|
|
1225
|
+
* @param notify 是否在加载完成后触发通知,默认为 true
|
|
1225
1226
|
*/
|
|
1226
|
-
loadPlugins(configs: Record<string, any>, registry: Record<string, () => Promise<any
|
|
1227
|
+
loadPlugins(configs: Record<string, any>, registry: Record<string, () => Promise<any>>, notify?: boolean): Promise<void>;
|
|
1227
1228
|
/**
|
|
1228
1229
|
* 加载远程插件
|
|
1229
1230
|
* @param pluginId 插件 ID
|
package/dist/index.js
CHANGED
|
@@ -1848,6 +1848,7 @@ var PluginManager = class {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
} finally {
|
|
1850
1850
|
this.isInitializing = false;
|
|
1851
|
+
this.notify();
|
|
1851
1852
|
}
|
|
1852
1853
|
}
|
|
1853
1854
|
/**
|
|
@@ -1894,8 +1895,9 @@ var PluginManager = class {
|
|
|
1894
1895
|
* 加载插件列表
|
|
1895
1896
|
* @param configs 插件配置
|
|
1896
1897
|
* @param registry 插件注册表 (动态导入函数)
|
|
1898
|
+
* @param notify 是否在加载完成后触发通知,默认为 true
|
|
1897
1899
|
*/
|
|
1898
|
-
async loadPlugins(configs, registry) {
|
|
1900
|
+
async loadPlugins(configs, registry, notify = true) {
|
|
1899
1901
|
logger6.info("\u5F00\u59CB\u52A0\u8F7D\u63D2\u4EF6...");
|
|
1900
1902
|
const localLoadPromises = Object.entries(registry).map(async ([registryId, importFn]) => {
|
|
1901
1903
|
try {
|
|
@@ -1929,7 +1931,9 @@ var PluginManager = class {
|
|
|
1929
1931
|
this.register(plugin, false);
|
|
1930
1932
|
}
|
|
1931
1933
|
});
|
|
1932
|
-
|
|
1934
|
+
if (notify) {
|
|
1935
|
+
this.notify();
|
|
1936
|
+
}
|
|
1933
1937
|
logger6.info(`\u63D2\u4EF6\u52A0\u8F7D\u5B8C\u6210\uFF0C\u5171\u52A0\u8F7D ${this.plugins.size} \u4E2A\u63D2\u4EF6`);
|
|
1934
1938
|
}
|
|
1935
1939
|
/**
|
|
@@ -2774,7 +2778,7 @@ var usePluginLoader = (options) => {
|
|
|
2774
2778
|
const { configManager: configManager2 } = await Promise.resolve().then(() => (init_config_manager(), config_manager_exports));
|
|
2775
2779
|
configManager2.set("system", options.systemConfig);
|
|
2776
2780
|
}
|
|
2777
|
-
await pluginManager.loadPlugins(pluginConfigs, finalRegistry);
|
|
2781
|
+
await pluginManager.loadPlugins(pluginConfigs, finalRegistry, false);
|
|
2778
2782
|
await pluginManager.initPlugins(sharedContext);
|
|
2779
2783
|
setPluginsLoaded(true);
|
|
2780
2784
|
logger10.info("Plugins loaded successfully");
|