mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
chore: 移除autowire特性
This commit is contained in:
@@ -285,12 +285,22 @@ export class PluginService extends BaseService<PluginEntity> {
|
||||
async registerFromLocal(localDir: string) {
|
||||
//scan path
|
||||
const files = fs.readdirSync(localDir);
|
||||
let list = []
|
||||
for (const file of files) {
|
||||
if (!file.endsWith(".yaml")) {
|
||||
continue;
|
||||
}
|
||||
const item = yaml.load(fs.readFileSync(path.join(localDir, file), "utf8"));
|
||||
|
||||
list.push(item);
|
||||
|
||||
}
|
||||
//排序
|
||||
list = list.sort((a, b) => {
|
||||
return a.order??10 - b.order ??10;
|
||||
});
|
||||
|
||||
for (const item of list) {
|
||||
await this.registerPlugin(item);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user