@riverbankcms/sdk 0.84.1 → 0.84.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/dist/{PreviewEditorSidebar-X7RLMEI6.mjs → PreviewEditorSidebar-4PH35ZIE.mjs} +3 -3
- package/dist/{PreviewEditorUI-CT67N4O3.mjs → PreviewEditorUI-WHMCRJGM.mjs} +11 -6
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +2 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/sdk-event-payment-terms.d.ts +16 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +11 -2
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -0
- package/dist/_dts/api/src/types.d.ts +1 -0
- package/dist/_dts/api/src/url.d.ts +12 -4
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -1
- package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +8 -0
- package/dist/_dts/preview-next/src/client/preview/MaintenanceModeBadge.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +2 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-LBBPD2IW.mjs → chunk-4QNLOTES.mjs} +11 -16
- package/dist/{chunk-X5ZCSU6F.mjs → chunk-NFWGLRZZ.mjs} +1 -70
- package/dist/{chunk-QRKJDWT7.mjs → chunk-OCGTXHSO.mjs} +8 -7
- package/dist/{chunk-3LXFQS7T.mjs → chunk-PYDHOMEO.mjs} +1 -1
- package/dist/{chunk-RCTJAZSK.mjs → chunk-WFPYN7KA.mjs} +2 -2
- package/dist/{chunk-O62NDCTI.mjs → chunk-ZR2GQK2A.mjs} +6 -37
- package/dist/cli/index.mjs +10 -11
- package/dist/client/{bookingForm-DYXT6YB6.mjs → bookingForm-36CWQUMV.mjs} +1 -1
- package/dist/client/bookings.mjs +1 -4
- package/dist/client/{chunk-UHDWIXVR.mjs → chunk-3C2VTPWI.mjs} +3 -2
- package/dist/client/{chunk-GFSQNTRW.mjs → chunk-SDIYSQAY.mjs} +0 -4
- package/dist/client/client.mjs +12 -16
- package/dist/client/{courseRegistration-YBOGURTA.mjs → courseRegistration-TMKU6ABO.mjs} +1 -1
- package/dist/client/{eventCalendar-K4QJVCMD.mjs → eventCalendar-G6TI32X6.mjs} +2 -2
- package/dist/client/{eventCombined-MTXGMTCZ.mjs → eventCombined-SCKEMNAR.mjs} +2 -2
- package/dist/client/{eventDetails-3PC4NL3U.mjs → eventDetails-XPIFXXPK.mjs} +2 -2
- package/dist/client/{eventListing-TFJET6DN.mjs → eventListing-7QFMEMGT.mjs} +2 -2
- package/dist/client/{eventRegistration-QGPBGJTW.mjs → eventRegistration-TOODSZUI.mjs} +2 -2
- package/dist/client/{form-MDKR4FNB.mjs → form-MTCMVCZT.mjs} +1 -1
- package/dist/client/{newsletterForm-ZR5UDGBT.mjs → newsletterForm-PCAIPFMA.mjs} +1 -1
- package/dist/client/rendering/client.mjs +2 -5
- package/dist/client/rendering/islands.mjs +9 -9
- package/dist/client/rendering.mjs +2 -5
- package/dist/client/spam-protection.mjs +0 -4
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-7HJYPRWQ.mjs → sdk-runtime-QLOCYKVU.mjs} +6 -6
- package/dist/server/index.mjs +10 -11
- package/dist/server/next.mjs +10 -11
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/server.mjs +10 -11
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-EIMQ3S2V.mjs +0 -8
package/dist/server/next.mjs
CHANGED
|
@@ -66894,17 +66894,21 @@ function looksLikeLocalAuthority(authority) {
|
|
|
66894
66894
|
const normalized = authority.toLowerCase();
|
|
66895
66895
|
return normalized === "localhost" || normalized.startsWith("localhost:") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.includes(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".test");
|
|
66896
66896
|
}
|
|
66897
|
-
function
|
|
66897
|
+
function normalizeDashboardOrigin(input) {
|
|
66898
66898
|
const trimmed = input.trim();
|
|
66899
66899
|
if (!trimmed) return "";
|
|
66900
66900
|
const withoutTrailingSlash = trimmed.replace(/\/+$/, "");
|
|
66901
66901
|
const withoutApiSuffix = withoutTrailingSlash.replace(/\/api\/?$/, "");
|
|
66902
66902
|
if (/^https?:\/\//i.test(withoutApiSuffix)) {
|
|
66903
|
-
return withoutApiSuffix;
|
|
66903
|
+
return new URL(withoutApiSuffix).origin;
|
|
66904
66904
|
}
|
|
66905
66905
|
const authority = withoutApiSuffix.replace(/^\/+/, "");
|
|
66906
66906
|
const protocol = looksLikeLocalAuthority(authority) ? "http" : "https";
|
|
66907
|
-
return `${protocol}://${authority}
|
|
66907
|
+
return new URL(`${protocol}://${authority}`).origin;
|
|
66908
|
+
}
|
|
66909
|
+
function deriveCmsApiUrlFromDashboardUrl(input) {
|
|
66910
|
+
const origin = normalizeDashboardOrigin(input);
|
|
66911
|
+
return origin ? `${origin}/api` : "";
|
|
66908
66912
|
}
|
|
66909
66913
|
function getCmsApiUrl() {
|
|
66910
66914
|
if (typeof window !== "undefined") {
|
|
@@ -66916,15 +66920,10 @@ function getCmsApiUrl() {
|
|
|
66916
66920
|
}
|
|
66917
66921
|
const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
|
|
66918
66922
|
if (dashboardUrl) {
|
|
66919
|
-
|
|
66920
|
-
return `${base}/api`;
|
|
66921
|
-
}
|
|
66922
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
66923
|
-
if (legacyApiUrl) {
|
|
66924
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
66923
|
+
return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
|
|
66925
66924
|
}
|
|
66926
66925
|
throw new Error(
|
|
66927
|
-
"NEXT_PUBLIC_DASHBOARD_URL is not configured. Set
|
|
66926
|
+
"CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
|
|
66928
66927
|
);
|
|
66929
66928
|
}
|
|
66930
66929
|
function resolveApiBaseUrl() {
|
|
@@ -70343,7 +70342,7 @@ var CircuitOpenError = class extends Error {
|
|
|
70343
70342
|
};
|
|
70344
70343
|
|
|
70345
70344
|
// src/version.ts
|
|
70346
|
-
var SDK_VERSION = "0.84.
|
|
70345
|
+
var SDK_VERSION = "0.84.2";
|
|
70347
70346
|
|
|
70348
70347
|
// src/next/content-load-failure.ts
|
|
70349
70348
|
var SdkContentLoadError = RiverbankContentLoadError;
|
package/dist/server/prebuild.mjs
CHANGED
package/dist/server/server.mjs
CHANGED
|
@@ -6443,17 +6443,21 @@ function looksLikeLocalAuthority(authority) {
|
|
|
6443
6443
|
const normalized = authority.toLowerCase();
|
|
6444
6444
|
return normalized === "localhost" || normalized.startsWith("localhost:") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.includes(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".test");
|
|
6445
6445
|
}
|
|
6446
|
-
function
|
|
6446
|
+
function normalizeDashboardOrigin(input) {
|
|
6447
6447
|
const trimmed = input.trim();
|
|
6448
6448
|
if (!trimmed) return "";
|
|
6449
6449
|
const withoutTrailingSlash = trimmed.replace(/\/+$/, "");
|
|
6450
6450
|
const withoutApiSuffix = withoutTrailingSlash.replace(/\/api\/?$/, "");
|
|
6451
6451
|
if (/^https?:\/\//i.test(withoutApiSuffix)) {
|
|
6452
|
-
return withoutApiSuffix;
|
|
6452
|
+
return new URL(withoutApiSuffix).origin;
|
|
6453
6453
|
}
|
|
6454
6454
|
const authority = withoutApiSuffix.replace(/^\/+/, "");
|
|
6455
6455
|
const protocol = looksLikeLocalAuthority(authority) ? "http" : "https";
|
|
6456
|
-
return `${protocol}://${authority}
|
|
6456
|
+
return new URL(`${protocol}://${authority}`).origin;
|
|
6457
|
+
}
|
|
6458
|
+
function deriveCmsApiUrlFromDashboardUrl(input) {
|
|
6459
|
+
const origin = normalizeDashboardOrigin(input);
|
|
6460
|
+
return origin ? `${origin}/api` : "";
|
|
6457
6461
|
}
|
|
6458
6462
|
function getCmsApiUrl() {
|
|
6459
6463
|
if (typeof window !== "undefined") {
|
|
@@ -6465,15 +6469,10 @@ function getCmsApiUrl() {
|
|
|
6465
6469
|
}
|
|
6466
6470
|
const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
|
|
6467
6471
|
if (dashboardUrl) {
|
|
6468
|
-
|
|
6469
|
-
return `${base}/api`;
|
|
6470
|
-
}
|
|
6471
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
6472
|
-
if (legacyApiUrl) {
|
|
6473
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
6472
|
+
return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
|
|
6474
6473
|
}
|
|
6475
6474
|
throw new Error(
|
|
6476
|
-
"NEXT_PUBLIC_DASHBOARD_URL is not configured. Set
|
|
6475
|
+
"CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
|
|
6477
6476
|
);
|
|
6478
6477
|
}
|
|
6479
6478
|
function resolveApiBaseUrl() {
|
|
@@ -6999,7 +6998,7 @@ var SimpleCache = class {
|
|
|
6999
6998
|
};
|
|
7000
6999
|
|
|
7001
7000
|
// src/version.ts
|
|
7002
|
-
var SDK_VERSION = "0.84.
|
|
7001
|
+
var SDK_VERSION = "0.84.2";
|
|
7003
7002
|
|
|
7004
7003
|
// src/client/error.ts
|
|
7005
7004
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
export { SdkPreviewModeRuntime } from './chunk-QRKJDWT7.mjs';
|
|
3
|
-
import './chunk-3LXFQS7T.mjs';
|
|
4
|
-
import './chunk-X5ZCSU6F.mjs';
|
|
5
|
-
import './chunk-RCTJAZSK.mjs';
|
|
6
|
-
import './chunk-O62NDCTI.mjs';
|
|
7
|
-
import './chunk-LBBPD2IW.mjs';
|
|
8
|
-
import './chunk-R7POPVJR.mjs';
|