@psnext/slingcli 3.3.20260911-1 → 3.3.20260914-1

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 (420) hide show
  1. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-VDBOM5UG.js → chunk-BRL3MDQL.js} +1 -1
  2. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
  3. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  4. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  5. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +79 -32
  6. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  7. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  8. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  9. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  10. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  11. package/node_modules/@smithy/core/package.json +1 -1
  12. package/node_modules/@types/node/README.md +2 -2
  13. package/node_modules/@types/node/assert/strict.d.ts +13 -56
  14. package/node_modules/@types/node/assert.d.ts +189 -190
  15. package/node_modules/@types/node/async_hooks.d.ts +151 -43
  16. package/node_modules/@types/node/buffer.buffer.d.ts +12 -13
  17. package/node_modules/@types/node/buffer.d.ts +103 -237
  18. package/node_modules/@types/node/child_process.d.ts +39 -154
  19. package/node_modules/@types/node/cluster.d.ts +238 -384
  20. package/node_modules/@types/node/console.d.ts +45 -404
  21. package/node_modules/@types/node/constants.d.ts +3 -10
  22. package/node_modules/@types/node/crypto.d.ts +1000 -1593
  23. package/node_modules/@types/node/dgram.d.ts +133 -81
  24. package/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
  25. package/node_modules/@types/node/dns/promises.d.ts +9 -15
  26. package/node_modules/@types/node/dns.d.ts +136 -183
  27. package/node_modules/@types/node/domain.d.ts +12 -32
  28. package/node_modules/@types/node/events.d.ts +872 -840
  29. package/node_modules/@types/node/ffi.d.ts +486 -0
  30. package/node_modules/@types/node/fs/promises.d.ts +256 -85
  31. package/node_modules/@types/node/fs.d.ts +865 -525
  32. package/node_modules/@types/node/globals.d.ts +12 -34
  33. package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
  34. package/node_modules/@types/node/http.d.ts +433 -312
  35. package/node_modules/@types/node/http2.d.ts +545 -891
  36. package/node_modules/@types/node/https.d.ts +64 -243
  37. package/node_modules/@types/node/index.d.ts +25 -7
  38. package/node_modules/@types/node/inspector/promises.d.ts +35 -0
  39. package/node_modules/@types/node/inspector.d.ts +70 -58
  40. package/node_modules/@types/node/inspector.generated.d.ts +764 -410
  41. package/node_modules/@types/node/module.d.ts +54 -219
  42. package/node_modules/@types/node/net.d.ts +208 -222
  43. package/node_modules/@types/node/os.d.ts +41 -49
  44. package/node_modules/@types/node/package.json +13 -3
  45. package/node_modules/@types/node/path/posix.d.ts +8 -0
  46. package/node_modules/@types/node/path/win32.d.ts +8 -0
  47. package/node_modules/@types/node/path.d.ts +119 -141
  48. package/node_modules/@types/node/perf_hooks.d.ts +339 -690
  49. package/node_modules/@types/node/process.d.ts +389 -205
  50. package/node_modules/@types/node/punycode.d.ts +3 -31
  51. package/node_modules/@types/node/querystring.d.ts +3 -16
  52. package/node_modules/@types/node/quic.d.ts +2153 -0
  53. package/node_modules/@types/node/readline/promises.d.ts +3 -6
  54. package/node_modules/@types/node/readline.d.ts +66 -152
  55. package/node_modules/@types/node/repl.d.ts +101 -109
  56. package/node_modules/@types/node/sea.d.ts +1 -116
  57. package/node_modules/@types/node/sqlite.d.ts +486 -68
  58. package/node_modules/@types/node/stream/consumers.d.ts +91 -15
  59. package/node_modules/@types/node/stream/iter.d.ts +452 -0
  60. package/node_modules/@types/node/stream/promises.d.ts +136 -15
  61. package/node_modules/@types/node/stream/web.d.ts +197 -454
  62. package/node_modules/@types/node/stream.d.ts +603 -491
  63. package/node_modules/@types/node/string_decoder.d.ts +3 -43
  64. package/node_modules/@types/node/test/reporters.d.ts +59 -0
  65. package/node_modules/@types/node/test.d.ts +513 -292
  66. package/node_modules/@types/node/timers/promises.d.ts +3 -18
  67. package/node_modules/@types/node/timers.d.ts +3 -141
  68. package/node_modules/@types/node/tls.d.ts +166 -257
  69. package/node_modules/@types/node/trace_events.d.ts +3 -97
  70. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
  71. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  72. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
  73. package/node_modules/@types/node/ts5.6/index.d.ts +26 -6
  74. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  75. package/node_modules/@types/node/ts5.7/index.d.ts +118 -0
  76. package/node_modules/@types/node/tty.d.ts +61 -43
  77. package/node_modules/@types/node/url.d.ts +156 -584
  78. package/node_modules/@types/node/util/types.d.ts +558 -0
  79. package/node_modules/@types/node/util.d.ts +170 -1099
  80. package/node_modules/@types/node/v8.d.ts +175 -36
  81. package/node_modules/@types/node/vfs.d.ts +211 -0
  82. package/node_modules/@types/node/vm.d.ts +292 -209
  83. package/node_modules/@types/node/wasi.d.ts +24 -74
  84. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
  85. package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  86. package/node_modules/@types/node/web-globals/console.d.ts +9 -0
  87. package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  88. package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  89. package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  90. package/node_modules/@types/node/web-globals/events.d.ts +9 -0
  91. package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
  92. package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  93. package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  94. package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
  95. package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  96. package/node_modules/@types/node/web-globals/streams.d.ts +97 -0
  97. package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  98. package/node_modules/@types/node/web-globals/url.d.ts +24 -0
  99. package/node_modules/@types/node/worker_threads.d.ts +257 -407
  100. package/node_modules/@types/node/zlib/iter.d.ts +131 -0
  101. package/node_modules/@types/node/zlib.d.ts +24 -165
  102. package/node_modules/undici-types/agent.d.ts +12 -13
  103. package/node_modules/undici-types/api.d.ts +26 -26
  104. package/node_modules/undici-types/balanced-pool.d.ts +13 -12
  105. package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
  106. package/node_modules/undici-types/client-stats.d.ts +15 -0
  107. package/node_modules/undici-types/client.d.ts +63 -37
  108. package/node_modules/undici-types/connector.d.ts +5 -2
  109. package/node_modules/undici-types/cookies.d.ts +3 -1
  110. package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
  111. package/node_modules/undici-types/dispatcher.d.ts +136 -139
  112. package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  113. package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  114. package/node_modules/undici-types/errors.d.ts +92 -54
  115. package/node_modules/undici-types/eventsource.d.ts +9 -4
  116. package/node_modules/undici-types/fetch.d.ts +51 -25
  117. package/node_modules/undici-types/formdata.d.ts +7 -7
  118. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  119. package/node_modules/undici-types/global-origin.d.ts +5 -5
  120. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  121. package/node_modules/undici-types/handlers.d.ts +10 -9
  122. package/node_modules/undici-types/header.d.ts +162 -1
  123. package/node_modules/undici-types/index.d.ts +69 -47
  124. package/node_modules/undici-types/interceptors.d.ts +72 -9
  125. package/node_modules/undici-types/mock-agent.d.ts +36 -18
  126. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  127. package/node_modules/undici-types/mock-client.d.ts +6 -4
  128. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  129. package/node_modules/undici-types/mock-interceptor.d.ts +26 -21
  130. package/node_modules/undici-types/mock-pool.d.ts +6 -4
  131. package/node_modules/undici-types/package.json +1 -1
  132. package/node_modules/undici-types/patch.d.ts +0 -4
  133. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  134. package/node_modules/undici-types/pool.d.ts +14 -14
  135. package/node_modules/undici-types/proxy-agent.d.ts +14 -6
  136. package/node_modules/undici-types/readable.d.ts +19 -16
  137. package/node_modules/undici-types/retry-agent.d.ts +1 -1
  138. package/node_modules/undici-types/retry-handler.d.ts +19 -10
  139. package/node_modules/undici-types/round-robin-pool.d.ts +39 -0
  140. package/node_modules/undici-types/snapshot-agent.d.ts +113 -0
  141. package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
  142. package/node_modules/undici-types/util.d.ts +3 -3
  143. package/node_modules/undici-types/utility.d.ts +7 -0
  144. package/node_modules/undici-types/webidl.d.ts +148 -30
  145. package/node_modules/undici-types/websocket.d.ts +48 -10
  146. package/node_modules/zod/README.md +2 -2
  147. package/node_modules/zod/package.json +1 -1
  148. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  149. package/node_modules/zod/src/v4/classic/schemas.ts +14 -30
  150. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +1 -0
  151. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +2 -11
  152. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -4
  153. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +22 -0
  154. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +1 -1
  155. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  156. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +53 -137
  157. package/node_modules/zod/src/v4/classic/tests/string.test.ts +70 -1
  158. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +87 -35
  159. package/node_modules/zod/src/v4/core/api.ts +21 -29
  160. package/node_modules/zod/src/v4/core/checks.ts +61 -1
  161. package/node_modules/zod/src/v4/core/compile.ts +35 -24
  162. package/node_modules/zod/src/v4/core/core.ts +1 -3
  163. package/node_modules/zod/src/v4/core/json-schema-processors.ts +9 -63
  164. package/node_modules/zod/src/v4/core/memoizer.ts +2 -5
  165. package/node_modules/zod/src/v4/core/regexes.ts +4 -0
  166. package/node_modules/zod/src/v4/core/schemas.ts +36 -109
  167. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  168. package/node_modules/zod/src/v4/core/tests/compile.test.ts +177 -0
  169. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  170. package/node_modules/zod/src/v4/core/to-json-schema.ts +1 -1
  171. package/node_modules/zod/src/v4/core/util.ts +0 -4
  172. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  173. package/node_modules/zod/src/v4/core/visit.ts +0 -11
  174. package/node_modules/zod/src/v4/locales/ar.ts +1 -0
  175. package/node_modules/zod/src/v4/locales/az.ts +1 -0
  176. package/node_modules/zod/src/v4/locales/be.ts +1 -0
  177. package/node_modules/zod/src/v4/locales/bg.ts +1 -0
  178. package/node_modules/zod/src/v4/locales/bn.ts +1 -0
  179. package/node_modules/zod/src/v4/locales/ca.ts +1 -0
  180. package/node_modules/zod/src/v4/locales/ckb.ts +1 -0
  181. package/node_modules/zod/src/v4/locales/cs.ts +1 -0
  182. package/node_modules/zod/src/v4/locales/da.ts +1 -0
  183. package/node_modules/zod/src/v4/locales/de.ts +1 -0
  184. package/node_modules/zod/src/v4/locales/el.ts +1 -0
  185. package/node_modules/zod/src/v4/locales/en.ts +1 -0
  186. package/node_modules/zod/src/v4/locales/eo.ts +1 -0
  187. package/node_modules/zod/src/v4/locales/es.ts +1 -0
  188. package/node_modules/zod/src/v4/locales/fa.ts +1 -0
  189. package/node_modules/zod/src/v4/locales/fi.ts +1 -0
  190. package/node_modules/zod/src/v4/locales/fr-CA.ts +1 -0
  191. package/node_modules/zod/src/v4/locales/fr.ts +1 -0
  192. package/node_modules/zod/src/v4/locales/gu.ts +1 -0
  193. package/node_modules/zod/src/v4/locales/he.ts +1 -0
  194. package/node_modules/zod/src/v4/locales/hi.ts +1 -0
  195. package/node_modules/zod/src/v4/locales/hr.ts +1 -0
  196. package/node_modules/zod/src/v4/locales/hu.ts +1 -0
  197. package/node_modules/zod/src/v4/locales/hy.ts +1 -0
  198. package/node_modules/zod/src/v4/locales/id.ts +1 -0
  199. package/node_modules/zod/src/v4/locales/is.ts +1 -0
  200. package/node_modules/zod/src/v4/locales/it.ts +1 -0
  201. package/node_modules/zod/src/v4/locales/ja.ts +1 -0
  202. package/node_modules/zod/src/v4/locales/ka.ts +1 -0
  203. package/node_modules/zod/src/v4/locales/km.ts +1 -0
  204. package/node_modules/zod/src/v4/locales/kn.ts +1 -0
  205. package/node_modules/zod/src/v4/locales/ko.ts +1 -0
  206. package/node_modules/zod/src/v4/locales/lt.ts +1 -0
  207. package/node_modules/zod/src/v4/locales/mk.ts +1 -0
  208. package/node_modules/zod/src/v4/locales/ms.ts +1 -0
  209. package/node_modules/zod/src/v4/locales/ne.ts +1 -0
  210. package/node_modules/zod/src/v4/locales/nl.ts +1 -0
  211. package/node_modules/zod/src/v4/locales/nn.ts +1 -0
  212. package/node_modules/zod/src/v4/locales/no.ts +1 -0
  213. package/node_modules/zod/src/v4/locales/ota.ts +1 -0
  214. package/node_modules/zod/src/v4/locales/pl.ts +1 -0
  215. package/node_modules/zod/src/v4/locales/ps.ts +1 -0
  216. package/node_modules/zod/src/v4/locales/pt-BR.ts +1 -0
  217. package/node_modules/zod/src/v4/locales/pt.ts +1 -0
  218. package/node_modules/zod/src/v4/locales/ro.ts +1 -0
  219. package/node_modules/zod/src/v4/locales/ru.ts +1 -0
  220. package/node_modules/zod/src/v4/locales/sk.ts +1 -0
  221. package/node_modules/zod/src/v4/locales/sl.ts +1 -0
  222. package/node_modules/zod/src/v4/locales/sv.ts +1 -0
  223. package/node_modules/zod/src/v4/locales/ta.ts +1 -0
  224. package/node_modules/zod/src/v4/locales/tg.ts +1 -0
  225. package/node_modules/zod/src/v4/locales/th.ts +1 -0
  226. package/node_modules/zod/src/v4/locales/tk.ts +1 -0
  227. package/node_modules/zod/src/v4/locales/tr.ts +1 -0
  228. package/node_modules/zod/src/v4/locales/uk.ts +1 -0
  229. package/node_modules/zod/src/v4/locales/ur.ts +1 -0
  230. package/node_modules/zod/src/v4/locales/uz.ts +1 -0
  231. package/node_modules/zod/src/v4/locales/vi.ts +1 -0
  232. package/node_modules/zod/src/v4/locales/yo.ts +1 -0
  233. package/node_modules/zod/src/v4/locales/zh-CN.ts +1 -0
  234. package/node_modules/zod/src/v4/locales/zh-TW.ts +1 -0
  235. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  236. package/node_modules/zod/src/v4/mini/schemas.ts +12 -23
  237. package/node_modules/zod/src/v4/mini/tests/index.test.ts +56 -0
  238. package/node_modules/zod/src/v4/mini/tests/string.test.ts +7 -0
  239. package/node_modules/zod/v4/classic/checks.cjs +2 -1
  240. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  241. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  242. package/node_modules/zod/v4/classic/checks.js +1 -1
  243. package/node_modules/zod/v4/classic/schemas.cjs +11 -15
  244. package/node_modules/zod/v4/classic/schemas.d.cts +4 -6
  245. package/node_modules/zod/v4/classic/schemas.d.ts +4 -6
  246. package/node_modules/zod/v4/classic/schemas.js +9 -13
  247. package/node_modules/zod/v4/core/api.cjs +11 -23
  248. package/node_modules/zod/v4/core/api.d.cts +8 -4
  249. package/node_modules/zod/v4/core/api.d.ts +8 -4
  250. package/node_modules/zod/v4/core/api.js +11 -23
  251. package/node_modules/zod/v4/core/checks.cjs +32 -1
  252. package/node_modules/zod/v4/core/checks.d.cts +16 -0
  253. package/node_modules/zod/v4/core/checks.d.ts +16 -0
  254. package/node_modules/zod/v4/core/checks.js +31 -0
  255. package/node_modules/zod/v4/core/compile.cjs +12 -17
  256. package/node_modules/zod/v4/core/compile.js +13 -18
  257. package/node_modules/zod/v4/core/core.cjs +1 -1
  258. package/node_modules/zod/v4/core/core.js +1 -1
  259. package/node_modules/zod/v4/core/json-schema-processors.cjs +8 -44
  260. package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -1
  261. package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -1
  262. package/node_modules/zod/v4/core/json-schema-processors.js +8 -43
  263. package/node_modules/zod/v4/core/memoizer.cjs +2 -5
  264. package/node_modules/zod/v4/core/memoizer.js +2 -5
  265. package/node_modules/zod/v4/core/regexes.cjs +4 -2
  266. package/node_modules/zod/v4/core/regexes.d.cts +1 -0
  267. package/node_modules/zod/v4/core/regexes.d.ts +1 -0
  268. package/node_modules/zod/v4/core/regexes.js +2 -0
  269. package/node_modules/zod/v4/core/schemas.cjs +33 -73
  270. package/node_modules/zod/v4/core/schemas.d.cts +7 -22
  271. package/node_modules/zod/v4/core/schemas.d.ts +7 -22
  272. package/node_modules/zod/v4/core/schemas.js +30 -72
  273. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -1
  274. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -3
  275. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -3
  276. package/node_modules/zod/v4/core/to-json-schema.js +1 -1
  277. package/node_modules/zod/v4/core/util.cjs +0 -4
  278. package/node_modules/zod/v4/core/util.js +0 -4
  279. package/node_modules/zod/v4/core/versions.cjs +1 -1
  280. package/node_modules/zod/v4/core/versions.js +1 -1
  281. package/node_modules/zod/v4/core/visit.cjs +0 -12
  282. package/node_modules/zod/v4/core/visit.js +0 -12
  283. package/node_modules/zod/v4/locales/ar.cjs +1 -0
  284. package/node_modules/zod/v4/locales/ar.js +1 -0
  285. package/node_modules/zod/v4/locales/az.cjs +1 -0
  286. package/node_modules/zod/v4/locales/az.js +1 -0
  287. package/node_modules/zod/v4/locales/be.cjs +1 -0
  288. package/node_modules/zod/v4/locales/be.js +1 -0
  289. package/node_modules/zod/v4/locales/bg.cjs +1 -0
  290. package/node_modules/zod/v4/locales/bg.js +1 -0
  291. package/node_modules/zod/v4/locales/bn.cjs +1 -0
  292. package/node_modules/zod/v4/locales/bn.js +1 -0
  293. package/node_modules/zod/v4/locales/ca.cjs +1 -0
  294. package/node_modules/zod/v4/locales/ca.js +1 -0
  295. package/node_modules/zod/v4/locales/ckb.cjs +1 -0
  296. package/node_modules/zod/v4/locales/ckb.js +1 -0
  297. package/node_modules/zod/v4/locales/cs.cjs +1 -0
  298. package/node_modules/zod/v4/locales/cs.js +1 -0
  299. package/node_modules/zod/v4/locales/da.cjs +1 -0
  300. package/node_modules/zod/v4/locales/da.js +1 -0
  301. package/node_modules/zod/v4/locales/de.cjs +1 -0
  302. package/node_modules/zod/v4/locales/de.js +1 -0
  303. package/node_modules/zod/v4/locales/el.cjs +1 -0
  304. package/node_modules/zod/v4/locales/el.js +1 -0
  305. package/node_modules/zod/v4/locales/en.cjs +1 -0
  306. package/node_modules/zod/v4/locales/en.js +1 -0
  307. package/node_modules/zod/v4/locales/eo.cjs +1 -0
  308. package/node_modules/zod/v4/locales/eo.js +1 -0
  309. package/node_modules/zod/v4/locales/es.cjs +1 -0
  310. package/node_modules/zod/v4/locales/es.js +1 -0
  311. package/node_modules/zod/v4/locales/fa.cjs +1 -0
  312. package/node_modules/zod/v4/locales/fa.js +1 -0
  313. package/node_modules/zod/v4/locales/fi.cjs +1 -0
  314. package/node_modules/zod/v4/locales/fi.js +1 -0
  315. package/node_modules/zod/v4/locales/fr-CA.cjs +1 -0
  316. package/node_modules/zod/v4/locales/fr-CA.js +1 -0
  317. package/node_modules/zod/v4/locales/fr.cjs +1 -0
  318. package/node_modules/zod/v4/locales/fr.js +1 -0
  319. package/node_modules/zod/v4/locales/gu.cjs +1 -0
  320. package/node_modules/zod/v4/locales/gu.js +1 -0
  321. package/node_modules/zod/v4/locales/he.cjs +1 -0
  322. package/node_modules/zod/v4/locales/he.js +1 -0
  323. package/node_modules/zod/v4/locales/hi.cjs +1 -0
  324. package/node_modules/zod/v4/locales/hi.js +1 -0
  325. package/node_modules/zod/v4/locales/hr.cjs +1 -0
  326. package/node_modules/zod/v4/locales/hr.js +1 -0
  327. package/node_modules/zod/v4/locales/hu.cjs +1 -0
  328. package/node_modules/zod/v4/locales/hu.js +1 -0
  329. package/node_modules/zod/v4/locales/hy.cjs +1 -0
  330. package/node_modules/zod/v4/locales/hy.js +1 -0
  331. package/node_modules/zod/v4/locales/id.cjs +1 -0
  332. package/node_modules/zod/v4/locales/id.js +1 -0
  333. package/node_modules/zod/v4/locales/is.cjs +1 -0
  334. package/node_modules/zod/v4/locales/is.js +1 -0
  335. package/node_modules/zod/v4/locales/it.cjs +1 -0
  336. package/node_modules/zod/v4/locales/it.js +1 -0
  337. package/node_modules/zod/v4/locales/ja.cjs +1 -0
  338. package/node_modules/zod/v4/locales/ja.js +1 -0
  339. package/node_modules/zod/v4/locales/ka.cjs +1 -0
  340. package/node_modules/zod/v4/locales/ka.js +1 -0
  341. package/node_modules/zod/v4/locales/km.cjs +1 -0
  342. package/node_modules/zod/v4/locales/km.js +1 -0
  343. package/node_modules/zod/v4/locales/kn.cjs +1 -0
  344. package/node_modules/zod/v4/locales/kn.js +1 -0
  345. package/node_modules/zod/v4/locales/ko.cjs +1 -0
  346. package/node_modules/zod/v4/locales/ko.js +1 -0
  347. package/node_modules/zod/v4/locales/lt.cjs +1 -0
  348. package/node_modules/zod/v4/locales/lt.js +1 -0
  349. package/node_modules/zod/v4/locales/mk.cjs +1 -0
  350. package/node_modules/zod/v4/locales/mk.js +1 -0
  351. package/node_modules/zod/v4/locales/ms.cjs +1 -0
  352. package/node_modules/zod/v4/locales/ms.js +1 -0
  353. package/node_modules/zod/v4/locales/ne.cjs +1 -0
  354. package/node_modules/zod/v4/locales/ne.js +1 -0
  355. package/node_modules/zod/v4/locales/nl.cjs +1 -0
  356. package/node_modules/zod/v4/locales/nl.js +1 -0
  357. package/node_modules/zod/v4/locales/nn.cjs +1 -0
  358. package/node_modules/zod/v4/locales/nn.js +1 -0
  359. package/node_modules/zod/v4/locales/no.cjs +1 -0
  360. package/node_modules/zod/v4/locales/no.js +1 -0
  361. package/node_modules/zod/v4/locales/ota.cjs +1 -0
  362. package/node_modules/zod/v4/locales/ota.js +1 -0
  363. package/node_modules/zod/v4/locales/pl.cjs +1 -0
  364. package/node_modules/zod/v4/locales/pl.js +1 -0
  365. package/node_modules/zod/v4/locales/ps.cjs +1 -0
  366. package/node_modules/zod/v4/locales/ps.js +1 -0
  367. package/node_modules/zod/v4/locales/pt-BR.cjs +1 -0
  368. package/node_modules/zod/v4/locales/pt-BR.js +1 -0
  369. package/node_modules/zod/v4/locales/pt.cjs +1 -0
  370. package/node_modules/zod/v4/locales/pt.js +1 -0
  371. package/node_modules/zod/v4/locales/ro.cjs +1 -0
  372. package/node_modules/zod/v4/locales/ro.js +1 -0
  373. package/node_modules/zod/v4/locales/ru.cjs +1 -0
  374. package/node_modules/zod/v4/locales/ru.js +1 -0
  375. package/node_modules/zod/v4/locales/sk.cjs +1 -0
  376. package/node_modules/zod/v4/locales/sk.js +1 -0
  377. package/node_modules/zod/v4/locales/sl.cjs +1 -0
  378. package/node_modules/zod/v4/locales/sl.js +1 -0
  379. package/node_modules/zod/v4/locales/sv.cjs +1 -0
  380. package/node_modules/zod/v4/locales/sv.js +1 -0
  381. package/node_modules/zod/v4/locales/ta.cjs +1 -0
  382. package/node_modules/zod/v4/locales/ta.js +1 -0
  383. package/node_modules/zod/v4/locales/tg.cjs +1 -0
  384. package/node_modules/zod/v4/locales/tg.js +1 -0
  385. package/node_modules/zod/v4/locales/th.cjs +1 -0
  386. package/node_modules/zod/v4/locales/th.js +1 -0
  387. package/node_modules/zod/v4/locales/tk.cjs +1 -0
  388. package/node_modules/zod/v4/locales/tk.js +1 -0
  389. package/node_modules/zod/v4/locales/tr.cjs +1 -0
  390. package/node_modules/zod/v4/locales/tr.js +1 -0
  391. package/node_modules/zod/v4/locales/uk.cjs +1 -0
  392. package/node_modules/zod/v4/locales/uk.js +1 -0
  393. package/node_modules/zod/v4/locales/ur.cjs +1 -0
  394. package/node_modules/zod/v4/locales/ur.js +1 -0
  395. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  396. package/node_modules/zod/v4/locales/uz.js +1 -0
  397. package/node_modules/zod/v4/locales/vi.cjs +1 -0
  398. package/node_modules/zod/v4/locales/vi.js +1 -0
  399. package/node_modules/zod/v4/locales/yo.cjs +1 -0
  400. package/node_modules/zod/v4/locales/yo.js +1 -0
  401. package/node_modules/zod/v4/locales/zh-CN.cjs +1 -0
  402. package/node_modules/zod/v4/locales/zh-CN.js +1 -0
  403. package/node_modules/zod/v4/locales/zh-TW.cjs +1 -0
  404. package/node_modules/zod/v4/locales/zh-TW.js +1 -0
  405. package/node_modules/zod/v4/mini/checks.cjs +2 -1
  406. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  407. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  408. package/node_modules/zod/v4/mini/checks.js +1 -1
  409. package/node_modules/zod/v4/mini/schemas.cjs +11 -13
  410. package/node_modules/zod/v4/mini/schemas.d.cts +1 -4
  411. package/node_modules/zod/v4/mini/schemas.d.ts +1 -4
  412. package/node_modules/zod/v4/mini/schemas.js +9 -11
  413. package/package.json +2 -2
  414. package/slingshot/index.js +183 -182
  415. package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  416. package/node_modules/@types/node/compatibility/index.d.ts +0 -9
  417. package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  418. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  419. package/node_modules/undici-types/file.d.ts +0 -39
  420. package/node_modules/undici-types/filereader.d.ts +0 -54
