@mimik/configuration 5.0.0 → 5.0.1

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 CHANGED
@@ -63,8 +63,8 @@ The following environement variables are being used for the configuration:
63
63
  | SERVER_ID | service id | uuid.v4() | serverSettings.id |
64
64
  | CUSTOMER_CODE | customer code associated with the service instance | '' | serverSettings.customerCode | empty string
65
65
  | SWAGGER_FILE_DIRECTORY | directory where the api definition is located | ./api | serverSettings.api | [1]
66
- | BITBUCKET_USERNAME | username to access bitbucket read access on the swagger repos | | serverSettings.apiBasicAuth.username
67
- | BITBUCKET_PASSWORD | password to access bitbucket read access on the swagger repos | | serverSettings.apiBasicAuth.password
66
+ | BITBUCKET_USERNAME | username to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.username
67
+ | BITBUCKET_PASSWORD | password to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.password
68
68
  | SERVER_SECURITY_SET | switch to enable or disable the token interpretation | on | serverSettings.securitySet | only active if environment is `local`
69
69
  | INTERCEPT_ERROR | switch to use or not the errorIntercept option | on | serverSettings.interceptError | must be set to off for mID
70
70
  | SERVER_PORT | port of the server | | serverSettings.port |
package/index.js CHANGED
@@ -88,6 +88,8 @@ const {
88
88
  DEFAULT_ADMIN_EXTERNAL_ID,
89
89
  DEFAULT_SWAGGER_DIR,
90
90
  DEFAULT_INTERCEPT_ERROR,
91
+ DEFAULT_BITBUCKET_USERNAME,
92
+ DEFAULT_BITBUCKET_PASSWORD,
91
93
  } = require('./lib/common');
92
94
 
93
95
  let display = true;
@@ -444,8 +446,8 @@ if (!isMSTSet) {
444
446
  if (process.env.OAUTH_GENERIC_PREVIOUS_KEY) configuration.security.generic.previousKey = process.env.OAUTH_GENERIC_PREVIOUS_KEY;
445
447
  if (process.env.BITBUCKET_USERNAME) {
446
448
  configuration.serverSettings.apiBasicAuth = {
447
- username: process.env.BITBUCKET_USERNAME,
448
- password: process.env.BITBUCKET_PASSWORD,
449
+ username: process.env.BITBUCKET_USERNAME || DEFAULT_BITBUCKET_USERNAME,
450
+ password: process.env.BITBUCKET_PASSWORD || DEFAULT_BITBUCKET_PASSWORD,
449
451
  };
450
452
  }
451
453
  configuration.logInfo = setupLog();
@@ -490,8 +492,8 @@ configuration.locationProvider = setupLocationProvider();
490
492
  * | SERVER_ID | service id | uuid.v4() | serverSettings.id |
491
493
  * | CUSTOMER_CODE | customer code associated with the service instance | '' | serverSettings.customerCode | empty string
492
494
  * | SWAGGER_FILE_DIRECTORY | directory where the api definition is located | ./api | serverSettings.api | [1]
493
- * | BITBUCKET_USERNAME | username to access bitbucket read access on the swagger repos | | serverSettings.apiBasicAuth.username
494
- * | BITBUCKET_PASSWORD | password to access bitbucket read access on the swagger repos | | serverSettings.apiBasicAuth.password
495
+ * | BITBUCKET_USERNAME | username to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.username
496
+ * | BITBUCKET_PASSWORD | password to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.password
495
497
  * | SERVER_SECURITY_SET | switch to enable or disable the token interpretation | on | serverSettings.securitySet | only active if environment is `local`
496
498
  * | INTERCEPT_ERROR | switch to use or not the errorIntercept option | on | serverSettings.interceptError | must be set to off for mID
497
499
  * | SERVER_PORT | port of the server | | serverSettings.port |
package/lib/common.js CHANGED
@@ -89,6 +89,9 @@ const DEFAULT_ADMIN_EXTERNAL_ID = 'admin';
89
89
 
90
90
  const DEFAULT_SWAGGER_DIR = '../api';
91
91
 
92
+ const DEFAULT_BITBUCKET_USERNAME = ' ';
93
+ const DEFAULT_BITBUCKET_PASSWORD = ' ';
94
+
92
95
  module.exports = {
93
96
  SUMOLOGIC,
94
97
  AWS_S3,
@@ -163,4 +166,6 @@ module.exports = {
163
166
  DEFAULT_ADMIN_EXTERNAL_ID,
164
167
  DEFAULT_SWAGGER_DIR,
165
168
  DEFAULT_INTERCEPT_ERROR,
169
+ DEFAULT_BITBUCKET_USERNAME,
170
+ DEFAULT_BITBUCKET_PASSWORD,
166
171
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/configuration",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Common configuration for mimik services",
5
5
  "main": "index.js",
6
6
  "scripts": {