badmfck-api-server 1.3.8 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@ async function Initializer(services) {
43
43
  exports.Initializer = Initializer;
44
44
  class APIService extends BaseService_1.BaseService {
45
45
  static nextLogID = 0;
46
- version = "1.3.8";
46
+ version = "1.4.0";
47
47
  options;
48
48
  netLog = [];
49
49
  constructor(options) {
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseService = void 0;
4
- const LogService_1 = require("./LogService");
5
4
  class BaseService {
6
5
  name;
7
6
  constructor(name) {
8
7
  this.name = name;
9
8
  }
10
9
  async init() {
11
- (0, LogService_1.logInfo)("Service: " + this.name + " initialized");
10
+ console.log("Service: " + this.name + " initialized");
12
11
  }
13
12
  applicationReady() { }
14
13
  }
@@ -65,7 +65,6 @@ class LogService extends BaseService_1.BaseService {
65
65
  this.options = opt;
66
66
  }
67
67
  async init() {
68
- super.init();
69
68
  exports.REQ_LOG.listener = async (req) => {
70
69
  if (req && req.lastID) {
71
70
  let result = this.log.filter(val => val.id > req.lastID);
@@ -104,6 +103,7 @@ class LogService extends BaseService_1.BaseService {
104
103
  if (this.log.length > limit)
105
104
  this.log.shift();
106
105
  });
106
+ super.init();
107
107
  }
108
108
  createDate(d) {
109
109
  if (!d)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "1.3.8",
3
+ "version": "1.4.0",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",