@@ -1000,7 +1000,7 @@ export const $ZodCheckEndsWith: core.$constructor<$ZodCheckEndsWith> = /*@__PURE
1000
1000
  function handleCheckPropertyResult(
1001
1001
  result: schemas.ParsePayload<unknown>,
1002
1002
  payload: schemas.ParsePayload<unknown>,
1003
- property: string
1003
+ property: string | symbol
1004
1004
  ) {
1005
1005
  if (result.issues.length) {
1006
1006
  payload.issues.push(...util.prefixIssues(property, result.issues));
@@ -1045,6 +1045,66 @@ export const $ZodCheckProperty: core.$constructor<$ZodCheckProperty> = /*@__PURE
1045
1045
  }
1046
1046
  );
1047
1047
 
1048
+ /////////////////////////////////////
1049
+ ///// $ZodCheckProperties /////
1050
+ /////////////////////////////////////
1051
+ export interface $ZodCheckPropertiesDef<Shape extends schemas.$ZodShape = schemas.$ZodShape> extends $ZodCheckDef {
1052
+ check: "properties";
1053
+ shape: Shape;
1054
+ }
1055
+
1056
+ // typed over the input side, since each child's result is discarded; a literal widens to its primitive so spreading over a `string` property still type-checks (#6520)
1057
+ export type $ZodCheckPropertiesInput<Shape extends schemas.$ZodShape = schemas.$ZodShape> = {
1058
+ -readonly [k in keyof Shape]: util.Widen<core.input<Shape[k]>>;
1059
+ };
1060
+
1061
+ export interface $ZodCheckPropertiesInternals<Shape extends schemas.$ZodShape = schemas.$ZodShape>
1062
+ extends $ZodCheckInternals<$ZodCheckPropertiesInput<Shape>> {
1063
+ def: $ZodCheckPropertiesDef<Shape>;
1064
+ issc: errors.$ZodIssue;
1065
+ }
1066
+
1067
+ export interface $ZodCheckProperties<Shape extends schemas.$ZodShape = schemas.$ZodShape>
1068
+ extends $ZodCheck<$ZodCheckPropertiesInput<Shape>> {
1069
+ _zod: $ZodCheckPropertiesInternals<Shape>;
1070
+ // yields the check itself, so `.check(...z.properties(shape))` spread call sites keep working
1071
+ [Symbol.iterator](): Iterator<this>;
1072
+ }
1073
+
1074
+ export const $ZodCheckProperties: core.$constructor<$ZodCheckProperties> = /*@__PURE__*/ core.$constructor(
1075
+ "$ZodCheckProperties",
1076
+ (inst, def) => {
1077
+ $ZodCheck.init(inst, def);
1078
+ util.hide(inst, Symbol.iterator, function* () {
1079
+ yield inst;
1080
+ });
1081
+
1082
+ // key and schema snapshotted together: reading one live and the other cached lets a later mutation of the caller's shape object pair a stale key with a missing schema
1083
+ let entries!: [string | symbol, schemas.$ZodType][];
1084
+ inst._zod.check = (payload) => {
1085
+ // the base schema already typed the value, so only a nullish one is rejected here: the properties read on a primitive too, matching z.property() on a string's length
1086
+ if (payload.value == null) {
1087
+ payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
1088
+ return undefined;
1089
+ }
1090
+ entries ??= Reflect.ownKeys(def.shape).map((key) => [key, (def.shape as any)[key] as schemas.$ZodType]);
1091
+ const input = payload.value as any;
1092
+ let proms: Promise<any>[] | undefined;
1093
+ for (const [key, schema] of entries) {
1094
+ const result = schema._zod.run({ value: input[key], issues: [] }, {});
1095
+ if (result instanceof Promise) {
1096
+ proms ??= [];
1097
+ proms.push(result.then((result) => handleCheckPropertyResult(result, payload, key)));
1098
+ } else {
1099
+ handleCheckPropertyResult(result, payload, key);
1100
+ }
1101
+ }
1102
+ if (proms) return Promise.all(proms).then(() => undefined);
1103
+ return undefined;
1104
+ };
1105
+ }
1106
+ );
1107
+
1048
1108
  ///////////////////////////////////
