@highstate/designer 0.1.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 +15 -0
- package/.output/public/_nuxt/1jbH28Ud.js +1 -0
- package/.output/public/_nuxt/BAsjE6c8.js +69 -0
- package/.output/public/_nuxt/D4AvvZ3p.js +1 -0
- package/.output/public/_nuxt/DcSK-0AR.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/0ea9cf82-d280-4ae3-95c8-082f396c88c7.json +1 -0
- package/.output/public/_nuxt/entry.Df9XoxdB.css +1 -0
- package/.output/public/_nuxt/error-404.SWzu_puR.css +1 -0
- package/.output/public/_nuxt/error-500.Bkv_zTjr.css +1 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/robots.txt +1 -0
- package/.output/server/chunks/_/error-500.mjs +8 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/_/index.mjs +229 -0
- package/.output/server/chunks/_/index.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs +6 -0
- package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs +6 -0
- package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs +6 -0
- package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs +6 -0
- package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs.map +1 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs +7 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs.map +1 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs +6 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs.map +1 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs +6 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs.map +1 -0
- package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs +6 -0
- package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs.map +1 -0
- package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs +6 -0
- package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs.map +1 -0
- package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs +6 -0
- package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs.map +1 -0
- package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs +6 -0
- package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs.map +1 -0
- package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs +6 -0
- package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs.map +1 -0
- package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs +6 -0
- package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs.map +1 -0
- package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs +6 -0
- package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs.map +1 -0
- package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs +6 -0
- package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs.map +1 -0
- package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs +6 -0
- package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs.map +1 -0
- package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs +6 -0
- package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs.map +1 -0
- package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs +6 -0
- package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs.map +1 -0
- package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs +6 -0
- package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs.map +1 -0
- package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs +6 -0
- package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs.map +1 -0
- package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs +6 -0
- package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs.map +1 -0
- package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs +6 -0
- package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs.map +1 -0
- package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs +6 -0
- package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs.map +1 -0
- package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs +6 -0
- package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs.map +1 -0
- package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs +6 -0
- package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs.map +1 -0
- package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs +6 -0
- package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs.map +1 -0
- package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs +6 -0
- package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs.map +1 -0
- package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs +6 -0
- package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs.map +1 -0
- package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs +6 -0
- package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs.map +1 -0
- package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs +6 -0
- package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs.map +1 -0
- package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs +6 -0
- package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs.map +1 -0
- package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs +6 -0
- package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs.map +1 -0
- package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs +6 -0
- package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs.map +1 -0
- package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs +6 -0
- package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs.map +1 -0
- package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs +6 -0
- package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs.map +1 -0
- package/.output/server/chunks/build/client.manifest.mjs +82 -0
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs +39 -0
- package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-BE32jcXw.mjs +399 -0
- package/.output/server/chunks/build/error-404-BE32jcXw.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs +4 -0
- package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs +6 -0
- package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs +6 -0
- package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-B3vPuajn.mjs +80 -0
- package/.output/server/chunks/build/error-500-B3vPuajn.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs +4 -0
- package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs +6 -0
- package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs +6 -0
- package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs.map +1 -0
- package/.output/server/chunks/build/index-C2merokO.mjs +34 -0
- package/.output/server/chunks/build/index-C2merokO.mjs.map +1 -0
- package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs +6 -0
- package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +10495 -0
- package/.output/server/chunks/build/server.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +47 -0
- package/.output/server/chunks/build/styles.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +6203 -0
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/.output/server/chunks/routes/api/_trpc_.mjs +209 -0
- package/.output/server/chunks/routes/api/_trpc_.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +391 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +7 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14023 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1996 -0
- package/.output/server/node_modules/@iconify/vue/package.json +65 -0
- package/.output/server/node_modules/@trpc/client/dist/TRPCClientError-38f9a32a.mjs +59 -0
- package/.output/server/node_modules/@trpc/client/dist/httpBatchLink-d0f9eac9.mjs +248 -0
- package/.output/server/node_modules/@trpc/client/dist/httpUtils-b9d0cb48.mjs +144 -0
- package/.output/server/node_modules/@trpc/client/dist/index.mjs +365 -0
- package/.output/server/node_modules/@trpc/client/dist/links/httpLink.mjs +62 -0
- package/.output/server/node_modules/@trpc/client/dist/links/loggerLink.mjs +173 -0
- package/.output/server/node_modules/@trpc/client/dist/links/wsLink.mjs +278 -0
- package/.output/server/node_modules/@trpc/client/dist/splitLink-4c75f7be.mjs +45 -0
- package/.output/server/node_modules/@trpc/client/dist/transformResult-ace864b8.mjs +58 -0
- package/.output/server/node_modules/@trpc/client/package.json +101 -0
- package/.output/server/node_modules/@trpc/server/dist/TRPCError-98d44758.mjs +39 -0
- package/.output/server/node_modules/@trpc/server/dist/batchStreamFormatter-fc1ffb26.mjs +30 -0
- package/.output/server/node_modules/@trpc/server/dist/codes-c924c3db.mjs +44 -0
- package/.output/server/node_modules/@trpc/server/dist/config-d5fdbd39.mjs +196 -0
- package/.output/server/node_modules/@trpc/server/dist/contentType-9fd995d3.mjs +52 -0
- package/.output/server/node_modules/@trpc/server/dist/getCauseFromUnknown-2d66414a.mjs +33 -0
- package/.output/server/node_modules/@trpc/server/dist/http/index.mjs +9 -0
- package/.output/server/node_modules/@trpc/server/dist/index-f91d720c.mjs +97 -0
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +871 -0
- package/.output/server/node_modules/@trpc/server/dist/observable/index.mjs +147 -0
- package/.output/server/node_modules/@trpc/server/dist/observable-ade1bad8.mjs +81 -0
- package/.output/server/node_modules/@trpc/server/dist/resolveHTTPResponse-2fc435bb.mjs +291 -0
- package/.output/server/node_modules/@trpc/server/dist/shared/index.mjs +4 -0
- package/.output/server/node_modules/@trpc/server/dist/transformTRPCResponse-1153b421.mjs +53 -0
- package/.output/server/node_modules/@trpc/server/package.json +177 -0
- package/.output/server/node_modules/@unhead/dom/dist/index.mjs +197 -0
- package/.output/server/node_modules/@unhead/dom/package.json +40 -0
- package/.output/server/node_modules/@unhead/shared/dist/index.mjs +731 -0
- package/.output/server/node_modules/@unhead/shared/package.json +47 -0
- package/.output/server/node_modules/@unhead/ssr/dist/index.mjs +95 -0
- package/.output/server/node_modules/@unhead/ssr/package.json +40 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6690 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1404 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1789 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6654 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1669 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +857 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +594 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/@vue-flow/background/dist/vue-flow-background.mjs +126 -0
- package/.output/server/node_modules/@vue-flow/background/package.json +73 -0
- package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +9873 -0
- package/.output/server/node_modules/@vue-flow/core/package.json +92 -0
- package/.output/server/node_modules/@vue-flow/minimap/dist/vue-flow-minimap.mjs +2953 -0
- package/.output/server/node_modules/@vue-flow/minimap/package.json +80 -0
- package/.output/server/node_modules/devalue/index.js +3 -0
- package/.output/server/node_modules/devalue/package.json +34 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +6 -0
- package/.output/server/node_modules/devalue/src/parse.js +160 -0
- package/.output/server/node_modules/devalue/src/stringify.js +232 -0
- package/.output/server/node_modules/devalue/src/uneval.js +351 -0
- package/.output/server/node_modules/devalue/src/utils.js +113 -0
- package/.output/server/node_modules/entities/lib/decode.js +536 -0
- package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.output/server/node_modules/entities/package.json +90 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
- package/.output/server/node_modules/hookable/package.json +49 -0
- package/.output/server/node_modules/nanoid/index.js +46 -0
- package/.output/server/node_modules/nanoid/package.json +41 -0
- package/.output/server/node_modules/nanoid/url-alphabet/index.js +2 -0
- package/.output/server/node_modules/pinia/dist/pinia.prod.cjs +858 -0
- package/.output/server/node_modules/pinia/package.json +100 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +630 -0
- package/.output/server/node_modules/ufo/package.json +47 -0
- package/.output/server/node_modules/unhead/dist/index.mjs +747 -0
- package/.output/server/node_modules/unhead/package.json +46 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
- package/.output/server/node_modules/vue-demi/lib/index.cjs +29 -0
- package/.output/server/node_modules/vue-demi/package.json +47 -0
- package/.output/server/node_modules/zod/lib/index.mjs +4236 -0
- package/.output/server/node_modules/zod/package.json +119 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/Options.js +31 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/Refs.js +21 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/index.js +37 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/package.json +1 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parseDef.js +164 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +3 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +25 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +49 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +5 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +46 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +7 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +6 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +6 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +52 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +21 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +25 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +5 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +10 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +33 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +52 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +45 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +20 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +57 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +20 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +324 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +32 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +5 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +80 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +3 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +59 -0
- package/.output/server/node_modules/zod-to-json-schema/package.json +89 -0
- package/.output/server/package.json +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zod",
|
|
3
|
+
"version": "3.23.8",
|
|
4
|
+
"author": "Colin McDonnell <colin@colinhacks.com>",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/colinhacks/zod.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "./lib/index.js",
|
|
10
|
+
"module": "./lib/index.mjs",
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@babel/core": "^7.22.5",
|
|
13
|
+
"@babel/preset-env": "^7.22.5",
|
|
14
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
15
|
+
"@jest/globals": "^29.4.3",
|
|
16
|
+
"@rollup/plugin-typescript": "^8.2.0",
|
|
17
|
+
"@swc/core": "^1.3.66",
|
|
18
|
+
"@swc/jest": "^0.2.26",
|
|
19
|
+
"@types/benchmark": "^2.1.0",
|
|
20
|
+
"@types/jest": "^29.2.2",
|
|
21
|
+
"@types/node": "14",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
|
23
|
+
"@typescript-eslint/parser": "^5.15.0",
|
|
24
|
+
"babel-jest": "^29.5.0",
|
|
25
|
+
"benchmark": "^2.1.4",
|
|
26
|
+
"dependency-cruiser": "^9.19.0",
|
|
27
|
+
"eslint": "^8.11.0",
|
|
28
|
+
"eslint-config-prettier": "^8.5.0",
|
|
29
|
+
"eslint-plugin-ban": "^1.6.0",
|
|
30
|
+
"eslint-plugin-import": "^2.25.4",
|
|
31
|
+
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
32
|
+
"eslint-plugin-unused-imports": "^2.0.0",
|
|
33
|
+
"husky": "^7.0.4",
|
|
34
|
+
"jest": "^29.3.1",
|
|
35
|
+
"lint-staged": "^12.3.7",
|
|
36
|
+
"nodemon": "^2.0.15",
|
|
37
|
+
"prettier": "^2.6.0",
|
|
38
|
+
"pretty-quick": "^3.1.3",
|
|
39
|
+
"rollup": "^2.70.1",
|
|
40
|
+
"ts-jest": "^29.1.0",
|
|
41
|
+
"ts-morph": "^14.0.0",
|
|
42
|
+
"ts-node": "^10.9.1",
|
|
43
|
+
"tslib": "^2.3.1",
|
|
44
|
+
"tsx": "^3.8.0",
|
|
45
|
+
"typescript": "~4.5.5",
|
|
46
|
+
"vitest": "^0.32.2"
|
|
47
|
+
},
|
|
48
|
+
"exports": {
|
|
49
|
+
".": {
|
|
50
|
+
"types": "./index.d.ts",
|
|
51
|
+
"require": "./lib/index.js",
|
|
52
|
+
"import": "./lib/index.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./package.json": "./package.json",
|
|
55
|
+
"./locales/*": "./lib/locales/*"
|
|
56
|
+
},
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/colinhacks/zod/issues"
|
|
59
|
+
},
|
|
60
|
+
"description": "TypeScript-first schema declaration and validation library with static type inference",
|
|
61
|
+
"files": [
|
|
62
|
+
"/lib",
|
|
63
|
+
"/index.d.ts"
|
|
64
|
+
],
|
|
65
|
+
"funding": "https://github.com/sponsors/colinhacks",
|
|
66
|
+
"homepage": "https://zod.dev",
|
|
67
|
+
"keywords": [
|
|
68
|
+
"typescript",
|
|
69
|
+
"schema",
|
|
70
|
+
"validation",
|
|
71
|
+
"type",
|
|
72
|
+
"inference"
|
|
73
|
+
],
|
|
74
|
+
"license": "MIT",
|
|
75
|
+
"lint-staged": {
|
|
76
|
+
"src/*.ts": [
|
|
77
|
+
"eslint --cache --fix",
|
|
78
|
+
"prettier --ignore-unknown --write"
|
|
79
|
+
],
|
|
80
|
+
"*.md": [
|
|
81
|
+
"prettier --ignore-unknown --write"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"prettier:check": "prettier --check src/**/*.ts deno/lib/**/*.ts *.md --no-error-on-unmatched-pattern",
|
|
86
|
+
"prettier:fix": "prettier --write src/**/*.ts deno/lib/**/*.ts *.md --ignore-unknown --no-error-on-unmatched-pattern",
|
|
87
|
+
"lint:check": "eslint --cache --ext .ts ./src",
|
|
88
|
+
"lint:fix": "eslint --cache --fix --ext .ts ./src",
|
|
89
|
+
"check": "yarn lint:check && yarn prettier:check",
|
|
90
|
+
"fix": "yarn lint:fix && yarn prettier:fix",
|
|
91
|
+
"clean": "rm -rf lib/* deno/lib/*",
|
|
92
|
+
"build": "yarn run clean && npm run build:cjs && npm run build:esm && npm run build:deno",
|
|
93
|
+
"build:deno": "node ./deno-build.mjs && cp ./README.md ./deno/lib",
|
|
94
|
+
"build:esm": "rollup --config ./configs/rollup.config.js",
|
|
95
|
+
"build:cjs": "tsc -p ./configs/tsconfig.cjs.json",
|
|
96
|
+
"build:types": "tsc -p ./configs/tsconfig.types.json",
|
|
97
|
+
"build:test": "tsc -p ./configs/tsconfig.test.json",
|
|
98
|
+
"test:watch": "yarn test:ts-jest --watch",
|
|
99
|
+
"test": "yarn test:ts-jest",
|
|
100
|
+
"test:babel": "jest --coverage --config ./configs/babel-jest.config.json",
|
|
101
|
+
"test:bun": "bun test src/",
|
|
102
|
+
"test:vitest": "npx vitest --config ./configs/vitest.config.ts",
|
|
103
|
+
"test:ts-jest": "npx jest --config ./configs/ts-jest.config.json",
|
|
104
|
+
"test:swc": "npx jest --config ./configs/swc-jest.config.json",
|
|
105
|
+
"test:deno": "cd deno && deno test",
|
|
106
|
+
"prepublishOnly": "npm run test && npm run build && npm run build:deno",
|
|
107
|
+
"play": "nodemon -e ts -w . -x tsx playground.ts",
|
|
108
|
+
"depcruise": "depcruise -c .dependency-cruiser.js src",
|
|
109
|
+
"benchmark": "tsx src/benchmarks/index.ts",
|
|
110
|
+
"prepare": "husky install"
|
|
111
|
+
},
|
|
112
|
+
"sideEffects": false,
|
|
113
|
+
"support": {
|
|
114
|
+
"backing": {
|
|
115
|
+
"npm-funding": true
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"types": "./index.d.ts"
|
|
119
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
2
|
+
export const defaultOptions = {
|
|
3
|
+
name: undefined,
|
|
4
|
+
$refStrategy: "root",
|
|
5
|
+
basePath: ["#"],
|
|
6
|
+
effectStrategy: "input",
|
|
7
|
+
pipeStrategy: "all",
|
|
8
|
+
dateStrategy: "format:date-time",
|
|
9
|
+
mapStrategy: "entries",
|
|
10
|
+
removeAdditionalStrategy: "passthrough",
|
|
11
|
+
definitionPath: "definitions",
|
|
12
|
+
target: "jsonSchema7",
|
|
13
|
+
strictUnions: false,
|
|
14
|
+
definitions: {},
|
|
15
|
+
errorMessages: false,
|
|
16
|
+
markdownDescription: false,
|
|
17
|
+
patternStrategy: "escape",
|
|
18
|
+
applyRegexFlags: false,
|
|
19
|
+
emailStrategy: "format:email",
|
|
20
|
+
base64Strategy: "contentEncoding:base64",
|
|
21
|
+
nameStrategy: "ref"
|
|
22
|
+
};
|
|
23
|
+
export const getDefaultOptions = (options) => (typeof options === "string"
|
|
24
|
+
? {
|
|
25
|
+
...defaultOptions,
|
|
26
|
+
name: options,
|
|
27
|
+
}
|
|
28
|
+
: {
|
|
29
|
+
...defaultOptions,
|
|
30
|
+
...options,
|
|
31
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getDefaultOptions } from "./Options.js";
|
|
2
|
+
export const getRefs = (options) => {
|
|
3
|
+
const _options = getDefaultOptions(options);
|
|
4
|
+
const currentPath = _options.name !== undefined
|
|
5
|
+
? [..._options.basePath, _options.definitionPath, _options.name]
|
|
6
|
+
: _options.basePath;
|
|
7
|
+
return {
|
|
8
|
+
..._options,
|
|
9
|
+
currentPath: currentPath,
|
|
10
|
+
propertyPath: undefined,
|
|
11
|
+
seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
|
|
12
|
+
def._def,
|
|
13
|
+
{
|
|
14
|
+
def: def._def,
|
|
15
|
+
path: [..._options.basePath, _options.definitionPath, name],
|
|
16
|
+
// Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
|
|
17
|
+
jsonSchema: undefined,
|
|
18
|
+
},
|
|
19
|
+
])),
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function addErrorMessage(res, key, errorMessage, refs) {
|
|
2
|
+
if (!refs?.errorMessages)
|
|
3
|
+
return;
|
|
4
|
+
if (errorMessage) {
|
|
5
|
+
res.errorMessage = {
|
|
6
|
+
...res.errorMessage,
|
|
7
|
+
[key]: errorMessage,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
12
|
+
res[key] = value;
|
|
13
|
+
addErrorMessage(res, key, errorMessage, refs);
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export * from "./Options.js";
|
|
2
|
+
export * from "./Refs.js";
|
|
3
|
+
export * from "./errorMessages.js";
|
|
4
|
+
export * from "./parseDef.js";
|
|
5
|
+
export * from "./parsers/any.js";
|
|
6
|
+
export * from "./parsers/array.js";
|
|
7
|
+
export * from "./parsers/bigint.js";
|
|
8
|
+
export * from "./parsers/boolean.js";
|
|
9
|
+
export * from "./parsers/branded.js";
|
|
10
|
+
export * from "./parsers/catch.js";
|
|
11
|
+
export * from "./parsers/date.js";
|
|
12
|
+
export * from "./parsers/default.js";
|
|
13
|
+
export * from "./parsers/effects.js";
|
|
14
|
+
export * from "./parsers/enum.js";
|
|
15
|
+
export * from "./parsers/intersection.js";
|
|
16
|
+
export * from "./parsers/literal.js";
|
|
17
|
+
export * from "./parsers/map.js";
|
|
18
|
+
export * from "./parsers/nativeEnum.js";
|
|
19
|
+
export * from "./parsers/never.js";
|
|
20
|
+
export * from "./parsers/null.js";
|
|
21
|
+
export * from "./parsers/nullable.js";
|
|
22
|
+
export * from "./parsers/number.js";
|
|
23
|
+
export * from "./parsers/object.js";
|
|
24
|
+
export * from "./parsers/optional.js";
|
|
25
|
+
export * from "./parsers/pipeline.js";
|
|
26
|
+
export * from "./parsers/promise.js";
|
|
27
|
+
export * from "./parsers/readonly.js";
|
|
28
|
+
export * from "./parsers/record.js";
|
|
29
|
+
export * from "./parsers/set.js";
|
|
30
|
+
export * from "./parsers/string.js";
|
|
31
|
+
export * from "./parsers/tuple.js";
|
|
32
|
+
export * from "./parsers/undefined.js";
|
|
33
|
+
export * from "./parsers/union.js";
|
|
34
|
+
export * from "./parsers/unknown.js";
|
|
35
|
+
export * from "./zodToJsonSchema.js";
|
|
36
|
+
import { zodToJsonSchema } from "./zodToJsonSchema.js";
|
|
37
|
+
export default zodToJsonSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { ZodFirstPartyTypeKind } from "zod";
|
|
2
|
+
import { parseAnyDef } from "./parsers/any.js";
|
|
3
|
+
import { parseArrayDef } from "./parsers/array.js";
|
|
4
|
+
import { parseBigintDef } from "./parsers/bigint.js";
|
|
5
|
+
import { parseBooleanDef } from "./parsers/boolean.js";
|
|
6
|
+
import { parseBrandedDef } from "./parsers/branded.js";
|
|
7
|
+
import { parseCatchDef } from "./parsers/catch.js";
|
|
8
|
+
import { parseDateDef } from "./parsers/date.js";
|
|
9
|
+
import { parseDefaultDef } from "./parsers/default.js";
|
|
10
|
+
import { parseEffectsDef } from "./parsers/effects.js";
|
|
11
|
+
import { parseEnumDef } from "./parsers/enum.js";
|
|
12
|
+
import { parseIntersectionDef, } from "./parsers/intersection.js";
|
|
13
|
+
import { parseLiteralDef } from "./parsers/literal.js";
|
|
14
|
+
import { parseMapDef } from "./parsers/map.js";
|
|
15
|
+
import { parseNativeEnumDef, } from "./parsers/nativeEnum.js";
|
|
16
|
+
import { parseNeverDef } from "./parsers/never.js";
|
|
17
|
+
import { parseNullDef } from "./parsers/null.js";
|
|
18
|
+
import { parseNullableDef, } from "./parsers/nullable.js";
|
|
19
|
+
import { parseNumberDef } from "./parsers/number.js";
|
|
20
|
+
import { parseObjectDef } from "./parsers/object.js";
|
|
21
|
+
import { parseOptionalDef } from "./parsers/optional.js";
|
|
22
|
+
import { parsePipelineDef } from "./parsers/pipeline.js";
|
|
23
|
+
import { parsePromiseDef } from "./parsers/promise.js";
|
|
24
|
+
import { parseRecordDef } from "./parsers/record.js";
|
|
25
|
+
import { parseSetDef } from "./parsers/set.js";
|
|
26
|
+
import { parseStringDef } from "./parsers/string.js";
|
|
27
|
+
import { parseTupleDef } from "./parsers/tuple.js";
|
|
28
|
+
import { parseUndefinedDef, } from "./parsers/undefined.js";
|
|
29
|
+
import { parseUnionDef } from "./parsers/union.js";
|
|
30
|
+
import { parseUnknownDef } from "./parsers/unknown.js";
|
|
31
|
+
import { parseReadonlyDef } from "./parsers/readonly.js";
|
|
32
|
+
import { ignoreOverride } from "./Options.js";
|
|
33
|
+
export function parseDef(def, refs, forceResolution = false) {
|
|
34
|
+
const seenItem = refs.seen.get(def);
|
|
35
|
+
if (refs.override) {
|
|
36
|
+
const overrideResult = refs.override?.(def, refs, seenItem, forceResolution);
|
|
37
|
+
if (overrideResult !== ignoreOverride) {
|
|
38
|
+
return overrideResult;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (seenItem && !forceResolution) {
|
|
42
|
+
const seenSchema = get$ref(seenItem, refs);
|
|
43
|
+
if (seenSchema !== undefined) {
|
|
44
|
+
return seenSchema;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const newItem = { def, path: refs.currentPath, jsonSchema: undefined };
|
|
48
|
+
refs.seen.set(def, newItem);
|
|
49
|
+
const jsonSchema = selectParser(def, def.typeName, refs);
|
|
50
|
+
if (jsonSchema) {
|
|
51
|
+
addMeta(def, refs, jsonSchema);
|
|
52
|
+
}
|
|
53
|
+
newItem.jsonSchema = jsonSchema;
|
|
54
|
+
return jsonSchema;
|
|
55
|
+
}
|
|
56
|
+
const get$ref = (item, refs) => {
|
|
57
|
+
switch (refs.$refStrategy) {
|
|
58
|
+
case "root":
|
|
59
|
+
return { $ref: item.path.join("/") };
|
|
60
|
+
case "relative":
|
|
61
|
+
return { $ref: getRelativePath(refs.currentPath, item.path) };
|
|
62
|
+
case "none":
|
|
63
|
+
case "seen": {
|
|
64
|
+
if (item.path.length < refs.currentPath.length &&
|
|
65
|
+
item.path.every((value, index) => refs.currentPath[index] === value)) {
|
|
66
|
+
console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
|
|
67
|
+
return {};
|
|
68
|
+
}
|
|
69
|
+
return refs.$refStrategy === "seen" ? {} : undefined;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const getRelativePath = (pathA, pathB) => {
|
|
74
|
+
let i = 0;
|
|
75
|
+
for (; i < pathA.length && i < pathB.length; i++) {
|
|
76
|
+
if (pathA[i] !== pathB[i])
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
80
|
+
};
|
|
81
|
+
const selectParser = (def, typeName, refs) => {
|
|
82
|
+
switch (typeName) {
|
|
83
|
+
case ZodFirstPartyTypeKind.ZodString:
|
|
84
|
+
return parseStringDef(def, refs);
|
|
85
|
+
case ZodFirstPartyTypeKind.ZodNumber:
|
|
86
|
+
return parseNumberDef(def, refs);
|
|
87
|
+
case ZodFirstPartyTypeKind.ZodObject:
|
|
88
|
+
return parseObjectDef(def, refs);
|
|
89
|
+
case ZodFirstPartyTypeKind.ZodBigInt:
|
|
90
|
+
return parseBigintDef(def, refs);
|
|
91
|
+
case ZodFirstPartyTypeKind.ZodBoolean:
|
|
92
|
+
return parseBooleanDef();
|
|
93
|
+
case ZodFirstPartyTypeKind.ZodDate:
|
|
94
|
+
return parseDateDef(def, refs);
|
|
95
|
+
case ZodFirstPartyTypeKind.ZodUndefined:
|
|
96
|
+
return parseUndefinedDef();
|
|
97
|
+
case ZodFirstPartyTypeKind.ZodNull:
|
|
98
|
+
return parseNullDef(refs);
|
|
99
|
+
case ZodFirstPartyTypeKind.ZodArray:
|
|
100
|
+
return parseArrayDef(def, refs);
|
|
101
|
+
case ZodFirstPartyTypeKind.ZodUnion:
|
|
102
|
+
case ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
|
|
103
|
+
return parseUnionDef(def, refs);
|
|
104
|
+
case ZodFirstPartyTypeKind.ZodIntersection:
|
|
105
|
+
return parseIntersectionDef(def, refs);
|
|
106
|
+
case ZodFirstPartyTypeKind.ZodTuple:
|
|
107
|
+
return parseTupleDef(def, refs);
|
|
108
|
+
case ZodFirstPartyTypeKind.ZodRecord:
|
|
109
|
+
return parseRecordDef(def, refs);
|
|
110
|
+
case ZodFirstPartyTypeKind.ZodLiteral:
|
|
111
|
+
return parseLiteralDef(def, refs);
|
|
112
|
+
case ZodFirstPartyTypeKind.ZodEnum:
|
|
113
|
+
return parseEnumDef(def);
|
|
114
|
+
case ZodFirstPartyTypeKind.ZodNativeEnum:
|
|
115
|
+
return parseNativeEnumDef(def);
|
|
116
|
+
case ZodFirstPartyTypeKind.ZodNullable:
|
|
117
|
+
return parseNullableDef(def, refs);
|
|
118
|
+
case ZodFirstPartyTypeKind.ZodOptional:
|
|
119
|
+
return parseOptionalDef(def, refs);
|
|
120
|
+
case ZodFirstPartyTypeKind.ZodMap:
|
|
121
|
+
return parseMapDef(def, refs);
|
|
122
|
+
case ZodFirstPartyTypeKind.ZodSet:
|
|
123
|
+
return parseSetDef(def, refs);
|
|
124
|
+
case ZodFirstPartyTypeKind.ZodLazy:
|
|
125
|
+
return parseDef(def.getter()._def, refs);
|
|
126
|
+
case ZodFirstPartyTypeKind.ZodPromise:
|
|
127
|
+
return parsePromiseDef(def, refs);
|
|
128
|
+
case ZodFirstPartyTypeKind.ZodNaN:
|
|
129
|
+
case ZodFirstPartyTypeKind.ZodNever:
|
|
130
|
+
return parseNeverDef();
|
|
131
|
+
case ZodFirstPartyTypeKind.ZodEffects:
|
|
132
|
+
return parseEffectsDef(def, refs);
|
|
133
|
+
case ZodFirstPartyTypeKind.ZodAny:
|
|
134
|
+
return parseAnyDef();
|
|
135
|
+
case ZodFirstPartyTypeKind.ZodUnknown:
|
|
136
|
+
return parseUnknownDef();
|
|
137
|
+
case ZodFirstPartyTypeKind.ZodDefault:
|
|
138
|
+
return parseDefaultDef(def, refs);
|
|
139
|
+
case ZodFirstPartyTypeKind.ZodBranded:
|
|
140
|
+
return parseBrandedDef(def, refs);
|
|
141
|
+
case ZodFirstPartyTypeKind.ZodReadonly:
|
|
142
|
+
return parseReadonlyDef(def, refs);
|
|
143
|
+
case ZodFirstPartyTypeKind.ZodCatch:
|
|
144
|
+
return parseCatchDef(def, refs);
|
|
145
|
+
case ZodFirstPartyTypeKind.ZodPipeline:
|
|
146
|
+
return parsePipelineDef(def, refs);
|
|
147
|
+
case ZodFirstPartyTypeKind.ZodFunction:
|
|
148
|
+
case ZodFirstPartyTypeKind.ZodVoid:
|
|
149
|
+
case ZodFirstPartyTypeKind.ZodSymbol:
|
|
150
|
+
return undefined;
|
|
151
|
+
default:
|
|
152
|
+
/* c8 ignore next */
|
|
153
|
+
return ((_) => undefined)(typeName);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const addMeta = (def, refs, jsonSchema) => {
|
|
157
|
+
if (def.description) {
|
|
158
|
+
jsonSchema.description = def.description;
|
|
159
|
+
if (refs.markdownDescription) {
|
|
160
|
+
jsonSchema.markdownDescription = def.description;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return jsonSchema;
|
|
164
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ZodFirstPartyTypeKind } from "zod";
|
|
2
|
+
import { setResponseValueAndErrors } from "../errorMessages.js";
|
|
3
|
+
import { parseDef } from "../parseDef.js";
|
|
4
|
+
export function parseArrayDef(def, refs) {
|
|
5
|
+
const res = {
|
|
6
|
+
type: "array",
|
|
7
|
+
};
|
|
8
|
+
if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) {
|
|
9
|
+
res.items = parseDef(def.type._def, {
|
|
10
|
+
...refs,
|
|
11
|
+
currentPath: [...refs.currentPath, "items"],
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
if (def.minLength) {
|
|
15
|
+
setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs);
|
|
16
|
+
}
|
|
17
|
+
if (def.maxLength) {
|
|
18
|
+
setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
|
|
19
|
+
}
|
|
20
|
+
if (def.exactLength) {
|
|
21
|
+
setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
|
|
22
|
+
setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
|
|
23
|
+
}
|
|
24
|
+
return res;
|
|
25
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { setResponseValueAndErrors } from "../errorMessages.js";
|
|
2
|
+
export function parseBigintDef(def, refs) {
|
|
3
|
+
const res = {
|
|
4
|
+
type: "integer",
|
|
5
|
+
format: "int64",
|
|
6
|
+
};
|
|
7
|
+
if (!def.checks)
|
|
8
|
+
return res;
|
|
9
|
+
for (const check of def.checks) {
|
|
10
|
+
switch (check.kind) {
|
|
11
|
+
case "min":
|
|
12
|
+
if (refs.target === "jsonSchema7") {
|
|
13
|
+
if (check.inclusive) {
|
|
14
|
+
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (!check.inclusive) {
|
|
22
|
+
res.exclusiveMinimum = true;
|
|
23
|
+
}
|
|
24
|
+
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
case "max":
|
|
28
|
+
if (refs.target === "jsonSchema7") {
|
|
29
|
+
if (check.inclusive) {
|
|
30
|
+
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
if (!check.inclusive) {
|
|
38
|
+
res.exclusiveMaximum = true;
|
|
39
|
+
}
|
|
40
|
+
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
case "multipleOf":
|
|
44
|
+
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return res;
|
|
49
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { setResponseValueAndErrors } from "../errorMessages.js";
|
|
2
|
+
export function parseDateDef(def, refs, overrideDateStrategy) {
|
|
3
|
+
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
4
|
+
if (Array.isArray(strategy)) {
|
|
5
|
+
return {
|
|
6
|
+
anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
switch (strategy) {
|
|
10
|
+
case "string":
|
|
11
|
+
case "format:date-time":
|
|
12
|
+
return {
|
|
13
|
+
type: "string",
|
|
14
|
+
format: "date-time",
|
|
15
|
+
};
|
|
16
|
+
case "format:date":
|
|
17
|
+
return {
|
|
18
|
+
type: "string",
|
|
19
|
+
format: "date",
|
|
20
|
+
};
|
|
21
|
+
case "integer":
|
|
22
|
+
return integerDateParser(def, refs);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const integerDateParser = (def, refs) => {
|
|
26
|
+
const res = {
|
|
27
|
+
type: "integer",
|
|
28
|
+
format: "unix-time",
|
|
29
|
+
};
|
|
30
|
+
if (refs.target === "openApi3") {
|
|
31
|
+
return res;
|
|
32
|
+
}
|
|
33
|
+
for (const check of def.checks) {
|
|
34
|
+
switch (check.kind) {
|
|
35
|
+
case "min":
|
|
36
|
+
setResponseValueAndErrors(res, "minimum", check.value, // This is in milliseconds
|
|
37
|
+
check.message, refs);
|
|
38
|
+
break;
|
|
39
|
+
case "max":
|
|
40
|
+
setResponseValueAndErrors(res, "maximum", check.value, // This is in milliseconds
|
|
41
|
+
check.message, refs);
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return res;
|
|
46
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { parseDef } from "../parseDef.js";
|
|
2
|
+
const isJsonSchema7AllOfType = (type) => {
|
|
3
|
+
if ("type" in type && type.type === "string")
|
|
4
|
+
return false;
|
|
5
|
+
return "allOf" in type;
|
|
6
|
+
};
|
|
7
|
+
export function parseIntersectionDef(def, refs) {
|
|
8
|
+
const allOf = [
|
|
9
|
+
parseDef(def.left._def, {
|
|
10
|
+
...refs,
|
|
11
|
+
currentPath: [...refs.currentPath, "allOf", "0"],
|
|
12
|
+
}),
|
|
13
|
+
parseDef(def.right._def, {
|
|
14
|
+
...refs,
|
|
15
|
+
currentPath: [...refs.currentPath, "allOf", "1"],
|
|
16
|
+
}),
|
|
17
|
+
].filter((x) => !!x);
|
|
18
|
+
let unevaluatedProperties = refs.target === "jsonSchema2019-09"
|
|
19
|
+
? { unevaluatedProperties: false }
|
|
20
|
+
: undefined;
|
|
21
|
+
const mergedAllOf = [];
|
|
22
|
+
// If either of the schemas is an allOf, merge them into a single allOf
|
|
23
|
+
allOf.forEach((schema) => {
|
|
24
|
+
if (isJsonSchema7AllOfType(schema)) {
|
|
25
|
+
mergedAllOf.push(...schema.allOf);
|
|
26
|
+
if (schema.unevaluatedProperties === undefined) {
|
|
27
|
+
// If one of the schemas has no unevaluatedProperties set,
|
|
28
|
+
// the merged schema should also have no unevaluatedProperties set
|
|
29
|
+
unevaluatedProperties = undefined;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
let nestedSchema = schema;
|
|
34
|
+
if ("additionalProperties" in schema &&
|
|
35
|
+
schema.additionalProperties === false) {
|
|
36
|
+
const { additionalProperties, ...rest } = schema;
|
|
37
|
+
nestedSchema = rest;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// As soon as one of the schemas has additionalProperties set not to false, we allow unevaluatedProperties
|
|
41
|
+
unevaluatedProperties = undefined;
|
|
42
|
+
}
|
|
43
|
+
mergedAllOf.push(nestedSchema);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return mergedAllOf.length
|
|
47
|
+
? {
|
|
48
|
+
allOf: mergedAllOf,
|
|
49
|
+
...unevaluatedProperties,
|
|
50
|
+
}
|
|
51
|
+
: undefined;
|
|
52
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function parseLiteralDef(def, refs) {
|
|
2
|
+
const parsedType = typeof def.value;
|
|
3
|
+
if (parsedType !== "bigint" &&
|
|
4
|
+
parsedType !== "number" &&
|
|
5
|
+
parsedType !== "boolean" &&
|
|
6
|
+
parsedType !== "string") {
|
|
7
|
+
return {
|
|
8
|
+
type: Array.isArray(def.value) ? "array" : "object",
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
if (refs.target === "openApi3") {
|
|
12
|
+
return {
|
|
13
|
+
type: parsedType === "bigint" ? "integer" : parsedType,
|
|
14
|
+
enum: [def.value],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
type: parsedType === "bigint" ? "integer" : parsedType,
|
|
19
|
+
const: def.value,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { parseDef } from "../parseDef.js";
|
|
2
|
+
import { parseRecordDef } from "./record.js";
|
|
3
|
+
export function parseMapDef(def, refs) {
|
|
4
|
+
if (refs.mapStrategy === "record") {
|
|
5
|
+
return parseRecordDef(def, refs);
|
|
6
|
+
}
|
|
7
|
+
const keys = parseDef(def.keyType._def, {
|
|
8
|
+
...refs,
|
|
9
|
+
currentPath: [...refs.currentPath, "items", "items", "0"],
|
|
10
|
+
}) || {};
|
|
11
|
+
const values = parseDef(def.valueType._def, {
|
|
12
|
+
...refs,
|
|
13
|
+
currentPath: [...refs.currentPath, "items", "items", "1"],
|
|
14
|
+
}) || {};
|
|
15
|
+
return {
|
|
16
|
+
type: "array",
|
|
17
|
+
maxItems: 125,
|
|
18
|
+
items: {
|
|
19
|
+
type: "array",
|
|
20
|
+
items: [keys, values],
|
|
21
|
+
minItems: 2,
|
|
22
|
+
maxItems: 2,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|