@rebasepro/types 0.20.0 → 0.20.1-canary.g4d882ca

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.
@@ -81,10 +81,15 @@ export declare function nestAdminCollectionKeys(collection: Record<string, unkno
81
81
  /**
82
82
  * {@link nestAdminKeysOf} for a property, applied to its children too.
83
83
  *
84
- * A map property carries `properties`, an array property carries `of`, and both
85
- * hold properties with `admin` blocks of their own. A flat `readOnly` left on a
86
- * child is as dead — and as fatal at the next boot — as one left on the parent,
87
- * so the walk goes all the way down.
84
+ * A map property carries `properties`, an array property carries `of`, and an
85
+ * array of typed blocks carries `oneOf.properties` — a record of properties like
86
+ * a map's. All of them hold properties with `admin` blocks of their own. A flat
87
+ * `readOnly` left on a child is as dead — and as fatal at the next boot — as one
88
+ * left on the parent, so the walk goes all the way down.
89
+ *
90
+ * `oneOf` was the container this walk did not know about, and it is the one the
91
+ * block-based collection templates are built out of: every block inside them
92
+ * kept its flat `markdown`, and the collection they created would not boot.
88
93
  *
89
94
  * @group Models
90
95
  */
@@ -124,6 +124,30 @@ export interface RebaseStaticAppConfig {
124
124
  * static *site* generator emits real files for its routes anyway.
125
125
  */
126
126
  spa?: boolean;
127
+ /**
128
+ * Where this app mounts the Rebase CMS, as a URL path — the address you
129
+ * would type to reach it, not a path relative to `path`.
130
+ *
131
+ * The CMS is an ordinary React component in the developer's own app
132
+ * (`<RebaseCMS basePath="/admin">`), so its address is a *client-side
133
+ * route*: nothing on the server, in the bundle, or in the control plane can
134
+ * observe it. A project whose CMS sits at `/admin` inside a frontend that
135
+ * also serves a product at `/` is indistinguishable, from the outside, from
136
+ * one that has no CMS at all — which is exactly how a Rebase Cloud project
137
+ * came to have no discoverable admin URL anywhere in its console.
138
+ *
139
+ * Declaring it is the only way that fact travels. It is carried into the
140
+ * bundle manifest, recorded on the project's app row at deploy, and is what
141
+ * lets the console (and `rebase apps list`) offer a link straight to it.
142
+ *
143
+ * Must be `path` itself or something beneath it, since the app serving that
144
+ * URL is the one that has to answer for it. Absent means this app does not
145
+ * mount the CMS — the common case for a marketing site or a product app.
146
+ *
147
+ * @example "/" — the whole app is the CMS, as `rebase init` scaffolds it
148
+ * @example "/admin" — the CMS is one route of a larger app
149
+ */
150
+ cms?: string;
127
151
  }
128
152
  export type RebaseAppConfig = RebaseBackendAppConfig | RebaseStaticAppConfig;
129
153
  /**
@@ -215,7 +239,7 @@ export interface RebaseProjectManifest {
215
239
  * Repository-wide opt-out from anonymous CLI usage sharing.
216
240
  *
217
241
  * **Only `false` does anything.** It suppresses sharing for everyone who
218
- * clones this repository, overriding each developer's own opt-in — an
242
+ * clones this repository, overriding each developer's own answer — an
219
243
  * organisation setting policy for work done on its behalf, the same shape
220
244
  * as a committed `.npmrc`.
221
245
  *
@@ -223,7 +247,7 @@ export interface RebaseProjectManifest {
223
247
  * quietly. This file is committed, so a `true` here would be one developer
224
248
  * answering a privacy question for every colleague who later clones the
225
249
  * repo — consent by proxy, which is the exact thing opt-in exists to
226
- * prevent. Individuals opt in with `rebase telemetry enable`.
250
+ * prevent. Individuals answer at `rebase init`, or with `rebase telemetry enable` / `disable`.
227
251
  */
228
252
  telemetry?: boolean;
229
253
  }
@@ -341,6 +365,27 @@ export interface RebaseBundleStatic {
341
365
  dir: string;
342
366
  /** Serve `index.html` for unmatched paths under `path`. */
343
367
  spa: boolean;
368
+ /**
369
+ * The app's name in `rebase.json`.
370
+ *
371
+ * `dir` is `static/<name>` and has been since folding was written, so this
372
+ * is recoverable by string surgery — which is precisely why it is stated
373
+ * instead. A control plane reconciling app rows against this list has to
374
+ * match them by name, and a consumer that has to re-derive an identifier
375
+ * from a path is one refactor away from matching nothing and registering a
376
+ * duplicate app on every deploy.
377
+ *
378
+ * Optional because bundles built before this field exists do not carry it;
379
+ * a reader that needs a name falls back to the last segment of `dir`.
380
+ */
381
+ name?: string;
382
+ /**
383
+ * Where this app mounts the Rebase CMS, as a URL path.
384
+ *
385
+ * Copied from the app's declaration — see {@link RebaseStaticAppConfig.cms}
386
+ * for why a client-side route has to be declared to be knowable at all.
387
+ */
388
+ cms?: string;
344
389
  }
345
390
  /**
346
391
  * A native module found in the dependency closure.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebasepro/types",
3
- "version": "0.20.0",
3
+ "version": "0.20.1-canary.g4d882ca",
4
4
  "description": "Rebase type definitions — shared interfaces and controller types",
5
5
  "keywords": [
6
6
  "rebase",