zod 3.26.0-canary.20250618T044324 → 3.26.0-canary.20250702T074442

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.
Files changed (402) hide show
  1. package/README.md +2 -2
  2. package/{dist/cjs/v3/index.js → index.cjs} +2 -2
  3. package/index.d.cts +4 -0
  4. package/index.d.ts +4 -0
  5. package/index.js +4 -0
  6. package/package.json +63 -80
  7. package/{dist/cjs/v3/ZodError.js → v3/ZodError.cjs} +4 -3
  8. package/v3/ZodError.d.cts +164 -0
  9. package/{dist/esm/v3 → v3}/ZodError.js +3 -2
  10. package/{dist/cjs/v3/errors.js → v3/errors.cjs} +1 -1
  11. package/v3/errors.d.cts +5 -0
  12. package/{dist/cjs/v3/external.js → v3/external.cjs} +6 -6
  13. package/v3/external.d.cts +6 -0
  14. package/v3/helpers/enumUtil.d.ts +8 -0
  15. package/v3/helpers/errorUtil.d.ts +9 -0
  16. package/{dist/cjs/v3/helpers/parseUtil.js → v3/helpers/parseUtil.cjs} +2 -2
  17. package/v3/helpers/parseUtil.d.cts +78 -0
  18. package/v3/helpers/partialUtil.d.cts +8 -0
  19. package/v3/helpers/typeAliases.d.ts +2 -0
  20. package/v3/helpers/util.d.ts +85 -0
  21. package/{dist/cjs/v4/classic/index.js → v3/index.cjs} +2 -2
  22. package/v3/index.d.cts +4 -0
  23. package/v3/index.d.ts +3 -2
  24. package/v3/index.js +4 -1
  25. package/{dist/cjs/v3/locales/en.js → v3/locales/en.cjs} +2 -2
  26. package/v3/locales/en.d.cts +3 -0
  27. package/v3/standard-schema.d.ts +102 -0
  28. package/{dist/cjs/v3/types.js → v3/types.cjs} +7 -5
  29. package/v3/types.d.cts +1031 -0
  30. package/{dist/esm/v3 → v3}/types.js +2 -0
  31. package/{dist/cjs/v4/classic/checks.js → v4/classic/checks.cjs} +29 -29
  32. package/v4/classic/checks.d.cts +1 -0
  33. package/{dist/types/v4 → v4}/classic/checks.d.ts +1 -1
  34. package/{dist/esm/v4 → v4}/classic/checks.js +1 -1
  35. package/{dist/cjs/v4/classic/coerce.js → v4/classic/coerce.cjs} +2 -2
  36. package/v4/classic/coerce.d.cts +17 -0
  37. package/{dist/types/v4 → v4}/classic/coerce.d.ts +1 -1
  38. package/{dist/esm/v4 → v4}/classic/coerce.js +1 -1
  39. package/{dist/cjs/v4/classic/compat.js → v4/classic/compat.cjs} +4 -4
  40. package/v4/classic/compat.d.cts +48 -0
  41. package/{dist/types/v4 → v4}/classic/compat.d.ts +3 -3
  42. package/{dist/esm/v4 → v4}/classic/compat.js +2 -2
  43. package/{dist/cjs/v4/classic/errors.js → v4/classic/errors.cjs} +3 -3
  44. package/v4/classic/errors.d.cts +30 -0
  45. package/{dist/types/v4 → v4}/classic/errors.d.ts +3 -3
  46. package/{dist/esm/v4 → v4}/classic/errors.js +2 -2
  47. package/{dist/cjs/v4/classic/external.js → v4/classic/external.cjs} +29 -29
  48. package/v4/classic/external.d.cts +13 -0
  49. package/{dist/types/v4 → v4}/classic/external.d.ts +3 -3
  50. package/{dist/esm/v4 → v4}/classic/external.js +4 -4
  51. package/v4/classic/index.cjs +33 -0
  52. package/v4/classic/index.d.cts +4 -0
  53. package/{dist/cjs/v4/classic/iso.js → v4/classic/iso.cjs} +2 -2
  54. package/v4/classic/iso.d.cts +22 -0
  55. package/{dist/types/v4 → v4}/classic/iso.d.ts +1 -1
  56. package/{dist/esm/v4 → v4}/classic/iso.js +1 -1
  57. package/{dist/cjs/v4/classic/parse.js → v4/classic/parse.cjs} +2 -2
  58. package/v4/classic/parse.d.cts +23 -0
  59. package/{dist/types/v4 → v4}/classic/parse.d.ts +1 -1
  60. package/{dist/esm/v4 → v4}/classic/parse.js +1 -1
  61. package/{dist/cjs/v4/classic/schemas.js → v4/classic/schemas.cjs} +38 -38
  62. package/v4/classic/schemas.d.cts +629 -0
  63. package/{dist/types/v4 → v4}/classic/schemas.d.ts +2 -2
  64. package/{dist/esm/v4 → v4}/classic/schemas.js +2 -2
  65. package/{dist/cjs/v4/core/api.js → v4/core/api.cjs} +3 -3
  66. package/v4/core/api.d.cts +284 -0
  67. package/{dist/cjs/v4/core/checks.js → v4/core/checks.cjs} +3 -3
  68. package/v4/core/checks.d.cts +277 -0
  69. package/v4/core/core.d.cts +47 -0
  70. package/v4/core/doc.d.ts +14 -0
  71. package/{dist/cjs/v4/core/errors.js → v4/core/errors.cjs} +2 -2
  72. package/v4/core/errors.d.cts +204 -0
  73. package/{dist/cjs/v4/core/function.js → v4/core/function.cjs} +4 -4
  74. package/v4/core/function.d.cts +52 -0
  75. package/{dist/cjs/v4/core/index.js → v4/core/index.cjs} +15 -15
  76. package/v4/core/index.d.cts +15 -0
  77. package/v4/core/index.d.ts +15 -1
  78. package/v4/core/index.js +15 -1
  79. package/v4/core/json-schema.d.ts +87 -0
  80. package/{dist/cjs/v4/core/parse.js → v4/core/parse.cjs} +3 -3
  81. package/v4/core/parse.d.cts +25 -0
  82. package/v4/core/regexes.d.ts +62 -0
  83. package/v4/core/registries.d.cts +34 -0
  84. package/{dist/types/v4 → v4}/core/registries.d.ts +0 -5
  85. package/{dist/cjs/v4/core/schemas.js → v4/core/schemas.cjs} +10 -10
  86. package/v4/core/schemas.d.cts +1015 -0
  87. package/{dist/esm/v4 → v4}/core/schemas.js +2 -2
  88. package/v4/core/standard-schema.d.ts +55 -0
  89. package/{dist/cjs/v4/core/to-json-schema.js → v4/core/to-json-schema.cjs} +2 -2
  90. package/v4/core/to-json-schema.d.cts +84 -0
  91. package/{dist/cjs/v4/core/util.js → v4/core/util.cjs} +1 -4
  92. package/v4/core/util.d.cts +183 -0
  93. package/{dist/esm/v4 → v4}/core/util.js +1 -4
  94. package/v4/core/versions.d.ts +5 -0
  95. package/{dist/cjs/index.js → v4/index.cjs} +2 -2
  96. package/v4/index.d.cts +3 -0
  97. package/v4/index.d.ts +3 -3
  98. package/v4/index.js +3 -1
  99. package/{dist/cjs/v4/locales/ar.js → v4/locales/ar.cjs} +1 -1
  100. package/v4/locales/ar.d.cts +4 -0
  101. package/{dist/cjs/v4/locales/az.js → v4/locales/az.cjs} +1 -1
  102. package/v4/locales/az.d.cts +4 -0
  103. package/{dist/cjs/v4/locales/be.js → v4/locales/be.cjs} +1 -1
  104. package/v4/locales/be.d.cts +4 -0
  105. package/{dist/cjs/v4/locales/ca.js → v4/locales/ca.cjs} +1 -1
  106. package/v4/locales/ca.d.cts +4 -0
  107. package/{dist/cjs/v4/locales/cs.js → v4/locales/cs.cjs} +1 -1
  108. package/v4/locales/cs.d.cts +4 -0
  109. package/{dist/cjs/v4/locales/de.js → v4/locales/de.cjs} +1 -1
  110. package/v4/locales/de.d.cts +4 -0
  111. package/{dist/cjs/v4/locales/en.js → v4/locales/en.cjs} +1 -1
  112. package/{dist/types/v4/locales/en.d.ts → v4/locales/en.d.cts} +1 -1
  113. package/v4/locales/en.d.ts +5 -2
  114. package/v4/locales/en.js +117 -2
  115. package/{dist/cjs/v4/locales/es.js → v4/locales/es.cjs} +1 -1
  116. package/v4/locales/es.d.cts +4 -0
  117. package/{dist/cjs/v4/locales/fa.js → v4/locales/fa.cjs} +1 -1
  118. package/v4/locales/fa.d.cts +4 -0
  119. package/{dist/cjs/v4/locales/fi.js → v4/locales/fi.cjs} +1 -1
  120. package/v4/locales/fi.d.cts +4 -0
  121. package/{dist/cjs/v4/locales/fr-CA.js → v4/locales/fr-CA.cjs} +1 -1
  122. package/v4/locales/fr-CA.d.cts +4 -0
  123. package/{dist/cjs/v4/locales/fr.js → v4/locales/fr.cjs} +1 -1
  124. package/v4/locales/fr.d.cts +4 -0
  125. package/{dist/cjs/v4/locales/he.js → v4/locales/he.cjs} +1 -1
  126. package/v4/locales/he.d.cts +4 -0
  127. package/{dist/cjs/v4/locales/hu.js → v4/locales/hu.cjs} +1 -1
  128. package/v4/locales/hu.d.cts +4 -0
  129. package/{dist/cjs/v4/locales/id.js → v4/locales/id.cjs} +1 -1
  130. package/v4/locales/id.d.cts +4 -0
  131. package/{dist/cjs/v4/locales/index.js → v4/locales/index.cjs} +38 -38
  132. package/v4/locales/index.d.cts +38 -0
  133. package/v4/locales/index.d.ts +38 -1
  134. package/v4/locales/index.js +38 -1
  135. package/{dist/cjs/v4/locales/it.js → v4/locales/it.cjs} +1 -1
  136. package/v4/locales/it.d.cts +4 -0
  137. package/{dist/cjs/v4/locales/ja.js → v4/locales/ja.cjs} +1 -1
  138. package/v4/locales/ja.d.cts +4 -0
  139. package/{dist/cjs/v4/locales/kh.js → v4/locales/kh.cjs} +1 -1
  140. package/v4/locales/kh.d.cts +4 -0
  141. package/{dist/cjs/v4/locales/ko.js → v4/locales/ko.cjs} +1 -1
  142. package/v4/locales/ko.d.cts +4 -0
  143. package/{dist/cjs/v4/locales/mk.js → v4/locales/mk.cjs} +1 -1
  144. package/v4/locales/mk.d.cts +4 -0
  145. package/{dist/cjs/v4/locales/ms.js → v4/locales/ms.cjs} +1 -1
  146. package/v4/locales/ms.d.cts +4 -0
  147. package/{dist/cjs/v4/locales/nl.js → v4/locales/nl.cjs} +1 -1
  148. package/v4/locales/nl.d.cts +4 -0
  149. package/{dist/cjs/v4/locales/no.js → v4/locales/no.cjs} +1 -1
  150. package/v4/locales/no.d.cts +4 -0
  151. package/{dist/cjs/v4/locales/ota.js → v4/locales/ota.cjs} +1 -1
  152. package/v4/locales/ota.d.cts +4 -0
  153. package/{dist/cjs/v4/locales/pl.js → v4/locales/pl.cjs} +1 -1
  154. package/v4/locales/pl.d.cts +4 -0
  155. package/{dist/cjs/v4/locales/ps.js → v4/locales/ps.cjs} +1 -1
  156. package/v4/locales/ps.d.cts +4 -0
  157. package/{dist/cjs/v4/locales/pt.js → v4/locales/pt.cjs} +1 -1
  158. package/v4/locales/pt.d.cts +4 -0
  159. package/{dist/cjs/v4/locales/ru.js → v4/locales/ru.cjs} +1 -1
  160. package/v4/locales/ru.d.cts +4 -0
  161. package/{dist/cjs/v4/locales/sl.js → v4/locales/sl.cjs} +1 -1
  162. package/v4/locales/sl.d.cts +4 -0
  163. package/{dist/cjs/v4/locales/sv.js → v4/locales/sv.cjs} +1 -1
  164. package/v4/locales/sv.d.cts +4 -0
  165. package/{dist/cjs/v4/locales/ta.js → v4/locales/ta.cjs} +1 -1
  166. package/v4/locales/ta.d.cts +4 -0
  167. package/{dist/cjs/v4/locales/th.js → v4/locales/th.cjs} +1 -1
  168. package/v4/locales/th.d.cts +4 -0
  169. package/{dist/cjs/v4/locales/tr.js → v4/locales/tr.cjs} +1 -1
  170. package/v4/locales/tr.d.cts +5 -0
  171. package/{dist/cjs/v4/locales/ua.js → v4/locales/ua.cjs} +1 -1
  172. package/v4/locales/ua.d.cts +4 -0
  173. package/{dist/cjs/v4/locales/ur.js → v4/locales/ur.cjs} +1 -1
  174. package/v4/locales/ur.d.cts +4 -0
  175. package/{dist/cjs/v4/locales/vi.js → v4/locales/vi.cjs} +1 -1
  176. package/v4/locales/vi.d.cts +4 -0
  177. package/{dist/cjs/v4/locales/zh-CN.js → v4/locales/zh-CN.cjs} +1 -1
  178. package/v4/locales/zh-CN.d.cts +4 -0
  179. package/{dist/cjs/v4/locales/zh-TW.js → v4/locales/zh-TW.cjs} +1 -1
  180. package/v4/locales/zh-TW.d.cts +4 -0
  181. package/{dist/cjs/v4/mini/checks.js → v4/mini/checks.cjs} +31 -31
  182. package/v4/mini/checks.d.cts +1 -0
  183. package/{dist/types/v4 → v4}/mini/checks.d.ts +1 -1
  184. package/{dist/esm/v4 → v4}/mini/checks.js +1 -1
  185. package/{dist/cjs/v4/mini/coerce.js → v4/mini/coerce.cjs} +2 -2
  186. package/v4/mini/coerce.d.cts +7 -0
  187. package/{dist/types/v4 → v4}/mini/coerce.d.ts +1 -1
  188. package/{dist/esm/v4 → v4}/mini/coerce.js +1 -1
  189. package/{dist/cjs/v4/mini/external.js → v4/mini/external.cjs} +24 -24
  190. package/v4/mini/external.d.cts +11 -0
  191. package/{dist/types/v4 → v4}/mini/external.d.ts +3 -3
  192. package/{dist/esm/v4 → v4}/mini/external.js +2 -2
  193. package/{dist/cjs/v4/mini/index.js → v4/mini/index.cjs} +2 -2
  194. package/v4/mini/index.d.cts +3 -0
  195. package/{dist/cjs/v4/mini/iso.js → v4/mini/iso.cjs} +2 -2
  196. package/v4/mini/iso.d.cts +22 -0
  197. package/{dist/types/v4 → v4}/mini/iso.d.ts +1 -1
  198. package/{dist/esm/v4 → v4}/mini/iso.js +1 -1
  199. package/{dist/cjs/v4/mini/parse.js → v4/mini/parse.cjs} +5 -5
  200. package/v4/mini/parse.d.cts +1 -0
  201. package/v4/mini/parse.d.ts +1 -0
  202. package/v4/mini/parse.js +1 -0
  203. package/{dist/cjs/v4/mini/schemas.js → v4/mini/schemas.cjs} +30 -30
  204. package/v4/mini/schemas.d.cts +356 -0
  205. package/{dist/types/v4 → v4}/mini/schemas.d.ts +2 -2
  206. package/{dist/esm/v4 → v4}/mini/schemas.js +2 -2
  207. package/{dist/cjs/v4/index.js → v4-mini/index.cjs} +1 -6
  208. package/v4-mini/index.d.cts +1 -0
  209. package/v4-mini/index.d.ts +1 -1
  210. package/v4-mini/index.js +1 -1
  211. package/dist/cjs/package.json +0 -3
  212. package/dist/cjs/v3/benchmarks/datetime.js +0 -54
  213. package/dist/cjs/v3/benchmarks/discriminatedUnion.js +0 -79
  214. package/dist/cjs/v3/benchmarks/index.js +0 -59
  215. package/dist/cjs/v3/benchmarks/ipv4.js +0 -54
  216. package/dist/cjs/v3/benchmarks/object.js +0 -70
  217. package/dist/cjs/v3/benchmarks/primitives.js +0 -159
  218. package/dist/cjs/v3/benchmarks/realworld.js +0 -56
  219. package/dist/cjs/v3/benchmarks/string.js +0 -55
  220. package/dist/cjs/v3/benchmarks/union.js +0 -79
  221. package/dist/cjs/v3/tests/Mocker.js +0 -57
  222. package/dist/cjs/v4/core/config.js +0 -10
  223. package/dist/cjs/v4/core/zsf.js +0 -172
  224. package/dist/esm/index.js +0 -3
  225. package/dist/esm/package.json +0 -3
  226. package/dist/esm/v3/benchmarks/datetime.js +0 -49
  227. package/dist/esm/v3/benchmarks/discriminatedUnion.js +0 -74
  228. package/dist/esm/v3/benchmarks/index.js +0 -54
  229. package/dist/esm/v3/benchmarks/ipv4.js +0 -49
  230. package/dist/esm/v3/benchmarks/object.js +0 -65
  231. package/dist/esm/v3/benchmarks/primitives.js +0 -154
  232. package/dist/esm/v3/benchmarks/realworld.js +0 -51
  233. package/dist/esm/v3/benchmarks/string.js +0 -50
  234. package/dist/esm/v3/benchmarks/union.js +0 -74
  235. package/dist/esm/v3/index.js +0 -4
  236. package/dist/esm/v3/tests/Mocker.js +0 -53
  237. package/dist/esm/v4/core/config.js +0 -6
  238. package/dist/esm/v4/core/index.js +0 -15
  239. package/dist/esm/v4/core/zsf.js +0 -171
  240. package/dist/esm/v4/index.js +0 -3
  241. package/dist/esm/v4/locales/en.js +0 -117
  242. package/dist/esm/v4/locales/index.js +0 -38
  243. package/dist/esm/v4/mini/parse.js +0 -1
  244. package/dist/types/index.d.ts +0 -3
  245. package/dist/types/package.json +0 -3
  246. package/dist/types/v3/benchmarks/datetime.d.ts +0 -5
  247. package/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
  248. package/dist/types/v3/benchmarks/index.d.ts +0 -1
  249. package/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
  250. package/dist/types/v3/benchmarks/object.d.ts +0 -5
  251. package/dist/types/v3/benchmarks/primitives.d.ts +0 -5
  252. package/dist/types/v3/benchmarks/realworld.d.ts +0 -5
  253. package/dist/types/v3/benchmarks/string.d.ts +0 -5
  254. package/dist/types/v3/benchmarks/union.d.ts +0 -5
  255. package/dist/types/v3/index.d.ts +0 -4
  256. package/dist/types/v3/tests/Mocker.d.ts +0 -17
  257. package/dist/types/v4/core/config.d.ts +0 -9
  258. package/dist/types/v4/core/index.d.ts +0 -15
  259. package/dist/types/v4/core/zsf.d.ts +0 -91
  260. package/dist/types/v4/index.d.ts +0 -3
  261. package/dist/types/v4/locales/index.d.ts +0 -38
  262. package/dist/types/v4/mini/parse.d.ts +0 -1
  263. /package/{dist/types/v3 → v3}/ZodError.d.ts +0 -0
  264. /package/{dist/types/v3 → v3}/errors.d.ts +0 -0
  265. /package/{dist/esm/v3 → v3}/errors.js +0 -0
  266. /package/{dist/types/v3 → v3}/external.d.ts +0 -0
  267. /package/{dist/esm/v3 → v3}/external.js +0 -0
  268. /package/{dist/cjs/v3/helpers/enumUtil.js → v3/helpers/enumUtil.cjs} +0 -0
  269. /package/{dist/types/v3/helpers/enumUtil.d.ts → v3/helpers/enumUtil.d.cts} +0 -0
  270. /package/{dist/esm/v3 → v3}/helpers/enumUtil.js +0 -0
  271. /package/{dist/cjs/v3/helpers/errorUtil.js → v3/helpers/errorUtil.cjs} +0 -0
  272. /package/{dist/types/v3/helpers/errorUtil.d.ts → v3/helpers/errorUtil.d.cts} +0 -0
  273. /package/{dist/esm/v3 → v3}/helpers/errorUtil.js +0 -0
  274. /package/{dist/types/v3 → v3}/helpers/parseUtil.d.ts +0 -0
  275. /package/{dist/esm/v3 → v3}/helpers/parseUtil.js +0 -0
  276. /package/{dist/cjs/v3/helpers/partialUtil.js → v3/helpers/partialUtil.cjs} +0 -0
  277. /package/{dist/types/v3 → v3}/helpers/partialUtil.d.ts +0 -0
  278. /package/{dist/esm/v3 → v3}/helpers/partialUtil.js +0 -0
  279. /package/{dist/cjs/v3/helpers/typeAliases.js → v3/helpers/typeAliases.cjs} +0 -0
  280. /package/{dist/types/v3/helpers/typeAliases.d.ts → v3/helpers/typeAliases.d.cts} +0 -0
  281. /package/{dist/esm/v3 → v3}/helpers/typeAliases.js +0 -0
  282. /package/{dist/cjs/v3/helpers/util.js → v3/helpers/util.cjs} +0 -0
  283. /package/{dist/types/v3/helpers/util.d.ts → v3/helpers/util.d.cts} +0 -0
  284. /package/{dist/esm/v3 → v3}/helpers/util.js +0 -0
  285. /package/{dist/types/v3 → v3}/locales/en.d.ts +0 -0
  286. /package/{dist/esm/v3 → v3}/locales/en.js +0 -0
  287. /package/{dist/cjs/v3/standard-schema.js → v3/standard-schema.cjs} +0 -0
  288. /package/{dist/types/v3/standard-schema.d.ts → v3/standard-schema.d.cts} +0 -0
  289. /package/{dist/esm/v3 → v3}/standard-schema.js +0 -0
  290. /package/{dist/types/v3 → v3}/types.d.ts +0 -0
  291. /package/{dist/types/v4 → v4}/classic/index.d.ts +0 -0
  292. /package/{dist/esm/v4 → v4}/classic/index.js +0 -0
  293. /package/{dist/types/v4 → v4}/core/api.d.ts +0 -0
  294. /package/{dist/esm/v4 → v4}/core/api.js +0 -0
  295. /package/{dist/types/v4 → v4}/core/checks.d.ts +0 -0
  296. /package/{dist/esm/v4 → v4}/core/checks.js +0 -0
  297. /package/{dist/cjs/v4/core/core.js → v4/core/core.cjs} +0 -0
  298. /package/{dist/types/v4 → v4}/core/core.d.ts +0 -0
  299. /package/{dist/esm/v4 → v4}/core/core.js +0 -0
  300. /package/{dist/cjs/v4/core/doc.js → v4/core/doc.cjs} +0 -0
  301. /package/{dist/types/v4/core/doc.d.ts → v4/core/doc.d.cts} +0 -0
  302. /package/{dist/esm/v4 → v4}/core/doc.js +0 -0
  303. /package/{dist/types/v4 → v4}/core/errors.d.ts +0 -0
  304. /package/{dist/esm/v4 → v4}/core/errors.js +0 -0
  305. /package/{dist/types/v4 → v4}/core/function.d.ts +0 -0
  306. /package/{dist/esm/v4 → v4}/core/function.js +0 -0
  307. /package/{dist/cjs/v4/core/json-schema.js → v4/core/json-schema.cjs} +0 -0
  308. /package/{dist/types/v4/core/json-schema.d.ts → v4/core/json-schema.d.cts} +0 -0
  309. /package/{dist/esm/v4 → v4}/core/json-schema.js +0 -0
  310. /package/{dist/types/v4 → v4}/core/parse.d.ts +0 -0
  311. /package/{dist/esm/v4 → v4}/core/parse.js +0 -0
  312. /package/{dist/cjs/v4/core/regexes.js → v4/core/regexes.cjs} +0 -0
  313. /package/{dist/types/v4/core/regexes.d.ts → v4/core/regexes.d.cts} +0 -0
  314. /package/{dist/esm/v4 → v4}/core/regexes.js +0 -0
  315. /package/{dist/cjs/v4/core/registries.js → v4/core/registries.cjs} +0 -0
  316. /package/{dist/esm/v4 → v4}/core/registries.js +0 -0
  317. /package/{dist/types/v4 → v4}/core/schemas.d.ts +0 -0
  318. /package/{dist/cjs/v4/core/standard-schema.js → v4/core/standard-schema.cjs} +0 -0
  319. /package/{dist/types/v4/core/standard-schema.d.ts → v4/core/standard-schema.d.cts} +0 -0
  320. /package/{dist/esm/v4 → v4}/core/standard-schema.js +0 -0
  321. /package/{dist/types/v4 → v4}/core/to-json-schema.d.ts +0 -0
  322. /package/{dist/esm/v4 → v4}/core/to-json-schema.js +0 -0
  323. /package/{dist/types/v4 → v4}/core/util.d.ts +0 -0
  324. /package/{dist/cjs/v4/core/versions.js → v4/core/versions.cjs} +0 -0
  325. /package/{dist/types/v4/core/versions.d.ts → v4/core/versions.d.cts} +0 -0
  326. /package/{dist/esm/v4 → v4}/core/versions.js +0 -0
  327. /package/{dist/types/v4 → v4}/locales/ar.d.ts +0 -0
  328. /package/{dist/esm/v4 → v4}/locales/ar.js +0 -0
  329. /package/{dist/types/v4 → v4}/locales/az.d.ts +0 -0
  330. /package/{dist/esm/v4 → v4}/locales/az.js +0 -0
  331. /package/{dist/types/v4 → v4}/locales/be.d.ts +0 -0
  332. /package/{dist/esm/v4 → v4}/locales/be.js +0 -0
  333. /package/{dist/types/v4 → v4}/locales/ca.d.ts +0 -0
  334. /package/{dist/esm/v4 → v4}/locales/ca.js +0 -0
  335. /package/{dist/types/v4 → v4}/locales/cs.d.ts +0 -0
  336. /package/{dist/esm/v4 → v4}/locales/cs.js +0 -0
  337. /package/{dist/types/v4 → v4}/locales/de.d.ts +0 -0
  338. /package/{dist/esm/v4 → v4}/locales/de.js +0 -0
  339. /package/{dist/types/v4 → v4}/locales/es.d.ts +0 -0
  340. /package/{dist/esm/v4 → v4}/locales/es.js +0 -0
  341. /package/{dist/types/v4 → v4}/locales/fa.d.ts +0 -0
  342. /package/{dist/esm/v4 → v4}/locales/fa.js +0 -0
  343. /package/{dist/types/v4 → v4}/locales/fi.d.ts +0 -0
  344. /package/{dist/esm/v4 → v4}/locales/fi.js +0 -0
  345. /package/{dist/types/v4 → v4}/locales/fr-CA.d.ts +0 -0
  346. /package/{dist/esm/v4 → v4}/locales/fr-CA.js +0 -0
  347. /package/{dist/types/v4 → v4}/locales/fr.d.ts +0 -0
  348. /package/{dist/esm/v4 → v4}/locales/fr.js +0 -0
  349. /package/{dist/types/v4 → v4}/locales/he.d.ts +0 -0
  350. /package/{dist/esm/v4 → v4}/locales/he.js +0 -0
  351. /package/{dist/types/v4 → v4}/locales/hu.d.ts +0 -0
  352. /package/{dist/esm/v4 → v4}/locales/hu.js +0 -0
  353. /package/{dist/types/v4 → v4}/locales/id.d.ts +0 -0
  354. /package/{dist/esm/v4 → v4}/locales/id.js +0 -0
  355. /package/{dist/types/v4 → v4}/locales/it.d.ts +0 -0
  356. /package/{dist/esm/v4 → v4}/locales/it.js +0 -0
  357. /package/{dist/types/v4 → v4}/locales/ja.d.ts +0 -0
  358. /package/{dist/esm/v4 → v4}/locales/ja.js +0 -0
  359. /package/{dist/types/v4 → v4}/locales/kh.d.ts +0 -0
  360. /package/{dist/esm/v4 → v4}/locales/kh.js +0 -0
  361. /package/{dist/types/v4 → v4}/locales/ko.d.ts +0 -0
  362. /package/{dist/esm/v4 → v4}/locales/ko.js +0 -0
  363. /package/{dist/types/v4 → v4}/locales/mk.d.ts +0 -0
  364. /package/{dist/esm/v4 → v4}/locales/mk.js +0 -0
  365. /package/{dist/types/v4 → v4}/locales/ms.d.ts +0 -0
  366. /package/{dist/esm/v4 → v4}/locales/ms.js +0 -0
  367. /package/{dist/types/v4 → v4}/locales/nl.d.ts +0 -0
  368. /package/{dist/esm/v4 → v4}/locales/nl.js +0 -0
  369. /package/{dist/types/v4 → v4}/locales/no.d.ts +0 -0
  370. /package/{dist/esm/v4 → v4}/locales/no.js +0 -0
  371. /package/{dist/types/v4 → v4}/locales/ota.d.ts +0 -0
  372. /package/{dist/esm/v4 → v4}/locales/ota.js +0 -0
  373. /package/{dist/types/v4 → v4}/locales/pl.d.ts +0 -0
  374. /package/{dist/esm/v4 → v4}/locales/pl.js +0 -0
  375. /package/{dist/types/v4 → v4}/locales/ps.d.ts +0 -0
  376. /package/{dist/esm/v4 → v4}/locales/ps.js +0 -0
  377. /package/{dist/types/v4 → v4}/locales/pt.d.ts +0 -0
  378. /package/{dist/esm/v4 → v4}/locales/pt.js +0 -0
  379. /package/{dist/types/v4 → v4}/locales/ru.d.ts +0 -0
  380. /package/{dist/esm/v4 → v4}/locales/ru.js +0 -0
  381. /package/{dist/types/v4 → v4}/locales/sl.d.ts +0 -0
  382. /package/{dist/esm/v4 → v4}/locales/sl.js +0 -0
  383. /package/{dist/types/v4 → v4}/locales/sv.d.ts +0 -0
  384. /package/{dist/esm/v4 → v4}/locales/sv.js +0 -0
  385. /package/{dist/types/v4 → v4}/locales/ta.d.ts +0 -0
  386. /package/{dist/esm/v4 → v4}/locales/ta.js +0 -0
  387. /package/{dist/types/v4 → v4}/locales/th.d.ts +0 -0
  388. /package/{dist/esm/v4 → v4}/locales/th.js +0 -0
  389. /package/{dist/types/v4 → v4}/locales/tr.d.ts +0 -0
  390. /package/{dist/esm/v4 → v4}/locales/tr.js +0 -0
  391. /package/{dist/types/v4 → v4}/locales/ua.d.ts +0 -0
  392. /package/{dist/esm/v4 → v4}/locales/ua.js +0 -0
  393. /package/{dist/types/v4 → v4}/locales/ur.d.ts +0 -0
  394. /package/{dist/esm/v4 → v4}/locales/ur.js +0 -0
  395. /package/{dist/types/v4 → v4}/locales/vi.d.ts +0 -0
  396. /package/{dist/esm/v4 → v4}/locales/vi.js +0 -0
  397. /package/{dist/types/v4 → v4}/locales/zh-CN.d.ts +0 -0
  398. /package/{dist/esm/v4 → v4}/locales/zh-CN.js +0 -0
  399. /package/{dist/types/v4 → v4}/locales/zh-TW.d.ts +0 -0
  400. /package/{dist/esm/v4 → v4}/locales/zh-TW.js +0 -0
  401. /package/{dist/types/v4 → v4}/mini/index.d.ts +0 -0
  402. /package/{dist/esm/v4 → v4}/mini/index.js +0 -0
