@mimik/configuration 5.0.11 → 5.0.13
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 +1 -2
- package/index.js +34 -29
- package/lib/common.js +11 -7
- package/package.json +17 -12
package/README.md
CHANGED
|
@@ -98,6 +98,7 @@ The following environement variables are being used for the configuration:
|
|
|
98
98
|
| MIT_AUDIENCE | audience of mIT | | dependencies.mIT.audience | [2]
|
|
99
99
|
| REGISTRATION_SET | swicht to enable user of registration | on | registration.set | can be `on` or `off`
|
|
100
100
|
| REGISTRATION_RETRY | retry time for registering to mIT | 3000 | registration.retry | in milliseconds
|
|
101
|
+
| REGISTRATION_AFTER_POSTOPS_SET | switch to set the registration of execution the postOps | off | registratiom.afterPostOpsSet | can be `on` or `off`
|
|
101
102
|
| `$_URL`.toUpperCase() | cluster information | self | dependencies.`(SERVER_TYPE)`.url | should not be used
|
|
102
103
|
| `${configuration.serverSettings.type}_AUDIENCE`.toUpperCase() | cluster information | | dependencies.`(SERVER_TYPE)`.audience | [2], but should not be used
|
|
103
104
|
|
|
@@ -161,8 +162,6 @@ When `mongodb` is used the following environment variables are used for the conf
|
|
|
161
162
|
| MONGO_REPLICAT_SET | specifies the name of the replica set, if the mongod is a member of a replica set | | not mandatory
|
|
162
163
|
| MONGO_WAIT_QUEUE_MULTIPLE | a number that the driver multiples the maxPoolSize value to, to provide the maximum number of threads allowed to wait for a connection to become available from the pool | | no mandatory
|
|
163
164
|
| MONGO_WAIT_QUEUE_TIMEOUT | the maximum time in milliseconds that a thread can wait for a connection to become available | | not mandatory
|
|
164
|
-
| MONGO_KEEP_ALIVE | pall th kep the connection with the database alive | true |
|
|
165
|
-
| MONGO_KEEP_ALIVE_INITIAL_DELAY | is the number of milliseconds to wait before initiating keepAlive on the socket | 300000 | in milliseconds
|
|
166
165
|
| MONGO_SOCKET_TIMEOUT | The time in milliseconds to attempt a send or receive on a socket before the attempt times out | 20000 | in milliseconds
|
|
167
166
|
| MONGO_FAMILY | IP address family | 4 | 4 -> IPV4, 6 -> IPV6
|
|
168
167
|
| MONGO_SERVER_SELECTION_TIMEOUT | the MongoDB driver will try to find a server to send any given operation to, and keep retrying for serverSelectionTimeoutMS milliseconds | 30000 | in milliseconds
|
package/index.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/* eslint no-process-env: "off" */
|
|
2
|
-
const
|
|
2
|
+
const includes = require('lodash.includes');
|
|
3
|
+
const isNaN = require('lodash.isnan');
|
|
4
|
+
const isNil = require('lodash.isnil');
|
|
5
|
+
const isString = require('lodash.isstring');
|
|
6
|
+
const isUndefined = require('lodash.isundefined');
|
|
7
|
+
const split = require('lodash.split');
|
|
8
|
+
const trim = require('lodash.trim');
|
|
3
9
|
const fs = require('fs');
|
|
4
10
|
const ip = require('ip');
|
|
5
11
|
const uuid = require('uuid');
|
|
@@ -56,8 +62,6 @@ const {
|
|
|
56
62
|
DEFAULT_MONGO_MAX_POOL_SIZE,
|
|
57
63
|
DEFAULT_MONGO_MIN_POOL_SIZE,
|
|
58
64
|
DEFAULT_MONGO_MAX_IDLE_TIME,
|
|
59
|
-
DEFAULT_MONGO_KEEP_ALIVE,
|
|
60
|
-
DEFAULT_MONGO_KEEP_ALIVE_INITIAL_DELAY,
|
|
61
65
|
DEFAULT_MONGO_SOCKET_TIMEOUT,
|
|
62
66
|
DEFAULT_MONGO_FAMILY,
|
|
63
67
|
DEFAULT_MONGO_SERVER_SELECTION_TIMEOUT,
|
|
@@ -84,6 +88,7 @@ const {
|
|
|
84
88
|
DEFAULT_TOPIC_SET,
|
|
85
89
|
DEFAULT_REGISTRATION_SET,
|
|
86
90
|
DEFAULT_REGISTRATION_RETRY,
|
|
91
|
+
DEFAULT_REGISTRATION_AFTER_POSTOPS_SET,
|
|
87
92
|
DEFAULT_REQUEST_TIMEOUT,
|
|
88
93
|
DEFAULT_SERVER_PUBLIC_PROTOCOL,
|
|
89
94
|
DEFAULT_SERVER_PUBLIC_DOMAIN_NAME,
|
|
@@ -94,6 +99,8 @@ const {
|
|
|
94
99
|
DEFAULT_INTERCEPT_ERROR,
|
|
95
100
|
DEFAULT_BITBUCKET_USERNAME,
|
|
96
101
|
DEFAULT_BITBUCKET_PASSWORD,
|
|
102
|
+
YES,
|
|
103
|
+
NO,
|
|
97
104
|
} = require('./lib/common');
|
|
98
105
|
|
|
99
106
|
let display = true;
|
|
@@ -145,7 +152,7 @@ const setupRedis = () => {
|
|
|
145
152
|
}
|
|
146
153
|
return undefined;
|
|
147
154
|
},
|
|
148
|
-
disableOfflineQueue: (process.env.REDIS_DISABLE_OFFLINE_QUEUE ===
|
|
155
|
+
disableOfflineQueue: (process.env.REDIS_DISABLE_OFFLINE_QUEUE === YES) || DEFAULT_REDIS_DISABLE_OFFLINE_QUEUE,
|
|
149
156
|
},
|
|
150
157
|
maxMemory: process.env.REDIS_REQUEST_MAX_MEMORY || DEFAULT_REDIS_REQUEST_MAX_MEMORY,
|
|
151
158
|
maxMemoryPolicy: process.env.REDIS_REQUEST_MAX_MEMORY_POLICY || DEFAULT_REDIS_REQUEST_MAX_MEMORY_POLICY,
|
|
@@ -181,17 +188,17 @@ const setupDynamo = (dbOpts) => {
|
|
|
181
188
|
},
|
|
182
189
|
tableName: dbOpts.table,
|
|
183
190
|
};
|
|
184
|
-
if (!
|
|
185
|
-
if (!
|
|
191
|
+
if (!isNil(process.env.DYNAMODB_AWS_ACCESS_KEY_ID)) dbConfig.accessKeyId = process.env.DYNAMODB_AWS_ACCESS_KEY_ID;
|
|
192
|
+
if (!isNil(process.env.DYNAMODB_AWS_SECRET_ACCESS_KEY)) dbConfig.secretAccessKey = process.env.DYNAMODB_AWS_SECRET_ACCESS_KEY;
|
|
186
193
|
|
|
187
194
|
if (process.env.DYNAMO_SCHEMA_THROUGHPUT === 'ON_DEMAND') {
|
|
188
195
|
dbConfig.schemaThroughput = process.env.DYNAMO_SCHEMA_THROUGHPUT;
|
|
189
196
|
delete dbConfig.throughput;
|
|
190
197
|
}
|
|
191
|
-
else if (!
|
|
198
|
+
else if (!isNil(process.env.DYNAMO_SCHEMA_THROUGHPUT)) {
|
|
192
199
|
const throughput = parseInt(process.env.DYNAMO_SCHEMA_THROUGHPUT, 10);
|
|
193
200
|
|
|
194
|
-
if (
|
|
201
|
+
if (isNil(throughput) || isNaN(throughput)) dbConfig.schemaThroughput = DEFAULT_DYNAMO_THROUGHPUT;
|
|
195
202
|
else dbConfig.schemaThroughput = throughput;
|
|
196
203
|
}
|
|
197
204
|
return dbConfig;
|
|
@@ -206,9 +213,9 @@ const setupMongo = (dbOpts) => {
|
|
|
206
213
|
maxIdleTimeMS: parseInt(process.env.MONGO_MAX_IDLE_TIME, 10) || DEFAULT_MONGO_MAX_IDLE_TIME,
|
|
207
214
|
};
|
|
208
215
|
// string variables without default
|
|
209
|
-
if (process.env.MONGO_SSL ===
|
|
210
|
-
if (process.env.MONGO_SSL_VALIDATE ===
|
|
211
|
-
if (process.env.MONGO_SSL_ALLOW_INVALID_HOSTNAMES ===
|
|
216
|
+
if (process.env.MONGO_SSL === YES) stringOptions.ssl = true; // default value of mongo driver is false
|
|
217
|
+
if (process.env.MONGO_SSL_VALIDATE === NO) stringOptions.sslValidate = false; // default value of mongo driver is true, if ssl is true
|
|
218
|
+
if (process.env.MONGO_SSL_ALLOW_INVALID_HOSTNAMES === YES) stringOptions.allowInvalidHostnames = true;
|
|
212
219
|
// if (process.env.MONGO_SSL_CA) stringOptions.sslCA = process.env.MONGO_SSL_CA; // commented out for now as we're not using a pem file at the moment
|
|
213
220
|
if (process.env.MONGO_REPLICAT_SET) stringOptions.replicaSet = process.env.MONGO_REPLICAT_SET;
|
|
214
221
|
if (process.env.MONGO_AUTH_DATABASE) stringOptions.authSource = process.env.MONGO_AUTH_DATABASE;
|
|
@@ -226,7 +233,7 @@ const setupMongo = (dbOpts) => {
|
|
|
226
233
|
const user = process.env.DATABASE_USER || DEFAULT_DATABASE_USER;
|
|
227
234
|
const password = process.env.DATABASE_PASSWORD || DEFAULT_DATABASE_PASSWORD;
|
|
228
235
|
const qs = processStringOptions();
|
|
229
|
-
let url = (process.env.MONGO_USE_SRV ===
|
|
236
|
+
let url = (process.env.MONGO_USE_SRV === YES) ? MONGO_BASE_URL_SRV : MONGO_BASE_URL;
|
|
230
237
|
let noAuthUrl = url;
|
|
231
238
|
|
|
232
239
|
if (user && password) url = `${url}${user}:${password}@`;
|
|
@@ -251,8 +258,6 @@ const setupMongo = (dbOpts) => {
|
|
|
251
258
|
noAuthUrl,
|
|
252
259
|
options: {
|
|
253
260
|
family: parseInt(process.env.MONGO_FAMILY, 10) || DEFAULT_MONGO_FAMILY,
|
|
254
|
-
keepAlive: process.env.MONGO_KEEP_ALIVE || DEFAULT_MONGO_KEEP_ALIVE,
|
|
255
|
-
keepAliveInitialDelay: parseInt(process.env.MONGO_KEEP_ALIVE_INITIAL_DELAY, 10) || DEFAULT_MONGO_KEEP_ALIVE_INITIAL_DELAY,
|
|
256
261
|
socketTimeoutMS: parseInt(process.env.MONGO_SOCKET_TIMEOUT, 10) || DEFAULT_MONGO_SOCKET_TIMEOUT,
|
|
257
262
|
serverSelectionTimeoutMS: parseInt(process.env.MONGO_SERVER_SELECTION_TIMEOUT, 10) || DEFAULT_MONGO_SERVER_SELECTION_TIMEOUT,
|
|
258
263
|
heartbeatFrequencyMS: parseInt(process.env.MONGO_HEARTBEAT_FREQUENCY, 10) || DEFAULT_MONGO_HEARTBEAT_FREQUENCY,
|
|
@@ -264,7 +269,7 @@ const setupLocationProvider = () => {
|
|
|
264
269
|
const url = process.env.LOCATION_PROVIDER;
|
|
265
270
|
|
|
266
271
|
if (!url) return NO_PUBLIC_PROVIDER;
|
|
267
|
-
if (
|
|
272
|
+
if (includes(locParams, url)) return url;
|
|
268
273
|
const locationProvider = { url };
|
|
269
274
|
|
|
270
275
|
if (process.env.LOCATION_PROVIDER_KEY) locationProvider.key = process.env.LOCATION_PROVIDER_KEY;
|
|
@@ -297,8 +302,8 @@ const setupLog = () => {
|
|
|
297
302
|
maxSize: parseInt(process.env.S3_AWS_MAX_SIZE, 10) || DEFAULT_S3_AWS_MAX_SIZE,
|
|
298
303
|
maxEvents: parseInt(process.env.S3_AWS_MAX_EVENTS, 10) || DEFAULT_S3_AWS_MAX_EVENTS,
|
|
299
304
|
};
|
|
300
|
-
if (!
|
|
301
|
-
if (!
|
|
305
|
+
if (!isNil(process.env.S3_AWS_ACCESS_KEY_ID)) logInfo[AWS_S3].accessKeyId = process.env.S3_AWS_ACCESS_KEY_ID;
|
|
306
|
+
if (!isNil(process.env.S3_AWS_SECRET_ACCESS_KEY)) logInfo[AWS_S3].secretAccessKey = process.env.S3_AWS_SECRET_ACCESS_KEY;
|
|
302
307
|
}
|
|
303
308
|
return logInfo;
|
|
304
309
|
};
|
|
@@ -307,13 +312,13 @@ const setupTopic = (topicOpts) => {
|
|
|
307
312
|
const topicConfig = {
|
|
308
313
|
region: process.env.SNS_AWS_REGION || DEFAULT_AWS_REGION,
|
|
309
314
|
name: topicOpts.name,
|
|
310
|
-
isFifoTopic: process.env.SET_SNS_TOPIC_FIFO ===
|
|
315
|
+
isFifoTopic: process.env.SET_SNS_TOPIC_FIFO === YES,
|
|
311
316
|
contentBasedDeduplication: false,
|
|
312
317
|
};
|
|
313
318
|
|
|
314
|
-
if (topicConfig.isFifoTopic) topicConfig.contentBasedDeduplication = process.env.SET_SNS_CONTENT_DEDUPLICATION ===
|
|
315
|
-
if (!
|
|
316
|
-
if (!
|
|
319
|
+
if (topicConfig.isFifoTopic) topicConfig.contentBasedDeduplication = process.env.SET_SNS_CONTENT_DEDUPLICATION === YES;
|
|
320
|
+
if (!isNil(process.env.SNS_AWS_ACCESS_KEY_ID)) topicConfig.accessKeyId = process.env.SNS_AWS_ACCESS_KEY_ID;
|
|
321
|
+
if (!isNil(process.env.SNS_AWS_SECRET_ACCESS_KEY)) topicConfig.secretAccessKey = process.env.SNS_AWS_SECRET_ACCESS_KEY;
|
|
317
322
|
|
|
318
323
|
return topicConfig;
|
|
319
324
|
};
|
|
@@ -331,8 +336,8 @@ const setupEncryption = (encryptionOpts) => {
|
|
|
331
336
|
encryptionConfig.region = process.env.MASTER_KEY_AWS_REGION || DEFAULT_AWS_REGION;
|
|
332
337
|
encryptionConfig.masterKeyARN = process.env.MASTER_KEY_ARN;
|
|
333
338
|
|
|
334
|
-
if (!
|
|
335
|
-
if (!
|
|
339
|
+
if (!isNil(process.env.ENCRYPTION_ACCESS_KEY_ID)) encryptionConfig.aws.accessKeyId = process.env.ENCRYPTION_ACCESS_KEY_ID;
|
|
340
|
+
if (!isNil(process.env.ENCRYPTION_SECRET_ACCESS_KEY)) encryptionConfig.aws.secretAccessKey = process.env.ENCRYPTION_SECRET_ACCESS_KEY;
|
|
336
341
|
}
|
|
337
342
|
else encryptionConfig.localMasterKey = process.env.LOCAL_MASTER_KEY;
|
|
338
343
|
|
|
@@ -365,7 +370,7 @@ const checkConfig = (config) => {
|
|
|
365
370
|
if (typeof node[prop] === 'object' && node[prop]) {
|
|
366
371
|
traverseNodeSync(node[prop], `${path}.${prop}`);
|
|
367
372
|
}
|
|
368
|
-
else if (
|
|
373
|
+
else if (isUndefined(node[prop])) errors.push({ reason: 'missing', value: `${path}.${prop}` });
|
|
369
374
|
});
|
|
370
375
|
}
|
|
371
376
|
|
|
@@ -395,7 +400,7 @@ const checkConfig = (config) => {
|
|
|
395
400
|
* | NODE_ENV | environnment of the microservice |
|
|
396
401
|
*/
|
|
397
402
|
const isProd = () => {
|
|
398
|
-
if (
|
|
403
|
+
if (isString(process.env.NODE_ENV)) return includes(PRODUCTIONS, process.env.NODE_ENV.toLowerCase());
|
|
399
404
|
return false;
|
|
400
405
|
};
|
|
401
406
|
|
|
@@ -415,7 +420,7 @@ const configuration = {
|
|
|
415
420
|
customerCodeSep: process.env.CUSTOMER_CODE ? CUSTOMER_CODE_SEP : '',
|
|
416
421
|
securitySet: process.env.SERVER_SECURITY_SET || DEFAULT_SERVER_SECURITY_SET,
|
|
417
422
|
isMSTSet,
|
|
418
|
-
port: process.env.SERVER_PORT,
|
|
423
|
+
port: parseInt(process.env.SERVER_PORT, 10),
|
|
419
424
|
interceptError: process.env.INTERCEPT_ERROR || DEFAULT_INTERCEPT_ERROR,
|
|
420
425
|
ip: {
|
|
421
426
|
local: process.env.SERVER_LOCAL_IPV4,
|
|
@@ -440,7 +445,7 @@ const configuration = {
|
|
|
440
445
|
key: process.env.OAUTH_GENERIC_KEY || NO_GENERIC,
|
|
441
446
|
audience: process.env.OAUTH_GENERIC_AUDIENCE || NO_GENERIC,
|
|
442
447
|
},
|
|
443
|
-
apiKeys: process.env.API_KEYS ?
|
|
448
|
+
apiKeys: process.env.API_KEYS ? split(trim(process.env.API_KEYS), /\s*,\s*/) : [],
|
|
444
449
|
},
|
|
445
450
|
cluster: {
|
|
446
451
|
management: process.env.CLUSTER_MANAGEMENT || DEFAULT_CLUSTER_MANAGEMENT,
|
|
@@ -467,6 +472,7 @@ const configuration = {
|
|
|
467
472
|
registration: {
|
|
468
473
|
set: process.env.REGISTRATION_SET || DEFAULT_REGISTRATION_SET,
|
|
469
474
|
retry: parseInt(process.env.REGISTRATION_RETRY, 10) || DEFAULT_REGISTRATION_RETRY,
|
|
475
|
+
afterPostOpsSet: process.env.REGISTRATION_AFTER_POSTOPS_SET || DEFAULT_REGISTRATION_AFTER_POSTOPS_SET,
|
|
470
476
|
},
|
|
471
477
|
};
|
|
472
478
|
|
|
@@ -564,6 +570,7 @@ configuration.locationProvider = setupLocationProvider();
|
|
|
564
570
|
* | MIT_AUDIENCE | audience of mIT | | dependencies.mIT.audience | [2]
|
|
565
571
|
* | REGISTRATION_SET | swicht to enable user of registration | on | registration.set | can be `on` or `off`
|
|
566
572
|
* | REGISTRATION_RETRY | retry time for registering to mIT | 3000 | registration.retry | in milliseconds
|
|
573
|
+
* | REGISTRATION_AFTER_POSTOPS_SET | switch to set the registration of execution the postOps | off | registratiom.afterPostOpsSet | can be `on` or `off`
|
|
567
574
|
* | `${configuration.serverSettings.type}_URL`.toUpperCase() | cluster information | self | dependencies.`(SERVER_TYPE)`.url | should not be used
|
|
568
575
|
* | `${configuration.serverSettings.type}_AUDIENCE`.toUpperCase() | cluster information | | dependencies.`(SERVER_TYPE)`.audience | [2], but should not be used
|
|
569
576
|
*
|
|
@@ -627,8 +634,6 @@ configuration.locationProvider = setupLocationProvider();
|
|
|
627
634
|
* | MONGO_REPLICAT_SET | specifies the name of the replica set, if the mongod is a member of a replica set | | not mandatory
|
|
628
635
|
* | MONGO_WAIT_QUEUE_MULTIPLE | a number that the driver multiples the maxPoolSize value to, to provide the maximum number of threads allowed to wait for a connection to become available from the pool | | no mandatory
|
|
629
636
|
* | MONGO_WAIT_QUEUE_TIMEOUT | the maximum time in milliseconds that a thread can wait for a connection to become available | | not mandatory
|
|
630
|
-
* | MONGO_KEEP_ALIVE | pall th kep the connection with the database alive | true |
|
|
631
|
-
* | MONGO_KEEP_ALIVE_INITIAL_DELAY | is the number of milliseconds to wait before initiating keepAlive on the socket | 300000 | in milliseconds
|
|
632
637
|
* | MONGO_SOCKET_TIMEOUT | The time in milliseconds to attempt a send or receive on a socket before the attempt times out | 20000 | in milliseconds
|
|
633
638
|
* | MONGO_FAMILY | IP address family | 4 | 4 -> IPV4, 6 -> IPV6
|
|
634
639
|
* | MONGO_SERVER_SELECTION_TIMEOUT | the MongoDB driver will try to find a server to send any given operation to, and keep retrying for serverSelectionTimeoutMS milliseconds | 30000 | in milliseconds
|
package/lib/common.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
const YES = 'yes';
|
|
2
|
+
const NO = 'no';
|
|
3
|
+
const LOCAL = 'local';
|
|
4
|
+
|
|
1
5
|
const SUMOLOGIC = 'sumologic';
|
|
2
6
|
const AWS_S3 = 'awsS3';
|
|
3
7
|
const ALL = 'all';
|
|
@@ -15,7 +19,7 @@ const SWAGGER_SEP = '_';
|
|
|
15
19
|
const CUSTOMER_CODE_SEP = '__';
|
|
16
20
|
const PRODUCTIONS = ['prod', 'production'];
|
|
17
21
|
|
|
18
|
-
const DEFAULT_ENV =
|
|
22
|
+
const DEFAULT_ENV = LOCAL;
|
|
19
23
|
const DEFAULT_LOCATION_PROVIDER = NO_PUBLIC_PROVIDER;
|
|
20
24
|
const DEFAULT_CLOUD_PROVIDER = 'noCloud';
|
|
21
25
|
const DEFAULT_CUSTOMER_CODE = '';
|
|
@@ -46,8 +50,6 @@ const DEFAULT_DYNAMO_THROUGHPUT = 1;
|
|
|
46
50
|
const DEFAULT_MONGO_MAX_POOL_SIZE = 10;
|
|
47
51
|
const DEFAULT_MONGO_MIN_POOL_SIZE = 0;
|
|
48
52
|
const DEFAULT_MONGO_MAX_IDLE_TIME = 30000; // in ms
|
|
49
|
-
const DEFAULT_MONGO_KEEP_ALIVE = true;
|
|
50
|
-
const DEFAULT_MONGO_KEEP_ALIVE_INITIAL_DELAY = 300000; // in ms
|
|
51
53
|
const DEFAULT_MONGO_SOCKET_TIMEOUT = 20000; // in ms
|
|
52
54
|
const DEFAULT_MONGO_FAMILY = 4; // 4 -> ipv4, 6 -> ipv6
|
|
53
55
|
const DEFAULT_MONGO_SERVER_SELECTION_TIMEOUT = 30000; // in ms
|
|
@@ -61,12 +63,12 @@ const DEFAULT_DATABASE_RECONNECTION_OFFSET = 5; // in seconds
|
|
|
61
63
|
const DEFAULT_DATABASE_VALIDATION_CHECK = 1000; // in ms
|
|
62
64
|
|
|
63
65
|
const DEFAULT_ENCRYPTION_SET = SET_OFF;
|
|
64
|
-
const DEFAULT_KMS_PROVIDER =
|
|
66
|
+
const DEFAULT_KMS_PROVIDER = LOCAL;
|
|
65
67
|
|
|
66
68
|
const DEFAULT_LOG_LEVEL = 'debug';
|
|
67
69
|
const DEFAULT_FILTER_FILE = NOT_SET;
|
|
68
70
|
const DEFAULT_EXIT_DELAY = 2000; // in ms
|
|
69
|
-
const DEFAULT_NO_STACK =
|
|
71
|
+
const DEFAULT_NO_STACK = YES;
|
|
70
72
|
|
|
71
73
|
const DEFAULT_USER_DEFINITIONS_FILE = NOT_SET;
|
|
72
74
|
|
|
@@ -79,6 +81,7 @@ const DEFAULT_CLUSTER_MANAGEMENT = SET_OFF;
|
|
|
79
81
|
const DEFAULT_CACHE_SET = SET_OFF;
|
|
80
82
|
const DEFAULT_TOPIC_SET = SET_OFF;
|
|
81
83
|
const DEFAULT_REGISTRATION_SET = SET_ON;
|
|
84
|
+
const DEFAULT_REGISTRATION_AFTER_POSTOPS_SET = SET_OFF;
|
|
82
85
|
const DEFAULT_INTERCEPT_ERROR = SET_ON;
|
|
83
86
|
|
|
84
87
|
const DEFAULT_REGISTRATION_RETRY = 3000; // in ms
|
|
@@ -102,6 +105,8 @@ module.exports = {
|
|
|
102
105
|
ALL,
|
|
103
106
|
SET_ON,
|
|
104
107
|
SET_OFF,
|
|
108
|
+
YES,
|
|
109
|
+
NO,
|
|
105
110
|
CUSTOMER_CODE_SEP,
|
|
106
111
|
NO_PUBLIC_PROVIDER,
|
|
107
112
|
NO_GENERIC,
|
|
@@ -138,8 +143,6 @@ module.exports = {
|
|
|
138
143
|
DEFAULT_MONGO_MAX_POOL_SIZE,
|
|
139
144
|
DEFAULT_MONGO_MIN_POOL_SIZE,
|
|
140
145
|
DEFAULT_MONGO_MAX_IDLE_TIME,
|
|
141
|
-
DEFAULT_MONGO_KEEP_ALIVE,
|
|
142
|
-
DEFAULT_MONGO_KEEP_ALIVE_INITIAL_DELAY,
|
|
143
146
|
DEFAULT_MONGO_SOCKET_TIMEOUT,
|
|
144
147
|
DEFAULT_MONGO_FAMILY,
|
|
145
148
|
DEFAULT_MONGO_SERVER_SELECTION_TIMEOUT,
|
|
@@ -166,6 +169,7 @@ module.exports = {
|
|
|
166
169
|
DEFAULT_TOPIC_SET,
|
|
167
170
|
DEFAULT_REGISTRATION_SET,
|
|
168
171
|
DEFAULT_REGISTRATION_RETRY,
|
|
172
|
+
DEFAULT_REGISTRATION_AFTER_POSTOPS_SET,
|
|
169
173
|
DEFAULT_REQUEST_TIMEOUT,
|
|
170
174
|
DEFAULT_SERVER_PUBLIC_PROTOCOL,
|
|
171
175
|
DEFAULT_SERVER_PUBLIC_DOMAIN_NAME,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/configuration",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.13",
|
|
4
4
|
"description": "Common configuration for mimik services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"test": "echo \"Error: no test specified\" && exit 0",
|
|
10
10
|
"test-ci": "echo \"Error: no test specified\" && exit 0",
|
|
11
11
|
"prepublishOnly": "npm run docs && npm run lint && npm run test-ci",
|
|
12
|
-
"commit-ready": "npm run docs && npm run lint && npm run test-ci"
|
|
13
|
-
"prepare": "husky install"
|
|
12
|
+
"commit-ready": "npm run docs && npm run lint && npm run test-ci"
|
|
14
13
|
},
|
|
15
14
|
"husky": {
|
|
16
15
|
"hooks": {
|
|
@@ -31,22 +30,28 @@
|
|
|
31
30
|
},
|
|
32
31
|
"dependencies": {
|
|
33
32
|
"@mimik/request-helper": "^1.7.10",
|
|
34
|
-
"@mimik/sumologic-winston-logger": "^1.6.
|
|
33
|
+
"@mimik/sumologic-winston-logger": "^1.6.21",
|
|
35
34
|
"@mimik/user-filters": "^1.3.7",
|
|
36
|
-
"ip": "2.0.
|
|
37
|
-
"lodash": "4.
|
|
38
|
-
"
|
|
35
|
+
"ip": "2.0.1",
|
|
36
|
+
"lodash.includes": "4.3.0",
|
|
37
|
+
"lodash.isnan": "3.0.2",
|
|
38
|
+
"lodash.isnil": "4.0.0",
|
|
39
|
+
"lodash.isstring": "4.0.1",
|
|
40
|
+
"lodash.isundefined": "3.0.1",
|
|
41
|
+
"lodash.split": "4.4.2",
|
|
42
|
+
"lodash.trim": "4.5.1",
|
|
43
|
+
"uuid": "10.0.0"
|
|
39
44
|
},
|
|
40
45
|
"devDependencies": {
|
|
41
46
|
"@mimik/eslint-plugin-dependencies": "^2.4.6",
|
|
42
47
|
"@mimik/eslint-plugin-document-env": "^1.0.6",
|
|
43
|
-
"eslint": "8.
|
|
48
|
+
"eslint": "8.57.0",
|
|
44
49
|
"eslint-config-airbnb": "19.0.4",
|
|
45
50
|
"eslint-plugin-import": "2.29.1",
|
|
46
51
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
47
|
-
"eslint-plugin-react": "7.
|
|
48
|
-
"eslint-plugin-react-hooks": "4.6.
|
|
49
|
-
"husky": "
|
|
50
|
-
"jsdoc-to-markdown": "8.0.
|
|
52
|
+
"eslint-plugin-react": "7.34.2",
|
|
53
|
+
"eslint-plugin-react-hooks": "4.6.2",
|
|
54
|
+
"husky": "9.0.11",
|
|
55
|
+
"jsdoc-to-markdown": "8.0.1"
|
|
51
56
|
}
|
|
52
57
|
}
|