CoreModule.ts
1 import { IIndexManagerSymbol, IKeyValueStoreSymbol, ILogServiceSymbol, IObjectStoreSymbol, IPersistentSignalServiceSymbol, IPinManagerServiceSymbol, ITaskManagerSymbol, ITranslationServiceSymbol, ITranslationsSymbol } from 'ipmc-interfaces'; 2 import { IndexManager, LogService, MemoryKeyValueStore, ObjectStore, PersistentSignalService, PinManagerService, TaskManager, TranslationService } from '../Services'; 3 import de from '../translations/de.json'; 4 import en from '../translations/en.json'; 5 import { IModule } from './IModule'; 6 7 export const CoreModule: IModule = (app) => { 8 app.register(MemoryKeyValueStore, IKeyValueStoreSymbol); 9 app.register(ObjectStore, IObjectStoreSymbol); 10 app.register(IndexManager, IIndexManagerSymbol); 11 app.register(TaskManager, ITaskManagerSymbol); 12 app.register(LogService, ILogServiceSymbol); 13 app.register(PinManagerService, IPinManagerServiceSymbol); 14 app.register(PersistentSignalService, IPersistentSignalServiceSymbol); 15 16 //Translations 17 app.register(TranslationService, ITranslationServiceSymbol); 18 app.registerConstantMultiple({ 19 en: { 20 translation: en, 21 }, 22 de: { 23 translation: de, 24 } 25 }, ITranslationsSymbol); 26 };