* Make modules instances and save it to the @property this.moduleInstances
()
| 288 | * Make modules instances and save it to the @property this.moduleInstances |
| 289 | */ |
| 290 | private constructModules(): void { |
| 291 | Object.entries(Modules).forEach(([key, module]) => { |
| 292 | try { |
| 293 | this.moduleInstances[key] = new module({ |
| 294 | config: this.configuration, |
| 295 | eventsDispatcher: this.eventsDispatcher, |
| 296 | }); |
| 297 | } catch (e) { |
| 298 | _.log('[constructModules]', `Module ${key} skipped because`, 'error', e); |
| 299 | } |
| 300 | }); |
| 301 | } |
| 302 | |
| 303 | /** |
| 304 | * Modules instances configuration: |