@nestjs/config
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -14,9 +14,7 @@ "use strict"; | ||
static async registerWhen(module, condition, options) { | ||
let configResolved = false; | ||
const { timeout = 5000 } = options ?? {}; | ||
setTimeout(() => { | ||
if (!configResolved) { | ||
throw new Error(`Nest was not able to resolve the config variables within ${timeout} milliseconds. Bause of this, the ConditionalModule was not able to determine if ${module.toString()} should be registered or not`); | ||
} | ||
const timer = setTimeout(() => { | ||
throw new Error(`Nest was not able to resolve the config variables within ${timeout} milliseconds. Bause of this, the ConditionalModule was not able to determine if ${module.toString()} should be registered or not`); | ||
}, timeout); | ||
timer.unref(); | ||
const returnModule = { module: ConditionalModule, imports: [], exports: [] }; | ||
@@ -30,3 +28,3 @@ if (typeof condition === 'string') { | ||
await config_module_1.ConfigModule.envVariablesLoaded; | ||
configResolved = true; | ||
clearTimeout(timer); | ||
const evaluation = condition(process.env); | ||
@@ -33,0 +31,0 @@ if (evaluation) { |
{ | ||
"name": "@nestjs/config", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@config)", | ||
@@ -21,3 +21,3 @@ "author": "Kamil Mysliwiec", | ||
"dependencies": { | ||
"dotenv": "16.4.1", | ||
"dotenv": "16.4.5", | ||
"dotenv-expand": "10.0.0", | ||
@@ -28,28 +28,28 @@ "lodash": "4.17.21", | ||
"devDependencies": { | ||
"@commitlint/cli": "18.6.0", | ||
"@commitlint/config-angular": "18.6.0", | ||
"@nestjs/common": "10.3.2", | ||
"@nestjs/core": "10.3.2", | ||
"@nestjs/platform-express": "10.3.2", | ||
"@nestjs/testing": "10.3.2", | ||
"@commitlint/cli": "19.2.1", | ||
"@commitlint/config-angular": "19.1.0", | ||
"@nestjs/common": "10.3.5", | ||
"@nestjs/core": "10.3.5", | ||
"@nestjs/platform-express": "10.3.5", | ||
"@nestjs/testing": "10.3.5", | ||
"@types/jest": "29.5.12", | ||
"@types/lodash": "4.14.202", | ||
"@types/node": "20.11.16", | ||
"@types/lodash": "4.17.0", | ||
"@types/node": "20.11.30", | ||
"@types/uuid": "9.0.8", | ||
"@typescript-eslint/eslint-plugin": "6.21.0", | ||
"@typescript-eslint/parser": "6.21.0", | ||
"eslint": "8.56.0", | ||
"@typescript-eslint/eslint-plugin": "7.3.1", | ||
"@typescript-eslint/parser": "7.3.1", | ||
"eslint": "8.57.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-import": "2.29.1", | ||
"husky": "9.0.10", | ||
"husky": "9.0.11", | ||
"jest": "29.7.0", | ||
"joi": "17.12.1", | ||
"joi": "17.12.2", | ||
"lint-staged": "15.2.2", | ||
"prettier": "3.2.5", | ||
"reflect-metadata": "0.1.14", | ||
"release-it": "17.0.3", | ||
"reflect-metadata": "0.2.1", | ||
"release-it": "17.1.1", | ||
"rimraf": "5.0.5", | ||
"rxjs": "7.8.1", | ||
"ts-jest": "29.1.2", | ||
"typescript": "5.3.3" | ||
"typescript": "5.4.3" | ||
}, | ||
@@ -56,0 +56,0 @@ "peerDependencies": { |
49211
1028
+ Addeddotenv@16.4.5(transitive)
- Removeddotenv@16.4.1(transitive)
Updateddotenv@16.4.5