riverbankcms 0.7.1 → 0.9.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.
@@ -183,12 +183,10 @@ riverbankcms pull pages home # Specific page with blocks
183
183
  riverbankcms pull navigation # Navigation menus
184
184
  riverbankcms pull settings # Site settings
185
185
  riverbankcms pull forms # Forms
186
- riverbankcms pull theme # Theme to content/themes/current.json
187
186
  riverbankcms pull venues # Event venues
188
187
  riverbankcms pull event-categories # Event categories
189
188
  riverbankcms pull events # Event series
190
189
  riverbankcms pull events summer-fest # Specific event series
191
- riverbankcms pull --with-theme # Pull content and theme together
192
190
 
193
191
  # Custom output directory
194
192
  riverbankcms pull --output ./src/content
@@ -203,15 +201,11 @@ riverbankcms pull --output ./src/content
203
201
  | `--yes` | Skip confirmation prompt |
204
202
  | `--local-media` | Download media referenced by identifiers to content/media |
205
203
  | `--sync-media` | Sync media files between environments |
206
- | `--with-theme` | Also pull theme when pulling all content |
207
- | `--name <name>` | Theme name for `pull theme` / `pull --with-theme` (default: current) |
208
204
  | `--no-meta` | Skip writing `.meta/` and media manifest files (content files still written) |
209
205
  | `--diff` | Show human-readable field-level diff with before/after values (requires `--dry-run`) |
210
206
 
211
207
  **Theme files:**
212
208
 
213
- - `riverbankcms pull theme` writes to `content/themes/current.json` (or `contentDir/themes/current.json` if configured).
214
- - `riverbankcms pull` does not pull theme by default. Use `riverbankcms pull theme` or `riverbankcms pull --with-theme`.
215
209
 
216
210
  ### push
217
211
 
@@ -236,11 +230,9 @@ riverbankcms push pages home # Specific page with blocks
236
230
  riverbankcms push navigation # Navigation menus
237
231
  riverbankcms push settings # Site settings / branding
238
232
  riverbankcms push forms # Forms
239
- riverbankcms push theme # Push content/themes/{activeTheme|current}.json
240
233
  riverbankcms push venues # Event venues
241
234
  riverbankcms push event-categories # Event categories
242
235
  riverbankcms push events # Event series, page-surface routes, and surface-slot blocks
243
- riverbankcms push --with-theme # Also push theme when pushing all content
244
236
 
245
237
  # JSON diff verbosity for agents (folded into the --json envelope)
246
238
  riverbankcms push --dry-run --json --diff-detail=summary
@@ -268,7 +260,6 @@ If unrelated local files would be included by a broad scope, stage a temporary c
268
260
  | `--diff-detail <mode>` | Diff verbosity carried in the `--json` envelope: `summary` (default) or `full` |
269
261
  | `--json-diff [mode]` | **[Deprecated]** Alias of `--diff-detail`; folded into the `--json` envelope (warns on stderr) |
270
262
  | `--with-config` | Push SDK schema/config before dependent file content |
271
- | `--with-theme` | Also push theme when pushing all content |
272
263
  | `--sync-media` | Sync media files from local to remote environment |
273
264
  | `--merge-remote` | Plan an entries/pages three-way merge for `--env=remote` that preserves remote edits |
274
265
  | `--delete-orphaned` | Delete CMS entries not present in local files |
@@ -280,8 +271,6 @@ If unrelated local files would be included by a broad scope, stage a temporary c
280
271
 
281
272
  **Theme files:**
282
273
 
283
- - `riverbankcms push theme` reads from `content/themes/{activeTheme}.json` (falls back to `current.json`).
284
- - `riverbankcms push` does not push theme by default (to avoid overwriting dashboard edits). Use `riverbankcms push theme` or `riverbankcms push --with-theme`.
285
274
 
286
275
  **Delete Missing Entries:**
287
276
 
@@ -388,11 +377,13 @@ For theme and footer pushes, stale resolution updates only the metadata timestam
388
377
  "homepageId": null,
389
378
  "seoDefaults": null,
390
379
  "logoIdentifier": "positive-play-primary-logo",
380
+ "logoDarkBackgroundIdentifier": "positive-play-logo-light",
391
381
  "faviconIdentifier": "positive-play-primary-logo"
392
382
  }
