All files / helpers bootstrap.ts

60% Statements 9/15
100% Branches 0/0
0% Functions 0/4
75% Lines 9/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 191x 1x 1x   1x       1x   1x   1x 1x 1x        
import 'reflect-metadata';
import { Container } from '../container';
import { BootstrapService } from '../services/bootstrap/bootstrap.service';
import { ConfigModel } from '../services/config/config.model';
import { exitHandlerInit } from './exit-handler';
import { Observable } from 'rxjs';
import { PluginManager } from '../services/plugin-manager/plugin-manager';
 
exitHandlerInit();
 
const bootstrapService = Container.get(BootstrapService);
 
export const Bootstrap = (app, config?: ConfigModel): Observable<PluginManager> => bootstrapService.start(app, config);
export const BootstrapPromisify = (app, config?: ConfigModel): Promise<PluginManager> => bootstrapService.start(app, config).toPromise();
export const BootstrapFramework = (app, modules: any[], config?: ConfigModel): Observable<PluginManager> => {
    bootstrapService.configService.setConfig(config);
    modules.map(m => Container.get(m));
    return bootstrapService.start(app, config);
};