@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,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
var _chunkVG6HYT5Kcjs = require('./chunk-VG6HYT5K.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkOWQV6MLMcjs = require('./chunk-OWQV6MLM.cjs');
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -36,10 +40,10 @@ async function handleFarmDefaultMCPRequest(request, context) {
|
|
|
36
40
|
return transportError(403, "Cross-origin requests are not allowed.");
|
|
37
41
|
}
|
|
38
42
|
const protocolHeader = request.headers.get("mcp-protocol-version");
|
|
39
|
-
if (protocolHeader && !
|
|
43
|
+
if (protocolHeader && !_chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(protocolHeader.trim())) {
|
|
40
44
|
return transportError(
|
|
41
45
|
400,
|
|
42
|
-
`Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${
|
|
46
|
+
`Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${_chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.join(", ")}.`
|
|
43
47
|
);
|
|
44
48
|
}
|
|
45
49
|
const contentType = _nullishCoalesce(request.headers.get("content-type"), () => ( ""));
|
|
@@ -95,7 +99,7 @@ async function dispatch(method, params, request, context) {
|
|
|
95
99
|
switch (method) {
|
|
96
100
|
case "initialize": {
|
|
97
101
|
const requested = isRecord(params) ? params.protocolVersion : void 0;
|
|
98
|
-
const protocolVersion = typeof requested === "string" &&
|
|
102
|
+
const protocolVersion = typeof requested === "string" && _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(requested) ? requested : _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS[0];
|
|
99
103
|
return {
|
|
100
104
|
protocolVersion,
|
|
101
105
|
capabilities: { tools: { listChanged: false } },
|
|
@@ -103,7 +107,7 @@ async function dispatch(method, params, request, context) {
|
|
|
103
107
|
name: context.server.name,
|
|
104
108
|
version: context.server.version,
|
|
105
109
|
...context.server.title ? { title: context.server.title } : {},
|
|
106
|
-
description:
|
|
110
|
+
description: _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_DESCRIPTION
|
|
107
111
|
},
|
|
108
112
|
instructions: INSTRUCTIONS
|
|
109
113
|
};
|
|
@@ -111,7 +115,7 @@ async function dispatch(method, params, request, context) {
|
|
|
111
115
|
case "ping":
|
|
112
116
|
return {};
|
|
113
117
|
case "tools/list":
|
|
114
|
-
return { tools:
|
|
118
|
+
return { tools: _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_TOOLS };
|
|
115
119
|
case "tools/call":
|
|
116
120
|
return callTool(params, request, context);
|
|
117
121
|
default:
|
|
@@ -122,7 +126,7 @@ async function callTool(params, request, context) {
|
|
|
122
126
|
if (!isRecord(params) || typeof params.name !== "string") {
|
|
123
127
|
throw new FarmMCPRequestError(INVALID_PARAMS, "tools/call needs a tool name.");
|
|
124
128
|
}
|
|
125
|
-
const tool =
|
|
129
|
+
const tool = _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_TOOLS.find(({ name }) => name === params.name);
|
|
126
130
|
if (!tool) {
|
|
127
131
|
throw new FarmMCPRequestError(INVALID_PARAMS, `Unknown tool: ${params.name.slice(0, 64)}`);
|
|
128
132
|
}
|
|
@@ -147,7 +151,12 @@ async function callTool(params, request, context) {
|
|
|
147
151
|
if (typeof path !== "string" || !path.trim() || path.length > 2048) {
|
|
148
152
|
return toolError('path must be a page path such as "/about".');
|
|
149
153
|
}
|
|
150
|
-
const pagePath = toPagePath(
|
|
154
|
+
const pagePath = toPagePath(
|
|
155
|
+
path,
|
|
156
|
+
request.url,
|
|
157
|
+
context.basePath,
|
|
158
|
+
_chunkVG6HYT5Kcjs.resolveFarmDefaultMCPI18n.call(void 0, context.i18n, context.basePath)
|
|
159
|
+
);
|
|
151
160
|
const pages = await context.listPages();
|
|
152
161
|
const page = pagePath ? pages.find((candidate) => candidate.path === pagePath) : void 0;
|
|
153
162
|
if (!page) {
|
|
@@ -194,7 +203,7 @@ function searchPages(pages, query, limit) {
|
|
|
194
203
|
(left, right) => right.score - left.score || left.page.path.localeCompare(right.page.path)
|
|
195
204
|
).slice(0, limit).map(({ page }) => page);
|
|
196
205
|
}
|
|
197
|
-
function toPagePath(input, requestUrl, basePath) {
|
|
206
|
+
function toPagePath(input, requestUrl, basePath, i18n) {
|
|
198
207
|
let url;
|
|
199
208
|
try {
|
|
200
209
|
url = new URL(input.trim(), requestUrl);
|
|
@@ -208,7 +217,13 @@ function toPagePath(input, requestUrl, basePath) {
|
|
|
208
217
|
} catch (e3) {
|
|
209
218
|
return null;
|
|
210
219
|
}
|
|
211
|
-
|
|
220
|
+
if (i18n) {
|
|
221
|
+
const match = _chunkOWQV6MLMcjs.resolveFarmLocalePath.call(void 0, path, i18n);
|
|
222
|
+
if (match.explicit && match.locale !== i18n.defaultLocale) return null;
|
|
223
|
+
path = match.pathname;
|
|
224
|
+
} else {
|
|
225
|
+
path = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, path, basePath);
|
|
226
|
+
}
|
|
212
227
|
if (path === "/index.md") return "/";
|
|
213
228
|
if (path.toLowerCase().endsWith(".md")) path = path.slice(0, -3) || "/";
|
|
214
229
|
return path.length > 1 ? path.replace(/\/+$/, "") || "/" : path;
|
|
@@ -12,7 +12,7 @@ function farmDesktopDevGuardPlugin(basePath) {
|
|
|
12
12
|
order: "pre",
|
|
13
13
|
async handler(server) {
|
|
14
14
|
if (resolveFarmPlatform() !== "desktop") return;
|
|
15
|
-
const { createFarmDesktopDevGuard } = await import("./dev-guard-
|
|
15
|
+
const { createFarmDesktopDevGuard } = await import("./dev-guard-ZDIELV6Q.mjs");
|
|
16
16
|
server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -8,7 +8,10 @@ import {
|
|
|
8
8
|
_resolveFarmMarkdownIndexAlias,
|
|
9
9
|
createFarmMarkdownViewResponse,
|
|
10
10
|
requestAcceptsMarkdown
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KPJYBSHL.mjs";
|
|
12
|
+
import {
|
|
13
|
+
withoutFarmDeploymentCookie
|
|
14
|
+
} from "./chunk-IWJONXPF.mjs";
|
|
12
15
|
|
|
13
16
|
// src/app-markdown-runtime.ts
|
|
14
17
|
import { pathToFileURL } from "url";
|
|
@@ -229,7 +232,7 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
229
232
|
);
|
|
230
233
|
if (publicResponse.headers.get("X-Farm-Markdown-Route") === targetPathname && publicResponse.headers.has("X-Farm-Markdown-Source")) {
|
|
231
234
|
let response = publicResponse;
|
|
232
|
-
if (options.request.headers.
|
|
235
|
+
if (withoutFarmDeploymentCookie(options.request.headers.get("cookie")) || options.request.headers.has("authorization")) {
|
|
233
236
|
const headers2 = new Headers(publicResponse.headers);
|
|
234
237
|
headers2.set("Cache-Control", "private, no-store");
|
|
235
238
|
response = new Response(publicResponse.body, {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
getFarmAgentPagePublicPath,
|
|
2
3
|
isFarmMetadataNoIndex,
|
|
3
4
|
resolveFarmAgentOrigin
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Z3GPAFIA.mjs";
|
|
5
6
|
import {
|
|
6
7
|
matchesFarmMarkdownRoutePattern
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KPJYBSHL.mjs";
|
|
9
|
+
import {
|
|
10
|
+
normalizeFarmTrailingSlashPathname
|
|
11
|
+
} from "./chunk-4O26BPUY.mjs";
|
|
8
12
|
import {
|
|
9
13
|
applyFarmBasePath
|
|
10
14
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -175,7 +179,13 @@ function createFarmDefaultSitemap(sources, options) {
|
|
|
175
179
|
if (isFarmMetadataNoIndex(module?.metadata)) continue;
|
|
176
180
|
if (module?.__farmRouteGuard) continue;
|
|
177
181
|
entries.set(path, {
|
|
178
|
-
url: new URL(
|
|
182
|
+
url: new URL(
|
|
183
|
+
normalizeFarmTrailingSlashPathname(
|
|
184
|
+
getFarmAgentPagePublicPath(path, options),
|
|
185
|
+
options.trailingSlash === true
|
|
186
|
+
),
|
|
187
|
+
base
|
|
188
|
+
).href,
|
|
179
189
|
...source.lastModified ? { lastModified: source.lastModified } : {}
|
|
180
190
|
});
|
|
181
191
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveFarmAppClientEntry,
|
|
3
3
|
resolveFarmClientPlugins
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I4KPA2C6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveFarmPlatform
|
|
7
7
|
} from "./chunk-SMUW7UST.mjs";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
collectSSGPages,
|
|
10
10
|
matchSSGPage,
|
|
11
11
|
resolveRouteRenderingConfigFromFile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5IJRJWJS.mjs";
|
|
13
13
|
import {
|
|
14
14
|
createFarmMetadataImageResponse
|
|
15
15
|
} from "./chunk-CROAFCMW.mjs";
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
renderFarmLocaleAlternateLinks,
|
|
40
40
|
resolveDefaultErrorStatus,
|
|
41
41
|
routeBoundaryCoversDirectory
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-NA77GEIU.mjs";
|
|
43
43
|
import {
|
|
44
44
|
listFarmMCPLlmsTxtLinks
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-A2TH5MKE.mjs";
|
|
46
46
|
import {
|
|
47
47
|
FARM_DEFAULT_MCP_PATH,
|
|
48
48
|
collectFarmDefaultMCPPages,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
farmConfigMountsMCP,
|
|
51
51
|
isFarmDefaultMCPPathname,
|
|
52
52
|
resolveFarmDefaultMCPServer
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-75E5FDX2.mjs";
|
|
54
54
|
import {
|
|
55
55
|
getFarmFormState,
|
|
56
56
|
handleFarmFormActionRequest,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
resolveProgrammaticClientRoutes,
|
|
77
77
|
runWithPackageClientBoundaryCacheFile,
|
|
78
78
|
usesFarmServerTree
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-JRF2SKCD.mjs";
|
|
80
80
|
import {
|
|
81
81
|
FARM_ISLAND_REPLAYABLE_SELECTOR
|
|
82
82
|
} from "./chunk-S32PDOLO.mjs";
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
resolveFarmAgentCrawlers,
|
|
104
104
|
resolveFarmAgentSitemap,
|
|
105
105
|
resolveFarmPerformanceConfig
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-REP6HWJN.mjs";
|
|
107
107
|
import {
|
|
108
108
|
collectFarmLlmsTxtPages,
|
|
109
109
|
createFarmDefaultLlmsTxt,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
renderFarmLlmsFullTxt,
|
|
114
114
|
resolveFarmAgentOrigin,
|
|
115
115
|
resolveFarmLlmsTxtConfig
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-Z3GPAFIA.mjs";
|
|
117
117
|
import {
|
|
118
118
|
createFarmCspNonce,
|
|
119
119
|
createFarmCspNonceRewriter,
|
|
@@ -154,10 +154,10 @@ import {
|
|
|
154
154
|
import {
|
|
155
155
|
createFarmMarkdownRouteModuleFromFile,
|
|
156
156
|
loadFarmMdxComponents
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-5R3JQPWD.mjs";
|
|
158
158
|
import {
|
|
159
159
|
isFarmMarkdownPageFile
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-R7254L3R.mjs";
|
|
161
161
|
import {
|
|
162
162
|
resolveFarmMdxComponentsModulePath,
|
|
163
163
|
resolveMdxConfig
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
farmRequestWantsMarkdown,
|
|
171
171
|
getFarmMarkdownAlternatePath,
|
|
172
172
|
resolveMarkdownConfig
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-KPJYBSHL.mjs";
|
|
174
174
|
import {
|
|
175
175
|
resolveWorkflowsConfig
|
|
176
176
|
} from "./chunk-MGZVDX4R.mjs";
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
getIntegrationProviders,
|
|
182
182
|
getRegisteredIntegrationAPIManifest,
|
|
183
183
|
isFarmIntegrationProviderComponentReference
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-WW3LRNQV.mjs";
|
|
185
185
|
import {
|
|
186
186
|
initStorage
|
|
187
187
|
} from "./chunk-TJVUTGED.mjs";
|
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
_setDefaultFarmI18nRuntime,
|
|
209
209
|
createFarmI18nRuntime,
|
|
210
210
|
getFarmI18nClientSnapshot
|
|
211
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-3AUINHFG.mjs";
|
|
212
212
|
import {
|
|
213
213
|
formatOptionalPeerInstallHint,
|
|
214
214
|
isOptionalPeerInstalled
|
|
@@ -234,7 +234,7 @@ import {
|
|
|
234
234
|
} from "./chunk-RLEALQEN.mjs";
|
|
235
235
|
import {
|
|
236
236
|
sendWebResponse
|
|
237
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-O5QUJEWT.mjs";
|
|
238
238
|
import {
|
|
239
239
|
toFileModuleUrl
|
|
240
240
|
} from "./chunk-VHIXGZYH.mjs";
|
|
@@ -278,18 +278,18 @@ import {
|
|
|
278
278
|
} from "./chunk-2DA7CLY7.mjs";
|
|
279
279
|
import {
|
|
280
280
|
FARM_VERSION
|
|
281
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-NYF7A4UW.mjs";
|
|
282
282
|
import {
|
|
283
283
|
resolveFarmTrailingSlashRedirect,
|
|
284
284
|
setFarmTrailingSlashPreference
|
|
285
|
-
} from "./chunk-
|
|
285
|
+
} from "./chunk-4O26BPUY.mjs";
|
|
286
286
|
import {
|
|
287
287
|
normalizeFarmAPIConfig
|
|
288
288
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
289
289
|
import {
|
|
290
290
|
createFarmLocaleCookie,
|
|
291
291
|
getFarmLocaleVaryHeaders
|
|
292
|
-
} from "./chunk-
|
|
292
|
+
} from "./chunk-7A3URI2F.mjs";
|
|
293
293
|
import {
|
|
294
294
|
getFarmPageDataRedirect
|
|
295
295
|
} from "./chunk-SD6JGJOM.mjs";
|
|
@@ -302,14 +302,17 @@ import {
|
|
|
302
302
|
renderViewportHead,
|
|
303
303
|
resolveFarmNotFoundMetadata
|
|
304
304
|
} from "./chunk-S6O2L47H.mjs";
|
|
305
|
-
import {
|
|
306
|
-
FARM_DEPLOYMENT_ID_HEADER,
|
|
307
|
-
createFarmDeploymentCookie
|
|
308
|
-
} from "./chunk-NVOMQLI2.mjs";
|
|
309
305
|
import {
|
|
310
306
|
prepareDeferredData,
|
|
311
307
|
snapshotDeferredData
|
|
312
308
|
} from "./chunk-7BIW7VCW.mjs";
|
|
309
|
+
import {
|
|
310
|
+
FARM_DEPLOYMENT_ID_HEADER,
|
|
311
|
+
createFarmDeploymentCookie,
|
|
312
|
+
createFarmDeploymentMismatchResponse,
|
|
313
|
+
getFarmDeploymentMismatch,
|
|
314
|
+
withoutFarmDeploymentCookie
|
|
315
|
+
} from "./chunk-IWJONXPF.mjs";
|
|
313
316
|
import {
|
|
314
317
|
createFarmCacheKey
|
|
315
318
|
} from "./chunk-GLOICKDO.mjs";
|
|
@@ -355,10 +358,6 @@ import {
|
|
|
355
358
|
getRoutePatternShape
|
|
356
359
|
} from "./chunk-AYP2YFVN.mjs";
|
|
357
360
|
|
|
358
|
-
// src/routing/route-manager.ts
|
|
359
|
-
import { realpathSync } from "fs";
|
|
360
|
-
import path2 from "path";
|
|
361
|
-
|
|
362
361
|
// src/static-metadata-image.ts
|
|
363
362
|
import { createHash } from "crypto";
|
|
364
363
|
import { readFile } from "fs/promises";
|
|
@@ -425,6 +424,8 @@ async function readAltText(filePath) {
|
|
|
425
424
|
}
|
|
426
425
|
|
|
427
426
|
// src/routing/route-manager.ts
|
|
427
|
+
import { realpathSync } from "fs";
|
|
428
|
+
import path2 from "path";
|
|
428
429
|
function getRouteEntryDirectory(entry) {
|
|
429
430
|
return entry.directory ?? entry.pattern;
|
|
430
431
|
}
|
|
@@ -441,7 +442,7 @@ function getRouteSpecificity(entry) {
|
|
|
441
442
|
function compareRouteEntries(left, right) {
|
|
442
443
|
return compareRouteSpecificity(getRouteSpecificity(left), getRouteSpecificity(right));
|
|
443
444
|
}
|
|
444
|
-
var RouteManager = class {
|
|
445
|
+
var RouteManager = class _RouteManager {
|
|
445
446
|
constructor(config, viteServer) {
|
|
446
447
|
this.routes = /* @__PURE__ */ new Map();
|
|
447
448
|
this.pageRouteShapes = /* @__PURE__ */ new Map();
|
|
@@ -457,6 +458,7 @@ var RouteManager = class {
|
|
|
457
458
|
this.programmaticPages = /* @__PURE__ */ new Map();
|
|
458
459
|
this.programmaticLayouts = /* @__PURE__ */ new Map();
|
|
459
460
|
this.programmaticClientRoutes = mergeProgrammaticClientRoutes([]);
|
|
461
|
+
this.discovery = Promise.resolve();
|
|
460
462
|
this.reportedIslandsErrors = /* @__PURE__ */ new Set();
|
|
461
463
|
this.config = config;
|
|
462
464
|
this.viteServer = viteServer;
|
|
@@ -466,23 +468,39 @@ var RouteManager = class {
|
|
|
466
468
|
this.rendererRuntime = rendererRuntime;
|
|
467
469
|
}
|
|
468
470
|
/**
|
|
469
|
-
* Discover all routes in the app directory
|
|
471
|
+
* Discover all routes in the app directory.
|
|
472
|
+
*
|
|
473
|
+
* Requests keep matching the current routes until discovery finishes. Discovery awaits file and
|
|
474
|
+
* module reads, and a dev server runs it again for each page or layout a watcher reports, so
|
|
475
|
+
* clearing the tables first answered any request in between with a 404. Discoveries run one at
|
|
476
|
+
* a time, so an older scan never replaces a newer one.
|
|
470
477
|
*/
|
|
471
|
-
|
|
472
|
-
this.
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
478
|
+
discoverRoutes() {
|
|
479
|
+
const discovery = this.discovery.catch(() => {
|
|
480
|
+
}).then(async () => {
|
|
481
|
+
const next = new _RouteManager(this.config, this.viteServer);
|
|
482
|
+
await next.discoverInto();
|
|
483
|
+
this.invalidateClientManifest();
|
|
484
|
+
this.routes = next.routes;
|
|
485
|
+
this.pageRouteShapes = next.pageRouteShapes;
|
|
486
|
+
this.layouts = next.layouts;
|
|
487
|
+
this.orderedLayouts = next.orderedLayouts;
|
|
488
|
+
this.routeSlots = next.routeSlots;
|
|
489
|
+
this.routeSlotOwnerSegments = next.routeSlotOwnerSegments;
|
|
490
|
+
this.loadings = next.loadings;
|
|
491
|
+
this.errors = next.errors;
|
|
492
|
+
this.metadataImages = next.metadataImages;
|
|
493
|
+
this.metadataRoutes = next.metadataRoutes;
|
|
494
|
+
this.redirects = next.redirects;
|
|
495
|
+
this.programmaticPages = next.programmaticPages;
|
|
496
|
+
this.programmaticLayouts = next.programmaticLayouts;
|
|
497
|
+
this.programmaticClientRoutes = next.programmaticClientRoutes;
|
|
498
|
+
});
|
|
499
|
+
this.discovery = discovery;
|
|
500
|
+
return discovery;
|
|
501
|
+
}
|
|
502
|
+
/** Fill this manager's empty route tables. Only a fresh manager made by discoverRoutes runs it. */
|
|
503
|
+
async discoverInto() {
|
|
486
504
|
const programmaticClientRoutes = [];
|
|
487
505
|
for (const source of getFarmSourceRoots(this.config)) {
|
|
488
506
|
await this.discoverFileRoutes(source);
|
|
@@ -3309,6 +3327,12 @@ function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
|
|
|
3309
3327
|
}
|
|
3310
3328
|
var fullDocumentRoutes = /* @__PURE__ */ new Set();
|
|
3311
3329
|
var documentLayouts = /* @__PURE__ */ new WeakMap();
|
|
3330
|
+
var reportedRenderErrors = /* @__PURE__ */ new WeakMap();
|
|
3331
|
+
function emitFarmRenderError(req, route, error) {
|
|
3332
|
+
if (reportedRenderErrors.has(req) && reportedRenderErrors.get(req) === error) return;
|
|
3333
|
+
reportedRenderErrors.set(req, error);
|
|
3334
|
+
emitFarmEvent({ type: "render.error", route, error });
|
|
3335
|
+
}
|
|
3312
3336
|
function hasRequestHeader(req, name) {
|
|
3313
3337
|
const value = req.headers[name.toLowerCase()];
|
|
3314
3338
|
return Array.isArray(value) ? value.length > 0 : Boolean(value);
|
|
@@ -3830,7 +3854,7 @@ var ServerRenderer = class {
|
|
|
3830
3854
|
return createFarmCacheKey(["ssg", normalizeRevalidatePath(urlPath)]);
|
|
3831
3855
|
}
|
|
3832
3856
|
getPPRCacheKey(pathname, search = "", locale = "", origin = "") {
|
|
3833
|
-
const key = ["ppr", locale, normalizeRevalidatePath(pathname), search];
|
|
3857
|
+
const key = ["ppr", locale, normalizeRevalidatePath(pathname), search, this.getDeploymentId()];
|
|
3834
3858
|
return createFarmCacheKey(origin ? [...key, origin] : key);
|
|
3835
3859
|
}
|
|
3836
3860
|
getCachedSSGPage(urlPath) {
|
|
@@ -3886,7 +3910,7 @@ var ServerRenderer = class {
|
|
|
3886
3910
|
if (method !== "GET" && method !== "HEAD") {
|
|
3887
3911
|
return "method";
|
|
3888
3912
|
}
|
|
3889
|
-
if (req.headers.cookie) {
|
|
3913
|
+
if (withoutFarmDeploymentCookie(req.headers.cookie)) {
|
|
3890
3914
|
return "cookie";
|
|
3891
3915
|
}
|
|
3892
3916
|
if (req.headers.authorization) {
|
|
@@ -4145,8 +4169,14 @@ var ServerRenderer = class {
|
|
|
4145
4169
|
completeRender(res.statusCode || 200, pathname);
|
|
4146
4170
|
return;
|
|
4147
4171
|
}
|
|
4148
|
-
this.applyDeploymentHeaders(req, res);
|
|
4149
4172
|
const match = this.routeManager.matchRoute(pathname);
|
|
4173
|
+
const deploymentMismatch = match.route ? this.getDeploymentMismatch(req) : null;
|
|
4174
|
+
if (deploymentMismatch) {
|
|
4175
|
+
await sendWebResponse(res, createFarmDeploymentMismatchResponse(deploymentMismatch));
|
|
4176
|
+
completeRender(res.statusCode, match.route.pattern);
|
|
4177
|
+
return;
|
|
4178
|
+
}
|
|
4179
|
+
if (match.route) this.applyDeploymentHeaders(req, res);
|
|
4150
4180
|
if (match.route) {
|
|
4151
4181
|
const redirectLocation = resolveFarmTrailingSlashRedirect(url, this.config.trailingSlash);
|
|
4152
4182
|
if (redirectLocation) {
|
|
@@ -4179,7 +4209,7 @@ var ServerRenderer = class {
|
|
|
4179
4209
|
}
|
|
4180
4210
|
emitFarmEvent({ type: "route.notFound", pathname });
|
|
4181
4211
|
await this.render404(req, res);
|
|
4182
|
-
completeRender(
|
|
4212
|
+
completeRender(res.statusCode);
|
|
4183
4213
|
return;
|
|
4184
4214
|
}
|
|
4185
4215
|
emitFarmEvent({
|
|
@@ -4762,7 +4792,7 @@ var ServerRenderer = class {
|
|
|
4762
4792
|
return;
|
|
4763
4793
|
}
|
|
4764
4794
|
}
|
|
4765
|
-
|
|
4795
|
+
emitFarmRenderError(req, pathname, error);
|
|
4766
4796
|
const errorStatus = resolveDefaultErrorStatus(error);
|
|
4767
4797
|
if (pprRefreshRoute) {
|
|
4768
4798
|
emitFarmEvent({
|
|
@@ -5107,7 +5137,9 @@ var ServerRenderer = class {
|
|
|
5107
5137
|
origin: new URL(request2.url).origin,
|
|
5108
5138
|
config: this.getAgentSitemap(),
|
|
5109
5139
|
metadataBase: rootMetadata?.metadataBase,
|
|
5110
|
-
basePath: this.config.basePath
|
|
5140
|
+
basePath: this.config.basePath,
|
|
5141
|
+
trailingSlash: this.config.trailingSlash,
|
|
5142
|
+
i18n: this.i18nRuntime?.config
|
|
5111
5143
|
}
|
|
5112
5144
|
);
|
|
5113
5145
|
await sendWebResponse(
|
|
@@ -5178,11 +5210,13 @@ var ServerRenderer = class {
|
|
|
5178
5210
|
const server = this.getDefaultMCPServer();
|
|
5179
5211
|
const request2 = getCurrentRequestOrNull() ?? createWebRequestFromFarmRequest(req, { trustProxy: this.config.server?.trustProxy });
|
|
5180
5212
|
try {
|
|
5181
|
-
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-
|
|
5213
|
+
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-CPU354QQ.mjs");
|
|
5182
5214
|
const origin = new URL(request2.url).origin;
|
|
5215
|
+
const i18n = this.i18nRuntime?.config;
|
|
5183
5216
|
const response = await handleFarmDefaultMCPRequest(request2, {
|
|
5184
5217
|
server,
|
|
5185
5218
|
basePath: this.config.basePath,
|
|
5219
|
+
i18n,
|
|
5186
5220
|
listPages: async () => {
|
|
5187
5221
|
const sources = await Promise.all(
|
|
5188
5222
|
this.getAgentListedRoutes().map(async ([pattern, route]) => {
|
|
@@ -5196,7 +5230,9 @@ var ServerRenderer = class {
|
|
|
5196
5230
|
{
|
|
5197
5231
|
origin,
|
|
5198
5232
|
basePath: this.config.basePath,
|
|
5199
|
-
markdown: resolveMarkdownConfig(this.config.md)
|
|
5233
|
+
markdown: resolveMarkdownConfig(this.config.md),
|
|
5234
|
+
trailingSlash: this.config.trailingSlash,
|
|
5235
|
+
i18n
|
|
5200
5236
|
}
|
|
5201
5237
|
);
|
|
5202
5238
|
},
|
|
@@ -5245,7 +5281,9 @@ var ServerRenderer = class {
|
|
|
5245
5281
|
basePath: this.config.basePath,
|
|
5246
5282
|
markdown: resolveMarkdownConfig(this.config.md),
|
|
5247
5283
|
include: config.include,
|
|
5248
|
-
exclude: config.exclude
|
|
5284
|
+
exclude: config.exclude,
|
|
5285
|
+
trailingSlash: this.config.trailingSlash,
|
|
5286
|
+
i18n: this.i18nRuntime?.config
|
|
5249
5287
|
}
|
|
5250
5288
|
);
|
|
5251
5289
|
return {
|
|
@@ -5651,7 +5689,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
5651
5689
|
durationMs: Date.now() - startedAt
|
|
5652
5690
|
});
|
|
5653
5691
|
} catch (error) {
|
|
5654
|
-
|
|
5692
|
+
emitFarmRenderError(req, route, error);
|
|
5655
5693
|
throw error;
|
|
5656
5694
|
} finally {
|
|
5657
5695
|
clearMiddlewareData?.();
|
|
@@ -6083,11 +6121,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6083
6121
|
didError = true;
|
|
6084
6122
|
if (!isWebResponse(error) && !isFarmRedirectError(error) && !isFarmNotFoundError(error)) {
|
|
6085
6123
|
logger.error(`SSR shell error: ${error}`);
|
|
6086
|
-
|
|
6087
|
-
type: "render.error",
|
|
6088
|
-
route: observabilityRoute,
|
|
6089
|
-
error
|
|
6090
|
-
});
|
|
6124
|
+
emitFarmRenderError(req, observabilityRoute, error);
|
|
6091
6125
|
}
|
|
6092
6126
|
if (clearMiddlewareData) {
|
|
6093
6127
|
clearMiddlewareData();
|
|
@@ -6103,11 +6137,7 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6103
6137
|
}
|
|
6104
6138
|
if (!isWebResponse(error)) {
|
|
6105
6139
|
logger.error(`SSR streaming error: ${error}`);
|
|
6106
|
-
|
|
6107
|
-
type: "render.error",
|
|
6108
|
-
route: observabilityRoute,
|
|
6109
|
-
error
|
|
6110
|
-
});
|
|
6140
|
+
emitFarmRenderError(req, observabilityRoute, error);
|
|
6111
6141
|
}
|
|
6112
6142
|
}
|
|
6113
6143
|
});
|
|
@@ -6218,6 +6248,14 @@ window.__FARM_I18N__ = ${getFarmI18nClientSnapshot() ? serializeInlineValue(getF
|
|
|
6218
6248
|
res.end(JSON.stringify({ error: "Not found", pathname }));
|
|
6219
6249
|
return;
|
|
6220
6250
|
}
|
|
6251
|
+
if (res.getHeader(FARM_DEPLOYMENT_ID_HEADER) === void 0) {
|
|
6252
|
+
const deploymentMismatch = this.getDeploymentMismatch(req);
|
|
6253
|
+
if (deploymentMismatch) {
|
|
6254
|
+
await sendWebResponse(res, createFarmDeploymentMismatchResponse(deploymentMismatch));
|
|
6255
|
+
return;
|
|
6256
|
+
}
|
|
6257
|
+
this.applyDeploymentHeaders(req, res);
|
|
6258
|
+
}
|
|
6221
6259
|
const acceptHeader = req.headers.accept;
|
|
6222
6260
|
const accept = Array.isArray(acceptHeader) ? acceptHeader.join(",") : acceptHeader;
|
|
6223
6261
|
if (farmRequestWantsMarkdown(pathname, accept)) {
|
|
@@ -6440,6 +6478,17 @@ ${clientScript}
|
|
|
6440
6478
|
res.setHeader("Set-Cookie", cookie);
|
|
6441
6479
|
}
|
|
6442
6480
|
}
|
|
6481
|
+
getDeploymentMismatch(req) {
|
|
6482
|
+
const headers = new Headers();
|
|
6483
|
+
for (const name of [FARM_DEPLOYMENT_ID_HEADER, "cookie"]) {
|
|
6484
|
+
const value = req.headers[name];
|
|
6485
|
+
if (value) headers.set(name, Array.isArray(value) ? value.join("; ") : value);
|
|
6486
|
+
}
|
|
6487
|
+
return getFarmDeploymentMismatch(
|
|
6488
|
+
{ method: req.method || "GET", headers },
|
|
6489
|
+
this.getDeploymentId()
|
|
6490
|
+
);
|
|
6491
|
+
}
|
|
6443
6492
|
getDeploymentId() {
|
|
6444
6493
|
return this.config.deploymentId || "development";
|
|
6445
6494
|
}
|
|
@@ -7570,6 +7619,7 @@ ${FARM_DARK_VARIANT}
|
|
|
7570
7619
|
}
|
|
7571
7620
|
|
|
7572
7621
|
export {
|
|
7622
|
+
inspectStaticMetadataImage,
|
|
7573
7623
|
RouteManager,
|
|
7574
7624
|
resolveDevGlobalStylesheetHref,
|
|
7575
7625
|
collectDevStylesheetUrls,
|
|
@@ -31,8 +31,37 @@ function reconcileFarmDocumentHead(nextDocument) {
|
|
|
31
31
|
document.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => node.remove());
|
|
32
32
|
nextDocument.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => document.head.appendChild(document.importNode(node, true)));
|
|
33
33
|
}
|
|
34
|
+
function createFarmMetadataHeadReconciler(initialMarkup) {
|
|
35
|
+
const candidates = Array.from(
|
|
36
|
+
document.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR)
|
|
37
|
+
).reverse();
|
|
38
|
+
const claimed = /* @__PURE__ */ new Set();
|
|
39
|
+
for (const node of parseFarmHeadMarkup(initialMarkup)) {
|
|
40
|
+
const match = candidates.find(
|
|
41
|
+
(candidate) => !claimed.has(candidate) && candidate.isEqualNode(node)
|
|
42
|
+
);
|
|
43
|
+
if (match) claimed.add(match);
|
|
44
|
+
}
|
|
45
|
+
let current = initialMarkup;
|
|
46
|
+
let owned = Array.from(claimed);
|
|
47
|
+
return (markup) => {
|
|
48
|
+
if (markup === current) return;
|
|
49
|
+
current = markup;
|
|
50
|
+
for (const node of owned) node.remove();
|
|
51
|
+
owned = parseFarmHeadMarkup(markup).map(
|
|
52
|
+
(node) => document.head.appendChild(document.importNode(node, true))
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function parseFarmHeadMarkup(markup) {
|
|
57
|
+
if (!markup) return [];
|
|
58
|
+
const template = document.createElement("template");
|
|
59
|
+
template.innerHTML = markup;
|
|
60
|
+
return Array.from(template.content.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR));
|
|
61
|
+
}
|
|
34
62
|
|
|
35
63
|
export {
|
|
36
64
|
FARM_NAVIGATION_HEAD_SELECTOR,
|
|
37
|
-
reconcileFarmDocumentHead
|
|
65
|
+
reconcileFarmDocumentHead,
|
|
66
|
+
createFarmMetadataHeadReconciler
|
|
38
67
|
};
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
APIRouteConflictError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-E77IA5IF.mjs";
|
|
13
13
|
import {
|
|
14
14
|
findProgrammaticRouteFilesInDir
|
|
15
15
|
} from "./chunk-TXE4SAMV.mjs";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-IGL6CO6M.mjs";
|
|
36
36
|
import {
|
|
37
37
|
sendWebResponse
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-O5QUJEWT.mjs";
|
|
39
39
|
import {
|
|
40
40
|
loadFarmDevModule
|
|
41
41
|
} from "./chunk-TUOO6IK3.mjs";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
import {
|
|
56
56
|
createFarmLocaleCookie,
|
|
57
57
|
getFarmLocaleVaryHeaders
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-7A3URI2F.mjs";
|
|
59
59
|
import {
|
|
60
60
|
resolveFarmRequestURL
|
|
61
61
|
} from "./chunk-5OFNUETM.mjs";
|