+ .catch((err: any) => logger.error('Fatal hook error.', err))
+ })
+ }
+
+ async wrapObject<T, U extends ClientFilterHookName> (result: T, scope: PluginClientScope, hookName: U) {
+ await this.pluginService.ensurePluginsAreLoaded(scope)
+
+ return this.wrapObjectWithoutScopeLoad(result, hookName)
+ }
+
+ private wrapObjectWithoutScopeLoad<T, U extends ClientFilterHookName> (result: T, hookName: U) {
+ return this.pluginService.runHook(hookName, result)