@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,365 @@
|
|
|
1
|
+
import { share, observableToPromise } from '@trpc/server/observable';
|
|
2
|
+
import { c as createChain } from './splitLink-4c75f7be.mjs';
|
|
3
|
+
export { s as splitLink } from './splitLink-4c75f7be.mjs';
|
|
4
|
+
import { T as TRPCClientError } from './TRPCClientError-38f9a32a.mjs';
|
|
5
|
+
export { T as TRPCClientError } from './TRPCClientError-38f9a32a.mjs';
|
|
6
|
+
import { createFlatProxy, createRecursiveProxy } from '@trpc/server/shared';
|
|
7
|
+
import { f as fetchHTTPResponse, g as getUrl, a as getBody$1, h as httpRequest } from './httpUtils-b9d0cb48.mjs';
|
|
8
|
+
export { b as getFetch } from './httpUtils-b9d0cb48.mjs';
|
|
9
|
+
import { c as createHTTPBatchLink } from './httpBatchLink-d0f9eac9.mjs';
|
|
10
|
+
export { h as httpBatchLink } from './httpBatchLink-d0f9eac9.mjs';
|
|
11
|
+
import { httpLinkFactory } from './links/httpLink.mjs';
|
|
12
|
+
export { httpLink, httpLinkFactory } from './links/httpLink.mjs';
|
|
13
|
+
export { loggerLink } from './links/loggerLink.mjs';
|
|
14
|
+
export { createWSClient, wsLink } from './links/wsLink.mjs';
|
|
15
|
+
import './transformResult-ace864b8.mjs';
|
|
16
|
+
|
|
17
|
+
class TRPCUntypedClient {
|
|
18
|
+
$request({ type , input , path , context ={} }) {
|
|
19
|
+
const chain$ = createChain({
|
|
20
|
+
links: this.links,
|
|
21
|
+
op: {
|
|
22
|
+
id: ++this.requestId,
|
|
23
|
+
type,
|
|
24
|
+
path,
|
|
25
|
+
input,
|
|
26
|
+
context
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return chain$.pipe(share());
|
|
30
|
+
}
|
|
31
|
+
requestAsPromise(opts) {
|
|
32
|
+
const req$ = this.$request(opts);
|
|
33
|
+
const { promise , abort } = observableToPromise(req$);
|
|
34
|
+
const abortablePromise = new Promise((resolve, reject)=>{
|
|
35
|
+
opts.signal?.addEventListener('abort', abort);
|
|
36
|
+
promise.then((envelope)=>{
|
|
37
|
+
resolve(envelope.result.data);
|
|
38
|
+
}).catch((err)=>{
|
|
39
|
+
reject(TRPCClientError.from(err));
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
return abortablePromise;
|
|
43
|
+
}
|
|
44
|
+
query(path, input, opts) {
|
|
45
|
+
return this.requestAsPromise({
|
|
46
|
+
type: 'query',
|
|
47
|
+
path,
|
|
48
|
+
input,
|
|
49
|
+
context: opts?.context,
|
|
50
|
+
signal: opts?.signal
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
mutation(path, input, opts) {
|
|
54
|
+
return this.requestAsPromise({
|
|
55
|
+
type: 'mutation',
|
|
56
|
+
path,
|
|
57
|
+
input,
|
|
58
|
+
context: opts?.context,
|
|
59
|
+
signal: opts?.signal
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
subscription(path, input, opts) {
|
|
63
|
+
const observable$ = this.$request({
|
|
64
|
+
type: 'subscription',
|
|
65
|
+
path,
|
|
66
|
+
input,
|
|
67
|
+
context: opts?.context
|
|
68
|
+
});
|
|
69
|
+
return observable$.subscribe({
|
|
70
|
+
next (envelope) {
|
|
71
|
+
if (envelope.result.type === 'started') {
|
|
72
|
+
opts.onStarted?.();
|
|
73
|
+
} else if (envelope.result.type === 'stopped') {
|
|
74
|
+
opts.onStopped?.();
|
|
75
|
+
} else {
|
|
76
|
+
opts.onData?.(envelope.result.data);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
error (err) {
|
|
80
|
+
opts.onError?.(err);
|
|
81
|
+
},
|
|
82
|
+
complete () {
|
|
83
|
+
opts.onComplete?.();
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
constructor(opts){
|
|
88
|
+
this.requestId = 0;
|
|
89
|
+
const combinedTransformer = (()=>{
|
|
90
|
+
const transformer = opts.transformer;
|
|
91
|
+
if (!transformer) {
|
|
92
|
+
return {
|
|
93
|
+
input: {
|
|
94
|
+
serialize: (data)=>data,
|
|
95
|
+
deserialize: (data)=>data
|
|
96
|
+
},
|
|
97
|
+
output: {
|
|
98
|
+
serialize: (data)=>data,
|
|
99
|
+
deserialize: (data)=>data
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if ('input' in transformer) {
|
|
104
|
+
return opts.transformer;
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
input: transformer,
|
|
108
|
+
output: transformer
|
|
109
|
+
};
|
|
110
|
+
})();
|
|
111
|
+
this.runtime = {
|
|
112
|
+
transformer: {
|
|
113
|
+
serialize: (data)=>combinedTransformer.input.serialize(data),
|
|
114
|
+
deserialize: (data)=>combinedTransformer.output.deserialize(data)
|
|
115
|
+
},
|
|
116
|
+
combinedTransformer
|
|
117
|
+
};
|
|
118
|
+
// Initialize the links
|
|
119
|
+
this.links = opts.links.map((link)=>link(this.runtime));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function createTRPCUntypedClient(opts) {
|
|
124
|
+
return new TRPCUntypedClient(opts);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated use `createTRPCProxyClient` instead
|
|
129
|
+
*/ function createTRPCClient(opts) {
|
|
130
|
+
const client = new TRPCUntypedClient(opts);
|
|
131
|
+
return client;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const clientCallTypeMap = {
|
|
135
|
+
query: 'query',
|
|
136
|
+
mutate: 'mutation',
|
|
137
|
+
subscribe: 'subscription'
|
|
138
|
+
};
|
|
139
|
+
/** @internal */ const clientCallTypeToProcedureType = (clientCallType)=>{
|
|
140
|
+
return clientCallTypeMap[clientCallType];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated use `createTRPCProxyClient` instead
|
|
144
|
+
* @internal
|
|
145
|
+
*/ function createTRPCClientProxy(client) {
|
|
146
|
+
return createFlatProxy((key)=>{
|
|
147
|
+
if (client.hasOwnProperty(key)) {
|
|
148
|
+
return client[key];
|
|
149
|
+
}
|
|
150
|
+
if (key === '__untypedClient') {
|
|
151
|
+
return client;
|
|
152
|
+
}
|
|
153
|
+
return createRecursiveProxy(({ path , args })=>{
|
|
154
|
+
const pathCopy = [
|
|
155
|
+
key,
|
|
156
|
+
...path
|
|
157
|
+
];
|
|
158
|
+
const procedureType = clientCallTypeToProcedureType(pathCopy.pop());
|
|
159
|
+
const fullPath = pathCopy.join('.');
|
|
160
|
+
return client[procedureType](fullPath, ...args);
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function createTRPCProxyClient(opts) {
|
|
165
|
+
const client = new TRPCUntypedClient(opts);
|
|
166
|
+
const proxy = createTRPCClientProxy(client);
|
|
167
|
+
return proxy;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get an untyped client from a proxy client
|
|
171
|
+
* @internal
|
|
172
|
+
*/ function getUntypedClient(client) {
|
|
173
|
+
return client.__untypedClient;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function getTextDecoder(customTextDecoder) {
|
|
177
|
+
if (customTextDecoder) {
|
|
178
|
+
return customTextDecoder;
|
|
179
|
+
}
|
|
180
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
181
|
+
if (typeof window !== 'undefined' && window.TextDecoder) {
|
|
182
|
+
return new window.TextDecoder();
|
|
183
|
+
}
|
|
184
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
185
|
+
if (typeof globalThis !== 'undefined' && globalThis.TextDecoder) {
|
|
186
|
+
return new globalThis.TextDecoder();
|
|
187
|
+
}
|
|
188
|
+
throw new Error('No TextDecoder implementation found');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Stream parsing adapted from https://www.loginradius.com/blog/engineering/guest-post/http-streaming-with-nodejs-and-fetch-api/
|
|
192
|
+
/**
|
|
193
|
+
* @internal
|
|
194
|
+
* @description Take a stream of bytes and call `onLine` with
|
|
195
|
+
* a JSON object for each line in the stream. Expected stream
|
|
196
|
+
* format is:
|
|
197
|
+
* ```json
|
|
198
|
+
* {"1": {...}
|
|
199
|
+
* ,"0": {...}
|
|
200
|
+
* }
|
|
201
|
+
* ```
|
|
202
|
+
*/ async function parseJSONStream(opts) {
|
|
203
|
+
const parse = opts.parse ?? JSON.parse;
|
|
204
|
+
const onLine = (line)=>{
|
|
205
|
+
if (opts.signal?.aborted) return;
|
|
206
|
+
if (!line || line === '}') {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* At this point, `line` can be one of two things:
|
|
211
|
+
* - The first line of the stream `{"2":{...}`
|
|
212
|
+
* - A line in the middle of the stream `,"2":{...}`
|
|
213
|
+
*/ const indexOfColon = line.indexOf(':');
|
|
214
|
+
const indexAsStr = line.substring(2, indexOfColon - 1);
|
|
215
|
+
const text = line.substring(indexOfColon + 1);
|
|
216
|
+
opts.onSingle(Number(indexAsStr), parse(text));
|
|
217
|
+
};
|
|
218
|
+
await readLines(opts.readableStream, onLine, opts.textDecoder);
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Handle transforming a stream of bytes into lines of text.
|
|
222
|
+
* To avoid using AsyncIterators / AsyncGenerators,
|
|
223
|
+
* we use a callback for each line.
|
|
224
|
+
*
|
|
225
|
+
* @param readableStream can be a NodeJS stream or a WebAPI stream
|
|
226
|
+
* @param onLine will be called for every line ('\n' delimited) in the stream
|
|
227
|
+
*/ async function readLines(readableStream, onLine, textDecoder) {
|
|
228
|
+
let partOfLine = '';
|
|
229
|
+
const onChunk = (chunk)=>{
|
|
230
|
+
const chunkText = textDecoder.decode(chunk);
|
|
231
|
+
const chunkLines = chunkText.split('\n');
|
|
232
|
+
if (chunkLines.length === 1) {
|
|
233
|
+
partOfLine += chunkLines[0];
|
|
234
|
+
} else if (chunkLines.length > 1) {
|
|
235
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- length checked on line above
|
|
236
|
+
onLine(partOfLine + chunkLines[0]);
|
|
237
|
+
for(let i = 1; i < chunkLines.length - 1; i++){
|
|
238
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- length checked on line above
|
|
239
|
+
onLine(chunkLines[i]);
|
|
240
|
+
}
|
|
241
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- length doesn't change, so is necessarily > 1
|
|
242
|
+
partOfLine = chunkLines[chunkLines.length - 1];
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
// we handle 2 different types of streams, this if where we figure out which one we have
|
|
246
|
+
if ('getReader' in readableStream) {
|
|
247
|
+
await readStandardChunks(readableStream, onChunk);
|
|
248
|
+
} else {
|
|
249
|
+
await readNodeChunks(readableStream, onChunk);
|
|
250
|
+
}
|
|
251
|
+
onLine(partOfLine);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Handle NodeJS stream
|
|
255
|
+
*/ function readNodeChunks(stream, onChunk) {
|
|
256
|
+
return new Promise((resolve)=>{
|
|
257
|
+
stream.on('data', onChunk);
|
|
258
|
+
stream.on('end', resolve);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Handle WebAPI stream
|
|
263
|
+
*/ async function readStandardChunks(stream, onChunk) {
|
|
264
|
+
const reader = stream.getReader();
|
|
265
|
+
let readResult = await reader.read();
|
|
266
|
+
while(!readResult.done){
|
|
267
|
+
onChunk(readResult.value);
|
|
268
|
+
readResult = await reader.read();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
const streamingJsonHttpRequester = (opts, onSingle)=>{
|
|
272
|
+
const ac = opts.AbortController ? new opts.AbortController() : null;
|
|
273
|
+
const responsePromise = fetchHTTPResponse({
|
|
274
|
+
...opts,
|
|
275
|
+
contentTypeHeader: 'application/json',
|
|
276
|
+
batchModeHeader: 'stream',
|
|
277
|
+
getUrl,
|
|
278
|
+
getBody: getBody$1
|
|
279
|
+
}, ac);
|
|
280
|
+
const cancel = ()=>ac?.abort();
|
|
281
|
+
const promise = responsePromise.then(async (res)=>{
|
|
282
|
+
if (!res.body) throw new Error('Received response without body');
|
|
283
|
+
const meta = {
|
|
284
|
+
response: res
|
|
285
|
+
};
|
|
286
|
+
return parseJSONStream({
|
|
287
|
+
readableStream: res.body,
|
|
288
|
+
onSingle,
|
|
289
|
+
parse: (string)=>({
|
|
290
|
+
json: JSON.parse(string),
|
|
291
|
+
meta
|
|
292
|
+
}),
|
|
293
|
+
signal: ac?.signal,
|
|
294
|
+
textDecoder: opts.textDecoder
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
return {
|
|
298
|
+
cancel,
|
|
299
|
+
promise
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
const streamRequester = (requesterOpts)=>{
|
|
304
|
+
const textDecoder = getTextDecoder(requesterOpts.opts.textDecoder);
|
|
305
|
+
return (batchOps, unitResolver)=>{
|
|
306
|
+
const path = batchOps.map((op)=>op.path).join(',');
|
|
307
|
+
const inputs = batchOps.map((op)=>op.input);
|
|
308
|
+
const { cancel , promise } = streamingJsonHttpRequester({
|
|
309
|
+
...requesterOpts,
|
|
310
|
+
textDecoder,
|
|
311
|
+
path,
|
|
312
|
+
inputs,
|
|
313
|
+
headers () {
|
|
314
|
+
if (!requesterOpts.opts.headers) {
|
|
315
|
+
return {};
|
|
316
|
+
}
|
|
317
|
+
if (typeof requesterOpts.opts.headers === 'function') {
|
|
318
|
+
return requesterOpts.opts.headers({
|
|
319
|
+
opList: batchOps
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
return requesterOpts.opts.headers;
|
|
323
|
+
}
|
|
324
|
+
}, (index, res)=>{
|
|
325
|
+
unitResolver(index, res);
|
|
326
|
+
});
|
|
327
|
+
return {
|
|
328
|
+
/**
|
|
329
|
+
* return an empty array because the batchLoader expects an array of results
|
|
330
|
+
* but we've already called the `unitResolver` for each of them, there's
|
|
331
|
+
* nothing left to do here.
|
|
332
|
+
*/ promise: promise.then(()=>[]),
|
|
333
|
+
cancel
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
const unstable_httpBatchStreamLink = createHTTPBatchLink(streamRequester);
|
|
338
|
+
|
|
339
|
+
const getBody = (opts)=>{
|
|
340
|
+
if (!('input' in opts)) {
|
|
341
|
+
return undefined;
|
|
342
|
+
}
|
|
343
|
+
if (!(opts.input instanceof FormData)) {
|
|
344
|
+
throw new Error('Input is not FormData');
|
|
345
|
+
}
|
|
346
|
+
return opts.input;
|
|
347
|
+
};
|
|
348
|
+
const formDataRequester = (opts)=>{
|
|
349
|
+
if (opts.type !== 'mutation') {
|
|
350
|
+
// TODO(?) handle formdata queries
|
|
351
|
+
throw new Error('We only handle mutations with formdata');
|
|
352
|
+
}
|
|
353
|
+
return httpRequest({
|
|
354
|
+
...opts,
|
|
355
|
+
getUrl () {
|
|
356
|
+
return `${opts.url}/${opts.path}`;
|
|
357
|
+
},
|
|
358
|
+
getBody
|
|
359
|
+
});
|
|
360
|
+
};
|
|
361
|
+
const experimental_formDataLink = httpLinkFactory({
|
|
362
|
+
requester: formDataRequester
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
export { TRPCUntypedClient, clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, createTRPCProxyClient, createTRPCUntypedClient, experimental_formDataLink, getUntypedClient, unstable_httpBatchStreamLink };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { observable } from '@trpc/server/observable';
|
|
2
|
+
import { t as transformResult } from '../transformResult-ace864b8.mjs';
|
|
3
|
+
import { T as TRPCClientError } from '../TRPCClientError-38f9a32a.mjs';
|
|
4
|
+
import { r as resolveHTTPLinkOptions, j as jsonHttpRequester } from '../httpUtils-b9d0cb48.mjs';
|
|
5
|
+
import '@trpc/server/shared';
|
|
6
|
+
|
|
7
|
+
function httpLinkFactory(factoryOpts) {
|
|
8
|
+
return (opts)=>{
|
|
9
|
+
const resolvedOpts = resolveHTTPLinkOptions(opts);
|
|
10
|
+
return (runtime)=>({ op })=>observable((observer)=>{
|
|
11
|
+
const { path , input , type } = op;
|
|
12
|
+
const { promise , cancel } = factoryOpts.requester({
|
|
13
|
+
...resolvedOpts,
|
|
14
|
+
runtime,
|
|
15
|
+
type,
|
|
16
|
+
path,
|
|
17
|
+
input,
|
|
18
|
+
headers () {
|
|
19
|
+
if (!opts.headers) {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
if (typeof opts.headers === 'function') {
|
|
23
|
+
return opts.headers({
|
|
24
|
+
op
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return opts.headers;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
let meta = undefined;
|
|
31
|
+
promise.then((res)=>{
|
|
32
|
+
meta = res.meta;
|
|
33
|
+
const transformed = transformResult(res.json, runtime);
|
|
34
|
+
if (!transformed.ok) {
|
|
35
|
+
observer.error(TRPCClientError.from(transformed.error, {
|
|
36
|
+
meta
|
|
37
|
+
}));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
observer.next({
|
|
41
|
+
context: res.meta,
|
|
42
|
+
result: transformed.result
|
|
43
|
+
});
|
|
44
|
+
observer.complete();
|
|
45
|
+
}).catch((cause)=>{
|
|
46
|
+
observer.error(TRPCClientError.from(cause, {
|
|
47
|
+
meta
|
|
48
|
+
}));
|
|
49
|
+
});
|
|
50
|
+
return ()=>{
|
|
51
|
+
cancel();
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @see https://trpc.io/docs/client/links/httpLink
|
|
58
|
+
*/ const httpLink = httpLinkFactory({
|
|
59
|
+
requester: jsonHttpRequester
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export { httpLink, httpLinkFactory };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { observable, tap } from '@trpc/server/observable';
|
|
2
|
+
|
|
3
|
+
/// <reference lib="dom.iterable" />
|
|
4
|
+
function isFormData(value) {
|
|
5
|
+
if (typeof FormData === 'undefined') {
|
|
6
|
+
// FormData is not supported
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
return value instanceof FormData;
|
|
10
|
+
}
|
|
11
|
+
const palettes = {
|
|
12
|
+
css: {
|
|
13
|
+
query: [
|
|
14
|
+
'72e3ff',
|
|
15
|
+
'3fb0d8'
|
|
16
|
+
],
|
|
17
|
+
mutation: [
|
|
18
|
+
'c5a3fc',
|
|
19
|
+
'904dfc'
|
|
20
|
+
],
|
|
21
|
+
subscription: [
|
|
22
|
+
'ff49e1',
|
|
23
|
+
'd83fbe'
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
ansi: {
|
|
27
|
+
regular: {
|
|
28
|
+
// Cyan background, black and white text respectively
|
|
29
|
+
query: [
|
|
30
|
+
'\x1b[30;46m',
|
|
31
|
+
'\x1b[97;46m'
|
|
32
|
+
],
|
|
33
|
+
// Magenta background, black and white text respectively
|
|
34
|
+
mutation: [
|
|
35
|
+
'\x1b[30;45m',
|
|
36
|
+
'\x1b[97;45m'
|
|
37
|
+
],
|
|
38
|
+
// Green background, black and white text respectively
|
|
39
|
+
subscription: [
|
|
40
|
+
'\x1b[30;42m',
|
|
41
|
+
'\x1b[97;42m'
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
bold: {
|
|
45
|
+
query: [
|
|
46
|
+
'\x1b[1;30;46m',
|
|
47
|
+
'\x1b[1;97;46m'
|
|
48
|
+
],
|
|
49
|
+
mutation: [
|
|
50
|
+
'\x1b[1;30;45m',
|
|
51
|
+
'\x1b[1;97;45m'
|
|
52
|
+
],
|
|
53
|
+
subscription: [
|
|
54
|
+
'\x1b[1;30;42m',
|
|
55
|
+
'\x1b[1;97;42m'
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
function constructPartsAndArgs(opts) {
|
|
61
|
+
const { direction , type , path , id , input } = opts;
|
|
62
|
+
const parts = [];
|
|
63
|
+
const args = [];
|
|
64
|
+
if (opts.colorMode === 'ansi') {
|
|
65
|
+
const [lightRegular, darkRegular] = palettes.ansi.regular[type];
|
|
66
|
+
const [lightBold, darkBold] = palettes.ansi.bold[type];
|
|
67
|
+
const reset = '\x1b[0m';
|
|
68
|
+
parts.push(direction === 'up' ? lightRegular : darkRegular, direction === 'up' ? '>>' : '<<', type, direction === 'up' ? lightBold : darkBold, `#${id}`, path, reset);
|
|
69
|
+
if (direction === 'up') {
|
|
70
|
+
args.push({
|
|
71
|
+
input: opts.input
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
args.push({
|
|
75
|
+
input: opts.input,
|
|
76
|
+
// strip context from result cause it's too noisy in terminal wihtout collapse mode
|
|
77
|
+
result: 'result' in opts.result ? opts.result.result : opts.result,
|
|
78
|
+
elapsedMs: opts.elapsedMs
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
parts,
|
|
83
|
+
args
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const [light, dark] = palettes.css[type];
|
|
87
|
+
const css = `
|
|
88
|
+
background-color: #${direction === 'up' ? light : dark};
|
|
89
|
+
color: ${direction === 'up' ? 'black' : 'white'};
|
|
90
|
+
padding: 2px;
|
|
91
|
+
`;
|
|
92
|
+
parts.push('%c', direction === 'up' ? '>>' : '<<', type, `#${id}`, `%c${path}%c`, '%O');
|
|
93
|
+
args.push(css, `${css}; font-weight: bold;`, `${css}; font-weight: normal;`);
|
|
94
|
+
if (direction === 'up') {
|
|
95
|
+
args.push({
|
|
96
|
+
input,
|
|
97
|
+
context: opts.context
|
|
98
|
+
});
|
|
99
|
+
} else {
|
|
100
|
+
args.push({
|
|
101
|
+
input,
|
|
102
|
+
result: opts.result,
|
|
103
|
+
elapsedMs: opts.elapsedMs,
|
|
104
|
+
context: opts.context
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
parts,
|
|
109
|
+
args
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
// maybe this should be moved to it's own package
|
|
113
|
+
const defaultLogger = ({ c =console , colorMode ='css' })=>(props)=>{
|
|
114
|
+
const rawInput = props.input;
|
|
115
|
+
const input = isFormData(rawInput) ? Object.fromEntries(rawInput) : rawInput;
|
|
116
|
+
const { parts , args } = constructPartsAndArgs({
|
|
117
|
+
...props,
|
|
118
|
+
colorMode,
|
|
119
|
+
input
|
|
120
|
+
});
|
|
121
|
+
const fn = props.direction === 'down' && props.result && (props.result instanceof Error || 'error' in props.result.result) ? 'error' : 'log';
|
|
122
|
+
c[fn].apply(null, [
|
|
123
|
+
parts.join(' ')
|
|
124
|
+
].concat(args));
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* @see https://trpc.io/docs/client/links/loggerLink
|
|
128
|
+
*/ function loggerLink(opts = {}) {
|
|
129
|
+
const { enabled =()=>true } = opts;
|
|
130
|
+
const colorMode = opts.colorMode ?? (typeof window === 'undefined' ? 'ansi' : 'css');
|
|
131
|
+
const { logger =defaultLogger({
|
|
132
|
+
c: opts.console,
|
|
133
|
+
colorMode
|
|
134
|
+
}) } = opts;
|
|
135
|
+
return ()=>{
|
|
136
|
+
return ({ op , next })=>{
|
|
137
|
+
return observable((observer)=>{
|
|
138
|
+
// ->
|
|
139
|
+
enabled({
|
|
140
|
+
...op,
|
|
141
|
+
direction: 'up'
|
|
142
|
+
}) && logger({
|
|
143
|
+
...op,
|
|
144
|
+
direction: 'up'
|
|
145
|
+
});
|
|
146
|
+
const requestStartTime = Date.now();
|
|
147
|
+
function logResult(result) {
|
|
148
|
+
const elapsedMs = Date.now() - requestStartTime;
|
|
149
|
+
enabled({
|
|
150
|
+
...op,
|
|
151
|
+
direction: 'down',
|
|
152
|
+
result
|
|
153
|
+
}) && logger({
|
|
154
|
+
...op,
|
|
155
|
+
direction: 'down',
|
|
156
|
+
elapsedMs,
|
|
157
|
+
result
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return next(op).pipe(tap({
|
|
161
|
+
next (result) {
|
|
162
|
+
logResult(result);
|
|
163
|
+
},
|
|
164
|
+
error (result) {
|
|
165
|
+
logResult(result);
|
|
166
|
+
}
|
|
167
|
+
})).subscribe(observer);
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export { loggerLink };
|