@antelopejs/dms 0.22.1 → 0.22.2-next.1025.g0c821ca

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.
Files changed (94) hide show
  1. package/dist/implementations/dms-builder/engine/cell-displays.js +2 -2
  2. package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
  3. package/dist/implementations/dms-builder/engine/column-groups.d.ts +5 -12
  4. package/dist/implementations/dms-builder/engine/connection-access-config.js +3 -1
  5. package/dist/implementations/dms-builder/engine/connection-access-config.js.map +1 -1
  6. package/dist/implementations/dms-builder/engine/database-access.js +2 -2
  7. package/dist/implementations/dms-builder/engine/database-access.js.map +1 -1
  8. package/dist/implementations/dms-builder/engine/database-check-input.d.ts +8 -15
  9. package/dist/implementations/dms-builder/engine/driver-probe.d.ts +3 -11
  10. package/dist/implementations/dms-builder/engine/driver-probe.js +4 -4
  11. package/dist/implementations/dms-builder/engine/driver-probe.js.map +1 -1
  12. package/dist/implementations/dms-builder/engine/probe-answer.d.ts +17 -34
  13. package/dist/implementations/dms-builder/engine/probe-child.js +12 -10
  14. package/dist/implementations/dms-builder/engine/probe-child.js.map +1 -1
  15. package/dist/implementations/dms-builder/engine/probe-protocol.d.ts +7 -33
  16. package/dist/implementations/dms-builder/engine/probe-protocol.js +1 -1
  17. package/dist/implementations/dms-builder/engine/probe-protocol.js.map +1 -1
  18. package/dist/implementations/dms-builder/engine/theme-draft.js +3 -3
  19. package/dist/implementations/dms-builder/engine/theme-draft.js.map +1 -1
  20. package/dist/mcp/access.d.ts +4 -1
  21. package/dist/mcp/bridge.d.ts +3 -1
  22. package/dist/mcp/hidden-values.d.ts +1 -1
  23. package/dist/mcp/hidden-values.js.map +1 -1
  24. package/dist/mcp/json.d.ts +1 -1
  25. package/dist/mcp/page-verify/page-probe.d.ts +7 -123
  26. package/dist/mcp/page-verify/playwright.d.ts +7 -23
  27. package/dist/mcp/page-verify/render.js +3 -1
  28. package/dist/mcp/page-verify/render.js.map +1 -1
  29. package/dist/mcp/redact.js.map +1 -1
  30. package/dist/mcp/tool.d.ts +1 -1
  31. package/dist/mcp/tool.js +15 -2
  32. package/dist/mcp/tool.js.map +1 -1
  33. package/dist/mcp/tools/builder-queries.d.ts +8 -3
  34. package/dist/mcp/tools/builder-resources.d.ts +2 -8
  35. package/dist/mcp/tools/builder-resources.js +1 -1
  36. package/dist/mcp/tools/builder-resources.js.map +1 -1
  37. package/dist/mcp/tools/builder-shared.d.ts +1 -1
  38. package/dist/mcp/tools/builder-shared.js.map +1 -1
  39. package/dist/mcp/tools/builder-table-view.d.ts +65 -211
  40. package/dist/mcp/tools/json-patch.d.ts +10 -56
  41. package/dist/mcp/tools/mockup-support.d.ts +2 -2
  42. package/dist/mcp/tools/theme-schemas.d.ts +19 -173
  43. package/dist/mockup/anchor.d.ts +7 -31
  44. package/dist/mockup/anchor.js.map +1 -1
  45. package/dist/mockup/annotations-file.d.ts +15 -73
  46. package/dist/mockup/annotations.d.ts +11 -101
  47. package/dist/mockup/apply-to-page.js +4 -1
  48. package/dist/mockup/apply-to-page.js.map +1 -1
  49. package/dist/mockup/controller-blocks.js +3 -3
  50. package/dist/mockup/controller-blocks.js.map +1 -1
  51. package/dist/mockup/files.d.ts +1 -5
  52. package/dist/mockup/fixtures.d.ts +11 -19
  53. package/dist/mockup/generate.d.ts +4 -56
  54. package/dist/mockup/generate.js +1 -1
  55. package/dist/mockup/generate.js.map +1 -1
  56. package/dist/mockup/history.d.ts +9 -21
  57. package/dist/mockup/model.d.ts +103 -772
  58. package/dist/mockup/model.js +2 -2
  59. package/dist/mockup/model.js.map +1 -1
  60. package/dist/mockup/presence.d.ts +1 -1
  61. package/dist/mockup/table-columns.d.ts +1 -25
  62. package/dist/mockup/table-columns.js +2 -2
  63. package/dist/mockup/table-columns.js.map +1 -1
  64. package/dist/mockup/table-options.d.ts +62 -399
  65. package/dist/pages/settings/users/profile.d.ts +2 -9
  66. package/dist/routes/auth/oauth/providers.js.map +1 -1
  67. package/dist/routes/auth/switch-tenant.d.ts +1 -7
  68. package/dist/store/catalog.d.ts +3 -9
  69. package/dist/store/catalog.js +1 -1
  70. package/dist/store/catalog.js.map +1 -1
  71. package/dist/store/interfaces.js +10 -4
  72. package/dist/store/interfaces.js.map +1 -1
  73. package/dist/store/internal/frontend/frontend-ready.d.ts +2 -20
  74. package/dist/store/runtime.d.ts +1 -7
  75. package/dist/validation/account-deletion.schema.d.ts +1 -7
  76. package/dist/validation/auth.schema.d.ts +26 -121
  77. package/dist/validation/file.schema.d.ts +4 -20
  78. package/dist/validation/member-invite.schema.d.ts +4 -36
  79. package/dist/validation/member-ownership.schema.d.ts +1 -5
  80. package/dist/validation/onboarding/register-admin.schema.d.ts +6 -22
  81. package/dist/validation/regional-preferences.schema.d.ts +11 -17
  82. package/dist/validation/role-editor.schema.d.ts +6 -28
  83. package/dist/validation/security.schema.d.ts +4 -24
  84. package/dist/validation/store.schema.d.ts +3 -30
  85. package/dist/validation/store.schema.js +1 -1
  86. package/dist/validation/store.schema.js.map +1 -1
  87. package/dist/validation/user-notification-preferences.schema.d.ts +1 -1
  88. package/frontend-vue/layers/dms-core/app/build/composables/api-error.ts +4 -1
  89. package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +21 -12
  90. package/frontend-vue/layers/dms-core/app/composables/useFormValidation.ts +6 -6
  91. package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentValidation.ts +4 -4
  92. package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +9 -8
  93. package/frontend-vue/package.json +2 -3
  94. package/package.json +5 -6
