@spinajs/configuration 2.0.179 → 2.0.181

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.
@@ -1 +1 @@
1
- {"version":3,"file":"sources.js","sourceRoot":"","sources":["../../src/sources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAA6C;AAC7C,gDAAwB;AACxB,oDAAsC;AACtC,+BAAgD;AAChD,uCAAsD;AACtD,uCAAyB;AACzB,2CAA6B;AAC7B,8DAA0D;AAC1D,wEAAgG;AAMhG,MAAsB,cAAe,SAAQ,0CAAmB;IAU9D,IAAW,KAAK;QACd,OAAO,CAAC,CAAC;IACX,CAAC;IAED,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;QAb5G;;WAEG;QACI,YAAO,GAAG,IAAI,CAAC;QAEZ,eAAU,GAAa,EAAE,CAAC;QAE1B,aAAQ,GAAG,EAAE,CAAC;QAStB,MAAM,SAAS,GAAG,OAAE,CAAC,GAAG,CAAU,aAAa,CAAC,CAAC;QAEjD,IAAI,CAAC,UAAU,GAAG;YAChB,wBAAwB;YACxB,IAAA,gBAAS,EAAC,IAAA,WAAI,EAAC,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;YAEzD,+BAA+B;YAC/B,IAAA,gBAAS,EACP,IAAA,WAAI,EACF,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EACtB,SAAS,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC,CAAC,wCAAwC,CAChG,CACF;YAED,wDAAwD;YACxD,IAAA,gBAAS,EAAC,IAAA,WAAI,EAAC,IAAA,cAAO,EAAC,OAAO,CAA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,OAAO,CAAC,KAAK,CAAC,oCAAoC,IAAI,cAAe,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC9F,OAAO,IAAI,CAAC;aACb;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAnBY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,eAAU,EAAC,0CAAmB,CAAC;GACnB,cAAc,CAmB1B"}
package/lib/cjs/util.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export declare function parseArgv(param: string): string;
2
- export declare function findBasePath(path: string): string;
3
- export declare function merge(to: unknown, from: unknown): unknown;
4
- export declare function mergeArrays(target: unknown[], source: unknown[]): unknown;
5
- export declare function uncache(file: string): string;
6
- export declare function filterDirs(dir: string): boolean;
1
+ export declare function parseArgv(param: string): string;
2
+ export declare function findBasePath(path: string): string;
3
+ export declare function merge(to: unknown, from: unknown): unknown;
4
+ export declare function mergeArrays(target: unknown[], source: unknown[]): unknown;
5
+ export declare function uncache(file: string): string;
6
+ export declare function filterDirs(dir: string): boolean;
7
7
  //# sourceMappingURL=util.d.ts.map
package/lib/cjs/util.js CHANGED
@@ -1,89 +1,89 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.filterDirs = exports.uncache = exports.mergeArrays = exports.merge = exports.findBasePath = exports.parseArgv = void 0;
30
- /* eslint-disable @typescript-eslint/no-unsafe-return */
31
- /* eslint-disable @typescript-eslint/unbound-method */
32
- const fs = __importStar(require("fs"));
33
- const lodash_1 = __importDefault(require("lodash"));
34
- const path_1 = require("path");
35
- function parseArgv(param) {
36
- const index = process.argv.indexOf(param);
37
- if (index === -1 || process.argv.length <= index + 1) {
38
- return undefined;
39
- }
40
- return process.argv[index + 1];
41
- }
42
- exports.parseArgv = parseArgv;
43
- function findBasePath(path) {
44
- if (fs.existsSync((0, path_1.join)(path, 'node_modules'))) {
45
- return path;
46
- }
47
- const parentPath = (0, path_1.dirname)(path);
48
- // if we reach root eg c:\
49
- // and nothing is found return null
50
- if (parentPath === path) {
51
- return null;
52
- }
53
- return findBasePath((0, path_1.resolve)(path, '..'));
54
- }
55
- exports.findBasePath = findBasePath;
56
- function merge(to, from) {
57
- lodash_1.default.mergeWith(to, from, (src, dest) => {
58
- if (lodash_1.default.isArray(src) && lodash_1.default.isArray(dest)) {
59
- const tmp = src.concat(dest);
60
- return lodash_1.default.uniqWith(tmp, lodash_1.default.isEqual);
61
- }
62
- else if (!src) {
63
- return dest;
64
- }
65
- });
66
- return to;
67
- }
68
- exports.merge = merge;
69
- function mergeArrays(target, source) {
70
- if (lodash_1.default.isArray(target)) {
71
- return target.concat(source);
72
- }
73
- }
74
- exports.mergeArrays = mergeArrays;
75
- // clean require cache config
76
- // http://stackoverflow.com/questions/9210542/node-js-require-cache-possible-to-invalidate
77
- function uncache(file) {
78
- delete require.cache[`${file}`];
79
- return file;
80
- }
81
- exports.uncache = uncache;
82
- function filterDirs(dir) {
83
- if (fs.existsSync(dir)) {
84
- return true;
85
- }
86
- return false;
87
- }
88
- exports.filterDirs = filterDirs;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.filterDirs = exports.uncache = exports.mergeArrays = exports.merge = exports.findBasePath = exports.parseArgv = void 0;
30
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
31
+ /* eslint-disable @typescript-eslint/unbound-method */
32
+ const fs = __importStar(require("fs"));
33
+ const lodash_1 = __importDefault(require("lodash"));
34
+ const path_1 = require("path");
35
+ function parseArgv(param) {
36
+ const index = process.argv.indexOf(param);
37
+ if (index === -1 || process.argv.length <= index + 1) {
38
+ return undefined;
39
+ }
40
+ return process.argv[index + 1];
41
+ }
42
+ exports.parseArgv = parseArgv;
43
+ function findBasePath(path) {
44
+ if (fs.existsSync((0, path_1.join)(path, 'node_modules'))) {
45
+ return path;
46
+ }
47
+ const parentPath = (0, path_1.dirname)(path);
48
+ // if we reach root eg c:\
49
+ // and nothing is found return null
50
+ if (parentPath === path) {
51
+ return null;
52
+ }
53
+ return findBasePath((0, path_1.resolve)(path, '..'));
54
+ }
55
+ exports.findBasePath = findBasePath;
56
+ function merge(to, from) {
57
+ lodash_1.default.mergeWith(to, from, (src, dest) => {
58
+ if (lodash_1.default.isArray(src) && lodash_1.default.isArray(dest)) {
59
+ const tmp = src.concat(dest);
60
+ return lodash_1.default.uniqWith(tmp, lodash_1.default.isEqual);
61
+ }
62
+ else if (!src) {
63
+ return dest;
64
+ }
65
+ });
66
+ return to;
67
+ }
68
+ exports.merge = merge;
69
+ function mergeArrays(target, source) {
70
+ if (lodash_1.default.isArray(target)) {
71
+ return target.concat(source);
72
+ }
73
+ }
74
+ exports.mergeArrays = mergeArrays;
75
+ // clean require cache config
76
+ // http://stackoverflow.com/questions/9210542/node-js-require-cache-possible-to-invalidate
77
+ function uncache(file) {
78
+ delete require.cache[`${file}`];
79
+ return file;
80
+ }
81
+ exports.uncache = uncache;
82
+ function filterDirs(dir) {
83
+ if (fs.existsSync(dir)) {
84
+ return true;
85
+ }
86
+ return false;
87
+ }
88
+ exports.filterDirs = filterDirs;
89
89
  //# sourceMappingURL=util.js.map
@@ -1,8 +1,8 @@
1
- declare const config: {
2
- configuration: {
3
- isDevelopment: boolean;
4
- isProduction: boolean;
5
- };
6
- };
7
- export default config;
1
+ declare const config: {
2
+ configuration: {
3
+ isDevelopment: boolean;
4
+ isProduction: boolean;
5
+ };
6
+ };
7
+ export default config;
8
8
  //# sourceMappingURL=configuration.d.ts.map
@@ -1,8 +1,8 @@
1
- const config = {
2
- configuration: {
3
- isDevelopment: process.env.NODE_ENV === 'development',
4
- isProduction: process.env.NODE_ENV === 'production',
5
- },
6
- };
7
- export default config;
1
+ const config = {
2
+ configuration: {
3
+ isDevelopment: process.env.NODE_ENV === 'development',
4
+ isProduction: process.env.NODE_ENV === 'production',
5
+ },
6
+ };
7
+ export default config;
8
8
  //# sourceMappingURL=configuration.js.map
@@ -1,82 +1,82 @@
1
- import { ConfigurationSource, Configuration, ConfigurationOptions, IConfigurationSchema } from '@spinajs/configuration-common';
2
- import { Class, Container } from '@spinajs/di';
3
- import './sources.js';
4
- /**
5
- * HACK:
6
- * Becouse of ajv not supporting esm default exports we need to
7
- * check for default export module property and if not provided use module itself
8
- */
9
- export declare class FrameworkConfiguration extends Configuration {
10
- /**
11
- * Apps configuration base dir, where to look for app config
12
- */
13
- AppBaseDir: string;
14
- /**
15
- * Current running app name
16
- */
17
- RunApp: string;
18
- /**
19
- * Loaded & merged configuration
20
- */
21
- protected Config: Record<string, unknown>;
22
- protected CustomConfigPaths: string[];
23
- protected Sources: ConfigurationSource[];
24
- /**
25
- * We ignore this error because ajv have problems with
26
- * commonjs / esm default exports
27
- */
28
- protected Validator: any;
29
- protected ValidationSchemas: IConfigurationSchema[];
30
- get RootConfig(): Record<string, unknown>;
31
- protected Container: Container;
32
- /**
33
- *
34
- * @param app - application name, pass it when you run in application mode
35
- * @param baseDir - configuration base dir, where to look for application configs
36
- * @param cfgCustomPaths - custom cfg paths eg. to load config from non standard folders ( usefull in tests )
37
- */
38
- constructor(options?: ConfigurationOptions);
39
- /**
40
- * Get config value for given property. If value not exists it returns default value, if default value is not provided returns undefined
41
- *
42
- * @param path - path to property eg. ["system","dirs"]
43
- * @param defaultValue - optional, if value at specified path not exists returns default value
44
- */
45
- get<T>(path: string[] | string, defaultValue?: T): T;
46
- /**
47
- * Sets at given path configuration value. Use when you want to override config
48
- * loaded from files programatically
49
- *
50
- * @param path - config path
51
- * @param value - value to set
52
- */
53
- set(path: string[] | string, value: unknown): void;
54
- /**
55
- * Merge existing config value with new options instead overriding
56
- *
57
- * @param path - cfg path
58
- * @param value - value to merge
59
- */
60
- merge(path: string[] | string, value: unknown): void;
61
- resolve(): Promise<void>;
62
- mergeSource(sType: Class<ConfigurationSource>): Promise<void>;
63
- /**
64
- * Reloads configuration data
65
- */
66
- load(): Promise<void>;
67
- protected onLoad(): unknown;
68
- protected loadSources(): void;
69
- protected validate(): void;
70
- protected initValidator(): void;
71
- protected dir(toJoin: string): string;
72
- /**
73
- * adds app dirs to system.dirs config
74
- */
75
- protected applyAppDirs(): void;
76
- /**
77
- * runs configuration func on files
78
- * eg. when you want to configure stuff at beginning eq. external libs
79
- */
80
- protected configure(): void;
81
- }
1
+ import { ConfigurationSource, Configuration, ConfigurationOptions, IConfigurationSchema } from '@spinajs/configuration-common';
2
+ import { Class, Container } from '@spinajs/di';
3
+ import './sources.js';
4
+ /**
5
+ * HACK:
6
+ * Becouse of ajv not supporting esm default exports we need to
7
+ * check for default export module property and if not provided use module itself
8
+ */
9
+ export declare class FrameworkConfiguration extends Configuration {
10
+ /**
11
+ * Apps configuration base dir, where to look for app config
12
+ */
13
+ AppBaseDir: string;
14
+ /**
15
+ * Current running app name
16
+ */
17
+ RunApp: string;
18
+ /**
19
+ * Loaded & merged configuration
20
+ */
21
+ protected Config: Record<string, unknown>;
22
+ protected CustomConfigPaths: string[];
23
+ protected Sources: ConfigurationSource[];
24
+ /**
25
+ * We ignore this error because ajv have problems with
26
+ * commonjs / esm default exports
27
+ */
28
+ protected Validator: any;
29
+ protected ValidationSchemas: IConfigurationSchema[];
30
+ get RootConfig(): Record<string, unknown>;
31
+ protected Container: Container;
32
+ /**
33
+ *
34
+ * @param app - application name, pass it when you run in application mode
35
+ * @param baseDir - configuration base dir, where to look for application configs
36
+ * @param cfgCustomPaths - custom cfg paths eg. to load config from non standard folders ( usefull in tests )
37
+ */
38
+ constructor(options?: ConfigurationOptions);
39
+ /**
40
+ * Get config value for given property. If value not exists it returns default value, if default value is not provided returns undefined
41
+ *
42
+ * @param path - path to property eg. ["system","dirs"]
43
+ * @param defaultValue - optional, if value at specified path not exists returns default value
44
+ */
45
+ get<T>(path: string[] | string, defaultValue?: T): T;
46
+ /**
47
+ * Sets at given path configuration value. Use when you want to override config
48
+ * loaded from files programatically
49
+ *
50
+ * @param path - config path
51
+ * @param value - value to set
52
+ */
53
+ set(path: string[] | string, value: unknown): void;
54
+ /**
55
+ * Merge existing config value with new options instead overriding
56
+ *
57
+ * @param path - cfg path
58
+ * @param value - value to merge
59
+ */
60
+ merge(path: string[] | string, value: unknown): void;
61
+ resolve(): Promise<void>;
62
+ mergeSource(sType: Class<ConfigurationSource>): Promise<void>;
63
+ /**
64
+ * Reloads configuration data
65
+ */
66
+ load(): Promise<void>;
67
+ protected onLoad(): unknown;
68
+ protected loadSources(): void;
69
+ protected validate(): void;
70
+ protected initValidator(): void;
71
+ protected dir(toJoin: string): string;
72
+ /**
73
+ * adds app dirs to system.dirs config
74
+ */
75
+ protected applyAppDirs(): void;
76
+ /**
77
+ * runs configuration func on files
78
+ * eg. when you want to configure stuff at beginning eq. external libs
79
+ */
80
+ protected configure(): void;
81
+ }
82
82
  //# sourceMappingURL=configuration.d.ts.map