@psnext/slingcli 3.1.20260904-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 (595) hide show
  1. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  2. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  3. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  4. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  5. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  6. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  7. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  8. package/node_modules/@aws-sdk/core/package.json +1 -1
  9. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  10. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  11. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  12. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  13. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  14. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  15. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +3 -3
  16. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  17. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  18. package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
  19. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  20. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  21. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  22. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  23. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  24. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  25. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-PBNSMEG7.js → chunk-BRL3MDQL.js} +10 -10
  26. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
  27. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  28. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  29. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +79 -32
  30. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +25 -8
  31. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  32. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  33. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
  34. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
  35. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +33 -43
  36. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  37. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +16 -2
  38. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +3 -0
  39. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +7 -2
  40. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
  41. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +9 -1
  42. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +221 -12
  43. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +76 -30
  44. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  45. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
  46. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
  47. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +37 -8
  48. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
  49. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
  50. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  51. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +106 -22
  52. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +29 -5
  53. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  54. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  55. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +21 -4
  56. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +155 -32
  57. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +65 -9
  58. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +115 -13
  59. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
  60. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +7 -0
  61. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dump.js +10 -23
  62. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +13 -1
  63. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-utils.js +217 -27
  64. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +43 -3
  65. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/parse.js +150 -147
  66. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  67. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
  68. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +6 -0
  69. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +2 -3
  70. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +6 -1
  71. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +3 -3
  72. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +1 -1
  73. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  74. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  75. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  76. package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +3 -3
  77. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +4 -4
  78. package/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
  79. package/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  80. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
  81. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
  82. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  83. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  84. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  85. package/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  86. package/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  87. package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  88. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  89. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  90. package/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  91. package/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  92. package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  93. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  94. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  95. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  96. package/node_modules/@smithy/core/errors.d.ts +5 -0
  97. package/node_modules/@smithy/core/errors.js +5 -0
  98. package/node_modules/@smithy/core/package.json +11 -2
  99. package/node_modules/@types/node/README.md +1 -1
  100. package/node_modules/@types/node/buffer.d.ts +1 -0
  101. package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  102. package/node_modules/@types/node/http.d.ts +1 -1
  103. package/node_modules/@types/node/package.json +3 -3
  104. package/node_modules/@types/node/perf_hooks.d.ts +31 -19
  105. package/node_modules/@types/node/quic.d.ts +6 -4
  106. package/node_modules/@types/node/stream/web.d.ts +20 -0
  107. package/node_modules/@types/node/tls.d.ts +26 -15
  108. package/node_modules/@types/node/vfs.d.ts +7 -6
  109. package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
  110. package/node_modules/@types/node/zlib.d.ts +17 -0
  111. package/node_modules/hono/dist/cjs/client/client.js +4 -4
  112. package/node_modules/hono/dist/cjs/hono-base.js +7 -6
  113. package/node_modules/hono/dist/cjs/jsx/base.js +18 -1
  114. package/node_modules/hono/dist/cjs/jsx/components.js +25 -26
  115. package/node_modules/hono/dist/cjs/jsx/context.js +5 -5
  116. package/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
  117. package/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +2 -2
  118. package/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
  119. package/node_modules/hono/dist/client/client.js +4 -4
  120. package/node_modules/hono/dist/hono-base.js +7 -6
  121. package/node_modules/hono/dist/jsx/base.js +15 -1
  122. package/node_modules/hono/dist/jsx/components.js +26 -27
  123. package/node_modules/hono/dist/jsx/context.js +6 -6
  124. package/node_modules/hono/dist/jsx/dom/server.js +5 -1
  125. package/node_modules/hono/dist/jsx/intrinsic-element/components.js +3 -3
  126. package/node_modules/hono/dist/jsx/streaming.js +5 -6
  127. package/node_modules/hono/dist/types/context.d.ts +2 -2
  128. package/node_modules/hono/dist/types/jsx/base.d.ts +3 -0
  129. package/node_modules/hono/package.json +2 -2
  130. package/node_modules/jose/dist/types/index.d.ts +1 -2
  131. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -11
  132. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +13 -16
  133. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -11
  134. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -19
  135. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +10 -16
  136. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +18 -21
  137. package/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -1
  138. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +4 -6
  139. package/node_modules/jose/dist/types/jwks/local.d.ts +5 -4
  140. package/node_modules/jose/dist/types/jwks/remote.d.ts +20 -21
  141. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +4 -4
  142. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +8 -11
  143. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -5
  144. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +8 -11
  145. package/node_modules/jose/dist/types/jws/general/sign.d.ts +10 -14
  146. package/node_modules/jose/dist/types/jws/general/verify.d.ts +11 -17
  147. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +14 -11
  148. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +24 -22
  149. package/node_modules/jose/dist/types/jwt/sign.d.ts +3 -7
  150. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -6
  151. package/node_modules/jose/dist/types/jwt/verify.d.ts +13 -6
  152. package/node_modules/jose/dist/types/key/export.d.ts +6 -6
  153. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +9 -14
  154. package/node_modules/jose/dist/types/key/generate_secret.d.ts +10 -10
  155. package/node_modules/jose/dist/types/key/import.d.ts +19 -18
  156. package/node_modules/jose/dist/types/types.d.ts +152 -247
  157. package/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
  158. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +6 -1
  159. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -3
  160. package/node_modules/jose/dist/types/util/errors.d.ts +29 -40
  161. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +1 -2
  162. package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +9 -26
  163. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +3 -3
  164. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +11 -30
  165. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +6 -6
  166. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -57
  167. package/node_modules/jose/dist/webapi/jwk/embedded.js +3 -4
  168. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +3 -6
  169. package/node_modules/jose/dist/webapi/jwks/local.js +16 -10
  170. package/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
  171. package/node_modules/jose/dist/webapi/jws/compact/sign.js +2 -4
  172. package/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
  173. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +8 -15
  174. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +4 -14
  175. package/node_modules/jose/dist/webapi/jws/general/sign.js +4 -11
  176. package/node_modules/jose/dist/webapi/jws/general/verify.js +5 -7
  177. package/node_modules/jose/dist/webapi/jwt/decrypt.js +2 -3
  178. package/node_modules/jose/dist/webapi/jwt/encrypt.js +11 -25
  179. package/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
  180. package/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -2
  181. package/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
  182. package/node_modules/jose/dist/webapi/key/export.js +12 -16
  183. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +4 -13
  184. package/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
  185. package/node_modules/jose/dist/webapi/key/import.js +5 -9
  186. package/node_modules/jose/dist/webapi/lib/asn1.js +2 -4
  187. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +35 -0
  188. package/node_modules/jose/dist/webapi/lib/content_encryption.js +21 -29
  189. package/node_modules/jose/dist/webapi/lib/deflate.js +9 -19
  190. package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -4
  191. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +21 -54
  192. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +26 -59
  193. package/node_modules/jose/dist/webapi/lib/jws_sign.js +29 -43
  194. package/node_modules/jose/dist/webapi/lib/jws_verify.js +37 -45
  195. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
  196. package/node_modules/jose/dist/webapi/lib/key.js +119 -59
  197. package/node_modules/jose/dist/webapi/lib/key_management.js +45 -80
  198. package/node_modules/jose/dist/webapi/lib/{options.js → validate.js} +64 -3
  199. package/node_modules/jose/dist/webapi/util/base64url.js +5 -19
  200. package/node_modules/jose/dist/webapi/util/decode_jwt.js +1 -1
  201. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +1 -1
  202. package/node_modules/jose/package.json +1 -1
  203. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
  204. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  205. package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
  206. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  207. package/node_modules/undici/lib/handler/cache-handler.js +21 -5
  208. package/node_modules/undici/lib/handler/retry-handler.js +42 -7
  209. package/node_modules/undici/lib/interceptor/cache.js +20 -1
  210. package/node_modules/undici/lib/interceptor/decompress.js +146 -14
  211. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  212. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
  213. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  214. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  215. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  216. package/node_modules/undici/package.json +1 -1
  217. package/node_modules/undici/types/interceptors.d.ts +2 -0
  218. package/node_modules/undici-types/client.d.ts +8 -3
  219. package/node_modules/undici-types/connector.d.ts +1 -0
  220. package/node_modules/undici-types/cookies.d.ts +1 -1
  221. package/node_modules/undici-types/dispatcher.d.ts +3 -3
  222. package/node_modules/undici-types/errors.d.ts +10 -0
  223. package/node_modules/undici-types/fetch.d.ts +5 -1
  224. package/node_modules/undici-types/handlers.d.ts +2 -0
  225. package/node_modules/undici-types/interceptors.d.ts +1 -1
  226. package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
  227. package/node_modules/undici-types/package.json +1 -1
  228. package/node_modules/undici-types/proxy-agent.d.ts +7 -0
  229. package/node_modules/zod/README.md +2 -2
  230. package/node_modules/zod/compile.cjs +19 -0
  231. package/node_modules/zod/index.cjs +19 -0
  232. package/node_modules/zod/locales/index.cjs +19 -0
  233. package/node_modules/zod/mini/index.cjs +19 -0
  234. package/node_modules/zod/package.json +8 -7
  235. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  236. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  237. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  238. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  239. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  240. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  241. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  242. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  243. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  244. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  245. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  246. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  247. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  248. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  249. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  250. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  251. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  252. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  253. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  254. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  255. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  256. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  257. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  258. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  259. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  260. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  261. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  262. package/node_modules/zod/src/v4/core/api.ts +44 -28
  263. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  264. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  265. package/node_modules/zod/src/v4/core/core.ts +1 -3
  266. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  267. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  268. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  269. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  270. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  271. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  272. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  273. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  274. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  275. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  276. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  277. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  278. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  279. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  280. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  281. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  282. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  283. package/node_modules/zod/src/v4/core/util.ts +218 -147
  284. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  285. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  286. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  287. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  288. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  289. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  290. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  291. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  292. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  293. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  294. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  295. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  296. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  297. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  298. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  299. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  300. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  301. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  302. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  303. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  304. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  305. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  306. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  307. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  308. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  309. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  310. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  311. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  312. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  313. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  314. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  315. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  316. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  317. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  318. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  319. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  320. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  321. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  322. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  323. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  324. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  325. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  326. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  327. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  328. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  329. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  330. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  331. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  332. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  333. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  334. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  335. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  336. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  337. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  338. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  339. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  340. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  341. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  342. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  343. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  344. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  345. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  346. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  347. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  348. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  349. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  350. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  351. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  352. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  353. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  354. package/node_modules/zod/v3/ZodError.cjs +19 -0
  355. package/node_modules/zod/v3/errors.cjs +19 -0
  356. package/node_modules/zod/v3/external.cjs +19 -0
  357. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  358. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  359. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  360. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  361. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  362. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  363. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  364. package/node_modules/zod/v3/index.cjs +19 -0
  365. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  366. package/node_modules/zod/v3/types.cjs +19 -0
  367. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  368. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  369. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  370. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  371. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  372. package/node_modules/zod/v4/classic/external.cjs +22 -1
  373. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  374. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  375. package/node_modules/zod/v4/classic/external.js +1 -1
  376. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  377. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  378. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  379. package/node_modules/zod/v4/classic/index.cjs +19 -0
  380. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  381. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  382. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  383. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  384. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  385. package/node_modules/zod/v4/classic/schemas.js +77 -33
  386. package/node_modules/zod/v4/core/api.cjs +45 -22
  387. package/node_modules/zod/v4/core/api.d.cts +12 -6
  388. package/node_modules/zod/v4/core/api.d.ts +12 -6
  389. package/node_modules/zod/v4/core/api.js +25 -22
  390. package/node_modules/zod/v4/core/checks.cjs +51 -97
  391. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  392. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  393. package/node_modules/zod/v4/core/checks.js +31 -96
  394. package/node_modules/zod/v4/core/compile.cjs +173 -78
  395. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  396. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  397. package/node_modules/zod/v4/core/compile.js +154 -79
  398. package/node_modules/zod/v4/core/core.cjs +20 -1
  399. package/node_modules/zod/v4/core/core.js +1 -1
  400. package/node_modules/zod/v4/core/doc.cjs +26 -2
  401. package/node_modules/zod/v4/core/doc.js +7 -2
  402. package/node_modules/zod/v4/core/errors.cjs +21 -5
  403. package/node_modules/zod/v4/core/errors.js +2 -5
  404. package/node_modules/zod/v4/core/index.cjs +19 -0
  405. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  406. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  407. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  408. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  409. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  410. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  411. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  412. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  413. package/node_modules/zod/v4/core/memoizer.js +69 -23
  414. package/node_modules/zod/v4/core/parse.cjs +56 -16
  415. package/node_modules/zod/v4/core/parse.js +37 -16
  416. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  417. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  418. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  419. package/node_modules/zod/v4/core/regexes.js +10 -4
  420. package/node_modules/zod/v4/core/registries.cjs +19 -0
  421. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  422. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  423. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  424. package/node_modules/zod/v4/core/schemas.js +279 -113
  425. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  426. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  427. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  428. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  429. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  430. package/node_modules/zod/v4/core/util.cjs +177 -143
  431. package/node_modules/zod/v4/core/util.d.cts +25 -4
  432. package/node_modules/zod/v4/core/util.d.ts +25 -4
  433. package/node_modules/zod/v4/core/util.js +156 -143
  434. package/node_modules/zod/v4/core/versions.cjs +21 -2
  435. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  436. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  437. package/node_modules/zod/v4/core/versions.js +2 -2
  438. package/node_modules/zod/v4/core/visit.cjs +19 -0
  439. package/node_modules/zod/v4/index.cjs +19 -0
  440. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  441. package/node_modules/zod/v4/locales/ar.js +2 -0
  442. package/node_modules/zod/v4/locales/az.cjs +2 -0
  443. package/node_modules/zod/v4/locales/az.js +2 -0
  444. package/node_modules/zod/v4/locales/be.cjs +2 -0
  445. package/node_modules/zod/v4/locales/be.js +2 -0
  446. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  447. package/node_modules/zod/v4/locales/bg.js +2 -0
  448. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  449. package/node_modules/zod/v4/locales/bn.js +2 -0
  450. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  451. package/node_modules/zod/v4/locales/ca.js +2 -0
  452. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  453. package/node_modules/zod/v4/locales/ckb.js +2 -0
  454. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  455. package/node_modules/zod/v4/locales/cs.js +2 -0
  456. package/node_modules/zod/v4/locales/da.cjs +2 -0
  457. package/node_modules/zod/v4/locales/da.js +2 -0
  458. package/node_modules/zod/v4/locales/de.cjs +2 -0
  459. package/node_modules/zod/v4/locales/de.js +2 -0
  460. package/node_modules/zod/v4/locales/el.cjs +2 -0
  461. package/node_modules/zod/v4/locales/el.js +2 -0
  462. package/node_modules/zod/v4/locales/en.cjs +2 -0
  463. package/node_modules/zod/v4/locales/en.js +2 -0
  464. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  465. package/node_modules/zod/v4/locales/eo.js +2 -0
  466. package/node_modules/zod/v4/locales/es.cjs +2 -0
  467. package/node_modules/zod/v4/locales/es.js +2 -0
  468. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  469. package/node_modules/zod/v4/locales/fa.js +2 -0
  470. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  471. package/node_modules/zod/v4/locales/fi.js +2 -0
  472. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  473. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  474. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  475. package/node_modules/zod/v4/locales/fr.js +2 -0
  476. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  477. package/node_modules/zod/v4/locales/gu.js +2 -0
  478. package/node_modules/zod/v4/locales/he.cjs +2 -0
  479. package/node_modules/zod/v4/locales/he.js +2 -0
  480. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  481. package/node_modules/zod/v4/locales/hi.js +2 -0
  482. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  483. package/node_modules/zod/v4/locales/hr.js +2 -0
  484. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  485. package/node_modules/zod/v4/locales/hu.js +2 -0
  486. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  487. package/node_modules/zod/v4/locales/hy.js +2 -0
  488. package/node_modules/zod/v4/locales/id.cjs +2 -0
  489. package/node_modules/zod/v4/locales/id.js +2 -0
  490. package/node_modules/zod/v4/locales/index.cjs +22 -1
  491. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  492. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  493. package/node_modules/zod/v4/locales/index.js +1 -0
  494. package/node_modules/zod/v4/locales/is.cjs +2 -0
  495. package/node_modules/zod/v4/locales/is.js +2 -0
  496. package/node_modules/zod/v4/locales/it.cjs +2 -0
  497. package/node_modules/zod/v4/locales/it.js +2 -0
  498. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  499. package/node_modules/zod/v4/locales/ja.js +2 -0
  500. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  501. package/node_modules/zod/v4/locales/ka.js +2 -0
  502. package/node_modules/zod/v4/locales/km.cjs +2 -0
  503. package/node_modules/zod/v4/locales/km.js +2 -0
  504. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  505. package/node_modules/zod/v4/locales/kn.js +2 -0
  506. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  507. package/node_modules/zod/v4/locales/ko.js +2 -0
  508. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  509. package/node_modules/zod/v4/locales/lt.js +2 -0
  510. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  511. package/node_modules/zod/v4/locales/mk.js +2 -0
  512. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  513. package/node_modules/zod/v4/locales/ms.js +2 -0
  514. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  515. package/node_modules/zod/v4/locales/ne.js +2 -0
  516. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  517. package/node_modules/zod/v4/locales/nl.js +2 -0
  518. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  519. package/node_modules/zod/v4/locales/nn.js +2 -0
  520. package/node_modules/zod/v4/locales/no.cjs +2 -0
  521. package/node_modules/zod/v4/locales/no.js +2 -0
  522. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  523. package/node_modules/zod/v4/locales/ota.js +2 -0
  524. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  525. package/node_modules/zod/v4/locales/pl.js +2 -0
  526. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  527. package/node_modules/zod/v4/locales/ps.js +2 -0
  528. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  529. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  530. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  531. package/node_modules/zod/v4/locales/pt.js +2 -0
  532. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  533. package/node_modules/zod/v4/locales/ro.js +2 -0
  534. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  535. package/node_modules/zod/v4/locales/ru.js +2 -0
  536. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  537. package/node_modules/zod/v4/locales/sk.js +2 -0
  538. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  539. package/node_modules/zod/v4/locales/sl.js +2 -0
  540. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  541. package/node_modules/zod/v4/locales/sv.js +2 -0
  542. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  543. package/node_modules/zod/v4/locales/ta.js +2 -0
  544. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  545. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  546. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  547. package/node_modules/zod/v4/locales/tg.js +117 -0
  548. package/node_modules/zod/v4/locales/th.cjs +2 -0
  549. package/node_modules/zod/v4/locales/th.js +2 -0
  550. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  551. package/node_modules/zod/v4/locales/tk.js +2 -0
  552. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  553. package/node_modules/zod/v4/locales/tr.js +2 -0
  554. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  555. package/node_modules/zod/v4/locales/uk.js +2 -0
  556. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  557. package/node_modules/zod/v4/locales/ur.js +2 -0
  558. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  559. package/node_modules/zod/v4/locales/uz.js +2 -0
  560. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  561. package/node_modules/zod/v4/locales/vi.js +2 -0
  562. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  563. package/node_modules/zod/v4/locales/yo.js +2 -0
  564. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  565. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  566. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  567. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  568. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  569. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  570. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  571. package/node_modules/zod/v4/mini/external.cjs +22 -1
  572. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  573. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  574. package/node_modules/zod/v4/mini/external.js +1 -1
  575. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  576. package/node_modules/zod/v4/mini/index.cjs +19 -0
  577. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  578. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  579. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  580. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  581. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  582. package/node_modules/zod/v4/mini/schemas.js +21 -6
  583. package/node_modules/zod/v4-mini/index.cjs +19 -0
  584. package/package.json +2 -2
  585. package/slingshot/index.js +201 -198
  586. package/node_modules/jose/dist/webapi/lib/base64.js +0 -20
  587. package/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -27
  588. package/node_modules/jose/dist/webapi/lib/helpers.js +0 -45
  589. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -12
  590. package/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -19
  591. package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -19
  592. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -10
  593. package/node_modules/jose/dist/webapi/lib/key_options.js +0 -8
  594. package/node_modules/jose/dist/webapi/lib/signing.js +0 -22
  595. package/node_modules/jose/dist/webapi/lib/type_checks.js +0 -30
