fullstacked 0.12.1-1359 → 0.12.1-1366

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 (335) hide show
  1. package/fullstacked_modules/@fullstacked/ai-agent/ai-agent.js +55352 -53576
  2. package/fullstacked_modules/@fullstacked/ai-agent/index.ts +0 -1
  3. package/fullstacked_modules/@fullstacked/ai-agent/lock.json +157 -152
  4. package/fullstacked_modules/@fullstacked/ai-agent/package.json +13 -13
  5. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/ollama.ts +2 -2
  6. package/fullstacked_modules/@fullstacked/ui/index.js +6 -1
  7. package/fullstacked_modules/zod/README.md +4 -4
  8. package/fullstacked_modules/zod/index.cjs +2 -2
  9. package/fullstacked_modules/zod/index.d.cts +2 -2
  10. package/fullstacked_modules/zod/index.d.ts +2 -2
  11. package/fullstacked_modules/zod/index.js +2 -2
  12. package/fullstacked_modules/zod/locales/index.cjs +17 -0
  13. package/fullstacked_modules/zod/locales/index.d.cts +1 -0
  14. package/fullstacked_modules/zod/locales/index.d.ts +1 -0
  15. package/fullstacked_modules/zod/locales/index.js +1 -0
  16. package/fullstacked_modules/zod/locales/package.json +6 -0
  17. package/fullstacked_modules/zod/mini/index.cjs +17 -0
  18. package/fullstacked_modules/zod/mini/index.d.cts +1 -0
  19. package/fullstacked_modules/zod/mini/index.d.ts +1 -0
  20. package/fullstacked_modules/zod/mini/index.js +1 -0
  21. package/fullstacked_modules/zod/mini/package.json +6 -0
  22. package/fullstacked_modules/zod/package.json +29 -12
  23. package/fullstacked_modules/zod/src/index.ts +2 -2
  24. package/fullstacked_modules/zod/src/locales/index.ts +1 -0
  25. package/fullstacked_modules/zod/src/mini/index.ts +1 -0
  26. package/fullstacked_modules/zod/src/v3/ZodError.ts +1 -1
  27. package/fullstacked_modules/zod/src/v3/tests/object.test.ts +2 -2
  28. package/fullstacked_modules/zod/src/v3/tests/string.test.ts +2 -2
  29. package/fullstacked_modules/zod/src/v3/types.ts +3 -1
  30. package/fullstacked_modules/zod/src/v4/classic/checks.ts +1 -0
  31. package/fullstacked_modules/zod/src/v4/classic/compat.ts +4 -0
  32. package/fullstacked_modules/zod/src/v4/classic/errors.ts +9 -2
  33. package/fullstacked_modules/zod/src/v4/classic/external.ts +1 -1
  34. package/fullstacked_modules/zod/src/v4/classic/parse.ts +49 -0
  35. package/fullstacked_modules/zod/src/v4/classic/schemas.ts +224 -81
  36. package/fullstacked_modules/zod/src/v4/classic/tests/array.test.ts +6 -6
  37. package/fullstacked_modules/zod/src/v4/classic/tests/catch.test.ts +29 -5
  38. package/fullstacked_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  39. package/fullstacked_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
  40. package/fullstacked_modules/zod/src/v4/classic/tests/continuability.test.ts +1 -1
  41. package/fullstacked_modules/zod/src/v4/classic/tests/datetime.test.ts +6 -0
  42. package/fullstacked_modules/zod/src/v4/classic/tests/default.test.ts +52 -0
  43. package/fullstacked_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +42 -0
  44. package/fullstacked_modules/zod/src/v4/classic/tests/error-utils.test.ts +70 -2
  45. package/fullstacked_modules/zod/src/v4/classic/tests/file.test.ts +9 -4
  46. package/fullstacked_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
  47. package/fullstacked_modules/zod/src/v4/classic/tests/function.test.ts +71 -31
  48. package/fullstacked_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  49. package/fullstacked_modules/zod/src/v4/classic/tests/index.test.ts +15 -0
  50. package/fullstacked_modules/zod/src/v4/classic/tests/literal.test.ts +25 -0
  51. package/fullstacked_modules/zod/src/v4/classic/tests/nonoptional.test.ts +15 -0
  52. package/fullstacked_modules/zod/src/v4/classic/tests/number.test.ts +23 -0
  53. package/fullstacked_modules/zod/src/v4/classic/tests/object.test.ts +48 -2
  54. package/fullstacked_modules/zod/src/v4/classic/tests/optional.test.ts +13 -0
  55. package/fullstacked_modules/zod/src/v4/classic/tests/partial.test.ts +193 -0
  56. package/fullstacked_modules/zod/src/v4/classic/tests/pickomit.test.ts +5 -5
  57. package/fullstacked_modules/zod/src/v4/classic/tests/pipe.test.ts +25 -5
  58. package/fullstacked_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  59. package/fullstacked_modules/zod/src/v4/classic/tests/preprocess.test.ts +5 -21
  60. package/fullstacked_modules/zod/src/v4/classic/tests/record.test.ts +15 -1
  61. package/fullstacked_modules/zod/src/v4/classic/tests/recursive-types.test.ts +226 -0
  62. package/fullstacked_modules/zod/src/v4/classic/tests/refine.test.ts +78 -5
  63. package/fullstacked_modules/zod/src/v4/classic/tests/set.test.ts +5 -3
  64. package/fullstacked_modules/zod/src/v4/classic/tests/string-formats.test.ts +16 -0
  65. package/fullstacked_modules/zod/src/v4/classic/tests/string.test.ts +204 -5
  66. package/fullstacked_modules/zod/src/v4/classic/tests/stringbool.test.ts +40 -0
  67. package/fullstacked_modules/zod/src/v4/classic/tests/template-literal.test.ts +14 -9
  68. package/fullstacked_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +315 -7
  69. package/fullstacked_modules/zod/src/v4/classic/tests/transform.test.ts +111 -0
  70. package/fullstacked_modules/zod/src/v4/classic/tests/tuple.test.ts +2 -2
  71. package/fullstacked_modules/zod/src/v4/classic/tests/union.test.ts +90 -3
  72. package/fullstacked_modules/zod/src/v4/core/api.ts +160 -133
  73. package/fullstacked_modules/zod/src/v4/core/checks.ts +6 -2
  74. package/fullstacked_modules/zod/src/v4/core/core.ts +9 -28
  75. package/fullstacked_modules/zod/src/v4/core/doc.ts +2 -2
  76. package/fullstacked_modules/zod/src/v4/core/errors.ts +49 -60
  77. package/fullstacked_modules/zod/src/v4/core/index.ts +0 -1
  78. package/fullstacked_modules/zod/src/v4/core/json-schema.ts +7 -3
  79. package/fullstacked_modules/zod/src/v4/core/parse.ts +101 -0
  80. package/fullstacked_modules/zod/src/v4/core/regexes.ts +56 -14
  81. package/fullstacked_modules/zod/src/v4/core/registries.ts +5 -4
  82. package/fullstacked_modules/zod/src/v4/core/schemas.ts +705 -230
  83. package/fullstacked_modules/zod/src/v4/core/tests/extend.test.ts +18 -0
  84. package/fullstacked_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  85. package/fullstacked_modules/zod/src/v4/core/to-json-schema.ts +100 -33
  86. package/fullstacked_modules/zod/src/v4/core/util.ts +237 -102
  87. package/fullstacked_modules/zod/src/v4/core/versions.ts +2 -2
  88. package/fullstacked_modules/zod/src/v4/locales/bg.ts +136 -0
  89. package/fullstacked_modules/zod/src/v4/locales/da.ts +141 -0
  90. package/fullstacked_modules/zod/src/v4/locales/es.ts +44 -10
  91. package/fullstacked_modules/zod/src/v4/locales/index.ts +8 -0
  92. package/fullstacked_modules/zod/src/v4/locales/is.ts +127 -0
  93. package/fullstacked_modules/zod/src/v4/locales/ka.ts +138 -0
  94. package/fullstacked_modules/zod/src/v4/locales/kh.ts +3 -122
  95. package/fullstacked_modules/zod/src/v4/locales/km.ts +126 -0
  96. package/fullstacked_modules/zod/src/v4/locales/lt.ts +265 -0
  97. package/fullstacked_modules/zod/src/v4/locales/ua.ts +3 -122
  98. package/fullstacked_modules/zod/src/v4/locales/uk.ts +126 -0
  99. package/fullstacked_modules/zod/src/v4/locales/yo.ts +131 -0
  100. package/fullstacked_modules/zod/src/v4/mini/external.ts +1 -1
  101. package/fullstacked_modules/zod/src/v4/mini/parse.ts +14 -1
  102. package/fullstacked_modules/zod/src/v4/mini/schemas.ts +186 -40
  103. package/fullstacked_modules/zod/src/v4/mini/tests/assignability.test.ts +1 -1
  104. package/fullstacked_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
  105. package/fullstacked_modules/zod/src/v4/mini/tests/computed.test.ts +1 -1
  106. package/fullstacked_modules/zod/src/v4/mini/tests/error.test.ts +1 -1
  107. package/fullstacked_modules/zod/src/v4/mini/tests/index.test.ts +29 -1
  108. package/fullstacked_modules/zod/src/v4/mini/tests/number.test.ts +1 -1
  109. package/fullstacked_modules/zod/src/v4/mini/tests/object.test.ts +16 -1
  110. package/fullstacked_modules/zod/src/v4/mini/tests/prototypes.test.ts +1 -1
  111. package/fullstacked_modules/zod/src/v4/mini/tests/recursive-types.test.ts +1 -1
  112. package/fullstacked_modules/zod/src/v4/mini/tests/string.test.ts +17 -1
  113. package/fullstacked_modules/zod/v3/ZodError.cjs +1 -1
  114. package/fullstacked_modules/zod/v3/ZodError.d.cts +6 -6
  115. package/fullstacked_modules/zod/v3/ZodError.d.ts +6 -6
  116. package/fullstacked_modules/zod/v3/ZodError.js +1 -1
  117. package/fullstacked_modules/zod/v3/locales/en.cjs +1 -0
  118. package/fullstacked_modules/zod/v3/locales/en.d.cts +1 -1
  119. package/fullstacked_modules/zod/v3/package.json +6 -0
  120. package/fullstacked_modules/zod/v3/types.cjs +2 -0
  121. package/fullstacked_modules/zod/v3/types.d.cts +4 -1
  122. package/fullstacked_modules/zod/v3/types.d.ts +4 -1
  123. package/fullstacked_modules/zod/v3/types.js +2 -0
  124. package/fullstacked_modules/zod/v4/classic/checks.d.cts +1 -1
  125. package/fullstacked_modules/zod/v4/classic/checks.d.ts +1 -1
  126. package/fullstacked_modules/zod/v4/classic/compat.cjs +5 -1
  127. package/fullstacked_modules/zod/v4/classic/compat.d.cts +4 -0
  128. package/fullstacked_modules/zod/v4/classic/compat.d.ts +4 -0
  129. package/fullstacked_modules/zod/v4/classic/compat.js +4 -0
  130. package/fullstacked_modules/zod/v4/classic/errors.cjs +9 -2
  131. package/fullstacked_modules/zod/v4/classic/errors.js +9 -2
  132. package/fullstacked_modules/zod/v4/classic/external.cjs +2 -2
  133. package/fullstacked_modules/zod/v4/classic/external.d.cts +1 -1
  134. package/fullstacked_modules/zod/v4/classic/external.d.ts +1 -1
  135. package/fullstacked_modules/zod/v4/classic/external.js +1 -1
  136. package/fullstacked_modules/zod/v4/classic/package.json +6 -0
  137. package/fullstacked_modules/zod/v4/classic/parse.cjs +10 -1
  138. package/fullstacked_modules/zod/v4/classic/parse.d.cts +8 -0
  139. package/fullstacked_modules/zod/v4/classic/parse.d.ts +8 -0
  140. package/fullstacked_modules/zod/v4/classic/parse.js +9 -0
  141. package/fullstacked_modules/zod/v4/classic/schemas.cjs +90 -48
  142. package/fullstacked_modules/zod/v4/classic/schemas.d.cts +70 -27
  143. package/fullstacked_modules/zod/v4/classic/schemas.d.ts +70 -27
  144. package/fullstacked_modules/zod/v4/classic/schemas.js +81 -47
  145. package/fullstacked_modules/zod/v4/core/api.cjs +52 -31
  146. package/fullstacked_modules/zod/v4/core/api.d.cts +87 -76
  147. package/fullstacked_modules/zod/v4/core/api.d.ts +87 -76
  148. package/fullstacked_modules/zod/v4/core/api.js +50 -31
  149. package/fullstacked_modules/zod/v4/core/checks.cjs +4 -0
  150. package/fullstacked_modules/zod/v4/core/checks.d.cts +2 -2
  151. package/fullstacked_modules/zod/v4/core/checks.d.ts +2 -2
  152. package/fullstacked_modules/zod/v4/core/checks.js +4 -0
  153. package/fullstacked_modules/zod/v4/core/core.cjs +8 -1
  154. package/fullstacked_modules/zod/v4/core/core.d.cts +5 -2
  155. package/fullstacked_modules/zod/v4/core/core.d.ts +5 -2
  156. package/fullstacked_modules/zod/v4/core/core.js +6 -0
  157. package/fullstacked_modules/zod/v4/core/doc.d.cts +1 -1
  158. package/fullstacked_modules/zod/v4/core/doc.d.ts +1 -1
  159. package/fullstacked_modules/zod/v4/core/errors.cjs +6 -19
  160. package/fullstacked_modules/zod/v4/core/errors.d.cts +24 -22
  161. package/fullstacked_modules/zod/v4/core/errors.d.ts +24 -22
  162. package/fullstacked_modules/zod/v4/core/errors.js +6 -19
  163. package/fullstacked_modules/zod/v4/core/index.cjs +0 -1
  164. package/fullstacked_modules/zod/v4/core/index.d.cts +0 -1
  165. package/fullstacked_modules/zod/v4/core/index.d.ts +0 -1
  166. package/fullstacked_modules/zod/v4/core/index.js +0 -1
  167. package/fullstacked_modules/zod/v4/core/json-schema.d.cts +4 -3
  168. package/fullstacked_modules/zod/v4/core/json-schema.d.ts +4 -3
  169. package/fullstacked_modules/zod/v4/core/package.json +6 -0
  170. package/fullstacked_modules/zod/v4/core/parse.cjs +45 -1
  171. package/fullstacked_modules/zod/v4/core/parse.d.cts +24 -0
  172. package/fullstacked_modules/zod/v4/core/parse.d.ts +24 -0
  173. package/fullstacked_modules/zod/v4/core/parse.js +36 -0
  174. package/fullstacked_modules/zod/v4/core/regexes.cjs +49 -16
  175. package/fullstacked_modules/zod/v4/core/regexes.d.cts +18 -2
  176. package/fullstacked_modules/zod/v4/core/regexes.d.ts +18 -2
  177. package/fullstacked_modules/zod/v4/core/regexes.js +46 -14
  178. package/fullstacked_modules/zod/v4/core/registries.cjs +4 -3
  179. package/fullstacked_modules/zod/v4/core/registries.d.cts +2 -2
  180. package/fullstacked_modules/zod/v4/core/registries.d.ts +2 -2
  181. package/fullstacked_modules/zod/v4/core/registries.js +4 -3
  182. package/fullstacked_modules/zod/v4/core/schemas.cjs +409 -171
  183. package/fullstacked_modules/zod/v4/core/schemas.d.cts +88 -16
  184. package/fullstacked_modules/zod/v4/core/schemas.d.ts +88 -16
  185. package/fullstacked_modules/zod/v4/core/schemas.js +408 -170
  186. package/fullstacked_modules/zod/v4/core/to-json-schema.cjs +97 -31
  187. package/fullstacked_modules/zod/v4/core/to-json-schema.d.cts +5 -3
  188. package/fullstacked_modules/zod/v4/core/to-json-schema.d.ts +5 -3
  189. package/fullstacked_modules/zod/v4/core/to-json-schema.js +97 -31
  190. package/fullstacked_modules/zod/v4/core/util.cjs +220 -101
  191. package/fullstacked_modules/zod/v4/core/util.d.cts +14 -0
  192. package/fullstacked_modules/zod/v4/core/util.d.ts +14 -0
  193. package/fullstacked_modules/zod/v4/core/util.js +209 -101
  194. package/fullstacked_modules/zod/v4/core/versions.cjs +2 -2
  195. package/fullstacked_modules/zod/v4/core/versions.d.cts +1 -1
  196. package/fullstacked_modules/zod/v4/core/versions.d.ts +1 -1
  197. package/fullstacked_modules/zod/v4/core/versions.js +2 -2
  198. package/fullstacked_modules/zod/v4/locales/ar.cjs +1 -0
  199. package/fullstacked_modules/zod/v4/locales/ar.d.cts +2 -1
  200. package/fullstacked_modules/zod/v4/locales/az.cjs +1 -0
  201. package/fullstacked_modules/zod/v4/locales/az.d.cts +2 -1
  202. package/fullstacked_modules/zod/v4/locales/be.cjs +1 -0
  203. package/fullstacked_modules/zod/v4/locales/be.d.cts +2 -1
  204. package/fullstacked_modules/zod/v4/locales/bg.cjs +156 -0
  205. package/fullstacked_modules/zod/v4/locales/bg.d.cts +5 -0
  206. package/fullstacked_modules/zod/v4/locales/bg.d.ts +5 -0
  207. package/fullstacked_modules/zod/v4/locales/bg.js +128 -0
  208. package/fullstacked_modules/zod/v4/locales/ca.cjs +1 -0
  209. package/fullstacked_modules/zod/v4/locales/ca.d.cts +2 -1
  210. package/fullstacked_modules/zod/v4/locales/cs.cjs +1 -0
  211. package/fullstacked_modules/zod/v4/locales/cs.d.cts +2 -1
  212. package/fullstacked_modules/zod/v4/locales/da.cjs +158 -0
  213. package/fullstacked_modules/zod/v4/locales/da.d.cts +5 -0
  214. package/fullstacked_modules/zod/v4/locales/da.d.ts +4 -0
  215. package/fullstacked_modules/zod/v4/locales/da.js +131 -0
  216. package/fullstacked_modules/zod/v4/locales/de.cjs +1 -0
  217. package/fullstacked_modules/zod/v4/locales/de.d.cts +2 -1
  218. package/fullstacked_modules/zod/v4/locales/es.cjs +43 -10
  219. package/fullstacked_modules/zod/v4/locales/es.d.cts +2 -1
  220. package/fullstacked_modules/zod/v4/locales/es.js +42 -10
  221. package/fullstacked_modules/zod/v4/locales/fa.cjs +1 -0
  222. package/fullstacked_modules/zod/v4/locales/fa.d.cts +2 -1
  223. package/fullstacked_modules/zod/v4/locales/fi.cjs +1 -0
  224. package/fullstacked_modules/zod/v4/locales/fi.d.cts +2 -1
  225. package/fullstacked_modules/zod/v4/locales/fr-CA.cjs +1 -0
  226. package/fullstacked_modules/zod/v4/locales/fr-CA.d.cts +2 -1
  227. package/fullstacked_modules/zod/v4/locales/fr.cjs +1 -0
  228. package/fullstacked_modules/zod/v4/locales/fr.d.cts +2 -1
  229. package/fullstacked_modules/zod/v4/locales/he.cjs +1 -0
  230. package/fullstacked_modules/zod/v4/locales/he.d.cts +2 -1
  231. package/fullstacked_modules/zod/v4/locales/hu.cjs +1 -0
  232. package/fullstacked_modules/zod/v4/locales/hu.d.cts +2 -1
  233. package/fullstacked_modules/zod/v4/locales/id.cjs +1 -0
  234. package/fullstacked_modules/zod/v4/locales/id.d.cts +2 -1
  235. package/fullstacked_modules/zod/v4/locales/index.cjs +17 -1
  236. package/fullstacked_modules/zod/v4/locales/index.d.cts +8 -0
  237. package/fullstacked_modules/zod/v4/locales/index.d.ts +8 -0
  238. package/fullstacked_modules/zod/v4/locales/index.js +8 -0
  239. package/fullstacked_modules/zod/v4/locales/is.cjs +145 -0
  240. package/fullstacked_modules/zod/v4/locales/is.d.cts +5 -0
  241. package/fullstacked_modules/zod/v4/locales/is.d.ts +5 -0
  242. package/fullstacked_modules/zod/v4/locales/is.js +117 -0
  243. package/fullstacked_modules/zod/v4/locales/it.cjs +1 -0
  244. package/fullstacked_modules/zod/v4/locales/it.d.cts +2 -1
  245. package/fullstacked_modules/zod/v4/locales/ja.cjs +1 -0
  246. package/fullstacked_modules/zod/v4/locales/ja.d.cts +2 -1
  247. package/fullstacked_modules/zod/v4/locales/ka.cjs +153 -0
  248. package/fullstacked_modules/zod/v4/locales/ka.d.cts +5 -0
  249. package/fullstacked_modules/zod/v4/locales/ka.d.ts +5 -0
  250. package/fullstacked_modules/zod/v4/locales/ka.js +125 -0
  251. package/fullstacked_modules/zod/v4/locales/kh.cjs +6 -137
  252. package/fullstacked_modules/zod/v4/locales/kh.d.cts +2 -1
  253. package/fullstacked_modules/zod/v4/locales/kh.d.ts +1 -0
  254. package/fullstacked_modules/zod/v4/locales/kh.js +3 -115
  255. package/fullstacked_modules/zod/v4/locales/km.cjs +144 -0
  256. package/fullstacked_modules/zod/v4/locales/km.d.cts +5 -0
  257. package/fullstacked_modules/zod/v4/locales/km.d.ts +4 -0
  258. package/fullstacked_modules/zod/v4/locales/km.js +117 -0
  259. package/fullstacked_modules/zod/v4/locales/ko.cjs +1 -0
  260. package/fullstacked_modules/zod/v4/locales/ko.d.cts +2 -1
  261. package/fullstacked_modules/zod/v4/locales/lt.cjs +258 -0
  262. package/fullstacked_modules/zod/v4/locales/lt.d.cts +5 -0
  263. package/fullstacked_modules/zod/v4/locales/lt.d.ts +5 -0
  264. package/fullstacked_modules/zod/v4/locales/lt.js +230 -0
  265. package/fullstacked_modules/zod/v4/locales/mk.cjs +1 -0
  266. package/fullstacked_modules/zod/v4/locales/mk.d.cts +2 -1
  267. package/fullstacked_modules/zod/v4/locales/ms.cjs +1 -0
  268. package/fullstacked_modules/zod/v4/locales/ms.d.cts +2 -1
  269. package/fullstacked_modules/zod/v4/locales/nl.cjs +1 -0
  270. package/fullstacked_modules/zod/v4/locales/nl.d.cts +2 -1
  271. package/fullstacked_modules/zod/v4/locales/no.cjs +1 -0
  272. package/fullstacked_modules/zod/v4/locales/no.d.cts +2 -1
  273. package/fullstacked_modules/zod/v4/locales/ota.cjs +1 -0
  274. package/fullstacked_modules/zod/v4/locales/ota.d.cts +2 -1
  275. package/fullstacked_modules/zod/v4/locales/package.json +6 -0
  276. package/fullstacked_modules/zod/v4/locales/pl.cjs +1 -0
  277. package/fullstacked_modules/zod/v4/locales/pl.d.cts +2 -1
  278. package/fullstacked_modules/zod/v4/locales/ps.cjs +1 -0
  279. package/fullstacked_modules/zod/v4/locales/ps.d.cts +2 -1
  280. package/fullstacked_modules/zod/v4/locales/pt.cjs +1 -0
  281. package/fullstacked_modules/zod/v4/locales/pt.d.cts +2 -1
  282. package/fullstacked_modules/zod/v4/locales/ru.cjs +1 -0
  283. package/fullstacked_modules/zod/v4/locales/ru.d.cts +2 -1
  284. package/fullstacked_modules/zod/v4/locales/sl.cjs +1 -0
  285. package/fullstacked_modules/zod/v4/locales/sl.d.cts +2 -1
  286. package/fullstacked_modules/zod/v4/locales/sv.cjs +1 -0
  287. package/fullstacked_modules/zod/v4/locales/sv.d.cts +2 -1
  288. package/fullstacked_modules/zod/v4/locales/ta.cjs +1 -0
  289. package/fullstacked_modules/zod/v4/locales/ta.d.cts +2 -1
  290. package/fullstacked_modules/zod/v4/locales/th.cjs +1 -0
  291. package/fullstacked_modules/zod/v4/locales/th.d.cts +2 -1
  292. package/fullstacked_modules/zod/v4/locales/ua.cjs +6 -137
  293. package/fullstacked_modules/zod/v4/locales/ua.d.cts +2 -1
  294. package/fullstacked_modules/zod/v4/locales/ua.d.ts +1 -0
  295. package/fullstacked_modules/zod/v4/locales/ua.js +3 -115
  296. package/fullstacked_modules/zod/v4/locales/uk.cjs +144 -0
  297. package/fullstacked_modules/zod/v4/locales/uk.d.cts +5 -0
  298. package/fullstacked_modules/zod/v4/locales/uk.d.ts +4 -0
  299. package/fullstacked_modules/zod/v4/locales/uk.js +117 -0
  300. package/fullstacked_modules/zod/v4/locales/ur.cjs +1 -0
  301. package/fullstacked_modules/zod/v4/locales/ur.d.cts +2 -1
  302. package/fullstacked_modules/zod/v4/locales/vi.cjs +1 -0
  303. package/fullstacked_modules/zod/v4/locales/vi.d.cts +2 -1
  304. package/fullstacked_modules/zod/v4/locales/yo.cjs +142 -0
  305. package/fullstacked_modules/zod/v4/locales/yo.d.cts +5 -0
  306. package/fullstacked_modules/zod/v4/locales/yo.d.ts +4 -0
  307. package/fullstacked_modules/zod/v4/locales/yo.js +115 -0
  308. package/fullstacked_modules/zod/v4/locales/zh-CN.cjs +1 -0
  309. package/fullstacked_modules/zod/v4/locales/zh-CN.d.cts +2 -1
  310. package/fullstacked_modules/zod/v4/locales/zh-TW.cjs +1 -0
  311. package/fullstacked_modules/zod/v4/locales/zh-TW.d.cts +2 -1
  312. package/fullstacked_modules/zod/v4/mini/external.cjs +2 -2
  313. package/fullstacked_modules/zod/v4/mini/external.d.cts +1 -1
  314. package/fullstacked_modules/zod/v4/mini/external.d.ts +1 -1
  315. package/fullstacked_modules/zod/v4/mini/external.js +1 -1
  316. package/fullstacked_modules/zod/v4/mini/package.json +6 -0
  317. package/fullstacked_modules/zod/v4/mini/parse.cjs +9 -1
  318. package/fullstacked_modules/zod/v4/mini/parse.d.cts +1 -1
  319. package/fullstacked_modules/zod/v4/mini/parse.d.ts +1 -1
  320. package/fullstacked_modules/zod/v4/mini/parse.js +1 -1
  321. package/fullstacked_modules/zod/v4/mini/schemas.cjs +77 -24
  322. package/fullstacked_modules/zod/v4/mini/schemas.d.cts +56 -5
  323. package/fullstacked_modules/zod/v4/mini/schemas.d.ts +56 -5
  324. package/fullstacked_modules/zod/v4/mini/schemas.js +66 -23
  325. package/fullstacked_modules/zod/v4/package.json +6 -0
  326. package/fullstacked_modules/zod/v4-mini/package.json +6 -0
  327. package/index.js +1 -1
  328. package/package.json +1 -1
  329. package/fullstacked_modules/@fullstacked/ai-agent/story.txt +0 -7
  330. package/fullstacked_modules/@fullstacked/ai-agent/summary.txt +0 -7
  331. package/fullstacked_modules/zod/src/v4/core/function.ts +0 -176
  332. package/fullstacked_modules/zod/v4/core/function.cjs +0 -102
  333. package/fullstacked_modules/zod/v4/core/function.d.cts +0 -52
  334. package/fullstacked_modules/zod/v4/core/function.d.ts +0 -52
  335. package/fullstacked_modules/zod/v4/core/function.js +0 -75
