@protobase/cli 0.83.1 → 0.84.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.84.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": {
|
|
@@ -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.
|
|
47
|
-
"@protobase/layout": "0.
|
|
48
|
-
"@protobase/query": "0.
|
|
49
|
-
"@protobase/schema": "0.
|
|
50
|
-
"@protobase/server": "0.
|
|
51
|
-
"@protobase/ui": "0.
|
|
52
|
-
"@protobase/workflows": "0.
|
|
46
|
+
"@protobase/config": "0.84.0",
|
|
47
|
+
"@protobase/layout": "0.84.0",
|
|
48
|
+
"@protobase/query": "0.84.0",
|
|
49
|
+
"@protobase/schema": "0.84.0",
|
|
50
|
+
"@protobase/server": "0.84.0",
|
|
51
|
+
"@protobase/ui": "0.84.0",
|
|
52
|
+
"@protobase/workflows": "0.84.0",
|
|
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",
|
|
@@ -269,7 +269,7 @@ export default defineConfig({ workflows: { plugins: ['@acme/workflow-plugin'] }
|
|
|
269
269
|
- **Type:** `{ root?: string; endpoints?: string[] }`
|
|
270
270
|
- **Default:** off
|
|
271
271
|
|
|
272
|
-
Turns on [storage configurations](../workflows.md#storing-files), the named places workflows store files in. `root` is the one folder local configurations live inside, such as a mounted file share; it must not overlap a file provider's folder. Without it, only S3-compatible configurations are taken. `endpoints` are the `https://` origins an S3-compatible configuration may name; without them,
|
|
272
|
+
Turns on [storage configurations](../workflows.md#storing-files), the named places workflows store files in. `root` is the one folder local configurations live inside, such as a mounted file share; it must not overlap a file provider's folder. Without it, only S3-compatible configurations are taken. `endpoints` are the `https://` origins an S3-compatible configuration may name; without them, none are taken. S3-compatible configurations cannot be used while the server's environment sets `S3_ENDPOINT`, `AWS_ENDPOINT`, `S3_REGION`, `AWS_REGION`, `S3_SESSION_TOKEN` or `AWS_SESSION_TOKEN`, since the S3 client would sign their requests with them. The configurations' keys are encrypted, so the app needs `PROTOBASE_ENCRYPTION_KEY`.
|
|
273
273
|
|
|
274
274
|
```ts
|
|
275
275
|
export default defineConfig({ workflows: { storage: { root: './data/workflow-storage', endpoints: ['https://storage.example.com'] } } })
|
|
@@ -78,7 +78,7 @@ What `run` gets, and nothing more:
|
|
|
78
78
|
| `fetch(url, init)` | The only way a plugin should send a request: see [Sending requests](#sending-requests). |
|
|
79
79
|
| `records` | `create`, `createMany`, `update`, `get` and `list` of the app's records, through the API as the user who saved the version the run runs, with the roles they hold now: their access rules, tenant, validation and write hooks apply. A refusal fails the step with `Records.Refused`. |
|
|
80
80
|
| `files` | `keep(bytes, name, type)` stores a file of the run and returns its file value; `read(value, field)` reads one the run kept. No other file of the app is reachable. |
|
|
81
|
-
| `storage` | `put(configuration, path, stream, { name, type })` streams a file into a [storage configuration](workflows.md#storing-files) and returns the stored file; `read(file, field)` gives a stored file's bytes as a stream. Both read the configuration as the user who saved the version, and fail with `Storage.NotFound` for one they may not read, a file that is gone, or an app with storage off. |
|
|
81
|
+
| `storage` | `put(configuration, path, stream, { name, type })` streams a file into a [storage configuration](workflows.md#storing-files) and returns the stored file, cancelling the stream when it fails; `open(configuration, path)` checks both before there is a stream, and its `put(stream, { name, type })` stores one there, for a step that should not fetch a file it cannot store; `read(file, field)` gives a stored file's bytes as a stream. Both read the configuration as the user who saved the version, and fail with `Storage.NotFound` for one they may not read, a file that is gone, or an app with storage off. |
|
|
82
82
|
| `mail` | `send(message)` from the app's own sender; `undefined` when the app sends no mail. |
|
|
83
83
|
| `connection` | `accessToken()` of the connection the step declares, or `undefined`. |
|
|
84
84
|
| `mailbox` | `send(message)` from the [own mailbox](email.md#from-someones-own-mailbox) of the person who turned on the version the run runs, signed in as themselves, while they may still change the workflow; otherwise it fails `not_linked` and sends nothing. `undefined` when the app links no mailboxes. |
|
|
@@ -350,8 +350,8 @@ A configuration is a record of `storage_configurations`, which you create and ch
|
|
|
350
350
|
| `name` | What workflows name it by: a lowercase letter, then lowercase letters, digits and `_`. Unique in the tenant. |
|
|
351
351
|
| `kind` | `local`, a folder under `root`, or `s3`, a bucket. |
|
|
352
352
|
| `dir` | For `local`: a folder inside `root`, such as `invoices/2026`. A path that would leave it, through `..` or a symlink, is refused. Without `root`, only `s3` configurations are taken. |
|
|
353
|
-
| `bucket`, `region` | For `s3`: the bucket and its region. |
|
|
354
|
-
| `endpoint` | For `s3
|
|
353
|
+
| `bucket`, `region` | For `s3`: the bucket and its region, both required. |
|
|
354
|
+
| `endpoint` | For `s3`, required: one of the `endpoints` the app lists. Its host must resolve to public addresses, which every step checks again. |
|
|
355
355
|
| `access_key_id`, `secret_access_key` | For `s3`: the bucket's keys, both required before a step can use it. They are stored encrypted, and nobody can read them again once saved, not even you; set new ones to change them. |
|
|
356
356
|
|
|
357
357
|
You set the keys with the API or the MCP `update_record` tool: `PATCH /api/v1/storage_configurations/<id>` with its `If-Match` and `{ "access_key_id": "...", "secret_access_key": "..." }`. <gap>An S3 configuration's keys cannot be set in the admin app's form because its editor for write-only fields is not implemented.</gap>
|
|
@@ -377,12 +377,12 @@ A stored file is `{ configuration, node, path, name, type, size }`: the configur
|
|
|
377
377
|
}
|
|
378
378
|
```
|
|
379
379
|
|
|
380
|
-
A step reads the configuration it names afresh each time, as the user who saved the run's version, with the roles they hold now. It fails with:
|
|
380
|
+
A step reads the configuration it names afresh each time, as the user who saved the run's version, with the roles they hold now. `app:http` with `store` checks the configuration and path before it sends the request, so one it cannot store to fails without a request. It fails with:
|
|
381
381
|
|
|
382
382
|
| Error | |
|
|
383
383
|
| --- | --- |
|
|
384
384
|
| `Storage.NotFound` | No configuration of that name the workflow's last editor may read, which says nothing of one in another tenant or one they may not read; or the file is gone, which a `Catch` can take. |
|
|
385
|
-
| `Storage.Unavailable` | The configuration cannot be used as it is, such as an S3 one without keys
|
|
385
|
+
| `Storage.Unavailable` | The configuration cannot be used as it is, such as an S3 one without keys, with keys that no longer decrypt, or on a server whose environment sets an S3 endpoint, region or session token. |
|
|
386
386
|
| `Storage.Failed` | The store failed; the cause names its error code only. |
|
|
387
387
|
| `Storage.Full` | The store has no room left. |
|
|
388
388
|
| `Storage.TooLarge` | `app:storage.get` of a file over 10 MiB. |
|