@@ -443,6 +443,8 @@ function isValidJWT(jwt, alg) {
443
443
  return false;
444
444
  try {
445
445
  const [header] = jwt.split(".");
446
+ if (!header)
447
+ return false;
446
448
  // Convert base64url to base64
447
449
  const base64 = header
448
450
  .replace(/-/g, "+")
@@ -1,32 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toUpperCase = exports.toLowerCase = exports.trim = exports.normalize = exports.overwrite = exports.mime = exports.property = exports.endsWith = exports.startsWith = exports.includes = exports.uppercase = exports.lowercase = exports.regex = exports.length = exports.minLength = exports.maxLength = exports.size = exports.minSize = exports.maxSize = exports.multipleOf = exports.nonnegative = exports.nonpositive = exports.negative = exports.positive = exports.gte = exports.gt = exports.lte = exports.lt = void 0;
4
- var core_1 = require("zod/v4/core");
5
- Object.defineProperty(exports, "lt", { enumerable: true, get: function () { return core_1._lt; } });
6
- Object.defineProperty(exports, "lte", { enumerable: true, get: function () { return core_1._lte; } });
7
- Object.defineProperty(exports, "gt", { enumerable: true, get: function () { return core_1._gt; } });
8
- Object.defineProperty(exports, "gte", { enumerable: true, get: function () { return core_1._gte; } });
9
- Object.defineProperty(exports, "positive", { enumerable: true, get: function () { return core_1._positive; } });
10
- Object.defineProperty(exports, "negative", { enumerable: true, get: function () { return core_1._negative; } });
11
- Object.defineProperty(exports, "nonpositive", { enumerable: true, get: function () { return core_1._nonpositive; } });
12
- Object.defineProperty(exports, "nonnegative", { enumerable: true, get: function () { return core_1._nonnegative; } });
13
- Object.defineProperty(exports, "multipleOf", { enumerable: true, get: function () { return core_1._multipleOf; } });
14
- Object.defineProperty(exports, "maxSize", { enumerable: true, get: function () { return core_1._maxSize; } });
15
- Object.defineProperty(exports, "minSize", { enumerable: true, get: function () { return core_1._minSize; } });
16
- Object.defineProperty(exports, "size", { enumerable: true, get: function () { return core_1._size; } });
17
- Object.defineProperty(exports, "maxLength", { enumerable: true, get: function () { return core_1._maxLength; } });
18
- Object.defineProperty(exports, "minLength", { enumerable: true, get: function () { return core_1._minLength; } });
19
- Object.defineProperty(exports, "length", { enumerable: true, get: function () { return core_1._length; } });
20
- Object.defineProperty(exports, "regex", { enumerable: true, get: function () { return core_1._regex; } });
21
- Object.defineProperty(exports, "lowercase", { enumerable: true, get: function () { return core_1._lowercase; } });
22
- Object.defineProperty(exports, "uppercase", { enumerable: true, get: function () { return core_1._uppercase; } });
23
- Object.defineProperty(exports, "includes", { enumerable: true, get: function () { return core_1._includes; } });
24
- Object.defineProperty(exports, "startsWith", { enumerable: true, get: function () { return core_1._startsWith; } });
25
- Object.defineProperty(exports, "endsWith", { enumerable: true, get: function () { return core_1._endsWith; } });
26
- Object.defineProperty(exports, "property", { enumerable: true, get: function () { return core_1._property; } });
27
- Object.defineProperty(exports, "mime", { enumerable: true, get: function () { return core_1._mime; } });
28
- Object.defineProperty(exports, "overwrite", { enumerable: true, get: function () { return core_1._overwrite; } });
29
- Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return core_1._normalize; } });
30
- Object.defineProperty(exports, "trim", { enumerable: true, get: function () { return core_1._trim; } });
31
- Object.defineProperty(exports, "toLowerCase", { enumerable: true, get: function () { return core_1._toLowerCase; } });
32
- Object.defineProperty(exports, "toUpperCase", { enumerable: true, get: function () { return core_1._toUpperCase; } });
4
+ var index_js_1 = require("../core/index.cjs");
5
+ Object.defineProperty(exports, "lt", { enumerable: true, get: function () { return index_js_1._lt; } });
6
+ Object.defineProperty(exports, "lte", { enumerable: true, get: function () { return index_js_1._lte; } });
7
+ Object.defineProperty(exports, "gt", { enumerable: true, get: function () { return index_js_1._gt; } });
8
+ Object.defineProperty(exports, "gte", { enumerable: true, get: function () { return index_js_1._gte; } });
9
+ Object.defineProperty(exports, "positive", { enumerable: true, get: function () { return index_js_1._positive; } });
10
+ Object.defineProperty(exports, "negative", { enumerable: true, get: function () { return index_js_1._negative; } });
11
+ Object.defineProperty(exports, "nonpositive", { enumerable: true, get: function () { return index_js_1._nonpositive; } });
12
+ Object.defineProperty(exports, "nonnegative", { enumerable: true, get: function () { return index_js_1._nonnegative; } });
13
+ Object.defineProperty(exports, "multipleOf", { enumerable: true, get: function () { return index_js_1._multipleOf; } });
14
+ Object.defineProperty(exports, "maxSize", { enumerable: true, get: function () { return index_js_1._maxSize; } });
15
+ Object.defineProperty(exports, "minSize", { enumerable: true, get: function () { return index_js_1._minSize; } });
16
+ Object.defineProperty(exports, "size", { enumerable: true, get: function () { return index_js_1._size; } });
17
+ Object.defineProperty(exports, "maxLength", { enumerable: true, get: function () { return index_js_1._maxLength; } });
18
+ Object.defineProperty(exports, "minLength", { enumerable: true, get: function () { return index_js_1._minLength; } });
19
+ Object.defineProperty(exports, "length", { enumerable: true, get: function () { return index_js_1._length; } });
20
+ Object.defineProperty(exports, "regex", { enumerable: true, get: function () { return index_js_1._regex; } });
21
+ Object.defineProperty(exports, "lowercase", { enumerable: true, get: function () { return index_js_1._lowercase; } });
22
+ Object.defineProperty(exports, "uppercase", { enumerable: true, get: function () { return index_js_1._uppercase; } });
23
+ Object.defineProperty(exports, "includes", { enumerable: true, get: function () { return index_js_1._includes; } });
24
+ Object.defineProperty(exports, "startsWith", { enumerable: true, get: function () { return index_js_1._startsWith; } });
25
+ Object.defineProperty(exports, "endsWith", { enumerable: true, get: function () { return index_js_1._endsWith; } });
26
+ Object.defineProperty(exports, "property", { enumerable: true, get: function () { return index_js_1._property; } });
27
+ Object.defineProperty(exports, "mime", { enumerable: true, get: function () { return index_js_1._mime; } });
28
+ Object.defineProperty(exports, "overwrite", { enumerable: true, get: function () { return index_js_1._overwrite; } });
29
+ Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return index_js_1._normalize; } });
30
+ Object.defineProperty(exports, "trim", { enumerable: true, get: function () { return index_js_1._trim; } });
31
+ Object.defineProperty(exports, "toLowerCase", { enumerable: true, get: function () { return index_js_1._toLowerCase; } });
32
+ Object.defineProperty(exports, "toUpperCase", { enumerable: true, get: function () { return index_js_1._toUpperCase; } });
@@ -0,0 +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, } from "../core/index.cjs";
@@ -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, } from "zod/v4/core";
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, } from "../core/index.js";
@@ -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, } from "zod/v4/core";
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, } from "../core/index.js";
@@ -28,8 +28,8 @@ exports.number = number;
28
28
  exports.boolean = boolean;
