@farm.js/core 0.1.51-beta.2 → 0.1.60
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-WWCC4GLG.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
- package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
- package/dist/{agent-mcp.d-Z5DuwrqW.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
- package/dist/{agent-mcp.d-CR5Ov83o.d.ts → agent-mcp.d-SIoCUP1I.d.ts} +1 -1
- package/dist/agent-runtime.cjs +5 -5
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/agent-runtime.mjs +4 -4
- package/dist/{analyzer-Z6TNEAET.mjs → analyzer-22BEYV7S.mjs} +126 -12
- package/dist/{analyzer-T76CN3S7.cjs → analyzer-LCSI3NSH.cjs} +132 -18
- package/dist/api/client.cjs +5 -4
- package/dist/api/client.d.mts +1 -1
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.mjs +3 -2
- package/dist/api/client.native.cjs +45 -0
- package/dist/api/client.native.d.mts +23 -0
- package/dist/api/client.native.d.ts +23 -0
- package/dist/api/client.native.mjs +45 -0
- package/dist/api/route-manager.cjs +7 -7
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/route-manager.mjs +6 -6
- package/dist/api/runtime.cjs +5 -5
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api/runtime.mjs +4 -4
- package/dist/{api-client.d-CeA6tNA6.d.mts → api-client.d-BNLXNCXJ.d.mts} +1 -1
- package/dist/{api-client.d-BWcqZciH.d.ts → api-client.d-ddQBNGtu.d.ts} +1 -1
- package/dist/api.cjs +11 -11
- package/dist/api.d.mts +5 -5
- package/dist/api.d.ts +5 -5
- package/dist/api.mjs +10 -10
- package/dist/{app-manifest.d-CAHkOBFa.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
- package/dist/{app-manifest.d-DiWr_Jfx.d.ts → app-manifest.d-Tb3CJpL4.d.ts} +1 -1
- package/dist/app-markdown.cjs +7 -7
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +6 -6
- package/dist/{app.d-DmapqkbV.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
- package/dist/{app.d-BfgJCsTQ.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
- package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
- package/dist/{chunk-GUJTVM36.cjs → chunk-2FRLSDBT.cjs} +1 -1
- package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
- package/dist/{chunk-EIMK7D2D.mjs → chunk-2KTYMMWT.mjs} +34 -4
- package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
- package/dist/chunk-37PYUEK5.mjs +533 -0
- package/dist/chunk-3HLQTOVU.cjs +6 -0
- package/dist/{chunk-VSLM6BHX.cjs → chunk-3OJNNCDL.cjs} +9 -9
- package/dist/{chunk-X3JNB2TB.mjs → chunk-3PX4AIXO.mjs} +36 -5
- package/dist/{chunk-UQHIWZZ6.cjs → chunk-3TL3AH25.cjs} +12 -6
- package/dist/chunk-3YMLUNL2.cjs +251 -0
- package/dist/chunk-4JTQPOKO.cjs +137 -0
- package/dist/{chunk-QXPSWMUD.cjs → chunk-4P23B7DU.cjs} +5 -5
- package/dist/{chunk-YVJV7Q2X.mjs → chunk-55U5QIXQ.mjs} +1 -1
- package/dist/{chunk-5N7QAGEA.cjs → chunk-5JNUYGNF.cjs} +37 -7
- package/dist/{chunk-NJLTQR5P.cjs → chunk-6BJJYOFL.cjs} +7 -7
- package/dist/chunk-6UUH4N4J.mjs +251 -0
- package/dist/{chunk-2NHOYYUT.mjs → chunk-7H45IJWO.mjs} +2 -2
- package/dist/{chunk-NN3MOPSI.mjs → chunk-A2MN5PQJ.mjs} +7 -7
- package/dist/{chunk-KY32FWK7.mjs → chunk-BHJAYPYU.mjs} +2 -2
- package/dist/{chunk-VAHBCI6X.mjs → chunk-BQWBHWEW.mjs} +26 -1
- package/dist/{chunk-KJMWAUKE.mjs → chunk-C7GJDVN4.mjs} +1 -1
- package/dist/{chunk-OYNNA4DD.cjs → chunk-CBKRS3M4.cjs} +9 -9
- package/dist/{chunk-I2DQGS56.cjs → chunk-CBOEJ5Z4.cjs} +39 -41
- package/dist/{chunk-BOVGCUDZ.cjs → chunk-CI4UNQHO.cjs} +2 -2
- package/dist/{chunk-S5AQ7CAC.cjs → chunk-CNNBFGL5.cjs} +39 -14
- package/dist/chunk-D2X5MUF5.cjs +1457 -0
- package/dist/{chunk-LEIXUFJN.cjs → chunk-D4MRNBVF.cjs} +10 -9
- package/dist/{chunk-2KVDHNQS.mjs → chunk-D7LTCK3U.mjs} +2 -2
- package/dist/{chunk-J3LBO2O4.cjs → chunk-DPJ66FSI.cjs} +22 -22
- package/dist/{chunk-NYQSC4DX.cjs → chunk-DZPR2W6U.cjs} +5 -5
- package/dist/{chunk-GW4YUIHW.mjs → chunk-E72UD6ME.mjs} +1 -1
- package/dist/chunk-EFZGB7JC.cjs +114 -0
- package/dist/{chunk-XXXRRVY6.mjs → chunk-EGVC4LIG.mjs} +5 -5
- package/dist/{chunk-72NBDVWQ.mjs → chunk-EXUONJYV.mjs} +3 -3
- package/dist/{chunk-VS7EHLLW.mjs → chunk-EZ34EHQP.mjs} +1 -1
- package/dist/{chunk-FM2UEKS2.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
- package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
- package/dist/{chunk-E6LTONL4.mjs → chunk-FORSVMEJ.mjs} +2 -2
- package/dist/{chunk-6CYQQQGR.mjs → chunk-HPWB57PZ.mjs} +1 -1
- package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
- package/dist/{chunk-GNJIYJMS.cjs → chunk-IFXSBJPN.cjs} +16 -16
- package/dist/{chunk-74Z5KX4A.mjs → chunk-ILMTRGBG.mjs} +309 -56
- package/dist/{chunk-NXBHYO7S.cjs → chunk-JBK7UJOI.cjs} +14 -11
- package/dist/chunk-JI5D7MXY.mjs +137 -0
- package/dist/{chunk-QXJADAQB.cjs → chunk-JIBEFLQ7.cjs} +6 -2
- package/dist/{chunk-LZ4SB57H.mjs → chunk-JPIUGDK4.mjs} +1 -1
- package/dist/{chunk-Y3N5BFRJ.mjs → chunk-JSDV2NUN.mjs} +1 -1
- package/dist/{chunk-IRSS4HS4.mjs → chunk-K3RU5MOR.mjs} +1 -1
- package/dist/chunk-KPOMS5RO.cjs +237 -0
- package/dist/{chunk-LAZK6UV7.mjs → chunk-KVW2M6PI.mjs} +1 -1
- package/dist/{chunk-5IONBVJY.cjs → chunk-LB3DPQP6.cjs} +22 -22
- package/dist/{chunk-CZ35L6PL.mjs → chunk-LJVNMGE3.mjs} +10 -4
- package/dist/chunk-LLZSYFOM.mjs +6 -0
- package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
- package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
- package/dist/{chunk-WJFFPXCV.cjs → chunk-LT4VAF5Z.cjs} +12 -10
- package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
- package/dist/{chunk-HIFIG6HL.cjs → chunk-MEQN6DDA.cjs} +5 -5
- package/dist/{chunk-XLRLSTJ6.cjs → chunk-MGKW5XZE.cjs} +7 -7
- package/dist/{chunk-B3GZAQSC.cjs → chunk-MHLNWRCJ.cjs} +3 -3
- package/dist/{chunk-5ENW27SL.mjs → chunk-MMK4MZUN.mjs} +1 -1
- package/dist/{chunk-DTU4PX7V.cjs → chunk-MTWXOEI4.cjs} +927 -629
- package/dist/chunk-NHD7BAKD.mjs +1457 -0
- package/dist/{chunk-NPQLMP7M.cjs → chunk-NQJDO7K7.cjs} +32 -31
- package/dist/{chunk-76GHW3WI.cjs → chunk-O27PLNQZ.cjs} +10 -10
- package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
- package/dist/{chunk-7UPCJDB5.mjs → chunk-PCXIJKPM.mjs} +8 -8
- package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
- package/dist/{chunk-JATTVAHA.cjs → chunk-PRFNLQSP.cjs} +4 -4
- package/dist/{chunk-SBABQKPT.cjs → chunk-QAS7KE7J.cjs} +7 -7
- package/dist/chunk-QGOZLGVP.mjs +0 -0
- package/dist/{chunk-VQJYGZNX.cjs → chunk-QMNWKQL4.cjs} +1 -1
- package/dist/{chunk-XB24LZWI.cjs → chunk-QRX4JRBO.cjs} +3 -3
- package/dist/{chunk-LNM57D3H.cjs → chunk-R53QDV6T.cjs} +4 -4
- package/dist/{chunk-SUV6YO4Q.cjs → chunk-RAWWCDCT.cjs} +5 -5
- package/dist/{chunk-LJDIFIJ2.mjs → chunk-RPUJHJHE.mjs} +4 -4
- package/dist/{chunk-G2KTRMWA.mjs → chunk-RSEAX5MW.mjs} +4 -0
- package/dist/chunk-SJRCWF4Z.mjs +237 -0
- package/dist/{chunk-IBSAYAWB.mjs → chunk-SX7EECTS.mjs} +8 -5
- package/dist/{chunk-KBRZAYI7.mjs → chunk-T4TBK5NY.mjs} +2 -2
- package/dist/{chunk-4SSRBCBR.mjs → chunk-T7I62A4C.mjs} +619 -321
- package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
- package/dist/{chunk-YU42A5MA.cjs → chunk-UDJY2ZGY.cjs} +533 -280
- package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
- package/dist/{chunk-WZW6LEHM.cjs → chunk-UYSTTPYJ.cjs} +1590 -1019
- package/dist/{chunk-KRRZJ77U.mjs → chunk-UZZ6IEQP.mjs} +3 -3
- package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
- package/dist/{chunk-CTM4SPB3.mjs → chunk-VPTWKOCY.mjs} +20 -19
- package/dist/{chunk-UN6N623E.mjs → chunk-VQJHT2ND.mjs} +2 -2
- package/dist/{chunk-SJ23LJ3N.cjs → chunk-VVTJTMGQ.cjs} +3 -3
- package/dist/{chunk-KHXAJ2KA.cjs → chunk-W2RZ73IU.cjs} +12 -12
- package/dist/{chunk-JWI5PUO2.mjs → chunk-W2ZXMMHA.mjs} +2 -1
- package/dist/{chunk-BLD5GVCG.mjs → chunk-W6QLRQ3V.mjs} +1 -1
- package/dist/{chunk-AV26KHTG.mjs → chunk-X2CZTWQA.mjs} +2 -2
- package/dist/chunk-XPIPMWY3.cjs +1 -0
- package/dist/chunk-XTG73QZA.cjs +533 -0
- package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
- package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
- package/dist/{chunk-N77JBPLC.mjs → chunk-YSXTNSXS.mjs} +10 -8
- package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
- package/dist/{chunk-PMKUU273.mjs → chunk-ZFUKPWFC.mjs} +1226 -655
- package/dist/{chunk-E73PGHSR.mjs → chunk-ZMHAFH4R.mjs} +8 -8
- package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
- package/dist/chunk-ZNXTU4YH.mjs +114 -0
- package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
- package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
- package/dist/{chunk-72D2NX77.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
- package/dist/{client-plugins.d-Bx3FXpqm.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +25 -4
- package/dist/{client-plugins.d-TiLbS5j4.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +25 -4
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.cjs +9 -9
- package/dist/client.d.mts +9 -9
- package/dist/client.d.ts +9 -9
- package/dist/client.mjs +9 -9
- package/dist/{config.d-iRPI16ku.d.mts → config.d-DqZkLwef.d.mts} +146 -1
- package/dist/{config.d-iRPI16ku.d.ts → config.d-DqZkLwef.d.ts} +146 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/cron.cjs +3 -3
- package/dist/cron.d.mts +10 -0
- package/dist/cron.d.ts +10 -0
- package/dist/cron.mjs +2 -2
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-UQLDAOEI.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
- package/dist/{devtools-6XWCZIGO.cjs → devtools-UF6JYHUN.cjs} +18 -18
- package/dist/docs.cjs +19 -19
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +18 -18
- package/dist/index.cjs +99 -95
- package/dist/{index.d-yueUNipJ.d.ts → index.d-DlCELfhf.d.ts} +1 -1
- package/dist/{index.d-YxJ2AiDF.d.mts → index.d-Dmfb7Kb_.d.mts} +1 -1
- package/dist/index.d.mts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.mjs +139 -135
- package/dist/integrations.cjs +5 -5
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/integrations.mjs +4 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -6
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +5 -5
- package/dist/internal/build-runtime.cjs +52 -50
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +51 -49
- package/dist/internal/cli-runtime.cjs +28 -28
- package/dist/internal/cli-runtime.mjs +28 -28
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +20 -15
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/client-runtime.mjs +8 -3
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +18 -18
- package/dist/internal/config-runtime.d.mts +119 -7
- package/dist/internal/config-runtime.d.ts +119 -7
- package/dist/internal/config-runtime.mjs +17 -17
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/islands-boot.cjs +211 -0
- package/dist/internal/islands-boot.d.mts +8 -0
- package/dist/internal/islands-boot.d.ts +8 -0
- package/dist/internal/islands-boot.mjs +211 -0
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +42 -28
- package/dist/internal/production-runtime.d.mts +50 -12
- package/dist/internal/production-runtime.d.ts +50 -12
- package/dist/internal/production-runtime.mjs +52 -38
- package/dist/markdown.cjs +7 -5
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +6 -4
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.d.mts +43 -5
- package/dist/mobile.d.ts +43 -5
- package/dist/modules-VHD7BELU.mjs +13 -0
- package/dist/modules-WT5D3AWY.cjs +13 -0
- package/dist/native-specs-BD7HOTMJ.mjs +15 -0
- package/dist/native-specs-IQQRJOOW.cjs +15 -0
- package/dist/native-tree-6G5O53O3.cjs +27 -0
- package/dist/native-tree-VWNW2MQ2.mjs +27 -0
- package/dist/native.cjs +87 -0
- package/dist/native.d.mts +72 -0
- package/dist/native.d.ts +72 -0
- package/dist/native.mjs +87 -0
- package/dist/{navigation-delegate.d-HnDXhlyP.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BY1e_Xrh.d.ts → navigation-delegate.d-JXx40JzR.d.ts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-R444AF3O.mjs → nitro-FLN6DRGJ.mjs} +7 -7
- package/dist/{nitro-CK7M4RMY.cjs → nitro-HXAZZQKY.cjs} +12 -12
- package/dist/plugin.cjs +43 -42
- package/dist/plugin.d.mts +5 -4
- package/dist/plugin.d.ts +5 -4
- package/dist/plugin.mjs +42 -41
- package/dist/port-C6GBH4C6.cjs +419 -0
- package/dist/port-WOOQ3V56.mjs +419 -0
- package/dist/{production-runtime.d-BpJUDzP8.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
- package/dist/{production-runtime.d-lMjvE9cf.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-BlFp5hv4.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-6CGQ3TCk.d.mts → programmatic-routes-client.d-CPbNqtIi.d.mts} +2 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-DhP0mTHF.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
- package/dist/{render-plan.d-BH9edqKs.d.mts → render-plan.d-DZ-qjjdG.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +2 -2
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +6 -6
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +2 -2
- package/dist/{request.d-BVZrsR1v.d.ts → request.d-BiicaNxb.d.ts} +1 -1
- package/dist/{request.d-DJFRdKi8.d.mts → request.d-DV0oeUit.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-Bpmw7PED.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
- package/dist/{route-rendering.d-B00JtK_-.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
- package/dist/{router.d-Bd1x9XxQ.d.ts → router.d-DjGn_al7.d.ts} +1 -1
- package/dist/{router.d-e0jQ3jQ-.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
- package/dist/{routes.d-D96Dq9lz.d.ts → routes.d-BKSjHuH9.d.ts} +27 -4
- package/dist/{routes.d-Cmv8TgVq.d.mts → routes.d-qd8Qf4LG.d.mts} +27 -4
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-DX4OC5FN.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
- package/dist/{rsc-pipeline-ZQ4CTVEG.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
- package/dist/{runtime-NQ3EDSA7.cjs → runtime-DGUOWSMF.cjs} +307 -48
- package/dist/{runtime-NPDRDV6R.mjs → runtime-HFZTVNFF.mjs} +298 -39
- package/dist/{runtime.d-CgB3IJDq.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
- package/dist/{runtime.d-D-td-RR3.d.ts → runtime.d-Bm_4hP5T.d.ts} +1 -1
- package/dist/{schema-dev-notice-F6QYSOAI.mjs → schema-dev-notice-JMXEQWIQ.mjs} +3 -3
- package/dist/{schema-dev-notice-UU7DMZEU.cjs → schema-dev-notice-PLBFDTOF.cjs} +6 -6
- package/dist/server-fn-client.d.mts +1 -1
- package/dist/server-fn-client.d.ts +1 -1
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server-plugins.mjs +1 -1
- package/dist/server.cjs +82 -81
- package/dist/server.d.mts +12 -11
- package/dist/server.d.ts +12 -11
- package/dist/server.mjs +65 -64
- package/dist/session-2Q72D4QV.cjs +23 -0
- package/dist/{session-IGEDQ5PY.mjs → session-QZXZOPR2.mjs} +2 -2
- package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
- package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
- package/dist/{spa-router.d-CO01mVOM.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
- package/dist/{spa-router.d-BWDhS0FK.d.mts → spa-router.d-DHDoXxDE.d.mts} +11 -2
- package/dist/testing.cjs +7 -7
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.mjs +6 -6
- package/dist/{utils.d-B77__yh8.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
- package/dist/{utils.d-DRDazhCA.d.mts → utils.d-uKZcKJk4.d.mts} +7 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +43 -42
- package/dist/vite.d.mts +17 -6
- package/dist/vite.d.ts +17 -6
- package/dist/vite.mjs +42 -41
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +17 -3
- package/dist/agent-mcp-handler-RT3COCEL.cjs +0 -18
- package/dist/session-AAU7RNRO.cjs +0 -23
- package/dist/{chunk-7FVVQEVL.cjs → chunk-4BS3HSY7.cjs} +2 -2
- package/dist/{chunk-N7JQXQAV.cjs → chunk-5OJVKXFV.cjs} +2 -2
- package/dist/{chunk-WSDKXV4E.mjs → chunk-72KABRWN.mjs} +4 -4
- package/dist/{chunk-C3BOESDW.mjs → chunk-B4CWYGCG.mjs} +3 -3
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-ANHZ6SUL.mjs";
|
|
14
14
|
import {
|
|
15
15
|
FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
|
|
16
|
+
FARM_NAVIGATION_STREAM_READER_SOURCE,
|
|
16
17
|
FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE,
|
|
17
18
|
FarmApp,
|
|
18
19
|
collectFarmWebMCPTools,
|
|
@@ -27,6 +28,7 @@ import {
|
|
|
27
28
|
getClientModuleMetadata,
|
|
28
29
|
getIslandStrategyExport,
|
|
29
30
|
hasUseClientDirective,
|
|
31
|
+
inferFarmIslandStrategy,
|
|
30
32
|
isFarmDocsClientConfigModule,
|
|
31
33
|
isIsolatableClientBoundarySource,
|
|
32
34
|
redactFarmDocsClientConfig,
|
|
@@ -35,12 +37,13 @@ import {
|
|
|
35
37
|
resolveFarmClientCacheAdapterEntry,
|
|
36
38
|
resolveFarmImageProviderForRuntime,
|
|
37
39
|
resolveFarmIsolatedClientHydrationMode,
|
|
40
|
+
resolveFarmRouteRootStrategy,
|
|
38
41
|
resolveModuleSourcePath,
|
|
39
42
|
stripUseClientDirective
|
|
40
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ZFUKPWFC.mjs";
|
|
41
44
|
import {
|
|
42
45
|
loadTailwindVitePlugin
|
|
43
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-OM7WILES.mjs";
|
|
44
47
|
import {
|
|
45
48
|
FARM_NODE_RESPONSE_END_PENDING
|
|
46
49
|
} from "./chunk-GHNW564E.mjs";
|
|
@@ -50,7 +53,7 @@ import {
|
|
|
50
53
|
import {
|
|
51
54
|
generateFarmTypeArtifacts,
|
|
52
55
|
resolveRouteRenderingConfig
|
|
53
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-LJVNMGE3.mjs";
|
|
54
57
|
import {
|
|
55
58
|
createFarmRouteRenderPlan,
|
|
56
59
|
farmPathGuardCoversEndpoint,
|
|
@@ -61,7 +64,10 @@ import {
|
|
|
61
64
|
parseFarmLayoutChainHeader,
|
|
62
65
|
renderFarmLocaleAlternateLinks,
|
|
63
66
|
stripRouteGroups
|
|
64
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-PCXIJKPM.mjs";
|
|
68
|
+
import {
|
|
69
|
+
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
70
|
+
} from "./chunk-LLZSYFOM.mjs";
|
|
65
71
|
import {
|
|
66
72
|
isFarmPreviewDeploymentEnvironment
|
|
67
73
|
} from "./chunk-CSLUBKGG.mjs";
|
|
@@ -79,10 +85,10 @@ import {
|
|
|
79
85
|
resolveFarmMCPRouteLabel,
|
|
80
86
|
resolveFarmMarkdownRouteLabel,
|
|
81
87
|
setFarmRouteLabel
|
|
82
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-ZMHAFH4R.mjs";
|
|
83
89
|
import {
|
|
84
90
|
FARM_DEFAULT_MCP_PATH
|
|
85
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-UZZ6IEQP.mjs";
|
|
86
92
|
import {
|
|
87
93
|
resolveFarmLayoutFonts
|
|
88
94
|
} from "./chunk-HZOMT5DY.mjs";
|
|
@@ -94,11 +100,6 @@ import {
|
|
|
94
100
|
programmaticClientRouteKey,
|
|
95
101
|
resolveFarmBrowserBuiltin
|
|
96
102
|
} from "./chunk-ZQ5BDNKW.mjs";
|
|
97
|
-
import {
|
|
98
|
-
createFarmMarkdownSourceResponse,
|
|
99
|
-
isFarmMarkdownPageFile,
|
|
100
|
-
normalizeFarmMarkdownRoutePath
|
|
101
|
-
} from "./chunk-GW4YUIHW.mjs";
|
|
102
103
|
import {
|
|
103
104
|
generateFarmDocsAdapterClientRuntime,
|
|
104
105
|
getFarmDocsAdapterConfigModule
|
|
@@ -129,10 +130,15 @@ import {
|
|
|
129
130
|
FARM_PREVIEW_ROBOTS_TAG,
|
|
130
131
|
resolveFarmAgentCrawlers,
|
|
131
132
|
resolveFarmAgentSitemap
|
|
132
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-T4TBK5NY.mjs";
|
|
133
134
|
import {
|
|
134
135
|
resolveFarmLlmsTxtConfig
|
|
135
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-KVW2M6PI.mjs";
|
|
137
|
+
import {
|
|
138
|
+
getFarmAppDirectories,
|
|
139
|
+
getFarmLayerAliases,
|
|
140
|
+
getFarmSourceRoots
|
|
141
|
+
} from "./chunk-52Y3C3HG.mjs";
|
|
136
142
|
import {
|
|
137
143
|
getPublicFarmImageConfig,
|
|
138
144
|
resolveFarmImageConfig
|
|
@@ -141,10 +147,10 @@ import {
|
|
|
141
147
|
createBundledEnv
|
|
142
148
|
} from "./chunk-N33DLJBC.mjs";
|
|
143
149
|
import {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
} from "./chunk-
|
|
150
|
+
createFarmMarkdownSourceResponse,
|
|
151
|
+
isFarmMarkdownPageFile,
|
|
152
|
+
normalizeFarmMarkdownRoutePath
|
|
153
|
+
} from "./chunk-E72UD6ME.mjs";
|
|
148
154
|
import {
|
|
149
155
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
150
156
|
createFarmMarkdownErrorBody,
|
|
@@ -153,7 +159,7 @@ import {
|
|
|
153
159
|
getFarmMarkdownAlternatePath,
|
|
154
160
|
getFarmMarkdownMirrorPath,
|
|
155
161
|
resolveMarkdownMirrorTarget
|
|
156
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-YSXTNSXS.mjs";
|
|
157
163
|
import {
|
|
158
164
|
resolveFarmRouteContext,
|
|
159
165
|
withFarmRouteContext
|
|
@@ -164,10 +170,10 @@ import {
|
|
|
164
170
|
getIntegrationDocumentNavigationMatchers,
|
|
165
171
|
getIntegrationProviders,
|
|
166
172
|
matchIntegrationRoute
|
|
167
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-IFHPDLIS.mjs";
|
|
168
174
|
import {
|
|
169
175
|
MiddlewareManager
|
|
170
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-A2MN5PQJ.mjs";
|
|
171
177
|
import {
|
|
172
178
|
_runWithMiddlewareContext,
|
|
173
179
|
_runWithMiddlewareData
|
|
@@ -183,7 +189,7 @@ import {
|
|
|
183
189
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
184
190
|
import {
|
|
185
191
|
APIRouteManager
|
|
186
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-BHJAYPYU.mjs";
|
|
187
193
|
import {
|
|
188
194
|
getFarmI18nClientSnapshot
|
|
189
195
|
} from "./chunk-CV6MFQ4Y.mjs";
|
|
@@ -193,10 +199,10 @@ import {
|
|
|
193
199
|
} from "./chunk-NR63PD3P.mjs";
|
|
194
200
|
import {
|
|
195
201
|
isFarmAPIPathname
|
|
196
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-RPUJHJHE.mjs";
|
|
197
203
|
import {
|
|
198
204
|
registerFarmMCPServer
|
|
199
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-C7GJDVN4.mjs";
|
|
200
206
|
import {
|
|
201
207
|
isProgrammaticRoutesFileName,
|
|
202
208
|
parseProgrammaticRouteModuleId,
|
|
@@ -218,7 +224,7 @@ import {
|
|
|
218
224
|
logger,
|
|
219
225
|
toPosixPath,
|
|
220
226
|
toViteModuleId
|
|
221
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-JSDV2NUN.mjs";
|
|
222
228
|
import {
|
|
223
229
|
createFarmSearchParams,
|
|
224
230
|
searchParamsToObject
|
|
@@ -232,6 +238,9 @@ import {
|
|
|
232
238
|
fetchFarmExternalRewrite,
|
|
233
239
|
sendWebResponse
|
|
234
240
|
} from "./chunk-CO6UYM2D.mjs";
|
|
241
|
+
import {
|
|
242
|
+
resolveFarmAPIServerBasePath
|
|
243
|
+
} from "./chunk-2I6PUKWJ.mjs";
|
|
235
244
|
import {
|
|
236
245
|
createFarmNodeRequestAbortSignal,
|
|
237
246
|
createFarmNodeRequestBodyStream,
|
|
@@ -239,15 +248,12 @@ import {
|
|
|
239
248
|
readNodeRequestBody,
|
|
240
249
|
resolveFarmServerConfig
|
|
241
250
|
} from "./chunk-GFT5AHAT.mjs";
|
|
242
|
-
import {
|
|
243
|
-
resolveFarmAPIServerBasePath
|
|
244
|
-
} from "./chunk-LM2YOGDK.mjs";
|
|
245
251
|
import {
|
|
246
252
|
FARM_VERSION
|
|
247
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-HPWB57PZ.mjs";
|
|
248
254
|
import {
|
|
249
255
|
DEFAULT_FARM_API_BASE_PATH
|
|
250
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-W6QLRQ3V.mjs";
|
|
251
257
|
import {
|
|
252
258
|
addMetadataMarkdownAlternate,
|
|
253
259
|
mergeMetadata,
|
|
@@ -765,7 +771,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
765
771
|
return import("./workflows.mjs");
|
|
766
772
|
}
|
|
767
773
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
768
|
-
return import("./devtools-
|
|
774
|
+
return import("./devtools-KQZ6SRCJ.mjs");
|
|
769
775
|
}
|
|
770
776
|
function loadFarmDevtoolsUIRuntime() {
|
|
771
777
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -792,14 +798,14 @@ function farmI18nClientBridgePlugin() {
|
|
|
792
798
|
var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
|
|
793
799
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
794
800
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
795
|
-
function createFarmPlatformClientModule() {
|
|
796
|
-
return `export function platform() { return ${JSON.stringify(
|
|
801
|
+
function createFarmPlatformClientModule(platform) {
|
|
802
|
+
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
797
803
|
export function appDataDir() {
|
|
798
804
|
throw new Error("[Farm] appDataDir() is server-only. Read and write app data from a server function or API route.");
|
|
799
805
|
}
|
|
800
806
|
`;
|
|
801
807
|
}
|
|
802
|
-
function farmServerOnlyEntriesPlugin() {
|
|
808
|
+
function farmServerOnlyEntriesPlugin(options = {}) {
|
|
803
809
|
let root = process.cwd();
|
|
804
810
|
let vercelOgInstalled = false;
|
|
805
811
|
return {
|
|
@@ -813,14 +819,14 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
813
819
|
configResolved(config) {
|
|
814
820
|
root = config.root;
|
|
815
821
|
},
|
|
816
|
-
resolveId(id, importer,
|
|
817
|
-
if (id === FARM_PLATFORM_ENTRY) return
|
|
818
|
-
if (!
|
|
819
|
-
return resolveFarmBrowserBuiltin(this, id, importer,
|
|
822
|
+
resolveId(id, importer, options2) {
|
|
823
|
+
if (id === FARM_PLATFORM_ENTRY) return options2?.ssr ? null : FARM_PLATFORM_CLIENT_ID;
|
|
824
|
+
if (!options2?.ssr && isBuiltin(id)) {
|
|
825
|
+
return resolveFarmBrowserBuiltin(this, id, importer, options2);
|
|
820
826
|
}
|
|
821
827
|
if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
|
|
822
828
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
823
|
-
if (!
|
|
829
|
+
if (!options2?.ssr) {
|
|
824
830
|
this.error(
|
|
825
831
|
`${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
|
|
826
832
|
);
|
|
@@ -834,7 +840,9 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
834
840
|
return null;
|
|
835
841
|
},
|
|
836
842
|
load(id) {
|
|
837
|
-
if (id === FARM_PLATFORM_CLIENT_ID)
|
|
843
|
+
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
844
|
+
return createFarmPlatformClientModule(options.platform ?? resolveFarmPlatform());
|
|
845
|
+
}
|
|
838
846
|
return loadFarmBrowserBuiltin(id) ?? null;
|
|
839
847
|
}
|
|
840
848
|
};
|
|
@@ -1250,7 +1258,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1250
1258
|
const wrapperName = `__farm_isolated_boundary_${safeName || "default"}__`;
|
|
1251
1259
|
wrapperStatements.push(
|
|
1252
1260
|
// Islands mode renders through islx; the older isolated hydration keeps Farm's boundary.
|
|
1253
|
-
options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
|
|
1261
|
+
options.slots && options.inferredInteraction ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, "interaction", { inferred: true });` : options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
|
|
1254
1262
|
);
|
|
1255
1263
|
wrapperStatements.push(
|
|
1256
1264
|
isDefault ? `export default ${wrapperName};` : `export { ${wrapperName} as ${exportName} };`
|
|
@@ -2332,6 +2340,23 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2332
2340
|
return;
|
|
2333
2341
|
}
|
|
2334
2342
|
}
|
|
2343
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD") && req.headers.accept?.includes(FARM_NATIVE_TREE_CONTENT_TYPE)) {
|
|
2344
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-VWNW2MQ2.mjs");
|
|
2345
|
+
const treeResponse = await createFarmNativeTreeResponse({
|
|
2346
|
+
request: new Request(fullUrl, { method: requestMethod, headers: docsHeaders }),
|
|
2347
|
+
// As for the Markdown mirror: this server's own listener, redirects not followed.
|
|
2348
|
+
renderPage: (request) => createFarmDevServerDispatch(server)(
|
|
2349
|
+
new Request(request, {
|
|
2350
|
+
signal: res.destroyed ? AbortSignal.abort() : createFarmNodeRequestAbortSignal(req, res)
|
|
2351
|
+
})
|
|
2352
|
+
)
|
|
2353
|
+
});
|
|
2354
|
+
await serveBuiltInRoute(() => treeResponse, {
|
|
2355
|
+
computed: treeResponse,
|
|
2356
|
+
label: farmApp.getRouteManager().matchRoute(stripFarmBasePath(requestPathname, farmConfig.basePath)).route?.pattern ?? null
|
|
2357
|
+
});
|
|
2358
|
+
return;
|
|
2359
|
+
}
|
|
2335
2360
|
const markdownRouteLabel = () => resolveFarmMarkdownRouteLabel(
|
|
2336
2361
|
stripFarmBasePath(requestPathname, farmConfig.basePath),
|
|
2337
2362
|
(page) => farmApp.getRouteManager().matchRoute(page).route?.pattern
|
|
@@ -2906,9 +2931,22 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2906
2931
|
(metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
|
|
2907
2932
|
)
|
|
2908
2933
|
];
|
|
2909
|
-
const hydrationIslandStrategy =
|
|
2910
|
-
(
|
|
2911
|
-
)
|
|
2934
|
+
const hydrationIslandStrategy = resolveFarmServerComponentsMode(
|
|
2935
|
+
(farmApp?.getConfig() ?? options).experimental?.serverComponents
|
|
2936
|
+
) === "islands" ? resolveFarmRouteRootStrategy(
|
|
2937
|
+
route,
|
|
2938
|
+
{ shouldHydrate, islandStrategy: moduleMetadata.islandStrategy ?? null },
|
|
2939
|
+
layouts.map((layout, index) => ({
|
|
2940
|
+
pattern: layout.pattern,
|
|
2941
|
+
modulePath: layout.modulePath,
|
|
2942
|
+
shouldHydrate: layoutHydrationMetadata[index]?.shouldHydrate === true,
|
|
2943
|
+
// Manifest entries carry it; metadata read from source does not.
|
|
2944
|
+
hasIsolatedClientBoundaries: layoutHydrationMetadata[index]?.hasIsolatedClientBoundaries === true,
|
|
2945
|
+
islandStrategy: layoutHydrationMetadata[index]?.islandStrategy ?? null
|
|
2946
|
+
})),
|
|
2947
|
+
server.config.root,
|
|
2948
|
+
true
|
|
2949
|
+
) : hydrationStrategies.every((strategy) => strategy === hydrationStrategies[0]) ? hydrationStrategies[0] ?? "load" : "load";
|
|
2912
2950
|
const targetUrl = new URL(targetPath, "http://localhost");
|
|
2913
2951
|
const searchParams = searchParamsToObject(targetUrl.searchParams);
|
|
2914
2952
|
const routeContext = await resolveFarmRouteContext(farmApp.getConfig(), {
|
|
@@ -3317,7 +3355,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3317
3355
|
if (parseProgrammaticRouteModuleId(id)) {
|
|
3318
3356
|
return id;
|
|
3319
3357
|
}
|
|
3320
|
-
if (isFarmClientVirtualId(id)) {
|
|
3358
|
+
if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
|
|
3321
3359
|
return id;
|
|
3322
3360
|
}
|
|
3323
3361
|
if (id === "/@farm/server") {
|
|
@@ -3356,6 +3394,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3356
3394
|
}
|
|
3357
3395
|
return generateProgrammaticRouteModule(id, root, renderer);
|
|
3358
3396
|
}
|
|
3397
|
+
if (id === FARM_DEV_CLIENT_BOOT_ID) {
|
|
3398
|
+
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
3399
|
+
}
|
|
3359
3400
|
if (isFarmClientVirtualId(id)) {
|
|
3360
3401
|
const resolvedConfig = farmApp?.getConfig();
|
|
3361
3402
|
const renderer = resolvedConfig?.renderer || resolveFarmRenderer(options.renderer);
|
|
@@ -3574,12 +3615,22 @@ export const manifest = getManifest();
|
|
|
3574
3615
|
const selectedForIsolatedHydration = selectedIsolatedModules?.has(path5.resolve(cleanId)) === true;
|
|
3575
3616
|
if (isReactRenderer(resolveFarmRenderer(currentConfig.renderer)) && selectedForIsolatedHydration && isIsolatableClientBoundarySource(clientBoundarySource)) {
|
|
3576
3617
|
isolatedModuleReference = toViteModuleId(cleanId, root);
|
|
3618
|
+
const islandsMode = resolveFarmServerComponentsMode(currentConfig.experimental?.serverComponents) === "islands";
|
|
3619
|
+
const explicitStrategy = getIslandStrategyExport(clientBoundarySource);
|
|
3620
|
+
const inference = islandsMode && explicitStrategy === null ? inferFarmIslandStrategy(cleanId, root) : null;
|
|
3621
|
+
if (inference) {
|
|
3622
|
+
for (const file of inference.files) {
|
|
3623
|
+
if (file !== path5.resolve(cleanId)) this.addWatchFile(file);
|
|
3624
|
+
recordFarmIslandInferenceDependency(file, cleanId);
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3577
3627
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
3578
3628
|
code: transformedCode,
|
|
3579
3629
|
moduleReference: isolatedModuleReference,
|
|
3580
|
-
islandStrategy:
|
|
3630
|
+
islandStrategy: explicitStrategy ?? "load",
|
|
3581
3631
|
parse: (source) => this.parse(source),
|
|
3582
|
-
slots:
|
|
3632
|
+
slots: islandsMode,
|
|
3633
|
+
inferredInteraction: inference?.strategy === "interaction"
|
|
3583
3634
|
});
|
|
3584
3635
|
if (!transformedBoundary) {
|
|
3585
3636
|
this.error(
|
|
@@ -3761,6 +3812,12 @@ if (import.meta.hot) {
|
|
|
3761
3812
|
});
|
|
3762
3813
|
}
|
|
3763
3814
|
}
|
|
3815
|
+
for (const island of farmIslandInferenceDependents.get(path5.resolve(file)) ?? []) {
|
|
3816
|
+
if (island === path5.resolve(file)) continue;
|
|
3817
|
+
for (const mod of server2.moduleGraph.getModulesByFile(toPosixPath(island)) ?? []) {
|
|
3818
|
+
server2.moduleGraph.invalidateModule(mod);
|
|
3819
|
+
}
|
|
3820
|
+
}
|
|
3764
3821
|
const currentFarmConfig = farmApp?.getConfig();
|
|
3765
3822
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
3766
3823
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && getFarmAppDirectories(currentFarmConfig).some(
|
|
@@ -3913,6 +3970,15 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
|
|
|
3913
3970
|
}
|
|
3914
3971
|
return farmRoot;
|
|
3915
3972
|
}
|
|
3973
|
+
var farmIslandInferenceDependents = /* @__PURE__ */ new Map();
|
|
3974
|
+
function recordFarmIslandInferenceDependency(file, island) {
|
|
3975
|
+
const key = path5.resolve(file);
|
|
3976
|
+
let islands = farmIslandInferenceDependents.get(key);
|
|
3977
|
+
if (!islands) farmIslandInferenceDependents.set(key, islands = /* @__PURE__ */ new Set());
|
|
3978
|
+
islands.add(path5.resolve(island));
|
|
3979
|
+
}
|
|
3980
|
+
var FARM_DEV_CLIENT_BOOT_ID = "/@farm/client-boot.js";
|
|
3981
|
+
var FARM_DEV_CLIENT_BOOT_MODULE = 'import { startFarmIslandsBoot } from "@farm.js/core/internal/islands-boot";\nstartFarmIslandsBoot();\n';
|
|
3916
3982
|
function isFarmClientVirtualId(id) {
|
|
3917
3983
|
const pathname = id.split("?", 1)[0];
|
|
3918
3984
|
return pathname === "/@farm/client" || pathname === "/@farm/client.js";
|
|
@@ -4365,6 +4431,7 @@ import {
|
|
|
4365
4431
|
createFarmDeploymentRequestHeaders,
|
|
4366
4432
|
isFarmDeploymentMismatchResponse,
|
|
4367
4433
|
} from '@farm.js/core/deployment'
|
|
4434
|
+
${islandValues ? "import { getFarmIslandValueHeaders } from '@farm.js/core/internal/client-runtime'" : ""}
|
|
4368
4435
|
${providerClientCode.imports}
|
|
4369
4436
|
${clientPluginEntry.imports}
|
|
4370
4437
|
|
|
@@ -4831,6 +4898,7 @@ class LegacyManifestSPARouter {
|
|
|
4831
4898
|
// Initialize the SPA router
|
|
4832
4899
|
const spaRouter = new SPARouter({
|
|
4833
4900
|
shouldUseDocumentNavigation: matchesDocumentNavigation,
|
|
4901
|
+
${islandValues ? "fetchNavigationDocument: fetchFarmNavigationDocument," : ""}
|
|
4834
4902
|
});
|
|
4835
4903
|
window.__FARM_SPA_ROUTER__ = spaRouter;
|
|
4836
4904
|
|
|
@@ -5449,7 +5517,14 @@ function parseNavigationFragment(html) {
|
|
|
5449
5517
|
return template.content;
|
|
5450
5518
|
}
|
|
5451
5519
|
|
|
5452
|
-
function replaceNavigationBoundary(
|
|
5520
|
+
function replaceNavigationBoundary(
|
|
5521
|
+
container,
|
|
5522
|
+
fragment,
|
|
5523
|
+
currentPatterns,
|
|
5524
|
+
nextPatterns,
|
|
5525
|
+
refresh = false,
|
|
5526
|
+
find = findLayoutBoundary,
|
|
5527
|
+
) {
|
|
5453
5528
|
let sharedCount = 0;
|
|
5454
5529
|
while (
|
|
5455
5530
|
sharedCount < currentPatterns.length &&
|
|
@@ -5460,13 +5535,13 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
|
|
|
5460
5535
|
}
|
|
5461
5536
|
|
|
5462
5537
|
const fragmentTreeRoot = nextPatterns.length > 0
|
|
5463
|
-
?
|
|
5538
|
+
? find(fragment, nextPatterns[0])
|
|
5464
5539
|
: fragment.querySelector('#__farm_page__');
|
|
5465
5540
|
const currentTarget = sharedCount < currentPatterns.length
|
|
5466
|
-
?
|
|
5541
|
+
? find(container, currentPatterns[sharedCount])
|
|
5467
5542
|
: container.querySelector('#__farm_page__');
|
|
5468
5543
|
const nextTarget = sharedCount < nextPatterns.length
|
|
5469
|
-
?
|
|
5544
|
+
? find(fragment, nextPatterns[sharedCount])
|
|
5470
5545
|
: fragment.querySelector('#__farm_page__');
|
|
5471
5546
|
|
|
5472
5547
|
if (!currentTarget || !nextTarget) {
|
|
@@ -5497,6 +5572,184 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
|
|
|
5497
5572
|
return nextTarget;
|
|
5498
5573
|
}
|
|
5499
5574
|
|
|
5575
|
+
${islandValues ? `${FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
5576
|
+
|
|
5577
|
+
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
5578
|
+
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
5579
|
+
// before slow Suspense content. Other pages (a client page, a layout that hydrates, route slots)
|
|
5580
|
+
// keep the page-data request.
|
|
5581
|
+
function farmLayoutIdentity(boundary) {
|
|
5582
|
+
return boundary.getAttribute('data-farm-layout-key') || boundary.getAttribute('data-farm-layout-pattern');
|
|
5583
|
+
}
|
|
5584
|
+
|
|
5585
|
+
function findLayoutBoundaryByIdentity(root, identity) {
|
|
5586
|
+
const boundaries = root.querySelectorAll
|
|
5587
|
+
? root.querySelectorAll('[data-farm-layout-boundary="true"]')
|
|
5588
|
+
: [];
|
|
5589
|
+
for (const boundary of boundaries) {
|
|
5590
|
+
if (farmLayoutIdentity(boundary) === identity) return boundary;
|
|
5591
|
+
}
|
|
5592
|
+
return null;
|
|
5593
|
+
}
|
|
5594
|
+
|
|
5595
|
+
function readLayoutIdentities(root) {
|
|
5596
|
+
return Array.from(root.querySelectorAll ? root.querySelectorAll('[data-farm-layout-boundary="true"]') : [])
|
|
5597
|
+
.map(farmLayoutIdentity)
|
|
5598
|
+
.filter(Boolean);
|
|
5599
|
+
}
|
|
5600
|
+
|
|
5601
|
+
// A segment response leaves out the layouts the browser said it shows. It fits this page only if
|
|
5602
|
+
// the page still shows each of them, at the same depth.
|
|
5603
|
+
function fitsFarmSegment(currentRoot, nextRoot) {
|
|
5604
|
+
const nextBoundaries = Array.from(nextRoot.querySelectorAll('[data-farm-layout-boundary="true"]'));
|
|
5605
|
+
const lastKept = nextBoundaries
|
|
5606
|
+
.map((boundary) => boundary.getAttribute('data-farm-layout-kept') === 'true')
|
|
5607
|
+
.lastIndexOf(true);
|
|
5608
|
+
if (lastKept === -1) return true;
|
|
5609
|
+
const current = readLayoutIdentities(currentRoot);
|
|
5610
|
+
for (let index = 0; index <= lastKept; index++) {
|
|
5611
|
+
if (current[index] !== farmLayoutIdentity(nextBoundaries[index])) return false;
|
|
5612
|
+
}
|
|
5613
|
+
return true;
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
// Each navigation starts a new generation, so a page left while it streams stops adding content.
|
|
5617
|
+
let farmNavigationStreamGeneration = 0;
|
|
5618
|
+
|
|
5619
|
+
function farmDocumentNavigationRoute(pathname) {
|
|
5620
|
+
const match = findRoute(pathname);
|
|
5621
|
+
if (!match) return null;
|
|
5622
|
+
const route = match.route;
|
|
5623
|
+
if (route.isClientComponent || route.shouldHydrate) return null;
|
|
5624
|
+
if (route.renderPlan && route.renderPlan.hydration !== 'none') return null;
|
|
5625
|
+
const layouts = findLayouts(pathname);
|
|
5626
|
+
if (layouts.some((layout) => layout.shouldHydrate)) return null;
|
|
5627
|
+
const owners = new Set([route.pattern, ...layouts.map((layout) => layout.pattern)]);
|
|
5628
|
+
if ((getManifest().slots || []).some((slot) => owners.has(slot.ownerPattern))) return null;
|
|
5629
|
+
return { ...match, layouts };
|
|
5630
|
+
}
|
|
5631
|
+
|
|
5632
|
+
async function fetchFarmNavigationDocument(path, context) {
|
|
5633
|
+
farmNavigationStreamGeneration++;
|
|
5634
|
+
const url = new URL(path, window.location.href);
|
|
5635
|
+
const match = farmDocumentNavigationRoute(url.pathname);
|
|
5636
|
+
const container = document.getElementById('root');
|
|
5637
|
+
if (!match || !container) return null;
|
|
5638
|
+
const deploymentId = window.__FARM_DEPLOYMENT_ID__;
|
|
5639
|
+
const request = async (keepLayouts) => {
|
|
5640
|
+
// A refresh renders every layout; so does a page whose layout React owns, which the swap
|
|
5641
|
+
// replaces whole.
|
|
5642
|
+
const identities =
|
|
5643
|
+
keepLayouts && !context.refresh && !activeLayoutShouldHydrate
|
|
5644
|
+
? readLayoutIdentities(container)
|
|
5645
|
+
: [];
|
|
5646
|
+
const response = await fetch(url.pathname + url.search, {
|
|
5647
|
+
signal: context.signal,
|
|
5648
|
+
redirect: 'manual',
|
|
5649
|
+
headers: createFarmDeploymentRequestHeaders(deploymentId, {
|
|
5650
|
+
Accept: 'text/html',
|
|
5651
|
+
'F-Stream': 'flush',
|
|
5652
|
+
...getFarmIslandValueHeaders(),
|
|
5653
|
+
...(identities.length ? { 'F-Layouts': JSON.stringify(identities) } : {}),
|
|
5654
|
+
}),
|
|
5655
|
+
});
|
|
5656
|
+
if (isFarmDeploymentMismatchResponse(response, deploymentId)) {
|
|
5657
|
+
const error = createFarmDeploymentMismatchError(response, deploymentId || 'unknown');
|
|
5658
|
+
window.dispatchEvent(new CustomEvent('farm:deployment-mismatch', { detail: error }));
|
|
5659
|
+
throw error;
|
|
5660
|
+
}
|
|
5661
|
+
// A redirect, an error or anything but HTML: the router loads the document instead.
|
|
5662
|
+
if (
|
|
5663
|
+
!response.ok ||
|
|
5664
|
+
!response.body ||
|
|
5665
|
+
!(response.headers.get('content-type') || '').includes('text/html')
|
|
5666
|
+
) {
|
|
5667
|
+
throw new Error('Failed to fetch the page: ' + response.status);
|
|
5668
|
+
}
|
|
5669
|
+
const stream = await readFarmNavigationStream(response.body, response.headers.get('F-Flush'));
|
|
5670
|
+
const doc = new DOMParser().parseFromString(stream.shell, 'text/html');
|
|
5671
|
+
return { stream, doc, nextRoot: doc.getElementById('root') };
|
|
5672
|
+
};
|
|
5673
|
+
let result = await request(true);
|
|
5674
|
+
if (result.nextRoot && !fitsFarmSegment(container, result.nextRoot)) {
|
|
5675
|
+
result.stream.cancel?.();
|
|
5676
|
+
result = await request(false);
|
|
5677
|
+
}
|
|
5678
|
+
if (!result.nextRoot) {
|
|
5679
|
+
result.stream.cancel?.();
|
|
5680
|
+
throw new Error('The page has no #root');
|
|
5681
|
+
}
|
|
5682
|
+
const { stream, doc, nextRoot } = result;
|
|
5683
|
+
const description = doc.querySelector('meta[name="description"]')?.getAttribute('content');
|
|
5684
|
+
return {
|
|
5685
|
+
props: { params: match.params },
|
|
5686
|
+
modulePath: match.route.modulePath,
|
|
5687
|
+
isClientComponent: false,
|
|
5688
|
+
pageShouldHydrate: false,
|
|
5689
|
+
layoutShouldHydrate: false,
|
|
5690
|
+
shouldHydrate: false,
|
|
5691
|
+
islandStrategy: 'load',
|
|
5692
|
+
renderPlan: match.route.renderPlan,
|
|
5693
|
+
fragment: {
|
|
5694
|
+
html: nextRoot.innerHTML,
|
|
5695
|
+
layoutPatterns: Array.from(nextRoot.querySelectorAll('[data-farm-layout-boundary="true"]'))
|
|
5696
|
+
.map((boundary) => boundary.getAttribute('data-farm-layout-pattern'))
|
|
5697
|
+
.filter(Boolean),
|
|
5698
|
+
},
|
|
5699
|
+
metadata: { title: doc.title, ...(description ? { description } : {}) },
|
|
5700
|
+
layoutModules: match.layouts.map((layout) => layout.modulePath),
|
|
5701
|
+
farmDocument: { stream: stream.next ? stream : null },
|
|
5702
|
+
};
|
|
5703
|
+
}
|
|
5704
|
+
|
|
5705
|
+
// Adds the flushes after a streamed navigation's shell, as the production client does: React's
|
|
5706
|
+
// staged Suspense content and the scripts that reveal it.${isolatedHydrationEnabled ? " The islands React reveals hydrate as they\n// appear, and the ones it removes (a replaced fallback) are released." : ""}
|
|
5707
|
+
async function streamFarmDevNavigation(stream, root, generation) {
|
|
5708
|
+
const isCurrent = () => generation === farmNavigationStreamGeneration && root.isConnected;
|
|
5709
|
+
${isolatedHydrationEnabled ? `let streaming = true;
|
|
5710
|
+
const removed = new Set();
|
|
5711
|
+
let queued = false;
|
|
5712
|
+
const run = () => {
|
|
5713
|
+
queued = false;
|
|
5714
|
+
if (!isCurrent()) return observer.disconnect();
|
|
5715
|
+
for (const node of removed) if (!node.isConnected) disposeFarmIsolatedClientBoundaries(node);
|
|
5716
|
+
removed.clear();
|
|
5717
|
+
if (!streaming && !root.querySelector('div[hidden][id^="S:"]')) observer.disconnect();
|
|
5718
|
+
hydrateFarmIsolatedClientBoundaries(root).catch((error) => {
|
|
5719
|
+
console.error('[Farm.js] Hydrating streamed islands failed:', error);
|
|
5720
|
+
});
|
|
5721
|
+
};
|
|
5722
|
+
const observer = new MutationObserver((records) => {
|
|
5723
|
+
for (const record of records) for (const node of record.removedNodes) removed.add(node);
|
|
5724
|
+
if (queued) return;
|
|
5725
|
+
queued = true;
|
|
5726
|
+
queueMicrotask(run);
|
|
5727
|
+
});
|
|
5728
|
+
observer.observe(root, { childList: true, subtree: true });` : "const observer = { disconnect() {} };"}
|
|
5729
|
+
try {
|
|
5730
|
+
for (let flush = await stream.next(); flush !== null; flush = await stream.next()) {
|
|
5731
|
+
if (!isCurrent()) {
|
|
5732
|
+
observer.disconnect();
|
|
5733
|
+
return stream.cancel();
|
|
5734
|
+
}
|
|
5735
|
+
const parsed = new DOMParser().parseFromString('<div id="root">' + flush, 'text/html');
|
|
5736
|
+
const fragment = document.createDocumentFragment();
|
|
5737
|
+
for (const node of Array.from(parsed.getElementById('root').childNodes)) fragment.appendChild(node);
|
|
5738
|
+
activateFragmentScripts(fragment);
|
|
5739
|
+
root.appendChild(fragment);
|
|
5740
|
+
}
|
|
5741
|
+
} catch (error) {
|
|
5742
|
+
${isolatedHydrationEnabled ? "streaming = false;" : ""}
|
|
5743
|
+
if (!isCurrent()) return observer.disconnect();
|
|
5744
|
+
console.error('[Farm.js] A streamed navigation failed:', error);
|
|
5745
|
+
${isolatedHydrationEnabled ? "farmIsolatedHydrationRuntime.endStream?.(root);\n if (!queued) run();" : ""}
|
|
5746
|
+
return;
|
|
5747
|
+
}
|
|
5748
|
+
if (!isCurrent()) return observer.disconnect();
|
|
5749
|
+
${isolatedHydrationEnabled ? "streaming = false;\n farmIsolatedHydrationRuntime.endStream?.(root);\n if (!queued) run();" : "observer.disconnect();"}
|
|
5750
|
+
}
|
|
5751
|
+
` : ""}
|
|
5752
|
+
|
|
5500
5753
|
let activeLayoutPatterns = readActiveLayoutPatterns();
|
|
5501
5754
|
let activeLayoutShouldHydrate = window.__FARM_LAYOUT_SHOULD_HYDRATE__ === true;
|
|
5502
5755
|
|
|
@@ -5506,6 +5759,7 @@ async function renderPage(pageData, info) {
|
|
|
5506
5759
|
const container = document.getElementById('root');
|
|
5507
5760
|
if (!container) return;
|
|
5508
5761
|
cancelPendingPageHydration();
|
|
5762
|
+
${islandValues ? "const farmStreamGeneration = ++farmNavigationStreamGeneration;" : ""}
|
|
5509
5763
|
const destination = window.location.pathname + window.location.search;
|
|
5510
5764
|
|
|
5511
5765
|
if (pageData.interception) {
|
|
@@ -5635,7 +5889,7 @@ async function renderPage(pageData, info) {
|
|
|
5635
5889
|
if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
|
|
5636
5890
|
if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
|
|
5637
5891
|
delete window.__FARM_REACT_ROOT__;
|
|
5638
|
-
${isolatedHydrationEnabled ? "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
|
|
5892
|
+
${isolatedHydrationEnabled ? islandValues ? "isolatedHydrationScope = (pageData.farmDocument ? replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), info?.refresh === true, findLayoutBoundaryByIdentity) : replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true)) || container;" : "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : islandValues ? "if (pageData.farmDocument) replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), false, findLayoutBoundaryByIdentity); else replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
|
|
5639
5893
|
}
|
|
5640
5894
|
|
|
5641
5895
|
const hydrationController = new AbortController();
|
|
@@ -5690,6 +5944,7 @@ async function renderPage(pageData, info) {
|
|
|
5690
5944
|
activeLayoutPatterns = layoutPatterns;
|
|
5691
5945
|
activeLayoutShouldHydrate = layoutShouldHydrate;
|
|
5692
5946
|
window.__FARM_LOADING_MODULE__ = route.loadingModulePath || null;
|
|
5947
|
+
${islandValues ? "if (pageData.farmDocument?.stream) void streamFarmDevNavigation(pageData.farmDocument.stream, container, farmStreamGeneration);" : ""}
|
|
5693
5948
|
return true;
|
|
5694
5949
|
};
|
|
5695
5950
|
|
|
@@ -5776,12 +6031,10 @@ function farmIslandsOnlyDocument() {
|
|
|
5776
6031
|
(window.__FARM_SHOULD_HYDRATE__ === true || pageShouldHydrate || layoutShouldHydrate);
|
|
5777
6032
|
const hydratedSlots = await hydrateInitialRouteSlots();
|
|
5778
6033
|
${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries && !pageShouldHydrate && !layoutShouldHydrate) {
|
|
5779
|
-
const hydrationController = new AbortController();
|
|
5780
|
-
pendingPageHydrationController = hydrationController;
|
|
5781
6034
|
// Islands mode hydrates the document, as production does, so islx also watches the islands
|
|
5782
|
-
// that stream in after this runs.
|
|
5783
|
-
|
|
5784
|
-
|
|
6035
|
+
// that stream in after this runs. Not cancelled by a navigation: an island it removes is
|
|
6036
|
+
// disposed with its DOM, and one in a layout it keeps still waits for its trigger.
|
|
6037
|
+
await hydrateFarmIsolatedClientBoundaries(${islandValues ? "document" : "rootContainer"});
|
|
5785
6038
|
// The rest of the document is static server HTML with nothing to hydrate, so
|
|
5786
6039
|
// stop holding its clicks and submits once the load-strategy islands are live.
|
|
5787
6040
|
// Deferred islands capture their own interactions, and held targets outside an
|