Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationWithServices,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@config()
public serviceConfig: ArtifactOptions = {},
) {
super(
projectRoot,
// Set Service Booter Options if passed in via bootConfig
Object.assign({}, ServiceDefaults, serviceConfig),
);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
private app: Application & Bootable,
@inject(BootBindings.PROJECT_ROOT) private projectRoot: string,
@inject(BootBindings.BOOT_OPTIONS, {optional: true})
private bootOptions: BootOptions = {},
) {
// Resolve path to projectRoot and re-bind
this.projectRoot = resolve(this.projectRoot);
app.bind(BootBindings.PROJECT_ROOT).to(this.projectRoot);
// This is re-bound for testing reasons where this value may be passed directly
// and needs to be propagated to the Booters via DI
app.bind(BootBindings.BOOT_OPTIONS).to(this.bootOptions);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: Application,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@config()
public observerConfig: ArtifactOptions = {},
) {
super(
projectRoot,
// Set LifeCycleObserver Booter Options if passed in via bootConfig
Object.assign({}, LifeCycleObserverDefaults, observerConfig),
);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE) public app: Application,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@config()
public controllerConfig: ArtifactOptions = {},
) {
super(
projectRoot,
// Set Controller Booter Options if passed in via bootConfig
Object.assign({}, ControllerDefaults, controllerConfig),
);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationWithRepositories,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@config()
public repositoryOptions: ArtifactOptions = {},
) {
super(
projectRoot,
// Set Repository Booter Options if passed in via bootConfig
Object.assign({}, RepositoryDefaults, repositoryOptions),
);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: Application,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@config()
public interceptorConfig: ArtifactOptions = {},
) {
super(
projectRoot,
// Set InterceptorProvider Booter Options if passed in via bootConfig
Object.assign({}, InterceptorProviderDefaults, interceptorConfig),
);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
private app: TodoListApplication,
) {}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE) public app?: Application,
@inject('rpcServer.config') public config?: RPCServerConfig,
) {
super(app);
this.config = config ?? {};
this.expressServer = express();
rpcRouter(this);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: Application & {v3compat: Lb3Application},
@inject(BootBindings.PROJECT_ROOT)
public projectRoot: string,
@inject(`${BootBindings.BOOT_OPTIONS}#v3compat`)
options: Partial = {},
) {
this.options = Object.assign({}, DefaultOptions, options);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE) public app: Application,
@inject(BootBindings.PROJECT_ROOT) private projectRoot: string,
) {}