mm_os 2.6.1 → 2.6.3

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,5 +1,6 @@
1
1
  const Item = require('mm_machine').Item;
2
2
  const Log = require('./log.js');
3
+ const conf = require('mm_config');
3
4
 
4
5
  /**
5
6
  * Plugin插件驱动类
@@ -67,10 +68,19 @@ class Drive extends Item {
67
68
  }
68
69
  }
69
70
 
71
+ /**
72
+ * 设置配置
73
+ * @param {Object} config 配置
74
+ */
75
+ Drive.prototype.set_config = function(config) {
76
+ this.config = conf(Object.assign({}, this.config, config || {}), this.filename);
77
+ this.set_config_after();
78
+ }
79
+
70
80
  /**
71
81
  * 插件初始化之后
72
82
  */
73
- Drive.prototype.init_after = function() {
83
+ Drive.prototype.set_config_after = function() {
74
84
  var file = this.filename;
75
85
  var filename = file.replace('app', 'log').replace($.slash + 'plugin', '').replace('json', 'log').replace($
76
86
  .slash + 'plugin.log', '.log');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "2.6.1",
3
+ "version": "2.6.3",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {