@mimik/configuration 5.0.9 → 5.0.11
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/index.js +10 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -108,8 +108,10 @@ const setupRedis = () => {
|
|
|
108
108
|
const reconnectTries = parseInt(process.env.REDIS_RECONNECT_TRIES, 10) || DEFAULT_REDIS_RECONNECT_TRIES;
|
|
109
109
|
const reconnectInterval = parseInt(process.env.REDIS_RECONNECT_INTERVAL, 10) || DEFAULT_REDIS_RECONNECT_INTERVAL;
|
|
110
110
|
let url = REDIS_BASE_URL;
|
|
111
|
+
let noAuthUrl = url;
|
|
111
112
|
if (username && password) url += `${username}:${password}@`;
|
|
112
113
|
url += domain;
|
|
114
|
+
noAuthUrl += domain;
|
|
113
115
|
|
|
114
116
|
const clusterConfig = {
|
|
115
117
|
set: process.env.CACHE_CLUSTER_SET || SET_OFF,
|
|
@@ -125,6 +127,7 @@ const setupRedis = () => {
|
|
|
125
127
|
validationCheck: parseInt(process.env.CACHE_VALIDATION_CHECK, 10) || DEFAULT_CACHE_VALIDATION_CHECK,
|
|
126
128
|
reconnectOffset: parseInt(process.env.CACHE_RECONNECTION_OFFSET, 10) || DEFAULT_CACHE_RECONNECTION_OFFSET,
|
|
127
129
|
url,
|
|
130
|
+
noAuthUrl,
|
|
128
131
|
cluster: clusterConfig,
|
|
129
132
|
options: {
|
|
130
133
|
socket: {
|
|
@@ -224,10 +227,15 @@ const setupMongo = (dbOpts) => {
|
|
|
224
227
|
const password = process.env.DATABASE_PASSWORD || DEFAULT_DATABASE_PASSWORD;
|
|
225
228
|
const qs = processStringOptions();
|
|
226
229
|
let url = (process.env.MONGO_USE_SRV === 'yes') ? MONGO_BASE_URL_SRV : MONGO_BASE_URL;
|
|
230
|
+
let noAuthUrl = url;
|
|
227
231
|
|
|
228
232
|
if (user && password) url = `${url}${user}:${password}@`;
|
|
229
233
|
url = `${url}${domain}/${database}`;
|
|
230
|
-
|
|
234
|
+
noAuthUrl = `${noAuthUrl}${domain}/${database}`;
|
|
235
|
+
if (qs) {
|
|
236
|
+
url = `${url}?${qs}`;
|
|
237
|
+
noAuthUrl = `${noAuthUrl}?${qs}`;
|
|
238
|
+
}
|
|
231
239
|
return {
|
|
232
240
|
domain,
|
|
233
241
|
database,
|
|
@@ -240,6 +248,7 @@ const setupMongo = (dbOpts) => {
|
|
|
240
248
|
stringOptions: qs,
|
|
241
249
|
table: dbOpts.table,
|
|
242
250
|
url,
|
|
251
|
+
noAuthUrl,
|
|
243
252
|
options: {
|
|
244
253
|
family: parseInt(process.env.MONGO_FAMILY, 10) || DEFAULT_MONGO_FAMILY,
|
|
245
254
|
keepAlive: process.env.MONGO_KEEP_ALIVE || DEFAULT_MONGO_KEEP_ALIVE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/configuration",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.11",
|
|
4
4
|
"description": "Common configuration for mimik services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@mimik/eslint-plugin-dependencies": "^2.4.6",
|
|
42
42
|
"@mimik/eslint-plugin-document-env": "^1.0.6",
|
|
43
|
-
"eslint": "8.
|
|
43
|
+
"eslint": "8.56.0",
|
|
44
44
|
"eslint-config-airbnb": "19.0.4",
|
|
45
|
-
"eslint-plugin-import": "2.29.
|
|
45
|
+
"eslint-plugin-import": "2.29.1",
|
|
46
46
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
47
47
|
"eslint-plugin-react": "7.33.2",
|
|
48
48
|
"eslint-plugin-react-hooks": "4.6.0",
|