riverbankcms 0.30.1 → 0.31.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.
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { t as loadConfigFile } from "./load-config-DIyqYeRP.mjs";
3
+
4
+ export { loadConfigFile };
@@ -7,7 +7,7 @@ import { existsSync as existsSync$1 } from "fs";
7
7
  import { fileURLToPath } from "url";
8
8
 
9
9
  //#region package.json
10
- var version = "0.30.1";
10
+ var version = "0.31.1";
11
11
  var peerDependencies = { "@riverbankcms/sdk": ">=0.157.0 <1.0.0" };
12
12
  var package_default = {
13
13
  name: "riverbankcms",
@@ -35,7 +35,7 @@ var package_default = {
35
35
  "clean:dist": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
36
36
  "build": "node scripts/build.mjs",
37
37
  "dev": "node scripts/build.mjs --watch",
38
- "typecheck": "tsgo --noEmit",
38
+ "typecheck": "cd ../.. && bash scripts/run-package-typecheck.sh packages/cli",
39
39
  "lint": "node ../../scripts/run-package-lint.mjs src",
40
40
  "test": "node scripts/run-tests.mjs",
41
41
  "test:bun": "node scripts/run-bun-tests.mjs",
@@ -72,7 +72,7 @@ var package_default = {
72
72
  "@types/node": "^22.18.5",
73
73
  "@types/prompts": "^2.4.9",
74
74
  "tsdown": "^0.16.5",
75
- "tsx": "^4.20.6",
75
+ "tsx": "^4.23.15",
76
76
  "typescript": "^6.0.3"
77
77
  },
78
78
  repository: {
@@ -93,7 +93,7 @@ var package_default = {
93
93
  //#endregion
94
94
  //#region src/version.ts
95
95
  /** The package manifest is the source-run fallback; builds inject this value. */
96
- const CLI_VERSION = typeof "0.30.1" === "string" ? "0.30.1" : version;
96
+ const CLI_VERSION = typeof "0.31.1" === "string" ? "0.31.1" : version;
97
97
  /**
98
98
  * The CLI's SDK peer range is bundled from the CLI manifest alongside its
99
99
  * version. Runtime config loading uses this value as the single compatibility
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Zn as parseSiteId, cr as err, lr as ok } from "./src-BntuEwG8.mjs";
2
+ import { _r as err, ar as parseSiteId, vr as ok } from "./src-exrglXYU.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";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "../src-BntuEwG8.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-AJDYca86.mjs";
2
+ import "../src-exrglXYU.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-D5NfiRLe.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 { $n as unsafeAsSiteId, B as footerNavigationLayouts, Bn as unsafeAsSafeDownloadFilename, Dn as unsafeAsEntitlementId, Et as localScheduleTimePattern, F as parseMailingListGlobalForm, Fn as unsafeAsFileChecksumSha256, Ft as BOOKING_COURSE_INSTALMENT_DEADLINES, Gn as unsafeAsProductId, Hn as unsafeAsStorageBucketName, In as unsafeAsMediaAssetId, It as validateBookingPaymentOptionKinds, K as parsePublicContactDetails, Ln as unsafeAsOriginalFilename, Mn as parseMediaAssetId, Mt as parseBookingTimeZone, Nn as unsafeAsDeclaredMimeType, Nt as parseUtcIsoDateTimeString, P as parseConfiguredMailingListProvider, Pn as unsafeAsDetectedMimeType, Q as stableJsonStringify, Rn as unsafeAsPositiveByteCount, Un as unsafeAsStoragePath, Vn as unsafeAsSiteScopedStoragePath, W as isCanonicalRichTextDoc, Wn as unsafeAsUploadSessionId, X as SENSITIVE_COLLECTION_MODES, Y as SENSITIVE_COLLECTION_CONFIRMATION_VERSION, Yn as unsafeAsSiteFontId, Zn as parseSiteId, bn as unsafeAsBookingRequirementId, cn as mapReadonlyNonEmptyArray, cr as err, er as unsafeAsUserId, et as locationValueSchema, f as resolveSiteVerticalBookingConfig, h as ORDINARY_EVENT_PRESET_VALUES, jn as unsafeAsBookingSessionId, lr as ok, m as EVENT_PRESET_VALUES, on as fromArray, ot as isPresent, q as parseWeeklyOpeningHours, r as isRecord$5, s as NAVIGATION_LOCATIONS, sn as mapNonEmptyArray, t as OFFLINE_PAYMENT_METHODS, vn as assertNever, z as parseFooterCompositionV1, zn as unsafeAsPositiveSeconds } from "./src-BntuEwG8.mjs";
2
+ import { $ as parseWeeklyOpeningHours, $n as unsafeAsProductId, B as parseConfiguredMailingListProvider, Bn as parseMediaAssetId, En as assertNever, Fn as unsafeAsEntitlementId, G as parseFooterCompositionV1, Gn as unsafeAsOriginalFilename, Hn as unsafeAsDetectedMimeType, Ht as validateBookingPaymentOptionKinds, Jn as unsafeAsSafeDownloadFilename, K as footerNavigationLayouts, Kn as unsafeAsPositiveByteCount, Mt as localScheduleTimePattern, On as unsafeAsBookingRequirementId, Q as parsePublicContactDetails, Qn as unsafeAsUploadSessionId, Rt as parseBookingTimeZone, Un as unsafeAsFileChecksumSha256, V as parseMailingListGlobalForm, Vn as unsafeAsDeclaredMimeType, Vt as BOOKING_COURSE_INSTALMENT_DEADLINES, Wn as unsafeAsMediaAssetId, X as isCanonicalRichTextDoc, Xn as unsafeAsStorageBucketName, Yn as unsafeAsSiteScopedStoragePath, Zn as unsafeAsStoragePath, _ as ORDINARY_EVENT_PRESET_VALUES, _r as err, ar as parseSiteId, cr as unsafeAsUserId, ft as isPresent, g as EVENT_PRESET_VALUES, gn as mapReadonlyNonEmptyArray, hn as mapNonEmptyArray, it as stableJsonStringify, l as NAVIGATION_LOCATIONS, m as resolveSiteVerticalBookingConfig, mn as fromArray, nt as SENSITIVE_COLLECTION_MODES, ot as locationValueSchema, qn as unsafeAsPositiveSeconds, r as isRecord$5, rr as unsafeAsSiteFontId, sr as unsafeAsSiteId, t as OFFLINE_PAYMENT_METHODS, tt as SENSITIVE_COLLECTION_CONFIRMATION_VERSION, vr as ok, zn as unsafeAsBookingSessionId, zt as parseUtcIsoDateTimeString } from "./src-exrglXYU.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { z } from "zod";
5
5
 
@@ -305,11 +305,13 @@ function fieldMeaning(schema, meaning$2) {
305
305
  * caller's exact schema type, so it also works where that type is still generic.
306
306
  */
307
307
  function openFieldMeaning(schema, meaning$2) {
308
- return Object.assign(schema.meta({ productMeaning: meaning$2 }), { meaning: meaning$2 });
308
+ const described = z.clone(schema);
309
+ z.globalRegistry.add(described, { productMeaning: meaning$2 });
310
+ return Object.assign(described, { meaning: meaning$2 });
309
311
  }
310
312
  /** This is the single adapter from Zod metadata to the human-facing projection. */
311
313
  function schemaMeaning(schema) {
312
- const own = schema.meta()?.productMeaning;
314
+ const own = z.globalRegistry.get(schema)?.productMeaning;
313
315
  if (own !== undefined) return own;
314
316
  if (schema instanceof z.ZodOptional || schema instanceof z.ZodNullable || schema instanceof z.ZodReadonly) {
315
317
  const inner = schema.unwrap();
@@ -1761,7 +1763,7 @@ const RichTextDocSchema = z.object({
1761
1763
  * guard aligned with this detailed Zod validator.
1762
1764
  */
1763
1765
  function isRichTextDoc(value) {
1764
- return RichTextDocSchema.safeParse(value).success;
1766
+ return z.safeParse(RichTextDocSchema, value).success;
1765
1767
  }
1766
1768
  /**
1767
1769
  * Build a canonical {@link RichTextDoc} from plain-text paragraphs.
@@ -2353,6 +2355,7 @@ const SYSTEM_BLOCK_KINDS = [
2353
2355
  "block.body-text",
2354
2356
  "block.location-map",
2355
2357
  "block.faq",
2358
+ "block.list",
2356
2359
  "block.testimonials",
2357
2360
  "block.team-members",
2358
2361
  "block.embed",
@@ -2364,6 +2367,7 @@ const SYSTEM_BLOCK_KINDS = [
2364
2367
  "block.contact-newsletter",
2365
2368
  "block.appointment-booking",
2366
2369
  "block.appointment-services",
2370
+ "block.service-details",
2367
2371
  "block.weekly-slot-availability",
2368
2372
  "block.event-registration",
2369
2373
  ...EVENT_DISPLAY_BLOCK_KINDS,
@@ -8404,23 +8408,25 @@ function getStoredAssetUsageStatusForAsset(asset, statusByAssetId) {
8404
8408
  function formatMediaUsageStage(stage) {
8405
8409
  return stage === "draft" ? "Draft" : "Published";
8406
8410
  }
8411
+ /** A page or entry's name, with its path when it has one. */
8412
+ function titledPath(title, draftPath, publishedPath) {
8413
+ const path = draftPath ?? publishedPath ?? null;
8414
+ return path ? `${title} (${path})` : title;
8415
+ }
8407
8416
  function mediaUsageLocationLabel(location) {
8408
8417
  switch (location.kind) {
8409
8418
  case "pageBlock": {
8410
- const path = location.pageDraftPath ?? location.pagePublishedPath ?? null;
8411
- const title = location.pageTitle ?? "Untitled page";
8412
- const where = path ? `${title} (${path})` : title;
8419
+ const where = titledPath(location.pageTitle ?? "Untitled page", location.pageDraftPath, location.pagePublishedPath);
8413
8420
  return `${where} — ${formatMediaUsageStage(location.stage)} — Block: ${location.blockKind}`;
8414
8421
  }
8415
8422
  case "entrySlotBlock": {
8416
- const path = location.routeDraftPath ?? location.routePublishedPath ?? null;
8417
- const where = path ? `${location.entryTitle} (${path})` : location.entryTitle;
8423
+ const where = titledPath(location.entryTitle, location.routeDraftPath, location.routePublishedPath);
8418
8424
  return `${where} — Page Content: ${location.slotKey} — ${formatMediaUsageStage(location.stage)} — Block: ${location.blockKind}`;
8419
8425
  }
8420
8426
  case "surfaceSlotBlock": return `Page surface ${location.pageSurfaceId} — Page Content: ${location.slotKey} — ${formatMediaUsageStage(location.stage)} — Block: ${location.blockKind}`;
8427
+ case "pageSurfaceContent": return `${location.pageTitle ?? "Untitled page"} — Page content — ${formatMediaUsageStage(location.stage)}`;
8421
8428
  case "contentEntry": {
8422
- const path = location.routeDraftPath ?? location.routePublishedPath ?? null;
8423
- const where = path ? `${location.entryTitle} (${path})` : location.entryTitle;
8429
+ const where = titledPath(location.entryTitle, location.routeDraftPath, location.routePublishedPath);
8424
8430
  return `${where} — ${formatMediaUsageStage(location.stage)}`;
8425
8431
  }
8426
8432
  case "newsletterCampaign": return `Newsletter campaign: ${location.campaignName}`;
@@ -9550,6 +9556,15 @@ function projectContentEntryMediaUsageLocation(params) {
9550
9556
  stage
9551
9557
  };
9552
9558
  }
9559
+ function projectPageSurfaceContentMediaUsageLocation(params) {
9560
+ return {
9561
+ kind: "pageSurfaceContent",
9562
+ siteId: params.siteId,
9563
+ pageSurfaceId: params.pageSurface.id,
9564
+ pageTitle: params.pageSurface.title,
9565
+ stage: params.stage
9566
+ };
9567
+ }
9553
9568
  function projectProductFileDownloadMediaUsageLocation(params) {
9554
9569
  return {
9555
9570
  kind: "productFileDownload",
@@ -11380,7 +11395,7 @@ function createSiteStyleSelectionChangeSchema(parts) {
11380
11395
  }),
11381
11396
  z.strictObject({
11382
11397
  kind: z.literal("set-button-style"),
11383
- buttonStyleSelection: parts.buttonStyleSelection.nullable()
11398
+ buttonStyleSelection: z.nullable(parts.buttonStyleSelection)
11384
11399
  }),
11385
11400
  z.strictObject({
11386
11401
  kind: z.literal("set-palette"),
@@ -11388,7 +11403,7 @@ function createSiteStyleSelectionChangeSchema(parts) {
11388
11403
  }),
11389
11404
  z.strictObject({
11390
11405
  kind: z.literal("set-typography"),
11391
- typography: parts.typography.nullable()
11406
+ typography: z.nullable(parts.typography)
11392
11407
  }),
11393
11408
  z.strictObject({
11394
11409
  kind: z.literal("set-header"),
@@ -11397,7 +11412,7 @@ function createSiteStyleSelectionChangeSchema(parts) {
11397
11412
  }),
11398
11413
  z.strictObject({
11399
11414
  kind: z.literal("set-footer-look"),
11400
- footerLookId: parts.footerLookId.nullable()
11415
+ footerLookId: z.nullable(parts.footerLookId)
11401
11416
  }),
11402
11417
  z.strictObject({
11403
11418
  kind: z.literal("set-footer-navigation-layout"),
@@ -11953,7 +11968,7 @@ function createBookingPricingOptionFields(boundary) {
11953
11968
  isActive: z.boolean().optional(),
11954
11969
  sortOrder: nonNegativeIntegerSchema.optional(),
11955
11970
  capacityLimit: fieldMeaning(positiveIntegerSchema.nullable().optional(), {
11956
- ...meaning("Tickets available", "The most tickets of this type that can be sold."),
11971
+ ...meaning("Tickets available", "The most tickets of this type that can be sold for each date. If people book the whole course at once, it's the most for the whole course."),
11957
11972
  toggle: {
11958
11973
  label: "Set a ticket limit",
11959
11974
  description: "Use this when only a certain number of this ticket type should be sold."
@@ -12062,7 +12077,7 @@ const eventPricingSchemas = createEventPricingSchemas(pricingOptionSchema, curre
12062
12077
  const freePricingSchema = fieldMeaning(eventPricingSchemas.free.extend(pricingMetadataFields), eventPricingSchemas.free.meaning);
12063
12078
  const tieredPricingSchema = fieldMeaning(eventPricingSchemas.tiered.extend({
12064
12079
  ...pricingMetadataFields,
12065
- options: fieldMeaning(eventPricingSchemas.tiered.shape.options.readonly(), eventPricingSchemas.tiered.shape.options.meaning)
12080
+ options: fieldMeaning(z.readonly(eventPricingSchemas.tiered.shape.options), eventPricingSchemas.tiered.shape.options.meaning)
12066
12081
  }).superRefine((pricing, ctx) => {
12067
12082
  const identifiers = new Set();
12068
12083
  pricing.options.forEach((option, index) => {
@@ -14580,7 +14595,7 @@ const commandTypeSet = new Set(siteCommandTypes);
14580
14595
  function parseCommandBatch(input) {
14581
14596
  const unknownTypeErrors = findUnknownCommandTypes(input);
14582
14597
  if (unknownTypeErrors.length > 0) return err(unknownTypeErrors);
14583
- const parsed = siteCommandBatchSchema.safeParse(input);
14598
+ const parsed = z.safeParse(siteCommandBatchSchema, input);
14584
14599
  if (!parsed.success) {
14585
14600
  return err(parsed.error.issues.map((issue$1) => invalidPayloadError(input, issue$1)));
14586
14601
  }
@@ -15422,6 +15437,7 @@ const sdkEventUpsertOptionalFieldSchemas = {
15422
15437
  "off",
15423
15438
  "on"
15424
15439
  ]).optional(),
15440
+ bookings: z.enum(["move", "cancel"]).optional(),
15425
15441
  attendeeMigration: z.object({ pricingOptionIdentifier: z.string().trim().min(1) }).strict().optional()
15426
15442
  };
15427
15443
  function timingIssue(path, message) {