frontend-guardian-core 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/fg-core.js +183 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/dashboard.d.ts +24 -0
- package/dist/utils/dashboard.d.ts.map +1 -0
- package/dist/utils/dashboard.js +315 -0
- package/dist/utils/dashboard.js.map +1 -0
- package/dist/utils/history-report.d.ts +44 -0
- package/dist/utils/history-report.d.ts.map +1 -1
- package/dist/utils/history-report.js +100 -0
- package/dist/utils/history-report.js.map +1 -1
- package/dist/utils/monorepo.d.ts +57 -0
- package/dist/utils/monorepo.d.ts.map +1 -0
- package/dist/utils/monorepo.js +298 -0
- package/dist/utils/monorepo.js.map +1 -0
- package/dist/utils/workspace-scanner.d.ts +104 -0
- package/dist/utils/workspace-scanner.d.ts.map +1 -0
- package/dist/utils/workspace-scanner.js +218 -0
- package/dist/utils/workspace-scanner.js.map +1 -0
- package/package.json +1 -1
package/bin/fg-core.js
CHANGED
|
@@ -38,6 +38,12 @@ import {
|
|
|
38
38
|
SmartCache,
|
|
39
39
|
runFixBot,
|
|
40
40
|
detectFixBotConfig,
|
|
41
|
+
HistoryReport,
|
|
42
|
+
generateDashboard,
|
|
43
|
+
detectMonorepo,
|
|
44
|
+
scanWorkspace,
|
|
45
|
+
formatWorkspaceReport,
|
|
46
|
+
formatWorkspaceJson,
|
|
41
47
|
} from "../dist/index.js";
|
|
42
48
|
import pc from "picocolors";
|
|
43
49
|
import { runWatchMode } from "./watch-mode.js";
|
|
@@ -70,7 +76,7 @@ const MODULE_RULES = {
|
|
|
70
76
|
|
|
71
77
|
function showHelp() {
|
|
72
78
|
console.log(`
|
|
73
|
-
Frontend Guardian Core v2.
|
|
79
|
+
Frontend Guardian Core v2.9.0
|
|
74
80
|
|
|
75
81
|
Usage:
|
|
76
82
|
fg-core <project-dir> [options]
|
|
@@ -108,6 +114,15 @@ Options:
|
|
|
108
114
|
--pr-number <n> 指定 PR/MR 编号(配合 --post-comment)
|
|
109
115
|
--comment-provider <p> 评论平台: github | gitlab(配合 --post-comment)
|
|
110
116
|
--upload 上传报告到指定位置(需配置 FG_UPLOAD_PROVIDER 等环境变量)
|
|
117
|
+
--save-report 保存完整扫描报告到 .frontend-guardian/history/
|
|
118
|
+
--history 查看历史扫描记录
|
|
119
|
+
--history-module <m> 历史记录按模块过滤(配合 --history)
|
|
120
|
+
--history-limit <n> 历史记录显示条数限制(默认 20)
|
|
121
|
+
--generate-dashboard 生成团队趋势看板 HTML 页面
|
|
122
|
+
--monorepo 启用 Monorepo 模式:自动检测 workspace 并扫描所有子包
|
|
123
|
+
--workspace <name> 仅扫描指定 workspace 包(可多次使用,配合 --monorepo)
|
|
124
|
+
--skip-package <name> 跳过指定 workspace 包(可多次使用,配合 --monorepo)
|
|
125
|
+
--no-cross-deps 禁用跨包依赖分析(配合 --monorepo)
|
|
111
126
|
--help, -h 显示帮助
|
|
112
127
|
|
|
113
128
|
Examples:
|
|
@@ -162,6 +177,15 @@ async function main() {
|
|
|
162
177
|
upload: false,
|
|
163
178
|
output: undefined,
|
|
164
179
|
fixBot: false,
|
|
180
|
+
saveReport: false,
|
|
181
|
+
history: false,
|
|
182
|
+
historyModule: undefined,
|
|
183
|
+
historyLimit: 20,
|
|
184
|
+
generateDashboard: false,
|
|
185
|
+
monorepo: false,
|
|
186
|
+
workspace: [],
|
|
187
|
+
skipPackage: [],
|
|
188
|
+
crossDeps: true,
|
|
165
189
|
};
|
|
166
190
|
|
|
167
191
|
for (let i = 0; i < args.length; i++) {
|
|
@@ -265,6 +289,33 @@ async function main() {
|
|
|
265
289
|
case "--fix-bot":
|
|
266
290
|
options.fixBot = true;
|
|
267
291
|
break;
|
|
292
|
+
case "--save-report":
|
|
293
|
+
options.saveReport = true;
|
|
294
|
+
break;
|
|
295
|
+
case "--history":
|
|
296
|
+
options.history = true;
|
|
297
|
+
break;
|
|
298
|
+
case "--history-module":
|
|
299
|
+
options.historyModule = args[++i];
|
|
300
|
+
break;
|
|
301
|
+
case "--history-limit":
|
|
302
|
+
options.historyLimit = parseInt(args[++i], 10) || 20;
|
|
303
|
+
break;
|
|
304
|
+
case "--generate-dashboard":
|
|
305
|
+
options.generateDashboard = true;
|
|
306
|
+
break;
|
|
307
|
+
case "--monorepo":
|
|
308
|
+
options.monorepo = true;
|
|
309
|
+
break;
|
|
310
|
+
case "--workspace":
|
|
311
|
+
options.workspace.push(args[++i]);
|
|
312
|
+
break;
|
|
313
|
+
case "--skip-package":
|
|
314
|
+
options.skipPackage.push(args[++i]);
|
|
315
|
+
break;
|
|
316
|
+
case "--no-cross-deps":
|
|
317
|
+
options.crossDeps = false;
|
|
318
|
+
break;
|
|
268
319
|
case "--help":
|
|
269
320
|
case "-h":
|
|
270
321
|
showHelp();
|
|
@@ -330,6 +381,122 @@ async function main() {
|
|
|
330
381
|
process.exit(0);
|
|
331
382
|
}
|
|
332
383
|
|
|
384
|
+
// v2.8.0: 历史报告查询
|
|
385
|
+
if (options.history) {
|
|
386
|
+
const hr = new HistoryReport(options.projectDir);
|
|
387
|
+
const reports = hr.listReports();
|
|
388
|
+
let filtered = reports;
|
|
389
|
+
if (options.historyModule) {
|
|
390
|
+
filtered = reports.filter((r) => r.module === options.historyModule);
|
|
391
|
+
}
|
|
392
|
+
filtered = filtered.slice(0, options.historyLimit);
|
|
393
|
+
|
|
394
|
+
console.log(pc.cyan("📜 历史扫描记录"));
|
|
395
|
+
if (filtered.length === 0) {
|
|
396
|
+
console.log(pc.gray(" 暂无历史记录"));
|
|
397
|
+
} else {
|
|
398
|
+
console.log(` ${"时间".padEnd(20)} ${"模块".padEnd(15)} ${"C".padStart(4)} ${"W".padStart(4)} ${"S".padStart(4)}`);
|
|
399
|
+
console.log(pc.gray(" " + "-".repeat(50)));
|
|
400
|
+
for (const r of filtered) {
|
|
401
|
+
const time = new Date(r.timestamp).toLocaleString("zh-CN", { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit" });
|
|
402
|
+
const c = pc.red(String(r.counts.critical).padStart(4));
|
|
403
|
+
const w = pc.yellow(String(r.counts.warning).padStart(4));
|
|
404
|
+
const s = pc.blue(String(r.counts.suggestion).padStart(4));
|
|
405
|
+
console.log(` ${time.padEnd(20)} ${r.module.padEnd(15)} ${c} ${w} ${s}`);
|
|
406
|
+
}
|
|
407
|
+
console.log(pc.gray(` 共 ${reports.length} 条记录` + (options.historyModule ? `,已按模块 "${options.historyModule}" 过滤` : "")));
|
|
408
|
+
}
|
|
409
|
+
process.exit(0);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// v2.8.0: 生成趋势看板
|
|
413
|
+
if (options.generateDashboard) {
|
|
414
|
+
const hr = new HistoryReport(options.projectDir);
|
|
415
|
+
const reportList = hr.listReports();
|
|
416
|
+
if (reportList.length === 0) {
|
|
417
|
+
console.log(pc.yellow("⚠️ 暂无历史扫描记录,无法生成看板。请先运行 --save-report 生成历史数据。"));
|
|
418
|
+
process.exit(1);
|
|
419
|
+
}
|
|
420
|
+
const fullReports = reportList
|
|
421
|
+
.map((r) => hr.loadReport(r.filename))
|
|
422
|
+
.filter(Boolean);
|
|
423
|
+
const outputPath = generateDashboard(fullReports, { projectDir: options.projectDir });
|
|
424
|
+
console.log(pc.cyan("📊 趋势看板已生成"));
|
|
425
|
+
console.log(pc.green(` ✅ ${outputPath}`));
|
|
426
|
+
console.log(pc.gray(` 共 ${fullReports.length} 次扫描记录`));
|
|
427
|
+
console.log(pc.gray(" 在浏览器中打开即可查看"));
|
|
428
|
+
process.exit(0);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// v2.9.0: Monorepo 模式
|
|
432
|
+
if (options.monorepo) {
|
|
433
|
+
const mono = detectMonorepo(options.projectDir);
|
|
434
|
+
if (!mono.isMonorepo) {
|
|
435
|
+
console.log(pc.yellow(`⚠️ 未检测到 monorepo workspace 配置(pnpm-workspace.yaml / lerna.json / nx.json / package.json workspaces)`));
|
|
436
|
+
console.log(pc.gray(` 将在项目根目录执行常规扫描...`));
|
|
437
|
+
if (options.module === "all") {
|
|
438
|
+
await runAllModules(options);
|
|
439
|
+
} else {
|
|
440
|
+
await runSingleModule(options);
|
|
441
|
+
}
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
if (!options.json) {
|
|
446
|
+
console.log(pc.cyan("📦 Monorepo Workspace 模式"));
|
|
447
|
+
console.log(pc.gray(` 工具: ${mono.tool}`));
|
|
448
|
+
console.log(pc.gray(` 发现 ${mono.packages.length} 个子包`));
|
|
449
|
+
if (options.workspace.length > 0) {
|
|
450
|
+
console.log(pc.gray(` 仅扫描: ${options.workspace.join(", ")}`));
|
|
451
|
+
}
|
|
452
|
+
if (options.skipPackage.length > 0) {
|
|
453
|
+
console.log(pc.gray(` 跳过: ${options.skipPackage.join(", ")}`));
|
|
454
|
+
}
|
|
455
|
+
console.log("");
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
const workspaceResult = await scanWorkspace({
|
|
459
|
+
projectDir: options.projectDir,
|
|
460
|
+
module: options.module === "all" ? undefined : options.module,
|
|
461
|
+
minSeverity: options.minSeverity,
|
|
462
|
+
noCluster: !options.cluster,
|
|
463
|
+
external: options.external,
|
|
464
|
+
cache: options.cache,
|
|
465
|
+
configFile: options.configFile,
|
|
466
|
+
files: options.files,
|
|
467
|
+
exclude: options.exclude,
|
|
468
|
+
skipLargeFilesThreshold: options.skipLargeFilesThreshold,
|
|
469
|
+
analyzeCrossDeps: options.crossDeps,
|
|
470
|
+
onlyPackages: options.workspace.length > 0 ? options.workspace : undefined,
|
|
471
|
+
skipPackages: options.skipPackage.length > 0 ? options.skipPackage : undefined,
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
if (options.json) {
|
|
475
|
+
console.log(JSON.stringify(formatWorkspaceJson(workspaceResult), null, 2));
|
|
476
|
+
process.exit(workspaceResult.summary.issuesBySeverity.critical > 0 ? 1 : 0);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
console.log(formatWorkspaceReport(workspaceResult));
|
|
480
|
+
|
|
481
|
+
// 详细输出各包的 issues
|
|
482
|
+
for (const pr of workspaceResult.packageResults) {
|
|
483
|
+
if (!pr.success || pr.result.total === 0) continue;
|
|
484
|
+
|
|
485
|
+
console.log(pc.cyan(`\n📦 ${pr.package.name} (${pr.package.path})`));
|
|
486
|
+
const allIssues = [...pr.result.issues.critical, ...pr.result.issues.warning, ...pr.result.issues.suggestion];
|
|
487
|
+
for (const issue of allIssues) {
|
|
488
|
+
printIssue(issue, issue.severity === "critical" ? pc.red : issue.severity === "warning" ? pc.yellow : pc.blue);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
console.log(pc.gray(`\n⏱️ 总耗时: ${workspaceResult.summary.totalDuration}ms | 扫描 ${workspaceResult.summary.totalFilesScanned} 个文件`));
|
|
493
|
+
|
|
494
|
+
if (workspaceResult.summary.issuesBySeverity.critical > 0) {
|
|
495
|
+
process.exit(1);
|
|
496
|
+
}
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
|
|
333
500
|
if (options.watch) {
|
|
334
501
|
const scanFn = options.module === "all" ? runAllModules : runSingleModule;
|
|
335
502
|
// v2.6.0: Watch 模式复用 SmartCache,实现缓存预热
|
|
@@ -798,6 +965,21 @@ async function runAllModules(options, cacheInstance) {
|
|
|
798
965
|
}
|
|
799
966
|
}
|
|
800
967
|
|
|
968
|
+
// v2.8.0: 保存完整扫描报告
|
|
969
|
+
if (options.saveReport) {
|
|
970
|
+
const hr = new HistoryReport(options.projectDir);
|
|
971
|
+
for (const mod of MODULES) {
|
|
972
|
+
const r = allResults[mod];
|
|
973
|
+
if (!r || r.total === 0) continue;
|
|
974
|
+
const allIssues = [...r.issues.critical, ...r.issues.warning, ...r.issues.suggestion];
|
|
975
|
+
const filename = hr.saveFullReport(r, allIssues);
|
|
976
|
+
if (!options.json) {
|
|
977
|
+
console.log(pc.cyan(`💾 报告已保存`));
|
|
978
|
+
console.log(pc.gray(` .frontend-guardian/history/${filename}`));
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
|
|
801
983
|
console.log(
|
|
802
984
|
pc.gray(
|
|
803
985
|
`⏱️ 总耗时: ${totalDuration}ms | 扫描 ${totalFilesScanned} 个文件 | ${totalFilesWithIssues} 个文件有问题`
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,13 @@ export { installGitHooks, uninstallGitHooks, hasGitHook, detectHusky } from "./u
|
|
|
16
16
|
export { generateCIConfig, detectCIProvider } from "./utils/ci-generator.js";
|
|
17
17
|
export type { CIProvider, CIGeneratorOptions } from "./utils/ci-generator.js";
|
|
18
18
|
export { HistoryReport } from "./utils/history-report.js";
|
|
19
|
-
export type { HistoryEntry, TrendAnalysis } from "./utils/history-report.js";
|
|
19
|
+
export type { HistoryEntry, TrendAnalysis, FullReport } from "./utils/history-report.js";
|
|
20
|
+
export { generateDashboard } from "./utils/dashboard.js";
|
|
21
|
+
export type { DashboardOptions } from "./utils/dashboard.js";
|
|
22
|
+
export { detectMonorepo, analyzeCrossPackageDeps } from "./utils/monorepo.js";
|
|
23
|
+
export type { MonorepoInfo, WorkspacePackage, CrossPackageIssue, MonorepoTool } from "./utils/monorepo.js";
|
|
24
|
+
export { scanWorkspace, formatWorkspaceReport, formatWorkspaceJson } from "./utils/workspace-scanner.js";
|
|
25
|
+
export type { WorkspaceScanResult, PackageScanResult, WorkspaceSummary, WorkspaceScanOptions } from "./utils/workspace-scanner.js";
|
|
20
26
|
export { uploadReport, detectUploadConfig } from "./utils/report-uploader.js";
|
|
21
27
|
export type { UploadConfig, UploadResult } from "./utils/report-uploader.js";
|
|
22
28
|
export { runFixBot, detectFixBotConfig } from "./utils/fix-bot.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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,EACH,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3F,OAAO,EACH,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* 导出所有公共 API
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.getJSXTagName = exports.getFileExt = exports.svelteRules = exports.platformRules = exports.hooksRules = exports.componentRules = exports.crossFileRules = exports.namingRules = exports.securityRules = exports.a11yRules = exports.performanceRules = exports.i18nRules = exports.runAllExternalTools = void 0;
|
|
7
|
+
exports.detectPublisherConfig = exports.GitLabMRPublisher = exports.GitHubPRPublisher = exports.isGuardianComment = exports.COMMENT_MARKER = exports.generatePRCommentSummary = exports.generatePRComment = exports.writeJobSummary = exports.isGitHubActions = exports.formatAllAnnotations = exports.formatIssuesAnnotations = exports.formatIssueAnnotation = exports.formatSarif = exports.generateSarif = exports.toBaselineIssue = exports.saveBaseline = exports.loadBaseline = exports.generateBaseline = exports.compareWithBaseline = exports.BaselineManager = exports.detectFixBotConfig = exports.runFixBot = exports.detectUploadConfig = exports.uploadReport = exports.formatWorkspaceJson = exports.formatWorkspaceReport = exports.scanWorkspace = exports.analyzeCrossPackageDeps = exports.detectMonorepo = exports.generateDashboard = exports.HistoryReport = exports.detectCIProvider = exports.generateCIConfig = exports.detectHusky = exports.hasGitHook = exports.uninstallGitHooks = exports.installGitHooks = exports.generateDefaultConfig = exports.initConfig = exports.loadConfig = exports.detectProjectMeta = exports.walkAST = exports.hasImport = exports.getImports = exports.parseAST = exports.createRegistry = exports.RuleRegistry = exports.SmartCache = exports.createEngine = exports.RuleEngine = void 0;
|
|
8
|
+
exports.getJSXTagName = exports.getFileExt = exports.svelteRules = exports.platformRules = exports.hooksRules = exports.componentRules = exports.crossFileRules = exports.namingRules = exports.securityRules = exports.a11yRules = exports.performanceRules = exports.i18nRules = exports.runAllExternalTools = exports.stylelintIntegration = exports.typescriptIntegration = exports.eslintIntegration = exports.allExternalTools = exports.autoPublishComment = exports.createPublisher = void 0;
|
|
9
9
|
var rule_engine_js_1 = require("./engine/rule-engine.js");
|
|
10
10
|
Object.defineProperty(exports, "RuleEngine", { enumerable: true, get: function () { return rule_engine_js_1.RuleEngine; } });
|
|
11
11
|
Object.defineProperty(exports, "createEngine", { enumerable: true, get: function () { return rule_engine_js_1.createEngine; } });
|
|
@@ -36,6 +36,17 @@ Object.defineProperty(exports, "generateCIConfig", { enumerable: true, get: func
|
|
|
36
36
|
Object.defineProperty(exports, "detectCIProvider", { enumerable: true, get: function () { return ci_generator_js_1.detectCIProvider; } });
|
|
37
37
|
var history_report_js_1 = require("./utils/history-report.js");
|
|
38
38
|
Object.defineProperty(exports, "HistoryReport", { enumerable: true, get: function () { return history_report_js_1.HistoryReport; } });
|
|
39
|
+
// v2.8.0: 趋势看板
|
|
40
|
+
var dashboard_js_1 = require("./utils/dashboard.js");
|
|
41
|
+
Object.defineProperty(exports, "generateDashboard", { enumerable: true, get: function () { return dashboard_js_1.generateDashboard; } });
|
|
42
|
+
// v2.9.0: Monorepo 工作区支持
|
|
43
|
+
var monorepo_js_1 = require("./utils/monorepo.js");
|
|
44
|
+
Object.defineProperty(exports, "detectMonorepo", { enumerable: true, get: function () { return monorepo_js_1.detectMonorepo; } });
|
|
45
|
+
Object.defineProperty(exports, "analyzeCrossPackageDeps", { enumerable: true, get: function () { return monorepo_js_1.analyzeCrossPackageDeps; } });
|
|
46
|
+
var workspace_scanner_js_1 = require("./utils/workspace-scanner.js");
|
|
47
|
+
Object.defineProperty(exports, "scanWorkspace", { enumerable: true, get: function () { return workspace_scanner_js_1.scanWorkspace; } });
|
|
48
|
+
Object.defineProperty(exports, "formatWorkspaceReport", { enumerable: true, get: function () { return workspace_scanner_js_1.formatWorkspaceReport; } });
|
|
49
|
+
Object.defineProperty(exports, "formatWorkspaceJson", { enumerable: true, get: function () { return workspace_scanner_js_1.formatWorkspaceJson; } });
|
|
39
50
|
// v2.5.0: 报告上传
|
|
40
51
|
var report_uploader_js_1 = require("./utils/report-uploader.js");
|
|
41
52
|
Object.defineProperty(exports, "uploadReport", { enumerable: true, get: function () { return report_uploader_js_1.uploadReport; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,0DAAmE;AAA1D,4GAAA,UAAU,OAAA;AAAE,8GAAA,YAAY,OAAA;AAEjC,8CAA+C;AAAtC,sGAAA,UAAU,OAAA;AA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AAA,eAAe,OAAA;AAGnB,qBAAqB;AACrB,4DAKoC;AAJhC,kHAAA,iBAAiB,OAAA;AACjB,yHAAA,wBAAwB,OAAA;AACxB,+GAAA,cAAc,OAAA;AACd,kHAAA,iBAAiB,OAAA;AAIrB,2DAMiC;AAL7B,oHAAA,iBAAiB,OAAA;AACjB,oHAAA,iBAAiB,OAAA;AACjB,wHAAA,qBAAqB,OAAA;AACrB,kHAAA,eAAe,OAAA;AACf,qHAAA,kBAAkB,OAAA;AAItB,kBAAkB;AAClB,oDAMiC;AAL7B,4GAAA,gBAAgB,OAAA;AAChB,6GAAA,iBAAiB,OAAA;AACjB,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AACpB,+GAAA,mBAAmB,OAAA;AAIvB,8DAAuD;AAA9C,4GAAA,SAAS,OAAA;AAElB,4EAAqE;AAA5D,0HAAA,gBAAgB,OAAA;AACzB,8DAAuD;AAA9C,4GAAA,SAAS,OAAA;AAClB,sEAA+D;AAAtD,oHAAA,aAAa,OAAA;AACtB,kEAA2D;AAAlD,gHAAA,WAAW,OAAA;AACpB,0EAAkE;AAAzD,uHAAA,cAAc,OAAA;AACvB,wEAAiE;AAAxD,sHAAA,cAAc,OAAA;AACvB,gEAAyD;AAAhD,8GAAA,UAAU,OAAA;AACnB,sEAA+D;AAAtD,oHAAA,aAAa,OAAA;AACtB,kEAA2D;AAAlD,gHAAA,WAAW,OAAA;AACpB,+CAA8D;AAArD,uGAAA,UAAU,OAAA;AAAE,0GAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard — 团队趋势看板生成器
|
|
3
|
+
*
|
|
4
|
+
* v2.8.0 功能:
|
|
5
|
+
* 1. 基于历史报告数据生成静态 HTML 趋势页面
|
|
6
|
+
* 2. 零外部依赖:纯 Canvas 绘制图表,单文件 HTML
|
|
7
|
+
* 3. 可直接浏览器打开或部署到静态托管
|
|
8
|
+
*/
|
|
9
|
+
import type { FullReport } from "./history-report.js";
|
|
10
|
+
export interface DashboardOptions {
|
|
11
|
+
/** 项目目录 */
|
|
12
|
+
projectDir: string;
|
|
13
|
+
/** 输出文件路径(默认 ./frontend-guardian-dashboard.html) */
|
|
14
|
+
outputPath?: string;
|
|
15
|
+
/** 标题 */
|
|
16
|
+
title?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 生成趋势看板 HTML
|
|
20
|
+
* @param reports 历史报告列表
|
|
21
|
+
* @param options 选项
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateDashboard(reports: FullReport[], options: DashboardOptions): string;
|
|
24
|
+
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/utils/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC7B,WAAW;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAsS1F"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dashboard — 团队趋势看板生成器
|
|
4
|
+
*
|
|
5
|
+
* v2.8.0 功能:
|
|
6
|
+
* 1. 基于历史报告数据生成静态 HTML 趋势页面
|
|
7
|
+
* 2. 零外部依赖:纯 Canvas 绘制图表,单文件 HTML
|
|
8
|
+
* 3. 可直接浏览器打开或部署到静态托管
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.generateDashboard = generateDashboard;
|
|
12
|
+
const node_fs_1 = require("node:fs");
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
|
+
/**
|
|
15
|
+
* 生成趋势看板 HTML
|
|
16
|
+
* @param reports 历史报告列表
|
|
17
|
+
* @param options 选项
|
|
18
|
+
*/
|
|
19
|
+
function generateDashboard(reports, options) {
|
|
20
|
+
const { projectDir, outputPath = (0, node_path_1.resolve)(projectDir, "frontend-guardian-dashboard.html"), title = "Frontend Guardian 趋势看板" } = options;
|
|
21
|
+
if (reports.length === 0) {
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
// 按时间排序
|
|
25
|
+
const sorted = [...reports].sort((a, b) => a.timestamp - b.timestamp);
|
|
26
|
+
// 统计
|
|
27
|
+
const totalIssues = sorted.map((r) => ({
|
|
28
|
+
time: formatTime(r.timestamp),
|
|
29
|
+
critical: r.result.issues.critical.length,
|
|
30
|
+
warning: r.result.issues.warning.length,
|
|
31
|
+
suggestion: r.result.issues.suggestion.length,
|
|
32
|
+
total: r.result.total,
|
|
33
|
+
}));
|
|
34
|
+
// 模块分布(最新一次扫描)
|
|
35
|
+
const latest = sorted[sorted.length - 1];
|
|
36
|
+
const moduleCounts = sorted.reduce((acc, r) => {
|
|
37
|
+
const mod = r.module;
|
|
38
|
+
if (!acc[mod])
|
|
39
|
+
acc[mod] = { critical: 0, warning: 0, suggestion: 0 };
|
|
40
|
+
acc[mod].critical += r.result.issues.critical.length;
|
|
41
|
+
acc[mod].warning += r.result.issues.warning.length;
|
|
42
|
+
acc[mod].suggestion += r.result.issues.suggestion.length;
|
|
43
|
+
return acc;
|
|
44
|
+
}, {});
|
|
45
|
+
// 修复率:对比最早和最新
|
|
46
|
+
const earliest = sorted[0];
|
|
47
|
+
const fixRate = earliest.result.total > 0 ? Math.round(((earliest.result.total - latest.result.total) / earliest.result.total) * 100) : 0;
|
|
48
|
+
const trendDirection = fixRate >= 0 ? "📉 改善" : "📈 恶化";
|
|
49
|
+
const html = `<!DOCTYPE html>
|
|
50
|
+
<html lang="zh-CN">
|
|
51
|
+
<head>
|
|
52
|
+
<meta charset="UTF-8">
|
|
53
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
54
|
+
<title>${escapeHtml(title)}</title>
|
|
55
|
+
<style>
|
|
56
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
57
|
+
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }
|
|
58
|
+
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
|
|
59
|
+
h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; color: #1a1a2e; }
|
|
60
|
+
.subtitle { color: #888; font-size: 14px; margin-bottom: 32px; }
|
|
61
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 32px; }
|
|
62
|
+
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
|
|
63
|
+
.card h3 { font-size: 14px; color: #888; margin-bottom: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
|
|
64
|
+
.big-number { font-size: 42px; font-weight: 700; color: #1a1a2e; }
|
|
65
|
+
.big-number.critical { color: #e74c3c; }
|
|
66
|
+
.big-number.warning { color: #f39c12; }
|
|
67
|
+
.big-number.suggestion { color: #3498db; }
|
|
68
|
+
.trend-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 500; margin-top: 8px; }
|
|
69
|
+
.trend-badge.good { background: #d4edda; color: #155724; }
|
|
70
|
+
.trend-badge.bad { background: #f8d7da; color: #721c24; }
|
|
71
|
+
.chart-container { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; }
|
|
72
|
+
.chart-container h3 { font-size: 16px; margin-bottom: 16px; color: #1a1a2e; }
|
|
73
|
+
canvas { width: 100%; height: 300px; }
|
|
74
|
+
table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
|
75
|
+
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
|
|
76
|
+
th { font-weight: 600; color: #666; font-size: 12px; text-transform: uppercase; }
|
|
77
|
+
tr:hover { background: #f9fafb; }
|
|
78
|
+
.severity-critical { color: #e74c3c; font-weight: 600; }
|
|
79
|
+
.severity-warning { color: #f39c12; font-weight: 600; }
|
|
80
|
+
.severity-suggestion { color: #3498db; font-weight: 600; }
|
|
81
|
+
.footer { text-align: center; color: #aaa; font-size: 12px; margin-top: 40px; padding-bottom: 24px; }
|
|
82
|
+
</style>
|
|
83
|
+
</head>
|
|
84
|
+
<body>
|
|
85
|
+
<div class="container">
|
|
86
|
+
<h1>📊 ${escapeHtml(title)}</h1>
|
|
87
|
+
<p class="subtitle">生成时间:${new Date().toLocaleString("zh-CN")} | 共 ${reports.length} 次扫描记录</p>
|
|
88
|
+
|
|
89
|
+
<div class="grid">
|
|
90
|
+
<div class="card">
|
|
91
|
+
<h3>🔴 Critical</h3>
|
|
92
|
+
<div class="big-number critical">${latest.result.issues.critical.length}</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="card">
|
|
95
|
+
<h3>🟡 Warning</h3>
|
|
96
|
+
<div class="big-number warning">${latest.result.issues.warning.length}</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="card">
|
|
99
|
+
<h3>💡 Suggestion</h3>
|
|
100
|
+
<div class="big-number suggestion">${latest.result.issues.suggestion.length}</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="card">
|
|
103
|
+
<h3>📈 修复趋势</h3>
|
|
104
|
+
<div class="big-number">${Math.abs(fixRate)}%</div>
|
|
105
|
+
<span class="trend-badge ${fixRate >= 0 ? "good" : "bad"}">${trendDirection}(${earliest.result.total} → ${latest.result.total})</span>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div class="chart-container">
|
|
110
|
+
<h3>📉 问题趋势(时间线)</h3>
|
|
111
|
+
<canvas id="trendChart"></canvas>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<div class="grid">
|
|
115
|
+
<div class="chart-container">
|
|
116
|
+
<h3>🍰 模块分布</h3>
|
|
117
|
+
<canvas id="moduleChart"></canvas>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="chart-container">
|
|
120
|
+
<h3>📋 严重级别分布</h3>
|
|
121
|
+
<canvas id="severityChart"></canvas>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div class="chart-container">
|
|
126
|
+
<h3>📜 扫描历史</h3>
|
|
127
|
+
<table>
|
|
128
|
+
<thead>
|
|
129
|
+
<tr><th>时间</th><th>模块</th><th>Critical</th><th>Warning</th><th>Suggestion</th><th>耗时</th></tr>
|
|
130
|
+
</thead>
|
|
131
|
+
<tbody>
|
|
132
|
+
${[...sorted].reverse().map((r) => `<tr>
|
|
133
|
+
<td>${formatTime(r.timestamp)}</td>
|
|
134
|
+
<td>${r.module}</td>
|
|
135
|
+
<td class="severity-critical">${r.result.issues.critical.length}</td>
|
|
136
|
+
<td class="severity-warning">${r.result.issues.warning.length}</td>
|
|
137
|
+
<td class="severity-suggestion">${r.result.issues.suggestion.length}</td>
|
|
138
|
+
<td>${r.result.duration}ms</td>
|
|
139
|
+
</tr>`).join("")}
|
|
140
|
+
</tbody>
|
|
141
|
+
</table>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="footer">
|
|
145
|
+
Generated by frontend-guardian v2.8.0
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<script>
|
|
150
|
+
// ── 折线图:问题趋势 ──
|
|
151
|
+
(function() {
|
|
152
|
+
const canvas = document.getElementById('trendChart');
|
|
153
|
+
const ctx = canvas.getContext('2d');
|
|
154
|
+
const dpr = window.devicePixelRatio || 1;
|
|
155
|
+
const rect = canvas.getBoundingClientRect();
|
|
156
|
+
canvas.width = rect.width * dpr;
|
|
157
|
+
canvas.height = rect.height * dpr;
|
|
158
|
+
ctx.scale(dpr, dpr);
|
|
159
|
+
|
|
160
|
+
const data = ${JSON.stringify(totalIssues)};
|
|
161
|
+
const W = rect.width, H = rect.height;
|
|
162
|
+
const pad = { t: 30, r: 30, b: 50, l: 50 };
|
|
163
|
+
const gw = W - pad.l - pad.r, gh = H - pad.t - pad.b;
|
|
164
|
+
|
|
165
|
+
const maxVal = Math.max(...data.map(d => d.total), 1);
|
|
166
|
+
const getX = i => pad.l + (i / (data.length - 1 || 1)) * gw;
|
|
167
|
+
const getY = v => pad.t + gh - (v / maxVal) * gh;
|
|
168
|
+
|
|
169
|
+
// 网格
|
|
170
|
+
ctx.strokeStyle = '#eee';
|
|
171
|
+
ctx.lineWidth = 1;
|
|
172
|
+
for (let i = 0; i <= 4; i++) {
|
|
173
|
+
const y = pad.t + (i / 4) * gh;
|
|
174
|
+
ctx.beginPath(); ctx.moveTo(pad.l, y); ctx.lineTo(W - pad.r, y); ctx.stroke();
|
|
175
|
+
ctx.fillStyle = '#999'; ctx.font = '12px sans-serif';
|
|
176
|
+
ctx.fillText(Math.round(maxVal * (1 - i / 4)), 5, y + 4);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// 轴线
|
|
180
|
+
ctx.strokeStyle = '#ddd';
|
|
181
|
+
ctx.beginPath(); ctx.moveTo(pad.l, pad.t); ctx.lineTo(pad.l, H - pad.b); ctx.stroke();
|
|
182
|
+
ctx.beginPath(); ctx.moveTo(pad.l, H - pad.b); ctx.lineTo(W - pad.r, H - pad.b); ctx.stroke();
|
|
183
|
+
|
|
184
|
+
// 数据线
|
|
185
|
+
const colors = { critical: '#e74c3c', warning: '#f39c12', suggestion: '#3498db' };
|
|
186
|
+
['critical', 'warning', 'suggestion'].forEach(key => {
|
|
187
|
+
ctx.strokeStyle = colors[key];
|
|
188
|
+
ctx.lineWidth = 2;
|
|
189
|
+
ctx.beginPath();
|
|
190
|
+
data.forEach((d, i) => {
|
|
191
|
+
const x = getX(i), y = getY(d[key]);
|
|
192
|
+
if (i === 0) ctx.moveTo(x, y); else ctx.lineTo(x, y);
|
|
193
|
+
});
|
|
194
|
+
ctx.stroke();
|
|
195
|
+
// 点
|
|
196
|
+
ctx.fillStyle = colors[key];
|
|
197
|
+
data.forEach((d, i) => {
|
|
198
|
+
const x = getX(i), y = getY(d[key]);
|
|
199
|
+
ctx.beginPath(); ctx.arc(x, y, 3, 0, Math.PI * 2); ctx.fill();
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// X轴标签
|
|
204
|
+
ctx.fillStyle = '#999'; ctx.font = '11px sans-serif'; ctx.textAlign = 'center';
|
|
205
|
+
data.forEach((d, i) => {
|
|
206
|
+
if (data.length <= 10 || i % Math.ceil(data.length / 10) === 0) {
|
|
207
|
+
ctx.fillText(d.time, getX(i), H - pad.b + 20);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
// 图例
|
|
212
|
+
const legend = [{c:'#e74c3c',l:'Critical'},{c:'#f39c12',l:'Warning'},{c:'#3498db',l:'Suggestion'}];
|
|
213
|
+
legend.forEach((item, i) => {
|
|
214
|
+
const lx = W - pad.r - 200 + i * 70;
|
|
215
|
+
ctx.fillStyle = item.c; ctx.fillRect(lx, 10, 12, 12);
|
|
216
|
+
ctx.fillStyle = '#666'; ctx.font = '12px sans-serif'; ctx.textAlign = 'left';
|
|
217
|
+
ctx.fillText(item.l, lx + 16, 21);
|
|
218
|
+
});
|
|
219
|
+
})();
|
|
220
|
+
|
|
221
|
+
// ── 饼图:模块分布 ──
|
|
222
|
+
(function() {
|
|
223
|
+
const canvas = document.getElementById('moduleChart');
|
|
224
|
+
const ctx = canvas.getContext('2d');
|
|
225
|
+
const dpr = window.devicePixelRatio || 1;
|
|
226
|
+
const rect = canvas.getBoundingClientRect();
|
|
227
|
+
canvas.width = rect.width * dpr; canvas.height = rect.height * dpr;
|
|
228
|
+
ctx.scale(dpr, dpr);
|
|
229
|
+
const W = rect.width, H = rect.height;
|
|
230
|
+
const cx = W / 2, cy = H / 2 + 10, r = Math.min(W, H) / 2 - 50;
|
|
231
|
+
|
|
232
|
+
const mods = ${JSON.stringify(Object.entries(moduleCounts).map(([name, counts]) => ({ name, total: counts.critical + counts.warning + counts.suggestion })))};
|
|
233
|
+
const total = mods.reduce((s, m) => s + m.total, 0);
|
|
234
|
+
const colors = ['#e74c3c','#f39c12','#3498db','#2ecc71','#9b59b6','#1abc9c','#e67e22','#34495e'];
|
|
235
|
+
|
|
236
|
+
let angle = -Math.PI / 2;
|
|
237
|
+
mods.forEach((mod, i) => {
|
|
238
|
+
const slice = (mod.total / total) * Math.PI * 2;
|
|
239
|
+
ctx.beginPath();
|
|
240
|
+
ctx.moveTo(cx, cy);
|
|
241
|
+
ctx.arc(cx, cy, r, angle, angle + slice);
|
|
242
|
+
ctx.closePath();
|
|
243
|
+
ctx.fillStyle = colors[i % colors.length];
|
|
244
|
+
ctx.fill();
|
|
245
|
+
ctx.strokeStyle = '#fff'; ctx.lineWidth = 2; ctx.stroke();
|
|
246
|
+
|
|
247
|
+
// 标签
|
|
248
|
+
if (mod.total > 0) {
|
|
249
|
+
const mid = angle + slice / 2;
|
|
250
|
+
const lx = cx + Math.cos(mid) * (r + 25);
|
|
251
|
+
const ly = cy + Math.sin(mid) * (r + 25);
|
|
252
|
+
ctx.fillStyle = '#555'; ctx.font = '12px sans-serif'; ctx.textAlign = 'center';
|
|
253
|
+
ctx.fillText(mod.name, lx, ly);
|
|
254
|
+
ctx.fillStyle = '#999'; ctx.font = '11px sans-serif';
|
|
255
|
+
ctx.fillText(mod.total + ' (' + Math.round(mod.total/total*100) + '%)', lx, ly + 14);
|
|
256
|
+
}
|
|
257
|
+
angle += slice;
|
|
258
|
+
});
|
|
259
|
+
})();
|
|
260
|
+
|
|
261
|
+
// ── 柱状图:严重级别分布 ──
|
|
262
|
+
(function() {
|
|
263
|
+
const canvas = document.getElementById('severityChart');
|
|
264
|
+
const ctx = canvas.getContext('2d');
|
|
265
|
+
const dpr = window.devicePixelRatio || 1;
|
|
266
|
+
const rect = canvas.getBoundingClientRect();
|
|
267
|
+
canvas.width = rect.width * dpr; canvas.height = rect.height * dpr;
|
|
268
|
+
ctx.scale(dpr, dpr);
|
|
269
|
+
const W = rect.width, H = rect.height;
|
|
270
|
+
const pad = { t: 30, r: 30, b: 40, l: 50 };
|
|
271
|
+
const gw = W - pad.l - pad.r, gh = H - pad.t - pad.b;
|
|
272
|
+
|
|
273
|
+
const latest = ${JSON.stringify({ critical: latest.result.issues.critical.length, warning: latest.result.issues.warning.length, suggestion: latest.result.issues.suggestion.length })};
|
|
274
|
+
const bars = [
|
|
275
|
+
{ label: 'Critical', value: latest.critical, color: '#e74c3c' },
|
|
276
|
+
{ label: 'Warning', value: latest.warning, color: '#f39c12' },
|
|
277
|
+
{ label: 'Suggestion', value: latest.suggestion, color: '#3498db' },
|
|
278
|
+
];
|
|
279
|
+
const maxVal = Math.max(...bars.map(b => b.value), 1);
|
|
280
|
+
|
|
281
|
+
bars.forEach((bar, i) => {
|
|
282
|
+
const bw = gw / bars.length * 0.5;
|
|
283
|
+
const bx = pad.l + (i + 0.5) * (gw / bars.length) - bw / 2;
|
|
284
|
+
const bh = (bar.value / maxVal) * gh;
|
|
285
|
+
const by = pad.t + gh - bh;
|
|
286
|
+
ctx.fillStyle = bar.color;
|
|
287
|
+
ctx.fillRect(bx, by, bw, bh);
|
|
288
|
+
// 标签
|
|
289
|
+
ctx.fillStyle = '#555'; ctx.font = '13px sans-serif'; ctx.textAlign = 'center';
|
|
290
|
+
ctx.fillText(bar.label, bx + bw / 2, H - pad.b + 20);
|
|
291
|
+
ctx.fillStyle = '#333'; ctx.font = 'bold 14px sans-serif';
|
|
292
|
+
ctx.fillText(bar.value, bx + bw / 2, by - 8);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// Y轴网格
|
|
296
|
+
ctx.strokeStyle = '#eee'; ctx.lineWidth = 1;
|
|
297
|
+
for (let i = 0; i <= 4; i++) {
|
|
298
|
+
const y = pad.t + (i / 4) * gh;
|
|
299
|
+
ctx.beginPath(); ctx.moveTo(pad.l, y); ctx.lineTo(W - pad.r, y); ctx.stroke();
|
|
300
|
+
}
|
|
301
|
+
})();
|
|
302
|
+
</script>
|
|
303
|
+
</body>
|
|
304
|
+
</html>`;
|
|
305
|
+
(0, node_fs_1.writeFileSync)(outputPath, html, "utf-8");
|
|
306
|
+
return outputPath;
|
|
307
|
+
}
|
|
308
|
+
function formatTime(ts) {
|
|
309
|
+
const d = new Date(ts);
|
|
310
|
+
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
311
|
+
}
|
|
312
|
+
function escapeHtml(str) {
|
|
313
|
+
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/utils/dashboard.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAoBH,8CAsSC;AAxTD,qCAAwC;AACxC,yCAAoC;AAYpC;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,OAAqB,EAAE,OAAyB;IAC9E,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAA,mBAAO,EAAC,UAAU,EAAE,kCAAkC,CAAC,EAAE,KAAK,GAAG,wBAAwB,EAAE,GAAG,OAAO,CAAC;IAEvI,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,QAAQ;IACR,MAAM,MAA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