mm_os 2.9.7 → 2.9.9
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/cache/route/main/config.json +1 -0
- package/cache/sys/app_admin/config.json +1 -0
- package/cache/sys/main/config.json +1 -0
- package/cache/sys/mqtt_engine/config.json +1 -0
- package/cache/sys/user/config.json +1 -0
- package/cache/user/main/config.json +1 -0
- package/index.js +2 -4
- package/lib/app.js +4 -0
- package/lib/base.js +8 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/index.js
CHANGED
|
@@ -81,8 +81,6 @@ class OS {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
OS.prototype.init_mod = function() {}
|
|
85
|
-
|
|
86
84
|
/**
|
|
87
85
|
* 初始化数据
|
|
88
86
|
* @param {Object} config 配置参数
|
|
@@ -163,7 +161,7 @@ OS.prototype.loadModule = function(cg) {
|
|
|
163
161
|
$.sql = $.mysql_admin('sys', $.runPath);
|
|
164
162
|
if (cg.mysql) {
|
|
165
163
|
$.sql.setConfig(cg.mysql);
|
|
166
|
-
if (cg.mysql.state
|
|
164
|
+
if (cg.mysql.state) {
|
|
167
165
|
$.sql.open();
|
|
168
166
|
}
|
|
169
167
|
}
|
|
@@ -263,7 +261,7 @@ OS.prototype.before = async function(state) {
|
|
|
263
261
|
* @param {String} state 状态
|
|
264
262
|
*/
|
|
265
263
|
OS.prototype.after = async function(state) {
|
|
266
|
-
this.app.runApp();
|
|
264
|
+
await this.app.runApp();
|
|
267
265
|
};
|
|
268
266
|
|
|
269
267
|
/**
|
package/lib/app.js
CHANGED
|
@@ -27,6 +27,10 @@ App.prototype.fullAction = function(action) {
|
|
|
27
27
|
action.init_before = function() {
|
|
28
28
|
// 创建插件
|
|
29
29
|
this.plugin = $.plugin_admin(action.key, action.title || action.name);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (!action.methods.start_after) {
|
|
33
|
+
action.start_after = function() {
|
|
30
34
|
this.plugin.update(action.jsonFile.dirname()).then(() => {
|
|
31
35
|
this.plugin.run(null, 'init').then(() => {
|
|
32
36
|
this.plugin.run(null, 'start');
|
package/lib/base.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_os",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.9",
|
|
4
4
|
"description": "这是超级美眉服务端框架,用于快速构建应用程序。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"mm_machine": "^1.9.7",
|
|
46
46
|
"mm_mongodb": "^1.4.2",
|
|
47
47
|
"mm_mqtt": "^1.0.6",
|
|
48
|
-
"mm_mysql": "^1.9.
|
|
48
|
+
"mm_mysql": "^1.9.6",
|
|
49
49
|
"mm_redis": "^1.4.2",
|
|
50
50
|
"mm_ret": "^1.4.0",
|
|
51
51
|
"mm_session": "^1.4.8",
|