@highstate/designer 0.20.0 → 0.26.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 +4 -4
- package/.output/public/_nuxt/{BkNNRtnm.js → -aI73seg.js} +1 -1
- package/.output/public/_nuxt/32ctXXKs.js +1 -0
- package/.output/public/_nuxt/39D0VL7r.js +1 -0
- package/.output/public/_nuxt/{ByBNG4eo.js → 3T5CmBSF.js} +1 -1
- package/.output/public/_nuxt/4R6BJ3GI.js +1 -0
- package/.output/public/_nuxt/77UvFSdd.js +18 -0
- package/.output/public/_nuxt/{G13IRnB2.js → B0E2rEnI.js} +1 -1
- package/.output/public/_nuxt/B1x03f8R.js +1 -0
- package/.output/public/_nuxt/B2CVdECd.js +1 -0
- package/.output/public/_nuxt/{DWQRqdcR.js → B2_u9ZKl.js} +1 -1
- package/.output/public/_nuxt/{DCR009rv.js → B8uKU-iG.js} +1 -1
- package/.output/public/_nuxt/{CxEW7TG8.js → B9BJCsIg.js} +1 -1
- package/.output/public/_nuxt/BA47KaF1.js +1 -0
- package/.output/public/_nuxt/{DRfxs3PN.js → BBmoak6l.js} +1 -1
- package/.output/public/_nuxt/BEOSfHJT.js +1 -0
- package/.output/public/_nuxt/{D2aToa54.js → BJV0IIsR.js} +1 -1
- package/.output/public/_nuxt/{DCBCRx0O.js → BKaSp7fy.js} +1 -1
- package/.output/public/_nuxt/BN7gUcg9.js +1 -0
- package/.output/public/_nuxt/{DiTMzCP2.js → BOujskTX.js} +1 -1
- package/.output/public/_nuxt/{DJN0y8jO.js → BPboW4rx.js} +1 -1
- package/.output/public/_nuxt/{DzWdbJvx.js → BR4jrf3-.js} +1 -1
- package/.output/public/_nuxt/{9I37tBe7.js → BSRetNRl.js} +1 -1
- package/.output/public/_nuxt/{C1FLL1Qz.js → Ba9NwIJp.js} +1 -1
- package/.output/public/_nuxt/{DCinzvm1.js → BbWhHw7B.js} +1 -1
- package/.output/public/_nuxt/Bcyj9glE.js +6 -0
- package/.output/public/_nuxt/{xA6NntuA.js → Be4ezMZK.js} +1 -1
- package/.output/public/_nuxt/BeH2EWoN.js +1 -0
- package/.output/public/_nuxt/{CudFwYib.js → BgvYz3Nr.js} +1 -1
- package/.output/public/_nuxt/BlGDdimO.js +1 -0
- package/.output/public/_nuxt/{ZbicA1ry.js → Bn5R9WlL.js} +1 -1
- package/.output/public/_nuxt/{ChaZkl1J.js → BqJDg8iS.js} +1 -1
- package/.output/public/_nuxt/BxD6MFcJ.js +1 -0
- package/.output/public/_nuxt/{D27ZAKIj.js → BxvmPvww.js} +1 -1
- package/.output/public/_nuxt/{BEEt8Am7.js → By1Fxx6d.js} +1 -1
- package/.output/public/_nuxt/{xdsXwj_J.js → ByBXn3Vz.js} +1 -1
- package/.output/public/_nuxt/C1bzPMRu.js +14 -0
- package/.output/public/_nuxt/{CV5MeYf9.js → C29gnYT3.js} +1 -1
- package/.output/public/_nuxt/C5BYcBs_.js +1 -0
- package/.output/public/_nuxt/{ziXKbM2N.js → C5DRPdxC.js} +1 -1
- package/.output/public/_nuxt/{BJK6uMxG.js → C794qwo0.js} +1 -1
- package/.output/public/_nuxt/{RCBWmVHz.js → C9OJ0gQB.js} +1 -1
- package/.output/public/_nuxt/{B13uiJCv.js → C9n5vGW7.js} +1 -1
- package/.output/public/_nuxt/{rcFevLEP.js → CCBTuGSI.js} +2 -2
- package/.output/public/_nuxt/CENFIVCM.js +1 -0
- package/.output/public/_nuxt/{CzSiA7V6.js → CGLWlIpJ.js} +1 -1
- package/.output/public/_nuxt/CI40hKzv.js +2 -0
- package/.output/public/_nuxt/{CcOKGYBt.js → CLsyMJ1X.js} +1 -1
- package/.output/public/_nuxt/{CaJ-zn_Z.js → CNWyx-82.js} +1 -1
- package/.output/public/_nuxt/CRZrAKrA.js +2 -0
- package/.output/public/_nuxt/{BxaP9l2T.js → CRb2z3Pg.js} +1 -1
- package/.output/public/_nuxt/{BDAHnC4j.js → CWA5Cfde.js} +1 -1
- package/.output/public/_nuxt/CYpkKp66.js +1 -0
- package/.output/public/_nuxt/{n0RAZLbO.js → C_yayEmb.js} +1 -1
- package/.output/public/_nuxt/{rgN_MdZl.js → CaZj7sno.js} +1 -1
- package/.output/public/_nuxt/{CGscLIrv.js → CgK0fS9t.js} +1 -1
- package/.output/public/_nuxt/CiaugisX.js +1 -0
- package/.output/public/_nuxt/Cjs5trkS.js +1 -0
- package/.output/public/_nuxt/Cn-bp-IR.js +1 -0
- package/.output/public/_nuxt/CoqwalnO.js +2 -0
- package/.output/public/_nuxt/{d-NZQb9b.js → CscXh7Vy.js} +1 -1
- package/.output/public/_nuxt/{DQHHT9y-.js → CwWsKBf5.js} +1 -1
- package/.output/public/_nuxt/Cwefpg1x.js +1 -0
- package/.output/public/_nuxt/CxoCegAs.js +13 -0
- package/.output/public/_nuxt/{8MSfy8uY.js → CyFj-Mv9.js} +1 -1
- package/.output/public/_nuxt/Cz2AlsmD.js +1 -0
- package/.output/public/_nuxt/{tsyQDnRt.js → D1BdWMiq.js} +1 -1
- package/.output/public/_nuxt/D1yXAE_w.js +1 -0
- package/.output/public/_nuxt/{xp27HhqZ.js → D2lHwbtX.js} +1 -1
- package/.output/public/_nuxt/{DKhcu7kD.js → D46u9gXN.js} +1 -1
- package/.output/public/_nuxt/{CJWmG4YP.js → D4H6aUyZ.js} +7 -7
- package/.output/public/_nuxt/{Dg5xB15N.js → D82vCrfD.js} +1 -1
- package/.output/public/_nuxt/D8l8udqQ.js +1 -0
- package/.output/public/_nuxt/D9ITfHnZ.js +269 -0
- package/.output/public/_nuxt/{RNghxpo_.js → DDvzSYfr.js} +1 -1
- package/.output/public/_nuxt/{Aopv2gwH.js → DFwfZeyL.js} +1 -1
- package/.output/public/_nuxt/{GgtqCdye.js → DMM9kDc1.js} +1 -1
- package/.output/public/_nuxt/{DOPqH6_T.js → DNVXBFXP.js} +1 -1
- package/.output/public/_nuxt/DPOp833l.js +1 -0
- package/.output/public/_nuxt/{D2obegTF.js → DPQHj1GW.js} +1 -1
- package/.output/public/_nuxt/DRJZaHtK.js +1 -0
- package/.output/public/_nuxt/{BlfjmxyP.js → DRTFVhVr.js} +1 -1
- package/.output/public/_nuxt/{TsXTqZ29.js → DSeZwD4N.js} +1 -1
- package/.output/public/_nuxt/{C8lm7lgC.js → DTYY2tCY.js} +1 -1
- package/.output/public/_nuxt/{DWa2aw6r.js → DVKmRHSk.js} +1 -1
- package/.output/public/_nuxt/DYE7WIF3.js +1 -0
- package/.output/public/_nuxt/{D-wGZMZP.js → DYYyOkJe.js} +1 -1
- package/.output/public/_nuxt/{BCVaR2pQ.js → DcV32yum.js} +1 -1
- package/.output/public/_nuxt/DdhYQ3Tv.js +1 -0
- package/.output/public/_nuxt/DgsIRcX7.js +1 -0
- package/.output/public/_nuxt/{BtvRca6l.js → DjAJT7YJ.js} +1 -1
- package/.output/public/_nuxt/DmMgvbsF.js +1 -0
- package/.output/public/_nuxt/{pxXmJ8QX.js → DrQCNsTo.js} +1 -1
- package/.output/public/_nuxt/{DNqd6Nek.js → DvCXikgN.js} +1 -1
- package/.output/public/_nuxt/DzQULtcW.js +1 -0
- package/.output/public/_nuxt/{Cm-2nZ05.js → DzowYWbi.js} +1 -1
- package/.output/public/_nuxt/{DQwYQDb2.js → FtFNcQmh.js} +1 -1
- package/.output/public/_nuxt/{BPcwi1q2.js → I4u-TRO-.js} +1 -1
- package/.output/public/_nuxt/{D5z-4QVk.js → O3nsZ-Uz.js} +1 -1
- package/.output/public/_nuxt/Qj4UhtaN.js +1 -0
- package/.output/public/_nuxt/{BA0jw7CM.js → VF7GAmoY.js} +1 -1
- package/.output/public/_nuxt/Ve4PFQV2.js +1 -0
- package/.output/public/_nuxt/{xrNU8mHG.js → YpnHruhZ.js} +1 -1
- package/.output/public/_nuxt/_H4v1dQx.js +1 -0
- package/.output/public/_nuxt/_pageId_.C5KTkEfy.css +1 -0
- package/.output/public/_nuxt/_panelId_.CKSHyLNC.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/53add2c3-4d7c-4a4f-a116-e73c3787cf98.json +1 -0
- package/.output/public/_nuxt/components.a-P9dVi2.css +1 -0
- package/.output/public/_nuxt/{entry.Bc0aTA0K.css → entry.DsBbjDm-.css} +1 -1
- package/.output/public/_nuxt/eo99z4R2.js +1 -0
- package/.output/public/_nuxt/error-404.DnBTUElh.css +1 -0
- package/.output/public/_nuxt/error-500.BNyYF0qG.css +1 -0
- package/.output/public/_nuxt/{BUNf2Yb8.js → fbfpKHgl.js} +1 -1
- package/.output/public/_nuxt/{BDs6uo3D.js → fxmP1KZw.js} +1 -1
- package/.output/public/_nuxt/graph-resolver-DhjyrFRu.js +180 -0
- package/.output/public/_nuxt/{mUFnM-_q.js → hunqYsQf.js} +1 -1
- package/.output/public/_nuxt/iJghVVcV.js +1 -0
- package/.output/public/_nuxt/{DyMmfYiE.js → m4Sxwg8n.js} +1 -1
- package/.output/public/_nuxt/monaco-editor.DOXZIHvr.css +1 -0
- package/.output/public/_nuxt/oH_c3LbQ.js +1 -0
- package/.output/public/_nuxt/rZm6bMo-.js +1 -0
- package/.output/public/_nuxt/{DOMRsNpU.js → rpHuDh4d.js} +1 -1
- package/.output/public/_nuxt/{vuetify.BzdWZaIq.css → vuetify.DtnS3-VQ.css} +1 -1
- package/.output/public/_nuxt/{yaml.worker-C1Cl1y5J.js → yaml.worker-CYOhFCVP.js} +248 -252
- package/.output/server/index.mjs +3272 -7573
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +1 -1
- package/.output/server/node_modules/@babel/parser/package.json +1 -1
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.cjs +57 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.mjs +2 -2
- package/.output/server/node_modules/@trpc/server/dist/codes-BfZsPdy-.cjs +222 -0
- package/.output/server/node_modules/@trpc/server/dist/{contentTypeParsers-SN4WL9ze.mjs → contentTypeParsers-iAFF_pJG.cjs} +7 -2
- package/.output/server/node_modules/@trpc/server/dist/getErrorShape-MR4DZeb7.cjs +341 -0
- package/.output/server/node_modules/@trpc/server/dist/http.cjs +14 -0
- package/.output/server/node_modules/@trpc/server/dist/index.cjs +22 -0
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +2 -2
- package/.output/server/node_modules/@trpc/server/dist/{initTRPC-RoZMIBeA.mjs → initTRPC-B1ggxyJl.mjs} +2 -2
- package/.output/server/node_modules/@trpc/server/dist/initTRPC-BXPPV9Tx.cjs +416 -0
- package/.output/server/node_modules/@trpc/server/dist/observable/index.cjs +13 -0
- package/.output/server/node_modules/@trpc/server/dist/observable-B1Nk6r1H.cjs +181 -0
- package/.output/server/node_modules/@trpc/server/dist/{observable-CUiPknO-.mjs → observable-BVzLuBs6.cjs} +42 -8
- package/.output/server/node_modules/@trpc/server/dist/{parseTRPCMessage-CTow-umk.mjs → parseTRPCMessage-7Ltmq-Fb.cjs} +14 -4
- package/.output/server/node_modules/@trpc/server/dist/resolveResponse-B0CCg8nq.cjs +2365 -0
- package/.output/server/node_modules/@trpc/server/dist/{resolveResponse-BVDlNZwN.mjs → resolveResponse-C5I6V_wc.mjs} +67 -18
- package/.output/server/node_modules/@trpc/server/dist/rpc.cjs +6 -0
- package/.output/server/node_modules/@trpc/server/dist/{tracked-Bjtgv3wJ.mjs → tracked-DiE3uR1B.mjs} +12 -3
- package/.output/server/node_modules/@trpc/server/dist/tracked-Dj_dpOJE.cjs +486 -0
- package/.output/server/node_modules/@trpc/server/package.json +15 -5
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +2 -2
- package/.output/server/node_modules/@vue/compiler-core/package.json +3 -3
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +1 -1
- package/.output/server/node_modules/@vue/compiler-dom/package.json +3 -3
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1 -1
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +31 -13
- package/.output/server/node_modules/@vue/reactivity/package.json +2 -2
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +144 -81
- package/.output/server/node_modules/@vue/runtime-core/package.json +3 -3
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +70 -9
- package/.output/server/node_modules/@vue/runtime-dom/package.json +4 -4
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +6 -2
- package/.output/server/node_modules/@vue/server-renderer/package.json +4 -4
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +1 -1
- package/.output/server/node_modules/@vue/shared/package.json +1 -1
- package/.output/server/node_modules/devalue/package.json +5 -2
- package/.output/server/node_modules/devalue/src/base64.js +46 -96
- package/.output/server/node_modules/devalue/src/parse.js +32 -10
- package/.output/server/node_modules/devalue/src/stringify.js +13 -28
- package/.output/server/node_modules/devalue/src/uneval.js +117 -55
- package/.output/server/node_modules/devalue/src/utils.js +3 -7
- package/.output/server/node_modules/hookable/dist/index.mjs +5 -14
- package/.output/server/node_modules/hookable/package.json +24 -23
- package/.output/server/node_modules/trpc-bun-adapter/dist/index.js +406 -0
- package/.output/server/node_modules/trpc-bun-adapter/package.json +44 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +3 -3
- package/.output/server/node_modules/unhead/dist/server.mjs +2 -2
- package/.output/server/node_modules/unhead/dist/shared/{unhead.eK9_7LaY.mjs → unhead.B5FWS6X0.mjs} +22 -13
- package/.output/server/node_modules/unhead/dist/shared/{unhead.BFfcxOoW.mjs → unhead.Ct24BOby.mjs} +4 -2
- package/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
- package/.output/server/node_modules/unhead/dist/shared/{unhead.ckV6dpEQ.mjs → unhead.TxTMM7cM.mjs} +1 -1
- package/.output/server/node_modules/unhead/dist/utils.mjs +1 -1
- package/.output/server/node_modules/unhead/package.json +1 -1
- package/.output/server/node_modules/vue/dist/vue.cjs.js +1 -1
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +1 -1
- package/.output/server/node_modules/vue/package.json +7 -7
- package/.output/server/node_modules/ws/lib/permessage-deflate.js +6 -6
- package/.output/server/node_modules/ws/lib/websocket-server.js +5 -5
- package/.output/server/node_modules/ws/lib/websocket.js +6 -6
- package/.output/server/node_modules/ws/package.json +4 -3
- package/.output/server/node_modules/ws/wrapper.mjs +14 -1
- package/.output/server/package.json +17 -16
- package/package.json +20 -14
- package/.output/public/_nuxt/57B6Rca8.js +0 -1
- package/.output/public/_nuxt/83L43bj1.js +0 -1
- package/.output/public/_nuxt/B8nw2aST.js +0 -2
- package/.output/public/_nuxt/B93PlW-d.js +0 -1
- package/.output/public/_nuxt/BDa1f6PF.js +0 -2
- package/.output/public/_nuxt/BE_Meo09.js +0 -269
- package/.output/public/_nuxt/BLF3u89x.js +0 -1
- package/.output/public/_nuxt/Ba13S78F.js +0 -1
- package/.output/public/_nuxt/BhRPY-oY.js +0 -1
- package/.output/public/_nuxt/Bhrxn6JZ.js +0 -1
- package/.output/public/_nuxt/Bo8jzlL1.js +0 -18
- package/.output/public/_nuxt/BpkvlDNi.js +0 -1
- package/.output/public/_nuxt/BrzmwbiE.js +0 -1
- package/.output/public/_nuxt/BuJgCY_C.js +0 -1
- package/.output/public/_nuxt/C-sUppwS.js +0 -1
- package/.output/public/_nuxt/C47S-Tmv.js +0 -1
- package/.output/public/_nuxt/CMjwMIkn.js +0 -1
- package/.output/public/_nuxt/CPZSvMBB.js +0 -1
- package/.output/public/_nuxt/CPpO8vcZ.js +0 -1
- package/.output/public/_nuxt/CQ8jqdy-.js +0 -1
- package/.output/public/_nuxt/CjoLj4QM.js +0 -1
- package/.output/public/_nuxt/D6fh7rEe.js +0 -2
- package/.output/public/_nuxt/D91rOou-.js +0 -13
- package/.output/public/_nuxt/DMwsHuHA.js +0 -1
- package/.output/public/_nuxt/DYoxhk2S.js +0 -1
- package/.output/public/_nuxt/Dbwml2gB.js +0 -1
- package/.output/public/_nuxt/DsS90Fp6.js +0 -1
- package/.output/public/_nuxt/Dv7Oe6Be.js +0 -1
- package/.output/public/_nuxt/DxERyYWQ.js +0 -1
- package/.output/public/_nuxt/GDxZ_Nvm.js +0 -14
- package/.output/public/_nuxt/VCDPK7BO.js +0 -1
- package/.output/public/_nuxt/builds/meta/a1fec520-0c95-4ae0-af5e-964780fad341.json +0 -1
- package/.output/public/_nuxt/components.CIe9upZ4.css +0 -1
- package/.output/public/_nuxt/error-404.X7H_YhdC.css +0 -1
- package/.output/public/_nuxt/error-500.BOQe1fsk.css +0 -1
- package/.output/public/_nuxt/f3TOpYbw.js +0 -1
- package/.output/public/_nuxt/graph-resolver-DKNtntr2.js +0 -180
- package/.output/public/_nuxt/monaco-editor.D_J4ItrK.css +0 -1
- package/.output/public/_nuxt/o_m1mZtJ.js +0 -6
- package/.output/server/node_modules/@trpc/server/dist/adapters/ws.mjs +0 -15
- package/.output/server/node_modules/@trpc/server/dist/node-http-DtA2iLK9.mjs +0 -224
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import-9NNw8uQM.mjs +0 -31
- package/.output/server/node_modules/@trpc/server/dist/ws-CJgZE7Hg.mjs +0 -460
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +0 -148
- package/LICENSE +0 -21
- /package/.output/public/_nuxt/{XEA9GSJd.js → B69Z0Xk1.js} +0 -0
- /package/.output/server/node_modules/@trpc/server/dist/{http-CWyjOa1l.mjs → http-DXy3XyhL.cjs} +0 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
createBunHttpHandler: () => createBunHttpHandler,
|
|
24
|
+
createBunServeHandler: () => createBunServeHandler,
|
|
25
|
+
createBunWSHandler: () => createBunWSHandler
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
|
|
29
|
+
// src/createBunHttpHandler.ts
|
|
30
|
+
var import_fetch = require("@trpc/server/adapters/fetch");
|
|
31
|
+
function createBunHttpHandler(opts) {
|
|
32
|
+
return (request, server) => {
|
|
33
|
+
const url = new URL(request.url);
|
|
34
|
+
if (opts.endpoint && !url.pathname.startsWith(opts.endpoint)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (opts.emitWsUpgrades && server.upgrade(request, { data: { req: request } })) {
|
|
38
|
+
return new Response(null, { status: 101 });
|
|
39
|
+
}
|
|
40
|
+
return (0, import_fetch.fetchRequestHandler)({
|
|
41
|
+
createContext: () => ({}),
|
|
42
|
+
...opts,
|
|
43
|
+
req: request,
|
|
44
|
+
endpoint: opts.endpoint ?? ""
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/createBunWSHandler.ts
|
|
50
|
+
var import_server = require("@trpc/server");
|
|
51
|
+
var import_http = require("@trpc/server/http");
|
|
52
|
+
var import_observable = require("@trpc/server/observable");
|
|
53
|
+
var import_rpc = require("@trpc/server/rpc");
|
|
54
|
+
function createBunWSHandler(opts) {
|
|
55
|
+
const { router, createContext } = opts;
|
|
56
|
+
const respond = (client, untransformedJSON) => {
|
|
57
|
+
client.send(
|
|
58
|
+
JSON.stringify(
|
|
59
|
+
(0, import_server.transformTRPCResponse)(
|
|
60
|
+
opts.router._def._config,
|
|
61
|
+
untransformedJSON
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
async function createClientCtx(client, url, connectionParams) {
|
|
67
|
+
const ctxPromise = createContext?.({
|
|
68
|
+
req: client.data.req,
|
|
69
|
+
res: client,
|
|
70
|
+
info: {
|
|
71
|
+
url,
|
|
72
|
+
connectionParams,
|
|
73
|
+
calls: [],
|
|
74
|
+
isBatchCall: false,
|
|
75
|
+
accept: null,
|
|
76
|
+
type: "unknown",
|
|
77
|
+
signal: client.data.abortController.signal
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
try {
|
|
81
|
+
return await ctxPromise;
|
|
82
|
+
} catch (cause) {
|
|
83
|
+
const error = (0, import_server.getTRPCErrorFromUnknown)(cause);
|
|
84
|
+
opts.onError?.({
|
|
85
|
+
error,
|
|
86
|
+
path: void 0,
|
|
87
|
+
type: "unknown",
|
|
88
|
+
ctx: void 0,
|
|
89
|
+
req: client.data.req,
|
|
90
|
+
input: void 0
|
|
91
|
+
});
|
|
92
|
+
respond(client, {
|
|
93
|
+
id: null,
|
|
94
|
+
error: (0, import_server.getErrorShape)({
|
|
95
|
+
config: router._def._config,
|
|
96
|
+
error,
|
|
97
|
+
type: "unknown",
|
|
98
|
+
path: void 0,
|
|
99
|
+
input: void 0,
|
|
100
|
+
ctx: void 0
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async function handleRequest(client, msg) {
|
|
106
|
+
if (!msg.id) {
|
|
107
|
+
throw new import_server.TRPCError({
|
|
108
|
+
code: "BAD_REQUEST",
|
|
109
|
+
message: "`id` is required"
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (msg.method === "subscription.stop") {
|
|
113
|
+
client.data.abortControllers.get(msg.id)?.abort();
|
|
114
|
+
client.data.abortControllers.delete(msg.id);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const { id, method, jsonrpc } = msg;
|
|
118
|
+
const type = method;
|
|
119
|
+
const { path, lastEventId } = msg.params;
|
|
120
|
+
const req = client.data.req;
|
|
121
|
+
const clientAbortControllers = client.data.abortControllers;
|
|
122
|
+
let { input } = msg.params;
|
|
123
|
+
const ctx = await client.data.ctx;
|
|
124
|
+
try {
|
|
125
|
+
if (lastEventId !== void 0) {
|
|
126
|
+
if (isObject(input)) {
|
|
127
|
+
input = {
|
|
128
|
+
...input,
|
|
129
|
+
lastEventId
|
|
130
|
+
};
|
|
131
|
+
} else {
|
|
132
|
+
input ??= {
|
|
133
|
+
lastEventId
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (clientAbortControllers.has(id)) {
|
|
138
|
+
throw new import_server.TRPCError({
|
|
139
|
+
message: `Duplicate id ${id}`,
|
|
140
|
+
code: "BAD_REQUEST"
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
const abortController = new AbortController();
|
|
144
|
+
const result = await (0, import_server.callTRPCProcedure)({
|
|
145
|
+
router,
|
|
146
|
+
path,
|
|
147
|
+
getRawInput: () => Promise.resolve(input),
|
|
148
|
+
ctx,
|
|
149
|
+
type,
|
|
150
|
+
signal: abortController.signal
|
|
151
|
+
});
|
|
152
|
+
const isIterableResult = isAsyncIterable(result) || (0, import_observable.isObservable)(result);
|
|
153
|
+
if (type !== "subscription") {
|
|
154
|
+
if (isIterableResult) {
|
|
155
|
+
throw new import_server.TRPCError({
|
|
156
|
+
code: "UNSUPPORTED_MEDIA_TYPE",
|
|
157
|
+
message: `Cannot return an async iterable or observable from a ${type} procedure with WebSockets`
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
respond(client, {
|
|
161
|
+
id,
|
|
162
|
+
jsonrpc,
|
|
163
|
+
result: {
|
|
164
|
+
type: "data",
|
|
165
|
+
data: result
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (!isIterableResult) {
|
|
171
|
+
throw new import_server.TRPCError({
|
|
172
|
+
message: `Subscription ${path} did not return an observable or a AsyncGenerator`,
|
|
173
|
+
code: "INTERNAL_SERVER_ERROR"
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (client.readyState !== WebSocket.OPEN) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
const iterable = (0, import_observable.isObservable)(result) ? (0, import_observable.observableToAsyncIterable)(result, abortController.signal) : result;
|
|
180
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
181
|
+
const abortPromise = new Promise((resolve) => {
|
|
182
|
+
abortController.signal.onabort = () => resolve("abort");
|
|
183
|
+
});
|
|
184
|
+
clientAbortControllers.set(id, abortController);
|
|
185
|
+
run(async () => {
|
|
186
|
+
while (true) {
|
|
187
|
+
const next = await Promise.race([
|
|
188
|
+
iterator.next().catch(import_server.getTRPCErrorFromUnknown),
|
|
189
|
+
abortPromise
|
|
190
|
+
]);
|
|
191
|
+
if (next === "abort") {
|
|
192
|
+
await iterator.return?.();
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
if (next instanceof Error) {
|
|
196
|
+
const error = (0, import_server.getTRPCErrorFromUnknown)(next);
|
|
197
|
+
opts.onError?.({
|
|
198
|
+
error,
|
|
199
|
+
path,
|
|
200
|
+
type,
|
|
201
|
+
ctx,
|
|
202
|
+
req,
|
|
203
|
+
input
|
|
204
|
+
});
|
|
205
|
+
respond(client, {
|
|
206
|
+
id,
|
|
207
|
+
jsonrpc,
|
|
208
|
+
error: (0, import_server.getErrorShape)({
|
|
209
|
+
config: router._def._config,
|
|
210
|
+
error,
|
|
211
|
+
type,
|
|
212
|
+
path,
|
|
213
|
+
input,
|
|
214
|
+
ctx
|
|
215
|
+
})
|
|
216
|
+
});
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
if (next.done) {
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
const result2 = {
|
|
223
|
+
type: "data",
|
|
224
|
+
data: next.value
|
|
225
|
+
};
|
|
226
|
+
if ((0, import_server.isTrackedEnvelope)(next.value)) {
|
|
227
|
+
const [id2, data] = next.value;
|
|
228
|
+
result2.id = id2;
|
|
229
|
+
result2.data = {
|
|
230
|
+
id: id2,
|
|
231
|
+
data
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
respond(client, {
|
|
235
|
+
id,
|
|
236
|
+
jsonrpc,
|
|
237
|
+
result: result2
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
await iterator.return?.();
|
|
241
|
+
respond(client, {
|
|
242
|
+
id,
|
|
243
|
+
jsonrpc,
|
|
244
|
+
result: {
|
|
245
|
+
type: "stopped"
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}).catch((cause) => {
|
|
249
|
+
const error = (0, import_server.getTRPCErrorFromUnknown)(cause);
|
|
250
|
+
opts.onError?.({ error, path, type, ctx, req, input });
|
|
251
|
+
respond(client, {
|
|
252
|
+
id,
|
|
253
|
+
jsonrpc,
|
|
254
|
+
error: (0, import_server.getErrorShape)({
|
|
255
|
+
config: router._def._config,
|
|
256
|
+
error,
|
|
257
|
+
type,
|
|
258
|
+
path,
|
|
259
|
+
input,
|
|
260
|
+
ctx
|
|
261
|
+
})
|
|
262
|
+
});
|
|
263
|
+
abortController.abort();
|
|
264
|
+
}).finally(() => {
|
|
265
|
+
clientAbortControllers.delete(id);
|
|
266
|
+
});
|
|
267
|
+
respond(client, {
|
|
268
|
+
id,
|
|
269
|
+
jsonrpc,
|
|
270
|
+
result: {
|
|
271
|
+
type: "started"
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
} catch (cause) {
|
|
275
|
+
const error = (0, import_server.getTRPCErrorFromUnknown)(cause);
|
|
276
|
+
opts.onError?.({ error, path, type, ctx, req, input });
|
|
277
|
+
respond(client, {
|
|
278
|
+
id,
|
|
279
|
+
jsonrpc,
|
|
280
|
+
error: (0, import_server.getErrorShape)({
|
|
281
|
+
config: router._def._config,
|
|
282
|
+
error,
|
|
283
|
+
type,
|
|
284
|
+
path,
|
|
285
|
+
input,
|
|
286
|
+
ctx
|
|
287
|
+
})
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
open(client) {
|
|
293
|
+
client.data.abortController = new AbortController();
|
|
294
|
+
client.data.abortControllers = /* @__PURE__ */ new Map();
|
|
295
|
+
const url = createURL(client);
|
|
296
|
+
client.data.ctx = createClientCtx.bind(null, client, url);
|
|
297
|
+
const connectionParams = url.searchParams.get("connectionParams") === "1";
|
|
298
|
+
if (!connectionParams) {
|
|
299
|
+
client.data.ctx = client.data.ctx(null);
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
async close(client) {
|
|
303
|
+
client.data.abortController.abort();
|
|
304
|
+
await Promise.all(
|
|
305
|
+
Array.from(
|
|
306
|
+
client.data.abortControllers.values(),
|
|
307
|
+
(ctrl) => ctrl.abort()
|
|
308
|
+
)
|
|
309
|
+
);
|
|
310
|
+
},
|
|
311
|
+
async message(client, message) {
|
|
312
|
+
const msgStr = message.toString();
|
|
313
|
+
if (msgStr === "PONG") {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
if (msgStr === "PING") {
|
|
317
|
+
client.send("PONG");
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
try {
|
|
321
|
+
const msgJSON = JSON.parse(msgStr);
|
|
322
|
+
const msgs = Array.isArray(msgJSON) ? msgJSON : [msgJSON];
|
|
323
|
+
if (client.data.ctx instanceof Function) {
|
|
324
|
+
const msg = msgs.shift();
|
|
325
|
+
client.data.ctx = client.data.ctx(
|
|
326
|
+
(0, import_http.parseConnectionParamsFromUnknown)(msg.data)
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
const promises = [];
|
|
330
|
+
for (const raw of msgs) {
|
|
331
|
+
const msg = (0, import_rpc.parseTRPCMessage)(
|
|
332
|
+
raw,
|
|
333
|
+
router._def._config.transformer
|
|
334
|
+
);
|
|
335
|
+
promises.push(handleRequest(client, msg));
|
|
336
|
+
}
|
|
337
|
+
await Promise.all(promises);
|
|
338
|
+
} catch (cause) {
|
|
339
|
+
const error = new import_server.TRPCError({
|
|
340
|
+
code: "PARSE_ERROR",
|
|
341
|
+
cause
|
|
342
|
+
});
|
|
343
|
+
respond(client, {
|
|
344
|
+
id: null,
|
|
345
|
+
error: (0, import_server.getErrorShape)({
|
|
346
|
+
config: router._def._config,
|
|
347
|
+
error,
|
|
348
|
+
type: "unknown",
|
|
349
|
+
path: void 0,
|
|
350
|
+
input: void 0,
|
|
351
|
+
ctx: void 0
|
|
352
|
+
})
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function isAsyncIterable(value) {
|
|
359
|
+
return isObject(value) && Symbol.asyncIterator in value;
|
|
360
|
+
}
|
|
361
|
+
function run(fn) {
|
|
362
|
+
return fn();
|
|
363
|
+
}
|
|
364
|
+
function isObject(value) {
|
|
365
|
+
return !!value && !Array.isArray(value) && typeof value === "object";
|
|
366
|
+
}
|
|
367
|
+
function createURL(client) {
|
|
368
|
+
try {
|
|
369
|
+
const req = client.data.req;
|
|
370
|
+
const protocol = client && "encrypted" in client && client.encrypted ? "https:" : "http:";
|
|
371
|
+
const host = req.headers.get("host") ?? "localhost";
|
|
372
|
+
return new URL(req.url, `${protocol}//${host}`);
|
|
373
|
+
} catch (cause) {
|
|
374
|
+
throw new import_server.TRPCError({
|
|
375
|
+
code: "BAD_REQUEST",
|
|
376
|
+
message: "Invalid URL",
|
|
377
|
+
cause
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// src/createBunServeHandler.ts
|
|
383
|
+
function createBunServeHandler(opts, serveOptions) {
|
|
384
|
+
const trpcHandler = createBunHttpHandler({
|
|
385
|
+
...opts,
|
|
386
|
+
emitWsUpgrades: true
|
|
387
|
+
});
|
|
388
|
+
return {
|
|
389
|
+
...serveOptions,
|
|
390
|
+
async fetch(req, server) {
|
|
391
|
+
const trpcResponse = trpcHandler(req, server);
|
|
392
|
+
if (trpcResponse) {
|
|
393
|
+
return trpcResponse;
|
|
394
|
+
}
|
|
395
|
+
return serveOptions?.fetch?.call(server, req, server);
|
|
396
|
+
},
|
|
397
|
+
websocket: createBunWSHandler(opts)
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
401
|
+
0 && (module.exports = {
|
|
402
|
+
createBunHttpHandler,
|
|
403
|
+
createBunServeHandler,
|
|
404
|
+
createBunWSHandler
|
|
405
|
+
});
|
|
406
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "trpc-bun-adapter",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "TRPC adapter for bun js runtime",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"src",
|
|
11
|
+
"package.json",
|
|
12
|
+
"LICENSE.txt",
|
|
13
|
+
"README.md",
|
|
14
|
+
"tsconfig.json"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "bun test",
|
|
18
|
+
"lint": "biome check",
|
|
19
|
+
"lint:fix": "biome check --write .",
|
|
20
|
+
"bundle": "npx tsup src/index.ts --format cjs,esm --dts --clean --sourcemap"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"bun",
|
|
24
|
+
"trpc",
|
|
25
|
+
"adapter",
|
|
26
|
+
"websocket"
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"url": "git+https://github.com/cah4a/trpc-bun-adapter.git"
|
|
30
|
+
},
|
|
31
|
+
"bugs": "https://github.com/cah4a/trpc-bun-adapter/issues",
|
|
32
|
+
"author": "Sancha <cah4o3@gmail.com>",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@trpc/server": "11.0.0",
|
|
36
|
+
"bun-types": "^1.1.17",
|
|
37
|
+
"tsup": "^8.0.1",
|
|
38
|
+
"typescript": "^5.5.4",
|
|
39
|
+
"@biomejs/biome": "^1.9.4"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@trpc/server": "^11.0.0"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.
|
|
2
|
-
import { d as defineHeadPlugin } from './shared/unhead.
|
|
3
|
-
export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.
|
|
1
|
+
export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.TxTMM7cM.mjs';
|
|
2
|
+
import { d as defineHeadPlugin } from './shared/unhead.D4vSFytZ.mjs';
|
|
3
|
+
export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.D4vSFytZ.mjs';
|
|
4
4
|
import './shared/unhead.CbpEuj3y.mjs';
|
|
5
5
|
import './shared/unhead.BYvz9V1x.mjs';
|
|
6
6
|
import './shared/unhead.DQc16pHI.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as createUnhead } from './shared/unhead.
|
|
1
|
+
import { a as createUnhead } from './shared/unhead.Ct24BOby.mjs';
|
|
2
2
|
import { T as TagsWithInnerContent, S as SelfClosingTags } from './shared/unhead.yem5I2v_.mjs';
|
|
3
3
|
import { parseHtmlForUnheadExtraction, applyHeadToHtml, parseHtmlForIndexes } from './parser.mjs';
|
|
4
4
|
import 'hookable';
|
|
5
|
-
import './shared/unhead.
|
|
5
|
+
import './shared/unhead.B5FWS6X0.mjs';
|
|
6
6
|
import './shared/unhead.CbpEuj3y.mjs';
|
|
7
7
|
|
|
8
8
|
// @__NO_SIDE_EFFECTS__
|
package/.output/server/node_modules/unhead/dist/shared/{unhead.eK9_7LaY.mjs → unhead.B5FWS6X0.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UniqueTags, T as TagsWithInnerContent, M as MetaTagsArrayable, a as TagConfigKeys, D as DupeableTags } from './unhead.yem5I2v_.mjs';
|
|
1
|
+
import { U as UniqueTags, T as TagsWithInnerContent, M as MetaTagsArrayable, H as HasElementTags, a as TagConfigKeys, D as DupeableTags } from './unhead.yem5I2v_.mjs';
|
|
2
2
|
|
|
3
3
|
const allowedMetaProperties = ["name", "property", "http-equiv"];
|
|
4
4
|
const StandardSingleMetaTags = /* @__PURE__ */ new Set([
|
|
@@ -19,9 +19,11 @@ function dedupeKey(tag) {
|
|
|
19
19
|
return name;
|
|
20
20
|
if (name === "link" && props.rel === "canonical")
|
|
21
21
|
return "canonical";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
if (name === "link" && props.rel === "alternate") {
|
|
23
|
+
const altKey = props.hreflang || props.type;
|
|
24
|
+
if (altKey) {
|
|
25
|
+
return `alternate:${altKey}`;
|
|
26
|
+
}
|
|
25
27
|
}
|
|
26
28
|
if (props.charset)
|
|
27
29
|
return "charset";
|
|
@@ -43,6 +45,9 @@ function dedupeKey(tag) {
|
|
|
43
45
|
if (props.id) {
|
|
44
46
|
return `${name}:id:${props.id}`;
|
|
45
47
|
}
|
|
48
|
+
if (name === "link" && props.rel === "alternate") {
|
|
49
|
+
return `alternate:${props.href || ""}`;
|
|
50
|
+
}
|
|
46
51
|
if (TagsWithInnerContent.has(name)) {
|
|
47
52
|
const v = tag.textContent || tag.innerHTML;
|
|
48
53
|
if (v) {
|
|
@@ -119,17 +124,20 @@ function normalizeProps(tag, input) {
|
|
|
119
124
|
tag.props = input;
|
|
120
125
|
return tag;
|
|
121
126
|
}
|
|
122
|
-
|
|
127
|
+
const isHtmlTag = HasElementTags.has(tag.tag) || tag.tag === "htmlAttrs" || tag.tag === "bodyAttrs";
|
|
128
|
+
Object.entries(input).forEach(([prop, value]) => {
|
|
129
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
|
|
130
|
+
return;
|
|
123
131
|
if (value === null) {
|
|
124
|
-
tag.props[
|
|
132
|
+
tag.props[prop] = null;
|
|
125
133
|
return;
|
|
126
134
|
}
|
|
127
|
-
if (
|
|
128
|
-
tag.props[
|
|
135
|
+
if (prop === "class" || prop === "style") {
|
|
136
|
+
tag.props[prop] = normalizeStyleClassProps(prop, value);
|
|
129
137
|
return;
|
|
130
138
|
}
|
|
131
|
-
if (TagConfigKeys.has(
|
|
132
|
-
if (
|
|
139
|
+
if (TagConfigKeys.has(prop)) {
|
|
140
|
+
if ((prop === "textContent" || prop === "innerHTML") && typeof value === "object") {
|
|
133
141
|
let type = input.type;
|
|
134
142
|
if (!input.type) {
|
|
135
143
|
type = "application/json";
|
|
@@ -139,14 +147,15 @@ function normalizeProps(tag, input) {
|
|
|
139
147
|
}
|
|
140
148
|
input.type = type;
|
|
141
149
|
tag.props.type = type;
|
|
142
|
-
tag[
|
|
150
|
+
tag[prop] = JSON.stringify(value);
|
|
143
151
|
} else {
|
|
144
|
-
tag[
|
|
152
|
+
tag[prop] = value;
|
|
145
153
|
}
|
|
146
154
|
return;
|
|
147
155
|
}
|
|
156
|
+
const isDataKey = prop.startsWith("data-");
|
|
157
|
+
const key = isHtmlTag && !isDataKey ? prop.toLowerCase() : prop;
|
|
148
158
|
const strValue = String(value);
|
|
149
|
-
const isDataKey = key.startsWith("data-");
|
|
150
159
|
const isMetaContentKey = tag.tag === "meta" && key === "content";
|
|
151
160
|
if (strValue === "true" || strValue === "") {
|
|
152
161
|
tag.props[key] = isDataKey || isMetaContentKey ? strValue : true;
|
package/.output/server/node_modules/unhead/dist/shared/{unhead.BFfcxOoW.mjs → unhead.Ct24BOby.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHooks } from 'hookable';
|
|
2
|
-
import { n as normalizeEntryToTags, d as dedupeKey, i as isMetaArrayDupeKey } from './unhead.
|
|
2
|
+
import { n as normalizeEntryToTags, d as dedupeKey, h as hashTag, i as isMetaArrayDupeKey } from './unhead.B5FWS6X0.mjs';
|
|
3
3
|
import { t as tagWeight, s as sortTags } from './unhead.CbpEuj3y.mjs';
|
|
4
4
|
import { c as UsesMergeStrategy, V as ValidHeadTags } from './unhead.yem5I2v_.mjs';
|
|
5
5
|
|
|
@@ -86,13 +86,15 @@ function createUnhead(resolvedOptions = {}) {
|
|
|
86
86
|
t._w = tagWeight(head, t);
|
|
87
87
|
t._p = (e._i << 10) + i2;
|
|
88
88
|
t._d = dedupeKey(t);
|
|
89
|
+
if (!t._d)
|
|
90
|
+
t._h = hashTag(t);
|
|
89
91
|
return t;
|
|
90
92
|
});
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
let hasFlatMeta = false;
|
|
94
96
|
ctx.entries.flatMap((e) => (e._tags || []).map((t) => ({ ...t, props: { ...t.props } }))).sort(sortTags).reduce((acc, next) => {
|
|
95
|
-
const k =
|
|
97
|
+
const k = next._d || next._h;
|
|
96
98
|
if (!acc.has(k))
|
|
97
99
|
return acc.set(k, next);
|
|
98
100
|
const prev = acc.get(k);
|