1049
1109
  ///// $ZodCheckMimeType /////
1050
1110
  ///////////////////////////////////
@@ -13,12 +13,12 @@ import {
13
13
  isValidIPv6,
14
14
  isValidJWT,
15
15
  mergeValues,
16
- parseURLObject,
17
16
  stripTabAndNewline,
18
17
  urlHostnameOk,
19
18
  urlProtocolOk,
19
+ validateURL,
20
20
  } from "./schemas.js";
21
- import type { $ZodProperties, $ZodPropertiesDef, ParseContextInternal, ParsePayload, SomeType } from "./schemas.js";
21
+ import type { ParseContextInternal, ParsePayload, SomeType } from "./schemas.js";
22
22
  import * as util from "./util.js";
23
23
 
24
24
  /** @internal Sentinel the compiled fast path returns when validation fails. */
@@ -89,7 +89,7 @@ type SupportedCheck =
89
89
  | checks.$ZodCheckLengthEquals
90
90
  | checks.$ZodCheckStringFormat
91
91
  | checks.$ZodCheckProperty
92
- | $ZodProperties
92
+ | checks.$ZodCheckProperties
93
93
  | checks.$ZodCheckMimeType
94
94
  | checks.$ZodCheckOverwrite
95
95
  | { _zod: { def: { check: "custom"; fn?: (value: unknown) => boolean }; check?: (payload: unknown) => unknown } };
