zod 4.5.3 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/compile.cjs +19 -0
  2. package/index.cjs +19 -0
  3. package/locales/index.cjs +19 -0
  4. package/mini/index.cjs +19 -0
  5. package/package.json +8 -7
  6. package/src/v3/helpers/errorUtil.ts +1 -1
  7. package/src/v4/classic/checks.ts +0 -1
  8. package/src/v4/classic/external.ts +2 -0
  9. package/src/v4/classic/from-json-schema.ts +248 -25
  10. package/src/v4/classic/schemas.ts +255 -164
  11. package/src/v4/classic/tests/assignability.test.ts +59 -9
  12. package/src/v4/classic/tests/bigint.test.ts +6 -0
  13. package/src/v4/classic/tests/continuability.test.ts +2 -2
  14. package/src/v4/classic/tests/cyclic-data.test.ts +316 -0
  15. package/src/v4/classic/tests/default.test.ts +46 -0
  16. package/src/v4/classic/tests/enum.test.ts +9 -0
  17. package/src/v4/classic/tests/error.test.ts +130 -1
  18. package/src/v4/classic/tests/firstparty.test.ts +4 -0
  19. package/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  20. package/src/v4/classic/tests/iban.test.ts +81 -0
  21. package/src/v4/classic/tests/instance-footprint.test.ts +18 -2
  22. package/src/v4/classic/tests/instanceof.test.ts +27 -7
  23. package/src/v4/classic/tests/issue-schema.test.ts +88 -56
  24. package/src/v4/classic/tests/object.test.ts +56 -0
  25. package/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  26. package/src/v4/classic/tests/properties.test.ts +225 -0
  27. package/src/v4/classic/tests/recursive-types.test.ts +1 -1
  28. package/src/v4/classic/tests/standard-schema.test.ts +19 -0
  29. package/src/v4/classic/tests/string.test.ts +25 -0
  30. package/src/v4/classic/tests/template-literal.test.ts +33 -1
  31. package/src/v4/classic/tests/to-json-schema.test.ts +147 -3
  32. package/src/v4/classic/tests/validate.test.ts +569 -0
  33. package/src/v4/core/api.ts +30 -6
  34. package/src/v4/core/checks.ts +1 -101
  35. package/src/v4/core/compile.ts +193 -81
  36. package/src/v4/core/doc.ts +6 -2
  37. package/src/v4/core/errors.ts +3 -6
  38. package/src/v4/core/json-schema-generator.ts +2 -2
  39. package/src/v4/core/json-schema-processors.ts +226 -68
  40. package/src/v4/core/memoizer.ts +162 -36
  41. package/src/v4/core/parse.ts +37 -16
  42. package/src/v4/core/regexes.ts +10 -4
  43. package/src/v4/core/schemas.ts +314 -83
  44. package/src/v4/core/tests/cached.test.ts +54 -0
  45. package/src/v4/core/tests/compile-generative.test.ts +445 -0
  46. package/src/v4/core/tests/compile.test.ts +222 -2
  47. package/src/v4/core/tests/email-regex.test.ts +140 -0
  48. package/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  49. package/src/v4/core/to-json-schema.ts +10 -8
  50. package/src/v4/core/util.ts +222 -147
  51. package/src/v4/core/versions.ts +2 -2
  52. package/src/v4/core/visit.ts +11 -0
  53. package/src/v4/locales/ar.ts +1 -0
  54. package/src/v4/locales/az.ts +1 -0
  55. package/src/v4/locales/be.ts +1 -0
  56. package/src/v4/locales/bg.ts +1 -0
  57. package/src/v4/locales/bn.ts +1 -0
  58. package/src/v4/locales/ca.ts +1 -0
  59. package/src/v4/locales/ckb.ts +1 -0
  60. package/src/v4/locales/cs.ts +1 -0
  61. package/src/v4/locales/da.ts +1 -0
  62. package/src/v4/locales/de.ts +1 -0
  63. package/src/v4/locales/el.ts +1 -0
  64. package/src/v4/locales/en.ts +1 -0
  65. package/src/v4/locales/eo.ts +1 -0
  66. package/src/v4/locales/es.ts +1 -0
  67. package/src/v4/locales/fa.ts +1 -0
  68. package/src/v4/locales/fi.ts +1 -0
  69. package/src/v4/locales/fr-CA.ts +1 -0
  70. package/src/v4/locales/fr.ts +1 -0
  71. package/src/v4/locales/gu.ts +1 -0
  72. package/src/v4/locales/he.ts +1 -0
  73. package/src/v4/locales/hi.ts +1 -0
  74. package/src/v4/locales/hr.ts +1 -0
  75. package/src/v4/locales/hu.ts +1 -0
  76. package/src/v4/locales/hy.ts +1 -0
  77. package/src/v4/locales/id.ts +1 -0
  78. package/src/v4/locales/is.ts +1 -0
  79. package/src/v4/locales/it.ts +1 -0
  80. package/src/v4/locales/ja.ts +1 -0
  81. package/src/v4/locales/ka.ts +1 -0
  82. package/src/v4/locales/km.ts +1 -0
  83. package/src/v4/locales/kn.ts +1 -0
  84. package/src/v4/locales/ko.ts +1 -0
  85. package/src/v4/locales/lt.ts +1 -0
  86. package/src/v4/locales/mk.ts +1 -0
  87. package/src/v4/locales/ms.ts +1 -0
  88. package/src/v4/locales/ne.ts +1 -0
  89. package/src/v4/locales/nl.ts +1 -0
  90. package/src/v4/locales/nn.ts +1 -0
  91. package/src/v4/locales/no.ts +1 -0
  92. package/src/v4/locales/ota.ts +1 -0
  93. package/src/v4/locales/pl.ts +1 -0
  94. package/src/v4/locales/ps.ts +1 -0
  95. package/src/v4/locales/pt-BR.ts +1 -0
  96. package/src/v4/locales/pt.ts +1 -0
  97. package/src/v4/locales/ro.ts +1 -0
  98. package/src/v4/locales/ru.ts +1 -0
  99. package/src/v4/locales/sk.ts +1 -0
  100. package/src/v4/locales/sl.ts +1 -0
  101. package/src/v4/locales/sv.ts +1 -0
  102. package/src/v4/locales/ta.ts +1 -0
  103. package/src/v4/locales/th.ts +1 -0
  104. package/src/v4/locales/tk.ts +1 -0
  105. package/src/v4/locales/tr.ts +1 -0
  106. package/src/v4/locales/uk.ts +1 -0
  107. package/src/v4/locales/ur.ts +1 -0
  108. package/src/v4/locales/uz.ts +1 -0
  109. package/src/v4/locales/vi.ts +1 -0
  110. package/src/v4/locales/yo.ts +1 -0
  111. package/src/v4/locales/zh-CN.ts +1 -0
  112. package/src/v4/locales/zh-TW.ts +1 -0
  113. package/src/v4/mini/checks.ts +0 -1
  114. package/src/v4/mini/external.ts +2 -0
  115. package/src/v4/mini/schemas.ts +38 -2
  116. package/src/v4/mini/tests/checks.test.ts +1 -1
  117. package/src/v4/mini/tests/computed.test.ts +11 -17
  118. package/src/v4/mini/tests/index.test.ts +8 -0
  119. package/src/v4/mini/tests/string.test.ts +16 -0
  120. package/v3/ZodError.cjs +19 -0
  121. package/v3/errors.cjs +19 -0
  122. package/v3/external.cjs +19 -0
  123. package/v3/helpers/enumUtil.cjs +19 -0
  124. package/v3/helpers/errorUtil.cjs +20 -1
  125. package/v3/helpers/errorUtil.js +1 -1
  126. package/v3/helpers/parseUtil.cjs +19 -0
  127. package/v3/helpers/partialUtil.cjs +19 -0
  128. package/v3/helpers/typeAliases.cjs +19 -0
  129. package/v3/helpers/util.cjs +19 -0
  130. package/v3/index.cjs +19 -0
  131. package/v3/standard-schema.cjs +19 -0
  132. package/v3/types.cjs +19 -0
  133. package/v4/classic/checks.cjs +20 -2
  134. package/v4/classic/checks.d.cts +1 -1
  135. package/v4/classic/checks.d.ts +1 -1
  136. package/v4/classic/checks.js +1 -1
  137. package/v4/classic/coerce.cjs +19 -0
  138. package/v4/classic/compat.cjs +19 -0
  139. package/v4/classic/deep-partial.cjs +19 -0
  140. package/v4/classic/errors.cjs +19 -0
  141. package/v4/classic/external.cjs +22 -1
  142. package/v4/classic/external.d.cts +1 -1
  143. package/v4/classic/external.d.ts +1 -1
  144. package/v4/classic/external.js +1 -1
  145. package/v4/classic/from-json-schema.cjs +264 -24
  146. package/v4/classic/from-json-schema.js +245 -24
  147. package/v4/classic/in-out.cjs +19 -0
  148. package/v4/classic/index.cjs +19 -0
  149. package/v4/classic/iso.cjs +19 -0
  150. package/v4/classic/parse.cjs +19 -0
  151. package/v4/classic/schemas.cjs +100 -31
  152. package/v4/classic/schemas.d.cts +17 -1
  153. package/v4/classic/schemas.d.ts +17 -1
  154. package/v4/classic/schemas.js +77 -29
  155. package/v4/core/api.cjs +37 -2
  156. package/v4/core/api.d.cts +6 -4
  157. package/v4/core/api.d.ts +6 -4
  158. package/v4/core/api.js +17 -2
  159. package/v4/core/checks.cjs +19 -96
  160. package/v4/core/checks.d.cts +1 -1
  161. package/v4/core/checks.d.ts +1 -1
  162. package/v4/core/checks.js +0 -96
  163. package/v4/core/compile.cjs +164 -65
  164. package/v4/core/compile.d.cts +18 -4
  165. package/v4/core/compile.d.ts +18 -4
  166. package/v4/core/compile.js +145 -66
  167. package/v4/core/core.cjs +19 -0
  168. package/v4/core/doc.cjs +26 -2
  169. package/v4/core/doc.js +7 -2
  170. package/v4/core/errors.cjs +21 -5
  171. package/v4/core/errors.js +2 -5
  172. package/v4/core/index.cjs +19 -0
  173. package/v4/core/json-schema-generator.cjs +20 -1
  174. package/v4/core/json-schema-generator.js +2 -2
  175. package/v4/core/json-schema-processors.cjs +215 -63
  176. package/v4/core/json-schema-processors.d.cts +17 -0
  177. package/v4/core/json-schema-processors.d.ts +17 -0
  178. package/v4/core/json-schema-processors.js +195 -64
  179. package/v4/core/json-schema.cjs +19 -0
  180. package/v4/core/memoizer.cjs +204 -36
  181. package/v4/core/memoizer.js +162 -36
  182. package/v4/core/parse.cjs +56 -16
  183. package/v4/core/parse.js +37 -16
  184. package/v4/core/regexes.cjs +29 -6
  185. package/v4/core/regexes.d.cts +2 -0
  186. package/v4/core/regexes.d.ts +2 -0
  187. package/v4/core/regexes.js +8 -4
  188. package/v4/core/registries.cjs +19 -0
  189. package/v4/core/schemas.cjs +285 -66
  190. package/v4/core/schemas.d.cts +34 -3
  191. package/v4/core/schemas.d.ts +34 -3
  192. package/v4/core/schemas.js +264 -65
  193. package/v4/core/standard-schema.cjs +19 -0
  194. package/v4/core/to-json-schema.cjs +29 -7
  195. package/v4/core/to-json-schema.d.cts +7 -3
  196. package/v4/core/to-json-schema.d.ts +7 -3
  197. package/v4/core/to-json-schema.js +8 -7
  198. package/v4/core/util.cjs +181 -143
  199. package/v4/core/util.d.cts +25 -4
  200. package/v4/core/util.d.ts +25 -4
  201. package/v4/core/util.js +160 -143
  202. package/v4/core/versions.cjs +21 -2
  203. package/v4/core/versions.d.cts +1 -1
  204. package/v4/core/versions.d.ts +1 -1
  205. package/v4/core/versions.js +2 -2
  206. package/v4/core/visit.cjs +31 -0
  207. package/v4/core/visit.js +12 -0
  208. package/v4/index.cjs +19 -0
  209. package/v4/locales/ar.cjs +1 -0
  210. package/v4/locales/ar.js +1 -0
  211. package/v4/locales/az.cjs +1 -0
  212. package/v4/locales/az.js +1 -0
  213. package/v4/locales/be.cjs +1 -0
  214. package/v4/locales/be.js +1 -0
  215. package/v4/locales/bg.cjs +1 -0
  216. package/v4/locales/bg.js +1 -0
  217. package/v4/locales/bn.cjs +1 -0
  218. package/v4/locales/bn.js +1 -0
  219. package/v4/locales/ca.cjs +1 -0
  220. package/v4/locales/ca.js +1 -0
  221. package/v4/locales/ckb.cjs +1 -0
  222. package/v4/locales/ckb.js +1 -0
  223. package/v4/locales/cs.cjs +1 -0
  224. package/v4/locales/cs.js +1 -0
  225. package/v4/locales/da.cjs +1 -0
  226. package/v4/locales/da.js +1 -0
  227. package/v4/locales/de.cjs +1 -0
  228. package/v4/locales/de.js +1 -0
  229. package/v4/locales/el.cjs +1 -0
  230. package/v4/locales/el.js +1 -0
  231. package/v4/locales/en.cjs +1 -0
  232. package/v4/locales/en.js +1 -0
  233. package/v4/locales/eo.cjs +1 -0
  234. package/v4/locales/eo.js +1 -0
  235. package/v4/locales/es.cjs +1 -0
  236. package/v4/locales/es.js +1 -0
  237. package/v4/locales/fa.cjs +1 -0
  238. package/v4/locales/fa.js +1 -0
  239. package/v4/locales/fi.cjs +1 -0
  240. package/v4/locales/fi.js +1 -0
  241. package/v4/locales/fr-CA.cjs +1 -0
  242. package/v4/locales/fr-CA.js +1 -0
  243. package/v4/locales/fr.cjs +1 -0
  244. package/v4/locales/fr.js +1 -0
  245. package/v4/locales/gu.cjs +1 -0
  246. package/v4/locales/gu.js +1 -0
  247. package/v4/locales/he.cjs +1 -0
  248. package/v4/locales/he.js +1 -0
  249. package/v4/locales/hi.cjs +1 -0
  250. package/v4/locales/hi.js +1 -0
  251. package/v4/locales/hr.cjs +1 -0
  252. package/v4/locales/hr.js +1 -0
  253. package/v4/locales/hu.cjs +1 -0
  254. package/v4/locales/hu.js +1 -0
  255. package/v4/locales/hy.cjs +1 -0
  256. package/v4/locales/hy.js +1 -0
  257. package/v4/locales/id.cjs +1 -0
  258. package/v4/locales/id.js +1 -0
  259. package/v4/locales/index.cjs +19 -0
  260. package/v4/locales/is.cjs +1 -0
  261. package/v4/locales/is.js +1 -0
  262. package/v4/locales/it.cjs +1 -0
  263. package/v4/locales/it.js +1 -0
  264. package/v4/locales/ja.cjs +1 -0
  265. package/v4/locales/ja.js +1 -0
  266. package/v4/locales/ka.cjs +1 -0
  267. package/v4/locales/ka.js +1 -0
  268. package/v4/locales/km.cjs +1 -0
  269. package/v4/locales/km.js +1 -0
  270. package/v4/locales/kn.cjs +1 -0
  271. package/v4/locales/kn.js +1 -0
  272. package/v4/locales/ko.cjs +1 -0
  273. package/v4/locales/ko.js +1 -0
  274. package/v4/locales/lt.cjs +1 -0
  275. package/v4/locales/lt.js +1 -0
  276. package/v4/locales/mk.cjs +1 -0
  277. package/v4/locales/mk.js +1 -0
  278. package/v4/locales/ms.cjs +1 -0
  279. package/v4/locales/ms.js +1 -0
  280. package/v4/locales/ne.cjs +1 -0
  281. package/v4/locales/ne.js +1 -0
  282. package/v4/locales/nl.cjs +1 -0
  283. package/v4/locales/nl.js +1 -0
  284. package/v4/locales/nn.cjs +1 -0
  285. package/v4/locales/nn.js +1 -0
  286. package/v4/locales/no.cjs +1 -0
  287. package/v4/locales/no.js +1 -0
  288. package/v4/locales/ota.cjs +1 -0
  289. package/v4/locales/ota.js +1 -0
  290. package/v4/locales/pl.cjs +1 -0
  291. package/v4/locales/pl.js +1 -0
  292. package/v4/locales/ps.cjs +1 -0
  293. package/v4/locales/ps.js +1 -0
  294. package/v4/locales/pt-BR.cjs +1 -0
  295. package/v4/locales/pt-BR.js +1 -0
  296. package/v4/locales/pt.cjs +1 -0
  297. package/v4/locales/pt.js +1 -0
  298. package/v4/locales/ro.cjs +1 -0
  299. package/v4/locales/ro.js +1 -0
  300. package/v4/locales/ru.cjs +1 -0
  301. package/v4/locales/ru.js +1 -0
  302. package/v4/locales/sk.cjs +1 -0
  303. package/v4/locales/sk.js +1 -0
  304. package/v4/locales/sl.cjs +1 -0
  305. package/v4/locales/sl.js +1 -0
  306. package/v4/locales/sv.cjs +1 -0
  307. package/v4/locales/sv.js +1 -0
  308. package/v4/locales/ta.cjs +1 -0
  309. package/v4/locales/ta.js +1 -0
  310. package/v4/locales/th.cjs +1 -0
  311. package/v4/locales/th.js +1 -0
  312. package/v4/locales/tk.cjs +1 -0
  313. package/v4/locales/tk.js +1 -0
  314. package/v4/locales/tr.cjs +1 -0
  315. package/v4/locales/tr.js +1 -0
  316. package/v4/locales/uk.cjs +1 -0
  317. package/v4/locales/uk.js +1 -0
  318. package/v4/locales/ur.cjs +1 -0
  319. package/v4/locales/ur.js +1 -0
  320. package/v4/locales/uz.cjs +1 -0
  321. package/v4/locales/uz.js +1 -0
  322. package/v4/locales/vi.cjs +1 -0
  323. package/v4/locales/vi.js +1 -0
  324. package/v4/locales/yo.cjs +1 -0
  325. package/v4/locales/yo.js +1 -0
  326. package/v4/locales/zh-CN.cjs +1 -0
  327. package/v4/locales/zh-CN.js +1 -0
  328. package/v4/locales/zh-TW.cjs +1 -0
  329. package/v4/locales/zh-TW.js +1 -0
  330. package/v4/mini/checks.cjs +20 -2
  331. package/v4/mini/checks.d.cts +1 -1
  332. package/v4/mini/checks.d.ts +1 -1
  333. package/v4/mini/checks.js +1 -1
  334. package/v4/mini/coerce.cjs +19 -0
  335. package/v4/mini/deep-partial.cjs +19 -0
  336. package/v4/mini/external.cjs +22 -1
  337. package/v4/mini/external.d.cts +1 -1
  338. package/v4/mini/external.d.ts +1 -1
  339. package/v4/mini/external.js +1 -1
  340. package/v4/mini/in-out.cjs +19 -0
  341. package/v4/mini/index.cjs +19 -0
  342. package/v4/mini/iso.cjs +19 -0
  343. package/v4/mini/parse.cjs +19 -0
  344. package/v4/mini/schemas.cjs +42 -4
  345. package/v4/mini/schemas.d.cts +8 -0
  346. package/v4/mini/schemas.d.ts +8 -0
  347. package/v4/mini/schemas.js +19 -2
  348. package/v4-mini/index.cjs +19 -0
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.coerce = exports.ZodMiniISODuration = exports.ZodMiniISOTime = exports.ZodMiniISODate = exports.ZodMiniISODateTime = exports.iso = exports.locales = exports.toJSONSchema = exports.getDiscriminatedOption = exports.ZodCompileUnsupportedError = exports.ZodCompileAsyncError = exports.compile = exports.toZod = exports.NEVER = exports.util = exports.TimePrecision = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.memoizer = exports.config = exports.registry = exports.globalRegistry = exports.output = exports.input = exports.deepPartial = exports.core = void 0;
29
+ exports.coerce = exports.ZodMiniISODuration = exports.ZodMiniISOTime = exports.ZodMiniISODate = exports.ZodMiniISODateTime = exports.iso = exports.locales = exports.toJSONSchema = exports.getDiscriminatedOption = exports.ZodCompileUnsupportedError = exports.ZodCompileAsyncError = exports.withParser = exports.compile = exports.toZod = exports.INVALID = exports.NEVER = exports.util = exports.TimePrecision = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.memoizer = exports.config = exports.registry = exports.globalRegistry = exports.output = exports.input = exports.deepPartial = exports.core = void 0;
30
30
  exports.core = __importStar(require("../core/index.cjs"));