29
29
  exports.bigint = bigint;
30
30
  exports.date = date;
31
- const core = __importStar(require("zod/v4/core"));
32
- const schemas = __importStar(require("./schemas.js"));
31
+ const core = __importStar(require("../core/index.cjs"));
32
+ const schemas = __importStar(require("./schemas.cjs"));
33
33
  function string(params) {
34
34
  return core._coercedString(schemas.ZodString, params);
35
35
  }
@@ -0,0 +1,17 @@
1
+ import * as core from "../core/index.cjs";
2
+ import * as schemas from "./schemas.cjs";
3
+ export interface ZodCoercedString<T = unknown> extends schemas._ZodString<core.$ZodStringInternals<T>> {
4
+ }
5
+ export declare function string<T = unknown>(params?: string | core.$ZodStringParams): ZodCoercedString<T>;
6
+ export interface ZodCoercedNumber<T = unknown> extends schemas._ZodNumber<core.$ZodNumberInternals<T>> {
7
+ }
8
+ export declare function number<T = unknown>(params?: string | core.$ZodNumberParams): ZodCoercedNumber<T>;
9
+ export interface ZodCoercedBoolean<T = unknown> extends schemas._ZodBoolean<core.$ZodBooleanInternals<T>> {
10
+ }
11
+ export declare function boolean<T = unknown>(params?: string | core.$ZodBooleanParams): ZodCoercedBoolean<T>;
12
+ export interface ZodCoercedBigInt<T = unknown> extends schemas._ZodBigInt<core.$ZodBigIntInternals<T>> {
13
+ }
14
+ export declare function bigint<T = unknown>(params?: string | core.$ZodBigIntParams): ZodCoercedBigInt<T>;
15
+ export interface ZodCoercedDate<T = unknown> extends schemas._ZodDate<core.$ZodDateInternals<T>> {
16
+ }
17
+ export declare function date<T = unknown>(params?: string | core.$ZodDateParams): ZodCoercedDate<T>;
@@ -1,4 +1,4 @@
1
- import * as core from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
2
  import * as schemas from "./schemas.js";
