@farm.js/core 0.1.49 → 0.1.51-beta.0
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/README.md +163 -3
- package/dist/{agent-mcp-Bb8hnnqd.d.ts → agent-mcp-BBMfNpsC.d.ts} +1 -1
- package/dist/{agent-mcp-ir3v4fHf.d.mts → agent-mcp-D44ip11f.d.mts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +6 -6
- package/dist/agent-runtime.d.ts +6 -6
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-HOUCQR3K.mjs +1066 -0
- package/dist/analyzer-VKUDHNDF.cjs +1066 -0
- package/dist/api/client.d.mts +0 -1
- package/dist/api/client.d.ts +0 -1
- package/dist/api/route-manager.cjs +8 -8
- package/dist/api/route-manager.d.mts +10 -10
- package/dist/api/route-manager.d.ts +10 -10
- package/dist/api/route-manager.mjs +7 -7
- package/dist/api/runtime.cjs +3 -3
- package/dist/api/runtime.d.mts +7 -7
- package/dist/api/runtime.d.ts +7 -7
- package/dist/api/runtime.mjs +2 -2
- package/dist/api.cjs +9 -9
- package/dist/api.d.mts +10 -10
- package/dist/api.d.ts +10 -10
- package/dist/api.mjs +8 -8
- package/dist/{app-y649szYm.d.ts → app-CourU3rQ.d.ts} +7 -7
- package/dist/{app-DLzz02du.d.mts → app-aeD4s_mg.d.mts} +7 -7
- package/dist/{app-manifest-Crn8Qd3U.d.mts → app-manifest-BC6mFn5A.d.mts} +1 -1
- package/dist/{app-manifest-DNeTKMRL.d.ts → app-manifest-LzjoNPeq.d.ts} +1 -1
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/base-path-BOUV5ozD.d.mts +10 -0
- package/dist/base-path-BOUV5ozD.d.ts +10 -0
- package/dist/cache.d.mts +4 -3
- package/dist/cache.d.ts +4 -3
- package/dist/{chunk-YQGZLCT4.cjs → chunk-2IAPKPEB.cjs} +6 -6
- package/dist/chunk-2KVDHNQS.mjs +224 -0
- package/dist/{chunk-QFQDRJKJ.mjs → chunk-3HA7PP72.mjs} +2 -2
- package/dist/{chunk-6LH33DLL.cjs → chunk-3OWVWZ6R.cjs} +28 -2
- package/dist/{chunk-GXSMF7UR.mjs → chunk-4GJJ65RB.mjs} +10 -2
- package/dist/{chunk-GERUXONA.cjs → chunk-5A77OEIG.cjs} +4 -1
- package/dist/{chunk-4HBKBHVP.mjs → chunk-5ENW27SL.mjs} +1 -1
- package/dist/{chunk-MTB57GOK.mjs → chunk-724WT3NI.mjs} +4 -2
- package/dist/{chunk-XLYXG73A.mjs → chunk-75WWOZ5C.mjs} +22 -0
- package/dist/{chunk-VCKGOXFI.cjs → chunk-76GHW3WI.cjs} +7 -1
- package/dist/{chunk-ZIBIE7AH.mjs → chunk-7UPCJDB5.mjs} +7 -1
- package/dist/{chunk-4IICUBQX.cjs → chunk-A5BJKSZE.cjs} +2 -2
- package/dist/{chunk-UYQOIPXE.mjs → chunk-AER5I65K.mjs} +1 -1
- package/dist/{chunk-WB6XES4V.mjs → chunk-ALEUMLJN.mjs} +34 -5
- package/dist/{chunk-Z4LTSH7D.mjs → chunk-AMRK3P6W.mjs} +175 -71
- package/dist/{chunk-TTYXOAB7.mjs → chunk-ANHZ6SUL.mjs} +1 -1
- package/dist/{chunk-ZBS3GOQZ.cjs → chunk-AQLHD6HZ.cjs} +35 -61
- package/dist/{chunk-L6QDME5Z.cjs → chunk-B3GZAQSC.cjs} +3 -3
- package/dist/chunk-CKPTIEDX.cjs +12 -0
- package/dist/{chunk-JPAVNDZH.cjs → chunk-CY7H5KS4.cjs} +25 -25
- package/dist/{chunk-4S7M63WX.cjs → chunk-DGOLAZLV.cjs} +22 -1
- package/dist/{chunk-4HM5B5RR.cjs → chunk-DWW3AMJX.cjs} +343 -308
- package/dist/{chunk-EQMTJBB7.cjs → chunk-DZZHTMWM.cjs} +35 -6
- package/dist/chunk-E36C43IX.cjs +224 -0
- package/dist/{chunk-J2ZEVDEK.cjs → chunk-EHB77D5U.cjs} +3 -3
- package/dist/{chunk-WQGRD5BJ.cjs → chunk-EX6ZSN5P.cjs} +1 -16
- package/dist/{chunk-C5S457CK.cjs → chunk-F42U3R4F.cjs} +214 -193
- package/dist/{chunk-FGJQS4EC.cjs → chunk-FK25QSVC.cjs} +4 -3
- package/dist/{chunk-JOHXK4BB.mjs → chunk-FSQMN2MQ.mjs} +2 -1
- package/dist/{chunk-2H3FJYY6.mjs → chunk-FSXSQQTV.mjs} +3 -2
- package/dist/chunk-G2KTRMWA.mjs +40 -0
- package/dist/{chunk-C6U66WWF.mjs → chunk-GFT5AHAT.mjs} +13 -0
- package/dist/chunk-GNZIAJGB.mjs +358 -0
- package/dist/{chunk-TXK4D46O.mjs → chunk-H3ASZDT7.mjs} +21 -1
- package/dist/{chunk-AXRNEVCS.cjs → chunk-HASX6DC7.cjs} +8 -8
- package/dist/{chunk-NW2BKDVT.mjs → chunk-HHFMECFO.mjs} +1 -1
- package/dist/{chunk-HELQXYVI.cjs → chunk-I2DQGS56.cjs} +11 -9
- package/dist/{chunk-IVHPRF4W.mjs → chunk-I2ZA5SXS.mjs} +81 -46
- package/dist/{chunk-EVCQX243.cjs → chunk-IOUOGRDX.cjs} +13 -5
- package/dist/{chunk-CBJKDB6F.mjs → chunk-IRSS4HS4.mjs} +1 -1
- package/dist/{chunk-NPPT4RWF.cjs → chunk-J22JD5YJ.cjs} +7 -7
- package/dist/{chunk-VJXLUTBM.mjs → chunk-JF5CNHHF.mjs} +9 -9
- package/dist/{chunk-VR4SEDEM.mjs → chunk-JWI5PUO2.mjs} +6 -2
- package/dist/{chunk-6XFGJBYX.cjs → chunk-JYNNIGQO.cjs} +16 -7
- package/dist/{chunk-EXHEPWFJ.cjs → chunk-KHXAJ2KA.cjs} +16 -16
- package/dist/{chunk-ALD2WMLA.mjs → chunk-KY32FWK7.mjs} +4 -4
- package/dist/{chunk-BR5FSKZ5.cjs → chunk-LEIXUFJN.cjs} +6 -2
- package/dist/{chunk-5566GNEG.cjs → chunk-LIFUPCXW.cjs} +13 -0
- package/dist/{chunk-I2SWKWO7.mjs → chunk-LJDIFIJ2.mjs} +1 -1
- package/dist/chunk-LMFJCXDD.mjs +55 -0
- package/dist/{chunk-IXSMFKZ2.cjs → chunk-LNM57D3H.cjs} +4 -4
- package/dist/{chunk-ATHPRVP2.mjs → chunk-LZ4SB57H.mjs} +3 -3
- package/dist/{chunk-73XBJRZW.cjs → chunk-MMEEXMUQ.cjs} +2 -2
- package/dist/chunk-N4AQNEXR.cjs +17 -0
- package/dist/{chunk-JZMZKABS.cjs → chunk-NWUHS6GV.cjs} +3 -2
- package/dist/{chunk-KZT2VHRQ.cjs → chunk-O3MMJPC2.cjs} +19 -19
- package/dist/{chunk-JWP56HCP.mjs → chunk-OD6WM3I7.mjs} +2 -2
- package/dist/{chunk-R2SEZEBC.cjs → chunk-OYNNA4DD.cjs} +4 -4
- package/dist/{chunk-GBPDSUFE.mjs → chunk-OZK2DS44.mjs} +1 -1
- package/dist/{chunk-A7DK663W.cjs → chunk-PDJSL7PL.cjs} +50 -39
- package/dist/{chunk-XLLVWLWO.mjs → chunk-PIHKO25G.mjs} +1 -1
- package/dist/chunk-PIUTGRDI.cjs +358 -0
- package/dist/{chunk-XO6WL6NL.mjs → chunk-PPDHCRTC.mjs} +1 -1
- package/dist/{chunk-LZBM35DH.mjs → chunk-QI5AQMEE.mjs} +20 -9
- package/dist/{chunk-FR4HJDI6.cjs → chunk-QK3HBOTG.cjs} +27 -30
- package/dist/{chunk-Q3UU2KXC.mjs → chunk-QMDU6QHN.mjs} +4 -1
- package/dist/chunk-QXJADAQB.cjs +40 -0
- package/dist/{chunk-DGVVVYKD.mjs → chunk-R5P4KFPM.mjs} +2 -2
- package/dist/{chunk-3HBFI373.cjs → chunk-S5AQ7CAC.cjs} +14 -14
- package/dist/{chunk-Z3BXMMFF.mjs → chunk-S5ZA2T2W.mjs} +63 -42
- package/dist/{chunk-PXEXOQ5R.mjs → chunk-SHS6KXOZ.mjs} +1 -1
- package/dist/{chunk-ETF5C6HR.cjs → chunk-SJ23LJ3N.cjs} +3 -3
- package/dist/{chunk-LL7TDMOM.mjs → chunk-SMUW7UST.mjs} +33 -59
- package/dist/{chunk-VCFBQFOV.mjs → chunk-SN5VSO3Q.mjs} +9 -7
- package/dist/{chunk-AIHD6VME.cjs → chunk-SO3T6T4I.cjs} +482 -378
- package/dist/{chunk-JHXJBNLY.cjs → chunk-SUCDVKUB.cjs} +21 -1
- package/dist/{chunk-DM3TFCC2.cjs → chunk-SUV6YO4Q.cjs} +5 -5
- package/dist/{chunk-NG44F7AH.mjs → chunk-T4EW7AAD.mjs} +2 -2
- package/dist/{chunk-JUMPFVMK.mjs → chunk-TUOO6IK3.mjs} +9 -0
- package/dist/chunk-UB7RVEMX.mjs +73 -0
- package/dist/{chunk-CDTIXBKN.mjs → chunk-UN6N623E.mjs} +2 -2
- package/dist/{chunk-BEXYFR2R.cjs → chunk-USL2ANCB.cjs} +10 -10
- package/dist/{chunk-HAH4FBTA.mjs → chunk-VAHBCI6X.mjs} +1 -1
- package/dist/{chunk-QNQEK3OF.cjs → chunk-VIFPE5RG.cjs} +14 -14
- package/dist/{chunk-HTLCLOXQ.cjs → chunk-VO6NLTV4.cjs} +3 -3
- package/dist/{chunk-XN2MB4QZ.cjs → chunk-VQJYGZNX.cjs} +4 -4
- package/dist/{chunk-N25RPPO5.cjs → chunk-WAPQWAE6.cjs} +10 -10
- package/dist/{chunk-5PKDHKQP.cjs → chunk-WFVSAT7Y.cjs} +6 -4
- package/dist/{chunk-EA5PMJDU.mjs → chunk-WSY2JD7O.mjs} +7 -7
- package/dist/{chunk-HNAUK3SC.mjs → chunk-WVX3BUNJ.mjs} +40 -199
- package/dist/chunk-X3EFRVXY.mjs +12 -0
- package/dist/{chunk-UCQ52TJY.mjs → chunk-X3JNB2TB.mjs} +1 -1
- package/dist/{chunk-J5VCA45K.cjs → chunk-X5BCMLGP.cjs} +1 -1
- package/dist/{chunk-SSNN55Q6.cjs → chunk-XB24LZWI.cjs} +10 -10
- package/dist/{chunk-XXB37YET.cjs → chunk-XLRLSTJ6.cjs} +7 -7
- package/dist/{chunk-BNMHXVLL.mjs → chunk-XMHERKSE.mjs} +0 -15
- package/dist/chunk-XPMC4E2G.cjs +55 -0
- package/dist/{chunk-J27BZO67.mjs → chunk-XWC5NAHV.mjs} +23 -26
- package/dist/{chunk-DRFADSKY.mjs → chunk-XXXRRVY6.mjs} +4 -4
- package/dist/{chunk-C7425KDG.cjs → chunk-XYL4HSVC.cjs} +2 -2
- package/dist/{chunk-2SVJGOAX.mjs → chunk-Y3N5BFRJ.mjs} +3 -3
- package/dist/{chunk-ZSIGEHSE.cjs → chunk-Y7TLL65B.cjs} +21 -180
- package/dist/{chunk-PEHL3IZL.cjs → chunk-YB44NKC2.cjs} +2 -2
- package/dist/chunk-YKHRCY4T.cjs +73 -0
- package/dist/{chunk-RYDDUCNJ.mjs → chunk-YLNBWUVS.mjs} +1 -1
- package/dist/chunk-Z5A6CNV2.mjs +60 -0
- package/dist/chunk-Z64V4WZI.mjs +17 -0
- package/dist/{chunk-ACI52TCN.mjs → chunk-ZF3GX4O7.mjs} +1 -1
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-plugins-DFDQUI9Q.d.ts → client-plugins-CFBEfVPO.d.ts} +34 -10
- package/dist/{client-plugins-BNBeyLMi.d.mts → client-plugins-cqy_dQd0.d.mts} +34 -10
- package/dist/client-plugins.d.mts +6 -6
- package/dist/client-plugins.d.ts +6 -6
- package/dist/client.cjs +13 -9
- package/dist/client.d.mts +11 -10
- package/dist/client.d.ts +11 -10
- package/dist/client.mjs +15 -11
- package/dist/client.react-server.mjs +1 -1
- package/dist/config-CnhyvvmT.d.mts +188 -0
- package/dist/config-CnhyvvmT.d.ts +188 -0
- package/dist/config.d.mts +6 -6
- package/dist/config.d.ts +6 -6
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/desktop.d.mts +7 -7
- package/dist/desktop.d.ts +7 -7
- package/dist/{dev-guard-YO6KPIOQ.mjs → dev-guard-4PFQNXQX.mjs} +2 -1
- package/dist/{dev-guard-PLHL6OTJ.cjs → dev-guard-YLO5DE3H.cjs} +4 -3
- package/dist/{devtools-BLKHPY3C.mjs → devtools-4MLL3RAL.mjs} +10 -10
- package/dist/{devtools-A37WWJZL.cjs → devtools-4ZLMD454.cjs} +12 -12
- package/dist/docs.cjs +14 -14
- package/dist/docs.d.mts +7 -7
- package/dist/docs.d.ts +7 -7
- package/dist/docs.mjs +13 -13
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/generate-route-types-DQP0cUzk.d.ts +33 -0
- package/dist/generate-route-types-TF5Wwtvz.d.mts +33 -0
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/{index-DBdiTkNc.d.ts → index-BYkNbeQV.d.mts} +2 -2
- package/dist/{index-CeJ9_s9p.d.mts → index-BxjN_UDZ.d.ts} +2 -2
- package/dist/{index-MocnSP3a.d.ts → index-D3l4tREW.d.ts} +2 -2
- package/dist/{index-Cl3akY5U.d.mts → index-DPUAPho_.d.mts} +2 -2
- package/dist/index.cjs +88 -79
- package/dist/index.d.mts +29 -45
- package/dist/index.d.ts +29 -45
- package/dist/index.mjs +92 -83
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +6 -6
- package/dist/integrations.d.ts +6 -6
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +7 -7
- package/dist/internal/app-markdown-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.cjs +47 -43
- package/dist/internal/build-runtime.d.mts +9 -9
- package/dist/internal/build-runtime.d.ts +9 -9
- package/dist/internal/build-runtime.mjs +46 -42
- package/dist/internal/cli-runtime.cjs +24 -23
- package/dist/internal/cli-runtime.mjs +24 -23
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +22 -3
- package/dist/internal/client-runtime.d.mts +46 -4
- package/dist/internal/client-runtime.d.ts +46 -4
- package/dist/internal/client-runtime.mjs +22 -3
- package/dist/internal/compression-runtime.d.mts +6 -6
- package/dist/internal/compression-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.cjs +20 -13
- package/dist/internal/config-runtime.d.mts +259 -18
- package/dist/internal/config-runtime.d.ts +259 -18
- package/dist/internal/config-runtime.mjs +18 -11
- package/dist/internal/form-actions.cjs +5 -4
- package/dist/internal/form-actions.mjs +4 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/islands-runtime.cjs +56 -0
- package/dist/internal/islands-runtime.mjs +57 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +18 -15
- package/dist/internal/production-runtime.d.mts +33 -20
- package/dist/internal/production-runtime.d.ts +33 -20
- package/dist/internal/production-runtime.mjs +20 -17
- package/dist/internal/server-fn-transform.cjs +13 -0
- package/dist/internal/server-fn-transform.d.mts +24 -0
- package/dist/internal/server-fn-transform.d.ts +24 -0
- package/dist/internal/server-fn-transform.mjs +13 -0
- package/dist/{layers-D9fbe-rz.d.ts → layers-CcS42OGR.d.mts} +1 -1
- package/dist/{layers-D9fbe-rz.d.mts → layers-CcS42OGR.d.ts} +1 -1
- package/dist/{lifecycle-DK06VuKP.d.ts → lifecycle-C2aLBOwu.d.mts} +1 -1
- package/dist/{lifecycle-DK06VuKP.d.mts → lifecycle-C2aLBOwu.d.ts} +1 -1
- package/dist/markdown.d.mts +6 -6
- package/dist/markdown.d.ts +6 -6
- package/dist/middleware.cjs +11 -11
- package/dist/middleware.d.mts +8 -8
- package/dist/middleware.d.ts +8 -8
- package/dist/middleware.mjs +10 -10
- package/dist/mobile.cjs +9 -0
- package/dist/mobile.d.mts +94 -0
- package/dist/mobile.d.ts +94 -0
- package/dist/mobile.mjs +9 -0
- package/dist/navigation-delegate-BU4xqdnw.d.ts +29 -0
- package/dist/navigation-delegate-DLhbfEN4.d.mts +29 -0
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +9 -9
- package/dist/navigation.d.ts +9 -9
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-BIXIKJZS.cjs → nitro-CK7M4RMY.cjs} +12 -12
- package/dist/{nitro-UT2J5A5D.mjs → nitro-R444AF3O.mjs} +8 -8
- package/dist/platform.cjs +2 -1
- package/dist/platform.d.mts +4 -3
- package/dist/platform.d.ts +4 -3
- package/dist/platform.mjs +2 -1
- package/dist/{plugin-4KYXV7BB.mjs → plugin-53SY5YBS.mjs} +1 -1
- package/dist/{plugin-WBANOZQM.cjs → plugin-HZIBL3DW.cjs} +2 -2
- package/dist/plugin.cjs +40 -36
- package/dist/plugin.d.mts +13 -8
- package/dist/plugin.d.ts +13 -8
- package/dist/plugin.mjs +39 -35
- package/dist/{production-runtime-B3qFFtKF.d.ts → production-runtime-C78A8YgK.d.ts} +3 -3
- package/dist/{production-runtime-DcD-GRAv.d.mts → production-runtime-DLA4J5WG.d.mts} +3 -3
- package/dist/production-vite-BQFAlG7n.d.mts +13 -0
- package/dist/production-vite-BQFAlG7n.d.ts +13 -0
- package/dist/{programmatic-routes-client-fD9f4XqU.d.ts → programmatic-routes-client-CBqkNhBy.d.ts} +2 -2
- package/dist/{programmatic-routes-client-DzbYGiZQ.d.mts → programmatic-routes-client-NpqGBn-i.d.mts} +2 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan-DqJ51ufr.d.mts → render-plan-C9sWvDTv.d.mts} +1 -1
- package/dist/{render-plan-B6cfssrr.d.ts → render-plan-CrqcBbnV.d.ts} +1 -1
- package/dist/renderer-client.cjs +17 -12
- package/dist/renderer-client.d.mts +9 -8
- package/dist/renderer-client.d.ts +9 -8
- package/dist/renderer-client.mjs +10 -5
- package/dist/{request-jhvUMXRx.d.ts → request-BizeuqD7.d.ts} +1 -1
- package/dist/{request-UuAxHn8h.d.mts → request-WwB1-Uim.d.mts} +1 -1
- package/dist/request.d.mts +7 -7
- package/dist/request.d.ts +7 -7
- package/dist/{resolver-DC57A4vz.d.ts → resolver-CJ-D9nP-.d.ts} +1 -1
- package/dist/{resolver-C2G-3Tm6.d.mts → resolver-TDyZKgKI.d.mts} +1 -1
- package/dist/{route-rendering-Sn50cYZf.d.ts → route-rendering-BGhJN64l.d.ts} +1 -1
- package/dist/{route-rendering-Cou00t1X.d.mts → route-rendering-S6NFjnx4.d.mts} +1 -1
- package/dist/{router-0X9DCTcm.d.mts → router-BIheIy9G.d.mts} +1 -1
- package/dist/{router-xwLvi48p.d.ts → router-BUD_j2EL.d.ts} +1 -1
- package/dist/routes-8PT9cl60.d.ts +121 -0
- package/dist/routes-kEUsXHx3.d.mts +121 -0
- package/dist/routes.cjs +3 -2
- package/dist/routes.d.mts +7 -7
- package/dist/routes.d.ts +7 -7
- package/dist/routes.mjs +2 -1
- package/dist/{rsc-pipeline-VKHMABDJ.cjs → rsc-pipeline-JRGUZBYM.cjs} +18 -16
- package/dist/{rsc-pipeline-F6ZPH5MU.mjs → rsc-pipeline-OLAVIKI3.mjs} +17 -15
- package/dist/{runtime-B9HmxiZc.d.ts → runtime-C4CmlOOh.d.ts} +2 -2
- package/dist/{runtime-tkSXZiqO.d.ts → runtime-CWP-21hP.d.ts} +1 -1
- package/dist/{runtime-CMrsyChI.d.mts → runtime-CgJwe6H_.d.mts} +1 -1
- package/dist/{runtime-CCxTmGuf.d.mts → runtime-CihDZ2Rn.d.mts} +2 -2
- package/dist/runtime-G23RSLEK.cjs +1005 -0
- package/dist/runtime-OGCHDACZ.mjs +1005 -0
- package/dist/{schema-dev-notice-O3I5HLXK.mjs → schema-dev-notice-F6QYSOAI.mjs} +4 -4
- package/dist/{schema-dev-notice-Z73J3NJ6.cjs → schema-dev-notice-UU7DMZEU.cjs} +7 -7
- package/dist/{search-client-BTXL5XWD.mjs → search-client-OXH6GBNO.mjs} +5 -3
- package/dist/search-client-ZZLKVO5R.cjs +15 -0
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn-client.d.mts +0 -1
- package/dist/server-fn-client.d.ts +0 -1
- package/dist/server-fn.cjs +4 -4
- package/dist/server-fn.d.mts +0 -1
- package/dist/server-fn.d.ts +0 -1
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +7 -7
- package/dist/server-plugins.d.ts +7 -7
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query-client.cjs +4 -3
- package/dist/server-query-client.d.mts +0 -1
- package/dist/server-query-client.d.ts +0 -1
- package/dist/server-query-client.mjs +3 -2
- package/dist/server-query.cjs +5 -5
- package/dist/server-query.d.mts +0 -1
- package/dist/server-query.d.ts +0 -1
- package/dist/server-query.mjs +4 -4
- package/dist/server.cjs +104 -79
- package/dist/server.d.mts +22 -17
- package/dist/server.d.ts +22 -17
- package/dist/server.mjs +73 -48
- package/dist/{spa-router-B48EjsS1.d.mts → spa-router-CVOL0Vrq.d.mts} +4 -4
- package/dist/{spa-router-B06APnGK.d.ts → spa-router-Kytv4jSB.d.ts} +4 -4
- package/dist/testing.cjs +16 -15
- package/dist/testing.d.mts +6 -6
- package/dist/testing.d.ts +6 -6
- package/dist/testing.mjs +12 -11
- package/dist/{types--Wh02r5_.d.mts → types-C41ePjvP.d.mts} +1 -1
- package/dist/{types--Wh02r5_.d.ts → types-C41ePjvP.d.ts} +1 -1
- package/dist/{utils-C5fyK2tE.d.ts → utils-DbyXlzaj.d.ts} +1 -1
- package/dist/{utils-hyAwmcN6.d.mts → utils-Dsa1HZ7X.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +40 -36
- package/dist/vite.d.mts +9 -9
- package/dist/vite.d.ts +9 -9
- package/dist/vite.mjs +39 -35
- package/dist/{workflows-Df1C_7OG.d.mts → workflows-CRMzQZ3k.d.mts} +2 -1
- package/dist/{workflows-Df1C_7OG.d.ts → workflows-CRMzQZ3k.d.ts} +2 -1
- package/dist/workflows.cjs +5 -5
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +4 -4
- package/package.json +16 -3
- package/dist/base-path-leyrqXbX.d.mts +0 -19
- package/dist/base-path-leyrqXbX.d.ts +0 -19
- package/dist/cache-invalidation-BD0z_lfu.d.mts +0 -4
- package/dist/cache-invalidation-BD0z_lfu.d.ts +0 -4
- package/dist/chunk-45EUIICW.mjs +0 -15
- package/dist/chunk-MJ6IC4K2.mjs +0 -34
- package/dist/chunk-V7KTQR4C.cjs +0 -15
- package/dist/search-client-QCYAL6AY.cjs +0 -13
- package/dist/{chunk-5OJVKXFV.cjs → chunk-N7JQXQAV.cjs} +2 -2
- package/dist/{chunk-72KABRWN.mjs → chunk-WSDKXV4E.mjs} +4 -4
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFarmReactRefreshPlugins,
|
|
3
|
+
farmDesktopDevGuardPlugin,
|
|
3
4
|
isFarmReactRefreshActive
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-75WWOZ5C.mjs";
|
|
5
6
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
createFarmServerFnBoundaryModule,
|
|
8
|
+
isFarmServerFnBoundaryId,
|
|
9
|
+
transformFarmServerFns
|
|
10
|
+
} from "./chunk-GNZIAJGB.mjs";
|
|
8
11
|
import {
|
|
9
12
|
createFarmImageHandler
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ANHZ6SUL.mjs";
|
|
11
14
|
import {
|
|
12
15
|
FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
|
|
13
16
|
FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE,
|
|
@@ -34,17 +37,20 @@ import {
|
|
|
34
37
|
resolveFarmIsolatedClientHydrationMode,
|
|
35
38
|
resolveModuleSourcePath,
|
|
36
39
|
stripUseClientDirective
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-S5ZA2T2W.mjs";
|
|
38
41
|
import {
|
|
39
42
|
loadTailwindVitePlugin
|
|
40
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-PIHKO25G.mjs";
|
|
41
44
|
import {
|
|
42
45
|
FARM_NODE_RESPONSE_END_PENDING
|
|
43
46
|
} from "./chunk-GHNW564E.mjs";
|
|
47
|
+
import {
|
|
48
|
+
resolveFarmPlatform
|
|
49
|
+
} from "./chunk-SMUW7UST.mjs";
|
|
44
50
|
import {
|
|
45
51
|
generateFarmTypeArtifacts,
|
|
46
52
|
resolveRouteRenderingConfig
|
|
47
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-WVX3BUNJ.mjs";
|
|
48
54
|
import {
|
|
49
55
|
createFarmRouteRenderPlan,
|
|
50
56
|
farmPathGuardCoversEndpoint,
|
|
@@ -55,7 +61,10 @@ import {
|
|
|
55
61
|
parseFarmLayoutChainHeader,
|
|
56
62
|
renderFarmLocaleAlternateLinks,
|
|
57
63
|
stripRouteGroups
|
|
58
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-7UPCJDB5.mjs";
|
|
65
|
+
import {
|
|
66
|
+
isFarmPreviewDeploymentEnvironment
|
|
67
|
+
} from "./chunk-CSLUBKGG.mjs";
|
|
59
68
|
import {
|
|
60
69
|
FARM_API_CATALOG_PATH,
|
|
61
70
|
createFarmAiCatalogResponse,
|
|
@@ -70,13 +79,10 @@ import {
|
|
|
70
79
|
resolveFarmMCPRouteLabel,
|
|
71
80
|
resolveFarmMarkdownRouteLabel,
|
|
72
81
|
setFarmRouteLabel
|
|
73
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-R5P4KFPM.mjs";
|
|
74
83
|
import {
|
|
75
84
|
FARM_DEFAULT_MCP_PATH
|
|
76
85
|
} from "./chunk-KRRZJ77U.mjs";
|
|
77
|
-
import {
|
|
78
|
-
isFarmPreviewDeploymentEnvironment
|
|
79
|
-
} from "./chunk-CSLUBKGG.mjs";
|
|
80
86
|
import {
|
|
81
87
|
resolveFarmLayoutFonts
|
|
82
88
|
} from "./chunk-HZOMT5DY.mjs";
|
|
@@ -85,6 +91,11 @@ import {
|
|
|
85
91
|
generateProgrammaticClientRouteModule,
|
|
86
92
|
programmaticClientRouteKey
|
|
87
93
|
} from "./chunk-C5JXCUKR.mjs";
|
|
94
|
+
import {
|
|
95
|
+
createFarmMarkdownSourceResponse,
|
|
96
|
+
isFarmMarkdownPageFile,
|
|
97
|
+
normalizeFarmMarkdownRoutePath
|
|
98
|
+
} from "./chunk-GW4YUIHW.mjs";
|
|
88
99
|
import {
|
|
89
100
|
generateFarmDocsAdapterClientRuntime,
|
|
90
101
|
getFarmDocsAdapterConfigModule
|
|
@@ -131,11 +142,6 @@ import {
|
|
|
131
142
|
getFarmLayerAliases,
|
|
132
143
|
getFarmSourceRoots
|
|
133
144
|
} from "./chunk-52Y3C3HG.mjs";
|
|
134
|
-
import {
|
|
135
|
-
createFarmMarkdownSourceResponse,
|
|
136
|
-
isFarmMarkdownPageFile,
|
|
137
|
-
normalizeFarmMarkdownRoutePath
|
|
138
|
-
} from "./chunk-GW4YUIHW.mjs";
|
|
139
145
|
import {
|
|
140
146
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
141
147
|
createFarmMarkdownErrorBody,
|
|
@@ -155,10 +161,10 @@ import {
|
|
|
155
161
|
getIntegrationDocumentNavigationMatchers,
|
|
156
162
|
getIntegrationProviders,
|
|
157
163
|
matchIntegrationRoute
|
|
158
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-HHFMECFO.mjs";
|
|
159
165
|
import {
|
|
160
166
|
MiddlewareManager
|
|
161
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-WSY2JD7O.mjs";
|
|
162
168
|
import {
|
|
163
169
|
_runWithMiddlewareContext,
|
|
164
170
|
_runWithMiddlewareData
|
|
@@ -174,7 +180,7 @@ import {
|
|
|
174
180
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
175
181
|
import {
|
|
176
182
|
APIRouteManager
|
|
177
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-KY32FWK7.mjs";
|
|
178
184
|
import {
|
|
179
185
|
getFarmI18nClientSnapshot
|
|
180
186
|
} from "./chunk-CV6MFQ4Y.mjs";
|
|
@@ -184,7 +190,7 @@ import {
|
|
|
184
190
|
} from "./chunk-NR63PD3P.mjs";
|
|
185
191
|
import {
|
|
186
192
|
isFarmAPIPathname
|
|
187
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-LJDIFIJ2.mjs";
|
|
188
194
|
import {
|
|
189
195
|
registerFarmMCPServer
|
|
190
196
|
} from "./chunk-KJMWAUKE.mjs";
|
|
@@ -200,7 +206,7 @@ import {
|
|
|
200
206
|
invalidateFailedFarmDevModules,
|
|
201
207
|
invalidateFarmDevDependents,
|
|
202
208
|
loadFarmDevModule
|
|
203
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-TUOO6IK3.mjs";
|
|
204
210
|
import {
|
|
205
211
|
isFarmI18nCatalogFile,
|
|
206
212
|
resolveFarmI18nMessagePath
|
|
@@ -209,10 +215,11 @@ import {
|
|
|
209
215
|
logger,
|
|
210
216
|
toPosixPath,
|
|
211
217
|
toViteModuleId
|
|
212
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-Y3N5BFRJ.mjs";
|
|
213
219
|
import {
|
|
220
|
+
createFarmSearchParams,
|
|
214
221
|
searchParamsToObject
|
|
215
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-H3ASZDT7.mjs";
|
|
216
223
|
import {
|
|
217
224
|
emitFarmEvent,
|
|
218
225
|
runWithFarmRequestSpan
|
|
@@ -227,13 +234,13 @@ import {
|
|
|
227
234
|
createFarmRequestBodyErrorResponse,
|
|
228
235
|
readNodeRequestBody,
|
|
229
236
|
resolveFarmServerConfig
|
|
230
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-GFT5AHAT.mjs";
|
|
231
238
|
import {
|
|
232
239
|
resolveFarmAPIServerBasePath
|
|
233
240
|
} from "./chunk-LM2YOGDK.mjs";
|
|
234
241
|
import {
|
|
235
242
|
FARM_VERSION
|
|
236
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-ZF3GX4O7.mjs";
|
|
237
244
|
import {
|
|
238
245
|
DEFAULT_FARM_API_BASE_PATH
|
|
239
246
|
} from "./chunk-BLD5GVCG.mjs";
|
|
@@ -744,7 +751,7 @@ function loadFarmDocsDevRuntime() {
|
|
|
744
751
|
return import("./docs.mjs");
|
|
745
752
|
}
|
|
746
753
|
function loadFarmDocsSearchDevRuntime() {
|
|
747
|
-
return import("./search-client-
|
|
754
|
+
return import("./search-client-OXH6GBNO.mjs");
|
|
748
755
|
}
|
|
749
756
|
function loadFarmOpenAPIDevRuntime() {
|
|
750
757
|
return import("./manager-H5ZM3HAM.mjs");
|
|
@@ -753,7 +760,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
753
760
|
return import("./workflows.mjs");
|
|
754
761
|
}
|
|
755
762
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
756
|
-
return import("./devtools-
|
|
763
|
+
return import("./devtools-4MLL3RAL.mjs");
|
|
757
764
|
}
|
|
758
765
|
function loadFarmDevtoolsUIRuntime() {
|
|
759
766
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -1374,6 +1381,10 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1374
1381
|
});
|
|
1375
1382
|
let farmApp;
|
|
1376
1383
|
let serverFnTransformActive = false;
|
|
1384
|
+
const islandsServerFns = () => {
|
|
1385
|
+
const config = farmApp?.getConfig() ?? options;
|
|
1386
|
+
return config.experimental?.serverActions === true && resolveFarmServerComponentsMode(config.experimental?.serverComponents) === "islands";
|
|
1387
|
+
};
|
|
1377
1388
|
let reactRefreshActive = false;
|
|
1378
1389
|
let server;
|
|
1379
1390
|
let apiRouteManager;
|
|
@@ -1433,19 +1444,13 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1433
1444
|
(plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
1434
1445
|
);
|
|
1435
1446
|
reactRefreshActive = isFarmReactRefreshActive(config);
|
|
1436
|
-
if (options.experimental?.serverActions === true && !serverFnTransformActive) {
|
|
1447
|
+
if (options.experimental?.serverActions === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
1437
1448
|
logger.warn(
|
|
1438
1449
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
1439
1450
|
);
|
|
1440
1451
|
}
|
|
1441
1452
|
},
|
|
1442
1453
|
async configureServer(viteServer) {
|
|
1443
|
-
if (resolveFarmPlatform() === "desktop") {
|
|
1444
|
-
const { createFarmDesktopDevGuard } = await import("./dev-guard-YO6KPIOQ.mjs");
|
|
1445
|
-
viteServer.middlewares.use(
|
|
1446
|
-
createFarmDesktopDevGuard(viteServer, { basePath: options.basePath || "" })
|
|
1447
|
-
);
|
|
1448
|
-
}
|
|
1449
1454
|
viteServer.middlewares.use(
|
|
1450
1455
|
createFarmDevPreviewGuard(viteServer, {
|
|
1451
1456
|
getSourceRoots: () => getFarmSourceRoots(farmApp?.getConfig() ?? options)
|
|
@@ -2548,9 +2553,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2548
2553
|
const pathname2 = resolveFarmRequestURL(req, {
|
|
2549
2554
|
trustProxy: currentServerConfig.trustProxy
|
|
2550
2555
|
}).pathname;
|
|
2556
|
+
const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
|
|
2557
|
+
farmDocsAPIHandler && farmDocsDevRuntime?.isFarmDocsAPIRequest(requestPathname)
|
|
2558
|
+
);
|
|
2551
2559
|
try {
|
|
2552
2560
|
if (pm) {
|
|
2553
|
-
if (
|
|
2561
|
+
if (servesLocalApiRoute) {
|
|
2554
2562
|
await pm.runHookParallelFiltered(
|
|
2555
2563
|
"beforeRequest",
|
|
2556
2564
|
(plugin) => plugin.name !== FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
@@ -2577,10 +2585,20 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2577
2585
|
res.end(JSON.stringify({ error: "Internal server error" }));
|
|
2578
2586
|
return;
|
|
2579
2587
|
}
|
|
2588
|
+
if (await runAppMiddlewareForContentRoute()) {
|
|
2589
|
+
const duration2 = Date.now() - startTime2;
|
|
2590
|
+
logResponse(method2, urlPath2, res.statusCode || 200, duration2, "API");
|
|
2591
|
+
return;
|
|
2592
|
+
}
|
|
2580
2593
|
const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
|
|
2581
|
-
const
|
|
2594
|
+
const routedPathname = resolveFarmRequestURL(req, {
|
|
2595
|
+
trustProxy: currentServerConfig.trustProxy
|
|
2596
|
+
}).pathname;
|
|
2597
|
+
const rewritten = routedPathname !== pathname2;
|
|
2598
|
+
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
2599
|
+
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
2582
2600
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
2583
|
-
const apiRoutePattern =
|
|
2601
|
+
const apiRoutePattern = routedApiRoute?.route.path || urlPath2;
|
|
2584
2602
|
emitFarmEvent({
|
|
2585
2603
|
type: "route.matched",
|
|
2586
2604
|
pathname: pathname2,
|
|
@@ -2872,7 +2890,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2872
2890
|
props: withFarmRouteContext(
|
|
2873
2891
|
{
|
|
2874
2892
|
params,
|
|
2875
|
-
searchParams:
|
|
2893
|
+
searchParams: createFarmSearchParams(searchParams),
|
|
2876
2894
|
path: targetUrl.pathname,
|
|
2877
2895
|
middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
|
|
2878
2896
|
},
|
|
@@ -2921,7 +2939,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2921
2939
|
props: withFarmRouteContext(
|
|
2922
2940
|
{
|
|
2923
2941
|
params: slot.params,
|
|
2924
|
-
searchParams:
|
|
2942
|
+
searchParams: createFarmSearchParams(searchParams),
|
|
2925
2943
|
path: targetUrl.pathname
|
|
2926
2944
|
},
|
|
2927
2945
|
slotContext
|
|
@@ -3279,6 +3297,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3279
3297
|
}
|
|
3280
3298
|
},
|
|
3281
3299
|
async load(id, loadOptions) {
|
|
3300
|
+
if (isFarmServerFnBoundaryId(id) && islandsServerFns()) {
|
|
3301
|
+
const file = id.split("?", 1)[0];
|
|
3302
|
+
this.addWatchFile(file);
|
|
3303
|
+
const source = await fs2.promises.readFile(file, "utf8");
|
|
3304
|
+
return createFarmServerFnBoundaryModule(source, file) ?? "export {};\n";
|
|
3305
|
+
}
|
|
3282
3306
|
if (typeof fontImports.load === "function") {
|
|
3283
3307
|
const fontModule = await fontImports.load.call(this, id);
|
|
3284
3308
|
if (fontModule) return fontModule;
|
|
@@ -3432,6 +3456,15 @@ export const manifest = getManifest();
|
|
|
3432
3456
|
},
|
|
3433
3457
|
async transform(code, id, transformOptions) {
|
|
3434
3458
|
const actionConfig = farmApp?.getConfig() ?? options;
|
|
3459
|
+
if (islandsServerFns() && !isFarmServerFnBoundaryId(id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3460
|
+
const serverFns = transformFarmServerFns(code, id, {
|
|
3461
|
+
environment: transformOptions?.ssr === true ? "rsc" : "client"
|
|
3462
|
+
});
|
|
3463
|
+
if (serverFns) {
|
|
3464
|
+
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
3465
|
+
code = serverFns.code;
|
|
3466
|
+
}
|
|
3467
|
+
}
|
|
3435
3468
|
if (resolveFarmServerComponentsMode(actionConfig.experimental?.serverComponents) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3436
3469
|
const file = id.split("?", 1)[0];
|
|
3437
3470
|
const actionModule = transformFarmFormActionModule({
|
|
@@ -3453,7 +3486,7 @@ export const manifest = getManifest();
|
|
|
3453
3486
|
}
|
|
3454
3487
|
if (!transformOptions?.ssr) {
|
|
3455
3488
|
const currentConfig = farmApp?.getConfig() ?? options;
|
|
3456
|
-
if (currentConfig.experimental?.serverActions !== true || !serverFnTransformActive) {
|
|
3489
|
+
if ((currentConfig.experimental?.serverActions !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
3457
3490
|
const violation = findClientServerFnViolation(code, id);
|
|
3458
3491
|
if (violation) {
|
|
3459
3492
|
this.error(formatServerFnBoundaryError(violation, id));
|
|
@@ -3617,7 +3650,7 @@ if (import.meta.hot) {
|
|
|
3617
3650
|
const PageComponent = mod.default;
|
|
3618
3651
|
const pageProps = {
|
|
3619
3652
|
params: page.params,
|
|
3620
|
-
searchParams:
|
|
3653
|
+
searchParams: createFarmSearchParams({}),
|
|
3621
3654
|
path: page.urlPath
|
|
3622
3655
|
};
|
|
3623
3656
|
let pageElement = React.createElement(
|
|
@@ -4206,7 +4239,7 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
4206
4239
|
...input.props,
|
|
4207
4240
|
params,
|
|
4208
4241
|
search,
|
|
4209
|
-
searchParams:
|
|
4242
|
+
searchParams: createFarmSearchParams(search)
|
|
4210
4243
|
};
|
|
4211
4244
|
}
|
|
4212
4245
|
function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
@@ -4294,7 +4327,7 @@ ${isolatedHydrationImport}
|
|
|
4294
4327
|
import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
|
|
4295
4328
|
import { createClientPluginManager } from '@farm.js/core/plugin/client'
|
|
4296
4329
|
import { isFarmRouteActive } from '@farm.js/core/router'
|
|
4297
|
-
import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
4330
|
+
import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
4298
4331
|
import { reviveDeferredData } from '@farm.js/core/deferred'
|
|
4299
4332
|
import {
|
|
4300
4333
|
createFarmDeploymentMismatchError,
|
|
@@ -5119,7 +5152,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
|
|
|
5119
5152
|
window.__FARM_PROPS__ = revivedProps;
|
|
5120
5153
|
return {
|
|
5121
5154
|
...revivedProps,
|
|
5122
|
-
searchParams:
|
|
5155
|
+
searchParams: createFarmSearchParams(revivedProps.search ?? revivedProps.searchParams ?? {}),
|
|
5123
5156
|
path: revivedProps.path || path,
|
|
5124
5157
|
};
|
|
5125
5158
|
}
|
|
@@ -5128,7 +5161,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
|
|
|
5128
5161
|
const rawProps = {
|
|
5129
5162
|
...(existingProps || {}),
|
|
5130
5163
|
params,
|
|
5131
|
-
searchParams:
|
|
5164
|
+
searchParams: createFarmSearchParams(searchParams),
|
|
5132
5165
|
path,
|
|
5133
5166
|
};
|
|
5134
5167
|
// Keep top-level route errors inside the router's navigation transaction.
|
|
@@ -6076,6 +6109,8 @@ async function defineConfig(config = {}) {
|
|
|
6076
6109
|
};
|
|
6077
6110
|
return {
|
|
6078
6111
|
plugins: [
|
|
6112
|
+
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
6113
|
+
farmDesktopDevGuardPlugin(config.basePath),
|
|
6079
6114
|
createFarmThemeCssPlugin(config.theme, config.basePath),
|
|
6080
6115
|
tailwindVitePlugin,
|
|
6081
6116
|
...rendererVitePlugins,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkOOJBBHYWcjs = require('./chunk-OOJBBHYW.cjs');
|
|
@@ -21,7 +21,7 @@ var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
|
|
|
21
21
|
var _chunkWJFFPXCVcjs = require('./chunk-WJFFPXCV.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
25
25
|
|
|
26
26
|
// src/docs/handler.ts
|
|
27
27
|
|
|
@@ -1307,6 +1307,13 @@ function highlightCodeBlock(code) {
|
|
|
1307
1307
|
function renderCodeCopyButton(className = "code-copy") {
|
|
1308
1308
|
return `<button class="${className}" type="button" data-code-copy data-copied="false" aria-label="Copy code" title="Copy code"><svg class="code-copy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><svg class="code-copy-check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg></button>`;
|
|
1309
1309
|
}
|
|
1310
|
+
var SCRIPT_URL_SCHEME = /^(?:javascript|vbscript|data):/i;
|
|
1311
|
+
function isScriptUrl(href) {
|
|
1312
|
+
const url = href.replace(/[\t\n\r]/g, "");
|
|
1313
|
+
let start = 0;
|
|
1314
|
+
while (start < url.length && url.charCodeAt(start) <= 32) start++;
|
|
1315
|
+
return SCRIPT_URL_SCHEME.test(url.slice(start));
|
|
1316
|
+
}
|
|
1310
1317
|
function renderMarkdownDocument(body, depth) {
|
|
1311
1318
|
const slug = createSlugger();
|
|
1312
1319
|
const renderer = new (0, _marked.Renderer)();
|
|
@@ -1342,6 +1349,7 @@ function renderMarkdownDocument(body, depth) {
|
|
|
1342
1349
|
`;
|
|
1343
1350
|
renderer.codespan = (code) => `<code>${escapeHtml(code)}</code>`;
|
|
1344
1351
|
renderer.link = (href, title, text) => {
|
|
1352
|
+
if (href && isScriptUrl(href)) return text;
|
|
1345
1353
|
const safeHref = href || "";
|
|
1346
1354
|
const titleAttribute = title ? ` title="${escapeAttribute(title)}"` : "";
|
|
1347
1355
|
return `<a href="${escapeAttribute(safeHref)}"${titleAttribute}>${text}</a>`;
|
|
@@ -1686,7 +1694,7 @@ function renderDocsSearchMount(clientEntry) {
|
|
|
1686
1694
|
${_chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script type="module" src="${escapeAttribute(clientEntry)}"></script>`)}`;
|
|
1687
1695
|
}
|
|
1688
1696
|
function renderDocsSearchBootstrapScript() {
|
|
1689
|
-
return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script>${
|
|
1697
|
+
return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script>${_chunkDZZHTMWMcjs.generateFarmDocsSearchBootstrapRuntime.call(void 0, )}</script>`);
|
|
1690
1698
|
}
|
|
1691
1699
|
function renderPixelToc(items) {
|
|
1692
1700
|
if (items.length === 0) return '<p class="toc-empty">No sections</p>';
|
|
@@ -1742,7 +1750,7 @@ function renderPixelDocsHtml(page, pages, docs, clientEntry, faviconHref, reques
|
|
|
1742
1750
|
const renderedMarkdown = renderMarkdownDocument(page.body, getThemeTocDepth(docs));
|
|
1743
1751
|
const tocItems = renderedMarkdown.tocItems;
|
|
1744
1752
|
const themeName = getThemeName(docs);
|
|
1745
|
-
const searchEnabled =
|
|
1753
|
+
const searchEnabled = _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, docs);
|
|
1746
1754
|
const socialMetadata = isFarmDocsSocialImageEnabled(page, docs) ? renderFarmDocsSocialMetadata(
|
|
1747
1755
|
createFarmDocsSocialImageDescriptor(page, docs, requestUrl),
|
|
1748
1756
|
getFarmDocsCustomSocialImage(page)
|
|
@@ -1834,7 +1842,7 @@ function createFarmDocsHandler(docs, options) {
|
|
|
1834
1842
|
ETag: etag,
|
|
1835
1843
|
"X-Content-Type-Options": "nosniff"
|
|
1836
1844
|
});
|
|
1837
|
-
if (
|
|
1845
|
+
if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
|
|
1838
1846
|
return new Response(null, { status: 304, headers });
|
|
1839
1847
|
}
|
|
1840
1848
|
if (request.method === "HEAD") return new Response(null, { status: 200, headers });
|
|
@@ -16,14 +16,14 @@ var _chunk6ONBZGVHcjs = require('./chunk-6ONBZGVH.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkX5BCMLGPcjs = require('./chunk-X5BCMLGP.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -147,7 +147,7 @@ function createFarmAiCatalogResponse(request, input = {}, requestUrl) {
|
|
|
147
147
|
const body = JSON.stringify(
|
|
148
148
|
card ? card.card : { specVersion: "1.0", entries: servers.map(({ entry }) => entry) }
|
|
149
149
|
);
|
|
150
|
-
const etag =
|
|
150
|
+
const etag = _chunkLIFUPCXWcjs.createFarmWeakETag.call(void 0, body);
|
|
151
151
|
const headers = {
|
|
152
152
|
...corsHeaders(),
|
|
153
153
|
"Content-Type": card ? `${SERVER_CARD_TYPE}; charset=utf-8` : ard ? "application/json; charset=utf-8" : `${AI_CATALOG_TYPE}; charset=utf-8`,
|
|
@@ -156,7 +156,7 @@ function createFarmAiCatalogResponse(request, input = {}, requestUrl) {
|
|
|
156
156
|
ETag: etag,
|
|
157
157
|
"X-Content-Type-Options": "nosniff"
|
|
158
158
|
};
|
|
159
|
-
if (
|
|
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
|
_chunkWJFFPXCVcjs.emitFarmAgentRead.call(void 0, request, card ? "mcp-server-card" : "ai-catalog", 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: _chunkX5BCMLGPcjs.FARM_VERSION } : {},
|
|
286
286
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
287
287
|
basePath: input.basePath,
|
|
288
288
|
...app.build ? { build: input.build } : {}
|
|
@@ -377,7 +377,7 @@ async function createFarmAppManifestResponse(request, input) {
|
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
const body = JSON.stringify(createFarmAppManifest(input));
|
|
380
|
-
const etag =
|
|
380
|
+
const etag = _chunkLIFUPCXWcjs.createFarmWeakETag.call(void 0, body);
|
|
381
381
|
const headers = {
|
|
382
382
|
...CORS_HEADERS,
|
|
383
383
|
"content-type": "application/json; charset=utf-8",
|
|
@@ -385,7 +385,7 @@ async function createFarmAppManifestResponse(request, input) {
|
|
|
385
385
|
etag,
|
|
386
386
|
"x-content-type-options": "nosniff"
|
|
387
387
|
};
|
|
388
|
-
if (
|
|
388
|
+
if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
|
|
389
389
|
return new Response(null, { status: 304, headers });
|
|
390
390
|
}
|
|
391
391
|
return new Response(method === "HEAD" ? null : body, { status: 200, headers });
|
|
@@ -48,30 +48,30 @@ import {
|
|
|
48
48
|
loadFarmConfigFile,
|
|
49
49
|
resolveFarmLayers
|
|
50
50
|
} from "./chunk-52Y3C3HG.mjs";
|
|
51
|
+
import {
|
|
52
|
+
resolveMdxConfig
|
|
53
|
+
} from "./chunk-UIJOLBUL.mjs";
|
|
51
54
|
import {
|
|
52
55
|
bundleNodeModule
|
|
53
56
|
} from "./chunk-VFXE6NWR.mjs";
|
|
54
57
|
import {
|
|
55
58
|
resolveWorkflowsConfig
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-LZ4SB57H.mjs";
|
|
57
60
|
import {
|
|
58
61
|
resolveCronConfig
|
|
59
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-X3JNB2TB.mjs";
|
|
60
63
|
import {
|
|
61
64
|
resolveServerActionsConfig
|
|
62
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-FSQMN2MQ.mjs";
|
|
63
66
|
import {
|
|
64
67
|
resolveFarmThemeConfig
|
|
65
68
|
} from "./chunk-YWPNIYUP.mjs";
|
|
66
|
-
import {
|
|
67
|
-
resolveMdxConfig
|
|
68
|
-
} from "./chunk-UIJOLBUL.mjs";
|
|
69
69
|
import {
|
|
70
70
|
resolveMarkdownConfig
|
|
71
71
|
} from "./chunk-N77JBPLC.mjs";
|
|
72
72
|
import {
|
|
73
73
|
resolveIntegrationPlugins
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-HHFMECFO.mjs";
|
|
75
75
|
import {
|
|
76
76
|
compileMiddlewareConfig
|
|
77
77
|
} from "./chunk-EDPENAVO.mjs";
|
|
@@ -80,10 +80,10 @@ import {
|
|
|
80
80
|
} from "./chunk-MU5V7XHL.mjs";
|
|
81
81
|
import {
|
|
82
82
|
logger
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-Y3N5BFRJ.mjs";
|
|
84
84
|
import {
|
|
85
85
|
resolveFarmServerConfig
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-GFT5AHAT.mjs";
|
|
87
87
|
import {
|
|
88
88
|
resolveFarmAPIConfig
|
|
89
89
|
} from "./chunk-BLD5GVCG.mjs";
|
|
@@ -1086,16 +1086,20 @@ import { forwardRef, useEffect, useRef as useRef3, useCallback as useCallback3 }
|
|
|
1086
1086
|
// src/provider.tsx
|
|
1087
1087
|
import { createContext, useContext } from "react";
|
|
1088
1088
|
import { jsx } from "react/jsx-runtime";
|
|
1089
|
-
var
|
|
1089
|
+
var farmContext;
|
|
1090
|
+
function getFarmContext() {
|
|
1091
|
+
return farmContext ?? (farmContext = createContext(null));
|
|
1092
|
+
}
|
|
1090
1093
|
function FarmProvider({ children, config }) {
|
|
1091
1094
|
const value = {
|
|
1092
1095
|
config,
|
|
1093
1096
|
basePath: normalizeFarmBasePath(config.basePath)
|
|
1094
1097
|
};
|
|
1098
|
+
const FarmContext = getFarmContext();
|
|
1095
1099
|
return /* @__PURE__ */ jsx(FarmContext.Provider, { value, children });
|
|
1096
1100
|
}
|
|
1097
1101
|
function useOptionalFarm() {
|
|
1098
|
-
return useContext(
|
|
1102
|
+
return useContext(getFarmContext());
|
|
1099
1103
|
}
|
|
1100
1104
|
|
|
1101
1105
|
// src/client/link.tsx
|
|
@@ -1,22 +1,31 @@
|
|
|
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; }// src/dev-module.ts
|
|
2
2
|
var failedModules = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
var startedContainers = /* @__PURE__ */ new WeakSet();
|
|
4
|
+
async function startPluginContainer(server) {
|
|
5
|
+
if (_optionalChain([server, 'access', _ => _.config, 'optionalAccess', _2 => _2.experimental, 'optionalAccess', _3 => _3.bundledDev])) return;
|
|
6
|
+
const container = _optionalChain([server, 'access', _4 => _4.environments, 'access', _5 => _5.client, 'optionalAccess', _6 => _6.pluginContainer]);
|
|
7
|
+
if (!container || startedContainers.has(container)) return;
|
|
8
|
+
await _optionalChain([container, 'access', _7 => _7.buildStart, 'optionalCall', _8 => _8()]);
|
|
9
|
+
startedContainers.add(container);
|
|
10
|
+
}
|
|
3
11
|
var FarmDevEnvironmentError = class extends Error {
|
|
4
12
|
};
|
|
5
13
|
async function loadFarmDevModule(server, id, environmentName = "ssr") {
|
|
6
14
|
const environment = server.environments[environmentName];
|
|
7
|
-
const runner = _optionalChain([environment, 'optionalAccess',
|
|
15
|
+
const runner = _optionalChain([environment, 'optionalAccess', _9 => _9.runner]);
|
|
8
16
|
if (!environment || !runner || typeof runner.import !== "function") {
|
|
9
17
|
throw new FarmDevEnvironmentError(
|
|
10
18
|
`[Farm.js] Cannot load ${JSON.stringify(id)}: the "${environmentName}" development environment must provide a module runner. Remote runtimes require a request/response adapter.`
|
|
11
19
|
);
|
|
12
20
|
}
|
|
13
21
|
try {
|
|
22
|
+
await startPluginContainer(server);
|
|
14
23
|
return await runner.import(id);
|
|
15
24
|
} catch (error) {
|
|
16
25
|
const failures = _nullishCoalesce(failedModules.get(environment), () => ( /* @__PURE__ */ new Map()));
|
|
17
26
|
failedModules.set(environment, failures);
|
|
18
27
|
await Promise.all(
|
|
19
|
-
[..._nullishCoalesce(_optionalChain([runner, 'access',
|
|
28
|
+
[..._nullishCoalesce(_optionalChain([runner, 'access', _10 => _10.evaluatedModules, 'optionalAccess', _11 => _11.idToModuleMap, 'access', _12 => _12.values, 'call', _13 => _13()]), () => ( []))].filter((module) => module.evaluated && module.promise).map(async (module) => {
|
|
20
29
|
try {
|
|
21
30
|
await module.promise;
|
|
22
31
|
} catch (e) {
|
|
@@ -29,7 +38,7 @@ async function loadFarmDevModule(server, id, environmentName = "ssr") {
|
|
|
29
38
|
}
|
|
30
39
|
function invalidateFarmDevDependents(server, file, targets, environmentName = "ssr") {
|
|
31
40
|
const environment = server.environments[environmentName];
|
|
32
|
-
const graph = _optionalChain([environment, 'optionalAccess',
|
|
41
|
+
const graph = _optionalChain([environment, 'optionalAccess', _14 => _14.moduleGraph]);
|
|
33
42
|
if (!graph || targets.size === 0) return [];
|
|
34
43
|
const posix = (filePath) => filePath.replace(/\\/g, "/");
|
|
35
44
|
const byFile = new Map([...targets].map((target) => [posix(target), target]));
|
|
@@ -45,10 +54,10 @@ function invalidateFarmDevDependents(server, file, targets, environmentName = "s
|
|
|
45
54
|
queue.push(...node.importers);
|
|
46
55
|
}
|
|
47
56
|
if (reached.size === 0) return [];
|
|
48
|
-
const evaluatedModules = _optionalChain([environment, 'access',
|
|
57
|
+
const evaluatedModules = _optionalChain([environment, 'access', _15 => _15.runner, 'optionalAccess', _16 => _16.evaluatedModules]);
|
|
49
58
|
for (const node of seen) {
|
|
50
59
|
graph.invalidateModule(node);
|
|
51
|
-
const evaluated = node.id ? _optionalChain([evaluatedModules, 'optionalAccess',
|
|
60
|
+
const evaluated = node.id ? _optionalChain([evaluatedModules, 'optionalAccess', _17 => _17.getModuleById, 'call', _18 => _18(node.id)]) : void 0;
|
|
52
61
|
if (evaluated) evaluatedModules.invalidateModule(evaluated);
|
|
53
62
|
}
|
|
54
63
|
return [...reached];
|
|
@@ -57,11 +66,11 @@ function invalidateFailedFarmDevModules(server) {
|
|
|
57
66
|
for (const entry of Object.values(server.environments)) {
|
|
58
67
|
const environment = entry;
|
|
59
68
|
const failures = failedModules.get(environment);
|
|
60
|
-
if (!_optionalChain([failures, 'optionalAccess',
|
|
69
|
+
if (!_optionalChain([failures, 'optionalAccess', _19 => _19.size])) continue;
|
|
61
70
|
const runner = environment.runner;
|
|
62
71
|
for (const [id, failed] of failures) {
|
|
63
72
|
const evaluated = runner.evaluatedModules.getModuleById(id);
|
|
64
|
-
if (_optionalChain([evaluated, 'optionalAccess',
|
|
73
|
+
if (_optionalChain([evaluated, 'optionalAccess', _20 => _20.promise]) !== failed) continue;
|
|
65
74
|
const transformed = environment.moduleGraph.getModuleById(id);
|
|
66
75
|
if (transformed) environment.moduleGraph.invalidateModule(transformed);
|
|
67
76
|
if (evaluated) runner.evaluatedModules.invalidateModule(evaluated);
|