@nestjs/config
Advanced tools
Comparing version 1.2.1 to 2.0.0
@@ -31,5 +31,2 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var ConfigModule_1; | ||
@@ -41,3 +38,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
const dotenv = __importStar(require("dotenv")); | ||
const dotenv_expand_1 = __importDefault(require("dotenv-expand")); | ||
const dotenv_expand_1 = require("dotenv-expand"); | ||
const fs = __importStar(require("fs")); | ||
@@ -169,3 +166,4 @@ const path_1 = require("path"); | ||
if (options.expandVariables) { | ||
config = (0, dotenv_expand_1.default)({ parsed: config }).parsed || config; | ||
const expandOptions = typeof options.expandVariables === 'object' ? options.expandVariables : {}; | ||
config = (0, dotenv_expand_1.expand)(Object.assign(Object.assign({}, expandOptions), { parsed: config })).parsed || config; | ||
} | ||
@@ -172,0 +170,0 @@ } |
import { ConfigFactory } from './config-factory.interface'; | ||
import { DotenvExpandOptions } from 'dotenv-expand'; | ||
export interface ConfigModuleOptions { | ||
@@ -53,7 +54,8 @@ /** | ||
/** | ||
* A boolean value indicating the use of expanded variables. | ||
* A boolean value indicating the use of expanded variables, or object | ||
* containing options to pass to dotenv-expand. | ||
* If .env contains expanded variables, they'll only be parsed if | ||
* this property is set to true. | ||
*/ | ||
expandVariables?: boolean; | ||
expandVariables?: boolean | DotenvExpandOptions; | ||
} |
{ | ||
"name": "@nestjs/config", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@config)", | ||
@@ -22,3 +22,3 @@ "author": "Kamil Mysliwiec", | ||
"dotenv": "16.0.0", | ||
"dotenv-expand": "5.1.0", | ||
"dotenv-expand": "8.0.2", | ||
"lodash": "4.17.21", | ||
@@ -25,0 +25,0 @@ "uuid": "8.3.2" |
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
39301
+ Addeddotenv-expand@8.0.2(transitive)
- Removeddotenv-expand@5.1.0(transitive)
Updateddotenv-expand@8.0.2