@thzero/library_server 0.15.11 → 0.15.18
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 +1 -1
- package/boot/index.js +5 -2
- package/package.json +3 -4
- package/service/monitoring.js +13 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ An opinionated library of common functionality to bootstrap a Koa based API appl
|
|
|
14
14
|
|
|
15
15
|
#### Mongo
|
|
16
16
|
|
|
17
|
-
Mongo is
|
|
17
|
+
Mongo is the only currently supposed option as the server side data source.
|
|
18
18
|
|
|
19
19
|
* Install the MongoDb (either locally or in the cloud) server
|
|
20
20
|
* Recommendation is MongoDb Atlas (https://www.mongodb.com/cloud/atlas) for development/sandbox
|
package/boot/index.js
CHANGED
|
@@ -12,6 +12,8 @@ import Utility from '@thzero/library_common/utility';
|
|
|
12
12
|
|
|
13
13
|
import NotImplementedError from '@thzero/library_common/errors/notImplemented';
|
|
14
14
|
|
|
15
|
+
import nullMonitoringService from '../service/monitoring';
|
|
16
|
+
|
|
15
17
|
// require('@thzero/library_server/utility/string.cjs');
|
|
16
18
|
String.isNullOrEmpty = function(value) {
|
|
17
19
|
//return !(typeof value === 'string' && value.length > 0)
|
|
@@ -176,8 +178,9 @@ class BootMain {
|
|
|
176
178
|
this._injectService(LibraryCommonServiceConstants.InjectorKeys.SERVICE_LOGGER, this.loggerServiceI);
|
|
177
179
|
|
|
178
180
|
const monitoringService = this._initServicesMonitoring();
|
|
179
|
-
if (monitoringService)
|
|
180
|
-
|
|
181
|
+
if (!monitoringService)
|
|
182
|
+
monitoringService = nullMonitoringService();
|
|
183
|
+
this._injectService(LibraryCommonServiceConstants.InjectorKeys.SERVICE_MONITORING, monitoringService);
|
|
181
184
|
|
|
182
185
|
this.usageMetricsServiceI = this._initServicesUsageMetrics();
|
|
183
186
|
this._injectService(LibraryConstants.InjectorKeys.SERVICE_USAGE_METRIC, this.usageMetricsServiceI);
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thzero/library_server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.18",
|
|
5
5
|
"version_major": 0,
|
|
6
6
|
"version_minor": 15,
|
|
7
|
-
"version_patch":
|
|
8
|
-
"version_date": "04/
|
|
7
|
+
"version_patch": 18,
|
|
8
|
+
"version_date": "04/14/2022",
|
|
9
9
|
"description": "An opinionated library of common functionality to bootstrap a Koa based API application using MongoDb and Firebase.",
|
|
10
10
|
"author": "thZero",
|
|
11
11
|
"license": "MIT",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"dayjs-plugin-utc": "^0.1.2",
|
|
36
36
|
"default-gateway": "^6.0.3",
|
|
37
37
|
"easy-rbac": "^3.2.0",
|
|
38
|
-
"esm": "^3.2.25",
|
|
39
38
|
"ipaddr.js": "^2.0.1",
|
|
40
39
|
"koa": "^2.13.4",
|
|
41
40
|
"koa-body": "^4.2.0",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import BaseMonitoringService from '@thzero/library_common_service/service/monitoring';
|
|
2
|
+
|
|
3
|
+
class NullMonitoringService extends BaseMonitoringService {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
async init(injector) {
|
|
9
|
+
await super.init(injector);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default NullMonitoringService;
|