flavor-code 1.3.23 → 1.4.0-beta.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 +437 -434
- package/README.zh-CN.md +434 -431
- package/dist/{app-NTEUPJKJ.js → app-C5ZQUOKJ.js} +43 -155
- package/dist/astgraph/grammars.mjs +68 -68
- package/dist/astgraph/vendor/tree-sitter.js +3980 -3980
- package/dist/astgraph/vendor/zod/LICENSE +21 -21
- package/dist/astgraph/vendor/zod/index.js +4 -4
- package/dist/astgraph/vendor/zod/locales/index.js +1 -1
- package/dist/astgraph/vendor/zod/locales/package.json +7 -7
- package/dist/astgraph/vendor/zod/package.json +135 -135
- package/dist/astgraph/vendor/zod/v4/classic/checks.js +1 -1
- package/dist/astgraph/vendor/zod/v4/classic/coerce.js +17 -17
- package/dist/astgraph/vendor/zod/v4/classic/compat.js +31 -31
- package/dist/astgraph/vendor/zod/v4/classic/errors.js +48 -48
- package/dist/astgraph/vendor/zod/v4/classic/external.js +20 -20
- package/dist/astgraph/vendor/zod/v4/classic/from-json-schema.js +599 -599
- package/dist/astgraph/vendor/zod/v4/classic/index.js +4 -4
- package/dist/astgraph/vendor/zod/v4/classic/iso.js +30 -30
- package/dist/astgraph/vendor/zod/v4/classic/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/classic/parse.js +15 -15
- package/dist/astgraph/vendor/zod/v4/classic/schemas.js +1395 -1395
- package/dist/astgraph/vendor/zod/v4/core/api.js +1087 -1087
- package/dist/astgraph/vendor/zod/v4/core/checks.js +575 -575
- package/dist/astgraph/vendor/zod/v4/core/core.js +78 -78
- package/dist/astgraph/vendor/zod/v4/core/doc.js +35 -35
- package/dist/astgraph/vendor/zod/v4/core/errors.js +185 -185
- package/dist/astgraph/vendor/zod/v4/core/index.js +16 -16
- package/dist/astgraph/vendor/zod/v4/core/json-schema-generator.js +95 -95
- package/dist/astgraph/vendor/zod/v4/core/json-schema-processors.js +601 -601
- package/dist/astgraph/vendor/zod/v4/core/json-schema.js +1 -1
- package/dist/astgraph/vendor/zod/v4/core/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/core/parse.js +93 -93
- package/dist/astgraph/vendor/zod/v4/core/regexes.js +139 -139
- package/dist/astgraph/vendor/zod/v4/core/registries.js +51 -51
- package/dist/astgraph/vendor/zod/v4/core/schemas.js +2239 -2239
- package/dist/astgraph/vendor/zod/v4/core/standard-schema.js +1 -1
- package/dist/astgraph/vendor/zod/v4/core/to-json-schema.js +448 -448
- package/dist/astgraph/vendor/zod/v4/core/util.js +674 -674
- package/dist/astgraph/vendor/zod/v4/core/versions.js +5 -5
- package/dist/astgraph/vendor/zod/v4/index.js +3 -3
- package/dist/astgraph/vendor/zod/v4/locales/ar.js +106 -106
- package/dist/astgraph/vendor/zod/v4/locales/az.js +105 -105
- package/dist/astgraph/vendor/zod/v4/locales/be.js +156 -156
- package/dist/astgraph/vendor/zod/v4/locales/bg.js +120 -120
- package/dist/astgraph/vendor/zod/v4/locales/ca.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/cs.js +111 -111
- package/dist/astgraph/vendor/zod/v4/locales/da.js +115 -115
- package/dist/astgraph/vendor/zod/v4/locales/de.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/el.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/en.js +113 -113
- package/dist/astgraph/vendor/zod/v4/locales/eo.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/es.js +132 -132
- package/dist/astgraph/vendor/zod/v4/locales/fa.js +114 -114
- package/dist/astgraph/vendor/zod/v4/locales/fi.js +112 -112
- package/dist/astgraph/vendor/zod/v4/locales/fr-CA.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/fr.js +125 -125
- package/dist/astgraph/vendor/zod/v4/locales/he.js +214 -214
- package/dist/astgraph/vendor/zod/v4/locales/hr.js +122 -122
- package/dist/astgraph/vendor/zod/v4/locales/hu.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/hy.js +147 -147
- package/dist/astgraph/vendor/zod/v4/locales/id.js +106 -106
- package/dist/astgraph/vendor/zod/v4/locales/index.js +52 -52
- package/dist/astgraph/vendor/zod/v4/locales/is.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/it.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ja.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/ka.js +112 -112
- package/dist/astgraph/vendor/zod/v4/locales/kh.js +5 -5
- package/dist/astgraph/vendor/zod/v4/locales/km.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/ko.js +111 -111
- package/dist/astgraph/vendor/zod/v4/locales/lt.js +203 -203
- package/dist/astgraph/vendor/zod/v4/locales/mk.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/ms.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/nl.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/no.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ota.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/locales/pl.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/ps.js +114 -114
- package/dist/astgraph/vendor/zod/v4/locales/pt.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ro.js +119 -119
- package/dist/astgraph/vendor/zod/v4/locales/ru.js +156 -156
- package/dist/astgraph/vendor/zod/v4/locales/sl.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/sv.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/ta.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/th.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/tr.js +105 -105
- package/dist/astgraph/vendor/zod/v4/locales/ua.js +5 -5
- package/dist/astgraph/vendor/zod/v4/locales/uk.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/ur.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/uz.js +110 -110
- package/dist/astgraph/vendor/zod/v4/locales/vi.js +108 -108
- package/dist/astgraph/vendor/zod/v4/locales/yo.js +107 -107
- package/dist/astgraph/vendor/zod/v4/locales/zh-CN.js +109 -109
- package/dist/astgraph/vendor/zod/v4/locales/zh-TW.js +107 -107
- package/dist/astgraph/vendor/zod/v4/mini/checks.js +1 -1
- package/dist/astgraph/vendor/zod/v4/mini/coerce.js +22 -22
- package/dist/astgraph/vendor/zod/v4/mini/external.js +14 -14
- package/dist/astgraph/vendor/zod/v4/mini/index.js +3 -3
- package/dist/astgraph/vendor/zod/v4/mini/iso.js +34 -34
- package/dist/astgraph/vendor/zod/v4/mini/package.json +7 -7
- package/dist/astgraph/vendor/zod/v4/mini/parse.js +1 -1
- package/dist/astgraph/vendor/zod/v4/mini/schemas.js +961 -961
- package/dist/astgraph/vendor/zod/v4/package.json +7 -7
- package/dist/{chunk-7OICVL2M.js → chunk-2BF7CVWZ.js} +0 -42
- package/dist/{chunk-RQTYHUMK.js → chunk-3WCDZ6ZL.js} +15 -0
- package/dist/{chunk-Z62P4LL7.js → chunk-6MNOZ2TX.js} +8962 -8422
- package/dist/{chunk-VEUSROUQ.js → chunk-FOTMP4ZS.js} +1 -1
- package/dist/{chunk-SUSLIHXO.js → chunk-ODRWR4KK.js} +1 -1
- package/dist/{chunk-RPFWB45Y.js → chunk-URUVFECH.js} +1 -1
- package/dist/{claude-ink-6CEG2XZZ.js → claude-ink-LP32NSX5.js} +2 -3
- package/dist/cli-main.js +27 -11
- package/dist/config/load.d.ts +2 -0
- package/dist/desktop/main.js +1092 -541
- package/dist/desktop-renderer/assets/index-Bk6FYhyh.css +1 -0
- package/dist/desktop-renderer/assets/{index-D75ozXnZ.js → index-CqRIr-hz.js} +3 -3
- package/dist/desktop-renderer/assets/{interactive-terminal-CTFo4fK9.js → interactive-terminal-C4o7MNPO.js} +1 -1
- package/dist/desktop-renderer/index.html +2 -2
- package/dist/doctor.d.ts +38 -0
- package/dist/execution/docker.d.ts +5 -1
- package/dist/execution/types.d.ts +11 -0
- package/dist/jobs/registry.d.ts +1 -0
- package/dist/{load-4FWNXE6F.js → load-V2UIYYQI.js} +1 -1
- package/dist/sdk/index.js +4 -4
- package/dist/tools/shell.d.ts +17 -12
- package/dist/tools/types.d.ts +1 -0
- package/dist/ui/commands.d.ts +1 -1
- package/dist/ui/session.d.ts +1 -0
- package/dist/update/check.d.ts +20 -0
- package/dist/utils/semver.d.ts +3 -0
- package/dist/utils/spawn-executable.d.ts +2 -0
- package/package.json +1 -1
- package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +5848 -5848
- package/dist/chunk-OTYFL4AG.js +0 -16
- package/dist/desktop-renderer/assets/index-ZZsUx916.css +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Colin McDonnell
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Colin McDonnell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "./v4/classic/external.js";
|
|
2
|
-
export * from "./v4/classic/external.js";
|
|
3
|
-
export { z };
|
|
4
|
-
export default z;
|
|
1
|
+
import * as z from "./v4/classic/external.js";
|
|
2
|
+
export * from "./v4/classic/external.js";
|
|
3
|
+
export { z };
|
|
4
|
+
export default z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../v4/locales/index.js";
|
|
1
|
+
export * from "../v4/locales/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "module",
|
|
3
|
-
"main": "./index.cjs",
|
|
4
|
-
"module": "./index.js",
|
|
5
|
-
"types": "./index.d.cts",
|
|
6
|
-
"sideEffects": false
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"main": "./index.cjs",
|
|
4
|
+
"module": "./index.js",
|
|
5
|
+
"types": "./index.d.cts",
|
|
6
|
+
"sideEffects": false
|
|
7
|
+
}
|
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "zod",
|
|
3
|
-
"version": "4.4.3",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "Colin McDonnell <zod@colinhacks.com>",
|
|
7
|
-
"description": "TypeScript-first schema declaration and validation library with static type inference",
|
|
8
|
-
"homepage": "https://zod.dev",
|
|
9
|
-
"llms": "https://zod.dev/llms.txt",
|
|
10
|
-
"llmsFull": "https://zod.dev/llms-full.txt",
|
|
11
|
-
"mcpServer": "https://mcp.inkeep.com/zod/mcp",
|
|
12
|
-
"funding": "https://github.com/sponsors/colinhacks",
|
|
13
|
-
"sideEffects": false,
|
|
14
|
-
"files": [
|
|
15
|
-
"src",
|
|
16
|
-
"**/*.js",
|
|
17
|
-
"**/*.mjs",
|
|
18
|
-
"**/*.cjs",
|
|
19
|
-
"**/*.d.ts",
|
|
20
|
-
"**/*.d.mts",
|
|
21
|
-
"**/*.d.cts",
|
|
22
|
-
"**/package.json"
|
|
23
|
-
],
|
|
24
|
-
"keywords": [
|
|
25
|
-
"typescript",
|
|
26
|
-
"schema",
|
|
27
|
-
"validation",
|
|
28
|
-
"type",
|
|
29
|
-
"inference"
|
|
30
|
-
],
|
|
31
|
-
"main": "./index.cjs",
|
|
32
|
-
"types": "./index.d.cts",
|
|
33
|
-
"module": "./index.js",
|
|
34
|
-
"zshy": {
|
|
35
|
-
"exports": {
|
|
36
|
-
"./package.json": "./package.json",
|
|
37
|
-
".": "./src/index.ts",
|
|
38
|
-
"./mini": "./src/mini/index.ts",
|
|
39
|
-
"./locales": "./src/locales/index.ts",
|
|
40
|
-
"./v3": "./src/v3/index.ts",
|
|
41
|
-
"./v4": "./src/v4/index.ts",
|
|
42
|
-
"./v4-mini": "./src/v4-mini/index.ts",
|
|
43
|
-
"./v4/mini": "./src/v4/mini/index.ts",
|
|
44
|
-
"./v4/core": "./src/v4/core/index.ts",
|
|
45
|
-
"./v4/locales": "./src/v4/locales/index.ts",
|
|
46
|
-
"./v4/locales/*": "./src/v4/locales/*"
|
|
47
|
-
},
|
|
48
|
-
"conditions": {
|
|
49
|
-
"@zod/source": "src"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"exports": {
|
|
53
|
-
"./package.json": "./package.json",
|
|
54
|
-
".": {
|
|
55
|
-
"@zod/source": "./src/index.ts",
|
|
56
|
-
"types": "./index.d.cts",
|
|
57
|
-
"import": "./index.js",
|
|
58
|
-
"require": "./index.cjs"
|
|
59
|
-
},
|
|
60
|
-
"./mini": {
|
|
61
|
-
"@zod/source": "./src/mini/index.ts",
|
|
62
|
-
"types": "./mini/index.d.cts",
|
|
63
|
-
"import": "./mini/index.js",
|
|
64
|
-
"require": "./mini/index.cjs"
|
|
65
|
-
},
|
|
66
|
-
"./locales": {
|
|
67
|
-
"@zod/source": "./src/locales/index.ts",
|
|
68
|
-
"types": "./locales/index.d.cts",
|
|
69
|
-
"import": "./locales/index.js",
|
|
70
|
-
"require": "./locales/index.cjs"
|
|
71
|
-
},
|
|
72
|
-
"./v3": {
|
|
73
|
-
"@zod/source": "./src/v3/index.ts",
|
|
74
|
-
"types": "./v3/index.d.cts",
|
|
75
|
-
"import": "./v3/index.js",
|
|
76
|
-
"require": "./v3/index.cjs"
|
|
77
|
-
},
|
|
78
|
-
"./v4": {
|
|
79
|
-
"@zod/source": "./src/v4/index.ts",
|
|
80
|
-
"types": "./v4/index.d.cts",
|
|
81
|
-
"import": "./v4/index.js",
|
|
82
|
-
"require": "./v4/index.cjs"
|
|
83
|
-
},
|
|
84
|
-
"./v4-mini": {
|
|
85
|
-
"@zod/source": "./src/v4-mini/index.ts",
|
|
86
|
-
"types": "./v4-mini/index.d.cts",
|
|
87
|
-
"import": "./v4-mini/index.js",
|
|
88
|
-
"require": "./v4-mini/index.cjs"
|
|
89
|
-
},
|
|
90
|
-
"./v4/mini": {
|
|
91
|
-
"@zod/source": "./src/v4/mini/index.ts",
|
|
92
|
-
"types": "./v4/mini/index.d.cts",
|
|
93
|
-
"import": "./v4/mini/index.js",
|
|
94
|
-
"require": "./v4/mini/index.cjs"
|
|
95
|
-
},
|
|
96
|
-
"./v4/core": {
|
|
97
|
-
"@zod/source": "./src/v4/core/index.ts",
|
|
98
|
-
"types": "./v4/core/index.d.cts",
|
|
99
|
-
"import": "./v4/core/index.js",
|
|
100
|
-
"require": "./v4/core/index.cjs"
|
|
101
|
-
},
|
|
102
|
-
"./v4/locales": {
|
|
103
|
-
"@zod/source": "./src/v4/locales/index.ts",
|
|
104
|
-
"types": "./v4/locales/index.d.cts",
|
|
105
|
-
"import": "./v4/locales/index.js",
|
|
106
|
-
"require": "./v4/locales/index.cjs"
|
|
107
|
-
},
|
|
108
|
-
"./v4/locales/*": {
|
|
109
|
-
"@zod/source": "./src/v4/locales/*",
|
|
110
|
-
"types": "./v4/locales/*",
|
|
111
|
-
"import": "./v4/locales/*",
|
|
112
|
-
"require": "./v4/locales/*"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
"repository": {
|
|
116
|
-
"type": "git",
|
|
117
|
-
"url": "git+https://github.com/colinhacks/zod.git"
|
|
118
|
-
},
|
|
119
|
-
"bugs": {
|
|
120
|
-
"url": "https://github.com/colinhacks/zod/issues"
|
|
121
|
-
},
|
|
122
|
-
"support": {
|
|
123
|
-
"backing": {
|
|
124
|
-
"npm-funding": true
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"scripts": {
|
|
128
|
-
"clean": "git clean -xdf . -e node_modules",
|
|
129
|
-
"build": "zshy --project tsconfig.build.json",
|
|
130
|
-
"postbuild": "tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .",
|
|
131
|
-
"test:watch": "pnpm vitest",
|
|
132
|
-
"test": "pnpm vitest run",
|
|
133
|
-
"prepublishOnly": "tsx ../../scripts/check-versions.ts"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "zod",
|
|
3
|
+
"version": "4.4.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Colin McDonnell <zod@colinhacks.com>",
|
|
7
|
+
"description": "TypeScript-first schema declaration and validation library with static type inference",
|
|
8
|
+
"homepage": "https://zod.dev",
|
|
9
|
+
"llms": "https://zod.dev/llms.txt",
|
|
10
|
+
"llmsFull": "https://zod.dev/llms-full.txt",
|
|
11
|
+
"mcpServer": "https://mcp.inkeep.com/zod/mcp",
|
|
12
|
+
"funding": "https://github.com/sponsors/colinhacks",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"files": [
|
|
15
|
+
"src",
|
|
16
|
+
"**/*.js",
|
|
17
|
+
"**/*.mjs",
|
|
18
|
+
"**/*.cjs",
|
|
19
|
+
"**/*.d.ts",
|
|
20
|
+
"**/*.d.mts",
|
|
21
|
+
"**/*.d.cts",
|
|
22
|
+
"**/package.json"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"typescript",
|
|
26
|
+
"schema",
|
|
27
|
+
"validation",
|
|
28
|
+
"type",
|
|
29
|
+
"inference"
|
|
30
|
+
],
|
|
31
|
+
"main": "./index.cjs",
|
|
32
|
+
"types": "./index.d.cts",
|
|
33
|
+
"module": "./index.js",
|
|
34
|
+
"zshy": {
|
|
35
|
+
"exports": {
|
|
36
|
+
"./package.json": "./package.json",
|
|
37
|
+
".": "./src/index.ts",
|
|
38
|
+
"./mini": "./src/mini/index.ts",
|
|
39
|
+
"./locales": "./src/locales/index.ts",
|
|
40
|
+
"./v3": "./src/v3/index.ts",
|
|
41
|
+
"./v4": "./src/v4/index.ts",
|
|
42
|
+
"./v4-mini": "./src/v4-mini/index.ts",
|
|
43
|
+
"./v4/mini": "./src/v4/mini/index.ts",
|
|
44
|
+
"./v4/core": "./src/v4/core/index.ts",
|
|
45
|
+
"./v4/locales": "./src/v4/locales/index.ts",
|
|
46
|
+
"./v4/locales/*": "./src/v4/locales/*"
|
|
47
|
+
},
|
|
48
|
+
"conditions": {
|
|
49
|
+
"@zod/source": "src"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"exports": {
|
|
53
|
+
"./package.json": "./package.json",
|
|
54
|
+
".": {
|
|
55
|
+
"@zod/source": "./src/index.ts",
|
|
56
|
+
"types": "./index.d.cts",
|
|
57
|
+
"import": "./index.js",
|
|
58
|
+
"require": "./index.cjs"
|
|
59
|
+
},
|
|
60
|
+
"./mini": {
|
|
61
|
+
"@zod/source": "./src/mini/index.ts",
|
|
62
|
+
"types": "./mini/index.d.cts",
|
|
63
|
+
"import": "./mini/index.js",
|
|
64
|
+
"require": "./mini/index.cjs"
|
|
65
|
+
},
|
|
66
|
+
"./locales": {
|
|
67
|
+
"@zod/source": "./src/locales/index.ts",
|
|
68
|
+
"types": "./locales/index.d.cts",
|
|
69
|
+
"import": "./locales/index.js",
|
|
70
|
+
"require": "./locales/index.cjs"
|
|
71
|
+
},
|
|
72
|
+
"./v3": {
|
|
73
|
+
"@zod/source": "./src/v3/index.ts",
|
|
74
|
+
"types": "./v3/index.d.cts",
|
|
75
|
+
"import": "./v3/index.js",
|
|
76
|
+
"require": "./v3/index.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./v4": {
|
|
79
|
+
"@zod/source": "./src/v4/index.ts",
|
|
80
|
+
"types": "./v4/index.d.cts",
|
|
81
|
+
"import": "./v4/index.js",
|
|
82
|
+
"require": "./v4/index.cjs"
|
|
83
|
+
},
|
|
84
|
+
"./v4-mini": {
|
|
85
|
+
"@zod/source": "./src/v4-mini/index.ts",
|
|
86
|
+
"types": "./v4-mini/index.d.cts",
|
|
87
|
+
"import": "./v4-mini/index.js",
|
|
88
|
+
"require": "./v4-mini/index.cjs"
|
|
89
|
+
},
|
|
90
|
+
"./v4/mini": {
|
|
91
|
+
"@zod/source": "./src/v4/mini/index.ts",
|
|
92
|
+
"types": "./v4/mini/index.d.cts",
|
|
93
|
+
"import": "./v4/mini/index.js",
|
|
94
|
+
"require": "./v4/mini/index.cjs"
|
|
95
|
+
},
|
|
96
|
+
"./v4/core": {
|
|
97
|
+
"@zod/source": "./src/v4/core/index.ts",
|
|
98
|
+
"types": "./v4/core/index.d.cts",
|
|
99
|
+
"import": "./v4/core/index.js",
|
|
100
|
+
"require": "./v4/core/index.cjs"
|
|
101
|
+
},
|
|
102
|
+
"./v4/locales": {
|
|
103
|
+
"@zod/source": "./src/v4/locales/index.ts",
|
|
104
|
+
"types": "./v4/locales/index.d.cts",
|
|
105
|
+
"import": "./v4/locales/index.js",
|
|
106
|
+
"require": "./v4/locales/index.cjs"
|
|
107
|
+
},
|
|
108
|
+
"./v4/locales/*": {
|
|
109
|
+
"@zod/source": "./src/v4/locales/*",
|
|
110
|
+
"types": "./v4/locales/*",
|
|
111
|
+
"import": "./v4/locales/*",
|
|
112
|
+
"require": "./v4/locales/*"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"repository": {
|
|
116
|
+
"type": "git",
|
|
117
|
+
"url": "git+https://github.com/colinhacks/zod.git"
|
|
118
|
+
},
|
|
119
|
+
"bugs": {
|
|
120
|
+
"url": "https://github.com/colinhacks/zod/issues"
|
|
121
|
+
},
|
|
122
|
+
"support": {
|
|
123
|
+
"backing": {
|
|
124
|
+
"npm-funding": true
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"scripts": {
|
|
128
|
+
"clean": "git clean -xdf . -e node_modules",
|
|
129
|
+
"build": "zshy --project tsconfig.build.json",
|
|
130
|
+
"postbuild": "tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .",
|
|
131
|
+
"test:watch": "pnpm vitest",
|
|
132
|
+
"test": "pnpm vitest run",
|
|
133
|
+
"prepublishOnly": "tsx ../../scripts/check-versions.ts"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, } from "../core/index.js";
|
|
1
|
+
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, } from "../core/index.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as core from "../core/index.js";
|
|
2
|
-
import * as schemas from "./schemas.js";
|
|
3
|
-
export function string(params) {
|
|
4
|
-
return core._coercedString(schemas.ZodString, params);
|
|
5
|
-
}
|
|
6
|
-
export function number(params) {
|
|
7
|
-
return core._coercedNumber(schemas.ZodNumber, params);
|
|
8
|
-
}
|
|
9
|
-
export function boolean(params) {
|
|
10
|
-
return core._coercedBoolean(schemas.ZodBoolean, params);
|
|
11
|
-
}
|
|
12
|
-
export function bigint(params) {
|
|
13
|
-
return core._coercedBigint(schemas.ZodBigInt, params);
|
|
14
|
-
}
|
|
15
|
-
export function date(params) {
|
|
16
|
-
return core._coercedDate(schemas.ZodDate, params);
|
|
17
|
-
}
|
|
1
|
+
import * as core from "../core/index.js";
|
|
2
|
+
import * as schemas from "./schemas.js";
|
|
3
|
+
export function string(params) {
|
|
4
|
+
return core._coercedString(schemas.ZodString, params);
|
|
5
|
+
}
|
|
6
|
+
export function number(params) {
|
|
7
|
+
return core._coercedNumber(schemas.ZodNumber, params);
|
|
8
|
+
}
|
|
9
|
+
export function boolean(params) {
|
|
10
|
+
return core._coercedBoolean(schemas.ZodBoolean, params);
|
|
11
|
+
}
|
|
12
|
+
export function bigint(params) {
|
|
13
|
+
return core._coercedBigint(schemas.ZodBigInt, params);
|
|
14
|
+
}
|
|
15
|
+
export function date(params) {
|
|
16
|
+
return core._coercedDate(schemas.ZodDate, params);
|
|
17
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
// Zod 3 compat layer
|
|
2
|
-
import * as core from "../core/index.js";
|
|
3
|
-
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
4
|
-
export const ZodIssueCode = {
|
|
5
|
-
invalid_type: "invalid_type",
|
|
6
|
-
too_big: "too_big",
|
|
7
|
-
too_small: "too_small",
|
|
8
|
-
invalid_format: "invalid_format",
|
|
9
|
-
not_multiple_of: "not_multiple_of",
|
|
10
|
-
unrecognized_keys: "unrecognized_keys",
|
|
11
|
-
invalid_union: "invalid_union",
|
|
12
|
-
invalid_key: "invalid_key",
|
|
13
|
-
invalid_element: "invalid_element",
|
|
14
|
-
invalid_value: "invalid_value",
|
|
15
|
-
custom: "custom",
|
|
16
|
-
};
|
|
17
|
-
export { $brand, config } from "../core/index.js";
|
|
18
|
-
/** @deprecated Use `z.config(params)` instead. */
|
|
19
|
-
export function setErrorMap(map) {
|
|
20
|
-
core.config({
|
|
21
|
-
customError: map,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
/** @deprecated Use `z.config()` instead. */
|
|
25
|
-
export function getErrorMap() {
|
|
26
|
-
return core.config().customError;
|
|
27
|
-
}
|
|
28
|
-
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
29
|
-
export var ZodFirstPartyTypeKind;
|
|
30
|
-
(function (ZodFirstPartyTypeKind) {
|
|
31
|
-
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
1
|
+
// Zod 3 compat layer
|
|
2
|
+
import * as core from "../core/index.js";
|
|
3
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
4
|
+
export const ZodIssueCode = {
|
|
5
|
+
invalid_type: "invalid_type",
|
|
6
|
+
too_big: "too_big",
|
|
7
|
+
too_small: "too_small",
|
|
8
|
+
invalid_format: "invalid_format",
|
|
9
|
+
not_multiple_of: "not_multiple_of",
|
|
10
|
+
unrecognized_keys: "unrecognized_keys",
|
|
11
|
+
invalid_union: "invalid_union",
|
|
12
|
+
invalid_key: "invalid_key",
|
|
13
|
+
invalid_element: "invalid_element",
|
|
14
|
+
invalid_value: "invalid_value",
|
|
15
|
+
custom: "custom",
|
|
16
|
+
};
|
|
17
|
+
export { $brand, config } from "../core/index.js";
|
|
18
|
+
/** @deprecated Use `z.config(params)` instead. */
|
|
19
|
+
export function setErrorMap(map) {
|
|
20
|
+
core.config({
|
|
21
|
+
customError: map,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** @deprecated Use `z.config()` instead. */
|
|
25
|
+
export function getErrorMap() {
|
|
26
|
+
return core.config().customError;
|
|
27
|
+
}
|
|
28
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
29
|
+
export var ZodFirstPartyTypeKind;
|
|
30
|
+
(function (ZodFirstPartyTypeKind) {
|
|
31
|
+
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import * as core from "../core/index.js";
|
|
2
|
-
import { $ZodError } from "../core/index.js";
|
|
3
|
-
import * as util from "../core/util.js";
|
|
4
|
-
const initializer = (inst, issues) => {
|
|
5
|
-
$ZodError.init(inst, issues);
|
|
6
|
-
inst.name = "ZodError";
|
|
7
|
-
Object.defineProperties(inst, {
|
|
8
|
-
format: {
|
|
9
|
-
value: (mapper) => core.formatError(inst, mapper),
|
|
10
|
-
// enumerable: false,
|
|
11
|
-
},
|
|
12
|
-
flatten: {
|
|
13
|
-
value: (mapper) => core.flattenError(inst, mapper),
|
|
14
|
-
// enumerable: false,
|
|
15
|
-
},
|
|
16
|
-
addIssue: {
|
|
17
|
-
value: (issue) => {
|
|
18
|
-
inst.issues.push(issue);
|
|
19
|
-
inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);
|
|
20
|
-
},
|
|
21
|
-
// enumerable: false,
|
|
22
|
-
},
|
|
23
|
-
addIssues: {
|
|
24
|
-
value: (issues) => {
|
|
25
|
-
inst.issues.push(...issues);
|
|
26
|
-
inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);
|
|
27
|
-
},
|
|
28
|
-
// enumerable: false,
|
|
29
|
-
},
|
|
30
|
-
isEmpty: {
|
|
31
|
-
get() {
|
|
32
|
-
return inst.issues.length === 0;
|
|
33
|
-
},
|
|
34
|
-
// enumerable: false,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
// Object.defineProperty(inst, "isEmpty", {
|
|
38
|
-
// get() {
|
|
39
|
-
// return inst.issues.length === 0;
|
|
40
|
-
// },
|
|
41
|
-
// });
|
|
42
|
-
};
|
|
43
|
-
export const ZodError = /*@__PURE__*/ core.$constructor("ZodError", initializer);
|
|
44
|
-
export const ZodRealError = /*@__PURE__*/ core.$constructor("ZodError", initializer, {
|
|
45
|
-
Parent: Error,
|
|
46
|
-
});
|
|
47
|
-
// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */
|
|
48
|
-
// export type ErrorMapCtx = core.$ZodErrorMapCtx;
|
|
1
|
+
import * as core from "../core/index.js";
|
|
2
|
+
import { $ZodError } from "../core/index.js";
|
|
3
|
+
import * as util from "../core/util.js";
|
|
4
|
+
const initializer = (inst, issues) => {
|
|
5
|
+
$ZodError.init(inst, issues);
|
|
6
|
+
inst.name = "ZodError";
|
|
7
|
+
Object.defineProperties(inst, {
|
|
8
|
+
format: {
|
|
9
|
+
value: (mapper) => core.formatError(inst, mapper),
|
|
10
|
+
// enumerable: false,
|
|
11
|
+
},
|
|
12
|
+
flatten: {
|
|
13
|
+
value: (mapper) => core.flattenError(inst, mapper),
|
|
14
|
+
// enumerable: false,
|
|
15
|
+
},
|
|
16
|
+
addIssue: {
|
|
17
|
+
value: (issue) => {
|
|
18
|
+
inst.issues.push(issue);
|
|
19
|
+
inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);
|
|
20
|
+
},
|
|
21
|
+
// enumerable: false,
|
|
22
|
+
},
|
|
23
|
+
addIssues: {
|
|
24
|
+
value: (issues) => {
|
|
25
|
+
inst.issues.push(...issues);
|
|
26
|
+
inst.message = JSON.stringify(inst.issues, util.jsonStringifyReplacer, 2);
|
|
27
|
+
},
|
|
28
|
+
// enumerable: false,
|
|
29
|
+
},
|
|
30
|
+
isEmpty: {
|
|
31
|
+
get() {
|
|
32
|
+
return inst.issues.length === 0;
|
|
33
|
+
},
|
|
34
|
+
// enumerable: false,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
// Object.defineProperty(inst, "isEmpty", {
|
|
38
|
+
// get() {
|
|
39
|
+
// return inst.issues.length === 0;
|
|
40
|
+
// },
|
|
41
|
+
// });
|
|
42
|
+
};
|
|
43
|
+
export const ZodError = /*@__PURE__*/ core.$constructor("ZodError", initializer);
|
|
44
|
+
export const ZodRealError = /*@__PURE__*/ core.$constructor("ZodError", initializer, {
|
|
45
|
+
Parent: Error,
|
|
46
|
+
});
|
|
47
|
+
// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */
|
|
48
|
+
// export type ErrorMapCtx = core.$ZodErrorMapCtx;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export * as core from "../core/index.js";
|
|
2
|
-
export * from "./schemas.js";
|
|
3
|
-
export * from "./checks.js";
|
|
4
|
-
export * from "./errors.js";
|
|
5
|
-
export * from "./parse.js";
|
|
6
|
-
export * from "./compat.js";
|
|
7
|
-
// zod-specified
|
|
8
|
-
import { config } from "../core/index.js";
|
|
9
|
-
import en from "../locales/en.js";
|
|
10
|
-
config(en());
|
|
11
|
-
export { globalRegistry, registry, config, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, } from "../core/index.js";
|
|
12
|
-
export { toJSONSchema } from "../core/json-schema-processors.js";
|
|
13
|
-
export { fromJSONSchema } from "./from-json-schema.js";
|
|
14
|
-
export * as locales from "../locales/index.js";
|
|
15
|
-
// iso
|
|
16
|
-
// must be exported from top-level
|
|
17
|
-
// https://github.com/colinhacks/zod/issues/4491
|
|
18
|
-
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
|
|
19
|
-
export * as iso from "./iso.js";
|
|
20
|
-
export * as coerce from "./coerce.js";
|
|
1
|
+
export * as core from "../core/index.js";
|
|
2
|
+
export * from "./schemas.js";
|
|
3
|
+
export * from "./checks.js";
|
|
4
|
+
export * from "./errors.js";
|
|
5
|
+
export * from "./parse.js";
|
|
6
|
+
export * from "./compat.js";
|
|
7
|
+
// zod-specified
|
|
8
|
+
import { config } from "../core/index.js";
|
|
9
|
+
import en from "../locales/en.js";
|
|
10
|
+
config(en());
|
|
11
|
+
export { globalRegistry, registry, config, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, } from "../core/index.js";
|
|
12
|
+
export { toJSONSchema } from "../core/json-schema-processors.js";
|
|
13
|
+
export { fromJSONSchema } from "./from-json-schema.js";
|
|
14
|
+
export * as locales from "../locales/index.js";
|
|
15
|
+
// iso
|
|
16
|
+
// must be exported from top-level
|
|
17
|
+
// https://github.com/colinhacks/zod/issues/4491
|
|
18
|
+
export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
|
|
19
|
+
export * as iso from "./iso.js";
|
|
20
|
+
export * as coerce from "./coerce.js";
|