@rebasepro/common 0.0.1-canary.2 → 0.0.1-canary.4d4fb3e
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 +1 -1
- package/dist/collections/CollectionRegistry.d.ts +2 -2
- package/dist/data/buildRebaseData.d.ts +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +398 -815
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +418 -835
- package/dist/index.umd.js.map +1 -1
- package/dist/util/builders.d.ts +6 -13
- package/dist/util/collections.d.ts +2 -2
- package/dist/util/entities.d.ts +16 -8
- package/dist/util/index.d.ts +1 -11
- package/dist/util/navigation_from_path.d.ts +10 -5
- package/dist/util/navigation_utils.d.ts +1 -12
- package/dist/util/permissions.d.ts +4 -4
- package/dist/util/references.d.ts +1 -1
- package/dist/util/relations.d.ts +4 -4
- package/dist/util/resolutions.d.ts +10 -12
- package/dist/util/storage.d.ts +4 -4
- package/package.json +11 -16
- package/src/collections/CollectionRegistry.ts +96 -33
- package/src/data/buildRebaseData.ts +221 -0
- package/src/index.ts +1 -0
- package/src/types/json-logic-js.d.ts +8 -0
- package/src/util/builders.ts +8 -18
- package/src/util/callbacks.ts +3 -4
- package/src/util/collections.ts +4 -4
- package/src/util/conditions.ts +4 -4
- package/src/util/entities.ts +37 -12
- package/src/util/index.ts +1 -11
- package/src/util/navigation_from_path.ts +8 -7
- package/src/util/navigation_utils.ts +4 -56
- package/src/util/parent_references_from_path.ts +1 -1
- package/src/util/permissions.test.ts +24 -28
- package/src/util/permissions.ts +14 -14
- package/src/util/references.ts +16 -2
- package/src/util/relations.ts +23 -19
- package/src/util/resolutions.ts +31 -62
- package/src/util/storage.ts +5 -5
- package/dist/util/arrays.d.ts +0 -1
- package/dist/util/dates.d.ts +0 -1
- package/dist/util/entity_actions.d.ts +0 -2
- package/dist/util/fields.d.ts +0 -2
- package/dist/util/flatten_object.d.ts +0 -5
- package/dist/util/hash.d.ts +0 -1
- package/dist/util/names.d.ts +0 -22
- package/dist/util/objects.d.ts +0 -26
- package/dist/util/os.d.ts +0 -2
- package/dist/util/plurals.d.ts +0 -16
- package/dist/util/regexp.d.ts +0 -7
- package/dist/util/strings.d.ts +0 -7
- package/src/util/arrays.ts +0 -3
- package/src/util/dates.ts +0 -1
- package/src/util/entity_actions.ts +0 -28
- package/src/util/fields.ts +0 -28
- package/src/util/flatten_object.ts +0 -45
- package/src/util/hash.ts +0 -11
- package/src/util/names.ts +0 -30
- package/src/util/objects.ts +0 -376
- package/src/util/os.ts +0 -13
- package/src/util/plurals.ts +0 -188
- package/src/util/regexp.ts +0 -32
- package/src/util/strings.ts +0 -84
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ You can replace the Firebase Storage implementation with your own.
|
|
|
138
138
|
## Included example
|
|
139
139
|
|
|
140
140
|
You can access the code for the demo project under
|
|
141
|
-
[`example`](https://github.com/
|
|
141
|
+
[`example`](https://github.com/rebasepro/rebase/tree/master/example). It includes
|
|
142
142
|
every feature provided by this CMS.
|
|
143
143
|
|
|
144
144
|
Keep in mind you need to update the dependencies in that project if you want to
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EntityCollection } from "@rebasepro/types";
|
|
2
2
|
export declare class CollectionRegistry {
|
|
3
|
-
private
|
|
3
|
+
private collectionsByTableName;
|
|
4
4
|
private collectionsBySlug;
|
|
5
5
|
private rootCollections;
|
|
6
|
-
private
|
|
6
|
+
private rawCollectionsByTableName;
|
|
7
7
|
private rawCollectionsBySlug;
|
|
8
8
|
private rawRootCollections;
|
|
9
9
|
private lastRawInputSnapshot;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataDriver, RebaseData } from "@rebasepro/types";
|
|
2
|
+
/**
|
|
3
|
+
* Build a `RebaseData` object from a `DataDriver` using JavaScript Proxy.
|
|
4
|
+
*
|
|
5
|
+
* This is the key bridge: any property access like `data.products` returns
|
|
6
|
+
* a `CollectionAccessor` backed by the underlying DataDriver, without
|
|
7
|
+
* needing per-collection code generation.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const data = buildRebaseData(driver);
|
|
11
|
+
* await data.products.create({ name: "Camera", price: 299 });
|
|
12
|
+
* const { data: items } = await data.products.find({ where: { status: "eq.published" } });
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildRebaseData(driver: DataDriver): RebaseData;
|
package/dist/index.d.ts
CHANGED