@@ -13,10 +13,6 @@ import * as parse from "./parse.js";
13
13
  ///////////////////////////////////////////
14
14
  ///////////////////////////////////////////
15
15
 
16
- export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
17
- addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
18
- }
19
-
20
16
  export interface ZodType<
21
17
  out Output = unknown,
22
18
  out Input = unknown,
@@ -59,11 +55,32 @@ export interface ZodType<
59
55
  params?: core.ParseContext<core.$ZodIssue>
60
56
  ) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
61
57
 
58
+ // encoding/decoding
59
+ encode(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): core.input<this>;
60
+ decode(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
61
+ encodeAsync(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<core.input<this>>;
62
+ decodeAsync(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
63
+ safeEncode(
64
+ data: core.output<this>,
65
+ params?: core.ParseContext<core.$ZodIssue>
66
+ ): parse.ZodSafeParseResult<core.input<this>>;
67
+ safeDecode(
68
+ data: core.input<this>,
69
+ params?: core.ParseContext<core.$ZodIssue>
70
+ ): parse.ZodSafeParseResult<core.output<this>>;
71
+ safeEncodeAsync(
72
+ data: core.output<this>,
73
+ params?: core.ParseContext<core.$ZodIssue>
74
+ ): Promise<parse.ZodSafeParseResult<core.input<this>>>;
75
+ safeDecodeAsync(
76
+ data: core.input<this>,
77
+ params?: core.ParseContext<core.$ZodIssue>
78
+ ): Promise<parse.ZodSafeParseResult<core.output<this>>>;
79
+
62
80
  // refinements
63
81
  refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
64
- /** @deprecated Use `.check()` instead. */
65
82
  superRefine(
66
- refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>
83
+ refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>
67
84
  ): this;
68
85
  overwrite(fn: (x: core.output<this>) => core.output<this>): this;
69
86
 
@@ -72,7 +89,7 @@ export interface ZodType<
72
89
  nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
73
90
  nullable(): ZodNullable<this>;
74
91
  nullish(): ZodOptional<ZodNullable<this>>;
75
- default(def: core.output<this>): ZodDefault<this>;
92
+ default(def: util.NoUndefined<core.output<this>>): ZodDefault<this>;
76
93
  default(def: () => util.NoUndefined<core.output<this>>): ZodDefault<this>;
77
94
  prefault(def: () => core.input<this>): ZodPrefault<this>;
78
95
  prefault(def: core.input<this>): ZodPrefault<this>;
@@ -80,7 +97,7 @@ export interface ZodType<
80
97
  or<T extends core.SomeType>(option: T): ZodUnion<[this, T]>;
81
98
  and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
82
99
  transform<NewOut>(
83
- transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>
100
+ transform: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>
84
101
  ): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
85
102
  catch(def: core.output<this>): ZodCatch<this>;
86
103
  catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
@@ -123,21 +140,20 @@ export interface _ZodType<out Internals extends core.$ZodTypeInternals = core.$Z
123
140
  export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) => {
124
141
  core.$ZodType.init(inst, def);
125
142
  inst.def = def;
143
+ inst.type = def.type;
126
144
  Object.defineProperty(inst, "_def", { value: def });
127
145
 
128
146
  // base methods
129
147
  inst.check = (...checks) => {
130
148
  return inst.clone(
131
- {
132
- ...def,
149
+ util.mergeDefs(def, {
133
150
  checks: [
134
151
  ...(def.checks ?? []),
135
152
  ...checks.map((ch) =>
136
153
  typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch
137
154
  ),
138
155
  ],
139
- }
140
- // { parent: true }
156
+ })
141
157
  );
142
158
  };
143
159
  inst.clone = (def, params) => core.clone(inst, def, params);
@@ -154,6 +170,16 @@ export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$construct
154
170
  inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
155
171
  inst.spa = inst.safeParseAsync;
156
172
 
173
+ // encoding/decoding
174
+ inst.encode = (data, params) => parse.encode(inst, data, params);
175
+ inst.decode = (data, params) => parse.decode(inst, data, params);
176
+ inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);
177
+ inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);
178
+ inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);
179
+ inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);
180
+ inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);
181
+ inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);
182
+
157
183
  // refinements
