mcp-web-validator 1.3.47 → 1.3.48
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 +10 -0
- package/README.md +55 -0
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/language-subtags.d.ts +2 -0
- package/dist/language-subtags.js +9 -0
- package/dist/language-subtags.js.map +1 -1
- package/dist/network.d.ts +3 -1
- package/dist/network.js +127 -21
- package/dist/network.js.map +1 -1
- package/dist/presentation.d.ts +1 -0
- package/dist/presentation.js +76 -21
- package/dist/presentation.js.map +1 -1
- package/dist/report.d.ts +1 -0
- package/dist/report.js +60 -21
- package/dist/report.js.map +1 -1
- package/dist/screenshot-proxy.d.ts +3 -0
- package/dist/screenshot-proxy.js +67 -14
- package/dist/screenshot-proxy.js.map +1 -1
- package/dist/screenshot.d.ts +6 -0
- package/dist/screenshot.js +191 -16
- package/dist/screenshot.js.map +1 -1
- package/dist/seo-auditor.d.ts +5 -3
- package/dist/seo-auditor.js +417 -107
- package/dist/seo-auditor.js.map +1 -1
- package/dist/w3c-validator.js +46 -14
- package/dist/w3c-validator.js.map +1 -1
- package/package.json +3 -3
package/dist/presentation.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as cheerio from "cheerio";
|
|
2
|
-
import { isHttpRedirectStatus } from "./seo-auditor.js";
|
|
2
|
+
import { isHttpRedirectStatus, isUnverifiedLinkStatus } from "./seo-auditor.js";
|
|
3
3
|
import { getW3CMessageSeverity, } from "./w3c-validator.js";
|
|
4
4
|
function collapseWhitespace(value, maxLength = 240) {
|
|
5
|
-
|
|
5
|
+
// Validator text is untrusted; terminal and bidi controls survive whitespace folding.
|
|
6
|
+
const collapsed = value
|
|
7
|
+
.replace(/[\u0000-\u001f\u007f-\u009f\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]+/g, " ")
|
|
8
|
+
.replace(/\s+/g, " ")
|
|
9
|
+
.trim();
|
|
6
10
|
if (collapsed.length <= maxLength) {
|
|
7
11
|
return collapsed;
|
|
8
12
|
}
|
|
@@ -187,6 +191,13 @@ export function seoAuditContent(issues, totalIssues, truncated, counts) {
|
|
|
187
191
|
function countJsonLdBlocks(htmlContent) {
|
|
188
192
|
const $ = cheerio.load(htmlContent);
|
|
189
193
|
return $("script[type]").filter((_, element) => {
|
|
194
|
+
// Match the schema parser: scripts in inert template contents are not executed.
|
|
195
|
+
let ancestor = element;
|
|
196
|
+
while (ancestor) {
|
|
197
|
+
if (ancestor.name?.toLowerCase() === "template")
|
|
198
|
+
return false;
|
|
199
|
+
ancestor = (ancestor.parent ?? null);
|
|
200
|
+
}
|
|
190
201
|
const type = $(element).attr("type");
|
|
191
202
|
return type?.split(";", 1)[0].trim().toLowerCase() === "application/ld+json";
|
|
192
203
|
}).length;
|
|
@@ -225,6 +236,8 @@ export function schemaValidationContent(issues, totalIssues, truncated, htmlCont
|
|
|
225
236
|
});
|
|
226
237
|
}
|
|
227
238
|
function linkPriority(link) {
|
|
239
|
+
if (isUnverifiedLinkStatus(link.status))
|
|
240
|
+
return 2;
|
|
228
241
|
if (isRedirect(link))
|
|
229
242
|
return 1;
|
|
230
243
|
return 0;
|
|
@@ -236,6 +249,9 @@ function linkActionMessage(link) {
|
|
|
236
249
|
if (isRedirect(link)) {
|
|
237
250
|
return `${link.status} redirect; destination was not followed`;
|
|
238
251
|
}
|
|
252
|
+
if (isUnverifiedLinkStatus(link.status)) {
|
|
253
|
+
return `Link could not be verified (${link.status})${link.message ? ` — ${link.message}` : ""}`;
|
|
254
|
+
}
|
|
239
255
|
return `Link returned ${typeof link.status === "number" ? `HTTP ${link.status}` : link.status}${link.message ? ` — ${link.message}` : ""}`;
|
|
240
256
|
}
|
|
241
257
|
export function linkCheckContent(links, baseUrl) {
|
|
@@ -249,9 +265,10 @@ export function linkCheckContent(links, baseUrl) {
|
|
|
249
265
|
: "If the page uses relative links, provide its public base URL and run the check again.",
|
|
250
266
|
});
|
|
251
267
|
}
|
|
252
|
-
const unreachable = links.filter((link) => !link.ok);
|
|
268
|
+
const unreachable = links.filter((link) => !link.ok && !isUnverifiedLinkStatus(link.status));
|
|
269
|
+
const unverified = links.filter((link) => !link.ok && isUnverifiedLinkStatus(link.status));
|
|
253
270
|
const redirects = links.filter(isRedirect);
|
|
254
|
-
if (unreachable.length === 0 && redirects.length === 0) {
|
|
271
|
+
if (unreachable.length === 0 && unverified.length === 0 && redirects.length === 0) {
|
|
255
272
|
return toolContent({
|
|
256
273
|
title: "Link check",
|
|
257
274
|
status: "clean",
|
|
@@ -263,6 +280,7 @@ export function linkCheckContent(links, baseUrl) {
|
|
|
263
280
|
}
|
|
264
281
|
const actions = [
|
|
265
282
|
...unreachable,
|
|
283
|
+
...unverified,
|
|
266
284
|
...redirects,
|
|
267
285
|
].map((link) => ({
|
|
268
286
|
priority: linkPriority(link),
|
|
@@ -271,18 +289,23 @@ export function linkCheckContent(links, baseUrl) {
|
|
|
271
289
|
}));
|
|
272
290
|
const linkOutcome = [
|
|
273
291
|
unreachable.length > 0
|
|
274
|
-
? `${countLabel(unreachable.length, "link")} ${unreachable.length === 1 ? "
|
|
275
|
-
: "no
|
|
292
|
+
? `${countLabel(unreachable.length, "link")} ${unreachable.length === 1 ? "returned an HTTP failure" : "returned HTTP failures"}`
|
|
293
|
+
: "no confirmed HTTP failures",
|
|
294
|
+
unverified.length > 0
|
|
295
|
+
? `${countLabel(unverified.length, "check")} unverified`
|
|
296
|
+
: undefined,
|
|
276
297
|
redirects.length > 0
|
|
277
298
|
? `${countLabel(redirects.length, "redirect")} ${redirects.length === 1 ? "needs" : "need"} review`
|
|
278
299
|
: undefined,
|
|
279
300
|
].filter((item) => item !== undefined).join("; ");
|
|
280
301
|
return toolContent({
|
|
281
302
|
title: "Link check",
|
|
282
|
-
status: unreachable.length > 0 ? "attention needed" : "review suggested",
|
|
303
|
+
status: unreachable.length > 0 ? "attention needed" : unverified.length > 0 ? "partial" : "review suggested",
|
|
283
304
|
outcome: `${linkOutcome} of ${links.length} checked. Redirect destinations are not followed.`,
|
|
284
305
|
actions,
|
|
285
|
-
nextStep:
|
|
306
|
+
nextStep: unverified.length > 0
|
|
307
|
+
? "Review confirmed HTTP failures and redirects; retry unverified links only if public and permitted."
|
|
308
|
+
: "Update failed destinations and review redirects, then rerun the link check.",
|
|
286
309
|
});
|
|
287
310
|
}
|
|
288
311
|
function reportActionItems(reportData) {
|
|
@@ -327,16 +350,27 @@ export function reportContent(reportData) {
|
|
|
327
350
|
const actions = reportActionItems(reportData);
|
|
328
351
|
const partial = reportData.failedChecks.length > 0;
|
|
329
352
|
const compatibilityLimited = summary.cssCompatibilityLimitations > 0;
|
|
353
|
+
const redirects = reportData.links.filter(isRedirect).length;
|
|
354
|
+
const incompleteLinks = summary.unverifiedLinks > 0 || redirects > 0;
|
|
355
|
+
const scoreUnavailable = summary.overallScore === null;
|
|
356
|
+
const incompleteLinkReason = [
|
|
357
|
+
summary.unverifiedLinks > 0 ? `${countLabel(summary.unverifiedLinks, "unverified link check")}` : undefined,
|
|
358
|
+
redirects > 0 ? `${countLabel(redirects, "unfollowed redirect")}` : undefined,
|
|
359
|
+
].filter(Boolean).join(" and ");
|
|
330
360
|
const hasActionableFinding = actions.some((action) => action.priority < 2);
|
|
331
361
|
const status = partial
|
|
332
362
|
? "partial"
|
|
333
363
|
: compatibilityLimited
|
|
334
364
|
? "compatibility-limited"
|
|
335
|
-
:
|
|
336
|
-
? "
|
|
337
|
-
:
|
|
338
|
-
? "
|
|
339
|
-
:
|
|
365
|
+
: incompleteLinks
|
|
366
|
+
? "partial"
|
|
367
|
+
: scoreUnavailable
|
|
368
|
+
? "partial"
|
|
369
|
+
: actions.length === 0
|
|
370
|
+
? "clean across completed checks"
|
|
371
|
+
: hasActionableFinding
|
|
372
|
+
? "attention needed"
|
|
373
|
+
: "review suggested";
|
|
340
374
|
const cssSummary = summary.cssScore === null
|
|
341
375
|
? reportData.failedChecks.includes("css")
|
|
342
376
|
? "CSS validation unavailable"
|
|
@@ -344,12 +378,13 @@ export function reportContent(reportData) {
|
|
|
344
378
|
? `${countLabel(summary.cssErrors, "CSS error")}, ${countLabel(cssWarnings, "CSS warning")}; ${countLabel(summary.cssCompatibilityLimitations, "known validator limitation")}`
|
|
345
379
|
: "CSS not audited"
|
|
346
380
|
: `${countLabel(summary.cssErrors, "CSS error")} and ${countLabel(cssWarnings, "CSS warning")}`;
|
|
347
|
-
const redirects = reportData.links.filter(isRedirect).length;
|
|
348
381
|
const linkSummary = summary.linkScore === null
|
|
349
382
|
? reportData.failedChecks.includes("links")
|
|
350
383
|
? "link checking unavailable"
|
|
351
|
-
:
|
|
352
|
-
|
|
384
|
+
: incompleteLinks
|
|
385
|
+
? `${countLabel(summary.brokenLinks, "confirmed HTTP failure")}, ${countLabel(summary.unverifiedLinks, "unverified link check")}, and ${countLabel(redirects, "redirect")} to review of ${countLabel(summary.linksChecked, "link")}`
|
|
386
|
+
: summary.linksChecked > 0 ? "link verification unavailable" : "no eligible links checked"
|
|
387
|
+
: `${countLabel(summary.brokenLinks, "confirmed HTTP failure")} and ${countLabel(redirects, "redirect")} to review of ${countLabel(summary.linksChecked, "link")}`;
|
|
353
388
|
const checkLabels = {
|
|
354
389
|
input: "input file",
|
|
355
390
|
html: "HTML validation",
|
|
@@ -383,20 +418,32 @@ export function reportContent(reportData) {
|
|
|
383
418
|
? `Partial validation report: ${unavailableChecks.join(", ")} ${unavailableChecks.length === 1 ? "was" : "were"} unavailable; remaining checks completed. HTML has ${countLabel(summary.htmlErrors, "error")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, "error")}; JSON-LD has ${countLabel(summary.schemaErrors, "syntax error")}; ${linkSummary}.`
|
|
384
419
|
: compatibilityLimited
|
|
385
420
|
? `The overall heuristic score is withheld because CSS validation includes ${countLabel(summary.cssCompatibilityLimitations, "known validator limitation")}. HTML has ${countLabel(summary.htmlErrors, "error")} and ${countLabel(summary.htmlWarnings, "warning")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, "error")} and ${countLabel(summary.seoWarnings, "warning")}; JSON-LD has ${countLabel(summary.schemaErrors, "syntax error")}; ${linkSummary}.`
|
|
386
|
-
:
|
|
421
|
+
: incompleteLinks
|
|
422
|
+
? `The overall heuristic score is withheld because ${incompleteLinkReason} cannot establish destination availability. HTML has ${countLabel(summary.htmlErrors, "error")} and ${countLabel(summary.htmlWarnings, "warning")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, "error")} and ${countLabel(summary.seoWarnings, "warning")}; JSON-LD has ${countLabel(summary.schemaErrors, "syntax error")}; ${linkSummary}.`
|
|
423
|
+
: scoreUnavailable
|
|
424
|
+
? `The overall heuristic score is unavailable because some diagnostic results are incomplete. Review the detailed report before drawing conclusions; ${linkSummary}.`
|
|
425
|
+
: `The report's heuristic overall score is **${summary.overallScore}/100**. HTML has ${countLabel(summary.htmlErrors, "error")} and ${countLabel(summary.htmlWarnings, "warning")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, "error")} and ${countLabel(summary.seoWarnings, "warning")}; JSON-LD has ${countLabel(summary.schemaErrors, "syntax error")}; ${linkSummary}.`,
|
|
387
426
|
actions,
|
|
388
427
|
nextStep: partial
|
|
389
428
|
? "Review the completed findings, then retry the unavailable checks."
|
|
390
429
|
: compatibilityLimited
|
|
391
430
|
? "Review actionable findings normally, and treat the marked @container diagnostic as an upstream validator limitation rather than proof of invalid CSS."
|
|
392
|
-
:
|
|
393
|
-
? "
|
|
394
|
-
:
|
|
431
|
+
: incompleteLinks
|
|
432
|
+
? "Review confirmed HTTP failures and unfollowed redirects; retry unverified links only when the URLs are public and checks are permitted."
|
|
433
|
+
: scoreUnavailable
|
|
434
|
+
? "Review incomplete diagnostic counts and rerun the affected checks before comparing scores."
|
|
435
|
+
: actions.length === 0
|
|
436
|
+
? "Use the full Markdown report as the audit record and rerun it after meaningful page changes."
|
|
437
|
+
: "Work through these priorities, then regenerate the report to compare the heuristic score.",
|
|
395
438
|
note: partial
|
|
396
439
|
? ["No overall score is shown while one or more checks are unavailable.", truncationNote].filter(Boolean).join(" ")
|
|
397
440
|
: compatibilityLimited
|
|
398
441
|
? ["CSS and overall scores are withheld while a known Jigsaw parser limitation is present; the original upstream diagnostic remains visible.", truncationNote].filter(Boolean).join(" ")
|
|
399
|
-
:
|
|
442
|
+
: incompleteLinks
|
|
443
|
+
? ["Link and overall scores are withheld while destinations are unverified or redirects are unfollowed; neither proves a broken destination.", truncationNote].filter(Boolean).join(" ")
|
|
444
|
+
: scoreUnavailable
|
|
445
|
+
? ["Incomplete diagnostics prevent a reliable overall score.", truncationNote].filter(Boolean).join(" ")
|
|
446
|
+
: [scoreNote, truncationNote].filter(Boolean).join(" "),
|
|
400
447
|
});
|
|
401
448
|
}
|
|
402
449
|
export function screenshotCaptureContent(count, outputDirectory) {
|
|
@@ -407,6 +454,14 @@ export function screenshotCaptureContent(count, outputDirectory) {
|
|
|
407
454
|
nextStep: "Open the PNG files and compare the rendered layouts at each requested viewport.",
|
|
408
455
|
});
|
|
409
456
|
}
|
|
457
|
+
export function screenshotPartialCaptureContent(count, outputDirectory, error) {
|
|
458
|
+
return toolContent({
|
|
459
|
+
title: "Screenshot capture",
|
|
460
|
+
status: "partial",
|
|
461
|
+
outcome: `Saved ${countLabel(count, "PNG screenshot")} to ${markdownCode(outputDirectory)} before capture failed: ${markdownText(error, 500)}`,
|
|
462
|
+
nextStep: "Review the completed PNG files and retry the unfinished viewport captures after resolving the failure.",
|
|
463
|
+
});
|
|
464
|
+
}
|
|
410
465
|
export function failureContent(title, error, nextStep) {
|
|
411
466
|
return toolContent({
|
|
412
467
|
title,
|
package/dist/presentation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../src/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,oBAAoB,EAAoD,MAAM,kBAAkB,CAAC;AAC1G,OA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CAAC,KAAa,EAAE,KAAa,EAAE,QAAgB;IAC3E,OAAO,WAAW,CAAC;QACjB,KAAK;QACL,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC;QACjC,QAAQ;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["import * as cheerio from \"cheerio\";\nimport type { ValidationReport } from \"./report.js\";\nimport { isHttpRedirectStatus, type AuditCounts, type LinkStatus, type SEOIssue } from \"./seo-auditor.js\";\nimport {\n getW3CMessageSeverity,\n type CSSMessage,\n type W3CMessage,\n} from \"./w3c-validator.js\";\n\ntype ActionPriority = 0 | 1 | 2;\n\ninterface ActionItem {\n message: string;\n priority: ActionPriority;\n location?: string;\n}\n\ninterface ValidationReportResult extends ValidationReport {\n errors?: string[];\n}\n\nfunction collapseWhitespace(value: string, maxLength = 240): string {\n const collapsed = value.replace(/\\s+/g, \" \").trim();\n if (collapsed.length <= maxLength) {\n return collapsed;\n }\n return `${collapsed.slice(0, Math.max(0, maxLength - 1)).trimEnd()}…`;\n}\n\n/** Escapes untrusted text while leaving the surrounding, controlled Markdown intact. */\nfunction markdownText(value: string, maxLength = 240): string {\n return collapseWhitespace(value, maxLength)\n .replace(/&/g, \"&\")\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/([`*_[\\]{}()#+\\-.!|~])/g, \"\\\\$1\");\n}\n\n/** Wraps untrusted identifiers and paths in a code span that cannot be closed by their content. */\nfunction markdownCode(value: string, maxLength = 240): string {\n const collapsed = collapseWhitespace(value, maxLength);\n const longestBacktickRun = Math.max(\n 0,\n ...Array.from(collapsed.matchAll(/`+/g), (match) => match[0].length),\n );\n const delimiter = \"`\".repeat(longestBacktickRun + 1);\n const content = collapsed.startsWith(\"`\") || collapsed.endsWith(\"`\")\n ? ` ${collapsed} `\n : collapsed;\n return `${delimiter}${content}${delimiter}`;\n}\n\nfunction countLabel(count: number, singular: string, plural = `${singular}s`): string {\n return `${count} ${count === 1 ? singular : plural}`;\n}\n\nfunction priorityForSeverity(severity: string): ActionPriority {\n if (severity.toLowerCase() === \"error\") return 0;\n if (severity.toLowerCase() === \"warning\") return 1;\n return 2;\n}\n\nfunction formatLocation(line?: number, column?: number): string | undefined {\n if (line === undefined && column === undefined) return undefined;\n if (line === undefined) return `column ${column}`;\n if (column === undefined) return `line ${line}`;\n return `line ${line}, column ${column}`;\n}\n\nfunction formatActions(items: ActionItem[]): string | undefined {\n const prioritized = items\n .map((item, index) => ({ item, index }))\n .sort((left, right) => left.item.priority - right.item.priority || left.index - right.index)\n .slice(0, 3)\n .map(({ item }) => {\n const label = item.priority === 0 ? \"Error\" : item.priority === 1 ? \"Warning\" : \"Check\";\n const location = item.location\n ? ` · ${markdownCode(item.location, 120)}`\n : \"\";\n return `- **${label}**${location}: ${markdownText(item.message)}`;\n });\n\n return prioritized.length > 0 ? prioritized.join(\"\\n\") : undefined;\n}\n\nfunction toolContent(options: {\n title: string;\n status: string;\n outcome: string;\n nextStep: string;\n actions?: ActionItem[];\n note?: string;\n}): string {\n const sections = [\n `### ${options.title}: ${options.status}`,\n collapseWhitespace(options.outcome, 500),\n ];\n if (options.note) {\n sections.push(collapseWhitespace(options.note, 500));\n }\n const actionItems = options.actions ?? [];\n const actions = formatActions(actionItems);\n if (actions) {\n const hasActionableItem = actionItems.some((item) => item.priority < 2);\n const actionHeading = options.status === \"review suggested\" || !hasActionableItem ? \"Review\" : \"Fix first\";\n sections.push(`**${actionHeading}**\\n${actions}`);\n }\n sections.push(`**Next step:** ${collapseWhitespace(options.nextStep, 400)}`);\n return sections.join(\"\\n\\n\");\n}\n\nexport function htmlValidationContent(\n messages: W3CMessage[],\n source?: string,\n totalMessages = messages.length,\n counts?: { error: number; warning: number; info: number },\n): string {\n const errorCount = counts?.error\n ?? messages.filter((message) => getW3CMessageSeverity(message) === \"error\").length;\n const warningCount = counts?.warning\n ?? messages.filter((message) => getW3CMessageSeverity(message) === \"warning\").length;\n const infoCount = counts?.info ?? Math.max(0, totalMessages - errorCount - warningCount);\n const sourceText = source ? ` for ${markdownCode(source, 180)}` : \"\";\n if (totalMessages === 0) {\n return toolContent({\n title: \"HTML validation\",\n status: \"clean\",\n outcome: `The W3C validator returned no HTML diagnostics${sourceText}.`,\n nextStep: \"Keep this result as a baseline and validate again after the next markup change.\",\n });\n }\n\n const hasActionableDiagnostics = errorCount > 0 || warningCount > 0;\n return toolContent({\n title: \"HTML validation\",\n status: hasActionableDiagnostics ? \"attention needed\" : \"review suggested\",\n outcome: `The W3C validator returned ${countLabel(errorCount, \"error\")}, ${countLabel(warningCount, \"warning\")}, and ${countLabel(infoCount, \"informational diagnostic\")}${sourceText}.`,\n actions: messages.map((message) => ({\n priority: priorityForSeverity(getW3CMessageSeverity(message)),\n message: message.message,\n location: formatLocation(message.lastLine ?? message.firstLine, message.lastColumn ?? message.firstColumn),\n })),\n nextStep: hasActionableDiagnostics\n ? \"Fix errors first, then warnings, and rerun HTML validation to confirm the markup is clean.\"\n : \"Review the informational diagnostics, then rerun validation after relevant markup changes.\",\n note: totalMessages > messages.length\n ? `Showing the first ${messages.length} of ${totalMessages} HTML diagnostics in structured output; severity totals include all returned Nu diagnostics.`\n : undefined,\n });\n}\n\nexport function cssValidationContent(\n messages: CSSMessage[],\n totalMessages = messages.length,\n counts?: { error: number; warning?: number; compatibilityLimitation: number },\n): string {\n if (totalMessages === 0) {\n return toolContent({\n title: \"CSS validation\",\n status: \"clean\",\n outcome: \"The W3C validator returned no CSS errors or warnings.\",\n nextStep: \"Validate again after the next stylesheet change.\",\n });\n }\n\n const compatibilityLimitations = messages.filter(\n (message) => message.compatibility === \"known-validator-limitation\",\n );\n const compatibilityLimitationCount = counts?.compatibilityLimitation ?? compatibilityLimitations.length;\n const warningCount = counts?.warning\n ?? messages.filter((message) => message.type.toLowerCase() === \"warning\").length;\n const actionableErrors = counts?.error\n ?? messages.filter(\n (message) => message.type.toLowerCase() !== \"warning\"\n && message.compatibility !== \"known-validator-limitation\",\n ).length;\n\n return toolContent({\n title: \"CSS validation\",\n status: actionableErrors > 0 ? \"attention needed\" : \"review suggested\",\n outcome: `The W3C validator returned ${countLabel(actionableErrors, \"CSS error\")}, ${countLabel(warningCount, \"CSS warning\")}, and ${countLabel(compatibilityLimitationCount, \"known validator limitation\")}.`,\n actions: messages.map((message) => ({\n priority: message.compatibility === \"known-validator-limitation\"\n ? 2\n : priorityForSeverity(message.type),\n message: message.context ? `${message.message} Context: ${message.context}` : message.message,\n location: formatLocation(message.line),\n })),\n nextStep: actionableErrors > 0\n ? \"Correct the actionable errors, review warnings, then rerun CSS validation because one syntax issue can cause later diagnostics.\"\n : warningCount > 0\n ? \"Review the warnings, then rerun CSS validation after relevant stylesheet changes.\"\n : \"Review the marked @container diagnostic against current CSS specifications; do not treat it as invalid CSS by itself.\",\n note: [\n compatibilityLimitationCount > 0\n ? \"Jigsaw currently does not recognize the standards-defined @container rule. The upstream diagnostic is preserved and marked as a known validator limitation.\"\n : undefined,\n totalMessages > messages.length\n ? `Showing the first ${messages.length} of ${totalMessages} CSS diagnostics in structured output; summary counts include all returned Jigsaw diagnostics.`\n : undefined,\n ].filter(Boolean).join(\" \") || undefined,\n });\n}\n\nexport function seoAuditContent(\n issues: SEOIssue[],\n totalIssues: number,\n truncated: boolean,\n counts?: AuditCounts,\n): string {\n const errors = counts?.error ?? issues.filter((issue) => issue.severity === \"error\").length;\n const warnings = counts?.warning ?? issues.filter((issue) => issue.severity === \"warning\").length;\n const info = counts?.info ?? issues.filter((issue) => issue.severity === \"info\").length;\n if (totalIssues === 0) {\n return toolContent({\n title: \"SEO audit\",\n status: \"clean within this audit\",\n outcome: \"This focused rules-based audit found no SEO or accessibility issues in the supplied HTML.\",\n nextStep: \"Keep the metadata current and rerun the audit whenever the page template changes.\",\n note: \"This result does not replace a crawl, performance test, or Search Console review.\",\n });\n }\n\n const hasActionableFindings = errors > 0 || warnings > 0;\n return toolContent({\n title: \"SEO audit\",\n status: hasActionableFindings ? \"attention needed\" : \"review suggested\",\n outcome: `The audit found ${countLabel(errors, \"error\")}, ${countLabel(warnings, \"warning\")}, and ${countLabel(info, \"suggestion\")}.`,\n actions: issues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: issue.message,\n location: issue.element ? collapseWhitespace(issue.element, 120) : undefined,\n })),\n nextStep: hasActionableFindings\n ? \"Address errors first, then warnings, and rerun the audit after updating the page.\"\n : \"Review the suggestions that apply to this page, then rerun the audit after relevant template changes.\",\n note: truncated\n ? `Showing the first ${issues.length} of ${totalIssues} findings in structured output.`\n : undefined,\n });\n}\n\nfunction countJsonLdBlocks(htmlContent: string): number {\n const $ = cheerio.load(htmlContent);\n return $(\"script[type]\").filter((_, element) => {\n const type = $(element).attr(\"type\");\n return type?.split(\";\", 1)[0].trim().toLowerCase() === \"application/ld+json\";\n }).length;\n}\n\nexport function schemaValidationContent(\n issues: SEOIssue[],\n totalIssues: number,\n truncated: boolean,\n htmlContent: string,\n): string {\n const blockCount = countJsonLdBlocks(htmlContent);\n if (blockCount === 0) {\n return toolContent({\n title: \"JSON-LD syntax\",\n status: \"not present\",\n outcome: \"No JSON-LD script blocks were found, so there was no structured data to parse.\",\n nextStep: \"Add JSON-LD only when it accurately describes visible page content, then validate it again.\",\n });\n }\n if (totalIssues === 0) {\n return toolContent({\n title: \"JSON-LD syntax\",\n status: \"clean\",\n outcome: `${countLabel(blockCount, \"JSON-LD block\")} parsed without syntax errors.`,\n nextStep: \"Verify the properties against the relevant Schema.org type and search-engine requirements.\",\n note: \"This check covers JSON syntax only; it does not validate vocabulary semantics or rich-result eligibility.\",\n });\n }\n\n return toolContent({\n title: \"JSON-LD syntax\",\n status: \"attention needed\",\n outcome: `${countLabel(totalIssues, \"syntax issue\")} ${totalIssues === 1 ? \"was\" : \"were\"} found across ${countLabel(blockCount, \"JSON-LD block\")}.`,\n actions: issues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: issue.message,\n })),\n nextStep: \"Repair the invalid or empty blocks, then rerun this syntax check before testing rich-result eligibility.\",\n note: truncated\n ? `Showing the first ${issues.length} of ${totalIssues} findings in structured output.`\n : undefined,\n });\n}\n\nfunction linkPriority(link: LinkStatus): ActionPriority {\n if (isRedirect(link)) return 1;\n return 0;\n}\n\nfunction isRedirect(link: LinkStatus): boolean {\n return isHttpRedirectStatus(link.status);\n}\n\nfunction linkActionMessage(link: LinkStatus): string {\n if (isRedirect(link)) {\n return `${link.status} redirect; destination was not followed`;\n }\n return `Link returned ${typeof link.status === \"number\" ? `HTTP ${link.status}` : link.status}${link.message ? ` — ${link.message}` : \"\"}`;\n}\n\nexport function linkCheckContent(links: LinkStatus[], baseUrl?: string): string {\n if (links.length === 0) {\n return toolContent({\n title: \"Link check\",\n status: \"nothing checked\",\n outcome: \"No eligible public HTTP(S) links were found, so no link requests were made.\",\n nextStep: baseUrl\n ? \"Confirm the HTML contains reachable anchor URLs, then run the check again.\"\n : \"If the page uses relative links, provide its public base URL and run the check again.\",\n });\n }\n\n const unreachable = links.filter((link) => !link.ok);\n const redirects = links.filter(isRedirect);\n if (unreachable.length === 0 && redirects.length === 0) {\n return toolContent({\n title: \"Link check\",\n status: \"clean\",\n outcome: links.length === 1\n ? \"The checked link returned a reachable response.\"\n : `All ${links.length} checked links returned reachable responses.`,\n nextStep: \"Recheck periodically because external link availability can change.\",\n });\n }\n\n const actions = [\n ...unreachable,\n ...redirects,\n ].map((link) => ({\n priority: linkPriority(link),\n location: link.url,\n message: linkActionMessage(link),\n }));\n\n const linkOutcome = [\n unreachable.length > 0\n ? `${countLabel(unreachable.length, \"link\")} ${unreachable.length === 1 ? \"is\" : \"are\"} broken or unreachable`\n : \"no checked links are broken or unreachable\",\n redirects.length > 0\n ? `${countLabel(redirects.length, \"redirect\")} ${redirects.length === 1 ? \"needs\" : \"need\"} review`\n : undefined,\n ].filter((item): item is string => item !== undefined).join(\"; \");\n\n return toolContent({\n title: \"Link check\",\n status: unreachable.length > 0 ? \"attention needed\" : \"review suggested\",\n outcome: `${linkOutcome} of ${links.length} checked. Redirect destinations are not followed.`,\n actions,\n nextStep: \"Update failed destinations and review redirects, then rerun the link check.\",\n });\n}\n\nfunction reportActionItems(reportData: ValidationReportResult): ActionItem[] {\n return [\n ...(reportData.errors ?? []).map((message) => ({\n priority: 0 as const,\n message,\n })),\n ...reportData.htmlMessages.map((message) => ({\n priority: priorityForSeverity(getW3CMessageSeverity(message)),\n message: `HTML: ${message.message}`,\n location: formatLocation(message.lastLine ?? message.firstLine, message.lastColumn ?? message.firstColumn),\n })),\n ...reportData.cssMessages.map((message) => ({\n priority: message.compatibility === \"known-validator-limitation\"\n ? 2 as const\n : priorityForSeverity(message.type),\n message: `CSS: ${message.message}`,\n location: formatLocation(message.line),\n })),\n ...reportData.seoIssues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: `${issue.category}: ${issue.message}`,\n location: issue.element ? collapseWhitespace(issue.element, 120) : undefined,\n })),\n ...reportData.schemaIssues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: `JSON-LD: ${issue.message}`,\n })),\n ...reportData.links\n .filter((link) => !link.ok || isRedirect(link))\n .map((link) => ({\n priority: linkPriority(link),\n message: linkActionMessage(link),\n location: link.url,\n })),\n ];\n}\n\nexport function reportContent(reportData: ValidationReportResult): string {\n const { summary } = reportData;\n const cssWarnings = summary.cssWarnings ?? 0;\n const actions = reportActionItems(reportData);\n const partial = reportData.failedChecks.length > 0;\n const compatibilityLimited = summary.cssCompatibilityLimitations > 0;\n const hasActionableFinding = actions.some((action) => action.priority < 2);\n const status = partial\n ? \"partial\"\n : compatibilityLimited\n ? \"compatibility-limited\"\n : actions.length === 0\n ? \"clean across completed checks\"\n : hasActionableFinding\n ? \"attention needed\"\n : \"review suggested\";\n const cssSummary = summary.cssScore === null\n ? reportData.failedChecks.includes(\"css\")\n ? \"CSS validation unavailable\"\n : compatibilityLimited\n ? `${countLabel(summary.cssErrors, \"CSS error\")}, ${countLabel(cssWarnings, \"CSS warning\")}; ${countLabel(summary.cssCompatibilityLimitations, \"known validator limitation\")}`\n : \"CSS not audited\"\n : `${countLabel(summary.cssErrors, \"CSS error\")} and ${countLabel(cssWarnings, \"CSS warning\")}`;\n const redirects = reportData.links.filter(isRedirect).length;\n const linkSummary = summary.linkScore === null\n ? reportData.failedChecks.includes(\"links\")\n ? \"link checking unavailable\"\n : \"no eligible links checked\"\n : `${summary.brokenLinks} broken or unreachable and ${countLabel(redirects, \"redirect\")} to review of ${countLabel(summary.linksChecked, \"link\")}`;\n const checkLabels = {\n input: \"input file\",\n html: \"HTML validation\",\n css: \"CSS validation\",\n seo: \"SEO analysis\",\n schema: \"JSON-LD analysis\",\n links: \"link checking\",\n } as const;\n const unavailableChecks = reportData.failedChecks\n .filter((check) => check !== \"input\")\n .map((check) => checkLabels[check]);\n const scoreNote = \"The score is a triage heuristic based on these checks, not a Lighthouse score or a search-ranking prediction.\";\n const truncationNote = [\n reportData.htmlTruncated\n ? `Showing the first ${reportData.htmlMessages.length} of ${reportData.htmlTotalMessages} HTML diagnostics; HTML summary counts and scoring include all returned Nu diagnostics.`\n : undefined,\n reportData.cssTruncated\n ? `Showing the first ${reportData.cssMessages.length} of ${reportData.cssTotalMessages} CSS diagnostics; CSS summary counts and scoring include all returned Jigsaw diagnostics.`\n : undefined,\n reportData.seoTruncated\n ? `Showing the first ${reportData.seoIssues.length} of ${reportData.seoTotalIssues} SEO findings; SEO summary counts and scoring include all findings.`\n : undefined,\n reportData.schemaTruncated\n ? `Showing the first ${reportData.schemaIssues.length} of ${reportData.schemaTotalIssues} JSON-LD findings; JSON-LD summary counts and scoring include all findings.`\n : undefined,\n ].filter(Boolean).join(\" \") || undefined;\n return toolContent({\n title: \"Validation report\",\n status,\n outcome: partial\n ? `Partial validation report: ${unavailableChecks.join(\", \")} ${unavailableChecks.length === 1 ? \"was\" : \"were\"} unavailable; remaining checks completed. HTML has ${countLabel(summary.htmlErrors, \"error\")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, \"error\")}; JSON-LD has ${countLabel(summary.schemaErrors, \"syntax error\")}; ${linkSummary}.`\n : compatibilityLimited\n ? `The overall heuristic score is withheld because CSS validation includes ${countLabel(summary.cssCompatibilityLimitations, \"known validator limitation\")}. HTML has ${countLabel(summary.htmlErrors, \"error\")} and ${countLabel(summary.htmlWarnings, \"warning\")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, \"error\")} and ${countLabel(summary.seoWarnings, \"warning\")}; JSON-LD has ${countLabel(summary.schemaErrors, \"syntax error\")}; ${linkSummary}.`\n : `The report's heuristic overall score is **${summary.overallScore}/100**. HTML has ${countLabel(summary.htmlErrors, \"error\")} and ${countLabel(summary.htmlWarnings, \"warning\")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, \"error\")} and ${countLabel(summary.seoWarnings, \"warning\")}; JSON-LD has ${countLabel(summary.schemaErrors, \"syntax error\")}; ${linkSummary}.`,\n actions,\n nextStep: partial\n ? \"Review the completed findings, then retry the unavailable checks.\"\n : compatibilityLimited\n ? \"Review actionable findings normally, and treat the marked @container diagnostic as an upstream validator limitation rather than proof of invalid CSS.\"\n : actions.length === 0\n ? \"Use the full Markdown report as the audit record and rerun it after meaningful page changes.\"\n : \"Work through these priorities, then regenerate the report to compare the heuristic score.\",\n note: partial\n ? [\"No overall score is shown while one or more checks are unavailable.\", truncationNote].filter(Boolean).join(\" \")\n : compatibilityLimited\n ? [\"CSS and overall scores are withheld while a known Jigsaw parser limitation is present; the original upstream diagnostic remains visible.\", truncationNote].filter(Boolean).join(\" \")\n : [scoreNote, truncationNote].filter(Boolean).join(\" \"),\n });\n}\n\nexport function screenshotCaptureContent(count: number, outputDirectory: string): string {\n return toolContent({\n title: \"Screenshot capture\",\n status: \"complete\",\n outcome: `Saved ${countLabel(count, \"PNG screenshot\")} to ${markdownCode(outputDirectory)}.`,\n nextStep: \"Open the PNG files and compare the rendered layouts at each requested viewport.\",\n });\n}\n\nexport function failureContent(title: string, error: string, nextStep: string): string {\n return toolContent({\n title,\n status: \"could not finish\",\n outcome: markdownText(error, 500),\n nextStep,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../src/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAoD,MAAM,kBAAkB,CAAC;AAClI,OAAO,EACL,qBAAqB,GAGtB,MAAM,oBAAoB,CAAC;AAc5B,SAAS,kBAAkB,CAAC,KAAa,EAAE,SAAS,GAAG,GAAG;IACxD,sFAAsF;IACtF,MAAM,SAAS,GAAG,KAAK;SACpB,OAAO,CAAC,4EAA4E,EAAE,GAAG,CAAC;SAC1F,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAC;IACV,IAAI,SAAS,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC;AACxE,CAAC;AAED,wFAAwF;AACxF,SAAS,YAAY,CAAC,KAAa,EAAE,SAAS,GAAG,GAAG;IAClD,OAAO,kBAAkB,CAAC,KAAK,EAAE,SAAS,CAAC;SACxC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;SACtB,OAAO,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,mGAAmG;AACnG,SAAS,YAAY,CAAC,KAAa,EAAE,SAAS,GAAG,GAAG;IAClD,MAAM,SAAS,GAAG,kBAAkB,CAAC,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AE,GAAG,CAAC;QACjC,QAAQ;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["import * as cheerio from \"cheerio\";\nimport type { ValidationReport } from \"./report.js\";\nimport { isHttpRedirectStatus, isUnverifiedLinkStatus, type AuditCounts, type LinkStatus, type SEOIssue } from \"./seo-auditor.js\";\nimport {\n getW3CMessageSeverity,\n type CSSMessage,\n type W3CMessage,\n} from \"./w3c-validator.js\";\n\ntype ActionPriority = 0 | 1 | 2;\n\ninterface ActionItem {\n message: string;\n priority: ActionPriority;\n location?: string;\n}\n\ninterface ValidationReportResult extends ValidationReport {\n errors?: string[];\n}\n\nfunction collapseWhitespace(value: string, maxLength = 240): string {\n // Validator text is untrusted; terminal and bidi controls survive whitespace folding.\n const collapsed = value\n .replace(/[\\u0000-\\u001f\\u007f-\\u009f\\u061c\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim();\n if (collapsed.length <= maxLength) {\n return collapsed;\n }\n return `${collapsed.slice(0, Math.max(0, maxLength - 1)).trimEnd()}…`;\n}\n\n/** Escapes untrusted text while leaving the surrounding, controlled Markdown intact. */\nfunction markdownText(value: string, maxLength = 240): string {\n return collapseWhitespace(value, maxLength)\n .replace(/&/g, \"&\")\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/([`*_[\\]{}()#+\\-.!|~])/g, \"\\\\$1\");\n}\n\n/** Wraps untrusted identifiers and paths in a code span that cannot be closed by their content. */\nfunction markdownCode(value: string, maxLength = 240): string {\n const collapsed = collapseWhitespace(value, maxLength);\n const longestBacktickRun = Math.max(\n 0,\n ...Array.from(collapsed.matchAll(/`+/g), (match) => match[0].length),\n );\n const delimiter = \"`\".repeat(longestBacktickRun + 1);\n const content = collapsed.startsWith(\"`\") || collapsed.endsWith(\"`\")\n ? ` ${collapsed} `\n : collapsed;\n return `${delimiter}${content}${delimiter}`;\n}\n\nfunction countLabel(count: number, singular: string, plural = `${singular}s`): string {\n return `${count} ${count === 1 ? singular : plural}`;\n}\n\nfunction priorityForSeverity(severity: string): ActionPriority {\n if (severity.toLowerCase() === \"error\") return 0;\n if (severity.toLowerCase() === \"warning\") return 1;\n return 2;\n}\n\nfunction formatLocation(line?: number, column?: number): string | undefined {\n if (line === undefined && column === undefined) return undefined;\n if (line === undefined) return `column ${column}`;\n if (column === undefined) return `line ${line}`;\n return `line ${line}, column ${column}`;\n}\n\nfunction formatActions(items: ActionItem[]): string | undefined {\n const prioritized = items\n .map((item, index) => ({ item, index }))\n .sort((left, right) => left.item.priority - right.item.priority || left.index - right.index)\n .slice(0, 3)\n .map(({ item }) => {\n const label = item.priority === 0 ? \"Error\" : item.priority === 1 ? \"Warning\" : \"Check\";\n const location = item.location\n ? ` · ${markdownCode(item.location, 120)}`\n : \"\";\n return `- **${label}**${location}: ${markdownText(item.message)}`;\n });\n\n return prioritized.length > 0 ? prioritized.join(\"\\n\") : undefined;\n}\n\nfunction toolContent(options: {\n title: string;\n status: string;\n outcome: string;\n nextStep: string;\n actions?: ActionItem[];\n note?: string;\n}): string {\n const sections = [\n `### ${options.title}: ${options.status}`,\n collapseWhitespace(options.outcome, 500),\n ];\n if (options.note) {\n sections.push(collapseWhitespace(options.note, 500));\n }\n const actionItems = options.actions ?? [];\n const actions = formatActions(actionItems);\n if (actions) {\n const hasActionableItem = actionItems.some((item) => item.priority < 2);\n const actionHeading = options.status === \"review suggested\" || !hasActionableItem ? \"Review\" : \"Fix first\";\n sections.push(`**${actionHeading}**\\n${actions}`);\n }\n sections.push(`**Next step:** ${collapseWhitespace(options.nextStep, 400)}`);\n return sections.join(\"\\n\\n\");\n}\n\nexport function htmlValidationContent(\n messages: W3CMessage[],\n source?: string,\n totalMessages = messages.length,\n counts?: { error: number; warning: number; info: number },\n): string {\n const errorCount = counts?.error\n ?? messages.filter((message) => getW3CMessageSeverity(message) === \"error\").length;\n const warningCount = counts?.warning\n ?? messages.filter((message) => getW3CMessageSeverity(message) === \"warning\").length;\n const infoCount = counts?.info ?? Math.max(0, totalMessages - errorCount - warningCount);\n const sourceText = source ? ` for ${markdownCode(source, 180)}` : \"\";\n if (totalMessages === 0) {\n return toolContent({\n title: \"HTML validation\",\n status: \"clean\",\n outcome: `The W3C validator returned no HTML diagnostics${sourceText}.`,\n nextStep: \"Keep this result as a baseline and validate again after the next markup change.\",\n });\n }\n\n const hasActionableDiagnostics = errorCount > 0 || warningCount > 0;\n return toolContent({\n title: \"HTML validation\",\n status: hasActionableDiagnostics ? \"attention needed\" : \"review suggested\",\n outcome: `The W3C validator returned ${countLabel(errorCount, \"error\")}, ${countLabel(warningCount, \"warning\")}, and ${countLabel(infoCount, \"informational diagnostic\")}${sourceText}.`,\n actions: messages.map((message) => ({\n priority: priorityForSeverity(getW3CMessageSeverity(message)),\n message: message.message,\n location: formatLocation(message.lastLine ?? message.firstLine, message.lastColumn ?? message.firstColumn),\n })),\n nextStep: hasActionableDiagnostics\n ? \"Fix errors first, then warnings, and rerun HTML validation to confirm the markup is clean.\"\n : \"Review the informational diagnostics, then rerun validation after relevant markup changes.\",\n note: totalMessages > messages.length\n ? `Showing the first ${messages.length} of ${totalMessages} HTML diagnostics in structured output; severity totals include all returned Nu diagnostics.`\n : undefined,\n });\n}\n\nexport function cssValidationContent(\n messages: CSSMessage[],\n totalMessages = messages.length,\n counts?: { error: number; warning?: number; compatibilityLimitation: number },\n): string {\n if (totalMessages === 0) {\n return toolContent({\n title: \"CSS validation\",\n status: \"clean\",\n outcome: \"The W3C validator returned no CSS errors or warnings.\",\n nextStep: \"Validate again after the next stylesheet change.\",\n });\n }\n\n const compatibilityLimitations = messages.filter(\n (message) => message.compatibility === \"known-validator-limitation\",\n );\n const compatibilityLimitationCount = counts?.compatibilityLimitation ?? compatibilityLimitations.length;\n const warningCount = counts?.warning\n ?? messages.filter((message) => message.type.toLowerCase() === \"warning\").length;\n const actionableErrors = counts?.error\n ?? messages.filter(\n (message) => message.type.toLowerCase() !== \"warning\"\n && message.compatibility !== \"known-validator-limitation\",\n ).length;\n\n return toolContent({\n title: \"CSS validation\",\n status: actionableErrors > 0 ? \"attention needed\" : \"review suggested\",\n outcome: `The W3C validator returned ${countLabel(actionableErrors, \"CSS error\")}, ${countLabel(warningCount, \"CSS warning\")}, and ${countLabel(compatibilityLimitationCount, \"known validator limitation\")}.`,\n actions: messages.map((message) => ({\n priority: message.compatibility === \"known-validator-limitation\"\n ? 2\n : priorityForSeverity(message.type),\n message: message.context ? `${message.message} Context: ${message.context}` : message.message,\n location: formatLocation(message.line),\n })),\n nextStep: actionableErrors > 0\n ? \"Correct the actionable errors, review warnings, then rerun CSS validation because one syntax issue can cause later diagnostics.\"\n : warningCount > 0\n ? \"Review the warnings, then rerun CSS validation after relevant stylesheet changes.\"\n : \"Review the marked @container diagnostic against current CSS specifications; do not treat it as invalid CSS by itself.\",\n note: [\n compatibilityLimitationCount > 0\n ? \"Jigsaw currently does not recognize the standards-defined @container rule. The upstream diagnostic is preserved and marked as a known validator limitation.\"\n : undefined,\n totalMessages > messages.length\n ? `Showing the first ${messages.length} of ${totalMessages} CSS diagnostics in structured output; summary counts include all returned Jigsaw diagnostics.`\n : undefined,\n ].filter(Boolean).join(\" \") || undefined,\n });\n}\n\nexport function seoAuditContent(\n issues: SEOIssue[],\n totalIssues: number,\n truncated: boolean,\n counts?: AuditCounts,\n): string {\n const errors = counts?.error ?? issues.filter((issue) => issue.severity === \"error\").length;\n const warnings = counts?.warning ?? issues.filter((issue) => issue.severity === \"warning\").length;\n const info = counts?.info ?? issues.filter((issue) => issue.severity === \"info\").length;\n if (totalIssues === 0) {\n return toolContent({\n title: \"SEO audit\",\n status: \"clean within this audit\",\n outcome: \"This focused rules-based audit found no SEO or accessibility issues in the supplied HTML.\",\n nextStep: \"Keep the metadata current and rerun the audit whenever the page template changes.\",\n note: \"This result does not replace a crawl, performance test, or Search Console review.\",\n });\n }\n\n const hasActionableFindings = errors > 0 || warnings > 0;\n return toolContent({\n title: \"SEO audit\",\n status: hasActionableFindings ? \"attention needed\" : \"review suggested\",\n outcome: `The audit found ${countLabel(errors, \"error\")}, ${countLabel(warnings, \"warning\")}, and ${countLabel(info, \"suggestion\")}.`,\n actions: issues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: issue.message,\n location: issue.element ? collapseWhitespace(issue.element, 120) : undefined,\n })),\n nextStep: hasActionableFindings\n ? \"Address errors first, then warnings, and rerun the audit after updating the page.\"\n : \"Review the suggestions that apply to this page, then rerun the audit after relevant template changes.\",\n note: truncated\n ? `Showing the first ${issues.length} of ${totalIssues} findings in structured output.`\n : undefined,\n });\n}\n\nfunction countJsonLdBlocks(htmlContent: string): number {\n const $ = cheerio.load(htmlContent);\n return $(\"script[type]\").filter((_, element) => {\n // Match the schema parser: scripts in inert template contents are not executed.\n let ancestor: { name?: string; parent?: unknown } | null = element;\n while (ancestor) {\n if (ancestor.name?.toLowerCase() === \"template\") return false;\n ancestor = (ancestor.parent ?? null) as typeof ancestor;\n }\n const type = $(element).attr(\"type\");\n return type?.split(\";\", 1)[0].trim().toLowerCase() === \"application/ld+json\";\n }).length;\n}\n\nexport function schemaValidationContent(\n issues: SEOIssue[],\n totalIssues: number,\n truncated: boolean,\n htmlContent: string,\n): string {\n const blockCount = countJsonLdBlocks(htmlContent);\n if (blockCount === 0) {\n return toolContent({\n title: \"JSON-LD syntax\",\n status: \"not present\",\n outcome: \"No JSON-LD script blocks were found, so there was no structured data to parse.\",\n nextStep: \"Add JSON-LD only when it accurately describes visible page content, then validate it again.\",\n });\n }\n if (totalIssues === 0) {\n return toolContent({\n title: \"JSON-LD syntax\",\n status: \"clean\",\n outcome: `${countLabel(blockCount, \"JSON-LD block\")} parsed without syntax errors.`,\n nextStep: \"Verify the properties against the relevant Schema.org type and search-engine requirements.\",\n note: \"This check covers JSON syntax only; it does not validate vocabulary semantics or rich-result eligibility.\",\n });\n }\n\n return toolContent({\n title: \"JSON-LD syntax\",\n status: \"attention needed\",\n outcome: `${countLabel(totalIssues, \"syntax issue\")} ${totalIssues === 1 ? \"was\" : \"were\"} found across ${countLabel(blockCount, \"JSON-LD block\")}.`,\n actions: issues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: issue.message,\n })),\n nextStep: \"Repair the invalid or empty blocks, then rerun this syntax check before testing rich-result eligibility.\",\n note: truncated\n ? `Showing the first ${issues.length} of ${totalIssues} findings in structured output.`\n : undefined,\n });\n}\n\nfunction linkPriority(link: LinkStatus): ActionPriority {\n if (isUnverifiedLinkStatus(link.status)) return 2;\n if (isRedirect(link)) return 1;\n return 0;\n}\n\nfunction isRedirect(link: LinkStatus): boolean {\n return isHttpRedirectStatus(link.status);\n}\n\nfunction linkActionMessage(link: LinkStatus): string {\n if (isRedirect(link)) {\n return `${link.status} redirect; destination was not followed`;\n }\n if (isUnverifiedLinkStatus(link.status)) {\n return `Link could not be verified (${link.status})${link.message ? ` — ${link.message}` : \"\"}`;\n }\n return `Link returned ${typeof link.status === \"number\" ? `HTTP ${link.status}` : link.status}${link.message ? ` — ${link.message}` : \"\"}`;\n}\n\nexport function linkCheckContent(links: LinkStatus[], baseUrl?: string): string {\n if (links.length === 0) {\n return toolContent({\n title: \"Link check\",\n status: \"nothing checked\",\n outcome: \"No eligible public HTTP(S) links were found, so no link requests were made.\",\n nextStep: baseUrl\n ? \"Confirm the HTML contains reachable anchor URLs, then run the check again.\"\n : \"If the page uses relative links, provide its public base URL and run the check again.\",\n });\n }\n\n const unreachable = links.filter((link) => !link.ok && !isUnverifiedLinkStatus(link.status));\n const unverified = links.filter((link) => !link.ok && isUnverifiedLinkStatus(link.status));\n const redirects = links.filter(isRedirect);\n if (unreachable.length === 0 && unverified.length === 0 && redirects.length === 0) {\n return toolContent({\n title: \"Link check\",\n status: \"clean\",\n outcome: links.length === 1\n ? \"The checked link returned a reachable response.\"\n : `All ${links.length} checked links returned reachable responses.`,\n nextStep: \"Recheck periodically because external link availability can change.\",\n });\n }\n\n const actions = [\n ...unreachable,\n ...unverified,\n ...redirects,\n ].map((link) => ({\n priority: linkPriority(link),\n location: link.url,\n message: linkActionMessage(link),\n }));\n\n const linkOutcome = [\n unreachable.length > 0\n ? `${countLabel(unreachable.length, \"link\")} ${unreachable.length === 1 ? \"returned an HTTP failure\" : \"returned HTTP failures\"}`\n : \"no confirmed HTTP failures\",\n unverified.length > 0\n ? `${countLabel(unverified.length, \"check\")} unverified`\n : undefined,\n redirects.length > 0\n ? `${countLabel(redirects.length, \"redirect\")} ${redirects.length === 1 ? \"needs\" : \"need\"} review`\n : undefined,\n ].filter((item): item is string => item !== undefined).join(\"; \");\n\n return toolContent({\n title: \"Link check\",\n status: unreachable.length > 0 ? \"attention needed\" : unverified.length > 0 ? \"partial\" : \"review suggested\",\n outcome: `${linkOutcome} of ${links.length} checked. Redirect destinations are not followed.`,\n actions,\n nextStep: unverified.length > 0\n ? \"Review confirmed HTTP failures and redirects; retry unverified links only if public and permitted.\"\n : \"Update failed destinations and review redirects, then rerun the link check.\",\n });\n}\n\nfunction reportActionItems(reportData: ValidationReportResult): ActionItem[] {\n return [\n ...(reportData.errors ?? []).map((message) => ({\n priority: 0 as const,\n message,\n })),\n ...reportData.htmlMessages.map((message) => ({\n priority: priorityForSeverity(getW3CMessageSeverity(message)),\n message: `HTML: ${message.message}`,\n location: formatLocation(message.lastLine ?? message.firstLine, message.lastColumn ?? message.firstColumn),\n })),\n ...reportData.cssMessages.map((message) => ({\n priority: message.compatibility === \"known-validator-limitation\"\n ? 2 as const\n : priorityForSeverity(message.type),\n message: `CSS: ${message.message}`,\n location: formatLocation(message.line),\n })),\n ...reportData.seoIssues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: `${issue.category}: ${issue.message}`,\n location: issue.element ? collapseWhitespace(issue.element, 120) : undefined,\n })),\n ...reportData.schemaIssues.map((issue) => ({\n priority: priorityForSeverity(issue.severity),\n message: `JSON-LD: ${issue.message}`,\n })),\n ...reportData.links\n .filter((link) => !link.ok || isRedirect(link))\n .map((link) => ({\n priority: linkPriority(link),\n message: linkActionMessage(link),\n location: link.url,\n })),\n ];\n}\n\nexport function reportContent(reportData: ValidationReportResult): string {\n const { summary } = reportData;\n const cssWarnings = summary.cssWarnings ?? 0;\n const actions = reportActionItems(reportData);\n const partial = reportData.failedChecks.length > 0;\n const compatibilityLimited = summary.cssCompatibilityLimitations > 0;\n const redirects = reportData.links.filter(isRedirect).length;\n const incompleteLinks = summary.unverifiedLinks > 0 || redirects > 0;\n const scoreUnavailable = summary.overallScore === null;\n const incompleteLinkReason = [\n summary.unverifiedLinks > 0 ? `${countLabel(summary.unverifiedLinks, \"unverified link check\")}` : undefined,\n redirects > 0 ? `${countLabel(redirects, \"unfollowed redirect\")}` : undefined,\n ].filter(Boolean).join(\" and \");\n const hasActionableFinding = actions.some((action) => action.priority < 2);\n const status = partial\n ? \"partial\"\n : compatibilityLimited\n ? \"compatibility-limited\"\n : incompleteLinks\n ? \"partial\"\n : scoreUnavailable\n ? \"partial\"\n : actions.length === 0\n ? \"clean across completed checks\"\n : hasActionableFinding\n ? \"attention needed\"\n : \"review suggested\";\n const cssSummary = summary.cssScore === null\n ? reportData.failedChecks.includes(\"css\")\n ? \"CSS validation unavailable\"\n : compatibilityLimited\n ? `${countLabel(summary.cssErrors, \"CSS error\")}, ${countLabel(cssWarnings, \"CSS warning\")}; ${countLabel(summary.cssCompatibilityLimitations, \"known validator limitation\")}`\n : \"CSS not audited\"\n : `${countLabel(summary.cssErrors, \"CSS error\")} and ${countLabel(cssWarnings, \"CSS warning\")}`;\n const linkSummary = summary.linkScore === null\n ? reportData.failedChecks.includes(\"links\")\n ? \"link checking unavailable\"\n : incompleteLinks\n ? `${countLabel(summary.brokenLinks, \"confirmed HTTP failure\")}, ${countLabel(summary.unverifiedLinks, \"unverified link check\")}, and ${countLabel(redirects, \"redirect\")} to review of ${countLabel(summary.linksChecked, \"link\")}`\n : summary.linksChecked > 0 ? \"link verification unavailable\" : \"no eligible links checked\"\n : `${countLabel(summary.brokenLinks, \"confirmed HTTP failure\")} and ${countLabel(redirects, \"redirect\")} to review of ${countLabel(summary.linksChecked, \"link\")}`;\n const checkLabels = {\n input: \"input file\",\n html: \"HTML validation\",\n css: \"CSS validation\",\n seo: \"SEO analysis\",\n schema: \"JSON-LD analysis\",\n links: \"link checking\",\n } as const;\n const unavailableChecks = reportData.failedChecks\n .filter((check) => check !== \"input\")\n .map((check) => checkLabels[check]);\n const scoreNote = \"The score is a triage heuristic based on these checks, not a Lighthouse score or a search-ranking prediction.\";\n const truncationNote = [\n reportData.htmlTruncated\n ? `Showing the first ${reportData.htmlMessages.length} of ${reportData.htmlTotalMessages} HTML diagnostics; HTML summary counts and scoring include all returned Nu diagnostics.`\n : undefined,\n reportData.cssTruncated\n ? `Showing the first ${reportData.cssMessages.length} of ${reportData.cssTotalMessages} CSS diagnostics; CSS summary counts and scoring include all returned Jigsaw diagnostics.`\n : undefined,\n reportData.seoTruncated\n ? `Showing the first ${reportData.seoIssues.length} of ${reportData.seoTotalIssues} SEO findings; SEO summary counts and scoring include all findings.`\n : undefined,\n reportData.schemaTruncated\n ? `Showing the first ${reportData.schemaIssues.length} of ${reportData.schemaTotalIssues} JSON-LD findings; JSON-LD summary counts and scoring include all findings.`\n : undefined,\n ].filter(Boolean).join(\" \") || undefined;\n return toolContent({\n title: \"Validation report\",\n status,\n outcome: partial\n ? `Partial validation report: ${unavailableChecks.join(\", \")} ${unavailableChecks.length === 1 ? \"was\" : \"were\"} unavailable; remaining checks completed. HTML has ${countLabel(summary.htmlErrors, \"error\")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, \"error\")}; JSON-LD has ${countLabel(summary.schemaErrors, \"syntax error\")}; ${linkSummary}.`\n : compatibilityLimited\n ? `The overall heuristic score is withheld because CSS validation includes ${countLabel(summary.cssCompatibilityLimitations, \"known validator limitation\")}. HTML has ${countLabel(summary.htmlErrors, \"error\")} and ${countLabel(summary.htmlWarnings, \"warning\")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, \"error\")} and ${countLabel(summary.seoWarnings, \"warning\")}; JSON-LD has ${countLabel(summary.schemaErrors, \"syntax error\")}; ${linkSummary}.`\n : incompleteLinks\n ? `The overall heuristic score is withheld because ${incompleteLinkReason} cannot establish destination availability. HTML has ${countLabel(summary.htmlErrors, \"error\")} and ${countLabel(summary.htmlWarnings, \"warning\")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, \"error\")} and ${countLabel(summary.seoWarnings, \"warning\")}; JSON-LD has ${countLabel(summary.schemaErrors, \"syntax error\")}; ${linkSummary}.`\n : scoreUnavailable\n ? `The overall heuristic score is unavailable because some diagnostic results are incomplete. Review the detailed report before drawing conclusions; ${linkSummary}.`\n : `The report's heuristic overall score is **${summary.overallScore}/100**. HTML has ${countLabel(summary.htmlErrors, \"error\")} and ${countLabel(summary.htmlWarnings, \"warning\")}; ${cssSummary}; SEO has ${countLabel(summary.seoErrors, \"error\")} and ${countLabel(summary.seoWarnings, \"warning\")}; JSON-LD has ${countLabel(summary.schemaErrors, \"syntax error\")}; ${linkSummary}.`,\n actions,\n nextStep: partial\n ? \"Review the completed findings, then retry the unavailable checks.\"\n : compatibilityLimited\n ? \"Review actionable findings normally, and treat the marked @container diagnostic as an upstream validator limitation rather than proof of invalid CSS.\"\n : incompleteLinks\n ? \"Review confirmed HTTP failures and unfollowed redirects; retry unverified links only when the URLs are public and checks are permitted.\"\n : scoreUnavailable\n ? \"Review incomplete diagnostic counts and rerun the affected checks before comparing scores.\"\n : actions.length === 0\n ? \"Use the full Markdown report as the audit record and rerun it after meaningful page changes.\"\n : \"Work through these priorities, then regenerate the report to compare the heuristic score.\",\n note: partial\n ? [\"No overall score is shown while one or more checks are unavailable.\", truncationNote].filter(Boolean).join(\" \")\n : compatibilityLimited\n ? [\"CSS and overall scores are withheld while a known Jigsaw parser limitation is present; the original upstream diagnostic remains visible.\", truncationNote].filter(Boolean).join(\" \")\n : incompleteLinks\n ? [\"Link and overall scores are withheld while destinations are unverified or redirects are unfollowed; neither proves a broken destination.\", truncationNote].filter(Boolean).join(\" \")\n : scoreUnavailable\n ? [\"Incomplete diagnostics prevent a reliable overall score.\", truncationNote].filter(Boolean).join(\" \")\n : [scoreNote, truncationNote].filter(Boolean).join(\" \"),\n });\n}\n\nexport function screenshotCaptureContent(count: number, outputDirectory: string): string {\n return toolContent({\n title: \"Screenshot capture\",\n status: \"complete\",\n outcome: `Saved ${countLabel(count, \"PNG screenshot\")} to ${markdownCode(outputDirectory)}.`,\n nextStep: \"Open the PNG files and compare the rendered layouts at each requested viewport.\",\n });\n}\n\nexport function screenshotPartialCaptureContent(count: number, outputDirectory: string, error: string): string {\n return toolContent({\n title: \"Screenshot capture\",\n status: \"partial\",\n outcome: `Saved ${countLabel(count, \"PNG screenshot\")} to ${markdownCode(outputDirectory)} before capture failed: ${markdownText(error, 500)}`,\n nextStep: \"Review the completed PNG files and retry the unfinished viewport captures after resolving the failure.\",\n });\n}\n\nexport function failureContent(title: string, error: string, nextStep: string): string {\n return toolContent({\n title,\n status: \"could not finish\",\n outcome: markdownText(error, 500),\n nextStep,\n });\n}\n"]}
|
package/dist/report.d.ts
CHANGED
package/dist/report.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
2
|
import { getW3CMessageSeverity, } from "./w3c-validator.js";
|
|
3
|
-
import { isHttpRedirectStatus } from "./seo-auditor.js";
|
|
3
|
+
import { isHttpRedirectStatus, isUnverifiedLinkStatus } from "./seo-auditor.js";
|
|
4
4
|
export const validationReportChecks = ["input", "html", "css", "seo", "schema", "links"];
|
|
5
5
|
function clampScore(score) {
|
|
6
6
|
return Math.max(0, Math.min(100, score));
|
|
@@ -16,17 +16,33 @@ function scoreIndicator(score) {
|
|
|
16
16
|
}
|
|
17
17
|
function markdownCell(value) {
|
|
18
18
|
return String(value ?? "")
|
|
19
|
+
.replace(/[\u0000-\u001f\u007f-\u009f\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]+/g, " ")
|
|
19
20
|
.replace(/&/g, "&")
|
|
20
21
|
.replace(/</g, "<")
|
|
21
22
|
.replace(/>/g, ">")
|
|
22
23
|
.replace(/\\/g, "\\\\")
|
|
23
24
|
.replace(/([`*_[\]|~])/g, "\\$1")
|
|
24
|
-
.replace(/[\r\n]+/g, " ")
|
|
25
25
|
.trim();
|
|
26
26
|
}
|
|
27
|
+
function markdownCodeSpan(value) {
|
|
28
|
+
const content = value
|
|
29
|
+
.replace(/[\u0000-\u001f\u007f-\u009f\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]+/g, " ")
|
|
30
|
+
.trim();
|
|
31
|
+
const longestBackticks = Math.max(0, ...Array.from(content.matchAll(/`+/g), (match) => match[0].length));
|
|
32
|
+
const delimiter = "`".repeat(longestBackticks + 1);
|
|
33
|
+
const padded = content.startsWith("`") || content.endsWith("`") ? ` ${content} ` : content;
|
|
34
|
+
return `${delimiter}${padded}${delimiter}`;
|
|
35
|
+
}
|
|
27
36
|
function isRedirect(link) {
|
|
28
37
|
return isHttpRedirectStatus(link.status);
|
|
29
38
|
}
|
|
39
|
+
function fallbackLinkMessage(link) {
|
|
40
|
+
if (isUnverifiedLinkStatus(link.status))
|
|
41
|
+
return "Destination availability not verified";
|
|
42
|
+
if (isRedirect(link))
|
|
43
|
+
return "Redirect not followed";
|
|
44
|
+
return link.ok ? "Accessible" : "HTTP response indicated failure";
|
|
45
|
+
}
|
|
30
46
|
/** Builds the human-readable report and its machine-readable equivalent. */
|
|
31
47
|
export function createValidationReport(input) {
|
|
32
48
|
const failedChecks = input.failedChecks ?? [];
|
|
@@ -49,23 +65,36 @@ export function createValidationReport(input) {
|
|
|
49
65
|
const seoTruncated = input.seoTruncated ?? seoTotalIssues > input.seoIssues.length;
|
|
50
66
|
const schemaTotalIssues = input.schemaTotalIssues ?? input.schemaIssues.length;
|
|
51
67
|
const schemaTruncated = input.schemaTruncated ?? schemaTotalIssues > input.schemaIssues.length;
|
|
68
|
+
// A capped diagnostic list cannot establish the severity distribution of omitted records.
|
|
69
|
+
const htmlCountsIncomplete = htmlTruncated && input.htmlCounts === undefined;
|
|
70
|
+
const cssCountsIncomplete = input.cssAudited && cssTruncated && input.cssCounts === undefined;
|
|
71
|
+
const seoCountsIncomplete = seoTruncated && input.seoCounts === undefined;
|
|
72
|
+
const schemaCountsIncomplete = schemaTruncated && input.schemaCounts === undefined;
|
|
73
|
+
const incompleteCountChecks = [
|
|
74
|
+
...(htmlCountsIncomplete ? ["HTML"] : []),
|
|
75
|
+
...(cssCountsIncomplete ? ["CSS"] : []),
|
|
76
|
+
...(seoCountsIncomplete ? ["SEO"] : []),
|
|
77
|
+
...(schemaCountsIncomplete ? ["JSON-LD"] : []),
|
|
78
|
+
];
|
|
52
79
|
const seoErrors = input.seoCounts?.error ?? input.seoIssues.filter((issue) => issue.severity === "error").length;
|
|
53
80
|
const seoWarnings = input.seoCounts?.warning ?? input.seoIssues.filter((issue) => issue.severity === "warning").length;
|
|
54
81
|
const schemaErrors = input.schemaCounts?.error ?? input.schemaIssues.filter((issue) => issue.severity === "error").length;
|
|
55
|
-
const brokenLinks = input.links.filter((link) => !link.ok).length;
|
|
82
|
+
const brokenLinks = input.links.filter((link) => !link.ok && !isUnverifiedLinkStatus(link.status)).length;
|
|
83
|
+
const unverifiedLinks = input.links.filter((link) => !link.ok && isUnverifiedLinkStatus(link.status)).length;
|
|
56
84
|
const redirectLinks = input.links.filter(isRedirect).length;
|
|
57
|
-
const
|
|
58
|
-
const
|
|
85
|
+
const incompleteLinkTargets = unverifiedLinks > 0 || redirectLinks > 0;
|
|
86
|
+
const htmlScore = checkFailed("html") || htmlCountsIncomplete ? null : clampScore(100 - htmlErrors * 15 - htmlWarnings * 2);
|
|
87
|
+
const cssScore = checkFailed("css") || !input.cssAudited || cssCompatibilityLimitations > 0 || cssCountsIncomplete
|
|
59
88
|
? null
|
|
60
89
|
: clampScore(100 - cssErrors * 20);
|
|
61
|
-
const seoScore = checkFailed("seo") || checkFailed("schema")
|
|
90
|
+
const seoScore = checkFailed("seo") || checkFailed("schema") || seoCountsIncomplete || schemaCountsIncomplete
|
|
62
91
|
? null
|
|
63
92
|
: clampScore(100 - seoErrors * 15 - seoWarnings * 4 - schemaErrors * 15);
|
|
64
|
-
const linkScore = checkFailed("links") || input.links.length === 0
|
|
93
|
+
const linkScore = checkFailed("links") || input.links.length === 0 || incompleteLinkTargets
|
|
65
94
|
? null
|
|
66
95
|
: clampScore(100 - brokenLinks * 25);
|
|
67
96
|
const auditedScores = [htmlScore, seoScore, cssScore, linkScore].filter((score) => score !== null);
|
|
68
|
-
const overallScore = failedChecks.length > 0 || cssCompatibilityLimitations > 0 || auditedScores.length === 0
|
|
97
|
+
const overallScore = failedChecks.length > 0 || cssCompatibilityLimitations > 0 || incompleteLinkTargets || incompleteCountChecks.length > 0 || auditedScores.length === 0
|
|
69
98
|
? null
|
|
70
99
|
: Math.round(auditedScores.reduce((total, score) => total + score, 0) / auditedScores.length);
|
|
71
100
|
const summary = {
|
|
@@ -84,39 +113,49 @@ export function createValidationReport(input) {
|
|
|
84
113
|
schemaErrors,
|
|
85
114
|
linksChecked: input.links.length,
|
|
86
115
|
brokenLinks,
|
|
116
|
+
unverifiedLinks,
|
|
87
117
|
};
|
|
88
118
|
const report = [
|
|
89
119
|
`# Web Validation & SEO Audit Report — ${overallScore === null ? "Partial" : `${scoreIndicator(overallScore)} **${overallScore}**/100`}`,
|
|
90
|
-
`*Generated for:
|
|
120
|
+
`*Generated for: ${markdownCodeSpan(path.basename(input.htmlFilePath))}*`,
|
|
91
121
|
"",
|
|
92
122
|
"## Page health scores",
|
|
93
123
|
"",
|
|
94
124
|
"| Audit | Status | Score |",
|
|
95
125
|
"| :--- | :---: | :---: |",
|
|
96
126
|
`| W3C HTML validation | ${htmlScore === null ? "Unavailable" : scoreIndicator(htmlScore)} | ${htmlScore === null ? "N/A" : `**${htmlScore}** / 100`} |`,
|
|
97
|
-
`| CSS validation | ${cssScore === null ? (checkFailed("css") ? "Unavailable" : cssCompatibilityLimitations > 0 ? "Compatibility-limited" : "Not audited") : scoreIndicator(cssScore)} | ${cssScore === null ? "N/A" : `**${cssScore}** / 100`} |`,
|
|
127
|
+
`| CSS validation | ${cssScore === null ? (checkFailed("css") || cssCountsIncomplete ? "Unavailable" : cssCompatibilityLimitations > 0 ? "Compatibility-limited" : "Not audited") : scoreIndicator(cssScore)} | ${cssScore === null ? "N/A" : `**${cssScore}** / 100`} |`,
|
|
98
128
|
`| SEO and accessibility | ${seoScore === null ? "Unavailable" : scoreIndicator(seoScore)} | ${seoScore === null ? "N/A" : `**${seoScore}** / 100`} |`,
|
|
99
|
-
`| Link integrity | ${linkScore === null ? (checkFailed("links") ? "Unavailable" : "No links checked") : scoreIndicator(linkScore)} | ${linkScore === null ? "N/A" : `**${linkScore}** / 100`} |`,
|
|
129
|
+
`| Link integrity | ${linkScore === null ? (checkFailed("links") ? "Unavailable" : incompleteLinkTargets ? "Incomplete" : "No links checked") : scoreIndicator(linkScore)} | ${linkScore === null ? "N/A" : `**${linkScore}** / 100`} |`,
|
|
100
130
|
"",
|
|
101
131
|
"## Summary",
|
|
102
132
|
"",
|
|
103
|
-
`- HTML: ${htmlErrors} error(s), ${htmlWarnings} warning(s)`,
|
|
104
|
-
`- CSS: ${input.cssAudited ? `${cssErrors} error(s), ${cssWarnings} warning(s)${cssCompatibilityLimitations > 0 ? `, ${cssCompatibilityLimitations} known validator limitation(s)` : ""}` : "not audited"}`,
|
|
105
|
-
`- SEO and accessibility: ${seoErrors} error(s), ${seoWarnings} warning(s)`,
|
|
106
|
-
`- JSON-LD syntax: ${schemaErrors} error(s)`,
|
|
107
|
-
`- Links: ${brokenLinks}
|
|
133
|
+
`- HTML: ${htmlErrors} error(s), ${htmlWarnings} warning(s)${htmlCountsIncomplete ? " (shown diagnostics only)" : ""}`,
|
|
134
|
+
`- CSS: ${input.cssAudited ? `${cssErrors} error(s), ${cssWarnings} warning(s)${cssCompatibilityLimitations > 0 ? `, ${cssCompatibilityLimitations} known validator limitation(s)` : ""}${cssCountsIncomplete ? " (shown diagnostics only)" : ""}` : "not audited"}`,
|
|
135
|
+
`- SEO and accessibility: ${seoErrors} error(s), ${seoWarnings} warning(s)${seoCountsIncomplete ? " (shown findings only)" : ""}`,
|
|
136
|
+
`- JSON-LD syntax: ${schemaErrors} error(s)${schemaCountsIncomplete ? " (shown findings only)" : ""}`,
|
|
137
|
+
`- Links: ${brokenLinks} confirmed HTTP failures, ${unverifiedLinks} unverified, ${redirectLinks} redirect${redirectLinks === 1 ? "" : "s"} to review of ${input.links.length} checked`,
|
|
108
138
|
"",
|
|
109
139
|
`## HTML diagnostics (${htmlTruncated ? `${input.htmlMessages.length} shown of ${htmlTotalMessages}` : htmlTotalMessages})`,
|
|
110
140
|
];
|
|
111
141
|
if (failedChecks.length > 0) {
|
|
112
142
|
report.splice(2, 0, "", "## Partial validation report", "The following checks were unavailable: " + failedChecks.join(", ") + ". Remaining checks completed.");
|
|
113
143
|
}
|
|
144
|
+
if (incompleteCountChecks.length > 0) {
|
|
145
|
+
report.splice(2, 0, "", "## Incomplete diagnostic counts", `${incompleteCountChecks.join(", ")} diagnostics were truncated without complete severity counts. Full severity counts are unavailable; summary counts reflect only shown findings, and affected audit and overall scores are withheld.`);
|
|
146
|
+
}
|
|
147
|
+
if (unverifiedLinks > 0) {
|
|
148
|
+
report.splice(2, 0, "", "## Incomplete link verification", `${unverifiedLinks} link check(s) could not be verified because of a network or policy failure. Link and overall scores are withheld; an unverified check is not proof of a broken destination.`);
|
|
149
|
+
}
|
|
150
|
+
if (redirectLinks > 0) {
|
|
151
|
+
report.splice(2, 0, "", "## Unfollowed redirect destinations", `${redirectLinks} redirect response(s) were observed, but the redirect destination was not checked. Link and overall scores are withheld because a redirect alone does not verify destination availability.`);
|
|
152
|
+
}
|
|
114
153
|
if (input.htmlMessages.length === 0) {
|
|
115
154
|
report.push("No HTML validation diagnostics were returned.");
|
|
116
155
|
}
|
|
117
156
|
else {
|
|
118
157
|
if (htmlTruncated) {
|
|
119
|
-
report.push(`The structured HTML diagnostics are capped; showing the first ${input.htmlMessages.length} of ${htmlTotalMessages}. Summary counts and scoring use all returned Nu diagnostics
|
|
158
|
+
report.push(`The structured HTML diagnostics are capped; showing the first ${input.htmlMessages.length} of ${htmlTotalMessages}. ${htmlCountsIncomplete ? "Full severity counts are unavailable, so the HTML score is withheld." : "Summary counts and scoring use all returned Nu diagnostics."}`);
|
|
120
159
|
}
|
|
121
160
|
report.push("", "| Line | Column | Severity | Message | Extract |", "| :---: | :---: | :--- | :--- | :--- |");
|
|
122
161
|
for (const message of input.htmlMessages) {
|
|
@@ -130,7 +169,7 @@ export function createValidationReport(input) {
|
|
|
130
169
|
}
|
|
131
170
|
else {
|
|
132
171
|
if (cssTruncated) {
|
|
133
|
-
report.push(`The structured CSS diagnostics are capped; showing the first ${input.cssMessages.length} of ${cssTotalMessages}. Summary counts and scoring use all returned Jigsaw diagnostics
|
|
172
|
+
report.push(`The structured CSS diagnostics are capped; showing the first ${input.cssMessages.length} of ${cssTotalMessages}. ${cssCountsIncomplete ? "Full severity counts are unavailable, so the CSS score is withheld." : "Summary counts and scoring use all returned Jigsaw diagnostics."}`);
|
|
134
173
|
}
|
|
135
174
|
report.push("", "| Line | Severity | Context | Message |", "| :---: | :--- | :--- | :--- |");
|
|
136
175
|
for (const message of input.cssMessages) {
|
|
@@ -150,10 +189,10 @@ export function createValidationReport(input) {
|
|
|
150
189
|
}
|
|
151
190
|
else {
|
|
152
191
|
if (seoTruncated) {
|
|
153
|
-
report.push(`The structured SEO/accessibility findings are capped; showing the first ${input.seoIssues.length} of ${seoTotalIssues}. Summary counts and scoring use all findings
|
|
192
|
+
report.push(`The structured SEO/accessibility findings are capped; showing the first ${input.seoIssues.length} of ${seoTotalIssues}. ${seoCountsIncomplete ? "Full severity counts are unavailable, so the SEO score is withheld." : "Summary counts and scoring use all findings."}`);
|
|
154
193
|
}
|
|
155
194
|
if (schemaTruncated) {
|
|
156
|
-
report.push(`The structured JSON-LD findings are capped; showing the first ${input.schemaIssues.length} of ${schemaTotalIssues}. Summary counts and scoring use all findings
|
|
195
|
+
report.push(`The structured JSON-LD findings are capped; showing the first ${input.schemaIssues.length} of ${schemaTotalIssues}. ${schemaCountsIncomplete ? "Full severity counts are unavailable, so the SEO score is withheld." : "Summary counts and scoring use all findings."}`);
|
|
157
196
|
}
|
|
158
197
|
report.push("", "| Category | Severity | Message | Element |", "| :--- | :--- | :--- | :--- |");
|
|
159
198
|
for (const issue of combinedIssues) {
|
|
@@ -167,7 +206,7 @@ export function createValidationReport(input) {
|
|
|
167
206
|
else {
|
|
168
207
|
report.push("", "| URL | Status | Reachable | Details |", "| :--- | :---: | :---: | :--- |");
|
|
169
208
|
for (const link of input.links) {
|
|
170
|
-
report.push(`| ${markdownCell(link.url)} | ${markdownCell(link.status)} | ${link.ok ? "Yes" : "No"} | ${markdownCell(link.message ??
|
|
209
|
+
report.push(`| ${markdownCell(link.url)} | ${markdownCell(link.status)} | ${isUnverifiedLinkStatus(link.status) ? "Unverified" : isRedirect(link) ? "Redirect" : link.ok ? "Yes" : "No"} | ${markdownCell(link.message ?? fallbackLinkMessage(link))} |`);
|
|
171
210
|
}
|
|
172
211
|
}
|
|
173
212
|
return {
|