@protobase/cli 0.92.0 → 0.93.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.
|
|
3
|
+
"version": "0.93.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.
|
|
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.93.1",
|
|
47
|
+
"@protobase/layout": "0.93.1",
|
|
48
|
+
"@protobase/query": "0.93.1",
|
|
49
|
+
"@protobase/schema": "0.93.1",
|
|
50
|
+
"@protobase/server": "0.93.1",
|
|
51
|
+
"@protobase/ui": "0.93.1",
|
|
52
|
+
"@protobase/workflows": "0.93.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",
|
|
@@ -351,7 +351,7 @@ export default defineUi({
|
|
|
351
351
|
})
|
|
352
352
|
```
|
|
353
353
|
|
|
354
|
-
`invoke(name, { method?, body?, path?, query?, headers?, cache? })` sends a `GET`, or a `POST` with a JSON `body`; `cache` is the browser's fetch cache mode
|
|
354
|
+
`invoke(name, { method?, body?, path?, query?, headers?, cache? })` sends a `GET`, or a `POST` with a JSON `body`; `cache` is the browser's fetch cache mode other than `only-if-cached`, such as `no-store` for an answer only its caller may see. It resolves to the parsed JSON, to text for a `text/*` answer or one without a content type, to a `Blob` of any other type, or to `undefined` for a `204`. A function sends a file, such as a PDF, as a plain `Response` with its type and name: `new Response(bytes, { headers: { 'content-type': 'application/pdf', 'content-disposition': 'attachment; filename="invoice.pdf"' } })`, and `invoke` gives the caller that `Blob`, with its `type`. A problem rejects with an `ApiError`, as any call of the client does. Outside the admin, `createClient` from `@protobase/client` gives the same `invoke`, or you can call the URL with `fetch` and an `Authorization: Bearer` header.
|
|
355
355
|
|
|
356
356
|
## Hono apps
|
|
357
357
|
|
|
@@ -61,7 +61,7 @@ The function gets the record's key as its URL has it, and returns the value as J
|
|
|
61
61
|
|
|
62
62
|
Each query the function sends is parsed with Postgres's own parser, however it was built. For each table it reads, Protobase keeps the query's conditions on that table: comparisons of its columns with constants and parameters, `IN`, `= ANY`, `BETWEEN` and null tests, joined with `AND`, `OR` and `NOT`, with the conditions of inner joins, and of an outer join's `ON` for its optional side. The condition is the dependency, so a new row that comes to match is caught as well as a row that leaves it. A part it cannot work out, such as a function call or a column of another table, counts as matching every row: a query it cannot read at all reads the whole table. Nested queries, `WITH` queries and both sides of a `UNION` count too. An update counts only when it changes a column the query used.
|
|
63
63
|
|
|
64
|
-
A table that is no resource of `reads` or the record's own stops the run with an error naming it: add its resource to `reads`. List every resource the function reads there, those it names with `depends()` included: only their changes are captured, and `depends()` on any other stops the run too. `depends()` adds a dependency by hand to a listed resource and never stands in for `reads`; with `track: false`, the dependencies it names are the only ones, for a function whose queries say less than it knows.
|
|
64
|
+
A table that is no resource of `reads` or the record's own stops the run with an error naming it: add its resource to `reads`. A table that is no resource at all becomes one and goes in `reads` when it holds data of its own, since otherwise no change to it is captured; for one whose changes come from resources, such as a view, name the resources behind it with `depends()` and turn tracking off. List every resource the function reads there, those it names with `depends()` included: only their changes are captured, and `depends()` on any other stops the run too. `depends()` adds a dependency by hand to a listed resource and never stands in for `reads`; with `track: false`, the dependencies it names are the only ones, for a function whose queries say less than it knows.
|
|
65
65
|
|
|
66
66
|
## The clock
|
|
67
67
|
|