Implement queue work and listen commands
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -55,10 +55,6 @@ export class Container {
|
||||
.resolve()
|
||||
.map(factory => container.registerFactory(factory))
|
||||
|
||||
ContainerBlueprint.getContainerBlueprint()
|
||||
.resolveConstructable()
|
||||
.map((factory: StaticClass<AbstractFactory<any>, any>) => console.log(factory)) // eslint-disable-line no-console
|
||||
|
||||
ContainerBlueprint.getContainerBlueprint()
|
||||
.resolveConstructable()
|
||||
.map((factory: StaticClass<AbstractFactory<any>, any>) => container.registerFactory(container.make(factory)))
|
||||
@@ -335,7 +331,7 @@ export class Container {
|
||||
if ( factory ) {
|
||||
return factory
|
||||
} else {
|
||||
logIfDebugging('extollo.di.injector', 'unable to resolve factory', factory, this.factories)
|
||||
logIfDebugging('extollo.di.injector', 'unable to resolve factory', key, factory, this.factories)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,6 +384,8 @@ export class Container {
|
||||
* @param {array} parameters
|
||||
*/
|
||||
protected produceFactory<T>(factory: AbstractFactory<T>, parameters: any[]): T {
|
||||
logIfDebugging('extollo.di.injector', 'Make stack', Container.makeStack)
|
||||
|
||||
// Create the dependencies for the factory
|
||||
const keys = factory.getDependencyKeys().filter(req => this.hasKey(req.key))
|
||||
const dependencies = keys.map<ResolvedDependency>(req => {
|
||||
@@ -415,7 +413,9 @@ export class Container {
|
||||
// Produce a new instance
|
||||
const inst = factory.produce(constructorArguments, params.reverse().all())
|
||||
|
||||
logIfDebugging('extollo.di.injector', 'Resolving dependencies for factory', factory)
|
||||
factory.getInjectedProperties().each(dependency => {
|
||||
logIfDebugging('extollo.di.injector', 'Resolving injected dependency:', dependency)
|
||||
if ( dependency.key && inst ) {
|
||||
(inst as any)[dependency.property] = this.resolveAndCreate(dependency.key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user