@kibibit/configit 1.0.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/LICENSE +21 -0
- package/README.md +2 -0
- package/lib/config.errors.d.ts +5 -0
- package/lib/config.errors.d.ts.map +1 -0
- package/lib/config.errors.js +26 -0
- package/lib/config.errors.js.map +1 -0
- package/lib/config.model.d.ts +8 -0
- package/lib/config.model.d.ts.map +1 -0
- package/lib/config.model.js +73 -0
- package/lib/config.model.js.map +1 -0
- package/lib/config.service.d.ts +24 -0
- package/lib/config.service.d.ts.map +1 -0
- package/lib/config.service.js +102 -0
- package/lib/config.service.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/json-schema.validator.d.ts +6 -0
- package/lib/json-schema.validator.d.ts.map +1 -0
- package/lib/json-schema.validator.js +23 -0
- package/lib/json-schema.validator.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +50 -0
- package/src/config.errors.ts +24 -0
- package/src/config.model.ts +66 -0
- package/src/config.service.ts +163 -0
- package/src/index.ts +4 -0
- package/src/json-schema.validator.ts +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 kibibit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.errors.d.ts","sourceRoot":"","sources":["../src/config.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIlD,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,gBAAgB,EAAE,eAAe,EAAE,EAAE,cAAc,EAAE,GAAG;CAkBrE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigValidationError = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const colors_1 = require("colors");
|
|
6
|
+
class ConfigValidationError extends Error {
|
|
7
|
+
constructor(validationErrors, configInstance) {
|
|
8
|
+
const message = validationErrors
|
|
9
|
+
.map((validationError) => {
|
|
10
|
+
const deco = (0, colors_1.cyan)((0, lodash_1.times)(55, () => '=').join(''));
|
|
11
|
+
return [
|
|
12
|
+
'',
|
|
13
|
+
deco,
|
|
14
|
+
` ${(0, colors_1.cyan)('property:')} ${validationError.property}`,
|
|
15
|
+
` ${(0, colors_1.cyan)('value:')} ${(0, colors_1.red)(validationError.value)}`,
|
|
16
|
+
deco,
|
|
17
|
+
(0, lodash_1.values)(validationError.constraints)
|
|
18
|
+
.map((value) => ` - ${(0, colors_1.red)(value)}`).join('\n')
|
|
19
|
+
].join('\n');
|
|
20
|
+
}).join('') + '\n\n';
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = 'ConfigValidationError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.ConfigValidationError = ConfigValidationError;
|
|
26
|
+
//# sourceMappingURL=config.errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.errors.js","sourceRoot":"","sources":["../src/config.errors.ts"],"names":[],"mappings":";;;AACA,mCAAuC;AACvC,mCAAmC;AAEnC,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,gBAAmC,EAAE,cAAmB;QAClE,MAAM,OAAO,GAAG,gBAAgB;aAC7B,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE;YACvB,MAAM,IAAI,GAAG,IAAA,aAAI,EAAC,IAAA,cAAK,EAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACjD,OAAO;gBACL,EAAE;gBACF,IAAI;gBACJ,IAAK,IAAA,aAAI,EAAC,WAAW,CAAE,IAAK,eAAe,CAAC,QAAS,EAAE;gBACvD,IAAK,IAAA,aAAI,EAAC,QAAQ,CAAE,IAAK,IAAA,YAAG,EAAC,eAAe,CAAC,KAAK,CAAE,EAAE;gBACtD,IAAI;gBACJ,IAAA,eAAM,EAAC,eAAe,CAAC,WAAW,CAAC;qBAChC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAU,IAAA,YAAG,EAAC,KAAK,CAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;aACtD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAnBD,sDAmBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const NODE_ENVIRONMENT_OPTIONS: string[];
|
|
2
|
+
export declare class Config {
|
|
3
|
+
NODE_ENV: string;
|
|
4
|
+
saveToFile: boolean;
|
|
5
|
+
constructor(partial?: Partial<Config>);
|
|
6
|
+
toJsonSchema(): import("openapi3-ts").SchemaObject;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=config.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.model.d.ts","sourceRoot":"","sources":["../src/config.model.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,wBAAwB,UAMpC,CAAC;AAEF,qBACa,MAAM;IAOjB,QAAQ,SAAiB;IAOzB,UAAU,UAAS;gBAEP,OAAO,GAAE,OAAO,CAAC,MAAM,CAAM;IAIlC,YAAY;CAwBpB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Config = exports.NODE_ENVIRONMENT_OPTIONS = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const class_validator_jsonschema_1 = require("class-validator-jsonschema");
|
|
16
|
+
const lodash_1 = require("lodash");
|
|
17
|
+
const json_schema_validator_1 = require("./json-schema.validator");
|
|
18
|
+
exports.NODE_ENVIRONMENT_OPTIONS = [
|
|
19
|
+
'google',
|
|
20
|
+
'development',
|
|
21
|
+
'production',
|
|
22
|
+
'test',
|
|
23
|
+
'devcontainer'
|
|
24
|
+
];
|
|
25
|
+
let Config = class Config {
|
|
26
|
+
constructor(partial = {}) {
|
|
27
|
+
this.NODE_ENV = 'development';
|
|
28
|
+
this.saveToFile = false;
|
|
29
|
+
Object.assign(this, partial);
|
|
30
|
+
}
|
|
31
|
+
toJsonSchema() {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
const configJsonSchemaObj = (0, class_validator_jsonschema_1.validationMetadatasToSchemas)({
|
|
34
|
+
additionalConverters: {
|
|
35
|
+
JsonSchema: (meta) => ({
|
|
36
|
+
description: meta.constraints.join('')
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const classForSchema = (0, lodash_1.chain)(configJsonSchemaObj)
|
|
41
|
+
.keys()
|
|
42
|
+
.filter((className) => className !== 'Config')
|
|
43
|
+
.first()
|
|
44
|
+
.value();
|
|
45
|
+
const configJsonSchema = configJsonSchemaObj[classForSchema];
|
|
46
|
+
(_a = configJsonSchema.properties) === null || _a === void 0 ? true : delete _a.nodeEnv;
|
|
47
|
+
(_b = configJsonSchema.required) === null || _b === void 0 ? void 0 : _b.splice(configJsonSchema.required.indexOf('nodeEnv'), 1);
|
|
48
|
+
return configJsonSchema;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_transformer_1.Expose)(),
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, class_validator_1.IsIn)(exports.NODE_ENVIRONMENT_OPTIONS),
|
|
55
|
+
(0, class_validator_1.Validate)(json_schema_validator_1.JsonSchema, [
|
|
56
|
+
'Tells which env file to use and what environment we are running on'
|
|
57
|
+
]),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], Config.prototype, "NODE_ENV", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsBoolean)(),
|
|
62
|
+
(0, class_validator_1.Validate)(json_schema_validator_1.JsonSchema, [
|
|
63
|
+
'Create a file made out of the internal config. This is mostly for ',
|
|
64
|
+
'merging command line, environment, and file variables to a single instance'
|
|
65
|
+
]),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], Config.prototype, "saveToFile", void 0);
|
|
68
|
+
Config = __decorate([
|
|
69
|
+
(0, class_transformer_1.Exclude)(),
|
|
70
|
+
__metadata("design:paramtypes", [Object])
|
|
71
|
+
], Config);
|
|
72
|
+
exports.Config = Config;
|
|
73
|
+
//# sourceMappingURL=config.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.model.js","sourceRoot":"","sources":["../src/config.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAoD;AACpD,qDAKyB;AACzB,2EAA0E;AAC1E,mCAAqC;AAErC,mEAAqD;AAExC,QAAA,wBAAwB,GAAG;IACtC,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,MAAM;IACN,cAAc;CACf,CAAC;AAGF,IAAa,MAAM,GAAnB,MAAa,MAAM;IAgBjB,YAAY,UAA2B,EAAE;QATzC,aAAQ,GAAG,aAAa,CAAC;QAOzB,eAAU,GAAG,KAAK,CAAC;QAGjB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAEM,YAAY;;QACjB,MAAM,mBAAmB,GAAG,IAAA,yDAA4B,EAAC;YACvD,oBAAoB,EAAE;gBACpB,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBACnB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;iBACzC,CAAC;aACH;SACF,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,IAAA,cAAK,EAAC,mBAAmB,CAAC;aAC9C,IAAI,EAAE;aACN,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,QAAQ,CAAC;aAC7C,KAAK,EAAE;aACP,KAAK,EAAE,CAAC;QACX,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;QAEtD,MAAA,gBAAgB,CAAC,UAAU,+CAAE,OAAO,CAAC;QAC5C,MAAA,gBAAgB,CAAC,QAAQ,0CAAE,MAAM,CAC/B,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,EAC5C,CAAC,CACF,CAAC;QAEF,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF,CAAA;AArCC;IANC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,sBAAI,EAAC,gCAAwB,CAAC;IAC9B,IAAA,0BAAQ,EAAC,kCAAU,EAAE;QACpB,oEAAoE;KACrE,CAAC;;wCACuB;AAOzB;IALC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,EAAC,kCAAU,EAAE;QACpB,oEAAoE;QACpE,4EAA4E;KAC7E,CAAC;;0CACiB;AAdR,MAAM;IADlB,IAAA,2BAAO,GAAE;;GACG,MAAM,CA4ClB;AA5CY,wBAAM"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Config } from './config.model';
|
|
2
|
+
export interface IConfigServiceOptions {
|
|
3
|
+
convertToCamelCase?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare type TClass<T> = new (partial: Partial<T>) => T;
|
|
6
|
+
export declare class ConfigService<T extends Config> {
|
|
7
|
+
private readonly mode;
|
|
8
|
+
readonly options: IConfigServiceOptions;
|
|
9
|
+
readonly config?: T;
|
|
10
|
+
readonly genericClass?: TClass<T>;
|
|
11
|
+
readonly fileName?: string;
|
|
12
|
+
readonly jsonSchemaFullname?: string;
|
|
13
|
+
readonly defaultConfigFilePath?: string;
|
|
14
|
+
readonly configFileName: string;
|
|
15
|
+
readonly configFilePath?: string;
|
|
16
|
+
readonly configFileRoot?: string;
|
|
17
|
+
readonly appRoot: string;
|
|
18
|
+
constructor(givenClass: TClass<T>, passedConfig?: Partial<T>, options?: IConfigServiceOptions);
|
|
19
|
+
toPlainObject(): Record<string, any>;
|
|
20
|
+
private findRoot;
|
|
21
|
+
private validateInput;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=config.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.service.d.ts","sourceRoot":"","sources":["../src/config.service.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAMD,aAAK,MAAM,CAAC,CAAC,IAAI,KAAK,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAQhD,qBAAa,aAAa,CAAC,CAAC,SAAS,MAAM;IACzC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAuB;IAC5C,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAM;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,GAAE,qBAA0B;IA6DjG,aAAa;IAIb,OAAO,CAAC,QAAQ;IAoBhB,OAAO,CAAC,aAAa;CAatB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ConfigService = void 0;
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const class_transformer_1 = require("class-transformer");
|
|
9
|
+
const class_validator_1 = require("class-validator");
|
|
10
|
+
const find_root_1 = __importDefault(require("find-root"));
|
|
11
|
+
const fs_extra_1 = require("fs-extra");
|
|
12
|
+
const lodash_1 = require("lodash");
|
|
13
|
+
const nconf_1 = __importDefault(require("nconf"));
|
|
14
|
+
const config_errors_1 = require("./config.errors");
|
|
15
|
+
const environment = (0, lodash_1.get)(process, 'env.NODE_ENV', 'development');
|
|
16
|
+
let configService;
|
|
17
|
+
class ConfigService {
|
|
18
|
+
constructor(givenClass, passedConfig, options = {}) {
|
|
19
|
+
this.mode = environment;
|
|
20
|
+
this.configFileName = '';
|
|
21
|
+
this.options = options;
|
|
22
|
+
this.appRoot = this.findRoot();
|
|
23
|
+
if (!passedConfig && configService) {
|
|
24
|
+
return configService;
|
|
25
|
+
}
|
|
26
|
+
this.genericClass = givenClass;
|
|
27
|
+
this.fileName = (0, lodash_1.chain)(this.genericClass.name)
|
|
28
|
+
.replace(/Config$/i, '')
|
|
29
|
+
.kebabCase()
|
|
30
|
+
.value();
|
|
31
|
+
this.jsonSchemaFullname = `.${this.fileName}.env.schema.json`;
|
|
32
|
+
this.configFileName = `${this.fileName}.${environment}.env.json`;
|
|
33
|
+
this.configFileRoot = (0, find_root_1.default)(__dirname, (dir) => {
|
|
34
|
+
const fileNames = (0, fs_extra_1.readdirSync)(dir);
|
|
35
|
+
const isConfigFileExists = fileNames.includes(this.configFileName);
|
|
36
|
+
return isConfigFileExists;
|
|
37
|
+
});
|
|
38
|
+
this.defaultConfigFilePath = (0, path_1.join)(this.configFileRoot, `defaults.env.json`);
|
|
39
|
+
this.configFilePath = (0, path_1.join)(this.configFileRoot, `${this.fileName}.${environment}.env.json`);
|
|
40
|
+
nconf_1.default
|
|
41
|
+
.argv({
|
|
42
|
+
parseValues: true
|
|
43
|
+
})
|
|
44
|
+
.env({
|
|
45
|
+
parseValues: true,
|
|
46
|
+
transform: this.options.convertToCamelCase ? transformToCamelCase : undefined
|
|
47
|
+
})
|
|
48
|
+
.file('defaults', { file: this.defaultConfigFilePath })
|
|
49
|
+
.file('environment', { file: this.configFilePath });
|
|
50
|
+
const config = passedConfig || nconf_1.default.get();
|
|
51
|
+
const envConfig = this.validateInput(config);
|
|
52
|
+
this.config = new this.genericClass(envConfig);
|
|
53
|
+
if (config.saveToFile) {
|
|
54
|
+
const plainConfig = (0, class_transformer_1.classToPlain)(this.config);
|
|
55
|
+
plainConfig['$schema'] = `./${this.jsonSchemaFullname}`;
|
|
56
|
+
const orderedKeys = Object.keys(plainConfig).sort().reduce((obj, key) => {
|
|
57
|
+
if (key === '$schema' || !key.startsWith('$')) {
|
|
58
|
+
obj[key] = plainConfig[key];
|
|
59
|
+
}
|
|
60
|
+
return obj;
|
|
61
|
+
}, {});
|
|
62
|
+
(0, fs_extra_1.writeJson)(this.configFilePath, orderedKeys, { spaces: 2 });
|
|
63
|
+
}
|
|
64
|
+
const schema = this.config.toJsonSchema();
|
|
65
|
+
(0, fs_extra_1.writeJSONSync)((0, path_1.join)(this.configFileRoot, '/', this.jsonSchemaFullname), schema);
|
|
66
|
+
configService = this;
|
|
67
|
+
}
|
|
68
|
+
toPlainObject() {
|
|
69
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
70
|
+
}
|
|
71
|
+
findRoot() {
|
|
72
|
+
return (0, find_root_1.default)(__dirname, (dir) => {
|
|
73
|
+
const packagePath = (0, path_1.join)(dir, 'package.json');
|
|
74
|
+
const isPackageJsonExists = (0, fs_extra_1.pathExistsSync)(packagePath);
|
|
75
|
+
if (isPackageJsonExists) {
|
|
76
|
+
const packageContent = (0, fs_extra_1.readJSONSync)(packagePath, { encoding: 'utf8' });
|
|
77
|
+
if (![''].includes(packageContent.name)) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
validateInput(envConfig) {
|
|
85
|
+
if (!this.genericClass)
|
|
86
|
+
throw new Error('something went wrong');
|
|
87
|
+
const configInstance = new this.genericClass(envConfig);
|
|
88
|
+
const validationErrors = (0, class_validator_1.validateSync)(configInstance);
|
|
89
|
+
if (validationErrors.length > 0) {
|
|
90
|
+
console.log(validationErrors);
|
|
91
|
+
throw new config_errors_1.ConfigValidationError(validationErrors, configInstance);
|
|
92
|
+
}
|
|
93
|
+
return (0, class_transformer_1.classToPlain)(configInstance);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.ConfigService = ConfigService;
|
|
97
|
+
function transformToCamelCase(obj) {
|
|
98
|
+
const camelCasedKey = (0, lodash_1.camelCase)(obj.key);
|
|
99
|
+
obj.key = camelCasedKey;
|
|
100
|
+
return camelCasedKey && obj;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=config.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.service.js","sourceRoot":"","sources":["../src/config.service.ts"],"names":[],"mappings":"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"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./config.service"), exports);
|
|
14
|
+
__exportStar(require("./config.errors"), exports);
|
|
15
|
+
__exportStar(require("./config.model"), exports);
|
|
16
|
+
__exportStar(require("./json-schema.validator"), exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B;AAC/B,0DAAwC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.validator.d.ts","sourceRoot":"","sources":["../src/json-schema.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AAEzB,qBACa,UAAW,YAAW,4BAA4B;IAC7D,QAAQ;IAIR,cAAc;CAGf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.JsonSchema = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
let JsonSchema = class JsonSchema {
|
|
12
|
+
validate() {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
defaultMessage() {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
JsonSchema = __decorate([
|
|
20
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'JsonSchema', async: false })
|
|
21
|
+
], JsonSchema);
|
|
22
|
+
exports.JsonSchema = JsonSchema;
|
|
23
|
+
//# sourceMappingURL=json-schema.validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.validator.js","sourceRoot":"","sources":["../src/json-schema.validator.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qDAGyB;AAGzB,IAAa,UAAU,GAAvB,MAAa,UAAU;IACrB,QAAQ;QACN,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc;QACZ,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAA;AARY,UAAU;IADtB,IAAA,qCAAmB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;GAC7C,UAAU,CAQtB;AARY,gCAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.es2017.full.d.ts","../node_modules/class-validator/types/validation/validationerror.d.ts","../node_modules/class-validator/types/validation/validatoroptions.d.ts","../node_modules/class-validator/types/validation-schema/validationschema.d.ts","../node_modules/class-validator/types/container.d.ts","../node_modules/class-validator/types/validation/validationarguments.d.ts","../node_modules/class-validator/types/decorator/validationoptions.d.ts","../node_modules/class-validator/types/decorator/common/allow.d.ts","../node_modules/class-validator/types/decorator/common/isdefined.d.ts","../node_modules/class-validator/types/decorator/common/isoptional.d.ts","../node_modules/class-validator/types/decorator/common/validate.d.ts","../node_modules/class-validator/types/validation/validatorconstraintinterface.d.ts","../node_modules/class-validator/types/decorator/common/validateby.d.ts","../node_modules/class-validator/types/decorator/common/validateif.d.ts","../node_modules/class-validator/types/decorator/common/validatenested.d.ts","../node_modules/class-validator/types/decorator/common/validatepromise.d.ts","../node_modules/class-validator/types/decorator/common/islatlong.d.ts","../node_modules/class-validator/types/decorator/common/islatitude.d.ts","../node_modules/class-validator/types/decorator/common/islongitude.d.ts","../node_modules/class-validator/types/decorator/common/equals.d.ts","../node_modules/class-validator/types/decorator/common/notequals.d.ts","../node_modules/class-validator/types/decorator/common/isempty.d.ts","../node_modules/class-validator/types/decorator/common/isnotempty.d.ts","../node_modules/class-validator/types/decorator/common/isin.d.ts","../node_modules/class-validator/types/decorator/common/isnotin.d.ts","../node_modules/class-validator/types/decorator/number/isdivisibleby.d.ts","../node_modules/class-validator/types/decorator/number/ispositive.d.ts","../node_modules/class-validator/types/decorator/number/isnegative.d.ts","../node_modules/class-validator/types/decorator/number/max.d.ts","../node_modules/class-validator/types/decorator/number/min.d.ts","../node_modules/class-validator/types/decorator/date/mindate.d.ts","../node_modules/class-validator/types/decorator/date/maxdate.d.ts","../node_modules/class-validator/types/decorator/string/contains.d.ts","../node_modules/class-validator/types/decorator/string/notcontains.d.ts","../node_modules/@types/validator/index.d.ts","../node_modules/class-validator/types/decorator/string/isalpha.d.ts","../node_modules/class-validator/types/decorator/string/isalphanumeric.d.ts","../node_modules/class-validator/types/decorator/string/isdecimal.d.ts","../node_modules/class-validator/types/decorator/string/isascii.d.ts","../node_modules/class-validator/types/decorator/string/isbase64.d.ts","../node_modules/class-validator/types/decorator/string/isbytelength.d.ts","../node_modules/class-validator/types/decorator/string/iscreditcard.d.ts","../node_modules/class-validator/types/decorator/string/iscurrency.d.ts","../node_modules/class-validator/types/decorator/string/isemail.d.ts","../node_modules/class-validator/types/decorator/string/isfqdn.d.ts","../node_modules/class-validator/types/decorator/string/isfullwidth.d.ts","../node_modules/class-validator/types/decorator/string/ishalfwidth.d.ts","../node_modules/class-validator/types/decorator/string/isvariablewidth.d.ts","../node_modules/class-validator/types/decorator/string/ishexcolor.d.ts","../node_modules/class-validator/types/decorator/string/ishexadecimal.d.ts","../node_modules/class-validator/types/decorator/string/ismacaddress.d.ts","../node_modules/class-validator/types/decorator/string/isip.d.ts","../node_modules/class-validator/types/decorator/string/isport.d.ts","../node_modules/class-validator/types/decorator/string/isisbn.d.ts","../node_modules/class-validator/types/decorator/string/isisin.d.ts","../node_modules/class-validator/types/decorator/string/isiso8601.d.ts","../node_modules/class-validator/types/decorator/string/isjson.d.ts","../node_modules/class-validator/types/decorator/string/isjwt.d.ts","../node_modules/class-validator/types/decorator/string/islowercase.d.ts","../node_modules/class-validator/types/decorator/string/ismobilephone.d.ts","../node_modules/class-validator/types/decorator/string/isiso31661alpha2.d.ts","../node_modules/class-validator/types/decorator/string/isiso31661alpha3.d.ts","../node_modules/class-validator/types/decorator/string/ismongoid.d.ts","../node_modules/class-validator/types/decorator/string/ismultibyte.d.ts","../node_modules/class-validator/types/decorator/string/issurrogatepair.d.ts","../node_modules/class-validator/types/decorator/string/isurl.d.ts","../node_modules/class-validator/types/decorator/string/isuuid.d.ts","../node_modules/class-validator/types/decorator/string/isfirebasepushid.d.ts","../node_modules/class-validator/types/decorator/string/isuppercase.d.ts","../node_modules/class-validator/types/decorator/string/length.d.ts","../node_modules/class-validator/types/decorator/string/maxlength.d.ts","../node_modules/class-validator/types/decorator/string/minlength.d.ts","../node_modules/class-validator/types/decorator/string/matches.d.ts","../node_modules/libphonenumber-js/types.d.ts","../node_modules/libphonenumber-js/index.d.ts","../node_modules/class-validator/types/decorator/string/isphonenumber.d.ts","../node_modules/class-validator/types/decorator/string/ismilitarytime.d.ts","../node_modules/class-validator/types/decorator/string/ishash.d.ts","../node_modules/class-validator/types/decorator/string/isissn.d.ts","../node_modules/class-validator/types/decorator/string/isdatestring.d.ts","../node_modules/class-validator/types/decorator/string/isbooleanstring.d.ts","../node_modules/class-validator/types/decorator/string/isnumberstring.d.ts","../node_modules/class-validator/types/decorator/string/isbase32.d.ts","../node_modules/class-validator/types/decorator/string/isbic.d.ts","../node_modules/class-validator/types/decorator/string/isbtcaddress.d.ts","../node_modules/class-validator/types/decorator/string/isdatauri.d.ts","../node_modules/class-validator/types/decorator/string/isean.d.ts","../node_modules/class-validator/types/decorator/string/isethereumaddress.d.ts","../node_modules/class-validator/types/decorator/string/ishsl.d.ts","../node_modules/class-validator/types/decorator/string/isiban.d.ts","../node_modules/class-validator/types/decorator/string/isidentitycard.d.ts","../node_modules/class-validator/types/decorator/string/isisrc.d.ts","../node_modules/class-validator/types/decorator/string/islocale.d.ts","../node_modules/class-validator/types/decorator/string/ismagneturi.d.ts","../node_modules/class-validator/types/decorator/string/ismimetype.d.ts","../node_modules/class-validator/types/decorator/string/isoctal.d.ts","../node_modules/class-validator/types/decorator/string/ispassportnumber.d.ts","../node_modules/class-validator/types/decorator/string/ispostalcode.d.ts","../node_modules/class-validator/types/decorator/string/isrfc3339.d.ts","../node_modules/class-validator/types/decorator/string/isrgbcolor.d.ts","../node_modules/class-validator/types/decorator/string/issemver.d.ts","../node_modules/class-validator/types/decorator/typechecker/isboolean.d.ts","../node_modules/class-validator/types/decorator/typechecker/isdate.d.ts","../node_modules/class-validator/types/decorator/typechecker/isnumber.d.ts","../node_modules/class-validator/types/decorator/typechecker/isenum.d.ts","../node_modules/class-validator/types/decorator/typechecker/isint.d.ts","../node_modules/class-validator/types/decorator/typechecker/isstring.d.ts","../node_modules/class-validator/types/decorator/typechecker/isarray.d.ts","../node_modules/class-validator/types/decorator/typechecker/isobject.d.ts","../node_modules/class-validator/types/decorator/array/arraycontains.d.ts","../node_modules/class-validator/types/decorator/array/arraynotcontains.d.ts","../node_modules/class-validator/types/decorator/array/arraynotempty.d.ts","../node_modules/class-validator/types/decorator/array/arrayminsize.d.ts","../node_modules/class-validator/types/decorator/array/arraymaxsize.d.ts","../node_modules/class-validator/types/decorator/array/arrayunique.d.ts","../node_modules/class-validator/types/decorator/object/isnotemptyobject.d.ts","../node_modules/class-validator/types/decorator/object/isinstance.d.ts","../node_modules/class-validator/types/decorator/decorators.d.ts","../node_modules/class-validator/types/validation/validationtypes.d.ts","../node_modules/class-validator/types/validation/validator.d.ts","../node_modules/class-validator/types/register-decorator.d.ts","../node_modules/class-validator/types/metadata/validationmetadataargs.d.ts","../node_modules/class-validator/types/metadata/validationmetadata.d.ts","../node_modules/class-validator/types/metadata/constraintmetadata.d.ts","../node_modules/class-validator/types/metadata/metadatastorage.d.ts","../node_modules/class-validator/types/index.d.ts","../node_modules/@types/lodash/common/common.d.ts","../node_modules/@types/lodash/common/array.d.ts","../node_modules/@types/lodash/common/collection.d.ts","../node_modules/@types/lodash/common/date.d.ts","../node_modules/@types/lodash/common/function.d.ts","../node_modules/@types/lodash/common/lang.d.ts","../node_modules/@types/lodash/common/math.d.ts","../node_modules/@types/lodash/common/number.d.ts","../node_modules/@types/lodash/common/object.d.ts","../node_modules/@types/lodash/common/seq.d.ts","../node_modules/@types/lodash/common/string.d.ts","../node_modules/@types/lodash/common/util.d.ts","../node_modules/@types/lodash/index.d.ts","../node_modules/colors/index.d.ts","../src/config.errors.ts","../node_modules/class-transformer/types/interfaces/decorator-options/expose-options.interface.d.ts","../node_modules/class-transformer/types/interfaces/decorator-options/exclude-options.interface.d.ts","../node_modules/class-transformer/types/interfaces/decorator-options/transform-options.interface.d.ts","../node_modules/class-transformer/types/interfaces/decorator-options/type-discriminator-descriptor.interface.d.ts","../node_modules/class-transformer/types/interfaces/decorator-options/type-options.interface.d.ts","../node_modules/class-transformer/types/interfaces/metadata/exclude-metadata.interface.d.ts","../node_modules/class-transformer/types/interfaces/metadata/expose-metadata.interface.d.ts","../node_modules/class-transformer/types/enums/transformation-type.enum.d.ts","../node_modules/class-transformer/types/enums/index.d.ts","../node_modules/class-transformer/types/interfaces/target-map.interface.d.ts","../node_modules/class-transformer/types/interfaces/class-transformer-options.interface.d.ts","../node_modules/class-transformer/types/interfaces/metadata/transform-fn-params.interface.d.ts","../node_modules/class-transformer/types/interfaces/metadata/transform-metadata.interface.d.ts","../node_modules/class-transformer/types/interfaces/metadata/type-metadata.interface.d.ts","../node_modules/class-transformer/types/interfaces/class-constructor.type.d.ts","../node_modules/class-transformer/types/interfaces/type-help-options.interface.d.ts","../node_modules/class-transformer/types/interfaces/index.d.ts","../node_modules/class-transformer/types/classtransformer.d.ts","../node_modules/class-transformer/types/decorators/exclude.decorator.d.ts","../node_modules/class-transformer/types/decorators/expose.decorator.d.ts","../node_modules/class-transformer/types/decorators/transform-class-to-class.decorator.d.ts","../node_modules/class-transformer/types/decorators/transform-class-to-plain.decorator.d.ts","../node_modules/class-transformer/types/decorators/transform-plain-to-class.decorator.d.ts","../node_modules/class-transformer/types/decorators/transform.decorator.d.ts","../node_modules/class-transformer/types/decorators/type.decorator.d.ts","../node_modules/class-transformer/types/decorators/index.d.ts","../node_modules/class-transformer/types/index.d.ts","../node_modules/openapi3-ts/dist/model/specificationextension.d.ts","../node_modules/openapi3-ts/dist/model/openapi.d.ts","../node_modules/openapi3-ts/dist/model/server.d.ts","../node_modules/openapi3-ts/dist/model/index.d.ts","../node_modules/openapi3-ts/dist/dsl/openapibuilder.d.ts","../node_modules/openapi3-ts/dist/dsl/index.d.ts","../node_modules/openapi3-ts/dist/index.d.ts","../node_modules/class-transformer/types/metadatastorage.d.ts","../node_modules/reflect-metadata/index.d.ts","../node_modules/class-validator-jsonschema/build/defaultconverters.d.ts","../node_modules/class-validator-jsonschema/build/options.d.ts","../node_modules/class-validator-jsonschema/build/decorators.d.ts","../node_modules/class-validator-jsonschema/build/index.d.ts","../src/json-schema.validator.ts","../src/config.model.ts","../node_modules/@types/find-root/index.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/fs-extra/index.d.ts","../node_modules/@types/nconf/index.d.ts","../src/config.service.ts","../src/index.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"e34eb9339171ec45da2801c1967e4d378bd61a1dceaa1b1b4e1b6d28cb9ca962","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","e69d0b59db23f59172cb087ee44a71438f809bd214d4f4105abd6090b341cbdc","d5c1d4db425938fb1e0ff528b3edb945d4d851c001ab6e1528c62eb16813d96e","86f89124a90fae1b90421bcce1e0ba58614383ca72403bfc03ff89761b050a4d","5a6fbec8c8e62c37e9685a91a6ef0f6ecaddb1ee90f7b2c2b71b454b40a0d9a6","e7435f2f56c50688250f3b6ef99d8f3a1443f4e3d65b4526dfb31dfd4ba532f8","6fc56a681a637069675b2e11b4aa105efe146f7a88876f23537e9ea139297cf9","33b7f4106cf45ae7ccbb95acd551e9a5cd3c27f598d48216bda84213b8ae0c7e","542c82f0d719084ec6dde3ce4a69be8db0f5fa3ea1e38129f95ee6897b82de78","c5079a23a0200a682ec3db25bc789d6cee4275b676a86ec1a3964d919b977e6a","8bcb884d06860a129dbffa3500d51116d9d1040bb3bf1c9762eb2f1e7fd5c85c","e55c0f31407e1e4eee10994001a4f570e1817897a707655f0bbe4d4a66920e9e","a37c2194c586faa8979f50a5c5ca165b0903d31ee62a9fe65e4494aa099712c0","6602339ddc9cd7e54261bda0e70fb356d9cdc10e3ec7feb5fa28982f8a4d9e34","7ffaa736b8a04b0b8af66092da536f71ef13a5ef0428c7711f32b94b68f7c8c8","7b4930d666bbe5d10a19fcc8f60cfa392d3ad3383b7f61e979881d2c251bc895","46342f04405a2be3fbfb5e38fe3411325769f14482b8cd48077f2d14b64abcfb","8fa675c4f44e6020328cf85fdf25419300f35d591b4f56f56e00f9d52b6fbb3b","ba98f23160cfa6b47ee8072b8f54201f21a1ee9addc2ef461ebadf559fe5c43a","45a4591b53459e21217dc9803367a651e5a1c30358a015f27de0b3e719db816b","9ef22bee37885193b9fae7f4cad9502542c12c7fe16afe61e826cdd822643d84","b0451895b894c102eed19d50bd5fcb3afd116097f77a7d83625624fafcca8939","bce17120b679ff4f1be70f5fe5c56044e07ed45f1e555db6486c6ded8e1da1c8","7590477bfa2e309e677ff7f31cb466f377fcd0e10a72950439c3203175309958","3f9ebd554335d2c4c4e7dc67af342d37dc8f2938afa64605d8a93236022cc8a5","1c077c9f6c0bc02a36207994a6e92a8fbf72d017c4567f640b52bf32984d2392","600b42323925b32902b17563654405968aa12ee39e665f83987b7759224cc317","32c8f85f6b4e145537dfe61b94ddd98b47dbdd1d37dc4b7042a8d969cd63a1aa","0da77bc7e34afccd7d35dcc0d99db05b56235a536c69082c15f2a07ceb7ceae0","f364fb93abf1e50fa93e38b4cb32c99adb43e8c8044482da5b9bf29aa27eaf75","a460b56ced5a21969a819245f9f36b2b55aa2129e87159957d400d3dc0847529","e53e817cec71dc843700a1571356271d3e13abf8cb9d32f33b4a214c6dcdd1e0","252eb4750d0439d1674ad0dc30d2a2a3e4655e08ad9e58a7e236b21e78d1d540","e344b4a389bb2dfa98f144f3f195387a02b6bdb69deed4a96d16cc283c567778","40bc9bf6808edd4fed3703f1ce7b50f1eb9124d2ac168f85fc4adbb4bd77e291","d618d077158335a50ae6bb789d93dd29b62f930195a2e909e94f0afadad5680a","ae0eeabdb4b4129356ba04ce086c675af383a9ab2b275950d73067842ccd91e4","54f664311746f12a5b0b93a6a58b12a52660e3ff74f06aa0e9c275f46bd22d0e","506bc8f4d2d639bebb120e18d3752ddeee11321fd1070ad2ce05612753c628d6","4069e28d9ec7bb86c714d2d11b5811ebca88c114c12df3fb56b8fec4423dcf18","1977f62a560f3b0fc824281fd027a97ce06c4b2d47b408f3a439c29f1e9f7e10","627570f2487bd8d899dd4f36ecb20fe0eb2f8c379eff297e24caba0c985a6c43","445bbd11741254b30eb904776cbebc72b9d13b35e6a04a0dda331a7bbafe2428","85c9be6b38726347f80c528c950302900db744b558a95206c4de12e1d99b2dee","735baa325c8211ac962fa5927fa69d3702666d1247ceb16bf94c789ccd7bef26","9e82194af3a7d314ccbc64bb94bfb62f4bfea047db3422a7f6c5caf2d06540a9","c32373a44722e84517acd1f923284ce32514fecf3dd93cc5ae52111dc6aa682a","952a9eab21103b79b7a6cca8ad970c3872883aa71273f540285cad360c35da40","8ba48776335db39e0329018c04486907069f3d7ee06ce8b1a6134b7d745271cc","e6d5809e52ed7ef1860d1c483e005d1f71bab36772ef0fd80d5df6db1da0e815","6ee38318bdaa2852d9309e92842f099a9f40c5d3c5aff3833066c02ffd42dade","12ae46c46c5e2405ad3d7e96e2638f1d183095fa8cf8a876d3b3b4d6ba985f5b","e4b1e912737472765e6d2264b8721995f86a463a1225f5e2a27f783ecc013a7b","da09c0171b55ccdf5329e38c5249c0878e7aec151c2a4390c630a2bc1383e768","c40d552bd2a4644b0617ec2f0f1c58618a25d098d2d4aa7c65fb446f3c305b54","ecb4c715f74eb8b0e289c87483f8a4933dfa566f0745b4c86231a077e2f13fea","424ddba00938bb9ae68138f1d03c669f43556fc3e9448ed676866c864ca3f1d6","a0fe12181346c8404aab9d9a938360133b770a0c08b75a2fce967d77ca4b543f","3cc6eb7935ff45d7628b93bb6aaf1a32e8cb3b24287f9e75694b607484b377b3","51451e948351903941a53ed002977984413a3e6a24f748339dd1ed156a6122bf","efd463021ccc91579ed8ae62584176baab2cd407c555c69214152480531a2072","29647c3b79320cfeecb5862e1f79220e059b26db2be52ea256df9cf9203fb401","e8cdefd2dc293cb4866ee8f04368e7001884650bb0f43357c4fe044cc2e1674f","582a3578ebba9238eb0c5d30b4d231356d3e8116fea497119920208fb48ccf85","185eae4a1e8a54e38f36cd6681cfa54c975a2fc3bc2ba6a39bf8163fac85188d","e6e7ac06b50b2693488813f8de73613934d9aa2eb355cdffd2ef898db60c9af1","5b504f247d6388daa92ffb5bbd3ffc5fc5a1ebd3ff928f90b6285b620455dd04","cee72255e129896f0240ceb58c22e207b83d2cc81d8446190d1b4ef9b507ccd6","3b54670e11a8d3512f87e46645aa9c83ae93afead4a302299a192ac5458aa586","c2fc4d3a130e9dc0e40f7e7d192ef2494a39c37da88b5454c8adf143623e5979","2e693158fc1eedba3a5766e032d3620c0e9c8ad0418e4769be8a0f103fdb52cd","516275ccf3e66dc391533afd4d326c44dd750345b68bb573fc592e4e4b74545f","07c342622568693847f6cb898679402dd19740f815fd43bec996daf24a1e2b85","897f03cf3040a245761fb2e58c91bcdbc72ecab0499d7d95744142e2ba66e841","617e6438440c7634c2e25f43d3becc1eaac129e5f2b311be56f70025d281ec4b","6aacd53b14c96a0cd21435cae68eabe6d9a3d78dc5442ec6edcf391efd7989ef","a4096686f982f6977433ee9759ecbef49da29d7e6a5d8278f0fbc7b9f70fce12","2eb279b2ae63cf59b419eb41c4ccd8f0850a7114c0a6a0da386286799f62c38b","9c9b902ae773d4c1ca6bb8f05e06b1dc6ffe7514463e3ee9b9e28153014836ee","86df53d43eccf5f18b4bc8f876932bd8a4a2a9601eb06bbba13f937f3b2a2377","2147f8d114cf58c05106c3dccea9924d069c69508b5980ed4011d2b648af2ffe","edb8332e0c7c7ec8f8f321c96d29c80d5e90de63efdb1b96ad8299d383d4b6b9","fe61f001bd4bd0a374daa75a2ba6d1bb12c849060a607593a3d9a44e6b1df590","cfe8221c909ad721b3da6080570553dea2f0e729afbdbcf2c141252cf22f39b5","34e89249b6d840032b9acdec61d136877f84f2cd3e3980355b8a18f119809956","6f36ff8f8a898184277e7c6e3bf6126f91c7a8b6a841f5b5e6cb415cfc34820e","4b6378c9b1b3a2521316c96f5c777e32a1b14d05b034ccd223499e26de8a379c","07be5ae9bf5a51f3d98ffcfacf7de2fe4842a7e5016f741e9fad165bb929be93","cb1b37eda1afc730d2909a0f62cac4a256276d5e62fea36db1473981a5a65ab1","195f855b39c8a6e50eb1f37d8f794fbd98e41199dffbc98bf629506b6def73d7","da32b37d9dec18a1e66ce7a540c1a466c0a7499a02819a78c049810f8c80ec8f","108314a60f3cb2454f2d889c1fb8b3826795399e5d92e87b2918f14d70c01e69","d75cc838286d6b1260f0968557cd5f28495d7341c02ac93989fb5096deddfb47","d531dc11bb3a8a577bd9ff83e12638098bfc9e0856b25852b91aac70b0887f2a","19968b998a2ab7dfd39de0c942fc738b2b610895843fec25477bc393687babd8","c0e6319f0839d76beed6e37b45ec4bb80b394d836db308ae9db4dea0fe8a9297","1a7b11be5c442dab3f4af9faf20402798fddf1d3c904f7b310f05d91423ba870","48709e4ac55179f5f6789207691759f44e8e0d2bfbadd1ceecb93d4123a12cef","2c817fa37b3d2aa72f01ce4d3f93413a7fbdecafe1b9fb7bd7baaa1bbd46eb08","682203aed293a0986cc2fccc6321d862742b48d7359118ac8f36b290d28920d2","7406d75a4761b34ce126f099eafe6643b929522e9696e5db5043f4e5c74a9e40","ad74043d72ed605cecf58a589112083c78dfd97452b80cd0a81b31c57976af12","9bc363b91528a169b3d9451fba33f865c339a3397da80a44a754547962f4a210","64efb52cb6cf86c8a05ceec920db05f9ebdaac4dff5980d9a62227eb6d2ebc11","3286cf198cf5f068cd74cb0b6648c8cba440dade2fc55eb819e50e5ea9b3f92e","16a6d4efcce5bb20d42134ce52855a46cd4783668c6d6a67a86397eb670ad0d2","46bd71615bdf9bfa8499b9cfce52da03507f7140c93866805d04155fa19caa1b","334b49c56ad2d1285a113ae3df77733d304853afcf7328367f320934e37559af","a0e74be326371c0d49be38e1ca065441fb587c26ca49772d1c96db7b77a1bb14","bb1e5cf70d99c277c9f1fe7a216b527dd6bd2f26b307a8ab65d24248fb3319f5","817547eacf93922e22570ba411f23e9164544dead83e379c7ae9c1cfc700c2cf","a728478cb11ab09a46e664c0782610d7dd5c9db3f9a249f002c92918ca0308f7","9e91ef9c3e057d6d9df8bcbfbba0207e83ef9ab98aa302cf9223e81e32fdfe8d","66d30ef7f307f95b3f9c4f97e6c1a5e4c462703de03f2f81aca8a1a2f8739dbd","0f562669bc473ed1e1e2804f12d09831e6bf506181d7684fb386f60f22989057","90a4be0e17ba5824558c38c93894e7f480b3adf5edd1fe04877ab56c56111595","fadd55cddab059940934df39ce2689d37110cfe37cc6775f06b0e8decf3092d7","9115cfffd8ea095accd6edf950d4bdfabbd5118e7604be2e13fe07150344bb9d","b4f3b4e20e2193179481ab325b8bd0871b986e1e8a8ed2961ce020c2dba7c02d","41744c67366a0482db029a21f0df4b52cd6f1c85cbc426b981b83b378ccb6e65","c3f3cf7561dd31867635c22f3c47c8491af4cfa3758c53e822a136828fc24e5d","1a3f603fedd85d20c65eb7ca522dd6f0e264dbb6e1bfa9fb4f214f2e61b8bdf8","82a74e031ab992424f8874ceacbb43ad33bdcf69538a0fbddc28145e54980f5a","5515f17f45c6aafe6459afa3318bba040cb466a8d91617041566808a5fd77a44","4df1f0c17953b0450aa988c9930061f8861b114e1649e1a16cfd70c5cbdf8d83","441104b363d80fe57eb79a50d495e0b7e3ebeb45a5f0d1a4067d71ef75e8fbfa","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","378df8bbbb9e3f6fca05d58f644aab538e1062eab5e778fb0b83d41125df246d","d88a479cccf787b4aa82362150fbeba5211a32dbfafa7b92ba6995ecaf9a1a89","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},{"version":"a17e831d16c27cbe4d6f0bb238c1ded0d4a26c282009e431c68733be0b792f4f","affectsGlobalScope":true},"34a155b20224a0a3b84e75082ca2fd110086e375a0c50ec3b5c1b4e0d932e32e","f11f9ebb146ec035ab0e81a0ccb25264a5ca094dfeb0e69cb319d340a16966f6","5d470930bf6142d7cbda81c157869024527dc7911ba55d90b8387ef6e1585aa1","01897098acd104c4af64e96f92a826a5875a85ecc72d91dc634bf0d69289ebc1","b7e6a6a3495301360edb9e1474702db73d18be7803b3f5c6c05571212acccd16","aa7527285c94043f21baf6e337bc60a92c20b6efaa90859473f6476954ac5f79","dd3be6d9dcd79e46d192175a756546630f2dc89dab28073823c936557b977f26","8d0566152618a1da6536c75a5659c139522d67c63a9ae27e8228d76ab0420584","ba06bf784edafe0db0e2bd1f6ecf3465b81f6b1819871bf190a0e0137b5b7f18","a0500233cb989bcb78f5f1a81f51eabc06b5c39e3042c560a7489f022f1f55a3","220508b3fb6b773f49d8fb0765b04f90ef15caacf0f3d260e3412ed38f71ef09","cdc28bdf0971731024c1ae0fd739e2e3411d460d9c9ae055ac28777f248dfba6","e56427c055602078cbf0e58e815960541136388f4fc62554813575508def98b6","1f58b0676a80db38df1ce19d15360c20ce9e983b35298a5d0b4aa4eb4fb67e0f","3d67e7eb73c6955ee27f1d845cae88923f75c8b0830d4b5440eea2339958e8ec","11fec302d58b56033ab07290a3abc29e9908e29d504db9468544b15c4cd7670d","c66d6817c931633650edf19a8644eea61aeeb84190c7219911cefa8ddea8bd9a","ab1359707e4fc610c5f37f1488063af65cda3badca6b692d44b95e8380e0f6c2","11f8380b827bc4bd2665651f1f6874ba4e6e5b498873ab9f376da576ff58aa7d","d80ffdd55e7f4bc69cde66933582b8592d3736d3b0d1d8cc63995a7b2bcca579","c9b71952b2178e8737b63079dba30e1b29872240b122905cbaba756cb60b32f5","d214bc31793fb7ff77032308ac53f5e73260a77aecc1ac9fd276dff030c9281f","da1fbedeb2962d086e3398b1ac87976d6f1282cb3e5e87c1336aa46d69c2c1cc","20515f70e7fd3cdd6cf05ac0a72588b61183a909b611d3bdbe57743bcd65445e","026726932a4964341ab8544f12b912c8dfaa388d2936b71cc3eca0cffb49cc1d","83188d037c81bd27076218934ba9e1742ddb69cd8cc64cdb8a554078de38eb12","c490298b35e03ecac14e83a3e701e9284fa87ee285c362475b063e437385d362","d90445b6258429107e0ebd116bc5476ebe155df2206f70aadf058ba28f092db8","9508fcc6616ea31bf848463f161571bcb0c8726b267a43e231f21fca775007e7","daf44d045f41c7dc023520708443bc42f914178fbaeb193a59b6acbe3183dc7e","b2284829ef9c690b488359fb486a8ebdf0e2d4423d1a7b2b74727e219e2e9002","ab135130c2e2f34a2bd54f69331a1a7773fcdb4d9cfdff9a23831dc4eb6c0a21","d055e7d26a8fd1de409ddc5fac4fb848c2c1814302c002735a66502eac96237e","1037017fc5dc0109d84ce24aa65eefff6cc9728c608cd1fc54212e4c2db18baa","2fd1f5f37a7da7c28e6e4ec088cca5c6882fe41cd2e4d512cd583ad35f11dcc7","86f4f26e7e2e216f49db89fe0e5f66dc6966edb34b6bb3d0e93608a223b1fed8",{"version":"8d6d51a5118d000ed3bfe6e1dd1335bebfff3fef23cd2af2f84a24d30f90cc90","affectsGlobalScope":true},"4a62e901bdc1d3d523871a38ee07dacc0effe7fd8215c21d6a51fc2093322b48","3cfef0a604c9dfc2c07224b8cecbeeef9c2d5ccbd50b3d0e1eeab4fb68520bfd","605ea258c6c3b91cb0ecd5e4919a5b2a9bbe2f23ec3f142b5ad35a21346ffcd2","40cdf91e74e7c77dac9a17722a4a3b15b4f871e826cbe69526427b8506576ae0","986bb127f3ef964a0d8baa4b4b5c7a1c571ee48d5881f42c6d69fd66121da949","f6d88c93778a10410243520fdb3850bde115fab1e54e8b57b410f1a0eb19fb4a","5c0bcafc5bca9e454abcd90499af1366179bd5fd7e407668929a842132d97dc0","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"9acfe4d1ff027015151ce81d60797b04b52bffe97ad8310bb0ec2e8fd61e1303","affectsGlobalScope":true},"43978f18d1165eea81040bc9bfac1a551717f5cc9bd0f13b31bf490c5fcdc75f","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","57a558a99ab24fdff45a2c2db0c34285de2dcbc66149d9a3d83fcde844426e37","260aad3a6bd3fc510b7f97cfb05859bfc045ce185f8c2b4d73ddb9c43b0eb3c0","cb428529763c6c8e38e42db2a39f333ffcc6d3aab396b24ac84b22da752c1de0","ad4b60488fb1e562bf375dac9299815f7028bf667d9b5887b2d01d501b7d1ddd","246341c3a7a2638cf830d690e69de1e6085a102c6a30596435b050e6ac86c11a","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"fd5d2f531376b1e84df315df0fe724445353a0ae2e2c4de7bae01e24c6c2047a","84214d474bed6e36b7608ba8a39d463ff90061b8af47cbd1a8f7ecb775e21fac","944660c079e97f62f513c33ec64cebc44154374053d3a9adb04bf02f67ee1066","b287b810b5035d5685f1df6e1e418f1ca452a3ed4f59fd5cc081dbf2045f0d9b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","62a00c9cc0c78d9f282dcd7b0a7776aefe220106c3bc327e259e5f6484c6f556",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"f3e8bcce378a26bc672fce0ec05affabbbbfa18493b76f24c39136dea87100d0","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","cd4854d38f4eb5592afd98ab95ca17389a7dfe38013d9079e802d739bdbcc939","94eed4cc2f5f658d5e229ff1ccd38860bddf4233e347bf78edd2154dee1f2b99",{"version":"e51bee3200733b1f58818b5a9ea90fcd61c5b8afa3a0378391991f3696826a65","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","e70339a3d63f806c43f24250c42aa0000093923457b0ed7dfc10e0ac910ebca9","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","d7838022c7dab596357a9604b9c6adffe37dc34085ce0779c958ce9545bd7139","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"a279435e7813d1f061c0cab6ab77b1b9377e8d96851e5ed4a76a1ce6eb6e628f","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","b810390059fc34122556c644f586e7a2b4598ded8afe5ba70bb82fc2e50577b1","ba9de5c5823e06ee3314f959c138cdaf4477d3a1a0769f0d24e62911020e8088","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"893f4b8552c248f6542174b53d1519f739b20428c970dda89cd90485dab059d0","ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae","1a137445c4399e4c18b0989d7ead5c76da5fb5df0e2934a1e84e5b303b6bfe68","c4d5dc4812b3aa5a3bf1de71afb5f63046ae053a962f16e8c8d2001d53d93145","709ef27182a6dcd8687568d24cc896c84e8178abd1a245d583b5c4762298840e"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"skipLibCheck":true,"sourceMap":true,"target":4},"fileIdsList":[[270],[243,270,277],[169,171,172,173,174,175,176,177,178,179,180,181,270],[169,170,172,173,174,175,176,177,178,179,180,181,270],[170,171,172,173,174,175,176,177,178,179,180,181,270],[169,170,171,173,174,175,176,177,178,179,180,181,270],[169,170,171,172,174,175,176,177,178,179,180,181,270],[169,170,171,172,173,175,176,177,178,179,180,181,270],[169,170,171,172,173,174,176,177,178,179,180,181,270],[169,170,171,172,173,174,175,177,178,179,180,181,270],[169,170,171,172,173,174,175,176,178,179,180,181,270],[169,170,171,172,173,174,175,176,177,179,180,181,270],[169,170,171,172,173,174,175,176,177,178,180,181,270],[169,170,171,172,173,174,175,176,177,178,179,181,270],[169,170,171,172,173,174,175,176,177,178,179,180,270],[227,270],[230,270],[231,236,270],[232,242,243,250,259,269,270],[232,233,242,250,270],[234,270],[235,236,243,251,270],[236,259,266,270],[237,239,242,250,270],[238,270],[239,240,270],[241,242,270],[242,270],[242,243,244,259,269,270],[242,243,244,259,270],[245,250,259,269,270],[242,243,245,246,250,259,266,269,270],[245,247,259,266,269,270],[227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276],[242,248,270],[249,269,270],[239,242,250,259,270],[251,270],[252,270],[230,253,270],[254,268,270,274],[255,270],[256,270],[242,257,270],[257,258,270,272],[242,259,260,261,270],[259,261,270],[259,260,270],[262,270],[263,270],[242,264,265,270],[264,265,270],[236,250,266,270],[267,270],[250,268,270],[231,245,256,269,270],[236,270],[259,270,271],[270,272],[270,273],[231,236,242,244,253,259,269,270,272,274],[259,270,275],[200,270],[202,203,204,205,206,207,208,270],[191,270],[192,200,201,209,270],[193,270],[187,270],[184,185,186,187,188,189,190,193,194,195,196,197,198,199,270],[192,194,270],[195,200,270],[192,200,270],[217,219,221,270],[165,217,219,221,270],[165,217,221,222,270],[168,218,220,270],[49,270],[48,49,54,270],[50,51,52,53,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,270],[49,77,270],[49,117,270],[48,270],[44,45,46,47,48,49,54,160,161,162,163,167,270],[54,270],[46,165,166,270],[48,164,270],[49,54,270],[44,45,270],[116,270],[215,270],[214,270],[214,216,270],[211,212,213,270],[211,270],[212,270],[168,181,182,270],[168,181,210,223,224,270],[168,181,183,210,225,226,252,270,278,279],[183,224,225,270,280],[168,270]],"referencedMap":[[226,1],[278,2],[170,3],[171,4],[169,5],[172,6],[173,7],[174,8],[175,9],[176,10],[177,11],[178,12],[179,13],[180,14],[181,15],[279,1],[227,16],[228,16],[230,17],[231,18],[232,19],[233,20],[234,21],[235,22],[236,23],[237,24],[238,25],[239,26],[240,26],[241,27],[242,28],[243,29],[244,30],[229,1],[276,1],[245,31],[246,32],[247,33],[277,34],[248,35],[249,36],[250,37],[251,38],[252,39],[253,40],[254,41],[255,42],[256,43],[257,44],[258,45],[259,46],[261,47],[260,48],[262,49],[263,50],[264,51],[265,52],[266,53],[267,54],[268,55],[269,56],[270,57],[271,58],[272,59],[273,60],[274,61],[275,62],[77,1],[201,63],[202,63],[203,63],[209,64],[204,63],[205,63],[206,63],[207,63],[208,63],[192,65],[191,1],[210,66],[198,1],[194,67],[185,1],[184,1],[186,1],[187,63],[188,68],[200,69],[189,63],[190,63],[195,70],[196,71],[197,63],[193,1],[199,1],[218,72],[222,73],[220,74],[223,75],[221,76],[47,1],[152,77],[156,77],[155,77],[153,77],[154,77],[157,77],[50,77],[62,77],[51,77],[64,77],[66,77],[60,77],[59,77],[61,77],[65,77],[67,77],[52,77],[63,77],[53,77],[55,78],[56,77],[57,77],[58,77],[74,77],[73,77],[160,79],[68,77],[70,77],[69,77],[71,77],[72,77],[159,77],[158,77],[75,77],[78,80],[79,80],[81,77],[125,77],[82,77],[126,77],[123,77],[127,77],[83,77],[84,77],[85,80],[128,77],[122,80],[80,80],[129,77],[86,80],[130,77],[110,77],[87,80],[88,77],[89,77],[120,80],[92,77],[91,77],[131,77],[132,77],[133,80],[94,77],[96,77],[97,77],[103,77],[104,77],[98,80],[134,77],[121,80],[99,77],[100,77],[135,77],[101,77],[93,80],[136,77],[119,77],[137,77],[102,80],[105,77],[106,77],[124,80],[138,77],[139,77],[118,81],[95,77],[140,80],[141,77],[142,77],[143,77],[107,77],[111,77],[108,80],[109,77],[90,77],[112,77],[115,77],[113,77],[114,77],[76,77],[150,77],[144,77],[145,77],[147,77],[148,77],[146,77],[151,77],[149,77],[49,82],[168,83],[166,84],[167,85],[165,86],[164,77],[163,87],[46,1],[48,1],[44,1],[161,1],[162,88],[54,82],[45,1],[182,1],[117,89],[116,1],[216,90],[215,91],[217,92],[214,93],[212,94],[213,95],[211,1],[219,1],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[43,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[41,1],[37,1],[38,1],[39,1],[40,1],[1,1],[42,1],[11,1],[10,1],[183,96],[225,97],[280,98],[281,99],[224,100]],"exportedModulesMap":[[226,1],[278,2],[170,3],[171,4],[169,5],[172,6],[173,7],[174,8],[175,9],[176,10],[177,11],[178,12],[179,13],[180,14],[181,15],[279,1],[227,16],[228,16],[230,17],[231,18],[232,19],[233,20],[234,21],[235,22],[236,23],[237,24],[238,25],[239,26],[240,26],[241,27],[242,28],[243,29],[244,30],[229,1],[276,1],[245,31],[246,32],[247,33],[277,34],[248,35],[249,36],[250,37],[251,38],[252,39],[253,40],[254,41],[255,42],[256,43],[257,44],[258,45],[259,46],[261,47],[260,48],[262,49],[263,50],[264,51],[265,52],[266,53],[267,54],[268,55],[269,56],[270,57],[271,58],[272,59],[273,60],[274,61],[275,62],[77,1],[201,63],[202,63],[203,63],[209,64],[204,63],[205,63],[206,63],[207,63],[208,63],[192,65],[191,1],[210,66],[198,1],[194,67],[185,1],[184,1],[186,1],[187,63],[188,68],[200,69],[189,63],[190,63],[195,70],[196,71],[197,63],[193,1],[199,1],[218,72],[222,73],[220,74],[223,75],[221,76],[47,1],[152,77],[156,77],[155,77],[153,77],[154,77],[157,77],[50,77],[62,77],[51,77],[64,77],[66,77],[60,77],[59,77],[61,77],[65,77],[67,77],[52,77],[63,77],[53,77],[55,78],[56,77],[57,77],[58,77],[74,77],[73,77],[160,79],[68,77],[70,77],[69,77],[71,77],[72,77],[159,77],[158,77],[75,77],[78,80],[79,80],[81,77],[125,77],[82,77],[126,77],[123,77],[127,77],[83,77],[84,77],[85,80],[128,77],[122,80],[80,80],[129,77],[86,80],[130,77],[110,77],[87,80],[88,77],[89,77],[120,80],[92,77],[91,77],[131,77],[132,77],[133,80],[94,77],[96,77],[97,77],[103,77],[104,77],[98,80],[134,77],[121,80],[99,77],[100,77],[135,77],[101,77],[93,80],[136,77],[119,77],[137,77],[102,80],[105,77],[106,77],[124,80],[138,77],[139,77],[118,81],[95,77],[140,80],[141,77],[142,77],[143,77],[107,77],[111,77],[108,80],[109,77],[90,77],[112,77],[115,77],[113,77],[114,77],[76,77],[150,77],[144,77],[145,77],[147,77],[148,77],[146,77],[151,77],[149,77],[49,82],[168,83],[166,84],[167,85],[165,86],[164,77],[163,87],[46,1],[48,1],[44,1],[161,1],[162,88],[54,82],[45,1],[182,1],[117,89],[116,1],[216,90],[215,91],[217,92],[214,93],[212,94],[213,95],[211,1],[219,1],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[43,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[41,1],[37,1],[38,1],[39,1],[40,1],[1,1],[42,1],[11,1],[10,1],[183,96],[225,97],[280,98],[281,99],[224,100]],"semanticDiagnosticsPerFile":[226,278,170,171,169,172,173,174,175,176,177,178,179,180,181,279,227,228,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,229,276,245,246,247,277,248,249,250,251,252,253,254,255,256,257,258,259,261,260,262,263,264,265,266,267,268,269,270,271,272,273,274,275,77,201,202,203,209,204,205,206,207,208,192,191,210,198,194,185,184,186,187,188,200,189,190,195,196,197,193,199,218,222,220,223,221,47,152,156,155,153,154,157,50,62,51,64,66,60,59,61,65,67,52,63,53,55,56,57,58,74,73,160,68,70,69,71,72,159,158,75,78,79,81,125,82,126,123,127,83,84,85,128,122,80,129,86,130,110,87,88,89,120,92,91,131,132,133,94,96,97,103,104,98,134,121,99,100,135,101,93,136,119,137,102,105,106,124,138,139,118,95,140,141,142,143,107,111,108,109,90,112,115,113,114,76,150,144,145,147,148,146,151,149,49,168,166,167,165,164,163,46,48,44,161,162,54,45,182,117,116,216,215,217,214,212,213,211,219,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,43,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,41,37,38,39,40,1,42,11,10,183,225,280,281,224]},"version":"4.4.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kibibit/configit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "a general typescript configuration service",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/lib",
|
|
9
|
+
"/src"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/Kibibit/configit.git"
|
|
18
|
+
},
|
|
19
|
+
"author": "thatkookooguy <neilkalman@gmail.com>",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/Kibibit/configit/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/Kibibit/configit#readme",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"class-transformer": "^0.4.0",
|
|
27
|
+
"class-validator": "^0.13.1",
|
|
28
|
+
"class-validator-jsonschema": "^3.1.0",
|
|
29
|
+
"cli-table": "^0.3.6",
|
|
30
|
+
"colors": "^1.4.0",
|
|
31
|
+
"find-root": "^1.1.0",
|
|
32
|
+
"fs-extra": "^10.0.0",
|
|
33
|
+
"inquirer": "^8.2.0",
|
|
34
|
+
"lodash": "^4.17.21",
|
|
35
|
+
"nconf": "^0.11.3",
|
|
36
|
+
"simple-git": "^2.46.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/colors": "^1.2.1",
|
|
40
|
+
"@types/find-root": "^1.1.2",
|
|
41
|
+
"@types/fs-extra": "^9.0.13",
|
|
42
|
+
"@types/lodash": "^4.14.175",
|
|
43
|
+
"@types/nconf": "^0.10.1",
|
|
44
|
+
"ts-node": "^10.2.1",
|
|
45
|
+
"typescript": "^4.4.3"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ValidationError } from 'class-validator';
|
|
2
|
+
import { times, values } from 'lodash';
|
|
3
|
+
import { red, cyan } from 'colors';
|
|
4
|
+
|
|
5
|
+
export class ConfigValidationError extends Error {
|
|
6
|
+
constructor(validationErrors: ValidationError[], configInstance: any) {
|
|
7
|
+
const message = validationErrors
|
|
8
|
+
.map((validationError) => {
|
|
9
|
+
const deco = cyan(times(55, () => '=').join(''));
|
|
10
|
+
return [
|
|
11
|
+
'',
|
|
12
|
+
deco,
|
|
13
|
+
` ${ cyan('property:') } ${ validationError.property }`,
|
|
14
|
+
` ${ cyan('value:') } ${ red(validationError.value) }`,
|
|
15
|
+
deco,
|
|
16
|
+
values(validationError.constraints)
|
|
17
|
+
.map((value) => ` - ${ red(value) }`).join('\n')
|
|
18
|
+
].join('\n');
|
|
19
|
+
}).join('') + '\n\n';
|
|
20
|
+
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = 'ConfigValidationError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Exclude, Expose } from 'class-transformer';
|
|
2
|
+
import {
|
|
3
|
+
IsBoolean,
|
|
4
|
+
IsIn,
|
|
5
|
+
IsString,
|
|
6
|
+
Validate
|
|
7
|
+
} from 'class-validator';
|
|
8
|
+
import { validationMetadatasToSchemas } from 'class-validator-jsonschema';
|
|
9
|
+
import { chain, keys } from 'lodash';
|
|
10
|
+
|
|
11
|
+
import { JsonSchema } from './json-schema.validator';
|
|
12
|
+
|
|
13
|
+
export const NODE_ENVIRONMENT_OPTIONS = [
|
|
14
|
+
'google',
|
|
15
|
+
'development',
|
|
16
|
+
'production',
|
|
17
|
+
'test',
|
|
18
|
+
'devcontainer'
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
@Exclude()
|
|
22
|
+
export class Config {
|
|
23
|
+
@Expose()
|
|
24
|
+
@IsString()
|
|
25
|
+
@IsIn(NODE_ENVIRONMENT_OPTIONS)
|
|
26
|
+
@Validate(JsonSchema, [
|
|
27
|
+
'Tells which env file to use and what environment we are running on'
|
|
28
|
+
])
|
|
29
|
+
NODE_ENV = 'development';
|
|
30
|
+
|
|
31
|
+
@IsBoolean()
|
|
32
|
+
@Validate(JsonSchema, [
|
|
33
|
+
'Create a file made out of the internal config. This is mostly for ',
|
|
34
|
+
'merging command line, environment, and file variables to a single instance'
|
|
35
|
+
])
|
|
36
|
+
saveToFile = false;
|
|
37
|
+
|
|
38
|
+
constructor(partial: Partial<Config> = {}) {
|
|
39
|
+
Object.assign(this, partial);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public toJsonSchema() {
|
|
43
|
+
const configJsonSchemaObj = validationMetadatasToSchemas({
|
|
44
|
+
additionalConverters: {
|
|
45
|
+
JsonSchema: (meta) => ({
|
|
46
|
+
description: meta.constraints.join('')
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const classForSchema = chain(configJsonSchemaObj)
|
|
52
|
+
.keys()
|
|
53
|
+
.filter((className) => className !== 'Config')
|
|
54
|
+
.first()
|
|
55
|
+
.value();
|
|
56
|
+
const configJsonSchema = configJsonSchemaObj[classForSchema];
|
|
57
|
+
|
|
58
|
+
delete configJsonSchema.properties?.nodeEnv;
|
|
59
|
+
configJsonSchema.required?.splice(
|
|
60
|
+
configJsonSchema.required.indexOf('nodeEnv'),
|
|
61
|
+
1
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
return configJsonSchema;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { join } from 'path';
|
|
2
|
+
|
|
3
|
+
import { classToPlain, Exclude } from 'class-transformer';
|
|
4
|
+
import { validateSync } from 'class-validator';
|
|
5
|
+
import findRoot from 'find-root';
|
|
6
|
+
import {
|
|
7
|
+
pathExistsSync,
|
|
8
|
+
readJSONSync,
|
|
9
|
+
writeJson,
|
|
10
|
+
writeJSONSync,
|
|
11
|
+
readdirSync
|
|
12
|
+
} from 'fs-extra';
|
|
13
|
+
import { camelCase, chain, get } from 'lodash';
|
|
14
|
+
import nconf from 'nconf';
|
|
15
|
+
import { Config } from './config.model';
|
|
16
|
+
import { ConfigValidationError } from './config.errors';
|
|
17
|
+
|
|
18
|
+
export interface IConfigServiceOptions {
|
|
19
|
+
convertToCamelCase?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const environment = get(process, 'env.NODE_ENV', 'development');
|
|
23
|
+
|
|
24
|
+
let configService: ConfigService<any>;
|
|
25
|
+
|
|
26
|
+
type TClass<T> = new (partial: Partial<T>) => T;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This is a **Forced Singleton**.
|
|
30
|
+
* This means that even if you try to create
|
|
31
|
+
* another ConfigService, you'll always get the
|
|
32
|
+
* first one.
|
|
33
|
+
*/
|
|
34
|
+
export class ConfigService<T extends Config> {
|
|
35
|
+
private readonly mode: string = environment;
|
|
36
|
+
readonly options: IConfigServiceOptions;
|
|
37
|
+
readonly config?: T;
|
|
38
|
+
readonly genericClass?: TClass<T>;
|
|
39
|
+
readonly fileName?: string;
|
|
40
|
+
readonly jsonSchemaFullname?: string;
|
|
41
|
+
readonly defaultConfigFilePath?: string;
|
|
42
|
+
readonly configFileName: string = '';
|
|
43
|
+
readonly configFilePath?: string;
|
|
44
|
+
readonly configFileRoot?: string;
|
|
45
|
+
readonly appRoot: string;
|
|
46
|
+
|
|
47
|
+
constructor(givenClass: TClass<T>, passedConfig?: Partial<T>, options: IConfigServiceOptions = {}) {
|
|
48
|
+
this.options = options;
|
|
49
|
+
console.log('looking for root');
|
|
50
|
+
this.appRoot = this.findRoot();
|
|
51
|
+
console.log('found root');
|
|
52
|
+
if (!passedConfig && configService) { return configService; }
|
|
53
|
+
|
|
54
|
+
this.genericClass = givenClass;
|
|
55
|
+
this.fileName = chain(this.genericClass.name)
|
|
56
|
+
.replace(/Config$/i, '')
|
|
57
|
+
.kebabCase()
|
|
58
|
+
.value();
|
|
59
|
+
this.jsonSchemaFullname = `.${ this.fileName }.env.schema.json`;
|
|
60
|
+
|
|
61
|
+
this.configFileName = `${ this.fileName }.${ environment }.env.json`;
|
|
62
|
+
|
|
63
|
+
this.configFileRoot = this.findConfigRoot();
|
|
64
|
+
|
|
65
|
+
this.defaultConfigFilePath = join(this.configFileRoot, `defaults.env.json`);
|
|
66
|
+
this.configFilePath = join(this.configFileRoot, `${ this.fileName }.${ environment }.env.json`);
|
|
67
|
+
|
|
68
|
+
nconf
|
|
69
|
+
.argv({
|
|
70
|
+
parseValues: true
|
|
71
|
+
})
|
|
72
|
+
.env({
|
|
73
|
+
parseValues: true,
|
|
74
|
+
transform: this.options.convertToCamelCase ? transformToCamelCase : undefined
|
|
75
|
+
})
|
|
76
|
+
.file('defaults', { file: this.defaultConfigFilePath })
|
|
77
|
+
.file('environment', { file: this.configFilePath });
|
|
78
|
+
|
|
79
|
+
const config = passedConfig || nconf.get();
|
|
80
|
+
const envConfig = this.validateInput(config);
|
|
81
|
+
|
|
82
|
+
this.config = new this.genericClass(envConfig as T);
|
|
83
|
+
|
|
84
|
+
if (config.saveToFile) {
|
|
85
|
+
const plainConfig = classToPlain(this.config);
|
|
86
|
+
plainConfig['$schema'] = `./${ this.jsonSchemaFullname }`;
|
|
87
|
+
const orderedKeys = Object.keys(plainConfig).sort().reduce(
|
|
88
|
+
(obj: { [key: string]: string }, key) => {
|
|
89
|
+
if (key === '$schema' || !key.startsWith('$')) {
|
|
90
|
+
obj[key] = plainConfig[key];
|
|
91
|
+
}
|
|
92
|
+
return obj;
|
|
93
|
+
},
|
|
94
|
+
{}
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
writeJson(this.configFilePath, orderedKeys, { spaces: 2 });
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const schema = this.config.toJsonSchema();
|
|
101
|
+
writeJSONSync(join(this.configFileRoot, '/', this.jsonSchemaFullname), schema);
|
|
102
|
+
|
|
103
|
+
configService = this;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
toPlainObject() {
|
|
107
|
+
return classToPlain(this);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private findRoot() {
|
|
111
|
+
return findRoot(__dirname, (dir) => {
|
|
112
|
+
const packagePath = join(dir, 'package.json');
|
|
113
|
+
const isPackageJsonExists = pathExistsSync(packagePath);
|
|
114
|
+
|
|
115
|
+
if (isPackageJsonExists) {
|
|
116
|
+
const packageContent = readJSONSync(packagePath, { encoding: 'utf8' });
|
|
117
|
+
if (![''].includes(packageContent.name)) {
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return false;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private findConfigRoot() {
|
|
127
|
+
try {
|
|
128
|
+
return findRoot(__dirname, (dir) => {
|
|
129
|
+
const fileNames = readdirSync(dir);
|
|
130
|
+
const isConfigFileExists = fileNames.includes(this.configFileName);
|
|
131
|
+
return isConfigFileExists;
|
|
132
|
+
});
|
|
133
|
+
} catch (error) {
|
|
134
|
+
console.error('pizza!');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Ensures all needed variables are set, and returns the validated JavaScript object
|
|
140
|
+
* including the applied default values.
|
|
141
|
+
*/
|
|
142
|
+
private validateInput(
|
|
143
|
+
envConfig: Partial<T>
|
|
144
|
+
): Partial<T> {
|
|
145
|
+
if (!this.genericClass) throw new Error('something went wrong');
|
|
146
|
+
const configInstance = new this.genericClass(envConfig);
|
|
147
|
+
const validationErrors = validateSync(configInstance);
|
|
148
|
+
|
|
149
|
+
if (validationErrors.length > 0) {
|
|
150
|
+
console.log(validationErrors);
|
|
151
|
+
throw new ConfigValidationError(validationErrors, configInstance);
|
|
152
|
+
}
|
|
153
|
+
return classToPlain(configInstance) as Partial<T>;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function transformToCamelCase(obj: { key: string; value: string }) {
|
|
158
|
+
const camelCasedKey = camelCase(obj.key);
|
|
159
|
+
|
|
160
|
+
obj.key = camelCasedKey;
|
|
161
|
+
|
|
162
|
+
return camelCasedKey && obj;
|
|
163
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ValidatorConstraint,
|
|
3
|
+
ValidatorConstraintInterface
|
|
4
|
+
} from 'class-validator';
|
|
5
|
+
|
|
6
|
+
@ValidatorConstraint({ name: 'JsonSchema', async: false })
|
|
7
|
+
export class JsonSchema implements ValidatorConstraintInterface {
|
|
8
|
+
validate() {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
defaultMessage() {
|
|
13
|
+
return '';
|
|
14
|
+
}
|
|
15
|
+
}
|