Socket
Socket
Sign inDemoInstall

config-dug

Package Overview
Dependencies
40
Maintainers
6
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.1 to 1.4.0

7

build/index.js
"use strict";
/* eslint-disable unicorn/no-nested-ternary */
/* eslint-disable no-console */

@@ -76,3 +77,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

const appDirectory = fs_1.default.realpathSync(process.cwd());
const environment = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
const environment = process.env.APP_ENV
? process.env.APP_ENV
: process.env.NODE_ENV
? process.env.NODE_ENV
: 'development';
debug('loading config from', path_1.default.resolve(appDirectory, configPath));

@@ -79,0 +84,0 @@ const defaultConfig = loadFile(resolveFile(appDirectory, configPath, 'config.default'));

# Changelog
## 1.4.0 (November 28, 2019)
- Add support for APP_ENV
- Update dependencies
## 1.3.1 (November 4, 2019)

@@ -4,0 +9,0 @@

30

package.json
{
"name": "config-dug",
"version": "1.3.1",
"version": "1.4.0",
"description": "Config loader with support for AWS Secrets Manager",

@@ -54,4 +54,4 @@ "author": "Neo Financial Engineering <engineering@neofinancial.com>",

"dependencies": {
"aws-param-store": "^2.1.0",
"aws-sdk": "^2.475.0",
"aws-param-store": "^3.1.0",
"aws-sdk": "^2.580.0",
"debug": "^4.1.1"

@@ -61,15 +61,15 @@ },

"@types/aws-param-store": "^2.1.0",
"@types/debug": "^4.1.4",
"@types/jest": "^24.0.14",
"@types/node": "^12.0.8",
"eslint": "^6.6.0",
"eslint-config-neo": "^0.4.2",
"husky": "^3.0.9",
"jest": "^24.8.0",
"lint-staged": "^9.4.2",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"ts-jest": "^24.0.2",
"typescript": "~3.4.5"
"@types/debug": "^4.1.5",
"@types/jest": "^24.0.23",
"@types/node": "^12.12.14",
"eslint": "^6.7.1",
"eslint-config-neo": "^0.5.1",
"husky": "^3.1.0",
"jest": "^24.9.0",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"rimraf": "^3.0.0",
"ts-jest": "^24.2.0",
"typescript": "~3.7.2"
}
}
# Config Dug
[![Build status](https://github.com/neofinancial/config-dug/workflows/CI/badge.svg)](https://github.com/neofinancial/config-dug/actions)
![TypeScript 3.4.3](https://img.shields.io/badge/TypeScript-3.4.3-brightgreen.svg)
![TypeScript 3.7.2](https://img.shields.io/badge/TypeScript-3.7.2-brightgreen.svg)

@@ -36,7 +36,9 @@ ![Config Dug](https://github.com/neofinancial/config-dug/blob/master/config-dug.png)

Environment specific config files are loaded based on the value of the `APP_ENV` or `NODE_ENV` environment variables. If `APP_ENV` is present it will take precedence over `NODE_ENV`.
Settings from these different sources are merged together into a single config object in the following order:
1. `config.default.{ts|js}`
1. `config.${NODE_ENV}.{ts|js}`
1. `config.${NODE_ENV}.local.{ts|js}`
1. `config.${APP_ENV|NODE_ENV}.{ts|js}`
1. `config.${APP_ENV|NODE_ENV}.local.{ts|js}`
1. `config.local.{ts|js}`

@@ -43,0 +45,0 @@ 1. AWS Secrets Manager

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc