@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
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
var _chunkHXNLKCWHcjs = require('./chunk-HXNLKCWH.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkPWKAX5MScjs = require('./chunk-PWKAX5MS.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
|
|
14
|
+
|
|
15
|
+
// src/plugins/config-routes.ts
|
|
16
|
+
function createConfigRedirectMatcher(redirects, { i18n, basePath } = {}) {
|
|
17
|
+
for (const redirect of redirects) {
|
|
18
|
+
if (redirect.statusCode !== void 0 && !_chunk7JUIK547cjs.isFarmRedirectStatus.call(void 0, redirect.statusCode)) {
|
|
19
|
+
throw new RangeError(
|
|
20
|
+
`Redirect "${redirect.source}" statusCode must be one of 301, 302, 303, 307, or 308.`
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const compiledRedirects = redirects.map((redirect) => ({
|
|
25
|
+
redirect,
|
|
26
|
+
pattern: _chunkPWKAX5MScjs.compileConfigRoutePattern.call(void 0, redirect.source)
|
|
27
|
+
}));
|
|
28
|
+
return (url) => {
|
|
29
|
+
if (compiledRedirects.length === 0) return null;
|
|
30
|
+
const routePath = _chunkPWKAX5MScjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n, basePath);
|
|
31
|
+
for (const { redirect, pattern } of compiledRedirects) {
|
|
32
|
+
const match = routePath.pathname.match(pattern.regex);
|
|
33
|
+
if (!match) continue;
|
|
34
|
+
const localizedDestination = _chunkPWKAX5MScjs.resolveConfigRedirectDestination.call(void 0,
|
|
35
|
+
_chunkPWKAX5MScjs.interpolateConfigRouteDestination.call(void 0, redirect.destination, match, pattern.tokens),
|
|
36
|
+
routePath.locale,
|
|
37
|
+
i18n,
|
|
38
|
+
basePath
|
|
39
|
+
);
|
|
40
|
+
return {
|
|
41
|
+
destination: _chunkHXNLKCWHcjs.appendFarmRedirectQuery.call(void 0, localizedDestination, url.search),
|
|
42
|
+
statusCode: _nullishCoalesce(redirect.statusCode, () => ( (redirect.permanent ? 308 : 307)))
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function createConfigRewriteMatcher(rewrites, { i18n, basePath } = {}) {
|
|
49
|
+
const compiledRewrites = rewrites.map((rewrite) => ({
|
|
50
|
+
rewrite,
|
|
51
|
+
pattern: _chunkPWKAX5MScjs.compileConfigRoutePattern.call(void 0, rewrite.source)
|
|
52
|
+
}));
|
|
53
|
+
return (url) => {
|
|
54
|
+
if (compiledRewrites.length === 0) return null;
|
|
55
|
+
const routePath = _chunkPWKAX5MScjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n, basePath);
|
|
56
|
+
for (const { rewrite, pattern } of compiledRewrites) {
|
|
57
|
+
const match = routePath.pathname.match(pattern.regex);
|
|
58
|
+
if (!match) continue;
|
|
59
|
+
const destinationUrl = new URL(
|
|
60
|
+
_chunkPWKAX5MScjs.localizeConfigRouteDestination.call(void 0,
|
|
61
|
+
_chunkPWKAX5MScjs.interpolateConfigRouteDestination.call(void 0, rewrite.destination, match, pattern.tokens),
|
|
62
|
+
routePath.locale,
|
|
63
|
+
i18n
|
|
64
|
+
),
|
|
65
|
+
url
|
|
66
|
+
);
|
|
67
|
+
if (!destinationUrl.search && url.search) {
|
|
68
|
+
destinationUrl.search = url.search;
|
|
69
|
+
}
|
|
70
|
+
return destinationUrl;
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function createConfigHeadersMatcher(headers, { i18n, basePath } = {}) {
|
|
76
|
+
const compiledHeaders = headers.map((config) => ({
|
|
77
|
+
config,
|
|
78
|
+
pattern: _chunkPWKAX5MScjs.compileConfigRoutePattern.call(void 0, config.source)
|
|
79
|
+
}));
|
|
80
|
+
return (url) => {
|
|
81
|
+
if (compiledHeaders.length === 0) return [];
|
|
82
|
+
const pathname = _chunkPWKAX5MScjs.resolveConfigRoutePathname.call(void 0, url.pathname, i18n, basePath).pathname;
|
|
83
|
+
return compiledHeaders.filter(({ pattern }) => pattern.regex.test(pathname)).map(({ config }) => config.headers);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function getSetCookieValues(headers) {
|
|
87
|
+
const getSetCookie = headers.getSetCookie;
|
|
88
|
+
if (typeof getSetCookie === "function") return getSetCookie.call(headers);
|
|
89
|
+
const value = headers.get("set-cookie");
|
|
90
|
+
return value ? [value] : [];
|
|
91
|
+
}
|
|
92
|
+
function applyConfigResponseHeaders(response, matchedHeaders) {
|
|
93
|
+
let headers;
|
|
94
|
+
for (const group of matchedHeaders) {
|
|
95
|
+
for (const header of group) {
|
|
96
|
+
const current = _nullishCoalesce(headers, () => ( response.headers));
|
|
97
|
+
const key = header.key.toLowerCase();
|
|
98
|
+
if (key === "set-cookie") {
|
|
99
|
+
if (getSetCookieValues(current).includes(header.value)) continue;
|
|
100
|
+
_nullishCoalesce(headers, () => ( (headers = new Headers(response.headers))));
|
|
101
|
+
headers.append("Set-Cookie", header.value);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const currentValue = current.get(header.key);
|
|
105
|
+
if (currentValue === header.value) continue;
|
|
106
|
+
if (key === "link" && currentValue) {
|
|
107
|
+
if (currentValue.endsWith(`, ${header.value}`)) continue;
|
|
108
|
+
_nullishCoalesce(headers, () => ( (headers = new Headers(response.headers))));
|
|
109
|
+
headers.set("Link", `${currentValue}, ${header.value}`);
|
|
110
|
+
} else {
|
|
111
|
+
_nullishCoalesce(headers, () => ( (headers = new Headers(response.headers))));
|
|
112
|
+
headers.set(header.key, header.value);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (!headers) return response;
|
|
117
|
+
return new Response(response.body, {
|
|
118
|
+
status: response.status,
|
|
119
|
+
statusText: response.statusText,
|
|
120
|
+
headers
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
exports.createConfigRedirectMatcher = createConfigRedirectMatcher; exports.createConfigRewriteMatcher = createConfigRewriteMatcher; exports.createConfigHeadersMatcher = createConfigHeadersMatcher; exports.applyConfigResponseHeaders = applyConfigResponseHeaders;
|
|
@@ -25,7 +25,7 @@ var _chunkGDM3ZD2Ocjs = require('./chunk-GDM3ZD2O.cjs');
|
|
|
25
25
|
var _chunk2LHZD3OPcjs = require('./chunk-2LHZD3OP.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkJX5VOLAVcjs = require('./chunk-JX5VOLAV.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
@@ -117,7 +117,7 @@ async function withTimeout(work, timeoutMs) {
|
|
|
117
117
|
var formatSeconds = (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`;
|
|
118
118
|
function collectSchemaOwners(config) {
|
|
119
119
|
const owners = [];
|
|
120
|
-
const integrationSchemas =
|
|
120
|
+
const integrationSchemas = _chunkJX5VOLAVcjs.getIntegrationSchemas.call(void 0, config.integrations);
|
|
121
121
|
let integrationClient;
|
|
122
122
|
for (const [name, schema] of Object.entries(integrationSchemas)) {
|
|
123
123
|
owners.push({
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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; } async function _asyncOptionalChain(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 = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var _chunkHHLEYA4Bcjs = require('./chunk-HHLEYA4B.cjs');
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkFJMC24KGcjs = require('./chunk-FJMC24KG.cjs');
|
|
7
|
+
var _chunk42KMUIWZcjs = require('./chunk-42KMUIWZ.cjs');
|
|
11
8
|
|
|
12
9
|
|
|
13
10
|
var _chunkXVSBALOYcjs = require('./chunk-XVSBALOY.cjs');
|
|
14
11
|
|
|
15
12
|
|
|
16
|
-
var
|
|
13
|
+
var _chunkXYVPTTUTcjs = require('./chunk-XYVPTTUT.cjs');
|
|
14
|
+
|
|
17
15
|
|
|
18
16
|
|
|
17
|
+
var _chunk3QM74STYcjs = require('./chunk-3QM74STY.cjs');
|
|
19
18
|
|
|
20
|
-
var _chunk65Y5SIBHcjs = require('./chunk-65Y5SIBH.cjs');
|
|
21
19
|
|
|
22
20
|
|
|
23
21
|
|
|
24
|
-
var
|
|
22
|
+
var _chunkDMXMIE2Ccjs = require('./chunk-DMXMIE2C.cjs');
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
@@ -39,6 +37,7 @@ var FARM_RSC_CONFIG_KEYS = [
|
|
|
39
37
|
"srcDir",
|
|
40
38
|
"extends",
|
|
41
39
|
"basePath",
|
|
40
|
+
"trailingSlash",
|
|
42
41
|
"api",
|
|
43
42
|
"server",
|
|
44
43
|
"middleware",
|
|
@@ -50,7 +49,7 @@ var FARM_RSC_CONFIG_KEYS = [
|
|
|
50
49
|
"agent",
|
|
51
50
|
"mcp"
|
|
52
51
|
];
|
|
53
|
-
var FARM_RSC_PASSTHROUGH_KEYS = ["i18n", "cache"];
|
|
52
|
+
var FARM_RSC_PASSTHROUGH_KEYS = ["i18n", "cache", "redirects", "rewrites", "headers"];
|
|
54
53
|
function pickImportTarget(entry) {
|
|
55
54
|
if (typeof entry === "string") return entry;
|
|
56
55
|
if (!entry || typeof entry !== "object") return void 0;
|
|
@@ -61,7 +60,7 @@ function pickImportTarget(entry) {
|
|
|
61
60
|
return void 0;
|
|
62
61
|
}
|
|
63
62
|
async function importFromApp(root, packageName, subpath = ".") {
|
|
64
|
-
const packageDir =
|
|
63
|
+
const packageDir = _chunk42KMUIWZcjs.findFarmAppPackageDir.call(void 0, root, packageName);
|
|
65
64
|
if (!packageDir) return void 0;
|
|
66
65
|
const manifest = JSON.parse(_fs.readFileSync.call(void 0, _path2.default.join(packageDir, "package.json"), "utf8"));
|
|
67
66
|
const exportsMap = manifest.exports;
|
|
@@ -88,12 +87,12 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
88
87
|
importFromApp(root, "@vitejs/plugin-rsc"),
|
|
89
88
|
importFromApp(root, "@vitejs/plugin-react")
|
|
90
89
|
]);
|
|
91
|
-
if (!pluginRsc || !viteRsc || !
|
|
90
|
+
if (!pluginRsc || !viteRsc || !_chunk42KMUIWZcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
|
|
92
91
|
throw new Error(
|
|
93
|
-
`[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}`
|
|
94
93
|
);
|
|
95
94
|
}
|
|
96
|
-
const layered = await
|
|
95
|
+
const layered = await _chunk42KMUIWZcjs.resolveFarmRscCheckConfig.call(void 0,
|
|
97
96
|
userConfig,
|
|
98
97
|
root,
|
|
99
98
|
options.command === "build" ? "production" : "development"
|
|
@@ -107,20 +106,20 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
107
106
|
},
|
|
108
107
|
options.command
|
|
109
108
|
);
|
|
110
|
-
const blockingKeys =
|
|
109
|
+
const blockingKeys = _chunk42KMUIWZcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
|
|
111
110
|
if (blockingKeys.length > 0) {
|
|
112
|
-
throw new Error(`[Farm.js] ${
|
|
111
|
+
throw new Error(`[Farm.js] ${_chunk42KMUIWZcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
|
|
113
112
|
}
|
|
114
113
|
const { plugins: vitePlugins = [], ...viteOptions } = _nullishCoalesce(config.vite, () => ( {}));
|
|
115
114
|
const rscConfig = {};
|
|
116
115
|
for (const key of FARM_RSC_CONFIG_KEYS) {
|
|
117
116
|
if (config[key] !== void 0) rscConfig[key] = config[key];
|
|
118
117
|
}
|
|
119
|
-
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await
|
|
120
|
-
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, );
|
|
121
120
|
const platform = _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, );
|
|
122
121
|
const mobileClient = config.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
|
|
123
|
-
const clientPluginEntry =
|
|
122
|
+
const clientPluginEntry = _chunkDMXMIE2Ccjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
124
123
|
config.plugins,
|
|
125
124
|
root,
|
|
126
125
|
typeof config.srcDir === "string" ? config.srcDir : "src",
|
|
@@ -145,7 +144,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
145
144
|
port: _nullishCoalesce(options.port, () => ( _optionalChain([config, 'access', _5 => _5.server, 'optionalAccess', _6 => _6.port]))),
|
|
146
145
|
plugins: [
|
|
147
146
|
...options.command === "serve" && platform === "desktop" ? [
|
|
148
|
-
|
|
147
|
+
_chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0,
|
|
149
148
|
typeof config.basePath === "string" ? config.basePath : void 0
|
|
150
149
|
)
|
|
151
150
|
] : [],
|
|
@@ -157,7 +156,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
157
156
|
server: { environmentName: "rsc" },
|
|
158
157
|
config: {
|
|
159
158
|
preset: options.preset,
|
|
160
|
-
outputDir: options.outputDir &&
|
|
159
|
+
outputDir: options.outputDir && _chunkXYVPTTUTcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
161
160
|
}
|
|
162
161
|
})
|
|
163
162
|
]
|
|
@@ -177,12 +176,12 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
177
176
|
async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
178
177
|
const kept = _nullishCoalesce(config.plugins, () => ( []));
|
|
179
178
|
const names = new Set(
|
|
180
|
-
kept.filter((plugin) =>
|
|
179
|
+
kept.filter((plugin) => _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, [plugin])).map((plugin) => plugin.name)
|
|
181
180
|
);
|
|
182
181
|
if (names.size === 0) return void 0;
|
|
183
182
|
const loads = (plugin) => {
|
|
184
183
|
const candidate = plugin;
|
|
185
|
-
return !!candidate && names.has(candidate.name) &&
|
|
184
|
+
return !!candidate && names.has(candidate.name) && _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, [candidate]);
|
|
186
185
|
};
|
|
187
186
|
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-7P4RLKVX.cjs");
|
|
188
187
|
const files = [];
|
|
@@ -211,7 +210,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
211
210
|
}
|
|
212
211
|
async function configureFarmRscPlugins(config, command) {
|
|
213
212
|
if (config.plugins.length === 0) return config;
|
|
214
|
-
const { PluginManager } = await import("./plugin-
|
|
213
|
+
const { PluginManager } = await import("./plugin-F2O4BFTK.cjs");
|
|
215
214
|
const manager = new PluginManager({
|
|
216
215
|
config,
|
|
217
216
|
isDev: command === "serve",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDZHTNSQ5cjs = require('./chunk-DZHTNSQ5.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkVNBDN5W2cjs = require('./chunk-VNBDN5W2.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
10
10
|
|
|
11
11
|
// src/navigation.ts
|
|
12
12
|
function useRouter2() {
|
|
13
|
-
const router =
|
|
13
|
+
const router = _chunkDZHTNSQ5cjs.useRouter.call(void 0, );
|
|
14
14
|
return {
|
|
15
15
|
push: router.push,
|
|
16
16
|
replace: router.replace,
|
|
@@ -18,19 +18,19 @@ function useRouter2() {
|
|
|
18
18
|
forward: router.forward,
|
|
19
19
|
refresh() {
|
|
20
20
|
if (typeof window === "undefined") return Promise.resolve();
|
|
21
|
-
return
|
|
21
|
+
return _chunkVNBDN5W2cjs.getRouter.call(void 0, ).refresh();
|
|
22
22
|
},
|
|
23
23
|
prefetch(href) {
|
|
24
24
|
if (typeof window === "undefined") return Promise.resolve();
|
|
25
|
-
return
|
|
25
|
+
return _chunkVNBDN5W2cjs.getRouter.call(void 0, ).prefetch(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, href));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
function usePathname() {
|
|
30
|
-
return
|
|
30
|
+
return _chunkDZHTNSQ5cjs.useRouter.call(void 0, ).pathname;
|
|
31
31
|
}
|
|
32
32
|
function useSearchParams() {
|
|
33
|
-
return
|
|
33
|
+
return _chunkDZHTNSQ5cjs.useRouter.call(void 0, ).searchParams;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
|
|
@@ -15,7 +15,7 @@ function farmDesktopDevGuardPlugin(basePath) {
|
|
|
15
15
|
order: "pre",
|
|
16
16
|
async handler(server) {
|
|
17
17
|
if (_chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ) !== "desktop") return;
|
|
18
|
-
const { createFarmDesktopDevGuard } = await import("./dev-guard-
|
|
18
|
+
const { createFarmDesktopDevGuard } = await import("./dev-guard-ZLLKVO5T.cjs");
|
|
19
19
|
server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
resolveFarmAgentSitemap,
|
|
20
20
|
resolveFarmNoindexPreviews,
|
|
21
21
|
resolveFarmPerformanceConfig
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-REP6HWJN.mjs";
|
|
23
23
|
import {
|
|
24
24
|
resolveFarmAppManifestConfig
|
|
25
25
|
} from "./chunk-SQ5O7I3L.mjs";
|
|
26
26
|
import {
|
|
27
27
|
resolveFarmLlmsTxtConfig
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Z3GPAFIA.mjs";
|
|
29
29
|
import {
|
|
30
30
|
farmCspBlocksFrameworkInlineScripts,
|
|
31
31
|
getFarmSecurityHeader,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
} from "./chunk-UIJOLBUL.mjs";
|
|
65
65
|
import {
|
|
66
66
|
resolveMarkdownConfig
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-KPJYBSHL.mjs";
|
|
68
68
|
import {
|
|
69
69
|
bundleNodeModule
|
|
70
70
|
} from "./chunk-MGKWYPE3.mjs";
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
} from "./chunk-YWPNIYUP.mjs";
|
|
77
77
|
import {
|
|
78
78
|
resolveIntegrationPlugins
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-WW3LRNQV.mjs";
|
|
80
80
|
import {
|
|
81
81
|
compileMiddlewareConfig
|
|
82
82
|
} from "./chunk-EDPENAVO.mjs";
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
95
95
|
import {
|
|
96
96
|
normalizeFarmDeploymentId
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-IWJONXPF.mjs";
|
|
98
98
|
import {
|
|
99
99
|
validateConfigRouteSource
|
|
100
100
|
} from "./chunk-JZGL2PIH.mjs";
|
|
@@ -547,6 +547,12 @@ async function applyFarmDocsFrameworkAutoDetection(userConfig, options) {
|
|
|
547
547
|
|
|
548
548
|
// src/config.ts
|
|
549
549
|
var FARM_RESOLVED_CUSTOM_CONTEXT = /* @__PURE__ */ Symbol.for("farm.resolvedCustomContext");
|
|
550
|
+
var FARM_DEPLOY_TARGET_PRESETS = {
|
|
551
|
+
vercel: "vercel",
|
|
552
|
+
cloudflare: "cloudflare-pages",
|
|
553
|
+
netlify: "netlify",
|
|
554
|
+
node: "node-server"
|
|
555
|
+
};
|
|
550
556
|
function resolveSchemaConfig(config) {
|
|
551
557
|
if (config === void 0) return {};
|
|
552
558
|
if (!config || typeof config !== "object" || Array.isArray(config)) {
|
|
@@ -583,18 +589,8 @@ function normalizeDeployTarget(target) {
|
|
|
583
589
|
return target;
|
|
584
590
|
}
|
|
585
591
|
function getPresetForDeployTarget(target) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
return "vercel";
|
|
589
|
-
case "cloudflare":
|
|
590
|
-
return "cloudflare-pages";
|
|
591
|
-
case "netlify":
|
|
592
|
-
return "netlify";
|
|
593
|
-
case "node":
|
|
594
|
-
return "node-server";
|
|
595
|
-
default:
|
|
596
|
-
return void 0;
|
|
597
|
-
}
|
|
592
|
+
const normalized = normalizeDeployTarget(target);
|
|
593
|
+
return normalized && Object.prototype.hasOwnProperty.call(FARM_DEPLOY_TARGET_PRESETS, normalized) ? FARM_DEPLOY_TARGET_PRESETS[normalized] : void 0;
|
|
598
594
|
}
|
|
599
595
|
function getDeployTargetForPreset(preset) {
|
|
600
596
|
if (!preset) return void 0;
|
|
@@ -637,8 +633,18 @@ function assertFarmDeployNameSupported(kind, name) {
|
|
|
637
633
|
`Deploy ${kind} "vercel-edge" is not supported: Farm's Nitro version has no vercel-edge preset. Use the "vercel" ${kind} instead, which deploys Vercel Functions on Fluid compute.`
|
|
638
634
|
);
|
|
639
635
|
}
|
|
636
|
+
function assertFarmDeployTargetSupported(target) {
|
|
637
|
+
if (!target || getPresetForDeployTarget(target)) return;
|
|
638
|
+
assertFarmDeployNameSupported("target", target);
|
|
639
|
+
const targets = Object.keys(FARM_DEPLOY_TARGET_PRESETS).map((name) => `"${name}"`).join(", ");
|
|
640
|
+
throw new Error(
|
|
641
|
+
`Unknown deploy target "${String(target)}". Farm's deploy targets are ${targets}. To build with another Nitro preset, set deploy.preset instead.`
|
|
642
|
+
);
|
|
643
|
+
}
|
|
640
644
|
function resolveDeployConfig(config, overrides = {}) {
|
|
641
645
|
const deploy = config.deploy || {};
|
|
646
|
+
assertFarmDeployTargetSupported(deploy.target);
|
|
647
|
+
assertFarmDeployTargetSupported(overrides.target);
|
|
642
648
|
const distDir = config.distDir || ".farm";
|
|
643
649
|
const overrideTarget = normalizeDeployTarget(overrides.target);
|
|
644
650
|
let target = overrideTarget ? overrideTarget : overrides.preset ? getDeployTargetForPreset(overrides.preset) : normalizeDeployTarget(deploy.target);
|
|
@@ -662,7 +668,6 @@ function resolveDeployConfig(config, overrides = {}) {
|
|
|
662
668
|
const preset = overrides.preset || overrideTargetPreset || configuredPreset || getPresetForDeployTarget(target) || "node-server";
|
|
663
669
|
const resolvedTarget = target || getDeployTargetForPreset(preset);
|
|
664
670
|
assertFarmDeployNameSupported("preset", preset);
|
|
665
|
-
assertFarmDeployNameSupported("target", resolvedTarget);
|
|
666
671
|
if (detectedTarget && resolvedTarget !== detectedTarget) {
|
|
667
672
|
const mismatchKey = `mismatch:${resolvedTarget}:${detectedTarget}`;
|
|
668
673
|
if (!warnedPlatformMismatches.has(mismatchKey)) {
|
|
@@ -18,9 +18,6 @@ var FARM_RSC_INSTALL_HINT = `pnpm add ${FARM_RSC_PACKAGES.join(" ")}`;
|
|
|
18
18
|
var FARM_RSC_BLOCKING_KEYS = [
|
|
19
19
|
"auth",
|
|
20
20
|
"integrations",
|
|
21
|
-
"headers",
|
|
22
|
-
"redirects",
|
|
23
|
-
"rewrites",
|
|
24
21
|
"routeRules",
|
|
25
22
|
"context",
|
|
26
23
|
// A Content Security Policy the RSC pipeline would not send.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkNSZY3EWGcjs = require('./chunk-NSZY3EWG.cjs');
|
|
4
4
|
|
|
5
5
|
// src/app-markdown.ts
|
|
6
6
|
var _promises = require('fs/promises');
|
|
@@ -8,7 +8,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
8
8
|
var _url = require('url');
|
|
9
9
|
async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
|
|
10
10
|
const source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
11
|
-
return
|
|
11
|
+
return _chunkNSZY3EWGcjs.createFarmMarkdownRouteModule.call(void 0, {
|
|
12
12
|
source,
|
|
13
13
|
filePath,
|
|
14
14
|
components: options.components,
|
|
@@ -14,6 +14,13 @@ function normalizeFarmTrailingSlashPathname(pathname, enabled) {
|
|
|
14
14
|
if (enabled) return pathname.endsWith("/") ? pathname : `${pathname}/`;
|
|
15
15
|
return pathname.replace(/\/+$/, "") || "/";
|
|
16
16
|
}
|
|
17
|
+
function toFarmTrailingSlashPageRequest(request, enabled) {
|
|
18
|
+
const url = new URL(request.url);
|
|
19
|
+
const pathname = normalizeFarmTrailingSlashPathname(url.pathname, enabled);
|
|
20
|
+
if (pathname === url.pathname) return request;
|
|
21
|
+
url.pathname = pathname;
|
|
22
|
+
return new Request(url, request);
|
|
23
|
+
}
|
|
17
24
|
function resolveFarmTrailingSlashRedirect(url, enabled) {
|
|
18
25
|
const pathname = normalizeFarmTrailingSlashPathname(url.pathname, enabled);
|
|
19
26
|
if (pathname === url.pathname) return null;
|
|
@@ -24,5 +31,6 @@ export {
|
|
|
24
31
|
setFarmTrailingSlashPreference,
|
|
25
32
|
getFarmTrailingSlashPreference,
|
|
26
33
|
normalizeFarmTrailingSlashPathname,
|
|
34
|
+
toFarmTrailingSlashPageRequest,
|
|
27
35
|
resolveFarmTrailingSlashRedirect
|
|
28
36
|
};
|
|
@@ -18,9 +18,6 @@ var FARM_RSC_INSTALL_HINT = `pnpm add ${FARM_RSC_PACKAGES.join(" ")}`;
|
|
|
18
18
|
var FARM_RSC_BLOCKING_KEYS = [
|
|
19
19
|
"auth",
|
|
20
20
|
"integrations",
|
|
21
|
-
"headers",
|
|
22
|
-
"redirects",
|
|
23
|
-
"rewrites",
|
|
24
21
|
"routeRules",
|
|
25
22
|
"context",
|
|
26
23
|
// A Content Security Policy the RSC pipeline would not send.
|
|
@@ -15,14 +15,14 @@ var _chunkWBTHHTBOcjs = require('./chunk-WBTHHTBO.cjs');
|
|
|
15
15
|
var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkMZLJFNMHcjs = require('./chunk-MZLJFNMH.cjs');
|
|
19
19
|
|
|
20
20
|
// src/mobile/analyzer.ts
|
|
21
21
|
var _crypto = require('crypto');
|
|
22
22
|
var _fs = require('fs');
|
|
23
23
|
var _promises = require('fs/promises');
|
|
24
24
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
25
|
-
var ANALYZER_VERSION = `7:${
|
|
25
|
+
var ANALYZER_VERSION = `7:${_chunkMZLJFNMHcjs.FARM_VERSION}`;
|
|
26
26
|
var INTRINSIC_KINDS = {};
|
|
27
27
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
28
28
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collectFarmLlmsTxtPages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z3GPAFIA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getFarmMarkdownMirrorPath,
|
|
6
6
|
isFarmMarkdownMirrorExposed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KPJYBSHL.mjs";
|
|
8
8
|
import {
|
|
9
9
|
_listFarmMCPCatalogs,
|
|
10
10
|
_listFarmRegisteredMCPServers
|
|
11
11
|
} from "./chunk-C7GJDVN4.mjs";
|
|
12
|
+
import {
|
|
13
|
+
normalizeFarmTrailingSlashPathname
|
|
14
|
+
} from "./chunk-4O26BPUY.mjs";
|
|
15
|
+
import {
|
|
16
|
+
localizeFarmPathname
|
|
17
|
+
} from "./chunk-7S7AAK2D.mjs";
|
|
12
18
|
import {
|
|
13
19
|
applyFarmBasePath,
|
|
14
20
|
stripFarmBasePath
|
|
@@ -108,6 +114,8 @@ function collectFarmDefaultMCPPages(sources, options) {
|
|
|
108
114
|
if (!isFarmMarkdownMirrorExposed(options.markdown, source.pattern)) continue;
|
|
109
115
|
readable.push({ pattern: source.pattern, metadata: module?.metadata });
|
|
110
116
|
}
|
|
117
|
+
const i18n = resolveFarmDefaultMCPI18n(options.i18n, options.basePath);
|
|
118
|
+
const toPublicPath = (pathname) => i18n ? localizeFarmPathname(pathname, i18n.defaultLocale, i18n) : applyFarmBasePath(pathname, options.basePath);
|
|
111
119
|
return collectFarmLlmsTxtPages(readable, {
|
|
112
120
|
origin: options.origin,
|
|
113
121
|
basePath: options.basePath,
|
|
@@ -115,14 +123,20 @@ function collectFarmDefaultMCPPages(sources, options) {
|
|
|
115
123
|
}).map((page) => ({
|
|
116
124
|
path: page.path,
|
|
117
125
|
title: page.title,
|
|
118
|
-
|
|
126
|
+
// As the sitemap lists it: '/base' without trailingSlash ('/base/' redirects there).
|
|
127
|
+
url: `${options.origin}${normalizeFarmTrailingSlashPathname(
|
|
128
|
+
toPublicPath(page.path),
|
|
129
|
+
options.trailingSlash === true
|
|
130
|
+
)}`,
|
|
119
131
|
...page.description ? { description: page.description } : {},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
options.basePath
|
|
123
|
-
)}`
|
|
132
|
+
// A mirror keeps its .md URL whatever trailingSlash says, as llms.txt links it.
|
|
133
|
+
markdownUrl: `${options.origin}${toPublicPath(getFarmMarkdownMirrorPath(page.path))}`
|
|
124
134
|
}));
|
|
125
135
|
}
|
|
136
|
+
function resolveFarmDefaultMCPI18n(i18n, basePath) {
|
|
137
|
+
if (!i18n || i18n.enabled === false) return void 0;
|
|
138
|
+
return { ...i18n, basePath: basePath ?? i18n.basePath };
|
|
139
|
+
}
|
|
126
140
|
function createFarmDefaultMCPServer(app, farmVersion) {
|
|
127
141
|
const name = typeof app?.name === "string" && app.name.trim() ? app.name.trim() : "farm-app";
|
|
128
142
|
const version = typeof app?.version === "string" && app.version.trim() ? app.version.trim() : farmVersion;
|
|
@@ -162,6 +176,7 @@ export {
|
|
|
162
176
|
FARM_DEFAULT_MCP_DESCRIPTION,
|
|
163
177
|
FARM_DEFAULT_MCP_TOOLS,
|
|
164
178
|
collectFarmDefaultMCPPages,
|
|
179
|
+
resolveFarmDefaultMCPI18n,
|
|
165
180
|
createFarmDefaultMCPServer,
|
|
166
181
|
resolveFarmDefaultMCPServer,
|
|
167
182
|
isFarmDefaultMCPPathname,
|