@donmahallem/turbo-validate-request 0.6.0 → 3.0.1

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/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
 
4
4
  # ➤ <h1 align="center">@donmahallem/turbo-validate-request</h1>
5
5
  <p align="center">
6
- <a href="https://github.com/donmahallem/js-libs/actions?query=workflow%3ATest+branch%3Amaster"><img alt="Test" src="https://github.com/donmahallem/js-libs/workflows/Test/badge.svg?branch=master&event=push" height="20"/></a>
7
- <a href="https://codecov.io/gh/donmahallem/js-libs/donmahallem/master/packages/js-libs"><img alt="codecov" src="https://codecov.io/gh/donmahallem/js-libs/branch/master/graph/badge.svg?flag=TurboValidateRequest" height="20"/></a>
6
+ <a href="https://github.com/donmahallem/turbo/actions?query=workflow%3ATest+branch%3Amaster"><img alt="Test" src="https://github.com/donmahallem/turbo/workflows/Test/badge.svg?branch=master&event=push" height="20"/></a>
7
+ <a href="https://codecov.io/gh/donmahallem/turbo/donmahallem/master/packages/turbo"><img alt="codecov" src="https://codecov.io/gh/donmahallem/turbo/branch/master/graph/badge.svg?flag=TurboValidateRequest" height="20"/></a>
8
8
  <a href="https://badge.fury.io/js/%40donmahallem%2Fturbo-validate-request"><img alt="npm version" src="https://badge.fury.io/js/%40donmahallem%2Fturbo-validate-request.svg" height="20"/></a>
9
- <a href="https://github.com/donmahallem/js-libs/blob/master/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/donmahallem/js-libs" height="20"/></a>
10
- <a href="https://david-dm.org/donmahallem/js-libs?path=packages/turbo-validate-request"><img alt="dependencies Status" src="https://david-dm.org/donmahallem/js-libs/status.svg?path=packages/turbo-validate-request" height="20"/></a>
11
- <a href="https://david-dm.org/donmahallem/js-libs?path=packages/turbo-validate-request&type=dev"><img alt="devDependencies Status" src="https://david-dm.org/donmahallem/js-libs/dev-status.svg?path=packages/turbo-validate-request" height="20"/></a>
12
- <a href="https://github.com/donmahallem/js-libs/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/donmahallem/js-libs" height="20"/></a>
9
+ <a href="https://github.com/donmahallem/turbo/blob/master/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/donmahallem/turbo" height="20"/></a>
10
+ <a href="https://david-dm.org/donmahallem/turbo?path=packages/turbo-validate-request"><img alt="dependencies Status" src="https://david-dm.org/donmahallem/turbo/status.svg?path=packages/turbo-validate-request" height="20"/></a>
11
+ <a href="https://david-dm.org/donmahallem/turbo?path=packages/turbo-validate-request&type=dev"><img alt="devDependencies Status" src="https://david-dm.org/donmahallem/turbo/dev-status.svg?path=packages/turbo-validate-request" height="20"/></a>
12
+ <a href="https://github.com/donmahallem/turbo/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/donmahallem/turbo" height="20"/></a>
13
13
  </p>
14
14
 
15
15
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  const turbo = require('@donmahallem/turbo');
4
4
 
5
- /*
5
+ /**
6
6
  * Package @donmahallem/turbo-validate-request
7
- * Source https://donmahallem.github.io/js-libs/
7
+ * Source https://donmahallem.github.io/turbo/
8
8
  */