158
184
  inst.refine = (check, params) => inst.check(refine(check, params));
159
185
  inst.superRefine = (refinement) => inst.check(superRefine(refinement));
@@ -454,6 +480,14 @@ export function url(params?: string | core.$ZodURLParams): ZodURL {
454
480
  return core._url(ZodURL, params);
455
481
  }
456
482
 
483
+ export function httpUrl(params?: string | Omit<core.$ZodURLParams, "protocol" | "hostname">): ZodURL {
484
+ return core._url(ZodURL, {
485
+ protocol: /^https?$/,
486
+ hostname: core.regexes.domain,
487
+ ...util.normalizeParams(params),
488
+ });
489
+ }
490
+
457
491
  // ZodEmoji
458
492
  export interface ZodEmoji extends ZodStringFormat<"emoji"> {
459
493
  _zod: core.$ZodEmojiInternals;
@@ -698,6 +732,27 @@ export function stringFormat<Format extends string>(
698
732
  return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params) as any;
699
733
  }
700
734
 
735
+ export function hostname(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hostname"> {
736
+ return core._stringFormat(ZodCustomStringFormat, "hostname", core.regexes.hostname, _params) as any;
737
+ }
738
+
739
+ export function hex(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hex"> {
740
+ return core._stringFormat(ZodCustomStringFormat, "hex", core.regexes.hex, _params) as any;
741
+ }
742
+
743
+ export function hash<Alg extends util.HashAlgorithm, Enc extends util.HashEncoding = "hex">(
744
+ alg: Alg,
745
+ params?: {
746
+ enc?: Enc;
747
+ } & core.$ZodStringFormatParams
748
+ ): ZodCustomStringFormat<`${Alg}_${Enc}`> {
749
+ const enc = params?.enc ?? "hex";
750
+ const format = `${alg}_${enc}` as const;
751
+ const regex = core.regexes[format as keyof typeof core.regexes] as RegExp;
752
+ if (!regex) throw new Error(`Unrecognized hash format: ${format}`);
753
+ return core._stringFormat(ZodCustomStringFormat, format, regex, params) as any;
754
+ }
755
+
701
756
  // ZodNumber
