@farm.js/core 0.1.69 → 0.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-FER4MQDF.cjs → agent-mcp-handler-6T2Z7TB6.cjs} +8 -5
- package/dist/{agent-mcp-handler-AZ7QW4UP.mjs → agent-mcp-handler-CPU354QQ.mjs} +7 -4
- package/dist/{agent-mcp.d-DOfBMEzP.d.mts → agent-mcp.d-DulgFLBt.d.ts} +13 -4
- package/dist/{agent-mcp.d-DnIgriX1.d.ts → agent-mcp.d-TAs1ES2F.d.mts} +13 -4
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +3 -2
- package/dist/agent-runtime.d.ts +3 -2
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-GUIRJWZH.cjs +16 -0
- package/dist/{analyzer-NAL5TJUP.mjs → analyzer-QGRBLETM.mjs} +2 -2
- package/dist/api/node.d.mts +5 -4
- package/dist/api/node.d.ts +5 -4
- package/dist/api/route-manager.cjs +4 -4
- package/dist/api/route-manager.d.mts +16 -7
- package/dist/api/route-manager.d.ts +16 -7
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.d.mts +4 -3
- package/dist/api/runtime.d.ts +4 -3
- package/dist/api.cjs +6 -6
- package/dist/api.d.mts +8 -7
- package/dist/api.d.ts +8 -7
- package/dist/api.mjs +5 -5
- package/dist/{app-manifest.d-_BVbI0xp.d.mts → app-manifest.d-6zXb90o6.d.mts} +1 -1
- package/dist/{app-manifest.d-CaAcaukR.d.ts → app-manifest.d-C-nf3Vmm.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -4
- package/dist/app-markdown.d.mts +4 -3
- package/dist/app-markdown.d.ts +4 -3
- package/dist/app-markdown.mjs +4 -3
- package/dist/{app.d-BWeDqOaF.d.ts → app.d-C2xeMIYT.d.ts} +18 -8
- package/dist/{app.d-CaPwtytN.d.mts → app.d-DF0aundc.d.mts} +18 -8
- package/dist/{base-path.d-CTDVF0Fc.d.mts → base-path.d-BJ3SYpB8.d.mts} +6 -1
- package/dist/{base-path.d-CTDVF0Fc.d.ts → base-path.d-BJ3SYpB8.d.ts} +6 -1
- package/dist/{chunk-4ZXKYCYK.mjs → chunk-255J7K4X.mjs} +1 -1
- package/dist/{chunk-RVGLYMJM.cjs → chunk-2AM26UGI.cjs} +2 -2
- package/dist/{chunk-UPOYKX4S.cjs → chunk-2MR4MABG.cjs} +4 -4
- package/dist/chunk-2RCCFB2Y.cjs +129 -0
- package/dist/{chunk-K6VFYFOY.cjs → chunk-2W4GNXGX.cjs} +2 -2
- package/dist/{chunk-F6YLXK5L.cjs → chunk-32SYRIQ7.cjs} +18 -18
- package/dist/{chunk-CV6MFQ4Y.mjs → chunk-3AUINHFG.mjs} +1 -1
- package/dist/{chunk-ZYCEEE3V.mjs → chunk-3EXCZJEN.mjs} +2 -2
- package/dist/{chunk-MMDKYJ5V.cjs → chunk-3GNVIYPO.cjs} +7 -7
- package/dist/{chunk-65Y5SIBH.cjs → chunk-3QM74STY.cjs} +1 -1
- package/dist/{chunk-SZORL7EW.mjs → chunk-3WS5AZ3R.mjs} +5 -5
- package/dist/{chunk-FJMC24KG.cjs → chunk-42KMUIWZ.cjs} +0 -3
- package/dist/{chunk-LR4KP3I7.cjs → chunk-4AC4PXZO.cjs} +2 -2
- package/dist/{chunk-YVPX5PI5.mjs → chunk-4O26BPUY.mjs} +8 -0
- package/dist/{chunk-LENKRGBV.mjs → chunk-5CFHQ7HM.mjs} +1 -1
- package/dist/{chunk-G7NBPP7H.mjs → chunk-5IJRJWJS.mjs} +1 -1
- package/dist/{chunk-MV7NWU23.mjs → chunk-5R3JQPWD.mjs} +1 -1
- package/dist/{chunk-3Y52TWYU.mjs → chunk-62ZRA7XU.mjs} +0 -3
- package/dist/{chunk-ABIBASLJ.cjs → chunk-65FPDDT4.cjs} +2 -2
- package/dist/{chunk-K6SXMVXO.mjs → chunk-75E5FDX2.mjs} +22 -7
- package/dist/{chunk-K76CBYQM.mjs → chunk-7A3URI2F.mjs} +20 -0
- package/dist/{chunk-ZR2QB45W.mjs → chunk-A2TH5MKE.mjs} +4 -4
- package/dist/{chunk-L5OZN6YW.cjs → chunk-A7HCBHMC.cjs} +3 -3
- package/dist/{chunk-VX2HZGC7.cjs → chunk-ACGBXN3U.cjs} +2 -2
- package/dist/{chunk-TKYOJ5G2.cjs → chunk-BPUVDCGG.cjs} +5 -5
- package/dist/{chunk-FT6KJHS3.cjs → chunk-C2JOS77Z.cjs} +4 -1
- package/dist/{chunk-UHU4QALN.mjs → chunk-CCHJWJGP.mjs} +177 -102
- package/dist/{chunk-CRVSYDHV.mjs → chunk-CKQAQFF6.mjs} +2 -2
- package/dist/chunk-DC2AXGNZ.mjs +129 -0
- package/dist/{chunk-4W4ZWSV2.cjs → chunk-DIHBWZDZ.cjs} +391 -335
- package/dist/{chunk-Q4HH5Q6A.cjs → chunk-DMXMIE2C.cjs} +2 -2
- package/dist/{chunk-23VJEGKC.cjs → chunk-DVJM55D2.cjs} +9 -1
- package/dist/{chunk-QSUYB3RH.cjs → chunk-DZHTNSQ5.cjs} +14 -14
- package/dist/{chunk-OIOPQ25L.mjs → chunk-E77IA5IF.mjs} +46 -33
- package/dist/{chunk-PEYDQMSA.mjs → chunk-EDZU7YRK.mjs} +5 -5
- package/dist/{chunk-EZTKXD6P.cjs → chunk-FDGYDQGL.cjs} +8 -1
- package/dist/{chunk-PLJKJJ2H.mjs → chunk-FETMUBIA.mjs} +27 -82
- package/dist/{chunk-HJZZSBVK.cjs → chunk-FILXOEWD.cjs} +2 -2
- package/dist/{chunk-L6NWQ3DR.cjs → chunk-FJ5YCERM.cjs} +375 -300
- package/dist/{chunk-PDFFYZAT.cjs → chunk-GF22VGMS.cjs} +2 -2
- package/dist/{chunk-OOJBBHYW.cjs → chunk-GVYZCJZH.cjs} +30 -1
- package/dist/{chunk-5TOWKGV3.mjs → chunk-HAXFV2CD.mjs} +1 -1
- package/dist/{chunk-YOHHL2UE.mjs → chunk-I4KPA2C6.mjs} +1 -1
- package/dist/{chunk-4JRAMCUP.cjs → chunk-I7NUT24Z.cjs} +22 -22
- package/dist/{chunk-VO65MYJD.cjs → chunk-IEN2EFE5.cjs} +4 -4
- package/dist/{chunk-NVOMQLI2.mjs → chunk-IWJONXPF.mjs} +11 -0
- package/dist/{chunk-RLH5AH2M.mjs → chunk-JDO346NV.mjs} +1 -1
- package/dist/{chunk-PDQ6EGPK.mjs → chunk-JFVT5ZZV.mjs} +2 -2
- package/dist/{chunk-ULMXZYOA.mjs → chunk-JRF2SKCD.mjs} +1 -1
- package/dist/{chunk-YIHRZBD7.cjs → chunk-JRGR5Z4K.cjs} +1 -1
- package/dist/{chunk-UKZ6AWKZ.cjs → chunk-JWY66PID.cjs} +44 -1
- package/dist/{chunk-BDYM2TN3.cjs → chunk-JX5VOLAV.cjs} +8 -8
- package/dist/{chunk-WMLSZAKN.mjs → chunk-JZQS3ZOI.mjs} +1 -1
- package/dist/{chunk-GQ6QOH7T.cjs → chunk-K4UGCUXX.cjs} +12 -12
- package/dist/{chunk-OFBLGH6V.cjs → chunk-K66JILV3.cjs} +47 -34
- package/dist/{chunk-QOGIZKSO.cjs → chunk-K7JMTAFH.cjs} +5 -5
- package/dist/{chunk-IFR74W6S.mjs → chunk-KPJYBSHL.mjs} +4 -1
- package/dist/{chunk-CKCKCUYO.mjs → chunk-KPMLDT3B.mjs} +146 -90
- package/dist/{chunk-KI3MU7B5.mjs → chunk-LDVJIBGN.mjs} +1 -1
- package/dist/{chunk-GUMKIQJL.cjs → chunk-LECZ5DPZ.cjs} +2 -2
- package/dist/{chunk-5FBZJJGA.mjs → chunk-LXEJNWF5.mjs} +2 -2
- package/dist/{chunk-DHR2WDSL.cjs → chunk-M6U6E4F7.cjs} +335 -285
- package/dist/{chunk-AKIQ54FK.cjs → chunk-MBCRWU3P.cjs} +26 -81
- package/dist/{chunk-P2NBQ5JI.mjs → chunk-MWUDEYBI.mjs} +1 -1
- package/dist/{chunk-22LGTSBA.cjs → chunk-MZLJFNMH.cjs} +1 -1
- package/dist/{chunk-MAGFDK4Q.mjs → chunk-N62IYXYD.mjs} +1 -1
- package/dist/{chunk-ZPKJPM7K.mjs → chunk-NA77GEIU.mjs} +2 -2
- package/dist/{chunk-FVYBEMOD.cjs → chunk-NAXKOTPP.cjs} +6 -6
- package/dist/{chunk-I7J5RLGO.cjs → chunk-NLBHLPEO.cjs} +12 -1
- package/dist/{chunk-3EEINK7G.cjs → chunk-NSZY3EWG.cjs} +10 -7
- package/dist/{chunk-ANMIR6US.mjs → chunk-NYF7A4UW.mjs} +1 -1
- package/dist/{chunk-QO43L7Z4.cjs → chunk-O32QPFVV.cjs} +25 -7
- package/dist/{chunk-CO6UYM2D.mjs → chunk-O5QUJEWT.mjs} +1 -1
- package/dist/{chunk-JL2YW5KX.mjs → chunk-OAEDVXVE.mjs} +44 -1
- package/dist/{chunk-GTQOEEE7.cjs → chunk-Q5HMVGR5.cjs} +13 -13
- package/dist/{chunk-5NFQ6AZI.cjs → chunk-QEWWKYDL.cjs} +25 -10
- package/dist/{chunk-QOSDWGKT.mjs → chunk-QVBXTSIZ.mjs} +1 -1
- package/dist/{chunk-2P7UYHZP.mjs → chunk-QZHTDVH4.mjs} +1 -1
- package/dist/{chunk-HEJM46HQ.mjs → chunk-R7254L3R.mjs} +5 -2
- package/dist/{chunk-OGVTUGMU.mjs → chunk-REP6HWJN.mjs} +13 -3
- package/dist/{chunk-IYLZZTP6.mjs → chunk-RMOU3PR4.mjs} +112 -62
- package/dist/{chunk-WYL4ODZ4.mjs → chunk-SE7HPBYK.mjs} +30 -1
- package/dist/{chunk-D5F7RPZP.mjs → chunk-THG2TVDH.mjs} +3 -3
- package/dist/{chunk-TEJ67GD2.mjs → chunk-TLSSIYAL.mjs} +20 -5
- package/dist/{chunk-DWLNLU55.cjs → chunk-TPYAYFMF.cjs} +2 -2
- package/dist/{chunk-Y6KHPJDB.cjs → chunk-U7VH3Q5E.cjs} +2 -2
- package/dist/{chunk-X3MHKLCO.cjs → chunk-VG6HYT5K.cjs} +26 -11
- package/dist/{chunk-437QZIC2.cjs → chunk-VNBDN5W2.cjs} +5 -5
- package/dist/{chunk-AJNBTOVQ.mjs → chunk-WW3LRNQV.mjs} +1 -1
- package/dist/{chunk-GFPS7MNE.mjs → chunk-WX63N6C5.mjs} +4 -4
- package/dist/{chunk-6GQJVY4E.cjs → chunk-XYVPTTUT.cjs} +13 -13
- package/dist/{chunk-VOQ7XZZT.cjs → chunk-Y2SZVIVH.cjs} +20 -0
- package/dist/{chunk-XCAQTCGK.mjs → chunk-YBY34UHB.mjs} +1 -1
- package/dist/{chunk-YGJ5P3TJ.mjs → chunk-Z3GPAFIA.mjs} +21 -3
- package/dist/{chunk-4E57QHPW.cjs → chunk-ZUVAGMQ5.cjs} +17 -7
- package/dist/{chunk-23LVFSID.mjs → chunk-ZXDX7VYZ.mjs} +7 -0
- package/dist/{client-component.d-CnEeVvGG.d.mts → client-component.d-Bk5qKJM-.d.mts} +2 -2
- package/dist/{client-component.d-CfJxuXZl.d.ts → client-component.d-DNbC4oWI.d.ts} +2 -2
- package/dist/{client-plugins.d-D7dHV1Nf.d.ts → client-plugins.d-DwUqh4gp.d.ts} +36 -3
- package/dist/{client-plugins.d-Do5ULA0x.d.mts → client-plugins.d-Pi9nG0W0.d.mts} +36 -3
- package/dist/client-plugins.d.mts +3 -2
- package/dist/client-plugins.d.ts +3 -2
- package/dist/client.cjs +6 -6
- package/dist/client.d.mts +8 -7
- package/dist/client.d.ts +8 -7
- package/dist/client.mjs +5 -5
- package/dist/config.d.mts +3 -2
- package/dist/config.d.ts +3 -2
- package/dist/deployment.cjs +4 -2
- package/dist/deployment.d.mts +7 -1
- package/dist/deployment.d.ts +7 -1
- package/dist/deployment.mjs +5 -3
- package/dist/desktop.d.mts +4 -3
- package/dist/desktop.d.ts +4 -3
- package/dist/{dev-guard-ONNMVQUN.mjs → dev-guard-ZDIELV6Q.mjs} +1 -1
- package/dist/{dev-guard-2UW2KERP.cjs → dev-guard-ZLLKVO5T.cjs} +2 -2
- package/dist/{devtools-BP4EBTKQ.mjs → devtools-CB43AHEP.mjs} +8 -7
- package/dist/{devtools-7HNDS4SY.cjs → devtools-L5DUNDF3.cjs} +9 -8
- package/dist/docs.cjs +12 -11
- package/dist/docs.d.mts +4 -3
- package/dist/docs.d.ts +4 -3
- package/dist/docs.mjs +11 -10
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/headers.d-CE6OWB-n.d.ts +18 -0
- package/dist/headers.d-DED1hHh4.d.mts +18 -0
- package/dist/i18n/client.cjs +2 -2
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +1 -1
- package/dist/i18n/index.cjs +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +1 -1
- package/dist/i18n/server.cjs +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +2 -2
- package/dist/index.cjs +46 -43
- package/dist/{index.d-B1MpEJAo.d.mts → index.d-CbvOjJcp.d.mts} +1 -1
- package/dist/{index.d-CVFk37uX.d.ts → index.d-c9UwIqDy.d.ts} +1 -1
- package/dist/index.d.mts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.mjs +59 -56
- package/dist/integrations/orm.d.mts +3 -2
- package/dist/integrations/orm.d.ts +3 -2
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +3 -2
- package/dist/integrations.d.ts +3 -2
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +4 -3
- package/dist/internal/app-markdown-runtime.d.mts +4 -3
- package/dist/internal/app-markdown-runtime.d.ts +4 -3
- package/dist/internal/app-markdown-runtime.mjs +3 -2
- package/dist/internal/build-runtime.cjs +35 -35
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +34 -34
- package/dist/internal/cli-runtime.cjs +15 -14
- package/dist/internal/cli-runtime.mjs +14 -13
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +5 -3
- package/dist/internal/client-runtime.d.mts +17 -7
- package/dist/internal/client-runtime.d.ts +17 -7
- package/dist/internal/client-runtime.mjs +4 -2
- package/dist/internal/compression-runtime.d.mts +3 -2
- package/dist/internal/compression-runtime.d.ts +3 -2
- package/dist/internal/config-runtime.cjs +10 -9
- package/dist/internal/config-runtime.d.mts +6 -5
- package/dist/internal/config-runtime.d.ts +6 -5
- package/dist/internal/config-runtime.mjs +9 -8
- package/dist/internal/infra-analytics-runtime.cjs +12 -9
- package/dist/internal/infra-analytics-runtime.mjs +10 -7
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +48 -17
- package/dist/internal/production-runtime.d.mts +48 -18
- package/dist/internal/production-runtime.d.ts +48 -18
- package/dist/internal/production-runtime.mjs +50 -19
- package/dist/internal/vercel-edge-middleware.cjs +3 -2
- package/dist/internal/vercel-edge-middleware.d.mts +2 -2
- package/dist/internal/vercel-edge-middleware.d.ts +2 -2
- package/dist/internal/vercel-edge-middleware.mjs +2 -1
- package/dist/markdown.cjs +3 -2
- package/dist/markdown.d.mts +3 -2
- package/dist/markdown.d.ts +3 -2
- package/dist/markdown.mjs +2 -1
- package/dist/middleware.cjs +6 -5
- package/dist/middleware.d.mts +4 -3
- package/dist/middleware.d.ts +4 -3
- package/dist/middleware.mjs +5 -4
- package/dist/mobile.d.mts +3 -3
- package/dist/mobile.d.ts +3 -3
- package/dist/{mount.d-CBqr-LfI.d.mts → mount.d-BvWxf8ZE.d.mts} +1 -1
- package/dist/{mount.d-CGzN61Kq.d.ts → mount.d-DngLY7NL.d.ts} +1 -1
- package/dist/{native-tree-W2SSJB3Y.cjs → native-tree-GF4BH33L.cjs} +4 -3
- package/dist/{native-tree-Y5YQANW7.mjs → native-tree-L2IIEBXH.mjs} +3 -2
- package/dist/{navigation-delegate.d-BwCOhpj7.d.mts → navigation-delegate.d-CMyl1h2l.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CLH2dXjy.d.ts → navigation-delegate.d-zZogiDfa.d.ts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +6 -5
- package/dist/navigation.d.ts +6 -5
- package/dist/navigation.mjs +4 -4
- package/dist/plugin.cjs +28 -27
- package/dist/plugin.d.mts +6 -4
- package/dist/plugin.d.ts +6 -4
- package/dist/plugin.mjs +27 -26
- package/dist/{production-runtime.d-DMZY3OgV.d.mts → production-runtime.d-B0IeWWyO.d.mts} +23 -2
- package/dist/{production-runtime.d-BMyyLGBB.d.ts → production-runtime.d-q3aHIv5Y.d.ts} +23 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-W6LmjD6y.d.ts → render-plan.d-DQj2bzd2.d.ts} +1 -1
- package/dist/{render-plan.d-CzGDjcT0.d.mts → render-plan.d-Di1znBDW.d.mts} +1 -1
- package/dist/renderer-client.cjs +7 -7
- package/dist/renderer-client.d.mts +6 -5
- package/dist/renderer-client.d.ts +6 -5
- package/dist/renderer-client.mjs +3 -3
- package/dist/{request.d-CTVRZiQv.d.ts → request.d-C5vyoYeL.d.ts} +1 -1
- package/dist/{request.d-CgNVderU.d.mts → request.d-CJWzfDYJ.d.mts} +1 -1
- package/dist/request.d.mts +4 -3
- package/dist/request.d.ts +4 -3
- package/dist/{resolver.d-JnZKKsc5.d.mts → resolver.d-9iKC79CU.d.mts} +1 -1
- package/dist/{resolver.d-BHyZgpa7.d.ts → resolver.d-CY6mEa_F.d.ts} +1 -1
- package/dist/response.d-B_MtBCnF.d.mts +12 -0
- package/dist/response.d-B_MtBCnF.d.ts +12 -0
- package/dist/{route-rendering.d-D0bmZVJA.d.mts → route-rendering.d-C-et2TZ1.d.mts} +9 -2
- package/dist/{route-rendering.d-FDSNtCMg.d.ts → route-rendering.d-DhsY5M2I.d.ts} +9 -2
- package/dist/{router.d-GRKm_uAV.d.mts → router.d-BMDS5s5X.d.mts} +1 -1
- package/dist/{router.d-DZ3ldniI.d.ts → router.d-CJB-Ntni.d.ts} +1 -1
- package/dist/{routes.d-CrEy0lJS.d.mts → routes.d-D3aJw1H5.d.mts} +1 -1
- package/dist/{routes.d-9GFFNioh.d.ts → routes.d-K-Qg79AA.d.ts} +1 -1
- package/dist/routes.d.mts +3 -2
- package/dist/routes.d.ts +3 -2
- package/dist/{index.d-BNNDpql4.d.ts → routing.d-BxOZ2YWc.d.ts} +1 -2
- package/dist/{index.d-BqcfqJvt.d.mts → routing.d-DwSUVZbF.d.mts} +1 -2
- package/dist/{rsc-pipeline-PJZOVYSY.mjs → rsc-pipeline-AXQJCCHI.mjs} +12 -11
- package/dist/{rsc-pipeline-J4KKBSCH.cjs → rsc-pipeline-NJKLZ3YE.cjs} +13 -12
- package/dist/{runtime-OLEO5NXF.cjs → runtime-DMW6DDOI.cjs} +19 -18
- package/dist/{runtime-QDBSE4H6.mjs → runtime-JXNEKOSE.mjs} +11 -10
- package/dist/{runtime.d-BtL3PCL3.d.ts → runtime.d-B_uPfMjA.d.ts} +2 -2
- package/dist/{runtime.d-DqXihlxm.d.mts → runtime.d-BonodRI9.d.mts} +1 -1
- package/dist/{runtime.d-3iJAKptR.d.mts → runtime.d-nUz0HAL4.d.mts} +2 -2
- package/dist/{runtime.d-pqFQBU2N.d.ts → runtime.d-uw4123iI.d.ts} +1 -1
- package/dist/server-plugins.cjs +3 -2
- package/dist/server-plugins.d.mts +6 -12
- package/dist/server-plugins.d.ts +6 -12
- package/dist/server-plugins.mjs +2 -1
- package/dist/server.cjs +60 -52
- package/dist/server.d.mts +23 -14
- package/dist/server.d.ts +23 -14
- package/dist/server.mjs +38 -30
- package/dist/{spa-router.d-DhOhaQ-7.d.ts → spa-router.d-l0d9pPZj.d.ts} +3 -3
- package/dist/{spa-router.d-Dhvy60p4.d.mts → spa-router.d-rha3M95y.d.mts} +3 -3
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.mts +3 -2
- package/dist/testing.d.ts +3 -2
- package/dist/testing.mjs +3 -3
- package/dist/{types.d-C41ePjvP.d.ts → types.d-wVRlLtBf.d.mts} +1 -1
- package/dist/{types.d-C41ePjvP.d.mts → types.d-wVRlLtBf.d.ts} +1 -1
- package/dist/{utils.d-BVCMRRau.d.ts → utils.d-BK-PTOF8.d.ts} +1 -1
- package/dist/{utils.d-Q8EHCpkF.d.mts → utils.d-BzuTobEc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +35 -27
- package/dist/vite.d.mts +26 -6
- package/dist/vite.d.ts +26 -6
- package/dist/vite.mjs +34 -26
- package/package.json +2 -2
- package/dist/analyzer-SAJSV6SP.cjs +0 -16
- package/dist/response.d-BolW0Vx_.d.mts +0 -10
- package/dist/response.d-BolW0Vx_.d.ts +0 -10
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk3QM74STYcjs = require('./chunk-3QM74STY.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkO47W53D3cjs = require('./chunk-O47W53D3.cjs');
|
|
@@ -30,12 +30,12 @@ var _chunkO47W53D3cjs = require('./chunk-O47W53D3.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkM6U6E4F7cjs = require('./chunk-M6U6E4F7.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkDMXMIE2Ccjs = require('./chunk-DMXMIE2C.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
var _chunkJFPKARWMcjs = require('./chunk-JFPKARWM.cjs');
|
|
@@ -45,7 +45,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkK7JMTAFHcjs = require('./chunk-K7JMTAFH.cjs');
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
@@ -61,7 +61,7 @@ var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunk2MR4MABGcjs = require('./chunk-2MR4MABG.cjs');
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
@@ -79,13 +79,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkK4UGCUXXcjs = require('./chunk-K4UGCUXX.cjs');
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
var
|
|
85
|
+
var _chunkVG6HYT5Kcjs = require('./chunk-VG6HYT5K.cjs');
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
var
|
|
88
|
+
var _chunkLECZ5DPZcjs = require('./chunk-LECZ5DPZ.cjs');
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
@@ -120,7 +120,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
var
|
|
123
|
+
var _chunkIEN2EFE5cjs = require('./chunk-IEN2EFE5.cjs');
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
|
|
@@ -144,10 +144,10 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
|
144
144
|
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
var
|
|
147
|
+
var _chunkZUVAGMQ5cjs = require('./chunk-ZUVAGMQ5.cjs');
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
var
|
|
150
|
+
var _chunkO32QPFVVcjs = require('./chunk-O32QPFVV.cjs');
|
|
151
151
|
|
|
152
152
|
|
|
153
153
|
var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
@@ -177,7 +177,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
|
177
177
|
|
|
178
178
|
|
|
179
179
|
|
|
180
|
-
var
|
|
180
|
+
var _chunkNSZY3EWGcjs = require('./chunk-NSZY3EWG.cjs');
|
|
181
181
|
|
|
182
182
|
|
|
183
183
|
|
|
@@ -185,21 +185,21 @@ var _chunk3EEINK7Gcjs = require('./chunk-3EEINK7G.cjs');
|
|
|
185
185
|
|
|
186
186
|
|
|
187
187
|
|
|
188
|
-
var
|
|
188
|
+
var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
var
|
|
195
|
+
var _chunkJX5VOLAVcjs = require('./chunk-JX5VOLAV.cjs');
|
|
196
196
|
|
|
197
197
|
|
|
198
198
|
|
|
199
199
|
var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
var
|
|
202
|
+
var _chunkACGBXN3Ucjs = require('./chunk-ACGBXN3U.cjs');
|
|
203
203
|
|
|
204
204
|
|
|
205
205
|
|
|
@@ -215,10 +215,10 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
215
215
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
216
216
|
|
|
217
217
|
|
|
218
|
-
var
|
|
218
|
+
var _chunkK66JILV3cjs = require('./chunk-K66JILV3.cjs');
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
var
|
|
221
|
+
var _chunk2AM26UGIcjs = require('./chunk-2AM26UGI.cjs');
|
|
222
222
|
|
|
223
223
|
|
|
224
224
|
|
|
@@ -243,7 +243,7 @@ var _chunkY3WG64CPcjs = require('./chunk-Y3WG64CP.cjs');
|
|
|
243
243
|
|
|
244
244
|
|
|
245
245
|
|
|
246
|
-
var
|
|
246
|
+
var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
247
247
|
|
|
248
248
|
|
|
249
249
|
|
|
@@ -278,7 +278,10 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
278
278
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
279
279
|
|
|
280
280
|
|
|
281
|
-
var
|
|
281
|
+
var _chunkMZLJFNMHcjs = require('./chunk-MZLJFNMH.cjs');
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
282
285
|
|
|
283
286
|
|
|
284
287
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -293,19 +296,19 @@ var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
|
|
|
293
296
|
var _chunk6IOZPJ3Icjs = require('./chunk-6IOZPJ3I.cjs');
|
|
294
297
|
|
|
295
298
|
|
|
299
|
+
var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
296
300
|
|
|
297
301
|
|
|
298
302
|
|
|
299
|
-
var _chunkI7J5RLGOcjs = require('./chunk-I7J5RLGO.cjs');
|
|
300
303
|
|
|
301
304
|
|
|
302
|
-
var
|
|
305
|
+
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
303
306
|
|
|
304
307
|
|
|
305
308
|
|
|
306
309
|
|
|
307
310
|
|
|
308
|
-
var
|
|
311
|
+
var _chunkMBCRWU3Pcjs = require('./chunk-MBCRWU3P.cjs');
|
|
309
312
|
|
|
310
313
|
|
|
311
314
|
|
|
@@ -1017,13 +1020,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkQMNWKQL4cjs.logge
|
|
|
1017
1020
|
// src/vite.ts
|
|
1018
1021
|
var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
|
|
1019
1022
|
function farmLlmsTxtGeneratedPaths(config) {
|
|
1020
|
-
const llms =
|
|
1023
|
+
const llms = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _57 => _57.agent, 'optionalAccess', _58 => _58.llmsTxt]));
|
|
1021
1024
|
if (!llms.enabled) return [];
|
|
1022
1025
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
1023
1026
|
}
|
|
1024
1027
|
function farmAgentGeneratedPaths(config) {
|
|
1025
|
-
const crawlers =
|
|
1026
|
-
const sitemap =
|
|
1028
|
+
const crawlers = _chunkZUVAGMQ5cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _59 => _59.agent, 'optionalAccess', _60 => _60.crawlers]));
|
|
1029
|
+
const sitemap = _chunkZUVAGMQ5cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _61 => _61.agent, 'optionalAccess', _62 => _62.sitemap]));
|
|
1027
1030
|
return [
|
|
1028
1031
|
...farmLlmsTxtGeneratedPaths(config),
|
|
1029
1032
|
...sitemap.enabled ? ["/sitemap.xml"] : [],
|
|
@@ -1068,7 +1071,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1068
1071
|
return import("./workflows.cjs");
|
|
1069
1072
|
}
|
|
1070
1073
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1071
|
-
return import("./devtools-
|
|
1074
|
+
return import("./devtools-L5DUNDF3.cjs");
|
|
1072
1075
|
}
|
|
1073
1076
|
function loadFarmDevtoolsUIRuntime() {
|
|
1074
1077
|
return import("./devtools-ui-SYRUXUA7.cjs");
|
|
@@ -1099,16 +1102,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1099
1102
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1100
1103
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1101
1104
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1102
|
-
|
|
1103
|
-
new RegExp(`^${
|
|
1105
|
+
_chunkM6U6E4F7cjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1106
|
+
new RegExp(`^${_chunkIEN2EFE5cjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1104
1107
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1105
1108
|
// included.
|
|
1106
1109
|
/^node:/,
|
|
1107
|
-
|
|
1110
|
+
_chunkM6U6E4F7cjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1108
1111
|
];
|
|
1109
1112
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1110
|
-
|
|
1111
|
-
new RegExp(`^${
|
|
1113
|
+
_chunkM6U6E4F7cjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1114
|
+
new RegExp(`^${_chunkIEN2EFE5cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1112
1115
|
];
|
|
1113
1116
|
function createFarmPlatformClientModule(platform) {
|
|
1114
1117
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1136,11 +1139,11 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1136
1139
|
name: "farm:server-only-entries",
|
|
1137
1140
|
enforce: "pre",
|
|
1138
1141
|
config(config) {
|
|
1139
|
-
const bundledPackages =
|
|
1142
|
+
const bundledPackages = _chunkIEN2EFE5cjs.collectFarmServerBundledPackageInfo.call(void 0,
|
|
1140
1143
|
path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())))
|
|
1141
1144
|
);
|
|
1142
1145
|
return {
|
|
1143
|
-
optimizeDeps: { rolldownOptions: { plugins: [
|
|
1146
|
+
optimizeDeps: { rolldownOptions: { plugins: [_chunkIEN2EFE5cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
|
|
1144
1147
|
ssr: {
|
|
1145
1148
|
noExternal: [
|
|
1146
1149
|
// Resolve `server-only` here rather than in Node, which would load its throwing build.
|
|
@@ -1168,9 +1171,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1168
1171
|
);
|
|
1169
1172
|
}
|
|
1170
1173
|
if (!_optionalChain([options2, 'optionalAccess', _67 => _67.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1171
|
-
return
|
|
1174
|
+
return _chunkIEN2EFE5cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1172
1175
|
}
|
|
1173
|
-
const resolveFrom = importer ?
|
|
1176
|
+
const resolveFrom = importer ? _chunkIEN2EFE5cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1174
1177
|
if (resolveFrom) {
|
|
1175
1178
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1176
1179
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1206,7 +1209,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1206
1209
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1207
1210
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1208
1211
|
}
|
|
1209
|
-
return _nullishCoalesce(
|
|
1212
|
+
return _nullishCoalesce(_chunkIEN2EFE5cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1210
1213
|
}
|
|
1211
1214
|
}
|
|
1212
1215
|
};
|
|
@@ -1239,7 +1242,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1239
1242
|
if (!snapshot) return "";
|
|
1240
1243
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
1241
1244
|
if (snapshot.routing === "none") return runtime;
|
|
1242
|
-
return `${
|
|
1245
|
+
return `${_chunk2MR4MABGcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1243
1246
|
}
|
|
1244
1247
|
function getPublicEnvDefine(config) {
|
|
1245
1248
|
const publicEnv = _optionalChain([config, 'access', _69 => _69.env, 'optionalAccess', _70 => _70.public]);
|
|
@@ -1312,12 +1315,12 @@ function sendFarmDevRuntimeHookError(res, json) {
|
|
|
1312
1315
|
res.end(json ? _chunkXGTFLG73cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1313
1316
|
}
|
|
1314
1317
|
function opensFarmDevRuntimeSession(pm) {
|
|
1315
|
-
return pm.hasRuntimeRequestHooks() ||
|
|
1318
|
+
return pm.hasRuntimeRequestHooks() || _chunkDMXMIE2Ccjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
|
|
1316
1319
|
}
|
|
1317
1320
|
var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
+
_chunkMBCRWU3Pcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
1322
|
+
_chunkMBCRWU3Pcjs.FARM_CONFIG_REDIRECTS_PLUGIN_NAME,
|
|
1323
|
+
_chunkMBCRWU3Pcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME
|
|
1321
1324
|
]);
|
|
1322
1325
|
function isFarmConfigRoutePlugin(plugin) {
|
|
1323
1326
|
return FARM_CONFIG_ROUTE_PLUGIN_NAMES.has(plugin.name);
|
|
@@ -1331,7 +1334,7 @@ async function proxyFarmExternalRewrite(req, res, bodySizeLimit) {
|
|
|
1331
1334
|
const body = await _chunkCFG4QERRcjs.readNodeRequestBody.call(void 0, req, bodySizeLimit);
|
|
1332
1335
|
request = new Request(request, { body: toRequestBody(body) });
|
|
1333
1336
|
}
|
|
1334
|
-
await
|
|
1337
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, await _chunkJRGR5Z4Kcjs.fetchFarmExternalRewrite.call(void 0, request));
|
|
1335
1338
|
return true;
|
|
1336
1339
|
}
|
|
1337
1340
|
function toRequestBody(body) {
|
|
@@ -1368,7 +1371,7 @@ function applyWebResponseToNodeResponse(response, res) {
|
|
|
1368
1371
|
for (const name of res.getHeaderNames()) {
|
|
1369
1372
|
res.removeHeader(name);
|
|
1370
1373
|
}
|
|
1371
|
-
|
|
1374
|
+
_chunkJRGR5Z4Kcjs.applyWebResponseHeaders.call(void 0, res, response.headers);
|
|
1372
1375
|
}
|
|
1373
1376
|
function toNodeResponseBuffer(chunk, encoding) {
|
|
1374
1377
|
if (chunk === void 0 || chunk === null || typeof chunk === "function") return void 0;
|
|
@@ -1815,7 +1818,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1815
1818
|
return null;
|
|
1816
1819
|
}
|
|
1817
1820
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
1818
|
-
const everyExportIsComponent = options.code.includes(
|
|
1821
|
+
const everyExportIsComponent = options.code.includes(_chunkIEN2EFE5cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkIEN2EFE5cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
1819
1822
|
const replacements = [];
|
|
1820
1823
|
const wrapperStatements = [];
|
|
1821
1824
|
const originalEntries = [];
|
|
@@ -1982,7 +1985,7 @@ function hasViteAlias(alias, find) {
|
|
|
1982
1985
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
1983
1986
|
const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
1984
1987
|
const imageImports = farmImageImportsPlugin();
|
|
1985
|
-
const fontImports =
|
|
1988
|
+
const fontImports = _chunkM6U6E4F7cjs.farmFontImportsPlugin.call(void 0, {
|
|
1986
1989
|
root: options.root,
|
|
1987
1990
|
basePath: options.basePath,
|
|
1988
1991
|
publicDir: options.publicDir
|
|
@@ -2027,7 +2030,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2027
2030
|
config(userConfig, configEnv) {
|
|
2028
2031
|
isBuild = configEnv.command === "build";
|
|
2029
2032
|
const layerAliases = _chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, options.layers);
|
|
2030
|
-
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _105 => _105.resolve, 'optionalAccess', _106 => _106.alias]), "@") ? {} :
|
|
2033
|
+
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _105 => _105.resolve, 'optionalAccess', _106 => _106.alias]), "@") ? {} : _chunkM6U6E4F7cjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
|
|
2031
2034
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2032
2035
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _107 => _107.server, 'optionalAccess', _108 => _108.cors]) === void 0;
|
|
2033
2036
|
return {
|
|
@@ -2057,7 +2060,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2057
2060
|
serverFnTransformActive = config.plugins.some(
|
|
2058
2061
|
(plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
2059
2062
|
);
|
|
2060
|
-
reactRefreshActive =
|
|
2063
|
+
reactRefreshActive = _chunk3QM74STYcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
2061
2064
|
if (_optionalChain([options, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
2062
2065
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
2063
2066
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
@@ -2081,7 +2084,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2081
2084
|
_optionalChain([pm, 'optionalAccess', _120 => _120.getPlugins, 'call', _121 => _121(), 'access', _122 => _122.filter, 'call', _123 => _123(isFarmConfigRoutePlugin), 'access', _124 => _124.map, 'call', _125 => _125((plugin2) => plugin2.name)])
|
|
2082
2085
|
);
|
|
2083
2086
|
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _126 => _126.getPlugins, 'call', _127 => _127()]), () => ( []))).flatMap((plugin2) => {
|
|
2084
|
-
const matcher =
|
|
2087
|
+
const matcher = _chunkMBCRWU3Pcjs.getConfigRedirectMatcher.call(void 0, plugin2);
|
|
2085
2088
|
return matcher ? [matcher] : [];
|
|
2086
2089
|
});
|
|
2087
2090
|
const emitPluginError = async (phase, error, meta) => {
|
|
@@ -2091,7 +2094,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2091
2094
|
} catch (e21) {
|
|
2092
2095
|
}
|
|
2093
2096
|
};
|
|
2094
|
-
farmApp = new (0,
|
|
2097
|
+
farmApp = new (0, _chunkM6U6E4F7cjs.FarmApp)(
|
|
2095
2098
|
{
|
|
2096
2099
|
...options,
|
|
2097
2100
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2099,7 +2102,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2099
2102
|
server
|
|
2100
2103
|
);
|
|
2101
2104
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2102
|
-
|
|
2105
|
+
_chunkIEN2EFE5cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2103
2106
|
farmApp.getConfig().root,
|
|
2104
2107
|
options.distDir || ".farm"
|
|
2105
2108
|
)
|
|
@@ -2109,15 +2112,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2109
2112
|
let farmAppPackages;
|
|
2110
2113
|
if (_optionalChain([farmConfig, 'access', _128 => _128.agent, 'optionalAccess', _129 => _129.noindexPreviews])) {
|
|
2111
2114
|
farmMiddlewares.use((_req, res, next) => {
|
|
2112
|
-
if (
|
|
2113
|
-
res.setHeader("X-Robots-Tag",
|
|
2115
|
+
if (_chunkLECZ5DPZcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2116
|
+
res.setHeader("X-Robots-Tag", _chunkZUVAGMQ5cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2114
2117
|
}
|
|
2115
2118
|
next();
|
|
2116
2119
|
});
|
|
2117
2120
|
}
|
|
2118
2121
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2119
2122
|
const devBuiltInRoutePaths = new Set(
|
|
2120
|
-
|
|
2123
|
+
_chunkK4UGCUXXcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2121
2124
|
agent: {
|
|
2122
2125
|
apiCatalog: true,
|
|
2123
2126
|
mcp: true,
|
|
@@ -2167,7 +2170,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2167
2170
|
);
|
|
2168
2171
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2169
2172
|
try {
|
|
2170
|
-
const result = await
|
|
2173
|
+
const result = await _chunkK7JMTAFHcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2171
2174
|
root: farmConfig.root,
|
|
2172
2175
|
srcDir: farmConfig.srcDir,
|
|
2173
2176
|
layers: farmConfig.layers,
|
|
@@ -2346,7 +2349,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2346
2349
|
}
|
|
2347
2350
|
})]);
|
|
2348
2351
|
}
|
|
2349
|
-
apiRouteManager = new (0,
|
|
2352
|
+
apiRouteManager = new (0, _chunkK66JILV3cjs.APIRouteManager)(appDirs, server, {
|
|
2350
2353
|
plugins: farmConfig.plugins,
|
|
2351
2354
|
i18n: farmApp.getI18nRuntime(),
|
|
2352
2355
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2392,7 +2395,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2392
2395
|
});
|
|
2393
2396
|
}
|
|
2394
2397
|
}
|
|
2395
|
-
middlewareManager = new (0,
|
|
2398
|
+
middlewareManager = new (0, _chunkACGBXN3Ucjs.MiddlewareManager)(
|
|
2396
2399
|
appDirs,
|
|
2397
2400
|
server,
|
|
2398
2401
|
farmConfig.middleware,
|
|
@@ -2447,7 +2450,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2447
2450
|
return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
2448
2451
|
};
|
|
2449
2452
|
releaseDocsMCPServers();
|
|
2450
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
2453
|
+
const isFarmDocsPathGuarded = (href) => _chunk2MR4MABGcjs.farmPathGuardCoversPage.call(void 0,
|
|
2451
2454
|
{
|
|
2452
2455
|
config: farmConfig,
|
|
2453
2456
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2460,7 +2463,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2460
2463
|
clientEntry: "/@farm/client.js",
|
|
2461
2464
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2462
2465
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2463
|
-
globalStylesheetHref:
|
|
2466
|
+
globalStylesheetHref: _chunkM6U6E4F7cjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2464
2467
|
farmConfig.root,
|
|
2465
2468
|
farmConfig.srcDir
|
|
2466
2469
|
),
|
|
@@ -2491,7 +2494,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2491
2494
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2492
2495
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2493
2496
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2494
|
-
globalStylesheetHref:
|
|
2497
|
+
globalStylesheetHref: _chunkM6U6E4F7cjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2495
2498
|
farmConfig.root,
|
|
2496
2499
|
farmConfig.srcDir
|
|
2497
2500
|
),
|
|
@@ -2534,7 +2537,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2534
2537
|
const matchedRoute = routeManager.matchRoute(pathname);
|
|
2535
2538
|
const layoutEntries = matchedRoute.layouts.map((layout) => ({
|
|
2536
2539
|
...layout,
|
|
2537
|
-
metadata:
|
|
2540
|
+
metadata: _chunkIEN2EFE5cjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
|
|
2538
2541
|
}));
|
|
2539
2542
|
if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
|
|
2540
2543
|
return response;
|
|
@@ -2728,7 +2731,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2728
2731
|
createRequestFromNodeRequest(req, new URL(fullUrl))
|
|
2729
2732
|
);
|
|
2730
2733
|
if (imageResponse) {
|
|
2731
|
-
await
|
|
2734
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, imageResponse);
|
|
2732
2735
|
return;
|
|
2733
2736
|
}
|
|
2734
2737
|
}
|
|
@@ -2809,12 +2812,51 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2809
2812
|
const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
|
|
2810
2813
|
const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
|
|
2811
2814
|
const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkXGTFLG73cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
|
|
2812
|
-
|
|
2815
|
+
const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
|
|
2816
|
+
let pageHookRouteMatch;
|
|
2817
|
+
const pageHookRoute = (pathname2) => {
|
|
2818
|
+
if (_optionalChain([pageHookRouteMatch, 'optionalAccess', _184 => _184.render, 'access', _185 => _185.pathname]) === pathname2) return pageHookRouteMatch;
|
|
2819
|
+
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
2820
|
+
pageHookRouteMatch = {
|
|
2821
|
+
render: {
|
|
2822
|
+
pathname: pathname2,
|
|
2823
|
+
method: requestMethod,
|
|
2824
|
+
routePattern: _optionalChain([match, 'optionalAccess', _186 => _186.route, 'optionalAccess', _187 => _187.pattern]) || null,
|
|
2825
|
+
params: _optionalChain([match, 'optionalAccess', _188 => _188.params]) || {}
|
|
2826
|
+
},
|
|
2827
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _189 => _189.layouts]) || []).map((layout) => layout.pattern)
|
|
2828
|
+
};
|
|
2829
|
+
return pageHookRouteMatch;
|
|
2830
|
+
};
|
|
2831
|
+
const runFarmDevPageHooks = async (pathname2 = requestedPagePathname) => {
|
|
2832
|
+
if (!pm || !pm.hasHook("beforeRouteMatch") && !pm.hasHook("afterRouteMatch") && !pm.hasHook("beforeRender")) {
|
|
2833
|
+
return;
|
|
2834
|
+
}
|
|
2835
|
+
const { render, layoutPatterns } = pageHookRoute(pathname2);
|
|
2836
|
+
const routeManager3 = farmApp.getRouteManager();
|
|
2837
|
+
if (routeManager3.matchMetadataRoute(render.pathname) || routeManager3.matchMetadataImage(render.pathname) || // A path no page route matches is a page only for a GET or HEAD request.
|
|
2838
|
+
!render.routePattern && requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2841
|
+
await pm.runHookParallel("beforeRouteMatch", {
|
|
2842
|
+
pathname: render.pathname,
|
|
2843
|
+
method: requestMethod
|
|
2844
|
+
});
|
|
2845
|
+
await pm.runHookParallel("afterRouteMatch", {
|
|
2846
|
+
pathname: render.pathname,
|
|
2847
|
+
matched: Boolean(render.routePattern),
|
|
2848
|
+
routePattern: render.routePattern,
|
|
2849
|
+
params: render.params,
|
|
2850
|
+
layoutPatterns
|
|
2851
|
+
});
|
|
2852
|
+
await pm.runHookParallel("beforeRender", render);
|
|
2853
|
+
};
|
|
2854
|
+
if (pm && configRewriteSource === void 0 && !deferredDottedRequests.has(req) && (configRoutePlugins.has(_chunkMBCRWU3Pcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME) || configRedirectMatchers.length > 0) && !isViteOwnedRequest()) {
|
|
2813
2855
|
let redirect = null;
|
|
2814
2856
|
try {
|
|
2815
2857
|
await pm.runHookParallelFiltered(
|
|
2816
2858
|
"beforeRequest",
|
|
2817
|
-
(plugin2) => plugin2.name ===
|
|
2859
|
+
(plugin2) => plugin2.name === _chunkMBCRWU3Pcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
2818
2860
|
req,
|
|
2819
2861
|
res
|
|
2820
2862
|
);
|
|
@@ -2838,13 +2880,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2838
2880
|
if (opensFarmDevRuntimeSession(pm)) {
|
|
2839
2881
|
const redirectResponse = response;
|
|
2840
2882
|
try {
|
|
2883
|
+
const kind = _chunkXGTFLG73cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
|
|
2841
2884
|
response = await pm.runRuntimeRequest(
|
|
2842
2885
|
createRequestFromNodeRequest(req, parsedRequestUrl),
|
|
2843
|
-
() =>
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
}
|
|
2886
|
+
async () => {
|
|
2887
|
+
if (kind === "page") await runFarmDevPageHooks();
|
|
2888
|
+
return redirectResponse;
|
|
2889
|
+
},
|
|
2890
|
+
{ kind, route: { pathname: requestPathname } }
|
|
2848
2891
|
);
|
|
2849
2892
|
} catch (e23) {
|
|
2850
2893
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
@@ -2852,13 +2895,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2852
2895
|
return;
|
|
2853
2896
|
}
|
|
2854
2897
|
}
|
|
2855
|
-
await
|
|
2898
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
2856
2899
|
logResponse(requestMethod, requestUrl, res.statusCode, 0, "PAGE");
|
|
2857
2900
|
return;
|
|
2858
2901
|
}
|
|
2859
2902
|
}
|
|
2860
2903
|
const runAppMiddlewareForContentRoute = async () => {
|
|
2861
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
2904
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _190 => _190.hasMiddleware, 'call', _191 => _191()])) return false;
|
|
2862
2905
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
2863
2906
|
return runFarmMiddlewareWithNavigation(
|
|
2864
2907
|
farmApp.getServerRenderer(),
|
|
@@ -2892,11 +2935,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2892
2935
|
return 500;
|
|
2893
2936
|
}
|
|
2894
2937
|
}
|
|
2895
|
-
await
|
|
2938
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
2896
2939
|
return response.status;
|
|
2897
2940
|
};
|
|
2898
2941
|
const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
|
|
2899
|
-
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess',
|
|
2942
|
+
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _192 => _192.hasRuntimeHook, 'call', _193 => _193("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _194 => _194.hasMiddleware, 'call', _195 => _195()]) ? interceptFarmDevPageResponse({
|
|
2900
2943
|
req,
|
|
2901
2944
|
res,
|
|
2902
2945
|
pm,
|
|
@@ -2909,7 +2952,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2909
2952
|
urlPath: requestUrl,
|
|
2910
2953
|
pathname: requestPathname,
|
|
2911
2954
|
startTime: Date.now(),
|
|
2912
|
-
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall',
|
|
2955
|
+
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _196 => _196(status)]),
|
|
2913
2956
|
// The runtime reports a runtime.after failure itself.
|
|
2914
2957
|
emitError: async () => {
|
|
2915
2958
|
},
|
|
@@ -2920,7 +2963,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2920
2963
|
handled = await runAppMiddlewareForContentRoute();
|
|
2921
2964
|
} catch (error) {
|
|
2922
2965
|
if (runtimeHookErrorAnswersJSON || res.headersSent) {
|
|
2923
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
2966
|
+
_optionalChain([interceptor, 'optionalAccess', _197 => _197.release, 'call', _198 => _198()]);
|
|
2924
2967
|
throw error;
|
|
2925
2968
|
}
|
|
2926
2969
|
if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
|
|
@@ -2928,10 +2971,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2928
2971
|
return true;
|
|
2929
2972
|
}
|
|
2930
2973
|
if (!handled) {
|
|
2931
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
2974
|
+
_optionalChain([interceptor, 'optionalAccess', _199 => _199.release, 'call', _200 => _200()]);
|
|
2932
2975
|
return false;
|
|
2933
2976
|
}
|
|
2934
|
-
if (!_optionalChain([interceptor, 'optionalAccess',
|
|
2977
|
+
if (!_optionalChain([interceptor, 'optionalAccess', _201 => _201.isEnded, 'call', _202 => _202()])) _optionalChain([logResponse2, 'optionalCall', _203 => _203(res.statusCode || 200)]);
|
|
2935
2978
|
return true;
|
|
2936
2979
|
};
|
|
2937
2980
|
const serveBuiltInRoute = async (respond, {
|
|
@@ -2940,7 +2983,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2940
2983
|
label
|
|
2941
2984
|
} = {}) => {
|
|
2942
2985
|
const discard = async () => {
|
|
2943
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
2986
|
+
await _optionalChain([computed, 'optionalAccess', _204 => _204.body, 'optionalAccess', _205 => _205.cancel, 'call', _206 => _206(), 'access', _207 => _207.catch, 'call', _208 => _208(() => {
|
|
2944
2987
|
})]);
|
|
2945
2988
|
};
|
|
2946
2989
|
const sendRuntimeResponse = async (runtimeSession3, response2) => {
|
|
@@ -2951,15 +2994,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2951
2994
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
2952
2995
|
return;
|
|
2953
2996
|
}
|
|
2954
|
-
await
|
|
2997
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, runtimeResponse);
|
|
2955
2998
|
};
|
|
2956
2999
|
let runtimeSession2;
|
|
2957
3000
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
2958
3001
|
try {
|
|
2959
3002
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
2960
|
-
const route =
|
|
3003
|
+
const route = _chunkK4UGCUXXcjs.setFarmRouteLabel.call(void 0,
|
|
2961
3004
|
{ pathname: requestPathname },
|
|
2962
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3005
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkK4UGCUXXcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
2963
3006
|
);
|
|
2964
3007
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
2965
3008
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -2977,6 +3020,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2977
3020
|
}
|
|
2978
3021
|
pm.copyRequestContext(runtimeSession2.request, req);
|
|
2979
3022
|
applyWebRequestToNodeRequest(runtimeSession2.request, req);
|
|
3023
|
+
if (kind === "page") {
|
|
3024
|
+
try {
|
|
3025
|
+
await runFarmDevPageHooks();
|
|
3026
|
+
} catch (error) {
|
|
3027
|
+
await discard();
|
|
3028
|
+
await pm.failRuntimeRequest(runtimeSession2, error);
|
|
3029
|
+
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3030
|
+
return;
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
2980
3033
|
}
|
|
2981
3034
|
let response;
|
|
2982
3035
|
let responding = false;
|
|
@@ -2987,7 +3040,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2987
3040
|
}
|
|
2988
3041
|
responding = true;
|
|
2989
3042
|
response = await respond(
|
|
2990
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
3043
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _209 => _209.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
2991
3044
|
);
|
|
2992
3045
|
} catch (error) {
|
|
2993
3046
|
if (!responding && !res.headersSent) {
|
|
@@ -3004,10 +3057,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3004
3057
|
}
|
|
3005
3058
|
if (!response) return;
|
|
3006
3059
|
if (runtimeSession2) await sendRuntimeResponse(runtimeSession2, response);
|
|
3007
|
-
else await
|
|
3060
|
+
else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3008
3061
|
};
|
|
3009
3062
|
const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
3010
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
3063
|
+
if (openAPIManager && _optionalChain([options, 'access', _210 => _210.openapi, 'optionalAccess', _211 => _211.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
3011
3064
|
const specManager = openAPIManager;
|
|
3012
3065
|
await serveBuiltInRoute(async () => {
|
|
3013
3066
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -3027,7 +3080,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3027
3080
|
});
|
|
3028
3081
|
return;
|
|
3029
3082
|
}
|
|
3030
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
3083
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _212 => _212.openapi, 'optionalAccess', _213 => _213.route])) {
|
|
3031
3084
|
const docsManager = openAPIManager;
|
|
3032
3085
|
await serveBuiltInRoute(
|
|
3033
3086
|
async () => {
|
|
@@ -3038,24 +3091,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3038
3091
|
);
|
|
3039
3092
|
return;
|
|
3040
3093
|
}
|
|
3041
|
-
if (_optionalChain([options, 'access',
|
|
3094
|
+
if (_optionalChain([options, 'access', _214 => _214.agent, 'optionalAccess', _215 => _215.manifest]) !== false && _chunkK4UGCUXXcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3042
3095
|
await serveBuiltInRoute(async () => {
|
|
3043
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3044
|
-
const manifest = await
|
|
3096
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkM6U6E4F7cjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3097
|
+
const manifest = await _chunkK4UGCUXXcjs.createFarmAppManifestResponse.call(void 0,
|
|
3045
3098
|
new Request(parsedRequestUrl, {
|
|
3046
3099
|
method: requestMethod,
|
|
3047
3100
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3048
3101
|
}),
|
|
3049
3102
|
{
|
|
3050
|
-
...
|
|
3103
|
+
..._chunkK4UGCUXXcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3051
3104
|
build: "development",
|
|
3052
3105
|
packages: farmAppPackages,
|
|
3053
3106
|
// Read again on each request; unchanged files come from a cache.
|
|
3054
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
3107
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _216 => _216.plugins, 'optionalAccess', _217 => _217.some, 'call', _218 => _218(({ name }) => name === "farm:webmcp")]) ? _chunkM6U6E4F7cjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3055
3108
|
}),
|
|
3056
3109
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3057
3110
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
3058
|
-
guardCoversPath: (path7) =>
|
|
3111
|
+
guardCoversPath: (path7) => _chunk2MR4MABGcjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3059
3112
|
{
|
|
3060
3113
|
config: farmConfig,
|
|
3061
3114
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -3069,11 +3122,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3069
3122
|
});
|
|
3070
3123
|
return;
|
|
3071
3124
|
}
|
|
3072
|
-
if (_optionalChain([options, 'access',
|
|
3125
|
+
if (_optionalChain([options, 'access', _219 => _219.agent, 'optionalAccess', _220 => _220.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkK4UGCUXXcjs.FARM_API_CATALOG_PATH) {
|
|
3073
3126
|
await serveBuiltInRoute(
|
|
3074
|
-
() =>
|
|
3127
|
+
() => _chunkK4UGCUXXcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3075
3128
|
requestMethod,
|
|
3076
|
-
|
|
3129
|
+
_chunkK4UGCUXXcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3077
3130
|
new Request(parsedRequestUrl, {
|
|
3078
3131
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3079
3132
|
})
|
|
@@ -3081,8 +3134,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3081
3134
|
);
|
|
3082
3135
|
return;
|
|
3083
3136
|
}
|
|
3084
|
-
if (_optionalChain([options, 'access',
|
|
3085
|
-
const aiCatalog =
|
|
3137
|
+
if (_optionalChain([options, 'access', _221 => _221.agent, 'optionalAccess', _222 => _222.aiCatalog]) !== false) {
|
|
3138
|
+
const aiCatalog = _chunkK4UGCUXXcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3086
3139
|
new Request(parsedRequestUrl, {
|
|
3087
3140
|
method: requestMethod,
|
|
3088
3141
|
headers: {
|
|
@@ -3125,16 +3178,36 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3125
3178
|
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
|
|
3126
3179
|
const docsResponse = await farmDocsHandler(new Request(docsRequest, docsBodyInit));
|
|
3127
3180
|
if (docsResponse) {
|
|
3181
|
+
const docsPage = _optionalChain([docsResponse, 'access', _223 => _223.headers, 'access', _224 => _224.get, 'call', _225 => _225("content-type"), 'optionalAccess', _226 => _226.toLowerCase, 'call', _227 => _227(), 'access', _228 => _228.includes, 'call', _229 => _229("text/html")]);
|
|
3128
3182
|
await serveBuiltInRoute(
|
|
3129
|
-
() =>
|
|
3183
|
+
async (request) => {
|
|
3184
|
+
if (!docsPage) return wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse);
|
|
3185
|
+
const deploymentMismatch = _chunkNLBHLPEOcjs.getFarmDeploymentMismatch.call(void 0,
|
|
3186
|
+
request,
|
|
3187
|
+
farmConfig.deploymentId
|
|
3188
|
+
);
|
|
3189
|
+
if (deploymentMismatch) {
|
|
3190
|
+
await _optionalChain([docsResponse, 'access', _230 => _230.body, 'optionalAccess', _231 => _231.cancel, 'call', _232 => _232()]);
|
|
3191
|
+
return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
|
|
3192
|
+
}
|
|
3193
|
+
return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
|
|
3194
|
+
await wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse),
|
|
3195
|
+
farmConfig.deploymentId,
|
|
3196
|
+
{
|
|
3197
|
+
setCookie: request.method.toUpperCase() === "GET",
|
|
3198
|
+
cookiePath: farmConfig.basePath || "/",
|
|
3199
|
+
secureCookie: new URL(request.url).protocol === "https:"
|
|
3200
|
+
}
|
|
3201
|
+
);
|
|
3202
|
+
},
|
|
3130
3203
|
{
|
|
3131
3204
|
kind: "docs",
|
|
3132
3205
|
computed: docsResponse,
|
|
3133
|
-
label:
|
|
3206
|
+
label: _chunkK4UGCUXXcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3134
3207
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3135
3208
|
{
|
|
3136
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3137
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3209
|
+
path: _optionalChain([farmConfig, 'access', _233 => _233.docs, 'optionalAccess', _234 => _234.entry]) || "/docs",
|
|
3210
|
+
roots: _optionalChain([farmConfig, 'access', _235 => _235.docs, 'optionalAccess', _236 => _236.roots, 'optionalAccess', _237 => _237.map, 'call', _238 => _238((root) => root.entry)]),
|
|
3138
3211
|
pages: await getFarmDocsPagePaths()
|
|
3139
3212
|
}
|
|
3140
3213
|
)
|
|
@@ -3143,8 +3216,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3143
3216
|
return;
|
|
3144
3217
|
}
|
|
3145
3218
|
}
|
|
3146
|
-
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access',
|
|
3147
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
3219
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _239 => _239.headers, 'access', _240 => _240.accept, 'optionalAccess', _241 => _241.includes, 'call', _242 => _242(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
3220
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-GF4BH33L.cjs");
|
|
3148
3221
|
const treeBodyInit = requestMethod === "POST" ? { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
|
|
3149
3222
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
3150
3223
|
request: new Request(fullUrl, {
|
|
@@ -3161,18 +3234,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3161
3234
|
});
|
|
3162
3235
|
await serveBuiltInRoute(() => treeResponse, {
|
|
3163
3236
|
computed: treeResponse,
|
|
3164
|
-
label: _nullishCoalesce(_optionalChain([farmApp, 'access',
|
|
3237
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _243 => _243.getRouteManager, 'call', _244 => _244(), 'access', _245 => _245.matchRoute, 'call', _246 => _246(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _247 => _247.route, 'optionalAccess', _248 => _248.pattern]), () => ( null))
|
|
3165
3238
|
});
|
|
3166
3239
|
return;
|
|
3167
3240
|
}
|
|
3168
3241
|
const markdownRouteLabel = () => (
|
|
3169
3242
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3170
|
-
|
|
3243
|
+
_chunkK4UGCUXXcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3171
3244
|
toRoutePathname(requestPathname),
|
|
3172
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
3245
|
+
(page) => _optionalChain([farmApp, 'access', _249 => _249.getRouteManager, 'call', _250 => _250(), 'access', _251 => _251.matchRoute, 'call', _252 => _252(page), 'access', _253 => _253.route, 'optionalAccess', _254 => _254.pattern])
|
|
3173
3246
|
)
|
|
3174
3247
|
);
|
|
3175
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
3248
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunkNSZY3EWGcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
3176
3249
|
request: new Request(fullUrl, {
|
|
3177
3250
|
method: requestMethod,
|
|
3178
3251
|
headers: docsHeaders
|
|
@@ -3181,7 +3254,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3181
3254
|
routePathname: toRoutePathname,
|
|
3182
3255
|
resolveSource: async (pathname2) => {
|
|
3183
3256
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
3184
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
3257
|
+
const sourcePath = _optionalChain([match, 'access', _255 => _255.route, 'optionalAccess', _256 => _256.markdownSourcePath]) || (match.route && _chunkNSZY3EWGcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
3185
3258
|
if (!sourcePath) {
|
|
3186
3259
|
return null;
|
|
3187
3260
|
}
|
|
@@ -3192,11 +3265,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3192
3265
|
},
|
|
3193
3266
|
// The anonymous check goes through this server, so its guards and
|
|
3194
3267
|
// middleware see the page's own path, as in production. It connects to
|
|
3195
|
-
// this server's own listener, never the host the caller's Host names.
|
|
3268
|
+
// this server's own listener, never the host the caller's Host names. The
|
|
3269
|
+
// page is asked for at the URL it answers at, not through the trailing-slash 308.
|
|
3196
3270
|
renderPage: async (request) => _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3197
|
-
new Request(
|
|
3198
|
-
|
|
3199
|
-
|
|
3271
|
+
new Request(
|
|
3272
|
+
_chunkDVJM55D2cjs.toFarmTrailingSlashPageRequest.call(void 0,
|
|
3273
|
+
request,
|
|
3274
|
+
farmApp.getConfig().trailingSlash === true
|
|
3275
|
+
),
|
|
3276
|
+
{
|
|
3277
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunkCFG4QERRcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3278
|
+
}
|
|
3279
|
+
)
|
|
3200
3280
|
)
|
|
3201
3281
|
});
|
|
3202
3282
|
if (markdownSourceResponse) {
|
|
@@ -3206,7 +3286,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3206
3286
|
});
|
|
3207
3287
|
return;
|
|
3208
3288
|
}
|
|
3209
|
-
const markdownResponse = viteModuleRequest ? null : await
|
|
3289
|
+
const markdownResponse = viteModuleRequest ? null : await _chunkC2JOS77Zcjs.createMarkdownMirrorResponse.call(void 0, {
|
|
3210
3290
|
request: new Request(fullUrl, {
|
|
3211
3291
|
method: requestMethod,
|
|
3212
3292
|
headers: docsHeaders
|
|
@@ -3216,17 +3296,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3216
3296
|
routeExists: (pathname2) => Boolean(farmApp.getRouteManager().matchRoute(pathname2).route),
|
|
3217
3297
|
// The page is rendered by this server's own listener, never the host the
|
|
3218
3298
|
// caller's Host names. Redirects are not followed, so the mirror answers with
|
|
3219
|
-
// the page's own (a sign-in gate, say), as production does.
|
|
3299
|
+
// the page's own (a sign-in gate, say), as production does. The page is read
|
|
3300
|
+
// at the URL it answers at ('/about/' with trailingSlash), not through the 308.
|
|
3220
3301
|
renderPage: async (request) => {
|
|
3221
3302
|
const headers = new Headers(request.headers);
|
|
3222
3303
|
headers.delete("accept-encoding");
|
|
3223
3304
|
return _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3224
|
-
new Request(
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3305
|
+
new Request(
|
|
3306
|
+
_chunkDVJM55D2cjs.toFarmTrailingSlashPageRequest.call(void 0,
|
|
3307
|
+
request,
|
|
3308
|
+
farmApp.getConfig().trailingSlash === true
|
|
3309
|
+
),
|
|
3310
|
+
{
|
|
3311
|
+
headers,
|
|
3312
|
+
// Only accepted mirrors need disconnect listeners. An earlier
|
|
3313
|
+
// close (for example while the docs handler ran) must also abort.
|
|
3314
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunkCFG4QERRcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3315
|
+
}
|
|
3316
|
+
)
|
|
3230
3317
|
);
|
|
3231
3318
|
},
|
|
3232
3319
|
apiServerBasePath
|
|
@@ -3238,16 +3325,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3238
3325
|
});
|
|
3239
3326
|
return;
|
|
3240
3327
|
}
|
|
3241
|
-
if (!viteModuleRequest &&
|
|
3242
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
3328
|
+
if (!viteModuleRequest && _chunkC2JOS77Zcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
3329
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkNSZY3EWGcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
|
|
3243
3330
|
if (!markdownRoute.route) {
|
|
3244
3331
|
await serveBuiltInRoute(
|
|
3245
3332
|
() => new Response(
|
|
3246
|
-
|
|
3333
|
+
_chunkC2JOS77Zcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
|
|
3247
3334
|
{
|
|
3248
3335
|
status: 404,
|
|
3249
3336
|
headers: {
|
|
3250
|
-
"Content-Type":
|
|
3337
|
+
"Content-Type": _chunkC2JOS77Zcjs.FARM_MARKDOWN_CONTENT_TYPE,
|
|
3251
3338
|
"X-Farm-Markdown-Error": "404",
|
|
3252
3339
|
"Cache-Control": "no-store"
|
|
3253
3340
|
}
|
|
@@ -3257,7 +3344,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3257
3344
|
return;
|
|
3258
3345
|
}
|
|
3259
3346
|
}
|
|
3260
|
-
const markdownPageTarget =
|
|
3347
|
+
const markdownPageTarget = _chunkC2JOS77Zcjs.resolveMarkdownMirrorTarget.call(void 0,
|
|
3261
3348
|
farmApp.getConfig().md,
|
|
3262
3349
|
requestPathname,
|
|
3263
3350
|
{
|
|
@@ -3290,7 +3377,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3290
3377
|
} catch (error) {
|
|
3291
3378
|
const response = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3292
3379
|
if (!response) throw error;
|
|
3293
|
-
await
|
|
3380
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3294
3381
|
return;
|
|
3295
3382
|
}
|
|
3296
3383
|
const workflowResponse = await workflowHandler(
|
|
@@ -3302,13 +3389,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3302
3389
|
})
|
|
3303
3390
|
);
|
|
3304
3391
|
if (workflowResponse) {
|
|
3305
|
-
await
|
|
3392
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, workflowResponse);
|
|
3306
3393
|
return;
|
|
3307
3394
|
}
|
|
3308
3395
|
}
|
|
3309
3396
|
const configuredIntegrations = currentConfig.integrations;
|
|
3310
3397
|
const tryConfiguredIntegrationRoute = async () => {
|
|
3311
|
-
const matchedRoute =
|
|
3398
|
+
const matchedRoute = _chunkJX5VOLAVcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3312
3399
|
pathname: requestPathname,
|
|
3313
3400
|
method: requestMethod
|
|
3314
3401
|
});
|
|
@@ -3322,8 +3409,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3322
3409
|
await pm.runHookParallelFiltered(
|
|
3323
3410
|
"beforeRequest",
|
|
3324
3411
|
(plugin2) => {
|
|
3325
|
-
const owner =
|
|
3326
|
-
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess',
|
|
3412
|
+
const owner = _chunkJX5VOLAVcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3413
|
+
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _257 => _257.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3327
3414
|
},
|
|
3328
3415
|
req,
|
|
3329
3416
|
res
|
|
@@ -3352,7 +3439,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3352
3439
|
});
|
|
3353
3440
|
const dispatchIntegration = async (request, runtime) => {
|
|
3354
3441
|
try {
|
|
3355
|
-
const result = await
|
|
3442
|
+
const result = await _chunkJX5VOLAVcjs.dispatchIntegrationRequest.call(void 0,
|
|
3356
3443
|
{
|
|
3357
3444
|
integration: matchedRoute.integration,
|
|
3358
3445
|
config: currentConfig,
|
|
@@ -3360,7 +3447,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3360
3447
|
isProd: false
|
|
3361
3448
|
},
|
|
3362
3449
|
request,
|
|
3363
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
3450
|
+
{ clientAddress: _optionalChain([req, 'access', _258 => _258.socket, 'optionalAccess', _259 => _259.remoteAddress]) }
|
|
3364
3451
|
);
|
|
3365
3452
|
if (!result) {
|
|
3366
3453
|
throw new Error(`Matched integration route did not return a response`);
|
|
@@ -3368,7 +3455,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3368
3455
|
return result;
|
|
3369
3456
|
} catch (error) {
|
|
3370
3457
|
_chunkQMNWKQL4cjs.logger.error(`Integration route error: ${error}`);
|
|
3371
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3458
|
+
await _optionalChain([runtime, 'optionalAccess', _260 => _260.reportError, 'call', _261 => _261(error)]);
|
|
3372
3459
|
return _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3373
3460
|
}
|
|
3374
3461
|
};
|
|
@@ -3385,12 +3472,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3385
3472
|
}
|
|
3386
3473
|
const duration = Date.now() - startTime2;
|
|
3387
3474
|
logResponse(requestMethod, requestUrl, response.status, duration, "API");
|
|
3388
|
-
await
|
|
3475
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3389
3476
|
return true;
|
|
3390
3477
|
} catch (error) {
|
|
3391
3478
|
const bodyErrorResponse = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3392
3479
|
if (bodyErrorResponse) {
|
|
3393
|
-
await
|
|
3480
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
3394
3481
|
return true;
|
|
3395
3482
|
}
|
|
3396
3483
|
const duration = Date.now() - startTime2;
|
|
@@ -3404,7 +3491,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3404
3491
|
});
|
|
3405
3492
|
}
|
|
3406
3493
|
_chunkQMNWKQL4cjs.logger.error(`Integration route error: ${error}`);
|
|
3407
|
-
if (
|
|
3494
|
+
if (runtimeReportsErrors) {
|
|
3495
|
+
if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3496
|
+
else if (!res.writableEnded) res.end();
|
|
3497
|
+
} else if (!res.writableEnded) {
|
|
3408
3498
|
res.statusCode = 500;
|
|
3409
3499
|
res.setHeader("Content-Type", "application/json");
|
|
3410
3500
|
res.end(_chunkXGTFLG73cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
@@ -3412,20 +3502,20 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3412
3502
|
return true;
|
|
3413
3503
|
}
|
|
3414
3504
|
};
|
|
3415
|
-
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(
|
|
3505
|
+
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(_chunkMBCRWU3Pcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME)) {
|
|
3416
3506
|
const hasLocalDevRoute = () => {
|
|
3417
3507
|
const routeManager3 = farmApp.getRouteManager();
|
|
3418
3508
|
return Boolean(
|
|
3419
|
-
|
|
3509
|
+
_chunkJX5VOLAVcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3420
3510
|
pathname: requestPathname,
|
|
3421
3511
|
method: requestMethod
|
|
3422
|
-
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3512
|
+
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _262 => _262.isFarmDocsAPIRequest, 'call', _263 => _263(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
3423
3513
|
);
|
|
3424
3514
|
};
|
|
3425
3515
|
try {
|
|
3426
3516
|
await pm.runHookParallelFiltered(
|
|
3427
3517
|
"beforeRequest",
|
|
3428
|
-
(plugin2) => plugin2.name ===
|
|
3518
|
+
(plugin2) => plugin2.name === _chunkMBCRWU3Pcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
3429
3519
|
req,
|
|
3430
3520
|
res
|
|
3431
3521
|
);
|
|
@@ -3511,15 +3601,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3511
3601
|
});
|
|
3512
3602
|
};
|
|
3513
3603
|
const isDocsAPIRequest = Boolean(
|
|
3514
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3604
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _264 => _264.isFarmDocsAPIRequest, 'call', _265 => _265(pathname2)])
|
|
3515
3605
|
);
|
|
3516
3606
|
const docsRuntimeOptions = () => ({
|
|
3517
3607
|
kind: "docs",
|
|
3518
|
-
route:
|
|
3608
|
+
route: _chunkK4UGCUXXcjs.setFarmRouteLabel.call(void 0,
|
|
3519
3609
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
3520
|
-
|
|
3521
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3522
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3610
|
+
_chunkK4UGCUXXcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
3611
|
+
path: _optionalChain([farmConfig, 'access', _266 => _266.docs, 'optionalAccess', _267 => _267.entry]) || "/docs",
|
|
3612
|
+
roots: _optionalChain([farmConfig, 'access', _268 => _268.docs, 'optionalAccess', _269 => _269.roots, 'optionalAccess', _270 => _270.map, 'call', _271 => _271((root) => root.entry)])
|
|
3523
3613
|
})
|
|
3524
3614
|
)
|
|
3525
3615
|
});
|
|
@@ -3540,7 +3630,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3540
3630
|
runtimeSession2.response
|
|
3541
3631
|
);
|
|
3542
3632
|
logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
|
|
3543
|
-
await
|
|
3633
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3544
3634
|
return;
|
|
3545
3635
|
}
|
|
3546
3636
|
} catch (error) {
|
|
@@ -3553,7 +3643,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3553
3643
|
Date.now() - startTime2,
|
|
3554
3644
|
"API"
|
|
3555
3645
|
);
|
|
3556
|
-
await
|
|
3646
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
3557
3647
|
return;
|
|
3558
3648
|
}
|
|
3559
3649
|
_chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
|
|
@@ -3601,7 +3691,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3601
3691
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
3602
3692
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
3603
3693
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
3604
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
3694
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _272 => _272.route, 'access', _273 => _273.path]) || urlPath2;
|
|
3605
3695
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
3606
3696
|
type: "route.matched",
|
|
3607
3697
|
pathname: pathname2,
|
|
@@ -3613,6 +3703,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3613
3703
|
route: apiRoutePattern,
|
|
3614
3704
|
method: method2
|
|
3615
3705
|
});
|
|
3706
|
+
let apiOutcomeReported = false;
|
|
3616
3707
|
try {
|
|
3617
3708
|
const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
|
|
3618
3709
|
const request = await createHandlerRequest();
|
|
@@ -3621,7 +3712,6 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3621
3712
|
method: method2,
|
|
3622
3713
|
routePath: apiRoutePattern
|
|
3623
3714
|
};
|
|
3624
|
-
let apiHandlerFailed = false;
|
|
3625
3715
|
const invokeAPIHandler = async (runtimeRequest, runtime) => {
|
|
3626
3716
|
const handledRequest = pm ? await pm.runHookSerial(
|
|
3627
3717
|
"beforeApiHandler",
|
|
@@ -3631,8 +3721,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3631
3721
|
let response;
|
|
3632
3722
|
try {
|
|
3633
3723
|
response = await apiHandler(handledRequest);
|
|
3724
|
+
apiOutcomeReported = true;
|
|
3725
|
+
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
3726
|
+
type: "api.request.complete",
|
|
3727
|
+
pathname: pathname2,
|
|
3728
|
+
route: apiRoutePattern,
|
|
3729
|
+
method: method2,
|
|
3730
|
+
status: response.status,
|
|
3731
|
+
durationMs: Date.now() - startTime2
|
|
3732
|
+
});
|
|
3634
3733
|
} catch (error) {
|
|
3635
|
-
|
|
3734
|
+
apiOutcomeReported = true;
|
|
3636
3735
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
3637
3736
|
type: "api.error",
|
|
3638
3737
|
pathname: pathname2,
|
|
@@ -3642,7 +3741,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3642
3741
|
error
|
|
3643
3742
|
});
|
|
3644
3743
|
_chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
|
|
3645
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3744
|
+
await _optionalChain([runtime, 'optionalAccess', _274 => _274.reportError, 'call', _275 => _275(error)]);
|
|
3646
3745
|
response = _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3647
3746
|
}
|
|
3648
3747
|
return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
|
|
@@ -3655,33 +3754,25 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3655
3754
|
}
|
|
3656
3755
|
});
|
|
3657
3756
|
const duration = Date.now() - startTime2;
|
|
3658
|
-
|
|
3757
|
+
logResponse(method2, urlPath2, handledResponse.status, duration, "API");
|
|
3758
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, handledResponse);
|
|
3759
|
+
return;
|
|
3760
|
+
} catch (error) {
|
|
3761
|
+
const duration = Date.now() - startTime2;
|
|
3762
|
+
if (!apiOutcomeReported) {
|
|
3659
3763
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
3660
|
-
type: "api.
|
|
3764
|
+
type: "api.error",
|
|
3661
3765
|
pathname: pathname2,
|
|
3662
3766
|
route: apiRoutePattern,
|
|
3663
3767
|
method: method2,
|
|
3664
|
-
|
|
3665
|
-
|
|
3768
|
+
durationMs: duration,
|
|
3769
|
+
error
|
|
3666
3770
|
});
|
|
3667
3771
|
}
|
|
3668
|
-
logResponse(method2, urlPath2, handledResponse.status, duration, "API");
|
|
3669
|
-
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, handledResponse);
|
|
3670
|
-
return;
|
|
3671
|
-
} catch (error) {
|
|
3672
|
-
const duration = Date.now() - startTime2;
|
|
3673
|
-
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
3674
|
-
type: "api.error",
|
|
3675
|
-
pathname: pathname2,
|
|
3676
|
-
route: apiRoutePattern,
|
|
3677
|
-
method: method2,
|
|
3678
|
-
durationMs: duration,
|
|
3679
|
-
error
|
|
3680
|
-
});
|
|
3681
3772
|
const bodyErrorResponse = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3682
3773
|
if (bodyErrorResponse) {
|
|
3683
3774
|
logResponse(method2, urlPath2, bodyErrorResponse.status, duration, "API");
|
|
3684
|
-
await
|
|
3775
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
3685
3776
|
return;
|
|
3686
3777
|
}
|
|
3687
3778
|
_chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
|
|
@@ -3717,13 +3808,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3717
3808
|
if (docsResponse) {
|
|
3718
3809
|
const duration = Date.now() - startTime2;
|
|
3719
3810
|
logResponse(method2, urlPath2, docsResponse.status, duration, "API");
|
|
3720
|
-
await
|
|
3811
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, docsResponse);
|
|
3721
3812
|
return;
|
|
3722
3813
|
}
|
|
3723
3814
|
} catch (error) {
|
|
3724
3815
|
const bodyErrorResponse = _chunkCFG4QERRcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3725
3816
|
if (bodyErrorResponse) {
|
|
3726
|
-
await
|
|
3817
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
3727
3818
|
return;
|
|
3728
3819
|
}
|
|
3729
3820
|
_chunkQMNWKQL4cjs.logger.error(`Docs API route error: ${error}`);
|
|
@@ -3748,19 +3839,19 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3748
3839
|
})
|
|
3749
3840
|
);
|
|
3750
3841
|
logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
|
|
3751
|
-
await
|
|
3842
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3752
3843
|
} catch (error) {
|
|
3753
3844
|
_chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
|
|
3754
3845
|
sendFarmDevRuntimeHookError(res, true);
|
|
3755
3846
|
}
|
|
3756
3847
|
return;
|
|
3757
3848
|
}
|
|
3758
|
-
if (_optionalChain([req, 'access',
|
|
3849
|
+
if (_optionalChain([req, 'access', _276 => _276.url, 'optionalAccess', _277 => _277.startsWith, 'call', _278 => _278("/@")]) || _optionalChain([req, 'access', _279 => _279.url, 'optionalAccess', _280 => _280.startsWith, 'call', _281 => _281("/node_modules")])) {
|
|
3759
3850
|
return next();
|
|
3760
3851
|
}
|
|
3761
3852
|
if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
|
|
3762
3853
|
requestPathname,
|
|
3763
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3854
|
+
_optionalChain([farmApp, 'optionalAccess', _282 => _282.getRouteManager, 'call', _283 => _283()]),
|
|
3764
3855
|
[server.config.publicDir, server.config.root],
|
|
3765
3856
|
farmAgentGeneratedPaths(farmConfig),
|
|
3766
3857
|
requestMethod
|
|
@@ -3768,7 +3859,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3768
3859
|
if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
|
|
3769
3860
|
return next();
|
|
3770
3861
|
}
|
|
3771
|
-
if (_optionalChain([req, 'access',
|
|
3862
|
+
if (_optionalChain([req, 'access', _284 => _284.url, 'optionalAccess', _285 => _285.startsWith, 'call', _286 => _286("/__farm/page-data")])) {
|
|
3772
3863
|
const urlObj = parsedRequestUrl;
|
|
3773
3864
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
3774
3865
|
let renderedRequest;
|
|
@@ -3778,14 +3869,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3778
3869
|
urlObj,
|
|
3779
3870
|
_chunkCFG4QERRcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3780
3871
|
);
|
|
3781
|
-
const deploymentMismatch =
|
|
3872
|
+
const deploymentMismatch = _chunkNLBHLPEOcjs.getFarmDeploymentMismatch.call(void 0,
|
|
3782
3873
|
request,
|
|
3783
3874
|
farmConfig.deploymentId
|
|
3784
3875
|
);
|
|
3785
3876
|
if (deploymentMismatch) {
|
|
3786
|
-
await
|
|
3877
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
3787
3878
|
res,
|
|
3788
|
-
|
|
3879
|
+
_chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch)
|
|
3789
3880
|
);
|
|
3790
3881
|
return;
|
|
3791
3882
|
}
|
|
@@ -3798,7 +3889,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3798
3889
|
renderedRequest = targetRequest;
|
|
3799
3890
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
3800
3891
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
3801
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
3892
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _287 => _287.hasMiddleware, 'call', _288 => _288()])) {
|
|
3802
3893
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
3803
3894
|
const targetNodeResponse = createPageDataMiddlewareResponse(res);
|
|
3804
3895
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
@@ -3832,10 +3923,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3832
3923
|
if (pm) {
|
|
3833
3924
|
await pm.runHookParallel("afterRouteMatch", {
|
|
3834
3925
|
pathname: targetPath,
|
|
3835
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
3836
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
3837
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
3838
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
3926
|
+
matched: !!_optionalChain([match, 'optionalAccess', _289 => _289.route]),
|
|
3927
|
+
routePattern: _optionalChain([match, 'optionalAccess', _290 => _290.route, 'optionalAccess', _291 => _291.pattern]) || null,
|
|
3928
|
+
params: _optionalChain([match, 'optionalAccess', _292 => _292.params]) || {},
|
|
3929
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _293 => _293.layouts]) || []).map((l) => l.pattern)
|
|
3839
3930
|
});
|
|
3840
3931
|
}
|
|
3841
3932
|
if (!match) {
|
|
@@ -3858,7 +3949,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3858
3949
|
);
|
|
3859
3950
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
3860
3951
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
3861
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
3952
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkIEN2EFE5cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
3862
3953
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
3863
3954
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
3864
3955
|
let mergedMetadata = {};
|
|
@@ -3866,7 +3957,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3866
3957
|
layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
|
|
3867
3958
|
);
|
|
3868
3959
|
const layoutHydrationMetadata = layouts.map(
|
|
3869
|
-
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => (
|
|
3960
|
+
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkIEN2EFE5cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
|
|
3870
3961
|
);
|
|
3871
3962
|
const shouldHydrateLayout = layoutHydrationMetadata.some(
|
|
3872
3963
|
(metadata) => metadata.shouldHydrate
|
|
@@ -3878,17 +3969,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3878
3969
|
)
|
|
3879
3970
|
];
|
|
3880
3971
|
const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
|
|
3881
|
-
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3882
|
-
) === "islands" ?
|
|
3972
|
+
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _294 => _294.getConfig, 'call', _295 => _295()]), () => ( options))), 'access', _296 => _296.experimental, 'optionalAccess', _297 => _297.serverComponents])
|
|
3973
|
+
) === "islands" ? _chunkM6U6E4F7cjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
3883
3974
|
route,
|
|
3884
3975
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
3885
3976
|
layouts.map((layout, index) => ({
|
|
3886
3977
|
pattern: layout.pattern,
|
|
3887
3978
|
modulePath: layout.modulePath,
|
|
3888
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
3979
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _298 => _298[index], 'optionalAccess', _299 => _299.shouldHydrate]) === true,
|
|
3889
3980
|
// Manifest entries carry it; metadata read from source does not.
|
|
3890
|
-
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access',
|
|
3891
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
3981
|
+
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _300 => _300[index], 'optionalAccess', _301 => _301.hasIsolatedClientBoundaries]) === true,
|
|
3982
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _302 => _302[index], 'optionalAccess', _303 => _303.islandStrategy]), () => ( null))
|
|
3892
3983
|
})),
|
|
3893
3984
|
server.config.root,
|
|
3894
3985
|
true
|
|
@@ -3936,7 +4027,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3936
4027
|
mergedMetadata = await _chunk6IOZPJ3Icjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
|
|
3937
4028
|
mergedMetadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
|
|
3938
4029
|
mergedMetadata,
|
|
3939
|
-
|
|
4030
|
+
_chunkC2JOS77Zcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
|
|
3940
4031
|
routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
|
|
3941
4032
|
})
|
|
3942
4033
|
);
|
|
@@ -3945,7 +4036,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3945
4036
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
3946
4037
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
3947
4038
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
3948
|
-
), () => (
|
|
4039
|
+
), () => ( _chunkIEN2EFE5cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
3949
4040
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
3950
4041
|
request: targetRequest,
|
|
3951
4042
|
params: slot.params,
|
|
@@ -3991,15 +4082,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3991
4082
|
);
|
|
3992
4083
|
const projectRoot = server.config.root;
|
|
3993
4084
|
const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
3994
|
-
const renderPlan =
|
|
4085
|
+
const renderPlan = _chunk2MR4MABGcjs.createFarmRouteRenderPlan.call(void 0, {
|
|
3995
4086
|
pageShouldHydrate: shouldHydrate,
|
|
3996
4087
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
3997
4088
|
islandStrategy: hydrationIslandStrategy,
|
|
3998
|
-
rendering:
|
|
4089
|
+
rendering: _chunkK7JMTAFHcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
3999
4090
|
});
|
|
4000
4091
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4001
|
-
const layoutStartIndex =
|
|
4002
|
-
|
|
4092
|
+
const layoutStartIndex = _chunk2MR4MABGcjs.getSharedLayoutPrefixLength.call(void 0,
|
|
4093
|
+
_chunk2MR4MABGcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
4003
4094
|
destinationLayoutPatterns
|
|
4004
4095
|
);
|
|
4005
4096
|
const renderer = farmApp.getServerRenderer();
|
|
@@ -4009,7 +4100,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4009
4100
|
middlewareContext,
|
|
4010
4101
|
() => renderer.renderNavigationFragment({
|
|
4011
4102
|
PageComponent: routeModule.default,
|
|
4012
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
4103
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _304 => _304.default]),
|
|
4013
4104
|
pageProps: routeProps,
|
|
4014
4105
|
params,
|
|
4015
4106
|
layouts: layouts.map((layout, index) => ({
|
|
@@ -4071,19 +4162,19 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4071
4162
|
from: interceptFromHeader,
|
|
4072
4163
|
slots: routeSlots.filter((slot) => slot.interception).map((slot) => slot.name)
|
|
4073
4164
|
} : void 0,
|
|
4074
|
-
i18n:
|
|
4165
|
+
i18n: _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, )
|
|
4075
4166
|
};
|
|
4076
|
-
await
|
|
4167
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
4077
4168
|
res,
|
|
4078
4169
|
_chunkDBYNZIIQcjs.createDeferredDataResponse.call(void 0,
|
|
4079
4170
|
pageData,
|
|
4080
4171
|
{
|
|
4081
4172
|
status: 200,
|
|
4082
4173
|
headers: {
|
|
4083
|
-
"Cache-Control":
|
|
4174
|
+
"Cache-Control": _chunk2MR4MABGcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
4084
4175
|
"X-Farm-Navigation": "html-fragment",
|
|
4085
4176
|
Vary: "X-Farm-Layout-Chain",
|
|
4086
|
-
[
|
|
4177
|
+
[_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
4087
4178
|
}
|
|
4088
4179
|
},
|
|
4089
4180
|
{
|
|
@@ -4122,41 +4213,43 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4122
4213
|
trustProxy: currentServerConfig.trustProxy
|
|
4123
4214
|
}).pathname;
|
|
4124
4215
|
const routeManager2 = farmApp.getRouteManager();
|
|
4125
|
-
const
|
|
4126
|
-
const
|
|
4127
|
-
const
|
|
4128
|
-
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _295 => _295.hasHook, 'call', _296 => _296("beforeRender")]), () => ( false));
|
|
4129
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _297 => _297.hasHook, 'call', _298 => _298("afterResponse")]), () => ( false));
|
|
4130
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _299 => _299.hasHook, 'call', _300 => _300("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _301 => _301.hasHook, 'call', _302 => _302("afterRender")]), () => ( false)));
|
|
4216
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _305 => _305.hasHook, 'call', _306 => _306("beforeRequest")]), () => ( false));
|
|
4217
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _307 => _307.hasHook, 'call', _308 => _308("afterResponse")]), () => ( false));
|
|
4218
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _309 => _309.hasHook, 'call', _310 => _310("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _311 => _311.hasHook, 'call', _312 => _312("afterRender")]), () => ( false)));
|
|
4131
4219
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4132
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4220
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _313 => _313.hasRuntimeHook, 'call', _314 => _314("after")]), () => ( false));
|
|
4133
4221
|
const requestedMatch = routeManager2.matchRoute(requestedPathname);
|
|
4134
4222
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4135
4223
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4136
|
-
const mcpLabel =
|
|
4224
|
+
const mcpLabel = _chunkK4UGCUXXcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4137
4225
|
if (mcpLabel) return mcpLabel;
|
|
4138
4226
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4139
|
-
return routePathname ===
|
|
4227
|
+
return routePathname === _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
4140
4228
|
};
|
|
4141
4229
|
let runtimeSession;
|
|
4142
4230
|
let pathname = requestedPathname;
|
|
4231
|
+
let pageHookPathname = requestedPagePathname;
|
|
4143
4232
|
if (pm && opensRuntimeSession) {
|
|
4144
4233
|
try {
|
|
4145
4234
|
const sessionOptions = {
|
|
4146
4235
|
kind: "page",
|
|
4147
|
-
route:
|
|
4236
|
+
route: _chunkK4UGCUXXcjs.setFarmRouteLabel.call(void 0,
|
|
4148
4237
|
{
|
|
4149
4238
|
pathname: requestedPathname,
|
|
4150
|
-
pattern: _optionalChain([requestedMatch, 'optionalAccess',
|
|
4151
|
-
params: _optionalChain([requestedMatch, 'optionalAccess',
|
|
4239
|
+
pattern: _optionalChain([requestedMatch, 'optionalAccess', _315 => _315.route, 'optionalAccess', _316 => _316.pattern]) || null,
|
|
4240
|
+
params: _optionalChain([requestedMatch, 'optionalAccess', _317 => _317.params]) || {}
|
|
4152
4241
|
},
|
|
4153
|
-
_optionalChain([requestedMatch, 'optionalAccess',
|
|
4242
|
+
_optionalChain([requestedMatch, 'optionalAccess', _318 => _318.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
|
|
4154
4243
|
)
|
|
4155
4244
|
};
|
|
4156
4245
|
runtimeSession = await pm.beginRuntimeRequest(
|
|
4157
4246
|
createRequestFromNodeRequest(req, new URL(_nullishCoalesce(configRewriteSource, () => ( fullUrl)))),
|
|
4158
4247
|
sessionOptions
|
|
4159
4248
|
);
|
|
4249
|
+
if (!runtimeSession.response) {
|
|
4250
|
+
pageHookPathname = configRewriteSource === void 0 ? new URL(runtimeSession.request.url).pathname : requestedPagePathname;
|
|
4251
|
+
await runFarmDevPageHooks(pageHookPathname);
|
|
4252
|
+
}
|
|
4160
4253
|
const routedRequest = await _asyncNullishCoalesce(runtimeSession.response, async () => ( (configRewriteSource === void 0 ? runtimeSession.request : await pm.runRuntimeBeforeForRewrite(
|
|
4161
4254
|
runtimeSession.request,
|
|
4162
4255
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -4164,7 +4257,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4164
4257
|
))));
|
|
4165
4258
|
if (routedRequest instanceof Response) {
|
|
4166
4259
|
const response = await pm.endRuntimeRequest(runtimeSession, routedRequest);
|
|
4167
|
-
await
|
|
4260
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
4168
4261
|
return;
|
|
4169
4262
|
}
|
|
4170
4263
|
pm.copyRequestContext(routedRequest, req);
|
|
@@ -4176,9 +4269,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4176
4269
|
return;
|
|
4177
4270
|
}
|
|
4178
4271
|
}
|
|
4179
|
-
const
|
|
4180
|
-
const failPageHook = async (error, interceptor) => {
|
|
4181
|
-
_optionalChain([interceptor, 'optionalAccess', _309 => _309.release, 'call', _310 => _310()]);
|
|
4272
|
+
const failPageHook = async (error) => {
|
|
4182
4273
|
logResponse(method, urlPath, 500, Date.now() - startTime, "PAGE");
|
|
4183
4274
|
if (runtimeSession) {
|
|
4184
4275
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
@@ -4191,32 +4282,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4191
4282
|
}
|
|
4192
4283
|
if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4193
4284
|
};
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
await
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
}
|
|
4201
|
-
if (pm && hasAfterRouteMatchHook) {
|
|
4202
|
-
await pm.runHookParallel("afterRouteMatch", {
|
|
4203
|
-
pathname,
|
|
4204
|
-
matched: !!_optionalChain([routeMatch, 'optionalAccess', _311 => _311.route]),
|
|
4205
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess', _312 => _312.route, 'optionalAccess', _313 => _313.pattern]) || null,
|
|
4206
|
-
params: _optionalChain([routeMatch, 'optionalAccess', _314 => _314.params]) || {},
|
|
4207
|
-
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _315 => _315.layouts]) || []).map((l) => l.pattern)
|
|
4208
|
-
});
|
|
4285
|
+
if (!runtimeSession) {
|
|
4286
|
+
try {
|
|
4287
|
+
await runFarmDevPageHooks(pageHookPathname);
|
|
4288
|
+
} catch (error) {
|
|
4289
|
+
await failPageHook(error);
|
|
4290
|
+
return;
|
|
4209
4291
|
}
|
|
4210
|
-
} catch (error) {
|
|
4211
|
-
await failPageHook(error);
|
|
4212
|
-
return;
|
|
4213
4292
|
}
|
|
4214
|
-
const renderPayload = {
|
|
4215
|
-
pathname,
|
|
4216
|
-
method,
|
|
4217
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess', _316 => _316.route, 'optionalAccess', _317 => _317.pattern]) || null,
|
|
4218
|
-
params: _optionalChain([routeMatch, 'optionalAccess', _318 => _318.params]) || {}
|
|
4219
|
-
};
|
|
4220
4293
|
const shouldInterceptResponse = Boolean(
|
|
4221
4294
|
pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
|
|
4222
4295
|
);
|
|
@@ -4228,7 +4301,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4228
4301
|
hasRuntimeAfterHook,
|
|
4229
4302
|
hasAfterResponseHook,
|
|
4230
4303
|
hasHTMLTransformHook,
|
|
4231
|
-
|
|
4304
|
+
// render.html gets the render info render.before got.
|
|
4305
|
+
renderPayload: pageHookRoute(pageHookPathname).render,
|
|
4232
4306
|
method,
|
|
4233
4307
|
urlPath,
|
|
4234
4308
|
pathname,
|
|
@@ -4275,14 +4349,6 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4275
4349
|
return;
|
|
4276
4350
|
}
|
|
4277
4351
|
const renderer = farmApp.getServerRenderer();
|
|
4278
|
-
if (pm && hasBeforeRenderHook) {
|
|
4279
|
-
try {
|
|
4280
|
-
await pm.runHookParallel("beforeRender", renderPayload);
|
|
4281
|
-
} catch (error) {
|
|
4282
|
-
await failPageHook(error, responseInterceptor);
|
|
4283
|
-
return;
|
|
4284
|
-
}
|
|
4285
|
-
}
|
|
4286
4352
|
await renderer.renderPage(req, res);
|
|
4287
4353
|
if (!shouldInterceptResponse) {
|
|
4288
4354
|
logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
|
|
@@ -4423,8 +4489,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4423
4489
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
4424
4490
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4425
4491
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4426
|
-
const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ?
|
|
4427
|
-
const isolatedHydrationMode =
|
|
4492
|
+
const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
4493
|
+
const isolatedHydrationMode = _chunkIEN2EFE5cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4428
4494
|
_optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.experimental, 'optionalAccess', _362 => _362.isolatedClientHydration]),
|
|
4429
4495
|
{
|
|
4430
4496
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _363 => _363.experimental, 'optionalAccess', _364 => _364.serverComponents])) === "rsc",
|
|
@@ -4434,7 +4500,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4434
4500
|
return generateClientCode(
|
|
4435
4501
|
integrationProviders,
|
|
4436
4502
|
[
|
|
4437
|
-
...
|
|
4503
|
+
..._chunkJX5VOLAVcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
4438
4504
|
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _365 => _365.getFarmDocsDocumentNavigationMatchers, 'call', _366 => _366(docs)]), () => ( []))
|
|
4439
4505
|
],
|
|
4440
4506
|
generatedDocsSearchRuntime,
|
|
@@ -4449,8 +4515,8 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
4449
4515
|
isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _372 => _372.getRouteManager, 'call', _373 => _373(), 'access', _374 => _374.getIsolatedClientBoundaryModules, 'call', _375 => _375(root)])))), 'optionalAccess', _376 => _376.size]) > 0,
|
|
4450
4516
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.trailingSlash]), () => ( false)),
|
|
4451
4517
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.basePath]), () => ( "/")),
|
|
4452
|
-
|
|
4453
|
-
|
|
4518
|
+
_chunkM6U6E4F7cjs.generateClientCachePersistenceCode.call(void 0,
|
|
4519
|
+
_chunkM6U6E4F7cjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.cache]))
|
|
4454
4520
|
),
|
|
4455
4521
|
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4456
4522
|
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.experimental, 'optionalAccess', _381 => _381.serverComponents])) === "islands"
|
|
@@ -4473,7 +4539,7 @@ export const getManifest = () => ({
|
|
|
4473
4539
|
`;
|
|
4474
4540
|
}
|
|
4475
4541
|
const manifest = routeManager.generateClientManifest(server.config.root);
|
|
4476
|
-
const globalStylesheetHref =
|
|
4542
|
+
const globalStylesheetHref = _chunkM6U6E4F7cjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4477
4543
|
server.config.root,
|
|
4478
4544
|
_optionalChain([farmApp, 'optionalAccess', _384 => _384.getConfig, 'call', _385 => _385(), 'access', _386 => _386.srcDir])
|
|
4479
4545
|
);
|
|
@@ -4501,11 +4567,11 @@ export const getManifest = () => ({
|
|
|
4501
4567
|
};
|
|
4502
4568
|
}
|
|
4503
4569
|
for (const layout of manifest.layouts) {
|
|
4504
|
-
const groupScope =
|
|
4570
|
+
const groupScope = _chunk2MR4MABGcjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
4505
4571
|
fullManifest.layouts[layout.pattern] = {
|
|
4506
4572
|
modulePath: layout.modulePath,
|
|
4507
4573
|
pattern: layout.pattern,
|
|
4508
|
-
...groupScope ? { urlPattern:
|
|
4574
|
+
...groupScope ? { urlPattern: _chunk2MR4MABGcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
|
|
4509
4575
|
shouldHydrate: layout.shouldHydrate,
|
|
4510
4576
|
islandStrategy: layout.islandStrategy,
|
|
4511
4577
|
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
@@ -4536,43 +4602,43 @@ export const manifest = getManifest();
|
|
|
4536
4602
|
}
|
|
4537
4603
|
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _388 => _388.getConfig, 'call', _389 => _389()]), () => ( options));
|
|
4538
4604
|
let rewrotePackageImports = false;
|
|
4539
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _390 => _390.experimental, 'optionalAccess', _391 => _391.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _392 => _392.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !
|
|
4605
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _390 => _390.experimental, 'optionalAccess', _391 => _391.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _392 => _392.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkIEN2EFE5cjs.hasUseClientDirective.call(void 0, code)) {
|
|
4540
4606
|
const file = id.split("?", 1)[0];
|
|
4541
4607
|
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _393 => _393.config, 'access', _394 => _394.root]) || process.cwd();
|
|
4542
4608
|
if (_optionalChain([transformOptions, 'optionalAccess', _395 => _395.ssr]) === true) {
|
|
4543
4609
|
if (farmReactServerFiles.has(file)) {
|
|
4544
|
-
for (const child of
|
|
4610
|
+
for (const child of _chunkIEN2EFE5cjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
4545
4611
|
farmReactServerFiles.add(child);
|
|
4546
4612
|
}
|
|
4547
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
4613
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkIEN2EFE5cjs.getFarmClientReachableModules.call(void 0,
|
|
4548
4614
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
4549
4615
|
projectRoot
|
|
4550
4616
|
).has(path6.resolve(file));
|
|
4551
|
-
const reactServer = !serverModule ? null :
|
|
4617
|
+
const reactServer = !serverModule ? null : _chunkIEN2EFE5cjs.rewriteFarmReactServerImports.call(void 0, {
|
|
4552
4618
|
code,
|
|
4553
4619
|
file,
|
|
4554
|
-
reference: (specifier, exportName) =>
|
|
4620
|
+
reference: (specifier, exportName) => _chunkIEN2EFE5cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
4555
4621
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
4556
4622
|
});
|
|
4557
4623
|
if (reactServer !== null) {
|
|
4558
4624
|
code = reactServer;
|
|
4559
4625
|
rewrotePackageImports = true;
|
|
4560
4626
|
}
|
|
4561
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
4627
|
+
const internal = farmReactServerFiles.has(file) ? _chunkIEN2EFE5cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
4562
4628
|
code,
|
|
4563
4629
|
file,
|
|
4564
|
-
reference: (clientFile) =>
|
|
4630
|
+
reference: (clientFile) => _chunkIEN2EFE5cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
4565
4631
|
}) : null;
|
|
4566
4632
|
if (internal !== null) {
|
|
4567
4633
|
code = internal;
|
|
4568
4634
|
rewrotePackageImports = true;
|
|
4569
4635
|
}
|
|
4570
4636
|
}
|
|
4571
|
-
const referenced =
|
|
4637
|
+
const referenced = _chunkIEN2EFE5cjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
4572
4638
|
code,
|
|
4573
4639
|
file,
|
|
4574
4640
|
root: projectRoot,
|
|
4575
|
-
isClientPackage: (specifier) =>
|
|
4641
|
+
isClientPackage: (specifier) => _chunkIEN2EFE5cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
4576
4642
|
});
|
|
4577
4643
|
if (referenced !== null) {
|
|
4578
4644
|
code = referenced;
|
|
@@ -4609,8 +4675,8 @@ export const manifest = getManifest();
|
|
|
4609
4675
|
}
|
|
4610
4676
|
if (!_optionalChain([transformOptions, 'optionalAccess', _403 => _403.ssr])) {
|
|
4611
4677
|
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _404 => _404.getConfig, 'call', _405 => _405(), 'optionalAccess', _406 => _406.docs]));
|
|
4612
|
-
if (
|
|
4613
|
-
const redacted =
|
|
4678
|
+
if (_chunkM6U6E4F7cjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
4679
|
+
const redacted = _chunkM6U6E4F7cjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
4614
4680
|
if (redacted !== null) return { code: redacted, map: null };
|
|
4615
4681
|
}
|
|
4616
4682
|
}
|
|
@@ -4657,13 +4723,13 @@ export const manifest = getManifest();
|
|
|
4657
4723
|
transformed = true;
|
|
4658
4724
|
}
|
|
4659
4725
|
}
|
|
4660
|
-
if (
|
|
4726
|
+
if (_chunkIEN2EFE5cjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
4661
4727
|
const clientBoundarySource = transformedCode;
|
|
4662
4728
|
const moduleInfo = this.getModuleInfo(id);
|
|
4663
4729
|
if (moduleInfo) {
|
|
4664
4730
|
moduleInfo.isClientComponent = true;
|
|
4665
4731
|
}
|
|
4666
|
-
transformedCode =
|
|
4732
|
+
transformedCode = _chunkIEN2EFE5cjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
4667
4733
|
transformed = true;
|
|
4668
4734
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420()]), () => ( options));
|
|
4669
4735
|
let isolatedModuleReference = null;
|
|
@@ -4671,12 +4737,12 @@ export const manifest = getManifest();
|
|
|
4671
4737
|
const cleanId = id.split("?", 1)[0];
|
|
4672
4738
|
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _423 => _423.getRouteManager, 'call', _424 => _424(), 'access', _425 => _425.getIsolatedClientBoundaryModules, 'call', _426 => _426(root)])));
|
|
4673
4739
|
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _427 => _427.has, 'call', _428 => _428(path6.resolve(cleanId))]) === true;
|
|
4674
|
-
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
4675
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
4740
|
+
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkIEN2EFE5cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
4741
|
+
cleanId.replace(/\\/g, "/").includes(_chunkIEN2EFE5cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
4676
4742
|
isolatedModuleReference = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, cleanId, root);
|
|
4677
4743
|
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _429 => _429.experimental, 'optionalAccess', _430 => _430.serverComponents])) === "islands";
|
|
4678
|
-
const explicitStrategy =
|
|
4679
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
4744
|
+
const explicitStrategy = _chunkIEN2EFE5cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
4745
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkM6U6E4F7cjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
4680
4746
|
if (inference) {
|
|
4681
4747
|
for (const file of inference.files) {
|
|
4682
4748
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -4812,7 +4878,7 @@ if (import.meta.hot) {
|
|
|
4812
4878
|
);
|
|
4813
4879
|
}
|
|
4814
4880
|
const html = renderToString(pageElement);
|
|
4815
|
-
const i18nSnapshot =
|
|
4881
|
+
const i18nSnapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
4816
4882
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
4817
4883
|
const fullHtml = `<!DOCTYPE html>
|
|
4818
4884
|
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _437 => _437.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
@@ -4858,8 +4924,8 @@ if (import.meta.hot) {
|
|
|
4858
4924
|
}
|
|
4859
4925
|
},
|
|
4860
4926
|
watchChange() {
|
|
4861
|
-
|
|
4862
|
-
|
|
4927
|
+
_chunkIEN2EFE5cjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
4928
|
+
_chunkIEN2EFE5cjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
4863
4929
|
},
|
|
4864
4930
|
async handleHotUpdate(ctx) {
|
|
4865
4931
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5046,10 +5112,17 @@ if (import.meta.hot) {
|
|
|
5046
5112
|
}
|
|
5047
5113
|
function runFarmMiddlewareWithNavigation(renderer, middlewareRequest, req, res, execute) {
|
|
5048
5114
|
return renderer.runWithRequestContext(middlewareRequest, async () => {
|
|
5115
|
+
const headersBeforeMiddleware = res.getHeaders();
|
|
5049
5116
|
try {
|
|
5050
5117
|
return await execute();
|
|
5051
5118
|
} catch (error) {
|
|
5052
5119
|
if (await renderer.respondToNavigationError(req, res, error)) return true;
|
|
5120
|
+
if (!res.headersSent) {
|
|
5121
|
+
for (const name of res.getHeaderNames()) res.removeHeader(name);
|
|
5122
|
+
for (const [name, value] of Object.entries(headersBeforeMiddleware)) {
|
|
5123
|
+
if (value !== void 0) res.setHeader(name, value);
|
|
5124
|
+
}
|
|
5125
|
+
}
|
|
5053
5126
|
throw error;
|
|
5054
5127
|
}
|
|
5055
5128
|
});
|
|
@@ -5125,9 +5198,9 @@ function readWriteHeadLocation(headers) {
|
|
|
5125
5198
|
}
|
|
5126
5199
|
async function sendFarmPageDataRedirect(res, redirect, deploymentId) {
|
|
5127
5200
|
for (const name of ["location", "content-length", "content-type"]) res.removeHeader(name);
|
|
5128
|
-
await
|
|
5201
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
5129
5202
|
res,
|
|
5130
|
-
|
|
5203
|
+
_chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0, _chunkRWR7SMD7cjs.createFarmPageDataRedirectResponse.call(void 0, redirect), deploymentId)
|
|
5131
5204
|
);
|
|
5132
5205
|
}
|
|
5133
5206
|
function resolveDevelopmentRoot(farmRoot, viteRoot) {
|
|
@@ -5171,19 +5244,19 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5171
5244
|
const parsed = _chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5172
5245
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5173
5246
|
watchFile(routesFile);
|
|
5174
|
-
return
|
|
5247
|
+
return _chunkIEN2EFE5cjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5175
5248
|
kind: parsed.kind,
|
|
5176
5249
|
routePath: parsed.routePath,
|
|
5177
5250
|
routesFile,
|
|
5178
5251
|
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _461 => _461.routes, 'access', _462 => _462.get, 'call', _463 => _463(
|
|
5179
|
-
|
|
5252
|
+
_chunkIEN2EFE5cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5180
5253
|
)]),
|
|
5181
5254
|
rendererServer: renderer.server,
|
|
5182
5255
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5183
5256
|
});
|
|
5184
5257
|
}
|
|
5185
5258
|
function resolveRealModuleFile(filePath, root) {
|
|
5186
|
-
const resolved = _nullishCoalesce(
|
|
5259
|
+
const resolved = _nullishCoalesce(_chunkIEN2EFE5cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5187
5260
|
try {
|
|
5188
5261
|
return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5189
5262
|
} catch (e28) {
|
|
@@ -5522,12 +5595,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
5522
5595
|
}
|
|
5523
5596
|
}
|
|
5524
5597
|
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
5525
|
-
const providerClientCode =
|
|
5598
|
+
const providerClientCode = _chunkM6U6E4F7cjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
5526
5599
|
integrationProviders,
|
|
5527
5600
|
root,
|
|
5528
5601
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
5529
5602
|
);
|
|
5530
|
-
const clientPluginEntry =
|
|
5603
|
+
const clientPluginEntry = _chunkDMXMIE2Ccjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
5531
5604
|
plugins,
|
|
5532
5605
|
root,
|
|
5533
5606
|
srcDir,
|
|
@@ -5575,7 +5648,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
5575
5648
|
return null;
|
|
5576
5649
|
}
|
|
5577
5650
|
}
|
|
5578
|
-
${islandValues ? `${
|
|
5651
|
+
${islandValues ? `${_chunkM6U6E4F7cjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
5579
5652
|
let farmLastRouteState = null;
|
|
5580
5653
|
|
|
5581
5654
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -6386,7 +6459,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
6386
6459
|
return loadedLayouts;
|
|
6387
6460
|
}
|
|
6388
6461
|
|
|
6389
|
-
${
|
|
6462
|
+
${_chunkM6U6E4F7cjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
6390
6463
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
6391
6464
|
let wrapped = element;
|
|
6392
6465
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -6671,7 +6744,7 @@ function readActiveLayoutPatterns() {
|
|
|
6671
6744
|
.filter(Boolean);
|
|
6672
6745
|
}
|
|
6673
6746
|
|
|
6674
|
-
${
|
|
6747
|
+
${_chunkM6U6E4F7cjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
6675
6748
|
|
|
6676
6749
|
function activateFragmentScripts(root) {
|
|
6677
6750
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -6730,7 +6803,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
6730
6803
|
return shell.innerHTML;
|
|
6731
6804
|
}
|
|
6732
6805
|
|
|
6733
|
-
${islandValues ?
|
|
6806
|
+
${islandValues ? _chunkM6U6E4F7cjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
6734
6807
|
container,
|
|
6735
6808
|
fragment,
|
|
6736
6809
|
currentPatterns,
|
|
@@ -6803,7 +6876,7 @@ ${islandValues ? `
|
|
|
6803
6876
|
return nextTarget;
|
|
6804
6877
|
}
|
|
6805
6878
|
|
|
6806
|
-
${islandValues ? `${
|
|
6879
|
+
${islandValues ? `${_chunkM6U6E4F7cjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
6807
6880
|
|
|
6808
6881
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
6809
6882
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -7498,7 +7571,7 @@ function generateClientManifest(bundle) {
|
|
|
7498
7571
|
return manifest;
|
|
7499
7572
|
}
|
|
7500
7573
|
async function defineConfig(config = {}) {
|
|
7501
|
-
const tailwindVitePlugin = await
|
|
7574
|
+
const tailwindVitePlugin = await _chunkDMXMIE2Ccjs.loadTailwindVitePlugin.call(void 0, );
|
|
7502
7575
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
7503
7576
|
if (_optionalChain([config, 'access', _466 => _466.extends, 'optionalAccess', _467 => _467.length])) {
|
|
7504
7577
|
const { config: layeredConfig } = await import("./layers-7P4RLKVX.cjs").then(
|
|
@@ -7510,11 +7583,11 @@ async function defineConfig(config = {}) {
|
|
|
7510
7583
|
config = layeredConfig;
|
|
7511
7584
|
}
|
|
7512
7585
|
config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
7513
|
-
config.images =
|
|
7586
|
+
config.images = _chunkM6U6E4F7cjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
7514
7587
|
const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
7515
7588
|
ssr: true
|
|
7516
7589
|
});
|
|
7517
|
-
const reactRefreshPlugins = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) ? await
|
|
7590
|
+
const reactRefreshPlugins = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunk3QM74STYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
7518
7591
|
const nodeBuiltinStubs = {
|
|
7519
7592
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
7520
7593
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -7608,7 +7681,7 @@ async function defineConfig(config = {}) {
|
|
|
7608
7681
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
7609
7682
|
console.log("");
|
|
7610
7683
|
console.log(
|
|
7611
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
7684
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkMZLJFNMHcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
7612
7685
|
);
|
|
7613
7686
|
console.log("");
|
|
7614
7687
|
console.log(
|
|
@@ -7641,8 +7714,8 @@ async function defineConfig(config = {}) {
|
|
|
7641
7714
|
return {
|
|
7642
7715
|
plugins: [
|
|
7643
7716
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
7644
|
-
|
|
7645
|
-
|
|
7717
|
+
_chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
7718
|
+
_chunkM6U6E4F7cjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
7646
7719
|
tailwindVitePlugin,
|
|
7647
7720
|
...rendererVitePlugins,
|
|
7648
7721
|
...reactRefreshPlugins,
|
|
@@ -7650,14 +7723,14 @@ async function defineConfig(config = {}) {
|
|
|
7650
7723
|
farmI18nClientBridgePlugin(),
|
|
7651
7724
|
farmServerOnlyEntriesPlugin(),
|
|
7652
7725
|
farmPlugin(config),
|
|
7653
|
-
|
|
7726
|
+
_chunkIEN2EFE5cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
7654
7727
|
farmBrandingPlugin
|
|
7655
7728
|
],
|
|
7656
7729
|
customLogger: farmLogger,
|
|
7657
7730
|
clearScreen: false,
|
|
7658
7731
|
optimizeDeps: {
|
|
7659
|
-
...
|
|
7660
|
-
|
|
7732
|
+
..._chunkM6U6E4F7cjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
7733
|
+
_chunkM6U6E4F7cjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
7661
7734
|
appRoot,
|
|
7662
7735
|
_chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
7663
7736
|
),
|
|
@@ -7700,7 +7773,7 @@ async function defineConfig(config = {}) {
|
|
|
7700
7773
|
// Stub out problematic server-only modules during dev mode
|
|
7701
7774
|
alias: {
|
|
7702
7775
|
..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
7703
|
-
...
|
|
7776
|
+
..._chunkM6U6E4F7cjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
7704
7777
|
// Nitro internals that should not be resolved in browser
|
|
7705
7778
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
7706
7779
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|
|
@@ -7729,4 +7802,6 @@ async function defineConfig(config = {}) {
|
|
|
7729
7802
|
|
|
7730
7803
|
|
|
7731
7804
|
|
|
7732
|
-
|
|
7805
|
+
|
|
7806
|
+
|
|
7807
|
+
exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
|