zedbee 0.1.0-beta.10 → 0.1.0-beta.12

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 (466) hide show
  1. package/README.md +8 -0
  2. package/THIRD_PARTY_NOTICES.md +2 -2
  3. package/dist/checks/applicability.d.ts.map +1 -1
  4. package/dist/checks/applicability.js +6 -16
  5. package/dist/checks/applicability.js.map +1 -1
  6. package/dist/checks/compiler-inputs.d.ts +9 -0
  7. package/dist/checks/compiler-inputs.d.ts.map +1 -0
  8. package/dist/checks/compiler-inputs.js +12 -0
  9. package/dist/checks/compiler-inputs.js.map +1 -0
  10. package/dist/checks/dispatcher.d.ts.map +1 -1
  11. package/dist/checks/dispatcher.js +13 -0
  12. package/dist/checks/dispatcher.js.map +1 -1
  13. package/dist/checks/engine-identity.js +2 -2
  14. package/dist/checks/engine-identity.js.map +1 -1
  15. package/dist/checks/eslint/lint-adapter.d.ts.map +1 -1
  16. package/dist/checks/eslint/lint-adapter.js +40 -22
  17. package/dist/checks/eslint/lint-adapter.js.map +1 -1
  18. package/dist/checks/observation-result.d.ts.map +1 -1
  19. package/dist/checks/observation-result.js +9 -3
  20. package/dist/checks/observation-result.js.map +1 -1
  21. package/dist/checks/policy-scheduling.d.ts.map +1 -1
  22. package/dist/checks/policy-scheduling.js +6 -1
  23. package/dist/checks/policy-scheduling.js.map +1 -1
  24. package/dist/checks/renamed-baselines.d.ts +5 -0
  25. package/dist/checks/renamed-baselines.d.ts.map +1 -0
  26. package/dist/checks/renamed-baselines.js +27 -0
  27. package/dist/checks/renamed-baselines.js.map +1 -0
  28. package/dist/checks/typescript/adapter.d.ts.map +1 -1
  29. package/dist/checks/typescript/adapter.js +45 -11
  30. package/dist/checks/typescript/adapter.js.map +1 -1
  31. package/dist/checks/typescript/compiler-host.js +117 -110
  32. package/dist/checks/typescript/compiler-host.js.map +1 -1
  33. package/dist/checks/typescript/config.d.ts +6 -0
  34. package/dist/checks/typescript/config.d.ts.map +1 -1
  35. package/dist/checks/typescript/config.js +194 -61
  36. package/dist/checks/typescript/config.js.map +1 -1
  37. package/dist/checks/typescript/projects.d.ts +17 -0
  38. package/dist/checks/typescript/projects.d.ts.map +1 -0
  39. package/dist/checks/typescript/projects.js +42 -0
  40. package/dist/checks/typescript/projects.js.map +1 -0
  41. package/dist/checks/vulnerabilities/normalize.d.ts.map +1 -1
  42. package/dist/checks/vulnerabilities/normalize.js +13 -9
  43. package/dist/checks/vulnerabilities/normalize.js.map +1 -1
  44. package/dist/cli.d.ts +2 -0
  45. package/dist/cli.d.ts.map +1 -1
  46. package/dist/cli.js +22 -2
  47. package/dist/cli.js.map +1 -1
  48. package/dist/commands/agent.d.ts +11 -0
  49. package/dist/commands/agent.d.ts.map +1 -0
  50. package/dist/commands/agent.js +92 -0
  51. package/dist/commands/agent.js.map +1 -0
  52. package/dist/commands/fix.d.ts.map +1 -1
  53. package/dist/commands/fix.js +71 -12
  54. package/dist/commands/fix.js.map +1 -1
  55. package/dist/commands/init.d.ts +3 -2
  56. package/dist/commands/init.d.ts.map +1 -1
  57. package/dist/commands/init.js +35 -2
  58. package/dist/commands/init.js.map +1 -1
  59. package/dist/doctor/diagnostics.d.ts +1 -1
  60. package/dist/doctor/diagnostics.d.ts.map +1 -1
  61. package/dist/doctor/diagnostics.js +8 -11
  62. package/dist/doctor/diagnostics.js.map +1 -1
  63. package/dist/fixes/apply-plan.d.ts +6 -0
  64. package/dist/fixes/apply-plan.d.ts.map +1 -1
  65. package/dist/fixes/apply-plan.js +165 -60
  66. package/dist/fixes/apply-plan.js.map +1 -1
  67. package/dist/init/github-workflow.d.ts +13 -0
  68. package/dist/init/github-workflow.d.ts.map +1 -0
  69. package/dist/init/github-workflow.js +244 -0
  70. package/dist/init/github-workflow.js.map +1 -0
  71. package/dist/init/recommend.d.ts.map +1 -1
  72. package/dist/init/recommend.js +10 -0
  73. package/dist/init/recommend.js.map +1 -1
  74. package/dist/init/types.d.ts +8 -0
  75. package/dist/init/types.d.ts.map +1 -1
  76. package/dist/init/types.js.map +1 -1
  77. package/dist/init/write-config.d.ts.map +1 -1
  78. package/dist/init/write-config.js +1 -0
  79. package/dist/init/write-config.js.map +1 -1
  80. package/dist/inspection/workspaces.d.ts +2 -0
  81. package/dist/inspection/workspaces.d.ts.map +1 -1
  82. package/dist/inspection/workspaces.js +3 -2
  83. package/dist/inspection/workspaces.js.map +1 -1
  84. package/dist/renderers/sarif.d.ts.map +1 -1
  85. package/dist/renderers/sarif.js +9 -8
  86. package/dist/renderers/sarif.js.map +1 -1
  87. package/dist/ui/init-app.d.ts +3 -3
  88. package/dist/ui/init-app.d.ts.map +1 -1
  89. package/dist/ui/init-app.js +20 -5
  90. package/dist/ui/init-app.js.map +1 -1
  91. package/docs/checks.md +19 -1
  92. package/docs/cli-reference.md +43 -1
  93. package/docs/commercial-licensing.md +2 -2
  94. package/docs/dependency-license-obligations.md +1 -1
  95. package/docs/managed-fixes.md +11 -2
  96. package/docs/reporting.md +2 -0
  97. package/node_modules/zod/README.md +2 -2
  98. package/node_modules/zod/compile.cjs +19 -0
  99. package/node_modules/zod/index.cjs +19 -0
  100. package/node_modules/zod/locales/index.cjs +19 -0
  101. package/node_modules/zod/mini/index.cjs +19 -0
  102. package/node_modules/zod/package.json +8 -7
  103. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  104. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  105. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  106. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  107. package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  108. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  109. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  110. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  111. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  112. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  113. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  114. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  115. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  116. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  117. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  118. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  119. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  120. package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  121. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  122. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  123. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  124. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  125. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  126. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  127. package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  128. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  129. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  130. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  131. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  132. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  133. package/node_modules/zod/src/v4/core/api.ts +44 -28
  134. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  135. package/node_modules/zod/src/v4/core/compile.ts +227 -93
  136. package/node_modules/zod/src/v4/core/core.ts +1 -3
  137. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  138. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  139. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  140. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  141. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  142. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  143. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  144. package/node_modules/zod/src/v4/core/schemas.ts +331 -133
  145. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  146. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  147. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  148. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  149. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  150. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  151. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  152. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  153. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  154. package/node_modules/zod/src/v4/core/util.ts +231 -147
  155. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  156. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  157. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  158. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  159. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  160. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  161. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  162. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  163. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  164. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  165. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  166. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  167. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  168. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  169. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  170. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  171. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  172. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  173. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  174. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  175. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  176. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  177. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  178. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  179. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  180. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  181. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  182. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  183. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  184. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  185. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  186. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  187. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  188. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  189. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  190. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  191. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  192. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  193. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  194. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  195. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  196. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  197. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  198. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  199. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  200. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  201. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  202. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  203. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  204. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  205. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  206. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  207. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  208. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  209. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  210. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  211. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  212. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  213. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  214. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  215. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  216. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  217. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  218. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  219. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  220. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  221. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  222. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  223. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  224. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  225. package/node_modules/zod/v3/ZodError.cjs +19 -0
  226. package/node_modules/zod/v3/errors.cjs +19 -0
  227. package/node_modules/zod/v3/external.cjs +19 -0
  228. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  229. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  230. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  231. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  232. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  233. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  234. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  235. package/node_modules/zod/v3/index.cjs +19 -0
  236. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  237. package/node_modules/zod/v3/types.cjs +19 -0
  238. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  239. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  240. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  241. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  242. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  243. package/node_modules/zod/v4/classic/external.cjs +22 -1
  244. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  245. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  246. package/node_modules/zod/v4/classic/external.js +1 -1
  247. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  248. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  249. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  250. package/node_modules/zod/v4/classic/index.cjs +19 -0
  251. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  252. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  253. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  254. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  255. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  256. package/node_modules/zod/v4/classic/schemas.js +77 -33
  257. package/node_modules/zod/v4/core/api.cjs +45 -22
  258. package/node_modules/zod/v4/core/api.d.cts +12 -6
  259. package/node_modules/zod/v4/core/api.d.ts +12 -6
  260. package/node_modules/zod/v4/core/api.js +25 -22
  261. package/node_modules/zod/v4/core/checks.cjs +51 -97
  262. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  263. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  264. package/node_modules/zod/v4/core/checks.js +31 -96
  265. package/node_modules/zod/v4/core/compile.cjs +181 -78
  266. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  267. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  268. package/node_modules/zod/v4/core/compile.js +162 -79
  269. package/node_modules/zod/v4/core/core.cjs +20 -1
  270. package/node_modules/zod/v4/core/core.js +1 -1
  271. package/node_modules/zod/v4/core/doc.cjs +26 -2
  272. package/node_modules/zod/v4/core/doc.js +7 -2
  273. package/node_modules/zod/v4/core/errors.cjs +21 -5
  274. package/node_modules/zod/v4/core/errors.js +2 -5
  275. package/node_modules/zod/v4/core/index.cjs +19 -0
  276. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  277. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  278. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  279. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  280. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  281. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  282. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  283. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  284. package/node_modules/zod/v4/core/memoizer.js +69 -23
  285. package/node_modules/zod/v4/core/parse.cjs +56 -16
  286. package/node_modules/zod/v4/core/parse.js +37 -16
  287. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  288. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  289. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  290. package/node_modules/zod/v4/core/regexes.js +10 -4
  291. package/node_modules/zod/v4/core/registries.cjs +19 -0
  292. package/node_modules/zod/v4/core/schemas.cjs +332 -114
  293. package/node_modules/zod/v4/core/schemas.d.cts +31 -9
  294. package/node_modules/zod/v4/core/schemas.d.ts +31 -9
  295. package/node_modules/zod/v4/core/schemas.js +309 -113
  296. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  297. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  298. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  299. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  300. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  301. package/node_modules/zod/v4/core/util.cjs +192 -143
  302. package/node_modules/zod/v4/core/util.d.cts +27 -4
  303. package/node_modules/zod/v4/core/util.d.ts +27 -4
  304. package/node_modules/zod/v4/core/util.js +170 -143
  305. package/node_modules/zod/v4/core/versions.cjs +21 -2
  306. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  307. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  308. package/node_modules/zod/v4/core/versions.js +2 -2
  309. package/node_modules/zod/v4/core/visit.cjs +19 -0
  310. package/node_modules/zod/v4/index.cjs +19 -0
  311. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  312. package/node_modules/zod/v4/locales/ar.js +2 -0
  313. package/node_modules/zod/v4/locales/az.cjs +2 -0
  314. package/node_modules/zod/v4/locales/az.js +2 -0
  315. package/node_modules/zod/v4/locales/be.cjs +2 -0
  316. package/node_modules/zod/v4/locales/be.js +2 -0
  317. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  318. package/node_modules/zod/v4/locales/bg.js +2 -0
  319. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  320. package/node_modules/zod/v4/locales/bn.js +2 -0
  321. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  322. package/node_modules/zod/v4/locales/ca.js +2 -0
  323. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  324. package/node_modules/zod/v4/locales/ckb.js +2 -0
  325. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  326. package/node_modules/zod/v4/locales/cs.js +2 -0
  327. package/node_modules/zod/v4/locales/da.cjs +2 -0
  328. package/node_modules/zod/v4/locales/da.js +2 -0
  329. package/node_modules/zod/v4/locales/de.cjs +2 -0
  330. package/node_modules/zod/v4/locales/de.js +2 -0
  331. package/node_modules/zod/v4/locales/el.cjs +2 -0
  332. package/node_modules/zod/v4/locales/el.js +2 -0
  333. package/node_modules/zod/v4/locales/en.cjs +2 -0
  334. package/node_modules/zod/v4/locales/en.js +2 -0
  335. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  336. package/node_modules/zod/v4/locales/eo.js +2 -0
  337. package/node_modules/zod/v4/locales/es.cjs +2 -0
  338. package/node_modules/zod/v4/locales/es.js +2 -0
  339. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  340. package/node_modules/zod/v4/locales/fa.js +2 -0
  341. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  342. package/node_modules/zod/v4/locales/fi.js +2 -0
  343. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  344. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  345. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  346. package/node_modules/zod/v4/locales/fr.js +2 -0
  347. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  348. package/node_modules/zod/v4/locales/gu.js +2 -0
  349. package/node_modules/zod/v4/locales/he.cjs +2 -0
  350. package/node_modules/zod/v4/locales/he.js +2 -0
  351. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  352. package/node_modules/zod/v4/locales/hi.js +2 -0
  353. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  354. package/node_modules/zod/v4/locales/hr.js +2 -0
  355. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  356. package/node_modules/zod/v4/locales/hu.js +2 -0
  357. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  358. package/node_modules/zod/v4/locales/hy.js +2 -0
  359. package/node_modules/zod/v4/locales/id.cjs +2 -0
  360. package/node_modules/zod/v4/locales/id.js +2 -0
  361. package/node_modules/zod/v4/locales/index.cjs +22 -1
  362. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  363. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  364. package/node_modules/zod/v4/locales/index.js +1 -0
  365. package/node_modules/zod/v4/locales/is.cjs +2 -0
  366. package/node_modules/zod/v4/locales/is.js +2 -0
  367. package/node_modules/zod/v4/locales/it.cjs +2 -0
  368. package/node_modules/zod/v4/locales/it.js +2 -0
  369. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  370. package/node_modules/zod/v4/locales/ja.js +2 -0
  371. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  372. package/node_modules/zod/v4/locales/ka.js +2 -0
  373. package/node_modules/zod/v4/locales/km.cjs +2 -0
  374. package/node_modules/zod/v4/locales/km.js +2 -0
  375. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  376. package/node_modules/zod/v4/locales/kn.js +2 -0
  377. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  378. package/node_modules/zod/v4/locales/ko.js +2 -0
  379. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  380. package/node_modules/zod/v4/locales/lt.js +2 -0
  381. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  382. package/node_modules/zod/v4/locales/mk.js +2 -0
  383. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  384. package/node_modules/zod/v4/locales/ms.js +2 -0
  385. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  386. package/node_modules/zod/v4/locales/ne.js +2 -0
  387. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  388. package/node_modules/zod/v4/locales/nl.js +2 -0
  389. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  390. package/node_modules/zod/v4/locales/nn.js +2 -0
  391. package/node_modules/zod/v4/locales/no.cjs +2 -0
  392. package/node_modules/zod/v4/locales/no.js +2 -0
  393. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  394. package/node_modules/zod/v4/locales/ota.js +2 -0
  395. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  396. package/node_modules/zod/v4/locales/pl.js +2 -0
  397. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  398. package/node_modules/zod/v4/locales/ps.js +2 -0
  399. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  400. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  401. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  402. package/node_modules/zod/v4/locales/pt.js +2 -0
  403. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  404. package/node_modules/zod/v4/locales/ro.js +2 -0
  405. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  406. package/node_modules/zod/v4/locales/ru.js +2 -0
  407. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  408. package/node_modules/zod/v4/locales/sk.js +2 -0
  409. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  410. package/node_modules/zod/v4/locales/sl.js +2 -0
  411. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  412. package/node_modules/zod/v4/locales/sv.js +2 -0
  413. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  414. package/node_modules/zod/v4/locales/ta.js +2 -0
  415. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  416. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  417. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  418. package/node_modules/zod/v4/locales/tg.js +117 -0
  419. package/node_modules/zod/v4/locales/th.cjs +2 -0
  420. package/node_modules/zod/v4/locales/th.js +2 -0
  421. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  422. package/node_modules/zod/v4/locales/tk.js +2 -0
  423. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  424. package/node_modules/zod/v4/locales/tr.js +2 -0
  425. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  426. package/node_modules/zod/v4/locales/uk.js +2 -0
  427. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  428. package/node_modules/zod/v4/locales/ur.js +2 -0
  429. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  430. package/node_modules/zod/v4/locales/uz.js +2 -0
  431. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  432. package/node_modules/zod/v4/locales/vi.js +2 -0
  433. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  434. package/node_modules/zod/v4/locales/yo.js +2 -0
  435. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  436. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  437. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  438. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  439. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  440. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  441. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  442. package/node_modules/zod/v4/mini/external.cjs +22 -1
  443. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  444. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  445. package/node_modules/zod/v4/mini/external.js +1 -1
  446. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  447. package/node_modules/zod/v4/mini/index.cjs +19 -0
  448. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  449. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  450. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  451. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  452. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  453. package/node_modules/zod/v4/mini/schemas.js +21 -6
  454. package/node_modules/zod/v4-mini/index.cjs +19 -0
  455. package/package.json +11 -6
  456. package/plugins/swarm/LICENSE +121 -0
  457. package/plugins/swarm/README.md +71 -0
  458. package/plugins/swarm/skills/scan/SKILL.md +119 -0
  459. package/licenses/production-inventory.json +0 -8567
  460. package/node_modules/color-convert/CHANGELOG.md +0 -54
  461. package/node_modules/es-toolkit/CHANGELOG.md +0 -936
  462. package/node_modules/es-toolkit/src/compat/_internal/Equals.d.ts +0 -1
  463. package/node_modules/es-toolkit/src/compat/_internal/IsWritable.d.ts +0 -3
  464. package/node_modules/es-toolkit/src/compat/_internal/MutableList.d.ts +0 -4
  465. package/node_modules/es-toolkit/src/compat/_internal/RejectReadonly.d.ts +0 -4
  466. package/node_modules/rechoir/CHANGELOG.md +0 -12
