@protobase/cli 0.124.0 → 0.124.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.124.
|
|
3
|
+
"version": "0.124.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.124.
|
|
47
|
-
"@protobase/layout": "0.124.
|
|
48
|
-
"@protobase/query": "0.124.
|
|
49
|
-
"@protobase/schema": "0.124.
|
|
50
|
-
"@protobase/server": "0.124.
|
|
51
|
-
"@protobase/ui": "0.124.
|
|
52
|
-
"@protobase/workflows": "0.124.
|
|
46
|
+
"@protobase/config": "0.124.1",
|
|
47
|
+
"@protobase/layout": "0.124.1",
|
|
48
|
+
"@protobase/query": "0.124.1",
|
|
49
|
+
"@protobase/schema": "0.124.1",
|
|
50
|
+
"@protobase/server": "0.124.1",
|
|
51
|
+
"@protobase/ui": "0.124.1",
|
|
52
|
+
"@protobase/workflows": "0.124.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 @@ Uploaded files and images, where they are kept and how they are served.
|
|
|
6
6
|
|
|
7
7
|
- [File fields](../reference/files.md#what-the-column-holds): A text column holds an uploaded file, with limits on type and size.
|
|
8
8
|
- [File uploads in forms](../reference/files.md#in-forms): Forms upload a dropped or chosen file at once with a progress bar, and replace or remove it; tables show its name and a thumbnail.
|
|
9
|
+
- [Camera capture](../reference/files.md#camera-capture): File fields can open the camera directly on phones and tablets with `.capture()`, so a photo is taken and attached in one step.
|
|
9
10
|
- [File storage](../reference/files.md#providers): Files are kept on disk, or in a bucket of your own.
|
|
10
11
|
- [S3-compatible buckets](../reference/files.md#s3-compatible-buckets) (beta): Files are kept in any bucket that speaks the S3 API, when the app runs on Bun.
|
|
11
12
|
- [Files from a seed](../reference/files.md#writing-files-from-a-seed): A seed or another script writes files into the app's providers, read from its config and environment as the server reads them.
|
|
@@ -56,6 +56,7 @@ export const bikes = resource('bikes')
|
|
|
56
56
|
| `.placeholder('photo_placeholder')` | Each image's ThumbHash in that text field, drawn while the image loads, see [Image variants and placeholders](#image-variants-and-placeholders). |
|
|
57
57
|
| `.variants({ card: { … } }, { original? })` | Resized copies of each image stored beside it, see [Image variants and placeholders](#image-variants-and-placeholders). |
|
|
58
58
|
| `.externalUrls()` | Also takes an https URL of a file elsewhere instead of an upload, see [External URLs](#external-urls). |
|
|
59
|
+
| `.capture()`, `.capture('user')` | Opens the rear camera, or the front one with `'user'`, on phones and tablets, and takes only images, see [Camera capture](#camera-capture). |
|
|
59
60
|
|
|
60
61
|
A file field cannot be filterable, sortable, aliased, searched, sensitive, or the key, tenant, owner or soft delete field. [`protobase doctor`](cli.md#doctor) checks that its column is a text type.
|
|
61
62
|
|
|
@@ -174,6 +175,17 @@ A write takes only a ticket, `null` to clear the field, or the stored `uri` unch
|
|
|
174
175
|
|
|
175
176
|
In the admin app's create and edit forms, a file field takes a dropped or chosen file, limited to the field's `.accept()` types, and uploads it at once with a progress bar; Save then stores it with the record. A stored file shows its thumbnail or an icon, its name linking to the file, its type and size, and the type it was sent as when the server corrected it. Replace picks another file, and Remove, for an optional field, clears it. Tables show the file's name, beside a small thumbnail for an image.
|
|
176
177
|
|
|
178
|
+
### Camera capture
|
|
179
|
+
|
|
180
|
+
A field with `.capture()` opens the camera directly on phones and tablets, so a photo is taken and attached in one step, such as a mechanic photographing a meter. The rear camera opens by default, and `.capture('user')` opens the front one.
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
meter_photo: f.file().capture(),
|
|
184
|
+
selfie: f.file().capture('user').optional(),
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The field takes only images: the image types of its `.accept()`, or any image when it names none, and an `.accept()` after it that names another type is an error. On a phone or tablet the form offers Take a photo, which opens the camera, and Choose a photo, which opens the phone's own chooser for a photo taken before; a stored photo offers Retake beside Replace. A desktop browser has no camera to open, so the field picks or takes a dropped image file.
|
|
188
|
+
|
|
177
189
|
### How the type is decided
|
|
178
190
|
|
|
179
191
|
An upload carries three hints: what the **content** is (C, from its magic bytes), what the **name's extension** says (E), and what the **client declared** (H, the request's or the file part's `Content-Type`; `application/octet-stream` counts as none).
|