Allow fetching plugins from URL (#1065)

This commit is contained in:
Fábio Rosado
2023-01-11 17:03:53 +00:00
committed by GitHub
parent 470c3489dd
commit cc4b460183
14 changed files with 568 additions and 114 deletions

View File

@@ -93,11 +93,23 @@ export class PluginManager {
}
beforeLaunch(config: AppConfig) {
for (const p of this._plugins) p.beforeLaunch(config);
for (const p of this._plugins) {
try {
p.beforeLaunch(config);
} catch (e) {
logger.error(`Error while calling beforeLaunch hook of plugin ${p.constructor.name}`, e);
}
}
}
afterSetup(runtime: Runtime) {
for (const p of this._plugins) p.afterSetup(runtime);
for (const p of this._plugins) {
try {
p.afterSetup(runtime);
} catch (e) {
logger.error(`Error while calling afterSetup hook of plugin ${p.constructor.name}`, e);
}
}
for (const p of this._pythonPlugins) p.afterSetup?.(runtime);
}