@eightmedia/flightcheck 0.0.0-stage → 1.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.
Files changed (127) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +691 -0
  3. package/README.md +152 -2
  4. package/dist/analyze/fixManifest.d.ts +65 -0
  5. package/dist/analyze/fixManifest.d.ts.map +1 -0
  6. package/dist/analyze/fixManifest.js +588 -0
  7. package/dist/analyze/report.d.ts +283 -0
  8. package/dist/analyze/report.d.ts.map +1 -0
  9. package/dist/analyze/report.js +726 -0
  10. package/dist/analyze/reportTier1.d.ts +46 -0
  11. package/dist/analyze/reportTier1.d.ts.map +1 -0
  12. package/dist/analyze/reportTier1.js +251 -0
  13. package/dist/analyze/stack.d.ts +33 -0
  14. package/dist/analyze/stack.d.ts.map +1 -0
  15. package/dist/analyze/stack.js +188 -0
  16. package/dist/analyze/structuredReport.d.ts +62 -0
  17. package/dist/analyze/structuredReport.d.ts.map +1 -0
  18. package/dist/analyze/structuredReport.js +524 -0
  19. package/dist/analyze.d.ts +3 -0
  20. package/dist/analyze.d.ts.map +1 -0
  21. package/dist/analyze.js +40 -0
  22. package/dist/checks/agent-ready.d.ts +63 -0
  23. package/dist/checks/agent-ready.d.ts.map +1 -0
  24. package/dist/checks/agent-ready.js +219 -0
  25. package/dist/checks/analyze.d.ts +15 -0
  26. package/dist/checks/analyze.d.ts.map +1 -0
  27. package/dist/checks/analyze.js +63 -0
  28. package/dist/checks/crawl.d.ts +28 -0
  29. package/dist/checks/crawl.d.ts.map +1 -0
  30. package/dist/checks/crawl.js +86 -0
  31. package/dist/checks/dns.d.ts +25 -0
  32. package/dist/checks/dns.d.ts.map +1 -0
  33. package/dist/checks/dns.js +80 -0
  34. package/dist/checks/index.d.ts +24 -0
  35. package/dist/checks/index.d.ts.map +1 -0
  36. package/dist/checks/index.js +12 -0
  37. package/dist/checks/issues.d.ts +8 -0
  38. package/dist/checks/issues.d.ts.map +1 -0
  39. package/dist/checks/issues.js +3 -0
  40. package/dist/checks/redirect.d.ts +38 -0
  41. package/dist/checks/redirect.d.ts.map +1 -0
  42. package/dist/checks/redirect.js +209 -0
  43. package/dist/checks/registry.d.ts +8 -0
  44. package/dist/checks/registry.d.ts.map +1 -0
  45. package/dist/checks/registry.js +275 -0
  46. package/dist/checks/robots-txt.d.ts +16 -0
  47. package/dist/checks/robots-txt.d.ts.map +1 -0
  48. package/dist/checks/robots-txt.js +99 -0
  49. package/dist/checks/runner.d.ts +9 -0
  50. package/dist/checks/runner.d.ts.map +1 -0
  51. package/dist/checks/runner.js +110 -0
  52. package/dist/checks/security-headers.d.ts +12 -0
  53. package/dist/checks/security-headers.d.ts.map +1 -0
  54. package/dist/checks/security-headers.js +53 -0
  55. package/dist/checks/sitemap.d.ts +36 -0
  56. package/dist/checks/sitemap.d.ts.map +1 -0
  57. package/dist/checks/sitemap.js +140 -0
  58. package/dist/checks/types.d.ts +72 -0
  59. package/dist/checks/types.d.ts.map +1 -0
  60. package/dist/checks/types.js +20 -0
  61. package/dist/cli.d.ts +3 -0
  62. package/dist/cli.d.ts.map +1 -0
  63. package/dist/cli.js +125 -0
  64. package/dist/crawler/checkGroups.d.ts +7 -0
  65. package/dist/crawler/checkGroups.d.ts.map +1 -0
  66. package/dist/crawler/checkGroups.js +29 -0
  67. package/dist/crawler/crawlState.d.ts +7 -0
  68. package/dist/crawler/crawlState.d.ts.map +1 -0
  69. package/dist/crawler/crawlState.js +6 -0
  70. package/dist/crawler/defaults.d.ts +11 -0
  71. package/dist/crawler/defaults.d.ts.map +1 -0
  72. package/dist/crawler/defaults.js +10 -0
  73. package/dist/crawler/extractors.d.ts +5 -0
  74. package/dist/crawler/extractors.d.ts.map +1 -0
  75. package/dist/crawler/extractors.js +169 -0
  76. package/dist/crawler/jsAssets.d.ts +2 -0
  77. package/dist/crawler/jsAssets.d.ts.map +1 -0
  78. package/dist/crawler/jsAssets.js +22 -0
  79. package/dist/crawler/outputPaths.d.ts +14 -0
  80. package/dist/crawler/outputPaths.d.ts.map +1 -0
  81. package/dist/crawler/outputPaths.js +51 -0
  82. package/dist/crawler/reporter.d.ts +3 -0
  83. package/dist/crawler/reporter.d.ts.map +1 -0
  84. package/dist/crawler/reporter.js +12 -0
  85. package/dist/crawler/robots.d.ts +5 -0
  86. package/dist/crawler/robots.d.ts.map +1 -0
  87. package/dist/crawler/robots.js +29 -0
  88. package/dist/crawler/runCrawler.d.ts +22 -0
  89. package/dist/crawler/runCrawler.d.ts.map +1 -0
  90. package/dist/crawler/runCrawler.js +172 -0
  91. package/dist/crawler/schema.d.ts +87 -0
  92. package/dist/crawler/schema.d.ts.map +1 -0
  93. package/dist/crawler/schema.js +44 -0
  94. package/dist/crawler/secrets.d.ts +4 -0
  95. package/dist/crawler/secrets.d.ts.map +1 -0
  96. package/dist/crawler/secrets.js +70 -0
  97. package/dist/crawler/sitemap.d.ts +8 -0
  98. package/dist/crawler/sitemap.d.ts.map +1 -0
  99. package/dist/crawler/sitemap.js +105 -0
  100. package/dist/crawler/stack.d.ts +3 -0
  101. package/dist/crawler/stack.d.ts.map +1 -0
  102. package/dist/crawler/stack.js +1 -0
  103. package/dist/crawler/stackDetect.d.ts +24 -0
  104. package/dist/crawler/stackDetect.d.ts.map +1 -0
  105. package/dist/crawler/stackDetect.js +604 -0
  106. package/dist/crawler/tier1Extractors.d.ts +5 -0
  107. package/dist/crawler/tier1Extractors.d.ts.map +1 -0
  108. package/dist/crawler/tier1Extractors.js +255 -0
  109. package/dist/crawler/tracking.d.ts +8 -0
  110. package/dist/crawler/tracking.d.ts.map +1 -0
  111. package/dist/crawler/tracking.js +50 -0
  112. package/dist/crawler/urlUtils.d.ts +12 -0
  113. package/dist/crawler/urlUtils.d.ts.map +1 -0
  114. package/dist/crawler/urlUtils.js +53 -0
  115. package/dist/index.d.ts +14 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +7 -0
  118. package/docs/agent-fixes.md +17 -0
  119. package/docs/agent-ready.md +44 -0
  120. package/docs/analyze.md +103 -0
  121. package/docs/check-api.md +142 -0
  122. package/docs/checks.md +116 -0
  123. package/docs/crawler.md +158 -0
  124. package/docs/index.md +24 -0
  125. package/docs/qc-checks-plan.md +796 -0
  126. package/docs/stack.md +99 -0
  127. package/package.json +86 -4
