@unifig/env
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -1,2 +0,2 @@ | ||
import { ConfigSource, IConfigAdapter } from '@unifig/core'; | ||
import { ConfigSource, ConfigAdapter } from '@unifig/core'; | ||
import { EnvConfigAdapterOptions } from './env.adapter.options'; | ||
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
export declare class EnvConfigAdapter implements IConfigAdapter { | ||
export declare class EnvConfigAdapter implements ConfigAdapter { | ||
private readonly _options; | ||
@@ -9,0 +9,0 @@ private readonly _envFilesPaths; |
{ | ||
"name": "@unifig/env", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "Environmental variables adapter for unifig", | ||
@@ -31,7 +31,7 @@ "keywords": [ | ||
"dotenv": "^16.0.3", | ||
"dotenv-expand": "^9.0.0", | ||
"dotenv-expand": "^10.0.0", | ||
"fast-glob": "^3.2.12" | ||
}, | ||
"devDependencies": { | ||
"@unifig/core": "workspace:^" | ||
"@unifig/core": "^0.7.0" | ||
}, | ||
@@ -41,3 +41,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "1ea5caae9693e18a5238440b7d891a6a0a22e6c6" | ||
"gitHead": "8bc3b487a11a717e789734f973255dbf896fa188" | ||
} |
@@ -32,2 +32,12 @@ # Env variables & files adapter for [Unifig](https://github.com/Matii96/unifig) | ||
```ts | ||
export class DbSettings { | ||
@From('DB_URL') | ||
@IsString() | ||
url: string; | ||
@From('DB_PASSWORD') | ||
@IsString() | ||
password: string; | ||
} | ||
export class Settings { | ||
@@ -37,2 +47,6 @@ @From('PORT') | ||
port: number; | ||
@Nested(() => DbSettings) | ||
@IsDefined() | ||
db: DbSettings; | ||
} | ||
@@ -39,0 +53,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
7440
106
+ Addeddotenv-expand@10.0.0(transitive)
- Removeddotenv-expand@9.0.0(transitive)
Updateddotenv-expand@^10.0.0