@farm.js/core 0.1.68 → 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-Uh5xr7aX.d.ts → agent-mcp.d-DulgFLBt.d.ts} +13 -4
- package/dist/{agent-mcp.d-wkVPK1GA.d.mts → 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-CQDU7E3Y.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 -24
- package/dist/api.d.ts +8 -24
- package/dist/api.mjs +5 -5
- package/dist/{app-manifest.d-Dd4q5CFx.d.mts → app-manifest.d-6zXb90o6.d.mts} +1 -1
- package/dist/{app-manifest.d-BT5i2F-o.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-BVOpL_f2.d.ts → app.d-C2xeMIYT.d.ts} +18 -8
- package/dist/{app.d-BhiDXex_.d.mts → app.d-DF0aundc.d.mts} +18 -8
- package/dist/{base-path.d-BOUV5ozD.d.mts → base-path.d-BJ3SYpB8.d.mts} +7 -1
- package/dist/{base-path.d-BOUV5ozD.d.ts → base-path.d-BJ3SYpB8.d.ts} +7 -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-URN7VFO7.cjs → chunk-32SYRIQ7.cjs} +21 -22
- package/dist/{chunk-CV6MFQ4Y.mjs → chunk-3AUINHFG.mjs} +1 -1
- package/dist/{chunk-KDO6T6OB.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-NT4W4H52.mjs → chunk-3WS5AZ3R.mjs} +23 -18
- 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-5JKDFRTK.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-VFNAK6A5.mjs → chunk-A2TH5MKE.mjs} +9 -5
- package/dist/{chunk-225APHKC.cjs → chunk-A7HCBHMC.cjs} +3 -3
- package/dist/{chunk-VX2HZGC7.cjs → chunk-ACGBXN3U.cjs} +2 -2
- package/dist/{chunk-Z3PW3DIR.cjs → chunk-BPUVDCGG.cjs} +5 -5
- package/dist/{chunk-FT6KJHS3.cjs → chunk-C2JOS77Z.cjs} +4 -1
- package/dist/{chunk-DIXFKAPM.mjs → chunk-CCHJWJGP.mjs} +297 -148
- package/dist/{chunk-CRVSYDHV.mjs → chunk-CKQAQFF6.mjs} +2 -2
- package/dist/chunk-DC2AXGNZ.mjs +129 -0
- package/dist/{chunk-TNK2TVRS.cjs → chunk-DIHBWZDZ.cjs} +449 -352
- package/dist/{chunk-JSOCDYER.cjs → chunk-DMXMIE2C.cjs} +15 -1
- 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-VRGY3X2I.mjs → chunk-EDZU7YRK.mjs} +8 -9
- 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-KWCZKJYU.cjs → chunk-FJ5YCERM.cjs} +581 -432
- package/dist/{chunk-PDFFYZAT.cjs → chunk-GF22VGMS.cjs} +2 -2
- package/dist/{chunk-OOJBBHYW.cjs → chunk-GVYZCJZH.cjs} +30 -1
- package/dist/{chunk-MNJDNTGO.mjs → chunk-HAXFV2CD.mjs} +1 -1
- package/dist/{chunk-DXZ57EPE.mjs → chunk-I4KPA2C6.mjs} +14 -0
- package/dist/{chunk-LDEXTX4I.cjs → chunk-I7NUT24Z.cjs} +29 -22
- package/dist/{chunk-MZ4CRSY7.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-WUTFJOV7.cjs → chunk-JFPKARWM.cjs} +16 -8
- package/dist/{chunk-A3T445WK.mjs → chunk-JFVT5ZZV.mjs} +9 -2
- package/dist/{chunk-WPB67LE5.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-YTNBCXCW.cjs → chunk-K4UGCUXX.cjs} +17 -13
- 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-Z6SOXHAD.mjs → chunk-KPMLDT3B.mjs} +208 -111
- package/dist/{chunk-KI3MU7B5.mjs → chunk-LDVJIBGN.mjs} +1 -1
- package/dist/{chunk-IGDYL2IA.cjs → chunk-LECZ5DPZ.cjs} +2 -2
- package/dist/{chunk-5FBZJJGA.mjs → chunk-LXEJNWF5.mjs} +2 -2
- package/dist/{chunk-F36LS2C7.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-SQ6IWJ3H.cjs → chunk-MZLJFNMH.cjs} +1 -1
- package/dist/{chunk-6OFOIMNS.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-F6CMGWAL.mjs → chunk-NYF7A4UW.mjs} +1 -1
- package/dist/{chunk-QO43L7Z4.cjs → chunk-O32QPFVV.cjs} +25 -7
- package/dist/{chunk-5IQ2ERQA.cjs → chunk-O47W53D3.cjs} +1 -1
- package/dist/{chunk-CO6UYM2D.mjs → chunk-O5QUJEWT.mjs} +1 -1
- package/dist/{chunk-JL2YW5KX.mjs → chunk-OAEDVXVE.mjs} +44 -1
- package/dist/{chunk-3TXKFRSO.mjs → chunk-OEL5EPOJ.mjs} +1 -1
- package/dist/{chunk-KSZK34HU.mjs → chunk-PJQ5W356.mjs} +16 -8
- package/dist/{chunk-BZWTBELF.cjs → chunk-Q5HMVGR5.cjs} +87 -17
- package/dist/{chunk-5NFQ6AZI.cjs → chunk-QEWWKYDL.cjs} +25 -10
- package/dist/{chunk-QOSDWGKT.mjs → chunk-QVBXTSIZ.mjs} +1 -1
- package/dist/{chunk-T5XFZQCL.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-4UAQB5LB.mjs → chunk-RMOU3PR4.mjs} +112 -62
- package/dist/{chunk-WYL4ODZ4.mjs → chunk-SE7HPBYK.mjs} +30 -1
- package/dist/{chunk-2ZOYOYEE.mjs → chunk-THG2TVDH.mjs} +73 -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-7LK5CTUM.cjs → chunk-XYVPTTUT.cjs} +31 -26
- 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-BvQOxSqh.d.mts → client-component.d-Bk5qKJM-.d.mts} +2 -2
- package/dist/{client-component.d-DNVSLEPi.d.ts → client-component.d-DNbC4oWI.d.ts} +2 -2
- package/dist/{client-plugins.d-CNDqcAuf.d.ts → client-plugins.d-DwUqh4gp.d.ts} +50 -5
- package/dist/{client-plugins.d-CE1lVK2R.d.mts → client-plugins.d-Pi9nG0W0.d.mts} +50 -5
- 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-2A2GPC7B.mjs → devtools-CB43AHEP.mjs} +8 -7
- package/dist/{devtools-R27T3BRY.cjs → devtools-L5DUNDF3.cjs} +9 -8
- package/dist/docs.cjs +14 -11
- package/dist/docs.d.mts +17 -4
- package/dist/docs.d.ts +17 -4
- package/dist/docs.mjs +14 -11
- 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/image/server.cjs +2 -2
- package/dist/image/server.mjs +1 -1
- package/dist/image/sharp.cjs +9 -9
- package/dist/image/sharp.mjs +1 -1
- package/dist/index.cjs +49 -45
- package/dist/{index.d-Bt3kl19W.d.mts → index.d-CbvOjJcp.d.mts} +1 -1
- package/dist/{index.d-Cx_-DaKV.d.ts → index.d-c9UwIqDy.d.ts} +1 -1
- package/dist/index.d.mts +26 -24
- package/dist/index.d.ts +26 -24
- package/dist/index.mjs +63 -59
- 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 +36 -37
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +35 -36
- 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 +52 -17
- package/dist/internal/production-runtime.d.mts +57 -20
- package/dist/internal/production-runtime.d.ts +57 -20
- package/dist/internal/production-runtime.mjs +55 -20
- 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-Bki4pOaJ.d.mts → mount.d-BvWxf8ZE.d.mts} +1 -1
- package/dist/{mount.d-DjR5aerM.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-VDkziXTK.d.mts → navigation-delegate.d-CMyl1h2l.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CtghaSP3.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-WIU4GDD4.cjs → plugin-F2O4BFTK.cjs} +2 -2
- package/dist/{plugin-SAS22JL7.mjs → plugin-VEBRN7A3.mjs} +1 -1
- package/dist/plugin.cjs +30 -29
- package/dist/plugin.d.mts +6 -4
- package/dist/plugin.d.ts +6 -4
- package/dist/plugin.mjs +29 -28
- 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-i9sI4tc9.d.ts → render-plan.d-DQj2bzd2.d.ts} +1 -1
- package/dist/{render-plan.d-BSwV8PE4.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-Dgln8tuI.d.ts → request.d-C5vyoYeL.d.ts} +1 -1
- package/dist/{request.d-C24FNQ_7.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-Ds0BfwQi.d.mts → route-rendering.d-C-et2TZ1.d.mts} +9 -2
- package/dist/{route-rendering.d-CUylZKJA.d.ts → route-rendering.d-DhsY5M2I.d.ts} +9 -2
- package/dist/{router.d-CFPcbqzc.d.mts → router.d-BMDS5s5X.d.mts} +1 -1
- package/dist/{router.d-B56rMOFm.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-GA4AQWZI.mjs → rsc-pipeline-AXQJCCHI.mjs} +12 -12
- package/dist/{rsc-pipeline-3T7V6OUT.cjs → rsc-pipeline-NJKLZ3YE.cjs} +13 -13
- package/dist/{runtime-REUTNTI5.cjs → runtime-DMW6DDOI.cjs} +19 -18
- package/dist/{runtime-ZYCKKY7L.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-DLRO-ExG.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-H7k9hOQE.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 +64 -56
- package/dist/server.d.mts +23 -14
- package/dist/server.d.ts +23 -14
- package/dist/server.mjs +40 -32
- package/dist/{spa-router.d-Dr7oanhl.d.ts → spa-router.d-l0d9pPZj.d.ts} +3 -3
- package/dist/{spa-router.d-g4CzhEH1.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-BxxyDEb8.d.ts → utils.d-BK-PTOF8.d.ts} +1 -1
- package/dist/{utils.d-HIla3pD_.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 +37 -29
- package/dist/vite.d.mts +26 -6
- package/dist/vite.d.ts +26 -6
- package/dist/vite.mjs +36 -28
- package/package.json +3 -3
- package/dist/analyzer-PPAHM4AW.cjs +0 -16
- package/dist/chunk-HHLEYA4B.cjs +0 -17
- package/dist/chunk-QYNZ3CTI.mjs +0 -17
- package/dist/response.d-BolW0Vx_.d.mts +0 -10
- package/dist/response.d-BolW0Vx_.d.ts +0 -10
|
@@ -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,10 +35,14 @@ 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";
|
|
42
|
+
import {
|
|
43
|
+
isFarmI18nCatalogFile,
|
|
44
|
+
resolveFarmI18nConfig
|
|
45
|
+
} from "./chunk-MU5V7XHL.mjs";
|
|
42
46
|
import {
|
|
43
47
|
toPosixPath,
|
|
44
48
|
toViteModuleId
|
|
@@ -48,6 +52,10 @@ import {
|
|
|
48
52
|
readNodeRequestBody,
|
|
49
53
|
resolveFarmServerConfig
|
|
50
54
|
} from "./chunk-QDWMCFTH.mjs";
|
|
55
|
+
import {
|
|
56
|
+
createFarmLocaleCookie,
|
|
57
|
+
getFarmLocaleVaryHeaders
|
|
58
|
+
} from "./chunk-7A3URI2F.mjs";
|
|
51
59
|
import {
|
|
52
60
|
resolveFarmRequestURL
|
|
53
61
|
} from "./chunk-5OFNUETM.mjs";
|
|
@@ -59,6 +67,30 @@ import {
|
|
|
59
67
|
|
|
60
68
|
// src/api/vite-plugin.ts
|
|
61
69
|
import nodePath from "path";
|
|
70
|
+
function createDevI18n(server) {
|
|
71
|
+
const farmConfig = server.config;
|
|
72
|
+
if (!farmConfig.i18n) return void 0;
|
|
73
|
+
return loadDevI18n(
|
|
74
|
+
server,
|
|
75
|
+
resolveFarmI18nConfig(farmConfig.i18n, {
|
|
76
|
+
root: server.config.root,
|
|
77
|
+
mode: "development",
|
|
78
|
+
basePath: farmConfig.basePath ?? "/"
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
async function loadDevI18n(server, config) {
|
|
83
|
+
const { _runWithFarmI18nRequest, createFarmI18nRuntime } = await import("./i18n/server.mjs");
|
|
84
|
+
const runtime = createFarmI18nRuntime(config);
|
|
85
|
+
await runtime.initialize();
|
|
86
|
+
server.watcher?.on?.("change", (file) => {
|
|
87
|
+
if (!isFarmI18nCatalogFile(config, file)) return;
|
|
88
|
+
runtime.reload().catch((error) => {
|
|
89
|
+
console.error("[FARM] Could not reload the i18n catalogs:", error);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
return { runtime, run: _runWithFarmI18nRequest };
|
|
93
|
+
}
|
|
62
94
|
function farmApiPlugin(options = {}) {
|
|
63
95
|
const srcDir = options.srcDir ?? "src";
|
|
64
96
|
const apiDirFromRoot = options.apiDir ?? nodePath.join(srcDir, "api");
|
|
@@ -395,6 +427,43 @@ function farmApiPlugin(options = {}) {
|
|
|
395
427
|
isReady: () => discoveryComplete,
|
|
396
428
|
waitForDiscovery
|
|
397
429
|
};
|
|
430
|
+
const devI18n = createDevI18n(server);
|
|
431
|
+
devI18n?.catch(() => {
|
|
432
|
+
});
|
|
433
|
+
const runWithDevI18n = async (req, res, handle) => {
|
|
434
|
+
const i18n = await devI18n;
|
|
435
|
+
const pathname = (req.url || "/").split("?")[0];
|
|
436
|
+
if (!isFarmAPIPathname(pathname, basePath) && !matchAPIRouteAtBasePath(servedRoutes(), pathname, basePath)) {
|
|
437
|
+
return handle();
|
|
438
|
+
}
|
|
439
|
+
const headers = new Headers();
|
|
440
|
+
for (const [key, value] of Object.entries(req.headers)) {
|
|
441
|
+
if (value) headers.set(key, Array.isArray(value) ? value.join(", ") : value);
|
|
442
|
+
}
|
|
443
|
+
const request = new Request(resolveFarmRequestURL(req), { headers });
|
|
444
|
+
return i18n.run(
|
|
445
|
+
i18n.runtime,
|
|
446
|
+
request,
|
|
447
|
+
(resolution) => {
|
|
448
|
+
const config = i18n.runtime.config;
|
|
449
|
+
const vary = getFarmLocaleVaryHeaders(config, resolution);
|
|
450
|
+
if (vary.length > 0) {
|
|
451
|
+
const current = String(res.getHeader("Vary") ?? "");
|
|
452
|
+
res.setHeader("Vary", [current, ...vary].filter(Boolean).join(", "));
|
|
453
|
+
}
|
|
454
|
+
if (resolution.persist) {
|
|
455
|
+
const cookies = res.getHeader("Set-Cookie");
|
|
456
|
+
const cookie = createFarmLocaleCookie(resolution.locale, config);
|
|
457
|
+
res.setHeader(
|
|
458
|
+
"Set-Cookie",
|
|
459
|
+
cookies === void 0 ? cookie : [...[cookies].flat().map(String), cookie]
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
return handle();
|
|
463
|
+
},
|
|
464
|
+
{ redirect: false }
|
|
465
|
+
);
|
|
466
|
+
};
|
|
398
467
|
return () => {
|
|
399
468
|
const apiMiddleware = _withAfterNodeMiddleware(async (req, res, next) => {
|
|
400
469
|
const url = req.url || "/";
|
|
@@ -473,13 +542,14 @@ function farmApiPlugin(options = {}) {
|
|
|
473
542
|
}
|
|
474
543
|
});
|
|
475
544
|
server.middlewares.use((req, res, next) => {
|
|
476
|
-
const
|
|
545
|
+
const handle = () => _runWithAPIRequestRuntime(
|
|
477
546
|
{
|
|
478
547
|
basePath: basePath ?? "/api",
|
|
479
548
|
dispatch: async (request) => apiRouterHandler ? apiRouterHandler(request) : Response.json({ error: "Not Found" }, { status: 404 })
|
|
480
549
|
},
|
|
481
550
|
() => apiMiddleware(req, res, next)
|
|
482
551
|
);
|
|
552
|
+
const result = devI18n ? runWithDevI18n(req, res, handle) : handle();
|
|
483
553
|
return Promise.resolve(result).catch((error) => {
|
|
484
554
|
console.error(
|
|
485
555
|
`[FARM] Unhandled API error while handling ${req.method || "GET"} ${req.url || "/"}:`,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FARM_DEFAULT_MCP_DESCRIPTION,
|
|
3
3
|
FARM_DEFAULT_MCP_PROTOCOL_VERSIONS,
|
|
4
|
-
FARM_DEFAULT_MCP_TOOLS
|
|
5
|
-
|
|
4
|
+
FARM_DEFAULT_MCP_TOOLS,
|
|
5
|
+
resolveFarmDefaultMCPI18n
|
|
6
|
+
} from "./chunk-75E5FDX2.mjs";
|
|
7
|
+
import {
|
|
8
|
+
resolveFarmLocalePath
|
|
9
|
+
} from "./chunk-7S7AAK2D.mjs";
|
|
6
10
|
import {
|
|
7
11
|
stripFarmBasePath
|
|
8
12
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -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
|
+
resolveFarmDefaultMCPI18n(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 {
|
|
209
218
|
return null;
|
|
210
219
|
}
|
|
211
|
-
|
|
220
|
+
if (i18n) {
|
|
221
|
+
const match = resolveFarmLocalePath(path, i18n);
|
|
222
|
+
if (match.explicit && match.locale !== i18n.defaultLocale) return null;
|
|
223
|
+
path = match.pathname;
|
|
224
|
+
} else {
|
|
225
|
+
path = stripFarmBasePath(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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJWY66PIDcjs = require('./chunk-JWY66PID.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -54,7 +54,7 @@ function _applyFarmMobileShellClient(request, response, client, onPrivate) {
|
|
|
54
54
|
return _chunkA25FXJ7Dcjs._withFarmResponseHeaders.call(void 0, response, (headers2) => appendVary(headers2, FARM_SHELL_HEADER));
|
|
55
55
|
}
|
|
56
56
|
_optionalChain([onPrivate, 'optionalCall', _8 => _8()]);
|
|
57
|
-
const headers = new Headers(
|
|
57
|
+
const headers = new Headers(_chunkJWY66PIDcjs._withFarmGuardedResponseCache.call(void 0, response).headers);
|
|
58
58
|
appendVary(headers, FARM_SHELL_HEADER);
|
|
59
59
|
headers.delete("content-length");
|
|
60
60
|
headers.delete("etag");
|
|
@@ -28,7 +28,7 @@ var _chunkQQ44FYROcjs = require('./chunk-QQ44FYRO.cjs');
|
|
|
28
28
|
var _chunkI2BYNELAcjs = require('./chunk-I2BYNELA.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -1166,7 +1166,7 @@ function LinkInner({
|
|
|
1166
1166
|
const baseHref = resolveLinkHref(href, params, {
|
|
1167
1167
|
query,
|
|
1168
1168
|
hash,
|
|
1169
|
-
trailingSlash: _nullishCoalesce(trailingSlash, () => (
|
|
1169
|
+
trailingSlash: _nullishCoalesce(trailingSlash, () => ( _chunkDVJM55D2cjs.getFarmTrailingSlashPreference.call(void 0, )))
|
|
1170
1170
|
});
|
|
1171
1171
|
const localizedHref = _chunkRI3EVPKDcjs.localizeActiveFarmHref.call(void 0, baseHref, locale);
|
|
1172
1172
|
const resolvedHref = isExternalUrl(localizedHref) ? localizedHref : _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, localizedHref, _nullishCoalesce(_optionalChain([farm, 'optionalAccess', _34 => _34.basePath]), () => ( _chunkD22BUQKWcjs.getFarmBasePath.call(void 0, ))));
|