package/docs/stack.md ADDED
@@ -0,0 +1,99 @@
1
+ # Stack detection
2
+
3
+ Flightcheck fingerprints the technology stack of a crawled site for handover docs and agent
4
+ routing. Results appear in `analysis.stack` in `*-report.json` and under **Stack** in the Markdown report.
5
+
6
+ Detection uses **curated flightcheck rules** in `src/crawler/stackDetect.ts` — not the full
7
+ Wappalyzer / webappanalyzer database. Rules only fire on strong signals (script URLs, distinctive
8
+ HTML markers, response headers, DNS). This avoids false positives from loose substring matches.
9
+
10
+ ## Categories
11
+
12
+ | Category | Examples |
13
+ | --- | --- |
14
+ | Platform | PHP, Node.js, Ruby on Rails, Django, ASP.NET |
15
+ | Framework | Next.js, Nuxt, Vue, Angular, Astro, Gatsby, Remix, SvelteKit |
16
+ | CMS | WordPress, Sanity, Contentful, Storyblok, Shopify, Drupal, Webflow, Prismic |
17
+ | Search | Algolia, Meilisearch, Typesense |
18
+ | Hosting | Vercel, Netlify |
19
+ | CDN | Cloudflare, AWS CloudFront |
20
+
21
+ Tracking (Google Tag Manager, Google Analytics (GA4), Google Analytics (Universal), Facebook Pixel, Matomo, Plausible) is
22
+ detected separately by the `tracking` crawl group and shown under **Tracking (flightcheck crawl)**
23
+ in the stack section.
24
+
25
+ ## Signal sources
26
+
27
+ | Source | When collected | Module |
28
+ | --- | --- | --- |
29
+ | HTML crawl | `stack` group (default on) | `detectStackFromHtml()` |
30
+ | Response headers | `security-headers` check | `detectStackFromHeaders()` |
31
+ | DNS records | `dns` check | `detectStackFromDns()` |
32
+ | Tracking IDs | `tracking` crawl group | `extractTracking()` in `src/crawler/tracking.ts` |
33
+
34
+ Without a headless browser, stack detection is limited to static HTML and infrastructure signals.
35
+ Late-loaded scripts (GTM after consent, client-only frameworks) may be missed unless they appear in
36
+ the initial HTML.
37
+
38
+ ## Crawl group
39
+
40
+ The `stack` group runs during crawl by default:
41
+
42
+ ```bash
43
+ pnpm run flightcheck -- https://example.com --skip stack
44
+ ```
45
+
46
+ Per-page detections are stored as `stack.detections` on each crawl record. Detections are tagged
47
+ with `detector: "flightcheck-v1"` so older crawl JSON from the webappanalyzer era is ignored
48
+ during analyze.
49
+
50
+ ## Analyze output
51
+
52
+ ```markdown
53
+ ## Stack
54
+
55
+ ### Platform
56
+ - **Node.js** (medium, site-wide)
57
+ - implied by Next.js
58
+
59
+ ### Framework
60
+ - **Next.js** (high, site-wide)
61
+ - html: `data-next-head`
62
+
63
+ ### Hosting
64
+ - **Vercel** (high, origin)
65
+ - header: x-vercel-id
66
+
67
+ ### Tracking (flightcheck crawl)
68
+ - Tag managers:
69
+ - Google Tag Manager: `GTM-XXXX`
70
+ ```
71
+
72
+ Run with infra checks for the fullest picture:
73
+
74
+ ```bash
75
+ pnpm run flightcheck -- https://example.com --checks crawl,security-headers,dns,robots-txt,analyze --parallel
76
+ ```
77
+
78
+ ## Architecture
79
+
80
+ ```text
81
+ src/crawler/stackDetect.ts (curated fingerprint rules)
82
+ ↓
83
+ src/crawler/stack.ts (re-exports detect helpers)
84
+ ↓
85
+ src/crawler/runCrawler.ts (per-page detect during crawl)
86
+ ↓
87
+ src/analyze/stack.ts (aggregate site-wide + analyze report)
88
+ ```
89
+
90
+ ## Adding fingerprints
91
+
92
+ Add a rule to `HTML_RULES`, `HEADER_RULES`, or `DNS_RULES` in `src/crawler/stackDetect.ts`.
93
+ Each rule must match on a **specific** signal — never run loose patterns against the full HTML
94
+ document.
95
+
96
+ Use `IMPLIED` for safe parent technology inference (e.g. Next.js → Node.js).
97
+ Use `EXCLUDES` to suppress redundant detections (e.g. Next.js excludes generic React).
98
+
99
+ Add tests in `src/crawler/stackDetect.test.ts`.
package/package.json CHANGED
@@ -1,6 +1,88 @@
1
1
  {
2
2
  "name": "@eightmedia/flightcheck",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Pre-launch website audit: crawl SEO/a11y/security checks and emit structured JSON + Markdown reports.",
5
+ "license": "GPL-3.0",
6
+ "type": "module",
7
+ "author": "EightMedia <info@eight.nl>",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/EightMedia/flightcheck.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/EightMedia/flightcheck/issues"
14
+ },
15
+ "homepage": "https://github.com/EightMedia/flightcheck#readme",
16
+ "keywords": [
17
+ "flightcheck",
18
+ "crawler",
19
+ "seo",
20
+ "accessibility",
21
+ "security",
22
+ "audit",
23
+ "pre-launch",
24
+ "cli"
25
+ ],
26
+ "engines": {
27
+ "node": ">=22.0.0"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public",
31
+ "registry": "https://registry.npmjs.org/"
32
+ },
33
+ "main": "./dist/index.js",
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/index.js"
39
+ },
40
+ "./checks": {
41
+ "types": "./dist/checks/index.d.ts",
42
+ "import": "./dist/checks/index.js"
43
+ },
44
+ "./package.json": "./package.json"
45
+ },
46
+ "bin": {
47
+ "flightcheck": "dist/cli.js",
48
+ "flightcheck-analyze": "dist/analyze.js"
49
+ },
50
+ "files": [
51
+ "dist",
52
+ "!dist/orchestrate.js",
53
+ "!dist/orchestrate/**",
54
+ "!dist/orchestrate.d.ts",
55
+ "!dist/orchestrate.d.ts.map",
56
+ "docs/*.md",
57
+ "README.md",
58
+ "CHANGELOG.md",
59
+ "LICENSE"
60
+ ],
61
+ "scripts": {
62
+ "dev": "tsx src/cli.ts --help",
63
+ "flightcheck": "tsx src/cli.ts",
64
+ "crawl": "tsx src/cli.ts",
65
+ "analyze": "tsx src/analyze.ts",
66
+ "build": "tsc",
67
+ "prepublishOnly": "pnpm test && pnpm build",
68
+ "start": "node dist/cli.js",
69
+ "test": "vitest run",
70
+ "test:watch": "vitest",
71
+ "typecheck": "tsc --noEmit"
72
+ },
73
+ "dependencies": {
74
+ "cheerio": "^1.1.2",
75
+ "commander": "^14.0.1",
76
+ "crawlee": "^3.15.0",
77
+ "pino": "^10.1.0",
78
+ "robots-parser": "^3.0.1",
79
+ "zod": "^4.1.11"
80
+ },
81
+ "devDependencies": {
82
+ "@types/node": "^24.5.2",
83
+ "tsx": "^4.20.6",
84
+ "typescript": "^5.9.3",
85
+ "vitest": "^4.1.9"
86
+ },
87
+ "packageManager": "pnpm@11.5.2+sha512.71c631e382066efc25625d5cf029075de07b61b37f6e27350fbd84b1bda5864c8c1967adc280776b45c30a715c0359a3be08fef42d5bb09e2b99029979692916"
88
+ }