@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,278 @@
|
|
|
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 '@trpc/server/shared';
|
|
5
|
+
|
|
6
|
+
/* istanbul ignore next -- @preserve */ const retryDelay = (attemptIndex)=>attemptIndex === 0 ? 0 : Math.min(1000 * 2 ** attemptIndex, 30000);
|
|
7
|
+
|
|
8
|
+
function createWSClient(opts) {
|
|
9
|
+
const { url , WebSocket: WebSocketImpl = WebSocket , retryDelayMs: retryDelayFn = retryDelay , onOpen , onClose , } = opts;
|
|
10
|
+
/* istanbul ignore next -- @preserve */ if (!WebSocketImpl) {
|
|
11
|
+
throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* outgoing messages buffer whilst not open
|
|
15
|
+
*/ let outgoing = [];
|
|
16
|
+
const pendingRequests = Object.create(null);
|
|
17
|
+
let connectAttempt = 0;
|
|
18
|
+
let dispatchTimer = null;
|
|
19
|
+
let connectTimer = null;
|
|
20
|
+
let activeConnection = createWS();
|
|
21
|
+
let state = 'connecting';
|
|
22
|
+
/**
|
|
23
|
+
* tries to send the list of messages
|
|
24
|
+
*/ function dispatch() {
|
|
25
|
+
if (state !== 'open' || dispatchTimer) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
dispatchTimer = setTimeout(()=>{
|
|
29
|
+
dispatchTimer = null;
|
|
30
|
+
if (outgoing.length === 1) {
|
|
31
|
+
// single send
|
|
32
|
+
activeConnection.send(JSON.stringify(outgoing.pop()));
|
|
33
|
+
} else {
|
|
34
|
+
// batch send
|
|
35
|
+
activeConnection.send(JSON.stringify(outgoing));
|
|
36
|
+
}
|
|
37
|
+
// clear
|
|
38
|
+
outgoing = [];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function tryReconnect() {
|
|
42
|
+
if (connectTimer !== null || state === 'closed') {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const timeout = retryDelayFn(connectAttempt++);
|
|
46
|
+
reconnectInMs(timeout);
|
|
47
|
+
}
|
|
48
|
+
function reconnect() {
|
|
49
|
+
state = 'connecting';
|
|
50
|
+
const oldConnection = activeConnection;
|
|
51
|
+
activeConnection = createWS();
|
|
52
|
+
closeIfNoPending(oldConnection);
|
|
53
|
+
}
|
|
54
|
+
function reconnectInMs(ms) {
|
|
55
|
+
if (connectTimer) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
state = 'connecting';
|
|
59
|
+
connectTimer = setTimeout(reconnect, ms);
|
|
60
|
+
}
|
|
61
|
+
function closeIfNoPending(conn) {
|
|
62
|
+
// disconnect as soon as there are are no pending result
|
|
63
|
+
const hasPendingRequests = Object.values(pendingRequests).some((p)=>p.ws === conn);
|
|
64
|
+
if (!hasPendingRequests) {
|
|
65
|
+
conn.close();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function closeActiveSubscriptions() {
|
|
69
|
+
Object.values(pendingRequests).forEach((req)=>{
|
|
70
|
+
if (req.type === 'subscription') {
|
|
71
|
+
req.callbacks.complete();
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function resumeSubscriptionOnReconnect(req) {
|
|
76
|
+
if (outgoing.some((r)=>r.id === req.op.id)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
request(req.op, req.callbacks);
|
|
80
|
+
}
|
|
81
|
+
function createWS() {
|
|
82
|
+
const urlString = typeof url === 'function' ? url() : url;
|
|
83
|
+
const conn = new WebSocketImpl(urlString);
|
|
84
|
+
clearTimeout(connectTimer);
|
|
85
|
+
connectTimer = null;
|
|
86
|
+
conn.addEventListener('open', ()=>{
|
|
87
|
+
/* istanbul ignore next -- @preserve */ if (conn !== activeConnection) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
connectAttempt = 0;
|
|
91
|
+
state = 'open';
|
|
92
|
+
onOpen?.();
|
|
93
|
+
dispatch();
|
|
94
|
+
});
|
|
95
|
+
conn.addEventListener('error', ()=>{
|
|
96
|
+
if (conn === activeConnection) {
|
|
97
|
+
tryReconnect();
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const handleIncomingRequest = (req)=>{
|
|
101
|
+
if (req.method === 'reconnect' && conn === activeConnection) {
|
|
102
|
+
if (state === 'open') {
|
|
103
|
+
onClose?.();
|
|
104
|
+
}
|
|
105
|
+
reconnect();
|
|
106
|
+
// notify subscribers
|
|
107
|
+
for (const pendingReq of Object.values(pendingRequests)){
|
|
108
|
+
if (pendingReq.type === 'subscription') {
|
|
109
|
+
resumeSubscriptionOnReconnect(pendingReq);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const handleIncomingResponse = (data)=>{
|
|
115
|
+
const req = data.id !== null && pendingRequests[data.id];
|
|
116
|
+
if (!req) {
|
|
117
|
+
// do something?
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
req.callbacks.next?.(data);
|
|
121
|
+
if (req.ws !== activeConnection && conn === activeConnection) {
|
|
122
|
+
const oldWs = req.ws;
|
|
123
|
+
// gracefully replace old connection with this
|
|
124
|
+
req.ws = activeConnection;
|
|
125
|
+
closeIfNoPending(oldWs);
|
|
126
|
+
}
|
|
127
|
+
if ('result' in data && data.result.type === 'stopped' && conn === activeConnection) {
|
|
128
|
+
req.callbacks.complete();
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
conn.addEventListener('message', ({ data })=>{
|
|
132
|
+
const msg = JSON.parse(data);
|
|
133
|
+
if ('method' in msg) {
|
|
134
|
+
handleIncomingRequest(msg);
|
|
135
|
+
} else {
|
|
136
|
+
handleIncomingResponse(msg);
|
|
137
|
+
}
|
|
138
|
+
if (conn !== activeConnection || state === 'closed') {
|
|
139
|
+
// when receiving a message, we close old connection that has no pending requests
|
|
140
|
+
closeIfNoPending(conn);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
conn.addEventListener('close', ({ code })=>{
|
|
144
|
+
if (state === 'open') {
|
|
145
|
+
onClose?.({
|
|
146
|
+
code
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (activeConnection === conn) {
|
|
150
|
+
// connection might have been replaced already
|
|
151
|
+
tryReconnect();
|
|
152
|
+
}
|
|
153
|
+
for (const [key, req] of Object.entries(pendingRequests)){
|
|
154
|
+
if (req.ws !== conn) {
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (state === 'closed') {
|
|
158
|
+
// If the connection was closed, we just call `complete()` on the request
|
|
159
|
+
delete pendingRequests[key];
|
|
160
|
+
req.callbacks.complete?.();
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
// The connection was closed either unexpectedly or because of a reconnect
|
|
164
|
+
if (req.type === 'subscription') {
|
|
165
|
+
// Subscriptions will resume after we've reconnected
|
|
166
|
+
resumeSubscriptionOnReconnect(req);
|
|
167
|
+
} else {
|
|
168
|
+
// Queries and mutations will error if interrupted
|
|
169
|
+
delete pendingRequests[key];
|
|
170
|
+
req.callbacks.error?.(TRPCClientError.from(new TRPCWebSocketClosedError('WebSocket closed prematurely')));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return conn;
|
|
175
|
+
}
|
|
176
|
+
function request(op, callbacks) {
|
|
177
|
+
const { type , input , path , id } = op;
|
|
178
|
+
const envelope = {
|
|
179
|
+
id,
|
|
180
|
+
method: type,
|
|
181
|
+
params: {
|
|
182
|
+
input,
|
|
183
|
+
path
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
pendingRequests[id] = {
|
|
187
|
+
ws: activeConnection,
|
|
188
|
+
type,
|
|
189
|
+
callbacks,
|
|
190
|
+
op
|
|
191
|
+
};
|
|
192
|
+
// enqueue message
|
|
193
|
+
outgoing.push(envelope);
|
|
194
|
+
dispatch();
|
|
195
|
+
return ()=>{
|
|
196
|
+
const callbacks = pendingRequests[id]?.callbacks;
|
|
197
|
+
delete pendingRequests[id];
|
|
198
|
+
outgoing = outgoing.filter((msg)=>msg.id !== id);
|
|
199
|
+
callbacks?.complete?.();
|
|
200
|
+
if (activeConnection.readyState === WebSocketImpl.OPEN && op.type === 'subscription') {
|
|
201
|
+
outgoing.push({
|
|
202
|
+
id,
|
|
203
|
+
method: 'subscription.stop'
|
|
204
|
+
});
|
|
205
|
+
dispatch();
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
close: ()=>{
|
|
211
|
+
state = 'closed';
|
|
212
|
+
onClose?.();
|
|
213
|
+
closeActiveSubscriptions();
|
|
214
|
+
closeIfNoPending(activeConnection);
|
|
215
|
+
clearTimeout(connectTimer);
|
|
216
|
+
connectTimer = null;
|
|
217
|
+
},
|
|
218
|
+
request,
|
|
219
|
+
getConnection () {
|
|
220
|
+
return activeConnection;
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
class TRPCWebSocketClosedError extends Error {
|
|
225
|
+
constructor(message){
|
|
226
|
+
super(message);
|
|
227
|
+
this.name = 'TRPCWebSocketClosedError';
|
|
228
|
+
Object.setPrototypeOf(this, TRPCWebSocketClosedError.prototype);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* @see https://trpc.io/docs/client/links/wsLink
|
|
233
|
+
*/ function wsLink(opts) {
|
|
234
|
+
return (runtime)=>{
|
|
235
|
+
const { client } = opts;
|
|
236
|
+
return ({ op })=>{
|
|
237
|
+
return observable((observer)=>{
|
|
238
|
+
const { type , path , id , context } = op;
|
|
239
|
+
const input = runtime.transformer.serialize(op.input);
|
|
240
|
+
const unsub = client.request({
|
|
241
|
+
type,
|
|
242
|
+
path,
|
|
243
|
+
input,
|
|
244
|
+
id,
|
|
245
|
+
context
|
|
246
|
+
}, {
|
|
247
|
+
error (err) {
|
|
248
|
+
observer.error(err);
|
|
249
|
+
unsub();
|
|
250
|
+
},
|
|
251
|
+
complete () {
|
|
252
|
+
observer.complete();
|
|
253
|
+
},
|
|
254
|
+
next (message) {
|
|
255
|
+
const transformed = transformResult(message, runtime);
|
|
256
|
+
if (!transformed.ok) {
|
|
257
|
+
observer.error(TRPCClientError.from(transformed.error));
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
observer.next({
|
|
261
|
+
result: transformed.result
|
|
262
|
+
});
|
|
263
|
+
if (op.type !== 'subscription') {
|
|
264
|
+
// if it isn't a subscription we don't care about next response
|
|
265
|
+
unsub();
|
|
266
|
+
observer.complete();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
return ()=>{
|
|
271
|
+
unsub();
|
|
272
|
+
};
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export { createWSClient, wsLink };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { observable } from '@trpc/server/observable';
|
|
2
|
+
|
|
3
|
+
/** @internal */ function createChain(opts) {
|
|
4
|
+
return observable((observer)=>{
|
|
5
|
+
function execute(index = 0, op = opts.op) {
|
|
6
|
+
const next = opts.links[index];
|
|
7
|
+
if (!next) {
|
|
8
|
+
throw new Error('No more links to execute - did you forget to add an ending link?');
|
|
9
|
+
}
|
|
10
|
+
const subscription = next({
|
|
11
|
+
op,
|
|
12
|
+
next (nextOp) {
|
|
13
|
+
const nextObserver = execute(index + 1, nextOp);
|
|
14
|
+
return nextObserver;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return subscription;
|
|
18
|
+
}
|
|
19
|
+
const obs$ = execute();
|
|
20
|
+
return obs$.subscribe(observer);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function asArray(value) {
|
|
25
|
+
return Array.isArray(value) ? value : [
|
|
26
|
+
value
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
function splitLink(opts) {
|
|
30
|
+
return (runtime)=>{
|
|
31
|
+
const yes = asArray(opts.true).map((link)=>link(runtime));
|
|
32
|
+
const no = asArray(opts.false).map((link)=>link(runtime));
|
|
33
|
+
return (props)=>{
|
|
34
|
+
return observable((observer)=>{
|
|
35
|
+
const links = opts.condition(props.op) ? yes : no;
|
|
36
|
+
return createChain({
|
|
37
|
+
op: props.op,
|
|
38
|
+
links
|
|
39
|
+
}).subscribe(observer);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { createChain as c, splitLink as s };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function isObject(value) {
|
|
2
|
+
// check that value is object
|
|
3
|
+
return !!value && !Array.isArray(value) && typeof value === 'object';
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// FIXME:
|
|
7
|
+
// - the generics here are probably unnecessary
|
|
8
|
+
// - the RPC-spec could probably be simplified to combine HTTP + WS
|
|
9
|
+
/** @internal */ function transformResultInner(response, runtime) {
|
|
10
|
+
if ('error' in response) {
|
|
11
|
+
const error = runtime.transformer.deserialize(response.error);
|
|
12
|
+
return {
|
|
13
|
+
ok: false,
|
|
14
|
+
error: {
|
|
15
|
+
...response,
|
|
16
|
+
error
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const result = {
|
|
21
|
+
...response.result,
|
|
22
|
+
...(!response.result.type || response.result.type === 'data') && {
|
|
23
|
+
type: 'data',
|
|
24
|
+
data: runtime.transformer.deserialize(response.result.data)
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
ok: true,
|
|
29
|
+
result
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
class TransformResultError extends Error {
|
|
33
|
+
constructor(){
|
|
34
|
+
super('Unable to transform response from server');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Transforms and validates that the result is a valid TRPCResponse
|
|
39
|
+
* @internal
|
|
40
|
+
*/ function transformResult(response, runtime) {
|
|
41
|
+
let result;
|
|
42
|
+
try {
|
|
43
|
+
// Use the data transformers on the JSON-response
|
|
44
|
+
result = transformResultInner(response, runtime);
|
|
45
|
+
} catch (err) {
|
|
46
|
+
throw new TransformResultError();
|
|
47
|
+
}
|
|
48
|
+
// check that output of the transformers is a valid TRPCResponse
|
|
49
|
+
if (!result.ok && (!isObject(result.error.error) || typeof result.error.error.code !== 'number')) {
|
|
50
|
+
throw new TransformResultError();
|
|
51
|
+
}
|
|
52
|
+
if (result.ok && !isObject(result.result)) {
|
|
53
|
+
throw new TransformResultError();
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { isObject as i, transformResult as t };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trpc/client",
|
|
3
|
+
"version": "10.45.2",
|
|
4
|
+
"description": "The tRPC client library",
|
|
5
|
+
"author": "KATT",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.mjs",
|
|
9
|
+
"typings": "dist/index.d.ts",
|
|
10
|
+
"homepage": "https://trpc.io",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/trpc/trpc.git",
|
|
14
|
+
"directory": "packages/client"
|
|
15
|
+
},
|
|
16
|
+
"eslintConfig": {
|
|
17
|
+
"rules": {
|
|
18
|
+
"no-restricted-imports": [
|
|
19
|
+
"error",
|
|
20
|
+
"@trpc/client"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "rollup --config rollup.config.ts --configPlugin rollup-plugin-swc3",
|
|
26
|
+
"dev": "pnpm build --watch",
|
|
27
|
+
"codegen-entrypoints": "tsx entrypoints.script.ts",
|
|
28
|
+
"lint": "eslint --cache --ext \".js,.ts,.tsx\" --ignore-path ../../.gitignore --report-unused-disable-directives src",
|
|
29
|
+
"ts-watch": "tsc --watch"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
".": {
|
|
34
|
+
"import": "./dist/index.mjs",
|
|
35
|
+
"require": "./dist/index.js",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./links/httpLink": {
|
|
39
|
+
"import": "./dist/links/httpLink.mjs",
|
|
40
|
+
"require": "./dist/links/httpLink.js",
|
|
41
|
+
"default": "./dist/links/httpLink.js"
|
|
42
|
+
},
|
|
43
|
+
"./links/httpBatchLink": {
|
|
44
|
+
"import": "./dist/links/httpBatchLink.mjs",
|
|
45
|
+
"require": "./dist/links/httpBatchLink.js",
|
|
46
|
+
"default": "./dist/links/httpBatchLink.js"
|
|
47
|
+
},
|
|
48
|
+
"./links/splitLink": {
|
|
49
|
+
"import": "./dist/links/splitLink.mjs",
|
|
50
|
+
"require": "./dist/links/splitLink.js",
|
|
51
|
+
"default": "./dist/links/splitLink.js"
|
|
52
|
+
},
|
|
53
|
+
"./links/loggerLink": {
|
|
54
|
+
"import": "./dist/links/loggerLink.mjs",
|
|
55
|
+
"require": "./dist/links/loggerLink.js",
|
|
56
|
+
"default": "./dist/links/loggerLink.js"
|
|
57
|
+
},
|
|
58
|
+
"./links/wsLink": {
|
|
59
|
+
"import": "./dist/links/wsLink.mjs",
|
|
60
|
+
"require": "./dist/links/wsLink.js",
|
|
61
|
+
"default": "./dist/links/wsLink.js"
|
|
62
|
+
},
|
|
63
|
+
"./shared": {
|
|
64
|
+
"import": "./dist/shared/index.mjs",
|
|
65
|
+
"require": "./dist/shared/index.js",
|
|
66
|
+
"default": "./dist/shared/index.js"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"dist",
|
|
71
|
+
"src",
|
|
72
|
+
"README.md",
|
|
73
|
+
"package.json",
|
|
74
|
+
"links",
|
|
75
|
+
"shared",
|
|
76
|
+
"!**/*.test.*"
|
|
77
|
+
],
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@trpc/server": "10.45.2"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@testing-library/dom": "^9.0.0",
|
|
83
|
+
"@trpc/server": "10.45.2",
|
|
84
|
+
"@types/isomorphic-fetch": "^0.0.39",
|
|
85
|
+
"@types/node": "^20.10.0",
|
|
86
|
+
"eslint": "^8.40.0",
|
|
87
|
+
"isomorphic-fetch": "^3.0.0",
|
|
88
|
+
"node-fetch": "^3.3.0",
|
|
89
|
+
"rollup": "^2.79.1",
|
|
90
|
+
"tsx": "^4.0.0",
|
|
91
|
+
"undici": "^6.0.1",
|
|
92
|
+
"vitest": "^0.32.0"
|
|
93
|
+
},
|
|
94
|
+
"publishConfig": {
|
|
95
|
+
"access": "public"
|
|
96
|
+
},
|
|
97
|
+
"funding": [
|
|
98
|
+
"https://trpc.io/sponsor"
|
|
99
|
+
],
|
|
100
|
+
"gitHead": "936db6dd2598337758e29c843ff66984ed54faaf"
|
|
101
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { g as getCauseFromUnknown } from './getCauseFromUnknown-2d66414a.mjs';
|
|
2
|
+
|
|
3
|
+
function getTRPCErrorFromUnknown(cause) {
|
|
4
|
+
if (cause instanceof TRPCError) {
|
|
5
|
+
return cause;
|
|
6
|
+
}
|
|
7
|
+
if (cause instanceof Error && cause.name === 'TRPCError') {
|
|
8
|
+
// https://github.com/trpc/trpc/pull/4848
|
|
9
|
+
return cause;
|
|
10
|
+
}
|
|
11
|
+
const trpcError = new TRPCError({
|
|
12
|
+
code: 'INTERNAL_SERVER_ERROR',
|
|
13
|
+
cause
|
|
14
|
+
});
|
|
15
|
+
// Inherit stack from error
|
|
16
|
+
if (cause instanceof Error && cause.stack) {
|
|
17
|
+
trpcError.stack = cause.stack;
|
|
18
|
+
}
|
|
19
|
+
return trpcError;
|
|
20
|
+
}
|
|
21
|
+
class TRPCError extends Error {
|
|
22
|
+
constructor(opts){
|
|
23
|
+
const cause = getCauseFromUnknown(opts.cause);
|
|
24
|
+
const message = opts.message ?? cause?.message ?? opts.code;
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26
|
+
// @ts-ignore https://github.com/tc39/proposal-error-cause
|
|
27
|
+
super(message, {
|
|
28
|
+
cause
|
|
29
|
+
});
|
|
30
|
+
this.code = opts.code;
|
|
31
|
+
this.name = 'TRPCError';
|
|
32
|
+
if (!this.cause) {
|
|
33
|
+
// < ES2022 / < Node 16.9.0 compatability
|
|
34
|
+
this.cause = cause;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { TRPCError as T, getTRPCErrorFromUnknown as g };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format a batch response as a line-delimited JSON stream
|
|
3
|
+
* that the `unstable_httpBatchStreamLink` can parse:
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* const formatter = getBatchStreamFormatter();
|
|
8
|
+
* res.send(formatter(1, 'response #2'));
|
|
9
|
+
* res.send(formatter(0, 'response #1'));
|
|
10
|
+
* res.send(formatter.end());
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Expected format:
|
|
14
|
+
* ```json
|
|
15
|
+
* {"1":"response #2"
|
|
16
|
+
* ,"0":"response #1"
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/ function getBatchStreamFormatter() {
|
|
20
|
+
let first = true;
|
|
21
|
+
function format(index, string) {
|
|
22
|
+
const prefix = first ? '{' : ',';
|
|
23
|
+
first = false;
|
|
24
|
+
return `${prefix}"${index}":${string}\n`;
|
|
25
|
+
}
|
|
26
|
+
format.end = ()=>'}';
|
|
27
|
+
return format;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { getBatchStreamFormatter as g };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/ function invert(obj) {
|
|
4
|
+
const newObj = Object.create(null);
|
|
5
|
+
for(const key in obj){
|
|
6
|
+
const v = obj[key];
|
|
7
|
+
newObj[v] = key;
|
|
8
|
+
}
|
|
9
|
+
return newObj;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// reference: https://www.jsonrpc.org/specification
|
|
13
|
+
/**
|
|
14
|
+
* JSON-RPC 2.0 Error codes
|
|
15
|
+
*
|
|
16
|
+
* `-32000` to `-32099` are reserved for implementation-defined server-errors.
|
|
17
|
+
* For tRPC we're copying the last digits of HTTP 4XX errors.
|
|
18
|
+
*/ const TRPC_ERROR_CODES_BY_KEY = {
|
|
19
|
+
/**
|
|
20
|
+
* Invalid JSON was received by the server.
|
|
21
|
+
* An error occurred on the server while parsing the JSON text.
|
|
22
|
+
*/ PARSE_ERROR: -32700,
|
|
23
|
+
/**
|
|
24
|
+
* The JSON sent is not a valid Request object.
|
|
25
|
+
*/ BAD_REQUEST: -32600,
|
|
26
|
+
// Internal JSON-RPC error
|
|
27
|
+
INTERNAL_SERVER_ERROR: -32603,
|
|
28
|
+
NOT_IMPLEMENTED: -32603,
|
|
29
|
+
// Implementation specific errors
|
|
30
|
+
UNAUTHORIZED: -32001,
|
|
31
|
+
FORBIDDEN: -32003,
|
|
32
|
+
NOT_FOUND: -32004,
|
|
33
|
+
METHOD_NOT_SUPPORTED: -32005,
|
|
34
|
+
TIMEOUT: -32008,
|
|
35
|
+
CONFLICT: -32009,
|
|
36
|
+
PRECONDITION_FAILED: -32012,
|
|
37
|
+
PAYLOAD_TOO_LARGE: -32013,
|
|
38
|
+
UNPROCESSABLE_CONTENT: -32022,
|
|
39
|
+
TOO_MANY_REQUESTS: -32029,
|
|
40
|
+
CLIENT_CLOSED_REQUEST: -32099
|
|
41
|
+
};
|
|
42
|
+
const TRPC_ERROR_CODES_BY_NUMBER = invert(TRPC_ERROR_CODES_BY_KEY);
|
|
43
|
+
|
|
44
|
+
export { TRPC_ERROR_CODES_BY_KEY as T, TRPC_ERROR_CODES_BY_NUMBER as a, invert as i };
|