Files
certd/packages/ui/certd-server/src/modules/pipeline/service/plugin-service.ts
T

16 lines
412 B
TypeScript
Raw Normal View History

2023-01-29 13:44:19 +08:00
import { Provide, Scope, ScopeEnum } from "@midwayjs/decorator";
import { pluginRegistry } from '@certd/pipeline';
@Provide()
@Scope(ScopeEnum.Singleton)
export class PluginService {
getList() {
const collection = pluginRegistry.storage;
const list = [];
for (const key in collection) {
const Plugin = collection[key];
list.push({ ...Plugin.define, key });
}
return list;
}
}