@farm.js/core 0.1.69 → 0.1.70
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/{agent-mcp-handler-FER4MQDF.cjs → agent-mcp-handler-6T2Z7TB6.cjs} +8 -5
- package/dist/{agent-mcp-handler-AZ7QW4UP.mjs → agent-mcp-handler-CPU354QQ.mjs} +7 -4
- package/dist/{agent-mcp.d-DOfBMEzP.d.mts → agent-mcp.d-DulgFLBt.d.ts} +13 -4
- package/dist/{agent-mcp.d-DnIgriX1.d.ts → agent-mcp.d-TAs1ES2F.d.mts} +13 -4
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +3 -2
- package/dist/agent-runtime.d.ts +3 -2
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-GUIRJWZH.cjs +16 -0
- package/dist/{analyzer-NAL5TJUP.mjs → analyzer-QGRBLETM.mjs} +2 -2
- package/dist/api/node.d.mts +5 -4
- package/dist/api/node.d.ts +5 -4
- package/dist/api/route-manager.cjs +4 -4
- package/dist/api/route-manager.d.mts +16 -7
- package/dist/api/route-manager.d.ts +16 -7
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.d.mts +4 -3
- package/dist/api/runtime.d.ts +4 -3
- package/dist/api.cjs +6 -6
- package/dist/api.d.mts +8 -7
- package/dist/api.d.ts +8 -7
- package/dist/api.mjs +5 -5
- package/dist/{app-manifest.d-_BVbI0xp.d.mts → app-manifest.d-6zXb90o6.d.mts} +1 -1
- package/dist/{app-manifest.d-CaAcaukR.d.ts → app-manifest.d-C-nf3Vmm.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -4
- package/dist/app-markdown.d.mts +4 -3
- package/dist/app-markdown.d.ts +4 -3
- package/dist/app-markdown.mjs +4 -3
- package/dist/{app.d-BWeDqOaF.d.ts → app.d-C2xeMIYT.d.ts} +18 -8
- package/dist/{app.d-CaPwtytN.d.mts → app.d-DF0aundc.d.mts} +18 -8
- package/dist/{base-path.d-CTDVF0Fc.d.mts → base-path.d-BJ3SYpB8.d.mts} +6 -1
- package/dist/{base-path.d-CTDVF0Fc.d.ts → base-path.d-BJ3SYpB8.d.ts} +6 -1
- package/dist/{chunk-4ZXKYCYK.mjs → chunk-255J7K4X.mjs} +1 -1
- package/dist/{chunk-RVGLYMJM.cjs → chunk-2AM26UGI.cjs} +2 -2
- package/dist/{chunk-UPOYKX4S.cjs → chunk-2MR4MABG.cjs} +4 -4
- package/dist/chunk-2RCCFB2Y.cjs +129 -0
- package/dist/{chunk-K6VFYFOY.cjs → chunk-2W4GNXGX.cjs} +2 -2
- package/dist/{chunk-F6YLXK5L.cjs → chunk-32SYRIQ7.cjs} +18 -18
- package/dist/{chunk-CV6MFQ4Y.mjs → chunk-3AUINHFG.mjs} +1 -1
- package/dist/{chunk-ZYCEEE3V.mjs → chunk-3EXCZJEN.mjs} +2 -2
- package/dist/{chunk-MMDKYJ5V.cjs → chunk-3GNVIYPO.cjs} +7 -7
- package/dist/{chunk-65Y5SIBH.cjs → chunk-3QM74STY.cjs} +1 -1
- package/dist/{chunk-SZORL7EW.mjs → chunk-3WS5AZ3R.mjs} +5 -5
- package/dist/{chunk-FJMC24KG.cjs → chunk-42KMUIWZ.cjs} +0 -3
- package/dist/{chunk-LR4KP3I7.cjs → chunk-4AC4PXZO.cjs} +2 -2
- package/dist/{chunk-YVPX5PI5.mjs → chunk-4O26BPUY.mjs} +8 -0
- package/dist/{chunk-LENKRGBV.mjs → chunk-5CFHQ7HM.mjs} +1 -1
- package/dist/{chunk-G7NBPP7H.mjs → chunk-5IJRJWJS.mjs} +1 -1
- package/dist/{chunk-MV7NWU23.mjs → chunk-5R3JQPWD.mjs} +1 -1
- package/dist/{chunk-3Y52TWYU.mjs → chunk-62ZRA7XU.mjs} +0 -3
- package/dist/{chunk-ABIBASLJ.cjs → chunk-65FPDDT4.cjs} +2 -2
- package/dist/{chunk-K6SXMVXO.mjs → chunk-75E5FDX2.mjs} +22 -7
- package/dist/{chunk-K76CBYQM.mjs → chunk-7A3URI2F.mjs} +20 -0
- package/dist/{chunk-ZR2QB45W.mjs → chunk-A2TH5MKE.mjs} +4 -4
- package/dist/{chunk-L5OZN6YW.cjs → chunk-A7HCBHMC.cjs} +3 -3
- package/dist/{chunk-VX2HZGC7.cjs → chunk-ACGBXN3U.cjs} +2 -2
- package/dist/{chunk-TKYOJ5G2.cjs → chunk-BPUVDCGG.cjs} +5 -5
- package/dist/{chunk-FT6KJHS3.cjs → chunk-C2JOS77Z.cjs} +4 -1
- package/dist/{chunk-UHU4QALN.mjs → chunk-CCHJWJGP.mjs} +177 -102
- package/dist/{chunk-CRVSYDHV.mjs → chunk-CKQAQFF6.mjs} +2 -2
- package/dist/chunk-DC2AXGNZ.mjs +129 -0
- package/dist/{chunk-4W4ZWSV2.cjs → chunk-DIHBWZDZ.cjs} +391 -335
- package/dist/{chunk-Q4HH5Q6A.cjs → chunk-DMXMIE2C.cjs} +2 -2
- package/dist/{chunk-23VJEGKC.cjs → chunk-DVJM55D2.cjs} +9 -1
- package/dist/{chunk-QSUYB3RH.cjs → chunk-DZHTNSQ5.cjs} +14 -14
- package/dist/{chunk-OIOPQ25L.mjs → chunk-E77IA5IF.mjs} +46 -33
- package/dist/{chunk-PEYDQMSA.mjs → chunk-EDZU7YRK.mjs} +5 -5
- package/dist/{chunk-EZTKXD6P.cjs → chunk-FDGYDQGL.cjs} +8 -1
- package/dist/{chunk-PLJKJJ2H.mjs → chunk-FETMUBIA.mjs} +27 -82
- package/dist/{chunk-HJZZSBVK.cjs → chunk-FILXOEWD.cjs} +2 -2
- package/dist/{chunk-L6NWQ3DR.cjs → chunk-FJ5YCERM.cjs} +375 -300
- package/dist/{chunk-PDFFYZAT.cjs → chunk-GF22VGMS.cjs} +2 -2
- package/dist/{chunk-OOJBBHYW.cjs → chunk-GVYZCJZH.cjs} +30 -1
- package/dist/{chunk-5TOWKGV3.mjs → chunk-HAXFV2CD.mjs} +1 -1
- package/dist/{chunk-YOHHL2UE.mjs → chunk-I4KPA2C6.mjs} +1 -1
- package/dist/{chunk-4JRAMCUP.cjs → chunk-I7NUT24Z.cjs} +22 -22
- package/dist/{chunk-VO65MYJD.cjs → chunk-IEN2EFE5.cjs} +4 -4
- package/dist/{chunk-NVOMQLI2.mjs → chunk-IWJONXPF.mjs} +11 -0
- package/dist/{chunk-RLH5AH2M.mjs → chunk-JDO346NV.mjs} +1 -1
- package/dist/{chunk-PDQ6EGPK.mjs → chunk-JFVT5ZZV.mjs} +2 -2
- package/dist/{chunk-ULMXZYOA.mjs → chunk-JRF2SKCD.mjs} +1 -1
- package/dist/{chunk-YIHRZBD7.cjs → chunk-JRGR5Z4K.cjs} +1 -1
- package/dist/{chunk-UKZ6AWKZ.cjs → chunk-JWY66PID.cjs} +44 -1
- package/dist/{chunk-BDYM2TN3.cjs → chunk-JX5VOLAV.cjs} +8 -8
- package/dist/{chunk-WMLSZAKN.mjs → chunk-JZQS3ZOI.mjs} +1 -1
- package/dist/{chunk-GQ6QOH7T.cjs → chunk-K4UGCUXX.cjs} +12 -12
- package/dist/{chunk-OFBLGH6V.cjs → chunk-K66JILV3.cjs} +47 -34
- package/dist/{chunk-QOGIZKSO.cjs → chunk-K7JMTAFH.cjs} +5 -5
- package/dist/{chunk-IFR74W6S.mjs → chunk-KPJYBSHL.mjs} +4 -1
- package/dist/{chunk-CKCKCUYO.mjs → chunk-KPMLDT3B.mjs} +146 -90
- package/dist/{chunk-KI3MU7B5.mjs → chunk-LDVJIBGN.mjs} +1 -1
- package/dist/{chunk-GUMKIQJL.cjs → chunk-LECZ5DPZ.cjs} +2 -2
- package/dist/{chunk-5FBZJJGA.mjs → chunk-LXEJNWF5.mjs} +2 -2
- package/dist/{chunk-DHR2WDSL.cjs → chunk-M6U6E4F7.cjs} +335 -285
- package/dist/{chunk-AKIQ54FK.cjs → chunk-MBCRWU3P.cjs} +26 -81
- package/dist/{chunk-P2NBQ5JI.mjs → chunk-MWUDEYBI.mjs} +1 -1
- package/dist/{chunk-22LGTSBA.cjs → chunk-MZLJFNMH.cjs} +1 -1
- package/dist/{chunk-MAGFDK4Q.mjs → chunk-N62IYXYD.mjs} +1 -1
- package/dist/{chunk-ZPKJPM7K.mjs → chunk-NA77GEIU.mjs} +2 -2
- package/dist/{chunk-FVYBEMOD.cjs → chunk-NAXKOTPP.cjs} +6 -6
- package/dist/{chunk-I7J5RLGO.cjs → chunk-NLBHLPEO.cjs} +12 -1
- package/dist/{chunk-3EEINK7G.cjs → chunk-NSZY3EWG.cjs} +10 -7
- package/dist/{chunk-ANMIR6US.mjs → chunk-NYF7A4UW.mjs} +1 -1
- package/dist/{chunk-QO43L7Z4.cjs → chunk-O32QPFVV.cjs} +25 -7
- package/dist/{chunk-CO6UYM2D.mjs → chunk-O5QUJEWT.mjs} +1 -1
- package/dist/{chunk-JL2YW5KX.mjs → chunk-OAEDVXVE.mjs} +44 -1
- package/dist/{chunk-GTQOEEE7.cjs → chunk-Q5HMVGR5.cjs} +13 -13
- package/dist/{chunk-5NFQ6AZI.cjs → chunk-QEWWKYDL.cjs} +25 -10
- package/dist/{chunk-QOSDWGKT.mjs → chunk-QVBXTSIZ.mjs} +1 -1
- package/dist/{chunk-2P7UYHZP.mjs → chunk-QZHTDVH4.mjs} +1 -1
- package/dist/{chunk-HEJM46HQ.mjs → chunk-R7254L3R.mjs} +5 -2
- package/dist/{chunk-OGVTUGMU.mjs → chunk-REP6HWJN.mjs} +13 -3
- package/dist/{chunk-IYLZZTP6.mjs → chunk-RMOU3PR4.mjs} +112 -62
- package/dist/{chunk-WYL4ODZ4.mjs → chunk-SE7HPBYK.mjs} +30 -1
- package/dist/{chunk-D5F7RPZP.mjs → chunk-THG2TVDH.mjs} +3 -3
- package/dist/{chunk-TEJ67GD2.mjs → chunk-TLSSIYAL.mjs} +20 -5
- package/dist/{chunk-DWLNLU55.cjs → chunk-TPYAYFMF.cjs} +2 -2
- package/dist/{chunk-Y6KHPJDB.cjs → chunk-U7VH3Q5E.cjs} +2 -2
- package/dist/{chunk-X3MHKLCO.cjs → chunk-VG6HYT5K.cjs} +26 -11
- package/dist/{chunk-437QZIC2.cjs → chunk-VNBDN5W2.cjs} +5 -5
- package/dist/{chunk-AJNBTOVQ.mjs → chunk-WW3LRNQV.mjs} +1 -1
- package/dist/{chunk-GFPS7MNE.mjs → chunk-WX63N6C5.mjs} +4 -4
- package/dist/{chunk-6GQJVY4E.cjs → chunk-XYVPTTUT.cjs} +13 -13
- package/dist/{chunk-VOQ7XZZT.cjs → chunk-Y2SZVIVH.cjs} +20 -0
- package/dist/{chunk-XCAQTCGK.mjs → chunk-YBY34UHB.mjs} +1 -1
- package/dist/{chunk-YGJ5P3TJ.mjs → chunk-Z3GPAFIA.mjs} +21 -3
- package/dist/{chunk-4E57QHPW.cjs → chunk-ZUVAGMQ5.cjs} +17 -7
- package/dist/{chunk-23LVFSID.mjs → chunk-ZXDX7VYZ.mjs} +7 -0
- package/dist/{client-component.d-CnEeVvGG.d.mts → client-component.d-Bk5qKJM-.d.mts} +2 -2
- package/dist/{client-component.d-CfJxuXZl.d.ts → client-component.d-DNbC4oWI.d.ts} +2 -2
- package/dist/{client-plugins.d-D7dHV1Nf.d.ts → client-plugins.d-DwUqh4gp.d.ts} +36 -3
- package/dist/{client-plugins.d-Do5ULA0x.d.mts → client-plugins.d-Pi9nG0W0.d.mts} +36 -3
- package/dist/client-plugins.d.mts +3 -2
- package/dist/client-plugins.d.ts +3 -2
- package/dist/client.cjs +6 -6
- package/dist/client.d.mts +8 -7
- package/dist/client.d.ts +8 -7
- package/dist/client.mjs +5 -5
- package/dist/config.d.mts +3 -2
- package/dist/config.d.ts +3 -2
- package/dist/deployment.cjs +4 -2
- package/dist/deployment.d.mts +7 -1
- package/dist/deployment.d.ts +7 -1
- package/dist/deployment.mjs +5 -3
- package/dist/desktop.d.mts +4 -3
- package/dist/desktop.d.ts +4 -3
- package/dist/{dev-guard-ONNMVQUN.mjs → dev-guard-ZDIELV6Q.mjs} +1 -1
- package/dist/{dev-guard-2UW2KERP.cjs → dev-guard-ZLLKVO5T.cjs} +2 -2
- package/dist/{devtools-BP4EBTKQ.mjs → devtools-CB43AHEP.mjs} +8 -7
- package/dist/{devtools-7HNDS4SY.cjs → devtools-L5DUNDF3.cjs} +9 -8
- package/dist/docs.cjs +12 -11
- package/dist/docs.d.mts +4 -3
- package/dist/docs.d.ts +4 -3
- package/dist/docs.mjs +11 -10
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/headers.d-CE6OWB-n.d.ts +18 -0
- package/dist/headers.d-DED1hHh4.d.mts +18 -0
- package/dist/i18n/client.cjs +2 -2
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +1 -1
- package/dist/i18n/index.cjs +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +1 -1
- package/dist/i18n/server.cjs +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +2 -2
- package/dist/index.cjs +46 -43
- package/dist/{index.d-B1MpEJAo.d.mts → index.d-CbvOjJcp.d.mts} +1 -1
- package/dist/{index.d-CVFk37uX.d.ts → index.d-c9UwIqDy.d.ts} +1 -1
- package/dist/index.d.mts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.mjs +59 -56
- package/dist/integrations/orm.d.mts +3 -2
- package/dist/integrations/orm.d.ts +3 -2
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +3 -2
- package/dist/integrations.d.ts +3 -2
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +4 -3
- package/dist/internal/app-markdown-runtime.d.mts +4 -3
- package/dist/internal/app-markdown-runtime.d.ts +4 -3
- package/dist/internal/app-markdown-runtime.mjs +3 -2
- package/dist/internal/build-runtime.cjs +35 -35
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +34 -34
- package/dist/internal/cli-runtime.cjs +15 -14
- package/dist/internal/cli-runtime.mjs +14 -13
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +5 -3
- package/dist/internal/client-runtime.d.mts +17 -7
- package/dist/internal/client-runtime.d.ts +17 -7
- package/dist/internal/client-runtime.mjs +4 -2
- package/dist/internal/compression-runtime.d.mts +3 -2
- package/dist/internal/compression-runtime.d.ts +3 -2
- package/dist/internal/config-runtime.cjs +10 -9
- package/dist/internal/config-runtime.d.mts +6 -5
- package/dist/internal/config-runtime.d.ts +6 -5
- package/dist/internal/config-runtime.mjs +9 -8
- package/dist/internal/infra-analytics-runtime.cjs +12 -9
- package/dist/internal/infra-analytics-runtime.mjs +10 -7
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +48 -17
- package/dist/internal/production-runtime.d.mts +48 -18
- package/dist/internal/production-runtime.d.ts +48 -18
- package/dist/internal/production-runtime.mjs +50 -19
- package/dist/internal/vercel-edge-middleware.cjs +3 -2
- package/dist/internal/vercel-edge-middleware.d.mts +2 -2
- package/dist/internal/vercel-edge-middleware.d.ts +2 -2
- package/dist/internal/vercel-edge-middleware.mjs +2 -1
- package/dist/markdown.cjs +3 -2
- package/dist/markdown.d.mts +3 -2
- package/dist/markdown.d.ts +3 -2
- package/dist/markdown.mjs +2 -1
- package/dist/middleware.cjs +6 -5
- package/dist/middleware.d.mts +4 -3
- package/dist/middleware.d.ts +4 -3
- package/dist/middleware.mjs +5 -4
- package/dist/mobile.d.mts +3 -3
- package/dist/mobile.d.ts +3 -3
- package/dist/{mount.d-CBqr-LfI.d.mts → mount.d-BvWxf8ZE.d.mts} +1 -1
- package/dist/{mount.d-CGzN61Kq.d.ts → mount.d-DngLY7NL.d.ts} +1 -1
- package/dist/{native-tree-W2SSJB3Y.cjs → native-tree-GF4BH33L.cjs} +4 -3
- package/dist/{native-tree-Y5YQANW7.mjs → native-tree-L2IIEBXH.mjs} +3 -2
- package/dist/{navigation-delegate.d-BwCOhpj7.d.mts → navigation-delegate.d-CMyl1h2l.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CLH2dXjy.d.ts → navigation-delegate.d-zZogiDfa.d.ts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +6 -5
- package/dist/navigation.d.ts +6 -5
- package/dist/navigation.mjs +4 -4
- package/dist/plugin.cjs +28 -27
- package/dist/plugin.d.mts +6 -4
- package/dist/plugin.d.ts +6 -4
- package/dist/plugin.mjs +27 -26
- package/dist/{production-runtime.d-DMZY3OgV.d.mts → production-runtime.d-B0IeWWyO.d.mts} +23 -2
- package/dist/{production-runtime.d-BMyyLGBB.d.ts → production-runtime.d-q3aHIv5Y.d.ts} +23 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-W6LmjD6y.d.ts → render-plan.d-DQj2bzd2.d.ts} +1 -1
- package/dist/{render-plan.d-CzGDjcT0.d.mts → render-plan.d-Di1znBDW.d.mts} +1 -1
- package/dist/renderer-client.cjs +7 -7
- package/dist/renderer-client.d.mts +6 -5
- package/dist/renderer-client.d.ts +6 -5
- package/dist/renderer-client.mjs +3 -3
- package/dist/{request.d-CTVRZiQv.d.ts → request.d-C5vyoYeL.d.ts} +1 -1
- package/dist/{request.d-CgNVderU.d.mts → request.d-CJWzfDYJ.d.mts} +1 -1
- package/dist/request.d.mts +4 -3
- package/dist/request.d.ts +4 -3
- package/dist/{resolver.d-JnZKKsc5.d.mts → resolver.d-9iKC79CU.d.mts} +1 -1
- package/dist/{resolver.d-BHyZgpa7.d.ts → resolver.d-CY6mEa_F.d.ts} +1 -1
- package/dist/response.d-B_MtBCnF.d.mts +12 -0
- package/dist/response.d-B_MtBCnF.d.ts +12 -0
- package/dist/{route-rendering.d-D0bmZVJA.d.mts → route-rendering.d-C-et2TZ1.d.mts} +9 -2
- package/dist/{route-rendering.d-FDSNtCMg.d.ts → route-rendering.d-DhsY5M2I.d.ts} +9 -2
- package/dist/{router.d-GRKm_uAV.d.mts → router.d-BMDS5s5X.d.mts} +1 -1
- package/dist/{router.d-DZ3ldniI.d.ts → router.d-CJB-Ntni.d.ts} +1 -1
- package/dist/{routes.d-CrEy0lJS.d.mts → routes.d-D3aJw1H5.d.mts} +1 -1
- package/dist/{routes.d-9GFFNioh.d.ts → routes.d-K-Qg79AA.d.ts} +1 -1
- package/dist/routes.d.mts +3 -2
- package/dist/routes.d.ts +3 -2
- package/dist/{index.d-BNNDpql4.d.ts → routing.d-BxOZ2YWc.d.ts} +1 -2
- package/dist/{index.d-BqcfqJvt.d.mts → routing.d-DwSUVZbF.d.mts} +1 -2
- package/dist/{rsc-pipeline-PJZOVYSY.mjs → rsc-pipeline-AXQJCCHI.mjs} +12 -11
- package/dist/{rsc-pipeline-J4KKBSCH.cjs → rsc-pipeline-NJKLZ3YE.cjs} +13 -12
- package/dist/{runtime-OLEO5NXF.cjs → runtime-DMW6DDOI.cjs} +19 -18
- package/dist/{runtime-QDBSE4H6.mjs → runtime-JXNEKOSE.mjs} +11 -10
- package/dist/{runtime.d-BtL3PCL3.d.ts → runtime.d-B_uPfMjA.d.ts} +2 -2
- package/dist/{runtime.d-DqXihlxm.d.mts → runtime.d-BonodRI9.d.mts} +1 -1
- package/dist/{runtime.d-3iJAKptR.d.mts → runtime.d-nUz0HAL4.d.mts} +2 -2
- package/dist/{runtime.d-pqFQBU2N.d.ts → runtime.d-uw4123iI.d.ts} +1 -1
- package/dist/server-plugins.cjs +3 -2
- package/dist/server-plugins.d.mts +6 -12
- package/dist/server-plugins.d.ts +6 -12
- package/dist/server-plugins.mjs +2 -1
- package/dist/server.cjs +60 -52
- package/dist/server.d.mts +23 -14
- package/dist/server.d.ts +23 -14
- package/dist/server.mjs +38 -30
- package/dist/{spa-router.d-DhOhaQ-7.d.ts → spa-router.d-l0d9pPZj.d.ts} +3 -3
- package/dist/{spa-router.d-Dhvy60p4.d.mts → spa-router.d-rha3M95y.d.mts} +3 -3
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.mts +3 -2
- package/dist/testing.d.ts +3 -2
- package/dist/testing.mjs +3 -3
- package/dist/{types.d-C41ePjvP.d.ts → types.d-wVRlLtBf.d.mts} +1 -1
- package/dist/{types.d-C41ePjvP.d.mts → types.d-wVRlLtBf.d.ts} +1 -1
- package/dist/{utils.d-BVCMRRau.d.ts → utils.d-BK-PTOF8.d.ts} +1 -1
- package/dist/{utils.d-Q8EHCpkF.d.mts → utils.d-BzuTobEc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +35 -27
- package/dist/vite.d.mts +26 -6
- package/dist/vite.d.ts +26 -6
- package/dist/vite.mjs +34 -26
- package/package.json +2 -2
- package/dist/analyzer-SAJSV6SP.cjs +0 -16
- package/dist/response.d-BolW0Vx_.d.mts +0 -10
- package/dist/response.d-BolW0Vx_.d.ts +0 -10
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createFarmReactRefreshPlugins,
|
|
3
3
|
farmDesktopDevGuardPlugin,
|
|
4
4
|
isFarmReactRefreshActive
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QVBXTSIZ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createFarmImageHandler
|
|
8
8
|
} from "./chunk-OEL5EPOJ.mjs";
|
|
@@ -30,12 +30,12 @@ import {
|
|
|
30
30
|
resolveFarmClientCacheAdapterEntry,
|
|
31
31
|
resolveFarmImageProviderForRuntime,
|
|
32
32
|
resolveFarmRouteRootStrategy
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RMOU3PR4.mjs";
|
|
34
34
|
import {
|
|
35
35
|
generateFarmClientPluginEntryCode,
|
|
36
36
|
hasFarmServerRuntimePlugins,
|
|
37
37
|
loadTailwindVitePlugin
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-I4KPA2C6.mjs";
|
|
39
39
|
import {
|
|
40
40
|
FARM_NODE_RESPONSE_END_PENDING
|
|
41
41
|
} from "./chunk-PJQ5W356.mjs";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
import {
|
|
46
46
|
generateFarmTypeArtifacts,
|
|
47
47
|
resolveRouteRenderingConfig
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-5IJRJWJS.mjs";
|
|
49
49
|
import {
|
|
50
50
|
createFarmServerFnBoundaryModule,
|
|
51
51
|
isFarmServerFnBoundaryId,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
parseFarmLayoutChainHeader,
|
|
62
62
|
renderFarmLocaleAlternateLinks,
|
|
63
63
|
stripRouteGroups
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-NA77GEIU.mjs";
|
|
65
65
|
import {
|
|
66
66
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
67
67
|
} from "./chunk-LLZSYFOM.mjs";
|
|
@@ -79,13 +79,13 @@ import {
|
|
|
79
79
|
resolveFarmMCPRouteLabel,
|
|
80
80
|
resolveFarmMarkdownRouteLabel,
|
|
81
81
|
setFarmRouteLabel
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-A2TH5MKE.mjs";
|
|
83
83
|
import {
|
|
84
84
|
FARM_DEFAULT_MCP_PATH
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-75E5FDX2.mjs";
|
|
86
86
|
import {
|
|
87
87
|
isFarmPreviewDeploymentEnvironment
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-QZHTDVH4.mjs";
|
|
89
89
|
import {
|
|
90
90
|
resolveFarmLayoutFonts
|
|
91
91
|
} from "./chunk-HZOMT5DY.mjs";
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
rewriteFarmReactServerClientModuleImports,
|
|
121
121
|
rewriteFarmReactServerImports,
|
|
122
122
|
stripUseClientDirective
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-JRF2SKCD.mjs";
|
|
124
124
|
import {
|
|
125
125
|
generateFarmDocsAdapterClientRuntime,
|
|
126
126
|
getFarmDocsAdapterConfigModule
|
|
@@ -144,10 +144,10 @@ import {
|
|
|
144
144
|
FARM_PREVIEW_ROBOTS_TAG,
|
|
145
145
|
resolveFarmAgentCrawlers,
|
|
146
146
|
resolveFarmAgentSitemap
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-REP6HWJN.mjs";
|
|
148
148
|
import {
|
|
149
149
|
resolveFarmLlmsTxtConfig
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-Z3GPAFIA.mjs";
|
|
151
151
|
import {
|
|
152
152
|
resolveFarmServerComponentsMode
|
|
153
153
|
} from "./chunk-4QENVMG7.mjs";
|
|
@@ -177,7 +177,7 @@ import {
|
|
|
177
177
|
createFarmMarkdownSourceResponse,
|
|
178
178
|
isFarmMarkdownPageFile,
|
|
179
179
|
normalizeFarmMarkdownRoutePath
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-R7254L3R.mjs";
|
|
181
181
|
import {
|
|
182
182
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
183
183
|
createFarmMarkdownErrorBody,
|
|
@@ -185,21 +185,21 @@ import {
|
|
|
185
185
|
farmRequestWantsMarkdown,
|
|
186
186
|
getFarmMarkdownAlternatePath,
|
|
187
187
|
resolveMarkdownMirrorTarget
|
|
188
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-KPJYBSHL.mjs";
|
|
189
189
|
import {
|
|
190
190
|
dispatchIntegrationRequest,
|
|
191
191
|
getFarmIntegrationPluginOwner,
|
|
192
192
|
getIntegrationDocumentNavigationMatchers,
|
|
193
193
|
getIntegrationProviders,
|
|
194
194
|
matchIntegrationRoute
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-WW3LRNQV.mjs";
|
|
196
196
|
import {
|
|
197
197
|
resolveFarmRouteContext,
|
|
198
198
|
withFarmRouteContext
|
|
199
199
|
} from "./chunk-BMQAPZXD.mjs";
|
|
200
200
|
import {
|
|
201
201
|
MiddlewareManager
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-JZQS3ZOI.mjs";
|
|
203
203
|
import {
|
|
204
204
|
_runWithMiddlewareContext,
|
|
205
205
|
_runWithMiddlewareData
|
|
@@ -215,10 +215,10 @@ import {
|
|
|
215
215
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
216
216
|
import {
|
|
217
217
|
APIRouteManager
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-E77IA5IF.mjs";
|
|
219
219
|
import {
|
|
220
220
|
getFarmI18nClientSnapshot
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-3AUINHFG.mjs";
|
|
222
222
|
import {
|
|
223
223
|
VERCEL_OG_INSTALL_HINT,
|
|
224
224
|
isOptionalPeerInstalled
|
|
@@ -243,7 +243,7 @@ import {
|
|
|
243
243
|
applyWebResponseHeaders,
|
|
244
244
|
fetchFarmExternalRewrite,
|
|
245
245
|
sendWebResponse
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-O5QUJEWT.mjs";
|
|
247
247
|
import {
|
|
248
248
|
invalidateFailedFarmDevModules,
|
|
249
249
|
invalidateFarmDevDependents,
|
|
@@ -278,7 +278,10 @@ import {
|
|
|
278
278
|
} from "./chunk-2DA7CLY7.mjs";
|
|
279
279
|
import {
|
|
280
280
|
FARM_VERSION
|
|
281
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-NYF7A4UW.mjs";
|
|
282
|
+
import {
|
|
283
|
+
toFarmTrailingSlashPageRequest
|
|
284
|
+
} from "./chunk-4O26BPUY.mjs";
|
|
282
285
|
import {
|
|
283
286
|
DEFAULT_FARM_API_BASE_PATH
|
|
284
287
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -291,21 +294,21 @@ import {
|
|
|
291
294
|
mergeMetadata,
|
|
292
295
|
mergeModuleViewport
|
|
293
296
|
} from "./chunk-S6O2L47H.mjs";
|
|
297
|
+
import {
|
|
298
|
+
createDeferredDataResponse
|
|
299
|
+
} from "./chunk-7BIW7VCW.mjs";
|
|
294
300
|
import {
|
|
295
301
|
FARM_DEPLOYMENT_ID_HEADER,
|
|
296
302
|
createFarmDeploymentMismatchResponse,
|
|
297
303
|
getFarmDeploymentMismatch,
|
|
298
304
|
withFarmDeploymentResponse
|
|
299
|
-
} from "./chunk-
|
|
300
|
-
import {
|
|
301
|
-
createDeferredDataResponse
|
|
302
|
-
} from "./chunk-7BIW7VCW.mjs";
|
|
305
|
+
} from "./chunk-IWJONXPF.mjs";
|
|
303
306
|
import {
|
|
304
307
|
FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
305
308
|
FARM_CONFIG_REDIRECTS_PLUGIN_NAME,
|
|
306
309
|
FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
307
310
|
getConfigRedirectMatcher
|
|
308
|
-
} from "./chunk-
|
|
311
|
+
} from "./chunk-FETMUBIA.mjs";
|
|
309
312
|
import {
|
|
310
313
|
parseFarmRequestTarget,
|
|
311
314
|
resolveFarmRequestURL
|
|
@@ -1068,7 +1071,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1068
1071
|
return import("./workflows.mjs");
|
|
1069
1072
|
}
|
|
1070
1073
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1071
|
-
return import("./devtools-
|
|
1074
|
+
return import("./devtools-CB43AHEP.mjs");
|
|
1072
1075
|
}
|
|
1073
1076
|
function loadFarmDevtoolsUIRuntime() {
|
|
1074
1077
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -2809,6 +2812,45 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2809
2812
|
const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
|
|
2810
2813
|
const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
|
|
2811
2814
|
const runtimeHookErrorAnswersJSON = rendererDisabled || isFarmAPIPathname(requestPathname, apiServerBasePath);
|
|
2815
|
+
const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
|
|
2816
|
+
let pageHookRouteMatch;
|
|
2817
|
+
const pageHookRoute = (pathname2) => {
|
|
2818
|
+
if (pageHookRouteMatch?.render.pathname === pathname2) return pageHookRouteMatch;
|
|
2819
|
+
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
2820
|
+
pageHookRouteMatch = {
|
|
2821
|
+
render: {
|
|
2822
|
+
pathname: pathname2,
|
|
2823
|
+
method: requestMethod,
|
|
2824
|
+
routePattern: match?.route?.pattern || null,
|
|
2825
|
+
params: match?.params || {}
|
|
2826
|
+
},
|
|
2827
|
+
layoutPatterns: (match?.layouts || []).map((layout) => layout.pattern)
|
|
2828
|
+
};
|
|
2829
|
+
return pageHookRouteMatch;
|
|
2830
|
+
};
|
|
2831
|
+
const runFarmDevPageHooks = async (pathname2 = requestedPagePathname) => {
|
|
2832
|
+
if (!pm || !pm.hasHook("beforeRouteMatch") && !pm.hasHook("afterRouteMatch") && !pm.hasHook("beforeRender")) {
|
|
2833
|
+
return;
|
|
2834
|
+
}
|
|
2835
|
+
const { render, layoutPatterns } = pageHookRoute(pathname2);
|
|
2836
|
+
const routeManager3 = farmApp.getRouteManager();
|
|
2837
|
+
if (routeManager3.matchMetadataRoute(render.pathname) || routeManager3.matchMetadataImage(render.pathname) || // A path no page route matches is a page only for a GET or HEAD request.
|
|
2838
|
+
!render.routePattern && requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2841
|
+
await pm.runHookParallel("beforeRouteMatch", {
|
|
2842
|
+
pathname: render.pathname,
|
|
2843
|
+
method: requestMethod
|
|
2844
|
+
});
|
|
2845
|
+
await pm.runHookParallel("afterRouteMatch", {
|
|
2846
|
+
pathname: render.pathname,
|
|
2847
|
+
matched: Boolean(render.routePattern),
|
|
2848
|
+
routePattern: render.routePattern,
|
|
2849
|
+
params: render.params,
|
|
2850
|
+
layoutPatterns
|
|
2851
|
+
});
|
|
2852
|
+
await pm.runHookParallel("beforeRender", render);
|
|
2853
|
+
};
|
|
2812
2854
|
if (pm && configRewriteSource === void 0 && !deferredDottedRequests.has(req) && (configRoutePlugins.has(FARM_CONFIG_HEADERS_PLUGIN_NAME) || configRedirectMatchers.length > 0) && !isViteOwnedRequest()) {
|
|
2813
2855
|
let redirect = null;
|
|
2814
2856
|
try {
|
|
@@ -2838,13 +2880,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2838
2880
|
if (opensFarmDevRuntimeSession(pm)) {
|
|
2839
2881
|
const redirectResponse = response;
|
|
2840
2882
|
try {
|
|
2883
|
+
const kind = isFarmAPIPathname(requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
|
|
2841
2884
|
response = await pm.runRuntimeRequest(
|
|
2842
2885
|
createRequestFromNodeRequest(req, parsedRequestUrl),
|
|
2843
|
-
() =>
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
}
|
|
2886
|
+
async () => {
|
|
2887
|
+
if (kind === "page") await runFarmDevPageHooks();
|
|
2888
|
+
return redirectResponse;
|
|
2889
|
+
},
|
|
2890
|
+
{ kind, route: { pathname: requestPathname } }
|
|
2848
2891
|
);
|
|
2849
2892
|
} catch {
|
|
2850
2893
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
@@ -2977,6 +3020,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2977
3020
|
}
|
|
2978
3021
|
pm.copyRequestContext(runtimeSession2.request, req);
|
|
2979
3022
|
applyWebRequestToNodeRequest(runtimeSession2.request, req);
|
|
3023
|
+
if (kind === "page") {
|
|
3024
|
+
try {
|
|
3025
|
+
await runFarmDevPageHooks();
|
|
3026
|
+
} catch (error) {
|
|
3027
|
+
await discard();
|
|
3028
|
+
await pm.failRuntimeRequest(runtimeSession2, error);
|
|
3029
|
+
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3030
|
+
return;
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
2980
3033
|
}
|
|
2981
3034
|
let response;
|
|
2982
3035
|
let responding = false;
|
|
@@ -3125,8 +3178,28 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3125
3178
|
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: createFarmNodeRequestBodyStream(req), duplex: "half" };
|
|
3126
3179
|
const docsResponse = await farmDocsHandler(new Request(docsRequest, docsBodyInit));
|
|
3127
3180
|
if (docsResponse) {
|
|
3181
|
+
const docsPage = docsResponse.headers.get("content-type")?.toLowerCase().includes("text/html");
|
|
3128
3182
|
await serveBuiltInRoute(
|
|
3129
|
-
() =>
|
|
3183
|
+
async (request) => {
|
|
3184
|
+
if (!docsPage) return wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse);
|
|
3185
|
+
const deploymentMismatch = getFarmDeploymentMismatch(
|
|
3186
|
+
request,
|
|
3187
|
+
farmConfig.deploymentId
|
|
3188
|
+
);
|
|
3189
|
+
if (deploymentMismatch) {
|
|
3190
|
+
await docsResponse.body?.cancel();
|
|
3191
|
+
return createFarmDeploymentMismatchResponse(deploymentMismatch);
|
|
3192
|
+
}
|
|
3193
|
+
return withFarmDeploymentResponse(
|
|
3194
|
+
await wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse),
|
|
3195
|
+
farmConfig.deploymentId,
|
|
3196
|
+
{
|
|
3197
|
+
setCookie: request.method.toUpperCase() === "GET",
|
|
3198
|
+
cookiePath: farmConfig.basePath || "/",
|
|
3199
|
+
secureCookie: new URL(request.url).protocol === "https:"
|
|
3200
|
+
}
|
|
3201
|
+
);
|
|
3202
|
+
},
|
|
3130
3203
|
{
|
|
3131
3204
|
kind: "docs",
|
|
3132
3205
|
computed: docsResponse,
|
|
@@ -3144,7 +3217,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3144
3217
|
}
|
|
3145
3218
|
}
|
|
3146
3219
|
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && req.headers.accept?.includes(FARM_NATIVE_TREE_CONTENT_TYPE)) {
|
|
3147
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
3220
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-L2IIEBXH.mjs");
|
|
3148
3221
|
const treeBodyInit = requestMethod === "POST" ? { body: createFarmNodeRequestBodyStream(req), duplex: "half" } : {};
|
|
3149
3222
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
3150
3223
|
request: new Request(fullUrl, {
|
|
@@ -3192,11 +3265,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3192
3265
|
},
|
|
3193
3266
|
// The anonymous check goes through this server, so its guards and
|
|
3194
3267
|
// middleware see the page's own path, as in production. It connects to
|
|
3195
|
-
// this server's own listener, never the host the caller's Host names.
|
|
3268
|
+
// this server's own listener, never the host the caller's Host names. The
|
|
3269
|
+
// page is asked for at the URL it answers at, not through the trailing-slash 308.
|
|
3196
3270
|
renderPage: async (request) => createFarmDevServerDispatch(server)(
|
|
3197
|
-
new Request(
|
|
3198
|
-
|
|
3199
|
-
|
|
3271
|
+
new Request(
|
|
3272
|
+
toFarmTrailingSlashPageRequest(
|
|
3273
|
+
request,
|
|
3274
|
+
farmApp.getConfig().trailingSlash === true
|
|
3275
|
+
),
|
|
3276
|
+
{
|
|
3277
|
+
signal: res.destroyed ? AbortSignal.abort() : createFarmNodeRequestAbortSignal(req, res)
|
|
3278
|
+
}
|
|
3279
|
+
)
|
|
3200
3280
|
)
|
|
3201
3281
|
});
|
|
3202
3282
|
if (markdownSourceResponse) {
|
|
@@ -3216,17 +3296,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3216
3296
|
routeExists: (pathname2) => Boolean(farmApp.getRouteManager().matchRoute(pathname2).route),
|
|
3217
3297
|
// The page is rendered by this server's own listener, never the host the
|
|
3218
3298
|
// caller's Host names. Redirects are not followed, so the mirror answers with
|
|
3219
|
-
// the page's own (a sign-in gate, say), as production does.
|
|
3299
|
+
// the page's own (a sign-in gate, say), as production does. The page is read
|
|
3300
|
+
// at the URL it answers at ('/about/' with trailingSlash), not through the 308.
|
|
3220
3301
|
renderPage: async (request) => {
|
|
3221
3302
|
const headers = new Headers(request.headers);
|
|
3222
3303
|
headers.delete("accept-encoding");
|
|
3223
3304
|
return createFarmDevServerDispatch(server)(
|
|
3224
|
-
new Request(
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3305
|
+
new Request(
|
|
3306
|
+
toFarmTrailingSlashPageRequest(
|
|
3307
|
+
request,
|
|
3308
|
+
farmApp.getConfig().trailingSlash === true
|
|
3309
|
+
),
|
|
3310
|
+
{
|
|
3311
|
+
headers,
|
|
3312
|
+
// Only accepted mirrors need disconnect listeners. An earlier
|
|
3313
|
+
// close (for example while the docs handler ran) must also abort.
|
|
3314
|
+
signal: res.destroyed ? AbortSignal.abort() : createFarmNodeRequestAbortSignal(req, res)
|
|
3315
|
+
}
|
|
3316
|
+
)
|
|
3230
3317
|
);
|
|
3231
3318
|
},
|
|
3232
3319
|
apiServerBasePath
|
|
@@ -3404,7 +3491,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3404
3491
|
});
|
|
3405
3492
|
}
|
|
3406
3493
|
logger.error(`Integration route error: ${error}`);
|
|
3407
|
-
if (
|
|
3494
|
+
if (runtimeReportsErrors) {
|
|
3495
|
+
if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3496
|
+
else if (!res.writableEnded) res.end();
|
|
3497
|
+
} else if (!res.writableEnded) {
|
|
3408
3498
|
res.statusCode = 500;
|
|
3409
3499
|
res.setHeader("Content-Type", "application/json");
|
|
3410
3500
|
res.end(FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
@@ -3613,6 +3703,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3613
3703
|
route: apiRoutePattern,
|
|
3614
3704
|
method: method2
|
|
3615
3705
|
});
|
|
3706
|
+
let apiOutcomeReported = false;
|
|
3616
3707
|
try {
|
|
3617
3708
|
const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
|
|
3618
3709
|
const request = await createHandlerRequest();
|
|
@@ -3621,7 +3712,6 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3621
3712
|
method: method2,
|
|
3622
3713
|
routePath: apiRoutePattern
|
|
3623
3714
|
};
|
|
3624
|
-
let apiHandlerFailed = false;
|
|
3625
3715
|
const invokeAPIHandler = async (runtimeRequest, runtime) => {
|
|
3626
3716
|
const handledRequest = pm ? await pm.runHookSerial(
|
|
3627
3717
|
"beforeApiHandler",
|
|
@@ -3631,8 +3721,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3631
3721
|
let response;
|
|
3632
3722
|
try {
|
|
3633
3723
|
response = await apiHandler(handledRequest);
|
|
3724
|
+
apiOutcomeReported = true;
|
|
3725
|
+
emitFarmEvent({
|
|
3726
|
+
type: "api.request.complete",
|
|
3727
|
+
pathname: pathname2,
|
|
3728
|
+
route: apiRoutePattern,
|
|
3729
|
+
method: method2,
|
|
3730
|
+
status: response.status,
|
|
3731
|
+
durationMs: Date.now() - startTime2
|
|
3732
|
+
});
|
|
3634
3733
|
} catch (error) {
|
|
3635
|
-
|
|
3734
|
+
apiOutcomeReported = true;
|
|
3636
3735
|
emitFarmEvent({
|
|
3637
3736
|
type: "api.error",
|
|
3638
3737
|
pathname: pathname2,
|
|
@@ -3655,29 +3754,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3655
3754
|
}
|
|
3656
3755
|
});
|
|
3657
3756
|
const duration = Date.now() - startTime2;
|
|
3658
|
-
|
|
3757
|
+
logResponse(method2, urlPath2, handledResponse.status, duration, "API");
|
|
3758
|
+
await sendWebResponse(res, handledResponse);
|
|
3759
|
+
return;
|
|
3760
|
+
} catch (error) {
|
|
3761
|
+
const duration = Date.now() - startTime2;
|
|
3762
|
+
if (!apiOutcomeReported) {
|
|
3659
3763
|
emitFarmEvent({
|
|
3660
|
-
type: "api.
|
|
3764
|
+
type: "api.error",
|
|
3661
3765
|
pathname: pathname2,
|
|
3662
3766
|
route: apiRoutePattern,
|
|
3663
3767
|
method: method2,
|
|
3664
|
-
|
|
3665
|
-
|
|
3768
|
+
durationMs: duration,
|
|
3769
|
+
error
|
|
3666
3770
|
});
|
|
3667
3771
|
}
|
|
3668
|
-
logResponse(method2, urlPath2, handledResponse.status, duration, "API");
|
|
3669
|
-
await sendWebResponse(res, handledResponse);
|
|
3670
|
-
return;
|
|
3671
|
-
} catch (error) {
|
|
3672
|
-
const duration = Date.now() - startTime2;
|
|
3673
|
-
emitFarmEvent({
|
|
3674
|
-
type: "api.error",
|
|
3675
|
-
pathname: pathname2,
|
|
3676
|
-
route: apiRoutePattern,
|
|
3677
|
-
method: method2,
|
|
3678
|
-
durationMs: duration,
|
|
3679
|
-
error
|
|
3680
|
-
});
|
|
3681
3772
|
const bodyErrorResponse = createFarmRequestBodyErrorResponse(error);
|
|
3682
3773
|
if (bodyErrorResponse) {
|
|
3683
3774
|
logResponse(method2, urlPath2, bodyErrorResponse.status, duration, "API");
|
|
@@ -4122,10 +4213,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4122
4213
|
trustProxy: currentServerConfig.trustProxy
|
|
4123
4214
|
}).pathname;
|
|
4124
4215
|
const routeManager2 = farmApp.getRouteManager();
|
|
4125
|
-
const hasBeforeRouteMatchHook = pm?.hasHook("beforeRouteMatch") ?? false;
|
|
4126
|
-
const hasAfterRouteMatchHook = pm?.hasHook("afterRouteMatch") ?? false;
|
|
4127
4216
|
const hasBeforeRequestHook = pm?.hasHook("beforeRequest") ?? false;
|
|
4128
|
-
const hasBeforeRenderHook = pm?.hasHook("beforeRender") ?? false;
|
|
4129
4217
|
const hasAfterResponseHook = pm?.hasHook("afterResponse") ?? false;
|
|
4130
4218
|
const hasHTMLTransformHook = (pm?.hasHook("transformHTML") ?? false) || (pm?.hasHook("afterRender") ?? false);
|
|
4131
4219
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
@@ -4140,6 +4228,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4140
4228
|
};
|
|
4141
4229
|
let runtimeSession;
|
|
4142
4230
|
let pathname = requestedPathname;
|
|
4231
|
+
let pageHookPathname = requestedPagePathname;
|
|
4143
4232
|
if (pm && opensRuntimeSession) {
|
|
4144
4233
|
try {
|
|
4145
4234
|
const sessionOptions = {
|
|
@@ -4157,6 +4246,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4157
4246
|
createRequestFromNodeRequest(req, new URL(configRewriteSource ?? fullUrl)),
|
|
4158
4247
|
sessionOptions
|
|
4159
4248
|
);
|
|
4249
|
+
if (!runtimeSession.response) {
|
|
4250
|
+
pageHookPathname = configRewriteSource === void 0 ? new URL(runtimeSession.request.url).pathname : requestedPagePathname;
|
|
4251
|
+
await runFarmDevPageHooks(pageHookPathname);
|
|
4252
|
+
}
|
|
4160
4253
|
const routedRequest = runtimeSession.response ?? (configRewriteSource === void 0 ? runtimeSession.request : await pm.runRuntimeBeforeForRewrite(
|
|
4161
4254
|
runtimeSession.request,
|
|
4162
4255
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -4176,9 +4269,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4176
4269
|
return;
|
|
4177
4270
|
}
|
|
4178
4271
|
}
|
|
4179
|
-
const
|
|
4180
|
-
const failPageHook = async (error, interceptor) => {
|
|
4181
|
-
interceptor?.release();
|
|
4272
|
+
const failPageHook = async (error) => {
|
|
4182
4273
|
logResponse(method, urlPath, 500, Date.now() - startTime, "PAGE");
|
|
4183
4274
|
if (runtimeSession) {
|
|
4184
4275
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
@@ -4191,32 +4282,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4191
4282
|
}
|
|
4192
4283
|
if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4193
4284
|
};
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
await
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
}
|
|
4201
|
-
if (pm && hasAfterRouteMatchHook) {
|
|
4202
|
-
await pm.runHookParallel("afterRouteMatch", {
|
|
4203
|
-
pathname,
|
|
4204
|
-
matched: !!routeMatch?.route,
|
|
4205
|
-
routePattern: routeMatch?.route?.pattern || null,
|
|
4206
|
-
params: routeMatch?.params || {},
|
|
4207
|
-
layoutPatterns: (routeMatch?.layouts || []).map((l) => l.pattern)
|
|
4208
|
-
});
|
|
4285
|
+
if (!runtimeSession) {
|
|
4286
|
+
try {
|
|
4287
|
+
await runFarmDevPageHooks(pageHookPathname);
|
|
4288
|
+
} catch (error) {
|
|
4289
|
+
await failPageHook(error);
|
|
4290
|
+
return;
|
|
4209
4291
|
}
|
|
4210
|
-
} catch (error) {
|
|
4211
|
-
await failPageHook(error);
|
|
4212
|
-
return;
|
|
4213
4292
|
}
|
|
4214
|
-
const renderPayload = {
|
|
4215
|
-
pathname,
|
|
4216
|
-
method,
|
|
4217
|
-
routePattern: routeMatch?.route?.pattern || null,
|
|
4218
|
-
params: routeMatch?.params || {}
|
|
4219
|
-
};
|
|
4220
4293
|
const shouldInterceptResponse = Boolean(
|
|
4221
4294
|
pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
|
|
4222
4295
|
);
|
|
@@ -4228,7 +4301,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4228
4301
|
hasRuntimeAfterHook,
|
|
4229
4302
|
hasAfterResponseHook,
|
|
4230
4303
|
hasHTMLTransformHook,
|
|
4231
|
-
|
|
4304
|
+
// render.html gets the render info render.before got.
|
|
4305
|
+
renderPayload: pageHookRoute(pageHookPathname).render,
|
|
4232
4306
|
method,
|
|
4233
4307
|
urlPath,
|
|
4234
4308
|
pathname,
|
|
@@ -4275,14 +4349,6 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4275
4349
|
return;
|
|
4276
4350
|
}
|
|
4277
4351
|
const renderer = farmApp.getServerRenderer();
|
|
4278
|
-
if (pm && hasBeforeRenderHook) {
|
|
4279
|
-
try {
|
|
4280
|
-
await pm.runHookParallel("beforeRender", renderPayload);
|
|
4281
|
-
} catch (error) {
|
|
4282
|
-
await failPageHook(error, responseInterceptor);
|
|
4283
|
-
return;
|
|
4284
|
-
}
|
|
4285
|
-
}
|
|
4286
4352
|
await renderer.renderPage(req, res);
|
|
4287
4353
|
if (!shouldInterceptResponse) {
|
|
4288
4354
|
logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
|
|
@@ -5046,10 +5112,17 @@ if (import.meta.hot) {
|
|
|
5046
5112
|
}
|
|
5047
5113
|
function runFarmMiddlewareWithNavigation(renderer, middlewareRequest, req, res, execute) {
|
|
5048
5114
|
return renderer.runWithRequestContext(middlewareRequest, async () => {
|
|
5115
|
+
const headersBeforeMiddleware = res.getHeaders();
|
|
5049
5116
|
try {
|
|
5050
5117
|
return await execute();
|
|
5051
5118
|
} catch (error) {
|
|
5052
5119
|
if (await renderer.respondToNavigationError(req, res, error)) return true;
|
|
5120
|
+
if (!res.headersSent) {
|
|
5121
|
+
for (const name of res.getHeaderNames()) res.removeHeader(name);
|
|
5122
|
+
for (const [name, value] of Object.entries(headersBeforeMiddleware)) {
|
|
5123
|
+
if (value !== void 0) res.setHeader(name, value);
|
|
5124
|
+
}
|
|
5125
|
+
}
|
|
5053
5126
|
throw error;
|
|
5054
5127
|
}
|
|
5055
5128
|
});
|
|
@@ -7720,6 +7793,8 @@ async function defineConfig(config = {}) {
|
|
|
7720
7793
|
}
|
|
7721
7794
|
|
|
7722
7795
|
export {
|
|
7796
|
+
isViteModuleRequest,
|
|
7797
|
+
isViteDevClientRequest,
|
|
7723
7798
|
farmImageImportsPlugin,
|
|
7724
7799
|
farmI18nClientBridgePlugin,
|
|
7725
7800
|
farmServerOnlyEntriesPlugin,
|