@featurevisor/core 2.11.0 → 2.12.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/coverage/clover.xml +684 -3
  3. package/coverage/coverage-final.json +4 -0
  4. package/coverage/lcov-report/builder/allocator.ts.html +1 -1
  5. package/coverage/lcov-report/builder/buildScopedConditions.ts.html +1 -1
  6. package/coverage/lcov-report/builder/buildScopedDatafile.ts.html +1 -1
  7. package/coverage/lcov-report/builder/buildScopedSegments.ts.html +1 -1
  8. package/coverage/lcov-report/builder/index.html +1 -1
  9. package/coverage/lcov-report/builder/revision.ts.html +1 -1
  10. package/coverage/lcov-report/builder/traffic.ts.html +1 -1
  11. package/coverage/lcov-report/index.html +25 -10
  12. package/coverage/lcov-report/linter/conditionSchema.ts.html +775 -0
  13. package/coverage/lcov-report/linter/featureSchema.ts.html +4924 -0
  14. package/coverage/lcov-report/linter/index.html +161 -0
  15. package/coverage/lcov-report/linter/schema.ts.html +1471 -0
  16. package/coverage/lcov-report/linter/segmentSchema.ts.html +130 -0
  17. package/coverage/lcov-report/list/index.html +1 -1
  18. package/coverage/lcov-report/list/matrix.ts.html +1 -1
  19. package/coverage/lcov-report/parsers/index.html +1 -1
  20. package/coverage/lcov-report/parsers/json.ts.html +1 -1
  21. package/coverage/lcov-report/parsers/yml.ts.html +1 -1
  22. package/coverage/lcov-report/tester/helpers.ts.html +1 -1
  23. package/coverage/lcov-report/tester/index.html +1 -1
  24. package/coverage/lcov.info +1471 -0
  25. package/lib/builder/buildDatafile.js +15 -1
  26. package/lib/builder/buildDatafile.js.map +1 -1
  27. package/lib/config/projectConfig.d.ts +2 -0
  28. package/lib/config/projectConfig.js +3 -1
  29. package/lib/config/projectConfig.js.map +1 -1
  30. package/lib/datasource/datasource.d.ts +6 -1
  31. package/lib/datasource/datasource.js +16 -0
  32. package/lib/datasource/datasource.js.map +1 -1
  33. package/lib/datasource/filesystemAdapter.js +10 -0
  34. package/lib/datasource/filesystemAdapter.js.map +1 -1
  35. package/lib/generate-code/typescript.js +280 -46
  36. package/lib/generate-code/typescript.js.map +1 -1
  37. package/lib/linter/conditionSchema.spec.d.ts +1 -0
  38. package/lib/linter/conditionSchema.spec.js +331 -0
  39. package/lib/linter/conditionSchema.spec.js.map +1 -0
  40. package/lib/linter/featureSchema.d.ts +129 -20
  41. package/lib/linter/featureSchema.js +489 -48
  42. package/lib/linter/featureSchema.js.map +1 -1
  43. package/lib/linter/featureSchema.spec.d.ts +1 -0
  44. package/lib/linter/featureSchema.spec.js +978 -0
  45. package/lib/linter/featureSchema.spec.js.map +1 -0
  46. package/lib/linter/lintProject.js +67 -1
  47. package/lib/linter/lintProject.js.map +1 -1
  48. package/lib/linter/schema.d.ts +42 -0
  49. package/lib/linter/schema.js +417 -0
  50. package/lib/linter/schema.js.map +1 -0
  51. package/lib/linter/schema.spec.d.ts +1 -0
  52. package/lib/linter/schema.spec.js +483 -0
  53. package/lib/linter/schema.spec.js.map +1 -0
  54. package/lib/linter/segmentSchema.spec.d.ts +1 -0
  55. package/lib/linter/segmentSchema.spec.js +231 -0
  56. package/lib/linter/segmentSchema.spec.js.map +1 -0
  57. package/lib/tester/testFeature.js +5 -3
  58. package/lib/tester/testFeature.js.map +1 -1
  59. package/lib/utils/git.js +3 -0
  60. package/lib/utils/git.js.map +1 -1
  61. package/package.json +5 -5
  62. package/src/builder/buildDatafile.ts +17 -1
  63. package/src/config/projectConfig.ts +3 -0
  64. package/src/datasource/datasource.ts +23 -0
  65. package/src/datasource/filesystemAdapter.ts +7 -0
  66. package/src/generate-code/typescript.ts +330 -49
  67. package/src/linter/conditionSchema.spec.ts +446 -0
  68. package/src/linter/featureSchema.spec.ts +1218 -0
  69. package/src/linter/featureSchema.ts +671 -69
  70. package/src/linter/lintProject.ts +84 -0
  71. package/src/linter/schema.spec.ts +617 -0
  72. package/src/linter/schema.ts +462 -0
  73. package/src/linter/segmentSchema.spec.ts +273 -0
  74. package/src/tester/testFeature.ts +5 -3
  75. package/src/utils/git.ts +2 -0
  76. package/lib/linter/propertySchema.d.ts +0 -5
  77. package/lib/linter/propertySchema.js +0 -43
  78. package/lib/linter/propertySchema.js.map +0 -1
  79. package/src/linter/propertySchema.ts +0 -47
