@protobase/cli 0.94.40 → 0.94.42

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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.94.40";
2
+ var version = "0.94.42";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.94.40",
3
+ "version": "0.94.42",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -43,13 +43,13 @@
43
43
  "dependencies": {
44
44
  "@better-auth/core": "^1.7.12",
45
45
  "@hono/node-server": "^2.1.3",
46
- "@protobase/config": "0.94.40",
47
- "@protobase/layout": "0.94.40",
48
- "@protobase/query": "0.94.40",
49
- "@protobase/schema": "0.94.40",
50
- "@protobase/server": "0.94.40",
51
- "@protobase/ui": "0.94.40",
52
- "@protobase/workflows": "0.94.40",
46
+ "@protobase/config": "0.94.42",
47
+ "@protobase/layout": "0.94.42",
48
+ "@protobase/query": "0.94.42",
49
+ "@protobase/schema": "0.94.42",
50
+ "@protobase/server": "0.94.42",
51
+ "@protobase/ui": "0.94.42",
52
+ "@protobase/workflows": "0.94.42",
53
53
  "@react-email/render": "^2.1.0",
54
54
  "@scalar/hono-api-reference": "^0.12.10",
55
55
  "@sentry/vite-plugin": "^11.10.0",
@@ -138,12 +138,12 @@ The table's columns take their width from the first rows it shows, and keep it w
138
138
  ### JSON fields and link text
139
139
 
140
140
  :::caution[Experimental]
141
- JSON summaries and link text are new and may change in any release.
141
+ Cards, boards and the mobile rows do not open a url link's address yet. JSON summaries and link text are new and may change in any release.
142
142
  :::
143
143
 
144
- Tables show JSON fields readably, and links can carry their own text. A JSON field, such as a tool call's input, shows in a list's table, a related table, a page's `Table` block and on cards and a phone's rows as a short summary on one line: an object as its keys and values, plain values before nested ones, `command: ls -la, cwd: /tmp, env: {…}`, a list of plain values as those values, and a list of objects as how many it holds, `3 items`. An object or list inside another shows as `{…}` or `[…]`, an empty text as `""`, each value is cut at 40 characters so one long value leaves room for the rest, and the summary at 160. The keys keep the order the database returns, which for a `jsonb` column is shortest first. The record page shows the whole value, written out on several lines across the width of its section.
144
+ Tables show JSON fields readably, and links can carry their own text. A JSON field, such as a tool call's input, shows in a list's table, a related table, a page's `Table` block and on cards and the mobile rows as a short summary on one line: an object as its keys and values, plain values before nested ones, `command: ls -la, cwd: /tmp, env: {…}`, a list of plain values as those values, and a list of objects as how many it holds, `3 items`. An object or list inside another shows as `{…}` or `[…]`, an empty text as `""`, each value is cut at 40 characters so one long value leaves room for the rest, and the summary at 160. The keys keep the order the database returns, which for a `jsonb` column is shortest first. The record page shows the value written out on several lines across the width of its section; a value of more than 20 lines shows its first 20 with a "Show all" button that shows the rest.
145
145
 
146
- A `url` field's link shows its address unless you give it a text. `.format('url', { text })` takes a fixed text, or one with `{field}` placeholders the record fills in, each as the record page shows it, such as an enum value by its label:
146
+ A `url` field's link shows its address unless you give it a text. `.format('url', { text })` takes a fixed text, or one with `{field}` placeholders the record fills in, each as the record page shows it, such as an enum value by its label and a relation by the name of the record it points at:
147
147
 
148
148
  ```ts
149
149
  view<typeof errors>('errors').fields((r) => ({
@@ -152,9 +152,11 @@ view<typeof errors>('errors').fields((r) => ({
152
152
  }))
153
153
  ```
154
154
 
155
- The link still opens the address in a new tab, in the list's cells, related tables, the record page and its sidebar; cards and a phone's rows show the text too. When a field it names is empty, the link shows its address rather than a text with a gap, and so does it for a reader who cannot read a field it names. The list loads the fields a link's text names along with its columns. A text on another format, or one naming a field the resource does not have, stops the server at startup.
155
+ The link still opens the address in a new tab, in the list's cells, related tables, the record page and its sidebar; cards and the mobile rows show the text too. When a field it names is empty, the link shows its address rather than a text with a gap, and so does it for a reader who cannot read a field it names. The list loads the fields a link's text names along with its columns. A text on another format, or one naming a field the resource does not have, stops the server at startup; a later `.format()` with another format drops the text.
156
156
 
157
- <gap>Cards, boards and a list's phone rows cannot open a url field's address because links on a card's one-line parts are not implemented; they show its text or address as plain text.</gap>
157
+ <gap>Lists, related tables and cards cannot fill a `{field}` naming a relation with the related record's name because resolving those names for link text outside the record page is not implemented; they show its key.</gap>
158
+
159
+ <gap>Cards, boards and a list's mobile rows cannot open a url field's address because links on a card's one-line parts are not implemented; they show its text or address as plain text.</gap>
158
160
 
159
161
  ### Related records in a list
160
162
 
@@ -408,9 +410,7 @@ Every widget takes `secondary: true` (e.g. `w.facets(r.agent, { secondary: true
408
410
 
409
411
  ### Charts (graphs): records per day or week, or per value, above a list
410
412
 
411
- A list can show a graph of how many of its records fall on each day or week, such as a daily graph of new listings. `.chart((r) => ({ field, range, granularity }))` draws the list's records per day over a date or timestamp field as bars above the list, following its filters, headed by their total and how much the second half of the bars differs from the first. `range` is how far back it reaches: `7d`, `30d`, `90d`, `1y` or `all`. A **Day** and **Week** switch changes the bars, and **Week** shows the last 12 weeks whatever the range; `granularity: 'week'` opens it on weeks. <gap>`hour` and `month` are accepted and show days, as hourly and monthly bars are not built.</gap> Its bars do not filter the list.
412
-
413
- <gap>A list's chart per day or week cannot name a bar's whole period, mark the running one or be read by keyboard and screen reader because its own chart component does not draw them yet, as a trend's and a Chart block's do.</gap>
413
+ A list can show a graph of how many of its records fall on each day or week, such as a daily graph of new listings. `.chart((r) => ({ field, range, granularity }))` draws the list's records per day over a date or timestamp field as bars above the list, following its filters, headed by their total and how much the second half of the bars differs from the first. `range` is how far back it reaches: `7d`, `30d`, `90d`, `1y` or `all`. A **Day** and **Week** switch changes the bars, and **Week** shows the last 12 weeks whatever the range; `granularity: 'week'` opens it on weeks. <gap>`hour` and `month` are accepted and show days, as hourly and monthly bars are not built.</gap> A bar's tooltip names its day or whole week, today's bar or this week's is outlined with a dash, as it is still filling up, and the chart reads by keyboard and screen reader as a [trend](#trends-of-related-records)'s does. Its bars do not filter the list.
414
414
 
415
415
  It can show the list's records per value of a field instead, such as orders per status or revenue per customer: `.chart((r) => ({ groupBy: r.status, type: 'donut' }))`. `groupBy` is a filterable field that is no date, such as an enum, a boolean or a relation, with an index that serves it; `type` is `bar` (the default, the largest first) or `donut`; `sum: r.total` or `average: r.total` adds up a numeric field instead of counting (a donut takes no average); `limit` is how many values it shows, 10 by default. Each value links to the list filtered to it, and follows the list's filters, its own terms on `groupBy` included. A date, file or JSON `groupBy`, or a `sum` of a field that is no number, stops the server at startup, and a user who cannot read one of its fields sees no chart. A page shows the same with the [`Chart`](blocks.md#chart) block.
416
416
 
@@ -1168,7 +1168,7 @@ Each series is read through [`:aggregate`](api.md), grouped by `at` with `field
1168
1168
  <gap>A reader cannot switch a trend's range or bar length, or open the records a bar counts, because neither is implemented.</gap>
1169
1169
  :::
1170
1170
 
1171
- `l.trend(title, options)` draws bars of how many records point at the record on the page, per day, week or month of a date of theirs, as a list's [chart](#filters-and-the-chart) counts them, such as an objective's shipped tasks per week over the last 90 days. It takes the options of a list's chart, `range` and `granularity`, and counts only this record's records. Records without a value in `at`, such as tasks not shipped yet, are not counted. A line over the bars gives their total over the range, such as **4 in the last 90 days**, or **None in the last 90 days** over flat bars, and a chart that could not load offers **Try again**. A bar's tooltip names its whole week or month, such as **24 – 30 Aug 2026**, and the bar still filling up is outlined with a dash and runs **to today**. The chart takes focus: the left and right arrow keys move the tooltip from bar to bar and Escape closes it, and a screen reader reads the bars as a table; a [Chart block](blocks.md#chart) over a date and `l.chart` do the same. Name what `at` means in the title or the help, such as "Shipped per week".
1171
+ `l.trend(title, options)` draws bars of how many records point at the record on the page, per day, week or month of a date of theirs, as a list's [chart](#filters-and-the-chart) counts them, such as an objective's shipped tasks per week over the last 90 days. It takes the options of a list's chart, `range` and `granularity`, and counts only this record's records. Records without a value in `at`, such as tasks not shipped yet, are not counted. A line over the bars gives their total over the range, such as **4 in the last 90 days**, or **None in the last 90 days** over flat bars, and a chart that could not load offers **Try again**. A bar's tooltip names its whole week or month, such as **24 – 30 Aug 2026**, and the bar still filling up is outlined with a dash and runs **to today**, or reads **Today** for a day. The chart takes focus: the left and right arrow keys move the tooltip from bar to bar and Escape closes it, and a screen reader reads the bars as a table; a [Chart block](blocks.md#chart) over a date and `l.chart` do the same. Name what `at` means in the title or the help, such as "Shipped per week".
1172
1172
 
1173
1173
  | Option | |
1174
1174
  | --- | --- |
@@ -1397,6 +1397,6 @@ Any action whose handler fails with a function's [mailbox problem](email.md#from
1397
1397
  ])
