mm_machine 1.6.9 → 1.7.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.
- package/demo2/test1/index.js +3 -3
- package/index.js +6 -6
- package/package.json +1 -1
package/demo2/test1/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
1
|
var i = 0;
|
|
2
|
+
|
|
3
3
|
function test() {
|
|
4
4
|
console.log("你好123", i++)
|
|
5
5
|
}
|
|
@@ -11,10 +11,10 @@ function main() {
|
|
|
11
11
|
|
|
12
12
|
exports.main = main;
|
|
13
13
|
|
|
14
|
-
exports.main_before = function(){
|
|
14
|
+
exports.main_before = function() {
|
|
15
15
|
console.log("请求前")
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
exports.main_after = function(ret){
|
|
18
|
+
exports.main_after = async function(ret) {
|
|
19
19
|
console.log("请求后", ret)
|
|
20
20
|
}
|
package/index.js
CHANGED
|
@@ -314,7 +314,7 @@ Item.prototype.save = function() {
|
|
|
314
314
|
* @param {Object} param1 参数一
|
|
315
315
|
* @param {Object} param2 参数二
|
|
316
316
|
*/
|
|
317
|
-
Item.prototype.main = function(
|
|
317
|
+
Item.prototype.main = async function(...params) {
|
|
318
318
|
return null;
|
|
319
319
|
};
|
|
320
320
|
|
|
@@ -515,7 +515,7 @@ Index.prototype.sort = function() {
|
|
|
515
515
|
/**
|
|
516
516
|
* 更新前
|
|
517
517
|
*/
|
|
518
|
-
Index.prototype.update_before =
|
|
518
|
+
Index.prototype.update_before = function(dir) {
|
|
519
519
|
// console.log("更新前")
|
|
520
520
|
}
|
|
521
521
|
|
|
@@ -523,7 +523,7 @@ Index.prototype.update_before = async function(dir) {
|
|
|
523
523
|
/**
|
|
524
524
|
* 更新后
|
|
525
525
|
*/
|
|
526
|
-
Index.prototype.update_after =
|
|
526
|
+
Index.prototype.update_after = function(dir) {
|
|
527
527
|
// console.log("更新后")
|
|
528
528
|
}
|
|
529
529
|
|
|
@@ -531,12 +531,12 @@ Index.prototype.update_after = async function(dir) {
|
|
|
531
531
|
* 更新配置
|
|
532
532
|
* @param {String} dir 检索的路径
|
|
533
533
|
*/
|
|
534
|
-
Index.prototype.update =
|
|
535
|
-
|
|
534
|
+
Index.prototype.update = function(dir) {
|
|
535
|
+
this.update_before(dir);
|
|
536
536
|
this.clear();
|
|
537
537
|
this.load(dir);
|
|
538
538
|
this.sort();
|
|
539
|
-
|
|
539
|
+
this.update_after(dir);
|
|
540
540
|
};
|
|
541
541
|
|
|
542
542
|
/**
|