@@ -1,2 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ // seal-cjs-exports
5
+ (function () {
6
+ var keys = Object.getOwnPropertyNames(exports);
7
+ for (var i = 0; i < keys.length; i++) {
8
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
9
+ if (!desc || !desc.get || !desc.configurable) continue;
10
+ var value;
11
+ try {
12
+ value = desc.get();
13
+ } catch (e) {
14
+ continue;
15
+ }
16
+ // a circular require may not have settled this one yet, so leave it live
17
+ if (value === undefined) continue;
18
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
19
+ }
20
+ Object.freeze(exports);
21
+ })();
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createStandardJSONSchemaMethod = exports.createToJSONSchemaMethod = void 0;
4
4
  exports.initializeContext = initializeContext;
5
5
  exports.handleUnrepresentable = handleUnrepresentable;
6
- exports.process = process;
6
+ exports.processSchema = processSchema;
7
+ exports.process = processSchema;
8
+ exports.processSchema = processSchema;
9
+ exports.process = processSchema;
7
10
  exports.extractDefs = extractDefs;
8
11
  exports.finalize = finalize;
9
12
  const registries_js_1 = require("./registries.cjs");
@@ -67,7 +70,8 @@ function handleUnrepresentable(schema, ctx, json, params, message) {
67
70
  Object.assign(json, result);
68
71
  return true;
69
72
  }