@@ -90,10 +90,19 @@ export interface ValidationIssue {
90
90
  path?: unknown;
91
91
  message?: unknown;
92
92
  code?: unknown;
93
- validation?: unknown;
93
+ format?: unknown;
94
94
  minimum?: unknown;
95
- received?: unknown;
95
+ origin?: unknown;
96
+ /** zod 3's `origin`, in an issue list a module still on zod 3 sends. */
96
97
  type?: unknown;
98
+ /** zod 3's `format`, in an issue list a module still on zod 3 sends. */
99
+ validation?: unknown;
100
+ }
101
+
102
+ /** What a size issue measured, as zod 4 (`origin`) or zod 3 (`type`) names it. */
103
+ function sizeOrigin(issue: ValidationIssue): string | undefined {
104
+ const origin = issue.origin ?? issue.type;
105
+ return origin === undefined ? undefined : String(origin);
97
106
  }
98
107
 
99
108
  const HTTP_BAD_REQUEST = 400;
@@ -124,8 +133,8 @@ const FIELD_ERROR_KEYS = {
124
133
  tooLarge: "$dms.field_errors.too_large",
125
134
  } as const;
126
135
 
127
- /** Issue types whose size is a count (characters, items), not a value. */
128
- const COUNTED_TYPES = new Set(["string", "array", "set"]);
136
+ /** Issue origins whose size is a count (characters, items), not a value. */
137
+ const COUNTED_ORIGINS = new Set(["string", "array", "set"]);
129
138
 
