(options = {})
| 798 | |
| 799 | function escapeHtml(value) { |
| 800 | return String(value ?? '') |
| 801 | .replace(/&/g, '&') |
| 802 | .replace(/</g, '<') |
| 803 | .replace(/>/g, '>') |
| 804 | .replace(/"/g, '"'); |
| 805 | } |
| 806 | |
| 807 | function writeAppServerDashboard(options = {}) { |
| 808 | const projectRoot = path.resolve(options.projectRoot || process.cwd()); |
| 809 | const summary = options.summary || summarizeAppServerEvents(options.input || []); |
| 810 | const outDir = options.outDir || path.join(planningDir(projectRoot, 'app-server')); |
| 811 | const summaryPath = path.join(outDir, 'summary.json'); |
| 812 | const dashboardPath = path.join(outDir, 'dashboard.html'); |
| 813 | writeJson(summaryPath, summary); |
| 814 | writeText(dashboardPath, renderAppServerDashboard(summary, { source: options.source })); |
| 815 | return { |
| 816 | projectRoot, |
| 817 | summaryPath, |
no test coverage detected