cross-seed 7.0.0-21 → 7.0.0-23
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/dist/action.js +7 -8
- package/dist/action.js.map +1 -1
- package/dist/arr.js +2 -2
- package/dist/arr.js.map +1 -1
- package/dist/bencode.d.ts +62 -0
- package/dist/bencode.js +248 -0
- package/dist/bencode.js.map +1 -0
- package/dist/clients/Deluge.d.ts +5 -10
- package/dist/clients/Deluge.js +115 -89
- package/dist/clients/Deluge.js.map +1 -1
- package/dist/clients/QBittorrent.d.ts +3 -0
- package/dist/clients/QBittorrent.js +43 -30
- package/dist/clients/QBittorrent.js.map +1 -1
- package/dist/clients/RTorrent.d.ts +3 -2
- package/dist/clients/RTorrent.js +120 -41
- package/dist/clients/RTorrent.js.map +1 -1
- package/dist/clients/TorrentClient.d.ts +3 -2
- package/dist/clients/TorrentClient.js +3 -5
- package/dist/clients/TorrentClient.js.map +1 -1
- package/dist/clients/Transmission.d.ts +1 -0
- package/dist/clients/Transmission.js +90 -40
- package/dist/clients/Transmission.js.map +1 -1
- package/dist/clients/qbittorrent-version.d.ts +6 -0
- package/dist/clients/qbittorrent-version.js +11 -0
- package/dist/clients/qbittorrent-version.js.map +1 -0
- package/dist/clients/scgi.d.ts +14 -0
- package/dist/clients/scgi.js +111 -0
- package/dist/clients/scgi.js.map +1 -0
- package/dist/cmd.js +1 -1
- package/dist/cmd.js.map +1 -1
- package/dist/configuration.js +49 -9
- package/dist/configuration.js.map +1 -1
- package/dist/constants.d.ts +10 -0
- package/dist/constants.js +12 -2
- package/dist/constants.js.map +1 -1
- package/dist/dataFiles.d.ts +1 -0
- package/dist/dataFiles.js +252 -60
- package/dist/dataFiles.js.map +1 -1
- package/dist/db.js +8 -4
- package/dist/db.js.map +1 -1
- package/dist/decide.js +8 -8
- package/dist/decide.js.map +1 -1
- package/dist/devLogin.js.map +1 -1
- package/dist/diff.js.map +1 -1
- package/dist/indexers.js +5 -4
- package/dist/indexers.js.map +1 -1
- package/dist/inject.js +5 -5
- package/dist/inject.js.map +1 -1
- package/dist/jobs.js +2 -1
- package/dist/jobs.js.map +1 -1
- package/dist/libraryInventory.d.ts +176 -0
- package/dist/libraryInventory.js +701 -0
- package/dist/libraryInventory.js.map +1 -0
- package/dist/logger.js +7 -5
- package/dist/logger.js.map +1 -1
- package/dist/migrations/09-clientAndDataSearchees.js +1 -0
- package/dist/migrations/09-clientAndDataSearchees.js.map +1 -1
- package/dist/migrations/17-api-key-settings-json.js +3 -1
- package/dist/migrations/17-api-key-settings-json.js.map +1 -1
- package/dist/migrations/18-library-inventory.d.ts +9 -0
- package/dist/migrations/18-library-inventory.js +48 -0
- package/dist/migrations/18-library-inventory.js.map +1 -0
- package/dist/migrations/19-library-files.d.ts +9 -0
- package/dist/migrations/19-library-files.js +26 -0
- package/dist/migrations/19-library-files.js.map +1 -0
- package/dist/migrations/migrations.d.ts +12 -5
- package/dist/migrations/migrations.js +5 -1
- package/dist/migrations/migrations.js.map +1 -1
- package/dist/parseTorrent.d.ts +1 -1
- package/dist/parseTorrent.js +18 -4
- package/dist/parseTorrent.js.map +1 -1
- package/dist/pipeline.js +12 -11
- package/dist/pipeline.js.map +1 -1
- package/dist/problems/linking.js +1 -1
- package/dist/problems/linking.js.map +1 -1
- package/dist/problems.js +2 -1
- package/dist/problems.js.map +1 -1
- package/dist/pushNotifier.js +10 -9
- package/dist/pushNotifier.js.map +1 -1
- package/dist/routes/baseApi.d.ts +8 -0
- package/dist/routes/baseApi.js +26 -52
- package/dist/routes/baseApi.js.map +1 -1
- package/dist/routes/devLogin.js +1 -0
- package/dist/routes/devLogin.js.map +1 -1
- package/dist/routes/indexerApi.js +1 -0
- package/dist/routes/indexerApi.js.map +1 -1
- package/dist/routes/staticFrontendPlugin.js +1 -0
- package/dist/routes/staticFrontendPlugin.js.map +1 -1
- package/dist/searchee.d.ts +14 -2
- package/dist/searchee.js +26 -9
- package/dist/searchee.js.map +1 -1
- package/dist/services/indexerService.js +8 -2
- package/dist/services/indexerService.js.map +1 -1
- package/dist/startup.d.ts +1 -0
- package/dist/startup.js +11 -4
- package/dist/startup.js.map +1 -1
- package/dist/torrent.js +302 -115
- package/dist/torrent.js.map +1 -1
- package/dist/torznab.d.ts +2 -2
- package/dist/torznab.js +15 -14
- package/dist/torznab.js.map +1 -1
- package/dist/trpc/routers/auth.js +1 -1
- package/dist/trpc/routers/auth.js.map +1 -1
- package/dist/trpc/routers/clients.js +8 -13
- package/dist/trpc/routers/clients.js.map +1 -1
- package/dist/trpc/routers/index.d.ts +51 -50
- package/dist/trpc/routers/index.js +2 -2
- package/dist/trpc/routers/index.js.map +1 -1
- package/dist/trpc/routers/jobs.js +1 -1
- package/dist/trpc/routers/jobs.js.map +1 -1
- package/dist/trpc/routers/library.d.ts +50 -0
- package/dist/trpc/routers/library.js +85 -0
- package/dist/trpc/routers/library.js.map +1 -0
- package/dist/trpc/routers/logs.js +6 -5
- package/dist/trpc/routers/logs.js.map +1 -1
- package/dist/trpc/routers/settings.js +78 -21
- package/dist/trpc/routers/settings.js.map +1 -1
- package/dist/trpc/routers/stats.d.ts +1 -0
- package/dist/trpc/routers/stats.js +11 -5
- package/dist/trpc/routers/stats.js.map +1 -1
- package/dist/userAuth.js +1 -1
- package/dist/userAuth.js.map +1 -1
- package/dist/utils/background.d.ts +7 -0
- package/dist/utils/background.js +14 -0
- package/dist/utils/background.js.map +1 -0
- package/dist/utils/logWatcher.js +3 -2
- package/dist/utils/logWatcher.js.map +1 -1
- package/dist/utils.d.ts +11 -1
- package/dist/utils.js +47 -8
- package/dist/utils.js.map +1 -1
- package/dist/webui/assets/DeleteOption-DkdJCiOu.js +1 -0
- package/dist/webui/assets/FieldInfo-rcCXc0d-.js +1 -0
- package/dist/webui/assets/Page-CKwSnUie.js +1 -0
- package/dist/webui/assets/array-field-DM2mAVqa.js +1 -0
- package/dist/webui/assets/badge-CLUazitN.js +1 -0
- package/dist/webui/assets/button-DoKPR9Fv.js +1 -0
- package/dist/webui/assets/check-BlfHpqkp.js +1 -0
- package/dist/webui/assets/clients-B5C80D0F.js +1 -0
- package/dist/webui/assets/connect-BM7yGLAl.js +2 -0
- package/dist/webui/assets/createLucideIcon-Cv-_CLkr.js +1 -0
- package/dist/webui/assets/debug-C8d57uIb.js +1 -0
- package/dist/webui/assets/directories-DkJnb01t.js +1 -0
- package/dist/webui/assets/dist-B7BqKb_s.js +1 -0
- package/dist/webui/assets/dist-CXZZv-cf.js +41 -0
- package/dist/webui/assets/dist-ChMQZgJB.js +1 -0
- package/dist/webui/assets/dist-DQ6Xm99Z.js +1 -0
- package/dist/webui/assets/duration-field-w-qiOS_S.js +1 -0
- package/dist/webui/assets/general-2HmkyF5T.js +1 -0
- package/dist/webui/assets/health-D6tv4ioy.js +1 -0
- package/dist/webui/assets/index-NlorOk2I.js +11 -0
- package/dist/webui/assets/index-UQKt4Igp.css +2 -0
- package/dist/webui/assets/input-BggK3IOz.js +1 -0
- package/dist/webui/assets/jobs-Do8vAIqy.js +1 -0
- package/dist/webui/assets/library-B1r1nAY-.js +1 -0
- package/dist/webui/assets/loader-circle-D988WNxu.js +1 -0
- package/dist/webui/assets/logs-_rm8bxf-.js +1 -0
- package/dist/webui/assets/number-field-CeKyqI7R.js +1 -0
- package/dist/webui/assets/react-dom-DtIef6y6.js +1 -0
- package/dist/webui/assets/required-indicator-Ba9NOQEP.js +1 -0
- package/dist/webui/assets/routes-Djgf7dZI.js +1 -0
- package/dist/webui/assets/search-DGY0ui92.js +1 -0
- package/dist/webui/assets/select-BzZ418Yt.js +1 -0
- package/dist/webui/assets/select-field-DsBowTDT.js +1 -0
- package/dist/webui/assets/settings-B4G8vHXc.js +1 -0
- package/dist/webui/assets/sidebar-Qy-rYdhU.js +5 -0
- package/dist/webui/assets/submit-button-Bx2Dvr03.js +1 -0
- package/dist/webui/assets/switch-CttdmVGp.js +1 -0
- package/dist/webui/assets/switch-field-p-JPVVvW.js +1 -0
- package/dist/webui/assets/table-Bs6CQscS.js +1 -0
- package/dist/webui/assets/{test-tube-CbcievIk.js → test-tube-DD9Yz2bZ.js} +1 -1
- package/dist/webui/assets/text-field-B0a3dEGb.js +1 -0
- package/dist/webui/assets/time-KFQKyrl-.js +1 -0
- package/dist/webui/assets/trackers-DG-YCaaO.js +7 -0
- package/dist/webui/assets/{trash-D083IWKI.js → trash-PHXIGUCt.js} +1 -1
- package/dist/webui/assets/use-settings-form-submit-CDmMUcwW.js +57 -0
- package/dist/webui/assets/useSelector-BoN-mufS.js +2 -0
- package/dist/webui/assets/utils-P-unlvb4.js +1 -0
- package/dist/webui/assets/with-selector-fbK2t2oY.js +1 -0
- package/dist/webui/index.html +12 -14
- package/node_modules/@cross-seed/shared/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@cross-seed/shared/package.json +6 -2
- package/node_modules/zod/README.md +30 -20
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +21 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/locales/package.json +2 -1
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/mini/package.json +2 -1
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +8 -11
- package/node_modules/zod/src/v3/tests/partials.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +60 -45
- package/node_modules/zod/src/v4/classic/external.ts +15 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +389 -88
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +16 -10
- package/node_modules/zod/src/v4/classic/schemas.ts +863 -335
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +29 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +192 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +328 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +144 -2
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +4 -4
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +31 -17
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +90 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +291 -10
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +324 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +743 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +37 -6
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +23 -4
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +138 -7
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +378 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +156 -13
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +71 -1
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +71 -1
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +69 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +269 -16
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +126 -1
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +15 -0
- 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 +269 -4
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +48 -7
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1948 -205
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +17 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +330 -2
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +93 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +111 -34
- package/node_modules/zod/src/v4/core/checks.ts +120 -147
- package/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/node_modules/zod/src/v4/core/core.ts +116 -24
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +138 -43
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +440 -173
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +167 -53
- package/node_modules/zod/src/v4/core/regexes.ts +50 -16
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1219 -531
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +58 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +288 -44
- package/node_modules/zod/src/v4/core/util.ts +506 -179
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +21 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +41 -18
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +14 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +6 -1
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +13 -8
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +4 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +13 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +214 -79
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +54 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +187 -4
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +74 -9
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +67 -1
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +49 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- 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/package.json +2 -1
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- 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/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +62 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +44 -35
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.d.cts +6 -2
- package/node_modules/zod/v4/classic/external.d.ts +6 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +394 -78
- package/node_modules/zod/v4/classic/from-json-schema.js +375 -78
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/package.json +2 -1
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +629 -225
- package/node_modules/zod/v4/classic/schemas.d.cts +104 -27
- package/node_modules/zod/v4/classic/schemas.d.ts +104 -27
- package/node_modules/zod/v4/classic/schemas.js +601 -223
- package/node_modules/zod/v4/core/api.cjs +73 -26
- package/node_modules/zod/v4/core/api.d.cts +40 -9
- package/node_modules/zod/v4/core/api.d.ts +40 -9
- package/node_modules/zod/v4/core/api.js +51 -26
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +30 -14
- package/node_modules/zod/v4/core/checks.d.ts +30 -14
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1866 -0
- package/node_modules/zod/v4/core/core.cjs +104 -20
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +87 -22
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +146 -42
- package/node_modules/zod/v4/core/errors.d.cts +5 -0
- package/node_modules/zod/v4/core/errors.d.ts +5 -0
- package/node_modules/zod/v4/core/errors.js +127 -42
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +454 -173
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +413 -175
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +2 -1
- package/node_modules/zod/v4/core/parse.cjs +151 -49
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +130 -48
- package/node_modules/zod/v4/core/regexes.cjs +61 -18
- package/node_modules/zod/v4/core/regexes.d.cts +11 -0
- package/node_modules/zod/v4/core/regexes.d.ts +11 -0
- package/node_modules/zod/v4/core/regexes.js +39 -16
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +957 -382
- package/node_modules/zod/v4/core/schemas.d.cts +154 -25
- package/node_modules/zod/v4/core/schemas.d.ts +154 -25
- package/node_modules/zod/v4/core/schemas.js +925 -382
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +275 -40
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +253 -39
- package/node_modules/zod/v4/core/util.cjs +428 -174
- package/node_modules/zod/v4/core/util.d.cts +82 -1
- package/node_modules/zod/v4/core/util.d.ts +82 -1
- package/node_modules/zod/v4/core/util.js +397 -175
- 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 +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +20 -4
- package/node_modules/zod/v4/locales/en.js +20 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +38 -17
- package/node_modules/zod/v4/locales/fr.js +38 -17
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +49 -1
- package/node_modules/zod/v4/locales/index.d.cts +14 -0
- package/node_modules/zod/v4/locales/index.d.ts +14 -0
- package/node_modules/zod/v4/locales/index.js +14 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +6 -1
- package/node_modules/zod/v4/locales/it.js +6 -1
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +13 -8
- package/node_modules/zod/v4/locales/ka.js +13 -8
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/package.json +2 -1
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -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 +117 -0
- package/node_modules/zod/v4/locales/th.cjs +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +4 -0
- package/node_modules/zod/v4/locales/uz.js +4 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- 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 +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +33 -1
- package/node_modules/zod/v4/mini/external.d.cts +6 -2
- package/node_modules/zod/v4/mini/external.d.ts +6 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -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/package.json +2 -1
- package/node_modules/zod/v4/mini/parse.cjs +22 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +151 -50
- package/node_modules/zod/v4/mini/schemas.d.cts +75 -22
- package/node_modules/zod/v4/mini/schemas.d.ts +75 -22
- package/node_modules/zod/v4/mini/schemas.js +125 -48
- package/node_modules/zod/v4/package.json +2 -1
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/node_modules/zod/v4-mini/package.json +2 -1
- package/package.json +16 -14
- package/dist/trpc/routers/searchees.d.ts +0 -51
- package/dist/trpc/routers/searchees.js +0 -156
- package/dist/trpc/routers/searchees.js.map +0 -1
- package/dist/webui/assets/ClientOnly-CzZIsGML.js +0 -1
- package/dist/webui/assets/DeleteOption-dxKSbv6N.js +0 -1
- package/dist/webui/assets/FieldInfo-FLjtPgL4.js +0 -1
- package/dist/webui/assets/Page-C7KClZ28.js +0 -1
- package/dist/webui/assets/array-field-DGB7Lbh7.js +0 -1
- package/dist/webui/assets/badge-hukNSIir.js +0 -1
- package/dist/webui/assets/button-1cIaa9Lf.js +0 -1
- package/dist/webui/assets/check-CUrWQ2C7.js +0 -1
- package/dist/webui/assets/chevron-down-CVVogpPh.js +0 -1
- package/dist/webui/assets/clients-CHdgqO4r.js +0 -1
- package/dist/webui/assets/connect-Cr6Q3W8U.js +0 -2
- package/dist/webui/assets/createLucideIcon-zYRS_Hrv.js +0 -1
- package/dist/webui/assets/debug-CEmoQ2W_.js +0 -1
- package/dist/webui/assets/directories-CNuHKfHz.js +0 -1
- package/dist/webui/assets/dist-Bbmh5Du9.js +0 -1
- package/dist/webui/assets/dist-DhH_lYkz.js +0 -1
- package/dist/webui/assets/dist-DzdkRn7I.js +0 -1
- package/dist/webui/assets/dist-b2njvUJz.js +0 -41
- package/dist/webui/assets/dist-d-Lt00zD.js +0 -1
- package/dist/webui/assets/duration-field-CnlQcr37.js +0 -1
- package/dist/webui/assets/form-context-B-ekdUc0.js +0 -1
- package/dist/webui/assets/form-validation-context-CPAPOloL.js +0 -1
- package/dist/webui/assets/general-Cs8dEydJ.js +0 -1
- package/dist/webui/assets/health-DugF7R6A.js +0 -1
- package/dist/webui/assets/index-DhV1H9AB.css +0 -2
- package/dist/webui/assets/index-DinSQfHc.js +0 -11
- package/dist/webui/assets/input-CsfmMUT5.js +0 -1
- package/dist/webui/assets/jobs-Cr1xWWzM.js +0 -1
- package/dist/webui/assets/library-BNsctrbc.js +0 -1
- package/dist/webui/assets/loader-circle-BQbzoYGJ.js +0 -1
- package/dist/webui/assets/logs-C1l3cu_j.js +0 -1
- package/dist/webui/assets/number-field-Ce3QdLSz.js +0 -1
- package/dist/webui/assets/react-dom-mEftaaxx.js +0 -1
- package/dist/webui/assets/required-indicator-BXf2UzTH.js +0 -1
- package/dist/webui/assets/routes-Bw2nXmFg.js +0 -1
- package/dist/webui/assets/search-D9W5vk_0.js +0 -1
- package/dist/webui/assets/select-CZn10WME.js +0 -1
- package/dist/webui/assets/select-field-DozTirAZ.js +0 -1
- package/dist/webui/assets/settings-BXbhXNDK.js +0 -1
- package/dist/webui/assets/sidebar-y9WJu7Jw.js +0 -5
- package/dist/webui/assets/submit-button-CBOzR0f_.js +0 -1
- package/dist/webui/assets/switch-D4S9As9u.js +0 -1
- package/dist/webui/assets/switch-field-2E9ctvy_.js +0 -1
- package/dist/webui/assets/table-B1Y18B60.js +0 -1
- package/dist/webui/assets/text-field-DV4EP-I8.js +0 -1
- package/dist/webui/assets/time-DjUFOA4D.js +0 -1
- package/dist/webui/assets/trackers-ULhLxA6-.js +0 -7
- package/dist/webui/assets/use-settings-form-submit-D87nmJRy.js +0 -79
- package/dist/webui/assets/useBaseQuery-BvrWhgOK.js +0 -1
- package/dist/webui/assets/useRouterState-CZfD5Xdv.js +0 -1
- package/dist/webui/assets/useStore-CusP06SD.js +0 -1
- package/node_modules/zod/src/v4/core/config.ts +0 -15
|
@@ -1,159 +1,336 @@
|
|
|
1
1
|
import * as core from "../core/index.js";
|
|
2
2
|
import { util } from "../core/index.js";
|
|
3
3
|
import * as processors from "../core/json-schema-processors.js";
|
|
4
|
+
import * as regexes from "../core/regexes.js";
|
|
4
5
|
import { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from "../core/to-json-schema.js";
|
|
6
|
+
import en from "../locales/en.js";
|
|
5
7
|
import * as checks from "./checks.js";
|
|
6
|
-
import * as iso from "./iso.js";
|
|
7
8
|
import * as parse from "./parse.js";
|
|
9
|
+
// Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.
|
|
10
|
+
function _ensureDefaultLocale() {
|
|
11
|
+
if (!core.globalConfig.localeError)
|
|
12
|
+
core.config(en());
|
|
13
|
+
}
|
|
14
|
+
// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first
|
|
15
|
+
function _ensureDefaultMemoizer() {
|
|
16
|
+
if (!core.globalConfig.memoizer)
|
|
17
|
+
core.config({ memoizer: core.memoizer() });
|
|
18
|
+
}
|
|
8
19
|
export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) => {
|
|
20
|
+
_ensureDefaultLocale();
|
|
9
21
|
core.$ZodType.init(inst, def);
|
|
10
|
-
Object.assign(inst["~standard"], {
|
|
11
|
-
jsonSchema: {
|
|
12
|
-
input: createStandardJSONSchemaMethod(inst, "input"),
|
|
13
|
-
output: createStandardJSONSchemaMethod(inst, "output"),
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
|
|
17
22
|
inst.def = def;
|
|
18
23
|
inst.type = def.type;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
return inst;
|
|
25
|
+
}, {
|
|
26
|
+
check(...chks) {
|
|
27
|
+
const def = this.def;
|
|
28
|
+
return this.clone(util.mergeDefs(def, {
|
|
23
29
|
checks: [
|
|
24
30
|
...(def.checks ?? []),
|
|
25
|
-
...
|
|
31
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
|
|
26
32
|
],
|
|
27
|
-
}), {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
33
|
+
}), { parent: true });
|
|
34
|
+
},
|
|
35
|
+
with(...chks) {
|
|
36
|
+
return this.check(...chks);
|
|
37
|
+
},
|
|
38
|
+
clone(def, params) {
|
|
39
|
+
return core.clone(this, def, params);
|
|
40
|
+
},
|
|
41
|
+
brand() {
|
|
42
|
+
return this;
|
|
43
|
+
},
|
|
44
|
+
register(reg, meta) {
|
|
45
|
+
reg.add(this, meta);
|
|
46
|
+
return this;
|
|
47
|
+
},
|
|
48
|
+
refine(check, params) {
|
|
49
|
+
return this.check(refine(check, params));
|
|
50
|
+
},
|
|
51
|
+
superRefine(refinement, params) {
|
|
52
|
+
return this.check(superRefine(refinement, params));
|
|
53
|
+
},
|
|
54
|
+
overwrite(fn) {
|
|
55
|
+
return this.check(checks.overwrite(fn));
|
|
56
|
+
},
|
|
57
|
+
optional() {
|
|
58
|
+
return optional(this);
|
|
59
|
+
},
|
|
60
|
+
exactOptional() {
|
|
61
|
+
return exactOptional(this);
|
|
62
|
+
},
|
|
63
|
+
nullable() {
|
|
64
|
+
return nullable(this);
|
|
65
|
+
},
|
|
66
|
+
nullish() {
|
|
67
|
+
return optional(nullable(this));
|
|
68
|
+
},
|
|
69
|
+
nonoptional(params) {
|
|
70
|
+
return nonoptional(this, params);
|
|
71
|
+
},
|
|
72
|
+
array() {
|
|
73
|
+
return array(this);
|
|
74
|
+
},
|
|
75
|
+
or(arg) {
|
|
76
|
+
return union([this, arg]);
|
|
77
|
+
},
|
|
78
|
+
and(arg) {
|
|
79
|
+
return intersection(this, arg);
|
|
80
|
+
},
|
|
81
|
+
transform(tx) {
|
|
82
|
+
return pipe(this, transform(tx));
|
|
83
|
+
},
|
|
84
|
+
default(d) {
|
|
85
|
+
return _default(this, d);
|
|
86
|
+
},
|
|
87
|
+
prefault(d) {
|
|
88
|
+
return prefault(this, d);
|
|
89
|
+
},
|
|
90
|
+
catch(params) {
|
|
91
|
+
return _catch(this, params);
|
|
92
|
+
},
|
|
93
|
+
pipe(target) {
|
|
94
|
+
return pipe(this, target);
|
|
95
|
+
},
|
|
96
|
+
readonly() {
|
|
97
|
+
return readonly(this);
|
|
98
|
+
},
|
|
99
|
+
describe(description) {
|
|
100
|
+
const cl = this.clone();
|
|
76
101
|
core.globalRegistry.add(cl, { description });
|
|
77
102
|
return cl;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
inst.meta = (...args) => {
|
|
86
|
-
if (args.length === 0) {
|
|
87
|
-
return core.globalRegistry.get(inst);
|
|
88
|
-
}
|
|
89
|
-
const cl = inst.clone();
|
|
103
|
+
},
|
|
104
|
+
meta(...args) {
|
|
105
|
+
// overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.
|
|
106
|
+
if (args.length === 0)
|
|
107
|
+
return core.globalRegistry.get(this);
|
|
108
|
+
const cl = this.clone();
|
|
90
109
|
core.globalRegistry.add(cl, args[0]);
|
|
91
110
|
return cl;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
111
|
+
},
|
|
112
|
+
isOptional() {
|
|
113
|
+
return this.safeParse(undefined).success;
|
|
114
|
+
},
|
|
115
|
+
isNullable() {
|
|
116
|
+
return this.safeParse(null).success;
|
|
117
|
+
},
|
|
118
|
+
apply(fn, ...args) {
|
|
119
|
+
return args.length === 0 ? fn(this) : fn(this, ...args);
|
|
120
|
+
},
|
|
121
|
+
// Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.
|
|
122
|
+
get "~standard"() {
|
|
123
|
+
return util.hide(this, "~standard", {
|
|
124
|
+
...core.standardProps(this),
|
|
125
|
+
jsonSchema: {
|
|
126
|
+
input: createStandardJSONSchemaMethod(this, "input"),
|
|
127
|
+
output: createStandardJSONSchemaMethod(this, "output"),
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
set "~standard"(value) {
|
|
132
|
+
util.own(this, "~standard", value);
|
|
133
|
+
},
|
|
134
|
+
parse: function _parse(data, params) {
|
|
135
|
+
return parse.parse(this, data, params, { callee: _parse });
|
|
136
|
+
},
|
|
137
|
+
parseAsync: async function _parseAsync(data, params) {
|
|
138
|
+
return await parse.parseAsync(this, data, params, { callee: _parseAsync });
|
|
139
|
+
},
|
|
140
|
+
safeParse(data, params) {
|
|
141
|
+
return parse.safeParse(this, data, params);
|
|
142
|
+
},
|
|
143
|
+
async safeParseAsync(data, params) {
|
|
144
|
+
return parse.safeParseAsync(this, data, params);
|
|
145
|
+
},
|
|
146
|
+
// `spa` is an alias: same function object as `safeParseAsync`, as before.
|
|
147
|
+
get spa() {
|
|
148
|
+
return this?.safeParseAsync;
|
|
149
|
+
},
|
|
150
|
+
set spa(value) {
|
|
151
|
+
util.own(this, "spa", value);
|
|
152
|
+
},
|
|
153
|
+
validate(data, params) {
|
|
154
|
+
return parse.validate(this, data, params);
|
|
155
|
+
},
|
|
156
|
+
validateAsync(data, params) {
|
|
157
|
+
return parse.validateAsync(this, data, params);
|
|
158
|
+
},
|
|
159
|
+
encode: function _encode(data, params) {
|
|
160
|
+
return parse.encode(this, data, params, { callee: _encode });
|
|
161
|
+
},
|
|
162
|
+
decode: function _decode(data, params) {
|
|
163
|
+
return parse.decode(this, data, params, { callee: _decode });
|
|
164
|
+
},
|
|
165
|
+
encodeAsync: async function _encodeAsync(data, params) {
|
|
166
|
+
return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });
|
|
167
|
+
},
|
|
168
|
+
decodeAsync: async function _decodeAsync(data, params) {
|
|
169
|
+
return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });
|
|
170
|
+
},
|
|
171
|
+
safeEncode(data, params) {
|
|
172
|
+
return parse.safeEncode(this, data, params);
|
|
173
|
+
},
|
|
174
|
+
safeDecode(data, params) {
|
|
175
|
+
return parse.safeDecode(this, data, params);
|
|
176
|
+
},
|
|
177
|
+
async safeEncodeAsync(data, params) {
|
|
178
|
+
return parse.safeEncodeAsync(this, data, params);
|
|
179
|
+
},
|
|
180
|
+
async safeDecodeAsync(data, params) {
|
|
181
|
+
return parse.safeDecodeAsync(this, data, params);
|
|
182
|
+
},
|
|
183
|
+
toJSONSchema(params) {
|
|
184
|
+
return createToJSONSchemaMethod(this, {})(params);
|
|
185
|
+
},
|
|
186
|
+
// Reads through to the registry on every access, so it must not cache.
|
|
187
|
+
get description() {
|
|
188
|
+
return core.globalRegistry.get(this)?.description;
|
|
189
|
+
},
|
|
190
|
+
// No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.
|
|
191
|
+
get _def() {
|
|
192
|
+
return this._zod.def;
|
|
193
|
+
},
|
|
98
194
|
});
|
|
99
195
|
/** @internal */
|
|
100
196
|
export const _ZodString = /*@__PURE__*/ core.$constructor("_ZodString", (inst, def) => {
|
|
101
197
|
core.$ZodString.init(inst, def);
|
|
102
198
|
ZodType.init(inst, def);
|
|
103
199
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
inst
|
|
107
|
-
inst
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
200
|
+
},
|
|
201
|
+
/*@__PURE__*/ util.derived({
|
|
202
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
203
|
+
minLength: (inst) => processors.aggregateChecks(inst).minimum ?? null,
|
|
204
|
+
maxLength: (inst) => processors.aggregateChecks(inst).maximum ?? null,
|
|
205
|
+
}, {
|
|
206
|
+
regex(...args) {
|
|
207
|
+
return this.check(checks.regex(...args));
|
|
208
|
+
},
|
|
209
|
+
includes(...args) {
|
|
210
|
+
return this.check(checks.includes(...args));
|
|
211
|
+
},
|
|
212
|
+
startsWith(...args) {
|
|
213
|
+
return this.check(checks.startsWith(...args));
|
|
214
|
+
},
|
|
215
|
+
endsWith(...args) {
|
|
216
|
+
return this.check(checks.endsWith(...args));
|
|
217
|
+
},
|
|
218
|
+
min(...args) {
|
|
219
|
+
return this.check(checks.minLength(...args));
|
|
220
|
+
},
|
|
221
|
+
max(...args) {
|
|
222
|
+
return this.check(checks.maxLength(...args));
|
|
223
|
+
},
|
|
224
|
+
length(...args) {
|
|
225
|
+
return this.check(checks.length(...args));
|
|
226
|
+
},
|
|
227
|
+
nonempty(...args) {
|
|
228
|
+
return this.check(checks.minLength(1, ...args));
|
|
229
|
+
},
|
|
230
|
+
lowercase(params) {
|
|
231
|
+
return this.check(checks.lowercase(params));
|
|
232
|
+
},
|
|
233
|
+
uppercase(params) {
|
|
234
|
+
return this.check(checks.uppercase(params));
|
|
235
|
+
},
|
|
236
|
+
trim() {
|
|
237
|
+
return this.check(checks.trim());
|
|
238
|
+
},
|
|
239
|
+
normalize(...args) {
|
|
240
|
+
return this.check(checks.normalize(...args));
|
|
241
|
+
},
|
|
242
|
+
toLowerCase() {
|
|
243
|
+
return this.check(checks.toLowerCase());
|
|
244
|
+
},
|
|
245
|
+
toUpperCase() {
|
|
246
|
+
return this.check(checks.toUpperCase());
|
|
247
|
+
},
|
|
248
|
+
slugify() {
|
|
249
|
+
return this.check(checks.slugify());
|
|
250
|
+
},
|
|
251
|
+
}));
|
|
126
252
|
export const ZodString = /*@__PURE__*/ core.$constructor("ZodString", (inst, def) => {
|
|
127
253
|
core.$ZodString.init(inst, def);
|
|
128
254
|
_ZodString.init(inst, def);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
255
|
+
}, {
|
|
256
|
+
email(params) {
|
|
257
|
+
return this.check(core._email(ZodEmail, params));
|
|
258
|
+
},
|
|
259
|
+
url(params) {
|
|
260
|
+
return this.check(core._url(ZodURL, params));
|
|
261
|
+
},
|
|
262
|
+
jwt(params) {
|
|
263
|
+
return this.check(core._jwt(ZodJWT, params));
|
|
264
|
+
},
|
|
265
|
+
emoji(params) {
|
|
266
|
+
return this.check(core._emoji(ZodEmoji, params));
|
|
267
|
+
},
|
|
268
|
+
guid(params) {
|
|
269
|
+
return this.check(core._guid(ZodGUID, params));
|
|
270
|
+
},
|
|
271
|
+
uuid(params) {
|
|
272
|
+
return this.check(core._uuid(ZodUUID, params));
|
|
273
|
+
},
|
|
274
|
+
uuidv4(params) {
|
|
275
|
+
return this.check(core._uuidv4(ZodUUID, params));
|
|
276
|
+
},
|
|
277
|
+
uuidv6(params) {
|
|
278
|
+
return this.check(core._uuidv6(ZodUUID, params));
|
|
279
|
+
},
|
|
280
|
+
uuidv7(params) {
|
|
281
|
+
return this.check(core._uuidv7(ZodUUID, params));
|
|
282
|
+
},
|
|
283
|
+
nanoid(params) {
|
|
284
|
+
return this.check(core._nanoid(ZodNanoID, params));
|
|
285
|
+
},
|
|
286
|
+
cuid(params) {
|
|
287
|
+
return this.check(core._cuid(ZodCUID, params));
|
|
288
|
+
},
|
|
289
|
+
cuid2(params) {
|
|
290
|
+
return this.check(core._cuid2(ZodCUID2, params));
|
|
291
|
+
},
|
|
292
|
+
ulid(params) {
|
|
293
|
+
return this.check(core._ulid(ZodULID, params));
|
|
294
|
+
},
|
|
295
|
+
base64(params) {
|
|
296
|
+
return this.check(core._base64(ZodBase64, params));
|
|
297
|
+
},
|
|
298
|
+
base64url(params) {
|
|
299
|
+
return this.check(core._base64url(ZodBase64URL, params));
|
|
300
|
+
},
|
|
301
|
+
xid(params) {
|
|
302
|
+
return this.check(core._xid(ZodXID, params));
|
|
303
|
+
},
|
|
304
|
+
ksuid(params) {
|
|
305
|
+
return this.check(core._ksuid(ZodKSUID, params));
|
|
306
|
+
},
|
|
307
|
+
ipv4(params) {
|
|
308
|
+
return this.check(core._ipv4(ZodIPv4, params));
|
|
309
|
+
},
|
|
310
|
+
ipv6(params) {
|
|
311
|
+
return this.check(core._ipv6(ZodIPv6, params));
|
|
312
|
+
},
|
|
313
|
+
cidrv4(params) {
|
|
314
|
+
return this.check(core._cidrv4(ZodCIDRv4, params));
|
|
315
|
+
},
|
|
316
|
+
cidrv6(params) {
|
|
317
|
+
return this.check(core._cidrv6(ZodCIDRv6, params));
|
|
318
|
+
},
|
|
319
|
+
e164(params) {
|
|
320
|
+
return this.check(core._e164(ZodE164, params));
|
|
321
|
+
},
|
|
322
|
+
datetime(params) {
|
|
323
|
+
return this.check(core._isoDateTime(ZodISODateTime, params));
|
|
324
|
+
},
|
|
325
|
+
date(params) {
|
|
326
|
+
return this.check(core._isoDate(ZodISODate, params));
|
|
327
|
+
},
|
|
328
|
+
time(params) {
|
|
329
|
+
return this.check(core._isoTime(ZodISOTime, params));
|
|
330
|
+
},
|
|
331
|
+
duration(params) {
|
|
332
|
+
return this.check(core._isoDuration(ZodISODuration, params));
|
|
333
|
+
},
|
|
157
334
|
});
|
|
158
335
|
export function string(params) {
|
|
159
336
|
return core._string(ZodString, params);
|
|
@@ -162,6 +339,22 @@ export const ZodStringFormat = /*@__PURE__*/ core.$constructor("ZodStringFormat"
|
|
|
162
339
|
core.$ZodStringFormat.init(inst, def);
|
|
163
340
|
_ZodString.init(inst, def);
|
|
164
341
|
});
|
|
342
|
+
export const ZodISODateTime = /*@__PURE__*/ core.$constructor("ZodISODateTime", (inst, def) => {
|
|
343
|
+
core.$ZodISODateTime.init(inst, def);
|
|
344
|
+
ZodStringFormat.init(inst, def);
|
|
345
|
+
});
|
|
346
|
+
export const ZodISODate = /*@__PURE__*/ core.$constructor("ZodISODate", (inst, def) => {
|
|
347
|
+
core.$ZodISODate.init(inst, def);
|
|
348
|
+
ZodStringFormat.init(inst, def);
|
|
349
|
+
});
|
|
350
|
+
export const ZodISOTime = /*@__PURE__*/ core.$constructor("ZodISOTime", (inst, def) => {
|
|
351
|
+
core.$ZodISOTime.init(inst, def);
|
|
352
|
+
ZodStringFormat.init(inst, def);
|
|
353
|
+
});
|
|
354
|
+
export const ZodISODuration = /*@__PURE__*/ core.$constructor("ZodISODuration", (inst, def) => {
|
|
355
|
+
core.$ZodISODuration.init(inst, def);
|
|
356
|
+
ZodStringFormat.init(inst, def);
|
|
357
|
+
});
|
|
165
358
|
export const ZodEmail = /*@__PURE__*/ core.$constructor("ZodEmail", (inst, def) => {
|
|
166
359
|
// ZodStringFormat.init(inst, def);
|
|
167
360
|
core.$ZodEmail.init(inst, def);
|
|
@@ -207,8 +400,8 @@ export function url(params) {
|
|
|
207
400
|
}
|
|
208
401
|
export function httpUrl(params) {
|
|
209
402
|
return core._url(ZodURL, {
|
|
210
|
-
protocol:
|
|
211
|
-
hostname:
|
|
403
|
+
protocol: regexes.httpProtocol,
|
|
404
|
+
hostname: regexes.domain,
|
|
212
405
|
...util.normalizeParams(params),
|
|
213
406
|
});
|
|
214
407
|
}
|
|
@@ -228,11 +421,23 @@ export const ZodNanoID = /*@__PURE__*/ core.$constructor("ZodNanoID", (inst, def
|
|
|
228
421
|
export function nanoid(params) {
|
|
229
422
|
return core._nanoid(ZodNanoID, params);
|
|
230
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
426
|
+
* (timestamps embedded in the id). Use {@link ZodCUID2} instead.
|
|
427
|
+
* See https://github.com/paralleldrive/cuid.
|
|
428
|
+
*/
|
|
231
429
|
export const ZodCUID = /*@__PURE__*/ core.$constructor("ZodCUID", (inst, def) => {
|
|
232
430
|
// ZodStringFormat.init(inst, def);
|
|
233
431
|
core.$ZodCUID.init(inst, def);
|
|
234
432
|
ZodStringFormat.init(inst, def);
|
|
235
433
|
});
|
|
434
|
+
/**
|
|
435
|
+
* Validates a CUID v1 string.
|
|
436
|
+
*
|
|
437
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
438
|
+
* (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.
|
|
439
|
+
* See https://github.com/paralleldrive/cuid.
|
|
440
|
+
*/
|
|
236
441
|
export function cuid(params) {
|
|
237
442
|
return core._cuid(ZodCUID, params);
|
|
238
443
|
}
|
|
@@ -330,6 +535,20 @@ export const ZodE164 = /*@__PURE__*/ core.$constructor("ZodE164", (inst, def) =>
|
|
|
330
535
|
export function e164(params) {
|
|
331
536
|
return core._e164(ZodE164, params);
|
|
332
537
|
}
|
|
538
|
+
export const ZodCreditCard = /*@__PURE__*/ core.$constructor("ZodCreditCard", (inst, def) => {
|
|
539
|
+
core.$ZodCreditCard.init(inst, def);
|
|
540
|
+
ZodStringFormat.init(inst, def);
|
|
541
|
+
});
|
|
542
|
+
export function creditCard(params) {
|
|
543
|
+
return core._creditCard(ZodCreditCard, params);
|
|
544
|
+
}
|
|
545
|
+
export const ZodIBAN = /*@__PURE__*/ core.$constructor("ZodIBAN", (inst, def) => {
|
|
546
|
+
core.$ZodIBAN.init(inst, def);
|
|
547
|
+
ZodStringFormat.init(inst, def);
|
|
548
|
+
});
|
|
549
|
+
export function iban(params) {
|
|
550
|
+
return core._iban(ZodIBAN, params);
|
|
551
|
+
}
|
|
333
552
|
export const ZodJWT = /*@__PURE__*/ core.$constructor("ZodJWT", (inst, def) => {
|
|
334
553
|
// ZodStringFormat.init(inst, def);
|
|
335
554
|
core.$ZodJWT.init(inst, def);
|
|
@@ -347,10 +566,13 @@ export function stringFormat(format, fnOrRegex, _params = {}) {
|
|
|
347
566
|
return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
348
567
|
}
|
|
349
568
|
export function hostname(_params) {
|
|
350
|
-
return core._stringFormat(ZodCustomStringFormat, "hostname",
|
|
569
|
+
return core._stringFormat(ZodCustomStringFormat, "hostname", regexes.hostname, _params);
|
|
351
570
|
}
|
|
352
571
|
export function hex(_params) {
|
|
353
|
-
return core._stringFormat(ZodCustomStringFormat, "hex",
|
|
572
|
+
return core._stringFormat(ZodCustomStringFormat, "hex", regexes.hex, _params);
|
|
573
|
+
}
|
|
574
|
+
export function currencyCode(_params) {
|
|
575
|
+
return core._stringFormat(ZodCustomStringFormat, "currency_code", regexes.currencyCode, _params);
|
|
354
576
|
}
|
|
355
577
|
export function hash(alg, params) {
|
|
356
578
|
const enc = params?.enc ?? "hex";
|
|
@@ -364,31 +586,69 @@ export const ZodNumber = /*@__PURE__*/ core.$constructor("ZodNumber", (inst, def
|
|
|
364
586
|
core.$ZodNumber.init(inst, def);
|
|
365
587
|
ZodType.init(inst, def);
|
|
366
588
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);
|
|
367
|
-
inst.gt = (value, params) => inst.check(checks.gt(value, params));
|
|
368
|
-
inst.gte = (value, params) => inst.check(checks.gte(value, params));
|
|
369
|
-
inst.min = (value, params) => inst.check(checks.gte(value, params));
|
|
370
|
-
inst.lt = (value, params) => inst.check(checks.lt(value, params));
|
|
371
|
-
inst.lte = (value, params) => inst.check(checks.lte(value, params));
|
|
372
|
-
inst.max = (value, params) => inst.check(checks.lte(value, params));
|
|
373
|
-
inst.int = (params) => inst.check(int(params));
|
|
374
|
-
inst.safe = (params) => inst.check(int(params));
|
|
375
|
-
inst.positive = (params) => inst.check(checks.gt(0, params));
|
|
376
|
-
inst.nonnegative = (params) => inst.check(checks.gte(0, params));
|
|
377
|
-
inst.negative = (params) => inst.check(checks.lt(0, params));
|
|
378
|
-
inst.nonpositive = (params) => inst.check(checks.lte(0, params));
|
|
379
|
-
inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
|
|
380
|
-
inst.step = (value, params) => inst.check(checks.multipleOf(value, params));
|
|
381
|
-
// inst.finite = (params) => inst.check(core.finite(params));
|
|
382
|
-
inst.finite = () => inst;
|
|
383
|
-
const bag = inst._zod.bag;
|
|
384
|
-
inst.minValue =
|
|
385
|
-
Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
386
|
-
inst.maxValue =
|
|
387
|
-
Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
388
|
-
inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
|
|
389
589
|
inst.isFinite = true;
|
|
390
|
-
|
|
391
|
-
|
|
590
|
+
},
|
|
591
|
+
/*@__PURE__*/ util.derived({
|
|
592
|
+
minValue: (inst) => {
|
|
593
|
+
const { minimum, exclusiveMinimum } = processors.aggregateChecks(inst);
|
|
594
|
+
return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
|
|
595
|
+
},
|
|
596
|
+
maxValue: (inst) => {
|
|
597
|
+
const { maximum, exclusiveMaximum } = processors.aggregateChecks(inst);
|
|
598
|
+
return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
|
|
599
|
+
},
|
|
600
|
+
isInt: (inst) => {
|
|
601
|
+
const { isInt, multipleOf } = processors.aggregateChecks(inst);
|
|
602
|
+
return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
|
|
603
|
+
},
|
|
604
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
605
|
+
}, {
|
|
606
|
+
gt(value, params) {
|
|
607
|
+
return this.check(checks.gt(value, params));
|
|
608
|
+
},
|
|
609
|
+
gte(value, params) {
|
|
610
|
+
return this.check(checks.gte(value, params));
|
|
611
|
+
},
|
|
612
|
+
min(value, params) {
|
|
613
|
+
return this.check(checks.gte(value, params));
|
|
614
|
+
},
|
|
615
|
+
lt(value, params) {
|
|
616
|
+
return this.check(checks.lt(value, params));
|
|
617
|
+
},
|
|
618
|
+
lte(value, params) {
|
|
619
|
+
return this.check(checks.lte(value, params));
|
|
620
|
+
},
|
|
621
|
+
max(value, params) {
|
|
622
|
+
return this.check(checks.lte(value, params));
|
|
623
|
+
},
|
|
624
|
+
int(params) {
|
|
625
|
+
return this.check(int(params));
|
|
626
|
+
},
|
|
627
|
+
safe(params) {
|
|
628
|
+
return this.check(int(params));
|
|
629
|
+
},
|
|
630
|
+
positive(params) {
|
|
631
|
+
return this.check(checks.gt(0, params));
|
|
632
|
+
},
|
|
633
|
+
nonnegative(params) {
|
|
634
|
+
return this.check(checks.gte(0, params));
|
|
635
|
+
},
|
|
636
|
+
negative(params) {
|
|
637
|
+
return this.check(checks.lt(0, params));
|
|
638
|
+
},
|
|
639
|
+
nonpositive(params) {
|
|
640
|
+
return this.check(checks.lte(0, params));
|
|
641
|
+
},
|
|
642
|
+
multipleOf(value, params) {
|
|
643
|
+
return this.check(checks.multipleOf(value, params));
|
|
644
|
+
},
|
|
645
|
+
step(value, params) {
|
|
646
|
+
return this.check(checks.multipleOf(value, params));
|
|
647
|
+
},
|
|
648
|
+
finite() {
|
|
649
|
+
return this;
|
|
650
|
+
},
|
|
651
|
+
}));
|
|
392
652
|
export function number(params) {
|
|
393
653
|
return core._number(ZodNumber, params);
|
|
394
654
|
}
|
|
@@ -423,24 +683,46 @@ export const ZodBigInt = /*@__PURE__*/ core.$constructor("ZodBigInt", (inst, def
|
|
|
423
683
|
core.$ZodBigInt.init(inst, def);
|
|
424
684
|
ZodType.init(inst, def);
|
|
425
685
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
686
|
+
},
|
|
687
|
+
/*@__PURE__*/ util.derived({
|
|
688
|
+
minValue: (inst) => processors.aggregateChecks(inst).minimum ?? null,
|
|
689
|
+
maxValue: (inst) => processors.aggregateChecks(inst).maximum ?? null,
|
|
690
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
691
|
+
}, {
|
|
692
|
+
gte(value, params) {
|
|
693
|
+
return this.check(checks.gte(value, params));
|
|
694
|
+
},
|
|
695
|
+
min(value, params) {
|
|
696
|
+
return this.check(checks.gte(value, params));
|
|
697
|
+
},
|
|
698
|
+
gt(value, params) {
|
|
699
|
+
return this.check(checks.gt(value, params));
|
|
700
|
+
},
|
|
701
|
+
lt(value, params) {
|
|
702
|
+
return this.check(checks.lt(value, params));
|
|
703
|
+
},
|
|
704
|
+
lte(value, params) {
|
|
705
|
+
return this.check(checks.lte(value, params));
|
|
706
|
+
},
|
|
707
|
+
max(value, params) {
|
|
708
|
+
return this.check(checks.lte(value, params));
|
|
709
|
+
},
|
|
710
|
+
positive(params) {
|
|
711
|
+
return this.check(checks.gt(BigInt(0), params));
|
|
712
|
+
},
|
|
713
|
+
negative(params) {
|
|
714
|
+
return this.check(checks.lt(BigInt(0), params));
|
|
715
|
+
},
|
|
716
|
+
nonpositive(params) {
|
|
717
|
+
return this.check(checks.lte(BigInt(0), params));
|
|
718
|
+
},
|
|
719
|
+
nonnegative(params) {
|
|
720
|
+
return this.check(checks.gte(BigInt(0), params));
|
|
721
|
+
},
|
|
722
|
+
multipleOf(value, params) {
|
|
723
|
+
return this.check(checks.multipleOf(value, params));
|
|
724
|
+
},
|
|
725
|
+
}));
|
|
444
726
|
export function bigint(params) {
|
|
445
727
|
return core._bigint(ZodBigInt, params);
|
|
446
728
|
}
|
|
@@ -448,11 +730,9 @@ export const ZodBigIntFormat = /*@__PURE__*/ core.$constructor("ZodBigIntFormat"
|
|
|
448
730
|
core.$ZodBigIntFormat.init(inst, def);
|
|
449
731
|
ZodBigInt.init(inst, def);
|
|
450
732
|
});
|
|
451
|
-
// int64
|
|
452
733
|
export function int64(params) {
|
|
453
734
|
return core._int64(ZodBigIntFormat, params);
|
|
454
735
|
}
|
|
455
|
-
// uint64
|
|
456
736
|
export function uint64(params) {
|
|
457
737
|
return core._uint64(ZodBigIntFormat, params);
|
|
458
738
|
}
|
|
@@ -521,23 +801,42 @@ export const ZodDate = /*@__PURE__*/ core.$constructor("ZodDate", (inst, def) =>
|
|
|
521
801
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);
|
|
522
802
|
inst.min = (value, params) => inst.check(checks.gte(value, params));
|
|
523
803
|
inst.max = (value, params) => inst.check(checks.lte(value, params));
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
});
|
|
804
|
+
},
|
|
805
|
+
/*@__PURE__*/ util.derived({
|
|
806
|
+
minDate: (inst) => {
|
|
807
|
+
const { minimum } = processors.aggregateChecks(inst);
|
|
808
|
+
return minimum ? new Date(minimum) : null;
|
|
809
|
+
},
|
|
810
|
+
maxDate: (inst) => {
|
|
811
|
+
const { maximum } = processors.aggregateChecks(inst);
|
|
812
|
+
return maximum ? new Date(maximum) : null;
|
|
813
|
+
},
|
|
814
|
+
}, {}));
|
|
528
815
|
export function date(params) {
|
|
529
816
|
return core._date(ZodDate, params);
|
|
530
817
|
}
|
|
531
818
|
export const ZodArray = /*@__PURE__*/ core.$constructor("ZodArray", (inst, def) => {
|
|
819
|
+
_ensureDefaultMemoizer();
|
|
532
820
|
core.$ZodArray.init(inst, def);
|
|
533
821
|
ZodType.init(inst, def);
|
|
534
822
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);
|
|
535
823
|
inst.element = def.element;
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
824
|
+
}, {
|
|
825
|
+
min(n, params) {
|
|
826
|
+
return this.check(checks.minLength(n, params));
|
|
827
|
+
},
|
|
828
|
+
nonempty(params) {
|
|
829
|
+
return this.check(checks.minLength(1, params));
|
|
830
|
+
},
|
|
831
|
+
max(n, params) {
|
|
832
|
+
return this.check(checks.maxLength(n, params));
|
|
833
|
+
},
|
|
834
|
+
length(n, params) {
|
|
835
|
+
return this.check(checks.length(n, params));
|
|
836
|
+
},
|
|
837
|
+
unwrap() {
|
|
838
|
+
return this.element;
|
|
839
|
+
},
|
|
541
840
|
});
|
|
542
841
|
export function array(element, params) {
|
|
543
842
|
return core._array(ZodArray, element, params);
|
|
@@ -548,29 +847,55 @@ export function keyof(schema) {
|
|
|
548
847
|
return _enum(Object.keys(shape));
|
|
549
848
|
}
|
|
550
849
|
export const ZodObject = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def) => {
|
|
850
|
+
_ensureDefaultMemoizer();
|
|
551
851
|
core.$ZodObjectJIT.init(inst, def);
|
|
552
852
|
ZodType.init(inst, def);
|
|
553
853
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);
|
|
554
|
-
util.
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
return util.
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
return util.
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
854
|
+
util.installLazyProp(inst, "shape", (self) => self._zod.def.shape, false);
|
|
855
|
+
}, {
|
|
856
|
+
keyof() {
|
|
857
|
+
return _enum(Object.keys(this._zod.def.shape));
|
|
858
|
+
},
|
|
859
|
+
catchall(catchall) {
|
|
860
|
+
// `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree
|
|
861
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: catchall }));
|
|
862
|
+
},
|
|
863
|
+
passthrough() {
|
|
864
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
865
|
+
},
|
|
866
|
+
loose() {
|
|
867
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
868
|
+
},
|
|
869
|
+
strict() {
|
|
870
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: never() }));
|
|
871
|
+
},
|
|
872
|
+
strip() {
|
|
873
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: undefined }));
|
|
874
|
+
},
|
|
875
|
+
extend(incoming) {
|
|
876
|
+
return util.extend(this, incoming);
|
|
877
|
+
},
|
|
878
|
+
safeExtend(incoming) {
|
|
879
|
+
return util.safeExtend(this, incoming);
|
|
880
|
+
},
|
|
881
|
+
merge(other) {
|
|
882
|
+
return util.merge(this, other);
|
|
883
|
+
},
|
|
884
|
+
pick(mask) {
|
|
885
|
+
return util.pick(this, mask);
|
|
886
|
+
},
|
|
887
|
+
omit(mask) {
|
|
888
|
+
return util.omit(this, mask);
|
|
889
|
+
},
|
|
890
|
+
partial(...args) {
|
|
891
|
+
return util.partial(ZodOptional, this, args[0]);
|
|
892
|
+
},
|
|
893
|
+
exactPartial(...args) {
|
|
894
|
+
return util.partial(ZodExactOptional, this, args[0], "exactPartial");
|
|
895
|
+
},
|
|
896
|
+
required(...args) {
|
|
897
|
+
return util.required(ZodNonOptional, this, args[0]);
|
|
898
|
+
},
|
|
574
899
|
});
|
|
575
900
|
export function object(shape, params) {
|
|
576
901
|
const def = {
|
|
@@ -636,7 +961,7 @@ export function discriminatedUnion(discriminator, options, params) {
|
|
|
636
961
|
// const [options, params] = args;
|
|
637
962
|
return new ZodDiscriminatedUnion({
|
|
638
963
|
type: "union",
|
|
639
|
-
options,
|
|
964
|
+
options: options,
|
|
640
965
|
discriminator,
|
|
641
966
|
...util.normalizeParams(params),
|
|
642
967
|
});
|
|
@@ -654,13 +979,27 @@ export function intersection(left, right) {
|
|
|
654
979
|
});
|
|
655
980
|
}
|
|
656
981
|
export const ZodTuple = /*@__PURE__*/ core.$constructor("ZodTuple", (inst, def) => {
|
|
982
|
+
_ensureDefaultMemoizer();
|
|
657
983
|
core.$ZodTuple.init(inst, def);
|
|
658
984
|
ZodType.init(inst, def);
|
|
659
985
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
986
|
+
}, {
|
|
987
|
+
rest(rest) {
|
|
988
|
+
return this.clone({
|
|
989
|
+
...this._zod.def,
|
|
990
|
+
rest: rest,
|
|
991
|
+
});
|
|
992
|
+
},
|
|
993
|
+
partial() {
|
|
994
|
+
const def = this._zod.def;
|
|
995
|
+
// a refinement was authored against the full arity; partialing would run it on a shorter array
|
|
996
|
+
if (def.checks?.length)
|
|
997
|
+
throw new Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
998
|
+
return this.clone({
|
|
999
|
+
...def,
|
|
1000
|
+
items: def.items.map((item) => new ZodOptional({ type: "optional", innerType: item })),
|
|
1001
|
+
});
|
|
1002
|
+
},
|
|
664
1003
|
});
|
|
665
1004
|
export function tuple(items, _paramsOrRest, _params) {
|
|
666
1005
|
const hasRest = _paramsOrRest instanceof core.$ZodType;
|
|
@@ -674,6 +1013,7 @@ export function tuple(items, _paramsOrRest, _params) {
|
|
|
674
1013
|
});
|
|
675
1014
|
}
|
|
676
1015
|
export const ZodRecord = /*@__PURE__*/ core.$constructor("ZodRecord", (inst, def) => {
|
|
1016
|
+
_ensureDefaultMemoizer();
|
|
677
1017
|
core.$ZodRecord.init(inst, def);
|
|
678
1018
|
ZodType.init(inst, def);
|
|
679
1019
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);
|
|
@@ -681,6 +1021,15 @@ export const ZodRecord = /*@__PURE__*/ core.$constructor("ZodRecord", (inst, def
|
|
|
681
1021
|
inst.valueType = def.valueType;
|
|
682
1022
|
});
|
|
683
1023
|
export function record(keyType, valueType, params) {
|
|
1024
|
+
// v3-compat: z.record(valueType, params?) — defaults keyType to z.string()
|
|
1025
|
+
if (!valueType || !valueType._zod) {
|
|
1026
|
+
return new ZodRecord({
|
|
1027
|
+
type: "record",
|
|
1028
|
+
keyType: string(),
|
|
1029
|
+
valueType: keyType,
|
|
1030
|
+
...util.normalizeParams(valueType),
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
684
1033
|
return new ZodRecord({
|
|
685
1034
|
type: "record",
|
|
686
1035
|
keyType,
|
|
@@ -690,13 +1039,12 @@ export function record(keyType, valueType, params) {
|
|
|
690
1039
|
}
|
|
691
1040
|
// type alksjf = core.output<core.$ZodRecordKey>;
|
|
692
1041
|
export function partialRecord(keyType, valueType, params) {
|
|
693
|
-
const k = core.clone(keyType);
|
|
694
|
-
k._zod.values = undefined;
|
|
695
1042
|
return new ZodRecord({
|
|
696
1043
|
type: "record",
|
|
697
|
-
keyType
|
|
1044
|
+
keyType,
|
|
698
1045
|
valueType: valueType,
|
|
699
1046
|
...util.normalizeParams(params),
|
|
1047
|
+
partial: true,
|
|
700
1048
|
});
|
|
701
1049
|
}
|
|
702
1050
|
export function looseRecord(keyType, valueType, params) {
|
|
@@ -709,6 +1057,7 @@ export function looseRecord(keyType, valueType, params) {
|
|
|
709
1057
|
});
|
|
710
1058
|
}
|
|
711
1059
|
export const ZodMap = /*@__PURE__*/ core.$constructor("ZodMap", (inst, def) => {
|
|
1060
|
+
_ensureDefaultMemoizer();
|
|
712
1061
|
core.$ZodMap.init(inst, def);
|
|
713
1062
|
ZodType.init(inst, def);
|
|
714
1063
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);
|
|
@@ -728,6 +1077,7 @@ export function map(keyType, valueType, params) {
|
|
|
728
1077
|
});
|
|
729
1078
|
}
|
|
730
1079
|
export const ZodSet = /*@__PURE__*/ core.$constructor("ZodSet", (inst, def) => {
|
|
1080
|
+
_ensureDefaultMemoizer();
|
|
731
1081
|
core.$ZodSet.init(inst, def);
|
|
732
1082
|
ZodType.init(inst, def);
|
|
733
1083
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);
|
|
@@ -748,7 +1098,8 @@ export const ZodEnum = /*@__PURE__*/ core.$constructor("ZodEnum", (inst, def) =>
|
|
|
748
1098
|
ZodType.init(inst, def);
|
|
749
1099
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);
|
|
750
1100
|
inst.enum = def.entries;
|
|
751
|
-
|
|
1101
|
+
// reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out
|
|
1102
|
+
inst.options = [...inst._zod.values];
|
|
752
1103
|
const keys = new Set(Object.keys(def.entries));
|
|
753
1104
|
inst.extract = (values, params) => {
|
|
754
1105
|
const newEntries = {};
|
|
@@ -839,6 +1190,7 @@ export function file(params) {
|
|
|
839
1190
|
return core._file(ZodFile, params);
|
|
840
1191
|
}
|
|
841
1192
|
export const ZodTransform = /*@__PURE__*/ core.$constructor("ZodTransform", (inst, def) => {
|
|
1193
|
+
_ensureDefaultMemoizer();
|
|
842
1194
|
core.$ZodTransform.init(inst, def);
|
|
843
1195
|
ZodType.init(inst, def);
|
|
844
1196
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);
|
|
@@ -856,7 +1208,8 @@ export const ZodTransform = /*@__PURE__*/ core.$constructor("ZodTransform", (ins
|
|
|
856
1208
|
if (_issue.fatal)
|
|
857
1209
|
_issue.continue = false;
|
|
858
1210
|
_issue.code ?? (_issue.code = "custom");
|
|
859
|
-
|
|
1211
|
+
if (!("input" in _issue))
|
|
1212
|
+
_issue.input = payload.value;
|
|
860
1213
|
_issue.inst ?? (_issue.inst = inst);
|
|
861
1214
|
// _issue.continue ??= true;
|
|
862
1215
|
payload.issues.push(util.issue(_issue));
|
|
@@ -986,7 +1339,7 @@ function _catch(innerType, catchValue) {
|
|
|
986
1339
|
return new ZodCatch({
|
|
987
1340
|
type: "catch",
|
|
988
1341
|
innerType: innerType,
|
|
989
|
-
catchValue: (typeof catchValue === "function" ? catchValue : (
|
|
1342
|
+
catchValue: (typeof catchValue === "function" ? catchValue : core.util.constantCatch(catchValue)),
|
|
990
1343
|
});
|
|
991
1344
|
}
|
|
992
1345
|
export { _catch as catch };
|
|
@@ -1026,6 +1379,20 @@ export function codec(in_, out, params) {
|
|
|
1026
1379
|
reverseTransform: params.encode,
|
|
1027
1380
|
});
|
|
1028
1381
|
}
|
|
1382
|
+
export function invertCodec(codec) {
|
|
1383
|
+
const def = codec._zod.def;
|
|
1384
|
+
return new ZodCodec({
|
|
1385
|
+
type: "pipe",
|
|
1386
|
+
in: def.out,
|
|
1387
|
+
out: def.in,
|
|
1388
|
+
transform: def.reverseTransform,
|
|
1389
|
+
reverseTransform: def.transform,
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
export const ZodPreprocess = /*@__PURE__*/ core.$constructor("ZodPreprocess", (inst, def) => {
|
|
1393
|
+
ZodPipe.init(inst, def);
|
|
1394
|
+
core.$ZodPreprocess.init(inst, def);
|
|
1395
|
+
});
|
|
1029
1396
|
export const ZodReadonly = /*@__PURE__*/ core.$constructor("ZodReadonly", (inst, def) => {
|
|
1030
1397
|
core.$ZodReadonly.init(inst, def);
|
|
1031
1398
|
ZodType.init(inst, def);
|
|
@@ -1108,14 +1475,22 @@ export function refine(fn, _params = {}) {
|
|
|
1108
1475
|
return core._refine(ZodCustom, fn, _params);
|
|
1109
1476
|
}
|
|
1110
1477
|
// superRefine
|
|
1111
|
-
export function superRefine(fn) {
|
|
1112
|
-
return core._superRefine(fn);
|
|
1478
|
+
export function superRefine(fn, params) {
|
|
1479
|
+
return core._superRefine(fn, params);
|
|
1113
1480
|
}
|
|
1114
1481
|
// Re-export describe and meta from core
|
|
1115
1482
|
export const describe = core.describe;
|
|
1116
1483
|
export const meta = core.meta;
|
|
1484
|
+
export const ZodInstanceOf = /*@__PURE__*/ core.$constructor("ZodInstanceOf", (inst, def) => {
|
|
1485
|
+
ZodCustom.init(inst, def);
|
|
1486
|
+
}, {
|
|
1487
|
+
properties(shape, params) {
|
|
1488
|
+
// asserts in place, so the narrowed output type is truthful without a wrapper
|
|
1489
|
+
return this.check(core._properties(shape, params));
|
|
1490
|
+
},
|
|
1491
|
+
});
|
|
1117
1492
|
function _instanceof(cls, params = {}) {
|
|
1118
|
-
const inst = new
|
|
1493
|
+
const inst = new ZodInstanceOf({
|
|
1119
1494
|
type: "custom",
|
|
1120
1495
|
check: "custom",
|
|
1121
1496
|
fn: (data) => data instanceof cls,
|
|
@@ -1151,7 +1526,10 @@ export function json(params) {
|
|
|
1151
1526
|
return jsonSchema;
|
|
1152
1527
|
}
|
|
1153
1528
|
// preprocess
|
|
1154
|
-
// /** @deprecated Use `z.pipe()` and `z.transform()` instead. */
|
|
1155
1529
|
export function preprocess(fn, schema) {
|
|
1156
|
-
return
|
|
1530
|
+
return new ZodPreprocess({
|
|
1531
|
+
type: "pipe",
|
|
1532
|
+
in: transform(fn),
|
|
1533
|
+
out: schema,
|
|
1534
|
+
});
|
|
1157
1535
|
}
|