@protobase/cli 0.79.5 → 0.81.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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.79.5";
2
+ var version = "0.81.0";
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.79.5",
3
+ "version": "0.81.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.79.5",
47
- "@protobase/layout": "0.79.5",
48
- "@protobase/query": "0.79.5",
49
- "@protobase/schema": "0.79.5",
50
- "@protobase/server": "0.79.5",
51
- "@protobase/ui": "0.79.5",
52
- "@protobase/workflows": "0.79.5",
46
+ "@protobase/config": "0.81.0",
47
+ "@protobase/layout": "0.81.0",
48
+ "@protobase/query": "0.81.0",
49
+ "@protobase/schema": "0.81.0",
50
+ "@protobase/server": "0.81.0",
51
+ "@protobase/ui": "0.81.0",
52
+ "@protobase/workflows": "0.81.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",
@@ -98,7 +98,7 @@ bun install
98
98
 
99
99
  ## Run the ERP example
100
100
 
101
- `tests/apps/erp` is a sample ERP on a real Postgres database, seeded with three years of history. It needs Docker for the database: `bun run db:up` starts the Postgres container and gives each example its database and a `.env` from its `.env.example`.
101
+ `tests/apps/erp` is a sample ERP on a real Postgres database, seeded with three years of history. It needs Docker for the database: `bun run db:up` starts the Postgres container and gives each example its database and a `.env` from its `.env.example`. The databases listen on `127.0.0.1` only, so on Docker Engine 28.0.0 or later other machines on the network cannot reach them, unless the daemon's `allow-direct-routing` option, off by default, lets them reach containers by their own address; an older Docker Engine lets hosts on the same local network segment reach them, so it needs a firewall that blocks them. On Linux with firewalld, Docker Engine 28.2.0 to 28.3.2 lets other hosts reach them again after a firewalld reload, so it needs that firewall too, or an upgrade to 28.3.3 or later. A checkout or worktree on an older base publishes them on every interface again, so rebase it onto `main` before any `docker compose up` or `db:up`.
102
102
 
103
103
  ```sh
104
104
  bun run db:up && bun run --cwd tests/apps/erp db:migrate && bun run --cwd tests/apps/erp db:seed --scale small # the ERP's tables and Better Auth's
@@ -99,7 +99,7 @@ The store's migrations then make nothing of the user table, which a migration of
99
99
  | `PROTOBASE_OPERATOR_ISSUER`, `PROTOBASE_OPERATOR_CLIENT_ID`, `PROTOBASE_OPERATOR_CLIENT_SECRET` | the [operator provider](#operator-provider) its staff sign in with to sign in as people, passed by the platform; staff sign-in is off without them. `PROTOBASE_OPERATOR_NAME` and `PROTOBASE_OPERATOR_GROUP` are optional |
100
100
  | `PROTOBASE_TRUSTED_PROXIES` | the proxies in front of `protobase serve`, addresses or CIDR ranges, comma separated, such as `172.30.87.1`, the Docker network's gateway in the [compose template](../guides/deploy.md#compose-template); see [Client addresses](#client-addresses) |
101
101
 
102
- - Cookies are `SameSite=Lax`, and `Secure` when the app's `url` is https. When it is http with a port, their names carry it (`better-auth-5173.session_token`), because a browser shares cookies across the ports of a host: two apps on `localhost` then keep their own sign-ins.
102
+ - Cookies are `SameSite=Lax`. When the app's `url` is https they are `__Host-` cookies (`__Host-better-auth.session_token`): `Secure`, on `Path=/` and without a `Domain`, so another app on a sibling host of a shared domain cannot set a session or a sign-in flow cookie for this one. When it is http with a port, their names carry it (`better-auth-5173.session_token`), because a browser shares cookies across the ports of a host: two apps on `localhost` then keep their own sign-ins.
103
103
  - Sign-in is rate limited (5 password attempts per minute and client by default, `signInPerMinute`, which also limits [sign-up](#open-sign-up) requests; 3 per minute for emailed codes); [Client addresses](#client-addresses) says how a client is known.
104
104
  - New passwords need at least 12 characters.
105
105
  - `name`, at the config's top level, is the app's name: authenticator apps and passkey prompts show it, the admin app's sidebar shows it at the top beside the app's [icon](app-identity.md#the-icons), else its initial (Protobase's mark and wordmark when it is `Protobase`), the sign-in page's title names it, every browser tab of the admin app ends its title with it, the [installed app](installable-app.md) is called by it, the [auth emails](email.md#protobases-own-mail) name the app with it, and the platform's mailer sends them as it (the sender's display name). `PROTOBASE_APP_NAME`, when set, overrides it; without either it is `Protobase`, then without a display name. See [App identity](app-identity.md).
@@ -106,7 +106,7 @@ export default defineConfig({
106
106
 
107
107
  ### Limits
108
108
 
109
- `maxBytes` (`'1 GB'`, as for `.maxSize()`) and `maxFiles` cap what one provider holds, for either kind; in a URL they are `max_bytes=1GB&max_files=20000`. An upload that would pass either is refused with `507`, and one that passes `maxBytes` while it streams stops there and leaves nothing. Scheduled deletes (`.cleanup/`) do not count, so a full provider can still be emptied.
109
+ `maxBytes` (`'1 GB'`, as for `.maxSize()`) and `maxFiles` cap what one provider holds, for either kind; in a URL they are `max_bytes=1GB&max_files=20000`. An upload that would pass either is refused with `507`, and one that passes `maxBytes` while it streams stops there and leaves nothing. A file put again at its path takes no second file and counts only what it grows past the one it replaces; puts to one path wait for each other, so each replaces what the one before left. Scheduled deletes (`.cleanup/`) do not count, so a full provider can still be emptied.
110
110
 
111
111
  A bucket has no quota of its own, so the provider counts what it holds with `list` on the first upload, and again once that count is five minutes old; in between it adds its own uploads. Several instances, or files added by hand, can therefore pass a limit by what they wrote since the last count.
112
112
 
@@ -333,7 +333,7 @@ A run's status is `queued`, `running`, `waiting` (with the time it goes on), `su
333
333
  A trace that cannot be written is not kept, and a step a crash made run again is in the trace once for each time it ran.
