mm_machine 1.9.7 → 1.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/demo/test1/index.js +1 -1
- package/index.js +9 -0
- package/item.js +3 -0
- package/package.json +6 -6
package/demo/test1/index.js
CHANGED
package/index.js
CHANGED
|
@@ -468,6 +468,9 @@ Index.prototype.run = async function(name, method, ...params) {
|
|
|
468
468
|
if (name) {
|
|
469
469
|
var o = await this.get(name);
|
|
470
470
|
if (o && o.config.state === 1) {
|
|
471
|
+
if (!o.complete) {
|
|
472
|
+
await o.exec('load');
|
|
473
|
+
}
|
|
471
474
|
var ret = o.exec(method, ...params);
|
|
472
475
|
if (util.types.isPromise(ret)) {
|
|
473
476
|
result = await ret;
|
|
@@ -483,6 +486,9 @@ Index.prototype.run = async function(name, method, ...params) {
|
|
|
483
486
|
for (var i = 0; i < lt.length; i++) {
|
|
484
487
|
var o = lt[i];
|
|
485
488
|
if (o.config.state === 1) {
|
|
489
|
+
if (!o.complete) {
|
|
490
|
+
await o.exec('load');
|
|
491
|
+
}
|
|
486
492
|
var ret = o.exec(method, ...params);
|
|
487
493
|
if (util.types.isPromise(ret)) {
|
|
488
494
|
result = await ret;
|
|
@@ -492,6 +498,9 @@ Index.prototype.run = async function(name, method, ...params) {
|
|
|
492
498
|
if (this.mode >= 4) {
|
|
493
499
|
o.exec('reload');
|
|
494
500
|
}
|
|
501
|
+
if (result && o.config.end) {
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
495
504
|
}
|
|
496
505
|
}
|
|
497
506
|
}
|
package/item.js
CHANGED
|
@@ -97,6 +97,9 @@ class Item {
|
|
|
97
97
|
* @param {Object} config 配置
|
|
98
98
|
*/
|
|
99
99
|
Item.prototype.set_config = function(config) {
|
|
100
|
+
if (config.func_file !== this.config.func_file) {
|
|
101
|
+
this.complete = false;
|
|
102
|
+
}
|
|
100
103
|
this.config = conf(Object.assign({}, this.config, config || {}), this.filename);
|
|
101
104
|
}
|
|
102
105
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_machine",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.9",
|
|
4
4
|
"description": "这是超级美眉框架机制构建辅助模块,用于快速构建一个机制",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "git+https://
|
|
12
|
+
"url": "git+https://gitee.com/qiuwenwu91/mm_machine.git"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"common",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"author": "邱文武",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"bugs": {
|
|
29
|
-
"url": "https://
|
|
29
|
+
"url": "https://gitee.com/qiuwenwu91/mm_machine/issues"
|
|
30
30
|
},
|
|
31
|
-
"homepage": "https://
|
|
31
|
+
"homepage": "https://gitee.com/qiuwenwu91/mm_machine#readme",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"mm_config": "^1.1.
|
|
34
|
-
"mm_hot_reload": "^1.0.
|
|
33
|
+
"mm_config": "^1.1.5",
|
|
34
|
+
"mm_hot_reload": "^1.0.7"
|
|
35
35
|
}
|
|
36
36
|
}
|