@unifig/core
Advanced tools
Comparing version 0.2.0 to 0.2.2
@@ -6,2 +6,5 @@ export * from './adapters'; | ||
import { ConfigManager } from './manager'; | ||
/** | ||
* Global ConfigManager instance. | ||
*/ | ||
export declare const Config: ConfigManager; |
@@ -23,2 +23,5 @@ "use strict"; | ||
const manager_1 = require("./manager"); | ||
/** | ||
* Global ConfigManager instance. | ||
*/ | ||
exports.Config = new manager_1.ConfigManager(); |
@@ -0,1 +1,3 @@ | ||
export * from './exceptions'; | ||
export * from './config.container'; | ||
export * from './config.manager'; |
@@ -17,2 +17,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./exceptions"), exports); | ||
__exportStar(require("./config.container"), exports); | ||
__exportStar(require("./config.manager"), exports); |
{ | ||
"name": "@unifig/core", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"description": "Universal, typed and validated configuration manager", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "be608fa3d9ae93b592f85ccdac451643e20dc26c" | ||
"gitHead": "0ae11fdae770f03cec2007daf3861476aa2ed229" | ||
} |
@@ -46,2 +46,6 @@ <h1 align="center">Unifig</h1> | ||
```ts | ||
import { From, Nested } from '@unifig/core'; | ||
import { Transform } from 'class-transformer'; | ||
import { IsString, IsArray } from 'class-validator'; | ||
class DbSettings { | ||
@@ -62,2 +66,6 @@ @From('global.dbUrl') | ||
@Transform(({ value }) => value.split(',').map((n) => Number(n))) | ||
@IsArray() | ||
intervals: number[]; | ||
@Nested(DbSettings) | ||
@@ -77,2 +85,3 @@ db: DbSettings; | ||
global: { dbUrl: 'localhost:5467', dbPassword: 'password' }, | ||
intervals: '56,98,34,72', | ||
}), | ||
@@ -79,0 +88,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
28760
49
537
128