Reference
Library use
The three exports, their return shapes, and the built-in safety limits.
lib.js exports three things (lib.js):
run(url, asJson?)
Runs the six checks. Returns
{ url, score, grade, checks: [{ label, status, detail, fix }] } where status is
pass | warn | fail and fix is a concrete remediation string or null.
generateFix(url)
Returns { url, host, name, organizationJsonLd, faqJsonLd, robotsTxt }; see
Generated fixes.
AI_CRAWLERS
The tracked-crawler list, [{ ua, who }]; see Tracked AI crawlers.
Safety and limits
- SSRF guard: hostnames are DNS-resolved and rejected if any address is private, loopback, link-local, or CGNAT (lib.js#L18-L38).
- Timeout: every fetch aborts after 10 seconds (lib.js#L16).
- Size cap: response bodies are truncated at 2.5 MB (lib.js#L16).
- Identified UA: requests send a versioned user-agent that links back to the repository (lib.js#L15).
