riverbankcms 0.1.0 → 0.2.2

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.
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+ import "../src-XEJYAKbQ.mjs";
3
+ import "../sdk-event-upsert-BCZUdIrL.mjs";
4
+ import { t as eventUpsertInputSchema } from "../eventUpsertInputSchema-CzMX5BZI.mjs";
5
+
2
6
  //#region src/acceptance/matrix-builders.ts
3
7
  const workflow = (scenario, stepId) => ({
4
8
  kind: "scratch_workflow",
@@ -136,7 +140,7 @@ const styleScenario = {
136
140
  capture("current-selection", "currentSelection", "selectionVersion"),
137
141
  "--env=local",
138
142
  "--json"
139
- ])]
143
+ ], { expectedExitCode: 1 })]
140
144
  };
141
145
 
142
146
  //#endregion
@@ -254,7 +258,7 @@ const entryScenario = {
254
258
  "--data",
255
259
  JSON.stringify({
256
260
  excerpt: "Entry created by the installed CLI acceptance workflow.",
257
- body: richText("Acceptance entry body.")
261
+ content: richText("Acceptance entry body.")
258
262
  }),
259
263
  "--env=local",
260
264
  "--json"
@@ -397,6 +401,23 @@ const blockScenario = {
397
401
  ])
398
402
  ]
399
403
  };
404
+ const eventAcceptanceInput = eventUpsertInputSchema.parse({
405
+ title: "CLI acceptance event",
406
+ slug: "acceptance-event",
407
+ preset: "event",
408
+ runRefs: ["acceptance-event"],
409
+ runs: [{
410
+ identifier: "acceptance-event",
411
+ eventRef: "acceptance-event",
412
+ bookingScope: "whole_series",
413
+ occurrences: [{
414
+ startsAt: "2026-12-01T10:00:00.000Z",
415
+ endsAt: "2026-12-01T11:00:00.000Z",
416
+ timeZone: "Europe/London"
417
+ }],
418
+ pricing: { requiresPayment: false }
419
+ }]
420
+ });
400
421
  const eventScenario = {
401
422
  id: "event-occurrence-lifecycle",
402
423
  steps: [
@@ -405,16 +426,7 @@ const eventScenario = {
405
426
  "upsert",
406
427
  "acceptance-event",
407
428
  "--data",
408
- JSON.stringify({
409
- title: "CLI acceptance event",
410
- slug: "acceptance-event",
411
- schedule: {
412
- recurrenceRule: null,
413
- defaultStartTime: "10:00:00",
414
- durationMinutes: 60
415
- },
416
- pricing: { requiresPayment: false }
417
- }),
429
+ JSON.stringify(eventAcceptanceInput),
418
430
  "--env=local",
419
431
  "--json"
420
432
  ]),
@@ -435,6 +447,7 @@ const eventScenario = {
435
447
  "occurrence",
436
448
  "list",
437
449
  capture("event-identifier"),
450
+ capture("event-identifier"),
438
451
  "--env=local",
439
452
  "--json"
440
453
  ]),
