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.
@@ -1,6 +1,9 @@
1
1
  # Remote Site, Key, and User Access Setup
2
2
 
3
- This SDK project can sync content once it has a site ID, dashboard URL, and site-scoped management key. Creating the remote site, issuing keys, and granting dashboard user access are admin operations.
3
+ This SDK project can sync content once it has a site ID, dashboard URL, and
4
+ site-scoped management key. The authenticated Riverbank CLI can create a site
5
+ and link project credentials for the signed-in account. Additional user access
6
+ remains a dashboard operation.
4
7
 
5
8
  ## Check the Plan
6
9
 
@@ -18,18 +21,50 @@ riverbankcms setup plan --env=remote --json
18
21
 
19
22
  ## Authority Model
20
23
 
21
- - Dashboard/admin users can create sites, issue site-scoped management keys, and grant dashboard access.
22
- - Approved CMS repo scripts can do the same when run with service-role/admin credentials.
23
- - SDK management keys can verify access and sync content/config for one site. They cannot create sites, issue new keys, or grant user access.
24
+ - The authenticated Riverbank CLI can create sites and issue project
25
+ credentials for the signed-in account through `sites create`, `link`, and
26
+ `init`.
27
+ - Dashboard administrators can manage sites, issue credentials, and grant
28
+ access to additional users.
29
+ - SDK management keys can verify access and sync content/config for one site.
30
+ They cannot create sites or grant other users access.
24
31
 
25
- Do not put platform-admin, service-role, or user-session credentials in an SDK site repository.
32
+ The CLI stores its refresh session in the OS credential store when available.
33
+ It never puts account sessions, platform-admin credentials, or service-role
34
+ credentials in an SDK site repository.
35
+
36
+ Production account OAuth is deliberately rollout-disabled. Use the staging (or
37
+ local) account environment while that rollout is disabled; replace
38
+ `<account-environment>` with `production` only after production account access
39
+ has been explicitly enabled.
26
40
 
27
41
  ## Remote Setup Lifecycle
28
42
 
29
- 1. Create or choose the remote site from the dashboard/admin surface.
30
- 2. Generate a management key for that site.
31
- 3. Grant the site owner or editor dashboard access from the dashboard/admin surface.
32
- 4. Add the remote SDK variables to `.env.local`:
43
+ 1. Sign in to the account environment:
44
+
45
+ ```bash
46
+ riverbankcms login --account-env=<account-environment>
47
+ ```
48
+
49
+ 2. Create a site or choose one visible to the signed-in account:
50
+
51
+ ```bash
52
+ riverbankcms sites list --account-env=<account-environment>
53
+ riverbankcms sites create --account-env=<account-environment> --name "My Site" --yes
54
+ ```
55
+
56
+ 3. Link the project. `--preview` includes preview routes and a preview
57
+ credential; use `--no-preview` to omit them:
58
+
59
+ ```bash
60
+ riverbankcms link --project . --account-env=<account-environment> --site <site-id> --preview
61
+ ```
62
+
63
+ For a new directory, use `riverbankcms init` instead; it scaffolds, links,
64
+ initializes docs, and builds the complete project.
65
+
66
+ 4. Add the remote SDK variables to `.env.local` when linking an existing
67
+ project manually:
33
68
 
