@farm.js/core 0.1.69 → 0.1.71
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-KE4J3W7S.cjs} +8 -5
- package/dist/{agent-mcp-handler-AZ7QW4UP.mjs → agent-mcp-handler-VIT4GOSR.mjs} +7 -4
- package/dist/{agent-mcp.d-DOfBMEzP.d.mts → agent-mcp.d-BzNw6JI8.d.ts} +24 -5
- package/dist/{agent-mcp.d-DnIgriX1.d.ts → agent-mcp.d-CgFen3EH.d.mts} +24 -5
- 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-LPIVRSTJ.cjs +16 -0
- package/dist/{analyzer-NAL5TJUP.mjs → analyzer-VK3BAOFI.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-CaAcaukR.d.ts → app-manifest.d-DY4JfJxi.d.ts} +1 -1
- package/dist/{app-manifest.d-_BVbI0xp.d.mts → app-manifest.d-DpDK_B1k.d.mts} +1 -1
- package/dist/app-markdown.cjs +7 -4
- package/dist/app-markdown.d.mts +5 -4
- package/dist/app-markdown.d.ts +5 -4
- package/dist/app-markdown.mjs +6 -3
- package/dist/{app.d-BWeDqOaF.d.ts → app.d-BeK6bb1c.d.ts} +22 -10
- package/dist/{app.d-CaPwtytN.d.mts → app.d-D-5UNrFd.d.mts} +22 -10
- 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-5TOWKGV3.mjs → chunk-2CQC5CMD.mjs} +1 -1
- package/dist/{chunk-VO65MYJD.cjs → chunk-2IFT2CSA.cjs} +4 -4
- 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-CV6MFQ4Y.mjs → chunk-3AUINHFG.mjs} +1 -1
- package/dist/{chunk-TKYOJ5G2.cjs → chunk-3BQ7QHUH.cjs} +5 -5
- package/dist/{chunk-MMDKYJ5V.cjs → chunk-3GNVIYPO.cjs} +7 -7
- package/dist/{chunk-65Y5SIBH.cjs → chunk-3QM74STY.cjs} +1 -1
- package/dist/{chunk-FJMC24KG.cjs → chunk-42KMUIWZ.cjs} +0 -3
- package/dist/{chunk-YVPX5PI5.mjs → chunk-4O26BPUY.mjs} +8 -0
- package/dist/{chunk-PDQ6EGPK.mjs → chunk-4OD2LXF2.mjs} +2 -2
- package/dist/{chunk-LENKRGBV.mjs → chunk-5CFHQ7HM.mjs} +1 -1
- package/dist/{chunk-3Y52TWYU.mjs → chunk-62ZRA7XU.mjs} +0 -3
- package/dist/{chunk-K76CBYQM.mjs → chunk-7A3URI2F.mjs} +20 -0
- package/dist/{chunk-UHU4QALN.mjs → chunk-7BUE2GM6.mjs} +294 -164
- package/dist/{chunk-L6NWQ3DR.cjs → chunk-7OHJWFLB.cjs} +600 -469
- package/dist/{chunk-VX2HZGC7.cjs → chunk-ACGBXN3U.cjs} +2 -2
- package/dist/{chunk-MV7NWU23.mjs → chunk-AYVGD3PK.mjs} +1 -1
- package/dist/{chunk-FT6KJHS3.cjs → chunk-C2JOS77Z.cjs} +4 -1
- package/dist/{chunk-CRVSYDHV.mjs → chunk-CKQAQFF6.mjs} +2 -2
- package/dist/{chunk-QOGIZKSO.cjs → chunk-CSQPMV3Q.cjs} +21 -11
- package/dist/chunk-DC2AXGNZ.mjs +129 -0
- package/dist/{chunk-Q4HH5Q6A.cjs → chunk-DMXMIE2C.cjs} +2 -2
- package/dist/{chunk-MAGFDK4Q.mjs → chunk-DPIGYXSV.mjs} +1 -1
- package/dist/{chunk-GUMKIQJL.cjs → chunk-DPYBVVL3.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-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-PDFFYZAT.cjs → chunk-GF22VGMS.cjs} +2 -2
- package/dist/{chunk-IYLZZTP6.mjs → chunk-GUU3IZSM.mjs} +167 -77
- package/dist/{chunk-OOJBBHYW.cjs → chunk-GVYZCJZH.cjs} +30 -1
- package/dist/{chunk-YOHHL2UE.mjs → chunk-I4KPA2C6.mjs} +1 -1
- package/dist/{chunk-PEYDQMSA.mjs → chunk-IGXS54GC.mjs} +6 -6
- package/dist/{chunk-NVOMQLI2.mjs → chunk-IWJONXPF.mjs} +11 -0
- package/dist/{chunk-SZORL7EW.mjs → chunk-IYDJNCR7.mjs} +6 -6
- package/dist/{chunk-HEJM46HQ.mjs → chunk-J5ASGNKF.mjs} +28 -2
- package/dist/{chunk-RLH5AH2M.mjs → chunk-JDO346NV.mjs} +1 -1
- package/dist/{chunk-K6SXMVXO.mjs → chunk-JMFTKNBA.mjs} +22 -7
- package/dist/{chunk-YIHRZBD7.cjs → chunk-JRGR5Z4K.cjs} +1 -1
- package/dist/{chunk-4W4ZWSV2.cjs → chunk-JVA4PIYN.cjs} +604 -434
- 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-OFBLGH6V.cjs → chunk-K66JILV3.cjs} +47 -34
- package/dist/{chunk-6GQJVY4E.cjs → chunk-KEB7AGS6.cjs} +17 -17
- package/dist/{chunk-IFR74W6S.mjs → chunk-KPJYBSHL.mjs} +4 -1
- package/dist/{chunk-TEJ67GD2.mjs → chunk-KQAB5LML.mjs} +28 -6
- package/dist/{chunk-DHR2WDSL.cjs → chunk-KWST2O22.cjs} +387 -297
- package/dist/{chunk-3EEINK7G.cjs → chunk-L6E4SHUB.cjs} +41 -15
- package/dist/{chunk-KI3MU7B5.mjs → chunk-LDVJIBGN.mjs} +1 -1
- package/dist/{chunk-5FBZJJGA.mjs → chunk-LXEJNWF5.mjs} +2 -2
- package/dist/{chunk-AKIQ54FK.cjs → chunk-MBCRWU3P.cjs} +26 -81
- package/dist/{chunk-22LGTSBA.cjs → chunk-MEJCP2LX.cjs} +1 -1
- package/dist/{chunk-ZR2QB45W.mjs → chunk-MITIAOUQ.mjs} +4 -4
- package/dist/{chunk-OCNV4CI2.cjs → chunk-MQ4DYVFS.cjs} +26 -0
- package/dist/{chunk-P2NBQ5JI.mjs → chunk-MWUDEYBI.mjs} +1 -1
- package/dist/{chunk-LR4KP3I7.cjs → chunk-N3XO5AL5.cjs} +2 -2
- 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-R2ZHU37O.mjs → chunk-NLRAQXAA.mjs} +26 -0
- 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-F6YLXK5L.cjs → chunk-PLXD2MJV.cjs} +19 -19
- package/dist/{chunk-JFPKARWM.cjs → chunk-PMU4U2W2.cjs} +1 -0
- package/dist/{chunk-GTQOEEE7.cjs → chunk-Q5HMVGR5.cjs} +13 -13
- package/dist/{chunk-ZYCEEE3V.mjs → chunk-QUFENL7Q.mjs} +2 -2
- package/dist/{chunk-QOSDWGKT.mjs → chunk-QVBXTSIZ.mjs} +1 -1
- package/dist/{chunk-OGVTUGMU.mjs → chunk-REP6HWJN.mjs} +13 -3
- package/dist/{chunk-ANMIR6US.mjs → chunk-RJUCNO7R.mjs} +1 -1
- package/dist/{chunk-WYL4ODZ4.mjs → chunk-SE7HPBYK.mjs} +30 -1
- package/dist/{chunk-GQ6QOH7T.cjs → chunk-SXMWVP2L.cjs} +12 -12
- package/dist/{chunk-D5F7RPZP.mjs → chunk-THG2TVDH.mjs} +3 -3
- package/dist/{chunk-X3MHKLCO.cjs → chunk-TP4RAV7Y.cjs} +25 -10
- package/dist/{chunk-DWLNLU55.cjs → chunk-TPYAYFMF.cjs} +2 -2
- package/dist/{chunk-Y6KHPJDB.cjs → chunk-U7VH3Q5E.cjs} +2 -2
- package/dist/{chunk-4JRAMCUP.cjs → chunk-UISZLYKY.cjs} +22 -22
- package/dist/{chunk-CKCKCUYO.mjs → chunk-UQUOSNRN.mjs} +511 -341
- package/dist/{chunk-2P7UYHZP.mjs → chunk-V25GSH43.mjs} +1 -1
- package/dist/{chunk-437QZIC2.cjs → chunk-VNBDN5W2.cjs} +5 -5
- package/dist/{chunk-ABIBASLJ.cjs → chunk-VXB5CMNC.cjs} +2 -2
- package/dist/{chunk-G7NBPP7H.mjs → chunk-W2T6NDNP.mjs} +11 -1
- package/dist/{chunk-AJNBTOVQ.mjs → chunk-WW3LRNQV.mjs} +1 -1
- package/dist/{chunk-GFPS7MNE.mjs → chunk-WX63N6C5.mjs} +4 -4
- package/dist/{chunk-ULMXZYOA.mjs → chunk-X7LGLF33.mjs} +1 -1
- package/dist/{chunk-VOQ7XZZT.cjs → chunk-Y2SZVIVH.cjs} +20 -0
- package/dist/{chunk-XCAQTCGK.mjs → chunk-YBY34UHB.mjs} +1 -1
- package/dist/{chunk-5NFQ6AZI.cjs → chunk-YCNHUIPR.cjs} +33 -11
- package/dist/{chunk-YGJ5P3TJ.mjs → chunk-Z3GPAFIA.mjs} +21 -3
- package/dist/{chunk-PJQ5W356.mjs → chunk-Z5ZZAGIH.mjs} +1 -0
- package/dist/{chunk-L5OZN6YW.cjs → chunk-ZPUAOKHV.cjs} +3 -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-DwpH251K.d.mts} +2 -2
- package/dist/{client-component.d-CfJxuXZl.d.ts → client-component.d-fYupugbZ.d.ts} +2 -2
- package/dist/{client-plugins.d-D7dHV1Nf.d.ts → client-plugins.d-BxqFfHpM.d.ts} +39 -3
- package/dist/{client-plugins.d-Do5ULA0x.d.mts → client-plugins.d-k3bOT5gz.d.mts} +39 -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-6MXPFPNJ.mjs} +9 -8
- package/dist/{devtools-7HNDS4SY.cjs → devtools-O5625KCK.cjs} +10 -9
- package/dist/docs.cjs +13 -12
- package/dist/docs.d.mts +4 -3
- package/dist/docs.d.ts +4 -3
- package/dist/docs.mjs +12 -11
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/headers.d-DalIGbVO.d.ts +18 -0
- package/dist/headers.d-sNT7ZQiU.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 +50 -45
- package/dist/{index.d-CVFk37uX.d.ts → index.d-BcA-secm.d.ts} +1 -1
- package/dist/{index.d-B1MpEJAo.d.mts → index.d-DDHHAv7j.d.mts} +1 -1
- package/dist/index.d.mts +26 -24
- package/dist/index.d.ts +26 -24
- package/dist/index.mjs +63 -58
- 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 +6 -3
- package/dist/internal/app-markdown-runtime.d.mts +13 -4
- package/dist/internal/app-markdown-runtime.d.ts +13 -4
- package/dist/internal/app-markdown-runtime.mjs +5 -2
- package/dist/internal/build-runtime.cjs +37 -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 +36 -36
- package/dist/internal/cli-runtime.cjs +18 -15
- package/dist/internal/cli-runtime.mjs +17 -14
- 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 +11 -10
- package/dist/internal/config-runtime.d.mts +6 -5
- package/dist/internal/config-runtime.d.ts +6 -5
- package/dist/internal/config-runtime.mjs +10 -9
- 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 +53 -18
- package/dist/internal/production-runtime.d.ts +53 -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-C1PONsEe.d.mts} +1 -1
- package/dist/{mount.d-CGzN61Kq.d.ts → mount.d-D3JOux2V.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-CJQQHboA.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CLH2dXjy.d.ts → navigation-delegate.d-CQQPbdkE.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/{nitro-Y3LGITW3.cjs → nitro-2LMOMIST.cjs} +2 -2
- package/dist/{nitro-NSTXT7LB.mjs → nitro-72TFIGGO.mjs} +1 -1
- package/dist/{plugin-F2O4BFTK.cjs → plugin-5PIQQVRP.cjs} +2 -2
- package/dist/{plugin-VEBRN7A3.mjs → plugin-QZT747YW.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-CzGDjcT0.d.mts → render-plan.d-CiUj0rq5.d.mts} +1 -1
- package/dist/{render-plan.d-W6LmjD6y.d.ts → render-plan.d-DHuJMJRP.d.ts} +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-CgNVderU.d.mts → request.d-D-F7o7tb.d.mts} +1 -1
- package/dist/{request.d-CTVRZiQv.d.ts → request.d-DRUbOmYD.d.ts} +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-6smgwT2t.d.mts} +9 -2
- package/dist/{route-rendering.d-FDSNtCMg.d.ts → route-rendering.d-KwqM_mlK.d.ts} +9 -2
- package/dist/{router.d-DZ3ldniI.d.ts → router.d-B6sesMRD.d.ts} +1 -1
- package/dist/{router.d-GRKm_uAV.d.mts → router.d-BYmDeDlp.d.mts} +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-J4KKBSCH.cjs → rsc-pipeline-P4PCWDO2.cjs} +14 -13
- package/dist/{rsc-pipeline-PJZOVYSY.mjs → rsc-pipeline-R2GOKIMU.mjs} +13 -12
- package/dist/{runtime-QDBSE4H6.mjs → runtime-DP5DYGW5.mjs} +12 -11
- package/dist/{runtime-OLEO5NXF.cjs → runtime-WA2Q4SLG.cjs} +20 -19
- package/dist/{runtime.d-DqXihlxm.d.mts → runtime.d-BFSJf-ww.d.mts} +1 -1
- package/dist/{runtime.d-BtL3PCL3.d.ts → runtime.d-B_uPfMjA.d.ts} +2 -2
- package/dist/{runtime.d-pqFQBU2N.d.ts → runtime.d-CbdMI0Oy.d.ts} +1 -1
- package/dist/{runtime.d-3iJAKptR.d.mts → runtime.d-nUz0HAL4.d.mts} +2 -2
- 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-Dhvy60p4.d.mts → spa-router.d-D4EDwR20.d.mts} +3 -3
- package/dist/{spa-router.d-DhOhaQ-7.d.ts → spa-router.d-mC1D5cTN.d.ts} +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-A2X3a6z_.d.ts} +1 -1
- package/dist/{utils.d-Q8EHCpkF.d.mts → utils.d-DxMzteqE.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 +28 -6
- package/dist/vite.d.ts +28 -6
- package/dist/vite.mjs +36 -28
- package/package.json +3 -3
- 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
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkOWQV6MLMcjs = require('./chunk-OWQV6MLM.cjs');
|
|
7
13
|
|
|
8
14
|
|
|
9
15
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -59,22 +65,33 @@ function collectFarmLlmsTxtPages(sources, options) {
|
|
|
59
65
|
for (const source of sources) {
|
|
60
66
|
const path = source.pattern;
|
|
61
67
|
if (path.includes("[") || pages.has(path)) continue;
|
|
62
|
-
if (include.length && !include.some((pattern) =>
|
|
68
|
+
if (include.length && !include.some((pattern) => _chunkC2JOS77Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
63
69
|
continue;
|
|
64
70
|
}
|
|
65
|
-
if (exclude.some((pattern) =>
|
|
71
|
+
if (exclude.some((pattern) => _chunkC2JOS77Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
66
72
|
if (isFarmMetadataNoIndex(source.metadata)) continue;
|
|
67
|
-
const target =
|
|
73
|
+
const target = _chunkC2JOS77Zcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? getFarmAgentPagePublicPath(_chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, path), options) : _chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
|
|
74
|
+
getFarmAgentPagePublicPath(path, options),
|
|
75
|
+
options.trailingSlash === true
|
|
76
|
+
);
|
|
68
77
|
const description = readMetadataString(source.metadata, "description");
|
|
69
78
|
pages.set(path, {
|
|
70
79
|
path,
|
|
71
80
|
title: _nullishCoalesce(readMetadataTitle(source.metadata), () => ( fallbackPageTitle(path))),
|
|
72
|
-
url: `${options.origin}${
|
|
81
|
+
url: `${options.origin}${target}`,
|
|
73
82
|
...description ? { description } : {}
|
|
74
83
|
});
|
|
75
84
|
}
|
|
76
85
|
return [...pages.values()].sort((left, right) => left.path.localeCompare(right.path));
|
|
77
86
|
}
|
|
87
|
+
function getFarmAgentPagePublicPath(pathname, options) {
|
|
88
|
+
const { i18n } = options;
|
|
89
|
+
if (!i18n || i18n.enabled === false) return _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, pathname, options.basePath);
|
|
90
|
+
return _chunkOWQV6MLMcjs.localizeFarmPathname.call(void 0, pathname, i18n.defaultLocale, {
|
|
91
|
+
...i18n,
|
|
92
|
+
basePath: _nullishCoalesce(options.basePath, () => ( i18n.basePath))
|
|
93
|
+
});
|
|
94
|
+
}
|
|
78
95
|
function resolveFarmAgentOrigin(metadataBase, requestOrigin) {
|
|
79
96
|
if (typeof metadataBase !== "string" && !(metadataBase instanceof URL)) return requestOrigin;
|
|
80
97
|
try {
|
|
@@ -182,7 +199,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
182
199
|
try {
|
|
183
200
|
const response = await fetchMarkdown(
|
|
184
201
|
new Request(url, {
|
|
185
|
-
headers: { accept: "text/markdown", [
|
|
202
|
+
headers: { accept: "text/markdown", [_chunkC2JOS77Zcjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
|
|
186
203
|
})
|
|
187
204
|
);
|
|
188
205
|
const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
|
|
@@ -368,4 +385,5 @@ function isRecord(value) {
|
|
|
368
385
|
|
|
369
386
|
|
|
370
387
|
|
|
371
|
-
|
|
388
|
+
|
|
389
|
+
exports.resolveFarmLlmsTxtConfig = resolveFarmLlmsTxtConfig; exports.collectFarmLlmsTxtPages = collectFarmLlmsTxtPages; exports.getFarmAgentPagePublicPath = getFarmAgentPagePublicPath; exports.resolveFarmAgentOrigin = resolveFarmAgentOrigin; exports.readFarmLlmsMarkdownFrom = readFarmLlmsMarkdownFrom; exports.isFarmMetadataNoIndex = isFarmMetadataNoIndex; exports.isFarmPageNoIndex = isFarmPageNoIndex; exports.createFarmDefaultLlmsTxt = createFarmDefaultLlmsTxt; exports.serializeFarmLlmsTxt = serializeFarmLlmsTxt; exports.createFarmLlmsMarkdownReader = createFarmLlmsMarkdownReader; exports.renderFarmLlmsFullTxt = renderFarmLlmsFullTxt; exports.createFarmLlmsFullRenderer = createFarmLlmsFullRenderer;
|
|
@@ -153,7 +153,7 @@ async function sendWebResponse(res, response) {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
async function fetchFarmExternalRewrite(request) {
|
|
156
|
-
const response = await fetch(request);
|
|
156
|
+
const response = await fetch(request, { redirect: "manual" });
|
|
157
157
|
if (!response.headers.has("content-encoding")) return response;
|
|
158
158
|
const headers = new Headers(response.headers);
|
|
159
159
|
headers.delete("content-encoding");
|
|
@@ -21,6 +21,12 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
emitFarmEvent
|
|
23
23
|
} from "./chunk-2DA7CLY7.mjs";
|
|
24
|
+
import {
|
|
25
|
+
FARM_DEPLOYMENT_ID_HEADER,
|
|
26
|
+
createFarmDeploymentCookie,
|
|
27
|
+
getFarmDeploymentMismatch,
|
|
28
|
+
withoutFarmDeploymentCookie
|
|
29
|
+
} from "./chunk-IWJONXPF.mjs";
|
|
24
30
|
import {
|
|
25
31
|
_withFarmResponseHeaders
|
|
26
32
|
} from "./chunk-LM55GS4R.mjs";
|
|
@@ -678,6 +684,24 @@ var CDN_CACHE_CONTROL_HEADERS = [
|
|
|
678
684
|
"netlify-cdn-cache-control",
|
|
679
685
|
"cloudflare-cdn-cache-control"
|
|
680
686
|
];
|
|
687
|
+
function _hasPrivateFarmRequestHeaders(request, localeCookie) {
|
|
688
|
+
if (request.headers.get("authorization")) return true;
|
|
689
|
+
const cookieHeader = withoutFarmDeploymentCookie(request.headers.get("cookie"));
|
|
690
|
+
if (!cookieHeader) return false;
|
|
691
|
+
return !(localeCookie && isOnlyFarmLocaleCookie(cookieHeader, localeCookie));
|
|
692
|
+
}
|
|
693
|
+
function isOnlyFarmLocaleCookie(cookieHeader, localeCookie) {
|
|
694
|
+
const parts = cookieHeader.split(";");
|
|
695
|
+
if (parts.length !== 1) return false;
|
|
696
|
+
const cookie = parts[0].trim();
|
|
697
|
+
const separator = cookie.indexOf("=");
|
|
698
|
+
if (separator <= 0) return false;
|
|
699
|
+
try {
|
|
700
|
+
return decodeURIComponent(cookie.slice(0, separator).trim()) === localeCookie.name && localeCookie.locales.includes(decodeURIComponent(cookie.slice(separator + 1).trim()));
|
|
701
|
+
} catch {
|
|
702
|
+
return false;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
681
705
|
function _withFarmGuardedResponseCache(response) {
|
|
682
706
|
const shareable = !PRIVATE_CACHE_DIRECTIVE.test(response.headers.get("cache-control") ?? "");
|
|
683
707
|
if (!shareable && !CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) {
|
|
@@ -688,11 +712,30 @@ function _withFarmGuardedResponseCache(response) {
|
|
|
688
712
|
for (const name of CDN_CACHE_CONTROL_HEADERS) headers.delete(name);
|
|
689
713
|
});
|
|
690
714
|
}
|
|
715
|
+
function _withFarmDeploymentCookie(request, response, deploymentId, cookiePath) {
|
|
716
|
+
if (request.method.toUpperCase() !== "GET") return response;
|
|
717
|
+
if (response.headers.get(FARM_DEPLOYMENT_ID_HEADER) !== deploymentId) return response;
|
|
718
|
+
if (!PRIVATE_CACHE_DIRECTIVE.test(response.headers.get("cache-control") ?? "")) return response;
|
|
719
|
+
if (CDN_CACHE_CONTROL_HEADERS.some((name) => response.headers.has(name))) return response;
|
|
720
|
+
if (getFarmDeploymentMismatch(request, deploymentId)) return response;
|
|
721
|
+
return _withFarmResponseHeaders(response, (headers) => {
|
|
722
|
+
headers.append(
|
|
723
|
+
"Set-Cookie",
|
|
724
|
+
createFarmDeploymentCookie(
|
|
725
|
+
deploymentId,
|
|
726
|
+
cookiePath,
|
|
727
|
+
new URL(request.url).protocol === "https:"
|
|
728
|
+
)
|
|
729
|
+
);
|
|
730
|
+
});
|
|
731
|
+
}
|
|
691
732
|
|
|
692
733
|
export {
|
|
693
734
|
matchesMiddlewareConfig2 as matchesMiddlewareConfig,
|
|
694
735
|
createProductionMiddlewareRunner,
|
|
695
736
|
applyProductionMiddlewareHeaders,
|
|
696
737
|
CDN_CACHE_CONTROL_HEADERS,
|
|
697
|
-
|
|
738
|
+
_hasPrivateFarmRequestHeaders,
|
|
739
|
+
_withFarmGuardedResponseCache,
|
|
740
|
+
_withFarmDeploymentCookie
|
|
698
741
|
};
|
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk42KMUIWZcjs = require('./chunk-42KMUIWZ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkXVSBALOYcjs = require('./chunk-XVSBALOY.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkKEB7AGS6cjs = require('./chunk-KEB7AGS6.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk3QM74STYcjs = require('./chunk-3QM74STY.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkDMXMIE2Ccjs = require('./chunk-DMXMIE2C.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
@@ -49,7 +49,7 @@ var FARM_RSC_CONFIG_KEYS = [
|
|
|
49
49
|
"agent",
|
|
50
50
|
"mcp"
|
|
51
51
|
];
|
|
52
|
-
var FARM_RSC_PASSTHROUGH_KEYS = ["i18n", "cache"];
|
|
52
|
+
var FARM_RSC_PASSTHROUGH_KEYS = ["i18n", "cache", "redirects", "rewrites", "headers"];
|
|
53
53
|
function pickImportTarget(entry) {
|
|
54
54
|
if (typeof entry === "string") return entry;
|
|
55
55
|
if (!entry || typeof entry !== "object") return void 0;
|
|
@@ -60,7 +60,7 @@ function pickImportTarget(entry) {
|
|
|
60
60
|
return void 0;
|
|
61
61
|
}
|
|
62
62
|
async function importFromApp(root, packageName, subpath = ".") {
|
|
63
|
-
const packageDir =
|
|
63
|
+
const packageDir = _chunk42KMUIWZcjs.findFarmAppPackageDir.call(void 0, root, packageName);
|
|
64
64
|
if (!packageDir) return void 0;
|
|
65
65
|
const manifest = JSON.parse(_fs.readFileSync.call(void 0, _path2.default.join(packageDir, "package.json"), "utf8"));
|
|
66
66
|
const exportsMap = manifest.exports;
|
|
@@ -87,12 +87,12 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
87
87
|
importFromApp(root, "@vitejs/plugin-rsc"),
|
|
88
88
|
importFromApp(root, "@vitejs/plugin-react")
|
|
89
89
|
]);
|
|
90
|
-
if (!pluginRsc || !viteRsc || !
|
|
90
|
+
if (!pluginRsc || !viteRsc || !_chunk42KMUIWZcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
|
|
91
91
|
throw new Error(
|
|
92
|
-
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${
|
|
92
|
+
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${_chunk42KMUIWZcjs.FARM_RSC_INSTALL_HINT}`
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
|
-
const layered = await
|
|
95
|
+
const layered = await _chunk42KMUIWZcjs.resolveFarmRscCheckConfig.call(void 0,
|
|
96
96
|
userConfig,
|
|
97
97
|
root,
|
|
98
98
|
options.command === "build" ? "production" : "development"
|
|
@@ -106,20 +106,20 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
106
106
|
},
|
|
107
107
|
options.command
|
|
108
108
|
);
|
|
109
|
-
const blockingKeys =
|
|
109
|
+
const blockingKeys = _chunk42KMUIWZcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
|
|
110
110
|
if (blockingKeys.length > 0) {
|
|
111
|
-
throw new Error(`[Farm.js] ${
|
|
111
|
+
throw new Error(`[Farm.js] ${_chunk42KMUIWZcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
|
|
112
112
|
}
|
|
113
113
|
const { plugins: vitePlugins = [], ...viteOptions } = _nullishCoalesce(config.vite, () => ( {}));
|
|
114
114
|
const rscConfig = {};
|
|
115
115
|
for (const key of FARM_RSC_CONFIG_KEYS) {
|
|
116
116
|
if (config[key] !== void 0) rscConfig[key] = config[key];
|
|
117
117
|
}
|
|
118
|
-
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await
|
|
119
|
-
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await
|
|
118
|
+
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await _chunk3QM74STYcjs.loadFarmReactPlugin.call(void 0, )).default : void 0)));
|
|
119
|
+
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await _chunkDMXMIE2Ccjs.loadTailwindVitePlugin.call(void 0, );
|
|
120
120
|
const platform = _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, );
|
|
121
121
|
const mobileClient = config.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
|
|
122
|
-
const clientPluginEntry =
|
|
122
|
+
const clientPluginEntry = _chunkDMXMIE2Ccjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
123
123
|
config.plugins,
|
|
124
124
|
root,
|
|
125
125
|
typeof config.srcDir === "string" ? config.srcDir : "src",
|
|
@@ -144,7 +144,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
144
144
|
port: _nullishCoalesce(options.port, () => ( _optionalChain([config, 'access', _5 => _5.server, 'optionalAccess', _6 => _6.port]))),
|
|
145
145
|
plugins: [
|
|
146
146
|
...options.command === "serve" && platform === "desktop" ? [
|
|
147
|
-
|
|
147
|
+
_chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0,
|
|
148
148
|
typeof config.basePath === "string" ? config.basePath : void 0
|
|
149
149
|
)
|
|
150
150
|
] : [],
|
|
@@ -156,7 +156,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
156
156
|
server: { environmentName: "rsc" },
|
|
157
157
|
config: {
|
|
158
158
|
preset: options.preset,
|
|
159
|
-
outputDir: options.outputDir &&
|
|
159
|
+
outputDir: options.outputDir && _chunkKEB7AGS6cjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
160
160
|
}
|
|
161
161
|
})
|
|
162
162
|
]
|
|
@@ -176,12 +176,12 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
176
176
|
async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
177
177
|
const kept = _nullishCoalesce(config.plugins, () => ( []));
|
|
178
178
|
const names = new Set(
|
|
179
|
-
kept.filter((plugin) =>
|
|
179
|
+
kept.filter((plugin) => _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, [plugin])).map((plugin) => plugin.name)
|
|
180
180
|
);
|
|
181
181
|
if (names.size === 0) return void 0;
|
|
182
182
|
const loads = (plugin) => {
|
|
183
183
|
const candidate = plugin;
|
|
184
|
-
return !!candidate && names.has(candidate.name) &&
|
|
184
|
+
return !!candidate && names.has(candidate.name) && _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, [candidate]);
|
|
185
185
|
};
|
|
186
186
|
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-7P4RLKVX.cjs");
|
|
187
187
|
const files = [];
|
|
@@ -210,7 +210,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
210
210
|
}
|
|
211
211
|
async function configureFarmRscPlugins(config, command) {
|
|
212
212
|
if (config.plugins.length === 0) return config;
|
|
213
|
-
const { PluginManager } = await import("./plugin-
|
|
213
|
+
const { PluginManager } = await import("./plugin-5PIQQVRP.cjs");
|
|
214
214
|
const manager = new PluginManager({
|
|
215
215
|
config,
|
|
216
216
|
isDev: command === "serve",
|
|
@@ -688,6 +688,7 @@ var PluginManager = class {
|
|
|
688
688
|
* Runs only `runtime.before` for a request Farm re-routed internally, such as
|
|
689
689
|
* a configured rewrite, so guards also see the destination URL. The session
|
|
690
690
|
* opened for `source` keeps its context; context and after hooks don't rerun.
|
|
691
|
+
* `options` describe the destination; the session keeps the source's route.
|
|
691
692
|
*/
|
|
692
693
|
async runRuntimeBeforeForRewrite(source, request, options = {}) {
|
|
693
694
|
if (!this.hasRuntimeHook("before")) return request;
|
|
@@ -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,7 +35,7 @@ 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');
|
|
@@ -55,7 +55,7 @@ var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkY2SZVIVHcjs = require('./chunk-Y2SZVIVH.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
|
|
@@ -148,7 +148,7 @@ function farmApiPlugin(options = {}) {
|
|
|
148
148
|
const existing = apiRoutesCache.get(routePath);
|
|
149
149
|
const existingFile = _optionalChain([endpointSources, 'access', _4 => _4.get, 'call', _5 => _5(routePath), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(normalizedMethod)]);
|
|
150
150
|
if (existingFile) {
|
|
151
|
-
throw new (0,
|
|
151
|
+
throw new (0, _chunkK66JILV3cjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
|
|
152
152
|
}
|
|
153
153
|
if (existing) {
|
|
154
154
|
if (!existing.methods.includes(normalizedMethod)) {
|
|
@@ -323,7 +323,7 @@ function farmApiPlugin(options = {}) {
|
|
|
323
323
|
log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
|
|
324
324
|
}
|
|
325
325
|
} catch (e) {
|
|
326
|
-
if (e instanceof
|
|
326
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
327
327
|
log(`API route load failed at ${filePath}: ${e.message}`);
|
|
328
328
|
}
|
|
329
329
|
}
|
|
@@ -350,7 +350,7 @@ function farmApiPlugin(options = {}) {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
} catch (e) {
|
|
353
|
-
if (e instanceof
|
|
353
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
354
354
|
log(`Root routes.ts load failed: ${e.message}`);
|
|
355
355
|
}
|
|
356
356
|
break;
|
|
@@ -381,7 +381,7 @@ function farmApiPlugin(options = {}) {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
} catch (e) {
|
|
384
|
-
if (e instanceof
|
|
384
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
385
385
|
log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
@@ -446,14 +446,14 @@ function farmApiPlugin(options = {}) {
|
|
|
446
446
|
request,
|
|
447
447
|
(resolution) => {
|
|
448
448
|
const config = i18n.runtime.config;
|
|
449
|
-
const vary =
|
|
449
|
+
const vary = _chunkY2SZVIVHcjs.getFarmLocaleVaryHeaders.call(void 0, config, resolution);
|
|
450
450
|
if (vary.length > 0) {
|
|
451
451
|
const current = String(_nullishCoalesce(res.getHeader("Vary"), () => ( "")));
|
|
452
452
|
res.setHeader("Vary", [current, ...vary].filter(Boolean).join(", "));
|
|
453
453
|
}
|
|
454
454
|
if (resolution.persist) {
|
|
455
455
|
const cookies = res.getHeader("Set-Cookie");
|
|
456
|
-
const cookie =
|
|
456
|
+
const cookie = _chunkY2SZVIVHcjs.createFarmLocaleCookie.call(void 0, resolution.locale, config);
|
|
457
457
|
res.setHeader(
|
|
458
458
|
"Set-Cookie",
|
|
459
459
|
cookies === void 0 ? cookie : [...[cookies].flat().map(String), cookie]
|
|
@@ -526,11 +526,11 @@ function farmApiPlugin(options = {}) {
|
|
|
526
526
|
const response = await apiRouterHandler(request);
|
|
527
527
|
const duration = Date.now() - startTime;
|
|
528
528
|
logResponse(method, currentPathname, response.status, duration);
|
|
529
|
-
await
|
|
529
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
530
530
|
} catch (error) {
|
|
531
531
|
const bodyErrorResponse = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
532
532
|
if (bodyErrorResponse) {
|
|
533
|
-
await
|
|
533
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
536
536
|
const duration = Date.now() - startTime;
|
|
@@ -606,7 +606,7 @@ function farmApiPlugin(options = {}) {
|
|
|
606
606
|
log(`API router recreated`);
|
|
607
607
|
} catch (e) {
|
|
608
608
|
restoreRouteState(previousState);
|
|
609
|
-
if (e instanceof
|
|
609
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
610
610
|
log(`Root routes.ts HMR failed: ${e.message}`);
|
|
611
611
|
}
|
|
612
612
|
return [];
|
|
@@ -644,7 +644,7 @@ function farmApiPlugin(options = {}) {
|
|
|
644
644
|
log(`API router recreated`);
|
|
645
645
|
} catch (e) {
|
|
646
646
|
restoreRouteState(previousState);
|
|
647
|
-
if (e instanceof
|
|
647
|
+
if (e instanceof _chunkK66JILV3cjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
648
648
|
log(`API route HMR failed: ${e.message}`);
|
|
649
649
|
}
|
|
650
650
|
return [];
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkDPYBVVL3cjs = require('./chunk-DPYBVVL3.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkBTVDYS4Bcjs = require('./chunk-BTVDYS4B.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunk2KMIJDY6cjs = require('./chunk-2KMIJDY6.cjs');
|
|
@@ -29,7 +29,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
|
29
29
|
var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkMEJCP2LXcjs = require('./chunk-MEJCP2LX.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -165,7 +165,7 @@ function createFarmAiCatalogResponse(request, input = {}, requestUrl) {
|
|
|
165
165
|
if (_chunkCFG4QERRcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
|
|
166
166
|
return new Response(null, { status: 304, headers });
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
_chunkC2JOS77Zcjs.emitFarmAgentRead.call(void 0, request, card ? "mcp-server-card" : "ai-catalog", 200);
|
|
169
169
|
return new Response(method === "HEAD" ? null : body, { status: 200, headers });
|
|
170
170
|
}
|
|
171
171
|
function corsHeaders() {
|
|
@@ -233,7 +233,7 @@ function createFarmApiCatalogResponse(method, input, request) {
|
|
|
233
233
|
headers: { Allow: "GET, HEAD", "Content-Type": "text/plain; charset=utf-8" }
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
|
-
if (request)
|
|
236
|
+
if (request) _chunkC2JOS77Zcjs.emitFarmAgentRead.call(void 0, request, "api-catalog", 200);
|
|
237
237
|
const catalog = createFarmApiCatalog(input);
|
|
238
238
|
return new Response(upperMethod === "HEAD" ? null : JSON.stringify(catalog), {
|
|
239
239
|
status: 200,
|
|
@@ -288,7 +288,7 @@ function createFarmAppManifest(input) {
|
|
|
288
288
|
return {
|
|
289
289
|
schemaVersion: 1,
|
|
290
290
|
app: app ? {
|
|
291
|
-
...app.version ? { farm:
|
|
291
|
+
...app.version ? { farm: _chunkMEJCP2LXcjs.FARM_VERSION } : {},
|
|
292
292
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
293
293
|
basePath: input.basePath,
|
|
294
294
|
...app.build ? { build: input.build } : {}
|
|
@@ -319,7 +319,7 @@ function resolveFarmSiteUrl() {
|
|
|
319
319
|
asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
|
|
320
320
|
];
|
|
321
321
|
for (const candidate of candidates) {
|
|
322
|
-
const origin = candidate ?
|
|
322
|
+
const origin = candidate ? _chunkDPYBVVL3cjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
|
|
323
323
|
if (origin) return origin;
|
|
324
324
|
}
|
|
325
325
|
return null;
|
|
@@ -374,7 +374,7 @@ function listDefaultServer(input) {
|
|
|
374
374
|
authorization: "none",
|
|
375
375
|
resources: [],
|
|
376
376
|
prompts: [],
|
|
377
|
-
tools:
|
|
377
|
+
tools: _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_TOOLS.map((tool) => ({
|
|
378
378
|
name: tool.name,
|
|
379
379
|
title: tool.title,
|
|
380
380
|
description: tool.description,
|
|
@@ -434,7 +434,7 @@ function listFarmBuiltInRoutePaths(input) {
|
|
|
434
434
|
...agent.manifest !== false ? [FARM_APP_MANIFEST_PATH, FARM_APP_MANIFEST_LEGACY_PATH] : [],
|
|
435
435
|
...agent.apiCatalog ? [FARM_API_CATALOG_PATH] : [],
|
|
436
436
|
...agent.aiCatalog !== false ? [FARM_AI_CATALOG_PATH, FARM_ARD_PATH] : [],
|
|
437
|
-
...agent.mcp === true ? [
|
|
437
|
+
...agent.mcp === true ? [_chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH, `${_chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH}${FARM_MCP_SERVER_CARD_SUFFIX}`] : [],
|
|
438
438
|
..._optionalChain([agent, 'access', _43 => _43.llmsTxt, 'optionalAccess', _44 => _44.enabled]) ? ["/llms.txt"] : [],
|
|
439
439
|
..._optionalChain([agent, 'access', _45 => _45.llmsTxt, 'optionalAccess', _46 => _46.enabled]) && agent.llmsTxt.full ? ["/llms-full.txt"] : [],
|
|
440
440
|
..._optionalChain([agent, 'access', _47 => _47.sitemap, 'optionalAccess', _48 => _48.enabled]) ? ["/sitemap.xml"] : [],
|
|
@@ -474,7 +474,7 @@ function resolveFarmDocsRouteLabel(routePathname, docs) {
|
|
|
474
474
|
for (const entry of entries) {
|
|
475
475
|
const base = entry === "/" ? "" : entry;
|
|
476
476
|
if (page === entry || entry === "/" && page === "/index") {
|
|
477
|
-
return markdown ?
|
|
477
|
+
return markdown ? _chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, entry) : entry;
|
|
478
478
|
}
|
|
479
479
|
if (page.startsWith(`${base}/`)) {
|
|
480
480
|
const label = _optionalChain([docs, 'access', _55 => _55.pages, 'optionalAccess', _56 => _56.has, 'call', _57 => _57(page)]) && PUBLISHED_PAGE_PATH.test(page) ? page : `${base}/[...slug]`;
|
|
@@ -497,7 +497,7 @@ function resolveFarmMarkdownRouteLabel(routePathname, matchPagePattern) {
|
|
|
497
497
|
if (!routePathname.toLowerCase().endsWith(".md")) return null;
|
|
498
498
|
const page = routePathname === "/index.md" ? "/" : routePathname.slice(0, -".md".length) || "/";
|
|
499
499
|
const pattern = matchPagePattern(page);
|
|
500
|
-
return pattern ?
|
|
500
|
+
return pattern ? _chunkC2JOS77Zcjs.getFarmMarkdownMirrorPath.call(void 0, pattern) : null;
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
|
|
@@ -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";
|