riverbankcms 0.1.0 → 0.2.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.
@@ -914,14 +914,14 @@ riverbankcms event get summer-fest
914
914
  riverbankcms event upsert summer-fest --file ./content/events/summer-fest.json
915
915
  riverbankcms event cancel summer-fest
916
916
  riverbankcms event delete summer-fest --yes
917
- riverbankcms event occurrence list summer-fest
918
- riverbankcms event occurrence add summer-fest \
917
+ riverbankcms event occurrence list summer-fest summer-run
918
+ riverbankcms event occurrence add summer-fest summer-run \
919
919
  --starts-at 2026-08-01T10:00 \
920
920
  --duration-minutes 60
921
- riverbankcms event occurrence update summer-fest <occurrence-uuid> \
921
+ riverbankcms event occurrence update summer-fest summer-run <occurrence-uuid> \
922
922
  --capacity 20
923
- riverbankcms event occurrence cancel summer-fest <occurrence-uuid>
924
- riverbankcms event occurrence delete summer-fest <occurrence-uuid> --yes
923
+ riverbankcms event occurrence cancel summer-fest summer-run <occurrence-uuid>
924
+ riverbankcms event occurrence delete summer-fest summer-run <occurrence-uuid> --yes
925
925
  ```
926
926
 
927
927
  `event upsert` and `push events` accept canonical event files with `path` and `blocks`. Events use native page authority: an `eventOffering` or `eventSeries` subject owns a page surface, and that surface owns its route, field content, publication state, and slots. `path` updates the page-surface route. `blocks` maps slot keys to surface-slot blocks, for example `blocks.main` for the built-in event template. Use stable block identifiers so repeat pushes update existing slot blocks safely. Unknown slot keys or block kinds fail validation; default slots accept enabled SDK `custom.*` blocks, while explicit template `allowedBlocks` lists remain authoritative. Ordinary editorial entries continue to use the separate `entry` commands and content-entry model described above.
@@ -932,7 +932,9 @@ riverbankcms event occurrence delete summer-fest <occurrence-uuid> --yes
932
932
  series. Mutation commands always use the occurrence UUID shown by `list`; a
933
933
  calendar date is never accepted as an identity.
934
934
 
935
- - `list <event-identifier>` shows all future dates, including cancelled dates.
935
+ - `list <event-identifier> <run-identifier>` shows all future dates, including
936
+ cancelled dates. The parent Event and run are both explicit, so multi-run
937
+ Events never rely on an ambiguous identifier.
936
938
  Add `--all` to include history or `--status scheduled|cancelled|completed` to
937
939
  filter. The CLI follows the API's bounded pages, while `--json` keeps the
938
940
  canonical UTC instants in its single result envelope.
@@ -7,12 +7,13 @@ Configure a Riverbank SDK Next.js App Router site to prerender published routes,
7
7
  ## Prerequisites
8
8
 
9
9
  - A Riverbank SDK site using `createCatchAllPage()` in `src/app/[[...slug]]/page.tsx`.
10
- - A production content API key in `RIVERBANK_API_KEY`.
11
- - `RIVERBANK_SITE_ID` set to this site's Riverbank site ID.
12
- - `NEXT_PUBLIC_DASHBOARD_URL` set to the dashboard origin, for example `https://cms.example.com`.
10
+ - A configured `getRiverbankClient()` helper and `siteId` in `riverbank.config.ts`.
13
11
  - `RIVERBANK_WEBHOOK_SECRET` set from the CMS-generated Riverbank webhook secret.
14
12
 
15
- Preview deployments should also set `RIVERBANK_PREVIEW_MODE=true` so draft previews stay dynamic instead of serving stale ISR HTML.
13
+ Sites scaffolded with preview support should set `RIVERBANK_PREVIEW_MODE=true` in
14
+ preview deployments. The SDK preview integration reads the request-bound preview
15
+ session and opts those requests into dynamic rendering; the literal ISR interval
16
+ remains unchanged.
16
17
 
17
18
  ## Configure the Catch-All Route
18
19
 
@@ -21,21 +22,26 @@ In `src/app/[[...slug]]/page.tsx`:
21
22
  ```tsx
22
23
  import {
23
24
  createCatchAllPage,
24
- generateAllStaticParams,
25
- getISRConfig,
25
+ createGenerateStaticParams,
26
26
  } from '@riverbankcms/sdk/next'
27
27
 
28
28
  import config from '@/riverbank.config'
29
29
  import { blockOverrides } from '@/lib/block-overrides'
30
30
  import { getRiverbankClient } from '@/lib/riverbank-client'
31
31
 
32
- export const revalidate = getISRConfig().revalidate
32
+ // Next.js route config values must remain statically analyzable literals.
33
+ export const revalidate = 300
33
34
  export const dynamicParams = true
34
- export { generateAllStaticParams as generateStaticParams }
35
+ export const generateStaticParams = createGenerateStaticParams({
36
+ getClient: getRiverbankClient,
37
+ siteId: config.siteId,
38
+ failureMode: 'throw',
39
+ })
35
40
 
36
41
  const { Page, generateMetadata } = createCatchAllPage({
37
42
  getClient: getRiverbankClient,
38
43
  config,
44
+ searchParamsMode: 'ignore',
39
45
  blockOverrides,
40
46
  })
41
47
 
@@ -43,7 +49,18 @@ export default Page
43
49
  export { generateMetadata }
44
50
  ```
45
51
 
46
- `generateAllStaticParams()` discovers published pages and routable entries at build time. It reads:
52
+ `searchParamsMode: 'ignore'` is required for this ISR shape because reading the
53
+ Next.js page `searchParams` prop opts the route into dynamic rendering. Use the
54
+ default `dynamic` mode only when server-rendered themes, data loaders, redirects,
55
+ or metadata genuinely depend on URL query parameters.
56
+
57
+ `createGenerateStaticParams()` uses the site's configured client to discover
58
+ published pages and routable entries at build time. The example uses strict
59
+ failure handling so production CI cannot silently publish an incomplete route
60
+ set.
61
+
62
+ If a site instead uses the SDK's generic environment variable names,
63
+ `generateAllStaticParams()` is available. It reads:
47
64
 
48
65
  - `RIVERBANK_API_KEY`
49
66
  - `RIVERBANK_SITE_ID`
@@ -59,21 +76,6 @@ export function generateStaticParams() {
59
76
  }
60
77
  ```
61
78
 
62
- If your site already centralizes the SDK client, use the explicit factory:
63
-
64
- ```tsx
65
- import { createGenerateStaticParams } from '@riverbankcms/sdk/next'
66
-
67
- import config from '@/riverbank.config'
68
- import { getRiverbankClient } from '@/lib/riverbank-client'
69
-
70
- export const generateStaticParams = createGenerateStaticParams({
71
- getClient: getRiverbankClient,
72
- siteId: config.siteId,
73
- failureMode: 'throw',
74
- })
75
- ```
76
-
77
79
  ## Add the Revalidation Route
78
80
 
79
81
  Create `src/app/api/revalidate/route.ts`: