@rebasepro/types 0.11.0 → 0.11.1-canary.g8caabf3
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/dist/controllers/collection_registry.d.ts +1 -1
- package/dist/controllers/data.d.ts +9 -9
- package/dist/index.es.js +9 -1
- package/dist/index.es.js.map +1 -1
- package/dist/types/data_source.d.ts +1 -1
- package/dist/types/database_adapter.d.ts +13 -8
- package/dist/types/entity_callbacks.d.ts +2 -2
- package/dist/types/project_manifest.d.ts +96 -77
- package/dist/types/properties.d.ts +1 -1
- package/package.json +1 -1
- package/src/controllers/collection_registry.ts +1 -1
- package/src/controllers/data.ts +9 -9
- package/src/types/collections.ts +0 -1
- package/src/types/data_source.ts +1 -1
- package/src/types/database_adapter.ts +13 -8
- package/src/types/entity_callbacks.ts +2 -2
- package/src/types/project_manifest.ts +98 -85
- package/src/types/properties.ts +1 -1
|
@@ -6,7 +6,7 @@ import type { EntityReference } from "../types/entities";
|
|
|
6
6
|
*/
|
|
7
7
|
export type CollectionRegistryController<DB = Record<string, unknown>, EC extends CollectionConfig = CollectionConfig> = {
|
|
8
8
|
/**
|
|
9
|
-
* List of the mapped collections in the
|
|
9
|
+
* List of the mapped collections in the admin.
|
|
10
10
|
* Each entry relates to a collection in the root database.
|
|
11
11
|
* Each of the navigation entries in this field
|
|
12
12
|
* generates an entry in the main menu.
|
|
@@ -108,12 +108,12 @@ export interface FindResponse<M extends Record<string, unknown> = Record<string,
|
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
|
-
* Fluent query builder for the **admin
|
|
111
|
+
* Fluent query builder for the **admin admin** — resolves to `FindResponse<M>`
|
|
112
112
|
* (Snapshot-wrapped rows).
|
|
113
113
|
*
|
|
114
114
|
* @internal App developers should use {@link SDKQueryBuilderInterface}
|
|
115
115
|
* (flat rows, returned by `client.data.*` / `context.data.*`). This
|
|
116
|
-
* Snapshot-flavored variant backs the admin
|
|
116
|
+
* Snapshot-flavored variant backs the admin admin internals only.
|
|
117
117
|
*
|
|
118
118
|
* @group Data
|
|
119
119
|
*/
|
|
@@ -129,13 +129,13 @@ export interface QueryBuilderInterface<M extends Record<string, unknown> = Recor
|
|
|
129
129
|
listen(onUpdate: (data: FindResponse<M>) => void, onError?: (error: Error) => void): () => void;
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
|
-
* A single collection's CRUD accessor for the **admin
|
|
132
|
+
* A single collection's CRUD accessor for the **admin admin** — every method
|
|
133
133
|
* resolves to `Snapshot`-wrapped rows (`FindResponse<M>` / `Snapshot<M>`).
|
|
134
134
|
*
|
|
135
135
|
* @internal App developers do **not** use this. The public, symmetric surface
|
|
136
136
|
* is {@link SDKCollectionClient} (flat rows), exposed as `client.data.products`
|
|
137
137
|
* in the SDK and `context.data.products` in framework callbacks. This
|
|
138
|
-
* Snapshot-flavored accessor backs the admin
|
|
138
|
+
* Snapshot-flavored accessor backs the admin admin view-model only.
|
|
139
139
|
*
|
|
140
140
|
* @group Data
|
|
141
141
|
*/
|
|
@@ -244,7 +244,7 @@ export interface SDKQueryBuilderInterface<M extends Record<string, unknown> = Re
|
|
|
244
244
|
* SDK collection client — returns flat rows, no Entity wrapper.
|
|
245
245
|
*
|
|
246
246
|
* This is the public API surface for app developers using
|
|
247
|
-
* `createRebaseClient()`.
|
|
247
|
+
* `createRebaseClient()`. admin internals use `CollectionAccessor` instead.
|
|
248
248
|
*
|
|
249
249
|
* Type parameters:
|
|
250
250
|
* - `M` — the **Row** shape returned by reads (`find`, `findById`, `listen`).
|
|
@@ -367,16 +367,16 @@ export interface SDKCollectionClient<M extends Record<string, unknown> = Record<
|
|
|
367
367
|
include(...relations: string[]): SDKQueryBuilderInterface<M>;
|
|
368
368
|
}
|
|
369
369
|
/**
|
|
370
|
-
* The unified data access object for the **admin
|
|
370
|
+
* The unified data access object for the **admin admin** (Entity-shaped).
|
|
371
371
|
*
|
|
372
372
|
* Access collections as dynamic properties: `data.products.find(...)`. Each
|
|
373
373
|
* accessor returns `Entity`-wrapped records (`{ id, path, values }`) — the
|
|
374
|
-
* view-model the
|
|
374
|
+
* view-model the admin renders. This is what `useData()` / the admin
|
|
375
375
|
* `RebaseContext.data` are backed by.
|
|
376
376
|
*
|
|
377
377
|
* @internal App developers do **not** use this — they use
|
|
378
378
|
* {@link RebaseSdkData} (flat rows), which is what the SDK client and backend
|
|
379
|
-
* `context.data` expose. This Entity-shaped map backs the admin
|
|
379
|
+
* `context.data` expose. This Entity-shaped map backs the admin admin only.
|
|
380
380
|
*
|
|
381
381
|
* @group Data
|
|
382
382
|
*/
|
|
@@ -415,7 +415,7 @@ export type RebaseData<DB = unknown> = {
|
|
|
415
415
|
*
|
|
416
416
|
* Every accessor returns flat rows (the table's columns) via
|
|
417
417
|
* {@link SDKCollectionClient} — access fields directly (`row.title`), never
|
|
418
|
-
* `row.values.title`. The admin
|
|
418
|
+
* `row.values.title`. The admin uses {@link RebaseData} (Entity) instead.
|
|
419
419
|
*
|
|
420
420
|
* @example
|
|
421
421
|
* // Frontend SDK
|
package/dist/index.es.js
CHANGED
|
@@ -656,8 +656,16 @@ function isLazyComponentRef(ref) {
|
|
|
656
656
|
* not read. A runtime accepts any bundle whose `bundleFormat` is less than or
|
|
657
657
|
* equal to its own — old bundles keep booting on new runtimes, which is the
|
|
658
658
|
* whole point of separating the artifact from the engine.
|
|
659
|
+
*
|
|
660
|
+
* - **1** — `mode: "cms" | "baas" | "static"`, `entry.static` a single directory
|
|
661
|
+
* string, `entry.admin` for a bundled admin panel.
|
|
662
|
+
* - **2** — `kind: "backend" | "static"`, `entry.static` a list of
|
|
663
|
+
* {@link RebaseBundleStatic}, `entry.admin` removed. A format-1 runtime reading
|
|
664
|
+
* one of these would find no `mode` and an array where it expects a string, so
|
|
665
|
+
* the bump is what turns that into a refusal to boot instead of a bundle that
|
|
666
|
+
* starts and serves nothing.
|
|
659
667
|
*/
|
|
660
|
-
var BUNDLE_FORMAT_VERSION =
|
|
668
|
+
var BUNDLE_FORMAT_VERSION = 2;
|
|
661
669
|
/**
|
|
662
670
|
* The runtime contract major.
|
|
663
671
|
*
|