@biorate/config 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/src/config.js
CHANGED
|
@@ -11,7 +11,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Config = void 0;
|
|
13
13
|
const inversion_1 = require("@biorate/inversion");
|
|
14
|
-
const
|
|
14
|
+
const lodash_es_1 = require("lodash-es");
|
|
15
15
|
const traverse_1 = __importDefault(require("traverse"));
|
|
16
16
|
const template_1 = require("./template");
|
|
17
17
|
const errors_1 = require("./errors");
|
|
@@ -41,7 +41,7 @@ let Config = class Config {
|
|
|
41
41
|
throw new errors_1.UndefinedConfigPathError(path);
|
|
42
42
|
return def;
|
|
43
43
|
}
|
|
44
|
-
const result = (0,
|
|
44
|
+
const result = (0, lodash_es_1.get)(this.data, path);
|
|
45
45
|
switch (typeof result) {
|
|
46
46
|
case 'string':
|
|
47
47
|
return this.template(result, def);
|
|
@@ -52,13 +52,13 @@ let Config = class Config {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
has(path) {
|
|
55
|
-
return (0,
|
|
55
|
+
return (0, lodash_es_1.has)(this.data, path);
|
|
56
56
|
}
|
|
57
57
|
set(path, value) {
|
|
58
|
-
(0,
|
|
58
|
+
(0, lodash_es_1.set)(this.data, path, value);
|
|
59
59
|
}
|
|
60
60
|
merge(data) {
|
|
61
|
-
(0,
|
|
61
|
+
(0, lodash_es_1.merge)(this.data, data);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
exports.Config = Config;
|
package/dist/esm/src/config.js
CHANGED
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { injectable } from '@biorate/inversion';
|
|
8
|
-
import { merge, get, has, set } from 'lodash';
|
|
8
|
+
import { merge, get, has, set } from 'lodash-es';
|
|
9
9
|
import traverse from 'traverse';
|
|
10
10
|
import { Template } from './template.js';
|
|
11
11
|
import { UndefinedConfigPathError } from './errors.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biorate/config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Application configurator",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"keywords": [],
|
|
46
46
|
"author": "llevkin",
|
|
47
47
|
"license": "MIT",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "ca18c1129712e77a6ec8fb2033a54f94e5620ce0",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@biorate/errors": "3.0.0",
|
|
51
|
-
"@biorate/inversion": "3.0.
|
|
52
|
-
"lodash": "^4.17.21",
|
|
51
|
+
"@biorate/inversion": "3.0.2",
|
|
52
|
+
"lodash-es": "^4.17.21",
|
|
53
53
|
"traverse": "^0.6.6"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|