3
3
  export interface ZodCoercedString<T = unknown> extends schemas._ZodString<core.$ZodStringInternals<T>> {
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as core from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
2
  import * as schemas from "./schemas.js";
3
3
  export function string(params) {
4
4
  return core._coercedString(schemas.ZodString, params);
@@ -27,7 +27,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.config = exports.$brand = exports.NEVER = exports.ZodIssueCode = void 0;
28
28
  exports.setErrorMap = setErrorMap;
29
29
  exports.getErrorMap = getErrorMap;
30
- const core = __importStar(require("zod/v4/core"));
30
+ const core = __importStar(require("../core/index.cjs"));
31
31
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
32
32
  exports.ZodIssueCode = {
33
33
  invalid_type: "invalid_type",
@@ -48,9 +48,9 @@ const INVALID = Object.freeze({
48
48
  });
49
49
  /** A special constant with type `never` */
50
50
  exports.NEVER = INVALID;
51
- var core_1 = require("zod/v4/core");
52
- Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return core_1.$brand; } });
53
- Object.defineProperty(exports, "config", { enumerable: true, get: function () { return core_1.config; } });
51
+ var index_js_1 = require("../core/index.cjs");
52
+ Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_1.$brand; } });
53
+ Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_1.config; } });
54
54
  /** @deprecated Use `z.config(params)` instead. */
