riverbankcms 0.33.0 → 0.35.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/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +528 -284
- package/dist/cli/init-docs/content/cli-reference.md +1 -2
- package/dist/cli/init-docs/content/content-management.md +18 -6
- package/dist/cli/init-docs/content/getting-started.md +4 -4
- package/dist/cli/init-docs/content/workflow-content-types.md +8 -0
- package/dist/cli/init-docs/content/workflow-preview-mode.md +1 -0
- package/dist/{entryCommands-wcOr-fKy.mjs → entryCommands-D-1ldejM.mjs} +178 -114
- package/dist/{eventUpsertInputSchema-Df67rs3n.mjs → eventUpsertInputSchema-D1CXYu1M.mjs} +3 -2
- package/dist/{load-config-CexajivS.mjs → load-config-DB_S_gdr.mjs} +2 -2
- package/dist/load-config-DSGN-x3K.mjs +4 -0
- package/dist/{plan-Bhv4iKa3.mjs → plan-CMMvs6Nr.mjs} +9 -12
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-Y4Iyx0N4.mjs → sdk-event-upsert-DoazwQVt.mjs} +33 -3
- package/dist/{src-90EK8rKq.mjs → src-CysOxz1U.mjs} +880 -770
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-CKgy6Yct.mjs +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { Nr as err, Pr as ok, xr as parseSiteId } from "./src-CysOxz1U.mjs";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -1338,6 +1338,7 @@ function portalPageTemplates() {
|
|
|
1338
1338
|
return [
|
|
1339
1339
|
portalPageTemplate("redeem", "createRedeemPage", "../../../riverbank.config", "export const metadata = { title: 'Redeem a gift card', referrer: 'no-referrer', robots: { index: false, follow: false } };\n"),
|
|
1340
1340
|
portalPageTemplate("portal", "createPortalPage", "../../../riverbank.config"),
|
|
1341
|
+
portalPageTemplate("portal/continue", "createPortalContinuePage", "../../../../riverbank.config", "export const metadata = { title: 'Continue', robots: { index: false, follow: false } };\n"),
|
|
1341
1342
|
portalPageTemplate("portal/tickets/[registrationId]", "createPortalTicketPage", "../../../../../riverbank.config"),
|
|
1342
1343
|
portalPageTemplate("portal/digital-products/[entitlementId]", "createPortalDigitalProductPage", "../../../../../riverbank.config"),
|
|
1343
1344
|
portalPageTemplate("portal/digital-products/[entitlementId]/files/[assetId]", "createPortalDigitalProductFilePage", "../../../../../../../riverbank.config")
|
|
@@ -1799,9 +1800,8 @@ function riverbankClientTemplate(config) {
|
|
|
1799
1800
|
);
|
|
1800
1801
|
}
|
|
1801
1802
|
`;
|
|
1802
|
-
const cacheConfig = config.withPreviewMode ? ` enabled:
|
|
1803
|
-
` :
|
|
1804
|
-
`;
|
|
1803
|
+
const cacheConfig = config.withPreviewMode ? ` ...(previewMode ? { enabled: false } : {}), // No caching in preview mode
|
|
1804
|
+
` : "";
|
|
1805
1805
|
const previewExport = config.withPreviewMode ? `
|
|
1806
1806
|
/** Check if preview mode is enabled. */
|
|
1807
1807
|
export function isPreviewMode(): boolean {
|
|
@@ -2068,14 +2068,11 @@ function starterContentTemplates(config) {
|
|
|
2068
2068
|
items: []
|
|
2069
2069
|
}
|
|
2070
2070
|
] }),
|
|
2071
|
-
jsonTemplate("content/settings.json", {
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
allowIndexingInProduction: true
|
|
2077
|
-
}
|
|
2078
|
-
}),
|
|
2071
|
+
jsonTemplate("content/settings.json", { seoDefaults: {
|
|
2072
|
+
title: config.siteName,
|
|
2073
|
+
description: `${config.siteName} website`,
|
|
2074
|
+
allowIndexingInProduction: true
|
|
2075
|
+
} }),
|
|
2079
2076
|
...starterEntryTemplates(config)
|
|
2080
2077
|
];
|
|
2081
2078
|
}
|
package/dist/scaffold/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../src-
|
|
3
|
-
import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-
|
|
2
|
+
import "../src-CysOxz1U.mjs";
|
|
3
|
+
import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-CMMvs6Nr.mjs";
|
|
4
4
|
|
|
5
5
|
export { deriveGeneratedPackageRanges, deriveScaffoldLocalManifest, deriveScaffoldPlan, findPackageManifestPath, loadGeneratedPackageRanges, preflightScaffoldPlan, preflightScaffoldTargets, prepareScaffoldExecution, writeScaffoldFiles };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { An as mapNonEmptyArray, C as ORDINARY_EVENT_PRESET_VALUES, Cr as unsafeAsSiteId, Dr as unsafeAsEventCategoryId, Dt as validateBookingPaymentOptionKinds, Et as BOOKING_COURSE_INSTALMENT_DEADLINES, J as parseMailingListGlobalForm, Nr as err, Pr as ok, Q as parseFooterCompositionV1, S as EVENT_PRESET_VALUES, Un as unsafeAsBookingRequirementId, Vn as assertNever, Vt as MAX_BOOKING_CUT_OFF_HOURS, Xn as unsafeAsEntitlementId, ar as unsafeAsMediaAssetId, b as resolveSiteVerticalBookingConfig, c as STAFF_OPERATIONAL_CAPABILITIES, cn as localScheduleTimePattern, cr as unsafeAsPositiveSeconds, dn as parseUtcIsoDateTimeString, dr as unsafeAsStorageBucketName, er as unsafeAsBookingSessionId, fr as unsafeAsStoragePath, ft as stableJsonStringify, gn as parseBookingTimeZone, h as NAVIGATION_LOCATIONS, ht as locationValueSchema, i as isRecord$6, ir as unsafeAsFileChecksumSha256, jn as mapReadonlyNonEmptyArray, kn as fromArray, lr as unsafeAsSafeDownloadFilename, lt as SENSITIVE_COLLECTION_CONFIRMATION_VERSION, mr as unsafeAsProductId, n as OFFLINE_PAYMENT_METHODS, nr as unsafeAsDeclaredMimeType, o as applyClearable, or as unsafeAsOriginalFilename, ot as parsePublicContactDetails, pr as unsafeAsUploadSessionId, q as parseConfiguredMailingListProvider, rr as unsafeAsDetectedMimeType, rt as isCanonicalRichTextDoc, s as clearableFrom, sr as unsafeAsPositiveByteCount, st as parseWeeklyOpeningHours, t as isEventOccurrenceRouteSegment, tr as parseMediaAssetId, ur as unsafeAsSiteScopedStoragePath, ut as SENSITIVE_COLLECTION_MODES, wr as unsafeAsUserId, xr as parseSiteId, xt as isPresent, yr as unsafeAsSiteFontId } from "./src-CysOxz1U.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
@@ -720,6 +720,21 @@ function sanitizeSlug(value) {
|
|
|
720
720
|
if (!value) return "";
|
|
721
721
|
return value.split("/").map((segment) => normalizeSlugSegment(segment)).filter(Boolean).join("/");
|
|
722
722
|
}
|
|
723
|
+
/**
|
|
724
|
+
* Compares a slug from a file with the stored one. A pulled file sends the stored
|
|
725
|
+
* slug back as it is, so an exact match is never an edit, even for an older slug
|
|
726
|
+
* that isn't in sanitised form. Sanitising only applies to a slug someone changed,
|
|
727
|
+
* and one that cleans up to the stored slug isn't an edit either.
|
|
728
|
+
*/
|
|
729
|
+
function compareEntrySlug(requested, stored) {
|
|
730
|
+
if (!requested || stored === undefined || requested === stored) return { kind: "unchanged" };
|
|
731
|
+
const slug = sanitizeSlug(requested);
|
|
732
|
+
if (slug === stored) return { kind: "unchanged" };
|
|
733
|
+
return slug ? {
|
|
734
|
+
kind: "edited",
|
|
735
|
+
slug
|
|
736
|
+
} : { kind: "unusable" };
|
|
737
|
+
}
|
|
723
738
|
function normalizeSlugSegment(segment) {
|
|
724
739
|
const normalized = segment.trim().normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
725
740
|
return normalized;
|
|
@@ -7401,6 +7416,7 @@ const courseBookingSettingsSchema = z.object({
|
|
|
7401
7416
|
"disabled"
|
|
7402
7417
|
]).optional(),
|
|
7403
7418
|
collectAllAttendeeDetails: z.boolean().nullable().optional(),
|
|
7419
|
+
bookingCutOffHours: z.number().int().min(0).max(MAX_BOOKING_CUT_OFF_HOURS).nullable().optional(),
|
|
7404
7420
|
cancellationPolicy: z.object({
|
|
7405
7421
|
refunds: coursePolicyOverrideSchema,
|
|
7406
7422
|
transfers: coursePolicyOverrideSchema
|
|
@@ -43358,6 +43374,7 @@ const upsertContentEntryCommandSchema = z.object({
|
|
|
43358
43374
|
identifier: z.string().min(1).optional(),
|
|
43359
43375
|
contentTypeKey: z.string().min(1),
|
|
43360
43376
|
slug: z.string().min(1).optional(),
|
|
43377
|
+
renameAddress: z.literal(true).optional(),
|
|
43361
43378
|
title: z.string().min(1).optional(),
|
|
43362
43379
|
manualOrder: z.number().int().min(0).optional(),
|
|
43363
43380
|
data: unknownRecordSchema.optional(),
|
|
@@ -45752,13 +45769,25 @@ function eventCategoryManagementFields(command) {
|
|
|
45752
45769
|
|
|
45753
45770
|
//#endregion
|
|
45754
45771
|
//#region ../site-commands/src/pageSeo.ts
|
|
45755
|
-
/**
|
|
45772
|
+
/** What a new page gets, and what null asks for on a stored one. Shared with CLI previews. */
|
|
45756
45773
|
function resolvePageUpsertSeo(input) {
|
|
45757
45774
|
return {
|
|
45758
45775
|
seoTitle: input.seoTitle ?? input.title,
|
|
45759
45776
|
seoDescription: input.seoDescription ?? null
|
|
45760
45777
|
};
|
|
45761
45778
|
}
|
|
45779
|
+
/**
|
|
45780
|
+
* What an upsert writes over a stored page: a field left out keeps its value and
|
|
45781
|
+
* null returns it to the default. A stored SEO title that matches the old title
|
|
45782
|
+
* is that default, so it moves with a rename.
|
|
45783
|
+
*/
|
|
45784
|
+
function resolvePageUpsertSeoOverStored(stored, input) {
|
|
45785
|
+
const authoredSeoTitle = stored.metaTitle === stored.title ? null : stored.metaTitle;
|
|
45786
|
+
return {
|
|
45787
|
+
seoTitle: applyClearable(authoredSeoTitle, clearableFrom(input.seoTitle)) ?? input.title,
|
|
45788
|
+
seoDescription: applyClearable(stored.metaDescription, clearableFrom(input.seoDescription))
|
|
45789
|
+
};
|
|
45790
|
+
}
|
|
45762
45791
|
|
|
45763
45792
|
//#endregion
|
|
45764
45793
|
//#region ../api/src/event-visibility.ts
|
|
@@ -46036,6 +46065,7 @@ const sdkEventUpsertOptionalFieldSchemas = {
|
|
|
46036
46065
|
"off",
|
|
46037
46066
|
"on"
|
|
46038
46067
|
]).optional(),
|
|
46068
|
+
bookingCutOffHours: z.number().int().min(0).max(MAX_BOOKING_CUT_OFF_HOURS).nullable().optional(),
|
|
46039
46069
|
bookings: z.enum(["move", "cancel"]).optional(),
|
|
46040
46070
|
attendeeMigration: z.object({ pricingOptionIdentifier: z.string().trim().min(1) }).strict().optional()
|
|
46041
46071
|
};
|
|
@@ -46284,4 +46314,4 @@ function parseSdkEventRunUpsertInput(input, runIndex, options) {
|
|
|
46284
46314
|
}
|
|
46285
46315
|
|
|
46286
46316
|
//#endregion
|
|
46287
|
-
export { walkAndCollectImageAttrs as $, headerStyleIdValues as $n, flatInkParametersSchema as $t, parseSiteChromeBackgroundColorToken as A, buildEntryScaffold as An,
|
|
46317
|
+
export { walkAndCollectImageAttrs as $, headerStyleIdValues as $n, flatInkParametersSchema as $t, parseSiteChromeBackgroundColorToken as A, buildEntryScaffold as An, createContentEntryRef as Ar, getMimeType as At, sectionStylesOverrideSchema as B, isResolvedInternalLinkEntityType as Bn, slugPart as Br, footerPreferencesSchema as Bt, blockOrderIdentifiersForCommand as C, bookingPaymentCollectionOptionSchema as Cn, makeBoundaryId as Cr, parseCanonicalMediaIdentifier as Ct, pagePathForCommand as D, RichTextDocSchema as Dn, createBlockRef as Dr, deriveVideoSlotPolicy as Dt, pageIdentifierForCommand as E, sdkEntrySlotBlocksInputSchema as En, ianaTimezoneSchema as Er, slugifyMediaIdentifier as Et, defaultHeaderBrandPreferences as F, entryLinkSchema as Fn, createNavigationRef as Fr, MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES as Ft, headerInteractionQuietPalette as G, parseGradientPresetId as Gn, cardVariantRoleValues as Gt, skinBookingBarSchema as H, pageLinkSchema as Hn, __toESM as Hr, boxlessCardVariantValue as Ht, footerModeSchema as I, externalLinkSchema as In, createPageRef as Ir, classifyKnownMimeType as It, boxBackgroundOverlaySchema as J, asHeaderLayoutId as Jn, surfaceCardRoleValues as Jt, blockCustomCssRuleSchema as K, SUPPORTED_LOADER_ENDPOINTS as Kn, itemRoleValues as Kt, cardStylesOverrideSchema as L, internalLinkSchema as Ln, createSiteCommandSiteRef as Lr, managementMediaLibraryUploadLimitForMimeType as Lt, defaultHeaderPreferences as M, findUnfilledSentinels as Mn, createEventSeriesRef as Mr, normalizeAmbiguousStoragePathForSite as Mt, defaultHeaderNavPreferences as N, RESOLVED_INTERNAL_LINK_ENTITY_TYPES as Nn, createFooterRef as Nr, parseRelativeStoragePath as Nt, hasConfiguredBookingVertical as O, isRichTextDoc as On, createBlocksRef as Or, resolveVideoSelectionIntentForMediaField as Ot, defaultHeaderBrandPresentation as P, customLinkSchema as Pn, createFormRef as Pr, FILE_SIZE_LIMITS as Pt, summarizePortableMediaReferences as Q, headerLayoutIdValues as Qn, flatInkHoverTreatmentSchema as Qt, containerStylesOverrideSchema as R, internalResolvedLinkSchema as Rn, createVenueRef as Rr, parseSafeDownloadFilename as Rt, blockIdentifierForCommand as S, eventBookingOfferIntentSchema as Sn, asSiteStyleId as Sr, buildMediaIdentifierFromFilename as St, pageIdentifierForBlockCommand as T, eventCommandScheduleSchema as Tn, bookingQuestionAttachmentSchema as Tr, resolveMediaIdentifier as Tt, headerVariantValues as U, ICON_PICKER_PRESETS as Un, cardRoleSchema as Ut, themeSchema as V, linkSchema as Vn, __commonJSMin as Vr, getFontWidthRange as Vt, headerInteractionPaletteValues as W, gradientPresetIdValues as Wn, cardRoleValues as Wt, runtimeBoxBackgroundSchema as X, bookingPageLookIdValues as Xn, buttonStyleSelectionSchema as Xt, boxBackgroundSchema as Y, asHeaderStyleId as Yn, BUTTON_STYLE_IDS as Yt, collectPortableMediaReferencesFromContent as Z, footerLookIdValues as Zn, editorialLinkParametersSchema as Zt, mapEventCommandContent as _, paletteTokenNameSchema as _n, asDesignBoundaryId as _r, resolveManagedMediaReference as _t, classifySdkEventSchedule as a, buttonVariantIdSchema as an, arrangementModes as ar, parseAspectRatioValue as at, getSiteCommandMetadata as b, changeBookingQuestionsInputSchema as bn, asLayoutVariantKey as br, mediaTypeDiscriminants as bt, isEventVisibility as c, parseOpaqueButtonColourToken as cn, headingDecorationColorTokenValues as cr, getDirectImageUrlForSiteScopedPath as ct, venueManagementFields as d, hexColorSchema as dn, visibleHeadingDecorationFamilyValues as dr, imageMediaSchema as dt, quietArrowParametersSchema as en, pageDesignEditorBackgroundOverrideOwner as er, deleteEnvSpecificKeys as et, sortRecord as f, normalizePaletteHex as fn, asAppearancePresetId as fr, mediaSchema as ft, resolveEventSeriesWaitlistMapping as g, paletteModeSchema as gn, asDesignBlockId as gr, buildRenderableMediaAssetIndex as gt, parseAndPlanCommandBatchForTypes as h, paletteColorsSchema as hn, asBoundaryOptionId as hr, videoMediaSchema as ht, sdkEventUpsertOptionalFieldSchemas as i, buttonSystemSchema as in, VARIANT_ROLES as ir, isExplicitRectCrop as it, backgroundAppearanceColorTokenNames as j, validateEntryInstance as jn, createEventCategoryRef as jr, asRecord as jt, headerPreferencesSchema as k, sanitizeHref as kn, createCommandRef as kr, getExtensionForMimeType as kt, resolvePageUpsertSeo as l, PALETTE_TOKEN_NAMES as ln, isArrangementMode as lr, getImageUrl as lt, createDryRunReport as m, paletteColorsFromEntries as mn, asBlockOrderIndex as mr, runtimeMediaSchema as mt, sdkCourseBookingSettingsSchema as n, buttonEffectApplicationSchema as nn, siteChromeBackgroundOverrideOwner as nr, rotateNormalizedPoint as nt, classifySdkEventBookingOffer as o, buttonVisualStatesSchema as on, eventListTreatmentValues as or, resolveMediaTransformForAspect as ot, stableStringify as p, paletteColorEntries as pn, asBlockContentVersionId as pr, persistableMediaSchema as pt, customCssRuleSchema as q, asFooterLookId as qn, openCardRoleValue as qt, sdkEventOccurrenceInputSchema as r, buttonPressOffsetSchema as rn, SYSTEM_BLOCK_KINDS as rr, normalizeWidthCandidates as rt, eventVisibilitySchema as s, opaqueButtonColourTokenSchema as sn, eyebrowTreatmentValues as sr, getDirectImageUrlForRelativePath as st, classifySdkEventTiming as t, squareOutlineParametersSchema as tn, parseBookingPageLookId as tr, looksLikeUuid as tt, eventCategoryManagementFields as u, blockColorTokenNames as un, tileTreatmentValues as ur, isSiteScopedDirectImageStoragePath as ut, evaluateSiteCommandBatchExposure as v, parseColorTokenParts as vn, asDesignPageId as vr, PUBLIC_FILE_FIELD_KINDS as vt, entryIdentifierForCommand as w, bookingPaymentTermsSchema as wn, compareEntrySlug as wr, parseMediaIdentifier as wt, eventManagementTiming as x, require_dist as xn, asPageFlowPresetId as xr, mediaIdentifierSchema as xt, evaluateSiteCommandExposure as y, parseThemeColorToken as yn, asDesignSystemTemplateId as yr, isDisplayMediaKind as yt, headerPositioningValues as z, internalRouteOnlyLinkSchema as zn, refSlug as zr, defaultFooterPreferences as zt };
|