702
757
  export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals>
703
758
  extends _ZodType<Internals> {
@@ -1039,13 +1094,23 @@ export function array<T extends core.SomeType>(element: T, params?: string | cor
1039
1094
  }
1040
1095
 
1041
1096
  // .keyof
1042
- export function keyof<T extends ZodObject>(schema: T): ZodLiteral<Exclude<keyof T["_zod"]["output"], symbol>> {
1097
+ export function keyof<T extends ZodObject>(schema: T): ZodEnum<util.KeysEnum<T["_zod"]["output"]>> {
1043
1098
  const shape = schema._zod.def.shape;
1044
- return literal(Object.keys(shape)) as any;
1099
+ return _enum(Object.keys(shape)) as any;
1045
1100
  }
1046
1101
 
1047
1102
  // ZodObject
1048
1103
 
1104
+ export type SafeExtendShape<Base extends core.$ZodShape, Ext extends core.$ZodLooseShape> = {
1105
+ [K in keyof Ext]: K extends keyof Base
1106
+ ? core.output<Ext[K]> extends core.output<Base[K]>
1107
+ ? core.input<Ext[K]> extends core.input<Base[K]>
1108
+ ? Ext[K]
1109
+ : never
1110
+ : never
1111
+ : Ext[K];
1112
+ };
1113
+
1049
1114
  export interface ZodObject<
1050
1115
  /** @ts-ignore Cast variance */
1051
1116
  out Shape extends core.$ZodShape = core.$ZodLooseShape,
@@ -1069,22 +1134,14 @@ export interface ZodObject<
1069
1134
  /** This is the default behavior. This method call is likely unnecessary. */
1070
1135
  strip(): ZodObject<Shape, core.$strip>;
1071
1136
 
1072
- extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(
1073
- shape: U
1137
+ extend<U extends core.$ZodLooseShape>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
1138
+
1139
+ safeExtend<U extends core.$ZodLooseShape>(
1140
+ shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, core.SomeType>>
1074
1141
  ): ZodObject<util.Extend<Shape, U>, Config>;
1075
1142
 
1076
1143
  /**
1077
- * @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
1078
- *
1079
- * ```ts
1080
- * const A = z.object({ a: z.string() });
1081
- * const B = z.object({ b: z.number() });
1082
- *
1083
- * const C = z.object({
1084
- * ...A.shape,
1085
- * ...B.shape
1086
- * });
1087
- * ```
1144
+ * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
1088
1145
  */
1089
1146
  merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
1090
1147
 
@@ -1134,14 +1191,16 @@ export interface ZodObject<
1134
1191
  }
1135
1192
 
1136
1193
  export const ZodObject: core.$constructor<ZodObject> = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def) => {
1137
- core.$ZodObject.init(inst, def);
1194
+ core.$ZodObjectJIT.init(inst, def);
1138
1195
  ZodType.init(inst, def);
1139
1196
 
1140
- util.defineLazy(inst, "shape", () => def.shape);
1197
+ util.defineLazy(inst, "shape", () => {
1198
+ return def.shape;
1199
+ });
1200
+
1141
1201
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape)) as any;
1142
1202
  inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall as any as core.$ZodType }) as any;