55
55
  function setErrorMap(map) {
56
56
  core.config({
@@ -0,0 +1,48 @@
1
+ import * as core from "../core/index.cjs";
2
+ import type { ZodType } from "./schemas.cjs";
3
+ export type {
4
+ /** @deprecated Use `z.output<T>` instead. */
5
+ output as TypeOf,
6
+ /** @deprecated Use `z.output<T>` instead. */
7
+ output as Infer,
8
+ /** @deprecated Use `z.core.$$ZodFirstPartyTypes` instead */
9
+ $ZodTypes as ZodFirstPartySchemaTypes, } from "../core/index.cjs";
10
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
11
+ export declare const ZodIssueCode: {
12
+ readonly invalid_type: "invalid_type";
13
+ readonly too_big: "too_big";
14
+ readonly too_small: "too_small";
15
+ readonly invalid_format: "invalid_format";
16
+ readonly not_multiple_of: "not_multiple_of";
17
+ readonly unrecognized_keys: "unrecognized_keys";
18
+ readonly invalid_union: "invalid_union";
19
+ readonly invalid_key: "invalid_key";
20
+ readonly invalid_element: "invalid_element";
21
+ readonly invalid_value: "invalid_value";
22
+ readonly custom: "custom";
23
+ };
24
+ /** A special constant with type `never` */
25
+ export declare const NEVER: never;
26
+ /** @deprecated Use `z.$ZodFlattenedError` */
27
+ export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
28
+ /** @deprecated Use `z.$ZodFormattedError` */
29
+ export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
30
+ /** Use `z.$brand` instead */
31
+ export type BRAND<T extends string | number | symbol = string | number | symbol> = {
32
+ [core.$brand]: {
33
+ [k in T]: true;
34
+ };
35
+ };
36
+ export { $brand, config } from "../core/index.cjs";
37
+ /** @deprecated Use `z.config(params)` instead. */
38
+ export declare function setErrorMap(map: core.$ZodErrorMap): void;
39
+ /** @deprecated Use `z.config()` instead. */
40
+ export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
41
+ export type {
42
+ /** @deprecated Use z.ZodType (without generics) instead. */
43
+ ZodType as ZodTypeAny,
44
+ /** @deprecated Use `z.ZodType` */
45
+ ZodType as ZodSchema,
46
+ /** @deprecated Use `z.ZodType` */
47
+ ZodType as Schema, };
48
+ export type ZodRawShape = core.$ZodShape;
@@ -1,4 +1,4 @@
1
- import * as core from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
2
  import type { ZodType } from "./schemas.js";
3
3
  export type {
4
4
  /** @deprecated Use `z.output<T>` instead. */
@@ -6,7 +6,7 @@ output as TypeOf,
6
6
  /** @deprecated Use `z.output<T>` instead. */
7
7
  output as Infer,
8
8
  /** @deprecated Use `z.core.$$ZodFirstPartyTypes` instead */
9
- $ZodTypes as ZodFirstPartySchemaTypes, } from "zod/v4/core";
9
+ $ZodTypes as ZodFirstPartySchemaTypes, } from "../core/index.js";
10
10
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
11
11
  export declare const ZodIssueCode: {
12
12
  readonly invalid_type: "invalid_type";
@@ -33,7 +33,7 @@ export type BRAND<T extends string | number | symbol = string | number | symbol>
33
33
  [k in T]: true;
34
34
  };
35
35
  };
36
- export { $brand, config } from "zod/v4/core";
36
+ export { $brand, config } from "../core/index.js";
37
37
  /** @deprecated Use `z.config(params)` instead. */
38
38
  export declare function setErrorMap(map: core.$ZodErrorMap): void;
39
39
  /** @deprecated Use `z.config()` instead. */
@@ -1,5 +1,5 @@
1
1
  // Zod 3 compat layer
2
- import * as core from "zod/v4/core";
2
+ import * as core from "../core/index.js";
3
3
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
4
4
  export const ZodIssueCode = {
5
5
  invalid_type: "invalid_type",
@@ -20,7 +20,7 @@ const INVALID = Object.freeze({
20
20
  });
21
21
  /** A special constant with type `never` */
22
22
  export const NEVER = INVALID;
23
- export { $brand, config } from "zod/v4/core";
23
+ export { $brand, config } from "../core/index.js";
24
24
  /** @deprecated Use `z.config(params)` instead. */
25
25
  export function setErrorMap(map) {
26
26
  core.config({
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ZodRealError = exports.ZodError = void 0;
27
- const core = __importStar(require("zod/v4/core"));
28
- const core_1 = require("zod/v4/core");
27
+ const core = __importStar(require("../core/index.cjs"));
28
+ const index_js_1 = require("../core/index.cjs");
29
29
  const initializer = (inst, issues) => {
30
- core_1.$ZodError.init(inst, issues);
30
+ index_js_1.$ZodError.init(inst, issues);
31
31
  inst.name = "ZodError";
32
32
  Object.defineProperties(inst, {
33
33
  format: {
@@ -0,0 +1,30 @@
1
+ import * as core from "../core/index.cjs";
2
+ import { $ZodError } from "../core/index.cjs";
3
+ /** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
4
+ export type ZodIssue = core.$ZodIssue;
5
+ /** An Error-like class used to store Zod validation issues. */
6
+ export interface ZodError<T = unknown> extends $ZodError<T> {
7
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
8
+ format(): core.$ZodFormattedError<T>;
9
+ format<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFormattedError<T, U>;
10
+ /** @deprecated Use the `z.treeifyError(err)` function instead. */
11
+ flatten(): core.$ZodFlattenedError<T>;
12
+ flatten<U>(mapper: (issue: core.$ZodIssue) => U): core.$ZodFlattenedError<T, U>;
13
+ /** @deprecated Push directly to `.issues` instead. */
14
+ addIssue(issue: core.$ZodIssue): void;
15
+ /** @deprecated Push directly to `.issues` instead. */
16
+ addIssues(issues: core.$ZodIssue[]): void;
17
+ /** @deprecated Check `err.issues.length === 0` instead. */
18
+ isEmpty: boolean;
19
+ }
20
+ export declare const ZodError: core.$constructor<ZodError>;
21
+ export declare const ZodRealError: core.$constructor<ZodError>;
22
+ export type {
23
+ /** @deprecated Use `z.core.$ZodFlattenedError` instead. */
24
+ $ZodFlattenedError as ZodFlattenedError,
25
+ /** @deprecated Use `z.core.$ZodFormattedError` instead. */
26
+ $ZodFormattedError as ZodFormattedError,
27
+ /** @deprecated Use `z.core.$ZodErrorMap` instead. */
28
+ $ZodErrorMap as ZodErrorMap, } from "../core/index.cjs";
29
+ /** @deprecated Use `z.core.$ZodRawIssue` instead. */
30
+ export type IssueData = core.$ZodRawIssue;
@@ -1,5 +1,5 @@
1
- import * as core from "zod/v4/core";
2
- import { $ZodError } from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
+ import { $ZodError } from "../core/index.js";
3
3
  /** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
4
4
  export type ZodIssue = core.$ZodIssue;
5
5
  /** An Error-like class used to store Zod validation issues. */
@@ -25,6 +25,6 @@ $ZodFlattenedError as ZodFlattenedError,
25
25
  /** @deprecated Use `z.core.$ZodFormattedError` instead. */
26
26
  $ZodFormattedError as ZodFormattedError,
27
27
  /** @deprecated Use `z.core.$ZodErrorMap` instead. */
28
- $ZodErrorMap as ZodErrorMap, } from "zod/v4/core";
28
+ $ZodErrorMap as ZodErrorMap, } from "../core/index.js";
29
29
  /** @deprecated Use `z.core.$ZodRawIssue` instead. */
30
30
  export type IssueData = core.$ZodRawIssue;
@@ -1,5 +1,5 @@
1
- import * as core from "zod/v4/core";
2
- import { $ZodError } from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
+ import { $ZodError } from "../core/index.js";
3
3
  const initializer = (inst, issues) => {
4
4
  $ZodError.init(inst, issues);
5
5
  inst.name = "ZodError";
@@ -30,40 +30,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  exports.coerce = exports.iso = exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = exports.locales = exports.TimePrecision = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.function = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
33
- exports.core = __importStar(require("zod/v4/core"));
34
- __exportStar(require("./schemas.js"), exports);
35
- __exportStar(require("./checks.js"), exports);
36
- __exportStar(require("./errors.js"), exports);
37
- __exportStar(require("./parse.js"), exports);
38
- __exportStar(require("./compat.js"), exports);
33
+ exports.core = __importStar(require("../core/index.cjs"));
34
+ __exportStar(require("./schemas.cjs"), exports);
35
+ __exportStar(require("./checks.cjs"), exports);
36
+ __exportStar(require("./errors.cjs"), exports);
37
+ __exportStar(require("./parse.cjs"), exports);
38
+ __exportStar(require("./compat.cjs"), exports);
39
39
  // zod-specified
40
- const core_1 = require("zod/v4/core");
41
- const en_js_1 = __importDefault(require("zod/v4/locales/en.js"));
42
- (0, core_1.config)((0, en_js_1.default)());
43
- var core_2 = require("zod/v4/core");
44
- Object.defineProperty(exports, "globalRegistry", { enumerable: true, get: function () { return core_2.globalRegistry; } });
45
- Object.defineProperty(exports, "registry", { enumerable: true, get: function () { return core_2.registry; } });
46
- Object.defineProperty(exports, "config", { enumerable: true, get: function () { return core_2.config; } });
47
- Object.defineProperty(exports, "function", { enumerable: true, get: function () { return core_2.function; } });
48
- Object.defineProperty(exports, "$output", { enumerable: true, get: function () { return core_2.$output; } });
49
- Object.defineProperty(exports, "$input", { enumerable: true, get: function () { return core_2.$input; } });
50
- Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return core_2.$brand; } });
51
- Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return core_2.clone; } });
52
- Object.defineProperty(exports, "regexes", { enumerable: true, get: function () { return core_2.regexes; } });
53
- Object.defineProperty(exports, "treeifyError", { enumerable: true, get: function () { return core_2.treeifyError; } });
54
- Object.defineProperty(exports, "prettifyError", { enumerable: true, get: function () { return core_2.prettifyError; } });
55
- Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return core_2.formatError; } });
56
- Object.defineProperty(exports, "flattenError", { enumerable: true, get: function () { return core_2.flattenError; } });
57
- Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return core_2.toJSONSchema; } });
58
- Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return core_2.TimePrecision; } });
59
- exports.locales = __importStar(require("../locales/index.js"));
40
+ const index_js_1 = require("../core/index.cjs");
41
+ const en_js_1 = __importDefault(require("../locales/en.cjs"));
42
+ (0, index_js_1.config)((0, en_js_1.default)());
43
+ var index_js_2 = require("../core/index.cjs");
44
+ Object.defineProperty(exports, "globalRegistry", { enumerable: true, get: function () { return index_js_2.globalRegistry; } });
45
+ Object.defineProperty(exports, "registry", { enumerable: true, get: function () { return index_js_2.registry; } });
46
+ Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_2.config; } });
47
+ Object.defineProperty(exports, "function", { enumerable: true, get: function () { return index_js_2.function; } });
48
+ Object.defineProperty(exports, "$output", { enumerable: true, get: function () { return index_js_2.$output; } });
49
+ Object.defineProperty(exports, "$input", { enumerable: true, get: function () { return index_js_2.$input; } });
50
+ Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_2.$brand; } });
51
+ Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return index_js_2.clone; } });
52
+ Object.defineProperty(exports, "regexes", { enumerable: true, get: function () { return index_js_2.regexes; } });
53
+ Object.defineProperty(exports, "treeifyError", { enumerable: true, get: function () { return index_js_2.treeifyError; } });
54
+ Object.defineProperty(exports, "prettifyError", { enumerable: true, get: function () { return index_js_2.prettifyError; } });
55
+ Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return index_js_2.formatError; } });
56
+ Object.defineProperty(exports, "flattenError", { enumerable: true, get: function () { return index_js_2.flattenError; } });
57
+ Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return index_js_2.toJSONSchema; } });
58
+ Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return index_js_2.TimePrecision; } });
59
+ exports.locales = __importStar(require("../locales/index.cjs"));
60
60
  // iso
