@rebasepro/cms-types 0.21.0 → 0.21.1
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 +15 -13
- package/dist/types/translations.d.ts +4 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
Type definitions for the Rebase CMS: collection and property shapes, the entity
|
|
4
4
|
and navigation models, and the translation keys the admin panel renders.
|
|
5
5
|
|
|
6
|
-
This package
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
This package is **mostly types** — the vocabulary that the runtime, the generated
|
|
7
|
+
SDK and the admin panel all agree on, kept in one package so a change to a
|
|
8
|
+
collection's shape cannot mean one thing to the server and another to the panel.
|
|
9
|
+
The little that executes is there for the same reason: `defineCollection`, which
|
|
10
|
+
type-checks a collection's `admin` block, and the key lists (`ADMIN_PROPERTY_KEYS`,
|
|
11
|
+
`ADMIN_COLLECTION_KEYS`) that tell an `admin` key from a core one.
|
|
10
12
|
|
|
11
13
|
The runtime that consumes these types is
|
|
12
|
-
[`@rebasepro/cms`](https://www.npmjs.com/package/@rebasepro/cms).
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
[`@rebasepro/cms`](https://www.npmjs.com/package/@rebasepro/cms). A project that
|
|
15
|
+
`rebase init` scaffolds depends on this package directly: its collection files
|
|
16
|
+
import `defineCollection` from here.
|
|
15
17
|
|
|
16
18
|
## Installation
|
|
17
19
|
|
|
@@ -20,15 +22,15 @@ npm install @rebasepro/cms-types
|
|
|
20
22
|
```
|
|
21
23
|
|
|
22
24
|
ESM-only: `"type": "module"` with no CommonJS build, so it is loaded with
|
|
23
|
-
`import`.
|
|
24
|
-
`require(esm)
|
|
25
|
+
`import`. It needs Node `>=22.22.0` (its `engines` floor), where `require()`
|
|
26
|
+
of it resolves too: Node has supported `require(esm)` since 22.12.
|
|
25
27
|
|
|
26
28
|
## Usage
|
|
27
29
|
|
|
28
30
|
```ts
|
|
29
|
-
import
|
|
31
|
+
import { defineCollection } from "@rebasepro/cms-types";
|
|
30
32
|
|
|
31
|
-
export const posts
|
|
33
|
+
export const posts = defineCollection({
|
|
32
34
|
name: "Posts",
|
|
33
35
|
slug: "posts",
|
|
34
36
|
table: "posts",
|
|
@@ -36,12 +38,12 @@ export const posts: CollectionConfig = {
|
|
|
36
38
|
title: { name: "Title", type: "string", validation: { required: true } },
|
|
37
39
|
body: { name: "Body", type: "string", admin: { multiline: true } }
|
|
38
40
|
}
|
|
39
|
-
};
|
|
41
|
+
});
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
## Documentation
|
|
43
45
|
|
|
44
|
-
- [Collections](https://rebase.pro/docs/
|
|
46
|
+
- [Collections](https://rebase.pro/docs/collections)
|
|
45
47
|
- [Full documentation](https://rebase.pro/docs)
|
|
46
48
|
|
|
47
49
|
## License
|
|
@@ -1047,6 +1047,10 @@ export interface RebaseTranslations {
|
|
|
1047
1047
|
studio_backups_denied_hint?: string;
|
|
1048
1048
|
studio_backups_read_failed?: string;
|
|
1049
1049
|
studio_backups_downloading?: string;
|
|
1050
|
+
studio_backups_roles_file?: string;
|
|
1051
|
+
studio_backups_roles_file_hint?: string;
|
|
1052
|
+
studio_backups_no_roles_file?: string;
|
|
1053
|
+
studio_backups_no_roles_file_hint?: string;
|
|
1050
1054
|
studio_cron_denied_title?: string;
|
|
1051
1055
|
studio_cron_denied_hint?: string;
|
|
1052
1056
|
studio_cron_read_failed?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/cms-types",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "Type definitions for the Rebase admin panel — CMS and Studio — the React-flavoured half of the type surface",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rebase",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"node": ">=22.22.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@rebasepro/types": "0.21.
|
|
35
|
+
"@rebasepro/types": "0.21.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "^30.0.0",
|