@@ -455,7 +455,7 @@ function generateChecks(doc: Doc, ctx: CompileContext, schema: SomeType, accesso
455
455
  generatePropertyCheck(doc, ctx, def, currentAccessor);
456
456
  break;
457
457
  case "properties":
458
- generatePropertiesChecks(doc, ctx, def, currentAccessor, false);
458
+ generatePropertiesChecks(doc, ctx, def, currentAccessor);
459
459
  break;
460
460
  case "overwrite": {
461
461
  // Overwrite transforms the value - create new variable for transformed result
@@ -616,20 +616,15 @@ function generateMimeTypeCheck(
616
616
  function generatePropertiesChecks(
617
617
  doc: Doc,
618
618
  ctx: CompileContext,
619
- def: $ZodPropertiesDef,
620
- accessor: string,
621
- schemaRole: boolean
619
+ def: checks.$ZodCheckPropertiesDef,
620
+ accessor: string
622
621
  ): void {
623
- // a custom `when` gates the assertion at runtime; inside a union a wrongly-run branch is absorbed as a branch failure rather than falling back, so refuse at codegen the way the check role does
622
+ // a custom `when` gates the assertion at runtime; inside a union a wrongly-run branch is absorbed as a branch failure rather than falling back, so refuse at codegen
624
623
  if (def.when) {
625
624
  throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
626
625
  }
627
- // matches the runtime gate for whichever role this is: a schema rejects a primitive outright, a check only a nullish value
628
- doc.write(
629
- schemaRole
630
- ? `if (${accessor} === null || (typeof ${accessor} !== "object" && typeof ${accessor} !== "function")) return INVALID;`
631
- : `if (${accessor} == null) return INVALID;`
632
- );
626
+ // matches the runtime gate: the base schema already typed the value, so only a nullish one is rejected
627
+ doc.write(`if (${accessor} == null) return INVALID;`);
633
628
  const shape = def.shape as Record<string | symbol, SomeType>;
634
629
  for (const key of Reflect.ownKeys(shape)) {
635
630
  // a symbol has no source literal, so it is hoisted as a constant
@@ -777,7 +772,21 @@ const PATTERN_IS_COMPLETE: Set<string> = new Set([
777
772
  ]);
778
773
 
779
774
  // Returns the accessor holding the (possibly normalized) value after the check — url/normalize formats produce a new value like overwrite does. Never assigns to the incoming accessor: it may be a `const` or a property expression on user input.
780
- function generateStringFormatCheck(doc: Doc, ctx: CompileContext, def: StringFormatDef, accessor: string): string {
775
+ function generateStringFormatCheck(doc: Doc, ctx: CompileContext, def: StringFormatDef, accessor: string): string;
776
+ function generateStringFormatCheck(
777
+ doc: Doc,
778
+ ctx: CompileContext,
779
+ def: StringFormatDef,
780
+ accessor: string,
781
+ needsValue: boolean
782
+ ): string | null;
783
+ function generateStringFormatCheck(
784
+ doc: Doc,
785
+ ctx: CompileContext,
786
+ def: StringFormatDef,
787
+ accessor: string,
788
+ needsValue = true
789
+ ): string | null {
781
790
  // Some string formats do runtime validation beyond their advertised pattern. For cheap pure utility checks, hoist the runtime function and call it so the fast path stays correct without cloning the utility logic into codegen.
782
791
  const fmt = def.format;
783
792
  if (fmt === "base64") {
@@ -825,7 +834,7 @@ function generateStringFormatCheck(doc: Doc, ctx: CompileContext, def: StringFor
825
834
  formatDef.protocol !== undefined
826
835
  ) {
827
836
  // Same three predicates the runtime calls, in the same order, so there is no second URL implementation to drift. Which options exist is known now, so the calls the runtime makes conditionally are emitted conditionally instead.
828
- const parseConst = addConstant(ctx, parseURLObject);
837
+ const parseConst = addConstant(ctx, validateURL);
829
838
  const defConst = addConstant(ctx, def);
830
839
  const trimVar = newVar(ctx);
831
840
  const urlVar = newVar(ctx);
@@ -840,6 +849,7 @@ function generateStringFormatCheck(doc: Doc, ctx: CompileContext, def: StringFor
840
849
  const protocolConst = addConstant(ctx, urlProtocolOk);
841
850
  doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);
842
851
  }
852
+ if (!needsValue) return null;
843
853
  const outputVar = newVar(ctx);
844
854
  const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant(ctx, stripTabAndNewline)}(${trimVar})`;
845
855
  doc.write(`const ${outputVar} = ${outputExpr};`);
@@ -934,7 +944,6 @@ type SupportedSchemaType =
934
944
  | "lazy"
935
945
  | "pipe"
936
946
  | "custom"
937
- | "properties"
938
947
  | "transform"
939
948
  | "catch";
940
949
 
@@ -967,7 +976,7 @@ function generateCheck(
967
976
 
968
977
  switch (type) {
969
978
  case "string":
970
- typeAccessor = generateStringCheck(doc, ctx, schema, accessor);
979
+ typeAccessor = generateStringCheck(doc, ctx, schema, accessor, buildsValue);
971
980
  break;
972
981
  case "number":
973
982
  typeAccessor = generateNumberCheck(doc, schema, accessor);
@@ -1079,10 +1088,6 @@ function generateCheck(
1079
1088
  case "custom":
1080
1089
  typeAccessor = generateCustomCheck(doc, ctx, schema, accessor);
1081
1090
  break;
1082
- case "properties":
1083
- generatePropertiesChecks(doc, ctx, (schema as $ZodProperties)._zod.def, accessor, true);
1084
- typeAccessor = accessor;
1085
- break;
1086
1091
  case "transform":
1087
1092
  typeAccessor = generateTransformCheck(doc, ctx, schema, accessor);
1088
1093
  break;
@@ -1102,13 +1107,19 @@ function generateCheck(
1102
1107
  return generateChecks(doc, ctx, schema, typeAccessor);
1103
1108
  }
1104
1109
 
1105
- function generateStringCheck(doc: Doc, ctx: CompileContext, schema: SomeType, accessor: string): string {
1110
+ function generateStringCheck(
1111
+ doc: Doc,
1112
+ ctx: CompileContext,
1113
+ schema: SomeType,
1114
+ accessor: string,
1115
+ needsValue = true
1116
+ ): string | null {
1106
1117
  doc.write(`if (typeof ${accessor} !== "string") return INVALID;`);
1107
1118
 
1108
1119
  // z.email() carries its format on the def, z.string().email() in def.checks; both route here so the format table has no second copy to drift from.
1109
1120
  const def = schema._zod.def as unknown as StringFormatDef & { format?: string };
1110
1121
  if (def.format === undefined) return accessor;
1111
- return generateStringFormatCheck(doc, ctx, def, accessor);
1122
+ return generateStringFormatCheck(doc, ctx, def, accessor, needsValue);
1112
1123
  }
1113
1124
 
1114
1125
  function generateNumberCheck(doc: Doc, schema: SomeType, accessor: string): string {
@@ -79,9 +79,7 @@ export /*@__NO_SIDE_EFFECTS__*/ function $constructor<T extends ZodTrait, D = T[
79
79
  // Cleared even on throw, so the shared descriptor never leaks one instance's internals into the next.
80
80
  _zodDesc.value = undefined;
81
81
  }
82
- }
83
-
84
- if (inst._zod.traits.has(name)) {
82
+ } else if (inst._zod.traits.has(name)) {
85
83
  return;
86
84
  }
87
85
 
@@ -16,7 +16,6 @@ import {
16
16
  finalize,
17
17
  handleUnrepresentable,
18
18
  initializeContext,
19
- isTransforming,
20
19
  processSchema,
21
20
  } from "./to-json-schema.js";
22
21
  import { BIGINT_FORMAT_RANGES, NUMBER_FORMAT_RANGES, assignProp, getEnumValues } from "./util.js";
@@ -450,20 +449,16 @@ export const objectProcessor: Processor<schemas.$ZodObject> = (schema, ctx, _jso
450
449
  }
451
450
 
452
451
  // required keys
453
- const allKeys = new Set(Object.keys(shape));
454
- const requiredKeys = new Set(
455
- [...allKeys].filter((key) => {
456
- const field = def.shape[key]!;
457
- if (ctx.io === "input") {
458
- return inputOptin(field) === undefined;
459
- } else {
460
- return field._zod.optout === undefined;
461
- }
462
- })
463
- );
452
+ const requiredKeys: string[] = [];
453
+ for (const key of Object.keys(shape)) {
454
+ const field = def.shape[key]!;
455
+ if (ctx.io === "input" ? inputOptin(field) === undefined : field._zod.optout === undefined) {
456
+ requiredKeys.push(key);
457
+ }
458
+ }
464
459
 
465
- if (requiredKeys.size > 0) {
466
- json.required = Array.from(requiredKeys);
460
+ if (requiredKeys.length > 0) {
461
+ json.required = requiredKeys;
467
462
  }
468
463
 
469
464
  // catchall
@@ -481,54 +476,6 @@ export const objectProcessor: Processor<schemas.$ZodObject> = (schema, ctx, _jso
481
476
  }
482
477
  };
483
478
 
484
- // asserts named properties in place and passes everything else through, so no additionalProperties constraint is emitted
485
- export const propertiesProcessor: Processor<schemas.$ZodProperties> = (schema, ctx, _json, params) => {
486
- const json = _json as JSONSchema.ObjectSchema;
487
- const def = schema._zod.def;
488
-
489
- // dropping a symbol key silently would emit a schema that asserts less than this one does
490
- if (
491
- Object.getOwnPropertySymbols(def.shape).length &&
492
- handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")
493
- ) {
494
- return;
495
- }
496
-
497
- // the parsed value is the input, so an output-mode emission would describe a transformed value this schema never returns
498
- if (ctx.io === "output") {
499
- for (const key in def.shape) {
500
- if (
501
- isTransforming(def.shape[key]!) &&
502
- handleUnrepresentable(
503
- schema,
504
- ctx,
505
- json,
506
- params,
507
- `z.properties() returns its input, so the output of a transforming schema at key "${key}" cannot be represented in JSON Schema`
508
- )
509
- ) {
510
- return;
511
- }
512
- }
513
- }
514
-
515
- json.type = "object";
516
- json.properties = {};
517
- for (const key in def.shape) {
518
- assignProp(
519
- json.properties,
520
- key,
521
- processSchema(def.shape[key]!, ctx as any, {
522
- ...params,
523
- path: [...params.path, "properties", key],
524
- })
525
- );
526
- }
527
- // input-side optionality in both modes: the parsed value is the input, so a defaulted key that stays absent must not be required of the output either
528
- const required = Object.keys(def.shape).filter((key) => inputOptin(def.shape[key]!) === undefined);
529
- if (required.length > 0) json.required = required;
530
- };
531
-
532
479
  export const unionProcessor: Processor<schemas.$ZodUnion> = (schema, ctx, json, params) => {
533
480
  const def = schema._zod.def as schemas.$ZodUnionDef;
534
481
  // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches). This includes both z.xor() and discriminated unions
@@ -904,7 +851,6 @@ export const allProcessors: Record<string, Processor<any>> = {
904
851
  file: fileProcessor,
905
852
  success: successProcessor,
906
853
  custom: customProcessor,
907
- properties: propertiesProcessor,
908
854
  function: functionProcessor,
909
855
  transform: transformProcessor,
910
856
  map: mapProcessor,
@@ -28,9 +28,9 @@ type WithState = { [STATE]?: State };
28
28
 
29
29
  const NO_ISSUES: errors.$ZodRawIssue[] = [];
30
30
 
31
- // a value a cycle can close through; callables count, since z.properties asserts on one
31
+ // a value a cycle can close through
32
32
  function isRef(value: unknown): value is object {
33
- return value !== null && (typeof value === "object" || typeof value === "function");
33
+ return value !== null && typeof value === "object";
34
34
  }
35
35
 
36
36
  // Receivers prefix paths in place, so the cache and every hand-out need their own copies.
@@ -90,9 +90,6 @@ function isRecursive(inst: $ZodType, stack: Set<object>, resolve: boolean): Answ
90
90
  check(def.catchall);
91
91
  break;
92
92
  }
93
- case "properties":
94
- merge(shape(def.shape, false));
95
- break;
96
93
  case "array":
97
94
  check(def.element);
98
95
  break;
@@ -98,6 +98,10 @@ export const e164: RegExp = /^\+[1-9]\d{6,14}$/;
98
98
  // Credit card shape: 12–19 digits, optionally separated by single spaces or single hyphens. ISO/IEC 7812 caps the PAN at 19 digits; 12 is the shortest issued length (Maestro).
99
99
  export const creditCard: RegExp = /^\d(?:[ -]?\d){11,18}$/;
100
100
 
101
+ // ISO 4217 alpha codes from the SIX list, regenerated by scripts/update-iso-4217.ts
102
+ export const currencyCode: RegExp =
103
+ /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
104
+
101
105
  // iban electronic format: 2-letter country, check digits 02-98 (the only values `98 - remainder` can produce), 11-30 bban characters
102
106
  export const iban: RegExp = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
103
107
 
@@ -96,8 +96,7 @@ export interface $ZodTypeDef {
96
96
  | "promise"
97
97
  | "lazy"
98
98
  | "function"
99
- | "custom"
100
- | "properties";
99
+ | "custom";
101
100
  error?: errors.$ZodErrorMap<never> | undefined;
102
101
  checks?: checks.$ZodCheck<never>[];
103
102
  }
@@ -523,10 +522,30 @@ export interface $ZodURL extends $ZodType {
523
522
 
524
523
  /** The `://` guard rejected the input before the URL constructor saw it. */
525
524
  export const URL_BAD_FORMAT = 1;
526
- /** The URL constructor rejected the input. */
525
+ /** The URL parser rejected the input. */
527
526
  export const URL_UNPARSEABLE = 2;
528
527
 
529
- /** Parses a URL for `$ZodURL`, applying the one guard the URL constructor cannot express. Returns the parsed URL, or a code naming the stage that rejected it — the runtime needs that distinction to pick an issue note, and compiled code only needs to know it is not a URL. */
528
+ export function canParseURL(input: string): boolean {
529
+ try {
530
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
531
+ new URL(input);
532
+ return true;
533
+ } catch {
534
+ return false;
535
+ }
536
+ }
537
+
538
+ export function validateURL(
539
+ trimmed: string,
540
+ def: Pick<$ZodURLDef, "protocol" | "hostname" | "normalize">
541
+ ): URL | true | typeof URL_BAD_FORMAT | typeof URL_UNPARSEABLE {
542
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
543
+ return canParseURL(trimmed) || URL_UNPARSEABLE;
544
+ }
545
+ return parseURLObject(trimmed, def);
546
+ }
547
+
548
+ /** Parses a URL while preserving the non-normalizing HTTP guard. */
530
549
  export function parseURLObject(
531
550
  trimmed: string,
532
551
  def: Pick<$ZodURLDef, "protocol" | "normalize">
@@ -537,6 +556,10 @@ export function parseURLObject(
537
556
  }
538
557
 
539
558
  try {
559
+ if (typeof URL !== "undefined") {
560
+ const URLStatic = URL as typeof URL & { parse?: (input: string) => URL | null };
561
+ if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
562
+ }
540
563
  // @ts-ignore
541
564
  return new URL(trimmed);
542
565
  } catch {
@@ -567,7 +590,7 @@ export const $ZodURL: core.$constructor<$ZodURL> = /*@__PURE__*/ core.$construct
567
590
  try {
568
591
  // Trim whitespace from input
569
592
  const trimmed = payload.value.trim();
570
- const url = parseURLObject(trimmed, def);
593
+ const url = validateURL(trimmed, def);
571
594
 
572
595
  if (url === URL_BAD_FORMAT) {
573
596
  payload.issues.push({
@@ -592,6 +615,11 @@ export const $ZodURL: core.$constructor<$ZodURL> = /*@__PURE__*/ core.$construct
592
615
  return;
593
616
  }
594
617
 
618
+ if (url === true) {
619
+ payload.value = stripTabAndNewline(trimmed);
620
+ return;
621
+ }
622
+
595
623
  if (def.hostname && !urlHostnameOk(url, def.hostname)) {
596
624
  payload.issues.push({
597
625
  code: "invalid_format",
@@ -886,13 +914,7 @@ const ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
886
914
 
887
915
  export function isValidIPv6(value: string): boolean {
888
916
  if (!ipv6Alphabet.test(value)) return false;
889
- try {
890
- // @ts-ignore
891
- new URL(`http://[${value}]`);
892
- return true;
893
- } catch {
894
- return false;
895
- }
917
+ return canParseURL(`http://[${value}]`);
896
918
  }
897
919
 
898
920
  export const $ZodIPv6: core.$constructor<$ZodIPv6> = /*@__PURE__*/ core.$constructor("$ZodIPv6", (inst, def): void => {
@@ -5096,101 +5118,6 @@ function handleRefineResult(result: unknown, payload: ParsePayload, input: unkno
5096
5118
  }
5097
5119
  }
5098
5120
 
5099
- ////////////////////////////////////////
5100
- ////////////////////////////////////////
5101
- ////////// //////////
5102
- ////////// $ZodProperties //////////
5103
- ////////// //////////
5104
- ////////////////////////////////////////
5105
- ////////////////////////////////////////
5106
- export interface $ZodPropertiesDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef, checks.$ZodCheckDef {
5107
- type: "properties";
5108
- check: "properties";
5109
- shape: Shape;
5110
- }
5111
-
5112
- // both sides infer the INPUT type: the shape is asserted and its results discarded, so a default, catch or transform inside it would make an output-typed inference a lie. The check side widens a literal to its primitive, so spreading over a `string` property still type-checks (#6520).
5113
- export interface $ZodPropertiesInternals<Shape extends $ZodShape = $ZodShape>
5114
- extends $ZodTypeInternals<$InferObjectInput<Shape, {}>, $InferObjectInput<Shape, {}>>,
5115
- checks.$ZodCheckInternals<{ -readonly [k in keyof Shape]: util.Widen<core.input<Shape[k]>> }> {
5116
- def: $ZodPropertiesDef<Shape>;
5117
- isst: errors.$ZodIssueInvalidType;
5118
- issc: errors.$ZodIssue;
5119
- }
5120
-
5121
- export interface $ZodProperties<Shape extends $ZodShape = $ZodShape> extends $ZodType {
5122
- _zod: $ZodPropertiesInternals<Shape>;
5123
- // yields the schema itself, so pre-4.6 `.check(...z.properties(shape))` spread call sites keep working
5124
- [Symbol.iterator](): Iterator<this>;
5125
- }
5126
-
5127
- // asserts in place: the child result's value is discarded, matching z.property(), because a nested object or array schema rebuilds its output even when nothing transformed
5128
- function handlePropertiesResult(result: ParsePayload, payload: ParsePayload, key: string | symbol): void {
5129
- if (result.issues.length) {
5130
- payload.issues.push(...util.prefixIssues(key, result.issues));
5131
- }
5132
- }
5133
-
5134
- export const $ZodProperties: core.$constructor<$ZodProperties> = /*@__PURE__*/ core.$constructor(
5135
- "$ZodProperties",
5136
- (inst, def) => {
5137
- // $ZodType.init prepends an instance that already carries the $ZodCheck trait to its own `checks`, which would run the shape a second time and cost the parse context. Initializing the check trait after it keeps the schema role in `parse`, where the context arrives.
5138
- $ZodType.init(inst, def);
5139
- checks.$ZodCheck.init(inst, def);
5140
-
5141
- const memo = core.globalConfig.memoizer;
5142
- memo?.attach(inst);
5143
-
5144
- // key and schema snapshotted together: reading one live and the other cached lets a later mutation of the caller's shape object pair a stale key with a missing schema
5145
- let entries!: [string | symbol, $ZodType][];
5146
- const runShape = (payload: ParsePayload, ctx: ParseContextInternal): util.MaybeAsync<void> => {
5147
- entries ??= Reflect.ownKeys(def.shape).map((key) => [key, (def.shape as any)[key] as $ZodType]);
5148
- const input = payload.value as any;
5149
- let proms: Promise<any>[] | undefined;
5150
- for (const [key, schema] of entries) {
5151
- const result = schema._zod.run({ value: input[key], issues: [] }, ctx);
5152
- if (result instanceof Promise) {
5153
- proms ??= [];
5154
- proms.push(result.then((result) => handlePropertiesResult(result, payload, key)));
5155
- } else {
5156
- handlePropertiesResult(result, payload, key);
5157
- }
5158
- }
5159
- if (proms) return Promise.all(proms).then(() => undefined);
5160
- return undefined;
5161
- };
5162
-
5163
- inst._zod.parse = (payload, ctx) => {
5164
- const input = payload.value;
5165
- // as a schema this is the type gate, and it infers an object shape, so a primitive is a type error. A function passes: its properties read like any other object's, and z.instanceof allows one.
5166
- if (input === null || (typeof input !== "object" && typeof input !== "function")) {
5167
- payload.issues.push({ expected: "object", code: "invalid_type", input, inst });
5168
- return payload;
5169
- }
5170
- // both sides declare the shape's input type, so the assertion runs forward in either direction; encoding the children backward would reject the very type this schema claims to take
5171
- if (ctx.direction === "backward") ctx = { ...ctx, direction: "forward" };
5172
- // the input is its own output here, so it registers as its own memo entry: a cycle re-entering this node hits the bucket instead of recursing forever
5173
- if (memo) memo.alloc(inst, payload, input, ctx);
5174
- const result = runShape(payload, ctx);
5175
- return result instanceof Promise ? result.then(() => payload) : payload;
5176
- };
5177
-
5178
- // as a check the base schema already typed the value, so this only asserts the properties — which read on a primitive too, matching z.property() on a string's length. It gets no context of its own, so a cycle through a spread schema is not tracked.
5179
- inst._zod.check = (payload) => {
5180
- if (payload.value == null) {
5181
- payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
5182
- return undefined;
5183
- }
5184
- return runShape(payload, {});
5185
- };
5186
- },
5187
- {
5188
- *[Symbol.iterator]() {
5189
- yield this;
5190
- },
5191
- }
5192
- );
5193
-
5194
5121
  export type $ZodTypes =
5195
5122
  | $ZodString
5196
5123
  | $ZodNumber
@@ -5223,7 +5150,6 @@ export type $ZodTypes =
5223
5150
  | $ZodPrefault
5224
5151
  | $ZodTemplateLiteral
5225
5152
  | $ZodCustom
5226
- | $ZodProperties
5227
5153
  | $ZodTransform
5228
5154
  | $ZodNonOptional
5229
5155
  | $ZodReadonly
@@ -5262,4 +5188,5 @@ export type $ZodStringFormatTypes =
5262
5188
  | $ZodJWT
5263
5189
  | $ZodCustomStringFormat<"hex">
5264
5190
  | $ZodCustomStringFormat<util.HashFormat>
5265
- | $ZodCustomStringFormat<"hostname">;
5191
+ | $ZodCustomStringFormat<"hostname">
5192
+ | $ZodCustomStringFormat<"currency_code">;
@@ -677,6 +677,41 @@ test("url options match the runtime across the whole option matrix", () => {
677
677
  for (const schema of schemas) differential(schema, inputs);
678
678
  });
679
679
 
680
+ test("assert-only URL generation skips unused output without skipping chained transforms", () => {
681
+ const sanitized = "https://example.com";
682
+ const withNewline = "https://exa\nmple.com";
683
+ differential(z.url().length(sanitized.length), [sanitized, withNewline, "https://example.com/long"]);
684
+ differential(z.string().url().length(sanitized.length), [sanitized, withNewline, "https://example.com/long"]);
685
+
686
+ const URLStatic = URL as typeof URL & { parse: (input: string) => URL | null };
687
+ const descriptor = Object.getOwnPropertyDescriptor(URLStatic, "parse")!;
688
+ const marker = new Error("href read");
689
+ Object.defineProperty(URLStatic, "parse", {
690
+ configurable: true,
691
+ value: () =>
692
+ Object.create(URL.prototype, {
693
+ href: {
694
+ get() {
695
+ throw marker;
696
+ },
697
+ },
698
+ }) as URL,
699
+ });
700
+ try {
701
+ const schema = z.url({ normalize: true });
702
+ const parser = compileFn(schema);
703
+ const validator = compileFn(schema, { assertOnly: true });
704
+ expect(validator("https://example.com")).toBe(true);
705
+ expect(z.validate(compile(z.url({ normalize: true })), "https://example.com")).toBe(true);
706
+ expect(z.validate(compile(z.object({ url: z.url({ normalize: true }) })), { url: "https://example.com" })).toBe(
707
+ true
708
+ );
709
+ expect(() => parser("https://example.com")).toThrow(marker);
710
+ } finally {
711
+ Object.defineProperty(URLStatic, "parse", descriptor);
712
+ }
713
+ });
714
+
680
715
  test("empty strict object compiles", () => {
681
716
  // With no keys the unknown-key condition is empty, and `if () return INVALID;` is a syntax error the single top-level `new Function` rejects — too late for compileChild to island, so the whole tree lost its fast path.
682
717
  differential(z.strictObject({}), [{}, { a: 1 }, Object.create({ inherited: 1 })]);