@protobase/cli 0.71.6 → 0.72.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.
package/dist/cli/package.js
CHANGED
|
@@ -28,13 +28,9 @@ const builtInModels = (config, models) => {
|
|
|
28
28
|
].map((view) => view.toModel())
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
/**
|
|
32
|
-
* A missing index on a built-in table as a recommendation: the app owns its schema, so a database migrated by an earlier
|
|
33
|
-
* version still serves, and only the reads that need the index are refused until `protobase migration` writes it.
|
|
34
|
-
*/
|
|
31
|
+
/** A missing index on a built-in table: its fix is the next migration Protobase writes, not one by hand. */
|
|
35
32
|
const builtInIndexIssues = (issues) => issues.map((issue) => ({
|
|
36
33
|
...issue,
|
|
37
|
-
severity: "warning",
|
|
38
34
|
suggestion: `write it as a migration with \`protobase migration\` (${issue.suggestion})`
|
|
39
35
|
}));
|
|
40
36
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.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.
|
|
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.72.0",
|
|
47
|
+
"@protobase/layout": "0.72.0",
|
|
48
|
+
"@protobase/query": "0.72.0",
|
|
49
|
+
"@protobase/schema": "0.72.0",
|
|
50
|
+
"@protobase/server": "0.72.0",
|
|
51
|
+
"@protobase/ui": "0.72.0",
|
|
52
|
+
"@protobase/workflows": "0.72.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",
|
|
@@ -107,7 +107,7 @@ protobase doctor [connection string | --env VAR] [--config <dir>]
|
|
|
107
107
|
|
|
108
108
|
The URL comes as for [`scaffold`](#scaffold): the connection string, the variable `--env` names, or `DATABASE_URL`, each also read from the nearest `.env`.
|
|
109
109
|
|
|
110
|
-
Imports `config/index.ts` and the views of `config/*/ui.ts`, as the config module has them by convention, and checks every exported resource against the database, with the resources Protobase adds by what `protobase.config.ts` (read with `command: 'tool'`) and the resources enable: the [webhook](webhooks.md#subscriptions-in-the-admin-app) ones of `webhooks`, Failed jobs, [Activity](history.md) and [Comments](comments.md). The tables [`migration`](#migration) writes for those have every index their reads need, so after the project's migrations they pass; a read of theirs that lacks an index, as on a table an earlier version wrote, is
|
|
110
|
+
Imports `config/index.ts` and the views of `config/*/ui.ts`, as the config module has them by convention, and checks every exported resource against the database, with the resources Protobase adds by what `protobase.config.ts` (read with `command: 'tool'`) and the resources enable: the [webhook](webhooks.md#subscriptions-in-the-admin-app) ones of `webhooks`, Failed jobs, [Activity](history.md) and [Comments](comments.md). The tables [`migration`](#migration) writes for those have every index their reads need, so after the project's migrations they pass; a read of theirs that lacks an index, as on a table an earlier version wrote, is an error and doctor exits 1 until you run `migration` and apply what it writes:
|
|
111
111
|
|
|
112
112
|
- error: missing table or column, field type that does not fit the column (a file field needs a text column), table without a usable key, configured key not backed by a unique index, `.openExisting()` fields that are not the columns of a unique index, relation to a resource the config does not declare
|
|
113
113
|
- error: a read the [scan guard](api.md#safety) refuses, because no index serves a column it filters, sorts, searches or counts by. Doctor reads each table's indexes from the catalog, as the server does, and judges with the scan guard's own rule every read the API takes and the app makes: a filter on each `.filterable()` field, a sort by each `.sortable()` one, `search()` over the search fields, a role's own records (`.owner()`) and the names a relation shows; each view's list in its order and with the filter it opens with, its filter widgets and their counts, its chart, its map, board, calendar and timeline, its card photos, its order by hand, its related sections, galleries and charts, its named lists, its recent records and a saved search's new records; and each block of a [composed page](layouts.md) that lists records, and each `Chart` block's grouped and split fields. Each error is an index to add, with every request that needs it and where it comes from:
|