@protobase/cli 0.123.3 → 0.123.4
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/dist/migration/parts.js
CHANGED
|
@@ -93,7 +93,7 @@ const migrationParts = (project) => {
|
|
|
93
93
|
...project.realtime?.relay ? [{
|
|
94
94
|
name: "relay",
|
|
95
95
|
title: "The trigger that closes a deleted sign-in session's sockets on the realtime relay",
|
|
96
|
-
sql: () => relayMigration(project.db, project.auth)
|
|
96
|
+
sql: ({ authWritten }) => relayMigration(project.db, project.auth, authWritten)
|
|
97
97
|
}] : [],
|
|
98
98
|
...sqlSends(project.realtime) ? [{
|
|
99
99
|
name: "channel_sends",
|
|
@@ -24,7 +24,7 @@ const runMigration = async ({ projectDir, dir, auth, database, protobaseVersion,
|
|
|
24
24
|
if (database && difference.migration && difference.migration.checks.length > 0) await runPreconditions(database.url, difference.migration.checks);
|
|
25
25
|
const compared = [];
|
|
26
26
|
for (const part of database?.parts ?? []) {
|
|
27
|
-
const sql = await part.sql();
|
|
27
|
+
const sql = await part.sql({ authWritten: Boolean(difference.migration) });
|
|
28
28
|
if (sql !== void 0) compared.push({
|
|
29
29
|
name: part.name,
|
|
30
30
|
text: section(part.title, sql)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.123.
|
|
3
|
+
"version": "0.123.4",
|
|
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.123.
|
|
47
|
-
"@protobase/layout": "0.123.
|
|
48
|
-
"@protobase/query": "0.123.
|
|
49
|
-
"@protobase/schema": "0.123.
|
|
50
|
-
"@protobase/server": "0.123.
|
|
51
|
-
"@protobase/ui": "0.123.
|
|
52
|
-
"@protobase/workflows": "0.123.
|
|
46
|
+
"@protobase/config": "0.123.4",
|
|
47
|
+
"@protobase/layout": "0.123.4",
|
|
48
|
+
"@protobase/query": "0.123.4",
|
|
49
|
+
"@protobase/schema": "0.123.4",
|
|
50
|
+
"@protobase/server": "0.123.4",
|
|
51
|
+
"@protobase/ui": "0.123.4",
|
|
52
|
+
"@protobase/workflows": "0.123.4",
|
|
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",
|
|
@@ -45,7 +45,7 @@ export default defineConfig(({ env }) => ({
|
|
|
45
45
|
| `channels.<resource>.events` | The [events](#client-events) the channel's members may send each other, by name, each with its payload's `schema`, its `maxBytes` and the rate one person may send it at, `perSecond` in bursts of `burst`. |
|
|
46
46
|
| `presence` | Turns on [presence](#presence): the app's own resource it is kept in, its fields of the person's user id (`user`), the status (`status`) and when it began (`at`), and the bearer token of the relay's reports (`key`), at least 32 characters. |
|
|
47
47
|
|
|
48
|
-
The relay needs the app's own [sign-in](auth.md), whose sessions its tickets name, with its store in the app's own database, as the `auth` config puts it: an auth store in another database is refused. A members resource's changes must be captured, so declare [`.live()`](live.md) on it; the relay hears of the changes of every resource whose changes are captured, such as a live one, that is a channel resource or has a relation field to one. [`protobase migration`](cli.md#migration) writes the trigger that ends a deleted session's sockets, in the `relay` schema,
|
|
48
|
+
The relay needs the app's own [sign-in](auth.md), whose sessions its tickets name, with its store in the app's own database, as the `auth` config puts it: an auth store in another database is refused. A members resource's changes must be captured, so declare [`.live()`](live.md) on it; the relay hears of the changes of every resource whose changes are captured, such as a live one, that is a channel resource or has a relation field to one. [`protobase migration`](cli.md#migration) writes the trigger that ends a deleted session's sockets, in the `relay` schema, after the auth store's steps when the same file writes them, so a new app's first migration sets up both; the server checks it at start.
|
|
49
49
|
|
|
50
50
|
[`protobase relay app`](cli.md#relay-app) prints the app's entry for the relay's apps file, from this config and the app's `url`.
|
|
51
51
|
|