@farm.js/core 0.1.51-beta.3 → 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-7JSKGSOW.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
- package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
- package/dist/{agent-mcp.d-BJKChOrO.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
- package/dist/{agent-mcp.d-BAR9njbJ.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-OTPEWH5W.mjs → analyzer-22BEYV7S.mjs} +116 -13
- package/dist/{analyzer-TSQXZCZN.cjs → analyzer-LCSI3NSH.cjs} +123 -20
- 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-DEQNnNhV.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
- package/dist/{app-manifest.d-BLFbaqx8.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-CNPaUYaa.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
- package/dist/{app.d-CT7xDkj2.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
- package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
- package/dist/{chunk-OAMUSC7H.cjs → chunk-2FRLSDBT.cjs} +1 -1
- package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
- package/dist/{chunk-ZD2VKAUI.mjs → chunk-2KTYMMWT.mjs} +1 -1
- package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
- package/dist/{chunk-UQF3OJVE.mjs → chunk-37PYUEK5.mjs} +173 -29
- 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-7MD37P5V.cjs → chunk-4P23B7DU.cjs} +5 -5
- package/dist/{chunk-3BLEXUGE.mjs → chunk-55U5QIXQ.mjs} +1 -1
- package/dist/{chunk-TWHXBMLJ.cjs → chunk-5JNUYGNF.cjs} +4 -4
- package/dist/{chunk-53SACYBY.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-UJL4JOXV.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-4SEHMBL4.cjs → chunk-DPJ66FSI.cjs} +22 -22
- package/dist/{chunk-FFE2EMF7.cjs → chunk-DZPR2W6U.cjs} +5 -5
- package/dist/{chunk-3Z63X45F.mjs → chunk-E72UD6ME.mjs} +1 -1
- 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-5FXPJIOT.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
- package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
- package/dist/{chunk-3SMXQNFD.mjs → chunk-FORSVMEJ.mjs} +2 -2
- package/dist/{chunk-R4PHCZ3G.mjs → chunk-HPWB57PZ.mjs} +1 -1
- package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
- package/dist/{chunk-3XQ57EFI.cjs → chunk-IFXSBJPN.cjs} +16 -16
- package/dist/{chunk-3WSIYBMG.mjs → chunk-ILMTRGBG.mjs} +279 -48
- package/dist/{chunk-HLWOWZFX.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-YAJTD3ZG.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-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
- package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
- package/dist/{chunk-D7UQC4O6.cjs → chunk-LT4VAF5Z.cjs} +2 -2
- package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
- package/dist/{chunk-H33PJEXN.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-WGUHDWT5.cjs → chunk-MTWXOEI4.cjs} +527 -366
- package/dist/chunk-NHD7BAKD.mjs +1457 -0
- package/dist/{chunk-KLNFJDFM.cjs → chunk-NQJDO7K7.cjs} +31 -31
- package/dist/{chunk-TSFMFPRU.cjs → chunk-O27PLNQZ.cjs} +10 -10
- package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
- package/dist/{chunk-YUEYBL35.mjs → chunk-PCXIJKPM.mjs} +8 -8
- package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
- package/dist/{chunk-B3GM5I6N.cjs → chunk-PRFNLQSP.cjs} +4 -4
- package/dist/{chunk-46KXZBOG.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-4353ZRE5.mjs → chunk-SX7EECTS.mjs} +8 -5
- package/dist/{chunk-LDNSSHEG.mjs → chunk-T4TBK5NY.mjs} +2 -2
- package/dist/{chunk-NOTSHVRN.mjs → chunk-T7I62A4C.mjs} +293 -132
- package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
- package/dist/{chunk-4CGOMZP3.cjs → chunk-UDJY2ZGY.cjs} +487 -256
- package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
- package/dist/{chunk-TQMI6BYO.cjs → chunk-UYSTTPYJ.cjs} +1262 -936
- package/dist/{chunk-E5DXF5GE.mjs → chunk-UZZ6IEQP.mjs} +3 -3
- package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
- package/dist/{chunk-GAO7MS5O.mjs → chunk-VPTWKOCY.mjs} +19 -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-JXEPLIXD.cjs → chunk-XTG73QZA.cjs} +183 -39
- package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
- package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
- package/dist/{chunk-LPDKG6RA.mjs → chunk-YSXTNSXS.mjs} +1 -1
- package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
- package/dist/{chunk-3TLKUBXG.mjs → chunk-ZFUKPWFC.mjs} +912 -586
- package/dist/{chunk-4TKAIO2F.mjs → chunk-ZMHAFH4R.mjs} +8 -8
- package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
- package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
- package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
- package/dist/{chunk-MRNDAJEV.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
- package/dist/{client-plugins.d-DllmH8eM.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +10 -2
- package/dist/{client-plugins.d-n3iWY1EJ.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +10 -2
- 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-DqKaCr1r.d.ts → config.d-DqZkLwef.d.mts} +139 -1
- package/dist/{config.d-DqKaCr1r.d.mts → config.d-DqZkLwef.d.ts} +139 -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-UESYARTF.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
- package/dist/{devtools-TO6TAO32.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 +96 -96
- package/dist/{index.d-BXsAXm1U.d.ts → index.d-DlCELfhf.d.ts} +1 -1
- package/dist/{index.d-BL7KKiwa.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 -139
- 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 +50 -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 +49 -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 +94 -6
- package/dist/internal/config-runtime.d.ts +94 -6
- 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 +37 -101
- package/dist/internal/production-runtime.d.mts +17 -11
- package/dist/internal/production-runtime.d.ts +17 -11
- package/dist/internal/production-runtime.mjs +47 -111
- package/dist/markdown.cjs +5 -5
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +4 -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 +27 -5
- package/dist/mobile.d.ts +27 -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-EBPDFTRW.mjs → native-tree-VWNW2MQ2.mjs} +10 -8
- 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-C76gXTmO.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
- package/dist/{navigation-delegate.d-DIyDslxt.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 +42 -42
- package/dist/plugin.d.mts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.mjs +41 -41
- package/dist/port-C6GBH4C6.cjs +419 -0
- package/dist/port-WOOQ3V56.mjs +419 -0
- package/dist/{production-runtime.d-CDHztggO.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
- package/dist/{production-runtime.d-tyaGdbk6.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-XfmIrCK1.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-aAWiDd64.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-Dr5WRjoV.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
- package/dist/{render-plan.d-Diwybxo8.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-D01fRn--.d.ts → request.d-BiicaNxb.d.ts} +1 -1
- package/dist/{request.d-Dd3AFR79.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-BQ53lJ_D.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
- package/dist/{route-rendering.d-Bhx4QoJt.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
- package/dist/{router.d-DQ3k7EYn.d.ts → router.d-DjGn_al7.d.ts} +1 -1
- package/dist/{router.d-Bi23a6Xc.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
- package/dist/{routes.d-C7jMJFvP.d.ts → routes.d-BKSjHuH9.d.ts} +25 -2
- package/dist/{routes.d-BgTd7vI4.d.mts → routes.d-qd8Qf4LG.d.mts} +25 -2
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-OCZIT5OF.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
- package/dist/{rsc-pipeline-K3ER3Q4N.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
- package/dist/{runtime-DKNSIH7V.cjs → runtime-DGUOWSMF.cjs} +293 -41
- package/dist/{runtime-MKYDEUZT.mjs → runtime-HFZTVNFF.mjs} +283 -31
- package/dist/{runtime.d-B2Js6qZ2.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
- package/dist/{runtime.d-BL-CGwoi.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 +81 -81
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +64 -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-DqZ6Lfs0.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
- package/dist/{spa-router.d-B2rIFGs0.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-Bv2MPeLR.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
- package/dist/{utils.d-fqXe8lNc.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 +42 -42
- package/dist/vite.d.mts +10 -5
- package/dist/vite.d.ts +10 -5
- package/dist/vite.mjs +41 -41
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +17 -3
- package/dist/agent-mcp-handler-YE4AGWHN.cjs +0 -18
- package/dist/chunk-MIGFX2FN.mjs +0 -758
- package/dist/chunk-P6MHI5O2.cjs +0 -758
- package/dist/native-tree-MMZS7S6W.cjs +0 -25
- 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,7 @@ import {
|
|
|
61
64
|
parseFarmLayoutChainHeader,
|
|
62
65
|
renderFarmLocaleAlternateLinks,
|
|
63
66
|
stripRouteGroups
|
|
64
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-PCXIJKPM.mjs";
|
|
65
68
|
import {
|
|
66
69
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
67
70
|
} from "./chunk-LLZSYFOM.mjs";
|
|
@@ -82,10 +85,10 @@ import {
|
|
|
82
85
|
resolveFarmMCPRouteLabel,
|
|
83
86
|
resolveFarmMarkdownRouteLabel,
|
|
84
87
|
setFarmRouteLabel
|
|
85
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-ZMHAFH4R.mjs";
|
|
86
89
|
import {
|
|
87
90
|
FARM_DEFAULT_MCP_PATH
|
|
88
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-UZZ6IEQP.mjs";
|
|
89
92
|
import {
|
|
90
93
|
resolveFarmLayoutFonts
|
|
91
94
|
} from "./chunk-HZOMT5DY.mjs";
|
|
@@ -97,11 +100,6 @@ import {
|
|
|
97
100
|
programmaticClientRouteKey,
|
|
98
101
|
resolveFarmBrowserBuiltin
|
|
99
102
|
} from "./chunk-ZQ5BDNKW.mjs";
|
|
100
|
-
import {
|
|
101
|
-
createFarmMarkdownSourceResponse,
|
|
102
|
-
isFarmMarkdownPageFile,
|
|
103
|
-
normalizeFarmMarkdownRoutePath
|
|
104
|
-
} from "./chunk-3Z63X45F.mjs";
|
|
105
103
|
import {
|
|
106
104
|
generateFarmDocsAdapterClientRuntime,
|
|
107
105
|
getFarmDocsAdapterConfigModule
|
|
@@ -132,10 +130,15 @@ import {
|
|
|
132
130
|
FARM_PREVIEW_ROBOTS_TAG,
|
|
133
131
|
resolveFarmAgentCrawlers,
|
|
134
132
|
resolveFarmAgentSitemap
|
|
135
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-T4TBK5NY.mjs";
|
|
136
134
|
import {
|
|
137
135
|
resolveFarmLlmsTxtConfig
|
|
138
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-KVW2M6PI.mjs";
|
|
137
|
+
import {
|
|
138
|
+
getFarmAppDirectories,
|
|
139
|
+
getFarmLayerAliases,
|
|
140
|
+
getFarmSourceRoots
|
|
141
|
+
} from "./chunk-52Y3C3HG.mjs";
|
|
139
142
|
import {
|
|
140
143
|
getPublicFarmImageConfig,
|
|
141
144
|
resolveFarmImageConfig
|
|
@@ -144,10 +147,10 @@ import {
|
|
|
144
147
|
createBundledEnv
|
|
145
148
|
} from "./chunk-N33DLJBC.mjs";
|
|
146
149
|
import {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
createFarmMarkdownSourceResponse,
|
|
151
|
+
isFarmMarkdownPageFile,
|
|
152
|
+
normalizeFarmMarkdownRoutePath
|
|
153
|
+
} from "./chunk-E72UD6ME.mjs";
|
|
151
154
|
import {
|
|
152
155
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
153
156
|
createFarmMarkdownErrorBody,
|
|
@@ -156,7 +159,7 @@ import {
|
|
|
156
159
|
getFarmMarkdownAlternatePath,
|
|
157
160
|
getFarmMarkdownMirrorPath,
|
|
158
161
|
resolveMarkdownMirrorTarget
|
|
159
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-YSXTNSXS.mjs";
|
|
160
163
|
import {
|
|
161
164
|
resolveFarmRouteContext,
|
|
162
165
|
withFarmRouteContext
|
|
@@ -167,10 +170,10 @@ import {
|
|
|
167
170
|
getIntegrationDocumentNavigationMatchers,
|
|
168
171
|
getIntegrationProviders,
|
|
169
172
|
matchIntegrationRoute
|
|
170
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-IFHPDLIS.mjs";
|
|
171
174
|
import {
|
|
172
175
|
MiddlewareManager
|
|
173
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-A2MN5PQJ.mjs";
|
|
174
177
|
import {
|
|
175
178
|
_runWithMiddlewareContext,
|
|
176
179
|
_runWithMiddlewareData
|
|
@@ -186,7 +189,7 @@ import {
|
|
|
186
189
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
187
190
|
import {
|
|
188
191
|
APIRouteManager
|
|
189
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-BHJAYPYU.mjs";
|
|
190
193
|
import {
|
|
191
194
|
getFarmI18nClientSnapshot
|
|
192
195
|
} from "./chunk-CV6MFQ4Y.mjs";
|
|
@@ -196,10 +199,10 @@ import {
|
|
|
196
199
|
} from "./chunk-NR63PD3P.mjs";
|
|
197
200
|
import {
|
|
198
201
|
isFarmAPIPathname
|
|
199
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-RPUJHJHE.mjs";
|
|
200
203
|
import {
|
|
201
204
|
registerFarmMCPServer
|
|
202
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-C7GJDVN4.mjs";
|
|
203
206
|
import {
|
|
204
207
|
isProgrammaticRoutesFileName,
|
|
205
208
|
parseProgrammaticRouteModuleId,
|
|
@@ -221,7 +224,7 @@ import {
|
|
|
221
224
|
logger,
|
|
222
225
|
toPosixPath,
|
|
223
226
|
toViteModuleId
|
|
224
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-JSDV2NUN.mjs";
|
|
225
228
|
import {
|
|
226
229
|
createFarmSearchParams,
|
|
227
230
|
searchParamsToObject
|
|
@@ -235,6 +238,9 @@ import {
|
|
|
235
238
|
fetchFarmExternalRewrite,
|
|
236
239
|
sendWebResponse
|
|
237
240
|
} from "./chunk-CO6UYM2D.mjs";
|
|
241
|
+
import {
|
|
242
|
+
resolveFarmAPIServerBasePath
|
|
243
|
+
} from "./chunk-2I6PUKWJ.mjs";
|
|
238
244
|
import {
|
|
239
245
|
createFarmNodeRequestAbortSignal,
|
|
240
246
|
createFarmNodeRequestBodyStream,
|
|
@@ -242,15 +248,12 @@ import {
|
|
|
242
248
|
readNodeRequestBody,
|
|
243
249
|
resolveFarmServerConfig
|
|
244
250
|
} from "./chunk-GFT5AHAT.mjs";
|
|
245
|
-
import {
|
|
246
|
-
resolveFarmAPIServerBasePath
|
|
247
|
-
} from "./chunk-LM2YOGDK.mjs";
|
|
248
251
|
import {
|
|
249
252
|
FARM_VERSION
|
|
250
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-HPWB57PZ.mjs";
|
|
251
254
|
import {
|
|
252
255
|
DEFAULT_FARM_API_BASE_PATH
|
|
253
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-W6QLRQ3V.mjs";
|
|
254
257
|
import {
|
|
255
258
|
addMetadataMarkdownAlternate,
|
|
256
259
|
mergeMetadata,
|
|
@@ -768,7 +771,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
768
771
|
return import("./workflows.mjs");
|
|
769
772
|
}
|
|
770
773
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
771
|
-
return import("./devtools-
|
|
774
|
+
return import("./devtools-KQZ6SRCJ.mjs");
|
|
772
775
|
}
|
|
773
776
|
function loadFarmDevtoolsUIRuntime() {
|
|
774
777
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -1255,7 +1258,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1255
1258
|
const wrapperName = `__farm_isolated_boundary_${safeName || "default"}__`;
|
|
1256
1259
|
wrapperStatements.push(
|
|
1257
1260
|
// Islands mode renders through islx; the older isolated hydration keeps Farm's boundary.
|
|
1258
|
-
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)});`
|
|
1259
1262
|
);
|
|
1260
1263
|
wrapperStatements.push(
|
|
1261
1264
|
isDefault ? `export default ${wrapperName};` : `export { ${wrapperName} as ${exportName} };`
|
|
@@ -2338,7 +2341,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2338
2341
|
}
|
|
2339
2342
|
}
|
|
2340
2343
|
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD") && req.headers.accept?.includes(FARM_NATIVE_TREE_CONTENT_TYPE)) {
|
|
2341
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
2344
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-VWNW2MQ2.mjs");
|
|
2342
2345
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
2343
2346
|
request: new Request(fullUrl, { method: requestMethod, headers: docsHeaders }),
|
|
2344
2347
|
// As for the Markdown mirror: this server's own listener, redirects not followed.
|
|
@@ -2928,9 +2931,22 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2928
2931
|
(metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
|
|
2929
2932
|
)
|
|
2930
2933
|
];
|
|
2931
|
-
const hydrationIslandStrategy =
|
|
2932
|
-
(
|
|
2933
|
-
)
|
|
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";
|
|
2934
2950
|
const targetUrl = new URL(targetPath, "http://localhost");
|
|
2935
2951
|
const searchParams = searchParamsToObject(targetUrl.searchParams);
|
|
2936
2952
|
const routeContext = await resolveFarmRouteContext(farmApp.getConfig(), {
|
|
@@ -3339,7 +3355,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3339
3355
|
if (parseProgrammaticRouteModuleId(id)) {
|
|
3340
3356
|
return id;
|
|
3341
3357
|
}
|
|
3342
|
-
if (isFarmClientVirtualId(id)) {
|
|
3358
|
+
if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
|
|
3343
3359
|
return id;
|
|
3344
3360
|
}
|
|
3345
3361
|
if (id === "/@farm/server") {
|
|
@@ -3378,6 +3394,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3378
3394
|
}
|
|
3379
3395
|
return generateProgrammaticRouteModule(id, root, renderer);
|
|
3380
3396
|
}
|
|
3397
|
+
if (id === FARM_DEV_CLIENT_BOOT_ID) {
|
|
3398
|
+
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
3399
|
+
}
|
|
3381
3400
|
if (isFarmClientVirtualId(id)) {
|
|
3382
3401
|
const resolvedConfig = farmApp?.getConfig();
|
|
3383
3402
|
const renderer = resolvedConfig?.renderer || resolveFarmRenderer(options.renderer);
|
|
@@ -3596,12 +3615,22 @@ export const manifest = getManifest();
|
|
|
3596
3615
|
const selectedForIsolatedHydration = selectedIsolatedModules?.has(path5.resolve(cleanId)) === true;
|
|
3597
3616
|
if (isReactRenderer(resolveFarmRenderer(currentConfig.renderer)) && selectedForIsolatedHydration && isIsolatableClientBoundarySource(clientBoundarySource)) {
|
|
3598
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
|
+
}
|
|
3599
3627
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
3600
3628
|
code: transformedCode,
|
|
3601
3629
|
moduleReference: isolatedModuleReference,
|
|
3602
|
-
islandStrategy:
|
|
3630
|
+
islandStrategy: explicitStrategy ?? "load",
|
|
3603
3631
|
parse: (source) => this.parse(source),
|
|
3604
|
-
slots:
|
|
3632
|
+
slots: islandsMode,
|
|
3633
|
+
inferredInteraction: inference?.strategy === "interaction"
|
|
3605
3634
|
});
|
|
3606
3635
|
if (!transformedBoundary) {
|
|
3607
3636
|
this.error(
|
|
@@ -3783,6 +3812,12 @@ if (import.meta.hot) {
|
|
|
3783
3812
|
});
|
|
3784
3813
|
}
|
|
3785
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
|
+
}
|
|
3786
3821
|
const currentFarmConfig = farmApp?.getConfig();
|
|
3787
3822
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
3788
3823
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && getFarmAppDirectories(currentFarmConfig).some(
|
|
@@ -3935,6 +3970,15 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
|
|
|
3935
3970
|
}
|
|
3936
3971
|
return farmRoot;
|
|
3937
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';
|
|
3938
3982
|
function isFarmClientVirtualId(id) {
|
|
3939
3983
|
const pathname = id.split("?", 1)[0];
|
|
3940
3984
|
return pathname === "/@farm/client" || pathname === "/@farm/client.js";
|
|
@@ -4387,6 +4431,7 @@ import {
|
|
|
4387
4431
|
createFarmDeploymentRequestHeaders,
|
|
4388
4432
|
isFarmDeploymentMismatchResponse,
|
|
4389
4433
|
} from '@farm.js/core/deployment'
|
|
4434
|
+
${islandValues ? "import { getFarmIslandValueHeaders } from '@farm.js/core/internal/client-runtime'" : ""}
|
|
4390
4435
|
${providerClientCode.imports}
|
|
4391
4436
|
${clientPluginEntry.imports}
|
|
4392
4437
|
|
|
@@ -4853,6 +4898,7 @@ class LegacyManifestSPARouter {
|
|
|
4853
4898
|
// Initialize the SPA router
|
|
4854
4899
|
const spaRouter = new SPARouter({
|
|
4855
4900
|
shouldUseDocumentNavigation: matchesDocumentNavigation,
|
|
4901
|
+
${islandValues ? "fetchNavigationDocument: fetchFarmNavigationDocument," : ""}
|
|
4856
4902
|
});
|
|
4857
4903
|
window.__FARM_SPA_ROUTER__ = spaRouter;
|
|
4858
4904
|
|
|
@@ -5471,7 +5517,14 @@ function parseNavigationFragment(html) {
|
|
|
5471
5517
|
return template.content;
|
|
5472
5518
|
}
|
|
5473
5519
|
|
|
5474
|
-
function replaceNavigationBoundary(
|
|
5520
|
+
function replaceNavigationBoundary(
|
|
5521
|
+
container,
|
|
5522
|
+
fragment,
|
|
5523
|
+
currentPatterns,
|
|
5524
|
+
nextPatterns,
|
|
5525
|
+
refresh = false,
|
|
5526
|
+
find = findLayoutBoundary,
|
|
5527
|
+
) {
|
|
5475
5528
|
let sharedCount = 0;
|
|
5476
5529
|
while (
|
|
5477
5530
|
sharedCount < currentPatterns.length &&
|
|
@@ -5482,13 +5535,13 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
|
|
|
5482
5535
|
}
|
|
5483
5536
|
|
|
5484
5537
|
const fragmentTreeRoot = nextPatterns.length > 0
|
|
5485
|
-
?
|
|
5538
|
+
? find(fragment, nextPatterns[0])
|
|
5486
5539
|
: fragment.querySelector('#__farm_page__');
|
|
5487
5540
|
const currentTarget = sharedCount < currentPatterns.length
|
|
5488
|
-
?
|
|
5541
|
+
? find(container, currentPatterns[sharedCount])
|
|
5489
5542
|
: container.querySelector('#__farm_page__');
|
|
5490
5543
|
const nextTarget = sharedCount < nextPatterns.length
|
|
5491
|
-
?
|
|
5544
|
+
? find(fragment, nextPatterns[sharedCount])
|
|
5492
5545
|
: fragment.querySelector('#__farm_page__');
|
|
5493
5546
|
|
|
5494
5547
|
if (!currentTarget || !nextTarget) {
|
|
@@ -5519,6 +5572,184 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
|
|
|
5519
5572
|
return nextTarget;
|
|
5520
5573
|
}
|
|
5521
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
|
+
|
|
5522
5753
|
let activeLayoutPatterns = readActiveLayoutPatterns();
|
|
5523
5754
|
let activeLayoutShouldHydrate = window.__FARM_LAYOUT_SHOULD_HYDRATE__ === true;
|
|
5524
5755
|
|
|
@@ -5528,6 +5759,7 @@ async function renderPage(pageData, info) {
|
|
|
5528
5759
|
const container = document.getElementById('root');
|
|
5529
5760
|
if (!container) return;
|
|
5530
5761
|
cancelPendingPageHydration();
|
|
5762
|
+
${islandValues ? "const farmStreamGeneration = ++farmNavigationStreamGeneration;" : ""}
|
|
5531
5763
|
const destination = window.location.pathname + window.location.search;
|
|
5532
5764
|
|
|
5533
5765
|
if (pageData.interception) {
|
|
@@ -5657,7 +5889,7 @@ async function renderPage(pageData, info) {
|
|
|
5657
5889
|
if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
|
|
5658
5890
|
if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
|
|
5659
5891
|
delete window.__FARM_REACT_ROOT__;
|
|
5660
|
-
${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);"}
|
|
5661
5893
|
}
|
|
5662
5894
|
|
|
5663
5895
|
const hydrationController = new AbortController();
|
|
@@ -5712,6 +5944,7 @@ async function renderPage(pageData, info) {
|
|
|
5712
5944
|
activeLayoutPatterns = layoutPatterns;
|
|
5713
5945
|
activeLayoutShouldHydrate = layoutShouldHydrate;
|
|
5714
5946
|
window.__FARM_LOADING_MODULE__ = route.loadingModulePath || null;
|
|
5947
|
+
${islandValues ? "if (pageData.farmDocument?.stream) void streamFarmDevNavigation(pageData.farmDocument.stream, container, farmStreamGeneration);" : ""}
|
|
5715
5948
|
return true;
|
|
5716
5949
|
};
|
|
5717
5950
|
|
|
@@ -5798,12 +6031,10 @@ function farmIslandsOnlyDocument() {
|
|
|
5798
6031
|
(window.__FARM_SHOULD_HYDRATE__ === true || pageShouldHydrate || layoutShouldHydrate);
|
|
5799
6032
|
const hydratedSlots = await hydrateInitialRouteSlots();
|
|
5800
6033
|
${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries && !pageShouldHydrate && !layoutShouldHydrate) {
|
|
5801
|
-
const hydrationController = new AbortController();
|
|
5802
|
-
pendingPageHydrationController = hydrationController;
|
|
5803
6034
|
// Islands mode hydrates the document, as production does, so islx also watches the islands
|
|
5804
|
-
// that stream in after this runs.
|
|
5805
|
-
|
|
5806
|
-
|
|
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"});
|
|
5807
6038
|
// The rest of the document is static server HTML with nothing to hydrate, so
|
|
5808
6039
|
// stop holding its clicks and submits once the load-strategy islands are live.
|
|
5809
6040
|
// Deferred islands capture their own interactions, and held targets outside an
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkVVTJTMGQcjs = require('./chunk-VVTJTMGQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkXVSBALOYcjs = require('./chunk-XVSBALOY.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkNQJDO7K7cjs = require('./chunk-NQJDO7K7.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunk65Y5SIBHcjs = require('./chunk-65Y5SIBH.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
@@ -54,7 +54,7 @@ function pickImportTarget(entry) {
|
|
|
54
54
|
return void 0;
|
|
55
55
|
}
|
|
56
56
|
async function importFromApp(root, packageName, subpath = ".") {
|
|
57
|
-
const packageDir =
|
|
57
|
+
const packageDir = _chunkVVTJTMGQcjs.findFarmAppPackageDir.call(void 0, root, packageName);
|
|
58
58
|
if (!packageDir) return void 0;
|
|
59
59
|
const manifest = JSON.parse(_fs.readFileSync.call(void 0, _path2.default.join(packageDir, "package.json"), "utf8"));
|
|
60
60
|
const exportsMap = manifest.exports;
|
|
@@ -81,9 +81,9 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
81
81
|
importFromApp(root, "@vitejs/plugin-rsc"),
|
|
82
82
|
importFromApp(root, "@vitejs/plugin-react")
|
|
83
83
|
]);
|
|
84
|
-
if (!pluginRsc || !viteRsc || !
|
|
84
|
+
if (!pluginRsc || !viteRsc || !_chunkVVTJTMGQcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
|
|
85
85
|
throw new Error(
|
|
86
|
-
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${
|
|
86
|
+
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${_chunkVVTJTMGQcjs.FARM_RSC_INSTALL_HINT}`
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
const { plugins: vitePlugins = [], ...viteOptions } = _nullishCoalesce(userConfig.vite, () => ( {}));
|
|
@@ -92,13 +92,16 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
92
92
|
if (userConfig[key] !== void 0) rscConfig[key] = userConfig[key];
|
|
93
93
|
}
|
|
94
94
|
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _2 => _2.default]), async () => ( (options.command === "serve" ? (await _chunk65Y5SIBHcjs.loadFarmReactPlugin.call(void 0, )).default : void 0)));
|
|
95
|
-
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await
|
|
95
|
+
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await _chunkR53QDV6Tcjs.loadTailwindVitePlugin.call(void 0, );
|
|
96
|
+
const platform = _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, );
|
|
97
|
+
const mobileClient = userConfig.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
|
|
96
98
|
const farmConfig = pluginRsc.defineConfig({
|
|
97
99
|
...rscConfig,
|
|
100
|
+
...mobileClient ? { mobileClient } : {},
|
|
98
101
|
experimental: { ...userConfig.experimental, serverComponents: true },
|
|
99
102
|
port: _nullishCoalesce(options.port, () => ( _optionalChain([userConfig, 'access', _3 => _3.server, 'optionalAccess', _4 => _4.port]))),
|
|
100
103
|
plugins: [
|
|
101
|
-
...options.command === "serve" &&
|
|
104
|
+
...options.command === "serve" && platform === "desktop" ? [
|
|
102
105
|
_chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0,
|
|
103
106
|
typeof userConfig.basePath === "string" ? userConfig.basePath : void 0
|
|
104
107
|
)
|
|
@@ -111,7 +114,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
111
114
|
server: { environmentName: "rsc" },
|
|
112
115
|
config: {
|
|
113
116
|
preset: options.preset,
|
|
114
|
-
outputDir: options.outputDir &&
|
|
117
|
+
outputDir: options.outputDir && _chunkNQJDO7K7cjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
115
118
|
}
|
|
116
119
|
})
|
|
117
120
|
]
|
|
@@ -134,7 +137,7 @@ async function createFarmRscDevServer(userConfig, options) {
|
|
|
134
137
|
const config = await createFarmRscViteConfig(userConfig, { ...configOptions, command: "serve" });
|
|
135
138
|
return createServer({
|
|
136
139
|
...config,
|
|
137
|
-
plugins: [..._nullishCoalesce(config.plugins, () => ( [])),
|
|
140
|
+
plugins: [..._nullishCoalesce(config.plugins, () => ( [])), _chunkXVSBALOYcjs.createFarmDevLoopbackPlugin.call(void 0, )],
|
|
138
141
|
...host === void 0 ? {} : { server: { ...config.server, host } }
|
|
139
142
|
});
|
|
140
143
|
}
|