@hapiness/config
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -6,2 +6,7 @@ "use strict"; | ||
class Config { | ||
static ensureConfigData() { | ||
if (!this._data) { | ||
this.load(); | ||
} | ||
} | ||
/** | ||
@@ -29,2 +34,3 @@ * Load the config | ||
static getData() { | ||
this.ensureConfigData(); | ||
return this._data; | ||
@@ -39,2 +45,3 @@ } | ||
static has(key) { | ||
this.ensureConfigData(); | ||
return this._data.has(key); | ||
@@ -51,6 +58,4 @@ } | ||
static get(key, defaultValue) { | ||
this.ensureConfigData(); | ||
if (!this._data) { | ||
this.load(); | ||
} | ||
if (!this._data) { | ||
throw new Error('Empty config data'); | ||
@@ -57,0 +62,0 @@ } |
@@ -8,2 +8,3 @@ /// <reference types="config" /> | ||
private static _data; | ||
static ensureConfigData(): void; | ||
/** | ||
@@ -10,0 +11,0 @@ * Load the config |
@@ -1,1 +0,1 @@ | ||
{"name":"@hapiness/config","version":"1.1.0","description":"Configuration Library to use it inside Hapiness framework","main":"commonjs/index.js","types":"index.d.ts","private":false,"repository":{"type":"git","url":"git+ssh://git@github.com/hapinessjs/config.git"},"keywords":["config","yml","node-config","Hapiness","Framework","NodeJS","Node","ES2015","ES2016","ES2017","ES6","ES7","ES8","Typescript"],"contributors":[{"name":"Julien Fauville","url":"https://github.com/Juneil"},{"name":"Antoine Gomez","url":"https://github.com/antoinegomez"},{"name":"Sébastien Ritz","url":"https://github.com/reptilbud"},{"name":"Nicolas Jessel","url":"https://github.com/njl07"}],"license":"SEE LICENSE IN https://github.com/hapinessjs/config/blob/master/LICENSE.md","bugs":{"url":"https://github.com/hapinessjs/config/issues"},"homepage":"https://github.com/hapinessjs/config#readme","dependencies":{"@types/config":"^0.0.33","@types/node":"^8.0.53","clone":"^2.1.1","config":"^1.28.1","debug":"^3.1.0","js-yaml":"^3.10.0"},"engines":{"node":">=7.0.0"},"peerDependencies":{"@hapiness/core":"^1.2.2","rxjs":"^5.5.2"}} | ||
{"name":"@hapiness/config","version":"1.1.1","description":"Configuration Library to use it inside Hapiness framework","main":"commonjs/index.js","types":"index.d.ts","private":false,"repository":{"type":"git","url":"git+ssh://git@github.com/hapinessjs/config.git"},"keywords":["config","yml","node-config","Hapiness","Framework","NodeJS","Node","ES2015","ES2016","ES2017","ES6","ES7","ES8","Typescript"],"contributors":[{"name":"Julien Fauville","url":"https://github.com/Juneil"},{"name":"Antoine Gomez","url":"https://github.com/antoinegomez"},{"name":"Sébastien Ritz","url":"https://github.com/reptilbud"},{"name":"Nicolas Jessel","url":"https://github.com/njl07"}],"license":"SEE LICENSE IN https://github.com/hapinessjs/config/blob/master/LICENSE.md","bugs":{"url":"https://github.com/hapinessjs/config/issues"},"homepage":"https://github.com/hapinessjs/config#readme","dependencies":{"@types/config":"^0.0.33","@types/node":"^8.0.53","clone":"^2.1.1","config":"^1.28.1","debug":"^3.1.0","js-yaml":"^3.10.0"},"engines":{"node":">=7.0.0"},"peerDependencies":{"@hapiness/core":"^1.2.2","rxjs":"^5.5.2"}} |
@@ -63,3 +63,3 @@ <img src="http://bit.ly/2mxmKKI" width="500" alt="Hapiness" /> | ||
"@hapiness/core": "^1.2.2", | ||
"@hapiness/config": "^1.1.0", | ||
"@hapiness/config": "^1.1.1", | ||
"rxjs": "^5.5.2", | ||
@@ -204,2 +204,4 @@ //... | ||
## Change History | ||
* v1.1.1 (2017-12-28) | ||
* Fix load `config` | ||
* v1.1.0 (2017-11-20) | ||
@@ -206,0 +208,0 @@ * Latest packages' versions. |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
20391
167
244
0