riverbankcms 0.2.0 → 0.4.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/README.md CHANGED
@@ -19,3 +19,17 @@ Safety notes: `--verify-noop` is an applied-write check and cannot be combined
19
19
  with `--dry-run`. Remote writes in JSON output or a non-interactive terminal
20
20
  must include `--yes`; otherwise the CLI refuses before loading or mutating the
21
21
  target.
22
+
23
+ ## Media conflict behavior
24
+
25
+ Media replacement flags have been removed. `--overwrite-media` and
26
+ `--force-update-asset` are rejected during option parsing. When the same bytes
27
+ or identifier already belong to another asset, keep the existing asset, choose
28
+ a new identifier, or delete and upload the asset again in the dashboard.
29
+
30
+ This is a breaking CLI change and must be included in the next breaking-version
31
+ release. Deploy the identifier backfill migration before deploying application
32
+ code that requires canonical identifiers on every media row. If the migration
33
+ reports unexpected rows in a local, staging, or restored database, assign those
34
+ listed assets canonical, site-unique identifiers and rerun the migration; do not
35
+ bypass its guard.
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import "../sdk-event-upsert-CTqsrhFT.mjs";
3
- import { t as eventUpsertInputSchema } from "../eventUpsertInputSchema-BUeXa6jk.mjs";
2
+ import "../src-BRAF1Dee.mjs";
3
+ import "../sdk-event-upsert-C6zsxDcf.mjs";
4
+ import { t as eventUpsertInputSchema } from "../eventUpsertInputSchema-Dg60PKJI.mjs";
4
5
 
5
6
  //#region src/acceptance/matrix-builders.ts
6
7
  const workflow = (scenario, stepId) => ({
@@ -55,6 +56,13 @@ const writeFileStep = (id, path, content) => ({
55
56
  path,
56
57
  content: `${JSON.stringify(content, null, 2)}\n`
57
58
  });
59
+ const assertJsonFileStep = (id, path, jsonPath, expected) => ({
60
+ kind: "assert_json_file",
61
+ id,
62
+ path,
63
+ jsonPath,
64
+ expected
65
+ });
58
66
  const richText = (text) => ({
59
67
  type: "doc",
60
68
  content: [{
@@ -139,7 +147,7 @@ const styleScenario = {
139
147
  capture("current-selection", "currentSelection", "selectionVersion"),
140
148
  "--env=local",
141
149
  "--json"
142
- ])]
150
+ ], { expectedExitCode: 1 })]
143
151
  };
144
152
 
145
153
  //#endregion
@@ -244,6 +252,55 @@ const navigationScenario = {
244
252
  ]
245
253
  };
246
254
 
255
+ //#endregion
256
+ //#region src/acceptance/booking-settings-scenario.ts
257
+ const bookingSettingsScenario = {
258
+ id: "booking-settings-lifecycle",
259
+ steps: [
260
+ commandStep("apply", "settings booking configure", [
261
+ "settings",
262
+ "booking",
263
+ "configure",
264
+ "--vertical",
265
+ "fitness_pt",
266
+ "--preset",
267
+ "fitness_pt.group_training",
268
+ "--env=local",
269
+ "--yes",
270
+ "--json"
271
+ ]),
272
+ commandStep("unchanged", "settings booking configure", [
273
+ "settings",
274
+ "booking",
275
+ "configure",
276
+ "--vertical",
277
+ "fitness_pt",
278
+ "--preset",
279
+ "fitness_pt.group_training",
280
+ "--env=local",
281
+ "--yes",
282
+ "--json"
283
+ ], { jsonAssertions: [{
284
+ jsonPath: [
285
+ "environments",
286
+ "0",
287
+ "effect",
288
+ "kind"
289
+ ],
290
+ expected: "unchanged"
291
+ }] }),
292
+ commandStep("pull-settings", "pull", [
293
+ "pull",
294
+ "settings",
295
+ "--env=local",
296
+ "--yes",
297
+ "--json"
298
+ ]),
299
+ assertJsonFileStep("assert-vertical", "content/settings.json", ["verticalConfig", "verticalId"], "fitness_pt"),
300
+ assertJsonFileStep("assert-presets", "content/settings.json", ["verticalConfig", "selectedPresetIds"], ["fitness_pt.group_training"])
301
+ ]
302
+ };
303
+
247
304
  //#endregion
