mm_machine 2.3.7 → 2.3.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.
- package/drive.js +5 -5
- package/index.js +15 -3
- package/package.json +1 -1
package/drive.js
CHANGED
|
@@ -52,7 +52,7 @@ class Drive extends Mod {
|
|
|
52
52
|
* @class
|
|
53
53
|
*/
|
|
54
54
|
constructor(config, parent) {
|
|
55
|
-
super(config, parent);
|
|
55
|
+
super({ ...Drive.config, ...config }, parent);
|
|
56
56
|
// 当前配置文件路径
|
|
57
57
|
this.config_file = '';
|
|
58
58
|
|
|
@@ -614,7 +614,7 @@ Drive.prototype._getName = function (file) {
|
|
|
614
614
|
/**
|
|
615
615
|
* 加载前处理
|
|
616
616
|
*/
|
|
617
|
-
Drive.prototype.loadBefore =
|
|
617
|
+
Drive.prototype.loadBefore = function () {
|
|
618
618
|
try {
|
|
619
619
|
let module = this.loadScript();
|
|
620
620
|
if (module) {
|
|
@@ -629,9 +629,9 @@ Drive.prototype.loadBefore = async function () {
|
|
|
629
629
|
/**
|
|
630
630
|
* 加载处理
|
|
631
631
|
*/
|
|
632
|
-
Drive.prototype._loadCore =
|
|
633
|
-
|
|
634
|
-
|
|
632
|
+
Drive.prototype._loadCore = function () {
|
|
633
|
+
this.loadConfig();
|
|
634
|
+
this.loadScript();
|
|
635
635
|
};
|
|
636
636
|
|
|
637
637
|
/**
|
package/index.js
CHANGED
|
@@ -196,7 +196,19 @@ Manager.prototype.updateInfo = function () {
|
|
|
196
196
|
let info = this.newInfo(name, o.config.sort, o.config.state, o.config_file);
|
|
197
197
|
this.infos.push(info);
|
|
198
198
|
}
|
|
199
|
-
this.sort
|
|
199
|
+
this.exec('sort');
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* 排序前钩子函数
|
|
204
|
+
*/
|
|
205
|
+
Manager.prototype.sortBefore = function () {
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* 排序后钩子函数
|
|
210
|
+
*/
|
|
211
|
+
Manager.prototype.sortAfter = function () {
|
|
200
212
|
};
|
|
201
213
|
|
|
202
214
|
/**
|
|
@@ -442,14 +454,14 @@ Manager.prototype.loadScripts = async function () {
|
|
|
442
454
|
* 更新配置前的钩子函数
|
|
443
455
|
*/
|
|
444
456
|
Manager.prototype.updateBefore = function () {
|
|
445
|
-
this.log('info', '更新配置前的钩子函数');
|
|
457
|
+
// this.log('info', '更新配置前的钩子函数');
|
|
446
458
|
};
|
|
447
459
|
|
|
448
460
|
/**
|
|
449
461
|
* 更新配置前的钩子函数
|
|
450
462
|
*/
|
|
451
463
|
Manager.prototype.updateAfter = function () {
|
|
452
|
-
this.log('info', '更新配置后钩子函数');
|
|
464
|
+
// this.log('info', '更新配置后钩子函数');
|
|
453
465
|
};
|
|
454
466
|
|
|
455
467
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_machine",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.9",
|
|
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": {
|