@mimik/configuration 5.0.8 → 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.
Files changed (2) hide show
  1. package/index.js +7 -1
  2. package/package.json +8 -8
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
- if (qs) url = `${url}?${qs}`;
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.8",
3
+ "version": "5.0.10",
4
4
  "description": "Common configuration for mimik services",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,19 +30,19 @@
30
30
  "url": "https://bitbucket.org/mimiktech/configuration"
31
31
  },
32
32
  "dependencies": {
33
- "@mimik/request-helper": "^1.7.9",
34
- "@mimik/sumologic-winston-logger": "^1.6.19",
35
- "@mimik/user-filters": "1.3.6",
33
+ "@mimik/request-helper": "^1.7.10",
34
+ "@mimik/sumologic-winston-logger": "^1.6.20",
35
+ "@mimik/user-filters": "^1.3.7",
36
36
  "ip": "2.0.0",
37
37
  "lodash": "4.17.21",
38
38
  "uuid": "9.0.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@mimik/eslint-plugin-dependencies": "^2.4.5",
42
- "@mimik/eslint-plugin-document-env": "^1.0.5",
43
- "eslint": "8.54.0",
41
+ "@mimik/eslint-plugin-dependencies": "^2.4.6",
42
+ "@mimik/eslint-plugin-document-env": "^1.0.6",
43
+ "eslint": "8.56.0",
44
44
  "eslint-config-airbnb": "19.0.4",
45
- "eslint-plugin-import": "2.29.0",
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",