@eggslib/configuration 21.0.0 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,10 +41,10 @@ class ConfigurationService {
|
|
|
41
41
|
}
|
|
42
42
|
return res;
|
|
43
43
|
}
|
|
44
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
45
|
-
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
44
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ConfigurationService, providedIn: 'root' });
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ConfigurationService, decorators: [{
|
|
48
48
|
type: Injectable,
|
|
49
49
|
args: [{
|
|
50
50
|
providedIn: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eggslib-configuration.mjs","sources":["../../../projects/configuration/src/lib/configuration.service.ts","../../../projects/configuration/src/eggslib-configuration.ts"],"sourcesContent":["import { EventEmitter, Injectable, inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport {firstValueFrom, forkJoin, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport type ConfigurationValues = Record<string, unknown>;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfigurationService {\n private http = inject(HttpClient);\n\n private otherconfig?: ConfigurationValues;\n private pathconfig?: ConfigurationValues;\n private keycloakconfig?: ConfigurationValues;\n\n public configChanged: EventEmitter<void> = new EventEmitter<void>();\n\n public init(pathconfig: string, otherconfig?: string, keycloakconfig?: string): Promise<void> {\n const calls: Observable<ConfigurationValues>[] = [];\n calls.push(this.http.get<ConfigurationValues>(pathconfig));\n if (otherconfig) {\n calls.push(this.http.get<ConfigurationValues>(otherconfig));\n }\n if (keycloakconfig) {\n calls.push(this.http.get<ConfigurationValues>(keycloakconfig));\n }\n return firstValueFrom(forkJoin(calls)\n .pipe(\n map(res => {\n this.pathconfig = res[0];\n if (otherconfig) {\n this.otherconfig = res[1];\n }\n if (keycloakconfig) {\n this.keycloakconfig = res[2];\n }\n this.configChanged.emit();\n })\n ));\n }\n\n public get(key: string): unknown {\n let res: unknown = this.pathconfig ? this.pathconfig[key] : null;\n if (!res) {\n res = this.otherconfig ? this.otherconfig[key] : null;\n }\n if (!res) {\n res = this.keycloakconfig ? this.keycloakconfig[key] : null;\n }\n return res;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAUa,oBAAoB,CAAA;AACrB,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEzB,IAAA,WAAW;AACX,IAAA,UAAU;AACV,IAAA,cAAc;AAEf,IAAA,aAAa,GAAuB,IAAI,YAAY,EAAQ;AAE5D,IAAA,IAAI,CAAC,UAAkB,EAAE,WAAoB,EAAE,cAAuB,EAAA;QACzE,MAAM,KAAK,GAAsC,EAAE;AACnD,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,UAAU,CAAC,CAAC;QAC1D,IAAI,WAAW,EAAE;AACb,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,WAAW,CAAC,CAAC;QAC/D;QACA,IAAI,cAAc,EAAE;AAChB,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,cAAc,CAAC,CAAC;QAClE;AACA,QAAA,OAAO,cAAc,CAAC,QAAQ,CAAC,KAAK;AAC/B,aAAA,IAAI,CACD,GAAG,CAAC,GAAG,IAAG;AACN,YAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC;YACxB,IAAI,WAAW,EAAE;AACb,gBAAA,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC;YAC7B;YACA,IAAI,cAAc,EAAE;AAChB,gBAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC;YAChC;AACA,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;QAC7B,CAAC,CAAC,CACL,CAAC;IACV;AAEO,IAAA,GAAG,CAAC,GAAW,EAAA;AAClB,QAAA,IAAI,GAAG,GAAY,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI;QAChE,IAAI,CAAC,GAAG,EAAE;AACN,YAAA,GAAG,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;QACzD;QACA,IAAI,CAAC,GAAG,EAAE;AACN,YAAA,GAAG,GAAG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,IAAI;QAC/D;AACA,QAAA,OAAO,GAAG;IACd;
|
|
1
|
+
{"version":3,"file":"eggslib-configuration.mjs","sources":["../../../projects/configuration/src/lib/configuration.service.ts","../../../projects/configuration/src/eggslib-configuration.ts"],"sourcesContent":["import { EventEmitter, Injectable, inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport {firstValueFrom, forkJoin, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport type ConfigurationValues = Record<string, unknown>;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfigurationService {\n private http = inject(HttpClient);\n\n private otherconfig?: ConfigurationValues;\n private pathconfig?: ConfigurationValues;\n private keycloakconfig?: ConfigurationValues;\n\n public configChanged: EventEmitter<void> = new EventEmitter<void>();\n\n public init(pathconfig: string, otherconfig?: string, keycloakconfig?: string): Promise<void> {\n const calls: Observable<ConfigurationValues>[] = [];\n calls.push(this.http.get<ConfigurationValues>(pathconfig));\n if (otherconfig) {\n calls.push(this.http.get<ConfigurationValues>(otherconfig));\n }\n if (keycloakconfig) {\n calls.push(this.http.get<ConfigurationValues>(keycloakconfig));\n }\n return firstValueFrom(forkJoin(calls)\n .pipe(\n map(res => {\n this.pathconfig = res[0];\n if (otherconfig) {\n this.otherconfig = res[1];\n }\n if (keycloakconfig) {\n this.keycloakconfig = res[2];\n }\n this.configChanged.emit();\n })\n ));\n }\n\n public get(key: string): unknown {\n let res: unknown = this.pathconfig ? this.pathconfig[key] : null;\n if (!res) {\n res = this.otherconfig ? this.otherconfig[key] : null;\n }\n if (!res) {\n res = this.keycloakconfig ? this.keycloakconfig[key] : null;\n }\n return res;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAUa,oBAAoB,CAAA;AACrB,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEzB,IAAA,WAAW;AACX,IAAA,UAAU;AACV,IAAA,cAAc;AAEf,IAAA,aAAa,GAAuB,IAAI,YAAY,EAAQ;AAE5D,IAAA,IAAI,CAAC,UAAkB,EAAE,WAAoB,EAAE,cAAuB,EAAA;QACzE,MAAM,KAAK,GAAsC,EAAE;AACnD,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,UAAU,CAAC,CAAC;QAC1D,IAAI,WAAW,EAAE;AACb,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,WAAW,CAAC,CAAC;QAC/D;QACA,IAAI,cAAc,EAAE;AAChB,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,C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AAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACTD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggslib/configuration",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "Configuration Library",
|
|
5
5
|
"author": "Alessandro Prandini",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@angular/common": "^
|
|
8
|
-
"@angular/core": "^
|
|
7
|
+
"@angular/common": "^22.0.0",
|
|
8
|
+
"@angular/core": "^22.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"tslib": "^2.3.0"
|