70
- function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
73
+ // never rename this back to `process`: bundler polyfills inject a top-level `const process` that a lexical declaration of the same name collides with (#6397)
74
+ function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
71
75
  var _a;
72
76
  const def = schema._zod.def;
73
77
  // check for schema in seens
@@ -113,7 +117,7 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
113
117
  // Also set ref if processor didn't (for inheritance)
114
118
  if (!result.ref)
115
119
  result.ref = parent;
116
- process(parent, ctx, params);
120
+ processSchema(parent, ctx, params);
117
121
  ctx.seen.get(parent).isParent = true;
118
122
  }
119
123
  }
@@ -250,8 +254,6 @@ function extractDefs(ctx, schema
250
254
  if (seen.count > 1) {
251
255
  if (ctx.reused === "ref") {
252
256
  extractToDef(entry);
253
- // biome-ignore lint:
254
- continue;
255
257
  }
256
258
  }
257
259
  }
@@ -645,7 +647,7 @@ function isTransforming(_schema, _ctx) {
645
647
  */
646
648
  const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
647
649
  const ctx = initializeContext({ ...params, processors });
648
- process(schema, ctx);
650
+ processSchema(schema, ctx);
649
651
  extractDefs(ctx, schema);
650
652
  return finalize(ctx, schema);
651
653
  };
