perfect-payload 2.0.0-beta.1 → 2.0.0-beta.3
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.d.ts +1 -1
- package/package.json +7 -4
package/dist/index.d.ts
CHANGED
|
@@ -29,4 +29,4 @@ export declare function perfectPayload<T extends object = Record<string, unknown
|
|
|
29
29
|
export declare function perfectPayloadAsync<T extends object = Record<string, unknown>>(data: Record<string, unknown>, dataValidationRule: ValidationRules, options: PrettyErrorOptions): Promise<ValidationResult<T, string>>;
|
|
30
30
|
export declare function perfectPayloadAsync<T extends object = Record<string, unknown>>(data?: Record<string, unknown>, dataValidationRule?: ValidationRules, options?: StructuredErrorOptions): Promise<ValidationResult<T>>;
|
|
31
31
|
export declare function perfectPayloadAsync<T extends object = Record<string, unknown>>(data: Record<string, unknown>, dataValidationRule: ValidationRules, options: PerfectPayloadOptions): Promise<ValidationResult<T> | ValidationResult<T, string>>;
|
|
32
|
-
export {};
|
|
32
|
+
export type { AttributeValidationRules, ValidationRules, ValidationValueType, TransformFunction, CustomValidator, DependencyRule, DependencyRules, } from "./types/rules.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "perfect-payload",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lightweight JSON payload validation library with structured errors, nested validation, field paths, and customizable validation rules.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -8,15 +8,18 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
12
13
|
},
|
|
13
14
|
"./express": {
|
|
14
15
|
"types": "./dist/express.d.ts",
|
|
15
|
-
"import": "./dist/express.js"
|
|
16
|
+
"import": "./dist/express.js",
|
|
17
|
+
"default": "./dist/express.js"
|
|
16
18
|
},
|
|
17
19
|
"./fastify": {
|
|
18
20
|
"types": "./dist/fastify.d.ts",
|
|
19
|
-
"import": "./dist/fastify.js"
|
|
21
|
+
"import": "./dist/fastify.js",
|
|
22
|
+
"default": "./dist/fastify.js"
|
|
20
23
|
}
|
|
21
24
|
},
|
|
22
25
|
"scripts": {
|