@protobase/cli 0.67.6 → 0.67.8
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 +1 -1
- package/package.json +7 -7
- package/skills/protobase/references/reference/config/jobs-and-events.md +1 -1
- package/skills/protobase/references/reference/data-config.md +1 -1
- package/skills/protobase/references/reference/jobs.md +1 -1
- package/skills/protobase/references/reference/webhooks.md +1 -1
package/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.67.
|
|
3
|
+
"version": "0.67.8",
|
|
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,12 +43,12 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@better-auth/core": "^1.7.12",
|
|
45
45
|
"@hono/node-server": "^2.1.3",
|
|
46
|
-
"@protobase/config": "0.67.
|
|
47
|
-
"@protobase/layout": "0.67.
|
|
48
|
-
"@protobase/query": "0.67.
|
|
49
|
-
"@protobase/schema": "0.67.
|
|
50
|
-
"@protobase/server": "0.67.
|
|
51
|
-
"@protobase/ui": "0.67.
|
|
46
|
+
"@protobase/config": "0.67.8",
|
|
47
|
+
"@protobase/layout": "0.67.8",
|
|
48
|
+
"@protobase/query": "0.67.8",
|
|
49
|
+
"@protobase/schema": "0.67.8",
|
|
50
|
+
"@protobase/server": "0.67.8",
|
|
51
|
+
"@protobase/ui": "0.67.8",
|
|
52
52
|
"@react-email/render": "^2.1.0",
|
|
53
53
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
54
54
|
"@sentry/vite-plugin": "^11.10.0",
|
|
@@ -203,7 +203,7 @@ export default defineConfig({ webhooks: { deliveryLog: true } })
|
|
|
203
203
|
- **Type:** `boolean`
|
|
204
204
|
- **Default:** `false`
|
|
205
205
|
|
|
206
|
-
Lets subscriptions send to private, loopback and link-local addresses, for development and tests. Off, a URL whose host resolves to one is refused, so a subscription cannot reach the app's own network.
|
|
206
|
+
Lets subscriptions send to private, loopback and link-local addresses, for development and tests. Off, a URL whose host resolves to one is refused when the subscription is saved and again at each delivery, which connects only to the address it checked, so a subscription cannot reach the app's own network.
|
|
207
207
|
|
|
208
208
|
```ts
|
|
209
209
|
export default defineConfig(({ command }) => ({ webhooks: { allowPrivateAddresses: command === 'dev' } }))
|
|
@@ -88,7 +88,7 @@ Field and resource names are snake_case by convention, like the columns: they ar
|
|
|
88
88
|
| `f.timestamp()` | `timestamp`, `timestamptz` | ISO 8601 with offset | an instant, shown on the viewer's clock, in their browser's time zone, which hovering over it names |
|
|
89
89
|
| `f.uuid()` | `uuid` | string | |
|
|
90
90
|
| `f.enum(['a', 'b'])` | Postgres enum, or text with a `CHECK (... IN ...)` | one of the values | |
|
|
91
|
-
| `f.json()` | `json`, `jsonb` | any JSON | |
|
|
91
|
+
| `f.json()` | `json`, `jsonb` | any JSON | nested at most 256 levels deep (each array or object is a level); a deeper value is refused |
|
|
92
92
|
| `f.relation('resource')` | the key column(s) of another resource | its key | `.columns([...])` |
|
|
93
93
|
| `f.currency()` | `text` | ISO 4217 code (`EUR`) | |
|
|
94
94
|
| `f.country()` | `text` | ISO 3166-1 alpha-2 code (`NL`) | |
|
|
@@ -183,4 +183,4 @@ bun run db:migrate
|
|
|
183
183
|
|
|
184
184
|
[`protobase migration`](cli.md#migration) writes what the database lacks, taken from pg-boss's own construction and migration plans for the pinned version, without their `BEGIN` and `COMMIT` and with any `CONCURRENTLY` index build made a plain one, so the file runs in the project's migration transaction. The server never creates or migrates it: `protobase dev` and `protobase serve` read its version at startup and refuse to start while it is missing or behind, naming the command. A database whose jobs schema is newer than the running Protobase is refused too.
|
|
185
185
|
|
|
186
|
-
pg-boss runs here without what needs a session of its own: no `LISTEN`/`NOTIFY` (a job enqueued in the same process wakes its worker directly, the rest is polled), only transaction-scoped advisory locks, unnamed prepared statements, no index rebuilds and no instance registry. It works through PgBouncer in transaction mode
|
|
186
|
+
pg-boss runs here without what needs a session of its own: no `LISTEN`/`NOTIFY` (a job enqueued in the same process wakes its worker directly, the rest is polled), only transaction-scoped advisory locks, unnamed prepared statements, no index rebuilds and no instance registry. It works through PgBouncer in transaction mode, over the app's own connection pool.
|
|
@@ -113,7 +113,7 @@ export default defineConfig({ webhooks: {} })
|
|
|
113
113
|
|
|
114
114
|
It adds two pages, over a `webhooks` schema that [`protobase migration`](cli.md#migration) writes (`NNN_webhooks.sql`):
|
|
115
115
|
|
|
116
|
-
- **Webhook subscriptions** (`webhook_subscriptions`, the table `webhooks.subscriptions`): a name, the events (`orders.created orders.large`, or `orders.*`), the URL, a filter, extra headers, full or thin payload, and whether it is enabled. The server sets the tenant and the owner, the person who made it, and makes the secret, which only a [reveal](api.md#sensitive-fields-and-audit) shows. Saving checks the events and the filter against the resources, and refuses a URL whose host is a private, loopback or link-local address.
|
|
116
|
+
- **Webhook subscriptions** (`webhook_subscriptions`, the table `webhooks.subscriptions`): a name, the events (`orders.created orders.large`, or `orders.*`), the URL, a filter, extra headers, full or thin payload, and whether it is enabled. The server sets the tenant and the owner, the person who made it, and makes the secret, which only a [reveal](api.md#sensitive-fields-and-audit) shows. Saving checks the events and the filter against the resources, and refuses a URL whose host is a private, loopback or link-local address. Each delivery checks the host's addresses again and connects to the very address it checked, so a host that answers differently by then cannot steer it into the app's own network; a redirect is never followed.
|
|
117
117
|
- **Webhook deliveries** (`webhook_deliveries`, a view over the delivery jobs): the deliveries that wait for their next try or failed for good, with their last error. A delivery leaves the list once it succeeds.
|
|
118
118
|
|
|
119
119
|
The migration gives the subscriptions table an index for each sort, filter and search of its list, and creates the `pg_trgm` extension the search's indexes need (`create extension if not exists pg_trgm`, a trusted extension since Postgres 13, so any role that may create in the database can). A database that has an earlier version's schema gets the indexes from the next `protobase migration`; until it is applied the server still starts, and refuses only the list's reads that need them.
|