Refactor: new write strategy (#58)

This commit is contained in:
Sukka
2025-01-29 03:58:49 +08:00
committed by GitHub
parent 6606d5cb01
commit b22079f5eb
17 changed files with 1096 additions and 673 deletions

View File

@@ -112,7 +112,7 @@ async function transform(parentSpan: Span, sourcePath: string, relativePath: str
const res = await processFile(span, sourcePath);
if (res === $skip) return;
const [title, descriptions, lines, sgmodulePathname] = res;
const [title, descriptions, lines, sgmoduleName] = res;
let finalDescriptions: string[];
if (descriptions.length) {
@@ -134,7 +134,7 @@ async function transform(parentSpan: Span, sourcePath: string, relativePath: str
return new RulesetOutput(span, id, type)
.withTitle(title)
.withDescription(finalDescriptions)
.withMitmSgmodulePath(sgmodulePathname)
.withMitmSgmodulePath(sgmoduleName)
.addFromRuleset(lines)
.write();
});