@thzero/library_server 0.14.2 → 0.14.6

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/boot/index.js +7 -1
  2. package/package.json +12 -12
package/boot/index.js CHANGED
@@ -132,7 +132,9 @@ class BootMain {
132
132
  let obj;
133
133
  const results = [];
134
134
  for (const plugin of args) {
135
- obj = new plugin();
135
+ obj = plugin;
136
+ if (!this._isObject(obj))
137
+ obj = new plugin();
136
138
  obj.init(this._appConfig, injector);
137
139
  results.push(obj);
138
140
  }
@@ -353,6 +355,10 @@ class BootMain {
353
355
  _initShutdown() {
354
356
  }
355
357
 
358
+ _isObject(objValue) {
359
+ return objValue && typeof objValue === 'object';
360
+ }
361
+
356
362
  _registerServicesLogger(key, service) {
357
363
  this._injectService(key, service);
358
364
  this.loggerServiceI.register(key);
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@thzero/library_server",
3
- "version": "0.14.2",
3
+ "version": "0.14.6",
4
4
  "version_major": 0,
5
5
  "version_minor": 14,
6
- "version_patch": 2,
7
- "version_date": "10/02/2021",
6
+ "version_patch": 6,
7
+ "version_date": "10/20/2021",
8
8
  "description": "An opinionated library of common functionality to bootstrap a Koa based API application using MongoDb and Firebase.",
9
9
  "author": "thZero",
10
10
  "license": "MIT",
@@ -34,26 +34,26 @@
34
34
  "dayjs-plugin-utc": "^0.1.2",
35
35
  "easy-rbac": "^3.1.1",
36
36
  "esm": "^3.2.25",
37
- "internal-ip": "^6.2.0",
38
- "koa": "^2.13.3",
37
+ "internal-ip": "^7.0.0",
38
+ "koa": "^2.13.4",
39
39
  "koa-body": "^4.2.0",
40
40
  "koa-helmet": "^6.1.0",
41
41
  "koa-static": "^5.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@thzero/library_cli": "^0.13.19"
44
+ "@thzero/library_cli": "^0.13.21"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@thzero/library_common": "^0.14",
48
48
  "@thzero/library_common_service": "^0.14",
49
- "@babel/core": "^7.15.5",
49
+ "@babel/core": "^7.15.8",
50
50
  "@babel/plugin-proposal-class-properties": "^7.14.5",
51
- "@babel/preset-env": "^7.15.6",
51
+ "@babel/preset-env": "^7.15.8",
52
52
  "babel-loader": "^8.2.2",
53
- "eslint": "^7.32.0",
53
+ "eslint": "^8.0.1",
54
54
  "eslint-plugin-node": "^11.1.0",
55
- "pino-pretty": "^7.0.1",
56
- "webpack": "^5.56.0",
57
- "webpack-cli": "^4.8.0"
55
+ "pino-pretty": "^7.1.0",
56
+ "webpack": "^5.59.0",
57
+ "webpack-cli": "^4.9.1"
58
58
  }
59
59
  }