Remove Python from report validation and rendering

This commit is contained in:
gitea committed 2026-10-12 14:02:44 +08:00
1 parent c1a5cc20e9
commit fb7948307c
19 files changed
+743 -90

No files matched your search

+3 -3
View File
@@ -13,9 +13,9 @@ import type { ParsedArgs } from "../types.js";
export async function handleLocalReportCommand(action: "validate" | "render", args: ParsedArgs) {
const file = args.command[2] ?? stringOption(args.options.file);
if (!file) throw usageError(`Usage: seal-use report ${action} <报告文件.md>${action === "render" ? " --out <产物路径词干>" : ""}`);
const python = stringOption(args.options.python);
if ("python" in args.options) throw usageError("报告工具已移除 Python 依赖,请去掉 --python 参数。");
if (action === "validate") {
const result = await validateReportFile(file, { python });
const result = await validateReportFile(file);
printJson(result, outputOptions(args.options));
if (!result.valid) throw new CliError("报告校验未通过,请按 issues 修正后重试。", 1);
return;
@@ -23,7 +23,7 @@ export async function handleLocalReportCommand(action: "validate" | "render", ar
const out = stringOption(args.options.out) ?? stringOption(args.options.o);
if (!out) throw usageError("Usage: seal-use report render <报告文件.md> --out <产物路径词干>");
const result = await renderReportFile(file, {
out, python, format: stringOption(args.options.format), width: numberOption(args.options.width),
out, format: stringOption(args.options.format), width: numberOption(args.options.width),
chrome: stringOption(args.options.chrome), overwrite: booleanOption(args.options.overwrite)
});
printJson(result, outputOptions(args.options));