61
61
  // must be exported from top-level
62
62
  // https://github.com/colinhacks/zod/issues/4491
63
- var iso_js_1 = require("./iso.js");
63
+ var iso_js_1 = require("./iso.cjs");
64
64
  Object.defineProperty(exports, "ZodISODateTime", { enumerable: true, get: function () { return iso_js_1.ZodISODateTime; } });
65
65
  Object.defineProperty(exports, "ZodISODate", { enumerable: true, get: function () { return iso_js_1.ZodISODate; } });
66
66
  Object.defineProperty(exports, "ZodISOTime", { enumerable: true, get: function () { return iso_js_1.ZodISOTime; } });
67
67
  Object.defineProperty(exports, "ZodISODuration", { enumerable: true, get: function () { return iso_js_1.ZodISODuration; } });
68
- exports.iso = __importStar(require("./iso.js"));
69
- exports.coerce = __importStar(require("./coerce.js"));
68
+ exports.iso = __importStar(require("./iso.cjs"));
69
+ exports.coerce = __importStar(require("./coerce.cjs"));
@@ -0,0 +1,13 @@
1
+ export * as core from "../core/index.cjs";
2
+ export * from "./schemas.cjs";
3
+ export * from "./checks.cjs";
4
+ export * from "./errors.cjs";
5
+ export * from "./parse.cjs";
6
+ export * from "./compat.cjs";
7
+ export type { infer, output, input } from "../core/index.cjs";
8
+ export { globalRegistry, type GlobalMeta, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, } from "../core/index.cjs";
9
+ export * as locales from "../locales/index.cjs";
10
+ export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.cjs";
11
+ export * as iso from "./iso.cjs";
12
+ export type { ZodCoercedString, ZodCoercedNumber, ZodCoercedBigInt, ZodCoercedBoolean, ZodCoercedDate, } from "./coerce.cjs";
13
+ export * as coerce from "./coerce.cjs";
@@ -1,11 +1,11 @@
1
- export * as core from "zod/v4/core";
1
+ export * as core from "../core/index.js";
2
2
  export * from "./schemas.js";