@@ -653,8 +655,27 @@ exports.createToJSONSchemaMethod = createToJSONSchemaMethod;
653
655
  const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
654
656
  const { libraryOptions, target } = params ?? {};
655
657
  const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });
656
- process(schema, ctx);
658
+ processSchema(schema, ctx);
657
659
  extractDefs(ctx, schema);
658
660
  return finalize(ctx, schema);
659
661
  };
660
662
  exports.createStandardJSONSchemaMethod = createStandardJSONSchemaMethod;
663
+
664
+ // seal-cjs-exports
665
+ (function () {
666
+ var keys = Object.getOwnPropertyNames(exports);
667
+ for (var i = 0; i < keys.length; i++) {
668
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
669
+ if (!desc || !desc.get || !desc.configurable) continue;
670
+ var value;
671
+ try {
672
+ value = desc.get();
673
+ } catch (e) {
674
+ continue;
675
+ }
676
+ // a circular require may not have settled this one yet, so leave it live
677
+ if (value === undefined) continue;
678
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
679
+ }
680
+ Object.freeze(exports);
681
+ })();
@@ -101,7 +101,7 @@ export interface ToJSONSchemaContext {
101
101
  * covers both passes in `finalize`: the ref flattening and the `$defs` build.
102
102
  *
103
103
  * The passes are valid only while nothing they read has changed, so both are cleared in
104
- * `process()` when the map grows, and in `JSONSchemaGenerator.emit()`, which can also change
104
+ * `processSchema()` when the map grows, and in `JSONSchemaGenerator.emit()`, which can also change
105
105
  * the `cycles` and `reused` they branch on.
106
106
  *
107
107
  * One case is deliberately not covered: an `override` callback that writes to
@@ -132,7 +132,9 @@ export declare function initializeContext(params: JSONSchemaGeneratorParams): To
132
132
  * custom JSON Schema was written into `json`, in which case the caller must not write its own.
133
133
  */
134
134
  export declare function handleUnrepresentable(schema: schemas.$ZodType, ctx: ToJSONSchemaContext, json: JSONSchema.BaseSchema, params: ProcessParams, message: string): boolean;
135
- export declare function process<T extends schemas.$ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): JSONSchema.BaseSchema;
135
+ export declare function processSchema<T extends schemas.$ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): JSONSchema.BaseSchema;
136
+ /** @deprecated Renamed to `processSchema`. An export alias declares no binding, so it is safe to keep. */
137
+ export { processSchema as process };
136
138
  export declare function extractDefs<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): void;
