import { ContainerModule, interfaces } from 'inversify'; import { ServiceIdentifiers } from '../../ServiceIdentifiers'; import { IArrayUtils } from '../../../interfaces/utils/IArrayUtils'; import { ICryptUtils } from '../../../interfaces/utils/ICryptUtils'; import { ICryptUtilsStringArray } from '../../../interfaces/utils/ICryptUtilsStringArray'; import { IEscapeSequenceEncoder } from '../../../interfaces/utils/IEscapeSequenceEncoder'; import { ILevelledTopologicalSorter } from '../../../interfaces/utils/ILevelledTopologicalSorter'; import { IRandomGenerator } from '../../../interfaces/utils/IRandomGenerator'; import { ISetUtils } from '../../../interfaces/utils/ISetUtils'; import { ArrayUtils } from '../../../utils/ArrayUtils'; import { CryptUtils } from '../../../utils/CryptUtils'; import { CryptUtilsStringArray } from '../../../utils/CryptUtilsStringArray'; import { EscapeSequenceEncoder } from '../../../utils/EscapeSequenceEncoder'; import { LevelledTopologicalSorter } from '../../../utils/LevelledTopologicalSorter'; import { RandomGenerator } from '../../../utils/RandomGenerator'; import { SetUtils } from '../../../utils/SetUtils'; export const utilsModule: interfaces.ContainerModule = new ContainerModule((bind: interfaces.Bind) => { // array utils bind(ServiceIdentifiers.IArrayUtils) .to(ArrayUtils) .inSingletonScope(); // random generator bind(ServiceIdentifiers.IRandomGenerator) .to(RandomGenerator) .inSingletonScope(); // crypt utils bind(ServiceIdentifiers.ICryptUtils) .to(CryptUtils) .inSingletonScope(); // crypt utils for string array bind(ServiceIdentifiers.ICryptUtilsStringArray) .to(CryptUtilsStringArray) .inSingletonScope(); // escape sequence encoder bind(ServiceIdentifiers.IEscapeSequenceEncoder) .to(EscapeSequenceEncoder) .inSingletonScope(); // levelled topological sorter bind(ServiceIdentifiers.ILevelledTopologicalSorter) .to(LevelledTopologicalSorter); // set utils bind(ServiceIdentifiers.ISetUtils) .to(SetUtils) .inSingletonScope(); });