Refactor file output

This commit is contained in:
SukkaW
2024-09-04 21:43:13 +08:00
parent 3e71107c2b
commit 0a6f28dcde
14 changed files with 40 additions and 38 deletions

View File

@@ -155,7 +155,12 @@ export const createRuleset = (
parentSpan: Span,
title: string, description: string[] | readonly string[], date: Date, content: string[],
type: 'ruleset' | 'domainset' | 'ipcidr' | 'ipcidr6',
surgePath: string, clashPath: string, singBoxPath: string, _clashMrsPath?: string
[surgePath, clashPath, singBoxPath, _clashMrsPath]: readonly [
surgePath: string,
clashPath: string,
singBoxPath: string,
_clashMrsPath?: string
]
) => parentSpan.traceChild(`create ruleset: ${path.basename(surgePath, path.extname(surgePath))}`).traceAsyncFn(async (childSpan) => {
content = sortRuleSet(content);
const surgeContent = childSpan.traceChildSync('process surge ruleset', () => {