137
139
  export declare function finalize<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): ZodStandardJSONSchemaPayload<T>;
138
140
  export type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<core.input<T>, core.output<T>>;
@@ -150,4 +152,3 @@ export declare const createToJSONSchemaMethod: <T extends schemas.$ZodType>(sche
150
152
  */
151
153
  type StandardJSONSchemaMethodParams = Parameters<StandardJSONSchemaV1["~standard"]["jsonSchema"]["input"]>[0];
152
154
  export declare const createStandardJSONSchemaMethod: <T extends schemas.$ZodType>(schema: T, io: "input" | "output", processors?: Record<string, Processor>) => (params?: StandardJSONSchemaMethodParams) => JSONSchema.BaseSchema;
153
- export {};
@@ -101,7 +101,7 @@ export interface ToJSONSchemaContext {
101
101
  * covers both passes in `finalize`: the ref flattening and the `$defs` build.
102
102
  *
103
103
  * The passes are valid only while nothing they read has changed, so both are cleared in
104
- * `process()` when the map grows, and in `JSONSchemaGenerator.emit()`, which can also change
104
+ * `processSchema()` when the map grows, and in `JSONSchemaGenerator.emit()`, which can also change
105
105
  * the `cycles` and `reused` they branch on.
106
106
  *
107
107
  * One case is deliberately not covered: an `override` callback that writes to
@@ -132,7 +132,9 @@ export declare function initializeContext(params: JSONSchemaGeneratorParams): To
132
132
  * custom JSON Schema was written into `json`, in which case the caller must not write its own.
133
133
  */
134
134
  export declare function handleUnrepresentable(schema: schemas.$ZodType, ctx: ToJSONSchemaContext, json: JSONSchema.BaseSchema, params: ProcessParams, message: string): boolean;
135
- export declare function process<T extends schemas.$ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): JSONSchema.BaseSchema;
135
+ export declare function processSchema<T extends schemas.$ZodType>(schema: T, ctx: ToJSONSchemaContext, _params?: ProcessParams): JSONSchema.BaseSchema;
136
+ /** @deprecated Renamed to `processSchema`. An export alias declares no binding, so it is safe to keep. */
137
+ export { processSchema as process };
136
138
  export declare function extractDefs<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): void;
137
139
  export declare function finalize<T extends schemas.$ZodType>(ctx: ToJSONSchemaContext, schema: T): ZodStandardJSONSchemaPayload<T>;
138
140
  export type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<core.input<T>, core.output<T>>;
@@ -150,4 +152,3 @@ export declare const createToJSONSchemaMethod: <T extends schemas.$ZodType>(sche
150
152
  */
151
153
  type StandardJSONSchemaMethodParams = Parameters<StandardJSONSchemaV1["~standard"]["jsonSchema"]["input"]>[0];
152
154
  export declare const createStandardJSONSchemaMethod: <T extends schemas.$ZodType>(schema: T, io: "input" | "output", processors?: Record<string, Processor>) => (params?: StandardJSONSchemaMethodParams) => JSONSchema.BaseSchema;
153
- export {};
@@ -59,7 +59,8 @@ export function handleUnrepresentable(schema, ctx, json, params, message) {
59
59
  Object.assign(json, result);
60
60
  return true;
61
61
  }
62
- export function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
62
+ // never rename this back to `process`: bundler polyfills inject a top-level `const process` that a lexical declaration of the same name collides with (#6397)
63
+ export function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
63
64
  var _a;
64
65
  const def = schema._zod.def;
65
66
  // check for schema in seens
@@ -105,7 +106,7 @@ export function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
105
106
  // Also set ref if processor didn't (for inheritance)
106
107
  if (!result.ref)
107
108
  result.ref = parent;
108
- process(parent, ctx, params);
109
+ processSchema(parent, ctx, params);
109
110
  ctx.seen.get(parent).isParent = true;
110
111
  }
111
112
  }
@@ -126,6 +127,8 @@ export function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
126
127
  const _result = ctx.seen.get(schema);
127
128
  return _result.schema;
128
129
  }
130
+ /** @deprecated Renamed to `processSchema`. An export alias declares no binding, so it is safe to keep. */
131
+ export { processSchema as process };
129
132
  // Escape a reference token for use in a JSON Pointer fragment (RFC 6901): `~` becomes `~0` and `/` becomes `~1`. The `~` replacement must run first.
130
133
  function encodeJSONPointerSegment(segment) {
131
134
  return segment.replace(/~/g, "~0").replace(/\//g, "~1");
@@ -242,8 +245,6 @@ export function extractDefs(ctx, schema
242
245
  if (seen.count > 1) {
243
246
  if (ctx.reused === "ref") {
244
247
  extractToDef(entry);
245
- // biome-ignore lint:
246
- continue;
247
248
  }
248
249
  }
249
250
  }
@@ -637,14 +638,14 @@ function isTransforming(_schema, _ctx) {
637
638
  */
638
639
  export const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
639
640
  const ctx = initializeContext({ ...params, processors });
640
- process(schema, ctx);
641
+ processSchema(schema, ctx);
641
642
  extractDefs(ctx, schema);
642
643
  return finalize(ctx, schema);
643
644
  };
644
645
  export const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
645
646
  const { libraryOptions, target } = params ?? {};
646
647
  const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });
647
- process(schema, ctx);
648
+ processSchema(schema, ctx);
648
649
  extractDefs(ctx, schema);
649
650
  return finalize(ctx, schema);
650
651
  };
