@consilioweb/payload-seo-analyzer 1.7.1 → 1.8.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 +47 -8
- package/dist/client.cjs +1179 -193
- package/dist/client.js +1179 -193
- package/dist/index.cjs +1378 -133
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +1379 -134
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ import { Field, Plugin, Payload, PayloadHandler, CollectionConfig, CollectionAft
|
|
|
7
7
|
type CheckStatus = 'pass' | 'warning' | 'fail';
|
|
8
8
|
type CheckCategory = 'critical' | 'important' | 'bonus';
|
|
9
9
|
/** Rule group label — used by the UI to group checks by topic */
|
|
10
|
-
type RuleGroup = 'title' | 'meta-description' | 'url' | 'headings' | 'content' | 'images' | 'linking' | 'social' | 'schema' | 'readability' | 'quality' | 'secondary-keywords' | 'cornerstone' | 'freshness' | 'technical' | 'accessibility' | 'ecommerce';
|
|
10
|
+
type RuleGroup = 'title' | 'meta-description' | 'url' | 'headings' | 'content' | 'images' | 'linking' | 'social' | 'schema' | 'readability' | 'quality' | 'secondary-keywords' | 'cornerstone' | 'freshness' | 'technical' | 'accessibility' | 'ecommerce' | 'eeat' | 'geo' | 'hreflang';
|
|
11
11
|
interface SeoCheck {
|
|
12
12
|
id: string;
|
|
13
13
|
label: string;
|
|
@@ -25,6 +25,18 @@ interface SeoAnalysis {
|
|
|
25
25
|
score: number;
|
|
26
26
|
level: SeoLevel;
|
|
27
27
|
checks: SeoCheck[];
|
|
28
|
+
/**
|
|
29
|
+
* Separate "AI-readiness" indicator (SEO 2026) — how well the page is structured to be
|
|
30
|
+
* CITED by generative engines (AI Overviews, ChatGPT, Perplexity). Aggregated from the
|
|
31
|
+
* `geo` + `eeat` groups and the `schema-coverage` check. Distinct from the SEO `score`
|
|
32
|
+
* because ranking and AI-citation are governed by different signals.
|
|
33
|
+
*/
|
|
34
|
+
aiReadiness?: {
|
|
35
|
+
score: number;
|
|
36
|
+
level: SeoLevel;
|
|
37
|
+
/** Number of checks contributing to this indicator */
|
|
38
|
+
checkCount: number;
|
|
39
|
+
};
|
|
28
40
|
}
|
|
29
41
|
interface SeoInput {
|
|
30
42
|
metaTitle?: string;
|
|
@@ -49,8 +61,21 @@ interface SeoInput {
|
|
|
49
61
|
isCornerstone?: boolean;
|
|
50
62
|
/** ISO date string — last time the document was updated */
|
|
51
63
|
updatedAt?: string;
|
|
64
|
+
/** ISO date string — when the content was first published (E-E-A-T datePublished) */
|
|
65
|
+
publishedAt?: string;
|
|
52
66
|
/** ISO date string — last time the content was manually reviewed */
|
|
53
67
|
contentLastReviewed?: string;
|
|
68
|
+
/** Display/published date shown to readers (used to detect fake "refresh" — date changed without real updatedAt change) */
|
|
69
|
+
displayedDate?: string;
|
|
70
|
+
/** Attributed author name (E-E-A-T) — empty/undefined if none */
|
|
71
|
+
author?: string;
|
|
72
|
+
/** Author profile URL or sameAs link (E-E-A-T entity signal) */
|
|
73
|
+
authorUrl?: string;
|
|
74
|
+
/** Locale alternates for hreflang validation — empty/undefined on mono-locale sites */
|
|
75
|
+
localeAlternates?: Array<{
|
|
76
|
+
hreflang: string;
|
|
77
|
+
href: string;
|
|
78
|
+
}>;
|
|
54
79
|
/** Canonical URL for this page (if explicitly set) */
|
|
55
80
|
canonicalUrl?: string;
|
|
56
81
|
/** Robots meta directives (e.g. 'noindex', 'nofollow', 'noindex, nofollow') */
|
|
@@ -137,6 +162,12 @@ interface SeoFeatures {
|
|
|
137
162
|
externalLinks?: boolean;
|
|
138
163
|
/** AI content generation/rewrite (endpoints) */
|
|
139
164
|
aiFeatures?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Google Search Console API via OAuth (opt-in, default false). Requires host setup:
|
|
167
|
+
* a Google Cloud OAuth client (GSC_OAUTH_CLIENT_ID/SECRET), the Search Console API
|
|
168
|
+
* enabled, the redirect URI registered, and ideally SEO_GSC_ENCRYPTION_KEY for token-at-rest.
|
|
169
|
+
*/
|
|
170
|
+
gscApi?: boolean;
|
|
140
171
|
/** Duplicate content detection (endpoint) */
|
|
141
172
|
duplicateContent?: boolean;
|
|
142
173
|
/** Settings view (/admin/seo-config) */
|
|
@@ -817,6 +848,9 @@ interface DashboardTranslations {
|
|
|
817
848
|
groupTechnical: string;
|
|
818
849
|
groupAccessibility: string;
|
|
819
850
|
groupEcommerce: string;
|
|
851
|
+
groupEeat: string;
|
|
852
|
+
groupGeo: string;
|
|
853
|
+
groupHreflang: string;
|
|
820
854
|
levelExcellent: string;
|
|
821
855
|
levelGood: string;
|
|
822
856
|
levelFair: string;
|
|
@@ -825,6 +859,8 @@ interface DashboardTranslations {
|
|
|
825
859
|
categoryImportant: string;
|
|
826
860
|
categoryBonus: string;
|
|
827
861
|
seoScore: string;
|
|
862
|
+
aiReadiness: string;
|
|
863
|
+
aiReadinessTooltip: string;
|
|
828
864
|
outOf100: string;
|
|
829
865
|
cornerstoneLabel: string;
|
|
830
866
|
checksPassed: string;
|
|
@@ -1358,6 +1394,12 @@ declare const MIN_WORDS_GENERIC = 300;
|
|
|
1358
1394
|
declare const MIN_WORDS_THIN = 100;
|
|
1359
1395
|
declare const KEYWORD_DENSITY_MAX = 3;
|
|
1360
1396
|
declare const KEYWORD_DENSITY_WARN = 2.5;
|
|
1397
|
+
/**
|
|
1398
|
+
* @deprecated SEO desintox (2026): keyword density is not a ranking factor, and a
|
|
1399
|
+
* minimum-density floor actively pushes toward keyword stuffing (penalised by
|
|
1400
|
+
* Google spam policies). No longer used for scoring — the density check now only
|
|
1401
|
+
* flags OVER-optimisation. Kept exported for backward compatibility.
|
|
1402
|
+
*/
|
|
1361
1403
|
declare const KEYWORD_DENSITY_MIN = 0.5;
|
|
1362
1404
|
declare const MAX_RECURSION_DEPTH = 50;
|
|
1363
1405
|
declare const SCORE_EXCELLENT = 91;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Field, Plugin, Payload, PayloadHandler, CollectionConfig, CollectionAft
|
|
|
7
7
|
type CheckStatus = 'pass' | 'warning' | 'fail';
|
|
8
8
|
type CheckCategory = 'critical' | 'important' | 'bonus';
|
|
9
9
|
/** Rule group label — used by the UI to group checks by topic */
|
|
10
|
-
type RuleGroup = 'title' | 'meta-description' | 'url' | 'headings' | 'content' | 'images' | 'linking' | 'social' | 'schema' | 'readability' | 'quality' | 'secondary-keywords' | 'cornerstone' | 'freshness' | 'technical' | 'accessibility' | 'ecommerce';
|
|
10
|
+
type RuleGroup = 'title' | 'meta-description' | 'url' | 'headings' | 'content' | 'images' | 'linking' | 'social' | 'schema' | 'readability' | 'quality' | 'secondary-keywords' | 'cornerstone' | 'freshness' | 'technical' | 'accessibility' | 'ecommerce' | 'eeat' | 'geo' | 'hreflang';
|
|
11
11
|
interface SeoCheck {
|
|
12
12
|
id: string;
|
|
13
13
|
label: string;
|
|
@@ -25,6 +25,18 @@ interface SeoAnalysis {
|
|
|
25
25
|
score: number;
|
|
26
26
|
level: SeoLevel;
|
|
27
27
|
checks: SeoCheck[];
|
|
28
|
+
/**
|
|
29
|
+
* Separate "AI-readiness" indicator (SEO 2026) — how well the page is structured to be
|
|
30
|
+
* CITED by generative engines (AI Overviews, ChatGPT, Perplexity). Aggregated from the
|
|
31
|
+
* `geo` + `eeat` groups and the `schema-coverage` check. Distinct from the SEO `score`
|
|
32
|
+
* because ranking and AI-citation are governed by different signals.
|
|
33
|
+
*/
|
|
34
|
+
aiReadiness?: {
|
|
35
|
+
score: number;
|
|
36
|
+
level: SeoLevel;
|
|
37
|
+
/** Number of checks contributing to this indicator */
|
|
38
|
+
checkCount: number;
|
|
39
|
+
};
|
|
28
40
|
}
|
|
29
41
|
interface SeoInput {
|
|
30
42
|
metaTitle?: string;
|
|
@@ -49,8 +61,21 @@ interface SeoInput {
|
|
|
49
61
|
isCornerstone?: boolean;
|
|
50
62
|
/** ISO date string — last time the document was updated */
|
|
51
63
|
updatedAt?: string;
|
|
64
|
+
/** ISO date string — when the content was first published (E-E-A-T datePublished) */
|
|
65
|
+
publishedAt?: string;
|
|
52
66
|
/** ISO date string — last time the content was manually reviewed */
|
|
53
67
|
contentLastReviewed?: string;
|
|
68
|
+
/** Display/published date shown to readers (used to detect fake "refresh" — date changed without real updatedAt change) */
|
|
69
|
+
displayedDate?: string;
|
|
70
|
+
/** Attributed author name (E-E-A-T) — empty/undefined if none */
|
|
71
|
+
author?: string;
|
|
72
|
+
/** Author profile URL or sameAs link (E-E-A-T entity signal) */
|
|
73
|
+
authorUrl?: string;
|
|
74
|
+
/** Locale alternates for hreflang validation — empty/undefined on mono-locale sites */
|
|
75
|
+
localeAlternates?: Array<{
|
|
76
|
+
hreflang: string;
|
|
77
|
+
href: string;
|
|
78
|
+
}>;
|
|
54
79
|
/** Canonical URL for this page (if explicitly set) */
|
|
55
80
|
canonicalUrl?: string;
|
|
56
81
|
/** Robots meta directives (e.g. 'noindex', 'nofollow', 'noindex, nofollow') */
|
|
@@ -137,6 +162,12 @@ interface SeoFeatures {
|
|
|
137
162
|
externalLinks?: boolean;
|
|
138
163
|
/** AI content generation/rewrite (endpoints) */
|
|
139
164
|
aiFeatures?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Google Search Console API via OAuth (opt-in, default false). Requires host setup:
|
|
167
|
+
* a Google Cloud OAuth client (GSC_OAUTH_CLIENT_ID/SECRET), the Search Console API
|
|
168
|
+
* enabled, the redirect URI registered, and ideally SEO_GSC_ENCRYPTION_KEY for token-at-rest.
|
|
169
|
+
*/
|
|
170
|
+
gscApi?: boolean;
|
|
140
171
|
/** Duplicate content detection (endpoint) */
|
|
141
172
|
duplicateContent?: boolean;
|
|
142
173
|
/** Settings view (/admin/seo-config) */
|
|
@@ -817,6 +848,9 @@ interface DashboardTranslations {
|
|
|
817
848
|
groupTechnical: string;
|
|
818
849
|
groupAccessibility: string;
|
|
819
850
|
groupEcommerce: string;
|
|
851
|
+
groupEeat: string;
|
|
852
|
+
groupGeo: string;
|
|
853
|
+
groupHreflang: string;
|
|
820
854
|
levelExcellent: string;
|
|
821
855
|
levelGood: string;
|
|
822
856
|
levelFair: string;
|
|
@@ -825,6 +859,8 @@ interface DashboardTranslations {
|
|
|
825
859
|
categoryImportant: string;
|
|
826
860
|
categoryBonus: string;
|
|
827
861
|
seoScore: string;
|
|
862
|
+
aiReadiness: string;
|
|
863
|
+
aiReadinessTooltip: string;
|
|
828
864
|
outOf100: string;
|
|
829
865
|
cornerstoneLabel: string;
|
|
830
866
|
checksPassed: string;
|
|
@@ -1358,6 +1394,12 @@ declare const MIN_WORDS_GENERIC = 300;
|
|
|
1358
1394
|
declare const MIN_WORDS_THIN = 100;
|
|
1359
1395
|
declare const KEYWORD_DENSITY_MAX = 3;
|
|
1360
1396
|
declare const KEYWORD_DENSITY_WARN = 2.5;
|
|
1397
|
+
/**
|
|
1398
|
+
* @deprecated SEO desintox (2026): keyword density is not a ranking factor, and a
|
|
1399
|
+
* minimum-density floor actively pushes toward keyword stuffing (penalised by
|
|
1400
|
+
* Google spam policies). No longer used for scoring — the density check now only
|
|
1401
|
+
* flags OVER-optimisation. Kept exported for backward compatibility.
|
|
1402
|
+
*/
|
|
1361
1403
|
declare const KEYWORD_DENSITY_MIN = 0.5;
|
|
1362
1404
|
declare const MAX_RECURSION_DEPTH = 50;
|
|
1363
1405
|
declare const SCORE_EXCELLENT = 91;
|