@protobase/cli 0.83.0 → 0.83.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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.83.0";
2
+ var version = "0.83.1";
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.83.0",
3
+ "version": "0.83.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.83.0",
47
- "@protobase/layout": "0.83.0",
48
- "@protobase/query": "0.83.0",
49
- "@protobase/schema": "0.83.0",
50
- "@protobase/server": "0.83.0",
51
- "@protobase/ui": "0.83.0",
52
- "@protobase/workflows": "0.83.0",
46
+ "@protobase/config": "0.83.1",
47
+ "@protobase/layout": "0.83.1",
48
+ "@protobase/query": "0.83.1",
49
+ "@protobase/schema": "0.83.1",
50
+ "@protobase/server": "0.83.1",
51
+ "@protobase/ui": "0.83.1",
52
+ "@protobase/workflows": "0.83.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",
@@ -214,8 +214,8 @@ The rules behind these steps are described under [Access](#access).
214
214
  - **Keys** are the URL text (`a,b` when composite), a number, a list of parts, or a reference.
215
215
  - **`$ref`**: `ref: 'invoice'` on a create names the record; later operations use `{ "$ref": "invoice" }` as a key, a key part, or a value in `data` (it stands for that record's key, or with `{ "$ref": "invoice", "field": "number" }` a readable field's value). A ref must come after its create.
216
216
  - **`reorder`** sets `field` to `start`, `start` + 1, ... in the order of `keys`, so a long list sends only the stretch that moved, and writes only the records whose value changes, each as an ordinary update (so each needs its `etags` entry, and hooks see each). To work with a non-deferrable unique index such as `(invoice_id, position)`, the changing records are first moved out of the range in use, in the same transaction and without touching their ETags: above the highest value of the column, or, when a check constraint refuses that (checked with a savepoint), below the lowest one. Then they get their final values, which collide with nothing. The field must be an integer the caller may write; the keys must all exist and be visible to the caller. When it is the resource's [position with `after`](ui-config.md#ranked-after-what-they-depend-on), a reorder that puts a record at or above a record it depends on, or one of those at or below it, fails with `409` and the type `ranks-above-dependency`, naming both keys in `record` and `dependsOn`; pairs out of order before it do not count.
217
- - **`move`** puts the record `key` just after `after`, or first when it is `null`, in the list `filter` reads (as a list's `filter` does) ordered by `field`. It is anchored to that place rather than to ETags: it saves while the record after `after` there, leaving out the moved one, is still `before` (`null`: none), whatever else changed in the list or in the records, and fails with `412` otherwise, so the caller reads the list again. Leave `before` out when the caller did not load the record after `after`; then only `after` is checked. The server reads the list in its current order and renumbers the shortest stretch that saves the move, written as a `reorder` writes it, so the same field rules, unique index handling and `ranks-above-dependency` check apply. Moves of the same resource's `field` run one at a time. A filter needs indexes as a list's does.
218
- - **Result**: `{ results: [...] }`, one entry per operation in order: `create` and `update` give `record` and `etag`, `delete` gives `deleted: true`, `reorder` gives `records` (every key in order, with its etag), and `move` the records it numbered, in order, with their etags.
217
+ - **`move`** puts the record `key` just after `after`, or first when it is `null`, in the list `filter` reads (as a list's `filter` does) ordered by `field`. It is anchored to that place rather than to ETags: it saves while the record after `after` there, leaving out the moved one, is still `before` (`null`: none), whatever else changed in the list or in the records, and fails with `412` otherwise, so the caller reads the list again. Leave `before` out when the caller did not load the record after `after`; then only `after` is checked. The server reads the list in its current order and renumbers the shortest stretch that saves the move, written as a `reorder` writes it, so the same field rules, unique index handling and `ranks-above-dependency` check apply. Moves and reorders of the same resource's `field` run one at a time, and a record of the stretch renumbered by another write between the move's read and its write refuses it with `412` too. A filter needs indexes as a list's does.
218
+ - **Result**: `{ results: [...] }`, one entry per operation in order: `create` and `update` give `record` and `etag`, `delete` gives `deleted: true`, `reorder` gives `records` (every key in order, with its etag), and `move` the records it numbered, in order, with their etags. Each of those records comes with `previous`, its value of `field` before the operation, which an undo puts back.
219
219
  - **Failure**: nothing is written. The problem is the failing operation's own (`400`, `403`, `404`, `409`, `412`, `428`, ...) with `operation` (its index), `op` and `resource` added. A stale ETag anywhere is a `412` for the whole batch.
220
220
 
221
221
  ## Authentication