Output hostname size of sgmodule build

This commit is contained in:
SukkaW
2024-10-21 01:01:48 +08:00
parent 8e2644ac6c
commit 94ea47d447
3 changed files with 11 additions and 16 deletions

View File

@@ -262,12 +262,14 @@ export class RulesetOutput extends RuleOutput<Preprocessed> {
console.table(parsedFailures);
}
const hostnames = Array.from(new Set(parsed.map(i => i[1])));
return [
'#!name=[Sukka] Surge Reject MITM',
'#!desc=为 URL Regex 规则组启用 MITM',
`#!desc=为 URL Regex 规则组启用 MITM (size: ${hostnames.length})`,
'',
'[MITM]',
'hostname = %APPEND% ' + Array.from(new Set(parsed.map(i => i[1]))).join(', ')
'hostname = %APPEND% ' + hostnames.join(', ')
];
}
}