334
334
  :::
335
335
 
336
- A run's **trace** keeps every step it took, one JSON object a line (JSONL): the state, its type, the scope it ran in (empty for the run itself, `Each.3[0]` for item 0 of the Map `Each` that was step 3), its number, its try, its status (`succeeded`, `retrying`, `caught` or `failed`), its input, output and assigned variables, its logs, when it started and ended, its error and cause, where it goes on to, and whether it was `recorded`. It is kept in the private file provider, not the database: a segment writes the steps it ran as a part under `workflows/<run>/trace/` before each checkpoint after them is saved, so a crash once it is saved loses none of them, and its last steps before the run goes on, so the next segment's part comes after them; the segment that ends the run joins the parts into `workflows/<run>/trace.jsonl` before the run is marked ended, so a run seen ended has its whole trace, which the run's **Trace** field (`trace_file`) then offers to download, and the run's page lists step by step. A step a crash made run again is in the trace once for each time a part kept it. A trace that cannot be written goes to the app's error report (`onUnhandledError`), and the run goes on.
336
+ A run's **trace** keeps every step it took, one JSON object a line (JSONL): the state, its type, the scope it ran in (empty for the run itself, `Each.3[0]` for item 0 of the Map `Each` that was step 3), its number, its try, its status (`succeeded`, `retrying`, `caught` or `failed`), its input, output and assigned variables, its logs, when it started and ended, its error and cause, where it goes on to, and whether it was `recorded`. It is kept in the private file provider, not the database: a segment writes the steps it ran as a part under `workflows/<run>/trace/`, numbered in the order the run wrote them by a count kept at `workflows/<run>/trace-next`, before each checkpoint after them is saved, so a crash once it is saved loses none of them, and its last steps before the run goes on, so the next segment's part comes after them; the segment that ends the run joins the parts into `workflows/<run>/trace.jsonl` before the run is marked ended, so a run seen ended has its whole trace, which the run's **Trace** field (`trace_file`) then offers to download, and the run's page lists step by step. A step a crash made run again is in the trace once for each time a part kept it. A trace that cannot be written goes to the app's error report (`onUnhandledError`), and the run goes on.
337
337
 
338
338
  Every run keeps a trace by default. The run's own `trace` (set as it is started), else its workflow definition's `trace`, else the config's `workflows.trace` says which: `all`, `failed`, which keeps the trace of a run that fails and drops the parts of one that succeeds, or `none`.
339
339