@mimik/configuration 6.0.2 → 6.0.4
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/README.md +2 -0
- package/eslint.config.js +1 -1
- package/index.js +5 -3
- package/manual-test/test-config.js +1 -0
- package/package.json +10 -10
package/README.md
CHANGED
package/eslint.config.js
CHANGED
package/index.js
CHANGED
|
@@ -107,6 +107,8 @@ const ISSUE_EXIT = 1;
|
|
|
107
107
|
* @module configuration
|
|
108
108
|
* @example
|
|
109
109
|
* import config from '@mimik/configuration';
|
|
110
|
+
* or
|
|
111
|
+
* import { setConfig, isProd } from '@mimik/configuration';
|
|
110
112
|
*/
|
|
111
113
|
|
|
112
114
|
let display = true;
|
|
@@ -408,7 +410,7 @@ const checkConfig = (config) => {
|
|
|
408
410
|
* | ----------------- | ----------- | ----- | -------- |
|
|
409
411
|
* | NODE_ENV | environnment of the microservice |
|
|
410
412
|
*/
|
|
411
|
-
const isProd = () => {
|
|
413
|
+
export const isProd = () => {
|
|
412
414
|
if (isString(process.env.NODE_ENV)) return includes(PRODUCTIONS, process.env.NODE_ENV.toLowerCase());
|
|
413
415
|
return false;
|
|
414
416
|
};
|
|
@@ -700,7 +702,7 @@ configuration.locationProvider = setupLocationProvider();
|
|
|
700
702
|
* | REDIS_SOCKET_KEEPALIVE | keep long running connections alive for x seconds | 5000 | in seconds
|
|
701
703
|
* | REDIS_DISABLE_OFFLINE_QUEUE | queuing event when not connected | no |
|
|
702
704
|
*/
|
|
703
|
-
const setConfig = (pack, options) => {
|
|
705
|
+
export const setConfig = (pack, options) => {
|
|
704
706
|
process.env.SERVER_VERSION = pack.version;
|
|
705
707
|
process.env.SERVER_NAME = pack.name;
|
|
706
708
|
if (pack.mimik) process.env.SERVER_TYPE = pack.mimik.type;
|
|
@@ -804,7 +806,7 @@ const setConfig = (pack, options) => {
|
|
|
804
806
|
return configuration;
|
|
805
807
|
};
|
|
806
808
|
|
|
807
|
-
export {
|
|
809
|
+
export default {
|
|
808
810
|
setConfig,
|
|
809
811
|
isProd,
|
|
810
812
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/configuration",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
4
4
|
"description": "Common configuration for mimik services",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"url": "https://bitbucket.org/mimiktech/configuration"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@mimik/request-helper": "^2.0.
|
|
34
|
-
"@mimik/sumologic-winston-logger": "^2.0.
|
|
35
|
-
"@mimik/user-filters": "^2.0.
|
|
33
|
+
"@mimik/request-helper": "^2.0.2",
|
|
34
|
+
"@mimik/sumologic-winston-logger": "^2.0.3",
|
|
35
|
+
"@mimik/user-filters": "^2.0.4",
|
|
36
36
|
"ip": "2.0.1",
|
|
37
37
|
"lodash.includes": "4.3.0",
|
|
38
38
|
"lodash.isnan": "3.0.2",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"uuid": "11.1.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@eslint/js": "9.
|
|
48
|
-
"@mimik/eslint-plugin-document-env": "^2.0.
|
|
49
|
-
"@stylistic/eslint-plugin": "
|
|
50
|
-
"eslint": "9.
|
|
51
|
-
"eslint-plugin-import": "2.
|
|
47
|
+
"@eslint/js": "9.31.0",
|
|
48
|
+
"@mimik/eslint-plugin-document-env": "^2.0.8",
|
|
49
|
+
"@stylistic/eslint-plugin": "5.2.0",
|
|
50
|
+
"eslint": "9.31.0",
|
|
51
|
+
"eslint-plugin-import": "2.32.0",
|
|
52
52
|
"husky": "9.1.7",
|
|
53
|
-
"jsdoc-to-markdown": "9.1.
|
|
53
|
+
"jsdoc-to-markdown": "9.1.2"
|
|
54
54
|
}
|
|
55
55
|
}
|