import { Kernel , interfaces } from 'inversify' ; import { makeFluentProvideDecorator } from 'inversify-binding-decorators' ; import Dockerode from 'dockerode' ; import getDecorators from 'inversify-inject-decorators' ; export const kernel = new Kernel ( ) ; export const Fetch = < Symbol > Symbol ( ) ; kernel . bind ( Dockerode ) . toConstantValue ( Dockerode ) ; kernel . bind ( Fetch ) . toConstantValue ( fetch . bind ( window ) ) ; const provide = makeFluentProvideDecorator ( kernel ) ; export function provideInstance ( identifier ) { return provide ( identifier ) . done ( ) ; } export function provideSingleton ( identifier ) { return provide ( identifier ) . inSingletonScope ( ) . done ( ) ; } export const inject = getDecorators ( kernel ) . lazyInject ;