@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
|
@@ -7,7 +7,7 @@ var _chunkPZXYAWYGcjs = require('./chunk-PZXYAWYG.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk3OJNNCDLcjs = require('./chunk-3OJNNCDL.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkEOXPRC2Ccjs = require('./chunk-EOXPRC2C.cjs');
|
|
@@ -143,9 +143,9 @@ function useMutationLifecycle(target, options = {}) {
|
|
|
143
143
|
};
|
|
144
144
|
});
|
|
145
145
|
const mutationTarget = targetRef.current;
|
|
146
|
-
const isAPITarget =
|
|
146
|
+
const isAPITarget = _chunk3OJNNCDLcjs.isAPIRouteRef.call(void 0, mutationTarget);
|
|
147
147
|
const sharedOptimistic = !preparationFailed && !isAPITarget ? _optionalChain([currentOptions, 'access', _3 => _3.request, 'optionalAccess', _4 => _4.optimistic]) : void 0;
|
|
148
|
-
const sharedSnapshots = _optionalChain([sharedOptimistic, 'optionalAccess', _5 => _5.update, 'optionalAccess', _6 => _6.length]) ?
|
|
148
|
+
const sharedSnapshots = _optionalChain([sharedOptimistic, 'optionalAccess', _5 => _5.update, 'optionalAccess', _6 => _6.length]) ? _chunk3OJNNCDLcjs.applyServerFnOptimisticUpdates.call(void 0, sharedOptimistic.update) : [];
|
|
149
149
|
try {
|
|
150
150
|
if (preparationFailed) throw preparationError;
|
|
151
151
|
let data;
|
|
@@ -172,9 +172,9 @@ function useMutationLifecycle(target, options = {}) {
|
|
|
172
172
|
throw cause;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
_chunk3OJNNCDLcjs.settleServerFnOptimisticUpdates.call(void 0, sharedSnapshots, "commit");
|
|
176
176
|
if (!isAPITarget && _optionalChain([currentOptions, 'access', _9 => _9.request, 'optionalAccess', _10 => _10.invalidate])) {
|
|
177
|
-
for (const key of
|
|
177
|
+
for (const key of _chunk3OJNNCDLcjs.resolveServerFnInvalidateTargets.call(void 0, currentOptions.request.invalidate)) {
|
|
178
178
|
_chunkUZCMMJJTcjs.notifyFarmCacheInvalidation.call(void 0, key);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
@@ -209,7 +209,7 @@ function useMutationLifecycle(target, options = {}) {
|
|
|
209
209
|
}
|
|
210
210
|
return data;
|
|
211
211
|
} catch (cause) {
|
|
212
|
-
|
|
212
|
+
_chunk3OJNNCDLcjs.settleServerFnOptimisticUpdates.call(void 0,
|
|
213
213
|
sharedSnapshots,
|
|
214
214
|
_optionalChain([sharedOptimistic, 'optionalAccess', _11 => _11.rollbackOnError]) ? "rollback" : "invalidate"
|
|
215
215
|
);
|
|
@@ -379,7 +379,7 @@ function useFetcher(target, options = {}) {
|
|
|
379
379
|
const Form = _react.useMemo.call(void 0, () => {
|
|
380
380
|
const FetcherForm = ({ action, method, encType, onSubmit, ...props }) => {
|
|
381
381
|
const targetValue = targetRef.current;
|
|
382
|
-
const metadata =
|
|
382
|
+
const metadata = _chunk3OJNNCDLcjs.getAPIRouteRefMetadata.call(void 0, targetValue);
|
|
383
383
|
const nativeAction = _nullishCoalesce(action, () => ( resolveFetcherFormAction(targetValue, metadata)));
|
|
384
384
|
const nativeMethod = _nullishCoalesce(method, () => ( (metadata && (metadata.method === "GET" || metadata.method === "POST") ? metadata.method.toLowerCase() : metadata ? "post" : void 0)));
|
|
385
385
|
const functionAction = typeof nativeAction === "function";
|
|
@@ -447,10 +447,10 @@ function mapFetcherFormData(target, formData, options) {
|
|
|
447
447
|
if (options.mapFormData) {
|
|
448
448
|
return options.mapFormData(formData, context);
|
|
449
449
|
}
|
|
450
|
-
if (!
|
|
450
|
+
if (!_chunk3OJNNCDLcjs.isAPIRouteRef.call(void 0, target)) {
|
|
451
451
|
return formData;
|
|
452
452
|
}
|
|
453
|
-
const method = _optionalChain([
|
|
453
|
+
const method = _optionalChain([_chunk3OJNNCDLcjs.getAPIRouteRefMetadata.call(void 0, target), 'optionalAccess', _14 => _14.method]);
|
|
454
454
|
const query = method === "GET" || method === "HEAD";
|
|
455
455
|
const encoding = _nullishCoalesce(_optionalChain([context, 'access', _15 => _15.submitter, 'optionalAccess', _16 => _16.getAttribute, 'call', _17 => _17("formenctype")]), () => ( _optionalChain([context, 'access', _18 => _18.form, 'optionalAccess', _19 => _19.enctype])));
|
|
456
456
|
if (!query && (_optionalChain([encoding, 'optionalAccess', _20 => _20.toLowerCase, 'call', _21 => _21()]) === "multipart/form-data" || Array.from(formData.values()).some((value) => typeof value !== "string"))) {
|
|
@@ -1352,6 +1352,7 @@ LinkWithRef.displayName = "Link";
|
|
|
1352
1352
|
var Link = LinkWithRef;
|
|
1353
1353
|
function resolveLinkHref(href, params, options) {
|
|
1354
1354
|
if (isExternalUrl(href)) return href;
|
|
1355
|
+
if (href.startsWith("#") && !params && !options.query && options.hash === void 0) return href;
|
|
1355
1356
|
const { pathname, query, hash } = splitInternalHref(href);
|
|
1356
1357
|
const resolvedHref = _chunk53EHWHT2cjs.buildFarmRoutePath.call(void 0, pathname, params, {
|
|
1357
1358
|
query: mergeQueryParams(query, options.query),
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-ES2LD2YD.mjs";
|
|
7
7
|
import {
|
|
8
8
|
parseRouteSlotFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K3RU5MOR.mjs";
|
|
10
10
|
import {
|
|
11
11
|
discoverProgrammaticRoutePaths
|
|
12
12
|
} from "./chunk-FSXSQQTV.mjs";
|
|
13
13
|
import {
|
|
14
14
|
parseRoutePath
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JSDV2NUN.mjs";
|
|
16
16
|
|
|
17
17
|
// src/routing/generate-route-types.ts
|
|
18
18
|
import * as path from "path";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQAS7KE7Jcjs = require('./chunk-QAS7KE7J.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkSG57PX7Kcjs = require('./chunk-SG57PX7K.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkLRB5OVRTcjs = require('./chunk-LRB5OVRT.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunk2FRLSDBTcjs = require('./chunk-2FRLSDBT.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -39,8 +39,8 @@ var CARD_DESCRIPTION_MAX = 100;
|
|
|
39
39
|
var REVERSE_DNS_NAME = /^[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+$/;
|
|
40
40
|
function listFarmMCPServerSources(input) {
|
|
41
41
|
const sources = /* @__PURE__ */ new Map();
|
|
42
|
-
for (const { server, details } of
|
|
43
|
-
const endpoint =
|
|
42
|
+
for (const { server, details } of _chunkLRB5OVRTcjs._listFarmMCPCatalogs.call(void 0, )) {
|
|
43
|
+
const endpoint = _chunk2OF5RPVUcjs.resolveFarmAPIServerRoutePath.call(void 0, server.path, input.apiServerBasePath);
|
|
44
44
|
if (sources.has(endpoint)) continue;
|
|
45
45
|
sources.set(endpoint, {
|
|
46
46
|
...server,
|
|
@@ -49,7 +49,7 @@ function listFarmMCPServerSources(input) {
|
|
|
49
49
|
local: true
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
for (const server of
|
|
52
|
+
for (const server of _chunkLRB5OVRTcjs._listFarmRegisteredMCPServers.call(void 0, )) {
|
|
53
53
|
const endpoint = server.path ? _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, server.path, input.basePath) : server.url;
|
|
54
54
|
if (sources.has(endpoint)) continue;
|
|
55
55
|
sources.set(endpoint, { ...server, endpoint, local: Boolean(server.path) });
|
|
@@ -159,7 +159,7 @@ function createFarmAiCatalogResponse(request, input = {}, requestUrl) {
|
|
|
159
159
|
if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
|
|
160
160
|
return new Response(null, { status: 304, headers });
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
_chunkLT4VAF5Zcjs.emitFarmAgentRead.call(void 0, request, card ? "mcp-server-card" : "ai-catalog", 200);
|
|
163
163
|
return new Response(method === "HEAD" ? null : body, { status: 200, headers });
|
|
164
164
|
}
|
|
165
165
|
function corsHeaders() {
|
|
@@ -191,9 +191,9 @@ function resolveFarmApiCatalogInput(config) {
|
|
|
191
191
|
basePath: config.basePath,
|
|
192
192
|
apiBaseURL: _nullishCoalesce(_optionalChain([config, 'access', _7 => _7.openapi, 'optionalAccess', _8 => _8.servers, 'optionalAccess', _9 => _9[0], 'optionalAccess', _10 => _10.url]), () => ( config.api.baseURL)),
|
|
193
193
|
openapi: _optionalChain([config, 'access', _11 => _11.openapi, 'optionalAccess', _12 => _12.enabled]) ? { specRoute: config.openapi.specRoute, route: config.openapi.route } : void 0,
|
|
194
|
-
mcpPath: mcp ?
|
|
194
|
+
mcpPath: mcp ? _chunk2OF5RPVUcjs.resolveFarmAPIServerRoutePath.call(void 0,
|
|
195
195
|
_nullishCoalesce(mcp.path, () => ( "/api/mcp")),
|
|
196
|
-
|
|
196
|
+
_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
|
|
197
197
|
) : void 0
|
|
198
198
|
};
|
|
199
199
|
}
|
|
@@ -227,7 +227,7 @@ function createFarmApiCatalogResponse(method, input, request) {
|
|
|
227
227
|
headers: { Allow: "GET, HEAD", "Content-Type": "text/plain; charset=utf-8" }
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
if (request)
|
|
230
|
+
if (request) _chunkLT4VAF5Zcjs.emitFarmAgentRead.call(void 0, request, "api-catalog", 200);
|
|
231
231
|
const catalog = createFarmApiCatalog(input);
|
|
232
232
|
return new Response(upperMethod === "HEAD" ? null : JSON.stringify(catalog), {
|
|
233
233
|
status: 200,
|
|
@@ -282,7 +282,7 @@ function createFarmAppManifest(input) {
|
|
|
282
282
|
return {
|
|
283
283
|
schemaVersion: 1,
|
|
284
284
|
app: app ? {
|
|
285
|
-
...app.version ? { farm:
|
|
285
|
+
...app.version ? { farm: _chunk2FRLSDBTcjs.FARM_VERSION } : {},
|
|
286
286
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
287
287
|
basePath: input.basePath,
|
|
288
288
|
...app.build ? { build: input.build } : {}
|
|
@@ -299,7 +299,7 @@ function createFarmAppManifest(input) {
|
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
301
|
function listServers(input, mcp) {
|
|
302
|
-
const servers =
|
|
302
|
+
const servers = _chunkLRB5OVRTcjs._listFarmMCPCatalogs.call(void 0, ).map(({ server, tools, details }) => {
|
|
303
303
|
const open = _optionalChain([details, 'optionalAccess', _29 => _29.public]) === true && !_optionalChain([input, 'access', _30 => _30.guardCoversPath, 'optionalCall', _31 => _31(server.path)]);
|
|
304
304
|
return {
|
|
305
305
|
name: server.name,
|
|
@@ -348,7 +348,7 @@ function listDefaultServer(input) {
|
|
|
348
348
|
authorization: "none",
|
|
349
349
|
resources: [],
|
|
350
350
|
prompts: [],
|
|
351
|
-
tools:
|
|
351
|
+
tools: _chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_TOOLS.map((tool) => ({
|
|
352
352
|
name: tool.name,
|
|
353
353
|
title: tool.title,
|
|
354
354
|
description: tool.description,
|
|
@@ -408,7 +408,7 @@ function listFarmBuiltInRoutePaths(input) {
|
|
|
408
408
|
...agent.manifest !== false ? [FARM_APP_MANIFEST_PATH, FARM_APP_MANIFEST_LEGACY_PATH] : [],
|
|
409
409
|
...agent.apiCatalog ? [FARM_API_CATALOG_PATH] : [],
|
|
410
410
|
...agent.aiCatalog !== false ? [FARM_AI_CATALOG_PATH, FARM_ARD_PATH] : [],
|
|
411
|
-
...agent.mcp === true ? [
|
|
411
|
+
...agent.mcp === true ? [_chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH, `${_chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH}${FARM_MCP_SERVER_CARD_SUFFIX}`] : [],
|
|
412
412
|
..._optionalChain([agent, 'access', _39 => _39.llmsTxt, 'optionalAccess', _40 => _40.enabled]) ? ["/llms.txt"] : [],
|
|
413
413
|
..._optionalChain([agent, 'access', _41 => _41.llmsTxt, 'optionalAccess', _42 => _42.enabled]) && agent.llmsTxt.full ? ["/llms-full.txt"] : [],
|
|
414
414
|
..._optionalChain([agent, 'access', _43 => _43.sitemap, 'optionalAccess', _44 => _44.enabled]) ? ["/sitemap.xml"] : [],
|
|
@@ -423,11 +423,11 @@ function normalize(pathname) {
|
|
|
423
423
|
function resolveFarmMCPRouteLabel(routePathname, apiServerBasePath) {
|
|
424
424
|
const pathname = normalize(routePathname);
|
|
425
425
|
const endpoints = [];
|
|
426
|
-
for (const server of
|
|
426
|
+
for (const server of _chunkLRB5OVRTcjs._listFarmRegisteredMCPServers.call(void 0, )) {
|
|
427
427
|
if (server.path) endpoints.push(server.path);
|
|
428
428
|
}
|
|
429
|
-
for (const { server } of
|
|
430
|
-
endpoints.push(
|
|
429
|
+
for (const { server } of _chunkLRB5OVRTcjs._listFarmMCPCatalogs.call(void 0, )) {
|
|
430
|
+
endpoints.push(_chunk2OF5RPVUcjs.resolveFarmAPIServerRoutePath.call(void 0, server.path, apiServerBasePath));
|
|
431
431
|
}
|
|
432
432
|
for (const endpoint of endpoints) {
|
|
433
433
|
const path = normalize(endpoint);
|
|
@@ -447,7 +447,7 @@ function resolveFarmDocsRouteLabel(routePathname, docs) {
|
|
|
447
447
|
for (const entry of entries) {
|
|
448
448
|
const base = entry === "/" ? "" : entry;
|
|
449
449
|
if (page === entry || entry === "/" && page === "/index") {
|
|
450
|
-
return markdown ?
|
|
450
|
+
return markdown ? _chunkLT4VAF5Zcjs.getFarmMarkdownMirrorPath.call(void 0, entry) : entry;
|
|
451
451
|
}
|
|
452
452
|
if (page.startsWith(`${base}/`)) return `${base}/[...slug]${markdown ? ".md" : ""}`;
|
|
453
453
|
}
|
|
@@ -467,7 +467,7 @@ function resolveFarmMarkdownRouteLabel(routePathname, matchPagePattern) {
|
|
|
467
467
|
if (!routePathname.toLowerCase().endsWith(".md")) return null;
|
|
468
468
|
const page = routePathname === "/index.md" ? "/" : routePathname.slice(0, -".md".length) || "/";
|
|
469
469
|
const pattern = matchPagePattern(page);
|
|
470
|
-
return pattern ?
|
|
470
|
+
return pattern ? _chunkLT4VAF5Zcjs.getFarmMarkdownMirrorPath.call(void 0, pattern) : null;
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkMEQN6DDAcjs = require('./chunk-MEQN6DDA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -166,12 +166,12 @@ function createFarmDefaultSitemap(sources, options) {
|
|
|
166
166
|
for (const source of sources) {
|
|
167
167
|
const path = source.pattern;
|
|
168
168
|
if (path.includes("[") || path.includes("(") || entries.has(path)) continue;
|
|
169
|
-
if (include.length && !include.some((pattern) =>
|
|
169
|
+
if (include.length && !include.some((pattern) => _chunkLT4VAF5Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
170
170
|
continue;
|
|
171
171
|
}
|
|
172
|
-
if (exclude.some((pattern) =>
|
|
172
|
+
if (exclude.some((pattern) => _chunkLT4VAF5Zcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
173
173
|
const module = isRecord(source.module) ? source.module : void 0;
|
|
174
|
-
if (
|
|
174
|
+
if (_chunkMEQN6DDAcjs.isFarmMetadataNoIndex.call(void 0, _optionalChain([module, 'optionalAccess', _2 => _2.metadata]))) continue;
|
|
175
175
|
if (_optionalChain([module, 'optionalAccess', _3 => _3.__farmRouteGuard])) continue;
|
|
176
176
|
entries.set(path, {
|
|
177
177
|
url: new URL(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, path, options.basePath), base).href,
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/nitro/mobile-client.ts
|
|
2
|
+
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
3
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
4
|
+
var FARM_MOBILE_CLIENT_ENTRY_NAME = "farm-mobile-client";
|
|
5
|
+
var FARM_MOBILE_CLIENT_MANIFEST_FILE = "mobile-client.json";
|
|
6
|
+
var HASHED_FILE = /-h[0-9a-f]{8,}\.[A-Za-z0-9]+$/;
|
|
7
|
+
function isFarmContentHashedFile(file) {
|
|
8
|
+
return HASHED_FILE.test(file);
|
|
9
|
+
}
|
|
10
|
+
function manifestPath(buildDir) {
|
|
11
|
+
return _path2.default.join(buildDir, FARM_MOBILE_CLIENT_MANIFEST_FILE);
|
|
12
|
+
}
|
|
13
|
+
async function removeFarmMobileClientManifest(buildDir) {
|
|
14
|
+
await _promises2.default.rm(manifestPath(buildDir), { force: true });
|
|
15
|
+
}
|
|
16
|
+
function createFarmMobileClientManifestPlugin(options) {
|
|
17
|
+
return {
|
|
18
|
+
name: "farm-mobile-client-manifest",
|
|
19
|
+
enforce: "post",
|
|
20
|
+
async generateBundle(_output, bundle) {
|
|
21
|
+
const entry = _optionalChain([Object, 'access', _ => _.entries, 'call', _2 => _2(bundle), 'access', _3 => _3.find, 'call', _4 => _4(
|
|
22
|
+
([, output]) => output.type === "chunk" && output.isEntry && output.name === options.entryName
|
|
23
|
+
), 'optionalAccess', _5 => _5[0]]);
|
|
24
|
+
const record = entry ? {
|
|
25
|
+
entry,
|
|
26
|
+
files: Object.keys(bundle).filter((file) => !file.endsWith(".css") && !file.endsWith(".map")).sort()
|
|
27
|
+
} : null;
|
|
28
|
+
await _promises2.default.mkdir(options.buildDir, { recursive: true });
|
|
29
|
+
await _promises2.default.writeFile(manifestPath(options.buildDir), JSON.stringify(record));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
async function hasFarmMobileClientEntry(buildDir, clientOutputDir) {
|
|
34
|
+
let record = null;
|
|
35
|
+
try {
|
|
36
|
+
record = JSON.parse(await _promises2.default.readFile(manifestPath(buildDir), "utf8"));
|
|
37
|
+
} catch (e) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
if (!record) return false;
|
|
41
|
+
return _promises2.default.stat(_path2.default.join(clientOutputDir, record.entry)).then(
|
|
42
|
+
(stat) => stat.isFile() && stat.size > 0,
|
|
43
|
+
() => false
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function stylesheetUrls(css) {
|
|
47
|
+
const urls = [];
|
|
48
|
+
for (const match of css.matchAll(/url\(\s*(["']?)(\/[^"')?#]+)[^"')]*\1\s*\)/g)) {
|
|
49
|
+
urls.push(match[2]);
|
|
50
|
+
}
|
|
51
|
+
return urls;
|
|
52
|
+
}
|
|
53
|
+
async function finalizeFarmMobileClient(options) {
|
|
54
|
+
let record = null;
|
|
55
|
+
try {
|
|
56
|
+
record = JSON.parse(await _promises2.default.readFile(manifestPath(options.buildDir), "utf8"));
|
|
57
|
+
} catch (e2) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
if (!record) return null;
|
|
61
|
+
const mobileFiles = new Set(record.files);
|
|
62
|
+
const files = new Set(record.files.filter(isFarmContentHashedFile).map((file) => `/${file}`));
|
|
63
|
+
const stylesheetFile = options.stylesheet.replace(/^\/+/, "");
|
|
64
|
+
if (isFarmContentHashedFile(stylesheetFile)) {
|
|
65
|
+
files.add(`/${stylesheetFile}`);
|
|
66
|
+
const css = await _promises2.default.readFile(_path2.default.join(options.clientOutputDir, stylesheetFile), "utf8").catch(() => "");
|
|
67
|
+
for (const url of stylesheetUrls(css)) {
|
|
68
|
+
const file = url.replace(/^\/+/, "");
|
|
69
|
+
if (!isFarmContentHashedFile(file)) continue;
|
|
70
|
+
const exists = await _promises2.default.stat(_path2.default.join(options.clientOutputDir, file)).then(
|
|
71
|
+
(stat) => stat.isFile(),
|
|
72
|
+
() => false
|
|
73
|
+
);
|
|
74
|
+
if (exists) files.add(`/${file}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const manifest = {
|
|
78
|
+
version: 1,
|
|
79
|
+
webEntry: options.webEntry,
|
|
80
|
+
entry: `/${record.entry}`,
|
|
81
|
+
stylesheet: options.stylesheet,
|
|
82
|
+
files: [...files].sort()
|
|
83
|
+
};
|
|
84
|
+
await _promises2.default.writeFile(manifestPath(options.buildDir), `${JSON.stringify(manifest, null, 2)}
|
|
85
|
+
`);
|
|
86
|
+
return {
|
|
87
|
+
webEntry: options.webEntry,
|
|
88
|
+
entry: manifest.entry,
|
|
89
|
+
webOnly: options.webFiles.filter((file) => !mobileFiles.has(file)).sort()
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
async function readFarmMobileClientManifest(buildDir) {
|
|
93
|
+
try {
|
|
94
|
+
const manifest = JSON.parse(await _promises2.default.readFile(manifestPath(buildDir), "utf8"));
|
|
95
|
+
return manifest && manifest.version === 1 ? manifest : null;
|
|
96
|
+
} catch (e3) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function encodeFarmMobileShellClient(client) {
|
|
101
|
+
return JSON.stringify(JSON.stringify(client)).slice(1, -1).replace(/'/g, "\\u0027").replace(/`/g, "\\u0060").replace(/\$/g, "\\u0024").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
102
|
+
}
|
|
103
|
+
var FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER = "__farm_mobile_shell_client__";
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
exports.FARM_MOBILE_CLIENT_ENTRY_NAME = FARM_MOBILE_CLIENT_ENTRY_NAME; exports.removeFarmMobileClientManifest = removeFarmMobileClientManifest; exports.createFarmMobileClientManifestPlugin = createFarmMobileClientManifestPlugin; exports.hasFarmMobileClientEntry = hasFarmMobileClientEntry; exports.finalizeFarmMobileClient = finalizeFarmMobileClient; exports.readFarmMobileClientManifest = readFarmMobileClientManifest; exports.encodeFarmMobileShellClient = encodeFarmMobileShellClient; exports.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER = FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER;
|
|
@@ -15,20 +15,20 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
emitFarmEvent
|
|
17
17
|
} from "./chunk-2DA7CLY7.mjs";
|
|
18
|
+
import {
|
|
19
|
+
createFarmAPIMiddlewarePathnames
|
|
20
|
+
} from "./chunk-2I6PUKWJ.mjs";
|
|
18
21
|
import {
|
|
19
22
|
withFarmRequestClientAddress
|
|
20
23
|
} from "./chunk-GFT5AHAT.mjs";
|
|
21
24
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
_withFarmResponseHeaders
|
|
26
|
+
} from "./chunk-LM55GS4R.mjs";
|
|
24
27
|
import {
|
|
25
28
|
getFarmRedirectError,
|
|
26
29
|
isFarmNotFoundError,
|
|
27
30
|
isFarmRedirectError
|
|
28
31
|
} from "./chunk-JNYFXL7X.mjs";
|
|
29
|
-
import {
|
|
30
|
-
_withFarmResponseHeaders
|
|
31
|
-
} from "./chunk-LM55GS4R.mjs";
|
|
32
32
|
import {
|
|
33
33
|
stripFarmLocaleFromPathname
|
|
34
34
|
} from "./chunk-7S7AAK2D.mjs";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
APIRouteConflictError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BHJAYPYU.mjs";
|
|
13
13
|
import {
|
|
14
14
|
findProgrammaticRouteFilesInDir
|
|
15
15
|
} from "./chunk-FSXSQQTV.mjs";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
matchAPIRouteAtBasePath,
|
|
25
25
|
mergePluginAPIRoutes,
|
|
26
26
|
resolveAPIRouteEndpoint
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RPUJHJHE.mjs";
|
|
28
28
|
import {
|
|
29
29
|
isProgrammaticRoutesFileName
|
|
30
30
|
} from "./chunk-6YFC3ZFX.mjs";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
toPosixPath,
|
|
39
39
|
toViteModuleId
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-JSDV2NUN.mjs";
|
|
41
41
|
import {
|
|
42
42
|
sendWebResponse
|
|
43
43
|
} from "./chunk-CO6UYM2D.mjs";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
loadFarmDocsPage,
|
|
6
6
|
resolveFarmDocsContentDir,
|
|
7
7
|
toFarmDocsMarkdownPage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2KTYMMWT.mjs";
|
|
9
9
|
import {
|
|
10
10
|
docsEngine,
|
|
11
11
|
loadFarmDocsEngine
|
|
12
12
|
} from "./chunk-VE3FWJBO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
resolveDocsConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VPTWKOCY.mjs";
|
|
16
16
|
import {
|
|
17
17
|
getFarmDocsAdapterConfigModule,
|
|
18
18
|
isSecretDocsConfigKey
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk5JNUYGNFcjs = require('./chunk-5JNUYGNF.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkNQJDO7K7cjs = require('./chunk-NQJDO7K7.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -27,7 +27,7 @@ function hasFarmDocsRuntimeAdapter(docs) {
|
|
|
27
27
|
}
|
|
28
28
|
function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded) {
|
|
29
29
|
if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
|
|
30
|
-
const guarded =
|
|
30
|
+
const guarded = _chunk5JNUYGNFcjs.getFarmDocsRoots.call(void 0, docs).flatMap((root) => _chunk5JNUYGNFcjs.discoverFarmDocsPages.call(void 0, _chunk5JNUYGNFcjs.resolveFarmDocsContentDir.call(void 0, root, options), root)).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunk5JNUYGNFcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
|
|
31
31
|
if (guarded.length === 0) return;
|
|
32
32
|
throw new Error(
|
|
33
33
|
`Docs pages behind a path guard (${guarded.join(", ")}) would be public: the docs adapter ${JSON.stringify(docs.adapter.id)} serves their content in llms-full.txt, search, Markdown, and MCP without running the app's guards. Move those pages out of the docs content directory, or set docs.adapter = false to use Farm's built-in docs runtime, which keeps guarded pages off anonymous surfaces.`
|
|
@@ -53,7 +53,7 @@ function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
|
53
53
|
...moduleConfig ? { ...getFarmDocsConfigModuleRoot(moduleConfig, docs.entry), ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
54
54
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
55
55
|
docsPath: docs.entry,
|
|
56
|
-
contentDir:
|
|
56
|
+
contentDir: _chunk5JNUYGNFcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function getFarmDocsAdapterStylesheets(options) {
|
|
@@ -120,7 +120,7 @@ async function listFarmDocsAdapterPages(docs, options) {
|
|
|
120
120
|
if (typeof serverModule.listFarmDocsPages !== "function") return null;
|
|
121
121
|
const listPages = serverModule.listFarmDocsPages;
|
|
122
122
|
const pages = (await Promise.all(
|
|
123
|
-
|
|
123
|
+
_chunk5JNUYGNFcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
124
124
|
(root) => listPages(createFarmDocsAdapterRuntimeConfig(root, options), { rootDir: options.root })
|
|
125
125
|
)
|
|
126
126
|
)).flat();
|
|
@@ -159,7 +159,7 @@ async function createFarmDocsAdapterHandler(docs, options) {
|
|
|
159
159
|
};
|
|
160
160
|
if (multiRoot) {
|
|
161
161
|
return serverModule.createFarmDocsMultiRuntimeHandler(
|
|
162
|
-
|
|
162
|
+
_chunk5JNUYGNFcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
163
163
|
(root) => createFarmDocsAdapterRuntimeConfig(root, options, moduleConfig)
|
|
164
164
|
),
|
|
165
165
|
handlerOptions
|
|
@@ -305,22 +305,22 @@ function getDocsDescription(docs) {
|
|
|
305
305
|
return _optionalChain([docs, 'access', _15 => _15.config, 'access', _16 => _16.metadata, 'optionalAccess', _17 => _17.description]);
|
|
306
306
|
}
|
|
307
307
|
function getLoadedDocsPages(context) {
|
|
308
|
-
return
|
|
308
|
+
return _chunk5JNUYGNFcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunk5JNUYGNFcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
|
|
309
309
|
}
|
|
310
310
|
function toDocsSourcePage(page) {
|
|
311
311
|
return {
|
|
312
|
-
...
|
|
312
|
+
..._chunk5JNUYGNFcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
313
313
|
sourcePath: page.sourcePath
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
function toDocsSitemapPage(page) {
|
|
317
317
|
return {
|
|
318
|
-
...
|
|
318
|
+
..._chunk5JNUYGNFcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
319
319
|
sourcePath: page.sourcePath
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
function toDocsLlmsPage(page) {
|
|
323
|
-
return
|
|
323
|
+
return _chunk5JNUYGNFcjs.toFarmDocsMarkdownPage.call(void 0, page);
|
|
324
324
|
}
|
|
325
325
|
function getDocsLlmsOptions(context, request) {
|
|
326
326
|
const configured = isRecord(context.docs.config.llmsTxt) ? context.docs.config.llmsTxt : {};
|
|
@@ -407,7 +407,7 @@ function renderAgentsDocument(context, request) {
|
|
|
407
407
|
function buildAgentSpec(context, request) {
|
|
408
408
|
const url = new URL(request.url);
|
|
409
409
|
const origin = url.origin;
|
|
410
|
-
const pages =
|
|
410
|
+
const pages = _chunk5JNUYGNFcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
|
|
411
411
|
(page) => !context.isPathGuarded(page.href)
|
|
412
412
|
);
|
|
413
413
|
const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
|
|
@@ -495,7 +495,7 @@ function buildPublicConfig(context) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
function buildDiagnostics(context) {
|
|
498
|
-
const pages =
|
|
498
|
+
const pages = _chunk5JNUYGNFcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
499
499
|
const diagnostics = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
|
|
500
500
|
entry: context.docs.entry,
|
|
501
501
|
mcp: {
|
|
@@ -565,13 +565,13 @@ async function resolveAPIContext(options) {
|
|
|
565
565
|
config: options.config,
|
|
566
566
|
configPath: options.configPath
|
|
567
567
|
}));
|
|
568
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
568
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkNQJDO7K7cjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
569
569
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _24 => _24.guardedPaths]), () => ( [])));
|
|
570
570
|
return {
|
|
571
571
|
root,
|
|
572
572
|
srcDir,
|
|
573
573
|
docs,
|
|
574
|
-
contentDir:
|
|
574
|
+
contentDir: _chunk5JNUYGNFcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
|
|
575
575
|
diagnostics: options.diagnostics === true,
|
|
576
576
|
isPathGuarded: _nullishCoalesce(options.isPathGuarded, () => ( ((pathname) => guardedPaths.has(pathname))))
|
|
577
577
|
};
|
|
@@ -630,12 +630,12 @@ async function handleDocsAPIGet(request, context) {
|
|
|
630
630
|
if (format === "markdown" || url.pathname.endsWith(".md")) {
|
|
631
631
|
const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
|
|
632
632
|
const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
|
|
633
|
-
const page =
|
|
633
|
+
const page = _chunk5JNUYGNFcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
|
|
634
634
|
if (!page || context.isPathGuarded(page.href)) {
|
|
635
635
|
return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
|
|
636
636
|
}
|
|
637
637
|
return text(
|
|
638
|
-
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(
|
|
638
|
+
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunk5JNUYGNFcjs.toFarmDocsMarkdownPage.call(void 0, page), {
|
|
639
639
|
origin: new URL(request.url).origin,
|
|
640
640
|
llms: getDocsLlmsOptions(context, request),
|
|
641
641
|
sitemap: context.docs.config.sitemap
|