UNPKG

firmament-yargs

Version:

Typescript classes for building CLI node applications

44 lines (42 loc) 2.58 kB
import {Container} from 'inversify'; import {ProgressBar} from './interfaces/progress-bar'; import {ProgressBarImpl} from './implementations/progress-bar-impl'; import {CommandLine} from './interfaces/command-line'; import {CommandLineImpl} from './implementations/command-line-impl'; import {CommandUtilImpl} from './implementations/command-util-impl'; import {NestedYargs} from './interfaces/nested-yargs-wrapper'; import {NestedYargsImpl} from './implementations/nested-yargs-wrapper-impl'; import {Spawn} from './interfaces/spawn'; import {SpawnImpl} from './implementations/spawn-impl'; import {ChildProcessSpawn} from './interfaces/child-process-spawn'; import {ChildProcessSpawnImpl} from './implementations/child-process-spawn-impl'; import {CommandUtil} from './interfaces/command-util'; import {CommandImpl} from './implementations/command-impl'; import {Command} from './interfaces/command'; import {Positive} from './interfaces/positive'; import {PositiveImpl} from './implementations/positive-impl'; import {ProgressTaskImpl} from './implementations/progress-task-impl'; import {ProgressTask} from './interfaces/progress-task'; import {IPostal} from './interfaces/postal'; import {PostalImpl} from './implementations/postal-impl'; import {Crypton} from './interfaces/crypton'; import {CryptonImpl} from './implementations/crypton-impl'; import {RemoteCatalogGetterImpl} from './implementations/remote-catalog-impl'; import {SafeJson} from './interfaces/safe-json'; import {SafeJsonImpl} from './implementations/safe-json-impl'; import {RemoteCatalogGetter} from './interfaces/remote-catalog/remote-catalog-getter'; let kernel = new Container(); kernel.bind<CommandUtil>('CommandUtil').to(CommandUtilImpl).inSingletonScope(); kernel.bind<ProgressBar>('ProgressBar').to(ProgressBarImpl).inSingletonScope(); kernel.bind<Crypton>('Crypton').to(CryptonImpl).inSingletonScope(); kernel.bind<SafeJson>('SafeJson').to(SafeJsonImpl).inSingletonScope(); kernel.bind<IPostal>('IPostal').to(PostalImpl).inSingletonScope(); kernel.bind<ChildProcessSpawn>('ChildProcessSpawn').to(ChildProcessSpawnImpl).inSingletonScope(); kernel.bind<RemoteCatalogGetter>('RemoteCatalogGetter').to(RemoteCatalogGetterImpl).inSingletonScope(); kernel.bind<ProgressTask>('ProgressTask').to(ProgressTaskImpl); kernel.bind<CommandLine>('CommandLine').to(CommandLineImpl); kernel.bind<NestedYargs>('NestedYargs').to(NestedYargsImpl); kernel.bind<Command>('CommandImpl').to(CommandImpl); kernel.bind<Spawn>('Spawn').to(SpawnImpl); kernel.bind<Positive>('Positive').to(PositiveImpl); export default kernel;