schema-truth 0.0.0-stage → 0.7.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.
- package/README.md +143 -2
- package/dist/ajv-DTP2FXRr.js +105 -0
- package/dist/ajv.d.ts +24 -0
- package/dist/ajv.js +1 -0
- package/dist/arktype-BdvvaBQX.js +746 -0
- package/dist/arktype.d.ts +10 -0
- package/dist/arktype.js +1 -0
- package/dist/cli/ajv.d.ts +1 -0
- package/dist/cli/ajv.js +15 -0
- package/dist/cli/arktype.d.ts +1 -0
- package/dist/cli/arktype.js +15 -0
- package/dist/cli/effect.d.ts +1 -0
- package/dist/cli/effect.js +15 -0
- package/dist/cli/typebox.d.ts +1 -0
- package/dist/cli/typebox.js +15 -0
- package/dist/cli/valibot.d.ts +1 -0
- package/dist/cli/valibot.js +15 -0
- package/dist/cli/yup.d.ts +1 -0
- package/dist/cli/yup.js +15 -0
- package/dist/cli/zod.d.ts +1 -0
- package/dist/cli/zod.js +15 -0
- package/dist/cli-CL2mSark.js +124 -0
- package/dist/effect-mUknRPv_.js +645 -0
- package/dist/effect.d.ts +12 -0
- package/dist/effect.js +1 -0
- package/dist/helper-Cfvb5UDq.js +1115 -0
- package/dist/index-C2L8Ty0-.d.ts +65 -0
- package/dist/index-DbV3dEmN.d.ts +551 -0
- package/dist/index.d.ts +303 -0
- package/dist/index.js +10 -0
- package/dist/parser-CyJ2auea.js +36 -0
- package/dist/typebox-BdWJv3ND.js +544 -0
- package/dist/typebox.d.ts +21 -0
- package/dist/typebox.js +1 -0
- package/dist/utils-WNBq1HR0.js +1017 -0
- package/dist/valibot-CaJIynCH.js +664 -0
- package/dist/valibot.d.ts +9 -0
- package/dist/valibot.js +1 -0
- package/dist/yup-CM2TSFig.js +92 -0
- package/dist/yup.d.ts +17 -0
- package/dist/yup.js +1 -0
- package/dist/zod-BsXLZfwK.js +777 -0
- package/dist/zod.d.ts +9 -0
- package/dist/zod.js +1 -0
- package/package.json +112 -4
package/dist/zod.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { r as JSONSchema } from "./index-DbV3dEmN.js";
|
|
2
|
+
import { n as GenerateOptions } from "./index-C2L8Ty0-.js";
|
|
3
|
+
//#region src/generator/zod/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A whole JSON Schema document as a Zod module: imports, `$defs` in dependency order,
|
|
6
|
+
* the root export, and the inferred type.
|
|
7
|
+
*/
|
|
8
|
+
export declare function schemaToZod(schema: JSONSchema, options?: GenerateOptions): string;
|
|
9
|
+
//#endregion
|
package/dist/zod.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as schemaToZod } from "./zod-BsXLZfwK.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,114 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "schema-truth",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Generate Zod/Valibot/Effect/TypeBox/ArkType/Ajv/Yup schemas from JSON or YAML files",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ajv",
|
|
7
|
+
"arktype",
|
|
8
|
+
"effect",
|
|
9
|
+
"typebox",
|
|
10
|
+
"valibot",
|
|
11
|
+
"yup",
|
|
12
|
+
"zod"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/nakita628/schema-truth",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/nakita628/schema-truth/issues"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/nakita628/schema-truth.git"
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"schema-truth-ajv": "dist/cli/ajv.js",
|
|
25
|
+
"schema-truth-arktype": "dist/cli/arktype.js",
|
|
26
|
+
"schema-truth-effect": "dist/cli/effect.js",
|
|
27
|
+
"schema-truth-typebox": "dist/cli/typebox.js",
|
|
28
|
+
"schema-truth-valibot": "dist/cli/valibot.js",
|
|
29
|
+
"schema-truth-yup": "dist/cli/yup.js",
|
|
30
|
+
"schema-truth-zod": "dist/cli/zod.js"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"type": "module",
|
|
36
|
+
"main": "dist/index.js",
|
|
37
|
+
"typesVersions": {
|
|
38
|
+
"*": {
|
|
39
|
+
"ajv": [
|
|
40
|
+
"./dist/ajv.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"zod": [
|
|
43
|
+
"./dist/zod.d.ts"
|
|
44
|
+
],
|
|
45
|
+
"valibot": [
|
|
46
|
+
"./dist/valibot.d.ts"
|
|
47
|
+
],
|
|
48
|
+
"effect": [
|
|
49
|
+
"./dist/effect.d.ts"
|
|
50
|
+
],
|
|
51
|
+
"typebox": [
|
|
52
|
+
"./dist/typebox.d.ts"
|
|
53
|
+
],
|
|
54
|
+
"arktype": [
|
|
55
|
+
"./dist/arktype.d.ts"
|
|
56
|
+
],
|
|
57
|
+
"yup": [
|
|
58
|
+
"./dist/yup.d.ts"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"exports": {
|
|
63
|
+
".": {
|
|
64
|
+
"types": "./dist/index.d.ts",
|
|
65
|
+
"import": "./dist/index.js"
|
|
66
|
+
},
|
|
67
|
+
"./ajv": {
|
|
68
|
+
"types": "./dist/ajv.d.ts",
|
|
69
|
+
"import": "./dist/ajv.js"
|
|
70
|
+
},
|
|
71
|
+
"./zod": {
|
|
72
|
+
"types": "./dist/zod.d.ts",
|
|
73
|
+
"import": "./dist/zod.js"
|
|
74
|
+
},
|
|
75
|
+
"./valibot": {
|
|
76
|
+
"types": "./dist/valibot.d.ts",
|
|
77
|
+
"import": "./dist/valibot.js"
|
|
78
|
+
},
|
|
79
|
+
"./effect": {
|
|
80
|
+
"types": "./dist/effect.d.ts",
|
|
81
|
+
"import": "./dist/effect.js"
|
|
82
|
+
},
|
|
83
|
+
"./typebox": {
|
|
84
|
+
"types": "./dist/typebox.d.ts",
|
|
85
|
+
"import": "./dist/typebox.js"
|
|
86
|
+
},
|
|
87
|
+
"./arktype": {
|
|
88
|
+
"types": "./dist/arktype.d.ts",
|
|
89
|
+
"import": "./dist/arktype.js"
|
|
90
|
+
},
|
|
91
|
+
"./yup": {
|
|
92
|
+
"types": "./dist/yup.d.ts",
|
|
93
|
+
"import": "./dist/yup.js"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"publishConfig": {
|
|
97
|
+
"access": "public"
|
|
98
|
+
},
|
|
99
|
+
"scripts": {
|
|
100
|
+
"build": "vp pack",
|
|
101
|
+
"check": "vp check",
|
|
102
|
+
"fix": "vp check --fix",
|
|
103
|
+
"test": "vp test"
|
|
104
|
+
},
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"@apidevtools/json-schema-ref-parser": "^16.0.5",
|
|
107
|
+
"@effect/platform-node": "4.0.5",
|
|
108
|
+
"effect": "4.0.5",
|
|
109
|
+
"oxfmt": "^0.74.0"
|
|
110
|
+
},
|
|
111
|
+
"devDependencies": {
|
|
112
|
+
"@types/node": "26.6.5"
|
|
113
|
+
}
|
|
114
|
+
}
|