31
31
  __exportStar(require("./parse.cjs"), exports);
32
32
  __exportStar(require("./schemas.cjs"), exports);
@@ -53,8 +53,10 @@ Object.defineProperty(exports, "flattenError", { enumerable: true, get: function
53
53
  Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return index_js_1.TimePrecision; } });
54
54
  Object.defineProperty(exports, "util", { enumerable: true, get: function () { return index_js_1.util; } });
55
55
  Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return index_js_1.NEVER; } });
56
+ Object.defineProperty(exports, "INVALID", { enumerable: true, get: function () { return index_js_1.INVALID; } });
56
57
  Object.defineProperty(exports, "toZod", { enumerable: true, get: function () { return index_js_1.toZod; } });
57
58
  Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return index_js_1.compile; } });
59
+ Object.defineProperty(exports, "withParser", { enumerable: true, get: function () { return index_js_1.withParser; } });
58
60
  Object.defineProperty(exports, "ZodCompileAsyncError", { enumerable: true, get: function () { return index_js_1.ZodCompileAsyncError; } });
59
61
  Object.defineProperty(exports, "ZodCompileUnsupportedError", { enumerable: true, get: function () { return index_js_1.ZodCompileUnsupportedError; } });
60
62
  Object.defineProperty(exports, "getDiscriminatedOption", { enumerable: true, get: function () { return index_js_1.getDiscriminatedOption; } });