1398
1398
  ```
1399
1399
 
1400
- Besides the record page, the list's row menu offers each named action without `inputs` on the rows it applies to, disabled where it is disabled on the record page, and in red when it is a delete or a danger action; a link is a link there, or a disabled item without one where it is disabled. An `a.update` or `a.action` with `bulk` is also offered for the selected rows, as **Start (2)**, while one of them applies: it asks its `confirm` or its inputs once, with the count in the dialog's title; an inputs dialog for two or more records also lists their titles, while the `confirm` question and a dialog for one record show the count alone. <gap>A bulk `confirm` question cannot list the records it runs on because passing their titles to the confirm dialog is not implemented.</gap> It runs on each row it applies to, one after another, and its toast says how many it ran on, skipped, refused and failed on. An `a.action`'s handler is called once per row. A row the person may not change is refused, by its record's permissions or by the API's `403`, while the others run, and the toast names each refused record by its title. The rows stay selected while the dialog is open, and all of them when it is cancelled; once the run ends, only the rows it refused or skipped stay selected, showing what is still open. <gap>**Delete N** and **Export N** cannot keep the selection when their dialog is cancelled because telling the list how their dialog ended is not implemented.</gap> <gap>The list page cannot offer bulk actions on a phone because selecting its mobile rows is not implemented; a [`Table`](blocks.md#signing-several-records-off) with `bulk` offers them there.</gap>
1400
+ Besides the record page, the list's row menu offers each named action without `inputs` on the rows it applies to, disabled where it is disabled on the record page, and in red when it is a delete or a danger action; a link is a link there, or a disabled item without one where it is disabled. An `a.update` or `a.action` with `bulk` is also offered for the selected rows, as **Start (2)**, while one of them applies: it asks its `confirm` or its inputs once, with the count in the dialog's title; an inputs dialog for two or more records also lists their titles, while the `confirm` question and a dialog for one record show the count alone. <gap>A bulk `confirm` question cannot list the records it runs on because passing their titles to the confirm dialog is not implemented.</gap> It runs on each row it applies to, one after another, and its toast says how many it ran on, skipped, refused and failed on. An `a.action`'s handler is called once per row. A row the person may not change is refused, by its record's permissions or by the API's `403`, while the others run, and the toast names each refused record by its title. The rows stay selected while the dialog is open, and all of them when it is cancelled; once the run ends, only the rows it refused or skipped stay selected, showing what is still open. The list's own **Delete N** and **Export N** keep the selection the same way: all of it when their dialog is cancelled, none once the export is written, and the rows a delete could not remove once it ends. <gap>The list page cannot offer bulk actions on a phone because selecting its mobile rows is not implemented; a [`Table`](blocks.md#signing-several-records-off) with `bulk` offers them there.</gap>
1401
1401
 
1402
1402
  A condition reads only the record's own fields, so the list decides it for each row from the row itself: `protobase build` refuses one that names a relation's field (`host_id.name`), counts records (`hosts.count`) or names a field the resource does not have, a disabled button without a `reason`, and a `reason` or `otherwise` without `when`. In `/api/meta`, a user who cannot read a field the condition reads does not get the action. The condition only decides what the buttons show: the resource's [access rules](access.md) decide what the API lets the user do.