@@ -17,6 +17,7 @@ exports.floatSafeRemainder = floatSafeRemainder;
17
17
  exports.defineLazy = defineLazy;
18
18
  exports.objectClone = objectClone;
19
19
  exports.assignProp = assignProp;
20
+ exports.rawShape = rawShape;
20
21
  exports.mergeDefs = mergeDefs;
21
22
  exports.cloneDef = cloneDef;
22
23
  exports.getElementAtPath = getElementAtPath;
@@ -45,6 +46,7 @@ exports.aborted = aborted;
45
46
  exports.explicitlyAborted = explicitlyAborted;
46
47
  exports.prefixIssues = prefixIssues;
47
48
  exports.unwrapMessage = unwrapMessage;
49
+ exports.sizeCaps = sizeCaps;
48
50
  exports.attachSchema = attachSchema;
49
51
  exports.finalizeIssue = finalizeIssue;
50
52
  exports.getSizableOrigin = getSizableOrigin;
@@ -62,6 +64,7 @@ exports.uint8ArrayToHex = uint8ArrayToHex;
62
64
  exports.members = members;
63
65
  exports.own = own;
64
66
  exports.hide = hide;
67
+ exports.derived = derived;
65
68
  exports.defineLazyInternal = defineLazyInternal;
66
69
  exports.installLazyProp = installLazyProp;
67
70
  exports.constantCatch = constantCatch;
@@ -96,18 +99,23 @@ function jsonStringifyReplacer(_, value) {
96
99
  return value.toString();
97
100
  return value;
98
101
  }
102
+ // the accessor lives on a shared prototype: an own accessor makes every box a dictionary-mode object (~360 B and a slow load per read against ~100 B and an inlined getter here)
103
+ class Cached {
104
+ constructor(getter) {
105
+ this._getter = getter;
106
+ this._value = undefined;
107
+ }
108
+ get value() {
109
+ const getter = this._getter;
110
+ if (getter !== undefined) {
111
+ this._value = getter();
112
+ this._getter = undefined;
113
+ }
114
+ return this._value;
115
+ }
116
+ }
99
117
  function cached(getter) {
100
- const set = false;
101
- return {
102
- get value() {
103
- if (!set) {
104
- const value = getter();
105
- Object.defineProperty(this, "value", { value });
106
- return value;
107
- }
108
- throw new Error("cached value already set");
109
- },
110
- };
118
+ return new Cached(getter);
111
119
  }
112
120
  function nullish(input) {
113
121
  return input === null || input === undefined;
@@ -162,6 +170,71 @@ function assignProp(target, prop, value) {
162
170
  configurable: true,
163
171
  });
164
172
  }
173
+ /**
174
+ * Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it.
175
+ *
176
+ * Its keys and descriptors read without invoking anything, which is what lets a discriminated union check its discriminator, and the cycle walk read a shape, without resolving a getter that references the schema being constructed. A def that answers `shape` from an accessor of its own has none.
177
+ */
178
+ function rawShape(def) {
179
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
180
+ return desc?.get ? desc.get.raw : desc?.value;
181
+ }
182
+ // where a builder reads its source's keys and descriptors, resolving only a shape a def answers for itself. A shape resolves by object spread, so only its enumerable keys are ever part of it.
183
+ function sourceShape(schema) {
184
+ return rawShape(schema._zod.def) ?? schema._zod.def.shape;
185
+ }
186
+ // a key whose value is not settled yet, self-caching so every read after the first gets the same one
187
+ function deferProp(target, key, getter) {
188
+ Object.defineProperty(target, key, {
189
+ get() {
190
+ const value = getter();
191
+ assignProp(this, key, value);
192
+ return value;
193
+ },
194
+ enumerable: true,
195
+ configurable: true,
196
+ });
197
+ }
198
+ // Writes a settled key. A plain assignment is much cheaper than `defineProperty` and produces the same descriptor, but it runs whatever setter already answers to the key — an accessor this shape deferred, or an inherited one, which `__proto__` has on every object and prototype pollution can add for any name.
199
+ function putProp(target, key, value) {
200
+ if (key in target)
201
+ assignProp(target, key, value);
202
+ else
203
+ target[key] = value;
204
+ }
205
+ /**
206
+ * Copies `keys` of `source`'s shape onto `target`, each value passed through `wrap`.
207
+ *
208
+ * A key the source has resolved is copied through now, so the derived shape states it outright and nothing has to resolve it to learn what it holds. A key the source still defers stays deferred, and reads back through the source's own `shape`, so it resolves once and both shapes get that one schema.
209
+ */
210
+ function mirrorShape(target, source, keys, wrap) {
211
+ const raw = sourceShape(source);
212
+ for (const key of keys) {
213
+ const desc = Object.getOwnPropertyDescriptor(raw, key);
214
+ if (!desc.enumerable)
215
+ continue;
216
+ if (desc.get) {
217
+ deferProp(target, key, () => {
218
+ const value = source._zod.def.shape[key];
219
+ return wrap ? wrap(value, key) : value;
220
+ });
221
+ }
222
+ else
223
+ putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);
224
+ }
225
+ }
226
+ // same, for a plain shape a caller passed rather than a schema's
227
+ function mirrorProps(target, source) {
228
+ for (const key of Reflect.ownKeys(source)) {
229
+ const desc = Object.getOwnPropertyDescriptor(source, key);
230
+ if (!desc.enumerable)
231
+ continue;
232
+ if (desc.get)
233
+ deferProp(target, key, () => source[key]);
234
+ else
235
+ putProp(target, key, desc.value);
236
+ }
237
+ }
165
238
  function mergeDefs(...defs) {
166
239
  const mergedDescriptors = {};
167
240
  for (const def of defs) {
@@ -414,24 +487,23 @@ function pick(schema, mask) {
414
487
  if (hasChecks) {
415
488
  throw new Error(".pick() cannot be used on object schemas containing refinements");
416
489
  }
417
- const def = mergeDefs(schema._zod.def, {
418
- get shape() {
419
- const newShape = {};
420
- // `for...in` skips symbols, so a symbol in the mask would select nothing
421
- for (const key of Reflect.ownKeys(mask)) {
422
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
423
- throw new Error(`Unrecognized key: "${String(key)}"`);
424
- }
425
- if (!mask[key])
426
- continue;
427
- assignProp(newShape, key, currDef.shape[key]);
428
- }
429
- assignProp(this, "shape", newShape); // self-caching
430
- return newShape;
431
- },
432
- checks: [],
433
- });
434
- return clone(schema, def);
490
+ const newShape = {};
491
+ mirrorShape(newShape, schema, maskedKeys(schema, mask));
492
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
493
+ }
494
+ // the mask keys that select something, checked against the source's shape without resolving it
495
+ function maskedKeys(schema, mask) {
496
+ const raw = sourceShape(schema);
497
+ const keys = [];
498
+ // `for...in` skips symbols, so a symbol in the mask would select nothing
499
+ for (const key of Reflect.ownKeys(mask)) {
500
+ if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) {
501
+ throw new Error(`Unrecognized key: "${String(key)}"`);
502
+ }
503
+ if (mask[key])
504
+ keys.push(key);
505
+ }
506
+ return keys;
435
507
  }
