mm_machine 2.9.0 → 2.9.1

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -914,8 +914,8 @@ Manager.prototype._loadSources = async function () {
914
914
  // 快照存在,用config快速加载模块
915
915
  this._loadFromSnapshot(snapshot.mods_map);
916
916
  // this.log('info', '已从快照快速加载模块,正在后台同步文件变更...');
917
- // 异步增量同步,不阻塞启动
918
- this._syncFromFile(snapshot);
917
+ // 同步等待文件同步完成,确保模块已全部注册后再执行初始化,防止竞态条件
918
+ await this._syncFromFile(snapshot);
919
919
  return;
920
920
  }
921
921
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_machine",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
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": {