248
305
  //#region src/acceptance/matrix.ts
249
306
  const entryScenario = {
@@ -257,7 +314,7 @@ const entryScenario = {
257
314
  "--data",
258
315
  JSON.stringify({
259
316
  excerpt: "Entry created by the installed CLI acceptance workflow.",
260
- body: richText("Acceptance entry body.")
317
+ content: richText("Acceptance entry body.")
261
318
  }),
262
319
  "--env=local",
263
320
  "--json"
@@ -522,7 +579,7 @@ const eventScenario = {
522
579
  const acceptanceTuples = [
523
580
  ["push-config", scratchDryRun([
524
581
  "push-config",
525
- "--env=both",
582
+ "--env=local",
526
583
  "--dry-run",
527
584
  "--json"
528
585
  ])],
@@ -539,7 +596,7 @@ const acceptanceTuples = [
539
596
  ["push", scratchDryRun([
540
597
  "push",
541
598
  "pages",
542
- "--env=both",
599
+ "--env=local",
543
600
  "--dry-run",
544
601
  "--json"
545
602
  ])],
@@ -609,6 +666,7 @@ const acceptanceTuples = [
609
666
  cwd: "nested",
610
667
  output: "non-empty"
611
668
  })],
669
+ ["init", scratchExecute(["init", "--json"], { expectedExitCode: 1 })],
612
670
  ["identifiers backfill", scratchExecute([
613
671
  "identifiers",
614
672
  "backfill",
@@ -690,6 +748,61 @@ const acceptanceTuples = [
690
748
  "--env=both",
691
749
  "--json"
692
750
  ])],
751
+ ["settings booking configure", workflow(bookingSettingsScenario, "apply")],
752
+ ["login", scratchExecute([
753
+ "login",
754
+ "--account-env=local",
755
+ "--json"
756
+ ], { expectedExitCode: 1 })],
757
+ ["logout", scratchExecute([
758
+ "logout",
759
+ "--account-env=local",
760
+ "--json"
761
+ ], { expectedExitCode: 1 })],
762
+ ["whoami", scratchExecute([
763
+ "whoami",
764
+ "--account-env=local",
765
+ "--json"
766
+ ], { expectedExitCode: 1 })],
767
+ ["auth revoke", scratchExecute([
768
+ "auth",
769
+ "revoke",
770
+ "--account-env=local",
771
+ "--yes",
772
+ "--json"
773
+ ], { expectedExitCode: 1 })],
774
+ ["sites list", scratchExecute([
775
+ "sites",
776
+ "list",
777
+ "--account-env=local",
778
+ "--json"
779
+ ], { expectedExitCode: 1 })],
780
+ ["sites create", scratchExecute([
781
+ "sites",
782
+ "create",
783
+ "--account-env=local",
784
+ "--name",
785
+ "Acceptance site",
786
+ "--yes",
787
+ "--json"
788
+ ], { expectedExitCode: 1 })],
789
+ ["link", scratchExecute([
790
+ "link",
791
+ "--project",
792
+ ".",
793
+ "--site",
794
+ "550e8400-e29b-41d4-a716-446655440000",
795
+ "--no-preview",
796
+ "--account-env=local",
797
+ "--json"
798
+ ], { expectedExitCode: 1 })],
799
+ ["recover", scratchExecute([
800
+ "recover",
801
+ "--project",
802
+ ".",
803
+ "--account-env=local",
804
+ "--json"
805
+ ], { expectedExitCode: 1 })],
693
806
  ["migrate entries", scratchDryRun([
694
807
  "migrate",
695
808
  "entries",