create-content-sdk-app 2.4.1-canary.20260910100657 → 2.4.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/templates/nextjs-app-router-cache-components/.agents/docs/AGENTS-key-concepts.md +1 -2
- package/dist/templates/nextjs-app-router-cache-components/.agents/docs/AGENTS-router-specifics.md +1 -2
- package/dist/templates/nextjs-app-router-cache-components/.agents/skills/content-sdk-cache-components-and-osr/SKILL.md +1 -1
- package/dist/templates/nextjs-app-router-cache-components/src/app/api/revalidate/route.ts +1 -2
- package/package.json +4 -4
package/dist/templates/nextjs-app-router-cache-components/.agents/docs/AGENTS-key-concepts.md
CHANGED
|
@@ -11,8 +11,7 @@ Optional, on-demand detail. The compact guide is [AGENTS.md](../../AGENTS.md).
|
|
|
11
11
|
- `getSitecoreErrorPage({ site, locale, code })` → 404 / 500 Sitecore content with the same tag strategy as `getSitecorePage`.
|
|
12
12
|
- **`POST /api/revalidate`** is a single Sitecore-webhook endpoint. It accepts the Sitecore Experience Edge / Content Operations payload shape:
|
|
13
13
|
- `updates[]` — Sitecore publish-event rows; the handler maps each row's `identifier` (with `-media` / `-layout` stripped) to `sc:item:<id>:<locale>`.
|
|
14
|
-
- `
|
|
15
|
-
- Dictionary tags from `sites` (`.sitecore/sites.json`; configured `defaultSite` from `generateSites` only when `NEXT_PUBLIC_DEFAULT_SITE_NAME` is set) are merged on every call so dictionary changes are covered.
|
|
14
|
+
- Dictionary entry updates (`entity_definition: "DictionaryEntry"`) map to `sc:dict:<site>:<locale>` for the specific site resolved from the identifier via `sites` (`.sitecore/sites.json`; configured `defaultSite` from `generateSites` only when `NEXT_PUBLIC_DEFAULT_SITE_NAME` is set) — only that site's dictionary tag is revalidated, not every configured site's.
|
|
16
15
|
- **Auth (optional):** leave `SITECORE_REVALIDATE_SECRET` empty to skip auth (no `x-revalidate-secret` header). When set, callers must send the same value in `x-revalidate-secret` (configure that header on your Sitecore webhook).
|
|
17
16
|
- **Dictionary cache:** `sitecore.config.ts` disables the SDK's in-process dictionary cache (`dictionary: { caching: { enabled: false } }`). The Cache Components helper is the only dictionary cache layer, so `revalidateTag` works end to end.
|
|
18
17
|
|
package/dist/templates/nextjs-app-router-cache-components/.agents/docs/AGENTS-router-specifics.md
CHANGED
|
@@ -40,8 +40,7 @@ Optional, on-demand detail. The compact guide is [AGENTS.md](../../AGENTS.md).
|
|
|
40
40
|
|
|
41
41
|
- **Where:** `src/app/api/revalidate/route.ts`. Uses `createSitecoreRevalidateRouteHandler` from `@sitecore-content-sdk/nextjs/route-handler` — a single Sitecore-webhook endpoint.
|
|
42
42
|
- **Auth:** When `SITECORE_REVALIDATE_SECRET` is non-empty, callers must send the same value in `x-revalidate-secret`. When empty, revalidation works without that header.
|
|
43
|
-
- **Webhook payload (`updates[]`):** Send the Sitecore Experience Edge / Content Operations body (`updates`, `invocation_id`, `continues`). The handler maps each `identifier` (with `-media` / `-layout` stripped) to `sc:item:<id>:<locale>` and revalidates it.
|
|
44
|
-
- **Ad-hoc invalidation (`tags[]`):** Reuse the same endpoint with `{ "tags": ["sc:route:...", "sc:item:..."] }` (`sc:`-prefixed strings are revalidated verbatim) or `{ "tags": ["<itemId>"] }` (bare item IDs are mapped to `sc:item:<id>:<defaultLocale>`). Dictionary tags from `sites` are appended on **every** call.
|
|
43
|
+
- **Webhook payload (`updates[]`):** Send the Sitecore Experience Edge / Content Operations body (`updates`, `invocation_id`, `continues`). The handler maps each `identifier` (with `-media` / `-layout` stripped) to `sc:item:<id>:<locale>` and revalidates it. A Dictionary entry update (`entity_definition: "DictionaryEntry"`) instead revalidates `sc:dict:<site>:<locale>` for the specific site resolved from the identifier via `sites` — not every configured site's.
|
|
45
44
|
- **Do not:** Bypass auth, expose the secret in client code, or call `revalidateTag` directly from components.
|
|
46
45
|
|
|
47
46
|
## Server vs Client components
|
|
@@ -17,7 +17,7 @@ description: Tag-based caching in src/lib/cache/ and POST /api/revalidate webhoo
|
|
|
17
17
|
## Rules
|
|
18
18
|
|
|
19
19
|
- Cache helpers use `'use cache'` + `cacheTag` with `sc:route` / `sc:item` / `sc:dict` tags
|
|
20
|
-
- `POST /api/revalidate` accepts `updates[]`
|
|
20
|
+
- `POST /api/revalidate` accepts `updates[]`
|
|
21
21
|
- Optional `SITECORE_REVALIDATE_SECRET` + `x-revalidate-secret` header
|
|
22
22
|
- Do not call `revalidateTag` from components
|
|
23
23
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* POST /api/revalidate — Sitecore webhook (Experience Edge / Content Operations) endpoint.
|
|
3
|
-
*
|
|
4
|
-
* `createSitecoreRevalidateRouteHandler` for the full payload contract.
|
|
3
|
+
* See SDK `createSitecoreRevalidateRouteHandler` for the full payload contract.
|
|
5
4
|
*
|
|
6
5
|
* Dictionary tags are derived from `.sitecore/sites.json` (includes the default site from `generateSites`).
|
|
7
6
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-content-sdk-app",
|
|
3
|
-
"version": "2.4.1
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Sitecore Content SDK initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@sitecore-content-sdk/analytics-core": "^2.1.2",
|
|
42
|
-
"@sitecore-content-sdk/angular": "1.0.1
|
|
43
|
-
"@sitecore-content-sdk/cli": "2.3.
|
|
42
|
+
"@sitecore-content-sdk/angular": "~1.0.1",
|
|
43
|
+
"@sitecore-content-sdk/cli": "^2.3.0",
|
|
44
44
|
"@sitecore-content-sdk/events": "^2.1.2",
|
|
45
|
-
"@sitecore-content-sdk/nextjs": "2.4.1
|
|
45
|
+
"@sitecore-content-sdk/nextjs": "^2.4.1",
|
|
46
46
|
"@sitecore-content-sdk/personalize": "^2.1.0",
|
|
47
47
|
"@stylistic/eslint-plugin": "^5.2.2",
|
|
48
48
|
"@types/chai": "^5.2.2",
|