@donmahallem/turbo-validate-request 0.4.3 → 0.4.4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Ajv, { JSONSchemaType } from 'ajv';
|
|
2
2
|
import { RequestHandler } from 'express';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type CheckKeys = 'query' | 'params' | 'body';
|
|
4
|
+
type MethodSignature = <T = object>(key: CheckKeys, schema: JSONSchemaType<T>, ajvInstance?: Ajv) => RequestHandler;
|
|
5
5
|
/**
|
|
6
6
|
* Checks a request against the given schema
|
|
7
7
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donmahallem/turbo-validate-request",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Turbo Helpers for express.js",
|
|
5
5
|
"main": "./dist/cjs/index.cjs",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -49,18 +49,18 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/express": "4.17.
|
|
52
|
+
"@types/express": "4.17.14",
|
|
53
53
|
"@types/supertest": "2.0.12",
|
|
54
|
-
"ajv": "8.11.
|
|
55
|
-
"express": "4.18.
|
|
56
|
-
"supertest": "6.
|
|
54
|
+
"ajv": "8.11.2",
|
|
55
|
+
"express": "4.18.2",
|
|
56
|
+
"supertest": "6.3.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"ajv": "^8.0.0",
|
|
60
60
|
"express": "^4.17.1"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@donmahallem/turbo": "^2.4.
|
|
63
|
+
"@donmahallem/turbo": "^2.4.4"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "400bcfdd8470dc9d32f33c818ea7f6f89db70abb"
|
|
66
66
|
}
|