34
69
  ```bash
35
70
  RIVERBANK_REMOTE_SITE_ID=your-site-id
@@ -48,4 +83,25 @@ riverbankcms push --env=remote --dry-run
48
83
 
49
84
  ## Existing Sites and Users
50
85
 
51
- For an existing remote site, copy its site ID and create a fresh site-scoped management key if the old one is missing or should be rotated. Associate existing users with the site through the dashboard/admin surface. If the user does not exist yet, invite or create them through that approved flow rather than through the Riverbank CLI.
86
+ For an existing remote site, use `riverbankcms link` so the CLI issues the
87
+ needed site-scoped credentials and writes only ignored project env files.
88
+ Associate additional users with the site through the dashboard/admin surface.
89
+ If local work fails after the site is created, keep the site and resume with
90
+ the reported `riverbankcms init --resume <directory>` command after fixing the
91
+ local error.
92
+
93
+ ## Post-deployment revalidation
94
+
95
+ `init` scaffolds `/api/revalidate` but does not register a webhook or write a
96
+ webhook secret. Once the deployed site has a public HTTPS origin, activate
97
+ revalidation explicitly:
98
+
99
+ ```bash
100
+ riverbankcms webhooks setup \
101
+ --env=remote \
102
+ --url=https://www.example.com/api/revalidate \
103
+ --yes
104
+ ```
105
+
106
+ Until then, the generated site’s ISR interval is the freshness fallback. Keep
107
+ the one-time webhook secret in the deployment environment, not source control.
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { a as classifySdkEventPricing, i as classifySdkEventSchedule, o as classifySdkEventPaymentTerms, r as sdkEventUpsertOptionalFieldSchemas } from "./sdk-event-upsert-CTqsrhFT.mjs";
2
+ import { c as EVENT_PRESET_VALUES } from "./src-BRAF1Dee.mjs";
3
+ import { a as classifySdkEventPricing, i as classifySdkEventSchedule, o as classifySdkEventPaymentTerms, r as sdkEventUpsertOptionalFieldSchemas } from "./sdk-event-upsert-C6zsxDcf.mjs";
3
4
  import { z } from "zod";
4
5
 
5
6
  //#region ../blocks/src/lib/typeGuards.ts
@@ -2044,21 +2045,21 @@ const EVENT_CONTENT_TYPE_SCHEMA = {
2044
2045
  {
2045
2046
  id: "summary",
2046
2047
  type: "textarea",
2047
- label: "Summary",
2048
- description: "Short teaser shown in listings.",
2048
+ label: "Short introduction",
2049
+ description: "Write one or two sentences that help people quickly understand what this is. It appears wherever the event is listed and near the top of its page.",
2049
2050
  rows: 3
2050
2051
  },
2051
2052
  {
2052
2053
  id: "image",
2053
2054
  type: "media",
2054
- label: "Listing image",
2055
- description: "Optional image used for event cards and previews."
2055
+ label: "Event image",
2056
+ description: "Choose the main image people will see wherever the event is listed and on its page."
2056
2057
  },
2057
2058
  {
2058
2059
  id: "body",
2059
2060
  type: "richText",
2060
- label: "Details",
2061
- description: "Full event details and agenda."
2061
+ label: "About this event",
2062
+ description: "Add the main information people need before booking—what to expect, who it’s for, what’s included, and anything they should bring or know."
2062
2063
  }
2063
2064
  ],
2064
2065
  routing: {
@@ -2070,6 +2071,10 @@ const EVENT_CONTENT_TYPE_SCHEMA = {
2070
2071
  kind: "event-occurrence",
2071
2072
  segmentType: "uuid-or-date",
2072
2073
  precedence: "subroute-first"
2074
+ }, {
2075
+ kind: "event-run",
2076
+ segmentType: "slug",
2077
+ precedence: "content-first"
2073
2078
  }]
2074
2079
  },
2075
2080
  labels: {
@@ -4913,14 +4918,7 @@ const eventUpsertInputSchema = z.object({
4913
4918
  slug: z.string().min(1).optional(),
4914
4919
  content: z.record(z.string(), z.unknown()).optional(),
4915
4920
  blocks: sdkEntrySlotBlocksInputSchema.optional(),
4916
- preset: z.enum([
4917
- "event",
4918
- "class",
4919
- "course",
4920
- "workshop",
4921
- "retreat",
4922
- "performance"
4923
- ]),
4921
+ preset: z.enum(EVENT_PRESET_VALUES),
4924
4922
  runRefs: z.tuple([z.string().min(1)], z.string().min(1)),
4925
4923
  runs: z.tuple([eventRunInputSchema], eventRunInputSchema)
4926
4924
  }).superRefine((input, ctx) => input.runs.forEach((run, index) => {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as assertCompatibleSdkPeer } from "./sdk-peer-D9FHJ54i.mjs";
2
+ import { n as assertCompatibleSdkPeer } from "./sdk-peer-DZNUBvf5.mjs";
3
3
  import { dirname, resolve } from "path";
4
4
  import { createJiti } from "jiti";
5
5
  import { existsSync } from "fs";
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import "./sdk-peer-DZNUBvf5.mjs";
3
+ import { t as loadConfigFile } from "./load-config-Co37ncZD.mjs";
4
+
5
+ export { loadConfigFile };