mirror of
https://github.com/certd/certd.git
synced 2026-04-15 13:32:37 +08:00
perf: 支持部署到exsi,openwrt
This commit is contained in:
@@ -16,7 +16,14 @@ export class AutoBLoadPlugins {
|
||||
if (process.env.certd_plugin_loadmode === "metadata") {
|
||||
await this.pluginService.registerFromLocal("./metadata")
|
||||
}else{
|
||||
await import("../../plugins/index.js")
|
||||
// await import("../../plugins/index.js")
|
||||
const fs = await import("fs");
|
||||
const list = fs.readdirSync("../../plugins");
|
||||
for (const file of list) {
|
||||
if (file.endsWith("index.js")) {
|
||||
await import(`../../plugins/${file}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
// await import("../../plugins/index.js")
|
||||
await this.pluginService.registerFromDb()
|
||||
|
||||
Reference in New Issue
Block a user