@soloworks/smking-next 0.22.1 → 0.22.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @soloworks/smking-next
2
2
 
3
+ ## 0.22.2 — 2026-07-26
4
+
5
+ - `<SmkingCms>` now calls Next.js `notFound()` when Page Zero explicitly
6
+ reports an unpublished or missing slug, producing a real 404 instead of an
7
+ empty 200 page.
8
+ - Network failures, pending content, and missing configuration still fail open.
9
+
3
10
  ## 0.22.1 — 2026-07-26
4
11
 
5
12
  - Sitemap fetches now carry a shared cache tag.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soloworks/smking-next",
3
- "version": "0.22.1",
3
+ "version": "0.22.2",
4
4
  "description": "AI-native SEO (AEO) for Next.js — auto-inject JSON-LD, FAQ, AI summary, and SEO metadata so AI crawlers (ChatGPT, Perplexity, Google AI) can cite your pages.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sillyleo/smking/tree/main/packages/smking-next",
@@ -1,4 +1,5 @@
1
1
  import { cookies, draftMode } from "next/headers";
2
+ import { notFound } from "next/navigation";
2
3
 
3
4
  import { getCmsPage } from "../lib/cms-client";
4
5
  import { safeJson } from "../lib/safe-json";
@@ -32,8 +33,9 @@ import type { CmsParams } from "../types";
32
33
  * from this package via `lib/smking-cms-styles`) alongside, which
33
34
  * targets `.slate-*` hooks in plain CSS.
34
35
  *
35
- * Returns null when the response isn't ready (pending / not_found /
36
- * unreachable / mis-configured) — fail-open by design.
36
+ * Calls Next.js `notFound()` when the API explicitly reports `not_found`.
37
+ * Pending, unreachable, and mis-configured responses still return null so
38
+ * transient infrastructure failures remain fail-open.
37
39
  *
38
40
  * Emits `<title>` / `<meta>` / `og:*` / canonical inline; React 19
39
41
  * hoists them into `<head>` automatically.
@@ -63,6 +65,9 @@ export async function SmkingCms(props: CmsParams) {
63
65
  const data = await getCmsPage(
64
66
  previewToken ? { ...props, previewToken } : props,
65
67
  );
68
+ if (data?.status === "not_found") {
69
+ notFound();
70
+ }
66
71
  if (
67
72
  !data ||
68
73
  (data.status !== "ready" && data.status !== "preview") ||
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.22.1";
1
+ export const SDK_VERSION = "0.22.2";