@protobase/cli 0.53.8 → 0.54.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.
package/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@better-auth/core": "^1.7.12",
|
|
44
44
|
"@hono/node-server": "^2.1.3",
|
|
45
|
-
"@protobase/config": "0.
|
|
46
|
-
"@protobase/layout": "0.
|
|
47
|
-
"@protobase/query": "0.
|
|
48
|
-
"@protobase/schema": "0.
|
|
49
|
-
"@protobase/server": "0.
|
|
50
|
-
"@protobase/ui": "0.
|
|
45
|
+
"@protobase/config": "0.54.0",
|
|
46
|
+
"@protobase/layout": "0.54.0",
|
|
47
|
+
"@protobase/query": "0.54.0",
|
|
48
|
+
"@protobase/schema": "0.54.0",
|
|
49
|
+
"@protobase/server": "0.54.0",
|
|
50
|
+
"@protobase/ui": "0.54.0",
|
|
51
51
|
"@react-email/render": "^2.1.0",
|
|
52
52
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
53
53
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
The sidebar, the user menu, the bottom bar on phones and the global search.
|
|
6
6
|
|
|
7
7
|
- [Sidebar](../reference/sidebar.md): Resources and pages in groups, in the order you set.
|
|
8
|
-
- [Recent records](../reference/sidebar.md#recent-records): A sidebar entry lists a few records under it with status dots.
|
|
8
|
+
- [Recent records](../reference/sidebar.md#recent-records): A sidebar entry lists a few records under it, with status dots or as titles alone.
|
|
9
9
|
- [The current organization](../reference/sidebar.md#the-current-organization): A sidebar entry opens its list on the organization you work in, which you can clear to see every organization you are a member of.
|
|
10
10
|
- [User menu](../reference/user-menu.md): Account pages, help links, security settings, the theme switch and Sign out.
|
|
11
11
|
- [Bottom bar](../reference/bottom-bar.md): On phones, tabs along the bottom for each role's main screens.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Sidebar
|
|
4
4
|
|
|
5
|
-
How sidebar entries are grouped, and how an entry lists recent records with status dots.
|
|
5
|
+
How sidebar entries are grouped, and how an entry lists recent records, with status dots or without.
|
|
6
6
|
|
|
7
7
|
The admin's sidebar has one entry per resource view, grouped by `nav.group` (default: the database schema, with no group name for `public`) and sorted by `nav.order`, then by the order `config/index.ts` exports them, in `protobase dev` and in a built bundle alike. The app opens on the first entry. A view's [named lists](ui-config.md#more-than-one-list) are entries of their own, placed by their own `nav`. `nav({ hidden: true })` leaves a resource out, for line and link tables; a resource in the [user menu](user-menu.md) is left out too. [Composed pages](layouts.md#setup) have entries of their own, and groups that hold pages come first. A [remote resource](remote-resources.md) has its entry where its source's view places it; while its source cannot be reached, it sits under the source's label, marked "Cannot reach" with the source's name.
|
|
8
8
|
|
|
@@ -37,11 +37,17 @@ export const ordersView = view<typeof orders>('orders')
|
|
|
37
37
|
})
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
Without a `status`, each record is its title alone, with no dot, such as a chat's channels:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
export const channelsView = view<typeof channels>('channels').nav({ recent: { orderBy: 'name asc', limit: 20 } })
|
|
44
|
+
```
|
|
45
|
+
|
|
40
46
|
| Key | Meaning |
|
|
41
47
|
| --- | --- |
|
|
42
|
-
| `status` | The field whose value picks each record's dot. Typed against the resource's fields. |
|
|
43
|
-
| `tones` | Dot colour per status value: `neutral`, `info`, `success`, `warning` or `danger`. Values not listed are `neutral`. |
|
|
44
|
-
| `pulse` | Status values whose dot pulses, for states in progress (a deploy running, an order being picked). |
|
|
48
|
+
| `status` | The field whose value picks each record's dot. Typed against the resource's fields. Optional: without it, records have no dot, as a chat's channels. |
|
|
49
|
+
| `tones` | Dot colour per status value: `neutral`, `info`, `success`, `warning` or `danger`. Values not listed are `neutral`. Optional. |
|
|
50
|
+
| `pulse` | Status values whose dot pulses, for states in progress (a deploy running, an order being picked). Needs `status`. |
|
|
45
51
|
| `filter` | Which records qualify, as AIP-160 text, exactly as `?filter=` on the list API. Use it to leave out finished or inactive records, or to keep them while they are recent: `status != "stopped" OR updated_at > now() - 7d`. |
|
|
46
52
|
| `orderBy` | AIP-132 order, as `?order_by=`; the list's `sort` when omitted. |
|
|
47
53
|
| `limit` | How many records, 1 to 20; 3 when omitted. |
|
|
@@ -57,8 +63,8 @@ The records come from the list API with the caller's token, so they follow the s
|
|
|
57
63
|
|
|
58
64
|
### Checks
|
|
59
65
|
|
|
60
|
-
`createAdmin` refuses to start when a group does not fit its resource: an unknown `status` field, a tone outside the palette, a `limit` outside 1 to 20, or a `filter` or `orderBy` the list API would reject (unknown, non-filterable or non-sortable fields, bad syntax). `view.toModel(resourceModel)` runs the same checks.
|
|
66
|
+
`createAdmin` refuses to start when a group does not fit its resource: an unknown `status` field, `pulse` without a `status`, a tone outside the palette, a `limit` outside 1 to 20, or a `filter` or `orderBy` the list API would reject (unknown, non-filterable or non-sortable fields, bad syntax). `view.toModel(resourceModel)` runs the same checks.
|
|
61
67
|
|
|
62
|
-
`/meta` drops the group, and keeps the rest of `nav`, for a caller who cannot read a field it uses (its status, or a field in its filter or order), so it never names a hidden field.
|
|
68
|
+
`/meta` drops the group, and keeps the rest of `nav`, for a caller who cannot read a field it uses (its status when it has one, or a field in its filter or order), so it never names a hidden field.
|
|
63
69
|
|
|
64
70
|
`EMAIL=... PASSWORD=... bun scripts/e2e-shell.mjs` checks the groups and the user menu in a browser against a running `bun run --cwd tests/apps/erp dev` (`BASE` for another address), comparing them with what the API gives that user.
|