@consilioweb/payload-seo-analyzer 1.7.1 → 1.8.1
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 +1429 -156
- package/dist/index.d.cts +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +1430 -157
- 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,17 @@ 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;
|
|
171
|
+
/**
|
|
172
|
+
* Background cache warm-up on init + hourly (pre-loads collection data). Enabled by
|
|
173
|
+
* default. Set to `false` on low-memory hosting to avoid loading all documents at startup.
|
|
174
|
+
*/
|
|
175
|
+
warmCache?: boolean;
|
|
140
176
|
/** Duplicate content detection (endpoint) */
|
|
141
177
|
duplicateContent?: boolean;
|
|
142
178
|
/** Settings view (/admin/seo-config) */
|
|
@@ -817,6 +853,9 @@ interface DashboardTranslations {
|
|
|
817
853
|
groupTechnical: string;
|
|
818
854
|
groupAccessibility: string;
|
|
819
855
|
groupEcommerce: string;
|
|
856
|
+
groupEeat: string;
|
|
857
|
+
groupGeo: string;
|
|
858
|
+
groupHreflang: string;
|
|
820
859
|
levelExcellent: string;
|
|
821
860
|
levelGood: string;
|
|
822
861
|
levelFair: string;
|
|
@@ -825,6 +864,8 @@ interface DashboardTranslations {
|
|
|
825
864
|
categoryImportant: string;
|
|
826
865
|
categoryBonus: string;
|
|
827
866
|
seoScore: string;
|
|
867
|
+
aiReadiness: string;
|
|
868
|
+
aiReadinessTooltip: string;
|
|
828
869
|
outOf100: string;
|
|
829
870
|
cornerstoneLabel: string;
|
|
830
871
|
checksPassed: string;
|
|
@@ -1358,6 +1399,12 @@ declare const MIN_WORDS_GENERIC = 300;
|
|
|
1358
1399
|
declare const MIN_WORDS_THIN = 100;
|
|
1359
1400
|
declare const KEYWORD_DENSITY_MAX = 3;
|
|
1360
1401
|
declare const KEYWORD_DENSITY_WARN = 2.5;
|
|
1402
|
+
/**
|
|
1403
|
+
* @deprecated SEO desintox (2026): keyword density is not a ranking factor, and a
|
|
1404
|
+
* minimum-density floor actively pushes toward keyword stuffing (penalised by
|
|
1405
|
+
* Google spam policies). No longer used for scoring — the density check now only
|
|
1406
|
+
* flags OVER-optimisation. Kept exported for backward compatibility.
|
|
1407
|
+
*/
|
|
1361
1408
|
declare const KEYWORD_DENSITY_MIN = 0.5;
|
|
1362
1409
|
declare const MAX_RECURSION_DEPTH = 50;
|
|
1363
1410
|
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,17 @@ 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;
|
|
171
|
+
/**
|
|
172
|
+
* Background cache warm-up on init + hourly (pre-loads collection data). Enabled by
|
|
173
|
+
* default. Set to `false` on low-memory hosting to avoid loading all documents at startup.
|
|
174
|
+
*/
|
|
175
|
+
warmCache?: boolean;
|
|
140
176
|
/** Duplicate content detection (endpoint) */
|
|
141
177
|
duplicateContent?: boolean;
|
|
142
178
|
/** Settings view (/admin/seo-config) */
|
|
@@ -817,6 +853,9 @@ interface DashboardTranslations {
|
|
|
817
853
|
groupTechnical: string;
|
|
818
854
|
groupAccessibility: string;
|
|
819
855
|
groupEcommerce: string;
|
|
856
|
+
groupEeat: string;
|
|
857
|
+
groupGeo: string;
|
|
858
|
+
groupHreflang: string;
|
|
820
859
|
levelExcellent: string;
|
|
821
860
|
levelGood: string;
|
|
822
861
|
levelFair: string;
|
|
@@ -825,6 +864,8 @@ interface DashboardTranslations {
|
|
|
825
864
|
categoryImportant: string;
|
|
826
865
|
categoryBonus: string;
|
|
827
866
|
seoScore: string;
|
|
867
|
+
aiReadiness: string;
|
|
868
|
+
aiReadinessTooltip: string;
|
|
828
869
|
outOf100: string;
|
|
829
870
|
cornerstoneLabel: string;
|
|
830
871
|
checksPassed: string;
|
|
@@ -1358,6 +1399,12 @@ declare const MIN_WORDS_GENERIC = 300;
|
|
|
1358
1399
|
declare const MIN_WORDS_THIN = 100;
|
|
1359
1400
|
declare const KEYWORD_DENSITY_MAX = 3;
|
|
1360
1401
|
declare const KEYWORD_DENSITY_WARN = 2.5;
|
|
1402
|
+
/**
|
|
1403
|
+
* @deprecated SEO desintox (2026): keyword density is not a ranking factor, and a
|
|
1404
|
+
* minimum-density floor actively pushes toward keyword stuffing (penalised by
|
|
1405
|
+
* Google spam policies). No longer used for scoring — the density check now only
|
|
1406
|
+
* flags OVER-optimisation. Kept exported for backward compatibility.
|
|
1407
|
+
*/
|
|
1361
1408
|
declare const KEYWORD_DENSITY_MIN = 0.5;
|
|
1362
1409
|
declare const MAX_RECURSION_DEPTH = 50;
|
|
1363
1410
|
declare const SCORE_EXCELLENT = 91;
|