mm_machine 3.3.2 → 3.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/lib/drive.js CHANGED
@@ -95,6 +95,9 @@ Drive.prototype._preset = function () {
95
95
  Drive.prototype._loadConfig = function (file) {
96
96
  if (file) {
97
97
  this.config_file = file;
98
+ // 清除构造阶段被Base.setConfig错误缓存的_dir和错误的script_file
99
+ this._dir = '';
100
+ this.script_file = '';
98
101
  }
99
102
  try {
100
103
  // 加载配置(支持热更新)
package/lib/manager.js CHANGED
@@ -318,14 +318,6 @@ Manager.prototype.loadMod = async function (name) {
318
318
  return null;
319
319
  };
320
320
 
321
- /**
322
- * 初始化模块
323
- * @param {object} mod 模块对象
324
- */
325
- Manager.prototype._initMod = async function (mod) {
326
- await mod.do('init', this.getParent());
327
- };
328
-
329
321
  /**
330
322
  * 卸载模块
331
323
  * @param {string} name 模块名
@@ -739,7 +731,7 @@ Manager.prototype._ensureModLoaded = async function (mod, method) {
739
731
  }
740
732
  if (!mod.isInited()) {
741
733
  try {
742
- await mod.do('init', this.getParent());
734
+ await mod.do('init');
743
735
  } catch (error) {
744
736
  throw new Error(`模块${mod.config.name}初始化失败,无法执行方法 ${method}`);
745
737
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_machine",
3
- "version": "3.3.2",
3
+ "version": "3.3.4",
4
4
  "description": "A flexible Node.js plugin mechanism system for dynamic loading, management and execution of modules. Supports hot reload, lifecycle management, and modern JavaScript features.",
5
5
  "main": "index.js",
6
6
  "scripts": {