@mimik/configuration 5.0.9 → 5.0.10
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 +7 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -224,10 +224,15 @@ const setupMongo = (dbOpts) => {
|
|
|
224
224
|
const password = process.env.DATABASE_PASSWORD || DEFAULT_DATABASE_PASSWORD;
|
|
225
225
|
const qs = processStringOptions();
|
|
226
226
|
let url = (process.env.MONGO_USE_SRV === 'yes') ? MONGO_BASE_URL_SRV : MONGO_BASE_URL;
|
|
227
|
+
let noAuthUrl = url;
|
|
227
228
|
|
|
228
229
|
if (user && password) url = `${url}${user}:${password}@`;
|
|
229
230
|
url = `${url}${domain}/${database}`;
|
|
230
|
-
|
|
231
|
+
noAuthUrl = `${noAuthUrl}${domain}/${database}`;
|
|
232
|
+
if (qs) {
|
|
233
|
+
url = `${url}?${qs}`;
|
|
234
|
+
noAuthUrl = `${noAuthUrl}?${qs}`;
|
|
235
|
+
}
|
|
231
236
|
return {
|
|
232
237
|
domain,
|
|
233
238
|
database,
|
|
@@ -240,6 +245,7 @@ const setupMongo = (dbOpts) => {
|
|
|
240
245
|
stringOptions: qs,
|
|
241
246
|
table: dbOpts.table,
|
|
242
247
|
url,
|
|
248
|
+
noAuthUrl,
|
|
243
249
|
options: {
|
|
244
250
|
family: parseInt(process.env.MONGO_FAMILY, 10) || DEFAULT_MONGO_FAMILY,
|
|
245
251
|
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.10",
|
|
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",
|