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

@coast/dynamic-config

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coast/dynamic-config - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

7

DynamicConfig.js

@@ -25,7 +25,10 @@ "use strict";

async loadConfig() {
const dotEnvParse = dotenv_1.default.parse(fs_1.default.readFileSync(this.options.envFilePath));
const allKeys = this.getAllKeys();
const entries = {};
this.loadFromSource(allKeys, process.env, entries);
this.loadFromSource(this.getAllUnsetKeys(allKeys, entries), dotEnvParse, entries);
let dotEnvParse = {};
if (this.options.envFilePath !== undefined && fs_1.default.existsSync(this.options.envFilePath)) {
dotEnvParse = dotenv_1.default.parse(fs_1.default.readFileSync(this.options.envFilePath));
this.loadFromSource(this.getAllUnsetKeys(allKeys, entries), dotEnvParse, entries);
}
const missingEntries = this.getAllUnsetKeys(allKeys, entries);

@@ -32,0 +35,0 @@ if (missingEntries.length > 0) {

@@ -7,3 +7,3 @@ /// <reference types="hapi__joi" />

* @property schema: Joi object schema that specifies all variables to load
* @property envFilePath: Path to a dotenv file
* @property envFilePath: Path to a dotenv file. Ignored if file is not found
* @property ssmPaths: optional array of paths. Ex ['staging', 'core-api'] will lookup params at '/staging/core-api/.'

@@ -15,5 +15,5 @@ * @property allowUnknownVariables: Allow variables not specified in the schema.

schema: ObjectSchema;
envFilePath: string;
envFilePath?: string;
ssmPaths?: string[];
allowUnknownVariables?: boolean;
}
{
"name": "@coast/dynamic-config",
"version": "1.4.0",
"version": "1.4.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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