393
383
  ```
394
384
 
395
385
  - Use `logoIdentifier` / `faviconIdentifier` to manage the site logo and favicon from the repo
386
+ - `logoDarkBackgroundIdentifier` is optional: a version of the logo designed for dark backgrounds. The default header and footer use it on dark surfaces; without it, `logoIdentifier` is used everywhere
396
387
  - The identifiers should match files in `content/media/`
397
388
  - `riverbankcms push settings` reuses the normal local-media upload flow before updating site settings, without pushing unrelated content
398
389
  - `riverbankcms pull settings` warns and omits a branding field if the current CMS asset cannot be represented by an identifier yet
@@ -216,6 +216,7 @@ Use `content/settings.json` as the repo-managed source of truth for branding:
216
216
  "homepageId": null,
217
217
  "seoDefaults": null,
218
218
  "logoIdentifier": "positive-play-primary-logo",
219
+ "logoDarkBackgroundIdentifier": "positive-play-logo-light",
219
220
  "faviconIdentifier": "positive-play-primary-logo"
220
221
  }
221
222
  ```
@@ -230,7 +231,8 @@ Recommended workflow:
230
231
  Notes:
231
232
 
232
233
  - `riverbankcms push settings` uploads missing branding files through the normal local-media sync path before updating site settings, without pushing unrelated content
233
- - `riverbankcms pull settings` warns and omits `logoIdentifier` / `faviconIdentifier` if the current CMS branding asset has no media identifier yet
234
+ - `logoDarkBackgroundIdentifier` is optional. It names a version of your logo designed for dark backgrounds; the default header and footer draw it when they sit on a dark surface, and fall back to `logoIdentifier` when it is absent. Custom headers and footers receive both as `logoVariants`
235
+ - `riverbankcms pull settings` warns and omits `logoIdentifier` / `logoDarkBackgroundIdentifier` / `faviconIdentifier` if the current CMS branding asset has no media identifier yet
234
236
  - Dashboard branding edits and CLI pushes both update the same site settings row, so treat them as last-write-wins and pull before pushing after dashboard-side edits
235
237
 
236
238
  ### Configure the booking vertical
@@ -42,7 +42,6 @@ content/
42
42
  Themes are optional. Only add `content/themes/` when this site explicitly opts into CMS/local theme rendering; fully headless sites use the host-owned `SITE_RENDERING` override-only configuration and do not need a theme file. The CLI still supports pulling a theme when you choose that opt-in:
43
43
 
44
44
  ```bash
45
- riverbankcms pull theme
46
45
  ```
47
46
 
48
47
  ### 3. Make Changes
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { a as classifySdkEventBookingOffer, i as classifySdkEventSchedule, r as sdkEventUpsertOptionalFieldSchemas } from "./sdk-event-upsert-Cp043nSP.mjs";
3
- import { l as EVENT_PRESET_VALUES } from "./src-B8fOSKJ6.mjs";
2
+ import { a as classifySdkEventBookingOffer, i as classifySdkEventSchedule, r as sdkEventUpsertOptionalFieldSchemas } from "./sdk-event-upsert-BNxbxaA0.mjs";
3
+ import { l as EVENT_PRESET_VALUES } from "./src-DbmhanBI.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region ../blocks/src/lib/typeGuards.ts
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { t as loadConfigFile } from "./load-config-Cf5uPEAn.mjs";
3
+
4
+ export { loadConfigFile };
@@ -1,9 +1,13 @@
1
1
  #!/usr/bin/env node
2
+ import { dirname, resolve } from "path";
2
3
  import { existsSync, readFileSync } from "node:fs";
3
- import { dirname, join, parse } from "node:path";
4
+ import { dirname as dirname$1, join, parse } from "node:path";
5
+ import { createJiti } from "jiti";
6
+ import { existsSync as existsSync$1 } from "fs";
7
+ import { fileURLToPath } from "url";
4
8
 
5
9
  //#region package.json
6
- var version = "0.7.1";
10
+ var version = "0.9.0";
7
11
  var peerDependencies = { "@riverbankcms/sdk": ">=0.139.0 <1.0.0" };
