ax-audit 1.14.0 → 2.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,119 @@
1
+ # Changelog
2
+
3
+ All notable changes to ax-audit are documented here.
4
+
5
+ ## [2.0.0] - 2026-02-27
6
+
7
+ ### Added
8
+
9
+ - **HTML reporter**: `--output html` generates a self-contained HTML report with circular score gauge, dark mode support, collapsible check sections, and responsive design
10
+ - Supports both single URL and batch reports
11
+ - Pipe to file: `ax-audit https://example.com --output html > report.html`
12
+
13
+ ## [1.15.0] - 2026-02-27
14
+
15
+ ### Added
16
+
17
+ - **Batch audit**: pass multiple URLs to audit them in a single run with summary table (`ax-audit url1 url2 url3`)
18
+ - **`batchAudit()` API**: programmatic batch auditing with `BatchAuditReport` type
19
+ - **CHANGELOG.md**: full project history
20
+
21
+ ## [1.14.0] - 2026-02-27
22
+
23
+ ### Added
24
+
25
+ - **RFC 5988 Link header parser**: proper parsing of `<url>; rel="type"` format instead of naive regex matching
26
+ - Prevents false positives from parameter values like `title="llms.txt"`
27
+
28
+ ## [1.13.0] - 2026-02-27
29
+
30
+ ### Fixed
31
+
32
+ - **Structured data**: `@context` now supports string, array, and `@vocab` object formats
33
+ - **Structured data**: `collectTypes()` recurses into nested entities (author, publisher, etc.) with depth limit
34
+
35
+ ## [1.12.0] - 2026-02-27
36
+
37
+ ### Added
38
+
39
+ - **`--only-failures` flag**: filter output to show only checks with warnings or failures
40
+
41
+ ## [1.11.0] - 2026-02-27
42
+
43
+ ### Added
44
+
45
+ - **MCP check**: new check for `/.well-known/mcp.json` (Model Context Protocol) server configuration (weight: 10%)
46
+ - Check weights redistributed across 9 checks: llms-txt 15%, robots-txt 15%, structured-data 13%, http-headers 13%, agent-json 10%, mcp 10%, security-txt 8%, meta-tags 8%, openapi 8%
47
+
48
+ ## [1.10.0] - 2026-02-27
49
+
50
+ ### Added
51
+
52
+ - **ESLint + Prettier**: code quality tooling with CI integration
53
+
54
+ ## [1.9.0] - 2026-02-27
55
+
56
+ ### Added
57
+
58
+ - **Public TypeScript API**: new `src/index.ts` entry point exporting `audit`, `calculateOverallScore`, `getGrade`, `checks`, and all types
59
+ - Package `exports` field pointing to `dist/index.js`
60
+
61
+ ## [1.8.0] - 2026-02-27
62
+
63
+ ### Added
64
+
65
+ - **`--checks` validation**: unknown check IDs now error with a list of available checks
66
+
67
+ ## [1.7.0] - 2026-02-27
68
+
69
+ ### Changed
70
+
71
+ - All checks refactored to use shared `buildResult()` utility from `src/checks/utils.ts`
72
+
73
+ ## [1.6.0] - 2026-02-27
74
+
75
+ ### Added
76
+
77
+ - **CI/CD**: GitHub Actions workflow running lint, format check, build, and tests
78
+
79
+ ## [1.5.0] - 2026-02-27
80
+
81
+ ### Added
82
+
83
+ - **`--verbose` flag**: detailed HTTP request, cache hit, and check execution logs
84
+
85
+ ## [1.4.0] - 2026-02-27
86
+
87
+ ### Added
88
+
89
+ - **97 tests**: comprehensive test suite covering all 9 checks and edge cases (Node.js built-in test runner)
90
+
91
+ ## [1.3.0] - 2026-02-27
92
+
93
+ ### Fixed
94
+
95
+ - **Robots.txt parser**: handles partial disallows, multi-UA blocks, wildcard detection, comment lines
96
+
97
+ ## [1.2.0] - 2026-02-27
98
+
99
+ ### Fixed
100
+
101
+ - **Score bounds**: all checks now clamp scores to 0-100 range
102
+
103
+ ## [1.0.1] - 2025-01-15
104
+
105
+ ### Changed
106
+
107
+ - Switched license from MIT to Apache 2.0
108
+ - Improved README with badges and documentation
109
+
110
+ ## [1.0.0] - 2025-01-15
111
+
112
+ ### Added
113
+
114
+ - Initial release of ax-audit
115
+ - 8 checks: llms-txt, robots-txt, structured-data, http-headers, agent-json, security-txt, meta-tags, openapi
116
+ - Terminal and JSON output formats
117
+ - Weighted scoring system with grades (Excellent, Good, Fair, Poor)
118
+ - CLI with `--json`, `--output`, `--timeout` flags
119
+ - TypeScript codebase with zero HTTP library dependencies
package/README.md CHANGED
@@ -67,6 +67,9 @@ ax-audit https://example.com
67
67
  # Batch audit — audit multiple URLs in a single run
68
68
  ax-audit https://example.com https://other-site.com https://third.dev
69
69
 
70
+ # HTML report — self-contained, dark mode, shareable
71
+ ax-audit https://example.com --output html > report.html
72
+
70
73
  # JSON output for CI/CD pipelines
71
74
  ax-audit https://example.com --json
72
75
 
@@ -101,6 +104,16 @@ Pass multiple URLs to audit them sequentially. Each gets its own full report, fo
101
104
 
102
105
  Exit code: `0` if all URLs score >= 70, `1` if any fails.
103
106
 
107
+ ### HTML Report
108
+
109
+ Generate a self-contained HTML report you can open in any browser or share with your team:
110
+
111
+ ```bash
112
+ ax-audit https://example.com --output html > report.html
113
+ ```
114
+
115
+ Features: circular score gauge, dark/light mode, collapsible check sections, responsive design. Works for both single and batch audits.
116
+
104
117
  ## Programmatic API
105
118
 
106
119
  Full TypeScript support with all types exported.
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ export function cli(argv) {
11
11
  .version(VERSION, '-v, --version')
12
12
  .argument('<urls...>', 'One or more URLs to audit (e.g., https://example.com)')
13
13
  .option('--json', 'Output results as JSON')
14
- .option('--output <format>', 'Output format: terminal, json', 'terminal')
14
+ .option('--output <format>', 'Output format: terminal, json, html', 'terminal')
15
15
  .option('--checks <list>', 'Comma-separated list of checks to run')
16
16
  .option('--timeout <ms>', 'Per-request timeout in milliseconds', '10000')
17
17
  .option('--verbose', 'Show detailed request and check execution logs')
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,E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OAAO;QACL,GAAG,MAAM;QACT,OAAO,EAAE,MAAM,CAAC,OAAO;aACpB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACX,GAAG,CAAC;YACJ,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC;SACxD,CAAC,CAAC;aACF,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;KACxC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AuditReport, BatchAuditReport } from '../types.js';
2
+ export declare function reportHtml(report: AuditReport): void;
3
+ export declare function reportBatchHtml(batch: BatchAuditReport): void;
4
+ //# sourceMappingURL=html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/reporter/html.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAA+B,MAAM,aAAa,CAAC;AAsW9F,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAGpD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAI7D"}
@@ -0,0 +1,353 @@
1
+ import { GRADES } from '../constants.js';
2
+ function gradeHslColor(grade) {
3
+ switch (grade.color) {
4
+ case 'green':
5
+ return 'hsl(140, 70%, 45%)';
6
+ case 'yellow':
7
+ return 'hsl(45, 90%, 48%)';
8
+ case 'orange':
9
+ return 'hsl(25, 90%, 50%)';
10
+ default:
11
+ return 'hsl(0, 80%, 50%)';
12
+ }
13
+ }
14
+ function statusIcon(status) {
15
+ switch (status) {
16
+ case 'pass':
17
+ return '<span class="icon pass">&#10003;</span>';
18
+ case 'warn':
19
+ return '<span class="icon warn">&#9888;</span>';
20
+ case 'fail':
21
+ return '<span class="icon fail">&#10007;</span>';
22
+ default:
23
+ return '';
24
+ }
25
+ }
26
+ function escapeHtml(str) {
27
+ return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
28
+ }
29
+ function getGrade(score) {
30
+ return GRADES.find((g) => score >= g.min) || GRADES[GRADES.length - 1];
31
+ }
32
+ function renderGauge(score, size = 160) {
33
+ const grade = getGrade(score);
34
+ const color = gradeHslColor(grade);
35
+ const circumference = 2 * Math.PI * 54;
36
+ const offset = circumference - (score / 100) * circumference;
37
+ return `
38
+ <div class="gauge" style="width:${size}px;height:${size}px">
39
+ <svg viewBox="0 0 120 120">
40
+ <circle cx="60" cy="60" r="54" fill="none" stroke="var(--gauge-bg)" stroke-width="8"/>
41
+ <circle cx="60" cy="60" r="54" fill="none" stroke="${color}" stroke-width="8"
42
+ stroke-dasharray="${circumference}" stroke-dashoffset="${offset}"
43
+ stroke-linecap="round" transform="rotate(-90 60 60)"
44
+ style="transition: stroke-dashoffset 1s ease"/>
45
+ </svg>
46
+ <div class="gauge-text">
47
+ <span class="gauge-score" style="color:${color}">${score}</span>
48
+ <span class="gauge-label">${grade.label}</span>
49
+ </div>
50
+ </div>`;
51
+ }
52
+ function renderFinding(f) {
53
+ return `
54
+ <div class="finding ${f.status}">
55
+ ${statusIcon(f.status)}
56
+ <div class="finding-content">
57
+ <span class="finding-msg">${escapeHtml(f.message)}</span>
58
+ ${f.detail ? `<span class="finding-detail">${escapeHtml(f.detail)}</span>` : ''}
59
+ </div>
60
+ </div>`;
61
+ }
62
+ function renderCheck(check) {
63
+ const grade = getGrade(check.score);
64
+ const color = gradeHslColor(grade);
65
+ return `
66
+ <details class="check" open>
67
+ <summary>
68
+ <div class="check-header">
69
+ <span class="check-name">${escapeHtml(check.name)}</span>
70
+ <span class="check-score" style="color:${color}">${check.score}/100</span>
71
+ </div>
72
+ <div class="check-desc">${escapeHtml(check.description)}</div>
73
+ </summary>
74
+ <div class="check-findings">
75
+ ${check.findings.map(renderFinding).join('')}
76
+ </div>
77
+ </details>`;
78
+ }
79
+ function renderSingleReport(report) {
80
+ return `
81
+ <div class="report">
82
+ <div class="report-header">
83
+ ${renderGauge(report.overallScore)}
84
+ <div class="report-meta">
85
+ <h2><a href="${escapeHtml(report.url)}" target="_blank" rel="noopener">${escapeHtml(report.url)}</a></h2>
86
+ <div class="meta-row">
87
+ <span>${report.timestamp}</span>
88
+ <span>${report.duration}ms</span>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ <div class="checks">
93
+ ${report.results.map(renderCheck).join('')}
94
+ </div>
95
+ </div>`;
96
+ }
97
+ function renderBatchSummary(batch) {
98
+ const rows = batch.reports
99
+ .map((r) => {
100
+ const grade = getGrade(r.overallScore);
101
+ const color = gradeHslColor(grade);
102
+ const passed = r.overallScore >= 70;
103
+ return `
104
+ <tr>
105
+ <td><a href="${escapeHtml(r.url)}" target="_blank" rel="noopener">${escapeHtml(r.url)}</a></td>
106
+ <td style="color:${color};font-weight:600">${r.overallScore}/100</td>
107
+ <td style="color:${color}">${grade.label}</td>
108
+ <td><span class="badge ${passed ? 'badge-pass' : 'badge-fail'}">${passed ? 'PASS' : 'FAIL'}</span></td>
109
+ </tr>`;
110
+ })
111
+ .join('');
112
+ const { summary } = batch;
113
+ const avgGrade = getGrade(summary.averageScore);
114
+ const avgColor = gradeHslColor(avgGrade);
115
+ return `
116
+ <div class="batch-summary">
117
+ <h2>Batch Summary</h2>
118
+ <div class="batch-stats">
119
+ ${renderGauge(summary.averageScore, 120)}
120
+ <div class="batch-info">
121
+ <div class="stat"><span class="stat-value">${summary.total}</span><span class="stat-label">URLs</span></div>
122
+ <div class="stat"><span class="stat-value" style="color:hsl(140,70%,45%)">${summary.passed}</span><span class="stat-label">Passed</span></div>
123
+ ${summary.failed > 0 ? `<div class="stat"><span class="stat-value" style="color:hsl(0,80%,50%)">${summary.failed}</span><span class="stat-label">Failed</span></div>` : ''}
124
+ <div class="stat"><span class="stat-value">${batch.duration}ms</span><span class="stat-label">Total</span></div>
125
+ </div>
126
+ </div>
127
+ <table class="summary-table">
128
+ <thead><tr><th>URL</th><th>Score</th><th>Grade</th><th>Status</th></tr></thead>
129
+ <tbody>${rows}</tbody>
130
+ <tfoot><tr>
131
+ <td><strong>Average</strong></td>
132
+ <td style="color:${avgColor};font-weight:600">${summary.averageScore}/100</td>
133
+ <td style="color:${avgColor}">${avgGrade.label}</td>
134
+ <td></td>
135
+ </tr></tfoot>
136
+ </table>
137
+ </div>`;
138
+ }
139
+ function htmlShell(title, body) {
140
+ return `<!DOCTYPE html>
141
+ <html lang="en">
142
+ <head>
143
+ <meta charset="utf-8">
144
+ <meta name="viewport" content="width=device-width, initial-scale=1">
145
+ <title>${escapeHtml(title)}</title>
146
+ <style>
147
+ :root {
148
+ --bg: #fff;
149
+ --bg-card: #f8f9fa;
150
+ --bg-finding: #fff;
151
+ --text: #1a1a2e;
152
+ --text-secondary: #666;
153
+ --border: #e0e0e0;
154
+ --gauge-bg: #e9ecef;
155
+ --shadow: rgba(0,0,0,0.06);
156
+ }
157
+ @media (prefers-color-scheme: dark) {
158
+ :root {
159
+ --bg: #0d1117;
160
+ --bg-card: #161b22;
161
+ --bg-finding: #1c2128;
162
+ --text: #e6edf3;
163
+ --text-secondary: #8b949e;
164
+ --border: #30363d;
165
+ --gauge-bg: #21262d;
166
+ --shadow: rgba(0,0,0,0.3);
167
+ }
168
+ }
169
+ * { margin: 0; padding: 0; box-sizing: border-box; }
170
+ body {
171
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
172
+ background: var(--bg);
173
+ color: var(--text);
174
+ line-height: 1.6;
175
+ padding: 2rem;
176
+ max-width: 900px;
177
+ margin: 0 auto;
178
+ }
179
+ h1 {
180
+ font-size: 1.5rem;
181
+ margin-bottom: 0.25rem;
182
+ }
183
+ .header {
184
+ display: flex;
185
+ align-items: center;
186
+ gap: 0.75rem;
187
+ margin-bottom: 2rem;
188
+ padding-bottom: 1rem;
189
+ border-bottom: 1px solid var(--border);
190
+ }
191
+ .header svg { width: 32px; height: 32px; }
192
+ .header-sub { color: var(--text-secondary); font-size: 0.85rem; }
193
+ .report { margin-bottom: 2.5rem; }
194
+ .report-header {
195
+ display: flex;
196
+ align-items: center;
197
+ gap: 2rem;
198
+ margin-bottom: 1.5rem;
199
+ }
200
+ .report-meta { flex: 1; }
201
+ .report-meta h2 { font-size: 1.1rem; margin-bottom: 0.25rem; }
202
+ .report-meta a { color: var(--text); text-decoration: none; }
203
+ .report-meta a:hover { text-decoration: underline; }
204
+ .meta-row {
205
+ display: flex;
206
+ gap: 1.5rem;
207
+ color: var(--text-secondary);
208
+ font-size: 0.85rem;
209
+ }
210
+ .gauge {
211
+ position: relative;
212
+ flex-shrink: 0;
213
+ }
214
+ .gauge svg { width: 100%; height: 100%; }
215
+ .gauge-text {
216
+ position: absolute;
217
+ top: 50%; left: 50%;
218
+ transform: translate(-50%, -50%);
219
+ text-align: center;
220
+ }
221
+ .gauge-score { font-size: 2rem; font-weight: 700; display: block; line-height: 1; }
222
+ .gauge-label { font-size: 0.75rem; color: var(--text-secondary); }
223
+ .checks { display: flex; flex-direction: column; gap: 0.75rem; }
224
+ .check {
225
+ background: var(--bg-card);
226
+ border: 1px solid var(--border);
227
+ border-radius: 8px;
228
+ overflow: hidden;
229
+ }
230
+ .check summary {
231
+ padding: 0.75rem 1rem;
232
+ cursor: pointer;
233
+ list-style: none;
234
+ }
235
+ .check summary::-webkit-details-marker { display: none; }
236
+ .check summary::before {
237
+ content: '\\25B6';
238
+ display: inline-block;
239
+ font-size: 0.65rem;
240
+ margin-right: 0.5rem;
241
+ transition: transform 0.2s;
242
+ color: var(--text-secondary);
243
+ }
244
+ .check[open] summary::before { transform: rotate(90deg); }
245
+ .check-header {
246
+ display: inline-flex;
247
+ align-items: center;
248
+ gap: 0.75rem;
249
+ width: calc(100% - 1.5rem);
250
+ justify-content: space-between;
251
+ }
252
+ .check-name { font-weight: 600; }
253
+ .check-score { font-weight: 700; font-size: 0.9rem; }
254
+ .check-desc { color: var(--text-secondary); font-size: 0.8rem; margin-top: 0.15rem; padding-left: 1.15rem; }
255
+ .check-findings { padding: 0 1rem 0.75rem 1rem; }
256
+ .finding {
257
+ display: flex;
258
+ align-items: flex-start;
259
+ gap: 0.5rem;
260
+ padding: 0.4rem 0.5rem;
261
+ border-radius: 4px;
262
+ margin-bottom: 0.25rem;
263
+ background: var(--bg-finding);
264
+ }
265
+ .finding-content { display: flex; flex-direction: column; }
266
+ .finding-msg { font-size: 0.85rem; }
267
+ .finding-detail { font-size: 0.75rem; color: var(--text-secondary); }
268
+ .icon { font-weight: 700; font-size: 0.85rem; flex-shrink: 0; width: 1.2rem; text-align: center; }
269
+ .icon.pass { color: hsl(140, 70%, 45%); }
270
+ .icon.warn { color: hsl(45, 90%, 48%); }
271
+ .icon.fail { color: hsl(0, 80%, 50%); }
272
+ .batch-summary {
273
+ margin-bottom: 2.5rem;
274
+ padding: 1.5rem;
275
+ background: var(--bg-card);
276
+ border: 1px solid var(--border);
277
+ border-radius: 8px;
278
+ }
279
+ .batch-summary h2 { font-size: 1.2rem; margin-bottom: 1rem; }
280
+ .batch-stats {
281
+ display: flex;
282
+ align-items: center;
283
+ gap: 2rem;
284
+ margin-bottom: 1.5rem;
285
+ }
286
+ .batch-info { display: flex; gap: 1.5rem; }
287
+ .stat { display: flex; flex-direction: column; align-items: center; }
288
+ .stat-value { font-size: 1.5rem; font-weight: 700; }
289
+ .stat-label { font-size: 0.75rem; color: var(--text-secondary); }
290
+ .summary-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
291
+ .summary-table th,
292
+ .summary-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
293
+ .summary-table th { color: var(--text-secondary); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
294
+ .summary-table a { color: var(--text); text-decoration: none; }
295
+ .summary-table a:hover { text-decoration: underline; }
296
+ .summary-table tfoot td { border-bottom: none; border-top: 2px solid var(--border); }
297
+ .badge {
298
+ font-size: 0.7rem;
299
+ font-weight: 600;
300
+ padding: 0.15rem 0.5rem;
301
+ border-radius: 3px;
302
+ text-transform: uppercase;
303
+ letter-spacing: 0.03em;
304
+ }
305
+ .badge-pass { background: hsl(140, 70%, 90%); color: hsl(140, 70%, 30%); }
306
+ .badge-fail { background: hsl(0, 80%, 92%); color: hsl(0, 80%, 35%); }
307
+ @media (prefers-color-scheme: dark) {
308
+ .badge-pass { background: hsl(140, 40%, 18%); color: hsl(140, 70%, 60%); }
309
+ .badge-fail { background: hsl(0, 40%, 18%); color: hsl(0, 70%, 60%); }
310
+ }
311
+ .footer {
312
+ margin-top: 2rem;
313
+ padding-top: 1rem;
314
+ border-top: 1px solid var(--border);
315
+ color: var(--text-secondary);
316
+ font-size: 0.8rem;
317
+ text-align: center;
318
+ }
319
+ .footer a { color: var(--text-secondary); }
320
+ @media (max-width: 600px) {
321
+ body { padding: 1rem; }
322
+ .report-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
323
+ .batch-stats { flex-direction: column; }
324
+ }
325
+ </style>
326
+ </head>
327
+ <body>
328
+ <div class="header">
329
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
330
+ <path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/>
331
+ </svg>
332
+ <div>
333
+ <h1>AX Audit Report</h1>
334
+ <div class="header-sub">Lighthouse for AI Agents</div>
335
+ </div>
336
+ </div>
337
+ ${body}
338
+ <div class="footer">
339
+ Generated by <a href="https://github.com/lucioduran/ax-audit" target="_blank" rel="noopener">ax-audit</a> &mdash; Lighthouse for AI Agents
340
+ </div>
341
+ </body>
342
+ </html>`;
343
+ }
344
+ export function reportHtml(report) {
345
+ const html = htmlShell(`AX Audit — ${report.url}`, renderSingleReport(report));
346
+ console.log(html);
347
+ }
348
+ export function reportBatchHtml(batch) {
349
+ const body = renderBatchSummary(batch) + batch.reports.map(renderSingleReport).join('');
350
+ const html = htmlShell(`AX Audit — Batch Report (${batch.summary.total} URLs)`, body);
351
+ console.log(html);
352
+ }
353
+ //# sourceMappingURL=html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html.js","sourceRoot":"","sources":["../../src/reporter/html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,SAAS,aAAa,CAAC,KAAY;IACjC,QAAQ,KAAK,CAAC,KAAK,EAAE,CAAC;QACpB,KAAK,OAAO;YACV,OAAO,oBAAoB,CAAC;QAC9B,KAAK,QAAQ;YACX,OAAO,mBAAmB,CAAC;QAC7B,KAAK,QAAQ;YACX,OAAO,mBAAmB,CAAC;QAC7B;YACE,OAAO,kBAAkB,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,MAAc;IAChC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO,yCAAyC,CAAC;QACnD,KAAK,MAAM;YACT,OAAO,wCAAwC,CAAC;QAClD,KAAK,MAAM;YACT,OAAO,yCAAyC,CAAC;QACnD;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACxG,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,C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B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEjE,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAUrE;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAU/E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEjE,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAarE;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAa/E"}
@@ -1,10 +1,14 @@
1
1
  import { reportTerminal, reportBatchTerminal } from './terminal.js';
2
2
  import { reportJson, reportBatchJson } from './json.js';
3
+ import { reportHtml, reportBatchHtml } from './html.js';
3
4
  export function report(auditReport, format) {
4
5
  switch (format) {
5
6
  case 'json':
6
7
  reportJson(auditReport);
7
8
  break;
9
+ case 'html':
10
+ reportHtml(auditReport);
11
+ break;
8
12
  case 'terminal':
9
13
  default:
10
14
  reportTerminal(auditReport);
@@ -16,6 +20,9 @@ export function reportBatch(batchReport, format) {
16
20
  case 'json':
17
21
  reportBatchJson(batchReport);
18
22
  break;
23
+ case 'html':
24
+ reportBatchHtml(batchReport);
25
+ break;
19
26
  case 'terminal':
20
27
  default:
21
28
  reportBatchTerminal(batchReport);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,c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C;QACf,KAAK,MAAM;YACT,eAAe,CAAC,WAAW,CAAC,CAAC;YAC7B,MAAM;QACR,KAAK,MAAM;YACT,eAAe,CAAC,WAAW,CAAC,CAAC;YAC7B,MAAM;QACR,KAAK,UAAU,CAAC;QAChB;YACE,mBAAmB,CAAC,WAAW,CAAC,CAAC;YACjC,MAAM;IACV,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ax-audit",
3
- "version": "1.14.0",
3
+ "version": "2.0.0",
4
4
  "description": "Audit websites for AI Agent Experience (AX) readiness. Lighthouse for AI Agents.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -21,6 +21,7 @@
21
21
  "lighthouse",
22
22
  "llms-txt",
23
23
  "a2a",
24
+ "mcp",
24
25
  "seo",
25
26
  "cli",
26
27
  "devtools",
@@ -40,7 +41,8 @@
40
41
  "bin/",
41
42
  "dist/",
42
43
  "LICENSE",
43
- "README.md"
44
+ "README.md",
45
+ "CHANGELOG.md"
44
46
  ],
45
47
  "engines": {
46
48
  "node": ">=18.0.0"