1143
1203
  inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
1144
- // inst.nonstrict = () => inst.clone({ ...inst._zod.def, catchall: api.unknown() });
1145
1204
  inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
1146
1205
  inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
1147
1206
  inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
@@ -1149,6 +1208,9 @@ export const ZodObject: core.$constructor<ZodObject> = /*@__PURE__*/ core.$const
1149
1208
  inst.extend = (incoming: any) => {
1150
1209
  return util.extend(inst, incoming);
1151
1210
  };
1211
+ inst.safeExtend = (incoming: any) => {
1212
+ return util.safeExtend(inst, incoming);
1213
+ };
1152
1214
  inst.merge = (other) => util.merge(inst, other);
1153
1215
  inst.pick = (mask) => util.pick(inst, mask);
1154
1216
  inst.omit = (mask) => util.omit(inst, mask);
@@ -1162,10 +1224,7 @@ export function object<T extends core.$ZodLooseShape = Partial<Record<never, cor
1162
1224
  ): ZodObject<util.Writeable<T>, core.$strip> {
1163
1225
  const def: core.$ZodObjectDef = {
1164
1226
  type: "object",
1165
- get shape() {
1166
- util.assignProp(this, "shape", { ...shape });
1167
- return this.shape;
1168
- },
1227
+ shape: shape ?? {},
1169
1228
  ...util.normalizeParams(params),
1170
1229
  };
1171
1230
  return new ZodObject(def) as any;
@@ -1179,10 +1238,7 @@ export function strictObject<T extends core.$ZodLooseShape>(
1179
1238
  ): ZodObject<T, core.$strict> {
1180
1239
  return new ZodObject({
1181
1240
  type: "object",
1182
- get shape() {
1183
- util.assignProp(this, "shape", { ...shape });
1184
- return this.shape;
1185
- },
1241
+ shape,
1186
1242
  catchall: never(),
1187
1243
  ...util.normalizeParams(params),
1188
1244
  }) as any;
@@ -1196,10 +1252,7 @@ export function looseObject<T extends core.$ZodLooseShape>(
1196
1252
  ): ZodObject<T, core.$loose> {
1197
1253
  return new ZodObject({
1198
1254
  type: "object",
1199
- get shape() {
1200
- util.assignProp(this, "shape", { ...shape });
1201
- return this.shape;
1202
- },
1255
+ shape,
1203
1256
  catchall: unknown(),
1204
1257
  ...util.normalizeParams(params),
1205
1258
  }) as any;
@@ -1229,10 +1282,13 @@ export function union<const T extends readonly core.SomeType[]>(
1229
1282
  }
1230
1283
 
1231
1284
  // ZodDiscriminatedUnion
1232
- export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[]>
1233
- extends ZodUnion<Options>,
1234
- core.$ZodDiscriminatedUnion<Options> {
1235
- _zod: core.$ZodDiscriminatedUnionInternals<Options>;
1285
+ export interface ZodDiscriminatedUnion<
1286
+ Options extends readonly core.SomeType[] = readonly core.$ZodType[],
1287
+ Disc extends string = string,
1288
+ > extends ZodUnion<Options>,
1289
+ core.$ZodDiscriminatedUnion<Options, Disc> {
1290
+ _zod: core.$ZodDiscriminatedUnionInternals<Options, Disc>;
1291
+ def: core.$ZodDiscriminatedUnionDef<Options, Disc>;
1236
1292
  }
1237
1293
  export const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion> = /*@__PURE__*/ core.$constructor(
1238
1294
  "ZodDiscriminatedUnion",
@@ -1244,11 +1300,12 @@ export const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion> = /
1244
1300
 
1245
1301
  export function discriminatedUnion<
1246
1302
  Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]],
1303
+ Disc extends string,
1247
1304
  >(
1248
- discriminator: string,
1305
+ discriminator: Disc,
1249
1306
  options: Types,
1250
1307
  params?: string | core.$ZodDiscriminatedUnionParams
1251
- ): ZodDiscriminatedUnion<Types> {
1308
+ ): ZodDiscriminatedUnion<Types, Disc> {
1252
1309
  // const [options, params] = args;
1253
1310
  return new ZodDiscriminatedUnion({
1254
1311
  type: "union",
@@ -1360,9 +1417,11 @@ export function partialRecord<Key extends core.$ZodRecordKey, Value extends core
1360
1417
  valueType: Value,
1361
1418
  params?: string | core.$ZodRecordParams
1362
1419
  ): ZodRecord<Key & core.$partial, Value> {
1420
+ const k = core.clone(keyType);
1421
+ k._zod.values = undefined;
1363
1422
  return new ZodRecord({
1364
1423
  type: "record",
1365
- keyType: union([keyType, never()]),
1424
+ keyType: k,
1366
1425
  valueType: valueType as any,
1367
1426
  ...util.normalizeParams(params),
1368
1427
  }) as any;
@@ -1400,7 +1459,6 @@ export interface ZodSet<T extends core.SomeType = core.$ZodType>
1400
1459
  extends _ZodType<core.$ZodSetInternals<T>>,
1401
1460
  core.$ZodSet<T> {
1402
1461
  min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;
1403
- /** */
1404
1462
  nonempty(params?: string | core.$ZodCheckMinSizeParams): this;
1405
1463
  max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;
1406
1464
  size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
@@ -1583,7 +1641,11 @@ export const ZodTransform: core.$constructor<ZodTransform> = /*@__PURE__*/ core.
1583
1641
  ZodType.init(inst, def);
1584
1642
 
1585
1643
  inst._zod.parse = (payload, _ctx) => {
1586
- (payload as RefinementCtx).addIssue = (issue) => {
1644
+ if (_ctx.direction === "backward") {
1645
+ throw new core.$ZodEncodeError(inst.constructor.name);
1646
+ }
1647
+
1648
+ (payload as core.$RefinementCtx).addIssue = (issue) => {
1587
1649
  if (typeof issue === "string") {
1588
1650
  payload.issues.push(util.issue(issue, payload.value, def));
1589
1651
  } else {
@@ -1594,7 +1656,7 @@ export const ZodTransform: core.$constructor<ZodTransform> = /*@__PURE__*/ core.
1594
1656
  _issue.code ??= "custom";
1595
1657
  _issue.input ??= payload.value;
1596
1658
  _issue.inst ??= inst;
1597
- _issue.continue ??= true;
1659
+ // _issue.continue ??= true;
1598
1660
  payload.issues.push(util.issue(_issue));
1599
1661
  }
1600
1662
  };
@@ -1696,7 +1758,7 @@ export function _default<T extends core.SomeType>(
1696
1758
  type: "default",
1697
1759
  innerType: innerType as any as core.$ZodType,
1698
1760
  get defaultValue() {
1699
- return typeof defaultValue === "function" ? (defaultValue as Function)() : defaultValue;
1761
+ return typeof defaultValue === "function" ? (defaultValue as Function)() : util.shallowClone(defaultValue);
1700
1762
  },
1701
1763
  }) as any;
1702
1764
  }
@@ -1724,7 +1786,7 @@ export function prefault<T extends core.SomeType>(
1724
1786
  type: "prefault",
1725
1787
  innerType: innerType as any as core.$ZodType,
1726
1788
  get defaultValue() {
1727
- return typeof defaultValue === "function" ? (defaultValue as Function)() : defaultValue;
1789
+ return typeof defaultValue === "function" ? (defaultValue as Function)() : util.shallowClone(defaultValue);
1728
1790
  },
1729
1791
  }) as any;
1730
1792
  }
@@ -1845,15 +1907,48 @@ export function pipe(in_: core.SomeType, out: core.SomeType) {
1845
1907
  });
1846
1908
  }
1847
1909
 
1910
+ // ZodCodec
1911
+ export interface ZodCodec<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType>
1912
+ extends ZodPipe<A, B>,
1913
+ core.$ZodCodec<A, B> {
1914
+ _zod: core.$ZodCodecInternals<A, B>;
1915
+ def: core.$ZodCodecDef<A, B>;
1916
+ }
1917
+ export const ZodCodec: core.$constructor<ZodCodec> = /*@__PURE__*/ core.$constructor("ZodCodec", (inst, def) => {
1918
+ ZodPipe.init(inst, def);
1919
+ core.$ZodCodec.init(inst, def);
1920
+ });
1921
+
1922
+ export function codec<const A extends core.SomeType, B extends core.SomeType = core.$ZodType>(
1923
+ in_: A,
1924
+ out: B,
1925
+ params: {
1926
+ decode: (value: core.output<A>, payload: core.ParsePayload<core.output<A>>) => core.util.MaybeAsync<core.input<B>>;
1927
+ encode: (value: core.input<B>, payload: core.ParsePayload<core.input<B>>) => core.util.MaybeAsync<core.output<A>>;
1928
+ }
1929
+ ): ZodCodec<A, B> {
1930
+ return new ZodCodec({
1931
+ type: "pipe",
1932
+ in: in_ as any as core.$ZodType,
1933
+ out: out as any as core.$ZodType,
1934
+ transform: params.decode as any,
1935
+ reverseTransform: params.encode as any,
1936
+ }) as any;
1937
+ }
1938
+
1848
1939
  // ZodReadonly
1849
1940
  export interface ZodReadonly<T extends core.SomeType = core.$ZodType>
1850
1941
  extends _ZodType<core.$ZodReadonlyInternals<T>>,
1851
- core.$ZodReadonly<T> {}
1942
+ core.$ZodReadonly<T> {
1943
+ unwrap(): T;
1944
+ }
1852
1945
  export const ZodReadonly: core.$constructor<ZodReadonly> = /*@__PURE__*/ core.$constructor(
1853
1946
  "ZodReadonly",
1854
1947
  (inst, def) => {
1855
1948
  core.$ZodReadonly.init(inst, def);
1856
1949
  ZodType.init(inst, def);
1950
+
1951
+ inst.unwrap = () => inst._zod.def.innerType;
1857
1952
  }
1858
1953
  );
1859
1954
 
@@ -1927,6 +2022,71 @@ export function promise<T extends core.SomeType>(innerType: T): ZodPromise<T> {
1927
2022
  }) as any;
1928
2023
  }
1929
2024
 
2025
+ // ZodFunction
2026
+ export interface ZodFunction<
2027
+ Args extends core.$ZodFunctionIn = core.$ZodFunctionIn,
2028
+ Returns extends core.$ZodFunctionOut = core.$ZodFunctionOut,
2029
+ > extends _ZodType<core.$ZodFunctionInternals<Args, Returns>>,
2030
+ core.$ZodFunction<Args, Returns> {
2031
+ _def: core.$ZodFunctionDef<Args, Returns>;
2032
+ _input: core.$InferInnerFunctionType<Args, Returns>;
2033
+ _output: core.$InferOuterFunctionType<Args, Returns>;
2034
+
2035
+ input<const Items extends util.TupleItems, const Rest extends core.$ZodFunctionOut = core.$ZodFunctionOut>(
2036
+ args: Items,
2037
+ rest?: Rest
2038
+ ): ZodFunction<core.$ZodTuple<Items, Rest>, Returns>;
2039
+ input<NewArgs extends core.$ZodFunctionIn>(args: NewArgs): ZodFunction<NewArgs, Returns>;
2040
+ input(...args: any[]): ZodFunction<any, Returns>;
2041
+
2042
+ output<NewReturns extends core.$ZodType>(output: NewReturns): ZodFunction<Args, NewReturns>;
2043
+ }
2044
+
2045
+ export const ZodFunction: core.$constructor<ZodFunction> = /*@__PURE__*/ core.$constructor(
2046
+ "ZodFunction",
2047
+ (inst, def) => {
2048
+ core.$ZodFunction.init(inst, def);
2049
+ ZodType.init(inst, def);
2050
+ }
2051
+ );
2052
+
2053
+ export function _function(): ZodFunction;
2054
+ export function _function<const In extends ReadonlyArray<core.$ZodType>>(params: {
2055
+ input: In;
2056
+ }): ZodFunction<ZodTuple<In, null>, core.$ZodFunctionOut>;
2057
+ export function _function<
2058
+ const In extends ReadonlyArray<core.$ZodType>,
2059
+ const Out extends core.$ZodFunctionOut = core.$ZodFunctionOut,
2060
+ >(params: {
2061
+ input: In;
2062
+ output: Out;
2063
+ }): ZodFunction<ZodTuple<In, null>, Out>;
2064
+ export function _function<const In extends core.$ZodFunctionIn = core.$ZodFunctionIn>(params: {
2065
+ input: In;
2066
+ }): ZodFunction<In, core.$ZodFunctionOut>;
2067
+ export function _function<const Out extends core.$ZodFunctionOut = core.$ZodFunctionOut>(params: {
2068
+ output: Out;
2069
+ }): ZodFunction<core.$ZodFunctionIn, Out>;
2070
+ export function _function<
2071
+ In extends core.$ZodFunctionIn = core.$ZodFunctionIn,
2072
+ Out extends core.$ZodType = core.$ZodType,
2073
+ >(params?: {
2074
+ input: In;
2075
+ output: Out;
2076
+ }): ZodFunction<In, Out>;
2077
+ export function _function(params?: {
2078
+ output?: core.$ZodType;
2079
+ input?: core.$ZodFunctionArgs | Array<core.$ZodType>;
2080
+ }): ZodFunction {
2081
+ return new ZodFunction({
2082
+ type: "function",
2083
+ input: Array.isArray(params?.input) ? tuple(params?.input as any) : (params?.input ?? array(unknown())),
2084
+ output: params?.output ?? unknown(),
2085
+ });
2086
+ }
2087
+
2088
+ export { _function as function };
2089
+
1930
2090
  // ZodCustom
1931
2091
  export interface ZodCustom<O = unknown, I = unknown>
1932
2092
  extends _ZodType<core.$ZodCustomInternals<O, I>>,
@@ -1962,26 +2122,10 @@ export function refine<T>(
1962
2122
  }
1963
2123
 
1964
2124
  // superRefine
1965
- export function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T> {
1966
- const ch = check<T>((payload) => {
1967
- (payload as RefinementCtx).addIssue = (issue) => {
1968
- if (typeof issue === "string") {
1969
- payload.issues.push(util.issue(issue, payload.value, ch._zod.def));
1970
- } else {
1971
- // for Zod 3 backwards compatibility
1972
- const _issue: any = issue;
1973
- if (_issue.fatal) _issue.continue = false;
1974
- _issue.code ??= "custom";
1975
- _issue.input ??= payload.value;
1976
- _issue.inst ??= ch;
1977
- _issue.continue ??= !ch._zod.def.abort;
1978
- payload.issues.push(util.issue(_issue));
1979
- }
1980
- };
1981
-
1982
- return fn(payload.value, payload as RefinementCtx<T>);
1983
- });
1984
- return ch;
2125
+ export function superRefine<T>(
2126
+ fn: (arg: T, payload: core.$RefinementCtx<T>) => void | Promise<void>
2127
+ ): core.$ZodCheck<T> {
2128
+ return core._superRefine(fn);
1985
2129
  }
1986
2130
 
1987
2131
  type ZodInstanceOfParams = core.Params<
@@ -2008,15 +2152,14 @@ function _instanceof<T extends typeof util.Class>(
2008
2152
  export { _instanceof as instanceof };
2009
2153
 
2010
2154
  // stringbool
2011
- export const stringbool: (
2012
- _params?: string | core.$ZodStringBoolParams
2013
- ) => ZodPipe<ZodPipe<ZodString, ZodTransform<boolean, string>>, ZodBoolean> = (...args) =>
2155
+ export const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodCodec<ZodString, ZodBoolean> = (
2156
+ ...args
2157
+ ) =>
2014
2158
  core._stringbool(
2015
2159
  {
2016
- Pipe: ZodPipe,
2160
+ Codec: ZodCodec,
2017
2161
  Boolean: ZodBoolean,
2018
2162
  String: ZodString,
2019
- Transform: ZodTransform,
2020
2163
  },
2021
2164
  ...args
2022
2165
  ) as any;
@@ -2047,7 +2190,7 @@ export function json(params?: string | core.$ZodCustomParams): ZodJSONSchema {
2047
2190
 
2048
2191
  // /** @deprecated Use `z.pipe()` and `z.transform()` instead. */
2049
2192
  export function preprocess<A, U extends core.SomeType, B = unknown>(
2050
- fn: (arg: B, ctx: RefinementCtx) => A,
2193
+ fn: (arg: B, ctx: core.$RefinementCtx) => A,
2051
2194
  schema: U
2052
2195
  ): ZodPipe<ZodTransform<A, B>, U> {
2053
2196
  return pipe(transform(fn as any), schema as any) as any;
@@ -6,9 +6,9 @@ test("type inference", () => {
6
6
  expectTypeOf<z.infer<typeof schema>>().toEqualTypeOf<string[]>();
7
7
  });
8
8
 
9
- test("array min/max", async () => {
9
+ test("array min/max", () => {
10
10
  const schema = z.array(z.string()).min(2).max(2);
11
- const r1 = await schema.safeParse(["asdf"]);
11
+ const r1 = schema.safeParse(["asdf"]);
12
12
  expect(r1.success).toEqual(false);
13
13
  expect(r1.error!.issues).toMatchInlineSnapshot(`
14
14
  [
@@ -23,7 +23,7 @@ test("array min/max", async () => {
23
23
  ]
24
24
  `);
25
25
 
26
- const r2 = await schema.safeParse(["asdf", "asdf", "asdf"]);
26
+ const r2 = schema.safeParse(["asdf", "asdf", "asdf"]);
27
27
  expect(r2.success).toEqual(false);
28
28
  expect(r2.error!.issues).toMatchInlineSnapshot(`
29
29
  [
@@ -39,11 +39,11 @@ test("array min/max", async () => {
39
39
  `);
40
40
  });
41
41
 
42
- test("array length", async () => {
42
+ test("array length", () => {
43
43
  const schema = z.array(z.string()).length(2);
44
44
  schema.parse(["asdf", "asdf"]);
45
45
 
46
- const r1 = await schema.safeParse(["asdf"]);
46
+ const r1 = schema.safeParse(["asdf"]);
47
47
  expect(r1.success).toEqual(false);
48
48
  expect(r1.error!.issues).toMatchInlineSnapshot(`
49
49
  [
@@ -59,7 +59,7 @@ test("array length", async () => {
59
59
  ]
60
60
  `);
61
61
 
62
- const r2 = await schema.safeParse(["asdf", "asdf", "asdf"]);
62
+ const r2 = schema.safeParse(["asdf", "asdf", "asdf"]);
63
63
  expect(r2.success).toEqual(false);
64
64
  expect(r2.error!.issues).toMatchInlineSnapshot(`
65
65
  [
@@ -1,6 +1,5 @@
1
1
  import { expect, expectTypeOf, test } from "vitest";
2
2
  import { z } from "zod/v4";
3
- import type { util } from "zod/v4/core";
4
3
 
5
4
  test("basic catch", () => {
6
5
  expect(z.string().catch("default").parse(undefined)).toBe("default");
@@ -45,7 +44,7 @@ test("catch with transform", () => {
45
44
  expect(stringWithDefault.unwrap().out).toBeInstanceOf(z.ZodTransform);
46
45
 
47
46
  type inp = z.input<typeof stringWithDefault>;
48
- expectTypeOf<inp>().toEqualTypeOf<string | util.Whatever>();
47
+ expectTypeOf<inp>().toEqualTypeOf<string>();
49
48
  type out = z.output<typeof stringWithDefault>;
50
49
  expectTypeOf<out>().toEqualTypeOf<string>();
51
50
  });
@@ -59,7 +58,7 @@ test("catch on existing optional", () => {
59
58
  expect(stringWithDefault.unwrap().unwrap()).toBeInstanceOf(z.ZodString);
60
59
 
61
60
  type inp = z.input<typeof stringWithDefault>;
62
- expectTypeOf<inp>().toEqualTypeOf<string | undefined | util.Whatever>();
61
+ expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
63
62
  type out = z.output<typeof stringWithDefault>;
64
63
  expectTypeOf<out>().toEqualTypeOf<string | undefined>();
65
64
  });
@@ -68,7 +67,7 @@ test("optional on catch", () => {
68
67
  const stringWithDefault = z.string().catch("asdf").optional();
69
68
 
70
69
  type inp = z.input<typeof stringWithDefault>;
71
- expectTypeOf<inp>().toEqualTypeOf<string | util.Whatever>();
70
+ expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
72
71
  type out = z.output<typeof stringWithDefault>;
73
72
  expectTypeOf<out>().toEqualTypeOf<string | undefined>();
74
73
  });
@@ -102,7 +101,7 @@ test("nested", () => {
102
101
  inner: "asdf",
103
102
  });
104
103
  type input = z.input<typeof outer>;
105
- expectTypeOf<input>().toEqualTypeOf<{ inner: string | util.Whatever } | util.Whatever>();
104
+ expectTypeOf<input>().toEqualTypeOf<{ inner: string }>();
106
105
  type out = z.output<typeof outer>;
107
106
 
108
107
  expectTypeOf<out>().toEqualTypeOf<{ inner: string }>();
@@ -250,3 +249,28 @@ test("ctx.input", () => {
250
249
 
251
250
  expect(schema.parse(123)).toEqual("123");
252
251
  });
252
+
253
+ test("direction-aware catch", () => {
254
+ const schema = z.string().catch("fallback");
255
+
256
+ // Forward direction (regular parse): catch should be applied
257
+ expect(schema.parse(123)).toBe("fallback");
258
+
259
+ // Reverse direction (encode): catch should NOT be applied, invalid value should fail validation
260
+ expect(z.safeEncode(schema, 123 as any)).toMatchInlineSnapshot(`
261
+ {
262
+ "error": [ZodError: [
263
+ {
264
+ "expected": "string",
265
+ "code": "invalid_type",
266
+ "path": [],
267
+ "message": "Invalid input: expected string, received number"
268
+ }
269
+ ]],
270
+ "success": false,
271
+ }
272
+ `);
273
+
274
+ // But valid values should still work in reverse
275
+ expect(z.encode(schema, "world")).toBe("world");
276
+ });