@mimik/configuration 5.0.2 → 5.0.4

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
@@ -66,6 +66,7 @@ The following environement variables are being used for the configuration:
66
66
  | SWAGGER_FILE_DIRECTORY | directory where the api definition is located | ./api | serverSettings.api | [1]
67
67
  | BITBUCKET_USERNAME | username to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.username
68
68
  | BITBUCKET_PASSWORD | password to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.password
69
+ | SWAGGERHUB_API_KEY | apiKey to access swaggerhub | | serverSettings.apiApiKey
69
70
  | SERVER_SECURITY_SET | switch to enable or disable the token interpretation | on | serverSettings.securitySet | only active if environment is `local`
70
71
  | INTERCEPT_ERROR | switch to use or not the errorIntercept option | on | serverSettings.interceptError | must be set to off for mID
71
72
  | SERVER_PORT | port of the server | | serverSettings.port |
package/index.js CHANGED
@@ -446,12 +446,15 @@ if (!isMSTSet) {
446
446
  configuration.dependencies = {};
447
447
  }
448
448
  if (process.env.OAUTH_GENERIC_PREVIOUS_KEY) configuration.security.generic.previousKey = process.env.OAUTH_GENERIC_PREVIOUS_KEY;
449
- if (process.env.BITBUCKET_USERNAME) {
449
+ if (process.env.BITBUCKET_USERNAME || process.env.BITBUCKET_PASSWORD) {
450
450
  configuration.serverSettings.apiBasicAuth = {
451
451
  username: process.env.BITBUCKET_USERNAME || DEFAULT_BITBUCKET_USERNAME,
452
452
  password: process.env.BITBUCKET_PASSWORD || DEFAULT_BITBUCKET_PASSWORD,
453
453
  };
454
454
  }
455
+ if (process.env.SWAGGERHUB_API_KEY) {
456
+ configuration.serverSettings.apiApiKey = process.env.SWAGGERHUB_API_KEY;
457
+ }
455
458
  configuration.logInfo = setupLog();
456
459
  configuration.locationProvider = setupLocationProvider();
457
460
 
@@ -497,6 +500,7 @@ configuration.locationProvider = setupLocationProvider();
497
500
  * | SWAGGER_FILE_DIRECTORY | directory where the api definition is located | ./api | serverSettings.api | [1]
498
501
  * | BITBUCKET_USERNAME | username to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.username
499
502
  * | BITBUCKET_PASSWORD | password to access bitbucket read access on the swagger repos | ' ' | serverSettings.apiBasicAuth.password
503
+ * | SWAGGERHUB_API_KEY | apiKey to access swaggerhub | | serverSettings.apiApiKey
500
504
  * | SERVER_SECURITY_SET | switch to enable or disable the token interpretation | on | serverSettings.securitySet | only active if environment is `local`
501
505
  * | INTERCEPT_ERROR | switch to use or not the errorIntercept option | on | serverSettings.interceptError | must be set to off for mID
502
506
  * | SERVER_PORT | port of the server | | serverSettings.port |
package/lib/common.js CHANGED
@@ -89,7 +89,7 @@ const DEFAULT_ADMIN_EXTERNAL_ID = 'admin';
89
89
 
90
90
  const DEFAULT_SWAGGER_DIR = '../api';
91
91
  const DEFAULT_SWAGGER_FILE_PROVIDER = 'bitbucket';
92
- const SUPPORTED_SWAGGER_FILE_PROVIDERS = [DEFAULT_SWAGGER_FILE_PROVIDER, 'swaggger'];
92
+ const SUPPORTED_SWAGGER_FILE_PROVIDERS = [DEFAULT_SWAGGER_FILE_PROVIDER, 'swaggerhub'];
93
93
 
94
94
  const DEFAULT_BITBUCKET_USERNAME = ' ';
95
95
  const DEFAULT_BITBUCKET_PASSWORD = ' ';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/configuration",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "Common configuration for mimik services",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,7 +40,7 @@
40
40
  "devDependencies": {
41
41
  "@mimik/eslint-plugin-dependencies": "^2.4.5",
42
42
  "@mimik/eslint-plugin-document-env": "^1.0.5",
43
- "eslint": "8.38.0",
43
+ "eslint": "8.39.0",
44
44
  "eslint-config-airbnb": "19.0.4",
45
45
  "eslint-plugin-import": "2.27.5",
46
46
  "eslint-plugin-jsx-a11y": "6.7.1",