@nullix/zod-mongoose-studio 3.3.2 → 3.3.3
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{B7ScFmDB.js → 5ZXm4f56.js} +1 -1
- package/.output/public/_nuxt/{DbqvVYbv.js → B2fcLSyW.js} +1 -1
- package/.output/public/_nuxt/{DKK0Mrrg.js → BBN7l5Hn.js} +1 -1
- package/.output/public/_nuxt/BBTTtb8r.js +41 -0
- package/.output/public/_nuxt/{C8xmwXC2.js → BDbISGvP.js} +1 -1
- package/.output/public/_nuxt/{DJa7_7Hz.js → BijI4RNx.js} +1 -1
- package/.output/public/_nuxt/{BlZ0x31M.js → Bp9qkJ9m.js} +1 -1
- package/.output/public/_nuxt/{BcYnCaqL.js → Bu3-sqCf.js} +1 -1
- package/.output/public/_nuxt/{C919AVYR.js → C-FtTvwz.js} +1 -1
- package/.output/public/_nuxt/C02JV0Aj.js +1 -0
- package/.output/public/_nuxt/{Bbi9UBvi.js → C1UkIsDc.js} +1 -1
- package/.output/public/_nuxt/{PXBhK7S_.js → CJT28r6J.js} +1 -1
- package/.output/public/_nuxt/{BC9tFNFa.js → CL7qtgl2.js} +3 -3
- package/.output/public/_nuxt/{B6lqezyA.js → CRMd2YH2.js} +3 -3
- package/.output/public/_nuxt/{YC-RLggm.js → CRkdQgFz.js} +1 -1
- package/.output/public/_nuxt/{iKW_mt0p.js → Cw1XFOz5.js} +1 -1
- package/.output/public/_nuxt/{d1NBz903.js → D5yWk6Ly.js} +1 -1
- package/.output/public/_nuxt/{iGzUozbF.js → DA9GjKpR.js} +1 -1
- package/.output/public/_nuxt/{JkiDMdYG.js → DaWAlZhp.js} +1 -1
- package/.output/public/_nuxt/{OVQ3C2Ge.js → DafLMUHo.js} +1 -1
- package/.output/public/_nuxt/{Bw82IGM8.js → Dyaldc-t.js} +1 -1
- package/.output/public/_nuxt/{CsQL5F-l.js → UU9fpRNQ.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/717459d8-0da1-42ed-af0b-9ec5395e8fdc.json +1 -0
- package/.output/public/_nuxt/entry.CDPplHzk.css +1 -0
- package/.output/public/_nuxt/error-404.hPtlUQpd.css +1 -0
- package/.output/public/_nuxt/error-500.E-PXUb6B.css +1 -0
- package/.output/public/_nuxt/{DbUZZZZu.js → kFZJW2-u.js} +2 -2
- package/.output/public/_nuxt/{B8gqXD2U.js → u3DlT5Mh.js} +1 -1
- package/.output/server/chunks/_/error-500.mjs.map +1 -1
- package/.output/server/chunks/_/parse-request.mjs +29 -0
- package/.output/server/chunks/_/parse-request.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{error-404-KRkA0DPI.mjs → error-404-aQ5PiVuX.mjs} +6 -12
- package/.output/server/chunks/build/error-404-aQ5PiVuX.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs +8 -0
- package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs.map +1 -0
- package/.output/server/chunks/build/{error-500-DIIFf55p.mjs → error-500-BY6ZAZZ2.mjs} +6 -12
- package/.output/server/chunks/build/error-500-BY6ZAZZ2.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs +8 -0
- package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs.map +1 -0
- package/.output/server/chunks/build/index-57_mtIua.mjs +235 -0
- package/.output/server/chunks/build/index-57_mtIua.mjs.map +1 -0
- package/.output/server/chunks/build/{index-CB1N4gax.mjs → index-Qa-4KqCB.mjs} +7 -13
- package/.output/server/chunks/build/index-Qa-4KqCB.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +3913 -3378
- package/.output/server/chunks/build/server.mjs.map +1 -1
- package/.output/server/chunks/build/styles.mjs +4 -4
- package/.output/server/chunks/nitro/nitro.mjs +562 -2188
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/editor-types.get.mjs +0 -6
- package/.output/server/chunks/routes/api/editor-types.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/parse.post.mjs +1599 -7
- package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/resolve.get.mjs +0 -6
- package/.output/server/chunks/routes/api/resolve.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/studio/run.post.mjs +41 -8
- package/.output/server/chunks/routes/api/studio/run.post.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +21 -44
- package/.output/server/chunks/routes/renderer.mjs.map +1 -1
- package/.output/server/index.mjs +1 -7
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/dist/compiler-core.cjs.prod.js +6801 -0
- package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/package.json +58 -0
- package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/dist/compiler-dom.cjs.prod.js +692 -0
- package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/package.json +57 -0
- package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/dist/reactivity.cjs.prod.js +1905 -0
- package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/package.json +55 -0
- package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/dist/runtime-core.cjs.prod.js +7006 -0
- package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/package.json +52 -0
- package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/dist/runtime-dom.cjs.prod.js +1867 -0
- package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/package.json +60 -0
- package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/dist/shared.cjs.prod.js +655 -0
- package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/package.json +47 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/array-set.js +121 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64.js +67 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/binary-search.js +111 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/quick-sort.js +141 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-consumer.js +1236 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-generator.js +446 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-node.js +420 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/util.js +594 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/package.json +71 -0
- package/.output/server/node_modules/.nitro/source-map-js@1.2.2/source-map.js +8 -0
- package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/.nitro/vue@3.5.43/index.js +7 -0
- package/.output/server/node_modules/.nitro/vue@3.5.43/index.mjs +1 -0
- package/.output/server/node_modules/.nitro/vue@3.5.43/package.json +112 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +55 -21
- package/.output/server/node_modules/@babel/parser/package.json +7 -7
- package/.output/server/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- package/.output/server/node_modules/@esbuild/linux-x64/package.json +1 -1
- package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +19 -16
- package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +3 -4
- package/.output/server/node_modules/@iconify/utils/lib/css/common.js +16 -16
- package/.output/server/node_modules/@iconify/utils/lib/css/format.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +11 -14
- package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +13 -16
- package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +2 -5
- package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +4 -5
- package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +9 -11
- package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +12 -18
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +3 -4
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +5 -7
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +1 -8
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +11 -12
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +5 -7
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +7 -7
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +2 -4
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +5 -9
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +3 -5
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +2 -4
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +7 -8
- package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +3 -4
- package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +10 -15
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +3 -5
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +21 -13
- package/.output/server/node_modules/@iconify/utils/lib/index.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +3 -3
- package/.output/server/node_modules/@iconify/utils/lib/loader/hmr-utils.js +33 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +22 -22
- package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +7 -22
- package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +60 -16
- package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +9 -11
- package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +1 -3
- package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +3 -5
- package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +5 -4
- package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +1 -2
- package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +2 -3
- package/.output/server/node_modules/@iconify/utils/package.json +15 -13
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +8 -1
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +34 -13
- package/.output/server/node_modules/@vue/server-renderer/package.json +4 -6
- package/.output/server/node_modules/devalue/index.js +15 -2
- package/.output/server/node_modules/devalue/package.json +5 -3
- package/.output/server/node_modules/devalue/src/base64.js +46 -96
- package/.output/server/node_modules/devalue/src/constants.js +5 -0
- package/.output/server/node_modules/devalue/src/operations.js +221 -0
- package/.output/server/node_modules/devalue/src/parse.js +76 -62
- package/.output/server/node_modules/devalue/src/stringify.js +164 -81
- package/.output/server/node_modules/devalue/src/uneval.js +312 -104
- package/.output/server/node_modules/devalue/src/utils.js +61 -19
- package/.output/server/node_modules/esbuild/lib/main.js +12 -8
- package/.output/server/node_modules/esbuild/package.json +50 -50
- package/.output/server/node_modules/hookable/dist/index.mjs +2 -11
- package/.output/server/node_modules/hookable/package.json +23 -22
- package/.output/server/node_modules/ip-address/dist/ipv4.js +7 -0
- package/.output/server/node_modules/ip-address/package.json +1 -1
- package/.output/server/node_modules/zod/package.json +20 -8
- package/.output/server/node_modules/zod/v4/classic/checks.js +1 -1
- package/.output/server/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/.output/server/node_modules/zod/v4/classic/errors.js +44 -35
- package/.output/server/node_modules/zod/v4/classic/external.js +5 -8
- package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +375 -78
- package/.output/server/node_modules/zod/v4/classic/in-out.js +36 -0
- package/.output/server/node_modules/zod/v4/classic/index.js +2 -2
- package/.output/server/node_modules/zod/v4/classic/iso.js +2 -17
- package/.output/server/node_modules/zod/v4/classic/package.json +2 -1
- package/.output/server/node_modules/zod/v4/classic/parse.js +1 -0
- package/.output/server/node_modules/zod/v4/classic/schemas.js +601 -223
- package/.output/server/node_modules/zod/v4/core/api.js +51 -26
- package/.output/server/node_modules/zod/v4/core/checks.js +68 -127
- package/.output/server/node_modules/zod/v4/core/compile.js +1858 -0
- package/.output/server/node_modules/zod/v4/core/core.js +87 -22
- package/.output/server/node_modules/zod/v4/core/doc.js +12 -9
- package/.output/server/node_modules/zod/v4/core/errors.js +127 -42
- package/.output/server/node_modules/zod/v4/core/index.js +3 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +413 -175
- package/.output/server/node_modules/zod/v4/core/memoizer.js +311 -0
- package/.output/server/node_modules/zod/v4/core/package.json +2 -1
- package/.output/server/node_modules/zod/v4/core/parse.js +130 -48
- package/.output/server/node_modules/zod/v4/core/regexes.js +39 -16
- package/.output/server/node_modules/zod/v4/core/registries.js +2 -2
- package/.output/server/node_modules/zod/v4/core/schemas.js +895 -382
- package/.output/server/node_modules/zod/v4/core/to-json-schema.js +253 -39
- package/.output/server/node_modules/zod/v4/core/util.js +383 -175
- package/.output/server/node_modules/zod/v4/core/versions.js +2 -2
- package/.output/server/node_modules/zod/v4/core/visit.js +169 -0
- package/.output/server/node_modules/zod/v4/index.js +3 -2
- package/.output/server/node_modules/zod/v4/locales/ar.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/az.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/be.js +12 -0
- package/.output/server/node_modules/zod/v4/locales/bg.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/bn.js +113 -0
- package/.output/server/node_modules/zod/v4/locales/ca.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/ckb.js +133 -0
- package/.output/server/node_modules/zod/v4/locales/cs.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/da.js +7 -2
- package/.output/server/node_modules/zod/v4/locales/de.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/el.js +112 -0
- package/.output/server/node_modules/zod/v4/locales/en.js +20 -4
- package/.output/server/node_modules/zod/v4/locales/eo.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/es.js +4 -0
- package/.output/server/node_modules/zod/v4/locales/fa.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/fi.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/fr.js +38 -17
- package/.output/server/node_modules/zod/v4/locales/gu.js +113 -0
- package/.output/server/node_modules/zod/v4/locales/he.js +7 -0
- package/.output/server/node_modules/zod/v4/locales/hi.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/hr.js +126 -0
- package/.output/server/node_modules/zod/v4/locales/hu.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/hy.js +11 -0
- package/.output/server/node_modules/zod/v4/locales/id.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/index.js +14 -0
- package/.output/server/node_modules/zod/v4/locales/is.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/it.js +6 -1
- package/.output/server/node_modules/zod/v4/locales/ja.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/ka.js +13 -8
- package/.output/server/node_modules/zod/v4/locales/km.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/kn.js +116 -0
- package/.output/server/node_modules/zod/v4/locales/ko.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/lt.js +4 -0
- package/.output/server/node_modules/zod/v4/locales/mk.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/ms.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/ne.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/nl.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/nn.js +113 -0
- package/.output/server/node_modules/zod/v4/locales/no.js +7 -2
- package/.output/server/node_modules/zod/v4/locales/ota.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/package.json +2 -1
- package/.output/server/node_modules/zod/v4/locales/pl.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/ps.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/.output/server/node_modules/zod/v4/locales/pt.js +89 -55
- package/.output/server/node_modules/zod/v4/locales/ro.js +122 -0
- package/.output/server/node_modules/zod/v4/locales/ru.js +12 -0
- package/.output/server/node_modules/zod/v4/locales/sk.js +116 -0
- package/.output/server/node_modules/zod/v4/locales/sl.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/sv.js +7 -2
- package/.output/server/node_modules/zod/v4/locales/ta.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/tg.js +117 -0
- package/.output/server/node_modules/zod/v4/locales/th.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/tk.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/tr.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/uk.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/ur.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/uz.js +4 -0
- package/.output/server/node_modules/zod/v4/locales/vi.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/yo.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/.output/server/node_modules/zod/v4/package.json +2 -1
- package/.output/server/package.json +18 -18
- package/README.md +9 -0
- package/package.json +8 -8
- package/.output/public/_nuxt/Czp4_2o-.js +0 -33
- package/.output/public/_nuxt/builds/meta/46174b5e-cab6-4a73-95f8-66a1c9b1be2b.json +0 -1
- package/.output/public/_nuxt/entry.DaqrxXuH.css +0 -1
- package/.output/public/_nuxt/error-404.CTSXlFYa.css +0 -1
- package/.output/public/_nuxt/error-500.DqEfQnVZ.css +0 -1
- package/.output/server/chunks/build/error-404-KRkA0DPI.mjs.map +0 -1
- package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs +0 -8
- package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs.map +0 -1
- package/.output/server/chunks/build/error-500-DIIFf55p.mjs.map +0 -1
- package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs +0 -8
- package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs.map +0 -1
- package/.output/server/chunks/build/index-CB1N4gax.mjs.map +0 -1
- /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/dist/compiler-core.cjs.prod.js +0 -0
- /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/package.json +0 -0
- /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/dist/compiler-dom.cjs.prod.js +0 -0
- /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/package.json +0 -0
- /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/dist/reactivity.cjs.prod.js +0 -0
- /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/package.json +0 -0
- /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/dist/runtime-core.cjs.prod.js +0 -0
- /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/package.json +0 -0
- /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/dist/runtime-dom.cjs.prod.js +0 -0
- /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/package.json +0 -0
- /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/dist/shared.cjs.prod.js +0 -0
- /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/package.json +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/array-set.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64-vlq.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/binary-search.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/mapping-list.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/quick-sort.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-consumer.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-generator.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-node.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/util.js +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/package.json +0 -0
- /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/source-map.js +0 -0
- /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.js +0 -0
- /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.prod.js +0 -0
- /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.js +0 -0
- /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.mjs +0 -0
- /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/package.json +0 -0
- /package/.output/server/node_modules/{vue → .nitro/vue@3.5.43}/server-renderer/index.mjs +0 -0
|
@@ -2,20 +2,18 @@ import * as checks from "./checks.js";
|
|
|
2
2
|
import * as registries from "./registries.js";
|
|
3
3
|
import * as schemas from "./schemas.js";
|
|
4
4
|
import * as util from "./util.js";
|
|
5
|
+
function snapshotChecks(def) {
|
|
6
|
+
if (def.checks)
|
|
7
|
+
def.checks = [...def.checks];
|
|
8
|
+
return def;
|
|
9
|
+
}
|
|
5
10
|
// @__NO_SIDE_EFFECTS__
|
|
6
11
|
export function _string(Class, params) {
|
|
7
|
-
return new Class({
|
|
8
|
-
type: "string",
|
|
9
|
-
...util.normalizeParams(params),
|
|
10
|
-
});
|
|
12
|
+
return new Class(snapshotChecks({ type: "string", ...util.normalizeParams(params) }));
|
|
11
13
|
}
|
|
12
14
|
// @__NO_SIDE_EFFECTS__
|
|
13
15
|
export function _coercedString(Class, params) {
|
|
14
|
-
return new Class({
|
|
15
|
-
type: "string",
|
|
16
|
-
coerce: true,
|
|
17
|
-
...util.normalizeParams(params),
|
|
18
|
-
});
|
|
16
|
+
return new Class(snapshotChecks({ type: "string", coerce: true, ...util.normalizeParams(params) }));
|
|
19
17
|
}
|
|
20
18
|
// @__NO_SIDE_EFFECTS__
|
|
21
19
|
export function _email(Class, params) {
|
|
@@ -110,6 +108,11 @@ export function _nanoid(Class, params) {
|
|
|
110
108
|
...util.normalizeParams(params),
|
|
111
109
|
});
|
|
112
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
113
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
114
|
+
* See https://github.com/paralleldrive/cuid.
|
|
115
|
+
*/
|
|
113
116
|
// @__NO_SIDE_EFFECTS__
|
|
114
117
|
export function _cuid(Class, params) {
|
|
115
118
|
return new Class({
|
|
@@ -241,6 +244,26 @@ export function _e164(Class, params) {
|
|
|
241
244
|
});
|
|
242
245
|
}
|
|
243
246
|
// @__NO_SIDE_EFFECTS__
|
|
247
|
+
export function _creditCard(Class, params) {
|
|
248
|
+
return new Class({
|
|
249
|
+
type: "string",
|
|
250
|
+
format: "credit_card",
|
|
251
|
+
check: "string_format",
|
|
252
|
+
abort: false,
|
|
253
|
+
...util.normalizeParams(params),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
// @__NO_SIDE_EFFECTS__
|
|
257
|
+
export function _iban(Class, params) {
|
|
258
|
+
return new Class({
|
|
259
|
+
type: "string",
|
|
260
|
+
format: "iban",
|
|
261
|
+
check: "string_format",
|
|
262
|
+
abort: false,
|
|
263
|
+
...util.normalizeParams(params),
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
// @__NO_SIDE_EFFECTS__
|
|
244
267
|
export function _jwt(Class, params) {
|
|
245
268
|
return new Class({
|
|
246
269
|
type: "string",
|
|
@@ -299,20 +322,11 @@ export function _isoDuration(Class, params) {
|
|
|
299
322
|
}
|
|
300
323
|
// @__NO_SIDE_EFFECTS__
|
|
301
324
|
export function _number(Class, params) {
|
|
302
|
-
return new Class({
|
|
303
|
-
type: "number",
|
|
304
|
-
checks: [],
|
|
305
|
-
...util.normalizeParams(params),
|
|
306
|
-
});
|
|
325
|
+
return new Class(snapshotChecks({ type: "number", checks: [], ...util.normalizeParams(params) }));
|
|
307
326
|
}
|
|
308
327
|
// @__NO_SIDE_EFFECTS__
|
|
309
328
|
export function _coercedNumber(Class, params) {
|
|
310
|
-
return new Class({
|
|
311
|
-
type: "number",
|
|
312
|
-
coerce: true,
|
|
313
|
-
checks: [],
|
|
314
|
-
...util.normalizeParams(params),
|
|
315
|
-
});
|
|
329
|
+
return new Class(snapshotChecks({ type: "number", coerce: true, checks: [], ...util.normalizeParams(params) }));
|
|
316
330
|
}
|
|
317
331
|
// @__NO_SIDE_EFFECTS__
|
|
318
332
|
export function _int(Class, params) {
|
|
@@ -663,6 +677,14 @@ export function _property(property, schema, params) {
|
|
|
663
677
|
});
|
|
664
678
|
}
|
|
665
679
|
// @__NO_SIDE_EFFECTS__
|
|
680
|
+
export function _properties(shape, params) {
|
|
681
|
+
return new checks.$ZodCheckProperties({
|
|
682
|
+
check: "properties",
|
|
683
|
+
shape,
|
|
684
|
+
...util.normalizeParams(params),
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
// @__NO_SIDE_EFFECTS__
|
|
666
688
|
export function _mime(types, params) {
|
|
667
689
|
return new checks.$ZodCheckMimeType({
|
|
668
690
|
check: "mime_type",
|
|
@@ -733,7 +755,7 @@ export function _xor(Class, options, params) {
|
|
|
733
755
|
export function _discriminatedUnion(Class, discriminator, options, params) {
|
|
734
756
|
return new Class({
|
|
735
757
|
type: "union",
|
|
736
|
-
options,
|
|
758
|
+
options: options,
|
|
737
759
|
discriminator,
|
|
738
760
|
...util.normalizeParams(params),
|
|
739
761
|
});
|
|
@@ -890,7 +912,7 @@ export function _catch(Class, innerType, catchValue) {
|
|
|
890
912
|
return new Class({
|
|
891
913
|
type: "catch",
|
|
892
914
|
innerType,
|
|
893
|
-
catchValue: (typeof catchValue === "function" ? catchValue : (
|
|
915
|
+
catchValue: (typeof catchValue === "function" ? catchValue : util.constantCatch(catchValue)),
|
|
894
916
|
});
|
|
895
917
|
}
|
|
896
918
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -954,7 +976,7 @@ export function _refine(Class, fn, _params) {
|
|
|
954
976
|
return schema;
|
|
955
977
|
}
|
|
956
978
|
// @__NO_SIDE_EFFECTS__
|
|
957
|
-
export function _superRefine(fn) {
|
|
979
|
+
export function _superRefine(fn, params) {
|
|
958
980
|
const ch = _check((payload) => {
|
|
959
981
|
payload.addIssue = (issue) => {
|
|
960
982
|
if (typeof issue === "string") {
|
|
@@ -966,14 +988,15 @@ export function _superRefine(fn) {
|
|
|
966
988
|
if (_issue.fatal)
|
|
967
989
|
_issue.continue = false;
|
|
968
990
|
_issue.code ?? (_issue.code = "custom");
|
|
969
|
-
|
|
991
|
+
if (!("input" in _issue))
|
|
992
|
+
_issue.input = payload.value;
|
|
970
993
|
_issue.inst ?? (_issue.inst = ch);
|
|
971
994
|
_issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...
|
|
972
995
|
payload.issues.push(util.issue(_issue));
|
|
973
996
|
}
|
|
974
997
|
};
|
|
975
998
|
return fn(payload.value, payload);
|
|
976
|
-
});
|
|
999
|
+
}, params);
|
|
977
1000
|
return ch;
|
|
978
1001
|
}
|
|
979
1002
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1061,13 +1084,15 @@ export function _stringbool(Classes, _params) {
|
|
|
1061
1084
|
}),
|
|
1062
1085
|
error: params.error,
|
|
1063
1086
|
});
|
|
1087
|
+
codec._zod.bag.truthy = truthyArray;
|
|
1088
|
+
codec._zod.bag.falsy = falsyArray;
|
|
1089
|
+
codec._zod.bag.case = params.case ?? "insensitive";
|
|
1064
1090
|
return codec;
|
|
1065
1091
|
}
|
|
1066
1092
|
// @__NO_SIDE_EFFECTS__
|
|
1067
1093
|
export function _stringFormat(Class, format, fnOrRegex, _params = {}) {
|
|
1068
1094
|
const params = util.normalizeParams(_params);
|
|
1069
1095
|
const def = {
|
|
1070
|
-
...util.normalizeParams(_params),
|
|
1071
1096
|
check: "string_format",
|
|
1072
1097
|
type: "string",
|
|
1073
1098
|
format,
|
|
@@ -8,6 +8,16 @@ export const $ZodCheck = /*@__PURE__*/ core.$constructor("$ZodCheck", (inst, def
|
|
|
8
8
|
inst._zod.def = def;
|
|
9
9
|
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
10
10
|
});
|
|
11
|
+
/** Default `when` for size-based checks: run only on non-nullish values with a `size`. */
|
|
12
|
+
const _whenHasSize = (payload) => {
|
|
13
|
+
const val = payload.value;
|
|
14
|
+
return !util.nullish(val) && val.size !== undefined;
|
|
15
|
+
};
|
|
16
|
+
/** Default `when` for length-based checks: run only on non-nullish values with a `length`. */
|
|
17
|
+
const _whenHasLength = (payload) => {
|
|
18
|
+
const val = payload.value;
|
|
19
|
+
return !util.nullish(val) && val.length !== undefined;
|
|
20
|
+
};
|
|
11
21
|
const numericOriginMap = {
|
|
12
22
|
number: "number",
|
|
13
23
|
bigint: "bigint",
|
|
@@ -16,22 +26,12 @@ const numericOriginMap = {
|
|
|
16
26
|
export const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor("$ZodCheckLessThan", (inst, def) => {
|
|
17
27
|
$ZodCheck.init(inst, def);
|
|
18
28
|
const origin = numericOriginMap[typeof def.value];
|
|
19
|
-
inst._zod.onattach.push((inst) => {
|
|
20
|
-
const bag = inst._zod.bag;
|
|
21
|
-
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
22
|
-
if (def.value < curr) {
|
|
23
|
-
if (def.inclusive)
|
|
24
|
-
bag.maximum = def.value;
|
|
25
|
-
else
|
|
26
|
-
bag.exclusiveMaximum = def.value;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
29
|
inst._zod.check = (payload) => {
|
|
30
30
|
if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
payload.issues.push({
|
|
34
|
-
origin,
|
|
34
|
+
origin: numericOriginMap[typeof payload.value] ?? origin,
|
|
35
35
|
code: "too_big",
|
|
36
36
|
maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
37
37
|
input: payload.value,
|
|
@@ -44,22 +44,12 @@ export const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor("$ZodCheckLessT
|
|
|
44
44
|
export const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
45
45
|
$ZodCheck.init(inst, def);
|
|
46
46
|
const origin = numericOriginMap[typeof def.value];
|
|
47
|
-
inst._zod.onattach.push((inst) => {
|
|
48
|
-
const bag = inst._zod.bag;
|
|
49
|
-
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
50
|
-
if (def.value > curr) {
|
|
51
|
-
if (def.inclusive)
|
|
52
|
-
bag.minimum = def.value;
|
|
53
|
-
else
|
|
54
|
-
bag.exclusiveMinimum = def.value;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
47
|
inst._zod.check = (payload) => {
|
|
58
48
|
if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
|
|
59
49
|
return;
|
|
60
50
|
}
|
|
61
51
|
payload.issues.push({
|
|
62
|
-
origin,
|
|
52
|
+
origin: numericOriginMap[typeof payload.value] ?? origin,
|
|
63
53
|
code: "too_small",
|
|
64
54
|
minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
65
55
|
input: payload.value,
|
|
@@ -72,15 +62,12 @@ export const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor("$ZodCheckGr
|
|
|
72
62
|
export const $ZodCheckMultipleOf =
|
|
73
63
|
/*@__PURE__*/ core.$constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
74
64
|
$ZodCheck.init(inst, def);
|
|
75
|
-
inst._zod.onattach.push((inst) => {
|
|
76
|
-
var _a;
|
|
77
|
-
(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
|
|
78
|
-
});
|
|
79
65
|
inst._zod.check = (payload) => {
|
|
80
66
|
if (typeof payload.value !== typeof def.value)
|
|
81
67
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
82
68
|
const isMultiple = typeof payload.value === "bigint"
|
|
83
|
-
?
|
|
69
|
+
? // `value % 0n` throws, and nothing is a multiple of zero — the number branch already fails this way via NaN
|
|
70
|
+
def.value !== BigInt(0) && payload.value % def.value === BigInt(0)
|
|
84
71
|
: util.floatSafeRemainder(payload.value, def.value) === 0;
|
|
85
72
|
if (isMultiple)
|
|
86
73
|
return;
|
|
@@ -100,14 +87,6 @@ export const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor("$ZodCheckN
|
|
|
100
87
|
const isInt = def.format?.includes("int");
|
|
101
88
|
const origin = isInt ? "int" : "number";
|
|
102
89
|
const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];
|
|
103
|
-
inst._zod.onattach.push((inst) => {
|
|
104
|
-
const bag = inst._zod.bag;
|
|
105
|
-
bag.format = def.format;
|
|
106
|
-
bag.minimum = minimum;
|
|
107
|
-
bag.maximum = maximum;
|
|
108
|
-
if (isInt)
|
|
109
|
-
bag.pattern = regexes.integer;
|
|
110
|
-
});
|
|
111
90
|
inst._zod.check = (payload) => {
|
|
112
91
|
const input = payload.value;
|
|
113
92
|
if (isInt) {
|
|
@@ -196,12 +175,6 @@ export const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor("$ZodCheckN
|
|
|
196
175
|
export const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor("$ZodCheckBigIntFormat", (inst, def) => {
|
|
197
176
|
$ZodCheck.init(inst, def); // no format checks
|
|
198
177
|
const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];
|
|
199
|
-
inst._zod.onattach.push((inst) => {
|
|
200
|
-
const bag = inst._zod.bag;
|
|
201
|
-
bag.format = def.format;
|
|
202
|
-
bag.minimum = minimum;
|
|
203
|
-
bag.maximum = maximum;
|
|
204
|
-
});
|
|
205
178
|
inst._zod.check = (payload) => {
|
|
206
179
|
const input = payload.value;
|
|
207
180
|
if (input < minimum) {
|
|
@@ -231,15 +204,7 @@ export const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor("$ZodCheckB
|
|
|
231
204
|
export const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
232
205
|
var _a;
|
|
233
206
|
$ZodCheck.init(inst, def);
|
|
234
|
-
(_a = inst._zod.def).when ?? (_a.when =
|
|
235
|
-
const val = payload.value;
|
|
236
|
-
return !util.nullish(val) && val.size !== undefined;
|
|
237
|
-
});
|
|
238
|
-
inst._zod.onattach.push((inst) => {
|
|
239
|
-
const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);
|
|
240
|
-
if (def.maximum < curr)
|
|
241
|
-
inst._zod.bag.maximum = def.maximum;
|
|
242
|
-
});
|
|
207
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasSize);
|
|
243
208
|
inst._zod.check = (payload) => {
|
|
244
209
|
const input = payload.value;
|
|
245
210
|
const size = input.size;
|
|
@@ -259,15 +224,7 @@ export const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor("$ZodCheckMaxSiz
|
|
|
259
224
|
export const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor("$ZodCheckMinSize", (inst, def) => {
|
|
260
225
|
var _a;
|
|
261
226
|
$ZodCheck.init(inst, def);
|
|
262
|
-
(_a = inst._zod.def).when ?? (_a.when =
|
|
263
|
-
const val = payload.value;
|
|
264
|
-
return !util.nullish(val) && val.size !== undefined;
|
|
265
|
-
});
|
|
266
|
-
inst._zod.onattach.push((inst) => {
|
|
267
|
-
const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);
|
|
268
|
-
if (def.minimum > curr)
|
|
269
|
-
inst._zod.bag.minimum = def.minimum;
|
|
270
|
-
});
|
|
227
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasSize);
|
|
271
228
|
inst._zod.check = (payload) => {
|
|
272
229
|
const input = payload.value;
|
|
273
230
|
const size = input.size;
|
|
@@ -287,16 +244,7 @@ export const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor("$ZodCheckMinSiz
|
|
|
287
244
|
export const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
288
245
|
var _a;
|
|
289
246
|
$ZodCheck.init(inst, def);
|
|
290
|
-
(_a = inst._zod.def).when ?? (_a.when =
|
|
291
|
-
const val = payload.value;
|
|
292
|
-
return !util.nullish(val) && val.size !== undefined;
|
|
293
|
-
});
|
|
294
|
-
inst._zod.onattach.push((inst) => {
|
|
295
|
-
const bag = inst._zod.bag;
|
|
296
|
-
bag.minimum = def.size;
|
|
297
|
-
bag.maximum = def.size;
|
|
298
|
-
bag.size = def.size;
|
|
299
|
-
});
|
|
247
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasSize);
|
|
300
248
|
inst._zod.check = (payload) => {
|
|
301
249
|
const input = payload.value;
|
|
302
250
|
const size = input.size;
|
|
@@ -317,18 +265,12 @@ export const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor("$ZodCheckSiz
|
|
|
317
265
|
export const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
318
266
|
var _a;
|
|
319
267
|
$ZodCheck.init(inst, def);
|
|
320
|
-
(_a = inst._zod.def).when ?? (_a.when =
|
|
321
|
-
const val = payload.value;
|
|
322
|
-
return !util.nullish(val) && val.length !== undefined;
|
|
323
|
-
});
|
|
324
|
-
inst._zod.onattach.push((inst) => {
|
|
325
|
-
const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);
|
|
326
|
-
if (def.maximum < curr)
|
|
327
|
-
inst._zod.bag.maximum = def.maximum;
|
|
328
|
-
});
|
|
268
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
329
269
|
inst._zod.check = (payload) => {
|
|
330
270
|
const input = payload.value;
|
|
331
|
-
const
|
|
271
|
+
const units = input.length;
|
|
272
|
+
// Strings are measured in Unicode code points, not UTF-16 units. A code point is at most two units, so a string that already fits in units fits in code points; only an overflow has to be counted.
|
|
273
|
+
const length = typeof input === "string" && units > def.maximum ? util.codePointLength(input) : units;
|
|
332
274
|
if (length <= def.maximum)
|
|
333
275
|
return;
|
|
334
276
|
const origin = util.getLengthableOrigin(input);
|
|
@@ -346,18 +288,14 @@ export const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor("$ZodCheckMaxL
|
|
|
346
288
|
export const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor("$ZodCheckMinLength", (inst, def) => {
|
|
347
289
|
var _a;
|
|
348
290
|
$ZodCheck.init(inst, def);
|
|
349
|
-
(_a = inst._zod.def).when ?? (_a.when =
|
|
350
|
-
const val = payload.value;
|
|
351
|
-
return !util.nullish(val) && val.length !== undefined;
|
|
352
|
-
});
|
|
353
|
-
inst._zod.onattach.push((inst) => {
|
|
354
|
-
const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);
|
|
355
|
-
if (def.minimum > curr)
|
|
356
|
-
inst._zod.bag.minimum = def.minimum;
|
|
357
|
-
});
|
|
291
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
358
292
|
inst._zod.check = (payload) => {
|
|
359
293
|
const input = payload.value;
|
|
360
|
-
const
|
|
294
|
+
const units = input.length;
|
|
295
|
+
// A code point is one or two UTF-16 units, so fewer units than the floor can never reach it and twice the floor always clears it. Only in between is the exact count in doubt.
|
|
296
|
+
const length = typeof input === "string" && units >= def.minimum && units < def.minimum * 2
|
|
297
|
+
? util.codePointLength(input)
|
|
298
|
+
: units;
|
|
361
299
|
if (length >= def.minimum)
|
|
362
300
|
return;
|
|
363
301
|
const origin = util.getLengthableOrigin(input);
|
|
@@ -375,19 +313,14 @@ export const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor("$ZodCheckMinL
|
|
|
375
313
|
export const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
376
314
|
var _a;
|
|
377
315
|
$ZodCheck.init(inst, def);
|
|
378
|
-
(_a = inst._zod.def).when ?? (_a.when =
|
|
379
|
-
const val = payload.value;
|
|
380
|
-
return !util.nullish(val) && val.length !== undefined;
|
|
381
|
-
});
|
|
382
|
-
inst._zod.onattach.push((inst) => {
|
|
383
|
-
const bag = inst._zod.bag;
|
|
384
|
-
bag.minimum = def.length;
|
|
385
|
-
bag.maximum = def.length;
|
|
386
|
-
bag.length = def.length;
|
|
387
|
-
});
|
|
316
|
+
(_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
|
|
388
317
|
inst._zod.check = (payload) => {
|
|
389
318
|
const input = payload.value;
|
|
390
|
-
const
|
|
319
|
+
const units = input.length;
|
|
320
|
+
// A code point is one or two UTF-16 units, so outside `[length, length * 2]` units the target is missed either way — and missed in the same direction in both measures.
|
|
321
|
+
const length = typeof input === "string" && units >= def.length && units <= def.length * 2
|
|
322
|
+
? util.codePointLength(input)
|
|
323
|
+
: units;
|
|
391
324
|
if (length === def.length)
|
|
392
325
|
return;
|
|
393
326
|
const origin = util.getLengthableOrigin(input);
|
|
@@ -406,14 +339,6 @@ export const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor("$ZodCheckL
|
|
|
406
339
|
export const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
407
340
|
var _a, _b;
|
|
408
341
|
$ZodCheck.init(inst, def);
|
|
409
|
-
inst._zod.onattach.push((inst) => {
|
|
410
|
-
const bag = inst._zod.bag;
|
|
411
|
-
bag.format = def.format;
|
|
412
|
-
if (def.pattern) {
|
|
413
|
-
bag.patterns ?? (bag.patterns = new Set());
|
|
414
|
-
bag.patterns.add(def.pattern);
|
|
415
|
-
}
|
|
416
|
-
});
|
|
417
342
|
if (def.pattern)
|
|
418
343
|
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
419
344
|
def.pattern.lastIndex = 0;
|
|
@@ -460,13 +385,11 @@ export const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor("$ZodCheckUppe
|
|
|
460
385
|
export const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor("$ZodCheckIncludes", (inst, def) => {
|
|
461
386
|
$ZodCheck.init(inst, def);
|
|
462
387
|
const escapedRegex = util.escapeRegex(def.includes);
|
|
463
|
-
|
|
388
|
+
// `String.prototype.includes(sub, position)` matches `sub` at `position`
|
|
389
|
+
// OR LATER, so the pattern must allow at least `position` leading chars
|
|
390
|
+
// (`{N,}`), not exactly `position` chars (`{N}`).
|
|
391
|
+
const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
|
|
464
392
|
def.pattern = pattern;
|
|
465
|
-
inst._zod.onattach.push((inst) => {
|
|
466
|
-
const bag = inst._zod.bag;
|
|
467
|
-
bag.patterns ?? (bag.patterns = new Set());
|
|
468
|
-
bag.patterns.add(pattern);
|
|
469
|
-
});
|
|
470
393
|
inst._zod.check = (payload) => {
|
|
471
394
|
if (payload.value.includes(def.includes, def.position))
|
|
472
395
|
return;
|
|
@@ -485,11 +408,6 @@ export const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor("$ZodCheckSta
|
|
|
485
408
|
$ZodCheck.init(inst, def);
|
|
486
409
|
const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);
|
|
487
410
|
def.pattern ?? (def.pattern = pattern);
|
|
488
|
-
inst._zod.onattach.push((inst) => {
|
|
489
|
-
const bag = inst._zod.bag;
|
|
490
|
-
bag.patterns ?? (bag.patterns = new Set());
|
|
491
|
-
bag.patterns.add(pattern);
|
|
492
|
-
});
|
|
493
411
|
inst._zod.check = (payload) => {
|
|
494
412
|
if (payload.value.startsWith(def.prefix))
|
|
495
413
|
return;
|
|
@@ -508,11 +426,6 @@ export const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor("$ZodCheckEndsW
|
|
|
508
426
|
$ZodCheck.init(inst, def);
|
|
509
427
|
const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);
|
|
510
428
|
def.pattern ?? (def.pattern = pattern);
|
|
511
|
-
inst._zod.onattach.push((inst) => {
|
|
512
|
-
const bag = inst._zod.bag;
|
|
513
|
-
bag.patterns ?? (bag.patterns = new Set());
|
|
514
|
-
bag.patterns.add(pattern);
|
|
515
|
-
});
|
|
516
429
|
inst._zod.check = (payload) => {
|
|
517
430
|
if (payload.value.endsWith(def.suffix))
|
|
518
431
|
return;
|
|
@@ -549,12 +462,40 @@ export const $ZodCheckProperty = /*@__PURE__*/ core.$constructor("$ZodCheckPrope
|
|
|
549
462
|
return;
|
|
550
463
|
};
|
|
551
464
|
});
|
|
465
|
+
export const $ZodCheckProperties = /*@__PURE__*/ core.$constructor("$ZodCheckProperties", (inst, def) => {
|
|
466
|
+
$ZodCheck.init(inst, def);
|
|
467
|
+
util.hide(inst, Symbol.iterator, function* () {
|
|
468
|
+
yield inst;
|
|
469
|
+
});
|
|
470
|
+
// 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
|
|
471
|
+
let entries;
|
|
472
|
+
inst._zod.check = (payload) => {
|
|
473
|
+
// the base schema already typed the value, so only a nullish one is rejected here: the properties read on a primitive too, matching z.property() on a string's length
|
|
474
|
+
if (payload.value == null) {
|
|
475
|
+
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
476
|
+
return undefined;
|
|
477
|
+
}
|
|
478
|
+
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
479
|
+
const input = payload.value;
|
|
480
|
+
let proms;
|
|
481
|
+
for (const [key, schema] of entries) {
|
|
482
|
+
const result = schema._zod.run({ value: input[key], issues: [] }, {});
|
|
483
|
+
if (result instanceof Promise) {
|
|
484
|
+
proms ?? (proms = []);
|
|
485
|
+
proms.push(result.then((result) => handleCheckPropertyResult(result, payload, key)));
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
handleCheckPropertyResult(result, payload, key);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (proms)
|
|
492
|
+
return Promise.all(proms).then(() => undefined);
|
|
493
|
+
return undefined;
|
|
494
|
+
};
|
|
495
|
+
});
|
|
552
496
|
export const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor("$ZodCheckMimeType", (inst, def) => {
|
|
553
497
|
$ZodCheck.init(inst, def);
|
|
554
498
|
const mimeSet = new Set(def.mime);
|
|
555
|
-
inst._zod.onattach.push((inst) => {
|
|
556
|
-
inst._zod.bag.mime = def.mime;
|
|
557
|
-
});
|
|
558
499
|
inst._zod.check = (payload) => {
|
|
559
500
|
if (mimeSet.has(payload.value.type))
|
|
560
501
|
return;
|