@drowlink/aeo-linter-core 0.1.0 → 0.1.3
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 +72 -0
- package/dist/__tests__/audit-contract.test.js +12 -13
- package/dist/__tests__/audit-contract.test.js.map +1 -1
- package/dist/__tests__/gatherers.test.js +11 -12
- package/dist/__tests__/gatherers.test.js.map +1 -1
- package/dist/__tests__/runner.test.js +12 -12
- package/dist/__tests__/runner.test.js.map +1 -1
- package/dist/audits/ai-accessibility/ai-bot-sitemap.d.ts +1 -1
- package/dist/audits/ai-accessibility/ai-bot-sitemap.js +6 -6
- package/dist/audits/ai-accessibility/ai-bot-sitemap.js.map +1 -1
- package/dist/audits/ai-accessibility/ai-robots-txt.d.ts +1 -1
- package/dist/audits/ai-accessibility/ai-robots-txt.d.ts.map +1 -1
- package/dist/audits/ai-accessibility/ai-robots-txt.js +11 -12
- package/dist/audits/ai-accessibility/ai-robots-txt.js.map +1 -1
- package/dist/audits/ai-accessibility/ai-x-robots-tag.d.ts +1 -1
- package/dist/audits/ai-accessibility/ai-x-robots-tag.js +8 -8
- package/dist/audits/ai-accessibility/ai-x-robots-tag.js.map +1 -1
- package/dist/audits/audit.d.ts +13 -13
- package/dist/audits/audit.js +14 -14
- package/dist/audits/audit.js.map +1 -1
- package/dist/audits/content-chunking/chunk-token-density.d.ts +1 -1
- package/dist/audits/content-chunking/chunk-token-density.js +12 -12
- package/dist/audits/content-chunking/chunk-token-density.js.map +1 -1
- package/dist/audits/content-chunking/heading-hierarchy.d.ts +1 -1
- package/dist/audits/content-chunking/heading-hierarchy.js +13 -13
- package/dist/audits/content-chunking/heading-hierarchy.js.map +1 -1
- package/dist/audits/content-chunking/semantic-containers.d.ts +1 -1
- package/dist/audits/content-chunking/semantic-containers.js +7 -7
- package/dist/audits/content-chunking/semantic-containers.js.map +1 -1
- package/dist/audits/direct-answer-density/concise-answer-wordcount.d.ts +1 -1
- package/dist/audits/direct-answer-density/concise-answer-wordcount.js +11 -11
- package/dist/audits/direct-answer-density/concise-answer-wordcount.js.map +1 -1
- package/dist/audits/direct-answer-density/direct-definition-answering.d.ts +1 -1
- package/dist/audits/direct-answer-density/direct-definition-answering.js +12 -12
- package/dist/audits/direct-answer-density/direct-definition-answering.js.map +1 -1
- package/dist/audits/direct-answer-density/question-heading-alignment.d.ts +1 -1
- package/dist/audits/direct-answer-density/question-heading-alignment.js +7 -7
- package/dist/audits/direct-answer-density/question-heading-alignment.js.map +1 -1
- package/dist/audits/index.d.ts +1 -1
- package/dist/audits/index.js +1 -1
- package/dist/audits/structured-data/entity-sameas-links.d.ts +1 -1
- package/dist/audits/structured-data/entity-sameas-links.js +11 -11
- package/dist/audits/structured-data/entity-sameas-links.js.map +1 -1
- package/dist/audits/structured-data/jsonld-syntax-validity.d.ts +1 -1
- package/dist/audits/structured-data/jsonld-syntax-validity.js +12 -12
- package/dist/audits/structured-data/jsonld-syntax-validity.js.map +1 -1
- package/dist/audits/structured-data/rag-schema-presence.d.ts +1 -1
- package/dist/audits/structured-data/rag-schema-presence.js +13 -13
- package/dist/audits/structured-data/rag-schema-presence.js.map +1 -1
- package/dist/config/default-config.d.ts +2 -2
- package/dist/config/default-config.js +6 -6
- package/dist/config/default-config.js.map +1 -1
- package/dist/gather/driver/cheerio-driver.d.ts +1 -1
- package/dist/gather/driver/cheerio-driver.js +4 -4
- package/dist/gather/driver/cheerio-driver.js.map +1 -1
- package/dist/gather/gatherers/content-chunks-gatherer.d.ts +1 -1
- package/dist/gather/gatherers/content-chunks-gatherer.d.ts.map +1 -1
- package/dist/gather/gatherers/content-chunks-gatherer.js +4 -6
- package/dist/gather/gatherers/content-chunks-gatherer.js.map +1 -1
- package/dist/gather/gatherers/direct-answers-gatherer.d.ts +1 -1
- package/dist/gather/gatherers/direct-answers-gatherer.d.ts.map +1 -1
- package/dist/gather/gatherers/direct-answers-gatherer.js +4 -5
- package/dist/gather/gatherers/direct-answers-gatherer.js.map +1 -1
- package/dist/gather/gatherers/headings-hierarchy-gatherer.d.ts +1 -1
- package/dist/gather/gatherers/headings-hierarchy-gatherer.js +2 -2
- package/dist/gather/gatherers/headings-hierarchy-gatherer.js.map +1 -1
- package/dist/gather/gatherers/robots-txt-gatherer.d.ts +1 -1
- package/dist/gather/gatherers/robots-txt-gatherer.d.ts.map +1 -1
- package/dist/gather/gatherers/robots-txt-gatherer.js +2 -4
- package/dist/gather/gatherers/robots-txt-gatherer.js.map +1 -1
- package/dist/report/html-reporter.d.ts +2 -2
- package/dist/report/html-reporter.js +9 -9
- package/dist/report/html-reporter.js.map +1 -1
- package/dist/report/terminal-reporter.d.ts +1 -1
- package/dist/report/terminal-reporter.js +3 -3
- package/dist/report/terminal-reporter.js.map +1 -1
- package/dist/runner/aggregator.d.ts +3 -3
- package/dist/runner/aggregator.js +5 -5
- package/dist/runner/aggregator.js.map +1 -1
- package/dist/runner/runner.d.ts +7 -7
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +17 -18
- package/dist/runner/runner.js.map +1 -1
- package/dist/types/artifacts.d.ts +19 -21
- package/dist/types/artifacts.d.ts.map +1 -1
- package/dist/types/artifacts.js +3 -3
- package/dist/types/audit.d.ts +29 -29
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +2 -2
- package/dist/types/config.d.ts +21 -21
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +1 -1
- package/dist/types/gatherer.d.ts +6 -6
- package/dist/types/gatherer.d.ts.map +1 -1
- package/dist/types/gatherer.js +1 -1
- package/package.json +3 -2
package/dist/types/audit.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
*
|
|
2
|
+
* @fileoverview Types and contracts for audits, results, and structured details.
|
|
3
|
+
* Modeled after the Google Lighthouse result structure.
|
|
4
4
|
*/
|
|
5
5
|
import type { Artifacts } from './artifacts.js';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Score display presentation mode
|
|
8
8
|
*/
|
|
9
9
|
export type ScoreDisplayMode = 'binary' | 'numeric' | 'informative' | 'notApplicable' | 'error' | 'manual';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Table column heading
|
|
12
12
|
*/
|
|
13
13
|
export interface TableHeading {
|
|
14
14
|
key: string;
|
|
@@ -20,7 +20,7 @@ export interface TableHeading {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Tabular details for itemized findings
|
|
24
24
|
*/
|
|
25
25
|
export interface TableDetails {
|
|
26
26
|
type: 'table';
|
|
@@ -34,7 +34,7 @@ export interface TableDetails {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* List details for simple findings
|
|
38
38
|
*/
|
|
39
39
|
export interface ListDetails {
|
|
40
40
|
type: 'list';
|
|
@@ -44,14 +44,14 @@ export interface ListDetails {
|
|
|
44
44
|
}>;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Debug details for raw inspection
|
|
48
48
|
*/
|
|
49
49
|
export interface DebugDataDetails {
|
|
50
50
|
type: 'debugdata';
|
|
51
51
|
data: Record<string, unknown>;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Opportunity details for potential gains
|
|
55
55
|
*/
|
|
56
56
|
export interface OpportunityDetails {
|
|
57
57
|
type: 'opportunity';
|
|
@@ -60,55 +60,55 @@ export interface OpportunityDetails {
|
|
|
60
60
|
potentialGain?: string;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Union of supported audit detail formats
|
|
64
64
|
*/
|
|
65
65
|
export type AuditDetails = TableDetails | ListDetails | DebugDataDetails | OpportunityDetails;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* Standard audit result object
|
|
68
68
|
*/
|
|
69
69
|
export interface AuditResult {
|
|
70
|
-
/**
|
|
70
|
+
/** Unique audit ID (e.g. 'ai-robots-txt') */
|
|
71
71
|
id: string;
|
|
72
|
-
/**
|
|
72
|
+
/** Normalized score between 0 and 1 (or null if notApplicable / informative) */
|
|
73
73
|
score: number | null;
|
|
74
|
-
/**
|
|
74
|
+
/** Presentation mode */
|
|
75
75
|
scoreDisplayMode: ScoreDisplayMode;
|
|
76
|
-
/**
|
|
76
|
+
/** Descriptive title */
|
|
77
77
|
title: string;
|
|
78
|
-
/**
|
|
78
|
+
/** Detailed description of importance for AEO */
|
|
79
79
|
description: string;
|
|
80
|
-
/**
|
|
80
|
+
/** Raw numeric metric value */
|
|
81
81
|
numericValue?: number;
|
|
82
|
-
/**
|
|
82
|
+
/** Numeric metric unit (e.g. 'words', 'ms', 'items', '%') */
|
|
83
83
|
numericUnit?: string;
|
|
84
|
-
/**
|
|
84
|
+
/** Formatted display string */
|
|
85
85
|
displayValue?: string;
|
|
86
|
-
/**
|
|
86
|
+
/** Diagnostic reason / explanation */
|
|
87
87
|
explanation?: string;
|
|
88
|
-
/**
|
|
88
|
+
/** Error message if execution failed */
|
|
89
89
|
errorMessage?: string;
|
|
90
|
-
/**
|
|
90
|
+
/** Structured details for UI/CLI */
|
|
91
91
|
details?: AuditDetails;
|
|
92
|
-
/**
|
|
92
|
+
/** Optional informational warnings */
|
|
93
93
|
warnings?: string[];
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* Static metadata required by each audit definition
|
|
97
97
|
*/
|
|
98
98
|
export interface AuditMeta {
|
|
99
|
-
/**
|
|
99
|
+
/** Unique audit ID */
|
|
100
100
|
id: string;
|
|
101
|
-
/**
|
|
101
|
+
/** Title when passing or neutral */
|
|
102
102
|
title: string;
|
|
103
|
-
/**
|
|
103
|
+
/** Title when failing */
|
|
104
104
|
failureTitle?: string;
|
|
105
|
-
/**
|
|
105
|
+
/** Markdown description and documentation links */
|
|
106
106
|
description: string;
|
|
107
|
-
/**
|
|
107
|
+
/** Required artifacts for this audit */
|
|
108
108
|
requiredArtifacts: Array<keyof Artifacts>;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* Execution context passed to audit function
|
|
112
112
|
*/
|
|
113
113
|
export interface AuditContext {
|
|
114
114
|
options?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,SAAS,GACT,aAAa,GACb,eAAe,GACf,OAAO,GACP,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ,CAAC;IAC5E,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH;AAED;;GAEG;AACH,MA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verview Types and contracts for audits, results, and structured details.
|
|
3
|
+
* Modeled after the Google Lighthouse result structure.
|
|
4
4
|
*/
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=audit.js.map
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
2
|
+
* @fileoverview Configuration, category, and weighted score types.
|
|
3
3
|
*/
|
|
4
4
|
import type { AuditMeta } from './audit.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Reference to an audit inside a category with its specific weight
|
|
7
7
|
*/
|
|
8
8
|
export interface AuditRef {
|
|
9
|
-
/**
|
|
9
|
+
/** Audit unique ID */
|
|
10
10
|
id: string;
|
|
11
|
-
/**
|
|
11
|
+
/** Relative weight of the audit in category */
|
|
12
12
|
weight: number;
|
|
13
|
-
/**
|
|
13
|
+
/** Optional visual group */
|
|
14
14
|
group?: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Category grouping thematic audits
|
|
18
18
|
*/
|
|
19
19
|
export interface CategoryConfig {
|
|
20
|
-
/**
|
|
20
|
+
/** Category title */
|
|
21
21
|
title: string;
|
|
22
|
-
/**
|
|
22
|
+
/** Category description */
|
|
23
23
|
description: string;
|
|
24
|
-
/**
|
|
24
|
+
/** Weighted audits belonging to this category */
|
|
25
25
|
auditRefs: AuditRef[];
|
|
26
|
-
/**
|
|
26
|
+
/** Global weight of the category */
|
|
27
27
|
weight?: number;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Complete linter configuration
|
|
31
31
|
*/
|
|
32
32
|
export interface LinterConfig {
|
|
33
|
-
/**
|
|
33
|
+
/** Categories mapping */
|
|
34
34
|
categories: Record<string, CategoryConfig>;
|
|
35
|
-
/**
|
|
35
|
+
/** Registered audit IDs or Metas */
|
|
36
36
|
audits?: Array<string | AuditMeta>;
|
|
37
|
-
/**
|
|
37
|
+
/** Global settings */
|
|
38
38
|
settings?: {
|
|
39
39
|
locale?: string;
|
|
40
40
|
maxWaitForFulfill?: number;
|
|
@@ -43,32 +43,32 @@ export interface LinterConfig {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Evaluated category result with weighted score
|
|
47
47
|
*/
|
|
48
48
|
export interface CategoryResult {
|
|
49
49
|
id: string;
|
|
50
50
|
title: string;
|
|
51
51
|
description: string;
|
|
52
|
-
/**
|
|
52
|
+
/** Category weighted score (0 - 1) */
|
|
53
53
|
score: number | null;
|
|
54
|
-
/**
|
|
54
|
+
/** Audits evaluated in this category */
|
|
55
55
|
auditRefs: Array<AuditRef & {
|
|
56
56
|
result: import('./audit.js').AuditResult;
|
|
57
57
|
}>;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Complete AEO audit report result
|
|
61
61
|
*/
|
|
62
62
|
export interface AeoReportResult {
|
|
63
63
|
url: string;
|
|
64
64
|
fetchTime: string;
|
|
65
65
|
aeoVersion: string;
|
|
66
66
|
userAgent: string;
|
|
67
|
-
/**
|
|
67
|
+
/** Aggregated overall score (0 - 100) */
|
|
68
68
|
overallScore: number;
|
|
69
|
-
/**
|
|
69
|
+
/** Category results map */
|
|
70
70
|
categories: Record<string, CategoryResult>;
|
|
71
|
-
/**
|
|
71
|
+
/** Direct audit results map */
|
|
72
72
|
audits: Record<string, import('./audit.js').AuditResult>;
|
|
73
73
|
}
|
|
74
74
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","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C3E;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,YAAY,EAAE,WAAW,CAAC,CAAC;CAC1D"}
|
package/dist/types/config.js
CHANGED
package/dist/types/gatherer.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
2
|
+
* @fileoverview Types and contracts for Gatherers phase.
|
|
3
3
|
*/
|
|
4
4
|
import type { Artifacts } from './artifacts.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Abstract driver or protocol adapter to extract DOM/network information
|
|
7
7
|
*/
|
|
8
8
|
export interface Driver {
|
|
9
9
|
evaluate<T>(script: string | (() => T)): Promise<T>;
|
|
@@ -13,7 +13,7 @@ export interface Driver {
|
|
|
13
13
|
getHttpHeaders(): Promise<Record<string, string | string[]>>;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Context passed to each Gatherer
|
|
17
17
|
*/
|
|
18
18
|
export interface GathererContext {
|
|
19
19
|
url: string;
|
|
@@ -21,12 +21,12 @@ export interface GathererContext {
|
|
|
21
21
|
settings?: Record<string, unknown>;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Gatherer base interface
|
|
25
25
|
*/
|
|
26
26
|
export interface IGatherer<K extends keyof Artifacts = keyof Artifacts> {
|
|
27
|
-
/**
|
|
27
|
+
/** Name of the artifact produced */
|
|
28
28
|
name: K;
|
|
29
|
-
/**
|
|
29
|
+
/** Extraction method */
|
|
30
30
|
getArtifact(context: GathererContext): Promise<Artifacts[K]>;
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=gatherer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatherer.d.ts","sourceRoot":"","sources":["../../src/types/gatherer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACpD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1D,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3B,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS;IACpE,
|
|
1
|
+
{"version":3,"file":"gatherer.d.ts","sourceRoot":"","sources":["../../src/types/gatherer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACpD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1D,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3B,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS;IACpE,oCAAoC;IACpC,IAAI,EAAE,CAAC,CAAC;IACR,wBAAwB;IACxB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9D"}
|
package/dist/types/gatherer.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drowlink/aeo-linter-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Core engine and audit pipeline for AEO/GEO linter (Lighthouse architecture)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"prepublishOnly": "npm run build"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
|
-
"dist"
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md"
|
|
30
31
|
],
|
|
31
32
|
"repository": {
|
|
32
33
|
"type": "git",
|