mihomo-cli 2.7.0 → 2.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/CHANGELOG.md +9 -0
- package/dist/index.js +4 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -5045,7 +5045,6 @@ var BAR_WIDTH = 20;
|
|
|
5045
5045
|
function createProgressPrinter() {
|
|
5046
5046
|
let alive = 0;
|
|
5047
5047
|
let dead = 0;
|
|
5048
|
-
let hasRetry = false;
|
|
5049
5048
|
const resultMap = /* @__PURE__ */ new Map();
|
|
5050
5049
|
function render(done, total) {
|
|
5051
5050
|
if (!IS_TTY) return;
|
|
@@ -5056,31 +5055,18 @@ function createProgressPrinter() {
|
|
|
5056
5055
|
}
|
|
5057
5056
|
return {
|
|
5058
5057
|
onResult(result, index, total, round = 1) {
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
if (prev.result.delay === null && result.delay !== null) {
|
|
5062
|
-
alive++;
|
|
5063
|
-
dead--;
|
|
5064
|
-
}
|
|
5065
|
-
} else {
|
|
5066
|
-
if (result.delay !== null) alive++;
|
|
5067
|
-
else dead++;
|
|
5068
|
-
}
|
|
5058
|
+
if (result.delay !== null) alive++;
|
|
5059
|
+
else dead++;
|
|
5069
5060
|
resultMap.set(result.name, { result, round });
|
|
5070
5061
|
render(index + 1, total);
|
|
5071
5062
|
},
|
|
5072
5063
|
onRetryRound(round, count) {
|
|
5073
|
-
if (!hasRetry) {
|
|
5074
|
-
hasRetry = true;
|
|
5075
|
-
if (IS_TTY) {
|
|
5076
|
-
process.stdout.write("\n");
|
|
5077
|
-
}
|
|
5078
|
-
console.log(`--- \u7B2C 1 \u8F6E\u6D4B\u8BD5 (${resultMap.size} \u4E2A\u8282\u70B9) ---`);
|
|
5079
|
-
}
|
|
5080
5064
|
if (IS_TTY) {
|
|
5081
5065
|
process.stdout.write("\n");
|
|
5082
5066
|
}
|
|
5083
5067
|
console.log(`--- \u7B2C ${round} \u8F6E\u91CD\u8BD5 (${count} \u4E2A\u8282\u70B9) ---`);
|
|
5068
|
+
alive = 0;
|
|
5069
|
+
dead = 0;
|
|
5084
5070
|
},
|
|
5085
5071
|
finish() {
|
|
5086
5072
|
if (IS_TTY) {
|