@solid-soda/config
Advanced tools
| import AbstractConfiguration from '../AbstractConfiguration'; | ||
| import ConfigDict from '../ConfigDict'; | ||
| export default class ExternalConfiguration extends AbstractConfiguration { | ||
| private readonly configDict; | ||
| private readonly envKey; | ||
| constructor(configDict: ConfigDict, envKey: string); | ||
| get: (key: string) => import("tsoption").Some<string>; | ||
| isDev: () => boolean; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| const tsoption_1 = require("tsoption"); | ||
| const AbstractConfiguration_1 = require("../AbstractConfiguration"); | ||
| class ExternalConfiguration extends AbstractConfiguration_1.default { | ||
| constructor(configDict, envKey) { | ||
| super(); | ||
| this.configDict = configDict; | ||
| this.envKey = envKey; | ||
| this.get = (key) => tsoption_1.Option.of(this.configDict[key]); | ||
| this.isDev = () => this.getString(this.envKey) | ||
| .map(env => env === 'development') | ||
| .getOrElse(false); | ||
| } | ||
| } | ||
| exports.default = ExternalConfiguration; | ||
| //# sourceMappingURL=ExternalConfiguration.js.map |
| {"version":3,"file":"ExternalConfiguration.js","sourceRoot":"","sources":["../../lib/configurations/ExternalConfiguration.ts"],"names":[],"mappings":";;AAAA,uCAAiC;AAEjC,oEAA4D;AAG5D,MAAqB,qBAAsB,SAAQ,+BAAqB;IACtE,YACmB,UAAsB,EACtB,MAAc;QAE/B,KAAK,EAAE,CAAA;QAHU,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;QAK1B,QAAG,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,iBAAM,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;QAEtD,UAAK,GAAG,GAAG,EAAE,CAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;aACxB,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,aAAa,CAAC;aACjC,SAAS,CAAC,KAAK,CAAC,CAAA;IAPrB,CAAC;CAQF;AAdD,wCAcC"} |
+1
-0
@@ -6,3 +6,4 @@ export { default as Configuration } from './Configuration'; | ||
| export { default as FileConfiguration, } from './configurations/FileConfiguration'; | ||
| export { default as ExternalConfiguration, } from './configurations/ExternalConfiguration'; | ||
| export { default as ParseFile } from './configurations/fileParsers/ParseFile'; | ||
| export { default as jsonParse } from './configurations/fileParsers/jsonParse'; |
+2
-0
@@ -11,4 +11,6 @@ "use strict"; | ||
| exports.FileConfiguration = FileConfiguration_1.default; | ||
| var ExternalConfiguration_1 = require("./configurations/ExternalConfiguration"); | ||
| exports.ExternalConfiguration = ExternalConfiguration_1.default; | ||
| var jsonParse_1 = require("./configurations/fileParsers/jsonParse"); | ||
| exports.jsonParse = jsonParse_1.default; | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;AACA,iEAA0E;AAAjE,wDAAA,OAAO,CAAyB;AAEzC,sEAA+E;AAAtE,8CAAA,OAAO,CAAoB;AACpC,4EAE6C;AAD3C,oDAAA,OAAO,CAAuB;AAEhC,wEAE2C;AADzC,gDAAA,OAAO,CAAqB;AAI9B,oEAA6E;AAApE,gCAAA,OAAO,CAAa"} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;AACA,iEAA0E;AAAjE,wDAAA,OAAO,CAAyB;AAEzC,sEAA+E;AAAtE,8CAAA,OAAO,CAAoB;AACpC,4EAE6C;AAD3C,oDAAA,OAAO,CAAuB;AAEhC,wEAE2C;AADzC,gDAAA,OAAO,CAAqB;AAE9B,gFAE+C;AAD7C,wDAAA,OAAO,CAAyB;AAIlC,oEAA6E;AAApE,gCAAA,OAAO,CAAa"} |
+2
-3
| { | ||
| "name": "@solid-soda/config", | ||
| "version": "1.0.0", | ||
| "version": "1.1.0", | ||
| "license": "MIT", | ||
@@ -39,3 +39,3 @@ "main": "dist/index.js", | ||
| "hooks": { | ||
| "pre-commit": "lint-staged", | ||
| "pre-commit": "lint-staged && yarn test", | ||
| "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
@@ -48,3 +48,2 @@ } | ||
| "yarn lint", | ||
| "yarn test", | ||
| "git add" | ||
@@ -51,0 +50,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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
19928
10.73%42
7.69%232
13.73%