@@ -72,3 +74,22 @@ Object.defineProperty(exports, "ZodMiniISOTime", { enumerable: true, get: functi
72
74
  Object.defineProperty(exports, "ZodMiniISODuration", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODuration; } });
73
75
  // coerce
74
76
  exports.coerce = __importStar(require("./coerce.cjs"));
77
+
78
+ // seal-cjs-exports
79
+ (function () {
80
+ var keys = Object.getOwnPropertyNames(exports);
81
+ for (var i = 0; i < keys.length; i++) {
82
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
83
+ if (!desc || !desc.get || !desc.configurable) continue;
84
+ var value;
85
+ try {
86
+ value = desc.get();
87
+ } catch (e) {
88
+ continue;
89
+ }
90
+ // a circular require may not have settled this one yet, so leave it live
91
+ if (value === undefined) continue;
92
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
93
+ }
94
+ Object.freeze(exports);
95
+ })();
@@ -7,7 +7,7 @@ export { input, output } from "./in-out.cjs";
7
7
  export type { infer } from "../core/index.cjs";
8
8
  export type { JSONType } from "../core/util.cjs";
9
9
  export type { CompileOptions } from "../core/index.cjs";
10
- export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, toZod, compile, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.cjs";
10
+ export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, INVALID, toZod, compile, withParser, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.cjs";
11
11
  export { toJSONSchema } from "../core/json-schema-processors.cjs";