436
508
  function omit(schema, mask) {
437
509
  const currDef = schema._zod.def;
@@ -440,23 +512,10 @@ function omit(schema, mask) {
440
512
  if (hasChecks) {
441
513
  throw new Error(".omit() cannot be used on object schemas containing refinements");
442
514
  }
443
- const def = mergeDefs(schema._zod.def, {
444
- get shape() {
445
- const newShape = { ...schema._zod.def.shape };
446
- for (const key of Reflect.ownKeys(mask)) {
447
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
448
- throw new Error(`Unrecognized key: "${String(key)}"`);
449
- }
450
- if (!mask[key])
451
- continue;
452
- delete newShape[key];
453
- }
454
- assignProp(this, "shape", newShape); // self-caching
455
- return newShape;
456
- },
457
- checks: [],
458
- });
459
- return clone(schema, def);
515
+ const omitted = new Set(maskedKeys(schema, mask));
516
+ const newShape = {};
517
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
518
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
460
519
  }
461
520
  function extend(schema, shape) {
462
521
  if (!isPlainObject(shape)) {
@@ -466,34 +525,27 @@ function extend(schema, shape) {
466
525
  const hasChecks = checks && checks.length > 0;
467
526
  if (hasChecks) {
468
527
  // Only throw if new shape overlaps with existing shape. Use getOwnPropertyDescriptor to check key existence without accessing values
469
- const existingShape = schema._zod.def.shape;
528
+ const existingShape = sourceShape(schema);
470
529
  for (const key of Reflect.ownKeys(shape)) {
471
530
  if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {
472
531
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
473
532
  }
474
533
  }
475
534
  }
476
- const def = mergeDefs(schema._zod.def, {
477
- get shape() {
478
- const _shape = { ...schema._zod.def.shape, ...shape };
479
- assignProp(this, "shape", _shape); // self-caching
480
- return _shape;
481
- },
482
- });
483
- return clone(schema, def);
535
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
536
+ }
537
+ // the source's keys, then the caller's overlaid on top
538
+ function extended(schema, shape) {
539
+ const newShape = {};
540
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));
541
+ mirrorProps(newShape, shape);
542
+ return newShape;
484
543
  }
485
544
  function safeExtend(schema, shape) {
486
545
  if (!isPlainObject(shape)) {
487
546
  throw new Error("Invalid input to safeExtend: expected a plain object");
488
547
  }
489
- const def = mergeDefs(schema._zod.def, {
490
- get shape() {
491
- const _shape = { ...schema._zod.def.shape, ...shape };
492
- assignProp(this, "shape", _shape); // self-caching
493
- return _shape;
494
- },
495
- });
496
- return clone(schema, def);
548
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
497
549
  }
498
550
  function merge(a, b) {
499
551
  if (!b?._zod?.def) {
@@ -502,12 +554,11 @@ function merge(a, b) {
502
554
  if (a._zod.def.checks?.length) {
503
555
  throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
504
556
  }
557
+ const newShape = {};
558
+ mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
559
+ mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
505
560
  const def = mergeDefs(a._zod.def, {
506
- get shape() {
507
- const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
508
- assignProp(this, "shape", _shape); // self-caching
509
- return _shape;
510
- },
561
+ shape: newShape,
511
562
  get catchall() {
512
563
  return b._zod.def.catchall;
513
564
  },
@@ -522,78 +573,19 @@ function partial(Class, schema, mask, name = "partial") {
522
573
  if (hasChecks) {
523
574
  throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
524
575
  }
525
- const def = mergeDefs(schema._zod.def, {
526
- get shape() {
527
- const oldShape = schema._zod.def.shape;
528
- const shape = { ...oldShape };
529
- if (mask) {
530
- for (const key of Reflect.ownKeys(mask)) {
531
- if (!Object.prototype.hasOwnProperty.call(oldShape, key)) {
532
- throw new Error(`Unrecognized key: "${String(key)}"`);
533
- }
534
- if (!mask[key])
535
- continue;
536
- // if (oldShape[key]!._zod.optin === "optional") continue;
537
- shape[key] = Class
538
- ? new Class({
539
- type: "optional",
540
- innerType: oldShape[key],
541
- })
542
- : oldShape[key];
543
- }
544
- }
545
- else {
546
- // the spread copies symbol keys; `for...in` would not reach them
547
- for (const key of Reflect.ownKeys(oldShape)) {
548
- // if (oldShape[key]!._zod.optin === "optional") continue;
549
- shape[key] = Class
550
- ? new Class({
551
- type: "optional",
552
- innerType: oldShape[key],
553
- })
554
- : oldShape[key];
555
- }
556
- }
557
- assignProp(this, "shape", shape); // self-caching
558
- return shape;
559
- },
560
- checks: [],
561
- });
562
- return clone(schema, def);
576
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;
577
+ const newShape = {};
578
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class &&
579
+ ((value, key) => (selected && !selected.has(key) ? value : new Class({ type: "optional", innerType: value }))));
580
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));
563
581
  }
564
582
  function required(Class, schema, mask) {
565
- const def = mergeDefs(schema._zod.def, {
566
- get shape() {
567
- const oldShape = schema._zod.def.shape;
568
- const shape = { ...oldShape };
569
- if (mask) {
570
- for (const key of Reflect.ownKeys(mask)) {
571
- if (!Object.prototype.hasOwnProperty.call(shape, key)) {
572
- throw new Error(`Unrecognized key: "${String(key)}"`);
573
- }
574
- if (!mask[key])
575
- continue;
576
- // overwrite with non-optional
577
- shape[key] = new Class({
578
- type: "nonoptional",
579
- innerType: oldShape[key],
580
- });
581
- }
582
- }
583
- else {
584
- for (const key of Reflect.ownKeys(oldShape)) {
585
- // overwrite with non-optional
586
- shape[key] = new Class({
587
- type: "nonoptional",
588
- innerType: oldShape[key],
589
- });
590
- }
591
- }
592
- assignProp(this, "shape", shape); // self-caching
593
- return shape;
594
- },
595
- });
596
- return clone(schema, def);
583
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;
584
+ const newShape = {};
585
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) =>
586
+ // overwrite with non-optional
587
+ selected && !selected.has(key) ? value : new Class({ type: "nonoptional", innerType: value }));
588
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));
597
589
  }
