riverbankcms 0.37.0 → 0.38.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/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +16476 -12818
- package/dist/cli/init-docs/content/getting-started.md +10 -10
- package/dist/{entryCommands-CXGj-eca.mjs → entryCommands-CINe1Vw0.mjs} +3878 -592
- package/dist/{eventUpsertInputSchema-DZdxyRB6.mjs → eventUpsertInputSchema-DLz8m6J9.mjs} +2 -2
- package/dist/load-config-DUFFruh_.mjs +4 -0
- package/dist/{load-config-Bhh-kYhx.mjs → load-config-Dl_o53yP.mjs} +2 -2
- package/dist/{plan-FPq8qKNu.mjs → plan-D0-jU0Ye.mjs} +9 -12
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-BL6uAz53.mjs → sdk-event-upsert-78zikPNp.mjs} +56 -25
- package/dist/{src-ClX_VLD6.mjs → src-e6JfJMDt.mjs} +234 -35
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-DTT9jeYi.mjs +0 -4
|
@@ -174,25 +174,25 @@ When portal auth is enabled, `riverbankcms init` generates these reserved routes
|
|
|
174
174
|
|
|
175
175
|
| Route | SDK helper | Scaffold template |
|
|
176
176
|
| --- | --- | --- |
|
|
177
|
-
| `/portal` | `createPortalPage` from `@riverbankcms/sdk/next` | `portalPageTemplates` |
|
|
178
|
-
| `/portal/continue` | `createPortalContinuePage` | `portalPageTemplates` |
|
|
179
|
-
| `/portal/tickets/[registrationId]` | `createPortalTicketPage` | `portalPageTemplates` |
|
|
180
|
-
| `/portal/digital-products/[entitlementId]` | `createPortalDigitalProductPage` | `portalPageTemplates` |
|
|
181
|
-
| `/portal/digital-products/[entitlementId]/files/[assetId]` | `createPortalDigitalProductFilePage` | `portalPageTemplates` |
|
|
177
|
+
| `/portal/[[...path]]` (every portal page, including Continue, tickets and downloads) | `createPortalPage` from `@riverbankcms/sdk/next` | `portalPageTemplates` |
|
|
182
178
|
| `/redeem` | `createRedeemPage` | `portalPageTemplates` |
|
|
183
179
|
| `/api/portal/callback` (GET + POST) | `handlePortalCallback` from `@riverbankcms/sdk/portal` | `portalCallbackRouteTemplate` |
|
|
184
180
|
| `/api/portal/logout` (POST) | `handlePortalLogout` | `portalLogoutRouteTemplate` |
|
|
185
181
|
|
|
186
|
-
Existing sites should add these files after upgrading the SDK.
|
|
182
|
+
Existing sites should add these files after upgrading the SDK. A site from before the catch-all
|
|
183
|
+
replaces its `app/portal/page.tsx`, `portal/continue`, `portal/tickets` and `portal/digital-products`
|
|
184
|
+
pages with the one `app/portal/[[...path]]/page.tsx`; old email links keep working through it. The page
|
|
185
|
+
exports `generateMetadata = generatePortalPageMetadata` so each portal page gets its own title. Import
|
|
187
186
|
`@riverbankcms/sdk/styles.css` globally. The page helpers provide the site theme
|
|
188
187
|
scope automatically; sites with `themeSource: 'local'` pass the same `theme`,
|
|
189
188
|
`themes`/`themeSwitch`, or `getTheme` options used by their catch-all. A custom
|
|
190
189
|
resolver receives `content.type === 'portal'` and `content.site` on these routes. The callback and logout routes own the HTTP-only cookie.
|
|
191
190
|
The file route authenticates before redirecting to a signed download URL.
|
|
192
191
|
|
|
193
|
-
For a custom host, `
|
|
194
|
-
`
|
|
195
|
-
(
|
|
192
|
+
For a custom host, use `renderPortalRoute` from `@riverbankcms/sdk/next` with a context from
|
|
193
|
+
`portalHostContext`: it draws Continue, tickets and downloads itself and hands every other page's props
|
|
194
|
+
(the parsed `initialLocation` included) to your `CustomerPortal` from `@riverbankcms/sdk/portal/client`,
|
|
195
|
+
which also takes optional `logoutPath` and `bookPath` (defaults `/api/portal/logout`, `/book`). Sign-in always goes through `/api/portal/callback`. Wrap it in the
|
|
196
196
|
site's `ThemeScope`. This is a reserved route component, not a CMS block.
|
|
197
197
|
`@riverbankcms/sdk/portal` remains the server helper entry.
|
|
198
198
|
|
|
@@ -205,7 +205,7 @@ includes it); this protects emailed gift tokens in outbound referrers.
|
|
|
205
205
|
|
|
206
206
|
For a custom host, `RedeemGiftCard` from `@riverbankcms/sdk/gifting/client` takes
|
|
207
207
|
`siteId`, `apiBaseUrl`, `siteTitle`, `publicContactEmail` (nullable), optional
|
|
208
|
-
`token` and `code`, and optional `
|
|
208
|
+
`token` and `code`, and optional `homePath` (default `/`). Its `onSignedIn` callback refreshes host
|
|
209
209
|
chrome after sign-in; the Next helper supplies that callback. Wrap the shared
|
|
210
210
|
component in the site's `ThemeScope`. The callback POST expects JSON
|
|
211
211
|
`{ portalCode }` from the same origin and returns JSON without redirecting.
|