mm_machine 2.8.5 → 2.8.6
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/index.js +2 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -645,7 +645,6 @@ Manager.prototype._syncFromFile = async function (snapshot) {
|
|
|
645
645
|
var f = current[fi];
|
|
646
646
|
if (!old[f]) {
|
|
647
647
|
this.registerMod(f);
|
|
648
|
-
this.log('info', '快照同步: 新增模块 ' + f);
|
|
649
648
|
}
|
|
650
649
|
old[f] = false;
|
|
651
650
|
}
|
|
@@ -655,7 +654,7 @@ Manager.prototype._syncFromFile = async function (snapshot) {
|
|
|
655
654
|
await this._removeStale(old);
|
|
656
655
|
this.updateInfo();
|
|
657
656
|
await this._saveSnapshotDirs(Object.keys(old_dirs));
|
|
658
|
-
this.log('info', '快照同步完成');
|
|
657
|
+
// this.log('info', '快照同步完成');
|
|
659
658
|
} catch (err) {
|
|
660
659
|
this.log('error', '快照增量同步失败', err);
|
|
661
660
|
} finally {
|
|
@@ -690,7 +689,6 @@ Manager.prototype._removeStale = async function (old) {
|
|
|
690
689
|
if (mod) {
|
|
691
690
|
await this.unloadMod(mod.config.name);
|
|
692
691
|
this.delMod(mod.config.name);
|
|
693
|
-
this.log('info', '快照同步: 移除模块 ' + file);
|
|
694
692
|
}
|
|
695
693
|
}
|
|
696
694
|
}
|
|
@@ -912,7 +910,7 @@ Manager.prototype._loadSources = async function () {
|
|
|
912
910
|
if (snapshot) {
|
|
913
911
|
// 快照存在,用config快速加载模块
|
|
914
912
|
this._loadFromSnapshot(snapshot.mods_map);
|
|
915
|
-
this.log('info', '已从快照快速加载模块,正在后台同步文件变更...');
|
|
913
|
+
// this.log('info', '已从快照快速加载模块,正在后台同步文件变更...');
|
|
916
914
|
// 异步增量同步,不阻塞启动
|
|
917
915
|
this._syncFromFile(snapshot);
|
|
918
916
|
return;
|
|
@@ -1120,7 +1118,6 @@ Manager.prototype.runAll = async function (method, ...params) {
|
|
|
1120
1118
|
let mod = this.getMod(info.name);
|
|
1121
1119
|
promises.push(
|
|
1122
1120
|
mod.do(method, ...params).catch((error) => {
|
|
1123
|
-
this.log('error', `模块${info.name}执行${method}方法失败`, error);
|
|
1124
1121
|
return null; // 失败时返回null
|
|
1125
1122
|
})
|
|
1126
1123
|
);
|
|
@@ -1153,7 +1150,6 @@ Manager.prototype.runRace = async function (method, ...params) {
|
|
|
1153
1150
|
let mod = this.getMod(info.name);
|
|
1154
1151
|
promises.push(
|
|
1155
1152
|
mod.do(method, ...params).catch((error) => {
|
|
1156
|
-
this.log('error', `模块${info.name}执行${method}方法失败`, error);
|
|
1157
1153
|
throw error; // 竞争执行中,失败应该抛出错误
|
|
1158
1154
|
})
|
|
1159
1155
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_machine",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.6",
|
|
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": {
|