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.10 to 0.5.11

1

lib/config.d.ts
export interface IConfigOptions {
configDir?: string;
configEnv?: string;
cwd?: string;
}

@@ -5,0 +6,0 @@ export interface IConfigSettings {

9

lib/config.js

@@ -34,4 +34,5 @@ "use strict";

let defaultConfigEnv = "default";
if (fs_1.default.existsSync(path_1.default.join(process.cwd(), "config-settings.json"))) {
const configSettings = JSON.parse(fs_1.default.readFileSync(path_1.default.join(process.cwd(), "config-settings.json"), "utf-8"));
const cwd = options?.cwd || process.cwd();
if (fs_1.default.existsSync(path_1.default.join(cwd, "config-settings.json"))) {
const configSettings = JSON.parse(fs_1.default.readFileSync(path_1.default.join(cwd, "config-settings.json"), "utf-8"));
if (configSettings.defaults) {

@@ -52,4 +53,4 @@ if (configSettings.defaults.dir) {

(process.env["NODE_CONFIG_DIR"] &&
path_1.default.relative(process.cwd(), process.env["NODE_CONFIG_DIR"])) ||
path_1.default.join(process.cwd(), defaultConfigDir);
path_1.default.relative(cwd, process.env["NODE_CONFIG_DIR"])) ||
path_1.default.join(cwd, defaultConfigDir);
const configEnv = options?.configEnv || process.env["NODE_CONFIG_ENV"] || defaultConfigEnv;

@@ -56,0 +57,0 @@ const configEnvDir = this.configEnvDir(configEnv);

{
"name": "@incanta/config",
"version": "0.5.10",
"version": "0.5.11",
"main": "lib/index.js",

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

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

configEnv?: string;
cwd?: string;
}

@@ -53,8 +54,6 @@

let defaultConfigEnv = "default";
if (fs.existsSync(path.join(process.cwd(), "config-settings.json"))) {
const cwd = options?.cwd || process.cwd();
if (fs.existsSync(path.join(cwd, "config-settings.json"))) {
const configSettings: IConfigSettings = JSON.parse(
fs.readFileSync(
path.join(process.cwd(), "config-settings.json"),
"utf-8"
)
fs.readFileSync(path.join(cwd, "config-settings.json"), "utf-8")
);

@@ -80,4 +79,4 @@

(process.env["NODE_CONFIG_DIR"] &&
path.relative(process.cwd(), process.env["NODE_CONFIG_DIR"])) ||
path.join(process.cwd(), defaultConfigDir);
path.relative(cwd, process.env["NODE_CONFIG_DIR"])) ||
path.join(cwd, defaultConfigDir);

@@ -84,0 +83,0 @@ const 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