@spinajs/configuration
Advanced tools
Comparing version 1.2.209 to 1.2.210
@@ -59,3 +59,3 @@ import { Class, Container } from '@spinajs/di'; | ||
reload(): Promise<void>; | ||
protected loadSources(): Promise<void>; | ||
protected loadSources(): void; | ||
protected validateAndMerge(rCfg: IConfigLike): void; | ||
@@ -62,0 +62,0 @@ protected initValidator(): void; |
@@ -132,3 +132,4 @@ "use strict"; | ||
*/ | ||
await this.loadSources(); | ||
this.loadSources(); | ||
await this.reload(); | ||
/** | ||
@@ -158,5 +159,10 @@ * Merge from DI container | ||
this.Config = {}; | ||
await this.loadSources(); | ||
for (const source of this.Sources) { | ||
const rCfg = await source.Load(this); | ||
if (rCfg) { | ||
this.validateAndMerge(rCfg); | ||
} | ||
} | ||
} | ||
async loadSources() { | ||
loadSources() { | ||
this.Sources = this.Container.resolve(Array.ofType(configuration_common_1.ConfigurationSource), [ | ||
@@ -171,8 +177,2 @@ this.RunApp, | ||
}); | ||
for (const source of this.Sources) { | ||
const rCfg = await source.Load(this); | ||
if (rCfg) { | ||
this.validateAndMerge(rCfg); | ||
} | ||
} | ||
} | ||
@@ -179,0 +179,0 @@ validateAndMerge(rCfg) { |
{ | ||
"name": "@spinajs/configuration", | ||
"version": "1.2.209", | ||
"version": "1.2.210", | ||
"description": "framework configuration module", | ||
@@ -43,3 +43,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@spinajs/configuration-common": "^1.2.208", | ||
"@spinajs/configuration-common": "^1.2.210", | ||
"@spinajs/di": "^1.2.208", | ||
@@ -55,3 +55,3 @@ "@spinajs/exceptions": "^1.2.127", | ||
}, | ||
"gitHead": "4972a5cc44d88143cf4774680b9db27072e13154" | ||
"gitHead": "b609dc439728933e0a1b945734e7f0335e2063c3" | ||
} |
Sorry, the diff of this file is not supported yet
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
44609