@mimik/configuration 6.0.1 → 6.0.3

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/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
@@ -408,7 +408,7 @@ const checkConfig = (config) => {
408
408
  * | ----------------- | ----------- | ----- | -------- |
409
409
  * | NODE_ENV | environnment of the microservice |
410
410
  */
411
- const isProd = () => {
411
+ export const isProd = () => {
412
412
  if (isString(process.env.NODE_ENV)) return includes(PRODUCTIONS, process.env.NODE_ENV.toLowerCase());
413
413
  return false;
414
414
  };
@@ -700,7 +700,7 @@ configuration.locationProvider = setupLocationProvider();
700
700
  * | REDIS_SOCKET_KEEPALIVE | keep long running connections alive for x seconds | 5000 | in seconds
701
701
  * | REDIS_DISABLE_OFFLINE_QUEUE | queuing event when not connected | no |
702
702
  */
703
- const setConfig = (pack, options) => {
703
+ export const setConfig = (pack, options) => {
704
704
  process.env.SERVER_VERSION = pack.version;
705
705
  process.env.SERVER_NAME = pack.name;
706
706
  if (pack.mimik) process.env.SERVER_TYPE = pack.mimik.type;
@@ -804,7 +804,7 @@ const setConfig = (pack, options) => {
804
804
  return configuration;
805
805
  };
806
806
 
807
- export {
807
+ export default {
808
808
  setConfig,
809
809
  isProd,
810
810
  };
@@ -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: {
@@ -26,16 +27,16 @@ const config = {
26
27
  url: 'test-url',
27
28
  },
28
29
  'test-pack-type': {
29
- audience: 'test=pack-type-audience',
30
+ audience: 'test-pack-type-audience',
30
31
  },
31
32
  },
32
33
  security: {
33
34
  server: {
34
- id: 'test-id',
35
- secret: 'test-secret',
36
- accessKey: 'test-access-key',
37
- audience: 'test-scurity-audience',
38
- issuer: 'test-issuer',
35
+ id: 'test-security-id',
36
+ secret: 'test-security-secret',
37
+ accessKey: 'test-security-access-key',
38
+ audience: 'test-security-audience',
39
+ issuer: 'test-security-issuer',
39
40
  },
40
41
  },
41
42
  serverSettings: {
@@ -10,12 +10,12 @@ import process from 'process';
10
10
  * | Env variable name | Description | Default | Comments |
11
11
  * | ----------------- | ----------- | ------- | -------- |
12
12
  * | DATABASE_NAME | name of the database to use for mongodb
13
- * | MONGO_REPLICAT_SET | test for Boolean()
13
+ * | MONGO_REPLICAT_SET | set to a value for Boolean()
14
14
  * | SUMO_LOGIC_ENDPOINT | dummy endpoint for sumologic
15
15
  * | SUMO_LOGIC_COLLECTOR_CODE | dummy collector code for sumologic
16
16
  */
17
17
 
18
18
  process.env.DATABASE_NAME = 'test-database-name';
19
19
  process.env.MONGO_REPLICAT_SET = 'test-mongo-replicat-set';
20
- process.env.SUMO_LOGIC_ENDPOINT = 'test-logIngo-sumologic-endpoint';
20
+ process.env.SUMO_LOGIC_ENDPOINT = 'test-logInfo-sumologic-endpoint';
21
21
  process.env.SUMO_LOGIC_COLLECTOR_CODE = 'test-logInfo-sumologic-code';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/configuration",
3
- "version": "6.0.1",
3
+ "version": "6.0.3",
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
  }