mm_os 4.3.2 → 4.3.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/com/api/index.js CHANGED
@@ -67,6 +67,11 @@ class Api extends Manager {
67
67
  * @type {number}
68
68
  */
69
69
  mode: process.env.NODE_ENV === "production" ? 1 : 3,
70
+ /**
71
+ * 最大深度
72
+ * @type {number}
73
+ */
74
+ max_depth: 6
70
75
  };
71
76
 
72
77
  /**
package/com/mqtt/index.js CHANGED
@@ -92,6 +92,11 @@ class Mqtt extends Manager {
92
92
  // maxInflight: 20,
93
93
  // 重连间隔
94
94
  reconnet_period: 6000, // 重连间隔1秒
95
+ /**
96
+ * 最大深度
97
+ * @type {number}
98
+ */
99
+ max_depth: 6
95
100
  };
96
101
 
97
102
  /**
@@ -67,6 +67,11 @@ class Socket extends Manager {
67
67
  * @type {number}
68
68
  */
69
69
  mode: process.env.NODE_ENV === 'production' ? 1 : 3,
70
+ /**
71
+ * 最大深度
72
+ * @type {number}
73
+ */
74
+ max_depth: 6
70
75
  };
71
76
 
72
77
  /**
@@ -67,6 +67,11 @@ class Static extends Manager {
67
67
  * @type {number}
68
68
  */
69
69
  mode: process.env.NODE_ENV === "production" ? 1 : 3,
70
+ /**
71
+ * 最大深度
72
+ * @type {number}
73
+ */
74
+ max_depth: 6
70
75
  };
71
76
 
72
77
  /**
package/com/task/index.js CHANGED
@@ -67,6 +67,11 @@ class Task extends Manager {
67
67
  * @type {number}
68
68
  */
69
69
  mode: process.env.NODE_ENV === "production" ? 1 : 3,
70
+ /**
71
+ * 最大深度
72
+ * @type {number}
73
+ */
74
+ max_depth: 6
70
75
  };
71
76
 
72
77
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mm_os",
3
3
  "description": "MM_OS服务端架构,用于快速构建应用程序,支持网站建设、小程序后台、AI应用、物联网(IOT/AIOT)、游戏服务端等多种场景。",
4
- "version": "4.3.2",
4
+ "version": "4.3.4",
5
5
  "main": "index.js",
6
6
  "keywords": [
7
7
  "AI",
@@ -36,20 +36,15 @@
36
36
  "koa-send": "^5.0.1",
37
37
  "koa-websocket": "^7.0.0",
38
38
  "markdown": "^0.5.0",
39
- "mm_ai": "^1.3.7",
39
+ "mm_ai": "^1.4.1",
40
40
  "mm_check": "^1.5.3",
41
41
  "mm_email": "^1.0.8",
42
42
  "mm_excel": "^1.2.2",
43
- "mm_expand": "^2.4.7",
44
43
  "mm_git": "^1.0.2",
45
- "mm_html": "^1.1.7",
46
- "mm_https": "^1.6.6",
47
44
  "mm_ip": "^1.0.4",
48
- "mm_logs": "^1.6.9",
49
45
  "mm_matchs": "^1.1.9",
50
46
  "mm_queue": "^1.0.3",
51
47
  "mm_session": "^1.6.1",
52
- "mm_sql": "^1.6.1",
53
48
  "mm_statics": "^1.8.7",
54
49
  "mm_xml": "^1.1.8",
55
50
  "mqtt": "^5.15.2"
package/server.js CHANGED
@@ -333,6 +333,7 @@ Server.prototype._initMiddlewareManager = async function () {
333
333
  * 初始化管理器
334
334
  */
335
335
  Server.prototype._initManager = async function () {
336
+ console.time(' [加载] _initManager');
336
337
  // 管理器配置列表
337
338
  var infos = [
338
339
  { name: 'game', title: '游戏', Module: Game },
@@ -563,21 +564,32 @@ Server.prototype._stopSources = async function () {
563
564
  * @returns {object} 服务器实例
564
565
  */
565
566
  Server.prototype.run = async function () {
566
- // 初始化
567
- console.time('加载');
567
+ // 加载
568
+ console.time('[加载] 总计');
568
569
  await this.do('load');
569
- console.timeEnd('加载');
570
+ console.timeEnd('[加载] 总计');
570
571
 
571
572
  // 初始化
572
- console.time('初始化');
573
+ console.time('[初始化] 总计');
573
574
  await this.do('init');
574
- console.timeEnd('初始化');
575
+ console.timeEnd('[初始化] 总计');
575
576
 
576
577
  // 启动
577
- console.time('启动');
578
+ console.time('[启动] 总计');
578
579
  await this.do('start');
579
- console.timeEnd('启动');
580
+ console.timeEnd('[启动] 总计');
580
581
  return this;
581
582
  };
582
583
 
584
+ /**
585
+ * 使用中间件
586
+ * @param {object} cs 中间件实例
587
+ * @param {object} config 配置参数
588
+ */
589
+ Server.prototype.use = async function (cs, config) {
590
+ if (cs && typeof cs.install === 'function') {
591
+ await cs.install(this, config);
592
+ }
593
+ };
594
+
583
595
  exports.Server = Server;