8
12
  var package_default = {
9
13
  name: "riverbankcms",
@@ -79,7 +83,7 @@ var package_default = {
79
83
  //#endregion
80
84
  //#region src/version.ts
81
85
  /** The package manifest is the source-run fallback; builds inject this value. */
82
- const CLI_VERSION = typeof "0.7.1" === "string" ? "0.7.1" : version;
86
+ const CLI_VERSION = typeof "0.9.0" === "string" ? "0.9.0" : version;
83
87
  /**
84
88
  * The CLI's SDK peer range is bundled from the CLI manifest alongside its
85
89
  * version. Runtime config loading uses this value as the single compatibility
@@ -158,13 +162,13 @@ function isVersionInPeerRange(version$1, range) {
158
162
  return compareVersions(parsedVersion, range.floor) >= 0 && compareVersions(parsedVersion, range.ceiling) < 0;
159
163
  }
160
164
  function resolveSdkMetadataPath(fromPath) {
161
- let directory = dirname(fromPath);
165
+ let directory = dirname$1(fromPath);
162
166
  const root = parse(directory).root;
163
167
  while (true) {
164
168
  const manifestPath = join(directory, "node_modules", SDK_PACKAGE_NAME, "package.json");
165
169
  if (existsSync(manifestPath)) return manifestPath;
166
170
  if (directory === root) break;
167
- directory = dirname(directory);
171
+ directory = dirname$1(directory);
168
172
  }
169
173
  throw new Error(`Unable to locate ${SDK_PACKAGE_NAME} package metadata.`);
170
174
  }
@@ -217,4 +221,83 @@ function assertCompatibleSdkPeer(fromPath, options = {}) {
217
221
  }
218
222
 
219
223
  //#endregion
220
- export { assertCompatibleSdkPeer as n, CLI_VERSION as r, CliSdkPeerError as t };
224
+ //#region src/load-config.ts
225
+ /**
226
+ * Config file loader for riverbank.config.ts
227
+ *
228
+ * Uses jiti to load TypeScript config files at runtime without
229
+ * requiring a build step.
230
+ */
231
+ const DEFAULT_CONFIG_FILENAME = "riverbank.config.ts";
232
+ const currentDir = dirname(fileURLToPath(import.meta.url));
233
+ /**
234
+ * Load builder config from a TypeScript file.
235
+ *
236
+ * @param configPath - Path to config file, or directory containing riverbank.config.ts
237
+ * @returns The loaded config object
238
+ * @throws Error if config file not found or invalid
239
+ */
240
+ async function loadConfigFile(configPath) {
241
+ const resolvedPath = resolveConfigPath(configPath);
242
+ if (!existsSync$1(resolvedPath)) {
243
+ throw new Error(`Config file not found: ${resolvedPath}\n` + `Create a riverbank.config.ts file or specify a path with --config`);
244
+ }
245
+ assertCompatibleSdkPeer(resolvedPath);
246
+ process.stderr.write(`Loading config from ${resolvedPath}...\n`);
247
+ const alias = {};
248
+ const sourceConfigPath = resolve(currentDir, "..", "config", "index.ts");
249
+ const sourceIndexPath = resolve(currentDir, "..", "index.ts");
250
+ if (existsSync$1(sourceConfigPath)) {
251
+ alias["@riverbankcms/sdk/config"] = sourceConfigPath;
252
+ }
253
+ if (existsSync$1(sourceIndexPath)) {
254
+ alias["@riverbankcms/sdk"] = sourceIndexPath;
255
+ }
256
+ const blocksDir = resolve(currentDir, "../../../blocks/src");
257
+ if (existsSync$1(blocksDir)) {
258
+ alias["@riverbankcms/blocks"] = blocksDir;
259
+ }
260
+ const mediaCorePath = resolve(currentDir, "../../../media-core/src/index.ts");
261
+ if (existsSync$1(mediaCorePath)) {
262
+ alias["@riverbankcms/media-core"] = mediaCorePath;
263
+ }
264
+ const jiti = createJiti(import.meta.url, {
265
+ fsCache: false,
266
+ moduleCache: false,
267
+ alias: Object.keys(alias).length > 0 ? alias : undefined,
268
+ jsx: Object.keys(alias).length > 0
269
+ });
270
+ try {
271
+ const configModule = await jiti.import(resolvedPath);
272
+ const config = configModule.default ?? configModule.config ?? configModule;
273
+ if (!config || typeof config !== "object") {
274
+ throw new Error("Config file must export a configuration object");
275
+ }
276
+ return config;
277
+ } catch (error) {
278
+ if (error instanceof Error) {
279
+ throw new Error(`Failed to load config: ${error.message}`);
280
+ }
281
+ throw error;
282
+ }
283
+ }
284
+ /**
285
+ * Resolve config path from user input.
286
+ *
287
+ * If no path provided, looks for riverbank.config.ts in cwd.
288
+ * If path is a directory, looks for riverbank.config.ts in that directory.
289
+ * If path is a file, uses it directly.
290
+ */
291
+ function resolveConfigPath(configPath) {
292
+ if (!configPath) {
293
+ return resolve(process.cwd(), DEFAULT_CONFIG_FILENAME);
294
+ }
295
+ const resolved = resolve(configPath);
296
+ if (existsSync$1(resolved) && !resolved.endsWith(".ts") && !resolved.endsWith(".js")) {
297
+ return resolve(resolved, DEFAULT_CONFIG_FILENAME);
298
+ }
299
+ return resolved;
300
+ }
301
+
302
+ //#endregion
303
+ export { CliSdkPeerError as n, CLI_VERSION as r, loadConfigFile as t };