598
590
  // invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom
599
591
  function aborted(x, startIndex = 0) {
@@ -629,6 +621,20 @@ function unwrapMessage(message) {
629
621
  return typeof message === "string" ? message : message?.message;
630
622
  }
631
623
  /* A check holds no link back to the schema it is attached to — the same check instance is shared by every clone of that schema — so the owner is stamped onto the issues a check just raised, at the only point where both are in scope. Runs on the failure path only; `start` is the issue count from before the check ran. */
624
+ /** The leading size checks of `defChecks` that set an upper bound, each paired with it. */
625
+ function sizeCaps(defChecks) {
626
+ const caps = [];
627
+ for (const ch of defChecks ?? []) {
628
+ const d = ch._zod.def;
629
+ // a later check may rewrite the value
630
+ if (!/_(length|size)$|_equals$/.test(d.check))
631
+ break;
632
+ const max = d.maximum ?? d.length ?? d.size;
633
+ if (max >= 0)
634
+ caps.push([max, ch]);
635
+ }
636
+ return caps;
637
+ }
632
638
  function attachSchema(issues, start, inst) {
633
639
  var _a;
634
640
  for (let i = start; i < issues.length; i++) {
@@ -655,13 +661,19 @@ function finalizeIssue(iss, ctx, config) {
655
661
  unwrapMessage(config.customError?.(iss)) ??
656
662
  unwrapMessage(config.localeError?.(iss)) ??
657
663
  "Invalid input");
658
- const { inst: _inst, schema: _schema, continue: _continue, input: _input, ...rest } = iss;
659
- rest.path ?? (rest.path = []);
660
- rest.message = message;
664
+ // an explicit own-key copy beats object rest with excluded keys, which v8 routes through a generic runtime call; Object.keys rather than for-in so an issue pushed with a prototype does not leak inherited keys, and an own __proto__ key is dropped rather than assigned through the setter
665
+ const full = {};
666
+ for (const k of Object.keys(iss)) {
667
+ if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__")
668
+ continue;
669
+ full[k] = iss[k];
670
+ }
671
+ full.path ?? (full.path = []);
672
+ full.message = message;
661
673
  if (ctx?.reportInput) {
662
- rest.input = _input;
674
+ full.input = iss.input;
663
675
  }
664
- return rest;
676
+ return full;
665
677
  }
666
678
  function getSizableOrigin(input) {
667
679
  if (input instanceof Set)
@@ -809,6 +821,24 @@ function own(inst, key, value, enumerable = true) {
809
821
  function hide(inst, key, value) {
810
822
  return own(inst, key, value, false);
811
823
  }
824
+ /** Adds members a table derives from the instance: each builds on first read and shadows as own data, and assignment shadows the same way, as when these were own properties. */
825
+ function derived(computes, table) {
826
+ for (const key in computes) {
827
+ const compute = computes[key];
828
+ // an object literal's accessor is configurable and enumerable, and `members` copies the descriptor as written
829
+ Object.defineProperty(table, key, {
830
+ configurable: true,
831
+ enumerable: true,
832
+ get() {
833
+ return own(this, key, compute(this));
834
+ },
835
+ set(value) {
836
+ own(this, key, value);
837
+ },
838
+ });
839
+ }
840
+ return table;
841
+ }
812
842
  function defineBound(proto, key, fn) {
813
843
  Object.defineProperty(proto, key, {
814
844
  configurable: true,
@@ -913,3 +943,22 @@ function constantCatch(value) {
913
943
  fn[exports.CONSTANT_CATCH] = true;
914
944
  return fn;
915
945
  }
946
+
947
+ // seal-cjs-exports
948
+ (function () {
949
+ var keys = Object.getOwnPropertyNames(exports);
950
+ for (var i = 0; i < keys.length; i++) {
951
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
952
+ if (!desc || !desc.get || !desc.configurable) continue;
953
+ var value;
954
+ try {
955
+ value = desc.get();
956
+ } catch (e) {
957
+ continue;
958
+ }
959
+ // a circular require may not have settled this one yet, so leave it live
960
+ if (value === undefined) continue;
961
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
962
+ }
963
+ Object.freeze(exports);
964
+ })();