@travetto/di
Advanced tools
Comparing version 0.0.29 to 0.0.30
@@ -33,3 +33,3 @@ { | ||
}, | ||
"version": "0.0.29" | ||
"version": "0.0.30" | ||
} |
@@ -102,15 +102,10 @@ import { Dependency, InjectableConfig, ClassTarget, InjectableFactoryConfig } from '../types'; | ||
async initialInstall() { | ||
const finalizing = this.pendingFinalize; | ||
this.pendingFinalize = []; | ||
for (const cls of finalizing) { | ||
this.install(cls, { type: 'added', curr: cls }); | ||
} | ||
processAutocreate() { | ||
// Unblock auto created | ||
if (this.autoCreate.length && !AppEnv.test) { | ||
const items = this.autoCreate.slice(0).sort((a, b) => a.priority - b.priority); | ||
this.autoCreate = []; | ||
setTimeout(async () => { // Run after initialization finishes | ||
console.debug('Auto-creating', this.autoCreate.map(x => x.target.name)); | ||
const items = this.autoCreate.slice(0).sort((a, b) => a.priority - b.priority); | ||
for (const i of items) { | ||
@@ -123,2 +118,13 @@ await this.getInstance(i.target, i.qualifier); | ||
async initialInstall() { | ||
const finalizing = this.pendingFinalize; | ||
this.pendingFinalize = []; | ||
for (const cls of finalizing) { | ||
this.install(cls, { type: 'added', curr: cls }); | ||
} | ||
this.processAutocreate(); | ||
} | ||
createPending(cls: Class) { | ||
@@ -320,2 +326,4 @@ if (!this.resolved) { | ||
} | ||
this.processAutocreate(); | ||
} | ||
@@ -322,0 +330,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34015
840