3
3
  export * from "./checks.js";
4
4
  export * from "./errors.js";
5
5
  export * from "./parse.js";
6
6
  export * from "./compat.js";
7
- export type { infer, output, input } from "zod/v4/core";
8
- export { globalRegistry, type GlobalMeta, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, } from "zod/v4/core";
7
+ export type { infer, output, input } from "../core/index.js";
8
+ export { globalRegistry, type GlobalMeta, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, } from "../core/index.js";
9
9
  export * as locales from "../locales/index.js";
10
10
  export { ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration } from "./iso.js";
11
11
  export * as iso from "./iso.js";
@@ -1,14 +1,14 @@
1
- export * as core from "zod/v4/core";
1
+ export * as core from "../core/index.js";
2
2
  export * from "./schemas.js";
3
3
  export * from "./checks.js";
4
4
  export * from "./errors.js";
5
5
  export * from "./parse.js";
6
6
  export * from "./compat.js";
7
7
  // zod-specified
8
- import { config } from "zod/v4/core";
9
- import en from "zod/v4/locales/en.js";
8
+ import { config } from "../core/index.js";
9
+ import en from "../locales/en.js";
10
10
  config(en());
11
- export { globalRegistry, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, } from "zod/v4/core";
11
+ export { globalRegistry, registry, config, function, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, } from "../core/index.js";
12
12
  export * as locales from "../locales/index.js";
