@protobase/cli 0.97.0 → 0.97.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/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.97.
|
|
3
|
+
"version": "0.97.1",
|
|
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.97.
|
|
47
|
-
"@protobase/layout": "0.97.
|
|
48
|
-
"@protobase/query": "0.97.
|
|
49
|
-
"@protobase/schema": "0.97.
|
|
50
|
-
"@protobase/server": "0.97.
|
|
51
|
-
"@protobase/ui": "0.97.
|
|
52
|
-
"@protobase/workflows": "0.97.
|
|
46
|
+
"@protobase/config": "0.97.1",
|
|
47
|
+
"@protobase/layout": "0.97.1",
|
|
48
|
+
"@protobase/query": "0.97.1",
|
|
49
|
+
"@protobase/schema": "0.97.1",
|
|
50
|
+
"@protobase/server": "0.97.1",
|
|
51
|
+
"@protobase/ui": "0.97.1",
|
|
52
|
+
"@protobase/workflows": "0.97.1",
|
|
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",
|
|
@@ -6,6 +6,7 @@ Buttons that change records, ask for input or run your own code, per role.
|
|
|
6
6
|
|
|
7
7
|
- [Record actions](../reference/ui-config.md#actions-and-views-per-role): Buttons that update fields, delete, open a link, run an AI action or call your own code.
|
|
8
8
|
- [Actions that ask for input](../reference/ui-config.md#actions-that-ask-for-input): An action opens a dialog for text, numbers, dates, choices or records before it runs.
|
|
9
|
+
- [Secret inputs](../reference/ui-config.md#secret-inputs) (beta): An action can take a secret value, such as an API key, in a masked input that browsers and password managers do not offer to save, and the value is never sent back.
|
|
9
10
|
- [Actions that send from someone's mailbox](../reference/ui-config.md#actions-that-send-from-someones-mailbox) (beta): An action that sends from the person's own mailbox offers to connect it right in its dialog while none is linked or its link expired.
|
|
10
11
|
- [Conditional and bulk actions](../reference/ui-config.md#where-an-action-applies): Actions show, or show disabled with a reason, only where a condition holds, and run on several selected rows at once.
|
|
11
12
|
- [Signing several records off](../reference/blocks.md#signing-several-records-off) (experimental): An action can sign several records off at once, after a checklist.
|
|
@@ -1356,6 +1356,7 @@ a.update('answer', { label: 'Answer', inputs: (i) => [i.text('answer', { label:
|
|
|
1356
1356
|
| `i.decimal(name, o)` | A number with decimals, which the handler gets as text, as the API gives decimals, so no digit is lost. |
|
|
1357
1357
|
| `i.boolean(name, o)` | A switch, `true` or `false`, so it is never required. |
|
|
1358
1358
|
| `i.date(name, o)` | A date, `YYYY-MM-DD`. |
|
|
1359
|
+
| `i.secret(name, o)` | A [secret](#secret-inputs), such as an API key, in a masked field; the handler gets it exactly as typed. |
|
|
1359
1360
|
| `i.choice(name, { options })` | One of `options`, each a `value` with the `label` it reads as. |
|
|
1360
1361
|
| `i.choice(name, { resource })` | A record of `resource`, picked as the create form picks a relation; the handler gets its key. |
|
|
1361
1362
|
| `i.checklist(name, { items })` | Boxes to tick, every one, before the action runs: the same `items` for every record. The answer is the list of their texts. |
|
|
@@ -1368,6 +1369,24 @@ An empty answer is `null`. Before the handler runs, the dialog refuses a require
|
|
|
1368
1369
|
|
|
1369
1370
|
A custom input's component gets the answer as `value` (`null` when empty), `onChange`, `invalid` while its answer is refused, the input's `props` and the `input` itself (`ActionInputProps`), as a [field type's](custom-components.md#field-types) editor does. Without that component the button is disabled, with the reason as its tooltip. In `/api/meta`, a user who cannot read the resource of a choice does not get the action.
|
|
1370
1371
|
|
|
1372
|
+
#### Secret inputs
|
|
1373
|
+
|
|
1374
|
+
:::caution[Beta]
|
|
1375
|
+
A secret input has no button that shows what you typed. It takes no `default`, a later input's `when` cannot read it, and an `a.update` cannot write it.
|
|
1376
|
+
:::
|
|
1377
|
+
|
|
1378
|
+
`i.secret(name, { label, help })` asks for a value that must not be seen or kept, such as an API key, so an app takes one without a custom component. The field draws what you type as discs, and browsers and password managers do not offer to save it, fill it, correct it or keep it in their form history. The value goes only to the handler, as `values[name]`:
|
|
1379
|
+
|
|
1380
|
+
```ts
|
|
1381
|
+
a.action('connect_carrier', {
|
|
1382
|
+
label: 'Connect carrier',
|
|
1383
|
+
icon: 'key',
|
|
1384
|
+
inputs: (i) => [i.secret('api_key', { label: 'API key', help: 'From the carrier’s settings page.' })],
|
|
1385
|
+
})
|
|
1386
|
+
```
|
|
1387
|
+
|
|
1388
|
+
It is never sent back: when the handler's error or an input's message holds the value, the dialog or the toast shows discs in its place. A secret takes no `default`, a later input's `when` cannot read it, and an `a.update` whose `set` writes it stops the config from loading, since the update would store the value and send it back; the handler decides what to do with it.
|
|
1389
|
+
|
|
1371
1390
|
### Actions that send from someone's mailbox
|
|
1372
1391
|
|
|
1373
1392
|
An `a.action` whose handler sends mail from the signed-in person's [own mailbox](email.md#from-someones-own-mailbox), such as an invoice from their Gmail, says so with `mailbox: true`. While they have linked no mailbox, its dialog offers to connect one instead of running: **Connect Gmail** starts the same sign-in as the account page's and comes back to the page they were on, where the action runs. Someone who signs in with Google without having allowed it to send mail is told that sign-in is no mailbox. The check needs a dialog, so give the action `confirm` or inputs:
|