@protobase/server 0.132.2 → 0.132.3

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/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.132.2";
2
+ var version = "0.132.3";
3
3
  //#endregion
4
4
  export { version };
@@ -31,7 +31,7 @@ export type ModulesModel = Partial<Record<SchemaModuleId, ModuleModel>>;
31
31
  /** The schema modules an app needs, each with what it gives the module (`neededModules`), in their order. */
32
32
  export type ModuleTargets = Partial<Record<SchemaModuleId, ModuleInput>>;
33
33
  /** The modules of `targets`, in their order. */
34
- export declare const targetIds: (targets: ModuleTargets) => ("status" | "query" | "jobs" | "history" | "comments" | "derived" | "changes" | "mail_feedback" | "calls" | "webhooks" | "webhook_delivery_log" | "workflows" | "workflow_custom_steps" | "user_tables" | "computed" | "notices" | "workflow_storage" | "notification_devices" | "notification_history" | "relay" | "realtime_relay" | "channel_sends" | "unsubscribes")[];
34
+ export declare const targetIds: (targets: ModuleTargets) => ("status" | "query" | "user_tables" | "history" | "comments" | "derived" | "jobs" | "changes" | "mail_feedback" | "calls" | "webhooks" | "webhook_delivery_log" | "workflows" | "workflow_custom_steps" | "computed" | "notices" | "workflow_storage" | "notification_devices" | "notification_history" | "relay" | "realtime_relay" | "channel_sends" | "unsubscribes")[];
35
35
  /** The model of each module of `targets` this version of Protobase reads. */
36
36
  export declare const latestModules: (targets: ModuleTargets) => ModulesModel;
37
37
  //#endregion
@@ -6,8 +6,10 @@ import { deleteErrors, readsDeleteCondition } from "./view-conversation-delete.j
6
6
  import { reactionsErrors, readsReactions } from "./view-conversation-reactions.js";
7
7
  import { readsThreads, threadErrors } from "./view-conversation-thread.js";
8
8
  import { messageFieldsProblems, messageTextProblems } from "@protobase/layout";
9
+ import { textPlaceholders } from "@protobase/schema/internal";
9
10
  //#region src/view-conversation-page.ts
10
11
  const datedTypes = ["date", "timestamp"];
12
+ const recordTextErrors = (prop, text, record) => textPlaceholders(text ?? "").filter((name) => !Object.hasOwn(record.fields, name)).map((name) => `${prop}: names field "${name}", which ${record.name} does not have`);
11
13
  const authorErrors = (model) => {
12
14
  if (model.author === void 0) return [`${model.name} has no .author(), so it cannot keep each reader's own position`];
13
15
  return model.fields[model.author]?.filterable ? [] : [`"${model.author}" on ${model.name} is not filterable, so a reader's own position cannot be found`];
@@ -54,6 +56,8 @@ const conversationPageErrors = (page, resource, models) => {
54
56
  ...typedErrors(target, "mentions", page.mentions, ["json"], "mentions are a JSON field of user ids"),
55
57
  ...typedErrors(record, "subtitle", page.subtitle, ["text"], "a subtitle is a text field"),
56
58
  ...typedErrors(record, "members", page.members, ["json"], "members are a JSON field of user ids"),
59
+ ...recordTextErrors("placeholder", page.placeholder, record),
60
+ ...recordTextErrors("empty", page.empty, record),
57
61
  ...page.readPosition ? readPositionErrors(page.readPosition, resource, target, models).map((error) => `readPosition: ${error}`) : [],
58
62
  ...page.reactions ? reactionsErrors(page.reactions, page.resource, models).map((error) => `reactions: ${error}`) : [],
59
63
  ...page.attachments ? attachmentsErrors(page.attachments, page.resource, models).map((error) => `attachments: ${error}`) : [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/server",
3
- "version": "0.132.2",
3
+ "version": "0.132.3",
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": {
@@ -44,11 +44,11 @@
44
44
  "@better-auth/sso": "^1.7.12",
45
45
  "@livekit/protocol": "1.53.1",
46
46
  "@modelcontextprotocol/server": "^2.3.1",
47
- "@protobase/layout": "0.132.2",
48
- "@protobase/query": "0.132.2",
49
- "@protobase/schema": "0.132.2",
50
- "@protobase/workflow-plugins": "0.132.2",
51
- "@protobase/workflows": "0.132.2",
47
+ "@protobase/layout": "0.132.3",
48
+ "@protobase/query": "0.132.3",
49
+ "@protobase/schema": "0.132.3",
50
+ "@protobase/workflow-plugins": "0.132.3",
51
+ "@protobase/workflows": "0.132.3",
52
52
  "@react-email/render": "^2.1.0",
53
53
  "@react-pdf/primitives": "^4.4.0",
54
54
  "@react-pdf/renderer": "^4.9.1",