@highstate/designer 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +3 -3
- package/.output/public/_nuxt/57B6Rca8.js +1 -0
- package/.output/public/_nuxt/5X7smno1.js +1 -0
- package/.output/public/_nuxt/{Cp2bjttb.js → 83L43bj1.js} +1 -1
- package/.output/public/_nuxt/8MSfy8uY.js +1 -0
- package/.output/public/_nuxt/9I37tBe7.js +1 -0
- package/.output/public/_nuxt/Aopv2gwH.js +1 -0
- package/.output/public/_nuxt/B13uiJCv.js +1 -0
- package/.output/public/_nuxt/B7c-h3xW.js +1 -0
- package/.output/public/_nuxt/B8nw2aST.js +2 -0
- package/.output/public/_nuxt/{1DNp92w6.js → B93PlW-d.js} +1 -1
- package/.output/public/_nuxt/BA0jw7CM.js +1 -0
- package/.output/public/_nuxt/BBf5iR-q.js +1 -0
- package/.output/public/_nuxt/BCVaR2pQ.js +1 -0
- package/.output/public/_nuxt/BDAHnC4j.js +1 -0
- package/.output/public/_nuxt/BDa1f6PF.js +2 -0
- package/.output/public/_nuxt/{YB_1Ta41.js → BDs6uo3D.js} +1 -1
- package/.output/public/_nuxt/BEEt8Am7.js +1 -0
- package/.output/public/_nuxt/BE_Meo09.js +269 -0
- package/.output/public/_nuxt/BGHnOYBU.js +1 -0
- package/.output/public/_nuxt/BH7IYjvW.js +1 -0
- package/.output/public/_nuxt/BJDFO7_C.js +1 -0
- package/.output/public/_nuxt/BJK6uMxG.js +1 -0
- package/.output/public/_nuxt/BLF3u89x.js +1 -0
- package/.output/public/_nuxt/{Xi2tawMN.js → BLmx8bSh.js} +1 -1
- package/.output/public/_nuxt/{DlfHMoPT.js → BPQ3VLAy.js} +1 -1
- package/.output/public/_nuxt/BPcwi1q2.js +1 -0
- package/.output/public/_nuxt/{BBGuKPBd.js → BR5kRUq4.js} +1 -1
- package/.output/public/_nuxt/BTifaqeh.js +1 -0
- package/.output/public/_nuxt/BUNf2Yb8.js +1 -0
- package/.output/public/_nuxt/BUw7H-hv.js +1 -0
- package/.output/public/_nuxt/{DRprw4p4.js → BVQ-GDCI.js} +1 -1
- package/.output/public/_nuxt/{BbQj0Z2C.js → BYV0-3_D.js} +1 -1
- package/.output/public/_nuxt/BZvkOJ9d.js +1 -0
- package/.output/public/_nuxt/Ba13S78F.js +1 -0
- package/.output/public/_nuxt/BcVCzyr7.js +1 -0
- package/.output/public/_nuxt/BhRPY-oY.js +1 -0
- package/.output/public/_nuxt/{uMbE6_td.js → Bhrxn6JZ.js} +1 -1
- package/.output/public/_nuxt/BkNNRtnm.js +1 -0
- package/.output/public/_nuxt/BlfjmxyP.js +1 -0
- package/.output/public/_nuxt/Bmn6On1c.js +1 -0
- package/.output/public/_nuxt/Bo8jzlL1.js +18 -0
- package/.output/public/_nuxt/BpkvlDNi.js +1 -0
- package/.output/public/_nuxt/{BIAuTxu3.js → Br6cN0cg.js} +1 -1
- package/.output/public/_nuxt/{CUEJCptM.js → BrzmwbiE.js} +1 -1
- package/.output/public/_nuxt/{D32k8WzR.js → BtvRca6l.js} +1 -1
- package/.output/public/_nuxt/BuJgCY_C.js +1 -0
- package/.output/public/_nuxt/Bv_4Rxtq.js +1 -0
- package/.output/public/_nuxt/BvzEVeQv.js +1 -0
- package/.output/public/_nuxt/BxAss8Tj.js +1 -0
- package/.output/public/_nuxt/BxaP9l2T.js +1 -0
- package/.output/public/_nuxt/BxgE0vQu.js +1 -0
- package/.output/public/_nuxt/ByBNG4eo.js +1 -0
- package/.output/public/_nuxt/{COI20M4I.js → BzTr9Aqm.js} +1 -1
- package/.output/public/_nuxt/{CXu1NL6O.js → C-HG3fhB.js} +1 -1
- package/.output/public/_nuxt/C-sUppwS.js +1 -0
- package/.output/public/_nuxt/C1FLL1Qz.js +1 -0
- package/.output/public/_nuxt/C3Wv6jpd.js +1 -0
- package/.output/public/_nuxt/C47S-Tmv.js +1 -0
- package/.output/public/_nuxt/C4EeE6gA.js +1 -0
- package/.output/public/_nuxt/{C-Jbm3Hp.js → C4gqWexZ.js} +1 -1
- package/.output/public/_nuxt/{DTMYz4Jt.js → C5YyOfLZ.js} +1 -1
- package/.output/public/_nuxt/C7zT0LnQ.js +1 -0
- package/.output/public/_nuxt/C8lm7lgC.js +1 -0
- package/.output/public/_nuxt/C9dUb6Cb.js +1 -0
- package/.output/public/_nuxt/{DS1LvVMU.js → C9oPPf7i.js} +1 -1
- package/.output/public/_nuxt/{D1uDOp7C.js → CFHQjOhq.js} +1 -1
- package/.output/public/_nuxt/{Dtc2v4kS.js → CGscLIrv.js} +1 -1
- package/.output/public/_nuxt/{DKzvysjW.js → CH1njM8p.js} +1 -1
- package/.output/public/_nuxt/CJWmG4YP.js +12 -0
- package/.output/public/_nuxt/CLZrNe3w.js +1 -0
- package/.output/public/_nuxt/CMTm3GFP.js +1 -0
- package/.output/public/_nuxt/CMjwMIkn.js +1 -0
- package/.output/public/_nuxt/COcwbKMJ.js +1 -0
- package/.output/public/_nuxt/CPZSvMBB.js +1 -0
- package/.output/public/_nuxt/CPpO8vcZ.js +1 -0
- package/.output/public/_nuxt/CQ8jqdy-.js +1 -0
- package/.output/public/_nuxt/CV5MeYf9.js +1 -0
- package/.output/public/_nuxt/{CcyOm34o.js → CVdnzihN.js} +1 -1
- package/.output/public/_nuxt/CW8IKDeL.js +1 -0
- package/.output/public/_nuxt/{pkIJ47B4.js → CXZktZb0.js} +1 -1
- package/.output/public/_nuxt/CYsAdtH9.js +1 -0
- package/.output/public/_nuxt/{BUyGWigt.js → CZhp0h8q.js} +1 -1
- package/.output/public/_nuxt/CaJ-zn_Z.js +2 -0
- package/.output/public/_nuxt/CcOKGYBt.js +1 -0
- package/.output/public/_nuxt/{oTG82Wo1.js → CenWIFCC.js} +1 -1
- package/.output/public/_nuxt/ChaZkl1J.js +1 -0
- package/.output/public/_nuxt/CjoLj4QM.js +1 -0
- package/.output/public/_nuxt/{BtsDLbAf.js → Cl0AqbOI.js} +1 -1
- package/.output/public/_nuxt/Cm-2nZ05.js +1 -0
- package/.output/public/_nuxt/{DUSGQflk.js → Cm3UrAx6.js} +1 -1
- package/.output/public/_nuxt/{BGHREFWD.js → CmIQRyeF.js} +1 -1
- package/.output/public/_nuxt/{f7oK2omx.js → Cn7AkR1O.js} +1 -1
- package/.output/public/_nuxt/{JhPuU2gP.js → CnnebwVN.js} +1 -1
- package/.output/public/_nuxt/CnsnAmq5.js +1 -0
- package/.output/public/_nuxt/CoDkCxhg.js +1 -0
- package/.output/public/_nuxt/{B-hkwWGT.js → CpOuai2O.js} +1 -1
- package/.output/public/_nuxt/CudFwYib.js +1 -0
- package/.output/public/_nuxt/{BDzgwa52.js → CufHLc7y.js} +1 -1
- package/.output/public/_nuxt/CwoSXNpI.js +1 -0
- package/.output/public/_nuxt/CxEW7TG8.js +1 -0
- package/.output/public/_nuxt/CxLEBnE3.js +1 -0
- package/.output/public/_nuxt/{DNrj_gVY.js → CxbxFI8M.js} +1 -1
- package/.output/public/_nuxt/CzSiA7V6.js +1 -0
- package/.output/public/_nuxt/D-wGZMZP.js +1 -0
- package/.output/public/_nuxt/D27ZAKIj.js +1 -0
- package/.output/public/_nuxt/D2aToa54.js +1 -0
- package/.output/public/_nuxt/D2obegTF.js +1 -0
- package/.output/public/_nuxt/{NleAzG8P.js → D4_iv3hh.js} +1 -1
- package/.output/public/_nuxt/D53aC0YG.js +1 -0
- package/.output/public/_nuxt/D5z-4QVk.js +1 -0
- package/.output/public/_nuxt/D6fh7rEe.js +2 -0
- package/.output/public/_nuxt/D87Tk5Gz.js +1 -0
- package/.output/public/_nuxt/D8_7TLub.js +1 -0
- package/.output/public/_nuxt/D91rOou-.js +13 -0
- package/.output/public/_nuxt/DCBCRx0O.js +1 -0
- package/.output/public/_nuxt/DCR009rv.js +1 -0
- package/.output/public/_nuxt/DCinzvm1.js +1 -0
- package/.output/public/_nuxt/DEthMvLe.js +1 -0
- package/.output/public/_nuxt/DFWUc33u.js +1 -0
- package/.output/public/_nuxt/{5bLW0GMw.js → DGP4VlC8.js} +1 -1
- package/.output/public/_nuxt/{CnK8MTSM.js → DHQR4-dF.js} +1 -1
- package/.output/public/_nuxt/DJN0y8jO.js +1 -0
- package/.output/public/_nuxt/DJjDtW9f.js +1 -0
- package/.output/public/_nuxt/DKhcu7kD.js +1 -0
- package/.output/public/_nuxt/DMwsHuHA.js +1 -0
- package/.output/public/_nuxt/{GAB5JH5K.js → DNqd6Nek.js} +1 -1
- package/.output/public/_nuxt/DOMRsNpU.js +1 -0
- package/.output/public/_nuxt/DOPqH6_T.js +1 -0
- package/.output/public/_nuxt/DQHHT9y-.js +1 -0
- package/.output/public/_nuxt/{B5ZR69Tn.js → DQwYQDb2.js} +1 -1
- package/.output/public/_nuxt/DQyhUUbL.js +1 -0
- package/.output/public/_nuxt/DRfxs3PN.js +1 -0
- package/.output/public/_nuxt/{DPcUKYIF.js → DRw_LuNl.js} +1 -1
- package/.output/public/_nuxt/DV7GczEv.js +1 -0
- package/.output/public/_nuxt/DWQRqdcR.js +1 -0
- package/.output/public/_nuxt/DWa2aw6r.js +1 -0
- package/.output/public/_nuxt/DYoxhk2S.js +1 -0
- package/.output/public/_nuxt/DZf3V79B.js +1 -0
- package/.output/public/_nuxt/{BPzJO5Oe.js → DZu-aV2c.js} +1 -1
- package/.output/public/_nuxt/Dbwml2gB.js +1 -0
- package/.output/public/_nuxt/DfvKjH24.js +1 -0
- package/.output/public/_nuxt/{Cdx7mHEO.js → DhmSosst.js} +1 -1
- package/.output/public/_nuxt/DiTMzCP2.js +1 -0
- package/.output/public/_nuxt/{CA7CTBwS.js → Dph4kLrZ.js} +1 -1
- package/.output/public/_nuxt/DqQDbK_p.js +1 -0
- package/.output/public/_nuxt/DsS90Fp6.js +1 -0
- package/.output/public/_nuxt/Dspwwk_N.js +1 -0
- package/.output/public/_nuxt/DsumFeuD.js +1 -0
- package/.output/public/_nuxt/DxERyYWQ.js +1 -0
- package/.output/public/_nuxt/{D7ScPSBf.js → DxNHbxmM.js} +1 -1
- package/.output/public/_nuxt/{CLvts2aQ.js → DxSwrfjg.js} +1 -1
- package/.output/public/_nuxt/{DcmvOc98.js → DyMmfYiE.js} +1 -1
- package/.output/public/_nuxt/DzWdbJvx.js +1 -0
- package/.output/public/_nuxt/{COEtLSDF.js → Dzze3sRP.js} +1 -1
- package/.output/public/_nuxt/G13IRnB2.js +1 -0
- package/.output/public/_nuxt/GDxZ_Nvm.js +14 -0
- package/.output/public/_nuxt/GgtqCdye.js +1 -0
- package/.output/public/_nuxt/{DkhsQLT2.js → GsRaNv29.js} +1 -1
- package/.output/public/_nuxt/IF9eRakj.js +1 -0
- package/.output/public/_nuxt/RCBWmVHz.js +1 -0
- package/.output/public/_nuxt/{Cb0HU5_O.js → RNghxpo_.js} +1 -1
- package/.output/public/_nuxt/{SecretValueField.DcyO8gGc.css → SecretValueField.Dy80RlGP.css} +1 -1
- package/.output/public/_nuxt/{B8ROHVmM.js → TsXTqZ29.js} +1 -1
- package/.output/public/_nuxt/VCDPK7BO.js +1 -0
- package/.output/public/_nuxt/{CU27uY9n.js → W9tJ9s81.js} +1 -1
- package/.output/public/_nuxt/{CmALWFRB.js → XEA9GSJd.js} +16 -468
- package/.output/public/_nuxt/{DeWFVDHI.js → YqXBG_HV.js} +1 -1
- package/.output/public/_nuxt/ZbicA1ry.js +1 -0
- package/.output/public/_nuxt/_snapshotId_.ChuSNeNY.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a1fec520-0c95-4ae0-af5e-964780fad341.json +1 -0
- package/.output/public/_nuxt/d-NZQb9b.js +1 -0
- package/.output/public/_nuxt/edge-router-BdPMCV6u.js +1 -0
- package/.output/public/_nuxt/{entry.dxugZJXl.css → entry.Bc0aTA0K.css} +1 -1
- package/.output/public/_nuxt/error-404.X7H_YhdC.css +1 -0
- package/.output/public/_nuxt/error-500.BOQe1fsk.css +1 -0
- package/.output/public/_nuxt/f3TOpYbw.js +1 -0
- package/.output/public/_nuxt/{DrZfEa88.js → fKv21gyL.js} +1 -1
- package/.output/public/_nuxt/graph-layout-B7wl80r3.js +1 -0
- package/.output/public/_nuxt/graph-resolver-DKNtntr2.js +180 -0
- package/.output/public/_nuxt/{CGqH5EJj.js → hJgmCMqR.js} +1 -1
- package/.output/public/_nuxt/{BoKiGodi.js → k_qm7-4y.js} +1 -1
- package/.output/public/_nuxt/{IvJ92aGK.js → m17aaUwq.js} +1 -1
- package/.output/public/_nuxt/mUFnM-_q.js +1 -0
- package/.output/public/_nuxt/mWjccvbQ.js +1 -0
- package/.output/public/_nuxt/{BXY8tDGw.js → mjskCLCv.js} +1 -1
- package/.output/public/_nuxt/n0RAZLbO.js +1 -0
- package/.output/public/_nuxt/n2N0HUVH.js +1 -0
- package/.output/public/_nuxt/o_m1mZtJ.js +6 -0
- package/.output/public/_nuxt/pxXmJ8QX.js +1 -0
- package/.output/public/_nuxt/{BHrmToEH.js → qdsjHGoJ.js} +1 -1
- package/.output/public/_nuxt/{BbcW6ACK.js → rGO070M0.js} +1 -1
- package/.output/public/_nuxt/rcFevLEP.js +2 -0
- package/.output/public/_nuxt/rgN_MdZl.js +1 -0
- package/.output/public/_nuxt/tsyQDnRt.js +5 -0
- package/.output/public/_nuxt/u5AG7uiY.js +1 -0
- package/.output/public/_nuxt/uYugtg8r.js +1 -0
- package/.output/public/_nuxt/vuetify.BzdWZaIq.css +1 -0
- package/.output/public/_nuxt/{BMMyXqK5.js → wDzz0qaB.js} +1 -1
- package/.output/public/_nuxt/xA6NntuA.js +1 -0
- package/.output/public/_nuxt/xdsXwj_J.js +1 -0
- package/.output/public/_nuxt/xp27HhqZ.js +1 -0
- package/.output/public/_nuxt/xrNU8mHG.js +3 -0
- package/.output/public/_nuxt/yaml.worker-C1Cl1y5J.js +399 -0
- package/.output/public/_nuxt/ziXKbM2N.js +1 -0
- package/.output/public/libavoid.wasm +0 -0
- package/.output/server/index.mjs +2213 -6830
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +427 -440
- package/.output/server/node_modules/@babel/parser/package.json +6 -6
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.mjs +4 -4
- package/.output/server/node_modules/@trpc/server/dist/adapters/ws.mjs +10 -10
- package/.output/server/node_modules/@trpc/server/dist/{utils-CLZnJdb_.mjs → codes-DagpWZLc.mjs} +66 -66
- package/.output/server/node_modules/@trpc/server/dist/{getErrorShape-BH60iMC2.mjs → getErrorShape-vC8mUXJD.mjs} +3 -3
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +4 -4
- package/.output/server/node_modules/@trpc/server/dist/{initTRPC-CB9uBez5.mjs → initTRPC-RoZMIBeA.mjs} +4 -4
- package/.output/server/node_modules/@trpc/server/dist/{node-http-8dtdvMrE.mjs → node-http-DtA2iLK9.mjs} +7 -5
- package/.output/server/node_modules/@trpc/server/dist/{parseTRPCMessage-BlZeZ60t.mjs → parseTRPCMessage-CTow-umk.mjs} +2 -2
- package/.output/server/node_modules/@trpc/server/dist/{resolveResponse-DngSgha6.mjs → resolveResponse-BVDlNZwN.mjs} +45 -48
- package/.output/server/node_modules/@trpc/server/dist/{tracked-Blz8XOf1.mjs → tracked-Bjtgv3wJ.mjs} +11 -9
- package/.output/server/node_modules/@trpc/server/dist/{unstable-core-do-not-import-D89CaGtL.mjs → unstable-core-do-not-import-9NNw8uQM.mjs} +5 -3
- package/.output/server/node_modules/@trpc/server/dist/{ws-BR20IWki.mjs → ws-CJgZE7Hg.mjs} +60 -20
- package/.output/server/node_modules/@trpc/server/package.json +6 -6
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +128 -106
- package/.output/server/node_modules/@vue/compiler-core/package.json +5 -5
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +54 -54
- package/.output/server/node_modules/@vue/compiler-dom/package.json +3 -3
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +35 -33
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +105 -42
- package/.output/server/node_modules/@vue/reactivity/package.json +2 -2
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +2129 -2063
- package/.output/server/node_modules/@vue/runtime-core/package.json +3 -3
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +78 -31
- package/.output/server/node_modules/@vue/runtime-dom/package.json +5 -5
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +6 -6
- package/.output/server/node_modules/@vue/server-renderer/package.json +4 -4
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +1 -1
- package/.output/server/node_modules/@vue/shared/package.json +1 -1
- package/.output/server/node_modules/copy-anything/dist/index.js +47 -31
- package/.output/server/node_modules/copy-anything/package.json +19 -72
- package/.output/server/node_modules/devalue/index.js +1 -0
- package/.output/server/node_modules/devalue/package.json +2 -2
- package/.output/server/node_modules/devalue/src/constants.js +1 -0
- package/.output/server/node_modules/devalue/src/parse.js +55 -4
- package/.output/server/node_modules/devalue/src/stringify.js +101 -12
- package/.output/server/node_modules/devalue/src/uneval.js +100 -13
- package/.output/server/node_modules/devalue/src/utils.js +35 -1
- package/.output/server/node_modules/entities/{lib/decode_codepoint.js → dist/commonjs/decode-codepoint.js} +16 -15
- package/.output/server/node_modules/entities/{lib → dist/commonjs}/decode.js +200 -168
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/entities/package.json +99 -69
- package/.output/server/node_modules/hookable/dist/index.mjs +244 -268
- package/.output/server/node_modules/hookable/package.json +29 -26
- package/.output/server/node_modules/is-what/dist/getType.js +4 -0
- package/.output/server/node_modules/is-what/dist/index.js +43 -171
- package/.output/server/node_modules/is-what/dist/isAnyObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBigInt.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBlob.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBoolean.js +5 -0
- package/.output/server/node_modules/is-what/dist/isDate.js +5 -0
- package/.output/server/node_modules/is-what/dist/isEmptyArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isEmptyObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isEmptyString.js +4 -0
- package/.output/server/node_modules/is-what/dist/isError.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFile.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFullArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFullObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isFullString.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFunction.js +4 -0
- package/.output/server/node_modules/is-what/dist/isHexDecimal.js +12 -0
- package/.output/server/node_modules/is-what/dist/isInstanceOf.js +19 -0
- package/.output/server/node_modules/is-what/dist/isInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isIterable.js +16 -0
- package/.output/server/node_modules/is-what/dist/isMap.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNaNValue.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNegativeInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNegativeNumber.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNull.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNullOrUndefined.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNumber.js +9 -0
- package/.output/server/node_modules/is-what/dist/isObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isObjectLike.js +11 -0
- package/.output/server/node_modules/is-what/dist/isOneOf.js +15 -0
- package/.output/server/node_modules/is-what/dist/isPlainObject.js +11 -0
- package/.output/server/node_modules/is-what/dist/isPositiveInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isPositiveNumber.js +5 -0
- package/.output/server/node_modules/is-what/dist/isPrimitive.js +21 -0
- package/.output/server/node_modules/is-what/dist/isPromise.js +5 -0
- package/.output/server/node_modules/is-what/dist/isRegExp.js +5 -0
- package/.output/server/node_modules/is-what/dist/isSet.js +5 -0
- package/.output/server/node_modules/is-what/dist/isString.js +5 -0
- package/.output/server/node_modules/is-what/dist/isSymbol.js +5 -0
- package/.output/server/node_modules/is-what/dist/isType.js +20 -0
- package/.output/server/node_modules/is-what/dist/isUndefined.js +5 -0
- package/.output/server/node_modules/is-what/dist/isWeakMap.js +5 -0
- package/.output/server/node_modules/is-what/dist/isWeakSet.js +5 -0
- package/.output/server/node_modules/is-what/package.json +23 -88
- package/.output/server/node_modules/superjson/dist/index.js +9 -6
- package/.output/server/node_modules/superjson/dist/pathstringifier.js +13 -2
- package/.output/server/node_modules/superjson/dist/plainer.js +23 -11
- package/.output/server/node_modules/superjson/dist/transformer.js +4 -1
- package/.output/server/node_modules/superjson/package.json +5 -21
- package/.output/server/node_modules/ufo/dist/index.mjs +16 -9
- package/.output/server/node_modules/ufo/package.json +15 -14
- package/.output/server/node_modules/unhead/dist/plugins.mjs +2 -2
- package/.output/server/node_modules/unhead/dist/server.mjs +4 -6
- package/.output/server/node_modules/unhead/dist/shared/{unhead.DH45uomy.mjs → unhead.BFfcxOoW.mjs} +3 -3
- package/.output/server/node_modules/unhead/dist/shared/{unhead.DZbvapt-.mjs → unhead.CbpEuj3y.mjs} +3 -2
- package/.output/server/node_modules/unhead/dist/shared/{unhead.Djo8ep_Y.mjs → unhead.ckV6dpEQ.mjs} +1 -1
- package/.output/server/node_modules/unhead/dist/shared/{unhead.BpRRHAhY.mjs → unhead.eK9_7LaY.mjs} +16 -12
- package/.output/server/node_modules/unhead/dist/utils.mjs +2 -2
- package/.output/server/node_modules/unhead/package.json +2 -2
- package/.output/server/node_modules/vue/dist/vue.cjs.js +1 -1
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +1 -1
- package/.output/server/node_modules/vue/package.json +6 -6
- package/.output/server/node_modules/ws/lib/constants.js +1 -0
- package/.output/server/node_modules/ws/lib/websocket-server.js +5 -1
- package/.output/server/node_modules/ws/lib/websocket.js +13 -8
- package/.output/server/node_modules/ws/package.json +1 -1
- package/.output/server/node_modules/zod/package.json +1 -1
- package/.output/server/node_modules/zod/v4/classic/checks.js +1 -1
- package/.output/server/node_modules/zod/v4/classic/external.js +3 -1
- package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/.output/server/node_modules/zod/v4/classic/schemas.js +121 -4
- package/.output/server/node_modules/zod/v4/core/api.js +157 -0
- package/.output/server/node_modules/zod/v4/core/checks.js +8 -2
- package/.output/server/node_modules/zod/v4/core/core.js +20 -11
- package/.output/server/node_modules/zod/v4/core/index.js +2 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/.output/server/node_modules/zod/v4/core/regexes.js +8 -2
- package/.output/server/node_modules/zod/v4/core/registries.js +3 -4
- package/.output/server/node_modules/zod/v4/core/schemas.js +204 -66
- package/.output/server/node_modules/zod/v4/core/to-json-schema.js +391 -869
- package/.output/server/node_modules/zod/v4/core/util.js +58 -8
- package/.output/server/node_modules/zod/v4/core/versions.js +2 -2
- package/.output/server/node_modules/zod/v4/locales/ar.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/az.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/be.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/bg.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ca.js +14 -25
- package/.output/server/node_modules/zod/v4/locales/cs.js +18 -42
- package/.output/server/node_modules/zod/v4/locales/da.js +23 -39
- package/.output/server/node_modules/zod/v4/locales/de.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/en.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/eo.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/es.js +42 -59
- package/.output/server/node_modules/zod/v4/locales/fa.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/fi.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/fr-CA.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/fr.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/he.js +175 -78
- package/.output/server/node_modules/zod/v4/locales/hu.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
- package/.output/server/node_modules/zod/v4/locales/id.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/index.js +2 -0
- package/.output/server/node_modules/zod/v4/locales/is.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/it.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ja.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ka.js +19 -32
- package/.output/server/node_modules/zod/v4/locales/km.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/ko.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/lt.js +27 -54
- package/.output/server/node_modules/zod/v4/locales/mk.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ms.js +15 -24
- package/.output/server/node_modules/zod/v4/locales/nl.js +25 -32
- package/.output/server/node_modules/zod/v4/locales/no.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ota.js +17 -25
- package/.output/server/node_modules/zod/v4/locales/pl.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ps.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/pt.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ru.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/sl.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/sv.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ta.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/th.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/tr.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/uk.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ur.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/vi.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/yo.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/zh-CN.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/zh-TW.js +14 -24
- package/.output/server/package.json +22 -22
- package/package.json +6 -6
- package/.output/public/_nuxt/-oaD50UK.js +0 -1
- package/.output/public/_nuxt/0ekw3e2V.js +0 -1
- package/.output/public/_nuxt/1f5tAgHw.js +0 -1
- package/.output/public/_nuxt/5ggY4uig.js +0 -1
- package/.output/public/_nuxt/6nHXG8SA.js +0 -1
- package/.output/public/_nuxt/9hmcqHPO.js +0 -1
- package/.output/public/_nuxt/BBxmzUt6.js +0 -1
- package/.output/public/_nuxt/BE2KfCdU.js +0 -1
- package/.output/public/_nuxt/BFNM2w_f.js +0 -1
- package/.output/public/_nuxt/BGLu70Yq.js +0 -1
- package/.output/public/_nuxt/BIuj43Wh.js +0 -1
- package/.output/public/_nuxt/BLsOQd1H.js +0 -280
- package/.output/public/_nuxt/BNGfscqk.js +0 -1
- package/.output/public/_nuxt/BQvybpQq.js +0 -1
- package/.output/public/_nuxt/BU7Cl-8B.js +0 -1
- package/.output/public/_nuxt/BUXOnL59.js +0 -1
- package/.output/public/_nuxt/Bbwybh3N.js +0 -2
- package/.output/public/_nuxt/BczD6j-v.js +0 -1
- package/.output/public/_nuxt/BepWV7mh.js +0 -1
- package/.output/public/_nuxt/Bh0qehhp.js +0 -1
- package/.output/public/_nuxt/Bl2oy6fF.js +0 -1
- package/.output/public/_nuxt/BmDdxTjo.js +0 -1
- package/.output/public/_nuxt/BqeRdtD4.js +0 -2
- package/.output/public/_nuxt/BvAqAH-y.js +0 -1
- package/.output/public/_nuxt/BxZD33h1.js +0 -1
- package/.output/public/_nuxt/C4zpeTvm.js +0 -1
- package/.output/public/_nuxt/C7Pw0Ztw.js +0 -1
- package/.output/public/_nuxt/C8-UwF3o.js +0 -1
- package/.output/public/_nuxt/CCd08HS_.js +0 -1
- package/.output/public/_nuxt/CEYFgC8B.js +0 -1
- package/.output/public/_nuxt/CHadp7IV.js +0 -1
- package/.output/public/_nuxt/CHh-QcGE.js +0 -1
- package/.output/public/_nuxt/CIUZ1G5V.js +0 -1
- package/.output/public/_nuxt/CJ6lOLXp.js +0 -1
- package/.output/public/_nuxt/CN9dMhDM.js +0 -1
- package/.output/public/_nuxt/CQ4fj8p0.js +0 -1
- package/.output/public/_nuxt/CTWiQX6C.js +0 -1
- package/.output/public/_nuxt/CXxzV4dz.js +0 -1
- package/.output/public/_nuxt/CZlF05X6.js +0 -1
- package/.output/public/_nuxt/CatV_12G.js +0 -1
- package/.output/public/_nuxt/CeMkeBDb.js +0 -1
- package/.output/public/_nuxt/CelvVQyk.js +0 -1
- package/.output/public/_nuxt/CfV455SO.js +0 -1
- package/.output/public/_nuxt/CfeIJUat.js +0 -1
- package/.output/public/_nuxt/CfqrF6sE.js +0 -1
- package/.output/public/_nuxt/Cfs9EX91.js +0 -1
- package/.output/public/_nuxt/ChH_ziBE.js +0 -1
- package/.output/public/_nuxt/ChM1GEGa.js +0 -1
- package/.output/public/_nuxt/Cu8OsqJL.js +0 -1
- package/.output/public/_nuxt/CusJppg0.js +0 -1
- package/.output/public/_nuxt/Cv9koXgw.js +0 -1
- package/.output/public/_nuxt/CvELRi2k.js +0 -5
- package/.output/public/_nuxt/Cw6nGM9K.js +0 -1
- package/.output/public/_nuxt/CwUT5n6w.js +0 -1
- package/.output/public/_nuxt/D-AHKB2i.js +0 -6
- package/.output/public/_nuxt/D-kcn2fr.js +0 -1
- package/.output/public/_nuxt/D08WgyRC.js +0 -1
- package/.output/public/_nuxt/D1Jbgd7O.js +0 -13
- package/.output/public/_nuxt/D1ibY74j.js +0 -1
- package/.output/public/_nuxt/D22FLkUw.js +0 -1
- package/.output/public/_nuxt/D2CYqzqI.js +0 -1
- package/.output/public/_nuxt/D34EmFco.js +0 -1
- package/.output/public/_nuxt/D4OhWExI.js +0 -1
- package/.output/public/_nuxt/DDHikT5j.js +0 -1
- package/.output/public/_nuxt/DDTT3lYc.js +0 -1
- package/.output/public/_nuxt/DHLkt8Yr.js +0 -1
- package/.output/public/_nuxt/DHuTDtaT.js +0 -12
- package/.output/public/_nuxt/DKYwYmdq.js +0 -1
- package/.output/public/_nuxt/DMDPKkZ0.js +0 -1
- package/.output/public/_nuxt/DNEoBllO.js +0 -1
- package/.output/public/_nuxt/DRzH1pOL.js +0 -1
- package/.output/public/_nuxt/DSUF3NDE.js +0 -1
- package/.output/public/_nuxt/DTAwr92a.js +0 -1
- package/.output/public/_nuxt/DWmtspXK.js +0 -1
- package/.output/public/_nuxt/DXh9HyqW.js +0 -1
- package/.output/public/_nuxt/DXtl0MQI.js +0 -1
- package/.output/public/_nuxt/D_zCY0Xl.js +0 -1
- package/.output/public/_nuxt/DaZJpzOl.js +0 -1
- package/.output/public/_nuxt/Df68jz8_.js +0 -1
- package/.output/public/_nuxt/DhQfdAdO.js +0 -1
- package/.output/public/_nuxt/DiinP2Uv.js +0 -1
- package/.output/public/_nuxt/DljmTZ5-.js +0 -1
- package/.output/public/_nuxt/Dm4QKadl.js +0 -26
- package/.output/public/_nuxt/DmCK90gL.js +0 -1
- package/.output/public/_nuxt/Dn2_MT6a.js +0 -1
- package/.output/public/_nuxt/Don94nLk.js +0 -1
- package/.output/public/_nuxt/Dr8Zlu6v.js +0 -1
- package/.output/public/_nuxt/Drp5UXmf.js +0 -1
- package/.output/public/_nuxt/DtFoCuZo.js +0 -1
- package/.output/public/_nuxt/DxuitVdg.js +0 -2
- package/.output/public/_nuxt/DyJlTyXw.js +0 -1
- package/.output/public/_nuxt/Jep7L2Wt.js +0 -1
- package/.output/public/_nuxt/LUl67wzp.js +0 -1
- package/.output/public/_nuxt/M2rHlmBj.js +0 -1
- package/.output/public/_nuxt/N3RVRbLb.js +0 -1
- package/.output/public/_nuxt/NBseiqgx.js +0 -1
- package/.output/public/_nuxt/PoHY5YXO.js +0 -1
- package/.output/public/_nuxt/SdwduGaY.js +0 -1
- package/.output/public/_nuxt/SytC7lKg.js +0 -1
- package/.output/public/_nuxt/U3pqMjXV.js +0 -1
- package/.output/public/_nuxt/UInuXPgp.js +0 -1
- package/.output/public/_nuxt/YXI84j39.js +0 -2
- package/.output/public/_nuxt/ZZ6g6dXy.js +0 -2
- package/.output/public/_nuxt/builds/meta/033f259e-8ba9-4c82-8824-56febea80b7d.json +0 -1
- package/.output/public/_nuxt/dglhsJpM.js +0 -1
- package/.output/public/_nuxt/dwrHE3tM.js +0 -14
- package/.output/public/_nuxt/edge-router-yEORMNQw.js +0 -4
- package/.output/public/_nuxt/error-404.CttAF9VE.css +0 -1
- package/.output/public/_nuxt/error-500.DXXd6-x4.css +0 -1
- package/.output/public/_nuxt/ga9TZ2z5.js +0 -1
- package/.output/public/_nuxt/graph-layout-CFj469YF.js +0 -1
- package/.output/public/_nuxt/graph-resolver-eG1ZUsYn.js +0 -166
- package/.output/public/_nuxt/ov4D99rA.js +0 -1
- package/.output/public/_nuxt/qYU5Tabh.js +0 -1
- package/.output/public/_nuxt/qliWkHmV.js +0 -1
- package/.output/public/_nuxt/vuetify.BrkCt9t5.css +0 -5
- package/.output/public/_nuxt/yaml.worker-CQ6dFw39.js +0 -405
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { globalRegistry } from "../core/registries.js";
|
|
2
|
+
import * as _checks from "./checks.js";
|
|
3
|
+
import * as _iso from "./iso.js";
|
|
4
|
+
import * as _schemas from "./schemas.js";
|
|
5
|
+
// Local z object to avoid circular dependency with ../index.js
|
|
6
|
+
const z = {
|
|
7
|
+
..._schemas,
|
|
8
|
+
..._checks,
|
|
9
|
+
iso: _iso,
|
|
10
|
+
};
|
|
11
|
+
// Keys that are recognized and handled by the conversion logic
|
|
12
|
+
const RECOGNIZED_KEYS = new Set([
|
|
13
|
+
// Schema identification
|
|
14
|
+
"$schema",
|
|
15
|
+
"$ref",
|
|
16
|
+
"$defs",
|
|
17
|
+
"definitions",
|
|
18
|
+
// Core schema keywords
|
|
19
|
+
"$id",
|
|
20
|
+
"id",
|
|
21
|
+
"$comment",
|
|
22
|
+
"$anchor",
|
|
23
|
+
"$vocabulary",
|
|
24
|
+
"$dynamicRef",
|
|
25
|
+
"$dynamicAnchor",
|
|
26
|
+
// Type
|
|
27
|
+
"type",
|
|
28
|
+
"enum",
|
|
29
|
+
"const",
|
|
30
|
+
// Composition
|
|
31
|
+
"anyOf",
|
|
32
|
+
"oneOf",
|
|
33
|
+
"allOf",
|
|
34
|
+
"not",
|
|
35
|
+
// Object
|
|
36
|
+
"properties",
|
|
37
|
+
"required",
|
|
38
|
+
"additionalProperties",
|
|
39
|
+
"patternProperties",
|
|
40
|
+
"propertyNames",
|
|
41
|
+
"minProperties",
|
|
42
|
+
"maxProperties",
|
|
43
|
+
// Array
|
|
44
|
+
"items",
|
|
45
|
+
"prefixItems",
|
|
46
|
+
"additionalItems",
|
|
47
|
+
"minItems",
|
|
48
|
+
"maxItems",
|
|
49
|
+
"uniqueItems",
|
|
50
|
+
"contains",
|
|
51
|
+
"minContains",
|
|
52
|
+
"maxContains",
|
|
53
|
+
// String
|
|
54
|
+
"minLength",
|
|
55
|
+
"maxLength",
|
|
56
|
+
"pattern",
|
|
57
|
+
"format",
|
|
58
|
+
// Number
|
|
59
|
+
"minimum",
|
|
60
|
+
"maximum",
|
|
61
|
+
"exclusiveMinimum",
|
|
62
|
+
"exclusiveMaximum",
|
|
63
|
+
"multipleOf",
|
|
64
|
+
// Already handled metadata
|
|
65
|
+
"description",
|
|
66
|
+
"default",
|
|
67
|
+
// Content
|
|
68
|
+
"contentEncoding",
|
|
69
|
+
"contentMediaType",
|
|
70
|
+
"contentSchema",
|
|
71
|
+
// Unsupported (error-throwing)
|
|
72
|
+
"unevaluatedItems",
|
|
73
|
+
"unevaluatedProperties",
|
|
74
|
+
"if",
|
|
75
|
+
"then",
|
|
76
|
+
"else",
|
|
77
|
+
"dependentSchemas",
|
|
78
|
+
"dependentRequired",
|
|
79
|
+
// OpenAPI
|
|
80
|
+
"nullable",
|
|
81
|
+
"readOnly",
|
|
82
|
+
]);
|
|
83
|
+
function detectVersion(schema, defaultTarget) {
|
|
84
|
+
const $schema = schema.$schema;
|
|
85
|
+
if ($schema === "https://json-schema.org/draft/2020-12/schema") {
|
|
86
|
+
return "draft-2020-12";
|
|
87
|
+
}
|
|
88
|
+
if ($schema === "http://json-schema.org/draft-07/schema#") {
|
|
89
|
+
return "draft-7";
|
|
90
|
+
}
|
|
91
|
+
if ($schema === "http://json-schema.org/draft-04/schema#") {
|
|
92
|
+
return "draft-4";
|
|
93
|
+
}
|
|
94
|
+
// Use defaultTarget if provided, otherwise default to draft-2020-12
|
|
95
|
+
return defaultTarget ?? "draft-2020-12";
|
|
96
|
+
}
|
|
97
|
+
function resolveRef(ref, ctx) {
|
|
98
|
+
if (!ref.startsWith("#")) {
|
|
99
|
+
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
100
|
+
}
|
|
101
|
+
const path = ref.slice(1).split("/").filter(Boolean);
|
|
102
|
+
// Handle root reference "#"
|
|
103
|
+
if (path.length === 0) {
|
|
104
|
+
return ctx.rootSchema;
|
|
105
|
+
}
|
|
106
|
+
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
107
|
+
if (path[0] === defsKey) {
|
|
108
|
+
const key = path[1];
|
|
109
|
+
if (!key || !ctx.defs[key]) {
|
|
110
|
+
throw new Error(`Reference not found: ${ref}`);
|
|
111
|
+
}
|
|
112
|
+
return ctx.defs[key];
|
|
113
|
+
}
|
|
114
|
+
throw new Error(`Reference not found: ${ref}`);
|
|
115
|
+
}
|
|
116
|
+
function convertBaseSchema(schema, ctx) {
|
|
117
|
+
// Handle unsupported features
|
|
118
|
+
if (schema.not !== undefined) {
|
|
119
|
+
// Special case: { not: {} } represents never
|
|
120
|
+
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
121
|
+
return z.never();
|
|
122
|
+
}
|
|
123
|
+
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
124
|
+
}
|
|
125
|
+
if (schema.unevaluatedItems !== undefined) {
|
|
126
|
+
throw new Error("unevaluatedItems is not supported");
|
|
127
|
+
}
|
|
128
|
+
if (schema.unevaluatedProperties !== undefined) {
|
|
129
|
+
throw new Error("unevaluatedProperties is not supported");
|
|
130
|
+
}
|
|
131
|
+
if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {
|
|
132
|
+
throw new Error("Conditional schemas (if/then/else) are not supported");
|
|
133
|
+
}
|
|
134
|
+
if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {
|
|
135
|
+
throw new Error("dependentSchemas and dependentRequired are not supported");
|
|
136
|
+
}
|
|
137
|
+
// Handle $ref
|
|
138
|
+
if (schema.$ref) {
|
|
139
|
+
const refPath = schema.$ref;
|
|
140
|
+
if (ctx.refs.has(refPath)) {
|
|
141
|
+
return ctx.refs.get(refPath);
|
|
142
|
+
}
|
|
143
|
+
if (ctx.processing.has(refPath)) {
|
|
144
|
+
// Circular reference - use lazy
|
|
145
|
+
return z.lazy(() => {
|
|
146
|
+
if (!ctx.refs.has(refPath)) {
|
|
147
|
+
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
148
|
+
}
|
|
149
|
+
return ctx.refs.get(refPath);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
ctx.processing.add(refPath);
|
|
153
|
+
const resolved = resolveRef(refPath, ctx);
|
|
154
|
+
const zodSchema = convertSchema(resolved, ctx);
|
|
155
|
+
ctx.refs.set(refPath, zodSchema);
|
|
156
|
+
ctx.processing.delete(refPath);
|
|
157
|
+
return zodSchema;
|
|
158
|
+
}
|
|
159
|
+
// Handle enum
|
|
160
|
+
if (schema.enum !== undefined) {
|
|
161
|
+
const enumValues = schema.enum;
|
|
162
|
+
// Special case: OpenAPI 3.0 null representation { type: "string", nullable: true, enum: [null] }
|
|
163
|
+
if (ctx.version === "openapi-3.0" &&
|
|
164
|
+
schema.nullable === true &&
|
|
165
|
+
enumValues.length === 1 &&
|
|
166
|
+
enumValues[0] === null) {
|
|
167
|
+
return z.null();
|
|
168
|
+
}
|
|
169
|
+
if (enumValues.length === 0) {
|
|
170
|
+
return z.never();
|
|
171
|
+
}
|
|
172
|
+
if (enumValues.length === 1) {
|
|
173
|
+
return z.literal(enumValues[0]);
|
|
174
|
+
}
|
|
175
|
+
// Check if all values are strings
|
|
176
|
+
if (enumValues.every((v) => typeof v === "string")) {
|
|
177
|
+
return z.enum(enumValues);
|
|
178
|
+
}
|
|
179
|
+
// Mixed types - use union of literals
|
|
180
|
+
const literalSchemas = enumValues.map((v) => z.literal(v));
|
|
181
|
+
if (literalSchemas.length < 2) {
|
|
182
|
+
return literalSchemas[0];
|
|
183
|
+
}
|
|
184
|
+
return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
185
|
+
}
|
|
186
|
+
// Handle const
|
|
187
|
+
if (schema.const !== undefined) {
|
|
188
|
+
return z.literal(schema.const);
|
|
189
|
+
}
|
|
190
|
+
// Handle type
|
|
191
|
+
const type = schema.type;
|
|
192
|
+
if (Array.isArray(type)) {
|
|
193
|
+
// Expand type array into anyOf union
|
|
194
|
+
const typeSchemas = type.map((t) => {
|
|
195
|
+
const typeSchema = { ...schema, type: t };
|
|
196
|
+
return convertBaseSchema(typeSchema, ctx);
|
|
197
|
+
});
|
|
198
|
+
if (typeSchemas.length === 0) {
|
|
199
|
+
return z.never();
|
|
200
|
+
}
|
|
201
|
+
if (typeSchemas.length === 1) {
|
|
202
|
+
return typeSchemas[0];
|
|
203
|
+
}
|
|
204
|
+
return z.union(typeSchemas);
|
|
205
|
+
}
|
|
206
|
+
if (!type) {
|
|
207
|
+
// No type specified - empty schema (any)
|
|
208
|
+
return z.any();
|
|
209
|
+
}
|
|
210
|
+
let zodSchema;
|
|
211
|
+
switch (type) {
|
|
212
|
+
case "string": {
|
|
213
|
+
let stringSchema = z.string();
|
|
214
|
+
// Apply format using .check() with Zod format functions
|
|
215
|
+
if (schema.format) {
|
|
216
|
+
const format = schema.format;
|
|
217
|
+
// Map common formats to Zod check functions
|
|
218
|
+
if (format === "email") {
|
|
219
|
+
stringSchema = stringSchema.check(z.email());
|
|
220
|
+
}
|
|
221
|
+
else if (format === "uri" || format === "uri-reference") {
|
|
222
|
+
stringSchema = stringSchema.check(z.url());
|
|
223
|
+
}
|
|
224
|
+
else if (format === "uuid" || format === "guid") {
|
|
225
|
+
stringSchema = stringSchema.check(z.uuid());
|
|
226
|
+
}
|
|
227
|
+
else if (format === "date-time") {
|
|
228
|
+
stringSchema = stringSchema.check(z.iso.datetime());
|
|
229
|
+
}
|
|
230
|
+
else if (format === "date") {
|
|
231
|
+
stringSchema = stringSchema.check(z.iso.date());
|
|
232
|
+
}
|
|
233
|
+
else if (format === "time") {
|
|
234
|
+
stringSchema = stringSchema.check(z.iso.time());
|
|
235
|
+
}
|
|
236
|
+
else if (format === "duration") {
|
|
237
|
+
stringSchema = stringSchema.check(z.iso.duration());
|
|
238
|
+
}
|
|
239
|
+
else if (format === "ipv4") {
|
|
240
|
+
stringSchema = stringSchema.check(z.ipv4());
|
|
241
|
+
}
|
|
242
|
+
else if (format === "ipv6") {
|
|
243
|
+
stringSchema = stringSchema.check(z.ipv6());
|
|
244
|
+
}
|
|
245
|
+
else if (format === "mac") {
|
|
246
|
+
stringSchema = stringSchema.check(z.mac());
|
|
247
|
+
}
|
|
248
|
+
else if (format === "cidr") {
|
|
249
|
+
stringSchema = stringSchema.check(z.cidrv4());
|
|
250
|
+
}
|
|
251
|
+
else if (format === "cidr-v6") {
|
|
252
|
+
stringSchema = stringSchema.check(z.cidrv6());
|
|
253
|
+
}
|
|
254
|
+
else if (format === "base64") {
|
|
255
|
+
stringSchema = stringSchema.check(z.base64());
|
|
256
|
+
}
|
|
257
|
+
else if (format === "base64url") {
|
|
258
|
+
stringSchema = stringSchema.check(z.base64url());
|
|
259
|
+
}
|
|
260
|
+
else if (format === "e164") {
|
|
261
|
+
stringSchema = stringSchema.check(z.e164());
|
|
262
|
+
}
|
|
263
|
+
else if (format === "jwt") {
|
|
264
|
+
stringSchema = stringSchema.check(z.jwt());
|
|
265
|
+
}
|
|
266
|
+
else if (format === "emoji") {
|
|
267
|
+
stringSchema = stringSchema.check(z.emoji());
|
|
268
|
+
}
|
|
269
|
+
else if (format === "nanoid") {
|
|
270
|
+
stringSchema = stringSchema.check(z.nanoid());
|
|
271
|
+
}
|
|
272
|
+
else if (format === "cuid") {
|
|
273
|
+
stringSchema = stringSchema.check(z.cuid());
|
|
274
|
+
}
|
|
275
|
+
else if (format === "cuid2") {
|
|
276
|
+
stringSchema = stringSchema.check(z.cuid2());
|
|
277
|
+
}
|
|
278
|
+
else if (format === "ulid") {
|
|
279
|
+
stringSchema = stringSchema.check(z.ulid());
|
|
280
|
+
}
|
|
281
|
+
else if (format === "xid") {
|
|
282
|
+
stringSchema = stringSchema.check(z.xid());
|
|
283
|
+
}
|
|
284
|
+
else if (format === "ksuid") {
|
|
285
|
+
stringSchema = stringSchema.check(z.ksuid());
|
|
286
|
+
}
|
|
287
|
+
// Note: json-string format is not currently supported by Zod
|
|
288
|
+
// Custom formats are ignored - keep as plain string
|
|
289
|
+
}
|
|
290
|
+
// Apply constraints
|
|
291
|
+
if (typeof schema.minLength === "number") {
|
|
292
|
+
stringSchema = stringSchema.min(schema.minLength);
|
|
293
|
+
}
|
|
294
|
+
if (typeof schema.maxLength === "number") {
|
|
295
|
+
stringSchema = stringSchema.max(schema.maxLength);
|
|
296
|
+
}
|
|
297
|
+
if (schema.pattern) {
|
|
298
|
+
// JSON Schema patterns are not implicitly anchored (match anywhere in string)
|
|
299
|
+
stringSchema = stringSchema.regex(new RegExp(schema.pattern));
|
|
300
|
+
}
|
|
301
|
+
zodSchema = stringSchema;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
case "number":
|
|
305
|
+
case "integer": {
|
|
306
|
+
let numberSchema = type === "integer" ? z.number().int() : z.number();
|
|
307
|
+
// Apply constraints
|
|
308
|
+
if (typeof schema.minimum === "number") {
|
|
309
|
+
numberSchema = numberSchema.min(schema.minimum);
|
|
310
|
+
}
|
|
311
|
+
if (typeof schema.maximum === "number") {
|
|
312
|
+
numberSchema = numberSchema.max(schema.maximum);
|
|
313
|
+
}
|
|
314
|
+
if (typeof schema.exclusiveMinimum === "number") {
|
|
315
|
+
numberSchema = numberSchema.gt(schema.exclusiveMinimum);
|
|
316
|
+
}
|
|
317
|
+
else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") {
|
|
318
|
+
numberSchema = numberSchema.gt(schema.minimum);
|
|
319
|
+
}
|
|
320
|
+
if (typeof schema.exclusiveMaximum === "number") {
|
|
321
|
+
numberSchema = numberSchema.lt(schema.exclusiveMaximum);
|
|
322
|
+
}
|
|
323
|
+
else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") {
|
|
324
|
+
numberSchema = numberSchema.lt(schema.maximum);
|
|
325
|
+
}
|
|
326
|
+
if (typeof schema.multipleOf === "number") {
|
|
327
|
+
numberSchema = numberSchema.multipleOf(schema.multipleOf);
|
|
328
|
+
}
|
|
329
|
+
zodSchema = numberSchema;
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
case "boolean": {
|
|
333
|
+
zodSchema = z.boolean();
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
case "null": {
|
|
337
|
+
zodSchema = z.null();
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
case "object": {
|
|
341
|
+
const shape = {};
|
|
342
|
+
const properties = schema.properties || {};
|
|
343
|
+
const requiredSet = new Set(schema.required || []);
|
|
344
|
+
// Convert properties - mark optional ones
|
|
345
|
+
for (const [key, propSchema] of Object.entries(properties)) {
|
|
346
|
+
const propZodSchema = convertSchema(propSchema, ctx);
|
|
347
|
+
// If not in required array, make it optional
|
|
348
|
+
shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();
|
|
349
|
+
}
|
|
350
|
+
// Handle propertyNames
|
|
351
|
+
if (schema.propertyNames) {
|
|
352
|
+
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
353
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object"
|
|
354
|
+
? convertSchema(schema.additionalProperties, ctx)
|
|
355
|
+
: z.any();
|
|
356
|
+
// Case A: No properties (pure record)
|
|
357
|
+
if (Object.keys(shape).length === 0) {
|
|
358
|
+
zodSchema = z.record(keySchema, valueSchema);
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
// Case B: With properties (intersection of object and looseRecord)
|
|
362
|
+
const objectSchema = z.object(shape).passthrough();
|
|
363
|
+
const recordSchema = z.looseRecord(keySchema, valueSchema);
|
|
364
|
+
zodSchema = z.intersection(objectSchema, recordSchema);
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
// Handle patternProperties
|
|
368
|
+
if (schema.patternProperties) {
|
|
369
|
+
// patternProperties: keys matching pattern must satisfy corresponding schema
|
|
370
|
+
// Use loose records so non-matching keys pass through
|
|
371
|
+
const patternProps = schema.patternProperties;
|
|
372
|
+
const patternKeys = Object.keys(patternProps);
|
|
373
|
+
const looseRecords = [];
|
|
374
|
+
for (const pattern of patternKeys) {
|
|
375
|
+
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
376
|
+
const keySchema = z.string().regex(new RegExp(pattern));
|
|
377
|
+
looseRecords.push(z.looseRecord(keySchema, patternValue));
|
|
378
|
+
}
|
|
379
|
+
// Build intersection: object schema + all pattern property records
|
|
380
|
+
const schemasToIntersect = [];
|
|
381
|
+
if (Object.keys(shape).length > 0) {
|
|
382
|
+
// Use passthrough so patternProperties can validate additional keys
|
|
383
|
+
schemasToIntersect.push(z.object(shape).passthrough());
|
|
384
|
+
}
|
|
385
|
+
schemasToIntersect.push(...looseRecords);
|
|
386
|
+
if (schemasToIntersect.length === 0) {
|
|
387
|
+
zodSchema = z.object({}).passthrough();
|
|
388
|
+
}
|
|
389
|
+
else if (schemasToIntersect.length === 1) {
|
|
390
|
+
zodSchema = schemasToIntersect[0];
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
// Chain intersections: (A & B) & C & D ...
|
|
394
|
+
let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
395
|
+
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
396
|
+
result = z.intersection(result, schemasToIntersect[i]);
|
|
397
|
+
}
|
|
398
|
+
zodSchema = result;
|
|
399
|
+
}
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
// Handle additionalProperties
|
|
403
|
+
// In JSON Schema, additionalProperties defaults to true (allow any extra properties)
|
|
404
|
+
// In Zod, objects strip unknown keys by default, so we need to handle this explicitly
|
|
405
|
+
const objectSchema = z.object(shape);
|
|
406
|
+
if (schema.additionalProperties === false) {
|
|
407
|
+
// Strict mode - no extra properties allowed
|
|
408
|
+
zodSchema = objectSchema.strict();
|
|
409
|
+
}
|
|
410
|
+
else if (typeof schema.additionalProperties === "object") {
|
|
411
|
+
// Extra properties must match the specified schema
|
|
412
|
+
zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
// additionalProperties is true or undefined - allow any extra properties (passthrough)
|
|
416
|
+
zodSchema = objectSchema.passthrough();
|
|
417
|
+
}
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
case "array": {
|
|
421
|
+
// TODO: uniqueItems is not supported
|
|
422
|
+
// TODO: contains/minContains/maxContains are not supported
|
|
423
|
+
// Check if this is a tuple (prefixItems or items as array)
|
|
424
|
+
const prefixItems = schema.prefixItems;
|
|
425
|
+
const items = schema.items;
|
|
426
|
+
if (prefixItems && Array.isArray(prefixItems)) {
|
|
427
|
+
// Tuple with prefixItems (draft-2020-12)
|
|
428
|
+
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
429
|
+
const rest = items && typeof items === "object" && !Array.isArray(items)
|
|
430
|
+
? convertSchema(items, ctx)
|
|
431
|
+
: undefined;
|
|
432
|
+
if (rest) {
|
|
433
|
+
zodSchema = z.tuple(tupleItems).rest(rest);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
zodSchema = z.tuple(tupleItems);
|
|
437
|
+
}
|
|
438
|
+
// Apply minItems/maxItems constraints to tuples
|
|
439
|
+
if (typeof schema.minItems === "number") {
|
|
440
|
+
zodSchema = zodSchema.check(z.minLength(schema.minItems));
|
|
441
|
+
}
|
|
442
|
+
if (typeof schema.maxItems === "number") {
|
|
443
|
+
zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
else if (Array.isArray(items)) {
|
|
447
|
+
// Tuple with items array (draft-7)
|
|
448
|
+
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
449
|
+
const rest = schema.additionalItems && typeof schema.additionalItems === "object"
|
|
450
|
+
? convertSchema(schema.additionalItems, ctx)
|
|
451
|
+
: undefined; // additionalItems: false means no rest, handled by default tuple behavior
|
|
452
|
+
if (rest) {
|
|
453
|
+
zodSchema = z.tuple(tupleItems).rest(rest);
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
zodSchema = z.tuple(tupleItems);
|
|
457
|
+
}
|
|
458
|
+
// Apply minItems/maxItems constraints to tuples
|
|
459
|
+
if (typeof schema.minItems === "number") {
|
|
460
|
+
zodSchema = zodSchema.check(z.minLength(schema.minItems));
|
|
461
|
+
}
|
|
462
|
+
if (typeof schema.maxItems === "number") {
|
|
463
|
+
zodSchema = zodSchema.check(z.maxLength(schema.maxItems));
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
else if (items !== undefined) {
|
|
467
|
+
// Regular array
|
|
468
|
+
const element = convertSchema(items, ctx);
|
|
469
|
+
let arraySchema = z.array(element);
|
|
470
|
+
// Apply constraints
|
|
471
|
+
if (typeof schema.minItems === "number") {
|
|
472
|
+
arraySchema = arraySchema.min(schema.minItems);
|
|
473
|
+
}
|
|
474
|
+
if (typeof schema.maxItems === "number") {
|
|
475
|
+
arraySchema = arraySchema.max(schema.maxItems);
|
|
476
|
+
}
|
|
477
|
+
zodSchema = arraySchema;
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
// No items specified - array of any
|
|
481
|
+
zodSchema = z.array(z.any());
|
|
482
|
+
}
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
default:
|
|
486
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
487
|
+
}
|
|
488
|
+
// Apply metadata
|
|
489
|
+
if (schema.description) {
|
|
490
|
+
zodSchema = zodSchema.describe(schema.description);
|
|
491
|
+
}
|
|
492
|
+
if (schema.default !== undefined) {
|
|
493
|
+
zodSchema = zodSchema.default(schema.default);
|
|
494
|
+
}
|
|
495
|
+
return zodSchema;
|
|
496
|
+
}
|
|
497
|
+
function convertSchema(schema, ctx) {
|
|
498
|
+
if (typeof schema === "boolean") {
|
|
499
|
+
return schema ? z.any() : z.never();
|
|
500
|
+
}
|
|
501
|
+
// Convert base schema first (ignoring composition keywords)
|
|
502
|
+
let baseSchema = convertBaseSchema(schema, ctx);
|
|
503
|
+
const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;
|
|
504
|
+
// Process composition keywords LAST (they can appear together)
|
|
505
|
+
// Handle anyOf - wrap base schema with union
|
|
506
|
+
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
507
|
+
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
508
|
+
const anyOfUnion = z.union(options);
|
|
509
|
+
baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
510
|
+
}
|
|
511
|
+
// Handle oneOf - exclusive union (exactly one must match)
|
|
512
|
+
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
513
|
+
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
514
|
+
const oneOfUnion = z.xor(options);
|
|
515
|
+
baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
516
|
+
}
|
|
517
|
+
// Handle allOf - wrap base schema with intersection
|
|
518
|
+
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
519
|
+
if (schema.allOf.length === 0) {
|
|
520
|
+
baseSchema = hasExplicitType ? baseSchema : z.any();
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
524
|
+
const startIdx = hasExplicitType ? 0 : 1;
|
|
525
|
+
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
526
|
+
result = z.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
527
|
+
}
|
|
528
|
+
baseSchema = result;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
// Handle nullable (OpenAPI 3.0)
|
|
532
|
+
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
533
|
+
baseSchema = z.nullable(baseSchema);
|
|
534
|
+
}
|
|
535
|
+
// Handle readOnly
|
|
536
|
+
if (schema.readOnly === true) {
|
|
537
|
+
baseSchema = z.readonly(baseSchema);
|
|
538
|
+
}
|
|
539
|
+
// Collect metadata: core schema keywords and unrecognized keys
|
|
540
|
+
const extraMeta = {};
|
|
541
|
+
// Core schema keywords that should be captured as metadata
|
|
542
|
+
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
543
|
+
for (const key of coreMetadataKeys) {
|
|
544
|
+
if (key in schema) {
|
|
545
|
+
extraMeta[key] = schema[key];
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
// Content keywords - store as metadata
|
|
549
|
+
const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"];
|
|
550
|
+
for (const key of contentMetadataKeys) {
|
|
551
|
+
if (key in schema) {
|
|
552
|
+
extraMeta[key] = schema[key];
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
// Unrecognized keys (custom metadata)
|
|
556
|
+
for (const key of Object.keys(schema)) {
|
|
557
|
+
if (!RECOGNIZED_KEYS.has(key)) {
|
|
558
|
+
extraMeta[key] = schema[key];
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
if (Object.keys(extraMeta).length > 0) {
|
|
562
|
+
ctx.registry.add(baseSchema, extraMeta);
|
|
563
|
+
}
|
|
564
|
+
return baseSchema;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */
|
|
568
|
+
export function fromJSONSchema(schema, params) {
|
|
569
|
+
// Handle boolean schemas
|
|
570
|
+
if (typeof schema === "boolean") {
|
|
571
|
+
return schema ? z.any() : z.never();
|
|
572
|
+
}
|
|
573
|
+
const version = detectVersion(schema, params?.defaultTarget);
|
|
574
|
+
const defs = (schema.$defs || schema.definitions || {});
|
|
575
|
+
const ctx = {
|
|
576
|
+
version,
|
|
577
|
+
defs,
|
|
578
|
+
refs: new Map(),
|
|
579
|
+
processing: new Set(),
|
|
580
|
+
rootSchema: schema,
|
|
581
|
+
registry: params?.registry ?? globalRegistry,
|
|
582
|
+
};
|
|
583
|
+
return convertSchema(schema, ctx);
|
|
584
|
+
}
|