@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
|
@@ -9,7 +9,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
9
9
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkK66JILV3cjs = require('./chunk-K66JILV3.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkQEJWNXRIcjs = require('./chunk-QEJWNXRI.cjs');
|
|
@@ -35,13 +35,17 @@ var _chunkE7QOEV5Zcjs = require('./chunk-E7QOEV5Z.cjs');
|
|
|
35
35
|
var _chunkY3WG64CPcjs = require('./chunk-Y3WG64CP.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
+
var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
45
49
|
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
46
50
|
|
|
47
51
|
|
|
@@ -50,6 +54,10 @@ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
|
50
54
|
var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
51
55
|
|
|
52
56
|
|
|
57
|
+
|
|
58
|
+
var _chunkY2SZVIVHcjs = require('./chunk-Y2SZVIVH.cjs');
|
|
59
|
+
|
|
60
|
+
|
|
53
61
|
var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
|
|
54
62
|
|
|
55
63
|
|
|
@@ -59,6 +67,30 @@ var _chunkYTVSWXEZcjs = require('./chunk-YTVSWXEZ.cjs');
|
|
|
59
67
|
|
|
60
68
|
// src/api/vite-plugin.ts
|
|
61
69
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
70
|
+
function createDevI18n(server) {
|
|
71
|
+
const farmConfig = server.config;
|
|
72
|
+
if (!farmConfig.i18n) return void 0;
|
|
73
|
+
return loadDevI18n(
|
|
74
|
+
server,
|
|
75
|
+
_chunkLNVGXUL3cjs.resolveFarmI18nConfig.call(void 0, farmConfig.i18n, {
|
|
76
|
+
root: server.config.root,
|
|
77
|
+
mode: "development",
|
|
78
|
+
basePath: _nullishCoalesce(farmConfig.basePath, () => ( "/"))
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
async function loadDevI18n(server, config) {
|
|
83
|
+
const { _runWithFarmI18nRequest, createFarmI18nRuntime } = await import("./i18n/server.cjs");
|
|
84
|
+
const runtime = createFarmI18nRuntime(config);
|
|
85
|
+
await runtime.initialize();
|
|
86
|
+
_optionalChain([server, 'access', _ => _.watcher, 'optionalAccess', _2 => _2.on, 'optionalCall', _3 => _3("change", (file) => {
|
|
87
|
+
if (!_chunkLNVGXUL3cjs.isFarmI18nCatalogFile.call(void 0, 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 = _nullishCoalesce(options.srcDir, () => ( "src"));
|
|
64
96
|
const apiDirFromRoot = _nullishCoalesce(options.apiDir, () => ( _path2.default.join(srcDir, "api")));
|
|
@@ -114,9 +146,9 @@ function farmApiPlugin(options = {}) {
|
|
|
114
146
|
registerRouteShape(routePath, filePath);
|
|
115
147
|
const normalizedMethod = method.toUpperCase();
|
|
116
148
|
const existing = apiRoutesCache.get(routePath);
|
|
117
|
-
const existingFile = _optionalChain([endpointSources, 'access',
|
|
149
|
+
const existingFile = _optionalChain([endpointSources, 'access', _4 => _4.get, 'call', _5 => _5(routePath), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(normalizedMethod)]);
|
|
118
150
|
if (existingFile) {
|
|
119
|
-
throw new (0,
|
|
151
|
+
throw new (0, _chunkK66JILV3cjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
|
|
120
152
|
}
|
|
121
153
|
if (existing) {
|
|
122
154
|
if (!existing.methods.includes(normalizedMethod)) {
|
|
@@ -291,7 +323,7 @@ function farmApiPlugin(options = {}) {
|
|
|
291
323
|
log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
|
|
292
324
|
}
|
|
293
325
|
} catch (e) {
|
|
294
|
-
if (e instanceof
|
|
326
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
295
327
|
log(`API route load failed at ${filePath}: ${e.message}`);
|
|
296
328
|
}
|
|
297
329
|
}
|
|
@@ -318,7 +350,7 @@ function farmApiPlugin(options = {}) {
|
|
|
318
350
|
}
|
|
319
351
|
}
|
|
320
352
|
} catch (e) {
|
|
321
|
-
if (e instanceof
|
|
353
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
322
354
|
log(`Root routes.ts load failed: ${e.message}`);
|
|
323
355
|
}
|
|
324
356
|
break;
|
|
@@ -349,7 +381,7 @@ function farmApiPlugin(options = {}) {
|
|
|
349
381
|
}
|
|
350
382
|
}
|
|
351
383
|
} catch (e) {
|
|
352
|
-
if (e instanceof
|
|
384
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
353
385
|
log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
|
|
354
386
|
}
|
|
355
387
|
}
|
|
@@ -395,6 +427,43 @@ function farmApiPlugin(options = {}) {
|
|
|
395
427
|
isReady: () => discoveryComplete,
|
|
396
428
|
waitForDiscovery
|
|
397
429
|
};
|
|
430
|
+
const devI18n = createDevI18n(server);
|
|
431
|
+
_optionalChain([devI18n, 'optionalAccess', _8 => _8.catch, 'call', _9 => _9(() => {
|
|
432
|
+
})]);
|
|
433
|
+
const runWithDevI18n = async (req, res, handle) => {
|
|
434
|
+
const i18n = await devI18n;
|
|
435
|
+
const pathname = (req.url || "/").split("?")[0];
|
|
436
|
+
if (!_chunkXGTFLG73cjs.isFarmAPIPathname.call(void 0, pathname, basePath) && !_chunkXGTFLG73cjs.matchAPIRouteAtBasePath.call(void 0, 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(_chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req), { headers });
|
|
444
|
+
return i18n.run(
|
|
445
|
+
i18n.runtime,
|
|
446
|
+
request,
|
|
447
|
+
(resolution) => {
|
|
448
|
+
const config = i18n.runtime.config;
|
|
449
|
+
const vary = _chunkY2SZVIVHcjs.getFarmLocaleVaryHeaders.call(void 0, config, resolution);
|
|
450
|
+
if (vary.length > 0) {
|
|
451
|
+
const current = String(_nullishCoalesce(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 = _chunkY2SZVIVHcjs.createFarmLocaleCookie.call(void 0, 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 = _chunkP2355C6Ecjs._withAfterNodeMiddleware.call(void 0, async (req, res, next) => {
|
|
400
469
|
const url = req.url || "/";
|
|
@@ -407,7 +476,7 @@ function farmApiPlugin(options = {}) {
|
|
|
407
476
|
if (!farmMiddleware || !apiRouterHandler || !_chunkXGTFLG73cjs.isFarmAPIPathname.call(void 0, pathname, basePath)) {
|
|
408
477
|
return next();
|
|
409
478
|
}
|
|
410
|
-
await _optionalChain([farmMiddleware, 'access',
|
|
479
|
+
await _optionalChain([farmMiddleware, 'access', _10 => _10.waitForDiscovery, 'optionalCall', _11 => _11()]);
|
|
411
480
|
if (await farmMiddleware.execute(req, res, pathname, /* @__PURE__ */ new Map())) return;
|
|
412
481
|
middlewareRan = true;
|
|
413
482
|
const rewrittenPathname = (req.url || url).split("?")[0];
|
|
@@ -421,7 +490,7 @@ function farmApiPlugin(options = {}) {
|
|
|
421
490
|
const startTime = Date.now();
|
|
422
491
|
try {
|
|
423
492
|
if (farmMiddleware && !middlewareRan) {
|
|
424
|
-
await _optionalChain([farmMiddleware, 'access',
|
|
493
|
+
await _optionalChain([farmMiddleware, 'access', _12 => _12.waitForDiscovery, 'optionalCall', _13 => _13()]);
|
|
425
494
|
const middlewareData = /* @__PURE__ */ new Map();
|
|
426
495
|
const handled = await farmMiddleware.execute(req, res, pathname, middlewareData);
|
|
427
496
|
if (handled) {
|
|
@@ -457,11 +526,11 @@ function farmApiPlugin(options = {}) {
|
|
|
457
526
|
const response = await apiRouterHandler(request);
|
|
458
527
|
const duration = Date.now() - startTime;
|
|
459
528
|
logResponse(method, currentPathname, response.status, duration);
|
|
460
|
-
await
|
|
529
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
461
530
|
} catch (error) {
|
|
462
531
|
const bodyErrorResponse = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
463
532
|
if (bodyErrorResponse) {
|
|
464
|
-
await
|
|
533
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
465
534
|
return;
|
|
466
535
|
}
|
|
467
536
|
const duration = Date.now() - startTime;
|
|
@@ -473,13 +542,14 @@ function farmApiPlugin(options = {}) {
|
|
|
473
542
|
}
|
|
474
543
|
});
|
|
475
544
|
server.middlewares.use((req, res, next) => {
|
|
476
|
-
const
|
|
545
|
+
const handle = () => _chunkKBGZ5FD6cjs._runWithAPIRequestRuntime.call(void 0,
|
|
477
546
|
{
|
|
478
547
|
basePath: _nullishCoalesce(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 || "/"}:`,
|
|
@@ -487,7 +557,7 @@ function farmApiPlugin(options = {}) {
|
|
|
487
557
|
);
|
|
488
558
|
if (res.writableEnded) return;
|
|
489
559
|
if (res.headersSent) {
|
|
490
|
-
_optionalChain([res, 'access',
|
|
560
|
+
_optionalChain([res, 'access', _14 => _14.destroy, 'optionalCall', _15 => _15(error instanceof Error ? error : new Error(String(error)))]);
|
|
491
561
|
return;
|
|
492
562
|
}
|
|
493
563
|
res.statusCode = 500;
|
|
@@ -505,7 +575,7 @@ function farmApiPlugin(options = {}) {
|
|
|
505
575
|
for (const mod of modules) {
|
|
506
576
|
server.moduleGraph.invalidateModule(mod);
|
|
507
577
|
}
|
|
508
|
-
if (await _optionalChain([recoverFailedDiscovery, 'optionalCall',
|
|
578
|
+
if (await _optionalChain([recoverFailedDiscovery, 'optionalCall', _16 => _16()])) return [];
|
|
509
579
|
const previousState = snapshotRouteState();
|
|
510
580
|
try {
|
|
511
581
|
const routesModule = await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, file);
|
|
@@ -536,7 +606,7 @@ function farmApiPlugin(options = {}) {
|
|
|
536
606
|
log(`API router recreated`);
|
|
537
607
|
} catch (e) {
|
|
538
608
|
restoreRouteState(previousState);
|
|
539
|
-
if (e instanceof
|
|
609
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
540
610
|
log(`Root routes.ts HMR failed: ${e.message}`);
|
|
541
611
|
}
|
|
542
612
|
return [];
|
|
@@ -547,7 +617,7 @@ function farmApiPlugin(options = {}) {
|
|
|
547
617
|
for (const mod of modules) {
|
|
548
618
|
server.moduleGraph.invalidateModule(mod);
|
|
549
619
|
}
|
|
550
|
-
if (await _optionalChain([recoverFailedDiscovery, 'optionalCall',
|
|
620
|
+
if (await _optionalChain([recoverFailedDiscovery, 'optionalCall', _17 => _17()])) return [];
|
|
551
621
|
const previousState = snapshotRouteState();
|
|
552
622
|
try {
|
|
553
623
|
const path = await import("path");
|
|
@@ -574,7 +644,7 @@ function farmApiPlugin(options = {}) {
|
|
|
574
644
|
log(`API router recreated`);
|
|
575
645
|
} catch (e) {
|
|
576
646
|
restoreRouteState(previousState);
|
|
577
|
-
if (e instanceof
|
|
647
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
578
648
|
log(`API route HMR failed: ${e.message}`);
|
|
579
649
|
}
|
|
580
650
|
return [];
|
|
@@ -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
|
}
|