13
13
  // iso
14
14
  // must be exported from top-level
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.z = void 0;
30
+ const z = __importStar(require("./external.cjs"));
31
+ exports.z = z;
32
+ __exportStar(require("./external.cjs"), exports);
33
+ exports.default = z;
@@ -0,0 +1,4 @@
1
+ import * as z from "./external.cjs";
2
+ export { z };
3
+ export * from "./external.cjs";
4
+ export default z;
@@ -28,8 +28,8 @@ exports.datetime = datetime;
28
28
  exports.date = date;
29
29
  exports.time = time;
30
30
  exports.duration = duration;
31
- const core = __importStar(require("zod/v4/core"));
32
- const schemas = __importStar(require("./schemas.js"));
31
+ const core = __importStar(require("../core/index.cjs"));
32
+ const schemas = __importStar(require("./schemas.cjs"));
33
33
  exports.ZodISODateTime = core.$constructor("ZodISODateTime", (inst, def) => {
34
34
  core.$ZodISODateTime.init(inst, def);
35
35
  schemas.ZodStringFormat.init(inst, def);
@@ -0,0 +1,22 @@
1
+ import * as core from "../core/index.cjs";
2
+ import * as schemas from "./schemas.cjs";
3
+ export interface ZodISODateTime extends schemas.ZodStringFormat {
4
+ _zod: core.$ZodISODateTimeInternals;
5
+ }
6
+ export declare const ZodISODateTime: core.$constructor<ZodISODateTime>;
7
+ export declare function datetime(params?: string | core.$ZodISODateTimeParams): ZodISODateTime;
8
+ export interface ZodISODate extends schemas.ZodStringFormat {
9
+ _zod: core.$ZodISODateInternals;
10
+ }
11
+ export declare const ZodISODate: core.$constructor<ZodISODate>;
12
+ export declare function date(params?: string | core.$ZodISODateParams): ZodISODate;
13
+ export interface ZodISOTime extends schemas.ZodStringFormat {
14
+ _zod: core.$ZodISOTimeInternals;
15
+ }
16
+ export declare const ZodISOTime: core.$constructor<ZodISOTime>;
17
+ export declare function time(params?: string | core.$ZodISOTimeParams): ZodISOTime;
18
+ export interface ZodISODuration extends schemas.ZodStringFormat {
19
+ _zod: core.$ZodISODurationInternals;
20
+ }
21
+ export declare const ZodISODuration: core.$constructor<ZodISODuration>;
22
+ export declare function duration(params?: string | core.$ZodISODurationParams): ZodISODuration;
@@ -1,4 +1,4 @@
1
- import * as core from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
2
  import * as schemas from "./schemas.js";
3
3
  export interface ZodISODateTime extends schemas.ZodStringFormat {
4
4
  _zod: core.$ZodISODateTimeInternals;
@@ -1,4 +1,4 @@
1
- import * as core from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
2
  import * as schemas from "./schemas.js";
3
3
  export const ZodISODateTime = /*@__PURE__*/ core.$constructor("ZodISODateTime", (inst, def) => {
4
4
  core.$ZodISODateTime.init(inst, def);
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.safeParseAsync = exports.safeParse = exports.parseAsync = exports.parse = void 0;
27
- const core = __importStar(require("zod/v4/core"));
28
- const errors_js_1 = require("./errors.js");
27
+ const core = __importStar(require("../core/index.cjs"));
28
+ const errors_js_1 = require("./errors.cjs");
29
29
  exports.parse = core._parse(errors_js_1.ZodRealError);
30
30
  exports.parseAsync = core._parseAsync(errors_js_1.ZodRealError);
31
31
  exports.safeParse = core._safeParse(errors_js_1.ZodRealError);
@@ -0,0 +1,23 @@
1
+ import * as core from "../core/index.cjs";
2
+ import { type ZodError } from "./errors.cjs";
3
+ export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
4
+ export type ZodSafeParseSuccess<T> = {
5
+ success: true;
6
+ data: T;
7
+ error?: never;
8
+ };
9
+ export type ZodSafeParseError<T> = {
10
+ success: false;
11
+ data?: never;
12
+ error: ZodError<T>;
13
+ };
14
+ export declare const parse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
15
+ callee?: core.util.AnyFunc;
16
+ Err?: core.$ZodErrorClass;
17
+ }) => core.output<T>;
18
+ export declare const parseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
19
+ callee?: core.util.AnyFunc;
20
+ Err?: core.$ZodErrorClass;
21
+ }) => Promise<core.output<T>>;
22
+ export declare const safeParse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => ZodSafeParseResult<core.output<T>>;
23
+ export declare const safeParseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.output<T>>>;
@@ -1,4 +1,4 @@
1
- import * as core from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
2
  import { type ZodError } from "./errors.js";
3
3
  export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
4
4
  export type ZodSafeParseSuccess<T> = {
@@ -1,4 +1,4 @@
1
- import * as core from "zod/v4/core";
1
+ import * as core from "../core/index.js";
2
2
  import { ZodRealError } from "./errors.js";
3
3
  export const parse = /* @__PURE__ */ core._parse(ZodRealError);
4
4
  export const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);