aeorank 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +185 -2
- package/dist/browser.d.ts +524 -0
- package/dist/browser.js +4519 -0
- package/dist/browser.js.map +1 -0
- package/dist/cli.js +369 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1691 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +181 -19
- package/dist/index.d.ts +181 -19
- package/dist/index.js +1680 -8
- package/dist/index.js.map +1 -1
- package/package.json +7 -1
package/dist/index.d.cts
CHANGED
|
@@ -36,18 +36,26 @@ interface PitchMetric {
|
|
|
36
36
|
significance: string;
|
|
37
37
|
}
|
|
38
38
|
type PageCategory$1 = 'homepage' | 'blog' | 'about' | 'pricing' | 'services' | 'contact' | 'team' | 'resources' | 'docs' | 'cases' | 'faq' | 'content';
|
|
39
|
-
interface
|
|
39
|
+
interface PageCriterionScore$1 {
|
|
40
|
+
criterion: string;
|
|
41
|
+
criterion_label: string;
|
|
42
|
+
score: number;
|
|
43
|
+
weight: number;
|
|
44
|
+
}
|
|
45
|
+
interface PageIssue {
|
|
40
46
|
check: string;
|
|
41
47
|
label: string;
|
|
42
48
|
severity: 'error' | 'warning' | 'info';
|
|
43
49
|
}
|
|
44
|
-
interface PageReview
|
|
50
|
+
interface PageReview {
|
|
45
51
|
url: string;
|
|
46
52
|
title: string;
|
|
47
53
|
category: PageCategory$1;
|
|
48
54
|
wordCount: number;
|
|
49
|
-
issues: PageIssue
|
|
50
|
-
strengths: PageIssue
|
|
55
|
+
issues: PageIssue[];
|
|
56
|
+
strengths: PageIssue[];
|
|
57
|
+
aeoScore?: number;
|
|
58
|
+
criterionScores?: PageCriterionScore$1[];
|
|
51
59
|
}
|
|
52
60
|
interface AuditData {
|
|
53
61
|
site: string;
|
|
@@ -61,7 +69,7 @@ interface AuditData {
|
|
|
61
69
|
opportunities: Deliverable[];
|
|
62
70
|
pitchNumbers: PitchMetric[];
|
|
63
71
|
bottomLine: string;
|
|
64
|
-
pagesReviewed?: PageReview
|
|
72
|
+
pagesReviewed?: PageReview[];
|
|
65
73
|
}
|
|
66
74
|
type AuditStatus = 'pass' | 'fail' | 'partial' | 'not_found';
|
|
67
75
|
type Priority = 'P0' | 'P1' | 'P2' | 'P3';
|
|
@@ -109,6 +117,93 @@ interface AuditResult extends AuditData {
|
|
|
109
117
|
*/
|
|
110
118
|
declare function audit(domain: string, options?: AuditOptions): Promise<AuditResult>;
|
|
111
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Link graph analysis for full-site AEO audits.
|
|
122
|
+
* Builds an internal link graph, detects orphan pages, pillar pages,
|
|
123
|
+
* hub pages, and topic clusters from crawled page data.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
interface LinkEdge {
|
|
127
|
+
source: string;
|
|
128
|
+
target: string;
|
|
129
|
+
anchorText: string;
|
|
130
|
+
}
|
|
131
|
+
interface PageNode {
|
|
132
|
+
url: string;
|
|
133
|
+
title: string;
|
|
134
|
+
wordCount: number;
|
|
135
|
+
category: PageCategory;
|
|
136
|
+
inDegree: number;
|
|
137
|
+
outDegree: number;
|
|
138
|
+
depth: number;
|
|
139
|
+
isPillar: boolean;
|
|
140
|
+
isHub: boolean;
|
|
141
|
+
isOrphan: boolean;
|
|
142
|
+
}
|
|
143
|
+
interface TopicCluster {
|
|
144
|
+
pillarUrl: string;
|
|
145
|
+
pillarTitle: string;
|
|
146
|
+
spokes: string[];
|
|
147
|
+
cohesion: number;
|
|
148
|
+
}
|
|
149
|
+
interface LinkGraphStats {
|
|
150
|
+
totalPages: number;
|
|
151
|
+
totalEdges: number;
|
|
152
|
+
orphanPages: number;
|
|
153
|
+
pillarPages: number;
|
|
154
|
+
hubPages: number;
|
|
155
|
+
avgDepth: number;
|
|
156
|
+
maxDepth: number;
|
|
157
|
+
clusters: number;
|
|
158
|
+
}
|
|
159
|
+
interface LinkGraph {
|
|
160
|
+
nodes: Map<string, PageNode>;
|
|
161
|
+
edges: LinkEdge[];
|
|
162
|
+
stats: LinkGraphStats;
|
|
163
|
+
clusters: TopicCluster[];
|
|
164
|
+
}
|
|
165
|
+
interface SerializedLinkGraph {
|
|
166
|
+
nodes: PageNode[];
|
|
167
|
+
stats: LinkGraphStats;
|
|
168
|
+
clusters: TopicCluster[];
|
|
169
|
+
}
|
|
170
|
+
declare function serializeLinkGraph(graph: LinkGraph): SerializedLinkGraph;
|
|
171
|
+
/**
|
|
172
|
+
* Extract internal links from HTML with their anchor text.
|
|
173
|
+
* Similar to extractInternalLinks in full-site-crawler.ts but returns LinkEdge[].
|
|
174
|
+
*/
|
|
175
|
+
declare function extractLinksWithAnchors(html: string, sourceUrl: string, domain: string): LinkEdge[];
|
|
176
|
+
/**
|
|
177
|
+
* BFS from homepage to compute click depth for each node.
|
|
178
|
+
* Unreachable pages get Infinity.
|
|
179
|
+
*/
|
|
180
|
+
declare function calculateDepths(nodes: Map<string, PageNode>, adjacency: Map<string, Set<string>>, homepageUrl: string): void;
|
|
181
|
+
/**
|
|
182
|
+
* Detect pillar pages: long content with significant in/out linking.
|
|
183
|
+
* wordCount >= 1500 AND inDegree >= 3 AND outDegree >= 3
|
|
184
|
+
* AND category in blog/content/resources/docs AND not homepage (depth > 0).
|
|
185
|
+
*/
|
|
186
|
+
declare function detectPillars(nodes: Map<string, PageNode>): void;
|
|
187
|
+
/**
|
|
188
|
+
* Detect hub pages: high outDegree navigation/index pages.
|
|
189
|
+
* outDegree >= 10 with category homepage/resources/docs, OR outDegree >= 15.
|
|
190
|
+
*/
|
|
191
|
+
declare function detectHubs(nodes: Map<string, PageNode>): void;
|
|
192
|
+
/**
|
|
193
|
+
* Detect topic clusters around pillar pages.
|
|
194
|
+
* For each pillar, gather spokes (pages linked to/from pillar).
|
|
195
|
+
* Cohesion = actual edges between cluster members / possible edges.
|
|
196
|
+
* Minimum 2 spokes to form a cluster.
|
|
197
|
+
*/
|
|
198
|
+
declare function detectClusters(nodes: Map<string, PageNode>, edges: LinkEdge[]): TopicCluster[];
|
|
199
|
+
/**
|
|
200
|
+
* Build a link graph from crawled pages.
|
|
201
|
+
* @param pages - Array of FetchResult from full-site crawl
|
|
202
|
+
* @param domain - The site domain
|
|
203
|
+
* @param homepageUrl - Full URL of the homepage (e.g. https://example.com)
|
|
204
|
+
*/
|
|
205
|
+
declare function buildLinkGraph(pages: FetchResult[], domain: string, homepageUrl: string): LinkGraph;
|
|
206
|
+
|
|
112
207
|
interface CriterionResult {
|
|
113
208
|
criterion: string;
|
|
114
209
|
criterion_label: string;
|
|
@@ -147,6 +242,8 @@ interface SiteData {
|
|
|
147
242
|
skipped: number;
|
|
148
243
|
elapsed: number;
|
|
149
244
|
};
|
|
245
|
+
/** Link graph from full-site crawl */
|
|
246
|
+
linkGraph?: LinkGraph;
|
|
150
247
|
}
|
|
151
248
|
interface RawDataSummary {
|
|
152
249
|
domain: string;
|
|
@@ -260,22 +357,35 @@ declare function generateBottomLine(score: number, opportunities: Deliverable[],
|
|
|
260
357
|
* Runs 12 deterministic checks on each crawled page (no LLM).
|
|
261
358
|
*/
|
|
262
359
|
|
|
263
|
-
interface PageIssue {
|
|
264
|
-
check: string;
|
|
265
|
-
label: string;
|
|
266
|
-
severity: 'error' | 'warning' | 'info';
|
|
267
|
-
}
|
|
268
|
-
interface PageReview {
|
|
269
|
-
url: string;
|
|
270
|
-
title: string;
|
|
271
|
-
category: PageCategory;
|
|
272
|
-
wordCount: number;
|
|
273
|
-
issues: PageIssue[];
|
|
274
|
-
strengths: PageIssue[];
|
|
275
|
-
}
|
|
276
360
|
declare function analyzePage(html: string, url: string, category: PageCategory): PageReview;
|
|
277
361
|
declare function analyzeAllPages(siteData: SiteData): PageReview[];
|
|
278
362
|
|
|
363
|
+
/**
|
|
364
|
+
* Per-page AEO scoring.
|
|
365
|
+
* Evaluates 14 of 26 criteria that apply at individual page level.
|
|
366
|
+
* Produces a 0-100 AEO score per page.
|
|
367
|
+
*/
|
|
368
|
+
|
|
369
|
+
interface PageCriterionScore {
|
|
370
|
+
criterion: string;
|
|
371
|
+
criterion_label: string;
|
|
372
|
+
score: number;
|
|
373
|
+
weight: number;
|
|
374
|
+
}
|
|
375
|
+
interface PageScoreResult {
|
|
376
|
+
aeoScore: number;
|
|
377
|
+
criterionScores: PageCriterionScore[];
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Score a single page against 14 AEO criteria.
|
|
381
|
+
* Returns a 0-100 AEO score and individual criterion scores.
|
|
382
|
+
*/
|
|
383
|
+
declare function scorePage(html: string, url?: string): PageScoreResult;
|
|
384
|
+
/**
|
|
385
|
+
* Score all crawled pages (homepage + blogSample).
|
|
386
|
+
*/
|
|
387
|
+
declare function scoreAllPages(siteData: SiteData): PageScoreResult[];
|
|
388
|
+
|
|
279
389
|
/**
|
|
280
390
|
* Extended page discovery for instant audit.
|
|
281
391
|
* Fetches additional pages beyond what prefetchSiteData provides,
|
|
@@ -399,6 +509,58 @@ interface ParkedDomainResult {
|
|
|
399
509
|
*/
|
|
400
510
|
declare function detectParkedDomain(bodySnippet: string): ParkedDomainResult;
|
|
401
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Fix Plan Engine - generates actionable, phased fix plans from audit scores.
|
|
514
|
+
* Runs alongside the existing opportunities system (no breaking changes).
|
|
515
|
+
* Uses criterion scores, optional per-page data, and optional link graph
|
|
516
|
+
* to produce structured fix plans with code examples and dependency ordering.
|
|
517
|
+
*/
|
|
518
|
+
|
|
519
|
+
interface FixAction {
|
|
520
|
+
id: string;
|
|
521
|
+
criterion: string;
|
|
522
|
+
criterionId: string;
|
|
523
|
+
title: string;
|
|
524
|
+
description: string;
|
|
525
|
+
impact: 'critical' | 'high' | 'medium' | 'low';
|
|
526
|
+
effort: 'trivial' | 'low' | 'medium' | 'high';
|
|
527
|
+
impactScore: number;
|
|
528
|
+
category: 'content' | 'structure' | 'discovery' | 'trust';
|
|
529
|
+
steps: string[];
|
|
530
|
+
codeExample?: string;
|
|
531
|
+
successCriteria: string;
|
|
532
|
+
dependsOn?: string[];
|
|
533
|
+
affectedPages?: string[];
|
|
534
|
+
pageCount?: number;
|
|
535
|
+
}
|
|
536
|
+
interface FixPhase {
|
|
537
|
+
phase: number;
|
|
538
|
+
title: string;
|
|
539
|
+
description: string;
|
|
540
|
+
fixes: FixAction[];
|
|
541
|
+
estimatedImpact: number;
|
|
542
|
+
}
|
|
543
|
+
interface FixPlanSummary {
|
|
544
|
+
criticalCount: number;
|
|
545
|
+
highCount: number;
|
|
546
|
+
mediumCount: number;
|
|
547
|
+
lowCount: number;
|
|
548
|
+
quickWinCount: number;
|
|
549
|
+
topOpportunity: string;
|
|
550
|
+
estimatedTotalEffort: string;
|
|
551
|
+
}
|
|
552
|
+
interface FixPlan {
|
|
553
|
+
domain: string;
|
|
554
|
+
generatedAt: string;
|
|
555
|
+
overallScore: number;
|
|
556
|
+
projectedScore: number;
|
|
557
|
+
totalFixes: number;
|
|
558
|
+
phases: FixPhase[];
|
|
559
|
+
quickWins: FixAction[];
|
|
560
|
+
summary: FixPlanSummary;
|
|
561
|
+
}
|
|
562
|
+
declare function generateFixPlan(domain: string, overallScore: number, criteria: CriterionResult[], pagesReviewed?: PageReview[], linkGraph?: LinkGraph): FixPlan;
|
|
563
|
+
|
|
402
564
|
/**
|
|
403
565
|
* HTML report generator for AEORank audits.
|
|
404
566
|
* Produces self-contained HTML with inline CSS - zero external dependencies.
|
|
@@ -456,4 +618,4 @@ interface ComparisonResult {
|
|
|
456
618
|
*/
|
|
457
619
|
declare function compare(domainA: string, domainB: string, options?: AuditOptions): Promise<ComparisonResult>;
|
|
458
620
|
|
|
459
|
-
export { type AuditData, type AuditFinding, type AuditOptions, type AuditResult, type AuditStatus, CRITERION_LABELS, type ComparisonResult, type CrawlOptions, type CrawlResult, type CriterionComparison, type CriterionDetail, type CriterionResult, type Deliverable, type DetailedFinding, type FetchResult, type FindingSeverity, type FindingType, type HeadlessOptions, type ImpactLevel, type PageCategory$1 as PageCategory, type
|
|
621
|
+
export { type AuditData, type AuditFinding, type AuditOptions, type AuditResult, type AuditStatus, CRITERION_LABELS, type ComparisonResult, type CrawlOptions, type CrawlResult, type CriterionComparison, type CriterionDetail, type CriterionResult, type Deliverable, type DetailedFinding, type FetchResult, type FindingSeverity, type FindingType, type FixAction, type FixPhase, type FixPlan, type FixPlanSummary, type HeadlessOptions, type ImpactLevel, type LinkEdge, type LinkGraph, type LinkGraphStats, type PageCategory$1 as PageCategory, type PageCriterionScore$1 as PageCriterionScore, type PageIssue, type PageNode, type PageReview, type PageScoreResult, type ParkedDomainResult, type PitchMetric, type Priority, type RawDataSummary, type RenderingMethod, type ScoreCardItem, type SerializedLinkGraph, type Severity, type SiteData, type Status, type TopicCluster, analyzeAllPages, analyzePage, audit, auditSiteFromData, buildDetailedFindings, buildLinkGraph, buildScorecard, calculateDepths, calculateOverallScore, classifyRendering, compare, crawlFullSite, detectClusters, detectHubs, detectParkedDomain, detectPillars, extractAllUrlsFromSitemap, extractContentPagesFromSitemap, extractInternalLinks, extractLinksWithAnchors, extractNavLinks, extractRawDataSummary, fetchMultiPageData, fetchWithHeadless, generateBottomLine, generateComparisonHtmlReport, generateFixPlan, generateHtmlReport, generateOpportunities, generatePitchNumbers, generateVerdict, inferCategory, isSpaShell, prefetchSiteData, scoreAllPages, scorePage, scoreToStatus, serializeLinkGraph };
|
package/dist/index.d.ts
CHANGED
|
@@ -36,18 +36,26 @@ interface PitchMetric {
|
|
|
36
36
|
significance: string;
|
|
37
37
|
}
|
|
38
38
|
type PageCategory$1 = 'homepage' | 'blog' | 'about' | 'pricing' | 'services' | 'contact' | 'team' | 'resources' | 'docs' | 'cases' | 'faq' | 'content';
|
|
39
|
-
interface
|
|
39
|
+
interface PageCriterionScore$1 {
|
|
40
|
+
criterion: string;
|
|
41
|
+
criterion_label: string;
|
|
42
|
+
score: number;
|
|
43
|
+
weight: number;
|
|
44
|
+
}
|
|
45
|
+
interface PageIssue {
|
|
40
46
|
check: string;
|
|
41
47
|
label: string;
|
|
42
48
|
severity: 'error' | 'warning' | 'info';
|
|
43
49
|
}
|
|
44
|
-
interface PageReview
|
|
50
|
+
interface PageReview {
|
|
45
51
|
url: string;
|
|
46
52
|
title: string;
|
|
47
53
|
category: PageCategory$1;
|
|
48
54
|
wordCount: number;
|
|
49
|
-
issues: PageIssue
|
|
50
|
-
strengths: PageIssue
|
|
55
|
+
issues: PageIssue[];
|
|
56
|
+
strengths: PageIssue[];
|
|
57
|
+
aeoScore?: number;
|
|
58
|
+
criterionScores?: PageCriterionScore$1[];
|
|
51
59
|
}
|
|
52
60
|
interface AuditData {
|
|
53
61
|
site: string;
|
|
@@ -61,7 +69,7 @@ interface AuditData {
|
|
|
61
69
|
opportunities: Deliverable[];
|
|
62
70
|
pitchNumbers: PitchMetric[];
|
|
63
71
|
bottomLine: string;
|
|
64
|
-
pagesReviewed?: PageReview
|
|
72
|
+
pagesReviewed?: PageReview[];
|
|
65
73
|
}
|
|
66
74
|
type AuditStatus = 'pass' | 'fail' | 'partial' | 'not_found';
|
|
67
75
|
type Priority = 'P0' | 'P1' | 'P2' | 'P3';
|
|
@@ -109,6 +117,93 @@ interface AuditResult extends AuditData {
|
|
|
109
117
|
*/
|
|
110
118
|
declare function audit(domain: string, options?: AuditOptions): Promise<AuditResult>;
|
|
111
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Link graph analysis for full-site AEO audits.
|
|
122
|
+
* Builds an internal link graph, detects orphan pages, pillar pages,
|
|
123
|
+
* hub pages, and topic clusters from crawled page data.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
interface LinkEdge {
|
|
127
|
+
source: string;
|
|
128
|
+
target: string;
|
|
129
|
+
anchorText: string;
|
|
130
|
+
}
|
|
131
|
+
interface PageNode {
|
|
132
|
+
url: string;
|
|
133
|
+
title: string;
|
|
134
|
+
wordCount: number;
|
|
135
|
+
category: PageCategory;
|
|
136
|
+
inDegree: number;
|
|
137
|
+
outDegree: number;
|
|
138
|
+
depth: number;
|
|
139
|
+
isPillar: boolean;
|
|
140
|
+
isHub: boolean;
|
|
141
|
+
isOrphan: boolean;
|
|
142
|
+
}
|
|
143
|
+
interface TopicCluster {
|
|
144
|
+
pillarUrl: string;
|
|
145
|
+
pillarTitle: string;
|
|
146
|
+
spokes: string[];
|
|
147
|
+
cohesion: number;
|
|
148
|
+
}
|
|
149
|
+
interface LinkGraphStats {
|
|
150
|
+
totalPages: number;
|
|
151
|
+
totalEdges: number;
|
|
152
|
+
orphanPages: number;
|
|
153
|
+
pillarPages: number;
|
|
154
|
+
hubPages: number;
|
|
155
|
+
avgDepth: number;
|
|
156
|
+
maxDepth: number;
|
|
157
|
+
clusters: number;
|
|
158
|
+
}
|
|
159
|
+
interface LinkGraph {
|
|
160
|
+
nodes: Map<string, PageNode>;
|
|
161
|
+
edges: LinkEdge[];
|
|
162
|
+
stats: LinkGraphStats;
|
|
163
|
+
clusters: TopicCluster[];
|
|
164
|
+
}
|
|
165
|
+
interface SerializedLinkGraph {
|
|
166
|
+
nodes: PageNode[];
|
|
167
|
+
stats: LinkGraphStats;
|
|
168
|
+
clusters: TopicCluster[];
|
|
169
|
+
}
|
|
170
|
+
declare function serializeLinkGraph(graph: LinkGraph): SerializedLinkGraph;
|
|
171
|
+
/**
|
|
172
|
+
* Extract internal links from HTML with their anchor text.
|
|
173
|
+
* Similar to extractInternalLinks in full-site-crawler.ts but returns LinkEdge[].
|
|
174
|
+
*/
|
|
175
|
+
declare function extractLinksWithAnchors(html: string, sourceUrl: string, domain: string): LinkEdge[];
|
|
176
|
+
/**
|
|
177
|
+
* BFS from homepage to compute click depth for each node.
|
|
178
|
+
* Unreachable pages get Infinity.
|
|
179
|
+
*/
|
|
180
|
+
declare function calculateDepths(nodes: Map<string, PageNode>, adjacency: Map<string, Set<string>>, homepageUrl: string): void;
|
|
181
|
+
/**
|
|
182
|
+
* Detect pillar pages: long content with significant in/out linking.
|
|
183
|
+
* wordCount >= 1500 AND inDegree >= 3 AND outDegree >= 3
|
|
184
|
+
* AND category in blog/content/resources/docs AND not homepage (depth > 0).
|
|
185
|
+
*/
|
|
186
|
+
declare function detectPillars(nodes: Map<string, PageNode>): void;
|
|
187
|
+
/**
|
|
188
|
+
* Detect hub pages: high outDegree navigation/index pages.
|
|
189
|
+
* outDegree >= 10 with category homepage/resources/docs, OR outDegree >= 15.
|
|
190
|
+
*/
|
|
191
|
+
declare function detectHubs(nodes: Map<string, PageNode>): void;
|
|
192
|
+
/**
|
|
193
|
+
* Detect topic clusters around pillar pages.
|
|
194
|
+
* For each pillar, gather spokes (pages linked to/from pillar).
|
|
195
|
+
* Cohesion = actual edges between cluster members / possible edges.
|
|
196
|
+
* Minimum 2 spokes to form a cluster.
|
|
197
|
+
*/
|
|
198
|
+
declare function detectClusters(nodes: Map<string, PageNode>, edges: LinkEdge[]): TopicCluster[];
|
|
199
|
+
/**
|
|
200
|
+
* Build a link graph from crawled pages.
|
|
201
|
+
* @param pages - Array of FetchResult from full-site crawl
|
|
202
|
+
* @param domain - The site domain
|
|
203
|
+
* @param homepageUrl - Full URL of the homepage (e.g. https://example.com)
|
|
204
|
+
*/
|
|
205
|
+
declare function buildLinkGraph(pages: FetchResult[], domain: string, homepageUrl: string): LinkGraph;
|
|
206
|
+
|
|
112
207
|
interface CriterionResult {
|
|
113
208
|
criterion: string;
|
|
114
209
|
criterion_label: string;
|
|
@@ -147,6 +242,8 @@ interface SiteData {
|
|
|
147
242
|
skipped: number;
|
|
148
243
|
elapsed: number;
|
|
149
244
|
};
|
|
245
|
+
/** Link graph from full-site crawl */
|
|
246
|
+
linkGraph?: LinkGraph;
|
|
150
247
|
}
|
|
151
248
|
interface RawDataSummary {
|
|
152
249
|
domain: string;
|
|
@@ -260,22 +357,35 @@ declare function generateBottomLine(score: number, opportunities: Deliverable[],
|
|
|
260
357
|
* Runs 12 deterministic checks on each crawled page (no LLM).
|
|
261
358
|
*/
|
|
262
359
|
|
|
263
|
-
interface PageIssue {
|
|
264
|
-
check: string;
|
|
265
|
-
label: string;
|
|
266
|
-
severity: 'error' | 'warning' | 'info';
|
|
267
|
-
}
|
|
268
|
-
interface PageReview {
|
|
269
|
-
url: string;
|
|
270
|
-
title: string;
|
|
271
|
-
category: PageCategory;
|
|
272
|
-
wordCount: number;
|
|
273
|
-
issues: PageIssue[];
|
|
274
|
-
strengths: PageIssue[];
|
|
275
|
-
}
|
|
276
360
|
declare function analyzePage(html: string, url: string, category: PageCategory): PageReview;
|
|
277
361
|
declare function analyzeAllPages(siteData: SiteData): PageReview[];
|
|
278
362
|
|
|
363
|
+
/**
|
|
364
|
+
* Per-page AEO scoring.
|
|
365
|
+
* Evaluates 14 of 26 criteria that apply at individual page level.
|
|
366
|
+
* Produces a 0-100 AEO score per page.
|
|
367
|
+
*/
|
|
368
|
+
|
|
369
|
+
interface PageCriterionScore {
|
|
370
|
+
criterion: string;
|
|
371
|
+
criterion_label: string;
|
|
372
|
+
score: number;
|
|
373
|
+
weight: number;
|
|
374
|
+
}
|
|
375
|
+
interface PageScoreResult {
|
|
376
|
+
aeoScore: number;
|
|
377
|
+
criterionScores: PageCriterionScore[];
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Score a single page against 14 AEO criteria.
|
|
381
|
+
* Returns a 0-100 AEO score and individual criterion scores.
|
|
382
|
+
*/
|
|
383
|
+
declare function scorePage(html: string, url?: string): PageScoreResult;
|
|
384
|
+
/**
|
|
385
|
+
* Score all crawled pages (homepage + blogSample).
|
|
386
|
+
*/
|
|
387
|
+
declare function scoreAllPages(siteData: SiteData): PageScoreResult[];
|
|
388
|
+
|
|
279
389
|
/**
|
|
280
390
|
* Extended page discovery for instant audit.
|
|
281
391
|
* Fetches additional pages beyond what prefetchSiteData provides,
|
|
@@ -399,6 +509,58 @@ interface ParkedDomainResult {
|
|
|
399
509
|
*/
|
|
400
510
|
declare function detectParkedDomain(bodySnippet: string): ParkedDomainResult;
|
|
401
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Fix Plan Engine - generates actionable, phased fix plans from audit scores.
|
|
514
|
+
* Runs alongside the existing opportunities system (no breaking changes).
|
|
515
|
+
* Uses criterion scores, optional per-page data, and optional link graph
|
|
516
|
+
* to produce structured fix plans with code examples and dependency ordering.
|
|
517
|
+
*/
|
|
518
|
+
|
|
519
|
+
interface FixAction {
|
|
520
|
+
id: string;
|
|
521
|
+
criterion: string;
|
|
522
|
+
criterionId: string;
|
|
523
|
+
title: string;
|
|
524
|
+
description: string;
|
|
525
|
+
impact: 'critical' | 'high' | 'medium' | 'low';
|
|
526
|
+
effort: 'trivial' | 'low' | 'medium' | 'high';
|
|
527
|
+
impactScore: number;
|
|
528
|
+
category: 'content' | 'structure' | 'discovery' | 'trust';
|
|
529
|
+
steps: string[];
|
|
530
|
+
codeExample?: string;
|
|
531
|
+
successCriteria: string;
|
|
532
|
+
dependsOn?: string[];
|
|
533
|
+
affectedPages?: string[];
|
|
534
|
+
pageCount?: number;
|
|
535
|
+
}
|
|
536
|
+
interface FixPhase {
|
|
537
|
+
phase: number;
|
|
538
|
+
title: string;
|
|
539
|
+
description: string;
|
|
540
|
+
fixes: FixAction[];
|
|
541
|
+
estimatedImpact: number;
|
|
542
|
+
}
|
|
543
|
+
interface FixPlanSummary {
|
|
544
|
+
criticalCount: number;
|
|
545
|
+
highCount: number;
|
|
546
|
+
mediumCount: number;
|
|
547
|
+
lowCount: number;
|
|
548
|
+
quickWinCount: number;
|
|
549
|
+
topOpportunity: string;
|
|
550
|
+
estimatedTotalEffort: string;
|
|
551
|
+
}
|
|
552
|
+
interface FixPlan {
|
|
553
|
+
domain: string;
|
|
554
|
+
generatedAt: string;
|
|
555
|
+
overallScore: number;
|
|
556
|
+
projectedScore: number;
|
|
557
|
+
totalFixes: number;
|
|
558
|
+
phases: FixPhase[];
|
|
559
|
+
quickWins: FixAction[];
|
|
560
|
+
summary: FixPlanSummary;
|
|
561
|
+
}
|
|
562
|
+
declare function generateFixPlan(domain: string, overallScore: number, criteria: CriterionResult[], pagesReviewed?: PageReview[], linkGraph?: LinkGraph): FixPlan;
|
|
563
|
+
|
|
402
564
|
/**
|
|
403
565
|
* HTML report generator for AEORank audits.
|
|
404
566
|
* Produces self-contained HTML with inline CSS - zero external dependencies.
|
|
@@ -456,4 +618,4 @@ interface ComparisonResult {
|
|
|
456
618
|
*/
|
|
457
619
|
declare function compare(domainA: string, domainB: string, options?: AuditOptions): Promise<ComparisonResult>;
|
|
458
620
|
|
|
459
|
-
export { type AuditData, type AuditFinding, type AuditOptions, type AuditResult, type AuditStatus, CRITERION_LABELS, type ComparisonResult, type CrawlOptions, type CrawlResult, type CriterionComparison, type CriterionDetail, type CriterionResult, type Deliverable, type DetailedFinding, type FetchResult, type FindingSeverity, type FindingType, type HeadlessOptions, type ImpactLevel, type PageCategory$1 as PageCategory, type
|
|
621
|
+
export { type AuditData, type AuditFinding, type AuditOptions, type AuditResult, type AuditStatus, CRITERION_LABELS, type ComparisonResult, type CrawlOptions, type CrawlResult, type CriterionComparison, type CriterionDetail, type CriterionResult, type Deliverable, type DetailedFinding, type FetchResult, type FindingSeverity, type FindingType, type FixAction, type FixPhase, type FixPlan, type FixPlanSummary, type HeadlessOptions, type ImpactLevel, type LinkEdge, type LinkGraph, type LinkGraphStats, type PageCategory$1 as PageCategory, type PageCriterionScore$1 as PageCriterionScore, type PageIssue, type PageNode, type PageReview, type PageScoreResult, type ParkedDomainResult, type PitchMetric, type Priority, type RawDataSummary, type RenderingMethod, type ScoreCardItem, type SerializedLinkGraph, type Severity, type SiteData, type Status, type TopicCluster, analyzeAllPages, analyzePage, audit, auditSiteFromData, buildDetailedFindings, buildLinkGraph, buildScorecard, calculateDepths, calculateOverallScore, classifyRendering, compare, crawlFullSite, detectClusters, detectHubs, detectParkedDomain, detectPillars, extractAllUrlsFromSitemap, extractContentPagesFromSitemap, extractInternalLinks, extractLinksWithAnchors, extractNavLinks, extractRawDataSummary, fetchMultiPageData, fetchWithHeadless, generateBottomLine, generateComparisonHtmlReport, generateFixPlan, generateHtmlReport, generateOpportunities, generatePitchNumbers, generateVerdict, inferCategory, isSpaShell, prefetchSiteData, scoreAllPages, scorePage, scoreToStatus, serializeLinkGraph };
|