@riktajs/core 0.4.7 → 0.5.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.
@@ -7,7 +7,7 @@ const env_loader_1 = require("./env-loader");
7
7
  class ConfigValidationException extends Error {
8
8
  errors;
9
9
  constructor(errors, providerName) {
10
- const errorMessages = errors.errors
10
+ const errorMessages = errors.issues
11
11
  .map(err => ` - ${err.path.join('.')}: ${err.message}`)
12
12
  .join('\n');
13
13
  super(`Configuration validation failed for ${providerName}:\n${errorMessages}\n\n` +
@@ -6,7 +6,7 @@ const constants_1 = require("../constants");
6
6
  function isZodType(value) {
7
7
  return (value !== null &&
8
8
  typeof value === 'object' &&
9
- '_def' in value &&
9
+ ('_zod' in value || '_def' in value) &&
10
10
  'safeParse' in value &&
11
11
  typeof value.safeParse === 'function');
12
12
  }
@@ -12,8 +12,6 @@ export declare class ValidationException extends HttpException {
12
12
  readonly errors: ValidationErrorDetails[];
13
13
  constructor(zodError: ZodError, message?: string);
14
14
  getValidationErrors(): ValidationErrorDetails[];
15
- getFlattenedErrors(): import("zod").typeToFlattenedError<any, string>;
16
- getFormattedErrors(): {
17
- _errors: string[];
18
- };
15
+ getFlattenedErrors(): import("zod").ZodFlattenedError<unknown, string>;
16
+ getFormattedErrors(): import("zod").ZodFormattedError<unknown, string>;
19
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riktajs/core",
3
- "version": "0.4.7",
3
+ "version": "0.5.0",
4
4
  "description": "A fast and modern TypeScript backend framework with zero-config autowiring, powered by Fastify",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "fast-glob": "3.3.3",
34
34
  "fastify": "5.3.2",
35
35
  "reflect-metadata": "0.2.2",
36
- "zod": "3.25.76"
36
+ "zod": "4.3.5"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.10.2",