优化插件加载,提高速度

This commit is contained in:
COOL 2025-04-09 17:00:58 +08:00
parent 21d928167e
commit d88a878856

View File

@ -145,7 +145,19 @@ export class PluginCenterService {
...condition,
};
}
const plugins = await this.pluginInfoEntity.findBy(find);
const plugins = await this.pluginInfoEntity.find({
where: find,
select: [
'id',
'name',
'description',
'keyName',
'hook',
'version',
'pluginJson',
'config',
],
});
for (const plugin of plugins) {
const data = await this.pluginService.getData(plugin.keyName);
if (!data) {