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
@@ -1,9 +1,6 @@
1
1
  import * as core from "../core/index.js";
2
2
  import { util } from "../core/index.js";
3
3
  import * as parse from "./parse.js";
4
- export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
5
- addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
6
- }
7
4
  export interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
8
5
  def: Internals["def"];
9
6
  type: Internals["def"]["type"];
@@ -24,22 +21,29 @@ export interface ZodType<out Output = unknown, out Input = unknown, out Internal
24
21
  parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
25
22
  safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
26
23
  spa: (data: unknown, params?: core.ParseContext<core.$ZodIssue>) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
24
+ encode(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): core.input<this>;
25
+ decode(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
26
+ encodeAsync(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<core.input<this>>;
27
+ decodeAsync(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
28
+ safeEncode(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): parse.ZodSafeParseResult<core.input<this>>;
29
+ safeDecode(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): parse.ZodSafeParseResult<core.output<this>>;
30
+ safeEncodeAsync(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.input<this>>>;
31
+ safeDecodeAsync(data: core.input<this>, params?: core.ParseContext<core.$ZodIssue>): Promise<parse.ZodSafeParseResult<core.output<this>>>;
27
32
  refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
28
- /** @deprecated Use `.check()` instead. */
29
- superRefine(refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>): this;
33
+ superRefine(refinement: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => void | Promise<void>): this;
30
34
  overwrite(fn: (x: core.output<this>) => core.output<this>): this;
31
35
  optional(): ZodOptional<this>;
32
36
  nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
33
37
  nullable(): ZodNullable<this>;
34
38
  nullish(): ZodOptional<ZodNullable<this>>;
35
- default(def: core.output<this>): ZodDefault<this>;
39
+ default(def: util.NoUndefined<core.output<this>>): ZodDefault<this>;
36
40
  default(def: () => util.NoUndefined<core.output<this>>): ZodDefault<this>;
37
41
  prefault(def: () => core.input<this>): ZodPrefault<this>;
38
42
  prefault(def: core.input<this>): ZodPrefault<this>;
39
43
  array(): ZodArray<this>;
40
44
  or<T extends core.SomeType>(option: T): ZodUnion<[this, T]>;
41
45
  and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
42
- transform<NewOut>(transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
46
+ transform<NewOut>(transform: (arg: core.output<this>, ctx: core.$RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
43
47
  catch(def: core.output<this>): ZodCatch<this>;
44
48
  catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
45
49
  pipe<T extends core.$ZodType<any, core.output<this>>>(target: T | core.$ZodType<any, core.output<this>>): ZodPipe<this, T>;
@@ -178,6 +182,7 @@ export interface ZodURL extends ZodStringFormat<"url"> {
178
182
  }
179
183
  export declare const ZodURL: core.$constructor<ZodURL>;
180
184
  export declare function url(params?: string | core.$ZodURLParams): ZodURL;
185
+ export declare function httpUrl(params?: string | Omit<core.$ZodURLParams, "protocol" | "hostname">): ZodURL;
181
186
  export interface ZodEmoji extends ZodStringFormat<"emoji"> {
182
187
  _zod: core.$ZodEmojiInternals;
183
188
  }
@@ -258,6 +263,11 @@ export interface ZodCustomStringFormat<Format extends string = string> extends Z
258
263
  }
259
264
  export declare const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat>;
260
265
  export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<Format>;
266
+ export declare function hostname(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hostname">;
267
+ export declare function hex(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hex">;
268
+ export declare function hash<Alg extends util.HashAlgorithm, Enc extends util.HashEncoding = "hex">(alg: Alg, params?: {
269
+ enc?: Enc;
270
+ } & core.$ZodStringFormatParams): ZodCustomStringFormat<`${Alg}_${Enc}`>;
261
271
  export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals> extends _ZodType<Internals> {
262
272
  gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
263
273
  /** Identical to .min() */
@@ -398,7 +408,10 @@ export interface ZodArray<T extends core.SomeType = core.$ZodType> extends _ZodT
398
408
  }
399
409
  export declare const ZodArray: core.$constructor<ZodArray>;
400
410
  export declare function array<T extends core.SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T>;
401
- export declare function keyof<T extends ZodObject>(schema: T): ZodLiteral<Exclude<keyof T["_zod"]["output"], symbol>>;
411
+ export declare function keyof<T extends ZodObject>(schema: T): ZodEnum<util.KeysEnum<T["_zod"]["output"]>>;
412
+ export type SafeExtendShape<Base extends core.$ZodShape, Ext extends core.$ZodLooseShape> = {
413
+ [K in keyof Ext]: K extends keyof Base ? core.output<Ext[K]> extends core.output<Base[K]> ? core.input<Ext[K]> extends core.input<Base[K]> ? Ext[K] : never : never : Ext[K];
414
+ };
402
415
  export interface ZodObject<
403
416
  /** @ts-ignore Cast variance */
404
417
  out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.$ZodObjectConfig = core.$strip> extends _ZodType<core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
@@ -414,19 +427,10 @@ out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.
414
427
  strict(): ZodObject<Shape, core.$strict>;
415
428
  /** This is the default behavior. This method call is likely unnecessary. */
416
429
  strip(): ZodObject<Shape, core.$strip>;
417
- extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
430
+ extend<U extends core.$ZodLooseShape>(shape: U): ZodObject<util.Extend<Shape, U>, Config>;
431
+ safeExtend<U extends core.$ZodLooseShape>(shape: SafeExtendShape<Shape, U> & Partial<Record<keyof Shape, core.SomeType>>): ZodObject<util.Extend<Shape, U>, Config>;
418
432
  /**
419
- * @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
420
- *
421
- * ```ts
422
- * const A = z.object({ a: z.string() });
423
- * const B = z.object({ b: z.number() });
424
- *
425
- * const C = z.object({
426
- * ...A.shape,
427
- * ...B.shape
428
- * });
429
- * ```
433
+ * @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
430
434
  */
431
435
  merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
432
436
  pick<M extends util.Mask<keyof Shape>>(mask: M): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
@@ -453,11 +457,12 @@ export interface ZodUnion<T extends readonly core.SomeType[] = readonly core.$Zo
453
457
  }
454
458
  export declare const ZodUnion: core.$constructor<ZodUnion>;
455
459
  export declare function union<const T extends readonly core.SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodUnion<T>;
456
- export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[]> extends ZodUnion<Options>, core.$ZodDiscriminatedUnion<Options> {
457
- _zod: core.$ZodDiscriminatedUnionInternals<Options>;
460
+ export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[], Disc extends string = string> extends ZodUnion<Options>, core.$ZodDiscriminatedUnion<Options, Disc> {
461
+ _zod: core.$ZodDiscriminatedUnionInternals<Options, Disc>;
462
+ def: core.$ZodDiscriminatedUnionDef<Options, Disc>;
458
463
  }
459
464
  export declare const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion>;
460
- export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types>;
465
+ export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]], Disc extends string>(discriminator: Disc, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodDiscriminatedUnion<Types, Disc>;
461
466
  export interface ZodIntersection<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodIntersectionInternals<A, B>>, core.$ZodIntersection<A, B> {
462
467
  }
463
468
  export declare const ZodIntersection: core.$constructor<ZodIntersection>;
@@ -484,7 +489,6 @@ export declare const ZodMap: core.$constructor<ZodMap>;
484
489
  export declare function map<Key extends core.SomeType, Value extends core.SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodMapParams): ZodMap<Key, Value>;
485
490
  export interface ZodSet<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodSetInternals<T>>, core.$ZodSet<T> {
486
491
  min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;
487
- /** */
488
492
  nonempty(params?: string | core.$ZodCheckMinSizeParams): this;
489
493
  max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;
490
494
  size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
@@ -581,7 +585,17 @@ export interface ZodPipe<A extends core.SomeType = core.$ZodType, B extends core
581
585
  }
582
586
  export declare const ZodPipe: core.$constructor<ZodPipe>;
583
587
  export declare function pipe<const A extends core.SomeType, B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>>(in_: A, out: B | core.$ZodType<unknown, core.output<A>>): ZodPipe<A, B>;
588
+ export interface ZodCodec<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType> extends ZodPipe<A, B>, core.$ZodCodec<A, B> {
589
+ _zod: core.$ZodCodecInternals<A, B>;
590
+ def: core.$ZodCodecDef<A, B>;
591
+ }
592
+ export declare const ZodCodec: core.$constructor<ZodCodec>;
593
+ export declare function codec<const A extends core.SomeType, B extends core.SomeType = core.$ZodType>(in_: A, out: B, params: {
594
+ decode: (value: core.output<A>, payload: core.ParsePayload<core.output<A>>) => core.util.MaybeAsync<core.input<B>>;
595
+ encode: (value: core.input<B>, payload: core.ParsePayload<core.input<B>>) => core.util.MaybeAsync<core.output<A>>;
596
+ }): ZodCodec<A, B>;
584
597
  export interface ZodReadonly<T extends core.SomeType = core.$ZodType> extends _ZodType<core.$ZodReadonlyInternals<T>>, core.$ZodReadonly<T> {
598
+ unwrap(): T;
585
599
  }
586
600
  export declare const ZodReadonly: core.$constructor<ZodReadonly>;
587
601
  export declare function readonly<T extends core.SomeType>(innerType: T): ZodReadonly<T>;
@@ -599,17 +613,46 @@ export interface ZodPromise<T extends core.SomeType = core.$ZodType> extends _Zo
599
613
  }
600
614
  export declare const ZodPromise: core.$constructor<ZodPromise>;
601
615
  export declare function promise<T extends core.SomeType>(innerType: T): ZodPromise<T>;
616
+ export interface ZodFunction<Args extends core.$ZodFunctionIn = core.$ZodFunctionIn, Returns extends core.$ZodFunctionOut = core.$ZodFunctionOut> extends _ZodType<core.$ZodFunctionInternals<Args, Returns>>, core.$ZodFunction<Args, Returns> {
617
+ _def: core.$ZodFunctionDef<Args, Returns>;
618
+ _input: core.$InferInnerFunctionType<Args, Returns>;
619
+ _output: core.$InferOuterFunctionType<Args, Returns>;
620
+ input<const Items extends util.TupleItems, const Rest extends core.$ZodFunctionOut = core.$ZodFunctionOut>(args: Items, rest?: Rest): ZodFunction<core.$ZodTuple<Items, Rest>, Returns>;
621
+ input<NewArgs extends core.$ZodFunctionIn>(args: NewArgs): ZodFunction<NewArgs, Returns>;
622
+ input(...args: any[]): ZodFunction<any, Returns>;
623
+ output<NewReturns extends core.$ZodType>(output: NewReturns): ZodFunction<Args, NewReturns>;
624
+ }
625
+ export declare const ZodFunction: core.$constructor<ZodFunction>;
626
+ export declare function _function(): ZodFunction;
627
+ export declare function _function<const In extends ReadonlyArray<core.$ZodType>>(params: {
628
+ input: In;
629
+ }): ZodFunction<ZodTuple<In, null>, core.$ZodFunctionOut>;
630
+ export declare function _function<const In extends ReadonlyArray<core.$ZodType>, const Out extends core.$ZodFunctionOut = core.$ZodFunctionOut>(params: {
631
+ input: In;
632
+ output: Out;
633
+ }): ZodFunction<ZodTuple<In, null>, Out>;
634
+ export declare function _function<const In extends core.$ZodFunctionIn = core.$ZodFunctionIn>(params: {
635
+ input: In;
636
+ }): ZodFunction<In, core.$ZodFunctionOut>;
637
+ export declare function _function<const Out extends core.$ZodFunctionOut = core.$ZodFunctionOut>(params: {
638
+ output: Out;
639
+ }): ZodFunction<core.$ZodFunctionIn, Out>;
640
+ export declare function _function<In extends core.$ZodFunctionIn = core.$ZodFunctionIn, Out extends core.$ZodType = core.$ZodType>(params?: {
641
+ input: In;
642
+ output: Out;
643
+ }): ZodFunction<In, Out>;
644
+ export { _function as function };
602
645
  export interface ZodCustom<O = unknown, I = unknown> extends _ZodType<core.$ZodCustomInternals<O, I>>, core.$ZodCustom<O, I> {
603
646
  }
604
647
  export declare const ZodCustom: core.$constructor<ZodCustom>;
605
648
  export declare function check<O = unknown>(fn: core.CheckFn<O>): core.$ZodCheck<O>;
606
649
  export declare function custom<O>(fn?: (data: unknown) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodCustom<O, O>;
607
650
  export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
608
- export declare function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
651
+ export declare function superRefine<T>(fn: (arg: T, payload: core.$RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T>;
609
652
  type ZodInstanceOfParams = core.Params<ZodCustom, core.$ZodIssueCustom, "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path">;
610
653
  declare function _instanceof<T extends typeof util.Class>(cls: T, params?: ZodInstanceOfParams): ZodCustom<InstanceType<T>, InstanceType<T>>;
611
654
  export { _instanceof as instanceof };
612
- export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodPipe<ZodPipe<ZodString, ZodTransform<boolean, string>>, ZodBoolean>;
655
+ export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodCodec<ZodString, ZodBoolean>;
613
656
  type _ZodJSONSchema = ZodUnion<[
614
657
  ZodString,
615
658
  ZodNumber,
@@ -627,4 +670,4 @@ export interface ZodJSONSchema extends _ZodJSONSchema {
627
670
  _zod: ZodJSONSchemaInternals;
628
671
  }
629
672
  export declare function json(params?: string | core.$ZodCustomParams): ZodJSONSchema;
630
- export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
673
+ export declare function preprocess<A, U extends core.SomeType, B = unknown>(fn: (arg: B, ctx: core.$RefinementCtx) => A, schema: U): ZodPipe<ZodTransform<A, B>, U>;
@@ -6,18 +6,16 @@ import * as parse from "./parse.js";
6
6
  export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) => {
7
7
  core.$ZodType.init(inst, def);
8
8
  inst.def = def;
9
+ inst.type = def.type;
9
10
  Object.defineProperty(inst, "_def", { value: def });
10
11
  // base methods
11
12
  inst.check = (...checks) => {
12
- return inst.clone({
13
- ...def,
13
+ return inst.clone(util.mergeDefs(def, {
14
14
  checks: [
15
15
  ...(def.checks ?? []),
16
16
  ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
17
17
  ],
18
- }
19
- // { parent: true }
20
- );
18
+ }));
21
19
  };
22
20
  inst.clone = (def, params) => core.clone(inst, def, params);
23
21
  inst.brand = () => inst;
@@ -31,6 +29,15 @@ export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) =>
31
29
  inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
32
30
  inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
33
31
  inst.spa = inst.safeParseAsync;
32
+ // encoding/decoding
33
+ inst.encode = (data, params) => parse.encode(inst, data, params);
34
+ inst.decode = (data, params) => parse.decode(inst, data, params);
35
+ inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);
36
+ inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);
37
+ inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);
38
+ inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);
39
+ inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);
40
+ inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);
34
41
  // refinements
35
42
  inst.refine = (check, params) => inst.check(refine(check, params));
36
43
  inst.superRefine = (refinement) => inst.check(superRefine(refinement));
@@ -182,6 +189,13 @@ export const ZodURL = /*@__PURE__*/ core.$constructor("ZodURL", (inst, def) => {
182
189
  export function url(params) {
183
190
  return core._url(ZodURL, params);
184
191
  }
192
+ export function httpUrl(params) {
193
+ return core._url(ZodURL, {
194
+ protocol: /^https?$/,
195
+ hostname: core.regexes.domain,
196
+ ...util.normalizeParams(params),
197
+ });
198
+ }
185
199
  export const ZodEmoji = /*@__PURE__*/ core.$constructor("ZodEmoji", (inst, def) => {
186
200
  // ZodStringFormat.init(inst, def);
187
201
  core.$ZodEmoji.init(inst, def);
@@ -308,6 +322,20 @@ export const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("ZodCustomS
308
322
  export function stringFormat(format, fnOrRegex, _params = {}) {
309
323
  return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
310
324
  }
325
+ export function hostname(_params) {
326
+ return core._stringFormat(ZodCustomStringFormat, "hostname", core.regexes.hostname, _params);
327
+ }
328
+ export function hex(_params) {
329
+ return core._stringFormat(ZodCustomStringFormat, "hex", core.regexes.hex, _params);
330
+ }
331
+ export function hash(alg, params) {
332
+ const enc = params?.enc ?? "hex";
333
+ const format = `${alg}_${enc}`;
334
+ const regex = core.regexes[format];
335
+ if (!regex)
336
+ throw new Error(`Unrecognized hash format: ${format}`);
337
+ return core._stringFormat(ZodCustomStringFormat, format, regex, params);
338
+ }
311
339
  export const ZodNumber = /*@__PURE__*/ core.$constructor("ZodNumber", (inst, def) => {
312
340
  core.$ZodNumber.init(inst, def);
313
341
  ZodType.init(inst, def);
@@ -481,22 +509,26 @@ export function array(element, params) {
481
509
  // .keyof
482
510
  export function keyof(schema) {
483
511
  const shape = schema._zod.def.shape;
484
- return literal(Object.keys(shape));
512
+ return _enum(Object.keys(shape));
485
513
  }
486
514
  export const ZodObject = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def) => {
487
- core.$ZodObject.init(inst, def);
515
+ core.$ZodObjectJIT.init(inst, def);
488
516
  ZodType.init(inst, def);
489
- util.defineLazy(inst, "shape", () => def.shape);
517
+ util.defineLazy(inst, "shape", () => {
518
+ return def.shape;
519
+ });
490
520
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
491
521
  inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
492
522
  inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
493
- // inst.nonstrict = () => inst.clone({ ...inst._zod.def, catchall: api.unknown() });
494
523
  inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
495
524
  inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
496
525
  inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
497
526
  inst.extend = (incoming) => {
498
527
  return util.extend(inst, incoming);
499
528
  };
529
+ inst.safeExtend = (incoming) => {
530
+ return util.safeExtend(inst, incoming);
531
+ };
500
532
  inst.merge = (other) => util.merge(inst, other);
501
533
  inst.pick = (mask) => util.pick(inst, mask);
502
534
  inst.omit = (mask) => util.omit(inst, mask);
@@ -506,10 +538,7 @@ export const ZodObject = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def
506
538
  export function object(shape, params) {
507
539
  const def = {
508
540
  type: "object",
509
- get shape() {
510
- util.assignProp(this, "shape", { ...shape });
511
- return this.shape;
512
- },
541
+ shape: shape ?? {},
513
542
  ...util.normalizeParams(params),
514
543
  };
515
544
  return new ZodObject(def);
@@ -518,10 +547,7 @@ export function object(shape, params) {
518
547
  export function strictObject(shape, params) {
519
548
  return new ZodObject({
520
549
  type: "object",
521
- get shape() {
522
- util.assignProp(this, "shape", { ...shape });
523
- return this.shape;
524
- },
550
+ shape,
525
551
  catchall: never(),
526
552
  ...util.normalizeParams(params),
527
553
  });
@@ -530,10 +556,7 @@ export function strictObject(shape, params) {
530
556
  export function looseObject(shape, params) {
531
557
  return new ZodObject({
532
558
  type: "object",
533
- get shape() {
534
- util.assignProp(this, "shape", { ...shape });
535
- return this.shape;
536
- },
559
+ shape,
537
560
  catchall: unknown(),
538
561
  ...util.normalizeParams(params),
539
562
  });
@@ -609,9 +632,11 @@ export function record(keyType, valueType, params) {
609
632
  }
610
633
  // type alksjf = core.output<core.$ZodRecordKey>;
611
634
  export function partialRecord(keyType, valueType, params) {
635
+ const k = core.clone(keyType);
636
+ k._zod.values = undefined;
612
637
  return new ZodRecord({
613
638
  type: "record",
614
- keyType: union([keyType, never()]),
639
+ keyType: k,
615
640
  valueType: valueType,
616
641
  ...util.normalizeParams(params),
617
642
  });
@@ -741,6 +766,9 @@ export const ZodTransform = /*@__PURE__*/ core.$constructor("ZodTransform", (ins
741
766
  core.$ZodTransform.init(inst, def);
742
767
  ZodType.init(inst, def);
743
768
  inst._zod.parse = (payload, _ctx) => {
769
+ if (_ctx.direction === "backward") {
770
+ throw new core.$ZodEncodeError(inst.constructor.name);
771
+ }
744
772
  payload.addIssue = (issue) => {
745
773
  if (typeof issue === "string") {
746
774
  payload.issues.push(util.issue(issue, payload.value, def));
@@ -753,7 +781,7 @@ export const ZodTransform = /*@__PURE__*/ core.$constructor("ZodTransform", (ins
753
781
  _issue.code ?? (_issue.code = "custom");
754
782
  _issue.input ?? (_issue.input = payload.value);
755
783
  _issue.inst ?? (_issue.inst = inst);
756
- _issue.continue ?? (_issue.continue = true);
784
+ // _issue.continue ??= true;
757
785
  payload.issues.push(util.issue(_issue));
758
786
  }
759
787
  };
@@ -811,7 +839,7 @@ export function _default(innerType, defaultValue) {
811
839
  type: "default",
812
840
  innerType: innerType,
813
841
  get defaultValue() {
814
- return typeof defaultValue === "function" ? defaultValue() : defaultValue;
842
+ return typeof defaultValue === "function" ? defaultValue() : util.shallowClone(defaultValue);
815
843
  },
816
844
  });
817
845
  }
@@ -825,7 +853,7 @@ export function prefault(innerType, defaultValue) {
825
853
  type: "prefault",
826
854
  innerType: innerType,
827
855
  get defaultValue() {
828
- return typeof defaultValue === "function" ? defaultValue() : defaultValue;
856
+ return typeof defaultValue === "function" ? defaultValue() : util.shallowClone(defaultValue);
829
857
  },
830
858
  });
831
859
  }
@@ -887,9 +915,23 @@ export function pipe(in_, out) {
887
915
  // ...util.normalizeParams(params),
888
916
  });
889
917
  }
918
+ export const ZodCodec = /*@__PURE__*/ core.$constructor("ZodCodec", (inst, def) => {
919
+ ZodPipe.init(inst, def);
920
+ core.$ZodCodec.init(inst, def);
921
+ });
922
+ export function codec(in_, out, params) {
923
+ return new ZodCodec({
924
+ type: "pipe",
925
+ in: in_,
926
+ out: out,
927
+ transform: params.decode,
928
+ reverseTransform: params.encode,
929
+ });
930
+ }
890
931
  export const ZodReadonly = /*@__PURE__*/ core.$constructor("ZodReadonly", (inst, def) => {
891
932
  core.$ZodReadonly.init(inst, def);
892
933
  ZodType.init(inst, def);
934
+ inst.unwrap = () => inst._zod.def.innerType;
893
935
  });
894
936
  export function readonly(innerType) {
895
937
  return new ZodReadonly({
@@ -930,6 +972,18 @@ export function promise(innerType) {
930
972
  innerType: innerType,
931
973
  });
932
974
  }
975
+ export const ZodFunction = /*@__PURE__*/ core.$constructor("ZodFunction", (inst, def) => {
976
+ core.$ZodFunction.init(inst, def);
977
+ ZodType.init(inst, def);
978
+ });
979
+ export function _function(params) {
980
+ return new ZodFunction({
981
+ type: "function",
982
+ input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),
983
+ output: params?.output ?? unknown(),
984
+ });
985
+ }
986
+ export { _function as function };
933
987
  export const ZodCustom = /*@__PURE__*/ core.$constructor("ZodCustom", (inst, def) => {
934
988
  core.$ZodCustom.init(inst, def);
935
989
  ZodType.init(inst, def);
@@ -951,26 +1005,7 @@ export function refine(fn, _params = {}) {
951
1005
  }
952
1006
  // superRefine
953
1007
  export function superRefine(fn) {
954
- const ch = check((payload) => {
955
- payload.addIssue = (issue) => {
956
- if (typeof issue === "string") {
957
- payload.issues.push(util.issue(issue, payload.value, ch._zod.def));
958
- }
959
- else {
960
- // for Zod 3 backwards compatibility
961
- const _issue = issue;
962
- if (_issue.fatal)
963
- _issue.continue = false;
964
- _issue.code ?? (_issue.code = "custom");
965
- _issue.input ?? (_issue.input = payload.value);
966
- _issue.inst ?? (_issue.inst = ch);
967
- _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
968
- payload.issues.push(util.issue(_issue));
969
- }
970
- };
971
- return fn(payload.value, payload);
972
- });
973
- return ch;
1008
+ return core._superRefine(fn);
974
1009
  }
975
1010
  function _instanceof(cls, params = {
976
1011
  error: `Input not instance of ${cls.name}`,
@@ -988,10 +1023,9 @@ function _instanceof(cls, params = {
988
1023
  export { _instanceof as instanceof };
989
1024
  // stringbool
990
1025
  export const stringbool = (...args) => core._stringbool({
991
- Pipe: ZodPipe,
1026
+ Codec: ZodCodec,
992
1027
  Boolean: ZodBoolean,
993
1028
  String: ZodString,
994
- Transform: ZodTransform,
995
1029
  }, ...args);
996
1030
  export function json(params) {
997
1031
  const jsonSchema = lazy(() => {
@@ -135,6 +135,8 @@ exports._lazy = _lazy;
135
135
  exports._promise = _promise;
136
136
  exports._custom = _custom;
137
137
  exports._refine = _refine;
138
+ exports._superRefine = _superRefine;
139
+ exports._check = _check;
138
140
  exports._stringbool = _stringbool;
139
141
  exports._stringFormat = _stringFormat;
140
142
  const checks = __importStar(require("./checks.cjs"));
@@ -880,7 +882,7 @@ function _default(Class, innerType, defaultValue) {
880
882
  type: "default",
881
883
  innerType,
882
884
  get defaultValue() {
883
- return typeof defaultValue === "function" ? defaultValue() : defaultValue;
885
+ return typeof defaultValue === "function" ? defaultValue() : util.shallowClone(defaultValue);
884
886
  },
885
887
  });
886
888
  }
@@ -947,13 +949,6 @@ function _custom(Class, fn, _params) {
947
949
  });
948
950
  return schema;
949
951
  }
950
- // export function _refine<T>(
951
- // Class: util.SchemaClass<schemas.$ZodCustom>,
952
- // fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>,
953
- // _params: string | $ZodCustomParams = {}
954
- // ): checks.$ZodCheck<T> {
955
- // return _custom(Class, fn, _params);
956
- // }
957
952
  // same as _custom but defaults to abort:false
958
953
  function _refine(Class, fn, _params) {
959
954
  const schema = new Class({
@@ -964,6 +959,36 @@ function _refine(Class, fn, _params) {
964
959
  });
965
960
  return schema;
966
961
  }
962
+ function _superRefine(fn) {
963
+ const ch = _check((payload) => {
964
+ payload.addIssue = (issue) => {
965
+ if (typeof issue === "string") {
966
+ payload.issues.push(util.issue(issue, payload.value, ch._zod.def));
967
+ }
968
+ else {
969
+ // for Zod 3 backwards compatibility
970
+ const _issue = issue;
971
+ if (_issue.fatal)
972
+ _issue.continue = false;
973
+ _issue.code ?? (_issue.code = "custom");
974
+ _issue.input ?? (_issue.input = payload.value);
975
+ _issue.inst ?? (_issue.inst = ch);
976
+ _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...
977
+ payload.issues.push(util.issue(_issue));
978
+ }
979
+ };
980
+ return fn(payload.value, payload);
981
+ });
982
+ return ch;
983
+ }
984
+ function _check(fn, params) {
985
+ const ch = new checks.$ZodCheck({
986
+ check: "custom",
987
+ ...util.normalizeParams(params),
988
+ });
989
+ ch._zod.check = fn;
990
+ return ch;
991
+ }
967
992
  function _stringbool(Classes, _params) {
968
993
  const params = util.normalizeParams(_params);
969
994
  let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
@@ -974,13 +999,16 @@ function _stringbool(Classes, _params) {
974
999
  }
975
1000
  const truthySet = new Set(truthyArray);
976
1001
  const falsySet = new Set(falsyArray);
977
- const _Pipe = Classes.Pipe ?? schemas.$ZodPipe;
1002
+ const _Codec = Classes.Codec ?? schemas.$ZodCodec;
978
1003
  const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;
979
1004
  const _String = Classes.String ?? schemas.$ZodString;
980
- const _Transform = Classes.Transform ?? schemas.$ZodTransform;
981
- const tx = new _Transform({
982
- type: "transform",
983
- transform: (input, payload) => {
1005
+ const stringSchema = new _String({ type: "string", error: params.error });
1006
+ const booleanSchema = new _Boolean({ type: "boolean", error: params.error });
1007
+ const codec = new _Codec({
1008
+ type: "pipe",
1009
+ in: stringSchema,
1010
+ out: booleanSchema,
1011
+ transform: ((input, payload) => {
984
1012
  let data = input;
985
1013
  if (params.case !== "sensitive")
986
1014
  data = data.toLowerCase();
@@ -996,30 +1024,23 @@ function _stringbool(Classes, _params) {
996
1024
  expected: "stringbool",
997
1025
  values: [...truthySet, ...falsySet],
998
1026
  input: payload.value,
999
- inst: tx,
1027
+ inst: codec,
1028
+ continue: false,
1000
1029
  });
1001
1030
  return {};
1002
1031
  }
1003
- },
1004
- error: params.error,
1005
- });
1006
- // params.error;
1007
- const innerPipe = new _Pipe({
1008
- type: "pipe",
1009
- in: new _String({ type: "string", error: params.error }),
1010
- out: tx,
1011
- error: params.error,
1012
- });
1013
- const outerPipe = new _Pipe({
1014
- type: "pipe",
1015
- in: innerPipe,
1016
- out: new _Boolean({
1017
- type: "boolean",
1018
- error: params.error,
1032
+ }),
1033
+ reverseTransform: ((input, _payload) => {
1034
+ if (input === true) {
1035
+ return truthyArray[0] || "true";
1036
+ }
1037
+ else {
1038
+ return falsyArray[0] || "false";
1039
+ }
1019
1040
  }),
1020
1041
  error: params.error,
1021
1042
  });
1022
- return outerPipe;
1043
+ return codec;
1023
1044
  }
1024
1045
  function _stringFormat(Class, format, fnOrRegex, _params = {}) {
1025
1046
  const params = util.normalizeParams(_params);