@eightmedia/flightcheck 1.0.1 → 1.2.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/analyze/structuredReport.d.ts +2 -0
  3. package/dist/analyze/structuredReport.d.ts.map +1 -1
  4. package/dist/analyze/structuredReport.js +33 -15
  5. package/dist/checks/agent-ready.d.ts.map +1 -1
  6. package/dist/checks/agent-ready.js +8 -8
  7. package/dist/checks/crawl.d.ts.map +1 -1
  8. package/dist/checks/crawl.js +11 -0
  9. package/dist/checks/dns.d.ts.map +1 -1
  10. package/dist/checks/dns.js +2 -2
  11. package/dist/checks/issues.d.ts +3 -1
  12. package/dist/checks/issues.d.ts.map +1 -1
  13. package/dist/checks/issues.js +2 -2
  14. package/dist/checks/redirect.d.ts.map +1 -1
  15. package/dist/checks/redirect.js +12 -12
  16. package/dist/checks/robots-txt.d.ts.map +1 -1
  17. package/dist/checks/robots-txt.js +6 -6
  18. package/dist/checks/security-headers.d.ts.map +1 -1
  19. package/dist/checks/security-headers.js +6 -6
  20. package/dist/checks/sitemap.d.ts.map +1 -1
  21. package/dist/checks/sitemap.js +6 -6
  22. package/dist/cli.js +1 -1
  23. package/dist/crawler/crawleeStorage.d.ts +18 -0
  24. package/dist/crawler/crawleeStorage.d.ts.map +1 -0
  25. package/dist/crawler/crawleeStorage.js +24 -0
  26. package/dist/crawler/defaults.d.ts +2 -1
  27. package/dist/crawler/defaults.d.ts.map +1 -1
  28. package/dist/crawler/defaults.js +2 -1
  29. package/dist/crawler/runCrawler.d.ts.map +1 -1
  30. package/dist/crawler/runCrawler.js +112 -84
  31. package/dist/crawler/smartPageSelection.d.ts +77 -0
  32. package/dist/crawler/smartPageSelection.d.ts.map +1 -0
  33. package/dist/crawler/smartPageSelection.js +308 -0
  34. package/docs/agent-ready.md +2 -2
  35. package/docs/analyze.md +5 -3
  36. package/docs/crawler.md +18 -2
  37. package/docs/index.md +1 -0
  38. package/package.json +1 -1
package/docs/analyze.md CHANGED
@@ -69,7 +69,8 @@ Without `--output`, paths are derived from the input: `-raw.json` becomes
69
69
  "category": "infra",
70
70
  "scope": "origin",
71
71
  "title": "Missing Hsts",
72
- "message": "Strict-Transport-Security header is missing on HTTPS."
72
+ "message": "Strict-Transport-Security header is missing on HTTPS.",
73
+ "fix": "Send `Strict-Transport-Security: max-age=31536000; includeSubDomains` on HTTPS responses (hosting or app headers)."
73
74
  }
74
75
  ]
75
76
  }
@@ -84,7 +85,8 @@ includes metadata so consumers can filter or regroup.
84
85
  | `category` | `infra` \| `seo` \| `a11y` \| `best-practices` \| `security` \| `performance` |
85
86
  | `scope` | `site-wide` \| `template` \| `page` \| `origin` |
86
87
  | `title` | Short human title |
87
- | `message` | What to do / what was found |
88
+ | `message` | What was found |
89
+ | `fix` | Concrete remediation suggestion when available |
88
90
  | `template` | Present when `scope` is `template` |
89
91
  | `urls` / `count` | Affected pages when relevant |
90
92
 
@@ -103,7 +105,7 @@ Generated from the JSON. Structure:
103
105
  1. Header — generated time, Flightcheck version, flags, source path
104
106
  2. **At a glance** — page counts and finding totals
105
107
  3. **Stack / DNS / redirect** — factual context when available
106
- 4. **Findings** — grouped by severity for reading order, with plain-language titles
108
+ 4. **Findings** — grouped by severity for reading order, with plain-language titles and a **Fix** line when available
107
109
 
108
110
  ## Notes