12
12
  export * as locales from "../locales/index.cjs";
13
13
  /** A special constant with type `never` */
@@ -7,7 +7,7 @@ export { input, output } from "./in-out.js";
7
7
  export type { infer } from "../core/index.js";
8
8
  export type { JSONType } from "../core/util.js";
9
9
  export type { CompileOptions } from "../core/index.js";
10
- export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, toZod, compile, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
10
+ export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, INVALID, toZod, compile, withParser, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
11
11
  export { toJSONSchema } from "../core/json-schema-processors.js";
12
12
  export * as locales from "../locales/index.js";
13
13
  /** A special constant with type `never` */
@@ -4,7 +4,7 @@ export * from "./schemas.js";
4
4
  export * from "./checks.js";
5
5
  export { deepPartial } from "./deep-partial.js";
6
6
  export { input, output } from "./in-out.js";
7
- export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, toZod, compile, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
7
+ export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, INVALID, toZod, compile, withParser, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
8
8
  export { toJSONSchema } from "../core/json-schema-processors.js";
9
9
  export * as locales from "../locales/index.js";
10
10
  /** A special constant with type `never` */
@@ -61,3 +61,22 @@ function output(schema) {
61
61
  prefault: (s, rewritten) => (rewritten ? s._zod.def.innerType : s),
62
62
  });
