@spinajs/configuration 1.2.30 → 1.2.31
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/lib/configuration.d.ts +15 -3
- package/lib/configuration.js +62 -40
- package/lib/configuration.js.map +1 -1
- package/lib/sources.d.ts +2 -3
- package/lib/sources.js +13 -17
- package/lib/sources.js.map +1 -1
- package/lib/types.d.ts +10 -0
- package/lib/types.js.map +1 -1
- package/lib/util.d.ts +1 -0
- package/lib/util.js +7 -1
- package/lib/util.js.map +1 -1
- package/package.json +3 -2
package/lib/configuration.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Container } from '@spinajs/di';
|
|
2
|
-
import { ConfigurationSource } from '
|
|
3
|
-
import { Configuration, ConfigurationOptions } from './types';
|
|
2
|
+
import { ConfigurationSource } from '@spinajs/configuration-common';
|
|
3
|
+
import { Configuration, ConfigurationOptions, IConfigurationSchema } from './types';
|
|
4
|
+
import Ajv from 'ajv';
|
|
5
|
+
import './sources';
|
|
4
6
|
export declare class FrameworkConfiguration extends Configuration {
|
|
5
7
|
/**
|
|
6
8
|
* Apps configuration base dir, where to look for app config
|
|
@@ -16,6 +18,8 @@ export declare class FrameworkConfiguration extends Configuration {
|
|
|
16
18
|
protected Config: Record<string, unknown>;
|
|
17
19
|
protected CustomConfigPaths: string[];
|
|
18
20
|
protected Sources: ConfigurationSource[];
|
|
21
|
+
protected Validator: Ajv;
|
|
22
|
+
protected ValidationSchemas: IConfigurationSchema[];
|
|
19
23
|
protected Container: Container;
|
|
20
24
|
/**
|
|
21
25
|
*
|
|
@@ -39,13 +43,21 @@ export declare class FrameworkConfiguration extends Configuration {
|
|
|
39
43
|
* @param value - value to set
|
|
40
44
|
*/
|
|
41
45
|
set(path: string[] | string, value: unknown): void;
|
|
46
|
+
/**
|
|
47
|
+
* Merge existing config value with new options instead overriding
|
|
48
|
+
*
|
|
49
|
+
* @param path - cfg path
|
|
50
|
+
* @param value - value to merge
|
|
51
|
+
*/
|
|
52
|
+
merge(path: string[] | string, value: unknown): void;
|
|
42
53
|
resolveAsync(): Promise<void>;
|
|
54
|
+
protected loadSources(): Promise<void>;
|
|
55
|
+
protected initValidator(): void;
|
|
43
56
|
protected dir(toJoin: string): string;
|
|
44
57
|
/**
|
|
45
58
|
* adds app dirs to system.dirs config
|
|
46
59
|
*/
|
|
47
60
|
protected applyAppDirs(): void;
|
|
48
|
-
protected validateConfig(): void;
|
|
49
61
|
/**
|
|
50
62
|
* runs configuration func on files
|
|
51
63
|
* eg. when you want to configure stuff at beginning eq. external libs
|
package/lib/configuration.js
CHANGED
|
@@ -15,13 +15,14 @@ exports.FrameworkConfiguration = void 0;
|
|
|
15
15
|
const di_1 = require("@spinajs/di");
|
|
16
16
|
const exceptions_1 = require("@spinajs/exceptions");
|
|
17
17
|
const path_1 = require("path");
|
|
18
|
-
const
|
|
18
|
+
const configuration_common_1 = require("@spinajs/configuration-common");
|
|
19
19
|
const types_1 = require("./types");
|
|
20
20
|
const util_1 = require("./util");
|
|
21
21
|
const _ = require("lodash");
|
|
22
22
|
const ajv_1 = require("ajv");
|
|
23
23
|
const exception_1 = require("./exception");
|
|
24
24
|
const internal_logger_1 = require("@spinajs/internal-logger");
|
|
25
|
+
require("./sources");
|
|
25
26
|
let FrameworkConfiguration = class FrameworkConfiguration extends types_1.Configuration {
|
|
26
27
|
/**
|
|
27
28
|
*
|
|
@@ -67,8 +68,17 @@ let FrameworkConfiguration = class FrameworkConfiguration extends types_1.Config
|
|
|
67
68
|
set(path, value) {
|
|
68
69
|
this.Config = _.set(this.Config, path, value);
|
|
69
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Merge existing config value with new options instead overriding
|
|
73
|
+
*
|
|
74
|
+
* @param path - cfg path
|
|
75
|
+
* @param value - value to merge
|
|
76
|
+
*/
|
|
77
|
+
merge(path, value) {
|
|
78
|
+
_.mergeWith(this.get(path), value, util_1.mergeArrays);
|
|
79
|
+
}
|
|
70
80
|
async resolveAsync() {
|
|
71
|
-
if (!this.Container.hasRegistered(
|
|
81
|
+
if (!this.Container.hasRegistered(configuration_common_1.ConfigurationSource)) {
|
|
72
82
|
throw new exceptions_1.InvalidOperation('No configuration sources configured. Please ensure that config module have any source to read from !');
|
|
73
83
|
}
|
|
74
84
|
if (this.CustomConfigPaths) {
|
|
@@ -80,36 +90,41 @@ let FrameworkConfiguration = class FrameworkConfiguration extends types_1.Config
|
|
|
80
90
|
internal_logger_1.InternalLogger.trace(`Run app is ${this.RunApp}`, 'Configuration');
|
|
81
91
|
}
|
|
82
92
|
internal_logger_1.InternalLogger.trace(`App base dir is ${this.AppBaseDir}`, 'Configuration');
|
|
83
|
-
this.
|
|
93
|
+
this.initValidator();
|
|
94
|
+
this.applyAppDirs();
|
|
95
|
+
/**
|
|
96
|
+
* Load and validate data from cfg sources
|
|
97
|
+
* in proper order
|
|
98
|
+
*/
|
|
99
|
+
await this.loadSources();
|
|
100
|
+
this.configure();
|
|
101
|
+
}
|
|
102
|
+
async loadSources() {
|
|
103
|
+
this.Sources = this.Container.resolve(Array.ofType(configuration_common_1.ConfigurationSource), [
|
|
84
104
|
this.RunApp,
|
|
85
105
|
this.CustomConfigPaths,
|
|
86
106
|
this.AppBaseDir,
|
|
87
107
|
]);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return;
|
|
108
|
+
// sort asc sources
|
|
109
|
+
this.Sources.sort((a, b) => {
|
|
110
|
+
return a.Order < b.Order ? -1 : a.Order > b.Order ? 1 : 0;
|
|
92
111
|
});
|
|
93
|
-
this.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
for (const prop of Object.keys(this.get(['system', 'dirs'], []))) {
|
|
108
|
-
this.get(['system', 'dirs', prop]).push(this.dir(`/${this.RunApp}/${prop}`));
|
|
112
|
+
for (const source of this.Sources) {
|
|
113
|
+
const rCfg = await source.Load(this);
|
|
114
|
+
Object.keys(rCfg).forEach((k) => {
|
|
115
|
+
const schema = this.ValidationSchemas.find((x) => x.$configurationModule === k);
|
|
116
|
+
if (schema) {
|
|
117
|
+
const result = this.Validator.validate(schema, rCfg[`${k}`]);
|
|
118
|
+
if (!result) {
|
|
119
|
+
throw new exception_1.InvalidConfiguration('invalid configuration ! Check config files and restart app.', this.Validator.errors);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
_.mergeWith(this.Config, rCfg, util_1.mergeArrays);
|
|
109
124
|
}
|
|
110
125
|
}
|
|
111
|
-
|
|
112
|
-
|
|
126
|
+
initValidator() {
|
|
127
|
+
this.Validator = new ajv_1.default({
|
|
113
128
|
logger: {
|
|
114
129
|
log: (msg) => internal_logger_1.InternalLogger.info(msg, 'Configuration'),
|
|
115
130
|
warn: (msg) => internal_logger_1.InternalLogger.warn(msg, 'Configuration'),
|
|
@@ -125,27 +140,34 @@ let FrameworkConfiguration = class FrameworkConfiguration extends types_1.Config
|
|
|
125
140
|
coerceTypes: true,
|
|
126
141
|
});
|
|
127
142
|
// add $merge & $patch for json schema
|
|
128
|
-
require('ajv-merge-patch')(
|
|
143
|
+
require('ajv-merge-patch')(this.Validator);
|
|
129
144
|
// add common formats validation eg: date time
|
|
130
|
-
require('ajv-formats')(
|
|
145
|
+
require('ajv-formats')(this.Validator);
|
|
131
146
|
// add keywords
|
|
132
|
-
require('ajv-keywords')(
|
|
147
|
+
require('ajv-keywords')(this.Validator);
|
|
133
148
|
// in strict mode ajv will throw when
|
|
134
149
|
// unknown keyword in schema is met
|
|
135
150
|
// we use $configurationModule keyword to identify
|
|
136
151
|
// to match config module with config schema
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
152
|
+
this.Validator.addKeyword('$configurationModule');
|
|
153
|
+
/**
|
|
154
|
+
* load all registered configuration json schemas
|
|
155
|
+
* for config value validation
|
|
156
|
+
*/
|
|
157
|
+
this.ValidationSchemas = this.Container.get(Array.ofType('__configurationSchema__'), true);
|
|
158
|
+
}
|
|
159
|
+
dir(toJoin) {
|
|
160
|
+
return (0, path_1.normalize)((0, path_1.join)((0, path_1.resolve)(this.AppBaseDir), toJoin));
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* adds app dirs to system.dirs config
|
|
164
|
+
*/
|
|
165
|
+
applyAppDirs() {
|
|
166
|
+
if (!this.RunApp) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
for (const prop of Object.keys(this.get(['system', 'dirs'], []))) {
|
|
170
|
+
this.get(['system', 'dirs', prop]).push(this.dir(`/${this.RunApp}/${prop}`));
|
|
149
171
|
}
|
|
150
172
|
}
|
|
151
173
|
/**
|
package/lib/configuration.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAuD;AACvD,sDAAsD;AACtD,oCAAgE;AAChE,oDAAuD;AACvD,+BAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAuD;AACvD,sDAAsD;AACtD,oCAAgE;AAChE,oDAAuD;AACvD,+BAAgD;AAChD,wEAAoE;AACpE,mCAAmG;AACnG,iCAAgD;AAChD,4BAA4B;AAC5B,6BAAsB;AACtB,2CAAmD;AACnD,8DAA0D;AAC1D,qBAAmB;AAGnB,IAAa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,qBAAa;IA2BvD;;;;;OAKG;IACH,YAAY,OAA8B;;QACxC,KAAK,E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,CAAC,GAAG,IAAI,EAAE,CAAkB,CAAC;YAE1D,IAAI,SAAS,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,SAAS,KAAK,UAAU,EAAE;gBACpE,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACjC;SACF;IACH,CAAC;CACF,CAAA;AAxLC;IADC,IAAA,eAAU,GAAE;8BACQ,cAAS;yDAAC;AAzBpB,sBAAsB;IADlC,IAAA,eAAU,EAAC,qBAAa,CAAC;;GACb,sBAAsB,CAiNlC;AAjNY,wDAAsB"}
|
package/lib/sources.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
abstract Load(): Promise<unknown>;
|
|
3
|
-
}
|
|
1
|
+
import { ConfigurationSource } from '@spinajs/configuration-common';
|
|
4
2
|
export declare abstract class BaseFileSource extends ConfigurationSource {
|
|
5
3
|
protected RunApp?: string;
|
|
6
4
|
protected CustomConfigPaths?: string[];
|
|
@@ -11,6 +9,7 @@ export declare abstract class BaseFileSource extends ConfigurationSource {
|
|
|
11
9
|
BaseDir: string;
|
|
12
10
|
protected CommonDirs: string[];
|
|
13
11
|
protected BasePath: string;
|
|
12
|
+
get Order(): number;
|
|
14
13
|
constructor(RunApp?: string, CustomConfigPaths?: string[], appBaseDir?: string);
|
|
15
14
|
protected load(extension: string, callback: (file: string) => any): {};
|
|
16
15
|
}
|
package/lib/sources.js
CHANGED
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.JsonFileSource = exports.JsFileSource = exports.BaseFileSource =
|
|
9
|
+
exports.JsonFileSource = exports.JsFileSource = exports.BaseFileSource = void 0;
|
|
10
10
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
11
11
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
12
12
|
/* eslint-disable @typescript-eslint/require-await */
|
|
@@ -21,15 +21,8 @@ const util_1 = require("./util");
|
|
|
21
21
|
const fs = require("fs");
|
|
22
22
|
const path = require("path");
|
|
23
23
|
const internal_logger_1 = require("@spinajs/internal-logger");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return target.concat(source);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
class ConfigurationSource {
|
|
30
|
-
}
|
|
31
|
-
exports.ConfigurationSource = ConfigurationSource;
|
|
32
|
-
class BaseFileSource extends ConfigurationSource {
|
|
24
|
+
const configuration_common_1 = require("@spinajs/configuration-common");
|
|
25
|
+
class BaseFileSource extends configuration_common_1.ConfigurationSource {
|
|
33
26
|
constructor(RunApp, CustomConfigPaths, appBaseDir) {
|
|
34
27
|
super();
|
|
35
28
|
this.RunApp = RunApp;
|
|
@@ -55,6 +48,9 @@ class BaseFileSource extends ConfigurationSource {
|
|
|
55
48
|
this.BasePath = '';
|
|
56
49
|
this.BasePath = (0, util_1.findBasePath)(process.cwd());
|
|
57
50
|
}
|
|
51
|
+
get Order() {
|
|
52
|
+
return 1;
|
|
53
|
+
}
|
|
58
54
|
load(extension, callback) {
|
|
59
55
|
const config = {};
|
|
60
56
|
if (this.RunApp) {
|
|
@@ -76,7 +72,7 @@ class BaseFileSource extends ConfigurationSource {
|
|
|
76
72
|
.map(callback)
|
|
77
73
|
.filter((v) => v !== null)
|
|
78
74
|
// load & merge configs
|
|
79
|
-
.map((c) => { var _a; return _.mergeWith(config, (_a = c.default) !== null && _a !== void 0 ? _a : c, mergeArrays); });
|
|
75
|
+
.map((c) => { var _a; return _.mergeWith(config, (_a = c.default) !== null && _a !== void 0 ? _a : c, util_1.mergeArrays); });
|
|
80
76
|
return config;
|
|
81
77
|
}
|
|
82
78
|
}
|
|
@@ -89,10 +85,10 @@ let JsFileSource = class JsFileSource extends BaseFileSource {
|
|
|
89
85
|
const dEnv = (_a = di_1.DI.get('process.env')) !== null && _a !== void 0 ? _a : process.env;
|
|
90
86
|
if (dEnv.NODE_ENV) {
|
|
91
87
|
if (dEnv.NODE_ENV === 'development') {
|
|
92
|
-
return _.mergeWith(common, this.load('*.dev.js', _load), mergeArrays);
|
|
88
|
+
return _.mergeWith(common, this.load('*.dev.js', _load), util_1.mergeArrays);
|
|
93
89
|
}
|
|
94
90
|
else {
|
|
95
|
-
return _.mergeWith(common, this.load('*.prod.js', _load), mergeArrays);
|
|
91
|
+
return _.mergeWith(common, this.load('*.prod.js', _load), util_1.mergeArrays);
|
|
96
92
|
}
|
|
97
93
|
}
|
|
98
94
|
return common;
|
|
@@ -106,7 +102,7 @@ let JsFileSource = class JsFileSource extends BaseFileSource {
|
|
|
106
102
|
}
|
|
107
103
|
};
|
|
108
104
|
JsFileSource = __decorate([
|
|
109
|
-
(0, di_1.Injectable)(ConfigurationSource)
|
|
105
|
+
(0, di_1.Injectable)(configuration_common_1.ConfigurationSource)
|
|
110
106
|
], JsFileSource);
|
|
111
107
|
exports.JsFileSource = JsFileSource;
|
|
112
108
|
let JsonFileSource = class JsonFileSource extends BaseFileSource {
|
|
@@ -117,10 +113,10 @@ let JsonFileSource = class JsonFileSource extends BaseFileSource {
|
|
|
117
113
|
const dEnv = (_a = di_1.DI.get('process.env')) !== null && _a !== void 0 ? _a : process.env;
|
|
118
114
|
if (dEnv.NODE_ENV) {
|
|
119
115
|
if (dEnv.NODE_ENV === 'development') {
|
|
120
|
-
return _.mergeWith(common, this.load('*.dev.json', _load), mergeArrays);
|
|
116
|
+
return _.mergeWith(common, this.load('*.dev.json', _load), util_1.mergeArrays);
|
|
121
117
|
}
|
|
122
118
|
else {
|
|
123
|
-
return _.mergeWith(common, this.load('*.prod.json', _load), mergeArrays);
|
|
119
|
+
return _.mergeWith(common, this.load('*.prod.json', _load), util_1.mergeArrays);
|
|
124
120
|
}
|
|
125
121
|
}
|
|
126
122
|
return common;
|
|
@@ -136,7 +132,7 @@ let JsonFileSource = class JsonFileSource extends BaseFileSource {
|
|
|
136
132
|
}
|
|
137
133
|
};
|
|
138
134
|
JsonFileSource = __decorate([
|
|
139
|
-
(0, di_1.Injectable)(ConfigurationSource)
|
|
135
|
+
(0, di_1.Injectable)(configuration_common_1.ConfigurationSource)
|
|
140
136
|
], JsonFileSource);
|
|
141
137
|
exports.JsonFileSource = JsonFileSource;
|
|
142
138
|
//# sourceMappingURL=sources.js.map
|
package/lib/sources.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../src/sources.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0DAA0D;AAC1D,sDAAsD;AACtD,qDAAqD;AACrD,+DAA+D;AAC/D,wDAAwD;AACxD,uDAAuD;AACvD,oCAA6C;AAC7C,+BAA4B;AAC5B,4BAA4B;AAC5B,+BAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../src/sources.ts"],"names":[],"mappings":";;;;;;;;;AAAA,0DAA0D;AAC1D,sDAAsD;AACtD,qDAAqD;AACrD,+DAA+D;AAC/D,wDAAwD;AACxD,uDAAuD;AACvD,oCAA6C;AAC7C,+BAA4B;AAC5B,4BAA4B;AAC5B,+BAAgD;AAChD,iCAA4D;AAC5D,yBAAyB;AACzB,6BAA6B;AAC7B,8DAA0D;AAC1D,wEAAoE;AAEpE,MAAsB,cAAe,SAAQ,0CAAmB;IA6B9D,YAAsB,MAAe,EAAY,iBAA4B,EAAY,UAAmB;QAC1G,KAAK,EAAE,CAAC;QADY,WAAM,GAAN,MAAM,CAAS;QAAY,sBAAiB,GAAjB,iBAAiB,CAAW;QAAY,eAAU,GAAV,UAAU,CAAS;QA5B5G;;WAEG;QACI,YAAO,GAAG,IAAI,CAAC;QAEZ,eAAU,GAAG;YACrB,mBAAmB;YACnB,IAAA,gBAAS,EAAC,IAAA,WAAI,EAAC,IAAA,cAAO,EAAC,SAAS,CAAC,EAAE,YAAY,CAAC,CAAC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,CAAC,uBAAuB,IAAI,EAAE,EAAE,eAAe,CAAC,CAAC;gBAErE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;aACnD;YAAC,OAAO,GAAG,EAAE;gBACZ,OAAO,IAAI,CAAC;aACb;QACH,CAAC;IACH,CAAC;CACF,CAAA;AA1BY,cAAc;IAD1B,IAAA,eAAU,EAAC,0CAAmB,CAAC;GACnB,cAAc,CA0B1B;AA1BY,wCAAc"}
|
package/lib/types.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export interface IFrameworkVersion {
|
|
|
6
6
|
minor: number;
|
|
7
7
|
major: number;
|
|
8
8
|
}
|
|
9
|
+
export interface IConfigLike {
|
|
10
|
+
[val: string]: unknown;
|
|
11
|
+
}
|
|
9
12
|
export interface IConfigurationSchema {
|
|
10
13
|
$configurationModule: string;
|
|
11
14
|
}
|
|
@@ -53,4 +56,11 @@ export declare abstract class Configuration extends AsyncModule {
|
|
|
53
56
|
* @param value - value to set
|
|
54
57
|
*/
|
|
55
58
|
abstract set(path: string[] | string, value: unknown): void;
|
|
59
|
+
/**
|
|
60
|
+
* Merge existing config value with new options instead overriding
|
|
61
|
+
*
|
|
62
|
+
* @param path - cfg path
|
|
63
|
+
* @param value - value to merge
|
|
64
|
+
*/
|
|
65
|
+
abstract merge(path: string[] | string, value: unknown): void;
|
|
56
66
|
}
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,oCAA0C;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,oCAA0C;AA4C1C,MAAsB,aAAc,SAAQ,gBAAW;CAkCtD;AAlCD,sCAkCC"}
|
package/lib/util.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function parseArgv(param: string): string;
|
|
2
2
|
export declare function findBasePath(path: string): string;
|
|
3
3
|
export declare function merge(to: unknown, from: unknown): unknown;
|
|
4
|
+
export declare function mergeArrays(target: unknown[], source: unknown[]): unknown;
|
|
4
5
|
export declare function uncache(file: string): string;
|
|
5
6
|
export declare function filterDirs(dir: string): boolean;
|
package/lib/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterDirs = exports.uncache = exports.merge = exports.findBasePath = exports.parseArgv = void 0;
|
|
3
|
+
exports.filterDirs = exports.uncache = exports.mergeArrays = exports.merge = exports.findBasePath = exports.parseArgv = void 0;
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
5
5
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
6
6
|
const fs = require("fs");
|
|
@@ -34,6 +34,12 @@ function merge(to, from) {
|
|
|
34
34
|
return to;
|
|
35
35
|
}
|
|
36
36
|
exports.merge = merge;
|
|
37
|
+
function mergeArrays(target, source) {
|
|
38
|
+
if (_.isArray(target)) {
|
|
39
|
+
return target.concat(source);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.mergeArrays = mergeArrays;
|
|
37
43
|
// clean require cache config
|
|
38
44
|
// http://stackoverflow.com/questions/9210542/node-js-require-cache-possible-to-invalidate
|
|
39
45
|
function uncache(file) {
|
package/lib/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,sDAAsD;AACtD,yBAAyB;AACzB,4BAA6B;AAC7B,+BAAqC;AAQrC,SAAgB,SAAS,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAE1C,IAAI,KAAK,KAAK,CAAC,CA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H,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,CAAC;AACZ,CAAC;AAXD,sBAWC;AAED,SAAgB,WAAW,CAAC,MAAiB,EAAE,MAAiB;IAC9D,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACrB,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;KAC9B;AACH,CAAC;AAJD,kCAIC;AAED,6BAA6B;AAC7B,0FAA0F;AAC1F,SAAgB,OAAO,CAAC,IAAY;IAClC,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IAChC,OAAO,IAAI,CAAC;AACd,CAAC;AAHD,0BAGC;AAED,SAAgB,UAAU,CAAC,GAAW;IACpC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AALD,gCAKC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinajs/configuration",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
4
4
|
"description": "framework configuration module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/spinajs/configuration#readme",
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@spinajs/configuration-common": "^1.2.31",
|
|
43
44
|
"@spinajs/di": "^1.2.30",
|
|
44
45
|
"@spinajs/exceptions": "^1.2.7",
|
|
45
46
|
"@spinajs/internal-logger": "^1.2.30",
|
|
@@ -50,5 +51,5 @@
|
|
|
50
51
|
"glob": "^7.1.4",
|
|
51
52
|
"lodash": "^4.17.14"
|
|
52
53
|
},
|
|
53
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "dc63606c6ce0ec96d14086a1eaa3ce677151a085"
|
|
54
55
|
}
|