@@ -1,9 +1,33 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.$ZodCyclicError = void 0;
4
27
  exports.isRecursiveSchema = isRecursiveSchema;
5
28
  exports.memoizer = memoizer;
6
29
  exports.isBackEdge = isBackEdge;
30
+ const util = __importStar(require("./util.cjs"));
7
31
  class $ZodCyclicError extends Error {
8
32
  constructor() {
9
33
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -14,32 +38,62 @@ exports.$ZodCyclicError = $ZodCyclicError;
14
38
  /** Keyed off the context object every schema in one parse call already shares. */
15
39
  const STATE = "~memo";
16
40
  const NO_ISSUES = [];
41
+ // a value a cycle can close through
42
+ function isRef(value) {
43
+ return value !== null && typeof value === "object";
44
+ }
17
45
  // Receivers prefix paths in place, so the cache and every hand-out need their own copies.
18
46
  function cloneIssues(issues) {
19
47
  return issues.map((iss) => (iss.path ? { ...iss, path: iss.path.slice() } : { ...iss }));
20
48
  }
21
49
  const recursive = /*@__PURE__*/ new WeakMap();
50
+ /** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */
51
+ const NONE = 0;
52
+ const ASSUMED = 1;
53
+ const PROVEN = 2;
22
54
  /** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
23
- function isRecursive(inst, stack) {
55
+ function isRecursive(inst, stack, resolve) {
24
56
  const cached = recursive.get(inst);
25
57
  if (cached !== undefined)
26
- return cached;
58
+ return cached ? PROVEN : NONE;
27
59
  // Relative to the walk in progress, so not cached.
28
60
  if (stack.has(inst))
29
- return true;
61
+ return PROVEN;
30
62
  stack.add(inst);
31
- let result = false;
63
+ let result = NONE;
32
64
  const check = (child) => {
33
- if (!result && child?._zod && isRecursive(child, stack))
34
- result = true;
65
+ if (result !== PROVEN && child?._zod) {
66
+ const answer = isRecursive(child, stack, resolve);
67
+ if (answer > result)
68
+ result = answer;
69
+ }
70
+ };
71
+ // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen
72
+ const shape = (sh, spread) => {
73
+ let answer = NONE;
74
+ for (const key of Reflect.ownKeys(sh)) {
75
+ const desc = Object.getOwnPropertyDescriptor(sh, key);
76
+ // an object resolves its shape by spread, so a key it does not enumerate is never parsed; `z.properties` reads every own key and so keeps them all
77
+ if (spread && !desc.enumerable)
78
+ continue;
79
+ // resolving runs user code, and a factory mints a fresh subtree per read, so an edge the walk can't follow counts as a cycle
80
+ const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;
81
+ if (child > answer)
82
+ answer = child;
83
+ }
84
+ return answer;
85
+ };
86
+ const merge = (answer) => {
87
+ if (answer > result)
88
+ result = answer;
35
89
  };
36
90
  const def = inst._zod.def;
37
91
  const kind = def.type;
38
92
  switch (kind) {
39
93
  case "object": {
40
- // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen
41
- for (const key of Reflect.ownKeys(def.shape))
42
- check(def.shape[key]);
94
+ const raw = util.rawShape(def);
95
+ // a def with no raw shape answers `shape` from an accessor of its own, and running that can mint a whole fresh subtree
96
+ merge(raw ? shape(raw, true) : ASSUMED);
43
97
  check(def.catchall);
44
98
  break;
45
99
  }
@@ -86,10 +140,13 @@ function isRecursive(inst, stack) {
86
140
  check(def.input);
87
141
  check(def.output);
88
142
  break;
89
- // reading `_zod.innerType` resolves the getter once and caches it
90
- case "lazy":
91
- check(inst._zod.innerType);
143
+ // `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
144
+ case "lazy": {
145
+ const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : undefined);
146
+ // walked with resolution off: one hop sees past the deferral, and a lazy that yields only another unresolved lazy is generative, so it stops there
147
+ merge(inner ? isRecursive(inner, stack, false) : ASSUMED);
92
148
  break;
149
+ }
93
150
  // a leaf by choice: `parts` are regex fragments, not data positions
94
151
  case "template_literal":
95
152
  // leaves
@@ -133,8 +190,13 @@ function isRecursive(inst, stack) {
133
190
  }
134
191
  }
135
192
  stack.delete(inst);
136
- recursive.set(inst, result);
137
- return result;
193
+ return settle(inst, result);
194
+ }
195
+ /** An assumed answer must not outlive the resolution that settles it, so only a certain one is cached. */
196
+ function settle(inst, answer) {
197
+ if (answer !== ASSUMED)
198
+ recursive.set(inst, answer === PROVEN);
199
+ return answer;
138
200
  }
139
201
  /**
140
202
  * Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.
@@ -143,12 +205,13 @@ function isRecursive(inst, stack) {
143
205
  * generated fast path has no context to key on.
144
206
  */
145
207
  function isRecursiveSchema(inst) {
146
- return isRecursive(inst, new Set());
208
+ // z.compile never parses, so nothing would ever resolve a lazy for it; it runs once and already treats a throw here as recursive
209
+ return isRecursive(inst, new Set(), true) !== NONE;
147
210
  }
148
211
  function bucketFor(state, inst) {
149
212
  let bucket = state.buckets.get(inst);
150
213
  if (!bucket) {
151
- bucket = new Map();
214
+ bucket = new WeakMap();
152
215
  state.buckets.set(inst, bucket);
153
216
  }
154
217
  return bucket;
@@ -187,7 +250,8 @@ const memo = {
187
250
  attach(inst) {
188
251
  var _a;
189
252
  let isRecursiveInst;
190
- // `bucket` memoized for one parse; a recursive schema is re-entered many times and its bucket never changes
253
+ let rechecked = false;
254
+ // a recursive schema is re-entered many times per parse and its bucket never changes
191
255
  let lastCtx;
192
256
  let lastBucket;
193
257
  // Wraps `parse` in a deferred so it sees the container's final parse. Core's own deferred copies `parse` into `run` when there are no checks, and it ran first, so `run` is patched to match; with checks, `run` reads `parse` dynamically.
@@ -196,21 +260,26 @@ const memo = {
196
260
  const base = inst._zod.parse;
197
261
  const wrapped = (payload, ctx) => {
198
262
  if (isRecursiveInst === undefined) {
199
- isRecursiveInst = isRecursive(inst, new Set());
200
- if (!isRecursiveInst) {
263
+ const walked = isRecursive(inst, new Set(), false);
264
+ if (walked === NONE) {
201
265
  // Nothing here can ever fire, so take it back out.
202
266
  inst._zod.parse = base;
203
267
  if (inst._zod.run === wrapped)
204
268
  inst._zod.run = base;
205
269
  return base(payload, ctx);
206
270
  }
271
+ // this parse resolves the deferred edges on its own path, so ask once more before latching
272
+ if (walked === PROVEN || rechecked)
273
+ isRecursiveInst = true;
274
+ else
275
+ rechecked = true;
207
276
  }
208
277
  const input = payload.value;
209
- if (input === null || typeof input !== "object")
278
+ if (!isRef(input))
210
279
  return base(payload, ctx);
211
280
  let state = ctx[STATE];
212
281
  if (!state) {
213
- state = { buckets: new Map(), backEdges: undefined };
282
+ state = { buckets: new WeakMap(), backEdges: undefined };
214
283
  ctx[STATE] = state;
215
284
  }
216
285
  let bucket;
@@ -232,7 +301,7 @@ const memo = {
232
301
  else {
233
302
  // Still being parsed: its own checks cover it, so skip them here.
234
303
  payload.memo = true;
235
- state.backEdges ?? (state.backEdges = new Set());
304
+ state.backEdges ?? (state.backEdges = new WeakSet());
236
305
  state.backEdges.add(hit.value);
237
306
  }
238
307
  return payload;
@@ -268,5 +337,24 @@ function memoizer() {
268
337
  /** Whether this value is a node a back-edge resolved to before it finished. */
269
338
  function isBackEdge(ctx, value) {
270
339
  const backEdges = ctx[STATE]?.backEdges;
271
- return backEdges !== undefined && value !== null && typeof value === "object" && backEdges.has(value);
340
+ return backEdges !== undefined && isRef(value) && backEdges.has(value);
272
341
  }
342
+
343
+ // seal-cjs-exports
344
+ (function () {
345
+ var keys = Object.getOwnPropertyNames(exports);
346
+ for (var i = 0; i < keys.length; i++) {
347
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
348
+ if (!desc || !desc.get || !desc.configurable) continue;
349
+ var value;
350
+ try {
351
+ value = desc.get();
352
+ } catch (e) {
353
+ continue;
354
+ }
355
+ // a circular require may not have settled this one yet, so leave it live
356
+ if (value === undefined) continue;
357
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
358
+ }
359
+ Object.freeze(exports);
360
+ })();
@@ -1,3 +1,4 @@
1
+ import * as util from "./util.js";
1
2
  export class $ZodCyclicError extends Error {
2
3
  constructor() {
3
4
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -7,32 +8,62 @@ export class $ZodCyclicError extends Error {
7
8
  /** Keyed off the context object every schema in one parse call already shares. */
8
9
  const STATE = "~memo";
9
10
  const NO_ISSUES = [];
11
+ // a value a cycle can close through
12
+ function isRef(value) {
13
+ return value !== null && typeof value === "object";
14
+ }
10
15
  // Receivers prefix paths in place, so the cache and every hand-out need their own copies.
11
16
  function cloneIssues(issues) {
12
17
  return issues.map((iss) => (iss.path ? { ...iss, path: iss.path.slice() } : { ...iss }));
13
18
  }
14
19
  const recursive = /*@__PURE__*/ new WeakMap();
20
+ /** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */
21
+ const NONE = 0;
22
+ const ASSUMED = 1;
23
+ const PROVEN = 2;
15
24
  /** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
16
- function isRecursive(inst, stack) {
25
+ function isRecursive(inst, stack, resolve) {
17
26
  const cached = recursive.get(inst);
18
27
  if (cached !== undefined)
19
- return cached;
28
+ return cached ? PROVEN : NONE;
20
29
  // Relative to the walk in progress, so not cached.
21
30
  if (stack.has(inst))
22
- return true;
31
+ return PROVEN;
23
32
  stack.add(inst);
24
- let result = false;
33
+ let result = NONE;
25
34
  const check = (child) => {
26
- if (!result && child?._zod && isRecursive(child, stack))
27
- result = true;
35
+ if (result !== PROVEN && child?._zod) {
36
+ const answer = isRecursive(child, stack, resolve);
37
+ if (answer > result)
38
+ result = answer;
39
+ }
40
+ };
41
+ // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen
42
+ const shape = (sh, spread) => {
43
+ let answer = NONE;
44
+ for (const key of Reflect.ownKeys(sh)) {
45
+ const desc = Object.getOwnPropertyDescriptor(sh, key);
46
+ // an object resolves its shape by spread, so a key it does not enumerate is never parsed; `z.properties` reads every own key and so keeps them all
47
+ if (spread && !desc.enumerable)
48
+ continue;
49
+ // resolving runs user code, and a factory mints a fresh subtree per read, so an edge the walk can't follow counts as a cycle
50
+ const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;
51
+ if (child > answer)
52
+ answer = child;
53
+ }
54
+ return answer;
55
+ };
56
+ const merge = (answer) => {
57
+ if (answer > result)
58
+ result = answer;
28
59
  };
29
60
  const def = inst._zod.def;
30
61
  const kind = def.type;
31
62
  switch (kind) {
32
63
  case "object": {
33
- // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen
34
- for (const key of Reflect.ownKeys(def.shape))
35
- check(def.shape[key]);
64
+ const raw = util.rawShape(def);
65
+ // a def with no raw shape answers `shape` from an accessor of its own, and running that can mint a whole fresh subtree
66
+ merge(raw ? shape(raw, true) : ASSUMED);
36
67
  check(def.catchall);
37
68
  break;
38
69
  }
@@ -79,10 +110,13 @@ function isRecursive(inst, stack) {
79
110
  check(def.input);
80
111
  check(def.output);
81
112
  break;
82
- // reading `_zod.innerType` resolves the getter once and caches it
83
- case "lazy":
84
- check(inst._zod.innerType);
113
+ // `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
114
+ case "lazy": {
115
+ const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : undefined);
116
+ // walked with resolution off: one hop sees past the deferral, and a lazy that yields only another unresolved lazy is generative, so it stops there
117
+ merge(inner ? isRecursive(inner, stack, false) : ASSUMED);
85
118
  break;
119
+ }
86
120
  // a leaf by choice: `parts` are regex fragments, not data positions
87
121
  case "template_literal":
88
122
  // leaves
@@ -126,8 +160,13 @@ function isRecursive(inst, stack) {
126
160
  }
127
161
  }
128
162
  stack.delete(inst);
129
- recursive.set(inst, result);
130
- return result;
163
+ return settle(inst, result);
164
+ }
165
+ /** An assumed answer must not outlive the resolution that settles it, so only a certain one is cached. */
166
+ function settle(inst, answer) {
167
+ if (answer !== ASSUMED)
168
+ recursive.set(inst, answer === PROVEN);
169
+ return answer;
131
170
  }
132
171
  /**
133
172
  * Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.
@@ -136,12 +175,13 @@ function isRecursive(inst, stack) {
136
175
  * generated fast path has no context to key on.
137
176
  */
138
177
  export function isRecursiveSchema(inst) {
139
- return isRecursive(inst, new Set());
178
+ // z.compile never parses, so nothing would ever resolve a lazy for it; it runs once and already treats a throw here as recursive
179
+ return isRecursive(inst, new Set(), true) !== NONE;
140
180
  }
141
181
  function bucketFor(state, inst) {
142
182
  let bucket = state.buckets.get(inst);
143
183
  if (!bucket) {
144
- bucket = new Map();
184
+ bucket = new WeakMap();
145
185
  state.buckets.set(inst, bucket);
146
186
  }
147
187
  return bucket;
@@ -180,7 +220,8 @@ const memo = {
180
220
  attach(inst) {
181
221
  var _a;
182
222
  let isRecursiveInst;
183
- // `bucket` memoized for one parse; a recursive schema is re-entered many times and its bucket never changes
223
+ let rechecked = false;
224
+ // a recursive schema is re-entered many times per parse and its bucket never changes
184
225
  let lastCtx;
185
226
  let lastBucket;
186
227
  // Wraps `parse` in a deferred so it sees the container's final parse. Core's own deferred copies `parse` into `run` when there are no checks, and it ran first, so `run` is patched to match; with checks, `run` reads `parse` dynamically.
@@ -189,21 +230,26 @@ const memo = {
189
230
  const base = inst._zod.parse;
190
231
  const wrapped = (payload, ctx) => {
191
232
  if (isRecursiveInst === undefined) {
192
- isRecursiveInst = isRecursive(inst, new Set());
193
- if (!isRecursiveInst) {
233
+ const walked = isRecursive(inst, new Set(), false);
234
+ if (walked === NONE) {
194
235
  // Nothing here can ever fire, so take it back out.
195
236
  inst._zod.parse = base;
196
237
  if (inst._zod.run === wrapped)
197
238
  inst._zod.run = base;
198
239
  return base(payload, ctx);
199
240
  }
241
+ // this parse resolves the deferred edges on its own path, so ask once more before latching
242
+ if (walked === PROVEN || rechecked)
243
+ isRecursiveInst = true;
244
+ else
245
+ rechecked = true;
200
246
  }
201
247
  const input = payload.value;
202
- if (input === null || typeof input !== "object")
248
+ if (!isRef(input))
203
249
  return base(payload, ctx);
204
250
  let state = ctx[STATE];
205
251
  if (!state) {
206
- state = { buckets: new Map(), backEdges: undefined };
252
+ state = { buckets: new WeakMap(), backEdges: undefined };
207
253
  ctx[STATE] = state;
208
254
  }
209
255
  let bucket;
@@ -225,7 +271,7 @@ const memo = {
225
271
  else {
226
272
  // Still being parsed: its own checks cover it, so skip them here.
227
273
  payload.memo = true;
228
- state.backEdges ?? (state.backEdges = new Set());
274
+ state.backEdges ?? (state.backEdges = new WeakSet());
229
275
  state.backEdges.add(hit.value);
230
276
  }
231
277
  return payload;
@@ -261,5 +307,5 @@ export function memoizer() {
261
307
  /** Whether this value is a node a back-edge resolved to before it finished. */
262
308
  export function isBackEdge(ctx, value) {
263
309
  const backEdges = ctx[STATE]?.backEdges;
264
- return backEdges !== undefined && value !== null && typeof value === "object" && backEdges.has(value);
310
+ return backEdges !== undefined && isRef(value) && backEdges.has(value);
265
311
  }
@@ -72,26 +72,38 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
72
72
  if (result instanceof Promise) {
73
73
  throw new core.$ZodAsyncError();
74
74
  }
75
- return result.issues.length
76
- ? {
77
- success: false,
78
- error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
79
- }
80
- : { success: true, data: result.value };
75
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
81
76
  };
82
77
  exports._safeParse = _safeParse;
83
78
  exports.safeParse = (0, exports._safeParse)(errors.$ZodRealError);
79
+ // the error is built on the first read of `error`: finalizing the issues and constructing the instance is most of a failing parse, and a caller that only branches on `success` never pays it. a getter in the literal keeps this small; the alternative, one shared accessor descriptor plus a hidden state slot, reads ~15% faster but costs ~75 B gzipped in every bundle
80
+ function failure(Err, issues, ctx) {
81
+ let error;
82
+ return {
83
+ success: false,
84
+ get error() {
85
+ if (!error) {
86
+ error = new Err(issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));
87
+ // finalizeIssue drops `input`, so the built error holds nothing; keeping the raw issues past this point pins the parsed value for the life of the result
88
+ issues = undefined;
89
+ ctx = undefined;
90
+ }
91
+ return error;
92
+ },
93
+ set error(e) {
94
+ error = e;
95
+ // a replacement makes the getter's branch unreachable, so the captures have to go here too
96
+ issues = undefined;
97
+ ctx = undefined;
98
+ },
99
+ };
100
+ }
84
101
  const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
85
102
  const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
86
103
  let result = schema._zod.run({ value, issues: [] }, ctx);
87
104
  if (result instanceof Promise)
88
105
  result = await result;
89
- return result.issues.length
90
- ? {
91
- success: false,
92
- error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
93
- }
94
- : { success: true, data: result.value };
106
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
95
107
  };
96
108
  exports._safeParseAsync = _safeParseAsync;
97
109
  exports.safeParseAsync = (0, exports._safeParseAsync)(errors.$ZodRealError);
@@ -101,12 +113,19 @@ const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
101
113
  // Deliberately tiny, because v8 will not inline a body carrying the fallback's object literals and throw. Everything that is not the compiled happy path lives in validateFallback, and that split is worth ~35% on a compiled schema.
102
114
  exports.validate = ((schema, value, _ctx) => {
103
115
  const validator = schema._zod.bag.validator;
104
- if (validator !== undefined && validator(value) !== COMPILE_INVALID)
105
- return true;
116
+ if (validator !== undefined) {
117
+ if (validator(value) !== COMPILE_INVALID)
118
+ return true;
119
+ // a definite sentinel means the runtime would reject, so skip the re-parse; a ctx can still change the answer
120
+ if (validator.definite === true && _ctx === undefined)
121
+ return false;
122
+ }
106
123
  return validateFallback(schema, value, _ctx);
107
124
  });
108
125
  function validateFallback(schema, value, _ctx) {
109
- const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
126
+ const ctx = _ctx
127
+ ? { ..._ctx, async: false, abortEarly: true }
128
+ : { async: false, abortEarly: true };
110
129
  const fallbackRun = schema._zod.bag.fallbackRun;
111
130
  let result;
112
131
  if (fallbackRun) {
@@ -124,7 +143,9 @@ function validateFallback(schema, value, _ctx) {
124
143
  }
125
144
  // no fast path: the compiler keeps async parses on the runtime, because a promise-returning callback that is not declared async compiles to a throw
126
145
  const validateAsync = async (schema, value, _ctx) => {
127
- const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
146
+ const ctx = _ctx
147
+ ? { ..._ctx, async: true, abortEarly: true }
148
+ : { async: true, abortEarly: true };
128
149
  let result = schema._zod.run({ value, issues: [] }, ctx);
129
150
  if (result instanceof Promise)
130
151
  result = await result;
@@ -191,3 +212,22 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
191
212
  };
192
213
  exports._safeDecodeAsync = _safeDecodeAsync;
193
214
  exports.safeDecodeAsync = (0, exports._safeDecodeAsync)(errors.$ZodRealError);
215
+
216
+ // seal-cjs-exports
217
+ (function () {
218
+ var keys = Object.getOwnPropertyNames(exports);
219
+ for (var i = 0; i < keys.length; i++) {
220
+ var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
221
+ if (!desc || !desc.get || !desc.configurable) continue;
222
+ var value;
223
+ try {
224
+ value = desc.get();
225
+ } catch (e) {
226
+ continue;
227
+ }
228
+ // a circular require may not have settled this one yet, so leave it live
229
+ if (value === undefined) continue;
230
+ Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
231
+ }
232
+ Object.freeze(exports);
233
+ })();
@@ -44,25 +44,37 @@ export const _safeParse = (_Err) => (schema, value, _ctx) => {
44
44
  if (result instanceof Promise) {
45
45
  throw new core.$ZodAsyncError();
46
46
  }
47
- return result.issues.length
48
- ? {
49
- success: false,
50
- error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
51
- }
52
- : { success: true, data: result.value };
47
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
53
48
  };
54
49
  export const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);
50
+ // the error is built on the first read of `error`: finalizing the issues and constructing the instance is most of a failing parse, and a caller that only branches on `success` never pays it. a getter in the literal keeps this small; the alternative, one shared accessor descriptor plus a hidden state slot, reads ~15% faster but costs ~75 B gzipped in every bundle
51
+ function failure(Err, issues, ctx) {
52
+ let error;
53
+ return {
54
+ success: false,
55
+ get error() {
56
+ if (!error) {
57
+ error = new Err(issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));
58
+ // finalizeIssue drops `input`, so the built error holds nothing; keeping the raw issues past this point pins the parsed value for the life of the result
59
+ issues = undefined;
60
+ ctx = undefined;
61
+ }
62
+ return error;
63
+ },
64
+ set error(e) {
65
+ error = e;
66
+ // a replacement makes the getter's branch unreachable, so the captures have to go here too
67
+ issues = undefined;
68
+ ctx = undefined;
69
+ },
70
+ };
71
+ }
55
72
  export const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
56
73
  const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
57
74
  let result = schema._zod.run({ value, issues: [] }, ctx);
58
75
  if (result instanceof Promise)
59
76
  result = await result;
60
- return result.issues.length
61
- ? {
62
- success: false,
63
- error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
64
- }
65
- : { success: true, data: result.value };
77
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
66
78
  };
67
79
  export const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);
68
80
  // registry mirrors of the compiler's sentinels, so this module never imports the compiler
@@ -71,12 +83,19 @@ const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
71
83
  // Deliberately tiny, because v8 will not inline a body carrying the fallback's object literals and throw. Everything that is not the compiled happy path lives in validateFallback, and that split is worth ~35% on a compiled schema.
72
84
  export const validate = ((schema, value, _ctx) => {
73
85
  const validator = schema._zod.bag.validator;
74
- if (validator !== undefined && validator(value) !== COMPILE_INVALID)
75
- return true;
86
+ if (validator !== undefined) {
87
+ if (validator(value) !== COMPILE_INVALID)
88
+ return true;
89
+ // a definite sentinel means the runtime would reject, so skip the re-parse; a ctx can still change the answer
90
+ if (validator.definite === true && _ctx === undefined)
91
+ return false;
92
+ }
76
93
  return validateFallback(schema, value, _ctx);
77
94
  });
78
95
  function validateFallback(schema, value, _ctx) {
79
- const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
96
+ const ctx = _ctx
97
+ ? { ..._ctx, async: false, abortEarly: true }
98
+ : { async: false, abortEarly: true };
80
99
  const fallbackRun = schema._zod.bag.fallbackRun;
81
100
  let result;
82
101
  if (fallbackRun) {
@@ -94,7 +113,9 @@ function validateFallback(schema, value, _ctx) {
94
113
  }
95
114
  // no fast path: the compiler keeps async parses on the runtime, because a promise-returning callback that is not declared async compiles to a throw
96
115
  export const validateAsync = async (schema, value, _ctx) => {
97
- const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
116
+ const ctx = _ctx
117
+ ? { ..._ctx, async: true, abortEarly: true }
118
+ : { async: true, abortEarly: true };
98
119
  let result = schema._zod.run({ value, issues: [] }, ctx);
99
120
  if (result instanceof Promise)
100
121
  result = await result;