63
63
  }
64
+
65
+ // seal-cjs-exports
66
+ (function () {
67
+ var keys = Object.getOwnPropertyNames(exports);
68
+ for (var i = 0; i < keys.length; i++) {
69
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
70
+ if (!desc || !desc.get || !desc.configurable) continue;
71
+ var value;
72
+ try {
73
+ value = desc.get();
74
+ } catch (e) {
75
+ continue;
76
+ }
77
+ // a circular require may not have settled this one yet, so leave it live
78
+ if (value === undefined) continue;
79
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
80
+ }
81
+ Object.freeze(exports);
82
+ })();
package/v4/mini/index.cjs CHANGED
@@ -30,3 +30,22 @@ exports.z = void 0;
30
30
  const z = __importStar(require("./external.cjs"));
31
31
  exports.z = z;
32
32
  __exportStar(require("./external.cjs"), exports);
33
+
34
+ // seal-cjs-exports
35
+ (function () {
36
+ var keys = Object.getOwnPropertyNames(exports);
37
+ for (var i = 0; i < keys.length; i++) {
38
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
39
+ if (!desc || !desc.get || !desc.configurable) continue;
40
+ var value;
41
+ try {
42
+ value = desc.get();
43
+ } catch (e) {
44
+ continue;
45
+ }
46
+ // a circular require may not have settled this one yet, so leave it live
47
+ if (value === undefined) continue;
48
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
49
+ }
50
+ Object.freeze(exports);
51
+ })();
package/v4/mini/iso.cjs CHANGED
@@ -62,3 +62,22 @@ exports.ZodMiniISODuration = core.$constructor("ZodMiniISODuration", (inst, def)
62
62
  function duration(params) {
63
63
  return core._isoDuration(exports.ZodMiniISODuration, params);
64
64
  }
65
+
66
+ // seal-cjs-exports
67
+ (function () {
68
+ var keys = Object.getOwnPropertyNames(exports);
69
+ for (var i = 0; i < keys.length; i++) {
70
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
71
+ if (!desc || !desc.get || !desc.configurable) continue;
72
+ var value;
73
+ try {
74
+ value = desc.get();
75
+ } catch (e) {
76
+ continue;
77
+ }
78
+ // a circular require may not have settled this one yet, so leave it live
79
+ if (value === undefined) continue;
80
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
81
+ }
82
+ Object.freeze(exports);
83
+ })();
package/v4/mini/parse.cjs CHANGED
@@ -16,3 +16,22 @@ Object.defineProperty(exports, "safeEncode", { enumerable: true, get: function (
16
16
  Object.defineProperty(exports, "safeDecode", { enumerable: true, get: function () { return index_js_1.safeDecode; } });
17
17
  Object.defineProperty(exports, "safeEncodeAsync", { enumerable: true, get: function () { return index_js_1.safeEncodeAsync; } });
18
18
  Object.defineProperty(exports, "safeDecodeAsync", { enumerable: true, get: function () { return index_js_1.safeDecodeAsync; } });
19
+
20
+ // seal-cjs-exports
21
+ (function () {
22
+ var keys = Object.getOwnPropertyNames(exports);
23
+ for (var i = 0; i < keys.length; i++) {
24
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
25
+ if (!desc || !desc.get || !desc.configurable) continue;
26
+ var value;
27
+ try {
28
+ value = desc.get();
29
+ } catch (e) {
30
+ continue;
31
+ }
32
+ // a circular require may not have settled this one yet, so leave it live
33
+ if (value === undefined) continue;
34
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
35
+ }
36
+ Object.freeze(exports);
37
+ })();
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ZodMiniLiteral = exports.ZodMiniEnum = exports.ZodMiniSet = exports.ZodMiniMap = exports.ZodMiniRecord = exports.ZodMiniTuple = exports.ZodMiniIntersection = exports.ZodMiniDiscriminatedUnion = exports.ZodMiniXor = exports.ZodMiniUnion = exports.ZodMiniObject = exports.ZodMiniArray = exports.ZodMiniDate = exports.ZodMiniVoid = exports.ZodMiniNever = exports.ZodMiniUnknown = exports.ZodMiniAny = exports.ZodMiniNull = exports.ZodMiniUndefined = exports.ZodMiniSymbol = exports.ZodMiniBigIntFormat = exports.ZodMiniBigInt = exports.ZodMiniBoolean = exports.ZodMiniNumberFormat = exports.ZodMiniNumber = exports.ZodMiniCustomStringFormat = exports.ZodMiniJWT = exports.ZodMiniCreditCard = exports.ZodMiniE164 = exports.ZodMiniBase64URL = exports.ZodMiniBase64 = exports.ZodMiniMAC = exports.ZodMiniCIDRv6 = exports.ZodMiniCIDRv4 = exports.ZodMiniIPv6 = exports.ZodMiniIPv4 = exports.ZodMiniKSUID = exports.ZodMiniXID = exports.ZodMiniULID = exports.ZodMiniCUID2 = exports.ZodMiniCUID = exports.ZodMiniNanoID = exports.ZodMiniEmoji = exports.ZodMiniURL = exports.ZodMiniUUID = exports.ZodMiniGUID = exports.ZodMiniEmail = exports.ZodMiniStringFormat = exports.ZodMiniString = exports.ZodMiniType = void 0;
27
- exports.ZodMiniFunction = exports.stringbool = exports.meta = exports.describe = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniCodec = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault = exports.ZodMiniNullable = exports.ZodMiniExactOptional = exports.ZodMiniOptional = exports.ZodMiniTransform = exports.ZodMiniFile = void 0;
26
+ exports.ZodMiniEnum = exports.ZodMiniSet = exports.ZodMiniMap = exports.ZodMiniRecord = exports.ZodMiniTuple = exports.ZodMiniIntersection = exports.ZodMiniDiscriminatedUnion = exports.ZodMiniXor = exports.ZodMiniUnion = exports.ZodMiniObject = exports.ZodMiniArray = exports.ZodMiniDate = exports.ZodMiniVoid = exports.ZodMiniNever = exports.ZodMiniUnknown = exports.ZodMiniAny = exports.ZodMiniNull = exports.ZodMiniUndefined = exports.ZodMiniSymbol = exports.ZodMiniBigIntFormat = exports.ZodMiniBigInt = exports.ZodMiniBoolean = exports.ZodMiniNumberFormat = exports.ZodMiniNumber = exports.ZodMiniCustomStringFormat = exports.ZodMiniJWT = exports.ZodMiniIBAN = exports.ZodMiniCreditCard = exports.ZodMiniE164 = exports.ZodMiniBase64URL = exports.ZodMiniBase64 = exports.ZodMiniMAC = exports.ZodMiniCIDRv6 = exports.ZodMiniCIDRv4 = exports.ZodMiniIPv6 = exports.ZodMiniIPv4 = exports.ZodMiniKSUID = exports.ZodMiniXID = exports.ZodMiniULID = exports.ZodMiniCUID2 = exports.ZodMiniCUID = exports.ZodMiniNanoID = exports.ZodMiniEmoji = exports.ZodMiniURL = exports.ZodMiniUUID = exports.ZodMiniGUID = exports.ZodMiniEmail = exports.ZodMiniStringFormat = exports.ZodMiniString = exports.ZodMiniType = void 0;
27
+ exports.ZodMiniFunction = exports.stringbool = exports.meta = exports.describe = exports.ZodMiniProperties = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniCodec = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault = exports.ZodMiniNullable = exports.ZodMiniExactOptional = exports.ZodMiniOptional = exports.ZodMiniTransform = exports.ZodMiniFile = exports.ZodMiniLiteral = void 0;
28
28
  exports.string = string;
29
29
  exports.email = email;
30
30
  exports.guid = guid;
@@ -50,6 +50,7 @@ exports.base64 = base64;
50
50
  exports.base64url = base64url;
51
51
  exports.e164 = e164;
52
52
  exports.creditCard = creditCard;
53
+ exports.iban = iban;
53
54
  exports.jwt = jwt;
54
55
  exports.stringFormat = stringFormat;
55
56
  exports.hostname = hostname;
@@ -119,6 +120,7 @@ exports.readonly = readonly;
119
120
  exports.templateLiteral = templateLiteral;
120
121
  exports.lazy = _lazy;
121
122
  exports.promise = promise;
123
+ exports.properties = properties;
122
124
  exports.check = check;
123
125
  exports.custom = custom;
124
126
  exports.refine = refine;
@@ -388,6 +390,14 @@ exports.ZodMiniCreditCard = core.$constructor("ZodMiniCreditCard", (inst, def) =
388
390
  function creditCard(params) {
389
391
  return core._creditCard(exports.ZodMiniCreditCard, params);
390
392
  }
393
+ exports.ZodMiniIBAN = core.$constructor("ZodMiniIBAN", (inst, def) => {
394
+ core.$ZodIBAN.init(inst, def);
395
+ exports.ZodMiniStringFormat.init(inst, def);
396
+ });
397
+ // @__NO_SIDE_EFFECTS__
398
+ function iban(params) {
399
+ return core._iban(exports.ZodMiniIBAN, params);
400
+ }
391
401
  exports.ZodMiniJWT = core.$constructor("ZodMiniJWT", (inst, def) => {
392
402
  core.$ZodJWT.init(inst, def);
393
403
  exports.ZodMiniStringFormat.init(inst, def);
@@ -639,7 +649,8 @@ function required(schema, mask) {
639
649
  }
640
650
  // @__NO_SIDE_EFFECTS__
641
651
  function catchall(inst, catchall) {
642
- return inst.clone({ ...inst._zod.def, catchall: catchall });
652
+ // `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree
653
+ return inst.clone(util.mergeDefs(inst._zod.def, { catchall: catchall }));
643
654
  }
644
655
  exports.ZodMiniUnion = core.$constructor("ZodMiniUnion", (inst, def) => {
645
656
  core.$ZodUnion.init(inst, def);
@@ -778,7 +789,8 @@ function set(valueType, params) {
778
789
  exports.ZodMiniEnum = core.$constructor("ZodMiniEnum", (inst, def) => {
779
790
  core.$ZodEnum.init(inst, def);
780
791
  exports.ZodMiniType.init(inst, def);
781
- inst.options = Object.values(def.entries);
792
+ // reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out
793
+ inst.options = [...inst._zod.values];
782
794
  });
783
795
  // @__NO_SIDE_EFFECTS__
784
796
  function _enum(values, params) {
@@ -1033,6 +1045,13 @@ exports.ZodMiniCustom = core.$constructor("ZodMiniCustom", (inst, def) => {
1033
1045
  core.$ZodCustom.init(inst, def);
1034
1046
  exports.ZodMiniType.init(inst, def);
1035
1047
  });
1048
+ exports.ZodMiniProperties = core.$constructor("ZodMiniProperties", (inst, def) => {
1049
+ core.$ZodProperties.init(inst, def);
1050
+ exports.ZodMiniType.init(inst, def);
1051
+ });
1052
+ function properties(shape, params) {
1053
+ return core._properties(exports.ZodMiniProperties, shape, params);
1054
+ }
1036
1055
  // custom checks
1037
1056
  // @__NO_SIDE_EFFECTS__
1038
1057
  function check(fn, params) {
@@ -1109,3 +1128,22 @@ function _function(params) {
1109
1128
  output: params?.output ?? unknown(),
1110
1129
  });
1111
1130
  }
1131
+
1132
+ // seal-cjs-exports
1133
+ (function () {
1134
+ var keys = Object.getOwnPropertyNames(exports);
1135
+ for (var i = 0; i < keys.length; i++) {
1136
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
1137
+ if (!desc || !desc.get || !desc.configurable) continue;
1138
+ var value;
1139
+ try {
1140
+ value = desc.get();
1141
+ } catch (e) {
1142
+ continue;
1143
+ }
1144
+ // a circular require may not have settled this one yet, so leave it live
1145
+ if (value === undefined) continue;
1146
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
1147
+ }
1148
+ Object.freeze(exports);
1149
+ })();
@@ -132,6 +132,10 @@ export interface ZodMiniCreditCard extends _ZodMiniString<core.$ZodCreditCardInt
132
132
  }
133
133
  export declare const ZodMiniCreditCard: core.$constructor<ZodMiniCreditCard>;
134
134
  export declare function creditCard(params?: string | core.$ZodCreditCardParams): ZodMiniCreditCard;
135
+ export interface ZodMiniIBAN extends _ZodMiniString<core.$ZodIBANInternals> {
136
+ }
137
+ export declare const ZodMiniIBAN: core.$constructor<ZodMiniIBAN>;
138
+ export declare function iban(params?: string | core.$ZodIBANParams): ZodMiniIBAN;
135
139
  export interface ZodMiniJWT extends _ZodMiniString<core.$ZodJWTInternals> {
136
140
  }
137
141
  export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
@@ -415,6 +419,10 @@ export declare function promise<T extends SomeType>(innerType: T): ZodMiniPromis
415
419
  export interface ZodMiniCustom<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodCustomInternals<O, I>> {
416
420
  }
417
421
  export declare const ZodMiniCustom: core.$constructor<ZodMiniCustom>;
422
+ export interface ZodMiniProperties<Shape extends core.$ZodShape = core.$ZodShape> extends _ZodMiniType<core.$ZodPropertiesInternals<Shape>>, core.$ZodProperties<Shape> {
423
+ }
424
+ export declare const ZodMiniProperties: core.$constructor<ZodMiniProperties>;
425
+ export declare function properties<Shape extends core.$ZodShape>(shape: Shape, params?: string | core.$ZodPropertiesParams): ZodMiniProperties<Shape>;
418
426
  export declare function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O>;
419
427
  export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodMiniCustom<O, I>;
420
428
  export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
@@ -132,6 +132,10 @@ export interface ZodMiniCreditCard extends _ZodMiniString<core.$ZodCreditCardInt
132
132
  }
133
133
  export declare const ZodMiniCreditCard: core.$constructor<ZodMiniCreditCard>;
134
134
  export declare function creditCard(params?: string | core.$ZodCreditCardParams): ZodMiniCreditCard;
135
+ export interface ZodMiniIBAN extends _ZodMiniString<core.$ZodIBANInternals> {
136
+ }
137
+ export declare const ZodMiniIBAN: core.$constructor<ZodMiniIBAN>;
138
+ export declare function iban(params?: string | core.$ZodIBANParams): ZodMiniIBAN;
135
139
  export interface ZodMiniJWT extends _ZodMiniString<core.$ZodJWTInternals> {
136
140
  }
137
141
  export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
@@ -415,6 +419,10 @@ export declare function promise<T extends SomeType>(innerType: T): ZodMiniPromis
415
419
  export interface ZodMiniCustom<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodCustomInternals<O, I>> {
416
420
  }
417
421
  export declare const ZodMiniCustom: core.$constructor<ZodMiniCustom>;
422
+ export interface ZodMiniProperties<Shape extends core.$ZodShape = core.$ZodShape> extends _ZodMiniType<core.$ZodPropertiesInternals<Shape>>, core.$ZodProperties<Shape> {
423
+ }
424
+ export declare const ZodMiniProperties: core.$constructor<ZodMiniProperties>;
425
+ export declare function properties<Shape extends core.$ZodShape>(shape: Shape, params?: string | core.$ZodPropertiesParams): ZodMiniProperties<Shape>;
418
426
  export declare function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O>;
419
427
  export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodMiniCustom<O, I>;
420
428
  export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
@@ -257,6 +257,14 @@ export const ZodMiniCreditCard = /*@__PURE__*/ core.$constructor("ZodMiniCreditC
257
257
  export function creditCard(params) {
258
258
  return core._creditCard(ZodMiniCreditCard, params);
259
259
  }
260
+ export const ZodMiniIBAN = /*@__PURE__*/ core.$constructor("ZodMiniIBAN", (inst, def) => {
261
+ core.$ZodIBAN.init(inst, def);
262
+ ZodMiniStringFormat.init(inst, def);
263
+ });
264
+ // @__NO_SIDE_EFFECTS__
265
+ export function iban(params) {
266
+ return core._iban(ZodMiniIBAN, params);
267
+ }
260
268
  export const ZodMiniJWT = /*@__PURE__*/ core.$constructor("ZodMiniJWT", (inst, def) => {
261
269
  core.$ZodJWT.init(inst, def);
262
270
  ZodMiniStringFormat.init(inst, def);
@@ -511,7 +519,8 @@ export function required(schema, mask) {
511
519
  }
512
520
  // @__NO_SIDE_EFFECTS__
513
521
  export function catchall(inst, catchall) {
514
- return inst.clone({ ...inst._zod.def, catchall: catchall });
522
+ // `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree
523
+ return inst.clone(util.mergeDefs(inst._zod.def, { catchall: catchall }));
515
524
  }
516
525
  export const ZodMiniUnion = /*@__PURE__*/ core.$constructor("ZodMiniUnion", (inst, def) => {
517
526
  core.$ZodUnion.init(inst, def);
@@ -650,7 +659,8 @@ export function set(valueType, params) {
650
659
  export const ZodMiniEnum = /*@__PURE__*/ core.$constructor("ZodMiniEnum", (inst, def) => {
651
660
  core.$ZodEnum.init(inst, def);
652
661
  ZodMiniType.init(inst, def);
653
- inst.options = Object.values(def.entries);
662
+ // reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out
663
+ inst.options = [...inst._zod.values];
654
664
  });
655
665
  // @__NO_SIDE_EFFECTS__
656
666
  function _enum(values, params) {
@@ -908,6 +918,13 @@ export const ZodMiniCustom = /*@__PURE__*/ core.$constructor("ZodMiniCustom", (i
908
918
  core.$ZodCustom.init(inst, def);
909
919
  ZodMiniType.init(inst, def);
910
920
  });
921
+ export const ZodMiniProperties = /*@__PURE__*/ core.$constructor("ZodMiniProperties", (inst, def) => {
922
+ core.$ZodProperties.init(inst, def);
923
+ ZodMiniType.init(inst, def);
924
+ });
925
+ export function properties(shape, params) {
926
+ return core._properties(ZodMiniProperties, shape, params);
927
+ }
911
928
  // custom checks
912
929
  // @__NO_SIDE_EFFECTS__
913
930
  export function check(fn, params) {
package/v4-mini/index.cjs CHANGED
@@ -30,3 +30,22 @@ exports.z = void 0;
30
30
  const z = __importStar(require("../v4/mini/external.cjs"));
31
31
  exports.z = z;
32
32
  __exportStar(require("../v4/mini/external.cjs"), exports);
33
+
34
+ // seal-cjs-exports
35
+ (function () {
36
+ var keys = Object.getOwnPropertyNames(exports);
37
+ for (var i = 0; i < keys.length; i++) {
38
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
39
+ if (!desc || !desc.get || !desc.configurable) continue;
40
+ var value;
41
+ try {
42
+ value = desc.get();
43
+ } catch (e) {
44
+ continue;
45
+ }
46
+ // a circular require may not have settled this one yet, so leave it live
47
+ if (value === undefined) continue;
48
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
49
+ }
50
+ Object.freeze(exports);
51
+ })();