riverbankcms 0.20.0 → 0.21.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 +4 -4
- package/dist/cli/index.mjs +62123 -699
- package/dist/cli/init-docs/content/getting-started.md +27 -0
- package/dist/entryCommands-DSQZqznu.mjs +23110 -0
- package/dist/{eventUpsertInputSchema-VVBVGA6x.mjs → eventUpsertInputSchema-zCTx0fdF.mjs} +233 -7
- package/dist/{load-config-gqUEjIyB.mjs → load-config-B68gtN45.mjs} +3 -3
- package/dist/load-config-ghkXBKim.mjs +4 -0
- package/dist/{plan-HAEMHc5T.mjs → plan-CkMANumv.mjs} +36 -3
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{richTextSchema-DTvrDDF5.mjs → sdk-event-upsert-CrOuJrxo.mjs} +46 -271
- package/dist/{src-Dixcv4PB.mjs → src-BENi4Q5k.mjs} +28 -17
- package/dist/testing.mjs +4 -4
- package/package.json +2 -2
- package/dist/entryCommands-8kDjOex0.mjs +0 -111695
- package/dist/load-config-Cut7_6t_.mjs +0 -4
|
@@ -1994,6 +1994,10 @@ function resolveBookingTimeZoneId(...candidates) {
|
|
|
1994
1994
|
}
|
|
1995
1995
|
/** Canonical business-zone admission, shared by server and public wire boundaries. */
|
|
1996
1996
|
const DEFAULT_BOOKING_BUSINESS_TIME_ZONE = "Europe/London";
|
|
1997
|
+
/** Effect boundary for browser-authored local inputs; formats no displayed date. */
|
|
1998
|
+
function getRuntimeBookingTimeZone() {
|
|
1999
|
+
return resolveBookingTimeZoneId(new Intl.DateTimeFormat("en-GB").resolvedOptions().timeZone);
|
|
2000
|
+
}
|
|
1997
2001
|
function resolveBookingBusinessTimeZone(value) {
|
|
1998
2002
|
return resolveBookingTimeZoneId(value, DEFAULT_BOOKING_BUSINESS_TIME_ZONE);
|
|
1999
2003
|
}
|
|
@@ -2127,7 +2131,7 @@ function formatBookingTime(input, format = {
|
|
|
2127
2131
|
* omission instead of depending on locale-specific spacing or punctuation.
|
|
2128
2132
|
* Callers must only use it for an English presentation contract.
|
|
2129
2133
|
*/
|
|
2130
|
-
function formatBookingCompactEnglishTime(input) {
|
|
2134
|
+
function formatBookingCompactEnglishTime(input, options = {}) {
|
|
2131
2135
|
const date = new Date(input.startsAt);
|
|
2132
2136
|
if (Number.isNaN(date.getTime())) {
|
|
2133
2137
|
return input.startsAt;
|
|
@@ -2135,16 +2139,22 @@ function formatBookingCompactEnglishTime(input) {
|
|
|
2135
2139
|
const parts = formatToPartsLookup(date, input.locale ?? "en-GB", input.timeZone, {
|
|
2136
2140
|
hour: "numeric",
|
|
2137
2141
|
minute: "2-digit",
|
|
2138
|
-
hourCycle: "h12"
|
|
2142
|
+
hourCycle: "h12",
|
|
2143
|
+
...options.seconds === "include" ? { second: "2-digit" } : {}
|
|
2139
2144
|
});
|
|
2145
|
+
return compactEnglishClock(parts, options.seconds) ?? input.startsAt;
|
|
2146
|
+
}
|
|
2147
|
+
/** Precision and zero-minute omission are one decision for all compact clocks. */
|
|
2148
|
+
function compactEnglishClock(parts, seconds) {
|
|
2140
2149
|
const hour = parts.get("hour");
|
|
2141
2150
|
const minute = parts.get("minute");
|
|
2142
2151
|
const dayPeriod = parts.get("dayPeriod");
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2152
|
+
const second = parts.get("second");
|
|
2153
|
+
if (hour === undefined || minute === undefined || dayPeriod === undefined) return null;
|
|
2154
|
+
const token = dayPeriod.toLowerCase();
|
|
2155
|
+
if (seconds === "include") return second === undefined ? null : `${hour}:${minute}:${second}${token}`;
|
|
2146
2156
|
const clock = minute === "00" ? hour : `${hour}:${minute}`;
|
|
2147
|
-
return `${clock}${
|
|
2157
|
+
return `${clock}${token}`;
|
|
2148
2158
|
}
|
|
2149
2159
|
function formatBookingDateTime(input, format = DEFAULT_BOOKING_DATE_TIME_FORMAT) {
|
|
2150
2160
|
if (format === DEFAULT_BOOKING_DATE_TIME_FORMAT) {
|
|
@@ -2432,19 +2442,19 @@ function formatDateRange(start, endInclusive, context, options = {}) {
|
|
|
2432
2442
|
return preserveOrder ? `${presentDate(first, context, profile)} – ${presentDate(last, context, profile)}` : presentDateRange(first, last, context, profile);
|
|
2433
2443
|
}
|
|
2434
2444
|
function formatDateTime(value, context, options) {
|
|
2435
|
-
return presentDateTime(value, context, displayProfile(options, options.zone));
|
|
2445
|
+
return presentDateTime(value, context, displayProfile(options, options.zone, options.seconds));
|
|
2436
2446
|
}
|
|
2437
2447
|
function formatDateTimeRange(span, context, options) {
|
|
2438
|
-
return presentDateTimeRange(span, context, displayProfile(options, options.zone));
|
|
2448
|
+
return presentDateTimeRange(span, context, displayProfile(options, options.zone, options.seconds));
|
|
2439
2449
|
}
|
|
2440
2450
|
function formatTime(value, context, options) {
|
|
2441
|
-
return presentTime(value, context, displayProfile({}, options.zone));
|
|
2451
|
+
return presentTime(value, context, displayProfile({}, options.zone, options.seconds));
|
|
2442
2452
|
}
|
|
2443
2453
|
function formatTimeRange(start, end, context, options) {
|
|
2444
2454
|
return presentTimeRange({
|
|
2445
2455
|
start,
|
|
2446
2456
|
end
|
|
2447
|
-
}, context, displayProfile({}, options.zone));
|
|
2457
|
+
}, context, displayProfile({}, options.zone, options.seconds));
|
|
2448
2458
|
}
|
|
2449
2459
|
/** Sole date projection/typography owner, used by display and scheduled adapters. */
|
|
2450
2460
|
function presentDate(value, context, profile) {
|
|
@@ -2551,13 +2561,14 @@ function combinedFormat(date, clock) {
|
|
|
2551
2561
|
...clock.format
|
|
2552
2562
|
};
|
|
2553
2563
|
}
|
|
2554
|
-
function displayProfile(options, zone) {
|
|
2564
|
+
function displayProfile(options, zone, seconds) {
|
|
2555
2565
|
return {
|
|
2556
2566
|
kind: "display",
|
|
2557
2567
|
dateFormat: dateFormat(options),
|
|
2558
2568
|
clock: {
|
|
2559
2569
|
kind: "compact",
|
|
2560
|
-
localeSource: "product"
|
|
2570
|
+
localeSource: "product",
|
|
2571
|
+
seconds
|
|
2561
2572
|
},
|
|
2562
2573
|
zone
|
|
2563
2574
|
};
|
|
@@ -2570,7 +2581,7 @@ function presentClock(value, context, clock) {
|
|
|
2570
2581
|
startsAt: value,
|
|
2571
2582
|
timeZone: context.timeZone,
|
|
2572
2583
|
locale: clock.localeSource === "product" ? "en-GB" : context.locale
|
|
2573
|
-
}) : getDateTimeFormatter(context.locale, context.timeZone, clock.format).format(new Date(value));
|
|
2584
|
+
}, { seconds: clock.seconds }) : getDateTimeFormatter(context.locale, context.timeZone, clock.format).format(new Date(value));
|
|
2574
2585
|
}
|
|
2575
2586
|
function offsetToken(value, context) {
|
|
2576
2587
|
return getDateTimeFormatter("en-GB", context.timeZone, { timeZoneName: "longOffset" }).formatToParts(new Date(value)).find((part) => part.type === "timeZoneName")?.value ?? "";
|
|
@@ -2584,7 +2595,7 @@ function formatTimeUntil(value, now, context) {
|
|
|
2584
2595
|
function dateFormat(options) {
|
|
2585
2596
|
const style = options.date ?? "long";
|
|
2586
2597
|
return {
|
|
2587
|
-
day: style === "omit" ? undefined : style === "numeric" ? "2-digit" : "numeric",
|
|
2598
|
+
day: style === "omit" || options.day === "omit" ? undefined : style === "numeric" ? "2-digit" : "numeric",
|
|
2588
2599
|
month: style === "omit" ? undefined : style === "numeric" ? "2-digit" : style,
|
|
2589
2600
|
...options.year === "omit" ? {} : { year: "numeric" },
|
|
2590
2601
|
...options.weekday ? { weekday: options.weekday } : {}
|
|
@@ -2624,7 +2635,7 @@ function formatRelative(value, now, context, direction) {
|
|
|
2624
2635
|
if (Math.abs(days) > 7) return formatDate({
|
|
2625
2636
|
kind: "instant",
|
|
2626
2637
|
value
|
|
2627
|
-
}, context);
|
|
2638
|
+
}, context, { date: "short" });
|
|
2628
2639
|
const formatter = new Intl.RelativeTimeFormat(context.locale, { numeric: "auto" });
|
|
2629
2640
|
if (days !== 0) return formatter.format(days, "day");
|
|
2630
2641
|
const unit = magnitude < 3600 ? "minute" : "hour";
|
|
@@ -8142,7 +8153,7 @@ function parseSiteNavigationLocations(rows) {
|
|
|
8142
8153
|
*/
|
|
8143
8154
|
const PORTAL_NAV_DEFAULT_LABELS = {
|
|
8144
8155
|
loggedOut: "Login",
|
|
8145
|
-
loggedIn: "My
|
|
8156
|
+
loggedIn: "My account"
|
|
8146
8157
|
};
|
|
8147
8158
|
|
|
8148
8159
|
//#endregion
|
|
@@ -8271,4 +8282,4 @@ function mergeBag(stored, patch, options) {
|
|
|
8271
8282
|
}
|
|
8272
8283
|
|
|
8273
8284
|
//#endregion
|
|
8274
|
-
export {
|
|
8285
|
+
export { formatLocalScheduleTime as $, parseEventSeriesId as $t, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as A, unsafeAsSiteScopedStoragePath as An, publicEventPricingDisplay as At, isPresent as B, parsePositiveCents as Bt, stableJsonStringify as C, unsafeAsPositiveByteCount as Cn, resolveFlexibleBalanceInitialPaymentCents as Ct, parseMailingListSignedSourceToken as D, unsafeAsSafeDownloadFilename as Dn, formatEventPricing as Dt, parseMailingListContentVersionId as E, unsafeAsProductId as En, formatBookingPriceDisplay as Et, DEFAULT_MAILING_LIST_TARGETING as F, unsafeAsUserId as Fn, fromArray as Ft, formatDateRange as G, formatCurrencyAmount as Gt, toLocationCoordinates as H, toNonNegativeCents as Ht, planMailingListChoicePresentation as I, err as In, mapNonEmptyArray as It, buildBookingUtcDateWindow as J, formatDurationUnitLabel as Jt, formatDateTimeRange as K, parseCurrencyCode as Kt, isCanonicalRichTextDoc as L, ok as Ln, mapReadonlyNonEmptyArray as Lt, parseFooterCompositionV1 as M, unsafeAsStorageBucketName as Mn, publicEventPricingType as Mt, footerNavigationLayouts as N, unsafeAsStoragePath as Nn, resolveExactOrFreePriceDisplay as Nt, parseMailingListRuntimeContext as O, unsafeAsSiteFontId as On, isPublicEventPricingOptionDisplayable as Ot, parseMailingListPlacementTargeting as P, unsafeAsUploadSessionId as Pn, resolvePricingOptionsPriceDisplay as Pt, formatLocalScheduleDate as Q, parseDatedOfferingCapacityHoldId as Qt, parsePublicContactDetails as R, isNonNegativeWholeCents as Rt, parseManagementKey as S, unsafeAsPassId as Sn, resolveFlexibleBalanceDueAt as St, parseMailingListBlockId as T, unsafeAsPricingOptionId as Tn, parseEventPageSurfaceSubject as Tt, selectCategoryView as U, unsafeAsNonNegativeCents as Ut, normalizeLocationAddressText as V, toCents as Vt, formatDate as W, unsafeAsPositiveCents as Wt, formatBookingDateParts as X, parseCustomerId as Xt, formatBookingDate as Y, parseApiKeyId as Yt, formatBookingTime as Z, parseDatedOfferingCapacityHoldAuditRef as Zt, orderedLiveRunSessions as _, unsafeAsEventSeriesId as _n, getBookingInstalmentDepositRefundability as _t, canonicalizeConfiguredBookingVerticalConfig as a, parseSiteTermsVersionId as an, resolveBookingBusinessTimeZone as at, createSecret as b, unsafeAsOccurrenceId as bn, omitZeroAmountFutureRows as bt, resolveSiteVerticalBookingConfig as c, unsafeAsBookingRequirementId as cn, toScheduledBookingDateTime as ct, ORDINARY_EVENT_PRESET_VALUES as d, unsafeAsDeclaredMimeType as dn, validateBookingPaymentOptionKinds as dt, parseMediaAssetId as en, getBookingLocalDateKey as et, SURFACE_EVENT_PRESET_VALUES as f, unsafeAsDemoCapability as fn, isLiveOrderInstalmentPlanStatus as ft, nextLiveRunSessionStartMs as g, unsafeAsEventOfferingId as gn, clampConfiguredAmount as gt, CANCELLED_SESSION_STATUS as h, unsafeAsEventInstanceId as hn, addIntervalPreservingMonthAnchor as ht, areConfiguredBookingVerticalConfigsEqual as i, parseSiteId as in, parseUtcIsoDateTimeString as it, parseMailingListProviderScope as j, unsafeAsStaffMemberId as jn, publicEventPricingOptions as jt, assessMailingListTargeting as k, unsafeAsSiteId as kn, publicEventPricingCurrency as kt, DEFAULT_EVENT_TYPE_PRESETS as l, unsafeAsBookingSessionId as ln, toUtcIsoDateTimeString as lt, publicReadFreshnessSeconds as m, unsafeAsEntitlementId as mn, isSettleableOrderInstalmentPlanStatus as mt, EVENT_PRESET_VOCABULARY as n, parsePageId as nn, getLocalScheduleTime as nt, parseVerticalId as o, parseUserId as on, toBookingTimeZone as ot, WHOLE_SERIES_EVENT_PRESET_VALUES as p, unsafeAsDetectedMimeType as pn, isSettleableFlexibleBalanceContractStatus as pt, inferSiteDateLocale as q, assertNever as qt, NAVIGATION_LOCATIONS as r, parseRetiredCourseId as rn, localScheduleTimePattern as rt, parseVerticalPresetId as s, unsafeAsAppointmentResourceId as sn, toScheduledBookingDateRange as st, resolveEventCatalogue as t, parseMembershipId as tn, getLocalScheduleDate as tt, EVENT_PRESET_VALUES as u, unsafeAsCheckoutLineId as un, parseBookingTimeZone as ut, resolveWholeSeriesBookingPhase as v, unsafeAsFileChecksumSha256 as vn, getBookingInstalmentPlanIntervalCount as vt, slugify as w, unsafeAsPositiveSeconds as wn, deriveTotalTicketQuantity as wt, exposeSecret as x, unsafeAsOriginalFilename as xn, splitAmountWithRemainderInFirst as xt, resolveWholeSeriesRunLifecycle as y, unsafeAsMediaAssetId as yn, getBookingInstalmentProtectedDepositAmountCents as yt, assertAllowedPublicUrl as z, parseNonNegativeCents as zt };
|
package/dist/testing.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./
|
|
3
|
-
import "./src-
|
|
4
|
-
import {
|
|
5
|
-
import "./load-config-
|
|
2
|
+
import "./sdk-event-upsert-CrOuJrxo.mjs";
|
|
3
|
+
import "./src-BENi4Q5k.mjs";
|
|
4
|
+
import { An as createOutput, H as syncLocalMediaForPush, Ht as preparePushConfigTarget, L as calculateEntryDiffs, U as syncLocalMediaForPull, o as executeEntryCommandPlanAsSyncResult, pt as writeMediaManifest, rt as readEntries, t as compileEntryPushCommands, zt as applyPushConfigPlan } from "./entryCommands-DSQZqznu.mjs";
|
|
5
|
+
import "./load-config-B68gtN45.mjs";
|
|
6
6
|
|
|
7
7
|
export { applyPushConfigPlan, calculateEntryDiffs, compileEntryPushCommands, createOutput, executeEntryCommandPlanAsSyncResult, preparePushConfigTarget, readEntries, syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "riverbankcms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Riverbank CMS command-line tools for SDK site developers",
|
|
5
5
|
"bin": {
|
|
6
6
|
"riverbankcms": "dist/cli/index.mjs"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"zod": "^4.3.6"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@riverbankcms/sdk": ">=0.
|
|
46
|
+
"@riverbankcms/sdk": ">=0.156.0 <1.0.0"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
49
|
"@napi-rs/keyring": "1.3.0"
|