@openclaw/discord 2026.7.2-beta.2 → 2026.7.2-beta.4
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/{account-inspect-dFV0JrnR.js → account-inspect-Dztmn4J4.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-CMd4nzLB.js → accounts-D2LKPukU.js} +3 -10
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-D0D_87n3.js → activities-api-8TMGXUH4.js} +63 -69
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-B7qOH5xu.js → allow-list-DzKrtfah.js} +18 -7
- package/dist/{api-B88T4rFN.js → api-C43z8vUm.js} +3 -1
- package/dist/api.js +27 -18
- package/dist/{approval-handler.runtime-B7E1-x5q.js → approval-handler.runtime-ClZpan85.js} +7 -12
- package/dist/{conversation-identity-BPcbhCAH.js → approval-message-safety-LyND6GR3.js} +49 -3
- package/dist/{audit-CjpnY1yb.js → audit-CFfounXC.js} +4 -4
- package/dist/{channel-actions-BQct-o4T.js → channel-actions-C8n1zWZ-.js} +4 -4
- package/dist/{channel-actions.runtime-CC4QwYVO.js → channel-actions.runtime-CgJy35O0.js} +8 -8
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-BDfKr14H.js → channel-yq-so4jJ.js} +24 -21
- package/dist/{channel.setup-BS4gd8sc.js → channel.setup-Tn_O2B7F.js} +78 -31
- package/dist/{chunk-CHpY_lsO.js → chunk-BrZocpfs.js} +41 -110
- package/dist/{config-schema-CoDck1GW.js → config-schema-D-YrV-5E.js} +328 -57
- package/dist/{directory-config-G1QwBIdi.js → directory-config-DF85-bUY.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-nfvekMil.js → directory-live-CrMtTrb0.js} +4 -4
- package/dist/{doctor-Bq4pJAQk.js → doctor-CORGPgoY.js} +4 -4
- package/dist/{doctor-contract-wId6pV41.js → doctor-contract-BPUD3Di9.js} +46 -65
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-LYY75_Oa.js → handle-action.guild-admin-DikBWer5.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/legacy-state-migrations-api.js +1 -1
- package/dist/{manager.runtime-w6VVYQMl.js → manager.runtime-DVvlH8NR.js} +102 -149
- package/dist/message-handler-1ui-YxsF.js +564 -0
- package/dist/{message-handler.preflight-DnAH04Ss.js → message-handler.preflight-CAEQvP3t.js} +76 -47
- package/dist/{message-handler.process-ClgKz8I5.js → message-handler.process-REBztvIW.js} +617 -570
- package/dist/{message-utils-BU3gc01v.js → message-utils-ajbkdTVA.js} +60 -52
- package/dist/{outbound-adapter-ByoXsR-V.js → outbound-adapter-XZWo4_HD.js} +36 -5
- package/dist/{outbound-components-7wAolLuS.js → outbound-components-CTFDDcq5.js} +3 -3
- package/dist/{outbound-session-route-D4QqePZN.js → outbound-session-route-D_nc_Ayk.js} +36 -6
- package/dist/{pluralkit-r4wiI2yy.js → pluralkit-CCovPs9s.js} +5 -2
- package/dist/{preflight-audio-DDSZna4F.js → preflight-audio-BjnQZ5yS.js} +9 -6
- package/dist/{probe-WKeTYyJX.js → probe-Bci2pS8M.js} +2 -2
- package/dist/{probe.runtime-CRY-qUke.js → probe.runtime-C88gnnXj.js} +1 -1
- package/dist/{provider-PRlF_lZm.js → provider-CfiChtjf.js} +950 -878
- package/dist/{provider-session.runtime-BZPUZRjn.js → provider-session.runtime-D9GTBKPg.js} +3 -3
- package/dist/provider.runtime-DSzKjpKs.js +2 -0
- package/dist/{resolve-allowlist-common-QN7VMZaC.js → resolve-allowlist-common-C1hTvZa4.js} +3 -3
- package/dist/{resolve-channels-BO9NUPlS.js → resolve-channels-CmFAdMeQ.js} +4 -4
- package/dist/{resolve-users-CU3oG5-m.js → resolve-users-Cmu75lZy.js} +3 -3
- package/dist/{runtime-BsefAQ9q.js → runtime-D-6AugWA.js} +11 -10
- package/dist/{runtime-CCf5nkV3.js → runtime-TwM8IrZU.js} +2 -3
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +24 -24
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-DPa2ZoSK.js +5 -0
- package/dist/runtime-api.monitor.js +7 -8
- package/dist/runtime-api.send.js +6 -5
- package/dist/runtime-api.threads.js +6 -6
- package/dist/{secret-config-contract-BDNrRWvd.js → secret-config-contract-B1akrlyY.js} +1 -0
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit-aLbWmUjl.js → security-audit-njzOejQp.js} +2 -10
- package/dist/{security-audit.runtime-K0nkzjzJ.js → security-audit.runtime-DZbDdAnw.js} +1 -1
- package/dist/{send-JJzVo_sK.js → send-CfnXLUXq.js} +27 -88
- package/dist/{send.components-CCRW54gK.js → send.components-V7cyCKbH.js} +8 -6
- package/dist/{send.outbound-Cvulb-k_.js → send.outbound-BbC2qjpH.js} +303 -8
- package/dist/send.reactions-bLrJCZ4G.js +85 -0
- package/dist/send.receipt-CuwRrpFz.js +48 -0
- package/dist/{send.shared-XuOTO1dW.js → send.shared-Dfacnk-E.js} +7 -33
- package/dist/{sender-identity-C62lBe18.js → sender-identity-mG_zsdox.js} +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-Bngr0I-v.js → shared-DMA7f3a8.js} +31 -9
- package/dist/subagent-hooks-api.js +10 -1
- package/dist/{subagent-hooks-mSxRv4AE.js → subagent-hooks-kFyJQ-MK.js} +3 -3
- package/dist/subagent-progress-mjPRFz-a.js +664 -0
- package/dist/{system-events-BANBRAe3.js → system-events-BSlhBq3u.js} +2 -2
- package/dist/{target-resolver-BaEmTxeK.js → target-resolver-Bo1oWLPO.js} +3 -3
- package/dist/targets-CB8ahjZk.js +3 -0
- package/dist/{thread-bindings-4MV-u8vU.js → thread-bindings-DAHJuT22.js} +7 -8
- package/dist/{thread-bindings.discord-api-DXfXsHGZ.js → thread-bindings.discord-api-C_tCQcv3.js} +10 -6
- package/dist/{thread-bindings.manager-DJ4cO5Eu.js → thread-bindings.manager-DlZEGvC1.js} +5 -5
- package/dist/{thread-bindings.session-updates-DnTpkroM.js → thread-bindings.session-updates-DAIlp7Px.js} +1 -1
- package/dist/{thread-bindings.state-C5afR9TD.js → thread-bindings.state-Cgi5uRn-.js} +9 -48
- package/dist/{timeouts-D5lWili0.js → timeouts-B9cy6RvQ.js} +1 -6
- package/dist/{transcripts-source-TDZcMriu.js → transcripts-source-CyJ-sc3n.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-CKd2NMWG.js → typing-Ci9nhuSi.js} +2 -2
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/LICENSE +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/README.md +208 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.cjs +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/index.js +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/package.json +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/index.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/external.js +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/index.js +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/index.js +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/zod/v4-mini/index.js +1 -0
- package/node_modules/@types/debug/LICENSE +21 -0
- package/node_modules/@types/debug/README.md +69 -0
- package/node_modules/@types/debug/index.d.ts +50 -0
- package/node_modules/@types/debug/package.json +58 -0
- package/node_modules/@types/mdast/LICENSE +21 -0
- package/node_modules/@types/mdast/README.md +15 -0
- package/node_modules/@types/mdast/index.d.ts +1123 -0
- package/node_modules/@types/mdast/package.json +47 -0
- package/node_modules/@types/ms/LICENSE +21 -0
- package/node_modules/@types/ms/README.md +82 -0
- package/node_modules/@types/ms/index.d.ts +63 -0
- package/node_modules/@types/ms/package.json +26 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +16 -6
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/unist/LICENSE +21 -0
- package/node_modules/@types/unist/README.md +15 -0
- package/node_modules/@types/unist/index.d.ts +119 -0
- package/node_modules/@types/unist/package.json +60 -0
- package/node_modules/character-entities/index.d.ts +6 -0
- package/node_modules/character-entities/index.js +2132 -0
- package/node_modules/character-entities/license +22 -0
- package/node_modules/character-entities/package.json +78 -0
- package/node_modules/character-entities/readme.md +152 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/decode-named-character-reference/index.d.ts +13 -0
- package/node_modules/decode-named-character-reference/index.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts +6 -0
- package/node_modules/decode-named-character-reference/index.dom.d.ts.map +1 -0
- package/node_modules/decode-named-character-reference/index.dom.js +32 -0
- package/node_modules/decode-named-character-reference/index.js +19 -0
- package/node_modules/decode-named-character-reference/license +22 -0
- package/node_modules/decode-named-character-reference/package.json +90 -0
- package/node_modules/decode-named-character-reference/readme.md +136 -0
- package/node_modules/dequal/dist/index.js +86 -0
- package/node_modules/dequal/dist/index.min.js +1 -0
- package/node_modules/dequal/dist/index.mjs +84 -0
- package/node_modules/dequal/index.d.ts +1 -0
- package/node_modules/dequal/license +21 -0
- package/node_modules/dequal/lite/index.d.ts +1 -0
- package/node_modules/dequal/lite/index.js +31 -0
- package/node_modules/dequal/lite/index.min.js +1 -0
- package/node_modules/dequal/lite/index.mjs +29 -0
- package/node_modules/dequal/package.json +57 -0
- package/node_modules/dequal/readme.md +112 -0
- package/node_modules/devlop/lib/default.js +9 -0
- package/node_modules/devlop/lib/development.d.ts +84 -0
- package/node_modules/devlop/lib/development.js +238 -0
- package/node_modules/devlop/license +22 -0
- package/node_modules/devlop/package.json +80 -0
- package/node_modules/devlop/readme.md +360 -0
- package/node_modules/discord-api-types/CHANGELOG.md +9 -0
- package/node_modules/discord-api-types/package.json +4 -4
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts +5 -1
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/channel.js +4 -0
- package/node_modules/discord-api-types/payloads/v10/channel.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.d.ts +9 -2
- package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts +5 -1
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/channel.js +4 -0
- package/node_modules/discord-api-types/payloads/v9/channel.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.d.ts +9 -2
- package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
- package/node_modules/discord-api-types/rest/v10/channel.d.ts +39 -8
- package/node_modules/discord-api-types/rest/v10/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v10/channel.js.map +1 -1
- package/node_modules/discord-api-types/rest/v10/webhook.d.ts +3 -3
- package/node_modules/discord-api-types/rest/v9/channel.d.ts +39 -8
- package/node_modules/discord-api-types/rest/v9/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/rest/v9/channel.js.map +1 -1
- package/node_modules/discord-api-types/rest/v9/webhook.d.ts +3 -3
- package/node_modules/mdast-util-from-markdown/dev/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/dev/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/index.js +1348 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/dev/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/index.d.ts +23 -0
- package/node_modules/mdast-util-from-markdown/index.js +2 -0
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts +53 -0
- package/node_modules/mdast-util-from-markdown/lib/index.d.ts.map +1 -0
- package/node_modules/mdast-util-from-markdown/lib/index.js +1177 -0
- package/node_modules/mdast-util-from-markdown/lib/types.d.ts +295 -0
- package/node_modules/mdast-util-from-markdown/lib/types.js +2 -0
- package/node_modules/mdast-util-from-markdown/license +22 -0
- package/node_modules/mdast-util-from-markdown/package.json +99 -0
- package/node_modules/mdast-util-from-markdown/readme.md +535 -0
- package/node_modules/mdast-util-to-string/index.d.ts +2 -0
- package/node_modules/mdast-util-to-string/index.js +5 -0
- package/node_modules/mdast-util-to-string/lib/index.d.ts +31 -0
- package/node_modules/mdast-util-to-string/lib/index.js +108 -0
- package/node_modules/mdast-util-to-string/license +22 -0
- package/node_modules/mdast-util-to-string/package.json +78 -0
- package/node_modules/mdast-util-to-string/readme.md +218 -0
- package/node_modules/micromark/dev/index.d.ts +82 -0
- package/node_modules/micromark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark/dev/index.js +68 -0
- package/node_modules/micromark/dev/lib/compile.d.ts +16 -0
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/compile.js +1152 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/constructs.js +101 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/create-tokenizer.js +717 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/content.js +99 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/document.js +445 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/initialize/text.js +244 -0
- package/node_modules/micromark/dev/lib/parse.d.ts +10 -0
- package/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/parse.js +58 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/postprocess.js +19 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/dev/lib/preprocess.js +141 -0
- package/node_modules/micromark/dev/stream.d.ts +35 -0
- package/node_modules/micromark/dev/stream.d.ts.map +1 -0
- package/node_modules/micromark/dev/stream.js +270 -0
- package/node_modules/micromark/index.d.ts +82 -0
- package/node_modules/micromark/index.d.ts.map +1 -0
- package/node_modules/micromark/index.js +60 -0
- package/node_modules/micromark/lib/compile.d.ts +16 -0
- package/node_modules/micromark/lib/compile.d.ts.map +1 -0
- package/node_modules/micromark/lib/compile.js +1060 -0
- package/node_modules/micromark/lib/constructs.d.ts +73 -0
- package/node_modules/micromark/lib/constructs.d.ts.map +1 -0
- package/node_modules/micromark/lib/constructs.js +85 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
- package/node_modules/micromark/lib/create-tokenizer.js +611 -0
- package/node_modules/micromark/lib/initialize/content.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/content.js +79 -0
- package/node_modules/micromark/lib/initialize/document.d.ts +10 -0
- package/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/document.js +362 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
- package/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/flow.js +58 -0
- package/node_modules/micromark/lib/initialize/text.d.ts +8 -0
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
- package/node_modules/micromark/lib/initialize/text.js +212 -0
- package/node_modules/micromark/lib/parse.d.ts +10 -0
- package/node_modules/micromark/lib/parse.d.ts.map +1 -0
- package/node_modules/micromark/lib/parse.js +56 -0
- package/node_modules/micromark/lib/postprocess.d.ts +9 -0
- package/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/postprocess.js +18 -0
- package/node_modules/micromark/lib/preprocess.d.ts +13 -0
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
- package/node_modules/micromark/lib/preprocess.js +115 -0
- package/node_modules/micromark/license +22 -0
- package/node_modules/micromark/package.json +100 -0
- package/node_modules/micromark/readme.md +488 -0
- package/node_modules/micromark/stream.d.ts +35 -0
- package/node_modules/micromark/stream.d.ts.map +1 -0
- package/node_modules/micromark/stream.js +256 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/index.js +22 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +300 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +514 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +202 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +233 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +989 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +656 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +110 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +62 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +210 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
- package/node_modules/micromark-core-commonmark/index.d.ts +23 -0
- package/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/index.js +22 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/attention.js +241 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +460 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +177 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
- package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/content.js +163 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +195 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +876 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-end.js +560 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +102 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +55 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/list.js +213 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +185 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
- package/node_modules/micromark-core-commonmark/license +22 -0
- package/node_modules/micromark-core-commonmark/package.json +74 -0
- package/node_modules/micromark-core-commonmark/readme.md +171 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/dev/index.js +255 -0
- package/node_modules/micromark-factory-destination/index.d.ts +42 -0
- package/node_modules/micromark-factory-destination/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-destination/index.js +206 -0
- package/node_modules/micromark-factory-destination/license +22 -0
- package/node_modules/micromark-factory-destination/package.json +57 -0
- package/node_modules/micromark-factory-destination/readme.md +234 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/dev/index.js +172 -0
- package/node_modules/micromark-factory-label/index.d.ts +37 -0
- package/node_modules/micromark-factory-label/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-label/index.js +148 -0
- package/node_modules/micromark-factory-label/license +22 -0
- package/node_modules/micromark-factory-label/package.json +60 -0
- package/node_modules/micromark-factory-label/readme.md +224 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts +37 -0
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/dev/index.js +67 -0
- package/node_modules/micromark-factory-space/index.d.ts +37 -0
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-space/index.js +64 -0
- package/node_modules/micromark-factory-space/license +22 -0
- package/node_modules/micromark-factory-space/package.json +55 -0
- package/node_modules/micromark-factory-space/readme.md +225 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/dev/index.js +169 -0
- package/node_modules/micromark-factory-title/index.d.ts +36 -0
- package/node_modules/micromark-factory-title/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-title/index.js +158 -0
- package/node_modules/micromark-factory-title/license +22 -0
- package/node_modules/micromark-factory-title/package.json +58 -0
- package/node_modules/micromark-factory-title/readme.md +229 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/dev/index.js +53 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts +22 -0
- package/node_modules/micromark-factory-whitespace/index.d.ts.map +1 -0
- package/node_modules/micromark-factory-whitespace/index.js +44 -0
- package/node_modules/micromark-factory-whitespace/license +22 -0
- package/node_modules/micromark-factory-whitespace/package.json +57 -0
- package/node_modules/micromark-factory-whitespace/readme.md +205 -0
- package/node_modules/micromark-util-character/dev/index.d.ts +195 -0
- package/node_modules/micromark-util-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/dev/index.js +252 -0
- package/node_modules/micromark-util-character/index.d.ts +195 -0
- package/node_modules/micromark-util-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-character/index.js +246 -0
- package/node_modules/micromark-util-character/license +22 -0
- package/node_modules/micromark-util-character/package.json +57 -0
- package/node_modules/micromark-util-character/readme.md +446 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/dev/index.js +89 -0
- package/node_modules/micromark-util-chunked/index.d.ts +41 -0
- package/node_modules/micromark-util-chunked/index.d.ts.map +1 -0
- package/node_modules/micromark-util-chunked/index.js +81 -0
- package/node_modules/micromark-util-chunked/license +22 -0
- package/node_modules/micromark-util-chunked/package.json +57 -0
- package/node_modules/micromark-util-chunked/readme.md +219 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/dev/index.js +38 -0
- package/node_modules/micromark-util-classify-character/index.d.ts +18 -0
- package/node_modules/micromark-util-classify-character/index.d.ts.map +1 -0
- package/node_modules/micromark-util-classify-character/index.js +27 -0
- package/node_modules/micromark-util-classify-character/license +22 -0
- package/node_modules/micromark-util-classify-character/package.json +59 -0
- package/node_modules/micromark-util-classify-character/readme.md +205 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts +22 -0
- package/node_modules/micromark-util-combine-extensions/index.d.ts.map +1 -0
- package/node_modules/micromark-util-combine-extensions/index.js +143 -0
- package/node_modules/micromark-util-combine-extensions/license +22 -0
- package/node_modules/micromark-util-combine-extensions/package.json +52 -0
- package/node_modules/micromark-util-combine-extensions/readme.md +201 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +42 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +16 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/license +22 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
- package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +184 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/dev/index.js +53 -0
- package/node_modules/micromark-util-decode-string/index.d.ts +14 -0
- package/node_modules/micromark-util-decode-string/index.d.ts.map +1 -0
- package/node_modules/micromark-util-decode-string/index.js +45 -0
- package/node_modules/micromark-util-decode-string/license +22 -0
- package/node_modules/micromark-util-decode-string/package.json +63 -0
- package/node_modules/micromark-util-decode-string/readme.md +179 -0
- package/node_modules/micromark-util-encode/index.d.ts +14 -0
- package/node_modules/micromark-util-encode/index.d.ts.map +1 -0
- package/node_modules/micromark-util-encode/index.js +33 -0
- package/node_modules/micromark-util-encode/license +22 -0
- package/node_modules/micromark-util-encode/package.json +47 -0
- package/node_modules/micromark-util-encode/readme.md +176 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts +30 -0
- package/node_modules/micromark-util-html-tag-name/index.d.ts.map +1 -0
- package/node_modules/micromark-util-html-tag-name/index.js +93 -0
- package/node_modules/micromark-util-html-tag-name/license +22 -0
- package/node_modules/micromark-util-html-tag-name/package.json +47 -0
- package/node_modules/micromark-util-html-tag-name/readme.md +193 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/dev/index.js +38 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts +21 -0
- package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +1 -0
- package/node_modules/micromark-util-normalize-identifier/index.js +33 -0
- package/node_modules/micromark-util-normalize-identifier/license +22 -0
- package/node_modules/micromark-util-normalize-identifier/package.json +58 -0
- package/node_modules/micromark-util-normalize-identifier/readme.md +187 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts +22 -0
- package/node_modules/micromark-util-resolve-all/index.d.ts.map +1 -0
- package/node_modules/micromark-util-resolve-all/index.js +32 -0
- package/node_modules/micromark-util-resolve-all/license +22 -0
- package/node_modules/micromark-util-resolve-all/package.json +48 -0
- package/node_modules/micromark-util-resolve-all/readme.md +238 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts +36 -0
- package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +1 -0
- package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
- package/node_modules/micromark-util-sanitize-uri/license +22 -0
- package/node_modules/micromark-util-sanitize-uri/package.json +59 -0
- package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/index.js +284 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +288 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts +12 -0
- package/node_modules/micromark-util-subtokenize/index.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/index.js +228 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +161 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +1 -0
- package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
- package/node_modules/micromark-util-subtokenize/license +22 -0
- package/node_modules/micromark-util-subtokenize/package.json +60 -0
- package/node_modules/micromark-util-subtokenize/readme.md +181 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts +139 -0
- package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts +37 -0
- package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts +5 -0
- package/node_modules/micromark-util-symbol/lib/default.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/default.js +4 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts +106 -0
- package/node_modules/micromark-util-symbol/lib/types.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/types.js +453 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts +102 -0
- package/node_modules/micromark-util-symbol/lib/values.d.ts.map +1 -0
- package/node_modules/micromark-util-symbol/lib/values.js +109 -0
- package/node_modules/micromark-util-symbol/license +22 -0
- package/node_modules/micromark-util-symbol/package.json +43 -0
- package/node_modules/micromark-util-symbol/readme.md +168 -0
- package/node_modules/micromark-util-types/index.d.ts +1312 -0
- package/node_modules/micromark-util-types/index.js +2 -0
- package/node_modules/micromark-util-types/license +22 -0
- package/node_modules/micromark-util-types/package.json +71 -0
- package/node_modules/micromark-util-types/readme.md +151 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/typebox/build/compile/validator.d.mts +1 -4
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +5 -2
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +29 -32
- package/node_modules/undici/README.md +3 -2
- package/node_modules/undici/docs/docs/api/Agent.md +248 -44
- package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
- package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
- package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
- package/node_modules/undici/docs/docs/api/Client.md +365 -179
- package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
- package/node_modules/undici/docs/docs/api/Connector.md +118 -36
- package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
- package/node_modules/undici/docs/docs/api/Cookies.md +122 -71
- package/node_modules/undici/docs/docs/api/Debug.md +34 -18
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
- package/node_modules/undici/docs/docs/api/Dispatcher.md +479 -1102
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +101 -87
- package/node_modules/undici/docs/docs/api/Errors.md +503 -40
- package/node_modules/undici/docs/docs/api/EventSource.md +294 -32
- package/node_modules/undici/docs/docs/api/Fetch.md +680 -31
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -98
- package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
- package/node_modules/undici/docs/docs/api/Interceptors.md +355 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +314 -322
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
- package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
- package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
- package/node_modules/undici/docs/docs/api/MockPool.md +299 -263
- package/node_modules/undici/docs/docs/api/Pool.md +235 -43
- package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +172 -160
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -63
- package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -26
- package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -77
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +264 -542
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +162 -187
- package/node_modules/undici/docs/docs/api/Util.md +68 -11
- package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +6 -4
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +8 -6
- package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
- package/node_modules/undici/docs/docs/{GettingStarted.md → getting-started.md} +22 -19
- package/node_modules/undici/docs/docs/index.md +779 -0
- package/node_modules/undici/docs/docs/site.json +125 -0
- package/node_modules/undici/docs/docs/type-map.json +79 -0
- package/node_modules/undici/lib/api/api-request.js +7 -1
- package/node_modules/undici/lib/api/readable.js +43 -2
- package/node_modules/undici/lib/core/errors.js +20 -0
- package/node_modules/undici/lib/core/request.js +1 -1
- package/node_modules/undici/lib/core/util.js +3 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +23 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +40 -6
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +9 -1
- package/node_modules/undici/lib/handler/redirect-handler.js +1 -0
- package/node_modules/undici/lib/handler/retry-handler.js +57 -19
- package/node_modules/undici/lib/web/fetch/constants.js +1 -1
- package/node_modules/undici/lib/web/fetch/index.js +11 -2
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +1 -1
- package/node_modules/undici/types/cookies.d.ts +1 -1
- package/node_modules/undici/types/errors.d.ts +10 -0
- package/node_modules/unist-util-stringify-position/index.d.ts +1 -0
- package/node_modules/unist-util-stringify-position/index.js +1 -0
- package/node_modules/unist-util-stringify-position/lib/index.d.ts +61 -0
- package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
- package/node_modules/unist-util-stringify-position/license +22 -0
- package/node_modules/unist-util-stringify-position/package.json +80 -0
- package/node_modules/unist-util-stringify-position/readme.md +206 -0
- package/node_modules/uuid/README.md +99 -99
- package/node_modules/uuid/package.json +10 -6
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/node_modules/zod/README.md +5 -22
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +2 -2
- package/node_modules/zod/index.d.ts +2 -2
- package/node_modules/zod/index.js +2 -2
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +29 -12
- package/node_modules/zod/src/index.ts +2 -2
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +1 -1
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/complex.test.ts +17 -3
- package/node_modules/zod/src/v3/tests/function.test.ts +7 -3
- package/node_modules/zod/src/v3/tests/nan.test.ts +5 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +7 -7
- package/node_modules/zod/src/v3/tests/partials.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/string.test.ts +2 -2
- package/node_modules/zod/src/v3/types.ts +3 -1
- package/node_modules/zod/src/v4/classic/checks.ts +2 -0
- package/node_modules/zod/src/v4/classic/compat.ts +4 -0
- package/node_modules/zod/src/v4/classic/errors.ts +11 -4
- package/node_modules/zod/src/v4/classic/external.ts +4 -2
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/parse.ts +51 -2
- package/node_modules/zod/src/v4/classic/schemas.ts +846 -228
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +6 -6
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +79 -5
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +24 -2
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +37 -6
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +7 -1
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +76 -1
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +284 -4
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +9 -4
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +129 -37
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +113 -3
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +32 -5
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +4 -3
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +25 -0
- 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 +134 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +15 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +78 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +162 -8
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +214 -4
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +303 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +89 -5
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +25 -5
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +74 -21
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +385 -10
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +169 -68
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +40 -1
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +5 -3
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +77 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +16 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +349 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +26 -13
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +938 -127
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +128 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +338 -5
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +182 -3
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/core/api.ts +365 -136
- package/node_modules/zod/src/v4/core/checks.ts +15 -5
- package/node_modules/zod/src/v4/core/core.ts +60 -41
- package/node_modules/zod/src/v4/core/doc.ts +2 -2
- package/node_modules/zod/src/v4/core/errors.ts +116 -85
- package/node_modules/zod/src/v4/core/index.ts +2 -1
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +7 -3
- package/node_modules/zod/src/v4/core/parse.ts +104 -3
- package/node_modules/zod/src/v4/core/regexes.ts +72 -17
- package/node_modules/zod/src/v4/core/registries.ts +17 -8
- package/node_modules/zod/src/v4/core/schemas.ts +1225 -337
- package/node_modules/zod/src/v4/core/standard-schema.ts +114 -19
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +1 -1
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +2 -2
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +480 -835
- package/node_modules/zod/src/v4/core/util.ts +337 -129
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +17 -27
- package/node_modules/zod/src/v4/locales/az.ts +17 -27
- package/node_modules/zod/src/v4/locales/be.ts +19 -27
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +17 -28
- package/node_modules/zod/src/v4/locales/cs.ts +21 -45
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +19 -27
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +23 -27
- package/node_modules/zod/src/v4/locales/eo.ts +20 -27
- package/node_modules/zod/src/v4/locales/es.ts +49 -33
- package/node_modules/zod/src/v4/locales/fa.ts +19 -27
- package/node_modules/zod/src/v4/locales/fi.ts +17 -27
- package/node_modules/zod/src/v4/locales/fr-CA.ts +17 -27
- package/node_modules/zod/src/v4/locales/fr.ts +42 -34
- package/node_modules/zod/src/v4/locales/he.ts +201 -80
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +19 -28
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +17 -27
- package/node_modules/zod/src/v4/locales/index.ts +13 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +19 -28
- package/node_modules/zod/src/v4/locales/ja.ts +19 -27
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +3 -122
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +17 -27
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +19 -28
- package/node_modules/zod/src/v4/locales/ms.ts +18 -27
- package/node_modules/zod/src/v4/locales/nl.ts +32 -37
- package/node_modules/zod/src/v4/locales/no.ts +19 -27
- package/node_modules/zod/src/v4/locales/ota.ts +20 -28
- package/node_modules/zod/src/v4/locales/pl.ts +19 -27
- package/node_modules/zod/src/v4/locales/ps.ts +19 -26
- package/node_modules/zod/src/v4/locales/pt.ts +19 -26
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +19 -27
- package/node_modules/zod/src/v4/locales/sl.ts +19 -27
- package/node_modules/zod/src/v4/locales/sv.ts +19 -27
- package/node_modules/zod/src/v4/locales/ta.ts +20 -27
- package/node_modules/zod/src/v4/locales/th.ts +20 -27
- package/node_modules/zod/src/v4/locales/tr.ts +17 -27
- package/node_modules/zod/src/v4/locales/ua.ts +3 -122
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +20 -27
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +19 -27
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +20 -27
- package/node_modules/zod/src/v4/locales/zh-TW.ts +17 -27
- package/node_modules/zod/src/v4/mini/coerce.ts +5 -0
- package/node_modules/zod/src/v4/mini/external.ts +3 -2
- package/node_modules/zod/src/v4/mini/iso.ts +8 -4
- package/node_modules/zod/src/v4/mini/parse.ts +14 -1
- package/node_modules/zod/src/v4/mini/schemas.ts +440 -72
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -38
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +126 -4
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +51 -9
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +52 -2
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +54 -1
- package/node_modules/zod/src/v4-mini/index.ts +3 -1
- package/node_modules/zod/v3/ZodError.cjs +1 -1
- package/node_modules/zod/v3/ZodError.d.cts +6 -6
- package/node_modules/zod/v3/ZodError.d.ts +6 -6
- package/node_modules/zod/v3/ZodError.js +1 -1
- package/node_modules/zod/v3/locales/en.cjs +1 -0
- package/node_modules/zod/v3/locales/en.d.cts +1 -1
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/types.cjs +2 -0
- package/node_modules/zod/v3/types.d.cts +4 -1
- package/node_modules/zod/v3/types.d.ts +4 -1
- package/node_modules/zod/v3/types.js +2 -0
- package/node_modules/zod/v4/classic/checks.cjs +2 -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/compat.cjs +5 -1
- package/node_modules/zod/v4/classic/compat.d.cts +4 -0
- package/node_modules/zod/v4/classic/compat.d.ts +4 -0
- package/node_modules/zod/v4/classic/compat.js +4 -0
- package/node_modules/zod/v4/classic/errors.cjs +9 -2
- package/node_modules/zod/v4/classic/errors.js +11 -4
- package/node_modules/zod/v4/classic/external.cjs +6 -3
- package/node_modules/zod/v4/classic/external.d.cts +4 -1
- package/node_modules/zod/v4/classic/external.d.ts +4 -1
- package/node_modules/zod/v4/classic/external.js +3 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +10 -1
- package/node_modules/zod/v4/classic/parse.d.cts +8 -0
- package/node_modules/zod/v4/classic/parse.d.ts +8 -0
- package/node_modules/zod/v4/classic/parse.js +9 -0
- package/node_modules/zod/v4/classic/schemas.cjs +558 -156
- package/node_modules/zod/v4/classic/schemas.d.cts +179 -42
- package/node_modules/zod/v4/classic/schemas.d.ts +179 -42
- package/node_modules/zod/v4/classic/schemas.js +544 -155
- package/node_modules/zod/v4/core/api.cjs +219 -31
- package/node_modules/zod/v4/core/api.d.cts +120 -79
- package/node_modules/zod/v4/core/api.d.ts +120 -79
- package/node_modules/zod/v4/core/api.js +212 -31
- package/node_modules/zod/v4/core/checks.cjs +12 -2
- package/node_modules/zod/v4/core/checks.d.cts +3 -3
- package/node_modules/zod/v4/core/checks.d.ts +3 -3
- package/node_modules/zod/v4/core/checks.js +12 -2
- package/node_modules/zod/v4/core/core.cjs +31 -13
- package/node_modules/zod/v4/core/core.d.cts +24 -3
- package/node_modules/zod/v4/core/core.d.ts +24 -3
- package/node_modules/zod/v4/core/core.js +30 -13
- package/node_modules/zod/v4/core/doc.d.cts +1 -1
- package/node_modules/zod/v4/core/doc.d.ts +1 -1
- package/node_modules/zod/v4/core/errors.cjs +32 -42
- package/node_modules/zod/v4/core/errors.d.cts +37 -24
- package/node_modules/zod/v4/core/errors.d.ts +37 -24
- package/node_modules/zod/v4/core/errors.js +32 -42
- package/node_modules/zod/v4/core/index.cjs +5 -2
- package/node_modules/zod/v4/core/index.d.cts +2 -1
- package/node_modules/zod/v4/core/index.d.ts +2 -1
- package/node_modules/zod/v4/core/index.js +2 -1
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +48 -4
- package/node_modules/zod/v4/core/parse.d.cts +24 -0
- package/node_modules/zod/v4/core/parse.d.ts +24 -0
- package/node_modules/zod/v4/core/parse.js +39 -3
- package/node_modules/zod/v4/core/regexes.cjs +87 -18
- package/node_modules/zod/v4/core/regexes.d.cts +25 -2
- package/node_modules/zod/v4/core/regexes.d.ts +25 -2
- package/node_modules/zod/v4/core/regexes.js +60 -16
- package/node_modules/zod/v4/core/registries.cjs +7 -7
- package/node_modules/zod/v4/core/registries.d.cts +2 -2
- package/node_modules/zod/v4/core/registries.d.ts +2 -2
- package/node_modules/zod/v4/core/registries.js +7 -7
- package/node_modules/zod/v4/core/schemas.cjs +759 -237
- package/node_modules/zod/v4/core/schemas.d.cts +163 -20
- package/node_modules/zod/v4/core/schemas.d.ts +163 -20
- package/node_modules/zod/v4/core/schemas.js +758 -236
- package/node_modules/zod/v4/core/standard-schema.d.cts +90 -19
- package/node_modules/zod/v4/core/standard-schema.d.ts +90 -19
- package/node_modules/zod/v4/core/to-json-schema.cjs +408 -805
- package/node_modules/zod/v4/core/to-json-schema.d.cts +59 -33
- package/node_modules/zod/v4/core/to-json-schema.d.ts +59 -33
- package/node_modules/zod/v4/core/to-json-schema.js +402 -803
- package/node_modules/zod/v4/core/util.cjs +320 -125
- package/node_modules/zod/v4/core/util.d.cts +17 -0
- package/node_modules/zod/v4/core/util.d.ts +17 -0
- package/node_modules/zod/v4/core/util.js +308 -127
- package/node_modules/zod/v4/core/versions.cjs +2 -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/locales/ar.cjs +15 -24
- package/node_modules/zod/v4/locales/ar.d.cts +2 -1
- package/node_modules/zod/v4/locales/ar.js +14 -24
- package/node_modules/zod/v4/locales/az.cjs +15 -24
- package/node_modules/zod/v4/locales/az.d.cts +2 -1
- package/node_modules/zod/v4/locales/az.js +14 -24
- package/node_modules/zod/v4/locales/be.cjs +17 -24
- package/node_modules/zod/v4/locales/be.d.cts +2 -1
- package/node_modules/zod/v4/locales/be.js +16 -24
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +15 -25
- package/node_modules/zod/v4/locales/ca.d.cts +2 -1
- package/node_modules/zod/v4/locales/ca.js +14 -25
- package/node_modules/zod/v4/locales/cs.cjs +19 -42
- package/node_modules/zod/v4/locales/cs.d.cts +2 -1
- package/node_modules/zod/v4/locales/cs.js +18 -42
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +17 -24
- package/node_modules/zod/v4/locales/de.d.cts +2 -1
- package/node_modules/zod/v4/locales/de.js +16 -24
- package/node_modules/zod/v4/locales/el.cjs +136 -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 +109 -0
- package/node_modules/zod/v4/locales/en.cjs +21 -26
- package/node_modules/zod/v4/locales/en.d.cts +2 -2
- package/node_modules/zod/v4/locales/en.d.ts +0 -1
- package/node_modules/zod/v4/locales/en.js +20 -24
- package/node_modules/zod/v4/locales/eo.cjs +18 -26
- package/node_modules/zod/v4/locales/eo.d.cts +2 -2
- package/node_modules/zod/v4/locales/eo.d.ts +0 -1
- package/node_modules/zod/v4/locales/eo.js +17 -24
- package/node_modules/zod/v4/locales/es.cjs +47 -31
- package/node_modules/zod/v4/locales/es.d.cts +2 -1
- package/node_modules/zod/v4/locales/es.js +46 -31
- package/node_modules/zod/v4/locales/fa.cjs +17 -24
- package/node_modules/zod/v4/locales/fa.d.cts +2 -1
- package/node_modules/zod/v4/locales/fa.js +16 -24
- package/node_modules/zod/v4/locales/fi.cjs +15 -24
- package/node_modules/zod/v4/locales/fi.d.cts +2 -1
- package/node_modules/zod/v4/locales/fi.js +14 -24
- package/node_modules/zod/v4/locales/fr-CA.cjs +15 -24
- package/node_modules/zod/v4/locales/fr-CA.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr-CA.js +14 -24
- package/node_modules/zod/v4/locales/fr.cjs +40 -30
- package/node_modules/zod/v4/locales/fr.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr.js +39 -30
- package/node_modules/zod/v4/locales/he.cjs +176 -78
- package/node_modules/zod/v4/locales/he.d.cts +2 -1
- package/node_modules/zod/v4/locales/he.js +175 -78
- package/node_modules/zod/v4/locales/hr.cjs +149 -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 +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +17 -25
- package/node_modules/zod/v4/locales/hu.d.cts +2 -1
- package/node_modules/zod/v4/locales/hu.js +16 -25
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +15 -24
- package/node_modules/zod/v4/locales/id.d.cts +2 -1
- package/node_modules/zod/v4/locales/id.js +14 -24
- package/node_modules/zod/v4/locales/index.cjs +28 -1
- package/node_modules/zod/v4/locales/index.d.cts +13 -0
- package/node_modules/zod/v4/locales/index.d.ts +13 -0
- package/node_modules/zod/v4/locales/index.js +13 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +17 -25
- package/node_modules/zod/v4/locales/it.d.cts +2 -1
- package/node_modules/zod/v4/locales/it.js +16 -25
- package/node_modules/zod/v4/locales/ja.cjs +17 -24
- package/node_modules/zod/v4/locales/ja.d.cts +2 -1
- package/node_modules/zod/v4/locales/ja.js +16 -24
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +6 -137
- package/node_modules/zod/v4/locales/kh.d.cts +2 -1
- package/node_modules/zod/v4/locales/kh.d.ts +1 -0
- package/node_modules/zod/v4/locales/kh.js +3 -115
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +15 -24
- package/node_modules/zod/v4/locales/ko.d.cts +2 -1
- package/node_modules/zod/v4/locales/ko.js +14 -24
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +17 -25
- package/node_modules/zod/v4/locales/mk.d.cts +2 -1
- package/node_modules/zod/v4/locales/mk.js +16 -25
- package/node_modules/zod/v4/locales/ms.cjs +16 -24
- package/node_modules/zod/v4/locales/ms.d.cts +2 -1
- package/node_modules/zod/v4/locales/ms.js +15 -24
- package/node_modules/zod/v4/locales/nl.cjs +26 -32
- package/node_modules/zod/v4/locales/nl.d.cts +2 -1
- package/node_modules/zod/v4/locales/nl.js +25 -32
- package/node_modules/zod/v4/locales/no.cjs +17 -24
- package/node_modules/zod/v4/locales/no.d.cts +2 -1
- package/node_modules/zod/v4/locales/no.js +16 -24
- package/node_modules/zod/v4/locales/ota.cjs +18 -25
- package/node_modules/zod/v4/locales/ota.d.cts +2 -1
- package/node_modules/zod/v4/locales/ota.js +17 -25
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +17 -24
- package/node_modules/zod/v4/locales/pl.d.cts +2 -1
- package/node_modules/zod/v4/locales/pl.js +16 -24
- package/node_modules/zod/v4/locales/ps.cjs +17 -24
- package/node_modules/zod/v4/locales/ps.d.cts +2 -1
- package/node_modules/zod/v4/locales/ps.js +16 -24
- package/node_modules/zod/v4/locales/pt.cjs +17 -24
- package/node_modules/zod/v4/locales/pt.d.cts +2 -1
- package/node_modules/zod/v4/locales/pt.js +16 -24
- package/node_modules/zod/v4/locales/ro.cjs +146 -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 +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +17 -24
- package/node_modules/zod/v4/locales/ru.d.cts +2 -1
- package/node_modules/zod/v4/locales/ru.js +16 -24
- package/node_modules/zod/v4/locales/sl.cjs +17 -24
- package/node_modules/zod/v4/locales/sl.d.cts +2 -1
- package/node_modules/zod/v4/locales/sl.js +16 -24
- package/node_modules/zod/v4/locales/sv.cjs +17 -24
- package/node_modules/zod/v4/locales/sv.d.cts +2 -1
- package/node_modules/zod/v4/locales/sv.js +16 -24
- package/node_modules/zod/v4/locales/ta.cjs +18 -24
- package/node_modules/zod/v4/locales/ta.d.cts +2 -1
- package/node_modules/zod/v4/locales/ta.js +17 -24
- package/node_modules/zod/v4/locales/th.cjs +18 -24
- package/node_modules/zod/v4/locales/th.d.cts +2 -1
- package/node_modules/zod/v4/locales/th.js +17 -24
- package/node_modules/zod/v4/locales/tr.cjs +15 -26
- package/node_modules/zod/v4/locales/tr.d.cts +2 -2
- package/node_modules/zod/v4/locales/tr.d.ts +0 -1
- package/node_modules/zod/v4/locales/tr.js +14 -24
- package/node_modules/zod/v4/locales/ua.cjs +6 -137
- package/node_modules/zod/v4/locales/ua.d.cts +2 -1
- package/node_modules/zod/v4/locales/ua.d.ts +1 -0
- package/node_modules/zod/v4/locales/ua.js +3 -115
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +18 -24
- package/node_modules/zod/v4/locales/ur.d.cts +2 -1
- package/node_modules/zod/v4/locales/ur.js +17 -24
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +17 -24
- package/node_modules/zod/v4/locales/vi.d.cts +2 -1
- package/node_modules/zod/v4/locales/vi.js +16 -24
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +18 -24
- package/node_modules/zod/v4/locales/zh-CN.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-CN.js +17 -24
- package/node_modules/zod/v4/locales/zh-TW.cjs +15 -24
- package/node_modules/zod/v4/locales/zh-TW.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-TW.js +14 -24
- package/node_modules/zod/v4/mini/coerce.cjs +5 -0
- package/node_modules/zod/v4/mini/coerce.js +5 -0
- package/node_modules/zod/v4/mini/external.cjs +4 -3
- package/node_modules/zod/v4/mini/external.d.cts +3 -1
- package/node_modules/zod/v4/mini/external.d.ts +3 -1
- package/node_modules/zod/v4/mini/external.js +2 -1
- package/node_modules/zod/v4/mini/iso.cjs +8 -4
- package/node_modules/zod/v4/mini/iso.js +8 -4
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +9 -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 +301 -57
- package/node_modules/zod/v4/mini/schemas.d.cts +109 -20
- package/node_modules/zod/v4/mini/schemas.d.ts +109 -20
- package/node_modules/zod/v4/mini/schemas.js +260 -31
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +16 -1
- package/node_modules/zod/v4-mini/index.d.cts +3 -1
- package/node_modules/zod/v4-mini/index.d.ts +3 -1
- package/node_modules/zod/v4-mini/index.js +3 -1
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/npm-shrinkwrap.json +629 -28
- package/openclaw.plugin.json +529 -888
- package/package.json +44 -16
- package/dist/approval-message-safety-C-8BL6Kv.js +0 -47
- package/dist/config-api-B18fR8M5.js +0 -3
- package/dist/message-handler-DExaghWK.js +0 -331
- package/dist/provider.runtime-BX8GcCYx.js +0 -2
- package/dist/runtime-api.monitor-DCS_ETft.js +0 -6
- package/dist/targets-fjJt3PYG.js +0 -3
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/src/v4/core/function.ts +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.cjs +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.d.cts +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.d.ts +0 -0
- /package/node_modules/{zod → @discord/embedded-app-sdk/node_modules/zod}/v4/core/function.js +0 -0
|
@@ -3,9 +3,11 @@ import * as checks from "./checks.js";
|
|
|
3
3
|
import * as core from "./core.js";
|
|
4
4
|
import { Doc } from "./doc.js";
|
|
5
5
|
import type * as errors from "./errors.js";
|
|
6
|
-
import
|
|
6
|
+
import type * as JSONSchema from "./json-schema.js";
|
|
7
|
+
import { parse, parseAsync, safeParse, safeParseAsync } from "./parse.js";
|
|
7
8
|
import * as regexes from "./regexes.js";
|
|
8
9
|
import type { StandardSchemaV1 } from "./standard-schema.js";
|
|
10
|
+
import type { ProcessParams, ToJSONSchemaContext } from "./to-json-schema.js";
|
|
9
11
|
import * as util from "./util.js";
|
|
10
12
|
import { version } from "./versions.js";
|
|
11
13
|
|
|
@@ -25,11 +27,20 @@ export interface ParseContext<T extends errors.$ZodIssueBase = never> {
|
|
|
25
27
|
/** @internal */
|
|
26
28
|
export interface ParseContextInternal<T extends errors.$ZodIssueBase = never> extends ParseContext<T> {
|
|
27
29
|
readonly async?: boolean | undefined;
|
|
30
|
+
readonly direction?: "forward" | "backward";
|
|
31
|
+
readonly skipChecks?: boolean;
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
export interface ParsePayload<T = unknown> {
|
|
31
35
|
value: T;
|
|
32
36
|
issues: errors.$ZodRawIssue[];
|
|
37
|
+
/** A way to mark a whole payload as aborted. Used in codecs/pipes. */
|
|
38
|
+
aborted?: boolean;
|
|
39
|
+
/** @internal Marks a value as a fallback that an outer wrapper (e.g.
|
|
40
|
+
* $ZodOptional) may override with its own interpretation when input was
|
|
41
|
+
* undefined. Set by $ZodCatch when catchValue substitutes and by every
|
|
42
|
+
* $ZodTransform invocation. */
|
|
43
|
+
fallback?: boolean | undefined;
|
|
33
44
|
}
|
|
34
45
|
|
|
35
46
|
export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
|
|
@@ -76,6 +87,7 @@ export interface $ZodTypeDef {
|
|
|
76
87
|
| "template_literal"
|
|
77
88
|
| "promise"
|
|
78
89
|
| "lazy"
|
|
90
|
+
| "function"
|
|
79
91
|
| "custom";
|
|
80
92
|
error?: errors.$ZodErrorMap<never> | undefined;
|
|
81
93
|
checks?: checks.$ZodCheck<never>[];
|
|
@@ -121,6 +133,9 @@ export interface _$ZodTypeInternals {
|
|
|
121
133
|
*/
|
|
122
134
|
values?: util.PrimitiveSet | undefined;
|
|
123
135
|
|
|
136
|
+
/** Default value bubbled up from */
|
|
137
|
+
// default?: unknown | undefined;
|
|
138
|
+
|
|
124
139
|
/** @internal A set of literal discriminators used for the fast path in discriminated unions. */
|
|
125
140
|
propValues?: util.PropValues | undefined;
|
|
126
141
|
|
|
@@ -138,6 +153,11 @@ export interface _$ZodTypeInternals {
|
|
|
138
153
|
/** @internal The set of issues this schema might throw during type checking. */
|
|
139
154
|
isst: errors.$ZodIssueBase;
|
|
140
155
|
|
|
156
|
+
/** @internal Subject to change, not a public API. */
|
|
157
|
+
processJSONSchema?:
|
|
158
|
+
| ((ctx: ToJSONSchemaContext, json: JSONSchema.BaseSchema, params: ProcessParams) => void)
|
|
159
|
+
| undefined;
|
|
160
|
+
|
|
141
161
|
/** An optional method used to override `toJSONSchema` logic. */
|
|
142
162
|
toJSONSchema?: () => unknown;
|
|
143
163
|
|
|
@@ -165,9 +185,7 @@ export interface $ZodType<
|
|
|
165
185
|
"~standard": $ZodStandardSchema<this>;
|
|
166
186
|
}
|
|
167
187
|
export interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals>
|
|
168
|
-
extends $ZodType<T["output"], T["input"], T> {
|
|
169
|
-
// _zod: T;
|
|
170
|
-
}
|
|
188
|
+
extends $ZodType<T["output"], T["input"], T> {}
|
|
171
189
|
|
|
172
190
|
export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def) => {
|
|
173
191
|
inst ??= {} as any;
|
|
@@ -182,7 +200,6 @@ export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constru
|
|
|
182
200
|
if (inst._zod.traits.has("$ZodCheck")) {
|
|
183
201
|
checks.unshift(inst as any);
|
|
184
202
|
}
|
|
185
|
-
//
|
|
186
203
|
|
|
187
204
|
for (const ch of checks) {
|
|
188
205
|
for (const fn of ch._zod.onattach) {
|
|
@@ -208,6 +225,7 @@ export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constru
|
|
|
208
225
|
let asyncResult!: Promise<unknown> | undefined;
|
|
209
226
|
for (const ch of checks) {
|
|
210
227
|
if (ch._zod.def.when) {
|
|
228
|
+
if (util.explicitlyAborted(payload)) continue;
|
|
211
229
|
const shouldRun = ch._zod.def.when(payload);
|
|
212
230
|
if (!shouldRun) continue;
|
|
213
231
|
} else if (isAborted) {
|
|
@@ -241,9 +259,42 @@ export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constru
|
|
|
241
259
|
return payload;
|
|
242
260
|
};
|
|
243
261
|
|
|
262
|
+
const handleCanaryResult = (canary: ParsePayload, payload: ParsePayload, ctx: ParseContextInternal) => {
|
|
263
|
+
// abort if the canary is aborted
|
|
264
|
+
if (util.aborted(canary)) {
|
|
265
|
+
canary.aborted = true;
|
|
266
|
+
return canary;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// run checks first, then
|
|
270
|
+
const checkResult = runChecks(payload, checks, ctx);
|
|
271
|
+
if (checkResult instanceof Promise) {
|
|
272
|
+
if (ctx.async === false) throw new core.$ZodAsyncError();
|
|
273
|
+
return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
|
|
274
|
+
}
|
|
275
|
+
return inst._zod.parse(checkResult, ctx);
|
|
276
|
+
};
|
|
277
|
+
|
|
244
278
|
inst._zod.run = (payload, ctx) => {
|
|
245
|
-
|
|
279
|
+
if (ctx.skipChecks) {
|
|
280
|
+
return inst._zod.parse(payload, ctx);
|
|
281
|
+
}
|
|
282
|
+
if (ctx.direction === "backward") {
|
|
283
|
+
// run canary
|
|
284
|
+
// initial pass (no checks)
|
|
285
|
+
const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
|
|
286
|
+
|
|
287
|
+
if (canary instanceof Promise) {
|
|
288
|
+
return canary.then((canary) => {
|
|
289
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
294
|
+
}
|
|
246
295
|
|
|
296
|
+
// forward
|
|
297
|
+
const result = inst._zod.parse(payload, ctx);
|
|
247
298
|
if (result instanceof Promise) {
|
|
248
299
|
if (ctx.async === false) throw new core.$ZodAsyncError();
|
|
249
300
|
return result.then((result) => runChecks(result, checks, ctx));
|
|
@@ -253,7 +304,8 @@ export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constru
|
|
|
253
304
|
};
|
|
254
305
|
}
|
|
255
306
|
|
|
256
|
-
|
|
307
|
+
// Lazy initialize ~standard to avoid creating objects for every schema
|
|
308
|
+
util.defineLazy(inst, "~standard", () => ({
|
|
257
309
|
validate: (value: unknown) => {
|
|
258
310
|
try {
|
|
259
311
|
const r = safeParse(inst, value);
|
|
@@ -264,7 +316,7 @@ export const $ZodType: core.$constructor<$ZodType> = /*@__PURE__*/ core.$constru
|
|
|
264
316
|
},
|
|
265
317
|
vendor: "zod",
|
|
266
318
|
version: 1 as const,
|
|
267
|
-
};
|
|
319
|
+
}));
|
|
268
320
|
});
|
|
269
321
|
|
|
270
322
|
export { clone } from "./util.js";
|
|
@@ -316,6 +368,7 @@ export const $ZodString: core.$constructor<$ZodString> = /*@__PURE__*/ core.$con
|
|
|
316
368
|
payload.issues.push({
|
|
317
369
|
expected: "string",
|
|
318
370
|
code: "invalid_type",
|
|
371
|
+
|
|
319
372
|
input: payload.value,
|
|
320
373
|
inst,
|
|
321
374
|
});
|
|
@@ -414,6 +467,7 @@ export const $ZodEmail: core.$constructor<$ZodEmail> = /*@__PURE__*/ core.$const
|
|
|
414
467
|
export interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
|
|
415
468
|
hostname?: RegExp | undefined;
|
|
416
469
|
protocol?: RegExp | undefined;
|
|
470
|
+
normalize?: boolean | undefined;
|
|
417
471
|
}
|
|
418
472
|
export interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
|
|
419
473
|
def: $ZodURLDef;
|
|
@@ -427,9 +481,27 @@ export const $ZodURL: core.$constructor<$ZodURL> = /*@__PURE__*/ core.$construct
|
|
|
427
481
|
$ZodStringFormat.init(inst, def);
|
|
428
482
|
inst._zod.check = (payload) => {
|
|
429
483
|
try {
|
|
430
|
-
|
|
431
|
-
const
|
|
432
|
-
|
|
484
|
+
// Trim whitespace from input
|
|
485
|
+
const trimmed = payload.value.trim();
|
|
486
|
+
|
|
487
|
+
// When normalize is off, require :// for http/https URLs
|
|
488
|
+
// This prevents strings like "http:example.com" or "https:/path" from being silently accepted
|
|
489
|
+
if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source) {
|
|
490
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
491
|
+
payload.issues.push({
|
|
492
|
+
code: "invalid_format",
|
|
493
|
+
format: "url",
|
|
494
|
+
note: "Invalid URL format",
|
|
495
|
+
input: payload.value,
|
|
496
|
+
inst,
|
|
497
|
+
continue: !def.abort,
|
|
498
|
+
});
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// @ts-ignore
|
|
504
|
+
const url = new URL(trimmed);
|
|
433
505
|
|
|
434
506
|
if (def.hostname) {
|
|
435
507
|
def.hostname.lastIndex = 0;
|
|
@@ -438,7 +510,7 @@ export const $ZodURL: core.$constructor<$ZodURL> = /*@__PURE__*/ core.$construct
|
|
|
438
510
|
code: "invalid_format",
|
|
439
511
|
format: "url",
|
|
440
512
|
note: "Invalid hostname",
|
|
441
|
-
pattern:
|
|
513
|
+
pattern: def.hostname.source,
|
|
442
514
|
input: payload.value,
|
|
443
515
|
inst,
|
|
444
516
|
continue: !def.abort,
|
|
@@ -461,11 +533,13 @@ export const $ZodURL: core.$constructor<$ZodURL> = /*@__PURE__*/ core.$construct
|
|
|
461
533
|
}
|
|
462
534
|
}
|
|
463
535
|
|
|
464
|
-
//
|
|
465
|
-
if (
|
|
466
|
-
|
|
536
|
+
// Set the output value based on normalize flag
|
|
537
|
+
if (def.normalize) {
|
|
538
|
+
// Use normalized URL
|
|
539
|
+
payload.value = url.href;
|
|
467
540
|
} else {
|
|
468
|
-
|
|
541
|
+
// Preserve the original input (trimmed)
|
|
542
|
+
payload.value = trimmed;
|
|
469
543
|
}
|
|
470
544
|
|
|
471
545
|
return;
|
|
@@ -517,13 +591,33 @@ export const $ZodNanoID: core.$constructor<$ZodNanoID> = /*@__PURE__*/ core.$con
|
|
|
517
591
|
|
|
518
592
|
////////////////////////////// ZodCUID //////////////////////////////
|
|
519
593
|
|
|
594
|
+
/**
|
|
595
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
596
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
597
|
+
* See https://github.com/paralleldrive/cuid.
|
|
598
|
+
*/
|
|
520
599
|
export interface $ZodCUIDDef extends $ZodStringFormatDef<"cuid"> {}
|
|
600
|
+
/**
|
|
601
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
602
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
603
|
+
* See https://github.com/paralleldrive/cuid.
|
|
604
|
+
*/
|
|
521
605
|
export interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
|
|
522
606
|
|
|
607
|
+
/**
|
|
608
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
609
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
610
|
+
* See https://github.com/paralleldrive/cuid.
|
|
611
|
+
*/
|
|
523
612
|
export interface $ZodCUID extends $ZodType {
|
|
524
613
|
_zod: $ZodCUIDInternals;
|
|
525
614
|
}
|
|
526
615
|
|
|
616
|
+
/**
|
|
617
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
618
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
619
|
+
* See https://github.com/paralleldrive/cuid.
|
|
620
|
+
*/
|
|
527
621
|
export const $ZodCUID: core.$constructor<$ZodCUID> = /*@__PURE__*/ core.$constructor("$ZodCUID", (inst, def): void => {
|
|
528
622
|
def.pattern ??= regexes.cuid;
|
|
529
623
|
$ZodStringFormat.init(inst, def);
|
|
@@ -688,10 +782,8 @@ export interface $ZodIPv4 extends $ZodType {
|
|
|
688
782
|
export const $ZodIPv4: core.$constructor<$ZodIPv4> = /*@__PURE__*/ core.$constructor("$ZodIPv4", (inst, def): void => {
|
|
689
783
|
def.pattern ??= regexes.ipv4;
|
|
690
784
|
$ZodStringFormat.init(inst, def);
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
bag.format = `ipv4`;
|
|
694
|
-
});
|
|
785
|
+
|
|
786
|
+
inst._zod.bag.format = `ipv4`;
|
|
695
787
|
});
|
|
696
788
|
|
|
697
789
|
////////////////////////////// ZodIPv6 //////////////////////////////
|
|
@@ -712,13 +804,11 @@ export const $ZodIPv6: core.$constructor<$ZodIPv6> = /*@__PURE__*/ core.$constru
|
|
|
712
804
|
def.pattern ??= regexes.ipv6;
|
|
713
805
|
$ZodStringFormat.init(inst, def);
|
|
714
806
|
|
|
715
|
-
inst._zod.
|
|
716
|
-
const bag = inst._zod.bag as $ZodStringInternals<unknown>["bag"];
|
|
717
|
-
bag.format = `ipv6`;
|
|
718
|
-
});
|
|
807
|
+
inst._zod.bag.format = `ipv6`;
|
|
719
808
|
|
|
720
809
|
inst._zod.check = (payload) => {
|
|
721
810
|
try {
|
|
811
|
+
// @ts-ignore
|
|
722
812
|
new URL(`http://[${payload.value}]`);
|
|
723
813
|
// return;
|
|
724
814
|
} catch {
|
|
@@ -733,6 +823,26 @@ export const $ZodIPv6: core.$constructor<$ZodIPv6> = /*@__PURE__*/ core.$constru
|
|
|
733
823
|
};
|
|
734
824
|
});
|
|
735
825
|
|
|
826
|
+
////////////////////////////// ZodMAC //////////////////////////////
|
|
827
|
+
export interface $ZodMACDef extends $ZodStringFormatDef<"mac"> {
|
|
828
|
+
delimiter?: string;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export interface $ZodMACInternals extends $ZodStringFormatInternals<"mac"> {
|
|
832
|
+
def: $ZodMACDef;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
export interface $ZodMAC extends $ZodType {
|
|
836
|
+
_zod: $ZodMACInternals;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export const $ZodMAC: core.$constructor<$ZodMAC> = /*@__PURE__*/ core.$constructor("$ZodMAC", (inst, def): void => {
|
|
840
|
+
def.pattern ??= regexes.mac(def.delimiter);
|
|
841
|
+
$ZodStringFormat.init(inst, def);
|
|
842
|
+
|
|
843
|
+
inst._zod.bag.format = `mac`;
|
|
844
|
+
});
|
|
845
|
+
|
|
736
846
|
////////////////////////////// ZodCIDRv4 //////////////////////////////
|
|
737
847
|
|
|
738
848
|
export interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
|
|
@@ -776,12 +886,15 @@ export const $ZodCIDRv6: core.$constructor<$ZodCIDRv6> = /*@__PURE__*/ core.$con
|
|
|
776
886
|
$ZodStringFormat.init(inst, def);
|
|
777
887
|
|
|
778
888
|
inst._zod.check = (payload) => {
|
|
779
|
-
const
|
|
889
|
+
const parts = payload.value.split("/");
|
|
780
890
|
try {
|
|
891
|
+
if (parts.length !== 2) throw new Error();
|
|
892
|
+
const [address, prefix] = parts;
|
|
781
893
|
if (!prefix) throw new Error();
|
|
782
894
|
const prefixNum = Number(prefix);
|
|
783
895
|
if (`${prefixNum}` !== prefix) throw new Error();
|
|
784
896
|
if (prefixNum < 0 || prefixNum > 128) throw new Error();
|
|
897
|
+
// @ts-ignore
|
|
785
898
|
new URL(`http://[${address}]`);
|
|
786
899
|
} catch {
|
|
787
900
|
payload.issues.push({
|
|
@@ -799,8 +912,11 @@ export const $ZodCIDRv6: core.$constructor<$ZodCIDRv6> = /*@__PURE__*/ core.$con
|
|
|
799
912
|
////////////////////////////// ZodBase64 //////////////////////////////
|
|
800
913
|
export function isValidBase64(data: string): boolean {
|
|
801
914
|
if (data === "") return true;
|
|
915
|
+
// atob ignores whitespace, so reject it up front.
|
|
916
|
+
if (/\s/.test(data)) return false;
|
|
802
917
|
if (data.length % 4 !== 0) return false;
|
|
803
918
|
try {
|
|
919
|
+
// @ts-ignore
|
|
804
920
|
atob(data);
|
|
805
921
|
return true;
|
|
806
922
|
} catch {
|
|
@@ -821,9 +937,7 @@ export const $ZodBase64: core.$constructor<$ZodBase64> = /*@__PURE__*/ core.$con
|
|
|
821
937
|
def.pattern ??= regexes.base64;
|
|
822
938
|
$ZodStringFormat.init(inst, def);
|
|
823
939
|
|
|
824
|
-
inst._zod.
|
|
825
|
-
inst._zod.bag.contentEncoding = "base64";
|
|
826
|
-
});
|
|
940
|
+
inst._zod.bag.contentEncoding = "base64";
|
|
827
941
|
|
|
828
942
|
inst._zod.check = (payload) => {
|
|
829
943
|
if (isValidBase64(payload.value)) return;
|
|
@@ -860,9 +974,7 @@ export const $ZodBase64URL: core.$constructor<$ZodBase64URL> = /*@__PURE__*/ cor
|
|
|
860
974
|
def.pattern ??= regexes.base64url;
|
|
861
975
|
$ZodStringFormat.init(inst, def);
|
|
862
976
|
|
|
863
|
-
inst._zod.
|
|
864
|
-
inst._zod.bag.contentEncoding = "base64url";
|
|
865
|
-
});
|
|
977
|
+
inst._zod.bag.contentEncoding = "base64url";
|
|
866
978
|
|
|
867
979
|
inst._zod.check = (payload) => {
|
|
868
980
|
if (isValidBase64URL(payload.value)) return;
|
|
@@ -900,6 +1012,7 @@ export function isValidJWT(token: string, algorithm: util.JWTAlgorithm | null =
|
|
|
900
1012
|
if (tokensParts.length !== 3) return false;
|
|
901
1013
|
const [header] = tokensParts;
|
|
902
1014
|
if (!header) return false;
|
|
1015
|
+
// @ts-ignore
|
|
903
1016
|
const parsedHeader = JSON.parse(atob(header));
|
|
904
1017
|
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
|
|
905
1018
|
if (!parsedHeader.alg) return false;
|
|
@@ -1006,8 +1119,8 @@ export interface $ZodNumber<Input = unknown> extends $ZodType {
|
|
|
1006
1119
|
|
|
1007
1120
|
export const $ZodNumber: core.$constructor<$ZodNumber> = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
|
|
1008
1121
|
$ZodType.init(inst, def);
|
|
1009
|
-
inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
|
|
1010
1122
|
|
|
1123
|
+
inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
|
|
1011
1124
|
inst._zod.parse = (payload, _ctx) => {
|
|
1012
1125
|
if (def.coerce)
|
|
1013
1126
|
try {
|
|
@@ -1030,6 +1143,7 @@ export const $ZodNumber: core.$constructor<$ZodNumber> = /*@__PURE__*/ core.$con
|
|
|
1030
1143
|
payload.issues.push({
|
|
1031
1144
|
expected: "number",
|
|
1032
1145
|
code: "invalid_type",
|
|
1146
|
+
|
|
1033
1147
|
input,
|
|
1034
1148
|
inst,
|
|
1035
1149
|
...(received ? { received } : {}),
|
|
@@ -1053,10 +1167,10 @@ export interface $ZodNumberFormat extends $ZodType {
|
|
|
1053
1167
|
}
|
|
1054
1168
|
|
|
1055
1169
|
export const $ZodNumberFormat: core.$constructor<$ZodNumberFormat> = /*@__PURE__*/ core.$constructor(
|
|
1056
|
-
"$
|
|
1170
|
+
"$ZodNumberFormat",
|
|
1057
1171
|
(inst, def) => {
|
|
1058
1172
|
checks.$ZodCheckNumberFormat.init(inst, def);
|
|
1059
|
-
$ZodNumber.init(inst, def); // no format
|
|
1173
|
+
$ZodNumber.init(inst, def); // no format checks
|
|
1060
1174
|
}
|
|
1061
1175
|
);
|
|
1062
1176
|
|
|
@@ -1100,6 +1214,7 @@ export const $ZodBoolean: core.$constructor<$ZodBoolean> = /*@__PURE__*/ core.$c
|
|
|
1100
1214
|
payload.issues.push({
|
|
1101
1215
|
expected: "boolean",
|
|
1102
1216
|
code: "invalid_type",
|
|
1217
|
+
|
|
1103
1218
|
input,
|
|
1104
1219
|
inst,
|
|
1105
1220
|
});
|
|
@@ -1152,6 +1267,7 @@ export const $ZodBigInt: core.$constructor<$ZodBigInt> = /*@__PURE__*/ core.$con
|
|
|
1152
1267
|
payload.issues.push({
|
|
1153
1268
|
expected: "bigint",
|
|
1154
1269
|
code: "invalid_type",
|
|
1270
|
+
|
|
1155
1271
|
input: payload.value,
|
|
1156
1272
|
inst,
|
|
1157
1273
|
});
|
|
@@ -1175,7 +1291,7 @@ export interface $ZodBigIntFormat extends $ZodType {
|
|
|
1175
1291
|
}
|
|
1176
1292
|
|
|
1177
1293
|
export const $ZodBigIntFormat: core.$constructor<$ZodBigIntFormat> = /*@__PURE__*/ core.$constructor(
|
|
1178
|
-
"$
|
|
1294
|
+
"$ZodBigIntFormat",
|
|
1179
1295
|
(inst, def) => {
|
|
1180
1296
|
checks.$ZodCheckBigIntFormat.init(inst, def);
|
|
1181
1297
|
$ZodBigInt.init(inst, def); // no format checks
|
|
@@ -1211,6 +1327,7 @@ export const $ZodSymbol: core.$constructor<$ZodSymbol> = /*@__PURE__*/ core.$con
|
|
|
1211
1327
|
payload.issues.push({
|
|
1212
1328
|
expected: "symbol",
|
|
1213
1329
|
code: "invalid_type",
|
|
1330
|
+
|
|
1214
1331
|
input,
|
|
1215
1332
|
inst,
|
|
1216
1333
|
});
|
|
@@ -1246,8 +1363,6 @@ export const $ZodUndefined: core.$constructor<$ZodUndefined> = /*@__PURE__*/ cor
|
|
|
1246
1363
|
$ZodType.init(inst, def);
|
|
1247
1364
|
inst._zod.pattern = regexes.undefined;
|
|
1248
1365
|
inst._zod.values = new Set([undefined]);
|
|
1249
|
-
inst._zod.optin = "optional";
|
|
1250
|
-
inst._zod.optout = "optional";
|
|
1251
1366
|
|
|
1252
1367
|
inst._zod.parse = (payload, _ctx) => {
|
|
1253
1368
|
const input = payload.value;
|
|
@@ -1255,6 +1370,7 @@ export const $ZodUndefined: core.$constructor<$ZodUndefined> = /*@__PURE__*/ cor
|
|
|
1255
1370
|
payload.issues.push({
|
|
1256
1371
|
expected: "undefined",
|
|
1257
1372
|
code: "invalid_type",
|
|
1373
|
+
|
|
1258
1374
|
input,
|
|
1259
1375
|
inst,
|
|
1260
1376
|
});
|
|
@@ -1297,6 +1413,7 @@ export const $ZodNull: core.$constructor<$ZodNull> = /*@__PURE__*/ core.$constru
|
|
|
1297
1413
|
payload.issues.push({
|
|
1298
1414
|
expected: "null",
|
|
1299
1415
|
code: "invalid_type",
|
|
1416
|
+
|
|
1300
1417
|
input,
|
|
1301
1418
|
inst,
|
|
1302
1419
|
});
|
|
@@ -1388,6 +1505,7 @@ export const $ZodNever: core.$constructor<$ZodNever> = /*@__PURE__*/ core.$const
|
|
|
1388
1505
|
payload.issues.push({
|
|
1389
1506
|
expected: "never",
|
|
1390
1507
|
code: "invalid_type",
|
|
1508
|
+
|
|
1391
1509
|
input: payload.value,
|
|
1392
1510
|
inst,
|
|
1393
1511
|
});
|
|
@@ -1425,6 +1543,7 @@ export const $ZodVoid: core.$constructor<$ZodVoid> = /*@__PURE__*/ core.$constru
|
|
|
1425
1543
|
payload.issues.push({
|
|
1426
1544
|
expected: "void",
|
|
1427
1545
|
code: "invalid_type",
|
|
1546
|
+
|
|
1428
1547
|
input,
|
|
1429
1548
|
inst,
|
|
1430
1549
|
});
|
|
@@ -1475,6 +1594,7 @@ export const $ZodDate: core.$constructor<$ZodDate> = /*@__PURE__*/ core.$constru
|
|
|
1475
1594
|
payload.issues.push({
|
|
1476
1595
|
expected: "date",
|
|
1477
1596
|
code: "invalid_type",
|
|
1597
|
+
|
|
1478
1598
|
input,
|
|
1479
1599
|
...(isDate ? { received: "Invalid Date" } : {}),
|
|
1480
1600
|
inst,
|
|
@@ -1524,6 +1644,7 @@ export const $ZodArray: core.$constructor<$ZodArray> = /*@__PURE__*/ core.$const
|
|
|
1524
1644
|
payload.issues.push({
|
|
1525
1645
|
expected: "array",
|
|
1526
1646
|
code: "invalid_type",
|
|
1647
|
+
|
|
1527
1648
|
input,
|
|
1528
1649
|
inst,
|
|
1529
1650
|
});
|
|
@@ -1582,6 +1703,36 @@ export type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<st
|
|
|
1582
1703
|
} & Extra
|
|
1583
1704
|
>;
|
|
1584
1705
|
|
|
1706
|
+
// experimental
|
|
1707
|
+
// export type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = keyof (T &
|
|
1708
|
+
// Extra) extends never
|
|
1709
|
+
// ? Record<string, never>
|
|
1710
|
+
// : string extends keyof T
|
|
1711
|
+
// ? util.Prettify<
|
|
1712
|
+
// {
|
|
1713
|
+
// [k: string]: util.IsAny<T[string]["_zod"]["output"]> extends true ? unknown : T[string]["_zod"]["output"];
|
|
1714
|
+
// } & $InferObjectOutputNoIndex<util.OmitIndexSignature<T>, Extra>
|
|
1715
|
+
// >
|
|
1716
|
+
// : util.Prettify<$InferObjectOutputNoIndex<T, Extra>>;
|
|
1717
|
+
|
|
1718
|
+
// export type $InferObjectOutputNoIndex<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = {
|
|
1719
|
+
// [k in keyof T as string extends k
|
|
1720
|
+
// ? never
|
|
1721
|
+
// : k extends string
|
|
1722
|
+
// ? T[k] extends OptionalOutSchema
|
|
1723
|
+
// ? never
|
|
1724
|
+
// : k
|
|
1725
|
+
// : never]: T[k]["_zod"]["output"];
|
|
1726
|
+
// } & {
|
|
1727
|
+
// [k in keyof T as string extends k
|
|
1728
|
+
// ? never
|
|
1729
|
+
// : k extends string
|
|
1730
|
+
// ? T[k] extends OptionalOutSchema
|
|
1731
|
+
// ? k
|
|
1732
|
+
// : never
|
|
1733
|
+
// : never]?: T[k]["_zod"]["output"];
|
|
1734
|
+
// } & Extra;
|
|
1735
|
+
|
|
1585
1736
|
export type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T
|
|
1586
1737
|
? util.IsAny<T[keyof T]> extends true
|
|
1587
1738
|
? Record<string, unknown>
|
|
@@ -1596,33 +1747,40 @@ export type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<str
|
|
|
1596
1747
|
} & Extra
|
|
1597
1748
|
>;
|
|
1598
1749
|
|
|
1599
|
-
function
|
|
1600
|
-
|
|
1750
|
+
function handlePropertyResult(
|
|
1751
|
+
result: ParsePayload,
|
|
1752
|
+
final: ParsePayload,
|
|
1753
|
+
key: PropertyKey,
|
|
1754
|
+
input: any,
|
|
1755
|
+
isOptionalIn: boolean,
|
|
1756
|
+
isOptionalOut: boolean
|
|
1757
|
+
) {
|
|
1758
|
+
const isPresent = key in input;
|
|
1601
1759
|
if (result.issues.length) {
|
|
1760
|
+
// For optional-in/out schemas, ignore errors on absent keys.
|
|
1761
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
1762
|
+
return;
|
|
1763
|
+
}
|
|
1602
1764
|
final.issues.push(...util.prefixIssues(key, result.issues));
|
|
1603
1765
|
}
|
|
1604
1766
|
|
|
1605
|
-
(
|
|
1606
|
-
|
|
1767
|
+
if (!isPresent && !isOptionalIn) {
|
|
1768
|
+
if (!result.issues.length) {
|
|
1769
|
+
final.issues.push({
|
|
1770
|
+
code: "invalid_type",
|
|
1771
|
+
expected: "nonoptional",
|
|
1772
|
+
input: undefined,
|
|
1773
|
+
path: [key],
|
|
1774
|
+
});
|
|
1775
|
+
}
|
|
1776
|
+
return;
|
|
1777
|
+
}
|
|
1607
1778
|
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
if (input[key] === undefined) {
|
|
1612
|
-
// if input was undefined, ignore the error
|
|
1613
|
-
if (key in input) {
|
|
1614
|
-
(final.value as any)[key] = undefined;
|
|
1615
|
-
} else {
|
|
1616
|
-
(final.value as any)[key] = result.value;
|
|
1617
|
-
}
|
|
1618
|
-
} else {
|
|
1619
|
-
final.issues.push(...util.prefixIssues(key, result.issues));
|
|
1779
|
+
if (result.value === undefined) {
|
|
1780
|
+
if (isPresent) {
|
|
1781
|
+
(final.value as any)[key] = undefined;
|
|
1620
1782
|
}
|
|
1621
|
-
} else if (result.value === undefined) {
|
|
1622
|
-
// validation returned `undefined`
|
|
1623
|
-
if (key in input) (final.value as any)[key] = undefined;
|
|
1624
1783
|
} else {
|
|
1625
|
-
// non-undefined value
|
|
1626
1784
|
(final.value as any)[key] = result.value;
|
|
1627
1785
|
}
|
|
1628
1786
|
}
|
|
@@ -1657,7 +1815,7 @@ export interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $Zod
|
|
|
1657
1815
|
|
|
1658
1816
|
export interface $ZodObjectInternals<
|
|
1659
1817
|
/** @ts-ignore Cast variance */
|
|
1660
|
-
out Shape extends
|
|
1818
|
+
out Shape extends $ZodShape = $ZodShape,
|
|
1661
1819
|
out Config extends $ZodObjectConfig = $ZodObjectConfig,
|
|
1662
1820
|
> extends _$ZodTypeInternals {
|
|
1663
1821
|
def: $ZodObjectDef<Shape>;
|
|
@@ -1666,6 +1824,8 @@ export interface $ZodObjectInternals<
|
|
|
1666
1824
|
propValues: util.PropValues;
|
|
1667
1825
|
output: $InferObjectOutput<Shape, Config["out"]>;
|
|
1668
1826
|
input: $InferObjectInput<Shape, Config["in"]>;
|
|
1827
|
+
optin?: "optional" | undefined;
|
|
1828
|
+
optout?: "optional" | undefined;
|
|
1669
1829
|
}
|
|
1670
1830
|
export type $ZodLooseShape = Record<string, any>;
|
|
1671
1831
|
|
|
@@ -1673,31 +1833,93 @@ export interface $ZodObject<
|
|
|
1673
1833
|
/** @ts-ignore Cast variance */
|
|
1674
1834
|
out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>,
|
|
1675
1835
|
out Params extends $ZodObjectConfig = $ZodObjectConfig,
|
|
1676
|
-
> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {
|
|
1677
|
-
|
|
1836
|
+
> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {}
|
|
1837
|
+
|
|
1838
|
+
function normalizeDef(def: $ZodObjectDef) {
|
|
1839
|
+
const keys = Object.keys(def.shape);
|
|
1840
|
+
for (const k of keys) {
|
|
1841
|
+
if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
|
|
1842
|
+
throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
const okeys = util.optionalKeys(def.shape);
|
|
1846
|
+
|
|
1847
|
+
return {
|
|
1848
|
+
...def,
|
|
1849
|
+
keys,
|
|
1850
|
+
keySet: new Set(keys),
|
|
1851
|
+
numKeys: keys.length,
|
|
1852
|
+
optionalKeys: new Set(okeys),
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
function handleCatchall(
|
|
1857
|
+
proms: Promise<any>[],
|
|
1858
|
+
input: any,
|
|
1859
|
+
payload: ParsePayload,
|
|
1860
|
+
ctx: ParseContext,
|
|
1861
|
+
def: ReturnType<typeof normalizeDef>,
|
|
1862
|
+
inst: $ZodObject
|
|
1863
|
+
) {
|
|
1864
|
+
const unrecognized: string[] = [];
|
|
1865
|
+
const keySet = def.keySet;
|
|
1866
|
+
const _catchall = def.catchall!._zod;
|
|
1867
|
+
const t = _catchall.def.type;
|
|
1868
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
1869
|
+
const isOptionalOut = _catchall.optout === "optional";
|
|
1870
|
+
for (const key in input) {
|
|
1871
|
+
// skip __proto__ so it can't replace the result prototype via the
|
|
1872
|
+
// assignment setter on the plain {} we build into
|
|
1873
|
+
if (key === "__proto__") continue;
|
|
1874
|
+
if (keySet.has(key)) continue;
|
|
1875
|
+
if (t === "never") {
|
|
1876
|
+
unrecognized.push(key);
|
|
1877
|
+
continue;
|
|
1878
|
+
}
|
|
1879
|
+
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
1880
|
+
|
|
1881
|
+
if (r instanceof Promise) {
|
|
1882
|
+
proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
1883
|
+
} else {
|
|
1884
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
if (unrecognized.length) {
|
|
1889
|
+
payload.issues.push({
|
|
1890
|
+
code: "unrecognized_keys",
|
|
1891
|
+
keys: unrecognized,
|
|
1892
|
+
input,
|
|
1893
|
+
inst,
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
if (!proms.length) return payload;
|
|
1898
|
+
return Promise.all(proms).then(() => {
|
|
1899
|
+
return payload;
|
|
1900
|
+
});
|
|
1678
1901
|
}
|
|
1679
1902
|
|
|
1680
1903
|
export const $ZodObject: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, def) => {
|
|
1681
1904
|
// requires cast because technically $ZodObject doesn't extend
|
|
1682
1905
|
$ZodType.init(inst, def);
|
|
1906
|
+
// const sh = def.shape;
|
|
1907
|
+
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
1908
|
+
if (!desc?.get) {
|
|
1909
|
+
const sh = def.shape;
|
|
1910
|
+
Object.defineProperty(def, "shape", {
|
|
1911
|
+
get: () => {
|
|
1912
|
+
const newSh = { ...sh };
|
|
1913
|
+
Object.defineProperty(def, "shape", {
|
|
1914
|
+
value: newSh,
|
|
1915
|
+
});
|
|
1683
1916
|
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
}
|
|
1691
|
-
const okeys = util.optionalKeys(def.shape);
|
|
1692
|
-
|
|
1693
|
-
return {
|
|
1694
|
-
shape: def.shape,
|
|
1695
|
-
keys,
|
|
1696
|
-
keySet: new Set(keys),
|
|
1697
|
-
numKeys: keys.length,
|
|
1698
|
-
optionalKeys: new Set(okeys),
|
|
1699
|
-
};
|
|
1700
|
-
});
|
|
1917
|
+
return newSh;
|
|
1918
|
+
},
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
const _normalized = util.cached(() => normalizeDef(def));
|
|
1701
1923
|
|
|
1702
1924
|
util.defineLazy(inst._zod, "propValues", () => {
|
|
1703
1925
|
const shape = def.shape;
|
|
@@ -1712,76 +1934,7 @@ export const $ZodObject: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$con
|
|
|
1712
1934
|
return propValues;
|
|
1713
1935
|
});
|
|
1714
1936
|
|
|
1715
|
-
const generateFastpass = (shape: any) => {
|
|
1716
|
-
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
1717
|
-
const normalized = _normalized.value;
|
|
1718
|
-
|
|
1719
|
-
const parseStr = (key: string) => {
|
|
1720
|
-
const k = util.esc(key);
|
|
1721
|
-
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
1722
|
-
};
|
|
1723
|
-
|
|
1724
|
-
doc.write(`const input = payload.value;`);
|
|
1725
|
-
|
|
1726
|
-
const ids: any = Object.create(null);
|
|
1727
|
-
let counter = 0;
|
|
1728
|
-
for (const key of normalized.keys) {
|
|
1729
|
-
ids[key] = `key_${counter++}`;
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
// A: preserve key order {
|
|
1733
|
-
doc.write(`const newResult = {}`);
|
|
1734
|
-
for (const key of normalized.keys) {
|
|
1735
|
-
if (normalized.optionalKeys.has(key)) {
|
|
1736
|
-
const id = ids[key];
|
|
1737
|
-
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
1738
|
-
const k = util.esc(key);
|
|
1739
|
-
doc.write(`
|
|
1740
|
-
if (${id}.issues.length) {
|
|
1741
|
-
if (input[${k}] === undefined) {
|
|
1742
|
-
if (${k} in input) {
|
|
1743
|
-
newResult[${k}] = undefined;
|
|
1744
|
-
}
|
|
1745
|
-
} else {
|
|
1746
|
-
payload.issues = payload.issues.concat(
|
|
1747
|
-
${id}.issues.map((iss) => ({
|
|
1748
|
-
...iss,
|
|
1749
|
-
path: iss.path ? [${k}, ...iss.path] : [${k}],
|
|
1750
|
-
}))
|
|
1751
|
-
);
|
|
1752
|
-
}
|
|
1753
|
-
} else if (${id}.value === undefined) {
|
|
1754
|
-
if (${k} in input) newResult[${k}] = undefined;
|
|
1755
|
-
} else {
|
|
1756
|
-
newResult[${k}] = ${id}.value;
|
|
1757
|
-
}
|
|
1758
|
-
`);
|
|
1759
|
-
} else {
|
|
1760
|
-
const id = ids[key];
|
|
1761
|
-
// const id = ids[key];
|
|
1762
|
-
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
1763
|
-
doc.write(`
|
|
1764
|
-
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
1765
|
-
...iss,
|
|
1766
|
-
path: iss.path ? [${util.esc(key)}, ...iss.path] : [${util.esc(key)}]
|
|
1767
|
-
})));`);
|
|
1768
|
-
doc.write(`newResult[${util.esc(key)}] = ${id}.value`);
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
doc.write(`payload.value = newResult;`);
|
|
1773
|
-
doc.write(`return payload;`);
|
|
1774
|
-
const fn = doc.compile();
|
|
1775
|
-
return (payload: any, ctx: any) => fn(shape, payload, ctx);
|
|
1776
|
-
};
|
|
1777
|
-
|
|
1778
|
-
let fastpass!: ReturnType<typeof generateFastpass>;
|
|
1779
|
-
|
|
1780
1937
|
const isObject = util.isObject;
|
|
1781
|
-
const jit = !core.globalConfig.jitless;
|
|
1782
|
-
const allowsEval = util.allowsEval;
|
|
1783
|
-
|
|
1784
|
-
const fastEnabled = jit && allowsEval.value; // && !def.catchall;
|
|
1785
1938
|
const catchall = def.catchall;
|
|
1786
1939
|
|
|
1787
1940
|
let value!: typeof _normalized.value;
|
|
@@ -1799,88 +1952,181 @@ export const $ZodObject: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$con
|
|
|
1799
1952
|
return payload;
|
|
1800
1953
|
}
|
|
1801
1954
|
|
|
1955
|
+
payload.value = {};
|
|
1956
|
+
|
|
1802
1957
|
const proms: Promise<any>[] = [];
|
|
1958
|
+
const shape = value.shape;
|
|
1803
1959
|
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
} else {
|
|
1809
|
-
payload.value = {};
|
|
1960
|
+
for (const key of value.keys) {
|
|
1961
|
+
const el = shape[key]!;
|
|
1962
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
1963
|
+
const isOptionalOut = el._zod.optout === "optional";
|
|
1810
1964
|
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
// if (!(key in input)) {
|
|
1817
|
-
// if (optionalKeys.has(key)) continue;
|
|
1818
|
-
// payload.issues.push({
|
|
1819
|
-
// code: "invalid_type",
|
|
1820
|
-
// path: [key],
|
|
1821
|
-
// expected: "nonoptional",
|
|
1822
|
-
// note: `Missing required key: "${key}"`,
|
|
1823
|
-
// input,
|
|
1824
|
-
// inst,
|
|
1825
|
-
// });
|
|
1826
|
-
// }
|
|
1827
|
-
|
|
1828
|
-
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
1829
|
-
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
|
1830
|
-
|
|
1831
|
-
if (r instanceof Promise) {
|
|
1832
|
-
proms.push(
|
|
1833
|
-
r.then((r) =>
|
|
1834
|
-
isOptional ? handleOptionalObjectResult(r, payload, key, input) : handleObjectResult(r, payload, key)
|
|
1835
|
-
)
|
|
1836
|
-
);
|
|
1837
|
-
} else if (isOptional) {
|
|
1838
|
-
handleOptionalObjectResult(r, payload, key, input);
|
|
1839
|
-
} else {
|
|
1840
|
-
handleObjectResult(r, payload, key);
|
|
1841
|
-
}
|
|
1965
|
+
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
1966
|
+
if (r instanceof Promise) {
|
|
1967
|
+
proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
1968
|
+
} else {
|
|
1969
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
1842
1970
|
}
|
|
1843
1971
|
}
|
|
1844
1972
|
|
|
1845
1973
|
if (!catchall) {
|
|
1846
|
-
// return payload;
|
|
1847
1974
|
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
1848
1975
|
}
|
|
1849
|
-
const unrecognized: string[] = [];
|
|
1850
|
-
// iterate over input keys
|
|
1851
|
-
const keySet = value.keySet;
|
|
1852
|
-
const _catchall = catchall._zod;
|
|
1853
|
-
const t = _catchall.def.type;
|
|
1854
|
-
for (const key of Object.keys(input)) {
|
|
1855
|
-
if (keySet.has(key)) continue;
|
|
1856
|
-
if (t === "never") {
|
|
1857
|
-
unrecognized.push(key);
|
|
1858
|
-
continue;
|
|
1859
|
-
}
|
|
1860
|
-
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
1861
1976
|
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1977
|
+
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
1978
|
+
};
|
|
1979
|
+
});
|
|
1980
|
+
|
|
1981
|
+
export const $ZodObjectJIT: core.$constructor<$ZodObject> = /*@__PURE__*/ core.$constructor(
|
|
1982
|
+
"$ZodObjectJIT",
|
|
1983
|
+
(inst, def) => {
|
|
1984
|
+
// requires cast because technically $ZodObject doesn't extend
|
|
1985
|
+
$ZodObject.init(inst, def);
|
|
1986
|
+
|
|
1987
|
+
const superParse = inst._zod.parse;
|
|
1988
|
+
const _normalized = util.cached(() => normalizeDef(def));
|
|
1989
|
+
|
|
1990
|
+
const generateFastpass = (shape: any) => {
|
|
1991
|
+
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
1992
|
+
const normalized = _normalized.value;
|
|
1993
|
+
|
|
1994
|
+
const parseStr = (key: string) => {
|
|
1995
|
+
const k = util.esc(key);
|
|
1996
|
+
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
1997
|
+
};
|
|
1998
|
+
|
|
1999
|
+
doc.write(`const input = payload.value;`);
|
|
2000
|
+
|
|
2001
|
+
const ids: any = Object.create(null);
|
|
2002
|
+
let counter = 0;
|
|
2003
|
+
for (const key of normalized.keys) {
|
|
2004
|
+
ids[key] = `key_${counter++}`;
|
|
1866
2005
|
}
|
|
1867
|
-
}
|
|
1868
2006
|
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
2007
|
+
// A: preserve key order {
|
|
2008
|
+
doc.write(`const newResult = {};`);
|
|
2009
|
+
for (const key of normalized.keys) {
|
|
2010
|
+
const id = ids[key];
|
|
2011
|
+
const k = util.esc(key);
|
|
2012
|
+
const schema = shape[key];
|
|
2013
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
2014
|
+
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
1877
2015
|
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
})
|
|
2016
|
+
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2017
|
+
|
|
2018
|
+
if (isOptionalIn && isOptionalOut) {
|
|
2019
|
+
// For optional-in/out schemas, ignore errors on absent keys
|
|
2020
|
+
doc.write(`
|
|
2021
|
+
if (${id}.issues.length) {
|
|
2022
|
+
if (${k} in input) {
|
|
2023
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
2024
|
+
...iss,
|
|
2025
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
2026
|
+
})));
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
if (${id}.value === undefined) {
|
|
2031
|
+
if (${k} in input) {
|
|
2032
|
+
newResult[${k}] = undefined;
|
|
2033
|
+
}
|
|
2034
|
+
} else {
|
|
2035
|
+
newResult[${k}] = ${id}.value;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
`);
|
|
2039
|
+
} else if (!isOptionalIn) {
|
|
2040
|
+
doc.write(`
|
|
2041
|
+
const ${id}_present = ${k} in input;
|
|
2042
|
+
if (${id}.issues.length) {
|
|
2043
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
2044
|
+
...iss,
|
|
2045
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
2046
|
+
})));
|
|
2047
|
+
}
|
|
2048
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
2049
|
+
payload.issues.push({
|
|
2050
|
+
code: "invalid_type",
|
|
2051
|
+
expected: "nonoptional",
|
|
2052
|
+
input: undefined,
|
|
2053
|
+
path: [${k}]
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
if (${id}_present) {
|
|
2058
|
+
if (${id}.value === undefined) {
|
|
2059
|
+
newResult[${k}] = undefined;
|
|
2060
|
+
} else {
|
|
2061
|
+
newResult[${k}] = ${id}.value;
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
`);
|
|
2066
|
+
} else {
|
|
2067
|
+
doc.write(`
|
|
2068
|
+
if (${id}.issues.length) {
|
|
2069
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
2070
|
+
...iss,
|
|
2071
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
2072
|
+
})));
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
if (${id}.value === undefined) {
|
|
2076
|
+
if (${k} in input) {
|
|
2077
|
+
newResult[${k}] = undefined;
|
|
2078
|
+
}
|
|
2079
|
+
} else {
|
|
2080
|
+
newResult[${k}] = ${id}.value;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
`);
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
doc.write(`payload.value = newResult;`);
|
|
2088
|
+
doc.write(`return payload;`);
|
|
2089
|
+
const fn = doc.compile();
|
|
2090
|
+
return (payload: any, ctx: any) => fn(shape, payload, ctx);
|
|
2091
|
+
};
|
|
2092
|
+
|
|
2093
|
+
let fastpass!: ReturnType<typeof generateFastpass>;
|
|
2094
|
+
|
|
2095
|
+
const isObject = util.isObject;
|
|
2096
|
+
const jit = !core.globalConfig.jitless;
|
|
2097
|
+
const allowsEval = util.allowsEval;
|
|
2098
|
+
|
|
2099
|
+
const fastEnabled = jit && allowsEval.value; // && !def.catchall;
|
|
2100
|
+
const catchall = def.catchall;
|
|
2101
|
+
|
|
2102
|
+
let value!: typeof _normalized.value;
|
|
2103
|
+
|
|
2104
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2105
|
+
value ??= _normalized.value;
|
|
2106
|
+
const input = payload.value;
|
|
2107
|
+
if (!isObject(input)) {
|
|
2108
|
+
payload.issues.push({
|
|
2109
|
+
expected: "object",
|
|
2110
|
+
code: "invalid_type",
|
|
2111
|
+
input,
|
|
2112
|
+
inst,
|
|
2113
|
+
});
|
|
2114
|
+
return payload;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
2118
|
+
// always synchronous
|
|
2119
|
+
if (!fastpass) fastpass = generateFastpass(def.shape);
|
|
2120
|
+
payload = fastpass(payload, ctx);
|
|
2121
|
+
|
|
2122
|
+
if (!catchall) return payload;
|
|
2123
|
+
return handleCatchall([], input, payload, ctx, value, inst);
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
return superParse(payload, ctx);
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
);
|
|
1884
2130
|
|
|
1885
2131
|
/////////////////////////////////////////
|
|
1886
2132
|
/////////////////////////////////////////
|
|
@@ -1895,6 +2141,7 @@ export type $InferUnionInput<T extends SomeType> = T extends any ? core.input<T>
|
|
|
1895
2141
|
export interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
1896
2142
|
type: "union";
|
|
1897
2143
|
options: Options;
|
|
2144
|
+
inclusive?: boolean;
|
|
1898
2145
|
}
|
|
1899
2146
|
|
|
1900
2147
|
type IsOptionalIn<T extends SomeType> = T extends OptionalInSchema ? true : false;
|
|
@@ -1925,8 +2172,15 @@ function handleUnionResults(results: ParsePayload[], final: ParsePayload, inst:
|
|
|
1925
2172
|
}
|
|
1926
2173
|
}
|
|
1927
2174
|
|
|
2175
|
+
const nonaborted = results.filter((r) => !util.aborted(r));
|
|
2176
|
+
if (nonaborted.length === 1) {
|
|
2177
|
+
final.value = nonaborted[0].value;
|
|
2178
|
+
return nonaborted[0];
|
|
2179
|
+
}
|
|
2180
|
+
|
|
1928
2181
|
final.issues.push({
|
|
1929
2182
|
code: "invalid_union",
|
|
2183
|
+
|
|
1930
2184
|
input: final.value,
|
|
1931
2185
|
inst,
|
|
1932
2186
|
errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
|
|
@@ -1961,7 +2215,12 @@ export const $ZodUnion: core.$constructor<$ZodUnion> = /*@__PURE__*/ core.$const
|
|
|
1961
2215
|
return undefined;
|
|
1962
2216
|
});
|
|
1963
2217
|
|
|
2218
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
2219
|
+
|
|
1964
2220
|
inst._zod.parse = (payload, ctx) => {
|
|
2221
|
+
if (first) {
|
|
2222
|
+
return first(payload, ctx);
|
|
2223
|
+
}
|
|
1965
2224
|
let async = false;
|
|
1966
2225
|
|
|
1967
2226
|
const results: util.MaybeAsync<ParsePayload>[] = [];
|
|
@@ -1989,43 +2248,130 @@ export const $ZodUnion: core.$constructor<$ZodUnion> = /*@__PURE__*/ core.$const
|
|
|
1989
2248
|
};
|
|
1990
2249
|
});
|
|
1991
2250
|
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2251
|
+
function handleExclusiveUnionResults(
|
|
2252
|
+
results: ParsePayload[],
|
|
2253
|
+
final: ParsePayload,
|
|
2254
|
+
inst: $ZodUnion,
|
|
2255
|
+
ctx?: ParseContext
|
|
2256
|
+
) {
|
|
2257
|
+
const successes = results.filter((r) => r.issues.length === 0);
|
|
2258
|
+
|
|
2259
|
+
if (successes.length === 1) {
|
|
2260
|
+
final.value = successes[0].value;
|
|
2261
|
+
return final;
|
|
2262
|
+
}
|
|
1999
2263
|
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2264
|
+
if (successes.length === 0) {
|
|
2265
|
+
// No matches - same as regular union
|
|
2266
|
+
final.issues.push({
|
|
2267
|
+
code: "invalid_union",
|
|
2268
|
+
input: final.value,
|
|
2269
|
+
inst,
|
|
2270
|
+
errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
|
|
2271
|
+
});
|
|
2272
|
+
} else {
|
|
2273
|
+
// Multiple matches - exclusive union failure
|
|
2274
|
+
final.issues.push({
|
|
2275
|
+
code: "invalid_union",
|
|
2276
|
+
input: final.value,
|
|
2277
|
+
inst,
|
|
2278
|
+
errors: [],
|
|
2279
|
+
inclusive: false,
|
|
2280
|
+
});
|
|
2281
|
+
}
|
|
2005
2282
|
|
|
2006
|
-
|
|
2007
|
-
extends $ZodUnionInternals<Options> {
|
|
2008
|
-
def: $ZodDiscriminatedUnionDef<Options>;
|
|
2009
|
-
propValues: util.PropValues;
|
|
2283
|
+
return final;
|
|
2010
2284
|
}
|
|
2011
2285
|
|
|
2012
|
-
export interface $
|
|
2013
|
-
|
|
2286
|
+
export interface $ZodXorInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodUnionInternals<T> {}
|
|
2287
|
+
|
|
2288
|
+
export interface $ZodXor<T extends readonly SomeType[] = readonly $ZodType[]>
|
|
2289
|
+
extends $ZodType<any, any, $ZodXorInternals<T>> {
|
|
2290
|
+
_zod: $ZodXorInternals<T>;
|
|
2014
2291
|
}
|
|
2015
2292
|
|
|
2016
|
-
export const $
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
$ZodUnion.init(inst, def);
|
|
2293
|
+
export const $ZodXor: core.$constructor<$ZodXor> = /*@__PURE__*/ core.$constructor("$ZodXor", (inst, def) => {
|
|
2294
|
+
$ZodUnion.init(inst, def);
|
|
2295
|
+
def.inclusive = false;
|
|
2020
2296
|
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2297
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
2298
|
+
|
|
2299
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2300
|
+
if (first) {
|
|
2301
|
+
return first(payload, ctx);
|
|
2302
|
+
}
|
|
2303
|
+
let async = false;
|
|
2304
|
+
|
|
2305
|
+
const results: util.MaybeAsync<ParsePayload>[] = [];
|
|
2306
|
+
for (const option of def.options) {
|
|
2307
|
+
const result = option._zod.run(
|
|
2308
|
+
{
|
|
2309
|
+
value: payload.value,
|
|
2310
|
+
issues: [],
|
|
2311
|
+
},
|
|
2312
|
+
ctx
|
|
2313
|
+
);
|
|
2314
|
+
if (result instanceof Promise) {
|
|
2315
|
+
results.push(result);
|
|
2316
|
+
async = true;
|
|
2317
|
+
} else {
|
|
2318
|
+
results.push(result);
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
if (!async) return handleExclusiveUnionResults(results as ParsePayload[], payload, inst, ctx);
|
|
2323
|
+
return Promise.all(results).then((results) => {
|
|
2324
|
+
return handleExclusiveUnionResults(results as ParsePayload[], payload, inst, ctx);
|
|
2325
|
+
});
|
|
2326
|
+
};
|
|
2327
|
+
});
|
|
2328
|
+
|
|
2329
|
+
//////////////////////////////////////////////////////
|
|
2330
|
+
//////////////////////////////////////////////////////
|
|
2331
|
+
////////// //////////
|
|
2332
|
+
////////// $ZodDiscriminatedUnion //////////
|
|
2333
|
+
////////// //////////
|
|
2334
|
+
//////////////////////////////////////////////////////
|
|
2335
|
+
//////////////////////////////////////////////////////
|
|
2336
|
+
|
|
2337
|
+
export interface $ZodDiscriminatedUnionDef<
|
|
2338
|
+
Options extends readonly SomeType[] = readonly $ZodType[],
|
|
2339
|
+
Disc extends string = string,
|
|
2340
|
+
> extends $ZodUnionDef<Options> {
|
|
2341
|
+
discriminator: Disc;
|
|
2342
|
+
unionFallback?: boolean;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
export interface $ZodDiscriminatedUnionInternals<
|
|
2346
|
+
Options extends readonly SomeType[] = readonly $ZodType[],
|
|
2347
|
+
Disc extends string = string,
|
|
2348
|
+
> extends $ZodUnionInternals<Options> {
|
|
2349
|
+
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
2350
|
+
propValues: util.PropValues;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
export interface $ZodDiscriminatedUnion<
|
|
2354
|
+
Options extends readonly SomeType[] = readonly $ZodType[],
|
|
2355
|
+
Disc extends string = string,
|
|
2356
|
+
> extends $ZodType {
|
|
2357
|
+
_zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
export const $ZodDiscriminatedUnion: core.$constructor<$ZodDiscriminatedUnion> =
|
|
2361
|
+
/*@__PURE__*/
|
|
2362
|
+
core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
2363
|
+
def.inclusive = false;
|
|
2364
|
+
|
|
2365
|
+
$ZodUnion.init(inst, def);
|
|
2366
|
+
|
|
2367
|
+
const _super = inst._zod.parse;
|
|
2368
|
+
util.defineLazy(inst._zod, "propValues", () => {
|
|
2369
|
+
const propValues: util.PropValues = {};
|
|
2370
|
+
for (const option of def.options) {
|
|
2371
|
+
const pv = option._zod.propValues;
|
|
2372
|
+
if (!pv || Object.keys(pv).length === 0)
|
|
2373
|
+
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
2374
|
+
for (const [k, v] of Object.entries(pv!)) {
|
|
2029
2375
|
if (!propValues[k]) propValues[k] = new Set();
|
|
2030
2376
|
for (const val of v) {
|
|
2031
2377
|
propValues[k].add(val);
|
|
@@ -2039,7 +2385,7 @@ export const $ZodDiscriminatedUnion: core.$constructor<$ZodDiscriminatedUnion> =
|
|
|
2039
2385
|
const opts = def.options as $ZodTypeDiscriminable[];
|
|
2040
2386
|
const map: Map<util.Primitive, $ZodType> = new Map();
|
|
2041
2387
|
for (const o of opts) {
|
|
2042
|
-
const values = o._zod.propValues[def.discriminator];
|
|
2388
|
+
const values = o._zod.propValues?.[def.discriminator];
|
|
2043
2389
|
if (!values || values.size === 0)
|
|
2044
2390
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
2045
2391
|
for (const v of values) {
|
|
@@ -2057,6 +2403,7 @@ export const $ZodDiscriminatedUnion: core.$constructor<$ZodDiscriminatedUnion> =
|
|
|
2057
2403
|
if (!util.isObject(input)) {
|
|
2058
2404
|
payload.issues.push({
|
|
2059
2405
|
code: "invalid_type",
|
|
2406
|
+
|
|
2060
2407
|
expected: "object",
|
|
2061
2408
|
input,
|
|
2062
2409
|
inst,
|
|
@@ -2069,7 +2416,11 @@ export const $ZodDiscriminatedUnion: core.$constructor<$ZodDiscriminatedUnion> =
|
|
|
2069
2416
|
return opt._zod.run(payload, ctx) as any;
|
|
2070
2417
|
}
|
|
2071
2418
|
|
|
2072
|
-
|
|
2419
|
+
// Fall back to union matching when the fast discriminator path fails:
|
|
2420
|
+
// - explicitly enabled via unionFallback, or
|
|
2421
|
+
// - during backward direction (encode), since codec-based discriminators
|
|
2422
|
+
// have different values in forward vs backward directions
|
|
2423
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
2073
2424
|
return _super(payload, ctx);
|
|
2074
2425
|
}
|
|
2075
2426
|
|
|
@@ -2078,6 +2429,8 @@ export const $ZodDiscriminatedUnion: core.$constructor<$ZodDiscriminatedUnion> =
|
|
|
2078
2429
|
code: "invalid_union",
|
|
2079
2430
|
errors: [],
|
|
2080
2431
|
note: "No matching discriminator",
|
|
2432
|
+
discriminator: def.discriminator,
|
|
2433
|
+
options: Array.from(disc.value.keys()),
|
|
2081
2434
|
input,
|
|
2082
2435
|
path: [def.discriminator],
|
|
2083
2436
|
inst,
|
|
@@ -2103,11 +2456,14 @@ export interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right ext
|
|
|
2103
2456
|
}
|
|
2104
2457
|
|
|
2105
2458
|
export interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType>
|
|
2106
|
-
extends $ZodTypeInternals
|
|
2459
|
+
extends _$ZodTypeInternals {
|
|
2460
|
+
// $ZodTypeInternals<core.output<A> & core.output<B>, core.input<A> & core.input<B>>
|
|
2107
2461
|
def: $ZodIntersectionDef<A, B>;
|
|
2108
2462
|
isst: never;
|
|
2109
2463
|
optin: A["_zod"]["optin"] | B["_zod"]["optin"];
|
|
2110
2464
|
optout: A["_zod"]["optout"] | B["_zod"]["optout"];
|
|
2465
|
+
output: core.output<A> & core.output<B>;
|
|
2466
|
+
input: core.input<A> & core.input<B>;
|
|
2111
2467
|
}
|
|
2112
2468
|
|
|
2113
2469
|
export interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
@@ -2195,12 +2551,39 @@ function mergeValues(
|
|
|
2195
2551
|
}
|
|
2196
2552
|
|
|
2197
2553
|
function handleIntersectionResults(result: ParsePayload, left: ParsePayload, right: ParsePayload): ParsePayload {
|
|
2198
|
-
|
|
2199
|
-
|
|
2554
|
+
// Track which side(s) report each key as unrecognized
|
|
2555
|
+
const unrecKeys = new Map<string, { l?: true; r?: true }>();
|
|
2556
|
+
let unrecIssue: errors.$ZodRawIssue | undefined;
|
|
2557
|
+
|
|
2558
|
+
for (const iss of left.issues) {
|
|
2559
|
+
if (iss.code === "unrecognized_keys") {
|
|
2560
|
+
unrecIssue ??= iss;
|
|
2561
|
+
for (const k of iss.keys) {
|
|
2562
|
+
if (!unrecKeys.has(k)) unrecKeys.set(k, {});
|
|
2563
|
+
unrecKeys.get(k)!.l = true;
|
|
2564
|
+
}
|
|
2565
|
+
} else {
|
|
2566
|
+
result.issues.push(iss);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
for (const iss of right.issues) {
|
|
2571
|
+
if (iss.code === "unrecognized_keys") {
|
|
2572
|
+
for (const k of iss.keys) {
|
|
2573
|
+
if (!unrecKeys.has(k)) unrecKeys.set(k, {});
|
|
2574
|
+
unrecKeys.get(k)!.r = true;
|
|
2575
|
+
}
|
|
2576
|
+
} else {
|
|
2577
|
+
result.issues.push(iss);
|
|
2578
|
+
}
|
|
2200
2579
|
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2580
|
+
|
|
2581
|
+
// Report only keys unrecognized by BOTH sides
|
|
2582
|
+
const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
|
|
2583
|
+
if (bothKeys.length && unrecIssue) {
|
|
2584
|
+
result.issues.push({ ...unrecIssue, keys: bothKeys });
|
|
2203
2585
|
}
|
|
2586
|
+
|
|
2204
2587
|
if (util.aborted(result)) return result;
|
|
2205
2588
|
|
|
2206
2589
|
const merged = mergeValues(left.value, right.value);
|
|
@@ -2265,9 +2648,12 @@ type TupleOutputTypeWithOptionals<T extends util.TupleItems> = T extends readonl
|
|
|
2265
2648
|
export interface $ZodTupleInternals<
|
|
2266
2649
|
T extends util.TupleItems = readonly $ZodType[],
|
|
2267
2650
|
Rest extends SomeType | null = $ZodType | null,
|
|
2268
|
-
> extends $ZodTypeInternals
|
|
2651
|
+
> extends _$ZodTypeInternals {
|
|
2269
2652
|
def: $ZodTupleDef<T, Rest>;
|
|
2270
2653
|
isst: errors.$ZodIssueInvalidType | errors.$ZodIssueTooBig<unknown[]> | errors.$ZodIssueTooSmall<unknown[]>;
|
|
2654
|
+
// $ZodTypeInternals<$InferTupleOutputType<T, Rest>, $InferTupleInputType<T, Rest>>
|
|
2655
|
+
output: $InferTupleOutputType<T, Rest>;
|
|
2656
|
+
input: $InferTupleInputType<T, Rest>;
|
|
2271
2657
|
}
|
|
2272
2658
|
|
|
2273
2659
|
export interface $ZodTuple<
|
|
@@ -2280,7 +2666,6 @@ export interface $ZodTuple<
|
|
|
2280
2666
|
export const $ZodTuple: core.$constructor<$ZodTuple> = /*@__PURE__*/ core.$constructor("$ZodTuple", (inst, def) => {
|
|
2281
2667
|
$ZodType.init(inst, def);
|
|
2282
2668
|
const items = def.items;
|
|
2283
|
-
const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
|
|
2284
2669
|
|
|
2285
2670
|
inst._zod.parse = (payload, ctx) => {
|
|
2286
2671
|
const input = payload.value;
|
|
@@ -2297,64 +2682,79 @@ export const $ZodTuple: core.$constructor<$ZodTuple> = /*@__PURE__*/ core.$const
|
|
|
2297
2682
|
payload.value = [];
|
|
2298
2683
|
const proms: Promise<any>[] = [];
|
|
2299
2684
|
|
|
2685
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
2686
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
2687
|
+
|
|
2300
2688
|
if (!def.rest) {
|
|
2301
|
-
|
|
2302
|
-
const tooSmall = input.length < optStart - 1;
|
|
2303
|
-
if (tooBig || tooSmall) {
|
|
2689
|
+
if (input.length < optinStart) {
|
|
2304
2690
|
payload.issues.push({
|
|
2691
|
+
code: "too_small",
|
|
2692
|
+
minimum: optinStart,
|
|
2693
|
+
inclusive: true,
|
|
2305
2694
|
input,
|
|
2306
2695
|
inst,
|
|
2307
2696
|
origin: "array" as const,
|
|
2308
|
-
...(tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length }),
|
|
2309
2697
|
});
|
|
2310
2698
|
return payload;
|
|
2311
2699
|
}
|
|
2700
|
+
if (input.length > items.length) {
|
|
2701
|
+
payload.issues.push({
|
|
2702
|
+
code: "too_big",
|
|
2703
|
+
maximum: items.length,
|
|
2704
|
+
inclusive: true,
|
|
2705
|
+
input,
|
|
2706
|
+
inst,
|
|
2707
|
+
origin: "array" as const,
|
|
2708
|
+
});
|
|
2709
|
+
}
|
|
2312
2710
|
}
|
|
2313
2711
|
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
proms.push(result.then((result) => handleTupleResult(result, payload, i)));
|
|
2712
|
+
// Run every item in parallel, collecting results into an indexed
|
|
2713
|
+
// array. The post-processing in `handleTupleResults` walks them in
|
|
2714
|
+
// order so it can decide whether an absent optional-output error can
|
|
2715
|
+
// truncate the tail or must be reported to preserve required output.
|
|
2716
|
+
const itemResults: ParsePayload[] = new Array(items.length);
|
|
2717
|
+
for (let i = 0; i < items.length; i++) {
|
|
2718
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
2719
|
+
if (r instanceof Promise) {
|
|
2720
|
+
proms.push(
|
|
2721
|
+
r.then((rr) => {
|
|
2722
|
+
itemResults[i] = rr;
|
|
2723
|
+
})
|
|
2724
|
+
);
|
|
2328
2725
|
} else {
|
|
2329
|
-
|
|
2726
|
+
itemResults[i] = r;
|
|
2330
2727
|
}
|
|
2331
2728
|
}
|
|
2332
2729
|
|
|
2333
2730
|
if (def.rest) {
|
|
2731
|
+
let i = items.length - 1;
|
|
2334
2732
|
const rest = input.slice(items.length);
|
|
2335
2733
|
for (const el of rest) {
|
|
2336
2734
|
i++;
|
|
2337
|
-
const result = def.rest._zod.run(
|
|
2338
|
-
{
|
|
2339
|
-
value: el,
|
|
2340
|
-
issues: [],
|
|
2341
|
-
},
|
|
2342
|
-
ctx
|
|
2343
|
-
);
|
|
2344
|
-
|
|
2735
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
2345
2736
|
if (result instanceof Promise) {
|
|
2346
|
-
proms.push(result.then((
|
|
2737
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
2347
2738
|
} else {
|
|
2348
2739
|
handleTupleResult(result, payload, i);
|
|
2349
2740
|
}
|
|
2350
2741
|
}
|
|
2351
2742
|
}
|
|
2352
2743
|
|
|
2353
|
-
if (proms.length)
|
|
2354
|
-
|
|
2744
|
+
if (proms.length) {
|
|
2745
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
2746
|
+
}
|
|
2747
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
2355
2748
|
};
|
|
2356
2749
|
});
|
|
2357
2750
|
|
|
2751
|
+
function getTupleOptStart(items: readonly $ZodType[], key: "optin" | "optout") {
|
|
2752
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
2753
|
+
if (items[i]._zod[key] !== "optional") return i + 1;
|
|
2754
|
+
}
|
|
2755
|
+
return 0;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2358
2758
|
function handleTupleResult(result: ParsePayload, final: ParsePayload<any[]>, index: number) {
|
|
2359
2759
|
if (result.issues.length) {
|
|
2360
2760
|
final.issues.push(...util.prefixIssues(index, result.issues));
|
|
@@ -2362,6 +2762,45 @@ function handleTupleResult(result: ParsePayload, final: ParsePayload<any[]>, ind
|
|
|
2362
2762
|
final.value[index] = result.value;
|
|
2363
2763
|
}
|
|
2364
2764
|
|
|
2765
|
+
function handleTupleResults(
|
|
2766
|
+
itemResults: ParsePayload[],
|
|
2767
|
+
final: ParsePayload<any[]>,
|
|
2768
|
+
items: readonly $ZodType[],
|
|
2769
|
+
input: unknown[],
|
|
2770
|
+
optoutStart: number
|
|
2771
|
+
) {
|
|
2772
|
+
// Walk results in order. Mirror $ZodObject's swallow-on-absent-optional
|
|
2773
|
+
// rule, but only after `optoutStart`: the first index where the output
|
|
2774
|
+
// tuple tail can be absent.
|
|
2775
|
+
for (let i = 0; i < items.length; i++) {
|
|
2776
|
+
const r = itemResults[i];
|
|
2777
|
+
const isPresent = i < input.length;
|
|
2778
|
+
if (r.issues.length) {
|
|
2779
|
+
if (!isPresent && i >= optoutStart) {
|
|
2780
|
+
final.value.length = i;
|
|
2781
|
+
break;
|
|
2782
|
+
}
|
|
2783
|
+
final.issues.push(...util.prefixIssues(i, r.issues));
|
|
2784
|
+
}
|
|
2785
|
+
final.value[i] = r.value;
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
// Drop trailing slots that produced `undefined` for absent input
|
|
2789
|
+
// (the array analog of an absent optional key on an object). The
|
|
2790
|
+
// `i >= input.length` floor is critical: an explicit `undefined`
|
|
2791
|
+
// *inside* the input must be preserved even when the schema is
|
|
2792
|
+
// optional-out (e.g. `z.string().or(z.undefined())` accepting an
|
|
2793
|
+
// explicit undefined value).
|
|
2794
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
2795
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
|
|
2796
|
+
final.value.length = i;
|
|
2797
|
+
} else {
|
|
2798
|
+
break;
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
return final;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2365
2804
|
//////////////////////////////////////////
|
|
2366
2805
|
//////////////////////////////////////////
|
|
2367
2806
|
////////// //////////
|
|
@@ -2370,12 +2809,14 @@ function handleTupleResult(result: ParsePayload, final: ParsePayload<any[]>, ind
|
|
|
2370
2809
|
//////////////////////////////////////////
|
|
2371
2810
|
//////////////////////////////////////////
|
|
2372
2811
|
|
|
2373
|
-
export type $ZodRecordKey = $ZodType<string | number | symbol,
|
|
2812
|
+
export type $ZodRecordKey = $ZodType<string | number | symbol, unknown>; // $HasValues | $HasPattern;
|
|
2374
2813
|
export interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType>
|
|
2375
2814
|
extends $ZodTypeDef {
|
|
2376
2815
|
type: "record";
|
|
2377
2816
|
keyType: Key;
|
|
2378
2817
|
valueType: Value;
|
|
2818
|
+
/** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
|
|
2819
|
+
mode?: "strict" | "loose";
|
|
2379
2820
|
}
|
|
2380
2821
|
|
|
2381
2822
|
// export type $InferZodRecordOutput<
|
|
@@ -2409,12 +2850,13 @@ export type $InferZodRecordOutput<
|
|
|
2409
2850
|
// ? Record<core.input<Key>, core.input<Value>>
|
|
2410
2851
|
// : Record<core.input<Key>, core.input<Value>>
|
|
2411
2852
|
// : Record<core.input<Key>, core.input<Value>>;
|
|
2853
|
+
|
|
2412
2854
|
export type $InferZodRecordInput<
|
|
2413
2855
|
Key extends $ZodRecordKey = $ZodRecordKey,
|
|
2414
2856
|
Value extends SomeType = $ZodType,
|
|
2415
2857
|
> = Key extends $partial
|
|
2416
|
-
? Partial<Record<core.input<Key
|
|
2417
|
-
: Record<core.input<Key
|
|
2858
|
+
? Partial<Record<core.input<Key> & PropertyKey, core.input<Value>>>
|
|
2859
|
+
: Record<core.input<Key> & PropertyKey, core.input<Value>>;
|
|
2418
2860
|
|
|
2419
2861
|
export interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType>
|
|
2420
2862
|
extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
|
|
@@ -2440,6 +2882,7 @@ export const $ZodRecord: core.$constructor<$ZodRecord> = /*@__PURE__*/ core.$con
|
|
|
2440
2882
|
payload.issues.push({
|
|
2441
2883
|
expected: "record",
|
|
2442
2884
|
code: "invalid_type",
|
|
2885
|
+
|
|
2443
2886
|
input,
|
|
2444
2887
|
inst,
|
|
2445
2888
|
});
|
|
@@ -2448,11 +2891,29 @@ export const $ZodRecord: core.$constructor<$ZodRecord> = /*@__PURE__*/ core.$con
|
|
|
2448
2891
|
|
|
2449
2892
|
const proms: Promise<any>[] = [];
|
|
2450
2893
|
|
|
2451
|
-
|
|
2452
|
-
|
|
2894
|
+
const values = def.keyType._zod.values;
|
|
2895
|
+
if (values) {
|
|
2453
2896
|
payload.value = {};
|
|
2897
|
+
const recordKeys = new Set<string | symbol>();
|
|
2454
2898
|
for (const key of values) {
|
|
2455
2899
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
2900
|
+
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
2901
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
2902
|
+
if (keyResult instanceof Promise) {
|
|
2903
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
2904
|
+
}
|
|
2905
|
+
if (keyResult.issues.length) {
|
|
2906
|
+
payload.issues.push({
|
|
2907
|
+
code: "invalid_key",
|
|
2908
|
+
origin: "record",
|
|
2909
|
+
issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
2910
|
+
input: key,
|
|
2911
|
+
path: [key],
|
|
2912
|
+
inst,
|
|
2913
|
+
});
|
|
2914
|
+
continue;
|
|
2915
|
+
}
|
|
2916
|
+
const outKey = keyResult.value as PropertyKey;
|
|
2456
2917
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
2457
2918
|
|
|
2458
2919
|
if (result instanceof Promise) {
|
|
@@ -2461,21 +2922,21 @@ export const $ZodRecord: core.$constructor<$ZodRecord> = /*@__PURE__*/ core.$con
|
|
|
2461
2922
|
if (result.issues.length) {
|
|
2462
2923
|
payload.issues.push(...util.prefixIssues(key, result.issues));
|
|
2463
2924
|
}
|
|
2464
|
-
payload.value[
|
|
2925
|
+
payload.value[outKey] = result.value;
|
|
2465
2926
|
})
|
|
2466
2927
|
);
|
|
2467
2928
|
} else {
|
|
2468
2929
|
if (result.issues.length) {
|
|
2469
2930
|
payload.issues.push(...util.prefixIssues(key, result.issues));
|
|
2470
2931
|
}
|
|
2471
|
-
payload.value[
|
|
2932
|
+
payload.value[outKey] = result.value;
|
|
2472
2933
|
}
|
|
2473
2934
|
}
|
|
2474
2935
|
}
|
|
2475
2936
|
|
|
2476
2937
|
let unrecognized!: string[];
|
|
2477
2938
|
for (const key in input) {
|
|
2478
|
-
if (!
|
|
2939
|
+
if (!recordKeys.has(key)) {
|
|
2479
2940
|
unrecognized = unrecognized ?? [];
|
|
2480
2941
|
unrecognized.push(key);
|
|
2481
2942
|
}
|
|
@@ -2483,6 +2944,7 @@ export const $ZodRecord: core.$constructor<$ZodRecord> = /*@__PURE__*/ core.$con
|
|
|
2483
2944
|
if (unrecognized && unrecognized.length > 0) {
|
|
2484
2945
|
payload.issues.push({
|
|
2485
2946
|
code: "unrecognized_keys",
|
|
2947
|
+
|
|
2486
2948
|
input,
|
|
2487
2949
|
inst,
|
|
2488
2950
|
keys: unrecognized,
|
|
@@ -2490,24 +2952,43 @@ export const $ZodRecord: core.$constructor<$ZodRecord> = /*@__PURE__*/ core.$con
|
|
|
2490
2952
|
}
|
|
2491
2953
|
} else {
|
|
2492
2954
|
payload.value = {};
|
|
2955
|
+
// Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()
|
|
2493
2956
|
for (const key of Reflect.ownKeys(input)) {
|
|
2494
2957
|
if (key === "__proto__") continue;
|
|
2495
|
-
|
|
2496
|
-
|
|
2958
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key)) continue;
|
|
2959
|
+
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
2497
2960
|
if (keyResult instanceof Promise) {
|
|
2498
2961
|
throw new Error("Async schemas not supported in object keys currently");
|
|
2499
2962
|
}
|
|
2500
2963
|
|
|
2964
|
+
// Numeric string fallback: if key is a numeric string and failed, retry with Number(key)
|
|
2965
|
+
// This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals
|
|
2966
|
+
const checkNumericKey = typeof key === "string" && regexes.number.test(key) && keyResult.issues.length;
|
|
2967
|
+
if (checkNumericKey) {
|
|
2968
|
+
const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
|
|
2969
|
+
if (retryResult instanceof Promise) {
|
|
2970
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
2971
|
+
}
|
|
2972
|
+
if (retryResult.issues.length === 0) {
|
|
2973
|
+
keyResult = retryResult;
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2501
2977
|
if (keyResult.issues.length) {
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2978
|
+
if (def.mode === "loose") {
|
|
2979
|
+
// Pass through unchanged
|
|
2980
|
+
payload.value[key] = input[key];
|
|
2981
|
+
} else {
|
|
2982
|
+
// Default "strict" behavior: error on invalid key
|
|
2983
|
+
payload.issues.push({
|
|
2984
|
+
code: "invalid_key",
|
|
2985
|
+
origin: "record",
|
|
2986
|
+
issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
2987
|
+
input: key,
|
|
2988
|
+
path: [key],
|
|
2989
|
+
inst,
|
|
2990
|
+
});
|
|
2991
|
+
}
|
|
2511
2992
|
continue;
|
|
2512
2993
|
}
|
|
2513
2994
|
|
|
@@ -2572,6 +3053,7 @@ export const $ZodMap: core.$constructor<$ZodMap> = /*@__PURE__*/ core.$construct
|
|
|
2572
3053
|
payload.issues.push({
|
|
2573
3054
|
expected: "map",
|
|
2574
3055
|
code: "invalid_type",
|
|
3056
|
+
|
|
2575
3057
|
input,
|
|
2576
3058
|
inst,
|
|
2577
3059
|
});
|
|
@@ -2615,8 +3097,9 @@ function handleMapResult(
|
|
|
2615
3097
|
final.issues.push(...util.prefixIssues(key as PropertyKey, keyResult.issues));
|
|
2616
3098
|
} else {
|
|
2617
3099
|
final.issues.push({
|
|
2618
|
-
origin: "map",
|
|
2619
3100
|
code: "invalid_key",
|
|
3101
|
+
|
|
3102
|
+
origin: "map",
|
|
2620
3103
|
input,
|
|
2621
3104
|
inst,
|
|
2622
3105
|
issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
|
|
@@ -2630,6 +3113,7 @@ function handleMapResult(
|
|
|
2630
3113
|
final.issues.push({
|
|
2631
3114
|
origin: "map",
|
|
2632
3115
|
code: "invalid_element",
|
|
3116
|
+
|
|
2633
3117
|
input,
|
|
2634
3118
|
inst,
|
|
2635
3119
|
key: key,
|
|
@@ -2737,8 +3221,8 @@ export const $ZodEnum: core.$constructor<$ZodEnum> = /*@__PURE__*/ core.$constru
|
|
|
2737
3221
|
$ZodType.init(inst, def);
|
|
2738
3222
|
|
|
2739
3223
|
const values = util.getEnumValues(def.entries);
|
|
2740
|
-
|
|
2741
|
-
inst._zod.values =
|
|
3224
|
+
const valuesSet = new Set<util.Primitive>(values);
|
|
3225
|
+
inst._zod.values = valuesSet;
|
|
2742
3226
|
|
|
2743
3227
|
inst._zod.pattern = new RegExp(
|
|
2744
3228
|
`^(${values
|
|
@@ -2749,11 +3233,12 @@ export const $ZodEnum: core.$constructor<$ZodEnum> = /*@__PURE__*/ core.$constru
|
|
|
2749
3233
|
|
|
2750
3234
|
inst._zod.parse = (payload, _ctx) => {
|
|
2751
3235
|
const input = payload.value;
|
|
2752
|
-
if (
|
|
3236
|
+
if (valuesSet.has(input)) {
|
|
2753
3237
|
return payload;
|
|
2754
3238
|
}
|
|
2755
3239
|
payload.issues.push({
|
|
2756
3240
|
code: "invalid_value",
|
|
3241
|
+
|
|
2757
3242
|
values,
|
|
2758
3243
|
input,
|
|
2759
3244
|
inst,
|
|
@@ -2790,22 +3275,27 @@ export const $ZodLiteral: core.$constructor<$ZodLiteral> = /*@__PURE__*/ core.$c
|
|
|
2790
3275
|
"$ZodLiteral",
|
|
2791
3276
|
(inst, def) => {
|
|
2792
3277
|
$ZodType.init(inst, def);
|
|
3278
|
+
if (def.values.length === 0) {
|
|
3279
|
+
throw new Error("Cannot create literal schema with no valid values");
|
|
3280
|
+
}
|
|
2793
3281
|
|
|
2794
|
-
|
|
3282
|
+
const values = new Set<util.Literal>(def.values);
|
|
3283
|
+
inst._zod.values = values;
|
|
2795
3284
|
inst._zod.pattern = new RegExp(
|
|
2796
3285
|
`^(${def.values
|
|
2797
3286
|
|
|
2798
|
-
.map((o) => (typeof o === "string" ? util.escapeRegex(o) : o ? o.toString() : String(o)))
|
|
3287
|
+
.map((o) => (typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))
|
|
2799
3288
|
.join("|")})$`
|
|
2800
3289
|
);
|
|
2801
3290
|
|
|
2802
3291
|
inst._zod.parse = (payload, _ctx) => {
|
|
2803
3292
|
const input = payload.value;
|
|
2804
|
-
if (
|
|
3293
|
+
if (values.has(input)) {
|
|
2805
3294
|
return payload;
|
|
2806
3295
|
}
|
|
2807
3296
|
payload.issues.push({
|
|
2808
3297
|
code: "invalid_value",
|
|
3298
|
+
|
|
2809
3299
|
values: def.values,
|
|
2810
3300
|
input,
|
|
2811
3301
|
inst,
|
|
@@ -2865,8 +3355,11 @@ export const $ZodLiteral: core.$constructor<$ZodLiteral> = /*@__PURE__*/ core.$c
|
|
|
2865
3355
|
//////////////////////////////////////////
|
|
2866
3356
|
|
|
2867
3357
|
// provide a fallback in case the File interface isn't provided in the environment
|
|
2868
|
-
|
|
2869
|
-
|
|
3358
|
+
type _File = typeof globalThis extends { File: infer F extends new (...args: any[]) => any } ? InstanceType<F> : {};
|
|
3359
|
+
/** Do not reference this directly. */
|
|
3360
|
+
export interface File extends _File {
|
|
3361
|
+
readonly type: string;
|
|
3362
|
+
readonly size: number;
|
|
2870
3363
|
}
|
|
2871
3364
|
|
|
2872
3365
|
export interface $ZodFileDef extends $ZodTypeDef {
|
|
@@ -2892,10 +3385,12 @@ export const $ZodFile: core.$constructor<$ZodFile> = /*@__PURE__*/ core.$constru
|
|
|
2892
3385
|
|
|
2893
3386
|
inst._zod.parse = (payload, _ctx) => {
|
|
2894
3387
|
const input = payload.value;
|
|
3388
|
+
// @ts-ignore
|
|
2895
3389
|
if (input instanceof File) return payload;
|
|
2896
3390
|
payload.issues.push({
|
|
2897
3391
|
expected: "file",
|
|
2898
3392
|
code: "invalid_type",
|
|
3393
|
+
|
|
2899
3394
|
input,
|
|
2900
3395
|
inst,
|
|
2901
3396
|
});
|
|
@@ -2927,12 +3422,18 @@ export const $ZodTransform: core.$constructor<$ZodTransform> = /*@__PURE__*/ cor
|
|
|
2927
3422
|
"$ZodTransform",
|
|
2928
3423
|
(inst, def) => {
|
|
2929
3424
|
$ZodType.init(inst, def);
|
|
2930
|
-
inst._zod.
|
|
3425
|
+
inst._zod.optin = "optional";
|
|
3426
|
+
inst._zod.parse = (payload, ctx) => {
|
|
3427
|
+
if (ctx.direction === "backward") {
|
|
3428
|
+
throw new core.$ZodEncodeError(inst.constructor.name);
|
|
3429
|
+
}
|
|
3430
|
+
|
|
2931
3431
|
const _out = def.transform(payload.value, payload);
|
|
2932
|
-
if (
|
|
3432
|
+
if (ctx.async) {
|
|
2933
3433
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
2934
3434
|
return output.then((output) => {
|
|
2935
3435
|
payload.value = output;
|
|
3436
|
+
payload.fallback = true;
|
|
2936
3437
|
return payload;
|
|
2937
3438
|
});
|
|
2938
3439
|
}
|
|
@@ -2942,6 +3443,7 @@ export const $ZodTransform: core.$constructor<$ZodTransform> = /*@__PURE__*/ cor
|
|
|
2942
3443
|
}
|
|
2943
3444
|
|
|
2944
3445
|
payload.value = _out;
|
|
3446
|
+
payload.fallback = true;
|
|
2945
3447
|
return payload;
|
|
2946
3448
|
};
|
|
2947
3449
|
}
|
|
@@ -2973,6 +3475,13 @@ export interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
|
2973
3475
|
_zod: $ZodOptionalInternals<T>;
|
|
2974
3476
|
}
|
|
2975
3477
|
|
|
3478
|
+
function handleOptionalResult(result: ParsePayload, input: unknown) {
|
|
3479
|
+
if (input === undefined && (result.issues.length || result.fallback)) {
|
|
3480
|
+
return { issues: [], value: undefined };
|
|
3481
|
+
}
|
|
3482
|
+
return result;
|
|
3483
|
+
}
|
|
3484
|
+
|
|
2976
3485
|
export const $ZodOptional: core.$constructor<$ZodOptional> = /*@__PURE__*/ core.$constructor(
|
|
2977
3486
|
"$ZodOptional",
|
|
2978
3487
|
(inst, def) => {
|
|
@@ -2990,7 +3499,10 @@ export const $ZodOptional: core.$constructor<$ZodOptional> = /*@__PURE__*/ core.
|
|
|
2990
3499
|
|
|
2991
3500
|
inst._zod.parse = (payload, ctx) => {
|
|
2992
3501
|
if (def.innerType._zod.optin === "optional") {
|
|
2993
|
-
|
|
3502
|
+
const input = payload.value;
|
|
3503
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
3504
|
+
if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, input));
|
|
3505
|
+
return handleOptionalResult(result, input);
|
|
2994
3506
|
}
|
|
2995
3507
|
if (payload.value === undefined) {
|
|
2996
3508
|
return payload;
|
|
@@ -3000,6 +3512,45 @@ export const $ZodOptional: core.$constructor<$ZodOptional> = /*@__PURE__*/ core.
|
|
|
3000
3512
|
}
|
|
3001
3513
|
);
|
|
3002
3514
|
|
|
3515
|
+
////////////////////////////////////////////////
|
|
3516
|
+
////////////////////////////////////////////////
|
|
3517
|
+
////////// //////////
|
|
3518
|
+
////////// $ZodExactOptional //////////
|
|
3519
|
+
////////// //////////
|
|
3520
|
+
////////////////////////////////////////////////
|
|
3521
|
+
////////////////////////////////////////////////
|
|
3522
|
+
|
|
3523
|
+
// Def extends $ZodOptionalDef (no additional fields needed)
|
|
3524
|
+
export interface $ZodExactOptionalDef<T extends SomeType = $ZodType> extends $ZodOptionalDef<T> {}
|
|
3525
|
+
|
|
3526
|
+
// Internals extends $ZodOptionalInternals but narrows output/input types (removes | undefined)
|
|
3527
|
+
export interface $ZodExactOptionalInternals<T extends SomeType = $ZodType> extends $ZodOptionalInternals<T> {
|
|
3528
|
+
def: $ZodExactOptionalDef<T>;
|
|
3529
|
+
output: core.output<T>; // NO | undefined (narrowed from parent)
|
|
3530
|
+
input: core.input<T>; // NO | undefined (narrowed from parent)
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
export interface $ZodExactOptional<T extends SomeType = $ZodType> extends $ZodType {
|
|
3534
|
+
_zod: $ZodExactOptionalInternals<T>;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
export const $ZodExactOptional: core.$constructor<$ZodExactOptional> = /*@__PURE__*/ core.$constructor(
|
|
3538
|
+
"$ZodExactOptional",
|
|
3539
|
+
(inst, def) => {
|
|
3540
|
+
// Call parent init - inherits optin/optout = "optional"
|
|
3541
|
+
$ZodOptional.init(inst, def);
|
|
3542
|
+
|
|
3543
|
+
// Override values/pattern to NOT add undefined
|
|
3544
|
+
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3545
|
+
util.defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
|
|
3546
|
+
|
|
3547
|
+
// Override parse to just delegate (no undefined handling)
|
|
3548
|
+
inst._zod.parse = (payload, ctx) => {
|
|
3549
|
+
return def.innerType._zod.run(payload, ctx);
|
|
3550
|
+
};
|
|
3551
|
+
}
|
|
3552
|
+
);
|
|
3553
|
+
|
|
3003
3554
|
////////////////////////////////////////////
|
|
3004
3555
|
////////////////////////////////////////////
|
|
3005
3556
|
////////// //////////
|
|
@@ -3043,6 +3594,7 @@ export const $ZodNullable: core.$constructor<$ZodNullable> = /*@__PURE__*/ core.
|
|
|
3043
3594
|
});
|
|
3044
3595
|
|
|
3045
3596
|
inst._zod.parse = (payload, ctx) => {
|
|
3597
|
+
// Forward direction (decode): allow null to pass through
|
|
3046
3598
|
if (payload.value === null) return payload;
|
|
3047
3599
|
return def.innerType._zod.run(payload, ctx);
|
|
3048
3600
|
};
|
|
@@ -3087,13 +3639,19 @@ export const $ZodDefault: core.$constructor<$ZodDefault> = /*@__PURE__*/ core.$c
|
|
|
3087
3639
|
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3088
3640
|
|
|
3089
3641
|
inst._zod.parse = (payload, ctx) => {
|
|
3642
|
+
if (ctx.direction === "backward") {
|
|
3643
|
+
return def.innerType._zod.run(payload, ctx);
|
|
3644
|
+
}
|
|
3645
|
+
|
|
3646
|
+
// Forward direction (decode): apply defaults for undefined input
|
|
3090
3647
|
if (payload.value === undefined) {
|
|
3091
3648
|
payload.value = def.defaultValue;
|
|
3092
3649
|
/**
|
|
3093
|
-
* $ZodDefault
|
|
3650
|
+
* $ZodDefault returns the default value immediately in forward direction.
|
|
3094
3651
|
* It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
|
|
3095
3652
|
return payload;
|
|
3096
3653
|
}
|
|
3654
|
+
// Forward direction: continue with default handling
|
|
3097
3655
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3098
3656
|
if (result instanceof Promise) {
|
|
3099
3657
|
return result.then((result) => handleDefaultResult(result, def));
|
|
@@ -3147,6 +3705,11 @@ export const $ZodPrefault: core.$constructor<$ZodPrefault> = /*@__PURE__*/ core.
|
|
|
3147
3705
|
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3148
3706
|
|
|
3149
3707
|
inst._zod.parse = (payload, ctx) => {
|
|
3708
|
+
if (ctx.direction === "backward") {
|
|
3709
|
+
return def.innerType._zod.run(payload, ctx);
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
// Forward direction (decode): apply prefault for undefined input
|
|
3150
3713
|
if (payload.value === undefined) {
|
|
3151
3714
|
payload.value = def.defaultValue;
|
|
3152
3715
|
}
|
|
@@ -3281,6 +3844,10 @@ export const $ZodSuccess: core.$constructor<$ZodSuccess> = /*@__PURE__*/ core.$c
|
|
|
3281
3844
|
$ZodType.init(inst, def);
|
|
3282
3845
|
|
|
3283
3846
|
inst._zod.parse = (payload, ctx) => {
|
|
3847
|
+
if (ctx.direction === "backward") {
|
|
3848
|
+
throw new core.$ZodEncodeError("ZodSuccess");
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3284
3851
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3285
3852
|
if (result instanceof Promise) {
|
|
3286
3853
|
return result.then((result) => {
|
|
@@ -3314,11 +3881,8 @@ export interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef
|
|
|
3314
3881
|
}
|
|
3315
3882
|
|
|
3316
3883
|
export interface $ZodCatchInternals<T extends SomeType = $ZodType>
|
|
3317
|
-
extends $ZodTypeInternals<core.output<T>, core.input<T
|
|
3884
|
+
extends $ZodTypeInternals<core.output<T>, core.input<T>> {
|
|
3318
3885
|
def: $ZodCatchDef<T>;
|
|
3319
|
-
// qin: T["_zod"]["qin"];
|
|
3320
|
-
// qout: T["_zod"]["qout"];
|
|
3321
|
-
|
|
3322
3886
|
optin: T["_zod"]["optin"];
|
|
3323
3887
|
optout: T["_zod"]["optout"];
|
|
3324
3888
|
isst: never;
|
|
@@ -3336,6 +3900,11 @@ export const $ZodCatch: core.$constructor<$ZodCatch> = /*@__PURE__*/ core.$const
|
|
|
3336
3900
|
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3337
3901
|
|
|
3338
3902
|
inst._zod.parse = (payload, ctx) => {
|
|
3903
|
+
if (ctx.direction === "backward") {
|
|
3904
|
+
return def.innerType._zod.run(payload, ctx);
|
|
3905
|
+
}
|
|
3906
|
+
|
|
3907
|
+
// Forward direction (decode): apply catch logic
|
|
3339
3908
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3340
3909
|
if (result instanceof Promise) {
|
|
3341
3910
|
return result.then((result) => {
|
|
@@ -3349,6 +3918,7 @@ export const $ZodCatch: core.$constructor<$ZodCatch> = /*@__PURE__*/ core.$const
|
|
|
3349
3918
|
input: payload.value,
|
|
3350
3919
|
});
|
|
3351
3920
|
payload.issues = [];
|
|
3921
|
+
payload.fallback = true;
|
|
3352
3922
|
}
|
|
3353
3923
|
|
|
3354
3924
|
return payload;
|
|
@@ -3364,7 +3934,9 @@ export const $ZodCatch: core.$constructor<$ZodCatch> = /*@__PURE__*/ core.$const
|
|
|
3364
3934
|
},
|
|
3365
3935
|
input: payload.value,
|
|
3366
3936
|
});
|
|
3937
|
+
|
|
3367
3938
|
payload.issues = [];
|
|
3939
|
+
payload.fallback = true;
|
|
3368
3940
|
}
|
|
3369
3941
|
|
|
3370
3942
|
return payload;
|
|
@@ -3419,6 +3991,10 @@ export interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType =
|
|
|
3419
3991
|
type: "pipe";
|
|
3420
3992
|
in: A;
|
|
3421
3993
|
out: B;
|
|
3994
|
+
/** Only defined inside $ZodCodec instances. */
|
|
3995
|
+
transform?: (value: core.output<A>, payload: ParsePayload<core.output<A>>) => util.MaybeAsync<core.input<B>>;
|
|
3996
|
+
/** Only defined inside $ZodCodec instances. */
|
|
3997
|
+
reverseTransform?: (value: core.input<B>, payload: ParsePayload<core.input<B>>) => util.MaybeAsync<core.output<A>>;
|
|
3422
3998
|
}
|
|
3423
3999
|
|
|
3424
4000
|
export interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType>
|
|
@@ -3428,6 +4004,7 @@ export interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends Some
|
|
|
3428
4004
|
values: A["_zod"]["values"];
|
|
3429
4005
|
optin: A["_zod"]["optin"];
|
|
3430
4006
|
optout: B["_zod"]["optout"];
|
|
4007
|
+
propValues: A["_zod"]["propValues"];
|
|
3431
4008
|
}
|
|
3432
4009
|
|
|
3433
4010
|
export interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
@@ -3439,23 +4016,148 @@ export const $ZodPipe: core.$constructor<$ZodPipe> = /*@__PURE__*/ core.$constru
|
|
|
3439
4016
|
util.defineLazy(inst._zod, "values", () => def.in._zod.values);
|
|
3440
4017
|
util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
|
|
3441
4018
|
util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
4019
|
+
util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
|
|
3442
4020
|
|
|
3443
4021
|
inst._zod.parse = (payload, ctx) => {
|
|
4022
|
+
if (ctx.direction === "backward") {
|
|
4023
|
+
const right = def.out._zod.run(payload, ctx);
|
|
4024
|
+
if (right instanceof Promise) {
|
|
4025
|
+
return right.then((right) => handlePipeResult(right, def.in, ctx));
|
|
4026
|
+
}
|
|
4027
|
+
return handlePipeResult(right, def.in, ctx);
|
|
4028
|
+
}
|
|
4029
|
+
|
|
3444
4030
|
const left = def.in._zod.run(payload, ctx);
|
|
3445
4031
|
if (left instanceof Promise) {
|
|
3446
|
-
return left.then((left) => handlePipeResult(left, def, ctx));
|
|
4032
|
+
return left.then((left) => handlePipeResult(left, def.out, ctx));
|
|
3447
4033
|
}
|
|
3448
|
-
return handlePipeResult(left, def, ctx);
|
|
4034
|
+
return handlePipeResult(left, def.out, ctx);
|
|
3449
4035
|
};
|
|
3450
4036
|
});
|
|
3451
4037
|
|
|
3452
|
-
function handlePipeResult(left: ParsePayload,
|
|
3453
|
-
if (
|
|
4038
|
+
function handlePipeResult(left: ParsePayload, next: $ZodType, ctx: ParseContextInternal) {
|
|
4039
|
+
if (left.issues.length) {
|
|
4040
|
+
// prevent further checks
|
|
4041
|
+
left.aborted = true;
|
|
3454
4042
|
return left;
|
|
3455
4043
|
}
|
|
3456
|
-
return
|
|
4044
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
3457
4045
|
}
|
|
3458
4046
|
|
|
4047
|
+
////////////////////////////////////////////
|
|
4048
|
+
////////////////////////////////////////////
|
|
4049
|
+
////////// //////////
|
|
4050
|
+
////////// $ZodCodec //////////
|
|
4051
|
+
////////// //////////
|
|
4052
|
+
////////////////////////////////////////////
|
|
4053
|
+
////////////////////////////////////////////
|
|
4054
|
+
export interface $ZodCodecDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodPipeDef<A, B> {
|
|
4055
|
+
transform: (value: core.output<A>, payload: ParsePayload<core.output<A>>) => util.MaybeAsync<core.input<B>>;
|
|
4056
|
+
reverseTransform: (value: core.input<B>, payload: ParsePayload<core.input<B>>) => util.MaybeAsync<core.output<A>>;
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
export interface $ZodCodecInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType>
|
|
4060
|
+
extends $ZodTypeInternals<core.output<B>, core.input<A>> {
|
|
4061
|
+
def: $ZodCodecDef<A, B>;
|
|
4062
|
+
isst: never;
|
|
4063
|
+
values: A["_zod"]["values"];
|
|
4064
|
+
optin: A["_zod"]["optin"];
|
|
4065
|
+
optout: B["_zod"]["optout"];
|
|
4066
|
+
propValues: A["_zod"]["propValues"];
|
|
4067
|
+
}
|
|
4068
|
+
|
|
4069
|
+
export interface $ZodCodec<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
4070
|
+
_zod: $ZodCodecInternals<A, B>;
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
export const $ZodCodec: core.$constructor<$ZodCodec> = /*@__PURE__*/ core.$constructor("$ZodCodec", (inst, def) => {
|
|
4074
|
+
$ZodType.init(inst, def);
|
|
4075
|
+
util.defineLazy(inst._zod, "values", () => def.in._zod.values);
|
|
4076
|
+
util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
|
|
4077
|
+
util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
4078
|
+
util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
|
|
4079
|
+
|
|
4080
|
+
inst._zod.parse = (payload, ctx) => {
|
|
4081
|
+
const direction = ctx.direction || "forward";
|
|
4082
|
+
if (direction === "forward") {
|
|
4083
|
+
const left = def.in._zod.run(payload, ctx);
|
|
4084
|
+
if (left instanceof Promise) {
|
|
4085
|
+
return left.then((left) => handleCodecAResult(left, def, ctx));
|
|
4086
|
+
}
|
|
4087
|
+
return handleCodecAResult(left, def, ctx);
|
|
4088
|
+
} else {
|
|
4089
|
+
const right = def.out._zod.run(payload, ctx);
|
|
4090
|
+
if (right instanceof Promise) {
|
|
4091
|
+
return right.then((right) => handleCodecAResult(right, def, ctx));
|
|
4092
|
+
}
|
|
4093
|
+
return handleCodecAResult(right, def, ctx);
|
|
4094
|
+
}
|
|
4095
|
+
};
|
|
4096
|
+
});
|
|
4097
|
+
|
|
4098
|
+
function handleCodecAResult(result: ParsePayload, def: $ZodCodecDef, ctx: ParseContextInternal) {
|
|
4099
|
+
if (result.issues.length) {
|
|
4100
|
+
// prevent further checks
|
|
4101
|
+
result.aborted = true;
|
|
4102
|
+
return result;
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
const direction = ctx.direction || "forward";
|
|
4106
|
+
|
|
4107
|
+
if (direction === "forward") {
|
|
4108
|
+
const transformed = def.transform(result.value, result);
|
|
4109
|
+
if (transformed instanceof Promise) {
|
|
4110
|
+
return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
|
|
4111
|
+
}
|
|
4112
|
+
return handleCodecTxResult(result, transformed, def.out, ctx);
|
|
4113
|
+
} else {
|
|
4114
|
+
const transformed = def.reverseTransform(result.value, result);
|
|
4115
|
+
if (transformed instanceof Promise) {
|
|
4116
|
+
return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
|
|
4117
|
+
}
|
|
4118
|
+
return handleCodecTxResult(result, transformed, def.in, ctx);
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4121
|
+
|
|
4122
|
+
function handleCodecTxResult(left: ParsePayload, value: any, nextSchema: SomeType, ctx: ParseContextInternal) {
|
|
4123
|
+
// Check if transform added any issues
|
|
4124
|
+
if (left.issues.length) {
|
|
4125
|
+
left.aborted = true;
|
|
4126
|
+
return left;
|
|
4127
|
+
}
|
|
4128
|
+
|
|
4129
|
+
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4130
|
+
}
|
|
4131
|
+
|
|
4132
|
+
/////////////////////////////////////////////////
|
|
4133
|
+
/////////////////////////////////////////////////
|
|
4134
|
+
////////// //////////
|
|
4135
|
+
////////// $ZodPreprocess //////////
|
|
4136
|
+
////////// //////////
|
|
4137
|
+
/////////////////////////////////////////////////
|
|
4138
|
+
/////////////////////////////////////////////////
|
|
4139
|
+
export interface $ZodPreprocessDef<B extends SomeType = $ZodType> extends $ZodPipeDef<$ZodTransform, B> {
|
|
4140
|
+
in: $ZodTransform;
|
|
4141
|
+
out: B;
|
|
4142
|
+
}
|
|
4143
|
+
|
|
4144
|
+
export interface $ZodPreprocessInternals<B extends SomeType = $ZodType> extends $ZodPipeInternals<$ZodTransform, B> {
|
|
4145
|
+
def: $ZodPreprocessDef<B>;
|
|
4146
|
+
optin: B["_zod"]["optin"];
|
|
4147
|
+
optout: B["_zod"]["optout"];
|
|
4148
|
+
}
|
|
4149
|
+
|
|
4150
|
+
export interface $ZodPreprocess<B extends SomeType = $ZodType> extends $ZodPipe<$ZodTransform, B> {
|
|
4151
|
+
_zod: $ZodPreprocessInternals<B>;
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
export const $ZodPreprocess: core.$constructor<$ZodPreprocess> = /*@__PURE__*/ core.$constructor(
|
|
4155
|
+
"$ZodPreprocess",
|
|
4156
|
+
(inst, def) => {
|
|
4157
|
+
$ZodPipe.init(inst, def);
|
|
4158
|
+
}
|
|
4159
|
+
);
|
|
4160
|
+
|
|
3459
4161
|
////////////////////////////////////////////
|
|
3460
4162
|
////////////////////////////////////////////
|
|
3461
4163
|
////////// //////////
|
|
@@ -3489,10 +4191,13 @@ export const $ZodReadonly: core.$constructor<$ZodReadonly> = /*@__PURE__*/ core.
|
|
|
3489
4191
|
$ZodType.init(inst, def);
|
|
3490
4192
|
util.defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
3491
4193
|
util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3492
|
-
util.defineLazy(inst._zod, "optin", () => def.innerType
|
|
3493
|
-
util.defineLazy(inst._zod, "optout", () => def.innerType
|
|
4194
|
+
util.defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
|
|
4195
|
+
util.defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
|
|
3494
4196
|
|
|
3495
4197
|
inst._zod.parse = (payload, ctx) => {
|
|
4198
|
+
if (ctx.direction === "backward") {
|
|
4199
|
+
return def.innerType._zod.run(payload, ctx);
|
|
4200
|
+
}
|
|
3496
4201
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3497
4202
|
if (result instanceof Promise) {
|
|
3498
4203
|
return result.then(handleReadonlyResult);
|
|
@@ -3518,6 +4223,7 @@ function handleReadonlyResult(payload: ParsePayload): ParsePayload {
|
|
|
3518
4223
|
export interface $ZodTemplateLiteralDef extends $ZodTypeDef {
|
|
3519
4224
|
type: "template_literal";
|
|
3520
4225
|
parts: $ZodTemplateLiteralPart[];
|
|
4226
|
+
format?: string | undefined;
|
|
3521
4227
|
}
|
|
3522
4228
|
export interface $ZodTemplateLiteralInternals<Template extends string = string>
|
|
3523
4229
|
extends $ZodTypeInternals<Template, Template> {
|
|
@@ -3585,7 +4291,8 @@ export const $ZodTemplateLiteral: core.$constructor<$ZodTemplateLiteral> = /*@__
|
|
|
3585
4291
|
$ZodType.init(inst, def);
|
|
3586
4292
|
const regexParts: string[] = [];
|
|
3587
4293
|
for (const part of def.parts) {
|
|
3588
|
-
if (part
|
|
4294
|
+
if (typeof part === "object" && part !== null) {
|
|
4295
|
+
// is Zod schema
|
|
3589
4296
|
if (!part._zod.pattern) {
|
|
3590
4297
|
// if (!source)
|
|
3591
4298
|
throw new Error(`Invalid template literal part, no pattern found: ${[...(part as any)._zod.traits].shift()}`);
|
|
@@ -3611,7 +4318,7 @@ export const $ZodTemplateLiteral: core.$constructor<$ZodTemplateLiteral> = /*@__
|
|
|
3611
4318
|
payload.issues.push({
|
|
3612
4319
|
input: payload.value,
|
|
3613
4320
|
inst,
|
|
3614
|
-
expected: "
|
|
4321
|
+
expected: "string",
|
|
3615
4322
|
code: "invalid_type",
|
|
3616
4323
|
});
|
|
3617
4324
|
return payload;
|
|
@@ -3623,8 +4330,9 @@ export const $ZodTemplateLiteral: core.$constructor<$ZodTemplateLiteral> = /*@__
|
|
|
3623
4330
|
payload.issues.push({
|
|
3624
4331
|
input: payload.value,
|
|
3625
4332
|
inst,
|
|
4333
|
+
|
|
3626
4334
|
code: "invalid_format",
|
|
3627
|
-
format: "template_literal",
|
|
4335
|
+
format: def.format ?? "template_literal",
|
|
3628
4336
|
pattern: inst._zod.pattern.source,
|
|
3629
4337
|
});
|
|
3630
4338
|
return payload;
|
|
@@ -3635,6 +4343,174 @@ export const $ZodTemplateLiteral: core.$constructor<$ZodTemplateLiteral> = /*@__
|
|
|
3635
4343
|
}
|
|
3636
4344
|
);
|
|
3637
4345
|
|
|
4346
|
+
//////////////////////////////////////////
|
|
4347
|
+
//////////////////////////////////////////
|
|
4348
|
+
////////// //////////
|
|
4349
|
+
////////// $ZodFunction //////////
|
|
4350
|
+
////////// //////////
|
|
4351
|
+
//////////////////////////////////////////
|
|
4352
|
+
//////////////////////////////////////////
|
|
4353
|
+
export type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
|
|
4354
|
+
export type $ZodFunctionIn = $ZodFunctionArgs;
|
|
4355
|
+
export type $ZodFunctionOut = $ZodType;
|
|
4356
|
+
|
|
4357
|
+
export type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (
|
|
4358
|
+
...args: $ZodFunctionIn extends Args ? never[] : core.output<Args>
|
|
4359
|
+
) => core.input<Returns>;
|
|
4360
|
+
|
|
4361
|
+
export type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (
|
|
4362
|
+
...args: $ZodFunctionIn extends Args ? never[] : core.output<Args>
|
|
4363
|
+
) => util.MaybeAsync<core.input<Returns>>;
|
|
4364
|
+
|
|
4365
|
+
export type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (
|
|
4366
|
+
...args: $ZodFunctionIn extends Args ? never[] : core.input<Args>
|
|
4367
|
+
) => core.output<Returns>;
|
|
4368
|
+
|
|
4369
|
+
export type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (
|
|
4370
|
+
...args: $ZodFunctionIn extends Args ? never[] : core.input<Args>
|
|
4371
|
+
) => Promise<core.output<Returns>>;
|
|
4372
|
+
|
|
4373
|
+
export interface $ZodFunctionDef<
|
|
4374
|
+
In extends $ZodFunctionIn = $ZodFunctionIn,
|
|
4375
|
+
Out extends $ZodFunctionOut = $ZodFunctionOut,
|
|
4376
|
+
> extends $ZodTypeDef {
|
|
4377
|
+
type: "function";
|
|
4378
|
+
input: In;
|
|
4379
|
+
output: Out;
|
|
4380
|
+
}
|
|
4381
|
+
|
|
4382
|
+
export interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut>
|
|
4383
|
+
extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
|
|
4384
|
+
def: $ZodFunctionDef<Args, Returns>;
|
|
4385
|
+
isst: errors.$ZodIssueInvalidType;
|
|
4386
|
+
}
|
|
4387
|
+
|
|
4388
|
+
export interface $ZodFunction<
|
|
4389
|
+
Args extends $ZodFunctionIn = $ZodFunctionIn,
|
|
4390
|
+
Returns extends $ZodFunctionOut = $ZodFunctionOut,
|
|
4391
|
+
> extends $ZodType<any, any, $ZodFunctionInternals<Args, Returns>> {
|
|
4392
|
+
/** @deprecated */
|
|
4393
|
+
_def: $ZodFunctionDef<Args, Returns>;
|
|
4394
|
+
_input: $InferInnerFunctionType<Args, Returns>;
|
|
4395
|
+
_output: $InferOuterFunctionType<Args, Returns>;
|
|
4396
|
+
|
|
4397
|
+
implement<F extends $InferInnerFunctionType<Args, Returns>>(
|
|
4398
|
+
func: F
|
|
4399
|
+
): // allow for return type inference
|
|
4400
|
+
(
|
|
4401
|
+
...args: Parameters<this["_output"]>
|
|
4402
|
+
) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
|
|
4403
|
+
|
|
4404
|
+
implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(
|
|
4405
|
+
func: F
|
|
4406
|
+
): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
|
|
4407
|
+
|
|
4408
|
+
input<const Items extends util.TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(
|
|
4409
|
+
args: Items,
|
|
4410
|
+
rest?: Rest
|
|
4411
|
+
): $ZodFunction<$ZodTuple<Items, Rest>, Returns>;
|
|
4412
|
+
input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
|
|
4413
|
+
input(...args: any[]): $ZodFunction<any, Returns>;
|
|
4414
|
+
|
|
4415
|
+
output<NewReturns extends $ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
|
|
4416
|
+
}
|
|
4417
|
+
|
|
4418
|
+
export interface $ZodFunctionParams<I extends $ZodFunctionIn, O extends $ZodType> {
|
|
4419
|
+
input?: I;
|
|
4420
|
+
output?: O;
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4423
|
+
export const $ZodFunction: core.$constructor<$ZodFunction> = /*@__PURE__*/ core.$constructor(
|
|
4424
|
+
"$ZodFunction",
|
|
4425
|
+
(inst, def) => {
|
|
4426
|
+
$ZodType.init(inst, def);
|
|
4427
|
+
inst._def = def;
|
|
4428
|
+
inst._zod.def = def;
|
|
4429
|
+
|
|
4430
|
+
inst.implement = (func) => {
|
|
4431
|
+
if (typeof func !== "function") {
|
|
4432
|
+
throw new Error("implement() must be called with a function");
|
|
4433
|
+
}
|
|
4434
|
+
return function (this: any, ...args: never[]) {
|
|
4435
|
+
const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
|
|
4436
|
+
const result = Reflect.apply(func, this, parsedArgs as never[]);
|
|
4437
|
+
if (inst._def.output) {
|
|
4438
|
+
return parse(inst._def.output, result);
|
|
4439
|
+
}
|
|
4440
|
+
return result as any;
|
|
4441
|
+
};
|
|
4442
|
+
};
|
|
4443
|
+
|
|
4444
|
+
inst.implementAsync = (func) => {
|
|
4445
|
+
if (typeof func !== "function") {
|
|
4446
|
+
throw new Error("implementAsync() must be called with a function");
|
|
4447
|
+
}
|
|
4448
|
+
return async function (this: any, ...args: never[]) {
|
|
4449
|
+
const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
|
|
4450
|
+
const result = await Reflect.apply(func, this, parsedArgs as never[]);
|
|
4451
|
+
if (inst._def.output) {
|
|
4452
|
+
return await parseAsync(inst._def.output, result);
|
|
4453
|
+
}
|
|
4454
|
+
return result;
|
|
4455
|
+
} as any;
|
|
4456
|
+
};
|
|
4457
|
+
|
|
4458
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
4459
|
+
if (typeof payload.value !== "function") {
|
|
4460
|
+
payload.issues.push({
|
|
4461
|
+
code: "invalid_type",
|
|
4462
|
+
expected: "function",
|
|
4463
|
+
input: payload.value,
|
|
4464
|
+
inst,
|
|
4465
|
+
});
|
|
4466
|
+
return payload;
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
// Check if output is a promise type to determine if we should use async implementation
|
|
4470
|
+
const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
|
|
4471
|
+
|
|
4472
|
+
if (hasPromiseOutput) {
|
|
4473
|
+
payload.value = inst.implementAsync(payload.value);
|
|
4474
|
+
} else {
|
|
4475
|
+
payload.value = inst.implement(payload.value);
|
|
4476
|
+
}
|
|
4477
|
+
return payload;
|
|
4478
|
+
};
|
|
4479
|
+
|
|
4480
|
+
inst.input = (...args: any[]): $ZodFunction<any, any> => {
|
|
4481
|
+
const F: any = inst.constructor;
|
|
4482
|
+
if (Array.isArray(args[0])) {
|
|
4483
|
+
return new F({
|
|
4484
|
+
type: "function",
|
|
4485
|
+
input: new $ZodTuple({
|
|
4486
|
+
type: "tuple",
|
|
4487
|
+
items: args[0],
|
|
4488
|
+
rest: args[1],
|
|
4489
|
+
}),
|
|
4490
|
+
output: inst._def.output,
|
|
4491
|
+
});
|
|
4492
|
+
}
|
|
4493
|
+
|
|
4494
|
+
return new F({
|
|
4495
|
+
type: "function",
|
|
4496
|
+
input: args[0],
|
|
4497
|
+
output: inst._def.output,
|
|
4498
|
+
});
|
|
4499
|
+
};
|
|
4500
|
+
|
|
4501
|
+
inst.output = (output) => {
|
|
4502
|
+
const F: any = inst.constructor;
|
|
4503
|
+
return new F({
|
|
4504
|
+
type: "function",
|
|
4505
|
+
input: inst._def.input,
|
|
4506
|
+
output,
|
|
4507
|
+
});
|
|
4508
|
+
};
|
|
4509
|
+
|
|
4510
|
+
return inst;
|
|
4511
|
+
}
|
|
4512
|
+
);
|
|
4513
|
+
|
|
3638
4514
|
/////////////////////////////////////////
|
|
3639
4515
|
/////////////////////////////////////////
|
|
3640
4516
|
////////// //////////
|
|
@@ -3648,7 +4524,7 @@ export interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeD
|
|
|
3648
4524
|
}
|
|
3649
4525
|
|
|
3650
4526
|
export interface $ZodPromiseInternals<T extends SomeType = $ZodType>
|
|
3651
|
-
extends $ZodTypeInternals<core.output<T
|
|
4527
|
+
extends $ZodTypeInternals<Promise<core.output<T>>, util.MaybeAsync<core.input<T>>> {
|
|
3652
4528
|
def: $ZodPromiseDef<T>;
|
|
3653
4529
|
isst: never;
|
|
3654
4530
|
}
|
|
@@ -3700,11 +4576,18 @@ export interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
|
|
|
3700
4576
|
export const $ZodLazy: core.$constructor<$ZodLazy> = /*@__PURE__*/ core.$constructor("$ZodLazy", (inst, def) => {
|
|
3701
4577
|
$ZodType.init(inst, def);
|
|
3702
4578
|
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
util.defineLazy(inst._zod, "
|
|
3707
|
-
|
|
4579
|
+
// Cache the resolved inner type on the shared `def` so all clones of this
|
|
4580
|
+
// lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance,
|
|
4581
|
+
// preserving identity for cycle detection on recursive schemas.
|
|
4582
|
+
util.defineLazy(inst._zod, "innerType", () => {
|
|
4583
|
+
const d = def as $ZodLazyDef & { _cachedInner?: $ZodType };
|
|
4584
|
+
if (!d._cachedInner) d._cachedInner = def.getter() as $ZodType;
|
|
4585
|
+
return d._cachedInner;
|
|
4586
|
+
});
|
|
4587
|
+
util.defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4588
|
+
util.defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4589
|
+
util.defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
|
|
4590
|
+
util.defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? undefined);
|
|
3708
4591
|
inst._zod.parse = (payload, ctx) => {
|
|
3709
4592
|
const inner = inst._zod.innerType;
|
|
3710
4593
|
return inner._zod.run(payload, ctx);
|
|
@@ -3800,6 +4683,7 @@ export type $ZodTypes =
|
|
|
3800
4683
|
| $ZodSet
|
|
3801
4684
|
| $ZodLiteral
|
|
3802
4685
|
| $ZodEnum
|
|
4686
|
+
| $ZodFunction
|
|
3803
4687
|
| $ZodPromise
|
|
3804
4688
|
| $ZodLazy
|
|
3805
4689
|
| $ZodOptional
|
|
@@ -3834,9 +4718,13 @@ export type $ZodStringFormatTypes =
|
|
|
3834
4718
|
| $ZodISODuration
|
|
3835
4719
|
| $ZodIPv4
|
|
3836
4720
|
| $ZodIPv6
|
|
4721
|
+
| $ZodMAC
|
|
3837
4722
|
| $ZodCIDRv4
|
|
3838
4723
|
| $ZodCIDRv6
|
|
3839
4724
|
| $ZodBase64
|
|
3840
4725
|
| $ZodBase64URL
|
|
3841
4726
|
| $ZodE164
|
|
3842
|
-
| $ZodJWT
|
|
4727
|
+
| $ZodJWT
|
|
4728
|
+
| $ZodCustomStringFormat<"hex">
|
|
4729
|
+
| $ZodCustomStringFormat<util.HashFormat>
|
|
4730
|
+
| $ZodCustomStringFormat<"hostname">;
|