@psnext/slingcli 3.1.20260904-1 → 3.3.20260911-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.
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-PBNSMEG7.js → chunk-VDBOM5UG.js} +9 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +25 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +33 -43
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +16 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +221 -12
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +76 -30
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +37 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +106 -22
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +21 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +155 -32
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +65 -9
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +115 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-utils.js +217 -27
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +43 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
- package/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
- package/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
- package/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/errors.d.ts +5 -0
- package/node_modules/@smithy/core/errors.js +5 -0
- package/node_modules/@smithy/core/package.json +11 -2
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +56 -13
- package/node_modules/@types/node/assert.d.ts +190 -189
- package/node_modules/@types/node/async_hooks.d.ts +43 -151
- package/node_modules/@types/node/buffer.buffer.d.ts +13 -12
- package/node_modules/@types/node/buffer.d.ts +237 -102
- package/node_modules/@types/node/child_process.d.ts +154 -39
- package/node_modules/@types/node/cluster.d.ts +384 -238
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/node_modules/@types/node/console.d.ts +404 -45
- package/node_modules/@types/node/constants.d.ts +10 -3
- package/node_modules/@types/node/crypto.d.ts +1600 -1007
- package/node_modules/@types/node/dgram.d.ts +81 -133
- package/node_modules/@types/node/diagnostics_channel.d.ts +59 -277
- package/node_modules/@types/node/dns/promises.d.ts +15 -9
- package/node_modules/@types/node/dns.d.ts +183 -136
- package/node_modules/@types/node/domain.d.ts +32 -12
- package/node_modules/@types/node/events.d.ts +696 -728
- package/node_modules/@types/node/fs/promises.d.ts +85 -256
- package/node_modules/@types/node/fs.d.ts +525 -865
- package/node_modules/@types/node/globals.d.ts +34 -12
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
- package/node_modules/@types/node/http.d.ts +311 -432
- package/node_modules/@types/node/http2.d.ts +891 -545
- package/node_modules/@types/node/https.d.ts +243 -64
- package/node_modules/@types/node/index.d.ts +7 -25
- package/node_modules/@types/node/inspector.d.ts +58 -70
- package/node_modules/@types/node/inspector.generated.d.ts +411 -765
- package/node_modules/@types/node/module.d.ts +219 -54
- package/node_modules/@types/node/net.d.ts +222 -208
- package/node_modules/@types/node/os.d.ts +49 -41
- package/node_modules/@types/node/package.json +3 -13
- package/node_modules/@types/node/path.d.ts +141 -119
- package/node_modules/@types/node/perf_hooks.d.ts +673 -310
- package/node_modules/@types/node/process.d.ts +205 -389
- package/node_modules/@types/node/punycode.d.ts +31 -3
- package/node_modules/@types/node/querystring.d.ts +16 -3
- package/node_modules/@types/node/readline/promises.d.ts +6 -3
- package/node_modules/@types/node/readline.d.ts +152 -66
- package/node_modules/@types/node/repl.d.ts +109 -101
- package/node_modules/@types/node/sea.d.ts +116 -1
- package/node_modules/@types/node/sqlite.d.ts +68 -486
- package/node_modules/@types/node/stream/consumers.d.ts +15 -91
- package/node_modules/@types/node/stream/promises.d.ts +15 -136
- package/node_modules/@types/node/stream/web.d.ts +456 -179
- package/node_modules/@types/node/stream.d.ts +491 -603
- package/node_modules/@types/node/string_decoder.d.ts +43 -3
- package/node_modules/@types/node/test.d.ts +292 -513
- package/node_modules/@types/node/timers/promises.d.ts +18 -3
- package/node_modules/@types/node/timers.d.ts +141 -3
- package/node_modules/@types/node/tls.d.ts +242 -140
- package/node_modules/@types/node/trace_events.d.ts +97 -3
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +8 -7
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
- package/node_modules/@types/node/tty.d.ts +43 -61
- package/node_modules/@types/node/url.d.ts +584 -156
- package/node_modules/@types/node/util.d.ts +1110 -181
- package/node_modules/@types/node/v8.d.ts +36 -175
- package/node_modules/@types/node/vm.d.ts +209 -292
- package/node_modules/@types/node/wasi.d.ts +74 -24
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
- package/node_modules/@types/node/web-globals/domexception.d.ts +0 -15
- package/node_modules/@types/node/web-globals/events.d.ts +0 -9
- package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
- package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
- package/node_modules/@types/node/web-globals/streams.d.ts +0 -93
- package/node_modules/@types/node/worker_threads.d.ts +407 -257
- package/node_modules/@types/node/zlib.d.ts +165 -7
- package/node_modules/hono/dist/cjs/client/client.js +4 -4
- package/node_modules/hono/dist/cjs/hono-base.js +7 -6
- package/node_modules/hono/dist/cjs/jsx/base.js +18 -1
- package/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +2 -2
- package/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/hono/dist/client/client.js +4 -4
- package/node_modules/hono/dist/hono-base.js +7 -6
- package/node_modules/hono/dist/jsx/base.js +15 -1
- package/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/hono/dist/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/hono/dist/types/context.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/base.d.ts +3 -0
- package/node_modules/hono/package.json +2 -2
- package/node_modules/jose/dist/types/index.d.ts +1 -2
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -11
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +13 -16
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -11
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -19
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +10 -16
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +18 -21
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -1
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +4 -6
- package/node_modules/jose/dist/types/jwks/local.d.ts +5 -4
- package/node_modules/jose/dist/types/jwks/remote.d.ts +20 -21
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +4 -4
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +8 -11
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -5
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +8 -11
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +10 -14
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +11 -17
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +14 -11
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +24 -22
- package/node_modules/jose/dist/types/jwt/sign.d.ts +3 -7
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -6
- package/node_modules/jose/dist/types/jwt/verify.d.ts +13 -6
- package/node_modules/jose/dist/types/key/export.d.ts +6 -6
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +9 -14
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +10 -10
- package/node_modules/jose/dist/types/key/import.d.ts +19 -18
- package/node_modules/jose/dist/types/types.d.ts +152 -247
- package/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +6 -1
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -3
- package/node_modules/jose/dist/types/util/errors.d.ts +29 -40
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +1 -2
- package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +9 -26
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +3 -3
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +11 -30
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +6 -6
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -57
- package/node_modules/jose/dist/webapi/jwk/embedded.js +3 -4
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +3 -6
- package/node_modules/jose/dist/webapi/jwks/local.js +16 -10
- package/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +2 -4
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +8 -15
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +4 -14
- package/node_modules/jose/dist/webapi/jws/general/sign.js +4 -11
- package/node_modules/jose/dist/webapi/jws/general/verify.js +5 -7
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +2 -3
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +11 -25
- package/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -2
- package/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
- package/node_modules/jose/dist/webapi/key/export.js +12 -16
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +4 -13
- package/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
- package/node_modules/jose/dist/webapi/key/import.js +5 -9
- package/node_modules/jose/dist/webapi/lib/asn1.js +2 -4
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +35 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +21 -29
- package/node_modules/jose/dist/webapi/lib/deflate.js +9 -19
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -4
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +21 -54
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +26 -59
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +29 -43
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +37 -45
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
- package/node_modules/jose/dist/webapi/lib/key.js +119 -59
- package/node_modules/jose/dist/webapi/lib/key_management.js +45 -80
- package/node_modules/jose/dist/webapi/lib/{options.js → validate.js} +64 -3
- package/node_modules/jose/dist/webapi/util/base64url.js +5 -19
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +1 -1
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +1 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
- package/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/undici/lib/handler/retry-handler.js +42 -7
- package/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/undici/lib/interceptor/decompress.js +146 -14
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +12 -13
- package/node_modules/undici-types/client.d.ts +34 -55
- package/node_modules/undici-types/connector.d.ts +2 -4
- package/node_modules/undici-types/cookies.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
- package/node_modules/undici-types/dispatcher.d.ts +137 -134
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici-types/errors.d.ts +54 -82
- package/node_modules/undici-types/eventsource.d.ts +4 -9
- package/node_modules/undici-types/fetch.d.ts +24 -46
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/handlers.d.ts +9 -8
- package/node_modules/undici-types/header.d.ts +1 -162
- package/node_modules/undici-types/index.d.ts +47 -69
- package/node_modules/undici-types/interceptors.d.ts +9 -72
- package/node_modules/undici-types/mock-agent.d.ts +18 -36
- package/node_modules/undici-types/mock-client.d.ts +4 -6
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
- package/node_modules/undici-types/mock-pool.d.ts +4 -6
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +4 -0
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -14
- package/node_modules/undici-types/proxy-agent.d.ts +6 -7
- package/node_modules/undici-types/readable.d.ts +16 -19
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +10 -19
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/webidl.d.ts +30 -148
- package/node_modules/undici-types/websocket.d.ts +10 -48
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/checks.ts +0 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +255 -164
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +59 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +274 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +18 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +225 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +25 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +147 -3
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +30 -6
- package/node_modules/zod/src/v4/core/checks.ts +1 -101
- package/node_modules/zod/src/v4/core/compile.ts +202 -88
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +226 -68
- package/node_modules/zod/src/v4/core/memoizer.ts +78 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +10 -4
- package/node_modules/zod/src/v4/core/schemas.ts +359 -122
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +222 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -8
- package/node_modules/zod/src/v4/core/util.ts +222 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +11 -0
- package/node_modules/zod/src/v4/locales/ar.ts +1 -0
- package/node_modules/zod/src/v4/locales/az.ts +1 -0
- package/node_modules/zod/src/v4/locales/be.ts +1 -0
- package/node_modules/zod/src/v4/locales/bg.ts +1 -0
- package/node_modules/zod/src/v4/locales/bn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ca.ts +1 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +1 -0
- package/node_modules/zod/src/v4/locales/cs.ts +1 -0
- package/node_modules/zod/src/v4/locales/da.ts +1 -0
- package/node_modules/zod/src/v4/locales/de.ts +1 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +1 -0
- package/node_modules/zod/src/v4/locales/eo.ts +1 -0
- package/node_modules/zod/src/v4/locales/es.ts +1 -0
- package/node_modules/zod/src/v4/locales/fa.ts +1 -0
- package/node_modules/zod/src/v4/locales/fi.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr.ts +1 -0
- package/node_modules/zod/src/v4/locales/gu.ts +1 -0
- package/node_modules/zod/src/v4/locales/he.ts +1 -0
- package/node_modules/zod/src/v4/locales/hi.ts +1 -0
- package/node_modules/zod/src/v4/locales/hr.ts +1 -0
- package/node_modules/zod/src/v4/locales/hu.ts +1 -0
- package/node_modules/zod/src/v4/locales/hy.ts +1 -0
- package/node_modules/zod/src/v4/locales/id.ts +1 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +1 -0
- package/node_modules/zod/src/v4/locales/it.ts +1 -0
- package/node_modules/zod/src/v4/locales/ja.ts +1 -0
- package/node_modules/zod/src/v4/locales/ka.ts +1 -0
- package/node_modules/zod/src/v4/locales/km.ts +1 -0
- package/node_modules/zod/src/v4/locales/kn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ko.ts +1 -0
- package/node_modules/zod/src/v4/locales/lt.ts +1 -0
- package/node_modules/zod/src/v4/locales/mk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ms.ts +1 -0
- package/node_modules/zod/src/v4/locales/ne.ts +1 -0
- package/node_modules/zod/src/v4/locales/nl.ts +1 -0
- package/node_modules/zod/src/v4/locales/nn.ts +1 -0
- package/node_modules/zod/src/v4/locales/no.ts +1 -0
- package/node_modules/zod/src/v4/locales/ota.ts +1 -0
- package/node_modules/zod/src/v4/locales/pl.ts +1 -0
- package/node_modules/zod/src/v4/locales/ps.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt.ts +1 -0
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +1 -0
- package/node_modules/zod/src/v4/locales/sk.ts +1 -0
- package/node_modules/zod/src/v4/locales/sl.ts +1 -0
- package/node_modules/zod/src/v4/locales/sv.ts +1 -0
- package/node_modules/zod/src/v4/locales/ta.ts +1 -0
- package/node_modules/zod/src/v4/locales/tg.ts +134 -0
- package/node_modules/zod/src/v4/locales/th.ts +1 -0
- package/node_modules/zod/src/v4/locales/tk.ts +1 -0
- package/node_modules/zod/src/v4/locales/tr.ts +1 -0
- package/node_modules/zod/src/v4/locales/uk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ur.ts +1 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +1 -0
- package/node_modules/zod/src/v4/locales/yo.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +1 -0
- package/node_modules/zod/src/v4/mini/checks.ts +0 -1
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +39 -3
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +30 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +16 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +20 -2
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -31
- package/node_modules/zod/v4/classic/schemas.d.cts +17 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +17 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -29
- package/node_modules/zod/v4/core/api.cjs +37 -2
- package/node_modules/zod/v4/core/api.d.cts +6 -4
- package/node_modules/zod/v4/core/api.d.ts +6 -4
- package/node_modules/zod/v4/core/api.js +17 -2
- package/node_modules/zod/v4/core/checks.cjs +19 -96
- package/node_modules/zod/v4/core/checks.d.cts +1 -1
- package/node_modules/zod/v4/core/checks.d.ts +1 -1
- package/node_modules/zod/v4/core/checks.js +0 -96
- package/node_modules/zod/v4/core/compile.cjs +172 -72
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +153 -73
- package/node_modules/zod/v4/core/core.cjs +19 -0
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +215 -63
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +17 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +17 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +195 -64
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +114 -23
- package/node_modules/zod/v4/core/memoizer.js +72 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +29 -6
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +8 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +331 -103
- package/node_modules/zod/v4/core/schemas.d.cts +43 -8
- package/node_modules/zod/v4/core/schemas.d.ts +43 -8
- package/node_modules/zod/v4/core/schemas.js +310 -102
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +29 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +7 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +7 -3
- package/node_modules/zod/v4/core/to-json-schema.js +8 -7
- package/node_modules/zod/v4/core/util.cjs +181 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +160 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +31 -0
- package/node_modules/zod/v4/core/visit.js +12 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +1 -0
- package/node_modules/zod/v4/locales/ar.js +1 -0
- package/node_modules/zod/v4/locales/az.cjs +1 -0
- package/node_modules/zod/v4/locales/az.js +1 -0
- package/node_modules/zod/v4/locales/be.cjs +1 -0
- package/node_modules/zod/v4/locales/be.js +1 -0
- package/node_modules/zod/v4/locales/bg.cjs +1 -0
- package/node_modules/zod/v4/locales/bg.js +1 -0
- package/node_modules/zod/v4/locales/bn.cjs +1 -0
- package/node_modules/zod/v4/locales/bn.js +1 -0
- package/node_modules/zod/v4/locales/ca.cjs +1 -0
- package/node_modules/zod/v4/locales/ca.js +1 -0
- package/node_modules/zod/v4/locales/ckb.cjs +1 -0
- package/node_modules/zod/v4/locales/ckb.js +1 -0
- package/node_modules/zod/v4/locales/cs.cjs +1 -0
- package/node_modules/zod/v4/locales/cs.js +1 -0
- package/node_modules/zod/v4/locales/da.cjs +1 -0
- package/node_modules/zod/v4/locales/da.js +1 -0
- package/node_modules/zod/v4/locales/de.cjs +1 -0
- package/node_modules/zod/v4/locales/de.js +1 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +1 -0
- package/node_modules/zod/v4/locales/en.js +1 -0
- package/node_modules/zod/v4/locales/eo.cjs +1 -0
- package/node_modules/zod/v4/locales/eo.js +1 -0
- package/node_modules/zod/v4/locales/es.cjs +1 -0
- package/node_modules/zod/v4/locales/es.js +1 -0
- package/node_modules/zod/v4/locales/fa.cjs +1 -0
- package/node_modules/zod/v4/locales/fa.js +1 -0
- package/node_modules/zod/v4/locales/fi.cjs +1 -0
- package/node_modules/zod/v4/locales/fi.js +1 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +1 -0
- package/node_modules/zod/v4/locales/fr-CA.js +1 -0
- package/node_modules/zod/v4/locales/fr.cjs +1 -0
- package/node_modules/zod/v4/locales/fr.js +1 -0
- package/node_modules/zod/v4/locales/gu.cjs +1 -0
- package/node_modules/zod/v4/locales/gu.js +1 -0
- package/node_modules/zod/v4/locales/he.cjs +1 -0
- package/node_modules/zod/v4/locales/he.js +1 -0
- package/node_modules/zod/v4/locales/hi.cjs +1 -0
- package/node_modules/zod/v4/locales/hi.js +1 -0
- package/node_modules/zod/v4/locales/hr.cjs +1 -0
- package/node_modules/zod/v4/locales/hr.js +1 -0
- package/node_modules/zod/v4/locales/hu.cjs +1 -0
- package/node_modules/zod/v4/locales/hu.js +1 -0
- package/node_modules/zod/v4/locales/hy.cjs +1 -0
- package/node_modules/zod/v4/locales/hy.js +1 -0
- package/node_modules/zod/v4/locales/id.cjs +1 -0
- package/node_modules/zod/v4/locales/id.js +1 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +1 -0
- package/node_modules/zod/v4/locales/is.js +1 -0
- package/node_modules/zod/v4/locales/it.cjs +1 -0
- package/node_modules/zod/v4/locales/it.js +1 -0
- package/node_modules/zod/v4/locales/ja.cjs +1 -0
- package/node_modules/zod/v4/locales/ja.js +1 -0
- package/node_modules/zod/v4/locales/ka.cjs +1 -0
- package/node_modules/zod/v4/locales/ka.js +1 -0
- package/node_modules/zod/v4/locales/km.cjs +1 -0
- package/node_modules/zod/v4/locales/km.js +1 -0
- package/node_modules/zod/v4/locales/kn.cjs +1 -0
- package/node_modules/zod/v4/locales/kn.js +1 -0
- package/node_modules/zod/v4/locales/ko.cjs +1 -0
- package/node_modules/zod/v4/locales/ko.js +1 -0
- package/node_modules/zod/v4/locales/lt.cjs +1 -0
- package/node_modules/zod/v4/locales/lt.js +1 -0
- package/node_modules/zod/v4/locales/mk.cjs +1 -0
- package/node_modules/zod/v4/locales/mk.js +1 -0
- package/node_modules/zod/v4/locales/ms.cjs +1 -0
- package/node_modules/zod/v4/locales/ms.js +1 -0
- package/node_modules/zod/v4/locales/ne.cjs +1 -0
- package/node_modules/zod/v4/locales/ne.js +1 -0
- package/node_modules/zod/v4/locales/nl.cjs +1 -0
- package/node_modules/zod/v4/locales/nl.js +1 -0
- package/node_modules/zod/v4/locales/nn.cjs +1 -0
- package/node_modules/zod/v4/locales/nn.js +1 -0
- package/node_modules/zod/v4/locales/no.cjs +1 -0
- package/node_modules/zod/v4/locales/no.js +1 -0
- package/node_modules/zod/v4/locales/ota.cjs +1 -0
- package/node_modules/zod/v4/locales/ota.js +1 -0
- package/node_modules/zod/v4/locales/pl.cjs +1 -0
- package/node_modules/zod/v4/locales/pl.js +1 -0
- package/node_modules/zod/v4/locales/ps.cjs +1 -0
- package/node_modules/zod/v4/locales/ps.js +1 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +1 -0
- package/node_modules/zod/v4/locales/pt-BR.js +1 -0
- package/node_modules/zod/v4/locales/pt.cjs +1 -0
- package/node_modules/zod/v4/locales/pt.js +1 -0
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +1 -0
- package/node_modules/zod/v4/locales/ru.js +1 -0
- package/node_modules/zod/v4/locales/sk.cjs +1 -0
- package/node_modules/zod/v4/locales/sk.js +1 -0
- package/node_modules/zod/v4/locales/sl.cjs +1 -0
- package/node_modules/zod/v4/locales/sl.js +1 -0
- package/node_modules/zod/v4/locales/sv.cjs +1 -0
- package/node_modules/zod/v4/locales/sv.js +1 -0
- package/node_modules/zod/v4/locales/ta.cjs +1 -0
- package/node_modules/zod/v4/locales/ta.js +1 -0
- package/node_modules/zod/v4/locales/tg.cjs +143 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +116 -0
- package/node_modules/zod/v4/locales/th.cjs +1 -0
- package/node_modules/zod/v4/locales/th.js +1 -0
- package/node_modules/zod/v4/locales/tk.cjs +1 -0
- package/node_modules/zod/v4/locales/tk.js +1 -0
- package/node_modules/zod/v4/locales/tr.cjs +1 -0
- package/node_modules/zod/v4/locales/tr.js +1 -0
- package/node_modules/zod/v4/locales/uk.cjs +1 -0
- package/node_modules/zod/v4/locales/uk.js +1 -0
- package/node_modules/zod/v4/locales/ur.cjs +1 -0
- package/node_modules/zod/v4/locales/ur.js +1 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +1 -0
- package/node_modules/zod/v4/locales/vi.js +1 -0
- package/node_modules/zod/v4/locales/yo.cjs +1 -0
- package/node_modules/zod/v4/locales/yo.js +1 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-CN.js +1 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-TW.js +1 -0
- package/node_modules/zod/v4/mini/checks.cjs +20 -2
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +42 -4
- package/node_modules/zod/v4/mini/schemas.d.cts +9 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +9 -1
- package/node_modules/zod/v4/mini/schemas.js +19 -2
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +2 -2
- package/slingshot/index.js +151 -149
- package/node_modules/@types/node/ffi.d.ts +0 -486
- package/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/node/quic.d.ts +0 -2151
- package/node_modules/@types/node/stream/iter.d.ts +0 -452
- package/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/node/ts5.7/index.d.ts +0 -118
- package/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/node/vfs.d.ts +0 -210
- package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/jose/dist/webapi/lib/base64.js +0 -20
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -27
- package/node_modules/jose/dist/webapi/lib/helpers.js +0 -45
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -12
- package/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -19
- package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -19
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -10
- package/node_modules/jose/dist/webapi/lib/key_options.js +0 -8
- package/node_modules/jose/dist/webapi/lib/signing.js +0 -22
- package/node_modules/jose/dist/webapi/lib/type_checks.js +0 -30
- package/node_modules/undici-types/cache-interceptor.d.ts +0 -179
- package/node_modules/undici-types/client-stats.d.ts +0 -15
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +0 -7
- package/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -39
- package/node_modules/undici-types/snapshot-agent.d.ts +0 -113
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +0 -25
- package/node_modules/undici-types/utility.d.ts +0 -7
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.$
|
|
27
|
-
exports.$ZodCustom = exports.$ZodLazy = exports.$ZodPromise = exports.$ZodFunction = exports.$ZodTemplateLiteral = exports.$ZodReadonly = exports.$ZodPreprocess = exports.$ZodCodec = exports.$ZodPipe = exports.$ZodNaN = exports.$ZodCatch = exports.$ZodSuccess = exports.$ZodNonOptional = exports.$ZodPrefault = exports.$ZodDefault = exports.$ZodNullable = exports.$ZodExactOptional = exports.$ZodOptional = exports.$ZodTransform = exports.$ZodFile = exports.$ZodLiteral = exports.$ZodEnum = exports.$ZodSet = exports.$ZodMap = exports.$ZodRecord = exports.$ZodTuple = exports.$ZodIntersection = exports.$ZodDiscriminatedUnion = void 0;
|
|
26
|
+
exports.$ZodObject = exports.$ZodArray = exports.$ZodDate = exports.$ZodVoid = exports.$ZodNever = exports.$ZodUnknown = exports.$ZodAny = exports.$ZodNull = exports.$ZodUndefined = exports.$ZodSymbol = exports.$ZodBigIntFormat = exports.$ZodBigInt = exports.$ZodBoolean = exports.$ZodNumberFormat = exports.$ZodNumber = exports.$ZodCustomStringFormat = exports.$ZodJWT = exports.$ZodIBAN = exports.$ZodCreditCard = exports.$ZodE164 = exports.$ZodBase64URL = exports.base64urlCharset = exports.$ZodBase64 = exports.base64Charset = exports.$ZodCIDRv6 = exports.$ZodCIDRv4 = exports.$ZodMAC = exports.$ZodIPv6 = exports.$ZodIPv4 = exports.$ZodISODuration = exports.$ZodISOTime = exports.$ZodISODate = exports.$ZodISODateTime = exports.$ZodKSUID = exports.$ZodXID = exports.$ZodULID = exports.$ZodCUID2 = exports.$ZodCUID = exports.$ZodNanoID = exports.$ZodEmoji = exports.$ZodURL = exports.URL_UNPARSEABLE = exports.URL_BAD_FORMAT = exports.$ZodEmail = exports.$ZodUUID = exports.$ZodGUID = exports.$ZodStringFormat = exports.$ZodString = exports.clone = exports.$ZodType = void 0;
|
|
27
|
+
exports.$ZodProperties = exports.$ZodCustom = exports.$ZodLazy = exports.$ZodPromise = exports.$ZodFunction = exports.$ZodTemplateLiteral = exports.$ZodReadonly = exports.$ZodPreprocess = exports.$ZodCodec = exports.$ZodPipe = exports.$ZodNaN = exports.$ZodCatch = exports.$ZodSuccess = exports.$ZodNonOptional = exports.$ZodPrefault = exports.$ZodDefault = exports.$ZodNullable = exports.$ZodExactOptional = exports.$ZodOptional = exports.$ZodTransform = exports.$ZodFile = exports.$ZodLiteral = exports.$ZodEnum = exports.$ZodSet = exports.$ZodMap = exports.$ZodRecord = exports.$ZodTuple = exports.$ZodIntersection = exports.$ZodDiscriminatedUnion = exports.$ZodXor = exports.$ZodUnion = exports.$ZodObjectJIT = void 0;
|
|
28
28
|
exports.standardProps = standardProps;
|
|
29
29
|
exports.parseURLObject = parseURLObject;
|
|
30
30
|
exports.stripTabAndNewline = stripTabAndNewline;
|
|
@@ -35,6 +35,7 @@ exports.isValidCIDRv6 = isValidCIDRv6;
|
|
|
35
35
|
exports.isValidBase64 = isValidBase64;
|
|
36
36
|
exports.isValidBase64URL = isValidBase64URL;
|
|
37
37
|
exports.isValidCreditCard = isValidCreditCard;
|
|
38
|
+
exports.isValidIBAN = isValidIBAN;
|
|
38
39
|
exports.isValidJWT = isValidJWT;
|
|
39
40
|
exports.getDiscriminatedOption = getDiscriminatedOption;
|
|
40
41
|
exports.mergeValues = mergeValues;
|
|
@@ -168,16 +169,24 @@ exports.$ZodType = core.$constructor("$ZodType", (inst, def) => {
|
|
|
168
169
|
},
|
|
169
170
|
});
|
|
170
171
|
/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
|
|
171
|
-
|
|
172
|
+
// a Standard Schema result only reports issues, so a failure finalizes them straight off the raw payload: no ZodError, and no lazy result to read through
|
|
173
|
+
const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())) } : { value: r.value };
|
|
174
|
+
async function validateAsync(inst, value) {
|
|
175
|
+
const ctx = { async: true };
|
|
176
|
+
return toStandardResult((await inst._zod.run({ value, issues: [] }, ctx)), ctx);
|
|
177
|
+
}
|
|
172
178
|
function standardProps(inst) {
|
|
173
179
|
return {
|
|
174
180
|
validate: (value) => {
|
|
181
|
+
const ctx = { async: false };
|
|
175
182
|
try {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return (0, parse_js_1.safeParseAsync)(inst, value).then(toStandardResult);
|
|
183
|
+
const r = inst._zod.run({ value, issues: [] }, ctx);
|
|
184
|
+
if (!(r instanceof Promise))
|
|
185
|
+
return toStandardResult(r, ctx);
|
|
180
186
|
}
|
|
187
|
+
catch (_) { }
|
|
188
|
+
// async function so a synchronously throwing check rejects instead of escaping validate
|
|
189
|
+
return validateAsync(inst, value);
|
|
181
190
|
},
|
|
182
191
|
vendor: "zod",
|
|
183
192
|
version: 1,
|
|
@@ -187,7 +196,8 @@ var util_js_1 = require("./util.cjs");
|
|
|
187
196
|
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return util_js_1.clone; } });
|
|
188
197
|
exports.$ZodString = core.$constructor("$ZodString", (inst, def) => {
|
|
189
198
|
exports.$ZodType.init(inst, def);
|
|
190
|
-
|
|
199
|
+
// a format's own pattern, else unbounded; a template literal derives the check-aware form itself
|
|
200
|
+
inst._zod.pattern = def.pattern ?? regexes.anyString;
|
|
191
201
|
inst._zod.parse = (payload, _) => {
|
|
192
202
|
if (def.coerce)
|
|
193
203
|
try {
|
|
@@ -373,13 +383,6 @@ exports.$ZodKSUID = core.$constructor("$ZodKSUID", (inst, def) => {
|
|
|
373
383
|
exports.$ZodISODateTime = core.$constructor("$ZodISODateTime", (inst, def) => {
|
|
374
384
|
def.pattern ?? (def.pattern = regexes.datetime(def));
|
|
375
385
|
exports.$ZodStringFormat.init(inst, def);
|
|
376
|
-
// these two drop the offset or seconds `date-time` requires — on the bag not the def, since `z.string().check(...)` lands the format on a different schema
|
|
377
|
-
if (def.local || def.precision === -1) {
|
|
378
|
-
inst._zod.bag.laxFormat = true;
|
|
379
|
-
inst._zod.onattach.push((s) => {
|
|
380
|
-
s._zod.bag.laxFormat = true;
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
386
|
});
|
|
384
387
|
exports.$ZodISODate = core.$constructor("$ZodISODate", (inst, def) => {
|
|
385
388
|
def.pattern ?? (def.pattern = regexes.date);
|
|
@@ -396,7 +399,6 @@ exports.$ZodISODuration = core.$constructor("$ZodISODuration", (inst, def) => {
|
|
|
396
399
|
exports.$ZodIPv4 = core.$constructor("$ZodIPv4", (inst, def) => {
|
|
397
400
|
def.pattern ?? (def.pattern = regexes.ipv4);
|
|
398
401
|
exports.$ZodStringFormat.init(inst, def);
|
|
399
|
-
inst._zod.bag.format = `ipv4`;
|
|
400
402
|
});
|
|
401
403
|
/** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL("http://[...]")` parses an authority, not an address, so `@` and `\` re-delimit it and `"::@1\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `"::1\n"` validated as `::1`. */
|
|
402
404
|
const ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
|
|
@@ -415,7 +417,6 @@ function isValidIPv6(value) {
|
|
|
415
417
|
exports.$ZodIPv6 = core.$constructor("$ZodIPv6", (inst, def) => {
|
|
416
418
|
def.pattern ?? (def.pattern = regexes.ipv6);
|
|
417
419
|
exports.$ZodStringFormat.init(inst, def);
|
|
418
|
-
inst._zod.bag.format = `ipv6`;
|
|
419
420
|
inst._zod.check = (payload) => {
|
|
420
421
|
if (!isValidIPv6(payload.value)) {
|
|
421
422
|
payload.issues.push({
|
|
@@ -431,7 +432,6 @@ exports.$ZodIPv6 = core.$constructor("$ZodIPv6", (inst, def) => {
|
|
|
431
432
|
exports.$ZodMAC = core.$constructor("$ZodMAC", (inst, def) => {
|
|
432
433
|
def.pattern ?? (def.pattern = regexes.mac(def.delimiter));
|
|
433
434
|
exports.$ZodStringFormat.init(inst, def);
|
|
434
|
-
inst._zod.bag.format = `mac`;
|
|
435
435
|
});
|
|
436
436
|
exports.$ZodCIDRv4 = core.$constructor("$ZodCIDRv4", (inst, def) => {
|
|
437
437
|
def.pattern ?? (def.pattern = regexes.cidrv4);
|
|
@@ -484,10 +484,11 @@ function isValidBase64(data) {
|
|
|
484
484
|
return false;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
+
// lax on purpose: the quantified regexes.base64 overflows the regex stack on multi-MB input and its leading ^$| alternation leaks through template-literal composition; isValidBase64 enforces length and padding
|
|
488
|
+
exports.base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
|
|
487
489
|
exports.$ZodBase64 = core.$constructor("$ZodBase64", (inst, def) => {
|
|
488
|
-
def.pattern ?? (def.pattern =
|
|
490
|
+
def.pattern ?? (def.pattern = exports.base64Charset);
|
|
489
491
|
exports.$ZodStringFormat.init(inst, def);
|
|
490
|
-
inst._zod.bag.contentEncoding = "base64";
|
|
491
492
|
inst._zod.check = (payload) => {
|
|
492
493
|
if (isValidBase64(payload.value))
|
|
493
494
|
return;
|
|
@@ -500,18 +501,19 @@ exports.$ZodBase64 = core.$constructor("$ZodBase64", (inst, def) => {
|
|
|
500
501
|
});
|
|
501
502
|
};
|
|
502
503
|
});
|
|
503
|
-
//////////////////////////////
|
|
504
|
+
////////////////////////////// ZodBase64URL //////////////////////////////
|
|
505
|
+
// lax on purpose: the quantified regexes.base64url overflows the regex stack on multi-MB input; isValidBase64 enforces length on the padded string
|
|
506
|
+
exports.base64urlCharset = /^[A-Za-z0-9_-]*$/;
|
|
504
507
|
function isValidBase64URL(data) {
|
|
505
|
-
if (!
|
|
508
|
+
if (!exports.base64urlCharset.test(data))
|
|
506
509
|
return false;
|
|
507
510
|
const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
|
|
508
511
|
const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
|
|
509
512
|
return isValidBase64(padded);
|
|
510
513
|
}
|
|
511
514
|
exports.$ZodBase64URL = core.$constructor("$ZodBase64URL", (inst, def) => {
|
|
512
|
-
def.pattern ?? (def.pattern =
|
|
515
|
+
def.pattern ?? (def.pattern = exports.base64urlCharset);
|
|
513
516
|
exports.$ZodStringFormat.init(inst, def);
|
|
514
|
-
inst._zod.bag.contentEncoding = "base64url";
|
|
515
517
|
inst._zod.check = (payload) => {
|
|
516
518
|
if (isValidBase64URL(payload.value))
|
|
517
519
|
return;
|
|
@@ -536,7 +538,7 @@ function isLuhnAlgo(digits) {
|
|
|
536
538
|
let bit = 1;
|
|
537
539
|
let sum = 0;
|
|
538
540
|
while (length) {
|
|
539
|
-
const value =
|
|
541
|
+
const value = digits.charCodeAt(--length) - 48;
|
|
540
542
|
bit ^= 1;
|
|
541
543
|
sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;
|
|
542
544
|
}
|
|
@@ -563,6 +565,42 @@ exports.$ZodCreditCard = core.$constructor("$ZodCreditCard", (inst, def) => {
|
|
|
563
565
|
});
|
|
564
566
|
};
|
|
565
567
|
});
|
|
568
|
+
////////////////////////////// ZodIBAN //////////////////////////////
|
|
569
|
+
// iso 7064 mod 97-10 checksum without BigInt
|
|
570
|
+
function isIso7064Mod97(iban) {
|
|
571
|
+
let remainder = 0;
|
|
572
|
+
const len = iban.length;
|
|
573
|
+
for (let i = 4; i < len; i++) {
|
|
574
|
+
const code = iban.charCodeAt(i);
|
|
575
|
+
remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
|
|
576
|
+
}
|
|
577
|
+
for (let i = 0; i < 4; i++) {
|
|
578
|
+
const code = iban.charCodeAt(i);
|
|
579
|
+
remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
|
|
580
|
+
}
|
|
581
|
+
return remainder === 1;
|
|
582
|
+
}
|
|
583
|
+
function isValidIBAN(input) {
|
|
584
|
+
if (!regexes.iban.test(input))
|
|
585
|
+
return false;
|
|
586
|
+
return isIso7064Mod97(input);
|
|
587
|
+
}
|
|
588
|
+
exports.$ZodIBAN = core.$constructor("$ZodIBAN", (inst, def) => {
|
|
589
|
+
// shape only — checksum is not expressible as a pattern
|
|
590
|
+
def.pattern ?? (def.pattern = regexes.iban);
|
|
591
|
+
exports.$ZodStringFormat.init(inst, def);
|
|
592
|
+
inst._zod.check = (payload) => {
|
|
593
|
+
if (isValidIBAN(payload.value))
|
|
594
|
+
return;
|
|
595
|
+
payload.issues.push({
|
|
596
|
+
code: "invalid_format",
|
|
597
|
+
format: "iban",
|
|
598
|
+
input: payload.value,
|
|
599
|
+
inst,
|
|
600
|
+
continue: !def.abort,
|
|
601
|
+
});
|
|
602
|
+
};
|
|
603
|
+
});
|
|
566
604
|
////////////////////////////// ZodJWT //////////////////////////////
|
|
567
605
|
function isValidJWT(token, algorithm = null) {
|
|
568
606
|
try {
|
|
@@ -616,7 +654,7 @@ exports.$ZodCustomStringFormat = core.$constructor("$ZodCustomStringFormat", (in
|
|
|
616
654
|
});
|
|
617
655
|
exports.$ZodNumber = core.$constructor("$ZodNumber", (inst, def) => {
|
|
618
656
|
exports.$ZodType.init(inst, def);
|
|
619
|
-
inst._zod.pattern =
|
|
657
|
+
inst._zod.pattern = regexes.number;
|
|
620
658
|
inst._zod.parse = (payload, _ctx) => {
|
|
621
659
|
if (def.coerce)
|
|
622
660
|
try {
|
|
@@ -824,6 +862,7 @@ exports.$ZodArray = core.$constructor("$ZodArray", (inst, def) => {
|
|
|
824
862
|
}
|
|
825
863
|
payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
|
|
826
864
|
const proms = [];
|
|
865
|
+
const abortEarly = ctx?.abortEarly;
|
|
827
866
|
for (let i = 0; i < input.length; i++) {
|
|
828
867
|
const item = input[i];
|
|
829
868
|
const result = def.element._zod.run({
|
|
@@ -835,6 +874,9 @@ exports.$ZodArray = core.$constructor("$ZodArray", (inst, def) => {
|
|
|
835
874
|
}
|
|
836
875
|
else {
|
|
837
876
|
handleArrayResult(result, payload, i);
|
|
877
|
+
// the element's payload is authoritative here, since handleArrayResult forwards every issue; an object's is not, because it drops a failed absent optional
|
|
878
|
+
if (abortEarly && result.issues.length !== 0 && util.aborted(result))
|
|
879
|
+
break;
|
|
838
880
|
}
|
|
839
881
|
}
|
|
840
882
|
if (proms.length) {
|
|
@@ -869,7 +911,7 @@ function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
|
869
911
|
return;
|
|
870
912
|
}
|
|
871
913
|
if (result.value === undefined) {
|
|
872
|
-
if (isPresent) {
|
|
914
|
+
if (isPresent || (optin === "defaulted" && !isOptionalOut)) {
|
|
873
915
|
final.value[key] = undefined;
|
|
874
916
|
}
|
|
875
917
|
}
|
|
@@ -901,14 +943,21 @@ function normalizeDef(def) {
|
|
|
901
943
|
optionalKeys: new Set(okeys),
|
|
902
944
|
};
|
|
903
945
|
}
|
|
904
|
-
function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
946
|
+
function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
|
|
905
947
|
const unrecognized = [];
|
|
906
948
|
const keySet = def.keySet;
|
|
907
949
|
const _catchall = def.catchall._zod;
|
|
908
950
|
const t = _catchall.def.type;
|
|
909
951
|
const optin = _catchall.optin;
|
|
910
952
|
const optout = _catchall.optout;
|
|
953
|
+
// starts at 0, not the current length: the shape phase already ran and may have aborted
|
|
954
|
+
let seen = 0;
|
|
911
955
|
for (const key in input) {
|
|
956
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
957
|
+
if (util.aborted(payload, seen))
|
|
958
|
+
break;
|
|
959
|
+
seen = payload.issues.length;
|
|
960
|
+
}
|
|
912
961
|
// Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.
|
|
913
962
|
if (keySet.has(key))
|
|
914
963
|
continue;
|
|
@@ -946,26 +995,22 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
946
995
|
return payload;
|
|
947
996
|
});
|
|
948
997
|
}
|
|
949
|
-
// Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it. Keyed by def, so a def rebuilt by a builder is simply absent rather than inheriting the source's. Read its keys with `Object.keys`, which does not invoke them — that is what lets a discriminated union check its discriminator without resolving an option whose getters reference the union being constructed.
|
|
950
|
-
const propShapes = new WeakMap();
|
|
951
998
|
exports.$ZodObject = core.$constructor("$ZodObject", (inst, def) => {
|
|
952
999
|
// requires cast because technically $ZodObject doesn't extend
|
|
953
1000
|
exports.$ZodType.init(inst, def);
|
|
954
|
-
// const sh = def.shape;
|
|
955
1001
|
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
});
|
|
1002
|
+
// a cloned def carries its source's accessor, which knows the shape it answers from; adopting that keeps the clone's keys readable without running it
|
|
1003
|
+
const sh = desc?.get ? desc.get.raw : (def.shape ?? {});
|
|
1004
|
+
if (sh) {
|
|
1005
|
+
// Freezes the shape on first read, so its getters resolve once and every later read sees the same schemas.
|
|
1006
|
+
const get = () => {
|
|
1007
|
+
const newSh = { ...sh };
|
|
1008
|
+
Object.defineProperty(def, "shape", { value: newSh });
|
|
1009
|
+
get.raw = newSh;
|
|
1010
|
+
return newSh;
|
|
1011
|
+
};
|
|
1012
|
+
get.raw = sh;
|
|
1013
|
+
Object.defineProperty(def, "shape", { get });
|
|
969
1014
|
}
|
|
970
1015
|
const _normalized = util.cached(() => normalizeDef(def));
|
|
971
1016
|
util.defineLazyInternal(inst, "propValues", (zod) => {
|
|
@@ -1006,7 +1051,14 @@ exports.$ZodObject = core.$constructor("$ZodObject", (inst, def) => {
|
|
|
1006
1051
|
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
1007
1052
|
const proms = [];
|
|
1008
1053
|
const shape = value.shape;
|
|
1054
|
+
const abortEarly = ctx?.abortEarly;
|
|
1055
|
+
let seen = payload.issues.length;
|
|
1009
1056
|
for (const key of value.allKeys) {
|
|
1057
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1058
|
+
if (util.aborted(payload, seen))
|
|
1059
|
+
break;
|
|
1060
|
+
seen = payload.issues.length;
|
|
1061
|
+
}
|
|
1010
1062
|
if (key === "__proto__")
|
|
1011
1063
|
continue;
|
|
1012
1064
|
const el = shape[key];
|
|
@@ -1023,7 +1075,7 @@ exports.$ZodObject = core.$constructor("$ZodObject", (inst, def) => {
|
|
|
1023
1075
|
if (!catchall) {
|
|
1024
1076
|
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
1025
1077
|
}
|
|
1026
|
-
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
1078
|
+
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
|
|
1027
1079
|
};
|
|
1028
1080
|
});
|
|
1029
1081
|
exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
@@ -1038,12 +1090,18 @@ exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
1038
1090
|
// a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope
|
|
1039
1091
|
const doc = new doc_js_1.Doc(["payload", "ctx"], { shape, inst, memo, syms });
|
|
1040
1092
|
const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
1041
|
-
//
|
|
1093
|
+
// prefixes in place, like util.prefixIssues. newResult must land before the early return: a catchall runs after this and would otherwise write onto the caller's input
|
|
1042
1094
|
const prefixStr = (id, k) => `
|
|
1095
|
+
let ${id}_ab = false;
|
|
1043
1096
|
for (let i = 0; i < ${id}.issues.length; i++) {
|
|
1044
1097
|
const iss = ${id}.issues[i];
|
|
1045
1098
|
iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
|
|
1046
1099
|
payload.issues.push(iss);
|
|
1100
|
+
if (iss.continue !== true) ${id}_ab = true;
|
|
1101
|
+
}
|
|
1102
|
+
if (${id}_ab && ctx && ctx.abortEarly) {
|
|
1103
|
+
payload.value = newResult;
|
|
1104
|
+
return payload;
|
|
1047
1105
|
}`;
|
|
1048
1106
|
doc.write(`const input = payload.value;`);
|
|
1049
1107
|
const ids = Object.create(null);
|
|
@@ -1092,6 +1150,10 @@ exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
1092
1150
|
input: undefined,
|
|
1093
1151
|
path: [${k}]
|
|
1094
1152
|
});
|
|
1153
|
+
if (ctx && ctx.abortEarly) {
|
|
1154
|
+
payload.value = newResult;
|
|
1155
|
+
return payload;
|
|
1156
|
+
}
|
|
1095
1157
|
}
|
|
1096
1158
|
|
|
1097
1159
|
if (${id}_present) {
|
|
@@ -1104,16 +1166,17 @@ exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
1104
1166
|
doc.write(`
|
|
1105
1167
|
if (${id}.issues.length) {${prefixStr(id, k)}
|
|
1106
1168
|
}
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1169
|
+
`);
|
|
1170
|
+
if (optin === "defaulted") {
|
|
1171
|
+
doc.write(`newResult[${k}] = ${id}.value;`);
|
|
1172
|
+
}
|
|
1173
|
+
else {
|
|
1174
|
+
doc.write(`
|
|
1175
|
+
if (${id}.value !== undefined || ${isPresent}) {
|
|
1113
1176
|
newResult[${k}] = ${id}.value;
|
|
1114
1177
|
}
|
|
1115
|
-
|
|
1116
1178
|
`);
|
|
1179
|
+
}
|
|
1117
1180
|
}
|
|
1118
1181
|
}
|
|
1119
1182
|
doc.write(`payload.value = newResult;`);
|
|
@@ -1147,7 +1210,7 @@ exports.$ZodObjectJIT = core.$constructor("$ZodObjectJIT", (inst, def) => {
|
|
|
1147
1210
|
payload = fastpass(payload, ctx);
|
|
1148
1211
|
if (!catchall)
|
|
1149
1212
|
return payload;
|
|
1150
|
-
return handleCatchall([], input, payload, ctx, value, inst);
|
|
1213
|
+
return handleCatchall([], input, payload, ctx, value, inst, ctx?.abortEarly === true);
|
|
1151
1214
|
}
|
|
1152
1215
|
return superParse(payload, ctx);
|
|
1153
1216
|
};
|
|
@@ -1284,22 +1347,38 @@ exports.$ZodXor = core.$constructor("$ZodXor", (inst, def) => {
|
|
|
1284
1347
|
});
|
|
1285
1348
|
};
|
|
1286
1349
|
});
|
|
1287
|
-
/** Returns the option
|
|
1350
|
+
/** Returns the option whose discriminator claims `value`, or throws if ambiguous. */
|
|
1288
1351
|
function getDiscriminatedOption(union, value) {
|
|
1289
1352
|
const internals = union._zod;
|
|
1290
1353
|
let map = internals.bag.optionsMap;
|
|
1291
1354
|
if (!map) {
|
|
1292
|
-
map =
|
|
1293
|
-
const { options, discriminator } = internals.def;
|
|
1294
|
-
for (const option of options) {
|
|
1295
|
-
// First declaration wins, matching the order the parse path resolves a duplicate in.
|
|
1296
|
-
for (const v of option._zod.propValues?.[discriminator] ?? [])
|
|
1297
|
-
if (!map.has(v))
|
|
1298
|
-
map.set(v, option);
|
|
1299
|
-
}
|
|
1355
|
+
map = discriminatorMap(internals.def);
|
|
1300
1356
|
internals.bag.optionsMap = map;
|
|
1301
1357
|
}
|
|
1302
|
-
|
|
1358
|
+
const option = map.get(value);
|
|
1359
|
+
if (option === null)
|
|
1360
|
+
throw new Error(`Ambiguous discriminator value "${String(value)}"`);
|
|
1361
|
+
return option;
|
|
1362
|
+
}
|
|
1363
|
+
function discriminatorMap(def) {
|
|
1364
|
+
const map = new Map();
|
|
1365
|
+
for (const option of def.options) {
|
|
1366
|
+
const values = option._zod.propValues?.[def.discriminator];
|
|
1367
|
+
if (!values || values.size === 0)
|
|
1368
|
+
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
1369
|
+
for (const value of values) {
|
|
1370
|
+
if (map.has(value)) {
|
|
1371
|
+
if (value !== undefined)
|
|
1372
|
+
throw new Error(`Duplicate discriminator value "${String(value)}"`);
|
|
1373
|
+
// keep the collision marked so a later member cannot reclaim it
|
|
1374
|
+
map.set(value, null);
|
|
1375
|
+
}
|
|
1376
|
+
else {
|
|
1377
|
+
map.set(value, option);
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
return map;
|
|
1303
1382
|
}
|
|
1304
1383
|
exports.$ZodDiscriminatedUnion =
|
|
1305
1384
|
/*@__PURE__*/
|
|
@@ -1309,10 +1388,13 @@ core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
|
1309
1388
|
const _super = inst._zod.parse;
|
|
1310
1389
|
util.defineLazyInternal(inst, "propValues", (zod) => {
|
|
1311
1390
|
const propValues = {};
|
|
1391
|
+
let undefinedCount = 0;
|
|
1312
1392
|
for (const option of zod.def.options) {
|
|
1313
1393
|
const pv = option._zod.propValues;
|
|
1314
1394
|
if (!pv || Object.keys(pv).length === 0)
|
|
1315
1395
|
throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
|
|
1396
|
+
if (pv[zod.def.discriminator]?.has(undefined))
|
|
1397
|
+
undefinedCount++;
|
|
1316
1398
|
for (const [k, v] of Object.entries(pv)) {
|
|
1317
1399
|
if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
|
|
1318
1400
|
util.assignProp(propValues, k, new Set());
|
|
@@ -1322,31 +1404,18 @@ core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
|
1322
1404
|
}
|
|
1323
1405
|
}
|
|
1324
1406
|
}
|
|
1407
|
+
if (!zod.def.unionFallback && undefinedCount > 1)
|
|
1408
|
+
propValues[zod.def.discriminator]?.delete(undefined);
|
|
1325
1409
|
return propValues;
|
|
1326
1410
|
});
|
|
1327
|
-
// Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes
|
|
1411
|
+
// Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes and lazies — are left to the map.
|
|
1328
1412
|
def.options.forEach((option, i) => {
|
|
1329
|
-
const propShape =
|
|
1413
|
+
const propShape = util.rawShape(option._zod.def);
|
|
1330
1414
|
if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
|
|
1331
1415
|
throw new Error(`Invalid discriminated union option at index "${i}"`);
|
|
1332
1416
|
}
|
|
1333
1417
|
});
|
|
1334
|
-
const disc = util.cached(() =>
|
|
1335
|
-
const opts = def.options;
|
|
1336
|
-
const map = new Map();
|
|
1337
|
-
for (const o of opts) {
|
|
1338
|
-
const values = o._zod.propValues?.[def.discriminator];
|
|
1339
|
-
if (!values || values.size === 0)
|
|
1340
|
-
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
1341
|
-
for (const v of values) {
|
|
1342
|
-
if (map.has(v)) {
|
|
1343
|
-
throw new Error(`Duplicate discriminator value "${String(v)}"`);
|
|
1344
|
-
}
|
|
1345
|
-
map.set(v, o);
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
return map;
|
|
1349
|
-
});
|
|
1418
|
+
const disc = util.cached(() => discriminatorMap(def));
|
|
1350
1419
|
inst._zod.parse = (payload, ctx) => {
|
|
1351
1420
|
const input = payload.value;
|
|
1352
1421
|
if (!util.isObject(input)) {
|
|
@@ -1358,8 +1427,10 @@ core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
|
1358
1427
|
});
|
|
1359
1428
|
return payload;
|
|
1360
1429
|
}
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1430
|
+
const value = input?.[def.discriminator];
|
|
1431
|
+
const opt = disc.value.get(value);
|
|
1432
|
+
// forward metadata cannot choose an encoder for an absent tag
|
|
1433
|
+
if (opt && (value !== undefined || ctx.direction !== "backward")) {
|
|
1363
1434
|
return opt._zod.run(payload, ctx);
|
|
1364
1435
|
}
|
|
1365
1436
|
// Fall back to union matching when the fast discriminator path fails:
|
|
@@ -1374,7 +1445,7 @@ core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
|
1374
1445
|
errors: [],
|
|
1375
1446
|
note: "No matching discriminator",
|
|
1376
1447
|
discriminator: def.discriminator,
|
|
1377
|
-
options: Array.from(disc.value.keys()),
|
|
1448
|
+
options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
|
|
1378
1449
|
input,
|
|
1379
1450
|
path: [def.discriminator],
|
|
1380
1451
|
inst,
|
|
@@ -1547,6 +1618,9 @@ exports.$ZodTuple = core.$constructor("$ZodTuple", (inst, def) => {
|
|
|
1547
1618
|
}
|
|
1548
1619
|
// Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.
|
|
1549
1620
|
const itemResults = new Array(items.length);
|
|
1621
|
+
// only tracked when there is a rest loop to skip
|
|
1622
|
+
const abortEarly = def.rest ? ctx?.abortEarly : undefined;
|
|
1623
|
+
let itemAborted = false;
|
|
1550
1624
|
for (let i = 0; i < items.length; i++) {
|
|
1551
1625
|
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
1552
1626
|
if (r instanceof Promise) {
|
|
@@ -1556,12 +1630,21 @@ exports.$ZodTuple = core.$constructor("$ZodTuple", (inst, def) => {
|
|
|
1556
1630
|
}
|
|
1557
1631
|
else {
|
|
1558
1632
|
itemResults[i] = r;
|
|
1633
|
+
if (abortEarly && !itemAborted && r.issues.length)
|
|
1634
|
+
itemAborted = util.aborted(r);
|
|
1559
1635
|
}
|
|
1560
1636
|
}
|
|
1561
|
-
|
|
1637
|
+
// sound because rest is non-empty exactly when every fixed index is present, the one case handleTupleResults cannot discard an item's issues
|
|
1638
|
+
if (def.rest && !itemAborted) {
|
|
1562
1639
|
let i = items.length - 1;
|
|
1563
1640
|
const rest = input.slice(items.length);
|
|
1641
|
+
let seen = payload.issues.length;
|
|
1564
1642
|
for (const el of rest) {
|
|
1643
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1644
|
+
if (util.aborted(payload, seen))
|
|
1645
|
+
break;
|
|
1646
|
+
seen = payload.issues.length;
|
|
1647
|
+
}
|
|
1565
1648
|
i++;
|
|
1566
1649
|
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
1567
1650
|
if (result instanceof Promise) {
|
|
@@ -1643,6 +1726,7 @@ exports.$ZodRecord = core.$constructor("$ZodRecord", (inst, def) => {
|
|
|
1643
1726
|
});
|
|
1644
1727
|
return payload;
|
|
1645
1728
|
}
|
|
1729
|
+
// no guard in either loop below: a record's invalid_key aborts but an enclosing intersection can reconcile it, so a stopped loop hides keys the sibling does not own and the intersection then rejects nothing
|
|
1646
1730
|
const proms = [];
|
|
1647
1731
|
const values = def.keyType._zod.values;
|
|
1648
1732
|
if (values && !def.partial) {
|
|
@@ -1814,7 +1898,14 @@ exports.$ZodMap = core.$constructor("$ZodMap", (inst, def) => {
|
|
|
1814
1898
|
}
|
|
1815
1899
|
const proms = [];
|
|
1816
1900
|
payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();
|
|
1901
|
+
const abortEarly = ctx?.abortEarly;
|
|
1902
|
+
let seen = payload.issues.length;
|
|
1817
1903
|
for (const [key, value] of input) {
|
|
1904
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1905
|
+
if (util.aborted(payload, seen))
|
|
1906
|
+
break;
|
|
1907
|
+
seen = payload.issues.length;
|
|
1908
|
+
}
|
|
1818
1909
|
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
1819
1910
|
const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
|
|
1820
1911
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
|
@@ -1880,7 +1971,14 @@ exports.$ZodSet = core.$constructor("$ZodSet", (inst, def) => {
|
|
|
1880
1971
|
}
|
|
1881
1972
|
const proms = [];
|
|
1882
1973
|
payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();
|
|
1974
|
+
const abortEarly = ctx?.abortEarly;
|
|
1975
|
+
let seen = payload.issues.length;
|
|
1883
1976
|
for (const item of input) {
|
|
1977
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
1978
|
+
if (util.aborted(payload, seen))
|
|
1979
|
+
break;
|
|
1980
|
+
seen = payload.issues.length;
|
|
1981
|
+
}
|
|
1884
1982
|
const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
|
|
1885
1983
|
if (result instanceof Promise) {
|
|
1886
1984
|
proms.push(result.then((result) => handleSetResult(result, payload)));
|
|
@@ -1904,9 +2002,11 @@ exports.$ZodEnum = core.$constructor("$ZodEnum", (inst, def) => {
|
|
|
1904
2002
|
const values = util.getEnumValues(def.entries);
|
|
1905
2003
|
const valuesSet = new Set(values);
|
|
1906
2004
|
inst._zod.values = valuesSet;
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
2005
|
+
util.defineLazyInternal(inst, "pattern", (zod) => {
|
|
2006
|
+
const patternValues = util.getEnumValues(zod.def.entries).filter((k) => util.propertyKeyTypes.has(typeof k));
|
|
2007
|
+
// unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
|
|
2008
|
+
return new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
|
|
2009
|
+
});
|
|
1910
2010
|
inst._zod.parse = (payload, _ctx) => {
|
|
1911
2011
|
const input = payload.value;
|
|
1912
2012
|
if (valuesSet.has(input)) {
|
|
@@ -1925,12 +2025,15 @@ exports.$ZodLiteral = core.$constructor("$ZodLiteral", (inst, def) => {
|
|
|
1925
2025
|
exports.$ZodType.init(inst, def);
|
|
1926
2026
|
const values = new Set(def.values);
|
|
1927
2027
|
inst._zod.values = values;
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
2028
|
+
util.defineLazyInternal(inst, "pattern", (zod) => {
|
|
2029
|
+
const vals = zod.def.values;
|
|
2030
|
+
// unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
|
|
2031
|
+
return new RegExp(vals.length
|
|
2032
|
+
? `^(${vals
|
|
2033
|
+
.map((o) => typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o))
|
|
2034
|
+
.join("|")})$`
|
|
2035
|
+
: "^[^\\s\\S]$");
|
|
2036
|
+
});
|
|
1934
2037
|
inst._zod.parse = (payload, _ctx) => {
|
|
1935
2038
|
const input = payload.value;
|
|
1936
2039
|
if (values.has(input)) {
|
|
@@ -2294,22 +2397,67 @@ function handleReadonlyResult(payload) {
|
|
|
2294
2397
|
payload.value = Object.freeze(payload.value);
|
|
2295
2398
|
return payload;
|
|
2296
2399
|
}
|
|
2400
|
+
// a leaf's pattern source with its own checks folded in: the last pattern-carrying check wins, else length bounds narrow the catch-all, else an integer format narrows the number form. the fold lives here instead of on `_zod.pattern` so a bundle without template literals never pays for it
|
|
2401
|
+
function leafPattern(schema) {
|
|
2402
|
+
const def = schema._zod.def;
|
|
2403
|
+
let pattern = def.pattern;
|
|
2404
|
+
let isInt = !!def.format?.includes("int");
|
|
2405
|
+
let minimum;
|
|
2406
|
+
let maximum;
|
|
2407
|
+
for (const ch of def.checks ?? []) {
|
|
2408
|
+
const d = ch._zod.def;
|
|
2409
|
+
if (d.pattern)
|
|
2410
|
+
pattern = d.pattern;
|
|
2411
|
+
isInt || (isInt = !!d.format?.includes("int"));
|
|
2412
|
+
const lo = d.minimum ?? d.length;
|
|
2413
|
+
const hi = d.maximum ?? d.length;
|
|
2414
|
+
if (lo !== undefined && (minimum === undefined || lo > minimum))
|
|
2415
|
+
minimum = lo;
|
|
2416
|
+
if (hi !== undefined && (maximum === undefined || hi < maximum))
|
|
2417
|
+
maximum = hi;
|
|
2418
|
+
}
|
|
2419
|
+
if (pattern)
|
|
2420
|
+
return pattern.source;
|
|
2421
|
+
// an empty range matches nothing at runtime, and `{8,5}` is not a legal quantifier
|
|
2422
|
+
if (minimum !== undefined && maximum !== undefined && minimum > maximum)
|
|
2423
|
+
return "(?!)";
|
|
2424
|
+
if (minimum !== undefined || maximum !== undefined)
|
|
2425
|
+
return regexes.string({ minimum, maximum }).source;
|
|
2426
|
+
const own = schema._zod.pattern;
|
|
2427
|
+
return (isInt && own === regexes.number ? regexes.integer : own)?.source;
|
|
2428
|
+
}
|
|
2429
|
+
// a part's pattern source. a wrapper's pattern embeds its inner pattern's source verbatim, so the folded form is substituted in place without knowing the wrapper's own composition; a union's options are joined the way the union builds its own pattern
|
|
2430
|
+
function partPattern(schema) {
|
|
2431
|
+
const def = schema._zod.def;
|
|
2432
|
+
const own = schema._zod.pattern?.source;
|
|
2433
|
+
// lazy resolves its inner on the internals, not the def
|
|
2434
|
+
const inner = def.innerType ?? schema._zod.innerType;
|
|
2435
|
+
if (inner) {
|
|
2436
|
+
const before = inner._zod.pattern?.source;
|
|
2437
|
+
const after = partPattern(inner);
|
|
2438
|
+
if (own && before && after && after !== before) {
|
|
2439
|
+
return own.replace(util.cleanRegex(before), () => util.cleanRegex(after));
|
|
2440
|
+
}
|
|
2441
|
+
return own;
|
|
2442
|
+
}
|
|
2443
|
+
if (def.options) {
|
|
2444
|
+
const sources = def.options.map(partPattern);
|
|
2445
|
+
if (sources.every(Boolean))
|
|
2446
|
+
return `^(${sources.map((s) => util.cleanRegex(s)).join("|")})$`;
|
|
2447
|
+
}
|
|
2448
|
+
return leafPattern(schema);
|
|
2449
|
+
}
|
|
2297
2450
|
exports.$ZodTemplateLiteral = core.$constructor("$ZodTemplateLiteral", (inst, def) => {
|
|
2298
2451
|
exports.$ZodType.init(inst, def);
|
|
2299
2452
|
const regexParts = [];
|
|
2300
2453
|
for (const part of def.parts) {
|
|
2301
2454
|
if (typeof part === "object" && part !== null) {
|
|
2302
2455
|
// is Zod schema
|
|
2303
|
-
|
|
2304
|
-
|
|
2456
|
+
const source = partPattern(part);
|
|
2457
|
+
if (!source) {
|
|
2305
2458
|
throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
|
|
2306
2459
|
}
|
|
2307
|
-
|
|
2308
|
-
if (!source)
|
|
2309
|
-
throw new Error(`Invalid template literal part: ${part._zod.traits}`);
|
|
2310
|
-
const start = source.startsWith("^") ? 1 : 0;
|
|
2311
|
-
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
2312
|
-
regexParts.push(source.slice(start, end));
|
|
2460
|
+
regexParts.push(util.cleanRegex(source));
|
|
2313
2461
|
}
|
|
2314
2462
|
else if (part === null || util.primitiveTypes.has(typeof part)) {
|
|
2315
2463
|
regexParts.push(util.escapeRegex(`${part}`));
|
|
@@ -2479,3 +2627,83 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2479
2627
|
payload.issues.push(util.issue(_iss));
|
|
2480
2628
|
}
|
|
2481
2629
|
}
|
|
2630
|
+
// 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
|
|
2631
|
+
function handlePropertiesResult(result, payload, key) {
|
|
2632
|
+
if (result.issues.length) {
|
|
2633
|
+
payload.issues.push(...util.prefixIssues(key, result.issues));
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
exports.$ZodProperties = core.$constructor("$ZodProperties", (inst, def) => {
|
|
2637
|
+
// $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.
|
|
2638
|
+
exports.$ZodType.init(inst, def);
|
|
2639
|
+
checks.$ZodCheck.init(inst, def);
|
|
2640
|
+
const memo = core.globalConfig.memoizer;
|
|
2641
|
+
memo?.attach(inst);
|
|
2642
|
+
// 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
|
|
2643
|
+
let entries;
|
|
2644
|
+
const runShape = (payload, ctx) => {
|
|
2645
|
+
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
2646
|
+
const input = payload.value;
|
|
2647
|
+
let proms;
|
|
2648
|
+
for (const [key, schema] of entries) {
|
|
2649
|
+
const result = schema._zod.run({ value: input[key], issues: [] }, ctx);
|
|
2650
|
+
if (result instanceof Promise) {
|
|
2651
|
+
proms ?? (proms = []);
|
|
2652
|
+
proms.push(result.then((result) => handlePropertiesResult(result, payload, key)));
|
|
2653
|
+
}
|
|
2654
|
+
else {
|
|
2655
|
+
handlePropertiesResult(result, payload, key);
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
if (proms)
|
|
2659
|
+
return Promise.all(proms).then(() => undefined);
|
|
2660
|
+
return undefined;
|
|
2661
|
+
};
|
|
2662
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2663
|
+
const input = payload.value;
|
|
2664
|
+
// 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.
|
|
2665
|
+
if (input === null || (typeof input !== "object" && typeof input !== "function")) {
|
|
2666
|
+
payload.issues.push({ expected: "object", code: "invalid_type", input, inst });
|
|
2667
|
+
return payload;
|
|
2668
|
+
}
|
|
2669
|
+
// 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
|
|
2670
|
+
if (ctx.direction === "backward")
|
|
2671
|
+
ctx = { ...ctx, direction: "forward" };
|
|
2672
|
+
// 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
|
|
2673
|
+
if (memo)
|
|
2674
|
+
memo.alloc(inst, payload, input, ctx);
|
|
2675
|
+
const result = runShape(payload, ctx);
|
|
2676
|
+
return result instanceof Promise ? result.then(() => payload) : payload;
|
|
2677
|
+
};
|
|
2678
|
+
// 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.
|
|
2679
|
+
inst._zod.check = (payload) => {
|
|
2680
|
+
if (payload.value == null) {
|
|
2681
|
+
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
2682
|
+
return undefined;
|
|
2683
|
+
}
|
|
2684
|
+
return runShape(payload, {});
|
|
2685
|
+
};
|
|
2686
|
+
}, {
|
|
2687
|
+
*[Symbol.iterator]() {
|
|
2688
|
+
yield this;
|
|
2689
|
+
},
|
|
2690
|
+
});
|
|
2691
|
+
|
|
2692
|
+
// seal-cjs-exports
|
|
2693
|
+
(function () {
|
|
2694
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
2695
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2696
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
2697
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
2698
|
+
var value;
|
|
2699
|
+
try {
|
|
2700
|
+
value = desc.get();
|
|
2701
|
+
} catch (e) {
|
|
2702
|
+
continue;
|
|
2703
|
+
}
|
|
2704
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
2705
|
+
if (value === undefined) continue;
|
|
2706
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
2707
|
+
}
|
|
2708
|
+
Object.freeze(exports);
|
|
2709
|
+
})();
|