badmfck-api-server 1.0.7 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -51,8 +51,8 @@ class APIService extends BaseService_1.BaseService {
|
|
51
51
|
this.options = options ?? getDefaultOptions();
|
52
52
|
}
|
53
53
|
async init() {
|
54
|
-
exports.REQ_HTTP_LOG.listener = (ignore
|
55
|
-
exports.REQ_CREATE_NET_LOG.listener = (ignore
|
54
|
+
exports.REQ_HTTP_LOG.listener = async (ignore) => this.netLog;
|
55
|
+
exports.REQ_CREATE_NET_LOG.listener = async (ignore) => {
|
56
56
|
const log = {
|
57
57
|
created: +new Date(),
|
58
58
|
time: 0,
|
@@ -64,7 +64,7 @@ class APIService extends BaseService_1.BaseService {
|
|
64
64
|
this.netLog.push(log);
|
65
65
|
if (this.netLog.length > 1000)
|
66
66
|
this.netLog.shift();
|
67
|
-
|
67
|
+
return log;
|
68
68
|
};
|
69
69
|
const app = (0, express_1.default)();
|
70
70
|
if (this.options.isProductionEnvironment)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "badmfck-api-server",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.9",
|
4
4
|
"description": "Simple API http server based on express",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"dependencies": {
|
21
21
|
"@types/mysql": "^2.15.21",
|
22
22
|
"axios": "^1.4.0",
|
23
|
-
"badmfck-signal": "^1.
|
23
|
+
"badmfck-signal": "^1.2.6",
|
24
24
|
"cors": "^2.8.5",
|
25
25
|
"express": "^4.18.2",
|
26
26
|
"mysql": "^2.18.1"
|