mm_machine 1.9.8 → 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.
@@ -1,7 +1,7 @@
1
1
  var i = 0;
2
2
 
3
3
  function test() {
4
- console.log("你好7654321", i++)
4
+ console.log("你好123", i++)
5
5
  }
6
6
 
7
7
  function main() {
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;
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.8",
3
+ "version": "1.9.9",
4
4
  "description": "这是超级美眉框架机制构建辅助模块,用于快速构建一个机制",
5
5
  "main": "index.js",
6
6
  "scripts": {