@riverbankcms/sdk 0.93.0 → 0.95.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.
- package/README.md +3 -0
- package/dist/{PreviewEditorSidebar-D3PAF7NW.mjs → PreviewEditorSidebar-6FQYKOSB.mjs} +3 -3
- package/dist/{PreviewEditorUI-G5JVJEIJ.mjs → PreviewEditorUI-NPO2XMFB.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-PBEFH5AL.mjs +8 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +7 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +3 -0
- package/dist/_dts/api/src/cache-tags.d.ts +4 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +14 -0
- package/dist/_dts/api/src/endpoints.d.ts +8 -0
- package/dist/_dts/api/src/event-presentation.d.ts +15 -0
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +17 -4
- package/dist/_dts/api/src/shared-contracts.d.ts +19 -9
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
- package/dist/_dts/blocks/src/portal/types.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +21 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +5 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +9 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +36 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +7 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +19 -4
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +6 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +163 -2
- package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +7 -0
- package/dist/_dts/media-core/src/mediaUsageProjection.d.ts +29 -1
- package/dist/_dts/sdk/src/client/types.d.ts +7 -2
- package/dist/_dts/sdk/src/next/middleware.d.ts +1 -0
- package/dist/_dts/sdk/src/next/redirect-destination.d.ts +3 -0
- package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +22 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +20 -1
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +9 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/{chunk-XIK2HYI3.mjs → chunk-4A6NWO3X.mjs} +7 -7
- package/dist/{chunk-NT76QGIJ.mjs → chunk-7ED5UNHL.mjs} +14 -0
- package/dist/{chunk-AQ6RT6LZ.mjs → chunk-K2SJTZMX.mjs} +2 -2
- package/dist/{chunk-A63UXN3P.mjs → chunk-PJPFTVZG.mjs} +2 -2
- package/dist/{chunk-AJZGT6YG.mjs → chunk-VTPPVAOL.mjs} +1 -1
- package/dist/{chunk-PCNCETBI.mjs → chunk-VZBSD4AJ.mjs} +449 -183
- package/dist/cli/index.mjs +176 -73
- package/dist/client/{accordion-RNQIPG55.mjs → accordion-LGO4IO5U.mjs} +1 -1
- package/dist/client/{bookingForm-HYEEVRLP.mjs → bookingForm-MWLS4LGU.mjs} +3 -3
- package/dist/client/bookings.mjs +211 -105
- package/dist/client/{carousel-W7DQ3YPU.mjs → carousel-6AHNP5HA.mjs} +1 -1
- package/dist/client/{cart-PXJ3SXXO.mjs → cart-CIXGYAZB.mjs} +4 -4
- package/dist/client/{checkout-X3JYSOXI.mjs → checkout-OTX6O3DN.mjs} +4 -4
- package/dist/client/{chunk-Q47XGAGS.mjs → chunk-AVBQSUIS.mjs} +1 -1
- package/dist/client/{chunk-WERRJXNJ.mjs → chunk-HOP7MKAZ.mjs} +1 -1
- package/dist/client/{chunk-IXDSXF2D.mjs → chunk-INRIT6DP.mjs} +353 -187
- package/dist/client/{chunk-DUOHLWLF.mjs → chunk-MYCXAKWP.mjs} +2 -2
- package/dist/client/{chunk-J6TMMMXW.mjs → chunk-R3NQTBWE.mjs} +1 -1
- package/dist/client/{chunk-YYVGSYBO.mjs → chunk-TREIML53.mjs} +3 -3
- package/dist/client/{chunk-6SYGVVWA.mjs → chunk-V67AT7ZW.mjs} +3 -0
- package/dist/client/{chunk-PICR3NTQ.mjs → chunk-Y2PMKCXO.mjs} +1 -1
- package/dist/client/client.mjs +503 -183
- package/dist/client/{courseRegistration-QZ67PVHO.mjs → courseRegistration-2LU6C3JL.mjs} +3 -3
- package/dist/client/{eventCalendar-V3BDHQNT.mjs → eventCalendar-OKUSISBZ.mjs} +6 -6
- package/dist/client/{eventCombined-XYFRN2RG.mjs → eventCombined-CMF6CD4S.mjs} +6 -6
- package/dist/client/{eventDetails-TFE5TWKV.mjs → eventDetails-XYWH7WXI.mjs} +6 -6
- package/dist/client/{eventListing-IQ6AGWZ6.mjs → eventListing-EK5DJTAH.mjs} +6 -6
- package/dist/client/{eventRegistration-WGJVFKQJ.mjs → eventRegistration-XDOSICV6.mjs} +6 -6
- package/dist/client/{form-6UZY6RUA.mjs → form-J6GOHKYG.mjs} +1 -1
- package/dist/client/{headerSection-RSFXY6V3.mjs → headerSection-C5SYJTRW.mjs} +2 -2
- package/dist/client/hooks.mjs +14 -0
- package/dist/client/{locationMap-24FH67I4.mjs → locationMap-QSQIFVVT.mjs} +2 -2
- package/dist/client/{newsletterForm-QVL3MLTN.mjs → newsletterForm-47VXJRWK.mjs} +1 -1
- package/dist/client/{productDetail-ZDYN3G4T.mjs → productDetail-5U6ISCC2.mjs} +4 -4
- package/dist/client/{productList-4BMJLQHZ.mjs → productList-XDZUMR3P.mjs} +4 -4
- package/dist/client/rendering/client.mjs +362 -182
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +489 -182
- package/dist/client/{shop-U5C634FF.mjs → shop-ZSZKIY3R.mjs} +4 -4
- package/dist/preview-next/before-render.mjs +14 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +14 -0
- package/dist/{sdk-runtime-VGV46WVB.mjs → sdk-runtime-PHNM7MRD.mjs} +6 -6
- package/dist/server/components.mjs +111 -0
- package/dist/server/config-validation.mjs +14 -0
- package/dist/server/config.mjs +14 -0
- package/dist/server/data.mjs +14 -0
- package/dist/server/index.mjs +44 -1
- package/dist/server/next/middleware.mjs +120 -0
- package/dist/server/next.mjs +225 -2
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +111 -0
- package/dist/server/rendering.mjs +127 -0
- package/dist/server/routing.mjs +14 -0
- package/dist/server/server.mjs +60 -1
- package/dist/server/theme-bridge.mjs +97 -0
- package/dist/styles/index.css +95 -0
- package/package.json +5 -1
- package/dist/SdkPreviewModeRuntime-NHTLRNQD.mjs +0 -8
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { mountShopBlockIsland, ShopClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { mountShopBlockIsland, ShopClient } from './chunk-TREIML53.mjs';
|
|
2
|
+
import './chunk-AVBQSUIS.mjs';
|
|
3
3
|
import './chunk-JNE6UI6U.mjs';
|
|
4
4
|
import './chunk-6N7YRNYU.mjs';
|
|
5
5
|
import './chunk-L4J5Y62O.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-R3NQTBWE.mjs';
|
|
7
7
|
import './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-WBQG7VJA.mjs';
|
|
9
9
|
import './chunk-TNGL2WJF.mjs';
|
|
10
10
|
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-V67AT7ZW.mjs';
|
|
12
12
|
import './chunk-PCHACQEB.mjs';
|
|
13
13
|
|
|
14
14
|
// src/rendering/islands/enhancers/shop.tsx
|
|
@@ -59,6 +59,8 @@ var TAG_TEMPLATES = {
|
|
|
59
59
|
siteNewsletter: "riverbank:site:{siteId}:newsletter",
|
|
60
60
|
// Pages/routes (routable content)
|
|
61
61
|
siteRoutableContent: "riverbank:site:{siteId}:routable-content",
|
|
62
|
+
siteRedirects: "riverbank:site:{siteId}:redirects",
|
|
63
|
+
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
62
64
|
routeById: "riverbank:route:{routeId}",
|
|
63
65
|
pageById: "riverbank:page:{pageId}",
|
|
64
66
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
@@ -3515,6 +3517,18 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3515
3517
|
auth: "public",
|
|
3516
3518
|
responseKind: "json"
|
|
3517
3519
|
},
|
|
3520
|
+
resolveRouteOutcome: {
|
|
3521
|
+
path: "/sites/{siteId}/route-outcome",
|
|
3522
|
+
method: "GET",
|
|
3523
|
+
tags: [
|
|
3524
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3525
|
+
TAG_TEMPLATES.siteRedirects,
|
|
3526
|
+
TAG_TEMPLATES.siteRouteOutcomes
|
|
3527
|
+
],
|
|
3528
|
+
auth: "public",
|
|
3529
|
+
responseKind: "json",
|
|
3530
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
3531
|
+
},
|
|
3518
3532
|
getPageByPath: {
|
|
3519
3533
|
path: "/sites/{siteId}/pages",
|
|
3520
3534
|
method: "GET",
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from '../../chunk-VTPPVAOL.mjs';
|
|
3
|
+
import '../../chunk-7ED5UNHL.mjs';
|
|
4
4
|
import '../../chunk-R7POPVJR.mjs';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var LazySdkPreviewMode = React.lazy(async () => {
|
|
9
|
-
const mod = await import('../../SdkPreviewModeRuntime-
|
|
9
|
+
const mod = await import('../../SdkPreviewModeRuntime-PBEFH5AL.mjs');
|
|
10
10
|
return {
|
|
11
11
|
default: mod.SdkPreviewModeRuntime
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
14
|
var LazyPreviewShell = React.lazy(async () => {
|
|
15
|
-
const mod = await import('../../sdk-runtime-
|
|
15
|
+
const mod = await import('../../sdk-runtime-PHNM7MRD.mjs');
|
|
16
16
|
return {
|
|
17
17
|
default: mod.PreviewShell
|
|
18
18
|
};
|
|
19
19
|
});
|
|
20
20
|
var LazyPreviewShellLayout = React.lazy(async () => {
|
|
21
|
-
const mod = await import('../../sdk-runtime-
|
|
21
|
+
const mod = await import('../../sdk-runtime-PHNM7MRD.mjs');
|
|
22
22
|
return {
|
|
23
23
|
default: mod.PreviewShellLayout
|
|
24
24
|
};
|
|
@@ -65,6 +65,8 @@ var TAG_TEMPLATES = {
|
|
|
65
65
|
siteNewsletter: "riverbank:site:{siteId}:newsletter",
|
|
66
66
|
// Pages/routes (routable content)
|
|
67
67
|
siteRoutableContent: "riverbank:site:{siteId}:routable-content",
|
|
68
|
+
siteRedirects: "riverbank:site:{siteId}:redirects",
|
|
69
|
+
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
68
70
|
routeById: "riverbank:route:{routeId}",
|
|
69
71
|
pageById: "riverbank:page:{pageId}",
|
|
70
72
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
@@ -3521,6 +3523,18 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3521
3523
|
auth: "public",
|
|
3522
3524
|
responseKind: "json"
|
|
3523
3525
|
},
|
|
3526
|
+
resolveRouteOutcome: {
|
|
3527
|
+
path: "/sites/{siteId}/route-outcome",
|
|
3528
|
+
method: "GET",
|
|
3529
|
+
tags: [
|
|
3530
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3531
|
+
TAG_TEMPLATES.siteRedirects,
|
|
3532
|
+
TAG_TEMPLATES.siteRouteOutcomes
|
|
3533
|
+
],
|
|
3534
|
+
auth: "public",
|
|
3535
|
+
responseKind: "json",
|
|
3536
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
3537
|
+
},
|
|
3524
3538
|
getPageByPath: {
|
|
3525
3539
|
path: "/sites/{siteId}/pages",
|
|
3526
3540
|
method: "GET",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-
|
|
3
|
-
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
2
|
+
export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-4A6NWO3X.mjs';
|
|
3
|
+
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from './chunk-VTPPVAOL.mjs';
|
|
4
|
+
import './chunk-PJPFTVZG.mjs';
|
|
5
|
+
import './chunk-K2SJTZMX.mjs';
|
|
6
|
+
import './chunk-VZBSD4AJ.mjs';
|
|
7
|
+
import './chunk-7ED5UNHL.mjs';
|
|
8
8
|
import './chunk-R7POPVJR.mjs';
|
|
@@ -52519,6 +52519,103 @@ var containerResponsiveThemeCss = `/*
|
|
|
52519
52519
|
line-height: 1.35;
|
|
52520
52520
|
}
|
|
52521
52521
|
|
|
52522
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-lines {
|
|
52523
|
+
display: grid;
|
|
52524
|
+
gap: 0.75rem;
|
|
52525
|
+
}
|
|
52526
|
+
|
|
52527
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-list {
|
|
52528
|
+
display: grid;
|
|
52529
|
+
gap: 0.625rem;
|
|
52530
|
+
}
|
|
52531
|
+
|
|
52532
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line {
|
|
52533
|
+
display: grid;
|
|
52534
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
52535
|
+
align-items: center;
|
|
52536
|
+
gap: 0.875rem;
|
|
52537
|
+
min-height: 4.75rem;
|
|
52538
|
+
padding: 0.875rem;
|
|
52539
|
+
border: 1px solid var(--er-border);
|
|
52540
|
+
border-radius: calc(var(--rb-block-radius) * 0.75);
|
|
52541
|
+
background: var(--er-control-bg);
|
|
52542
|
+
}
|
|
52543
|
+
|
|
52544
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line--disabled {
|
|
52545
|
+
color: var(--er-on-surface-disabled);
|
|
52546
|
+
background: var(--er-surface-muted);
|
|
52547
|
+
}
|
|
52548
|
+
|
|
52549
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-main {
|
|
52550
|
+
min-width: 0;
|
|
52551
|
+
display: grid;
|
|
52552
|
+
gap: 0.25rem;
|
|
52553
|
+
}
|
|
52554
|
+
|
|
52555
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-heading {
|
|
52556
|
+
display: flex;
|
|
52557
|
+
align-items: baseline;
|
|
52558
|
+
justify-content: space-between;
|
|
52559
|
+
gap: 0.75rem;
|
|
52560
|
+
}
|
|
52561
|
+
|
|
52562
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-name {
|
|
52563
|
+
min-width: 0;
|
|
52564
|
+
font-size: 0.9375rem;
|
|
52565
|
+
font-weight: 600;
|
|
52566
|
+
line-height: 1.3;
|
|
52567
|
+
overflow-wrap: anywhere;
|
|
52568
|
+
}
|
|
52569
|
+
|
|
52570
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-price {
|
|
52571
|
+
flex-shrink: 0;
|
|
52572
|
+
font-size: 0.875rem;
|
|
52573
|
+
font-weight: 600;
|
|
52574
|
+
line-height: 1.3;
|
|
52575
|
+
}
|
|
52576
|
+
|
|
52577
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-detail {
|
|
52578
|
+
margin: 0;
|
|
52579
|
+
color: var(--er-on-surface-muted);
|
|
52580
|
+
font-size: 0.8125rem;
|
|
52581
|
+
line-height: 1.35;
|
|
52582
|
+
overflow-wrap: anywhere;
|
|
52583
|
+
}
|
|
52584
|
+
|
|
52585
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-summary {
|
|
52586
|
+
padding: 0.75rem 0.875rem;
|
|
52587
|
+
border: 1px solid var(--er-summary-border);
|
|
52588
|
+
border-radius: calc(var(--rb-block-radius) * 0.75);
|
|
52589
|
+
background: var(--er-surface-muted);
|
|
52590
|
+
}
|
|
52591
|
+
|
|
52592
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-summary-title {
|
|
52593
|
+
font-size: 0.875rem;
|
|
52594
|
+
font-weight: 600;
|
|
52595
|
+
line-height: 1.35;
|
|
52596
|
+
}
|
|
52597
|
+
|
|
52598
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line-summary-list {
|
|
52599
|
+
margin: 0.25rem 0 0;
|
|
52600
|
+
padding-left: 1.125rem;
|
|
52601
|
+
color: var(--er-on-surface-muted);
|
|
52602
|
+
font-size: 0.8125rem;
|
|
52603
|
+
line-height: 1.4;
|
|
52604
|
+
}
|
|
52605
|
+
|
|
52606
|
+
@container rb-site (max-width: 639px) {
|
|
52607
|
+
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
52608
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line {
|
|
52609
|
+
grid-template-columns: minmax(0, 1fr);
|
|
52610
|
+
align-items: stretch;
|
|
52611
|
+
}
|
|
52612
|
+
|
|
52613
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-ticket-line .er-counter {
|
|
52614
|
+
justify-content: flex-start;
|
|
52615
|
+
}
|
|
52616
|
+
}
|
|
52617
|
+
}
|
|
52618
|
+
|
|
52522
52619
|
/* Form inputs */
|
|
52523
52620
|
:where(.theme-scope) :where([data-block="event-registration"]) .er-input {
|
|
52524
52621
|
width: 100%;
|
|
@@ -61037,6 +61134,8 @@ var TAG_TEMPLATES = {
|
|
|
61037
61134
|
siteNewsletter: "riverbank:site:{siteId}:newsletter",
|
|
61038
61135
|
// Pages/routes (routable content)
|
|
61039
61136
|
siteRoutableContent: "riverbank:site:{siteId}:routable-content",
|
|
61137
|
+
siteRedirects: "riverbank:site:{siteId}:redirects",
|
|
61138
|
+
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
61040
61139
|
routeById: "riverbank:route:{routeId}",
|
|
61041
61140
|
pageById: "riverbank:page:{pageId}",
|
|
61042
61141
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
@@ -64493,6 +64592,18 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
64493
64592
|
auth: "public",
|
|
64494
64593
|
responseKind: "json"
|
|
64495
64594
|
},
|
|
64595
|
+
resolveRouteOutcome: {
|
|
64596
|
+
path: "/sites/{siteId}/route-outcome",
|
|
64597
|
+
method: "GET",
|
|
64598
|
+
tags: [
|
|
64599
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
64600
|
+
TAG_TEMPLATES.siteRedirects,
|
|
64601
|
+
TAG_TEMPLATES.siteRouteOutcomes
|
|
64602
|
+
],
|
|
64603
|
+
auth: "public",
|
|
64604
|
+
responseKind: "json",
|
|
64605
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
64606
|
+
},
|
|
64496
64607
|
getPageByPath: {
|
|
64497
64608
|
path: "/sites/{siteId}/pages",
|
|
64498
64609
|
method: "GET",
|
|
@@ -26,6 +26,8 @@ var TAG_TEMPLATES = {
|
|
|
26
26
|
siteNewsletter: "riverbank:site:{siteId}:newsletter",
|
|
27
27
|
// Pages/routes (routable content)
|
|
28
28
|
siteRoutableContent: "riverbank:site:{siteId}:routable-content",
|
|
29
|
+
siteRedirects: "riverbank:site:{siteId}:redirects",
|
|
30
|
+
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
29
31
|
routeById: "riverbank:route:{routeId}",
|
|
30
32
|
pageById: "riverbank:page:{pageId}",
|
|
31
33
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
@@ -3482,6 +3484,18 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3482
3484
|
auth: "public",
|
|
3483
3485
|
responseKind: "json"
|
|
3484
3486
|
},
|
|
3487
|
+
resolveRouteOutcome: {
|
|
3488
|
+
path: "/sites/{siteId}/route-outcome",
|
|
3489
|
+
method: "GET",
|
|
3490
|
+
tags: [
|
|
3491
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3492
|
+
TAG_TEMPLATES.siteRedirects,
|
|
3493
|
+
TAG_TEMPLATES.siteRouteOutcomes
|
|
3494
|
+
],
|
|
3495
|
+
auth: "public",
|
|
3496
|
+
responseKind: "json",
|
|
3497
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
3498
|
+
},
|
|
3485
3499
|
getPageByPath: {
|
|
3486
3500
|
path: "/sites/{siteId}/pages",
|
|
3487
3501
|
method: "GET",
|
package/dist/server/config.mjs
CHANGED
|
@@ -71,6 +71,8 @@ var TAG_TEMPLATES = {
|
|
|
71
71
|
siteNewsletter: "riverbank:site:{siteId}:newsletter",
|
|
72
72
|
// Pages/routes (routable content)
|
|
73
73
|
siteRoutableContent: "riverbank:site:{siteId}:routable-content",
|
|
74
|
+
siteRedirects: "riverbank:site:{siteId}:redirects",
|
|
75
|
+
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
74
76
|
routeById: "riverbank:route:{routeId}",
|
|
75
77
|
pageById: "riverbank:page:{pageId}",
|
|
76
78
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
@@ -3527,6 +3529,18 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3527
3529
|
auth: "public",
|
|
3528
3530
|
responseKind: "json"
|
|
3529
3531
|
},
|
|
3532
|
+
resolveRouteOutcome: {
|
|
3533
|
+
path: "/sites/{siteId}/route-outcome",
|
|
3534
|
+
method: "GET",
|
|
3535
|
+
tags: [
|
|
3536
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3537
|
+
TAG_TEMPLATES.siteRedirects,
|
|
3538
|
+
TAG_TEMPLATES.siteRouteOutcomes
|
|
3539
|
+
],
|
|
3540
|
+
auth: "public",
|
|
3541
|
+
responseKind: "json",
|
|
3542
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
3543
|
+
},
|
|
3530
3544
|
getPageByPath: {
|
|
3531
3545
|
path: "/sites/{siteId}/pages",
|
|
3532
3546
|
method: "GET",
|
package/dist/server/data.mjs
CHANGED
|
@@ -23,6 +23,8 @@ var TAG_TEMPLATES = {
|
|
|
23
23
|
siteNewsletter: "riverbank:site:{siteId}:newsletter",
|
|
24
24
|
// Pages/routes (routable content)
|
|
25
25
|
siteRoutableContent: "riverbank:site:{siteId}:routable-content",
|
|
26
|
+
siteRedirects: "riverbank:site:{siteId}:redirects",
|
|
27
|
+
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
26
28
|
routeById: "riverbank:route:{routeId}",
|
|
27
29
|
pageById: "riverbank:page:{pageId}",
|
|
28
30
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
@@ -3479,6 +3481,18 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3479
3481
|
auth: "public",
|
|
3480
3482
|
responseKind: "json"
|
|
3481
3483
|
},
|
|
3484
|
+
resolveRouteOutcome: {
|
|
3485
|
+
path: "/sites/{siteId}/route-outcome",
|
|
3486
|
+
method: "GET",
|
|
3487
|
+
tags: [
|
|
3488
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3489
|
+
TAG_TEMPLATES.siteRedirects,
|
|
3490
|
+
TAG_TEMPLATES.siteRouteOutcomes
|
|
3491
|
+
],
|
|
3492
|
+
auth: "public",
|
|
3493
|
+
responseKind: "json",
|
|
3494
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
3495
|
+
},
|
|
3482
3496
|
getPageByPath: {
|
|
3483
3497
|
path: "/sites/{siteId}/pages",
|
|
3484
3498
|
method: "GET",
|
package/dist/server/index.mjs
CHANGED
|
@@ -45,6 +45,8 @@ var TAG_TEMPLATES = {
|
|
|
45
45
|
siteNewsletter: "riverbank:site:{siteId}:newsletter",
|
|
46
46
|
// Pages/routes (routable content)
|
|
47
47
|
siteRoutableContent: "riverbank:site:{siteId}:routable-content",
|
|
48
|
+
siteRedirects: "riverbank:site:{siteId}:redirects",
|
|
49
|
+
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
48
50
|
routeById: "riverbank:route:{routeId}",
|
|
49
51
|
pageById: "riverbank:page:{pageId}",
|
|
50
52
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
@@ -3501,6 +3503,18 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3501
3503
|
auth: "public",
|
|
3502
3504
|
responseKind: "json"
|
|
3503
3505
|
},
|
|
3506
|
+
resolveRouteOutcome: {
|
|
3507
|
+
path: "/sites/{siteId}/route-outcome",
|
|
3508
|
+
method: "GET",
|
|
3509
|
+
tags: [
|
|
3510
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
3511
|
+
TAG_TEMPLATES.siteRedirects,
|
|
3512
|
+
TAG_TEMPLATES.siteRouteOutcomes
|
|
3513
|
+
],
|
|
3514
|
+
auth: "public",
|
|
3515
|
+
responseKind: "json",
|
|
3516
|
+
errors: ["validation:invalid_input", "server:internal_error"]
|
|
3517
|
+
},
|
|
3504
3518
|
getPageByPath: {
|
|
3505
3519
|
path: "/sites/{siteId}/pages",
|
|
3506
3520
|
method: "GET",
|
|
@@ -7137,7 +7151,7 @@ var SimpleCache = class {
|
|
|
7137
7151
|
};
|
|
7138
7152
|
|
|
7139
7153
|
// src/version.ts
|
|
7140
|
-
var SDK_VERSION = "0.
|
|
7154
|
+
var SDK_VERSION = "0.95.0";
|
|
7141
7155
|
|
|
7142
7156
|
// src/client/error.ts
|
|
7143
7157
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -7304,6 +7318,7 @@ function getResilienceStatusFromError(error) {
|
|
|
7304
7318
|
var PUBLIC_ENDPOINT_NAMES2 = [
|
|
7305
7319
|
"getSite",
|
|
7306
7320
|
"getContentByPath",
|
|
7321
|
+
"resolveRouteOutcome",
|
|
7307
7322
|
"listPublishedEntries",
|
|
7308
7323
|
"getPublishedEntryPreview",
|
|
7309
7324
|
"getPublicFormById",
|
|
@@ -7340,6 +7355,17 @@ var API_ENDPOINTS2 = Object.freeze({
|
|
|
7340
7355
|
auth: "public",
|
|
7341
7356
|
responseKind: "json"
|
|
7342
7357
|
},
|
|
7358
|
+
resolveRouteOutcome: {
|
|
7359
|
+
path: "/sites/{siteId}/route-outcome",
|
|
7360
|
+
method: "GET",
|
|
7361
|
+
tags: [
|
|
7362
|
+
"riverbank:site:{siteId}:routable-content",
|
|
7363
|
+
"riverbank:site:{siteId}:redirects",
|
|
7364
|
+
"riverbank:site:{siteId}:route-outcomes"
|
|
7365
|
+
],
|
|
7366
|
+
auth: "public",
|
|
7367
|
+
responseKind: "json"
|
|
7368
|
+
},
|
|
7343
7369
|
listPublishedEntries: {
|
|
7344
7370
|
path: "/public/content/{siteId}/{type}/entries",
|
|
7345
7371
|
method: "GET",
|
|
@@ -7506,6 +7532,10 @@ var RUNTIME_CACHE_DURABILITY_OVERRIDES = {
|
|
|
7506
7532
|
kind: "durable-public-stale",
|
|
7507
7533
|
staleTtlSec: DEFAULT_STALE_TTL_SEC
|
|
7508
7534
|
},
|
|
7535
|
+
resolveRouteOutcome: {
|
|
7536
|
+
kind: "memory-only",
|
|
7537
|
+
reason: "durable_rollout_pending"
|
|
7538
|
+
},
|
|
7509
7539
|
listPublishedEntries: {
|
|
7510
7540
|
kind: "memory-only",
|
|
7511
7541
|
reason: "durable_rollout_pending"
|
|
@@ -9308,6 +9338,19 @@ function createRiverbankClient(config) {
|
|
|
9308
9338
|
{ signal }
|
|
9309
9339
|
);
|
|
9310
9340
|
},
|
|
9341
|
+
async resolveRouteOutcome(params) {
|
|
9342
|
+
const { siteId, path: path3, preview = false, signal } = params;
|
|
9343
|
+
if (!siteId || !path3) {
|
|
9344
|
+
throw new Error("resolveRouteOutcome() requires siteId and path");
|
|
9345
|
+
}
|
|
9346
|
+
return unwrapResponse(
|
|
9347
|
+
await apiClient({
|
|
9348
|
+
endpoint: "resolveRouteOutcome",
|
|
9349
|
+
params: { siteId, path: path3, preview: String(preview) },
|
|
9350
|
+
options: { signal }
|
|
9351
|
+
})
|
|
9352
|
+
);
|
|
9353
|
+
},
|
|
9311
9354
|
async getAllPublishedRoutes(params) {
|
|
9312
9355
|
const { siteId, signal } = params;
|
|
9313
9356
|
if (!siteId) {
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// src/next/route-outcome-proxy.ts
|
|
2
|
+
import { NextResponse } from "next/server";
|
|
3
|
+
|
|
4
|
+
// ../core/src/assert-never.ts
|
|
5
|
+
function assertNever(value, message = "Unexpected variant") {
|
|
6
|
+
throw new Error(`${message}: ${String(value)}`);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// src/next/redirect-destination.ts
|
|
10
|
+
function normalizeIncomingSearch(search) {
|
|
11
|
+
if (!search) return "";
|
|
12
|
+
if (typeof search === "string") {
|
|
13
|
+
return search.startsWith("?") ? search.slice(1) : search;
|
|
14
|
+
}
|
|
15
|
+
if (search instanceof URLSearchParams) {
|
|
16
|
+
return search.toString();
|
|
17
|
+
}
|
|
18
|
+
const params = new URLSearchParams();
|
|
19
|
+
for (const [key, value] of Object.entries(search)) {
|
|
20
|
+
if (value === void 0) continue;
|
|
21
|
+
if (Array.isArray(value)) {
|
|
22
|
+
for (const item of value) {
|
|
23
|
+
params.append(key, item);
|
|
24
|
+
}
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
params.set(key, value);
|
|
28
|
+
}
|
|
29
|
+
return params.toString();
|
|
30
|
+
}
|
|
31
|
+
function destinationHasSearch(destination) {
|
|
32
|
+
const queryIndex = destination.indexOf("?");
|
|
33
|
+
if (queryIndex === -1) return false;
|
|
34
|
+
const hashIndex = destination.indexOf("#");
|
|
35
|
+
return hashIndex === -1 || queryIndex < hashIndex;
|
|
36
|
+
}
|
|
37
|
+
function appendSearchToRedirectDestination(destination, incomingSearch) {
|
|
38
|
+
const search = normalizeIncomingSearch(incomingSearch);
|
|
39
|
+
if (!search || destinationHasSearch(destination)) {
|
|
40
|
+
return destination;
|
|
41
|
+
}
|
|
42
|
+
const hashIndex = destination.indexOf("#");
|
|
43
|
+
if (hashIndex === -1) {
|
|
44
|
+
return `${destination}?${search}`;
|
|
45
|
+
}
|
|
46
|
+
return `${destination.slice(0, hashIndex)}?${search}${destination.slice(hashIndex)}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/next/route-outcome-proxy.ts
|
|
50
|
+
var SKIP_PATH_PATTERNS = [
|
|
51
|
+
/^\/_next(?:\/|$)/,
|
|
52
|
+
/^\/api(?:\/|$)/,
|
|
53
|
+
/^\/favicon\.ico$/,
|
|
54
|
+
/^\/robots\.txt$/,
|
|
55
|
+
/^\/sitemap\.xml$/
|
|
56
|
+
];
|
|
57
|
+
function shouldSkipPath(pathname) {
|
|
58
|
+
return SKIP_PATH_PATTERNS.some((pattern) => pattern.test(pathname));
|
|
59
|
+
}
|
|
60
|
+
function normalizeRedirectStatus(status) {
|
|
61
|
+
switch (status) {
|
|
62
|
+
case 302:
|
|
63
|
+
case 307:
|
|
64
|
+
case 308:
|
|
65
|
+
return status;
|
|
66
|
+
case 301:
|
|
67
|
+
case void 0:
|
|
68
|
+
default:
|
|
69
|
+
return 301;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function planRouteOutcomeRedirect(outcome) {
|
|
73
|
+
switch (outcome.type) {
|
|
74
|
+
case "redirect":
|
|
75
|
+
return {
|
|
76
|
+
kind: "redirect",
|
|
77
|
+
destination: outcome.destination,
|
|
78
|
+
status: normalizeRedirectStatus(outcome.status)
|
|
79
|
+
};
|
|
80
|
+
case "content":
|
|
81
|
+
case "notFound":
|
|
82
|
+
case "loadFailed":
|
|
83
|
+
return { kind: "passThrough" };
|
|
84
|
+
default:
|
|
85
|
+
return assertNever(outcome, "Unexpected route outcome");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function handleRouteOutcomeRedirect(request, options) {
|
|
89
|
+
const { pathname, search } = request.nextUrl;
|
|
90
|
+
if (shouldSkipPath(pathname)) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
const outcome = await options.client.resolveRouteOutcome({
|
|
95
|
+
siteId: options.siteId,
|
|
96
|
+
path: pathname,
|
|
97
|
+
preview: false
|
|
98
|
+
});
|
|
99
|
+
const plan = planRouteOutcomeRedirect(outcome);
|
|
100
|
+
if (plan.kind === "passThrough") {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
const destination = new URL(
|
|
104
|
+
appendSearchToRedirectDestination(plan.destination, search),
|
|
105
|
+
request.url
|
|
106
|
+
);
|
|
107
|
+
return NextResponse.redirect(destination, plan.status);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
options.onFailure?.(error, {
|
|
110
|
+
siteId: options.siteId,
|
|
111
|
+
path: pathname,
|
|
112
|
+
preview: false
|
|
113
|
+
});
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
handleRouteOutcomeRedirect,
|
|
119
|
+
planRouteOutcomeRedirect
|
|
120
|
+
};
|