9
9
  const convertValidationError = (error) => {
10
10
  const errorPath = error.instancePath === '' ? 'root' : error.instancePath;
@@ -3,9 +3,9 @@
3
3
  const Ajv = require('ajv');
4
4
  const convertValidationError = require('./convert-validation-error.cjs');
5
5
 
6
- /*
6
+ /**
7
7
  * Package @donmahallem/turbo-validate-request
8
- * Source https://donmahallem.github.io/js-libs/
8
+ * Source https://donmahallem.github.io/turbo/
9
9
  */
10
10
  /**
11
11
  * Checks a request against the given schema
@@ -1,8 +1,8 @@
1
1
  import { RequestError } from '@donmahallem/turbo';
2
2
 
3
- /*
3
+ /**
4
4
  * Package @donmahallem/turbo-validate-request
5
- * Source https://donmahallem.github.io/js-libs/
5
+ * Source https://donmahallem.github.io/turbo/
6
6
  */
7
7
  const convertValidationError = (error) => {
8
8
  const errorPath = error.instancePath === '' ? 'root' : error.instancePath;
@@ -1,9 +1,9 @@
1
1
  import Ajv from 'ajv';
2
2
  import { convertValidationError } from './convert-validation-error.mjs';
3
3
 
4
- /*
4
+ /**
5
5
  * Package @donmahallem/turbo-validate-request
6
- * Source https://donmahallem.github.io/js-libs/
6
+ * Source https://donmahallem.github.io/turbo/
7
7
  */
8
8
  /**
9
9
  * Checks a request against the given schema
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Package @donmahallem/turbo-validate-request
3
+ * Source https://donmahallem.github.io/turbo/
4
+ */
1
5
  import { RequestError } from '@donmahallem/turbo';
2
6
  import { DefinedError } from 'ajv';
3
7
  export declare const convertValidationError: (error: DefinedError) => RequestError;
@@ -1 +1,5 @@
1
+ /**
2
+ * Package @donmahallem/turbo-validate-request
3
+ * Source https://donmahallem.github.io/turbo/
4
+ */
1
5
  export { validateRequest } from './validate-request.js';
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Package @donmahallem/turbo-validate-request
3
+ * Source https://donmahallem.github.io/turbo/
4
+ */
1
5
  import Ajv, { JSONSchemaType } from 'ajv';
2
6
  import { RequestHandler } from 'express';
3
7
  type CheckKeys = 'query' | 'params' | 'body';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donmahallem/turbo-validate-request",
3
- "version": "0.6.0",
3
+ "version": "3.0.1",
4
4
  "description": "Turbo Helpers for express.js",
5
5
  "types": "./dist/types/index.d.ts",
6
6
  "private": false,
@@ -27,7 +27,7 @@
27
27
  "prepublishOnly": "npm run test && npm run build",
28
28
  "version": "npm run build:readme && git add README.md"
29
29
  },
30
- "homepage": "https://donmahallem.github.io/js-libs/",
30
+ "homepage": "https://donmahallem.github.io/turbo/",
31
31
  "author": {
32
32
  "name": "donmahallem",
33
33
  "email": "donmahallem@users.noreply.github.com",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "license": "Apache-2.0",
37
37
  "bugs": {
38
- "url": "https://github.com/donmahallem/js-libs/issues"
38
+ "url": "https://github.com/donmahallem/turbo/issues"
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
42
- "url": "https://github.com/donmahallem/js-libs.git"
42
+ "url": "https://github.com/donmahallem/turbo.git"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=20"
@@ -47,7 +47,8 @@
47
47
  "files": [
48
48
  "dist/*",
49
49
  "src/*",
50
- "!src/**/*.spec.ts"
50
+ "!src/**/*.spec.ts",
51
+ "README.md"
51
52
  ],
52
53
  "publishConfig": {
53
54
  "access": "public"
@@ -64,7 +65,7 @@
64
65
  "express": "^4.17.1"
65
66
  },
66
67
  "dependencies": {
67
- "@donmahallem/turbo": "^2.6.0"
68
+ "@donmahallem/turbo": "^3.0.1"
68
69
  },
69
- "gitHead": "5caa5231032abc946c135e46b00e1a969a97ba3f"
70
+ "gitHead": "67cce6303d9b86f27a0f6f435086b70fba0882e1"
70
71
  }
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo-validate-request
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://donmahallem.github.io/turbo/
4
4
  */
5
5
 
6
6
  import { RequestError } from '@donmahallem/turbo';
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo-validate-request
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://donmahallem.github.io/turbo/
4
4
  */
5
5
 
6
6
  export { validateRequest } from './validate-request.js';
@@ -1,6 +1,6 @@
1
- /*
1
+ /**
2
2
  * Package @donmahallem/turbo-validate-request
3
- * Source https://donmahallem.github.io/js-libs/
3
+ * Source https://donmahallem.github.io/turbo/
4
4
  */
5
5
 
6
6
  import Ajv, { DefinedError, JSONSchemaType, ValidateFunction } from 'ajv';