109
111
 
package/docs/crawler.md CHANGED
@@ -34,7 +34,7 @@ Key flags:
34
34
  - `--errors-only` include only critical/error findings in the Markdown report
35
35
  - `--checks <ids>` comma-separated checks; default: all implemented checks (`crawl`, `security-headers`, `dns`, `robots-txt`, `sitemap`, `analyze`)
36
36
  - `--parallel` run independent checks in the same wave concurrently
37
- - `--max-pages <n>`
37
+ - `--max-pages <n>` (default **100**) — hard crawl budget with smart URL selection (see below)
38
38
  - `--delay-ms <n>`
39
39
  - `--timeout-ms <n>`
40
40
  - `--concurrency <n>`
@@ -149,10 +149,26 @@ Additionally:
149
149
 
150
150
  - Only internal links are crawled. Links are discovered via `extractInternalLinks` and added to the queue; Crawlee's `enqueueLinks` is intentionally not used.
151
151
  - Sitemap URLs are added to the crawl queue by default so pages from `sitemap.xml` are visited even when they are not reachable via internal links.
152
- - `--max-pages` is the hard stop (`maxRequestsPerCrawl`). The crawl stops once this count is processed, even if unvisited links remain. Increase `--max-pages` to crawl the entire site.
152
+ - `--max-pages` (default **100**) is the hard stop (`maxRequestsPerCrawl`). The crawl stops once this count is processed, even if unvisited links remain. Raise `--max-pages` (for example `1000` or higher) when you need broader coverage of a large site.
153
+
154
+ ### Smart page selection
155
+
156
+ Large sitemaps often list thousands of archive detail URLs. Selection is based on **URL-tree shape**, not slug names (so `/stories`, `/nieuws`, or `/whatever` all work the same):
157
+
158
+ 1. Build a path tree from known URLs (sitemap seeds and later discoveries)
159
+ 2. Treat a path as a **list parent** when it has many direct children that are mostly **leaves** (no further subpages) — typical archive indexes
160
+ 3. Prefer **home**, other **structural** shallow pages, and those **list** indexes
161
+ 4. Under each list parent, take only a **round-robin sample** of leaf URLs until `--max-pages` is filled
162
+
163
+ Seed order follows that ranking (FIFO). Structural links discovered from HTML are pushed to the front of the queue (`forefront`); leaf URLs under list parents are capped so one archive cannot flood the budget.
164
+
165
+ Selection lives in `src/crawler/smartPageSelection.ts`.
153
166
  - Query parameters and hashes do not count toward URL identity.
154
167
  - Non-HTML responses are reported with `note`.
155
168
  - Links to files with a known non-HTML extension (such as `.pdf`, `.zip`, images, video, fonts) are not added to the queue, so Crawlee does not generate unnecessary retries and errors.
156
169
  - With `--respect-robots-txt`, URLs excluded by `robots.txt` are skipped.
157
170
  - After each URL, output is written atomically.
158
171
  - On `SIGINT`, the crawl stops gracefully while preserving partial output.
172
+ - Crawlee request-queue files go under `.flightcheckStorage/<run-hash>/` (not the generic
173
+ `storage/` folder). That subdirectory is deleted when the crawl finishes, so a second
174
+ concurrent run keeps its own files until it completes.
package/docs/index.md CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
  - Package releases: [CHANGELOG.md](../CHANGELOG.md)
17
17
  - Branch notes: [changelog/](./changelog/)
18
+ - [2026-10-28 — smart-max-pages](./changelog/2026-10-28--smart-max-pages.md)
18
19
  - [2026-10-28 — report-version-flags](./changelog/2026-10-28--report-version-flags.md)
19
20
  - [2026-10-27 — npm-public-package](./changelog/2026-10-27--npm-public-package.md)
20
21
  - [2026-10-27 — structured-report-json](./changelog/2026-10-27--structured-report-json.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightmedia/flightcheck",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "Pre-launch website audit: crawl SEO/a11y/security checks and emit structured JSON + Markdown reports.",
5
5
  "license": "GPL-3.0",
6
6
  "type": "module",