vovk-ajv 0.0.0-beta.4 → 0.0.0-beta.5

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 (3) hide show
  1. package/README.md +5 -5
  2. package/index.js +1 -2
  3. package/package.json +5 -6
package/README.md CHANGED
@@ -7,13 +7,13 @@
7
7
  </picture>
8
8
  </a>
9
9
  <br>
10
- <strong>Back-end for Next.js (beta)</strong>
10
+ <strong>Back-end Framework for Next.js App Router</strong>
11
11
  <br />
12
- <a href="https://vovk.dev/about">About Vovk.ts</a>
13
- &nbsp;
12
+ <a href="https://vovk.dev/">Documentation</a>
13
+ &nbsp;&nbsp;
14
14
  <a href="https://vovk.dev/quick-install">Quick Start</a>
15
- &nbsp;
16
- <a href="https://github.com/finom/vovk">Github Repo</a>
15
+ &nbsp;&nbsp;
16
+ <a href="https://vovk.dev/performance">Performance</a>
17
17
  </p>
18
18
 
19
19
  ---
package/index.js CHANGED
@@ -15,7 +15,6 @@ const createAjv = (options, target) => {
15
15
  const ajv = new AjvClass({ allErrors: true, ...options });
16
16
  (0, ajv_formats_1.default)(ajv);
17
17
  (0, ajv_errors_1.default)(ajv);
18
- ajv.addKeyword('x-isDto');
19
18
  ajv.addKeyword('x-isForm');
20
19
  ajv.addKeyword('x-tsType');
21
20
  return ajv;
@@ -62,7 +61,7 @@ const validate = ({ input, schema, localize = 'en', type, endpoint, options, tar
62
61
  const isValid = ajv.validate(schema, input);
63
62
  if (!isValid) {
64
63
  ajv_i18n_1.default[localize](ajv.errors);
65
- throw new vovk_1.HttpException(vovk_1.HttpStatus.NULL, `Ajv validation failed. Invalid ${isFormData ? 'form' : type} on client: ${ajv.errorsText()}`, { input, errors: ajv.errors, endpoint });
64
+ throw new vovk_1.HttpException(vovk_1.HttpStatus.NULL, `Client-side validation failed. Invalid ${isFormData ? 'form' : type} on client: ${ajv.errorsText()}`, { input, errors: ajv.errors, endpoint });
66
65
  }
67
66
  }
68
67
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vovk-ajv",
3
- "version": "0.0.0-beta.4",
4
- "description": "Local validation for JSON schemas for vovk-zod and other validation libraries for Vovk.ts",
3
+ "version": "0.0.0-beta.5",
4
+ "description": "Client-side JSON Schema validation library for Vovk.ts",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "build": "tsc",
@@ -17,17 +17,16 @@
17
17
  "vovk",
18
18
  "json",
19
19
  "ajv",
20
- "validation",
21
- "zod"
20
+ "validation"
22
21
  ],
23
22
  "author": "Andrey Gubanov",
24
23
  "license": "MIT",
25
24
  "bugs": {
26
25
  "url": "https://github.com/finom/vovk/issues"
27
26
  },
28
- "homepage": "https://github.com/finom/vovk#readme",
27
+ "homepage": "https://vovk.dev/imports",
29
28
  "peerDependencies": {
30
- "vovk": "^3.0.0-beta.36"
29
+ "vovk": "^3.0.0-beta.98"
31
30
  },
32
31
  "dependencies": {
33
32
  "ajv": "^8.17.1",