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

@incanta/config

Package Overview
Dependencies
Maintainers
0
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@incanta/config - npm Package Compare versions

Comparing version 0.5.14 to 0.5.15

2

lib/config.d.ts

@@ -15,2 +15,3 @@ export interface IConfigOptions {

private configDir;
private configEnv;
private extraConfigDirs;

@@ -27,2 +28,3 @@ private values;

dir(): string;
env(): string;
configEnvDir(configEnv: string): string | null;

@@ -29,0 +31,0 @@ getConfiguredEnv(): any;

9

lib/config.js

@@ -14,2 +14,3 @@ "use strict";

configDir = "";
configEnv = "";
extraConfigDirs = [];

@@ -55,4 +56,5 @@ values;

path_1.default.join(cwd, defaultConfigDir);
const configEnv = options?.configEnv || process.env["NODE_CONFIG_ENV"] || defaultConfigEnv;
const configEnvDir = this.configEnvDir(configEnv);
this.configEnv =
options?.configEnv || process.env["NODE_CONFIG_ENV"] || defaultConfigEnv;
const configEnvDir = this.configEnvDir(this.configEnv);
const configFolderOptions = loader_1.Loader.readConfigSettings(configEnvDir || path_1.default.join(this.configDir, "default"));

@@ -88,2 +90,5 @@ const defaultValues = loader_1.Loader.loadRoot(path_1.default.join(this.configDir, "default"), {

}
env() {
return this.configEnv;
}
configEnvDir(configEnv) {

@@ -90,0 +95,0 @@ if (fs_1.default.existsSync(path_1.default.join(this.configDir, configEnv))) {

{
"name": "@incanta/config",
"version": "0.5.14",
"version": "0.5.15",
"main": "lib/index.js",

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

@@ -24,2 +24,3 @@ import mergeWith from "lodash.mergewith";

private configDir: string = "";
private configEnv: string = "";
private extraConfigDirs: string[] = [];

@@ -81,6 +82,6 @@

const configEnv =
this.configEnv =
options?.configEnv || process.env["NODE_CONFIG_ENV"] || defaultConfigEnv;
const configEnvDir = this.configEnvDir(configEnv);
const configEnvDir = this.configEnvDir(this.configEnv);

@@ -147,2 +148,6 @@ const configFolderOptions = Loader.readConfigSettings(

public env(): string {
return this.configEnv;
}
public configEnvDir(configEnv: string): string | null {

@@ -149,0 +154,0 @@ if (fs.existsSync(path.join(this.configDir, configEnv))) {

Sorry, the diff of this file is not supported yet

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