@@ -443,6 +456,7 @@ const eventScenario = {
443
456
  "occurrence",
444
457
  "add",
445
458
  capture("event-identifier"),
459
+ capture("event-identifier"),
446
460
  "--starts-at",
447
461
  "2026-12-10T10:00:00Z",
448
462
  "--duration-minutes",
@@ -455,6 +469,7 @@ const eventScenario = {
455
469
  "occurrence",
456
470
  "update",
457
471
  capture("event-identifier"),
472
+ capture("event-identifier"),
458
473
  capture("add-occurrence", "result", "id"),
459
474
  "--capacity",
460
475
  "20",
@@ -466,6 +481,7 @@ const eventScenario = {
466
481
  "occurrence",
467
482
  "cancel",
468
483
  capture("event-identifier"),
484
+ capture("event-identifier"),
469
485
  capture("add-occurrence", "result", "id"),
470
486
  "--env=local",
471
487
  "--json"
@@ -475,6 +491,7 @@ const eventScenario = {
475
491
  "occurrence",
476
492
  "delete",
477
493
  capture("event-identifier"),
494
+ capture("event-identifier"),
478
495
  capture("add-occurrence", "result", "id"),
479
496
  "--yes",
480
497
  "--env=local",
@@ -506,7 +523,7 @@ const eventScenario = {
506
523
  const acceptanceTuples = [
507
524
  ["push-config", scratchDryRun([
508
525
  "push-config",
509
- "--env=both",
526
+ "--env=local",
510
527
  "--dry-run",
511
528
  "--json"
512
529
  ])],
@@ -523,7 +540,7 @@ const acceptanceTuples = [
523
540
  ["push", scratchDryRun([
524
541
  "push",
525
542
  "pages",
526
- "--env=both",
543
+ "--env=local",
527
544
  "--dry-run",
528
545
  "--json"
529
546
  ])],
@@ -593,6 +610,7 @@ const acceptanceTuples = [
593
610
  cwd: "nested",
594
611
  output: "non-empty"
595
612
  })],
613
+ ["init", scratchExecute(["init", "--json"], { expectedExitCode: 1 })],
596
614
  ["identifiers backfill", scratchExecute([
597
615
  "identifiers",
598
616
  "backfill",
@@ -674,6 +692,60 @@ const acceptanceTuples = [
674
692
  "--env=both",
675
693
  "--json"
676
694
  ])],
695
+ ["login", scratchExecute([
696
+ "login",
697
+ "--account-env=local",
698
+ "--json"
699
+ ], { expectedExitCode: 1 })],
700
+ ["logout", scratchExecute([
701
+ "logout",
702
+ "--account-env=local",
703
+ "--json"
704
+ ], { expectedExitCode: 1 })],
705
+ ["whoami", scratchExecute([
706
+ "whoami",
707
+ "--account-env=local",
708
+ "--json"
709
+ ], { expectedExitCode: 1 })],
710
+ ["auth revoke", scratchExecute([
711
+ "auth",
712
+ "revoke",
713
+ "--account-env=local",
714
+ "--yes",
715
+ "--json"
716
+ ], { expectedExitCode: 1 })],
717
+ ["sites list", scratchExecute([
718
+ "sites",
719
+ "list",
720
+ "--account-env=local",
721
+ "--json"
722
+ ], { expectedExitCode: 1 })],
723
+ ["sites create", scratchExecute([
724
+ "sites",
725
+ "create",
726
+ "--account-env=local",
727
+ "--name",
728
+ "Acceptance site",
729
+ "--yes",
730
+ "--json"
731
+ ], { expectedExitCode: 1 })],
732
+ ["link", scratchExecute([
733
+ "link",
734
+ "--project",
735
+ ".",
736
+ "--site",
737
+ "550e8400-e29b-41d4-a716-446655440000",
738
+ "--no-preview",
739
+ "--account-env=local",
740
+ "--json"
741
+ ], { expectedExitCode: 1 })],
742
+ ["recover", scratchExecute([
743
+ "recover",
744
+ "--project",
745
+ ".",
746
+ "--account-env=local",
747
+ "--json"
748
+ ], { expectedExitCode: 1 })],
677
749
  ["migrate entries", scratchDryRun([
678
750
  "migrate",
679
751
  "entries",
@@ -681,14 +753,6 @@ const acceptanceTuples = [
681
753
  ], {
682
754
  cwd: "nested",
683
755
  output: "non-empty"
684
- })],
685
- ["migrate events", scratchDryRun([
686
- "migrate",
687
- "events",
688
- "--dry-run"
689
- ], {
690
- cwd: "nested",
691
- output: "non-empty"
692
756
  })]
693
757
  ];
694
758
  const CLI_ACCEPTANCE_CASES = acceptanceTuples.map(([path, disposition]) => ({