@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 CHANGED
@@ -4,6 +4,8 @@
4
4
  **Example**
5
5
  ```js
6
6
  import config from '@mimik/configuration';
7
+ or
8
+ import { setConfig, isProd } from '@mimik/configuration';
7
9
  ```
8
10
 
9
11
  * [configuration](#module_configuration)
package/eslint.config.js CHANGED
@@ -16,7 +16,7 @@ export default [
16
16
  ignores: ['mochawesome-report/**', 'node_modules/**', 'dist/**'],
17
17
  },
18
18
  importPlugin.flatConfigs.recommended,
19
- stylistic.configs['recommended-flat'],
19
+ stylistic.configs.recommended,
20
20
  js.configs.all,
21
21
  {
22
22
  plugins: {
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
  };
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable no-console */
2
2
  import './testEnv.js';
3
3
  import { setConfig } from '../index.js';
4
+ // import Config from '../index.js';
4
5
 
5
6
  const pack = {
6
7
  swaggerFile: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/configuration",
3
- "version": "6.0.2",
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.1",
34
- "@mimik/sumologic-winston-logger": "^2.0.2",
35
- "@mimik/user-filters": "^2.0.1",
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.23.0",
48
- "@mimik/eslint-plugin-document-env": "^2.0.5",
49
- "@stylistic/eslint-plugin": "4.2.0",
50
- "eslint": "9.23.0",
51
- "eslint-plugin-import": "2.31.0",
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.1"
53
+ "jsdoc-to-markdown": "9.1.2"
54
54
  }
55
55
  }