feat: tracatch plugin build
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
d87e152f3b
commit
aa9169b043
@ -8,8 +8,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"bs": "lerna bootstrap",
|
"bs": "lerna bootstrap",
|
||||||
"clean": "lerna run clean",
|
"clean": "lerna run clean",
|
||||||
"watch": "lerna run watch --parallel --scope=\"@ms/!(manager)\"",
|
"watch": "lerna run watch --parallel",
|
||||||
"build": "lerna run build --scope=\"@ms/!(plugins|manager)\"",
|
"build": "lerna run build --scope=\"@ms/!(plugins)\"",
|
||||||
"build:plugins": "lerna run build --scope=\"@ms/plugins\"",
|
"build:plugins": "lerna run build --scope=\"@ms/plugins\"",
|
||||||
"ug": "yarn upgrade-interactive --latest",
|
"ug": "yarn upgrade-interactive --latest",
|
||||||
"lp": "lerna publish"
|
"lp": "lerna publish"
|
||||||
|
@ -186,14 +186,19 @@ export class PluginManagerImpl implements plugin.PluginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private buildPlugin(metadata: interfaces.PluginMetadata) {
|
private buildPlugin(metadata: interfaces.PluginMetadata) {
|
||||||
this.bindPlugin(metadata)
|
try {
|
||||||
let pluginInstance = this.container.getNamed<interfaces.Plugin>(plugin.Plugin, metadata.name)
|
this.bindPlugin(metadata)
|
||||||
if (!(pluginInstance instanceof interfaces.Plugin)) {
|
let pluginInstance = this.container.getNamed<interfaces.Plugin>(plugin.Plugin, metadata.name)
|
||||||
console.i18n('ms.plugin.manager.build.not.extends', { source: metadata.source })
|
if (!(pluginInstance instanceof interfaces.Plugin)) {
|
||||||
return
|
console.i18n('ms.plugin.manager.build.not.extends', { source: metadata.source })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.pluginMap.set(metadata.name, pluginInstance)
|
||||||
|
return pluginInstance;
|
||||||
|
} catch (ex) {
|
||||||
|
console.i18n("ms.plugin.manager.initialize.error", { name: metadata.name, ex })
|
||||||
|
console.ex(ex)
|
||||||
}
|
}
|
||||||
this.pluginMap.set(metadata.name, pluginInstance)
|
|
||||||
return pluginInstance
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bindPlugin(metadata: interfaces.PluginMetadata) {
|
private bindPlugin(metadata: interfaces.PluginMetadata) {
|
||||||
|
Loading…
Reference in New Issue
Block a user