refactor: remove certd v1 code

This commit is contained in:
xiaojunnuo
2022-10-31 21:27:32 +08:00
parent 6094a4af79
commit e68862b633
113 changed files with 181 additions and 4868 deletions
@@ -59,11 +59,21 @@ export class Registry<T extends typeof AbstractRegistrable> {
getDefineList() {
const list = [];
for (const key in this.storage) {
const PluginClass = this.storage[key];
// @ts-ignore
const plugin = new PluginClass();
list.push({ ...plugin.define, key });
const define = this.getDefine(key);
if (define) {
list.push({ ...define, key });
}
}
return list;
}
getDefine(key: string) {
const PluginClass = this.storage[key];
if (!PluginClass) {
return;
}
// @ts-ignore
const plugin = new PluginClass();
return plugin.define;
}
}