Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nestjs/config

Package Overview
Dependencies
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/config - npm Package Compare versions

Comparing version 0.2.4 to 0.3.0

26

dist/config.module.js

@@ -117,19 +117,15 @@ "use strict";

static loadEnvFile(options) {
try {
const envFilePath = options.envFilePath || path_1.resolve(process.cwd(), '.env');
const config = dotenv.parse(fs.readFileSync(envFilePath));
if (options.expandVariables) {
const configExpandedVars = {
parsed: config,
};
return dotenv_expand_1.default(configExpandedVars).parsed || {};
const envFilePaths = Array.isArray(options.envFilePath)
? options.envFilePath
: [options.envFilePath || path_1.resolve(process.cwd(), '.env')];
let config = {};
for (const envFilePath of envFilePaths) {
if (fs.existsSync(envFilePath)) {
config = Object.assign(dotenv.parse(fs.readFileSync(envFilePath)), config);
if (options.expandVariables) {
config = dotenv_expand_1.default({ parsed: config }).parsed || config;
}
}
return config;
}
catch (err) {
if (options.envFilePath || (err && err.code !== 'ENOENT')) {
throw err;
}
return {};
}
return config;
}

@@ -136,0 +132,0 @@ static assignVariablesToProcess(config) {

@@ -6,3 +6,3 @@ import { ConfigFactory } from './config-factory.interface';

ignoreEnvVars?: boolean;
envFilePath?: string;
envFilePath?: string | string[];
encoding?: string;

@@ -9,0 +9,0 @@ validationSchema?: any;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const v4_1 = __importDefault(require("uuid/v4"));
const uuid_1 = require("uuid");
const get_config_token_util_1 = require("./get-config-token.util");
function createConfigProvider(factory) {
const uniqId = v4_1.default();
const uniqId = uuid_1.v4();
return {

@@ -11,0 +8,0 @@ provide: factory.KEY || get_config_token_util_1.getConfigToken(uniqId),

{
"name": "@nestjs/config",
"version": "0.2.4",
"version": "0.3.0",
"description": "Nest - modern, fast, powerful node.js web framework (@config)",

@@ -24,3 +24,3 @@ "author": "Kamil Mysliwiec",

"lodash.set": "4.3.2",
"uuid": "3.4.0"
"uuid": "^7.0.2"
},

@@ -31,27 +31,27 @@ "devDependencies": {

"@hapi/joi": "17.1.0",
"@nestjs/common": "6.11.8",
"@nestjs/core": "6.11.8",
"@nestjs/platform-express": "6.11.8",
"@nestjs/testing": "6.11.8",
"@types/hapi__joi": "16.0.11",
"@types/jest": "25.1.3",
"@nestjs/common": "6.11.11",
"@nestjs/core": "6.11.11",
"@nestjs/platform-express": "6.11.11",
"@nestjs/testing": "6.11.11",
"@types/hapi__joi": "16.0.12",
"@types/jest": "25.1.4",
"@types/lodash.get": "4.4.6",
"@types/lodash.set": "4.3.6",
"@types/node": "7.10.8",
"@typescript-eslint/eslint-plugin": "2.20.0",
"@typescript-eslint/parser": "2.20.0",
"@types/uuid": "^7.0.0",
"@typescript-eslint/eslint-plugin": "2.23.0",
"@typescript-eslint/parser": "2.23.0",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.0",
"eslint-plugin-import": "2.20.1",
"release-it": "12.6.1",
"@types/uuid": "3.4.7",
"husky": "4.2.3",
"jest": "25.1.0",
"lint-staged": "10.0.7",
"lint-staged": "10.0.8",
"prettier": "1.19.1",
"reflect-metadata": "0.1.13",
"release-it": "13.0.2",
"rimraf": "3.0.2",
"rxjs": "6.5.4",
"ts-jest": "25.2.1",
"typescript": "3.8.2"
"typescript": "3.8.3"
},

@@ -58,0 +58,0 @@ "peerDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc