Add trailing terms definition appendix to report renderers
This commit is contained in:
1 parent
cbc3b333ba
commit
69d5b4f130
11 files changed
+143
-16
No files matched your search
@@ -78,10 +78,12 @@ export async function handleLocalReportCommand(action: string | undefined, args:
|
||||
}
|
||||
const out = stringOption(args.options.out) ?? stringOption(args.options.o);
|
||||
if (!out) throw usageError(`Usage: seal-use report ${action} <报告文件.md> --out <${action === "export" ? "目标文件夹" : "产物路径词干"}>`);
|
||||
const glossary = args.options["no-glossary"] ? false : booleanOption(args.options.glossary) ?? true;
|
||||
if (action === "export") {
|
||||
const result = await exportReportPackage(file, {
|
||||
out, format: stringOption(args.options.format), width: numberOption(args.options.width),
|
||||
chrome: stringOption(args.options.chrome), overwrite: booleanOption(args.options.overwrite)
|
||||
chrome: stringOption(args.options.chrome), overwrite: booleanOption(args.options.overwrite),
|
||||
glossary
|
||||
});
|
||||
printJson(result, outputOptions(args.options));
|
||||
if (!result.validation.valid) throw new CliError("报告校验未通过,未生成完整导出包。请按 validation.issues 修正后重试。", 1);
|
||||
@@ -89,7 +91,8 @@ export async function handleLocalReportCommand(action: string | undefined, args:
|
||||
}
|
||||
const result = await renderReportFile(file, {
|
||||
out, format: stringOption(args.options.format), width: numberOption(args.options.width),
|
||||
chrome: stringOption(args.options.chrome), overwrite: booleanOption(args.options.overwrite)
|
||||
chrome: stringOption(args.options.chrome), overwrite: booleanOption(args.options.overwrite),
|
||||
glossary
|
||||
});
|
||||
printJson(result, outputOptions(args.options));
|
||||
if (!result.validation.valid) throw new CliError("报告校验未通过,未生成渲染产物。请按 validation.issues 修正后重试。", 1);
|
||||
|
||||
@@ -706,6 +706,7 @@ export const HELP_REGISTRY: AreaHelp[] = [
|
||||
{ flag: "--format <format>", description: "all (default), html, png, or pdf; PNG/PDF also produce HTML" },
|
||||
{ flag: "--width <px>", description: "PNG viewport width, default 1200 (320–5000)" },
|
||||
{ flag: "--chrome <executable>", description: "Chrome/Chromium executable; otherwise auto-detected" },
|
||||
{ flag: "--no-glossary", description: "Omit the trailing terms definition and calculation standards appendix" },
|
||||
{ flag: "--overwrite", description: "Explicitly permit replacing existing output files after successful rendering" }
|
||||
],
|
||||
description: "No enterprise login. Validation failure produces JSON issues and no artifacts. Validation and HTML use the bundled runtime; PNG/PDF need Chrome/Chromium. No Python or Pillow required. First use of math fetches and caches KaTeX resources. Markdown parsing is bundled, with no runtime npm/npx dependency."
|
||||
@@ -719,6 +720,7 @@ export const HELP_REGISTRY: AreaHelp[] = [
|
||||
{ flag: "--format <format>", description: "all (default), html, or pdf" },
|
||||
{ flag: "--width <px>", description: "PNG viewport width, default 1200" },
|
||||
{ flag: "--chrome <executable>", description: "Chrome/Chromium executable; otherwise auto-detected" },
|
||||
{ flag: "--no-glossary", description: "Omit the trailing terms definition and calculation standards appendix" },
|
||||
{ flag: "--overwrite", description: "Explicitly permit replacing existing output files" }
|
||||
],
|
||||
description: "Bundles the report into a clean single directory: includes the Markdown with its .md.assets/ companion folder, plus self-contained HTML and print-ready PDF."
|
||||
|
||||
+4
-4
@@ -27,9 +27,9 @@ export const BOOLEAN_FLAGS = new Set([
|
||||
"auto-login", "autoLogin", "bg-save", "changelog", "check", "check-only",
|
||||
"completed-only", "completedOnly", "confirm", "count", "disable-attachment-cache", "disableAttachmentCache",
|
||||
"download", "downloads", "dry-run", "dryRun", "elevate-hose", "enabled",
|
||||
"exclude-deleted", "extract", "extract-expenses", "extractExpenses", "fail-on-flips", "flow", "force", "full", "has-input", "has-output", "help",
|
||||
"exclude-deleted", "extract", "extract-expenses", "extractExpenses", "fail-on-flips", "flow", "force", "full", "glossary", "has-input", "has-output", "help",
|
||||
"hose", "hose-outbound", "hose-sso", "hoseOutbound", "hoseSso", "include-deleted", "include-io-preview", "include-simulation", "include-unchanged",
|
||||
"includeBridge", "includeSimulation", "includeUnchanged", "local", "no-attachments", "no-flow",
|
||||
"includeBridge", "includeSimulation", "includeUnchanged", "local", "no-attachments", "no-flow", "no-glossary",
|
||||
"no-wait", "noWait", "outbound", "overwrite", "plain", "publish", "quiet",
|
||||
"r", "recode", "refresh", "refresh-if-missing", "reveal", "rotate-secret", "rotateSecret",
|
||||
"save", "silent", "silent-save", "simulation", "skip-expense-extraction", "skip-extract", "skip-invoice-generation",
|
||||
@@ -102,7 +102,7 @@ export const KNOWN_FLAGS = new Set([
|
||||
"environment", "exclude-deleted", "extract", "extract-expenses", "extractExpenses", "expire", "expires-in", "expiresIn", "f", "fail-on-flips",
|
||||
"fields", "file", "file-id", "file-name", "flow", "flow-concurrency", "flow-id", "flow-ids", "flow-status-list",
|
||||
"flowId", "flowIds", "flowStatusList", "force", "format", "from", "from-link",
|
||||
"full", "h", "has-input", "has-output", "help", "hose", "hose-outbound", "hose-sso", "hoseOutbound", "hoseSso",
|
||||
"full", "glossary", "h", "has-input", "has-output", "help", "hose", "hose-outbound", "hose-sso", "hoseOutbound", "hoseSso",
|
||||
"host", "human", "human-accuracy", "humanAccuracy", "humanResult", "id", "include-deleted", "include-io-preview", "include-simulation", "include-unchanged",
|
||||
"includeBridge", "includeSimulation", "includeUnchanged", "input", "integration", "json",
|
||||
"json-path", "key-id", "keyId", "keyword", "ledger", "level", "limit", "lines",
|
||||
@@ -110,7 +110,7 @@ export const KNOWN_FLAGS = new Set([
|
||||
"max-chars", "max-preview-chars", "maxChars", "maxResults", "max-results", "message-id", "messageId", "metadata", "metadata-key", "min-score", "minScore", "mode",
|
||||
"max-runs",
|
||||
"month",
|
||||
"n", "name", "name-contains", "no-attachments", "no-flow", "no-wait", "noWait", "node-id", "nodeId",
|
||||
"n", "name", "name-contains", "no-attachments", "no-flow", "no-glossary", "no-wait", "noWait", "node-id", "nodeId",
|
||||
"note", "observation-id", "observation-types", "o", "offset", "out", "out-dir", "outDir", "outbound",
|
||||
"outgoing-result-webhook", "outgoingResultWebhook", "output", "output-file", "outputFile", "overwrite",
|
||||
"p", "package-id", "package-ids", "packageId", "packageIds", "path",
|
||||
|
||||
Reference in new issue
Block a user