@restura/core 1.0.0-beta.6 → 1.0.0-beta.8

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/index.js CHANGED
@@ -1058,10 +1058,10 @@ var getMulterUpload = (directory) => {
1058
1058
  };
1059
1059
 
1060
1060
  // src/restura/schemas/resturaSchema.ts
1061
- import { z as z3 } from "zod";
1061
+ import { z as z3 } from "zod/v4";
1062
1062
 
1063
1063
  // src/restura/schemas/validatorDataSchema.ts
1064
- import { z as z2 } from "zod";
1064
+ import { z as z2 } from "zod/v4";
1065
1065
  var validatorDataSchemeValue = z2.union([z2.string(), z2.array(z2.string()), z2.number(), z2.array(z2.number())]);
1066
1066
  var validatorDataSchema = z2.object({
1067
1067
  type: z2.enum(["TYPE_CHECK", "MIN", "MAX", "ONE_OF"]),
@@ -1130,8 +1130,9 @@ var responseDataSchema = z3.object({
1130
1130
  table: z3.string(),
1131
1131
  joins: z3.array(joinDataSchema),
1132
1132
  where: z3.array(whereDataSchema),
1133
- properties: z3.array(z3.lazy(() => responseDataSchema)),
1134
- // Explicit type for the lazy schema
1133
+ get properties() {
1134
+ return z3.array(responseDataSchema);
1135
+ },
1135
1136
  groupBy: groupBySchema.optional(),
1136
1137
  orderBy: orderBySchema.optional()
1137
1138
  }).optional(),
@@ -1353,7 +1354,11 @@ async function isSchemaValid(schemaToCheck) {
1353
1354
  resturaSchema.parse(schemaToCheck);
1354
1355
  return true;
1355
1356
  } catch (error) {
1356
- logger.error(error);
1357
+ if (error instanceof z3.ZodError) {
1358
+ logger.error(z3.prettifyError(error));
1359
+ } else {
1360
+ logger.error(error);
1361
+ }
1357
1362
  return false;
1358
1363
  }
1359
1364
  }
@@ -1361,7 +1366,7 @@ async function isSchemaValid(schemaToCheck) {
1361
1366
  // src/restura/validators/requestValidator.ts
1362
1367
  import { ObjectUtils as ObjectUtils2 } from "@redskytech/core-utils";
1363
1368
  import jsonschema from "jsonschema";
1364
- import { z as z4 } from "zod";
1369
+ import { z as z4 } from "zod/v4";
1365
1370
 
1366
1371
  // src/restura/utils/utils.ts
1367
1372
  function addQuotesToStrings(variable) {