130
139
  const DATA_API_CODES: Readonly<
131
140
  Record<ReturnType<typeof resolveApiErrorMessage>, ApiFieldError["message"]>
@@ -177,7 +186,8 @@ function isI18nKey(message: string): boolean {
177
186
 
178
187
  /** A zod issue's own message when it is a key, else a generic one. */
179
188
  function tooSmallMessage(issue: ValidationIssue): string {
180
- if (issue.type !== undefined && !COUNTED_TYPES.has(String(issue.type))) {
189
+ const origin = sizeOrigin(issue);
190
+ if (origin !== undefined && !COUNTED_ORIGINS.has(origin)) {
181
191
  return FIELD_ERROR_KEYS.tooSmall;
182
192
  }
183
193
  return isNumber(issue.minimum) && issue.minimum <= 1
@@ -194,18 +204,17 @@ export function validationIssueMessage(issue: ValidationIssue): string {
194
204
  return issue.message;
195
205
  }
196
206
  switch (issue.code) {
197
- case "invalid_type":
198
- return issue.received === "undefined" || issue.received === "null"
199
- ? FIELD_ERROR_KEYS.required
200
- : FIELD_ERROR_KEYS.invalid;
201
207
  case "too_small":
202
208
  return tooSmallMessage(issue);
203
- case "too_big":
204
- return issue.type !== undefined && !COUNTED_TYPES.has(String(issue.type))
209
+ case "too_big": {
210
+ const origin = sizeOrigin(issue);
211
+ return origin !== undefined && !COUNTED_ORIGINS.has(origin)
205
212
  ? FIELD_ERROR_KEYS.tooLarge
206
213
  : FIELD_ERROR_KEYS.tooLong;
214
+ }
215
+ case "invalid_format":
207
216
  case "invalid_string":
208
- return issue.validation === "email"
217
+ return (issue.format ?? issue.validation) === "email"
209
218
  ? FIELD_ERROR_KEYS.invalidEmail
210
219
  : FIELD_ERROR_KEYS.invalid;
211
220
  default:
@@ -1,6 +1,6 @@
1
1
  import { type Ref, watch } from "vue";
2
2
  import type { Form } from "@nuxt/ui";
3
- import type { ZodErrorMap, ZodType, ZodTypeDef } from "zod";
3
+ import type { ZodType, z } from "zod";
4
4
  import {
5
5
  type I18nTranslate,
6
6
  resolveApiMessage,
@@ -96,8 +96,8 @@ export function formIssueMessage(
96
96
  return isBlankValue(data) ? REQUIRED_MESSAGE : validationIssueMessage(issue);
97
97
  }
98
98
 
99
- const issueErrorMap: ZodErrorMap = (issue, context) => ({
100
- message: formIssueMessage(issue, context.data),
99
+ const issueErrorMap: z.core.$ZodErrorMap = (issue) => ({
100
+ message: formIssueMessage(issue, issue.input),
101
101
  });
102
102
 
103
103
  /**
@@ -106,7 +106,7 @@ const issueErrorMap: ZodErrorMap = (issue, context) => ({
106
106
  * a message already in prose is kept.
107
107
  */
108
108
  export function localizeSchema<Output, Input>(
109
- schema: ZodType<Output, ZodTypeDef, Input>,
109
+ schema: ZodType<Output, Input>,
110
110
  translate: Translate,
111
111
  ): LocalizedSchema<Output> {
112
112
  const resolve = (message: string) =>
@@ -117,7 +117,7 @@ export function localizeSchema<Output, Input>(
117
117
  vendor: "dms",
118
118
  validate: async (value) => {
119
119
  const result = await schema.safeParseAsync(value, {
120
- errorMap: issueErrorMap,
120
+ error: issueErrorMap,
121
121
  });
122
122
  return result.success
123
123
  ? { value: result.data }
@@ -134,7 +134,7 @@ export function localizeSchema<Output, Input>(
134
134
 
135
135
  /** {@link localizeSchema} with the current locale. */
136
136
  export function useLocalizedSchema<Output, Input>(
137
- schema: ZodType<Output, ZodTypeDef, Input>,
137
+ schema: ZodType<Output, Input>,
138
138
  ): LocalizedSchema<Output> {
139
139
  const { t } = useI18n();
140
140
  return localizeSchema(schema, (key, params = {}) => t(key, params));
@@ -1,5 +1,5 @@
1
1
  import { computed, provide, reactive, toValue, watch } from "vue";
2
- import type { ZodErrorMap } from "zod";
2
+ import type { z } from "zod";
3
3
  import { isObject } from "#dms-core/app/utils/type-check";
4
4
  import {
5
5
  formIssueMessage,
@@ -32,8 +32,8 @@ interface FormValidationSource
32
32
 
33
33
  /** Form.vue's localized schema and validation for controls with custom events. */
34
34
  export function formComponentValidation(source: FormValidationSource) {
35
- const issueErrorMap: ZodErrorMap = (issue, context) => ({
36
- message: source.processApiMessage(formIssueMessage(issue, context.data)),
35
+ const issueErrorMap: z.core.$ZodErrorMap = (issue) => ({
36
+ message: source.processApiMessage(formIssueMessage(issue, issue.input)),
37
37
  });
38
38
  const localizedSchema = computed(() => {
39
39
  const schema = source.validationSchema.value;
@@ -57,7 +57,7 @@ export function formComponentValidation(source: FormValidationSource) {
57
57
  fields: validationFields,
58
58
  requiredMessage: source.processApiMessage(REQUIRED_MESSAGE),
59
59
  locale: source.locale(),
60
- parseParams: { errorMap: issueErrorMap },
60
+ parseParams: { error: issueErrorMap },
61
61
  controlErrors,
62
62
  },
63
63
  ),
@@ -56,7 +56,7 @@ export interface FormValidationContext {
56
56
  /** The language a localized field shows: its required error goes there. */
57
57
  locale?: string;
58
58
  /** Passed to zod (the error map wording its issues). */
59
- parseParams?: Partial<z.ParseParams>;
59
+ parseParams?: z.core.ParseContext<z.core.$ZodIssue>;
60
60
  /**
61
61
  * Errors controls report on their own value (a duration or JSON that
62
62
  * cannot be read), by field id, already translated: the field is refused
@@ -102,8 +102,8 @@ function requiredPath(
102
102
  }
103
103
 
104
104
  /** An issue saying the value is not of a branch's type at all. */
105
- function isTypeMismatch(issue: z.ZodIssue, path: PropertyKey[]): boolean {
106
- return issue.code === "invalid_type" && issue.path.length === path.length;
105
+ function isTypeMismatch(issue: z.core.$ZodIssue): boolean {
106
+ return issue.code === "invalid_type" && issue.path.length === 0;
107
107
  }
108
108
 
109
109
  /**
@@ -114,14 +114,15 @@ function isTypeMismatch(issue: z.ZodIssue, path: PropertyKey[]): boolean {
114
114
  * issues replace it: an address part missing, a range end not picked. A
115
115
  * union with several such branches keeps its issue.
116
116
  */
117
- export function unwrapUnionIssue(issue: z.ZodIssue): z.ZodIssue[] {
117
+ export function unwrapUnionIssue(issue: z.core.$ZodIssue): z.core.$ZodIssue[] {
118
118
  if (issue.code !== "invalid_union") return [issue];
119
- const branches = issue.unionErrors.filter(
120
- (error) =>
121
- !error.issues.every((inner) => isTypeMismatch(inner, issue.path)),
119
+ const branches = issue.errors.filter(
120
+ (branch) => !branch.every(isTypeMismatch),
122
121
  );
123
122
  if (branches.length !== 1) return [issue];
124
- return branches[0]!.issues.flatMap(unwrapUnionIssue);
123
+ return branches[0]!.flatMap((inner) =>
124
+ unwrapUnionIssue({ ...inner, path: [...issue.path, ...inner.path] }),
125
+ );
125
126
  }
126
127
 
127
128
  /**
@@ -76,7 +76,7 @@
76
76
  "tailwind-variants": "^3.1.1",
77
77
  "ufo": "^1.6.1",
78
78
  "vue3-apexcharts": "1.10.0",
79
- "zod": "^3.24.2"
79
+ "zod": "^4.5.0"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@antelopejs/core": "~1.24.5",
@@ -102,8 +102,7 @@
102
102
  "vitest": "^4.1.8",
103
103
  "vue": "^3.5.18",
104
104
  "vue-i18n": "^11.1.12",
105
- "vue-tsc": "3.1.1",
106
- "zod-to-json-schema": "~3.24.6"
105
+ "vue-tsc": "3.1.1"
107
106
  },
108
107
  "peerDependencies": {
109
108
  "@nuxt/ui": "4.10.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms",
3
- "version": "0.22.1",
3
+ "version": "0.22.2-next.1025.g0c821ca",
4
4
  "description": "AntelopeJS DMS. Plug in your PostgreSQL, MySQL, MariaDB, MongoDB or RethinkDB database and your coding agent builds a back office and analytics dashboard as typed TypeScript. Real-time updates on the data the DMS manages.",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -89,6 +89,8 @@
89
89
  "@antelopejs/interface-data-api": ">=0.8.0 <0.9.0",
90
90
  "@antelopejs/interface-database": ">=0.4.0 <0.5.0",
91
91
  "@antelopejs/interface-database-decorators": ">=0.5.2 <0.6.0",
92
+ "@antelopejs/interface-dms": "0.15.1-next.1023.gd4e59bf",
93
+ "@antelopejs/interface-dms-builder": "^0.6.2",
92
94
  "@antelopejs/interface-email": ">=0.2.1 <0.3.0",
93
95
  "@antelopejs/interface-file-storage": ">=0.1.4 <0.2.0",
94
96
  "@csstools/css-tokenizer": "4.0.0",
@@ -110,10 +112,7 @@
110
112
  "striptags": "^3.2.0",
111
113
  "ts-morph": "^28.0.0",
112
114
  "ua-parser-js": "^2.0.9",
113
- "zod": "^3.25.0",
114
- "zod-to-json-schema": "~3.24.6",
115
- "@antelopejs/interface-dms": "^0.15.0",
116
- "@antelopejs/interface-dms-builder": "^0.6.2"
115
+ "zod": "^4.5.0"
117
116
  },
118
117
  "devDependencies": {
119
118
  "@antelopejs/api": "~1.7.8",
@@ -213,7 +212,7 @@
213
212
  "optional": true
214
213
  }
215
214
  },
216
- "gitHead": "0c3c63da9285cfd58aea0e415ba1cfa19b939e74",
215
+ "gitHead": "0c821ca003ecc5916b3dcc1e0145c24ea15a04e2",
217
216
  "scripts": {
218
217
  "build": "pnpm --filter @antelopejs/interface-dms --filter @antelopejs/interface-dms-builder build && rimraf dist && antelopejs-tsc && tsc-alias && tsc -p e2e/tsconfig.types.json",
219
218
  "dev": "ajs project run --inspect -w -p playground",