chore: format

This commit is contained in:
xiaojunnuo
2026-05-31 01:41:33 +08:00
parent acd440106b
commit 4b57a0d729
557 changed files with 12530 additions and 14039 deletions
@@ -9,28 +9,26 @@ export class AutoLoadPlugins {
@Inject()
pluginService: PluginService;
async init() {
logger.info(`加载插件开始,加载模式:${process.env.certd_plugin_loadmode}`);
if (process.env.certd_plugin_loadmode === "metadata") {
await this.pluginService.registerFromLocal("./metadata")
}else{
await this.pluginService.registerFromLocal("./metadata");
} else {
// await import("../../plugins/index.js")
const fs = await import("fs");
const list = fs.readdirSync("./dist/plugins");
console.log("list", list);
for (const file of list) {
if (!file.includes(".")){
if (!file.includes(".")) {
logger.info(`加载插件文件:${file}`);
await import(`../../plugins/${file}/index.js`);
}
}
}
// await import("../../plugins/index.js")
await this.pluginService.registerFromDb()
await this.pluginService.registerFromDb();
await registerPaymentProviders();
logger.info(`加载插件完成,加载模式:${process.env.certd_plugin_loadmode}`);
}
}