@@ -0,0 +1,462 @@
1
+ import type { Schema, SchemaKey, Value } from "@featurevisor/types";
2
+ import { z } from "zod";
3
+
4
+ /** Returns true if value matches the schema type. */
5
+ function valueMatchesType(v: unknown, type: string): boolean {
6
+ switch (type) {
7
+ case "string":
8
+ return typeof v === "string";
9
+ case "boolean":
10
+ return typeof v === "boolean";
11
+ case "integer":
12
+ return typeof v === "number" && Number.isInteger(v);
13
+ case "double":
14
+ return typeof v === "number";
15
+ case "object":
16
+ return typeof v === "object" && v !== null && !Array.isArray(v);
17
+ case "array":
18
+ return Array.isArray(v);
19
+ default:
20
+ return true;
21
+ }
22
+ }
23
+
24
+ type SchemaLike = {
25
+ type?: string;
26
+ enum?: unknown[];
27
+ const?: unknown;
28
+ minimum?: number;
29
+ maximum?: number;
30
+ minLength?: number;
31
+ maxLength?: number;
32
+ pattern?: string;
33
+ minItems?: number;
34
+ maxItems?: number;
35
+ uniqueItems?: boolean;
36
+ items?: unknown;
37
+ properties?: Record<string, unknown>;
38
+ oneOf?: unknown[];
39
+ };
40
+
41
+ /**
42
+ * Recursively validates that when a schema has both `type` and `enum`, every enum value matches the type.
43
+ * Also recurses into oneOf branches.
44
+ */
45
+ export function refineEnumMatchesType(
46
+ schema: SchemaLike,
47
+ pathPrefix: (string | number)[],
48
+ ctx: z.RefinementCtx,
49
+ ): void {
50
+ if (!schema || typeof schema !== "object") return;
51
+ const type = schema.type;
52
+ const enumArr = schema.enum;
53
+ if (type && Array.isArray(enumArr) && enumArr.length > 0) {
54
+ for (let i = 0; i < enumArr.length; i++) {
55
+ const v = enumArr[i];
56
+ if (!valueMatchesType(v, type)) {
57
+ ctx.addIssue({
58
+ code: z.ZodIssueCode.custom,
59
+ message: `Enum value at index ${i} (${JSON.stringify(v)}) does not match type "${type}". All enum values must be of the same type as \`type\`.`,
60
+ path: [...pathPrefix, "enum", i],
61
+ });
62
+ }
63
+ }
64
+ }
65
+ if (schema.items && typeof schema.items === "object") {
66
+ refineEnumMatchesType(schema.items as SchemaLike, [...pathPrefix, "items"], ctx);
67
+ }
68
+ if (schema.properties && typeof schema.properties === "object") {
69
+ for (const k of Object.keys(schema.properties)) {
70
+ refineEnumMatchesType(
71
+ schema.properties[k] as SchemaLike,
72
+ [...pathPrefix, "properties", k],
73
+ ctx,
74
+ );
75
+ }
76
+ }
77
+ if (schema.oneOf && Array.isArray(schema.oneOf)) {
78
+ schema.oneOf.forEach((branch, i) => {
79
+ if (branch && typeof branch === "object") {
80
+ refineEnumMatchesType(branch as SchemaLike, [...pathPrefix, "oneOf", i], ctx);
81
+ }
82
+ });
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Validates that when a schema has type "integer" or "double", minimum <= maximum when both set,
88
+ * and const/enum values (if present) fall within the range.
89
+ */
90
+ export function refineMinimumMaximum(
91
+ schema: SchemaLike,
92
+ pathPrefix: (string | number)[],
93
+ ctx: z.RefinementCtx,
94
+ ): void {
95
+ if (!schema || typeof schema !== "object") return;
96
+ const type = schema.type;
97
+ const min = schema.minimum;
98
+ const max = schema.maximum;
99
+ const isNumeric = type === "integer" || type === "double";
100
+ if (isNumeric && min !== undefined && max !== undefined && min > max) {
101
+ ctx.addIssue({
102
+ code: z.ZodIssueCode.custom,
103
+ message: `When \`type\` is "${type}", \`minimum\` (${min}) must be less than or equal to \`maximum\` (${max}).`,
104
+ path: [...pathPrefix, "minimum"],
105
+ });
106
+ }
107
+ if (isNumeric && min !== undefined && schema.const !== undefined) {
108
+ const v = schema.const;
109
+ if (typeof v === "number" && v < min) {
110
+ ctx.addIssue({
111
+ code: z.ZodIssueCode.custom,
112
+ message: `\`const\` value ${v} is less than \`minimum\` (${min}).`,
113
+ path: [...pathPrefix, "const"],
114
+ });
115
+ }
116
+ }
117
+ if (isNumeric && max !== undefined && schema.const !== undefined) {
118
+ const v = schema.const;
119
+ if (typeof v === "number" && v > max) {
120
+ ctx.addIssue({
121
+ code: z.ZodIssueCode.custom,
122
+ message: `\`const\` value ${v} is greater than \`maximum\` (${max}).`,
123
+ path: [...pathPrefix, "const"],
124
+ });
125
+ }
126
+ }
127
+ if (isNumeric && Array.isArray(schema.enum) && schema.enum.length > 0) {
128
+ for (let i = 0; i < schema.enum.length; i++) {
129
+ const v = schema.enum[i];
130
+ if (typeof v === "number") {
131
+ if (min !== undefined && v < min) {
132
+ ctx.addIssue({
133
+ code: z.ZodIssueCode.custom,
134
+ message: `Enum value at index ${i} (${v}) is less than \`minimum\` (${min}).`,
135
+ path: [...pathPrefix, "enum", i],
136
+ });
137
+ }
138
+ if (max !== undefined && v > max) {
139
+ ctx.addIssue({
140
+ code: z.ZodIssueCode.custom,
141
+ message: `Enum value at index ${i} (${v}) is greater than \`maximum\` (${max}).`,
142
+ path: [...pathPrefix, "enum", i],
143
+ });
144
+ }
145
+ }
146
+ }
147
+ }
148
+ if (schema.items && typeof schema.items === "object") {
149
+ refineMinimumMaximum(schema.items as SchemaLike, [...pathPrefix, "items"], ctx);
150
+ }
151
+ if (schema.properties && typeof schema.properties === "object") {
152
+ for (const k of Object.keys(schema.properties)) {
153
+ refineMinimumMaximum(
154
+ schema.properties[k] as SchemaLike,
155
+ [...pathPrefix, "properties", k],
156
+ ctx,
157
+ );
158
+ }
159
+ }
160
+ if (schema.oneOf && Array.isArray(schema.oneOf)) {
161
+ schema.oneOf.forEach((branch, i) => {
162
+ if (branch && typeof branch === "object") {
163
+ refineMinimumMaximum(branch as SchemaLike, [...pathPrefix, "oneOf", i], ctx);
164
+ }
165
+ });
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Validates that when a schema has type "string", minLength <= maxLength when both set,
171
+ * pattern is a valid RegExp (if set), and const/enum string values satisfy length and pattern.
172
+ */
173
+ export function refineStringLengthPattern(
174
+ schema: SchemaLike,
175
+ pathPrefix: (string | number)[],
176
+ ctx: z.RefinementCtx,
177
+ ): void {
178
+ if (!schema || typeof schema !== "object") return;
179
+ const type = schema.type;
180
+ const minLen = schema.minLength;
181
+ const maxLen = schema.maxLength;
182
+ const patternStr = schema.pattern;
183
+ const isString = type === "string";
184
+ if (isString && minLen !== undefined && maxLen !== undefined && minLen > maxLen) {
185
+ ctx.addIssue({
186
+ code: z.ZodIssueCode.custom,
187
+ message: `When \`type\` is "string", \`minLength\` (${minLen}) must be less than or equal to \`maxLength\` (${maxLen}).`,
188
+ path: [...pathPrefix, "minLength"],
189
+ });
190
+ }
191
+ if (isString && patternStr !== undefined) {
192
+ try {
193
+ new RegExp(patternStr);
194
+ } catch {
195
+ ctx.addIssue({
196
+ code: z.ZodIssueCode.custom,
197
+ message: `\`pattern\` must be a valid ECMA-262 regular expression; "${patternStr}" is invalid.`,
198
+ path: [...pathPrefix, "pattern"],
199
+ });
200
+ }
201
+ }
202
+ const testString = (s: string): { minOk: boolean; maxOk: boolean; patternOk: boolean } => {
203
+ const minOk = minLen === undefined || s.length >= minLen;
204
+ const maxOk = maxLen === undefined || s.length <= maxLen;
205
+ let patternOk = true;
206
+ if (patternStr !== undefined) {
207
+ try {
208
+ patternOk = new RegExp(patternStr).test(s);
209
+ } catch {
210
+ patternOk = true;
211
+ }
212
+ }
213
+ return { minOk, maxOk, patternOk };
214
+ };
215
+ if (isString && schema.const !== undefined && typeof schema.const === "string") {
216
+ const { minOk, maxOk, patternOk } = testString(schema.const);
217
+ if (!minOk) {
218
+ ctx.addIssue({
219
+ code: z.ZodIssueCode.custom,
220
+ message: `\`const\` value length (${schema.const.length}) is less than \`minLength\` (${minLen}).`,
221
+ path: [...pathPrefix, "const"],
222
+ });
223
+ }
224
+ if (!maxOk) {
225
+ ctx.addIssue({
226
+ code: z.ZodIssueCode.custom,
227
+ message: `\`const\` value length (${schema.const.length}) is greater than \`maxLength\` (${maxLen}).`,
228
+ path: [...pathPrefix, "const"],
229
+ });
230
+ }
231
+ if (!patternOk) {
232
+ ctx.addIssue({
233
+ code: z.ZodIssueCode.custom,
234
+ message: `\`const\` value does not match \`pattern\`.`,
235
+ path: [...pathPrefix, "const"],
236
+ });
237
+ }
238
+ }
239
+ if (isString && Array.isArray(schema.enum) && schema.enum.length > 0) {
240
+ for (let i = 0; i < schema.enum.length; i++) {
241
+ const v = schema.enum[i];
242
+ if (typeof v === "string") {
243
+ const { minOk, maxOk, patternOk } = testString(v);
244
+ if (!minOk) {
245
+ ctx.addIssue({
246
+ code: z.ZodIssueCode.custom,
247
+ message: `Enum value at index ${i} length (${v.length}) is less than \`minLength\` (${minLen}).`,
248
+ path: [...pathPrefix, "enum", i],
249
+ });
250
+ }
251
+ if (!maxOk) {
252
+ ctx.addIssue({
253
+ code: z.ZodIssueCode.custom,
254
+ message: `Enum value at index ${i} length (${v.length}) is greater than \`maxLength\` (${maxLen}).`,
255
+ path: [...pathPrefix, "enum", i],
256
+ });
257
+ }
258
+ if (!patternOk) {
259
+ ctx.addIssue({
260
+ code: z.ZodIssueCode.custom,
261
+ message: `Enum value at index ${i} does not match \`pattern\`.`,
262
+ path: [...pathPrefix, "enum", i],
263
+ });
264
+ }
265
+ }
266
+ }
267
+ }
268
+ if (schema.items && typeof schema.items === "object") {
269
+ refineStringLengthPattern(schema.items as SchemaLike, [...pathPrefix, "items"], ctx);
270
+ }
271
+ if (schema.properties && typeof schema.properties === "object") {
272
+ for (const k of Object.keys(schema.properties)) {
273
+ refineStringLengthPattern(
274
+ schema.properties[k] as SchemaLike,
275
+ [...pathPrefix, "properties", k],
276
+ ctx,
277
+ );
278
+ }
279
+ }
280
+ if (schema.oneOf && Array.isArray(schema.oneOf)) {
281
+ schema.oneOf.forEach((branch, i) => {
282
+ if (branch && typeof branch === "object") {
283
+ refineStringLengthPattern(branch as SchemaLike, [...pathPrefix, "oneOf", i], ctx);
284
+ }
285
+ });
286
+ }
287
+ }
288
+
289
+ /** Deep equality for primitive/array/object values (used for uniqueItems check). */
290
+ function valueDeepEqualForRefine(a: unknown, b: unknown): boolean {
291
+ if (a === b) return true;
292
+ if (typeof a !== typeof b) return false;
293
+ if (a === null || b === null) return a === b;
294
+ if (typeof a === "object" && typeof b === "object") {
295
+ if (Array.isArray(a) !== Array.isArray(b)) return false;
296
+ if (Array.isArray(a) && Array.isArray(b)) {
297
+ if (a.length !== b.length) return false;
298
+ return a.every((v, i) => valueDeepEqualForRefine(v, b[i]));
299
+ }
300
+ const keysA = Object.keys(a as object).sort();
301
+ const keysB = Object.keys(b as object).sort();
302
+ if (keysA.length !== keysB.length || keysA.some((k, i) => k !== keysB[i])) return false;
303
+ return keysA.every((k) =>
304
+ valueDeepEqualForRefine((a as Record<string, unknown>)[k], (b as Record<string, unknown>)[k]),
305
+ );
306
+ }
307
+ return false;
308
+ }
309
+
310
+ /**
311
+ * Validates that when a schema has type "array", minItems <= maxItems when both set,
312
+ * and const/enum array values (if present) satisfy length and uniqueItems.
313
+ */
314
+ export function refineArrayItems(
315
+ schema: SchemaLike,
316
+ pathPrefix: (string | number)[],
317
+ ctx: z.RefinementCtx,
318
+ ): void {
319
+ if (!schema || typeof schema !== "object") return;
320
+ const type = schema.type;
321
+ const minItems = schema.minItems;
322
+ const maxItems = schema.maxItems;
323
+ const uniqueItems = schema.uniqueItems;
324
+ const isArray = type === "array";
325
+ if (isArray && minItems !== undefined && maxItems !== undefined && minItems > maxItems) {
326
+ ctx.addIssue({
327
+ code: z.ZodIssueCode.custom,
328
+ message: `When \`type\` is "array", \`minItems\` (${minItems}) must be less than or equal to \`maxItems\` (${maxItems}).`,
329
+ path: [...pathPrefix, "minItems"],
330
+ });
331
+ }
332
+ const checkArray = (arr: unknown[], pathSuffix: (string | number)[]) => {
333
+ if (minItems !== undefined && arr.length < minItems) {
334
+ ctx.addIssue({
335
+ code: z.ZodIssueCode.custom,
336
+ message: `Array length (${arr.length}) is less than \`minItems\` (${minItems}).`,
337
+ path: pathSuffix,
338
+ });
339
+ }
340
+ if (maxItems !== undefined && arr.length > maxItems) {
341
+ ctx.addIssue({
342
+ code: z.ZodIssueCode.custom,
343
+ message: `Array length (${arr.length}) is greater than \`maxItems\` (${maxItems}).`,
344
+ path: pathSuffix,
345
+ });
346
+ }
347
+ if (uniqueItems) {
348
+ for (let i = 0; i < arr.length; i++) {
349
+ for (let j = i + 1; j < arr.length; j++) {
350
+ if (valueDeepEqualForRefine(arr[i], arr[j])) {
351
+ ctx.addIssue({
352
+ code: z.ZodIssueCode.custom,
353
+ message: `Array has duplicate items at indices ${i} and ${j} but \`uniqueItems\` is true.`,
354
+ path: pathSuffix,
355
+ });
356
+ return;
357
+ }
358
+ }
359
+ }
360
+ }
361
+ };
362
+ if (isArray && Array.isArray(schema.const)) {
363
+ checkArray(schema.const, [...pathPrefix, "const"]);
364
+ }
365
+ if (isArray && Array.isArray(schema.enum) && schema.enum.length > 0) {
366
+ for (let i = 0; i < schema.enum.length; i++) {
367
+ const v = schema.enum[i];
368
+ if (Array.isArray(v)) checkArray(v, [...pathPrefix, "enum", i]);
369
+ }
370
+ }
371
+ if (schema.items && typeof schema.items === "object") {
372
+ refineArrayItems(schema.items as SchemaLike, [...pathPrefix, "items"], ctx);
373
+ }
374
+ if (schema.properties && typeof schema.properties === "object") {
375
+ for (const k of Object.keys(schema.properties)) {
376
+ refineArrayItems(schema.properties[k] as SchemaLike, [...pathPrefix, "properties", k], ctx);
377
+ }
378
+ }
379
+ if (schema.oneOf && Array.isArray(schema.oneOf)) {
380
+ schema.oneOf.forEach((branch, i) => {
381
+ if (branch && typeof branch === "object") {
382
+ refineArrayItems(branch as SchemaLike, [...pathPrefix, "oneOf", i], ctx);
383
+ }
384
+ });
385
+ }
386
+ }
387
+
388
+ // Recursive schema for Value: boolean | string | number | ObjectValue | Value[]
389
+ export const valueZodSchema: z.ZodType<Value> = z.lazy(() =>
390
+ z.union([
391
+ z.boolean(),
392
+ z.string(),
393
+ z.number(),
394
+ // | Date // @TODO: support in future
395
+ z.record(z.string(), valueZodSchema),
396
+ z.array(valueZodSchema),
397
+ ]),
398
+ );
399
+
400
+ // @TODO: support "date" in future
401
+ // @TODO: consider "semver" in future
402
+ // @TODO: consider "url" in future
403
+ export const propertyTypeEnum = z.enum([
404
+ "boolean",
405
+ "string",
406
+ "integer",
407
+ "double",
408
+ "object",
409
+ "array",
410
+ ]);
411
+
412
+ export function getSchemaZodSchema(schemaKeys: SchemaKey[] = []) {
413
+ const schemaZodSchema: z.ZodType<Schema> = z.lazy(() =>
414
+ z
415
+ .object({
416
+ description: z.string().optional(),
417
+ type: propertyTypeEnum.optional(),
418
+ enum: z.array(valueZodSchema).optional(),
419
+ const: valueZodSchema.optional(),
420
+ minimum: z.number().optional(),
421
+ maximum: z.number().optional(),
422
+ minLength: z.number().optional(),
423
+ maxLength: z.number().optional(),
424
+ pattern: z.string().optional(),
425
+ items: schemaZodSchema.optional(),
426
+ minItems: z.number().optional(),
427
+ maxItems: z.number().optional(),
428
+ uniqueItems: z.boolean().optional(),
429
+ required: z.array(z.string()).optional(),
430
+ properties: z.record(z.string(), schemaZodSchema).optional(),
431
+ // Annotations: default?: Value; examples?: Value[];
432
+
433
+ schema: z
434
+ .string()
435
+ .refine(
436
+ (value) => schemaKeys.includes(value),
437
+ (value) => ({
438
+ message: `Unknown schema "${value}"`,
439
+ }),
440
+ )
441
+ .optional(),
442
+ oneOf: z.array(schemaZodSchema).min(2).optional(),
443
+ })
444
+ .strict()
445
+ .superRefine((data, ctx) => {
446
+ if (data.type === "array" && data.items === undefined) {
447
+ ctx.addIssue({
448
+ code: z.ZodIssueCode.custom,
449
+ message:
450
+ 'When `type` is "array", `items` is required. Define the schema for array elements.',
451
+ path: ["items"],
452
+ });
453
+ }
454
+ })
455
+ .superRefine((data, ctx) => refineEnumMatchesType(data, [], ctx))
456
+ .superRefine((data, ctx) => refineMinimumMaximum(data, [], ctx))
457
+ .superRefine((data, ctx) => refineStringLengthPattern(data, [], ctx))
458
+ .superRefine((data, ctx) => refineArrayItems(data, [], ctx)),
459
+ );
460
+
461
+ return schemaZodSchema;
462
+ }