@nanoforge-dev/editor 0.0.2-beta.580354c → 0.0.2-beta.82a2d26
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/dist/client/_app/immutable/assets/0.B5z3JAkE.css +1 -0
- package/dist/client/_app/immutable/assets/0.B5z3JAkE.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.B5z3JAkE.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BS47D1Yd2.js → BFWbalF82.js} +1 -1
- package/dist/client/_app/immutable/chunks/BFWbalF82.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BFWbalF82.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DT8Ddh1L2.js → BLf9jss52.js} +1 -1
- package/dist/client/_app/immutable/chunks/BLf9jss52.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BLf9jss52.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CKei9xPI2.js → BSNB_Uck2.js} +2 -2
- package/dist/client/_app/immutable/chunks/BSNB_Uck2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BSNB_Uck2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{Fu4roQAh.js → BWNegMLP.js} +1 -1
- package/dist/client/_app/immutable/chunks/BWNegMLP.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BWNegMLP.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{orCHVlgT.js → BesjqVrk.js} +1 -1
- package/dist/client/_app/immutable/chunks/BesjqVrk.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BesjqVrk.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BWDRzheF2.js → Bhafduqk2.js} +1 -1
- package/dist/client/_app/immutable/chunks/Bhafduqk2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bhafduqk2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CObqXk_q.js → Bp3dOgoC.js} +1 -1
- package/dist/client/_app/immutable/chunks/Bp3dOgoC.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bp3dOgoC.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BpNXszev.js +6 -0
- package/dist/client/_app/immutable/chunks/BpNXszev.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BpNXszev.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{v6YHThuS.js → CBb7lP5l.js} +1 -1
- package/dist/client/_app/immutable/chunks/CBb7lP5l.js.br +2 -0
- package/dist/client/_app/immutable/chunks/CBb7lP5l.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CZo4a556.js → CByF3Zfc.js} +1 -1
- package/dist/client/_app/immutable/chunks/CByF3Zfc.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CByF3Zfc.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{uo5fvlDn2.js → CJxKUjL-2.js} +1 -1
- package/dist/client/_app/immutable/chunks/CJxKUjL-2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CJxKUjL-2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DH-ThjiG2.js → CVQMNY_q2.js} +2 -2
- package/dist/client/_app/immutable/chunks/CVQMNY_q2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CVQMNY_q2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{Bk9DeFcz2.js → CbW3yNTi.js} +1 -1
- package/dist/client/_app/immutable/chunks/CbW3yNTi.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CbW3yNTi.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CvkNa2t_.js +3 -0
- package/dist/client/_app/immutable/chunks/CvkNa2t_.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CvkNa2t_.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CnhOha0Z2.js → D2PipAw82.js} +1 -1
- package/dist/client/_app/immutable/chunks/D2PipAw82.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D2PipAw82.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BzGBrbo22.js → D6-zOYYZ2.js} +1 -1
- package/dist/client/_app/immutable/chunks/D6-zOYYZ2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D6-zOYYZ2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{B4w9-fYM2.js → DGDm8Q4w2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DGDm8Q4w2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DGDm8Q4w2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DFXoGGM32.js → DRQF0pcw2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DRQF0pcw2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DRQF0pcw2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DV4appXC.js +1 -0
- package/dist/client/_app/immutable/chunks/DV4appXC.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DV4appXC.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{C83DJP9w2.js → DYPPS7OK2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DYPPS7OK2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DYPPS7OK2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BZqFHUa32.js → DaisyxdZ2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DaisyxdZ2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DaisyxdZ2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BlGyHMDZ.js → DtcTX-YU.js} +1 -1
- package/dist/client/_app/immutable/chunks/DtcTX-YU.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DtcTX-YU.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DHQLzCjY2.js → M5EMNuDS2.js} +1 -1
- package/dist/client/_app/immutable/chunks/M5EMNuDS2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/M5EMNuDS2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DuDzfUqN2.js → SmrQhi1p2.js} +1 -1
- package/dist/client/_app/immutable/chunks/SmrQhi1p2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/SmrQhi1p2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{C7bUlFLk2.js → TFu7Wn2c2.js} +1 -1
- package/dist/client/_app/immutable/chunks/TFu7Wn2c2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/TFu7Wn2c2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BwWAgYKi2.js → mESnenQM2.js} +1 -1
- package/dist/client/_app/immutable/chunks/mESnenQM2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/mESnenQM2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/nE3VUeYj.js +0 -0
- package/dist/client/_app/immutable/chunks/nE3VUeYj.js.br +1 -0
- package/dist/client/_app/immutable/chunks/nE3VUeYj.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{mRVEsFly2.js → uIj7mV9x2.js} +1 -1
- package/dist/client/_app/immutable/chunks/uIj7mV9x2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/uIj7mV9x2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{D1JHNh7-.js → z7c9RqCD.js} +10 -10
- package/dist/client/_app/immutable/chunks/z7c9RqCD.js.br +0 -0
- package/dist/client/_app/immutable/chunks/z7c9RqCD.js.gz +0 -0
- package/dist/client/_app/immutable/entry/{app.B8CjVJ8m.js → app.6QEfz-iq.js} +2 -2
- package/dist/client/_app/immutable/entry/app.6QEfz-iq.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.6QEfz-iq.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.DgVllUEP.js +1 -0
- package/dist/client/_app/immutable/entry/start.DgVllUEP.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.DgVllUEP.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{0.Cc3CiDns.js → 0.DHdCqwIJ.js} +1 -1
- package/dist/client/_app/immutable/nodes/0.DHdCqwIJ.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.DHdCqwIJ.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{1.aoxJA8Qo.js → 1.loL9C4pA.js} +1 -1
- package/dist/client/_app/immutable/nodes/1.loL9C4pA.js.br +3 -0
- package/dist/client/_app/immutable/nodes/1.loL9C4pA.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{10.DTh0Qakp.js → 11.BJRhAisP.js} +1 -1
- package/dist/client/_app/immutable/nodes/11.BJRhAisP.js.br +0 -0
- package/dist/client/_app/immutable/nodes/11.BJRhAisP.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js +1 -0
- package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js +6 -0
- package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js.gz +0 -0
- package/dist/client/_app/version.json +1 -1
- package/dist/client/_app/version.json.br +0 -0
- package/dist/client/_app/version.json.gz +0 -0
- package/dist/server/chunks/{0-BAWoYonx.js → 0-DK13KdVt.js} +6 -6
- package/dist/server/chunks/{0-BAWoYonx.js.map → 0-DK13KdVt.js.map} +1 -1
- package/dist/server/chunks/{1-l2q82N-q.js → 1-DytmaR_G.js} +6 -6
- package/dist/server/chunks/{1-l2q82N-q.js.map → 1-DytmaR_G.js.map} +1 -1
- package/dist/server/chunks/{9-DPn3d8kr.js → 10-zM8H1H7h.js} +5 -5
- package/dist/server/chunks/10-zM8H1H7h.js.map +1 -0
- package/dist/server/chunks/11-DAhp5wFR.js +22 -0
- package/dist/server/chunks/11-DAhp5wFR.js.map +1 -0
- package/dist/server/chunks/{2-BTcCBWEw.js → 2-BdHpeJzA.js} +10 -10
- package/dist/server/chunks/{2-BTcCBWEw.js.map → 2-BdHpeJzA.js.map} +1 -1
- package/dist/server/chunks/{3-B9-EfDcH.js → 3-CFpQUapX.js} +10 -10
- package/dist/server/chunks/{3-B9-EfDcH.js.map → 3-CFpQUapX.js.map} +1 -1
- package/dist/server/chunks/{4-BYQgShv3.js → 4-8BW6Sdb0.js} +23 -9
- package/dist/server/chunks/4-8BW6Sdb0.js.map +1 -0
- package/dist/server/chunks/{5-B4IXyXqv.js → 5-1NMUY_LH.js} +3 -3
- package/dist/server/chunks/{5-B4IXyXqv.js.map → 5-1NMUY_LH.js.map} +1 -1
- package/dist/server/chunks/{6-DH_IMDRv.js → 6-DE-wH6HQ.js} +3 -3
- package/dist/server/chunks/{6-DH_IMDRv.js.map → 6-DE-wH6HQ.js.map} +1 -1
- package/dist/server/chunks/7-B1Qi_1kM.js +18 -0
- package/dist/server/chunks/7-B1Qi_1kM.js.map +1 -0
- package/dist/server/chunks/8-sn6bIqkc.js +91 -0
- package/dist/server/chunks/8-sn6bIqkc.js.map +1 -0
- package/dist/server/chunks/{8-CRTa48Fz.js → 9-UjOK68In.js} +5 -5
- package/dist/server/chunks/{8-CRTa48Fz.js.map → 9-UjOK68In.js.map} +1 -1
- package/dist/server/chunks/{_layout.svelte-uX7XiB9K.js → _layout.svelte-By6MJeec.js} +5 -5
- package/dist/server/chunks/_layout.svelte-By6MJeec.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-B-TY3dq2.js → _page.svelte-B3dvQwz5.js} +7 -7
- package/dist/server/chunks/{_page.svelte-B-TY3dq2.js.map → _page.svelte-B3dvQwz5.js.map} +1 -1
- package/dist/server/chunks/{_page.svelte-1s5jXYk_.js → _page.svelte-DRyjxD6O.js} +243 -97
- package/dist/server/chunks/_page.svelte-DRyjxD6O.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-BHks8xKU.js → _page.svelte-DYpkpTnJ.js} +6 -6
- package/dist/server/chunks/_page.svelte-DYpkpTnJ.js.map +1 -0
- package/dist/server/chunks/_server.ts-C1vgzIkJ.js +13 -0
- package/dist/server/chunks/_server.ts-C1vgzIkJ.js.map +1 -0
- package/dist/server/chunks/{_server.ts-y6LeO9-5.js → _server.ts-Dy1xpkL2.js} +2 -2
- package/dist/server/chunks/{_server.ts-y6LeO9-5.js.map → _server.ts-Dy1xpkL2.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js → _server.ts-Hci5qTfA.js} +2 -2
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js.map → _server.ts-Hci5qTfA.js.map} +1 -1
- package/dist/server/chunks/app-DUeJj5RD.js.map +1 -1
- package/dist/server/chunks/{client-DWDrOrQL.js → client-DBcQyXdV.js} +4 -4
- package/dist/server/chunks/client-DBcQyXdV.js.map +1 -0
- package/dist/server/chunks/{error-cCQrHDre.js → error-dHCCrW4T.js} +301 -147
- package/dist/server/chunks/error-dHCCrW4T.js.map +1 -0
- package/dist/server/chunks/{error.svelte-nsiVeFAJ.js → error.svelte-CAHakCnN.js} +3 -3
- package/dist/server/chunks/error.svelte-CAHakCnN.js.map +1 -0
- package/dist/server/chunks/{exports-CWOtdr_a.js → exports-D0uQzbjy.js} +4 -4
- package/dist/server/chunks/{exports-CWOtdr_a.js.map → exports-D0uQzbjy.js.map} +1 -1
- package/dist/server/chunks/{hooks.server-Cdesln7C.js → hooks.server-BR9nwSH9.js} +6 -6
- package/dist/server/chunks/hooks.server-BR9nwSH9.js.map +1 -0
- package/dist/server/chunks/{hooks.universal-DhGFdBkK.js → hooks.universal-bt2XJEN9.js} +2 -2
- package/dist/server/chunks/{hooks.universal-DhGFdBkK.js.map → hooks.universal-bt2XJEN9.js.map} +1 -1
- package/dist/server/chunks/{events-Bhh2w-5S.js → index-server-BthNUqCR.js} +1006 -1005
- package/dist/server/chunks/index-server-BthNUqCR.js.map +1 -0
- package/dist/server/chunks/{internal-DsA4iYdx.js → internal-vr3mPczx.js} +2 -2
- package/dist/server/chunks/{internal-DsA4iYdx.js.map → internal-vr3mPczx.js.map} +1 -1
- package/dist/server/chunks/{internal2-DF9-voLX.js → internal2-DhEJvRRa.js} +22 -15
- package/dist/server/chunks/internal2-DhEJvRRa.js.map +1 -0
- package/dist/server/chunks/{loader-circle-CFNm9vip.js → loader-circle-C4T0os4K.js} +5 -5
- package/dist/server/chunks/loader-circle-C4T0os4K.js.map +1 -0
- package/dist/server/chunks/{logo-CgSTOPfJ.js → logo-V5iuJCmy.js} +4 -4
- package/dist/server/chunks/logo-V5iuJCmy.js.map +1 -0
- package/dist/server/chunks/{project-loader-DPwVwx5v.js → project-loader-CkPdftFo.js} +4 -4
- package/dist/server/chunks/project-loader-CkPdftFo.js.map +1 -0
- package/dist/server/chunks/{request-handler-guINVc1G.js → request-handler-BVHWtbqx.js} +206 -140
- package/dist/server/chunks/request-handler-BVHWtbqx.js.map +1 -0
- package/dist/server/chunks/{runtime-CDHWD9vo.js → runtime-26c7QsEi.js} +9 -9
- package/dist/server/chunks/runtime-26c7QsEi.js.map +1 -0
- package/dist/server/chunks/{schemas-nSPQog67.js → schemas-l8C4cVM-.js} +348 -303
- package/dist/server/chunks/schemas-l8C4cVM-.js.map +1 -0
- package/dist/server/chunks/{session-DLCjVGKo.js → session-By0bbFhg.js} +2 -2
- package/dist/server/chunks/{session-DLCjVGKo.js.map → session-By0bbFhg.js.map} +1 -1
- package/dist/server/chunks/shared-server-Cha0Qlv9.js.map +1 -1
- package/dist/server/chunks/{state-CuPzwLiF.js → state-D4QqZ0FB.js} +3 -3
- package/dist/server/chunks/state-D4QqZ0FB.js.map +1 -0
- package/dist/server/index.js +368 -353
- package/dist/server/index.js.map +1 -1
- package/dist/server/manifest.js +48 -24
- package/dist/server/manifest.js.map +1 -1
- package/package.json +18 -16
- package/dist/client/_app/immutable/assets/0.BRAq3OL4.css +0 -1
- package/dist/client/_app/immutable/assets/0.BRAq3OL4.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.BRAq3OL4.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/B4w9-fYM2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/B4w9-fYM2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BS47D1Yd2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BS47D1Yd2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BWDRzheF2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BWDRzheF2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BZqFHUa32.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BZqFHUa32.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Bk9DeFcz2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bk9DeFcz2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BlGyHMDZ.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BlGyHMDZ.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Brp9NRGe.js +0 -6
- package/dist/client/_app/immutable/chunks/Brp9NRGe.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Brp9NRGe.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BwWAgYKi2.js.br +0 -3
- package/dist/client/_app/immutable/chunks/BwWAgYKi2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BwpZ7W8G.js +0 -1
- package/dist/client/_app/immutable/chunks/BwpZ7W8G.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BwpZ7W8G.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BzGBrbo22.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BzGBrbo22.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/C7bUlFLk2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C7bUlFLk2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/C83DJP9w2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C83DJP9w2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CKei9xPI2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CKei9xPI2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CObqXk_q.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CObqXk_q.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CZo4a556.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CZo4a556.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CnhOha0Z2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CnhOha0Z2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/D1JHNh7-.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D1JHNh7-.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DFXoGGM32.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DFXoGGM32.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DH-ThjiG2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DH-ThjiG2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DHQLzCjY2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DHQLzCjY2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DT8Ddh1L2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DT8Ddh1L2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DuDzfUqN2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DuDzfUqN2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Fu4roQAh.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Fu4roQAh.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/ZLGReh43.js +0 -3
- package/dist/client/_app/immutable/chunks/ZLGReh43.js.br +0 -0
- package/dist/client/_app/immutable/chunks/ZLGReh43.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/mRVEsFly2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/mRVEsFly2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/orCHVlgT.js.br +0 -0
- package/dist/client/_app/immutable/chunks/orCHVlgT.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/uo5fvlDn2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/uo5fvlDn2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/v6YHThuS.js.br +0 -0
- package/dist/client/_app/immutable/chunks/v6YHThuS.js.gz +0 -0
- package/dist/client/_app/immutable/entry/app.B8CjVJ8m.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.B8CjVJ8m.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.xcie2Yx0.js +0 -1
- package/dist/client/_app/immutable/entry/start.xcie2Yx0.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.xcie2Yx0.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/0.Cc3CiDns.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.Cc3CiDns.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/1.aoxJA8Qo.js.br +0 -3
- package/dist/client/_app/immutable/nodes/1.aoxJA8Qo.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/10.DTh0Qakp.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.DTh0Qakp.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.DggbBWOd.js +0 -1
- package/dist/client/_app/immutable/nodes/2.DggbBWOd.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.DggbBWOd.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js +0 -6
- package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js.gz +0 -0
- package/dist/server/chunks/10-DliMkA_F.js +0 -22
- package/dist/server/chunks/10-DliMkA_F.js.map +0 -1
- package/dist/server/chunks/4-BYQgShv3.js.map +0 -1
- package/dist/server/chunks/7-CPMeoSUO.js +0 -98
- package/dist/server/chunks/7-CPMeoSUO.js.map +0 -1
- package/dist/server/chunks/9-DPn3d8kr.js.map +0 -1
- package/dist/server/chunks/_layout.svelte-uX7XiB9K.js.map +0 -1
- package/dist/server/chunks/_page.svelte-1s5jXYk_.js.map +0 -1
- package/dist/server/chunks/_page.svelte-BHks8xKU.js.map +0 -1
- package/dist/server/chunks/client-DWDrOrQL.js.map +0 -1
- package/dist/server/chunks/error-cCQrHDre.js.map +0 -1
- package/dist/server/chunks/error.svelte-nsiVeFAJ.js.map +0 -1
- package/dist/server/chunks/events-Bhh2w-5S.js.map +0 -1
- package/dist/server/chunks/hooks.server-Cdesln7C.js.map +0 -1
- package/dist/server/chunks/internal2-DF9-voLX.js.map +0 -1
- package/dist/server/chunks/loader-circle-CFNm9vip.js.map +0 -1
- package/dist/server/chunks/logo-CgSTOPfJ.js.map +0 -1
- package/dist/server/chunks/project-loader-DPwVwx5v.js.map +0 -1
- package/dist/server/chunks/request-handler-guINVc1G.js.map +0 -1
- package/dist/server/chunks/runtime-CDHWD9vo.js.map +0 -1
- package/dist/server/chunks/schemas-nSPQog67.js.map +0 -1
- package/dist/server/chunks/state-CuPzwLiF.js.map +0 -1
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js → CVaqCwHa2.js} +0 -0
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.br → CVaqCwHa2.js.br} +0 -0
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.gz → CVaqCwHa2.js.gz} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js → De2hgUGE2.js} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.br → De2hgUGE2.js.br} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.gz → De2hgUGE2.js.gz} +0 -0
- /package/dist/server/chunks/{chunk-D7D4PA-g.js → rolldown-runtime-D7D4PA-g.js} +0 -0
package/dist/server/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __commonJSMin } from "./chunks/chunk-ByNZkrT6.js";
|
|
2
|
-
import {
|
|
3
|
-
import { i as SvelteKitError, n as HttpError, r as Redirect, t as ActionFailure } from "./chunks/internal-
|
|
4
|
-
import { $ as text_encoder, A as with_request_store, B as coalesce_to_error, C as validate_layout_exports, D as merge_tracing, E as validate_page_server_exports, F as override, G as noop, H as get_message, I as reset, J as parse, K as normalize_error, L as INVALIDATED_PARAM, M as assets, N as base, Q as stringify$1, R as TRAILING_SLASH_PARAM, S as strip_resolution_suffix, T as validate_page_exports, U as get_relative_path, V as create_remote_key, W as get_status, X as split_remote_key, Y as parse_remote_arg, Z as stringify, _ as noop_span, a as set_read_implementation, c as compact, d as find_route, g as make_trackable, h as hash, i as set_manifest, j as app_dir, l as decode_pathname, m as has_resolution_suffix, n as options, o as add_data_suffix, p as has_data_suffix, q as once, r as read_implementation, s as add_resolution_suffix, t as get_hooks, u as disable_search, v as normalize_path, w as validate_layout_server_exports, x as strip_data_suffix, y as resolve, z as base64_encode } from "./chunks/internal2-
|
|
5
|
-
import { i as json, o as text, r as isRedirect, t as error } from "./chunks/exports-
|
|
2
|
+
import { J as readable, St as uneval, ut as writable } from "./chunks/index-server-BthNUqCR.js";
|
|
3
|
+
import { i as SvelteKitError, n as HttpError, r as Redirect, t as ActionFailure } from "./chunks/internal-vr3mPczx.js";
|
|
4
|
+
import { $ as text_encoder, A as with_request_store, B as coalesce_to_error, C as validate_layout_exports, D as merge_tracing, E as validate_page_server_exports, F as override, G as noop, H as get_message, I as reset, J as parse, K as normalize_error, L as INVALIDATED_PARAM, M as assets, N as base, Q as stringify$1, R as TRAILING_SLASH_PARAM, S as strip_resolution_suffix, T as validate_page_exports, U as get_relative_path, V as create_remote_key, W as get_status, X as split_remote_key, Y as parse_remote_arg, Z as stringify, _ as noop_span, a as set_read_implementation, c as compact, d as find_route, g as make_trackable, h as hash, i as set_manifest, j as app_dir, l as decode_pathname, m as has_resolution_suffix, n as options, o as add_data_suffix, p as has_data_suffix, q as once, r as read_implementation, s as add_resolution_suffix, t as get_hooks, u as disable_search, v as normalize_path, w as validate_layout_server_exports, x as strip_data_suffix, y as resolve, z as base64_encode } from "./chunks/internal2-DhEJvRRa.js";
|
|
5
|
+
import { i as json, o as text, r as isRedirect, t as error } from "./chunks/exports-D0uQzbjy.js";
|
|
6
6
|
import { i as set_public_env, n as public_env, r as set_private_env } from "./chunks/shared-server-Cha0Qlv9.js";
|
|
7
7
|
import { n as set_app } from "./chunks/app-DUeJj5RD.js";
|
|
8
8
|
//#region .svelte-kit/adapter-bun/chunks/utils.js
|
|
@@ -1890,19 +1890,20 @@ var Csp = class {
|
|
|
1890
1890
|
this.report_only_provider.add_style(content);
|
|
1891
1891
|
}
|
|
1892
1892
|
};
|
|
1893
|
+
/** @import { SSRManifest } from '@sveltejs/kit' */
|
|
1893
1894
|
/**
|
|
1894
1895
|
* @param {import('types').SSRClientRoute} route
|
|
1895
1896
|
* @param {URL} url
|
|
1896
|
-
* @param {
|
|
1897
|
+
* @param {NonNullable<SSRManifest['_']['client']>} client
|
|
1897
1898
|
* @returns {string}
|
|
1898
1899
|
*/
|
|
1899
|
-
function generate_route_object(route, url,
|
|
1900
|
+
function generate_route_object(route, url, client) {
|
|
1900
1901
|
const { errors, layouts, leaf } = route;
|
|
1901
1902
|
const nodes = [
|
|
1902
1903
|
...errors,
|
|
1903
1904
|
...layouts.map((l) => l?.[1]),
|
|
1904
1905
|
leaf[1]
|
|
1905
|
-
].filter((n) => typeof n === "number").map((n) => `'${n}': () => ${create_client_import(
|
|
1906
|
+
].filter((n) => typeof n === "number").map((n) => `'${n}': () => ${create_client_import(client.nodes?.[n], url)}`).join(",\n ");
|
|
1906
1907
|
/** @type {import('types').CSRRouteServer} */
|
|
1907
1908
|
return [
|
|
1908
1909
|
`{\n\tid: ${s(route.id)}`,
|
|
@@ -1927,27 +1928,27 @@ function create_client_import(import_path, url) {
|
|
|
1927
1928
|
/**
|
|
1928
1929
|
* @param {string} resolved_path
|
|
1929
1930
|
* @param {URL} url
|
|
1930
|
-
* @param {
|
|
1931
|
+
* @param {SSRManifest} manifest
|
|
1931
1932
|
* @returns {Promise<Response>}
|
|
1932
1933
|
*/
|
|
1933
1934
|
async function resolve_route(resolved_path, url, manifest) {
|
|
1934
|
-
if (!manifest._.client
|
|
1935
|
+
if (!manifest._.client?.routes) return text("Server-side route resolution disabled", { status: 400 });
|
|
1935
1936
|
const matchers = await manifest._.matchers();
|
|
1936
1937
|
const result = find_route(resolved_path, manifest._.client.routes, matchers);
|
|
1937
|
-
return create_server_routing_response(result?.route ?? null, result?.params ?? {}, url, manifest).response;
|
|
1938
|
+
return create_server_routing_response(result?.route ?? null, result?.params ?? {}, url, manifest._.client).response;
|
|
1938
1939
|
}
|
|
1939
1940
|
/**
|
|
1940
1941
|
* @param {import('types').SSRClientRoute | null} route
|
|
1941
1942
|
* @param {Partial<Record<string, string>>} params
|
|
1942
1943
|
* @param {URL} url
|
|
1943
|
-
* @param {
|
|
1944
|
+
* @param {NonNullable<SSRManifest['_']['client']>} client
|
|
1944
1945
|
* @returns {{response: Response, body: string}}
|
|
1945
1946
|
*/
|
|
1946
|
-
function create_server_routing_response(route, params, url,
|
|
1947
|
+
function create_server_routing_response(route, params, url, client) {
|
|
1947
1948
|
const headers = new Headers({ "content-type": "application/javascript; charset=utf-8" });
|
|
1948
1949
|
if (route) {
|
|
1949
|
-
const csr_route = generate_route_object(route, url,
|
|
1950
|
-
const body = `${create_css_import(route, url,
|
|
1950
|
+
const csr_route = generate_route_object(route, url, client);
|
|
1951
|
+
const body = `${create_css_import(route, url, client)}\nexport const route = ${csr_route}; export const params = ${JSON.stringify(params)};`;
|
|
1951
1952
|
return {
|
|
1952
1953
|
response: text(body, { headers }),
|
|
1953
1954
|
body
|
|
@@ -1965,10 +1966,10 @@ function create_server_routing_response(route, params, url, manifest) {
|
|
|
1965
1966
|
*
|
|
1966
1967
|
* @param {import('types').SSRClientRoute} route
|
|
1967
1968
|
* @param {URL} url
|
|
1968
|
-
* @param {
|
|
1969
|
+
* @param {NonNullable<SSRManifest['_']['client']>} client
|
|
1969
1970
|
* @returns {string}
|
|
1970
1971
|
*/
|
|
1971
|
-
function create_css_import(route, url,
|
|
1972
|
+
function create_css_import(route, url, client) {
|
|
1972
1973
|
const { errors, layouts, leaf } = route;
|
|
1973
1974
|
let css = "";
|
|
1974
1975
|
for (const node of [
|
|
@@ -1977,11 +1978,339 @@ function create_css_import(route, url, manifest) {
|
|
|
1977
1978
|
leaf[1]
|
|
1978
1979
|
]) {
|
|
1979
1980
|
if (typeof node !== "number") continue;
|
|
1980
|
-
const node_css =
|
|
1981
|
+
const node_css = client.css?.[node];
|
|
1981
1982
|
for (const css_path of node_css ?? []) css += `'${assets || base}/${css_path}',`;
|
|
1982
1983
|
}
|
|
1983
1984
|
if (!css) return "";
|
|
1984
|
-
return `${create_client_import(
|
|
1985
|
+
return `${create_client_import(client.start, url)}.then(x => x.load_css([${css}]));`;
|
|
1986
|
+
}
|
|
1987
|
+
/** @import { ActionResult, RemoteForm, RequestEvent, SSRManifest } from '@sveltejs/kit' */
|
|
1988
|
+
/** @import { RemoteFormInternals, RemoteFunctionData, RemoteFunctionResponse, RemoteInternals, RequestState, SSROptions } from 'types' */
|
|
1989
|
+
/** @type {typeof handle_remote_call_internal} */
|
|
1990
|
+
async function handle_remote_call(event, state, options, manifest, id) {
|
|
1991
|
+
return record_span({
|
|
1992
|
+
name: "sveltekit.remote.call",
|
|
1993
|
+
attributes: { "sveltekit.remote.call.id": id },
|
|
1994
|
+
fn: (current) => {
|
|
1995
|
+
const traced_event = merge_tracing(event, current);
|
|
1996
|
+
return with_request_store({
|
|
1997
|
+
event: traced_event,
|
|
1998
|
+
state
|
|
1999
|
+
}, () => handle_remote_call_internal(traced_event, state, options, manifest, id));
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
/**
|
|
2004
|
+
* @param {RequestEvent} event
|
|
2005
|
+
* @param {RequestState} state
|
|
2006
|
+
* @param {SSROptions} options
|
|
2007
|
+
* @param {SSRManifest} manifest
|
|
2008
|
+
* @param {string} id
|
|
2009
|
+
*/
|
|
2010
|
+
async function handle_remote_call_internal(event, state, options, manifest, id) {
|
|
2011
|
+
const [hash, name, additional_args] = id.split("/");
|
|
2012
|
+
const remotes = manifest._.remotes;
|
|
2013
|
+
if (!remotes[hash]) error(404);
|
|
2014
|
+
const fn = (await remotes[hash]()).default[name];
|
|
2015
|
+
if (!fn) error(404);
|
|
2016
|
+
/** @type {RemoteInternals} */
|
|
2017
|
+
const internals = fn.__;
|
|
2018
|
+
const transport = options.hooks.transport;
|
|
2019
|
+
event.tracing.current.setAttributes({
|
|
2020
|
+
"sveltekit.remote.call.type": internals.type,
|
|
2021
|
+
"sveltekit.remote.call.name": internals.name
|
|
2022
|
+
});
|
|
2023
|
+
try {
|
|
2024
|
+
/** @type {RemoteFunctionData} */
|
|
2025
|
+
const data = {};
|
|
2026
|
+
switch (internals.type) {
|
|
2027
|
+
case "query_live": {
|
|
2028
|
+
if (event.request.method !== "GET") throw new SvelteKitError(405, "Method Not Allowed", `\`query.live\` functions must be invoked via GET request, not ${event.request.method}`);
|
|
2029
|
+
const payload = new URL(event.request.url).searchParams.get("payload");
|
|
2030
|
+
const generator = internals.run(event, state, parse_remote_arg(payload, transport));
|
|
2031
|
+
const encoder = new TextEncoder();
|
|
2032
|
+
/**
|
|
2033
|
+
* @param {ReadableStreamDefaultController} controller
|
|
2034
|
+
* @param {any} payload
|
|
2035
|
+
*/
|
|
2036
|
+
function send(controller, payload) {
|
|
2037
|
+
controller.enqueue(encoder.encode("data: " + JSON.stringify(payload) + "\n\n"));
|
|
2038
|
+
}
|
|
2039
|
+
let closed = false;
|
|
2040
|
+
/** @type {string | undefined} */
|
|
2041
|
+
let result = void 0;
|
|
2042
|
+
async function cancel() {
|
|
2043
|
+
if (closed) return;
|
|
2044
|
+
closed = true;
|
|
2045
|
+
await generator.return(void 0);
|
|
2046
|
+
}
|
|
2047
|
+
event.request.signal.addEventListener("abort", cancel, { once: true });
|
|
2048
|
+
return new Response(new ReadableStream({
|
|
2049
|
+
async pull(controller) {
|
|
2050
|
+
if (event.request.signal.aborted) {
|
|
2051
|
+
await cancel();
|
|
2052
|
+
controller.close();
|
|
2053
|
+
return;
|
|
2054
|
+
}
|
|
2055
|
+
try {
|
|
2056
|
+
while (true) {
|
|
2057
|
+
const { value, done } = await generator.next();
|
|
2058
|
+
if (done) {
|
|
2059
|
+
await cancel();
|
|
2060
|
+
controller.close();
|
|
2061
|
+
return;
|
|
2062
|
+
}
|
|
2063
|
+
if (result !== (result = stringify(value, transport))) {
|
|
2064
|
+
send(controller, {
|
|
2065
|
+
type: "result",
|
|
2066
|
+
result
|
|
2067
|
+
});
|
|
2068
|
+
return;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
} catch (error) {
|
|
2072
|
+
if (!event.request.signal.aborted) if (error instanceof Redirect) send(controller, {
|
|
2073
|
+
type: "redirect",
|
|
2074
|
+
location: error.location
|
|
2075
|
+
});
|
|
2076
|
+
else {
|
|
2077
|
+
const status = error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
|
|
2078
|
+
send(controller, {
|
|
2079
|
+
type: "error",
|
|
2080
|
+
error: await handle_error_and_jsonify(event, state, options, error),
|
|
2081
|
+
status
|
|
2082
|
+
});
|
|
2083
|
+
}
|
|
2084
|
+
await cancel();
|
|
2085
|
+
controller.close();
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
cancel
|
|
2089
|
+
}), { headers: {
|
|
2090
|
+
"cache-control": "private, no-store",
|
|
2091
|
+
"content-type": "text/event-stream"
|
|
2092
|
+
} });
|
|
2093
|
+
}
|
|
2094
|
+
case "query_batch": {
|
|
2095
|
+
if (event.request.method !== "POST") throw new SvelteKitError(405, "Method Not Allowed", `\`query.batch\` functions must be invoked via POST request, not ${event.request.method}`);
|
|
2096
|
+
/** @type {{ payloads: string[] }} */
|
|
2097
|
+
const { payloads } = await event.request.json();
|
|
2098
|
+
const args = await Promise.all(payloads.map((payload) => parse_remote_arg(payload, transport)));
|
|
2099
|
+
data._ = await with_request_store({
|
|
2100
|
+
event,
|
|
2101
|
+
state
|
|
2102
|
+
}, () => internals.run(args, options));
|
|
2103
|
+
break;
|
|
2104
|
+
}
|
|
2105
|
+
case "form": {
|
|
2106
|
+
if (event.request.method !== "POST") throw new SvelteKitError(405, "Method Not Allowed", `\`form\` functions must be invoked via POST request, not ${event.request.method}`);
|
|
2107
|
+
if (!is_form_content_type(event.request)) throw new SvelteKitError(415, "Unsupported Media Type", `\`form\` functions expect form-encoded data — received ${event.request.headers.get("content-type")}`);
|
|
2108
|
+
const { data: input, meta, form_data } = await deserialize_binary_form(event.request);
|
|
2109
|
+
state.remote.requested = create_requested_map(meta.remote_refreshes);
|
|
2110
|
+
if (additional_args && !("id" in input)) input.id = JSON.parse(decodeURIComponent(additional_args));
|
|
2111
|
+
const fn = internals.fn;
|
|
2112
|
+
data._ = await with_request_store({
|
|
2113
|
+
event,
|
|
2114
|
+
state: {
|
|
2115
|
+
...state,
|
|
2116
|
+
is_in_remote_form_or_command: true
|
|
2117
|
+
}
|
|
2118
|
+
}, () => fn(input, meta, form_data));
|
|
2119
|
+
if (data._.issues) return json({
|
|
2120
|
+
type: "result",
|
|
2121
|
+
data: stringify(data, transport)
|
|
2122
|
+
});
|
|
2123
|
+
break;
|
|
2124
|
+
}
|
|
2125
|
+
case "command": {
|
|
2126
|
+
/** @type {{ payload: string, refreshes?: string[] }} */
|
|
2127
|
+
const { payload, refreshes } = await event.request.json();
|
|
2128
|
+
state.remote.requested = create_requested_map(refreshes);
|
|
2129
|
+
const arg = parse_remote_arg(payload, transport);
|
|
2130
|
+
data._ = await with_request_store({
|
|
2131
|
+
event,
|
|
2132
|
+
state: {
|
|
2133
|
+
...state,
|
|
2134
|
+
is_in_remote_form_or_command: true
|
|
2135
|
+
}
|
|
2136
|
+
}, () => fn(arg));
|
|
2137
|
+
break;
|
|
2138
|
+
}
|
|
2139
|
+
case "prerender":
|
|
2140
|
+
data._ = await with_request_store({
|
|
2141
|
+
event,
|
|
2142
|
+
state
|
|
2143
|
+
}, () => fn(parse_remote_arg(additional_args, transport)));
|
|
2144
|
+
break;
|
|
2145
|
+
case "query": {
|
|
2146
|
+
const payload = new URL(event.request.url).searchParams.get("payload");
|
|
2147
|
+
data._ = await with_request_store({
|
|
2148
|
+
event,
|
|
2149
|
+
state
|
|
2150
|
+
}, () => fn(parse_remote_arg(payload, transport)));
|
|
2151
|
+
break;
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
await collect_remote_data(data, event, state, options);
|
|
2155
|
+
return json({
|
|
2156
|
+
type: "result",
|
|
2157
|
+
data: stringify(data, transport)
|
|
2158
|
+
});
|
|
2159
|
+
} catch (error) {
|
|
2160
|
+
if (error instanceof Redirect) return json({
|
|
2161
|
+
type: "result",
|
|
2162
|
+
data: stringify(await collect_remote_data({ redirect: error.location }, event, state, options), transport)
|
|
2163
|
+
});
|
|
2164
|
+
const status = error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
|
|
2165
|
+
return json({
|
|
2166
|
+
type: "error",
|
|
2167
|
+
error: await handle_error_and_jsonify(event, state, options, error),
|
|
2168
|
+
status
|
|
2169
|
+
}, {
|
|
2170
|
+
status: state.prerendering ? status : void 0,
|
|
2171
|
+
headers: { "cache-control": "private, no-store" }
|
|
2172
|
+
});
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
/**
|
|
2176
|
+
* Collects all the query/prerender data that was retrieved
|
|
2177
|
+
* during the request and adds it to `data`
|
|
2178
|
+
* @param {RemoteFunctionData} data
|
|
2179
|
+
* @param {RequestEvent} event
|
|
2180
|
+
* @param {RequestState} state
|
|
2181
|
+
* @param {SSROptions} options
|
|
2182
|
+
*/
|
|
2183
|
+
async function collect_remote_data(data, event, state, options) {
|
|
2184
|
+
/**
|
|
2185
|
+
*
|
|
2186
|
+
* @param {unknown} error
|
|
2187
|
+
* @returns {Promise<[status: number, error: App.Error]>}
|
|
2188
|
+
*/
|
|
2189
|
+
async function convert_error(error) {
|
|
2190
|
+
return [error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500, await handle_error_and_jsonify(event, state, options, error)];
|
|
2191
|
+
}
|
|
2192
|
+
/** @type {Promise<any>[]} */
|
|
2193
|
+
const promises = [];
|
|
2194
|
+
if (state.remote.explicit) for (const [remote_key, { internals, promise }] of state.remote.explicit) {
|
|
2195
|
+
data.r = true;
|
|
2196
|
+
const type = internals.type === "query_live" ? "l" : internals.type[0];
|
|
2197
|
+
await promise.then((v) => {
|
|
2198
|
+
((data[type] ??= {})[remote_key] ??= {}).v = v;
|
|
2199
|
+
}, async (e) => {
|
|
2200
|
+
if (e instanceof Redirect) return;
|
|
2201
|
+
((data[type] ??= {})[remote_key] ??= {}).e = await convert_error(e);
|
|
2202
|
+
});
|
|
2203
|
+
}
|
|
2204
|
+
await Promise.all(promises);
|
|
2205
|
+
if (state.remote.implicit) for (const [internals, record] of state.remote.implicit) {
|
|
2206
|
+
if (!internals.id) continue;
|
|
2207
|
+
for (const key in record) {
|
|
2208
|
+
const remote_key = internals.type === "form" ? key : create_remote_key(internals.id, key);
|
|
2209
|
+
const type = internals.type === "query_live" ? "l" : internals.type[0];
|
|
2210
|
+
const promise = state.remote.data?.get(internals)?.[key] ?? record[key]();
|
|
2211
|
+
let resolved = true;
|
|
2212
|
+
await Promise.race([Promise.resolve(promise).then((v) => {
|
|
2213
|
+
if (resolved) ((data[type] ??= {})[remote_key] ??= {}).v = v;
|
|
2214
|
+
}, (e) => {
|
|
2215
|
+
if (e instanceof Redirect) return;
|
|
2216
|
+
if (resolved) promises.push(convert_error(e).then((e) => {
|
|
2217
|
+
((data[type] ??= {})[remote_key] ??= {}).e = e;
|
|
2218
|
+
}));
|
|
2219
|
+
}), Promise.resolve().then(() => resolved = false)]);
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
await Promise.all(promises);
|
|
2223
|
+
return data;
|
|
2224
|
+
}
|
|
2225
|
+
/**
|
|
2226
|
+
* @param {string[] | undefined} refreshes
|
|
2227
|
+
*/
|
|
2228
|
+
function create_requested_map(refreshes) {
|
|
2229
|
+
/** @type {Map<string, string[]>} */
|
|
2230
|
+
const requested = /* @__PURE__ */ new Map();
|
|
2231
|
+
for (const key of refreshes ?? []) {
|
|
2232
|
+
const parts = split_remote_key(key);
|
|
2233
|
+
const existing = requested.get(parts.id);
|
|
2234
|
+
if (existing) existing.push(parts.payload);
|
|
2235
|
+
else requested.set(parts.id, [parts.payload]);
|
|
2236
|
+
}
|
|
2237
|
+
return requested;
|
|
2238
|
+
}
|
|
2239
|
+
/** @type {typeof handle_remote_form_post_internal} */
|
|
2240
|
+
async function handle_remote_form_post(event, state, manifest, id) {
|
|
2241
|
+
return record_span({
|
|
2242
|
+
name: "sveltekit.remote.form.post",
|
|
2243
|
+
attributes: { "sveltekit.remote.form.post.id": id },
|
|
2244
|
+
fn: (current) => {
|
|
2245
|
+
const traced_event = merge_tracing(event, current);
|
|
2246
|
+
return with_request_store({
|
|
2247
|
+
event: traced_event,
|
|
2248
|
+
state
|
|
2249
|
+
}, () => handle_remote_form_post_internal(traced_event, state, manifest, id));
|
|
2250
|
+
}
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
2253
|
+
/**
|
|
2254
|
+
* @param {RequestEvent} event
|
|
2255
|
+
* @param {RequestState} state
|
|
2256
|
+
* @param {SSRManifest} manifest
|
|
2257
|
+
* @param {string} id
|
|
2258
|
+
* @returns {Promise<ActionResult>}
|
|
2259
|
+
*/
|
|
2260
|
+
async function handle_remote_form_post_internal(event, state, manifest, id) {
|
|
2261
|
+
const [hash, name, ...rest] = id.split("/");
|
|
2262
|
+
const action_id = rest.join("/");
|
|
2263
|
+
let form = (await manifest._.remotes[hash]?.())?.default[name];
|
|
2264
|
+
if (!form) {
|
|
2265
|
+
event.setHeaders({ allow: "GET" });
|
|
2266
|
+
return {
|
|
2267
|
+
type: "error",
|
|
2268
|
+
error: new SvelteKitError(405, "Method Not Allowed", `POST method not allowed. No form actions exist for this page`)
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
if (action_id) form = with_request_store({
|
|
2272
|
+
event,
|
|
2273
|
+
state
|
|
2274
|
+
}, () => form.for(JSON.parse(action_id)));
|
|
2275
|
+
try {
|
|
2276
|
+
const fn = form.__.fn;
|
|
2277
|
+
const { data, meta, form_data } = await deserialize_binary_form(event.request);
|
|
2278
|
+
if (action_id && !("id" in data)) data.id = JSON.parse(decodeURIComponent(action_id));
|
|
2279
|
+
await with_request_store({
|
|
2280
|
+
event,
|
|
2281
|
+
state: {
|
|
2282
|
+
...state,
|
|
2283
|
+
is_in_remote_form_or_command: true
|
|
2284
|
+
}
|
|
2285
|
+
}, () => fn(data, meta, form_data));
|
|
2286
|
+
return {
|
|
2287
|
+
type: "success",
|
|
2288
|
+
status: 200
|
|
2289
|
+
};
|
|
2290
|
+
} catch (e) {
|
|
2291
|
+
const err = normalize_error(e);
|
|
2292
|
+
if (err instanceof Redirect) return {
|
|
2293
|
+
type: "redirect",
|
|
2294
|
+
status: err.status,
|
|
2295
|
+
location: err.location
|
|
2296
|
+
};
|
|
2297
|
+
return {
|
|
2298
|
+
type: "error",
|
|
2299
|
+
error: check_incorrect_fail_use(err)
|
|
2300
|
+
};
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
/**
|
|
2304
|
+
* @param {URL} url
|
|
2305
|
+
*/
|
|
2306
|
+
function get_remote_id(url) {
|
|
2307
|
+
return url.pathname.startsWith(`${base}/_app/remote/`) && url.pathname.replace(`${base}/_app/remote/`, "");
|
|
2308
|
+
}
|
|
2309
|
+
/**
|
|
2310
|
+
* @param {URL} url
|
|
2311
|
+
*/
|
|
2312
|
+
function get_remote_action(url) {
|
|
2313
|
+
return url.searchParams.get("/remote");
|
|
1985
2314
|
}
|
|
1986
2315
|
var updated = {
|
|
1987
2316
|
...readable(false),
|
|
@@ -2012,9 +2341,9 @@ async function render_response({ branch, fetched, options, manifest, state, page
|
|
|
2012
2341
|
if (options.app_template_contains_nonce) throw new Error("Cannot use prerendering if page template contains %sveltekit.nonce%");
|
|
2013
2342
|
}
|
|
2014
2343
|
const { client } = manifest._;
|
|
2015
|
-
const modulepreloads = new Set(client
|
|
2016
|
-
const stylesheets = new Set(client
|
|
2017
|
-
const fonts = new Set(client
|
|
2344
|
+
const modulepreloads = new Set(client?.imports);
|
|
2345
|
+
const stylesheets = new Set(client?.stylesheets);
|
|
2346
|
+
const fonts = new Set(client?.fonts);
|
|
2018
2347
|
/**
|
|
2019
2348
|
* The value of the Link header that is added to the response when not prerendering
|
|
2020
2349
|
* @type {Set<string>}
|
|
@@ -2128,7 +2457,7 @@ async function render_response({ branch, fetched, options, manifest, state, page
|
|
|
2128
2457
|
for (const url of node.imports) modulepreloads.add(url);
|
|
2129
2458
|
for (const url of node.stylesheets) stylesheets.add(url);
|
|
2130
2459
|
for (const url of node.fonts) fonts.add(url);
|
|
2131
|
-
if (node.inline_styles && !client
|
|
2460
|
+
if (node.inline_styles && !client?.inline) Object.entries(await node.inline_styles()).forEach(([filename, css]) => {
|
|
2132
2461
|
if (typeof css === "string") {
|
|
2133
2462
|
inline_styles.set(filename, css);
|
|
2134
2463
|
return;
|
|
@@ -2143,7 +2472,7 @@ async function render_response({ branch, fetched, options, manifest, state, page
|
|
|
2143
2472
|
if (path.startsWith("/")) return base + path;
|
|
2144
2473
|
return `${assets$1}/${path}`;
|
|
2145
2474
|
};
|
|
2146
|
-
const style = client
|
|
2475
|
+
const style = client?.inline ? client.inline?.style : Array.from(inline_styles.values()).join("\n");
|
|
2147
2476
|
if (style) {
|
|
2148
2477
|
const attributes = [];
|
|
2149
2478
|
if (csp.style_needs_nonce) attributes.push(`nonce="${csp.nonce}"`);
|
|
@@ -2179,8 +2508,8 @@ async function render_response({ branch, fetched, options, manifest, state, page
|
|
|
2179
2508
|
const global = get_global_name(options);
|
|
2180
2509
|
const { data, chunks } = data_serializer.get_data(csp);
|
|
2181
2510
|
if (page_config.ssr && page_config.csr) body += `\n\t\t\t${fetched.map((item) => serialize_data(item, resolve_opts.filterSerializedResponseHeaders, !!state.prerendering)).join("\n ")}`;
|
|
2182
|
-
if (page_config.csr) {
|
|
2183
|
-
const route =
|
|
2511
|
+
if (page_config.csr && client) {
|
|
2512
|
+
const route = client.routes?.find((r) => r.id === event.route.id) ?? null;
|
|
2184
2513
|
if (client.uses_env_dynamic_public && state.prerendering) modulepreloads.add(`${app_dir}/env.js`);
|
|
2185
2514
|
if (!client.inline) {
|
|
2186
2515
|
const included_modulepreloads = Array.from(modulepreloads, (dep) => prefixed(dep)).filter((path) => resolve_opts.preload({
|
|
@@ -2193,9 +2522,9 @@ async function render_response({ branch, fetched, options, manifest, state, page
|
|
|
2193
2522
|
else head.add_link_tag(path, ["rel=\"modulepreload\""]);
|
|
2194
2523
|
}
|
|
2195
2524
|
}
|
|
2196
|
-
if (
|
|
2525
|
+
if (client.routes && state.prerendering && !state.prerendering.fallback) {
|
|
2197
2526
|
const pathname = add_resolution_suffix(event.url.pathname);
|
|
2198
|
-
state.prerendering.dependencies.set(pathname, create_server_routing_response(route, event.params, new URL(pathname, event.url),
|
|
2527
|
+
state.prerendering.dependencies.set(pathname, create_server_routing_response(route, event.params, new URL(pathname, event.url), client));
|
|
2199
2528
|
}
|
|
2200
2529
|
const blocks = [];
|
|
2201
2530
|
const load_env_eagerly = client.uses_env_dynamic_public && state.prerendering;
|
|
@@ -2248,62 +2577,26 @@ async function render_response({ branch, fetched, options, manifest, state, page
|
|
|
2248
2577
|
`error: ${serialized.error}`
|
|
2249
2578
|
];
|
|
2250
2579
|
if (status !== 200) hydrate.push(`status: ${status}`);
|
|
2251
|
-
if (
|
|
2580
|
+
if (client.routes) {
|
|
2252
2581
|
if (route) {
|
|
2253
|
-
const stringified = generate_route_object(route, event.url,
|
|
2582
|
+
const stringified = generate_route_object(route, event.url, client).replaceAll("\n", "\n ");
|
|
2254
2583
|
hydrate.push(`params: ${uneval(event.params)}`, `server_route: ${stringified}`);
|
|
2255
2584
|
}
|
|
2256
2585
|
} else if (options.embedded) hydrate.push(`params: ${uneval(event.params)}`, `route: ${s(event.route)}`);
|
|
2257
2586
|
const indent = " ".repeat(load_env_eagerly ? 7 : 6);
|
|
2258
2587
|
args.push(`{\n${indent}\t${hydrate.join(`,\n${indent}\t`)}\n${indent}}`);
|
|
2259
2588
|
}
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2262
|
-
let serialized_prerender_data = "";
|
|
2263
|
-
if (remote.data) {
|
|
2264
|
-
/** @type {Record<string, any>} */
|
|
2265
|
-
const query = {};
|
|
2266
|
-
/** @type {Record<string, any>} */
|
|
2267
|
-
const prerender = {};
|
|
2268
|
-
for (const [internals, cache] of remote.data) {
|
|
2269
|
-
if (!internals.id) continue;
|
|
2270
|
-
for (const key in cache) {
|
|
2271
|
-
const entry = cache[key];
|
|
2272
|
-
if (!entry.serialize) continue;
|
|
2273
|
-
const remote_key = create_remote_key(internals.id, key);
|
|
2274
|
-
const store = internals.type === "prerender" ? prerender : query;
|
|
2275
|
-
if (event_state.remote.refreshes?.has(remote_key) || event_state.remote.reconnects?.has(remote_key)) store[remote_key] = await entry.data;
|
|
2276
|
-
else {
|
|
2277
|
-
const result = await Promise.race([Promise.resolve(entry.data).then((v) => ({
|
|
2278
|
-
settled: true,
|
|
2279
|
-
value: v
|
|
2280
|
-
}), (e) => ({
|
|
2281
|
-
settled: true,
|
|
2282
|
-
error: e
|
|
2283
|
-
})), new Promise((resolve) => {
|
|
2284
|
-
queueMicrotask(() => resolve({ settled: false }));
|
|
2285
|
-
})]);
|
|
2286
|
-
if (result.settled) {
|
|
2287
|
-
if ("error" in result) throw result.error;
|
|
2288
|
-
store[remote_key] = result.value;
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
const replacer = create_replacer(options.hooks.transport);
|
|
2294
|
-
if (Object.keys(query).length > 0) serialized_query_data = `${global}.query = ${uneval(query, replacer)};\n\n\t\t\t\t\t\t`;
|
|
2295
|
-
if (Object.keys(prerender).length > 0) serialized_prerender_data = `${global}.prerender = ${uneval(prerender, replacer)};\n\n\t\t\t\t\t\t`;
|
|
2296
|
-
}
|
|
2297
|
-
const serialized_remote_data = `${serialized_query_data}${serialized_prerender_data}`;
|
|
2589
|
+
const remote_data = await collect_remote_data({}, event, event_state, options);
|
|
2590
|
+
const serialized_data = Object.keys(remote_data).length > 0 ? `${global}.data = ${uneval(remote_data, create_replacer(options.hooks.transport))};\n\n\t\t\t\t\t\t` : "";
|
|
2298
2591
|
const boot = client.inline ? `${client.inline.script}
|
|
2299
2592
|
|
|
2300
|
-
${
|
|
2593
|
+
${serialized_data}${global}.app.start(${args.join(", ")});` : client.app ? `Promise.all([
|
|
2301
2594
|
import(${s(prefixed(client.start))}),
|
|
2302
2595
|
import(${s(prefixed(client.app))})
|
|
2303
2596
|
]).then(([kit, app]) => {
|
|
2304
|
-
${
|
|
2597
|
+
${serialized_data}kit.start(app, ${args.join(", ")});
|
|
2305
2598
|
});` : `import(${s(prefixed(client.start))}).then((app) => {
|
|
2306
|
-
${
|
|
2599
|
+
${serialized_data}app.start(${args.join(", ")})
|
|
2307
2600
|
});`;
|
|
2308
2601
|
if (load_env_eagerly) blocks.push(`import(${s(`${base$1}/${app_dir}/env.js`)}).then(({ env }) => {
|
|
2309
2602
|
${global}.env = env;
|
|
@@ -2328,6 +2621,7 @@ async function render_response({ branch, fetched, options, manifest, state, page
|
|
|
2328
2621
|
}
|
|
2329
2622
|
const init_app = `
|
|
2330
2623
|
{
|
|
2624
|
+
|
|
2331
2625
|
${blocks.join("\n\n ")}
|
|
2332
2626
|
}
|
|
2333
2627
|
`;
|
|
@@ -2588,287 +2882,6 @@ async function respond_with_error({ event, event_state, options, manifest, state
|
|
|
2588
2882
|
return static_error_page(options, get_status(e), (await handle_error_and_jsonify(event, event_state, options, e)).message);
|
|
2589
2883
|
}
|
|
2590
2884
|
}
|
|
2591
|
-
/** @import { ActionResult, RemoteForm, RequestEvent, SSRManifest } from '@sveltejs/kit' */
|
|
2592
|
-
/** @import { RemoteFormInternals, RemoteFunctionResponse, RemoteInternals, RequestState, SSROptions } from 'types' */
|
|
2593
|
-
/** @type {typeof handle_remote_call_internal} */
|
|
2594
|
-
async function handle_remote_call(event, state, options, manifest, id) {
|
|
2595
|
-
return record_span({
|
|
2596
|
-
name: "sveltekit.remote.call",
|
|
2597
|
-
attributes: { "sveltekit.remote.call.id": id },
|
|
2598
|
-
fn: (current) => {
|
|
2599
|
-
const traced_event = merge_tracing(event, current);
|
|
2600
|
-
return with_request_store({
|
|
2601
|
-
event: traced_event,
|
|
2602
|
-
state
|
|
2603
|
-
}, () => handle_remote_call_internal(traced_event, state, options, manifest, id));
|
|
2604
|
-
}
|
|
2605
|
-
});
|
|
2606
|
-
}
|
|
2607
|
-
/**
|
|
2608
|
-
* @param {RequestEvent} event
|
|
2609
|
-
* @param {RequestState} state
|
|
2610
|
-
* @param {SSROptions} options
|
|
2611
|
-
* @param {SSRManifest} manifest
|
|
2612
|
-
* @param {string} id
|
|
2613
|
-
*/
|
|
2614
|
-
async function handle_remote_call_internal(event, state, options, manifest, id) {
|
|
2615
|
-
const [hash, name, additional_args] = id.split("/");
|
|
2616
|
-
const remotes = manifest._.remotes;
|
|
2617
|
-
if (!remotes[hash]) error(404);
|
|
2618
|
-
const fn = (await remotes[hash]()).default[name];
|
|
2619
|
-
if (!fn) error(404);
|
|
2620
|
-
/** @type {RemoteInternals} */
|
|
2621
|
-
const internals = fn.__;
|
|
2622
|
-
const transport = options.hooks.transport;
|
|
2623
|
-
event.tracing.current.setAttributes({
|
|
2624
|
-
"sveltekit.remote.call.type": internals.type,
|
|
2625
|
-
"sveltekit.remote.call.name": internals.name
|
|
2626
|
-
});
|
|
2627
|
-
try {
|
|
2628
|
-
if (internals.type === "query_batch") {
|
|
2629
|
-
if (event.request.method !== "POST") throw new SvelteKitError(405, "Method Not Allowed", `\`query.batch\` functions must be invoked via POST request, not ${event.request.method}`);
|
|
2630
|
-
/** @type {{ payloads: string[] }} */
|
|
2631
|
-
const { payloads } = await event.request.json();
|
|
2632
|
-
const args = await Promise.all(payloads.map((payload) => parse_remote_arg(payload, transport)));
|
|
2633
|
-
return json({
|
|
2634
|
-
type: "result",
|
|
2635
|
-
result: stringify(await with_request_store({
|
|
2636
|
-
event,
|
|
2637
|
-
state
|
|
2638
|
-
}, () => internals.run(args, options)), transport)
|
|
2639
|
-
});
|
|
2640
|
-
}
|
|
2641
|
-
if (internals.type === "form") {
|
|
2642
|
-
if (event.request.method !== "POST") throw new SvelteKitError(405, "Method Not Allowed", `\`form\` functions must be invoked via POST request, not ${event.request.method}`);
|
|
2643
|
-
if (!is_form_content_type(event.request)) throw new SvelteKitError(415, "Unsupported Media Type", `\`form\` functions expect form-encoded data — received ${event.request.headers.get("content-type")}`);
|
|
2644
|
-
const { data, meta, form_data } = await deserialize_binary_form(event.request);
|
|
2645
|
-
state.remote.requested = create_requested_map(meta.remote_refreshes);
|
|
2646
|
-
if (additional_args && !("id" in data)) data.id = JSON.parse(decodeURIComponent(additional_args));
|
|
2647
|
-
const fn = internals.fn;
|
|
2648
|
-
const result = await with_request_store({
|
|
2649
|
-
event,
|
|
2650
|
-
state
|
|
2651
|
-
}, () => fn(data, meta, form_data));
|
|
2652
|
-
return json({
|
|
2653
|
-
type: "result",
|
|
2654
|
-
result: stringify(result, transport),
|
|
2655
|
-
refreshes: result.issues ? void 0 : await serialize_singleflight(state.remote.refreshes),
|
|
2656
|
-
reconnects: result.issues ? void 0 : await serialize_singleflight(state.remote.reconnects)
|
|
2657
|
-
});
|
|
2658
|
-
}
|
|
2659
|
-
if (internals.type === "command") {
|
|
2660
|
-
/** @type {{ payload: string, refreshes?: string[] }} */
|
|
2661
|
-
const { payload, refreshes } = await event.request.json();
|
|
2662
|
-
state.remote.requested = create_requested_map(refreshes);
|
|
2663
|
-
const arg = parse_remote_arg(payload, transport);
|
|
2664
|
-
return json({
|
|
2665
|
-
type: "result",
|
|
2666
|
-
result: stringify(await with_request_store({
|
|
2667
|
-
event,
|
|
2668
|
-
state
|
|
2669
|
-
}, () => fn(arg)), transport),
|
|
2670
|
-
refreshes: await serialize_singleflight(state.remote.refreshes),
|
|
2671
|
-
reconnects: await serialize_singleflight(state.remote.reconnects)
|
|
2672
|
-
});
|
|
2673
|
-
}
|
|
2674
|
-
if (internals.type === "query_live") {
|
|
2675
|
-
if (event.request.method !== "GET") throw new SvelteKitError(405, "Method Not Allowed", `\`query.live\` functions must be invoked via GET request, not ${event.request.method}`);
|
|
2676
|
-
const payload = new URL(event.request.url).searchParams.get("payload");
|
|
2677
|
-
const generator = internals.run(event, state, parse_remote_arg(payload, transport));
|
|
2678
|
-
const encoder = new TextEncoder();
|
|
2679
|
-
/**
|
|
2680
|
-
* @param {ReadableStreamDefaultController} controller
|
|
2681
|
-
* @param {any} payload
|
|
2682
|
-
*/
|
|
2683
|
-
function send(controller, payload) {
|
|
2684
|
-
controller.enqueue(encoder.encode(JSON.stringify(payload) + "\n"));
|
|
2685
|
-
}
|
|
2686
|
-
let closed = false;
|
|
2687
|
-
/** @type {string | undefined} */
|
|
2688
|
-
let result = void 0;
|
|
2689
|
-
async function cancel() {
|
|
2690
|
-
if (closed) return;
|
|
2691
|
-
closed = true;
|
|
2692
|
-
await generator.return(void 0);
|
|
2693
|
-
}
|
|
2694
|
-
event.request.signal.addEventListener("abort", cancel, { once: true });
|
|
2695
|
-
return new Response(new ReadableStream({
|
|
2696
|
-
async pull(controller) {
|
|
2697
|
-
if (event.request.signal.aborted) {
|
|
2698
|
-
await cancel();
|
|
2699
|
-
controller.close();
|
|
2700
|
-
return;
|
|
2701
|
-
}
|
|
2702
|
-
try {
|
|
2703
|
-
while (true) {
|
|
2704
|
-
const { value, done } = await generator.next();
|
|
2705
|
-
if (done) {
|
|
2706
|
-
await cancel();
|
|
2707
|
-
controller.close();
|
|
2708
|
-
return;
|
|
2709
|
-
}
|
|
2710
|
-
if (result !== (result = stringify(value, transport))) {
|
|
2711
|
-
send(controller, {
|
|
2712
|
-
type: "result",
|
|
2713
|
-
result
|
|
2714
|
-
});
|
|
2715
|
-
return;
|
|
2716
|
-
}
|
|
2717
|
-
}
|
|
2718
|
-
} catch (error) {
|
|
2719
|
-
if (!event.request.signal.aborted) if (error instanceof Redirect) send(controller, {
|
|
2720
|
-
type: "redirect",
|
|
2721
|
-
location: error.location
|
|
2722
|
-
});
|
|
2723
|
-
else {
|
|
2724
|
-
const status = error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
|
|
2725
|
-
send(controller, {
|
|
2726
|
-
type: "error",
|
|
2727
|
-
error: await handle_error_and_jsonify(event, state, options, error),
|
|
2728
|
-
status
|
|
2729
|
-
});
|
|
2730
|
-
}
|
|
2731
|
-
await cancel();
|
|
2732
|
-
controller.close();
|
|
2733
|
-
}
|
|
2734
|
-
},
|
|
2735
|
-
cancel
|
|
2736
|
-
}), { headers: {
|
|
2737
|
-
"cache-control": "private, no-store",
|
|
2738
|
-
"content-type": "application/x-ndjson"
|
|
2739
|
-
} });
|
|
2740
|
-
}
|
|
2741
|
-
const payload = internals.type === "prerender" ? additional_args : new URL(event.request.url).searchParams.get("payload");
|
|
2742
|
-
return json({
|
|
2743
|
-
type: "result",
|
|
2744
|
-
result: stringify(await with_request_store({
|
|
2745
|
-
event,
|
|
2746
|
-
state
|
|
2747
|
-
}, () => fn(parse_remote_arg(payload, transport))), transport)
|
|
2748
|
-
});
|
|
2749
|
-
} catch (error) {
|
|
2750
|
-
if (error instanceof Redirect) return json({
|
|
2751
|
-
type: "redirect",
|
|
2752
|
-
location: error.location,
|
|
2753
|
-
refreshes: await serialize_singleflight(state.remote.refreshes),
|
|
2754
|
-
reconnects: await serialize_singleflight(state.remote.reconnects)
|
|
2755
|
-
});
|
|
2756
|
-
const status = error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
|
|
2757
|
-
return json({
|
|
2758
|
-
type: "error",
|
|
2759
|
-
error: await handle_error_and_jsonify(event, state, options, error),
|
|
2760
|
-
status
|
|
2761
|
-
}, {
|
|
2762
|
-
status: state.prerendering ? status : void 0,
|
|
2763
|
-
headers: { "cache-control": "private, no-store" }
|
|
2764
|
-
});
|
|
2765
|
-
}
|
|
2766
|
-
/** @param {Map<string, Promise<any>> | null} map */
|
|
2767
|
-
async function serialize_singleflight(map) {
|
|
2768
|
-
if (!map || map.size === 0) return;
|
|
2769
|
-
const results = await Promise.all(Array.from(map, async ([key, promise]) => {
|
|
2770
|
-
try {
|
|
2771
|
-
return [key, {
|
|
2772
|
-
type: "result",
|
|
2773
|
-
data: await promise
|
|
2774
|
-
}];
|
|
2775
|
-
} catch (error) {
|
|
2776
|
-
return [key, {
|
|
2777
|
-
type: "error",
|
|
2778
|
-
status: error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500,
|
|
2779
|
-
error: await handle_error_and_jsonify(event, state, options, error)
|
|
2780
|
-
}];
|
|
2781
|
-
}
|
|
2782
|
-
}));
|
|
2783
|
-
return stringify(Object.fromEntries(results), transport);
|
|
2784
|
-
}
|
|
2785
|
-
}
|
|
2786
|
-
/**
|
|
2787
|
-
* @param {string[] | undefined} refreshes
|
|
2788
|
-
*/
|
|
2789
|
-
function create_requested_map(refreshes) {
|
|
2790
|
-
/** @type {Map<string, string[]>} */
|
|
2791
|
-
const requested = /* @__PURE__ */ new Map();
|
|
2792
|
-
for (const key of refreshes ?? []) {
|
|
2793
|
-
const parts = split_remote_key(key);
|
|
2794
|
-
const existing = requested.get(parts.id);
|
|
2795
|
-
if (existing) existing.push(parts.payload);
|
|
2796
|
-
else requested.set(parts.id, [parts.payload]);
|
|
2797
|
-
}
|
|
2798
|
-
return requested;
|
|
2799
|
-
}
|
|
2800
|
-
/** @type {typeof handle_remote_form_post_internal} */
|
|
2801
|
-
async function handle_remote_form_post(event, state, manifest, id) {
|
|
2802
|
-
return record_span({
|
|
2803
|
-
name: "sveltekit.remote.form.post",
|
|
2804
|
-
attributes: { "sveltekit.remote.form.post.id": id },
|
|
2805
|
-
fn: (current) => {
|
|
2806
|
-
const traced_event = merge_tracing(event, current);
|
|
2807
|
-
return with_request_store({
|
|
2808
|
-
event: traced_event,
|
|
2809
|
-
state
|
|
2810
|
-
}, () => handle_remote_form_post_internal(traced_event, state, manifest, id));
|
|
2811
|
-
}
|
|
2812
|
-
});
|
|
2813
|
-
}
|
|
2814
|
-
/**
|
|
2815
|
-
* @param {RequestEvent} event
|
|
2816
|
-
* @param {RequestState} state
|
|
2817
|
-
* @param {SSRManifest} manifest
|
|
2818
|
-
* @param {string} id
|
|
2819
|
-
* @returns {Promise<ActionResult>}
|
|
2820
|
-
*/
|
|
2821
|
-
async function handle_remote_form_post_internal(event, state, manifest, id) {
|
|
2822
|
-
const [hash, name, action_id] = id.split("/");
|
|
2823
|
-
let form = (await manifest._.remotes[hash]?.())?.default[name];
|
|
2824
|
-
if (!form) {
|
|
2825
|
-
event.setHeaders({ allow: "GET" });
|
|
2826
|
-
return {
|
|
2827
|
-
type: "error",
|
|
2828
|
-
error: new SvelteKitError(405, "Method Not Allowed", `POST method not allowed. No form actions exist for this page`)
|
|
2829
|
-
};
|
|
2830
|
-
}
|
|
2831
|
-
if (action_id) form = with_request_store({
|
|
2832
|
-
event,
|
|
2833
|
-
state
|
|
2834
|
-
}, () => form.for(JSON.parse(action_id)));
|
|
2835
|
-
try {
|
|
2836
|
-
const fn = form.__.fn;
|
|
2837
|
-
const { data, meta, form_data } = await deserialize_binary_form(event.request);
|
|
2838
|
-
if (action_id && !("id" in data)) data.id = JSON.parse(decodeURIComponent(action_id));
|
|
2839
|
-
await with_request_store({
|
|
2840
|
-
event,
|
|
2841
|
-
state
|
|
2842
|
-
}, () => fn(data, meta, form_data));
|
|
2843
|
-
return {
|
|
2844
|
-
type: "success",
|
|
2845
|
-
status: 200
|
|
2846
|
-
};
|
|
2847
|
-
} catch (e) {
|
|
2848
|
-
const err = normalize_error(e);
|
|
2849
|
-
if (err instanceof Redirect) return {
|
|
2850
|
-
type: "redirect",
|
|
2851
|
-
status: err.status,
|
|
2852
|
-
location: err.location
|
|
2853
|
-
};
|
|
2854
|
-
return {
|
|
2855
|
-
type: "error",
|
|
2856
|
-
error: check_incorrect_fail_use(err)
|
|
2857
|
-
};
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
/**
|
|
2861
|
-
* @param {URL} url
|
|
2862
|
-
*/
|
|
2863
|
-
function get_remote_id(url) {
|
|
2864
|
-
return url.pathname.startsWith(`${base}/_app/remote/`) && url.pathname.replace(`${base}/_app/remote/`, "");
|
|
2865
|
-
}
|
|
2866
|
-
/**
|
|
2867
|
-
* @param {URL} url
|
|
2868
|
-
*/
|
|
2869
|
-
function get_remote_action(url) {
|
|
2870
|
-
return url.searchParams.get("/remote");
|
|
2871
|
-
}
|
|
2872
2885
|
/** @import { ActionResult, RequestEvent, SSRManifest } from '@sveltejs/kit' */
|
|
2873
2886
|
/** @import { PageNodeIndexes, RequestState, RequiredResolveOptions, ServerDataNode, SSRComponent, SSRNode, SSROptions, SSRState } from 'types' */
|
|
2874
2887
|
/**
|
|
@@ -3840,14 +3853,16 @@ async function internal_respond(request, options, manifest, state) {
|
|
|
3840
3853
|
tracing: { record_span },
|
|
3841
3854
|
remote: {
|
|
3842
3855
|
data: null,
|
|
3856
|
+
explicit: null,
|
|
3857
|
+
implicit: null,
|
|
3843
3858
|
forms: null,
|
|
3844
|
-
refreshes: null,
|
|
3845
3859
|
requested: null,
|
|
3846
|
-
reconnects: null,
|
|
3847
3860
|
batches: null,
|
|
3848
3861
|
live_iterators: null
|
|
3849
3862
|
},
|
|
3850
3863
|
is_in_remote_function: false,
|
|
3864
|
+
is_in_remote_form_or_command: false,
|
|
3865
|
+
is_in_remote_query: false,
|
|
3851
3866
|
is_in_render: false,
|
|
3852
3867
|
is_in_universal_load: false
|
|
3853
3868
|
};
|