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: 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)
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: 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) 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 a getter function to fetch greeters (bindings tagged with
* `{[CoreTags.EXTENSION_POINT]: GREETER_EXTENSION_POINT_NAME}`)
*/
@extensions()
private getGreeters: Getter,
/**
* An extension point should be able to receive its options via dependency
* injection.
*/
@config() // Sugar for @inject('services.GreetingService.options', {optional: true})
public readonly options?: GreetingServiceOptions,
) {}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationWithRepositories,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@config()
public datasourceConfig: ArtifactOptions = {},
) {
super(
projectRoot,
// Set DataSource Booter Options if passed in via bootConfig
Object.assign({}, DataSourceDefaults, datasourceConfig),
);
}
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.CONTROLLER_CLASS, {optional: true})
private readonly controllerClass: Constructor<{}>,
@inject(CoreBindings.CONTROLLER_METHOD_NAME, {optional: true})
private readonly methodName: string,
@config({fromBinding: AuthenticationBindings.COMPONENT})
private readonly options: AuthenticationOptions = {},
) {}
constructor(
/**
* Inject the configuration for ChineseGreeter
*/
@config()
private options: ChineseGreeterOptions = {nameFirst: true},
) {}
constructor(
/**
* Inject configuration for this bound instance
*/
@config() private settings: GreeterConfig = {},
) {}