@factor/app-config
Advanced tools
Comparing version 0.1.4 to 0.2.0
{ | ||
"name": "@factor/app-config", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"main": "plugin.js", | ||
@@ -12,3 +12,3 @@ "license": "GPL-3.0", | ||
}, | ||
"gitHead": "614ba7ab077176f89c2b41ebb8ce72e14085b4dd" | ||
"gitHead": "37aba4a3ad87359530be2743d82cb4f4a79398ce" | ||
} |
@@ -5,27 +5,18 @@ const merge = require("deepmerge") | ||
return new (class { | ||
constructor() {} | ||
getPublicConfig() { | ||
let out = {} | ||
try { | ||
out = require("~/factor-config") | ||
} catch (error) { | ||
console.error(`Cant Find Public Config`) | ||
console.error(error) | ||
} | ||
return out | ||
} | ||
settings() { | ||
let publicConfig = this.getPublicConfig() | ||
const publicSettings = process.env.FACTOR_APP_CONFIG | ||
const configObjects = [ | ||
Factor.FACTOR_CONFIG, | ||
publicConfig[env], | ||
publicConfig.config, | ||
{ | ||
env | ||
} | ||
].filter(_ => _) | ||
return publicSettings | ||
// let publicConfig = this.getPublicConfig() | ||
return merge.all(configObjects) | ||
// const configObjects = [ | ||
// Factor.FACTOR_CONFIG, | ||
// publicConfig[env], | ||
// publicConfig.config, | ||
// { | ||
// env | ||
// } | ||
// ].filter(_ => _) | ||
// return merge.all(configObjects) | ||
} | ||
@@ -32,0 +23,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
36684
24
3