@consilioweb/payload-seo-analyzer 1.17.0 → 1.17.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/dist/client.cjs CHANGED
@@ -17135,6 +17135,10 @@ function GscPanel({ locale }) {
17135
17135
  setError(null);
17136
17136
  try {
17137
17137
  const res = await fetch("/api/seo-plugin/gsc/status", { credentials: "include" });
17138
+ if (res.status === 404) {
17139
+ setStatus({ configured: false, connected: false, connectedEmail: null, connectedAt: null, propertyUrl: null, redirectUri: null });
17140
+ return;
17141
+ }
17138
17142
  const json = await res.json();
17139
17143
  if (!res.ok) setError(json.error || `Error ${res.status}`);
17140
17144
  else setStatus(json);
@@ -17340,7 +17344,7 @@ function RankTrackingPanel({ locale }) {
17340
17344
  setError(null);
17341
17345
  try {
17342
17346
  const res = await fetch("/api/seo-plugin/rank-history", { credentials: "include", cache: "no-store" });
17343
- if (res.status === 403 || res.status === 409) {
17347
+ if (res.status === 404 || res.status === 403 || res.status === 409) {
17344
17348
  setNotConnected(true);
17345
17349
  setMovers(null);
17346
17350
  return;
@@ -17517,7 +17521,7 @@ function CtrOpportunitiesPanel({ locale }) {
17517
17521
  setError(null);
17518
17522
  try {
17519
17523
  const res = await fetch("/api/seo-plugin/ctr-opportunities", { credentials: "include", cache: "no-store" });
17520
- if (res.status === 403 || res.status === 409 || res.status === 400) {
17524
+ if (res.status === 404 || res.status === 403 || res.status === 409 || res.status === 400) {
17521
17525
  setNotConnected(true);
17522
17526
  return;
17523
17527
  }
package/dist/client.js CHANGED
@@ -17129,6 +17129,10 @@ function GscPanel({ locale }) {
17129
17129
  setError(null);
17130
17130
  try {
17131
17131
  const res = await fetch("/api/seo-plugin/gsc/status", { credentials: "include" });
17132
+ if (res.status === 404) {
17133
+ setStatus({ configured: false, connected: false, connectedEmail: null, connectedAt: null, propertyUrl: null, redirectUri: null });
17134
+ return;
17135
+ }
17132
17136
  const json = await res.json();
17133
17137
  if (!res.ok) setError(json.error || `Error ${res.status}`);
17134
17138
  else setStatus(json);
@@ -17334,7 +17338,7 @@ function RankTrackingPanel({ locale }) {
17334
17338
  setError(null);
17335
17339
  try {
17336
17340
  const res = await fetch("/api/seo-plugin/rank-history", { credentials: "include", cache: "no-store" });
17337
- if (res.status === 403 || res.status === 409) {
17341
+ if (res.status === 404 || res.status === 403 || res.status === 409) {
17338
17342
  setNotConnected(true);
17339
17343
  setMovers(null);
17340
17344
  return;
@@ -17511,7 +17515,7 @@ function CtrOpportunitiesPanel({ locale }) {
17511
17515
  setError(null);
17512
17516
  try {
17513
17517
  const res = await fetch("/api/seo-plugin/ctr-opportunities", { credentials: "include", cache: "no-store" });
17514
- if (res.status === 403 || res.status === 409 || res.status === 400) {
17518
+ if (res.status === 404 || res.status === 403 || res.status === 409 || res.status === 400) {
17515
17519
  setNotConnected(true);
17516
17520
  return;
17517
17521
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consilioweb/payload-seo-analyzer",
3
- "version": "1.17.0",
3
+ "version": "1.17.1",
4
4
  "description": "Payload CMS SEO plugin — 50+ checks, dashboard, Lexical JSON support, Flesch FR/EN readability, i18n",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -114,7 +114,11 @@
114
114
  "node": ">=18"
115
115
  },
116
116
  "devDependencies": {
117
+ "@testing-library/react": "^16.3.2",
117
118
  "@types/react": "^19.0.0",
119
+ "jsdom": "^29.1.1",
120
+ "react": "^19.2.7",
121
+ "react-dom": "^19.2.7",
118
122
  "tsup": "^8.0.0",
119
123
  "typescript": "^5.5.0",
120
124
  "vitest": "^2.0.0"