@protobase/server 0.19.7 → 0.19.9
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/check-views.js +5 -3
- package/package.json +4 -4
package/dist/check-views.js
CHANGED
|
@@ -38,9 +38,11 @@ const valueColorErrors = (view, model) => Object.entries(view.fields).flatMap(([
|
|
|
38
38
|
if (field?.type !== "enum") return [`value colours of "${name}" need an enum field`];
|
|
39
39
|
return Object.keys(hints.valueColors).filter((value) => !field.enumValues?.includes(value)).map((value) => `value colour "${value}" is not a value of "${name}"`);
|
|
40
40
|
});
|
|
41
|
-
const
|
|
41
|
+
const textHints = ["multiline", "markdown"];
|
|
42
|
+
const textHintErrors = (view, model) => Object.entries(view.fields).flatMap(([name, hints]) => {
|
|
42
43
|
const field = model.fields[name];
|
|
43
|
-
|
|
44
|
+
if (!field || field.type === "text") return [];
|
|
45
|
+
return textHints.filter((hint) => hints[hint]).map((hint) => `${hint} "${name}" needs a text field, not ${field.type}`);
|
|
44
46
|
});
|
|
45
47
|
const linkErrors = (view, model, models, pages) => view.actions.flatMap(({ name, label, run }) => {
|
|
46
48
|
if (run?.kind !== "link") return [];
|
|
@@ -115,7 +117,7 @@ const checkViews = (registry, views, pages = [], fieldTypes = {}) => {
|
|
|
115
117
|
...unknownFieldErrors(view, model),
|
|
116
118
|
...valueLabelErrors(view, model),
|
|
117
119
|
...valueColorErrors(view, model),
|
|
118
|
-
...
|
|
120
|
+
...textHintErrors(view, model),
|
|
119
121
|
...widgetErrors(view, model, fieldTypes),
|
|
120
122
|
...related,
|
|
121
123
|
...photos,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/server",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.9",
|
|
4
4
|
"description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@better-auth/passkey": "^1.7.7",
|
|
33
|
-
"@protobase/layout": "0.19.
|
|
34
|
-
"@protobase/query": "0.19.
|
|
35
|
-
"@protobase/schema": "0.19.
|
|
33
|
+
"@protobase/layout": "0.19.9",
|
|
34
|
+
"@protobase/query": "0.19.9",
|
|
35
|
+
"@protobase/schema": "0.19.9",
|
|
36
36
|
"@react-email/render": "^2.1.0",
|
|
37
37
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
38
38
|
"@sentry/core": "^11.7.0",
|