@farm.js/core 0.1.78 → 0.1.81
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-EDJNU224.mjs → agent-mcp-handler-GDY5CPPW.mjs} +5 -5
- package/dist/{agent-mcp-handler-LNBYLRTZ.cjs → agent-mcp-handler-IUL6OPC3.cjs} +6 -6
- package/dist/{agent-mcp.d-BErtnhV2.d.ts → agent-mcp.d-Cxi3214_.d.ts} +1 -1
- package/dist/{agent-mcp.d-CYHfcjur.d.mts → agent-mcp.d-DMqOqnOA.d.mts} +1 -1
- package/dist/agent-runtime.cjs +2 -2
- package/dist/agent-runtime.d.mts +5 -4
- package/dist/agent-runtime.d.ts +5 -4
- package/dist/agent-runtime.mjs +1 -1
- package/dist/analyzer-435DCIQ6.cjs +17 -0
- package/dist/{analyzer-M2BG6QYU.mjs → analyzer-IC66UJCU.mjs} +3 -2
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.mjs +1 -1
- package/dist/api/client.native.cjs +1 -1
- package/dist/api/client.native.mjs +1 -1
- package/dist/api/node.cjs +7 -7
- package/dist/api/node.d.mts +7 -6
- package/dist/api/node.d.ts +7 -6
- package/dist/api/node.mjs +6 -6
- package/dist/api/route-manager.cjs +10 -10
- package/dist/api/route-manager.d.mts +7 -6
- package/dist/api/route-manager.d.ts +7 -6
- package/dist/api/route-manager.mjs +9 -9
- package/dist/api/runtime.cjs +6 -6
- package/dist/api/runtime.d.mts +6 -5
- package/dist/api/runtime.d.ts +6 -5
- package/dist/api/runtime.mjs +5 -5
- package/dist/api.cjs +12 -12
- package/dist/api.d.mts +8 -7
- package/dist/api.d.ts +8 -7
- package/dist/api.mjs +11 -11
- package/dist/{app-manifest.d-6NCkLQ1y.d.mts → app-manifest.d-Bbxp5kes.d.mts} +1 -1
- package/dist/{app-manifest.d-DuqLBcmi.d.ts → app-manifest.d-C8Cswd31.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -5
- package/dist/app-markdown.d.mts +8 -7
- package/dist/app-markdown.d.ts +8 -7
- package/dist/app-markdown.mjs +4 -4
- package/dist/{app.d-Dk2HkvPh.d.mts → app.d-BJuSurgy.d.mts} +13 -4
- package/dist/{app.d-Bz6vYBFF.d.ts → app.d-DGIoFt5D.d.ts} +13 -4
- package/dist/cache.cjs +3 -3
- package/dist/cache.mjs +2 -2
- package/dist/{chunk-PG7J7XYT.cjs → chunk-26WP75W5.cjs} +38 -22
- package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
- package/dist/{chunk-GCRT6GJG.mjs → chunk-2HMSSPCZ.mjs} +26 -0
- package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
- package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
- package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
- package/dist/chunk-2UYYXSUS.mjs +401 -0
- package/dist/{chunk-DD2ANOEF.cjs → chunk-2Y2HRZQY.cjs} +843 -627
- package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
- package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
- package/dist/{chunk-XT2CHTDN.mjs → chunk-3RVLJTFZ.mjs} +6 -6
- package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
- package/dist/{chunk-ODYKCC6W.cjs → chunk-46UV2E7I.cjs} +156 -104
- package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
- package/dist/{chunk-VRI43FDN.mjs → chunk-4WXNTAOM.mjs} +1 -1
- package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
- package/dist/chunk-5MMKNW7Q.cjs +54 -0
- package/dist/{chunk-RIMEFQYO.mjs → chunk-5N526T7Q.mjs} +116 -86
- package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
- package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
- package/dist/{chunk-CBP7AKZH.mjs → chunk-6GJZJAED.mjs} +1 -1
- package/dist/{chunk-5REIO5DT.mjs → chunk-6WVRVGKC.mjs} +6 -6
- package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
- package/dist/{chunk-FOULIN4S.cjs → chunk-ADQ2LATR.cjs} +2 -2
- package/dist/{chunk-K3ZELA6U.cjs → chunk-AHVF5GI2.cjs} +10 -10
- package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
- package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
- package/dist/chunk-B7L24VPX.cjs +401 -0
- package/dist/{chunk-DPBQRDWW.cjs → chunk-BBVLOEND.cjs} +4 -4
- package/dist/{chunk-DASQJ5UD.mjs → chunk-BCQIXH7L.mjs} +1 -1
- package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
- package/dist/{chunk-R77D7TCZ.mjs → chunk-BJWJP5A4.mjs} +20 -13
- package/dist/{chunk-X2SEYK7I.mjs → chunk-BPWTSPK6.mjs} +3 -3
- package/dist/{chunk-CKNZJFK5.cjs → chunk-BSX5OGSD.cjs} +4 -4
- package/dist/{chunk-ERT6HQAI.mjs → chunk-BVJUFVCU.mjs} +2 -2
- package/dist/chunk-C5QHZ626.cjs +85 -0
- package/dist/{chunk-HVMQAVZK.cjs → chunk-CL7BUGVB.cjs} +656 -521
- package/dist/{chunk-TZ2YPXLB.cjs → chunk-CN2JOTRO.cjs} +7 -7
- package/dist/{chunk-ZCYGYIC2.cjs → chunk-CPZZBCPO.cjs} +22 -21
- package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
- package/dist/chunk-D2VAANBS.mjs +48 -0
- package/dist/{chunk-VRJAMU34.mjs → chunk-D77OGI6X.mjs} +1 -1
- package/dist/{chunk-6XDDE7M6.cjs → chunk-DJ3PVHTW.cjs} +3 -3
- package/dist/{chunk-XGS76V7L.cjs → chunk-E3HBD2K3.cjs} +22 -22
- package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
- package/dist/{chunk-KUXEII7V.mjs → chunk-ECVSRE4Y.mjs} +3 -2
- package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
- package/dist/chunk-EZYKV24V.mjs +385 -0
- package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
- package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
- package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
- package/dist/{chunk-5KISFWD2.cjs → chunk-FYZD7DUS.cjs} +12 -12
- package/dist/{chunk-H5OVJHXY.cjs → chunk-GAWSWJJ2.cjs} +27 -27
- package/dist/{chunk-A37D6LOS.mjs → chunk-GY63XD6K.mjs} +1 -1
- package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
- package/dist/{chunk-5QZT2EQN.cjs → chunk-HQEYZSF3.cjs} +4 -3
- package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
- package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
- package/dist/{chunk-7RQ5KAK6.mjs → chunk-HTNJ7A4D.mjs} +88 -36
- package/dist/chunk-I4WZRG73.mjs +54 -0
- package/dist/{chunk-BGUTIQII.mjs → chunk-ICOJ2BC6.mjs} +24 -8
- package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
- package/dist/{chunk-E7V2GYBP.mjs → chunk-IM3UINTZ.mjs} +67 -9
- package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
- package/dist/{chunk-AHGOHPRN.mjs → chunk-IPG6B25T.mjs} +235 -100
- package/dist/{chunk-PE2LEWXA.mjs → chunk-J2VUPCCR.mjs} +4 -4
- package/dist/{chunk-Q2EKSSEG.cjs → chunk-JB4BHRFK.cjs} +17 -17
- package/dist/{chunk-YN7G22MP.cjs → chunk-JCYDWJVO.cjs} +3 -3
- package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
- package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
- package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
- package/dist/{chunk-5DREJN4G.cjs → chunk-LKIG5SM6.cjs} +17 -17
- package/dist/{chunk-OGVOKAQU.mjs → chunk-LTOT5KVJ.mjs} +2 -2
- package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
- package/dist/{chunk-67MZTLTF.cjs → chunk-M6DAIE4T.cjs} +27 -1
- package/dist/{chunk-IWGGRXD2.cjs → chunk-MHKPXX3J.cjs} +2 -2
- package/dist/{chunk-F7PKUP6P.cjs → chunk-MOGRRZMW.cjs} +38 -38
- package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
- package/dist/{chunk-WGNGM6MJ.mjs → chunk-N3VMHPIY.mjs} +2 -2
- package/dist/{chunk-EBFTAVGD.mjs → chunk-NOYKBGUK.mjs} +672 -456
- package/dist/{chunk-LMXGCFAM.cjs → chunk-NSLRK5DK.cjs} +1 -1
- package/dist/{chunk-EVVV2XZ2.cjs → chunk-NW3DL2PM.cjs} +53 -7
- package/dist/{chunk-6ZFGWB75.cjs → chunk-OFVCWV2D.cjs} +5 -5
- package/dist/{chunk-NB2ZEBIS.cjs → chunk-OIWDEDUO.cjs} +540 -510
- package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
- package/dist/{chunk-QES76U42.mjs → chunk-ONSZP5JK.mjs} +4 -4
- package/dist/{chunk-H76C5AOU.mjs → chunk-OO4GVGM3.mjs} +4 -4
- package/dist/{chunk-BZJYPIFZ.cjs → chunk-OUDNUFVR.cjs} +12 -12
- package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
- package/dist/{chunk-GFXKO4UW.mjs → chunk-PO5MZIWK.mjs} +49 -49
- package/dist/{chunk-VCW6BR6U.mjs → chunk-POL5RCVU.mjs} +2 -2
- package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
- package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
- package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
- package/dist/{chunk-IGE5BAWK.mjs → chunk-QBJ6N5MT.mjs} +53 -7
- package/dist/{chunk-62DZHPDK.cjs → chunk-QCKSYYXK.cjs} +10 -10
- package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
- package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
- package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
- package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
- package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
- package/dist/{chunk-VO5XDZHK.mjs → chunk-RPA45OQS.mjs} +2 -2
- package/dist/{chunk-PNWRH6TR.mjs → chunk-RZ6XUEQS.mjs} +4 -4
- package/dist/{chunk-S6RUJRWI.mjs → chunk-S3IWDDQ3.mjs} +1 -1
- package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
- package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
- package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
- package/dist/{chunk-26CNCIFI.cjs → chunk-T3SMMLSB.cjs} +2 -2
- package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
- package/dist/{chunk-A7EJATEW.mjs → chunk-TLSGRK7E.mjs} +4 -4
- package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
- package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
- package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
- package/dist/chunk-UDMBUTJD.mjs +85 -0
- package/dist/{chunk-WJ4NUY2H.mjs → chunk-UF4BNKKJ.mjs} +4 -4
- package/dist/{chunk-L7Y65BQU.cjs → chunk-UGD53SNO.cjs} +50 -50
- package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
- package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
- package/dist/{chunk-4SLHSODZ.cjs → chunk-VGHDPEPQ.cjs} +15 -15
- package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
- package/dist/{chunk-47R7CX4A.mjs → chunk-VPGEYX5Y.mjs} +4 -4
- package/dist/chunk-VS7HLH4S.cjs +385 -0
- package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
- package/dist/{chunk-NNGBTJCX.cjs → chunk-W6C3LEXX.cjs} +83 -25
- package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
- package/dist/chunk-WMRGIQTA.cjs +48 -0
- package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
- package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
- package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
- package/dist/{chunk-JHZ6HULQ.cjs → chunk-XOFJUSWC.cjs} +4 -4
- package/dist/{chunk-LJKTJNOF.cjs → chunk-XOGCNKB7.cjs} +3 -3
- package/dist/{chunk-7JTVN6IJ.mjs → chunk-XOXCQGAF.mjs} +7 -6
- package/dist/{chunk-LIC6CMLB.mjs → chunk-YH7ENV3K.mjs} +18 -18
- package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
- package/dist/{chunk-B3IRRANH.mjs → chunk-YHM4PXJY.mjs} +1 -1
- package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
- package/dist/{chunk-ZEWIWAS2.mjs → chunk-YSU3WCW6.mjs} +2 -2
- package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
- package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
- package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
- package/dist/{chunk-MBD34AS5.cjs → chunk-Z5BANEQD.cjs} +6 -6
- package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
- package/dist/{chunk-2G6JPLSL.cjs → chunk-ZIYJWJV2.cjs} +27 -20
- package/dist/{chunk-KZ5BOWJS.cjs → chunk-ZKNXCRUQ.cjs} +28 -28
- package/dist/{cli-runtime.d-CGMGs1Zz.d.mts → cli-runtime.d-D8O1v2_X.d.mts} +7 -6
- package/dist/{cli-runtime.d-BG9q2_vC.d.ts → cli-runtime.d-hf4L1MNP.d.ts} +7 -6
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-component.d-B84GPb_u.d.ts → client-component.d-CX8UCQh-.d.ts} +1 -1
- package/dist/{client-component.d-CdsG1E7p.d.mts → client-component.d-DFwUHlOz.d.mts} +1 -1
- package/dist/{client-plugins.d-DX-iCJWE.d.mts → client-plugins.d-BflSNO-b.d.mts} +5 -16
- package/dist/{client-plugins.d-FptsHgls.d.ts → client-plugins.d-qWp8hNwd.d.ts} +5 -16
- package/dist/client-plugins.d.mts +5 -4
- package/dist/client-plugins.d.ts +5 -4
- package/dist/client.cjs +9 -8
- package/dist/client.d.mts +23 -154
- package/dist/client.d.ts +23 -154
- package/dist/client.mjs +8 -7
- package/dist/config.d.mts +5 -4
- package/dist/config.d.ts +5 -4
- package/dist/cron.cjs +3 -3
- package/dist/cron.mjs +2 -2
- package/dist/desktop.d.mts +6 -5
- package/dist/desktop.d.ts +6 -5
- package/dist/{devtools-TMATFNUY.cjs → devtools-EI5N366Z.cjs} +17 -17
- package/dist/{devtools-7P3OUNLV.mjs → devtools-XJHODO5H.mjs} +14 -14
- package/dist/docs.cjs +18 -18
- package/dist/docs.d.mts +7 -6
- package/dist/docs.d.ts +7 -6
- package/dist/docs.mjs +17 -17
- package/dist/environment/vite.cjs +8 -7
- package/dist/environment/vite.d.mts +9 -0
- package/dist/environment/vite.d.ts +9 -0
- package/dist/environment/vite.mjs +7 -6
- package/dist/{handler.d-Cy3XbY_W.d.ts → handler.d-C2oRihfa.d.ts} +1 -1
- package/dist/{handler.d-DSwLTpa5.d.mts → handler.d-DoH5Krkq.d.mts} +1 -1
- package/dist/{headers.d-DiL9YTH3.d.mts → headers.d-BrX53wFQ.d.mts} +1 -1
- package/dist/{headers.d-Qbjo38a0.d.ts → headers.d-Dj0mfYpb.d.ts} +1 -1
- package/dist/index.cjs +90 -82
- package/dist/{index.d-OccJoC6I.d.ts → index.d-Dhc2scRl.d.ts} +1 -1
- package/dist/{index.d-CqQKX3s6.d.mts → index.d-DzDHOttz.d.mts} +1 -1
- package/dist/index.d.mts +29 -27
- package/dist/index.d.ts +29 -27
- package/dist/index.mjs +92 -84
- package/dist/instrumentation.cjs +3 -3
- package/dist/instrumentation.mjs +2 -2
- package/dist/integrations/orm.cjs +3 -3
- package/dist/integrations/orm.d.mts +5 -4
- package/dist/integrations/orm.d.ts +5 -4
- package/dist/integrations/orm.mjs +2 -2
- package/dist/integrations.cjs +2 -2
- package/dist/integrations.d.mts +5 -4
- package/dist/integrations.d.ts +5 -4
- package/dist/integrations.mjs +1 -1
- package/dist/internal/app-markdown-runtime.cjs +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +15 -8
- package/dist/internal/app-markdown-runtime.d.ts +15 -8
- package/dist/internal/app-markdown-runtime.mjs +3 -3
- package/dist/internal/build-runtime.cjs +63 -62
- package/dist/internal/build-runtime.d.mts +8 -7
- package/dist/internal/build-runtime.d.ts +8 -7
- package/dist/internal/build-runtime.mjs +62 -61
- package/dist/internal/cli-runtime.cjs +37 -34
- package/dist/internal/cli-runtime.d.mts +12 -11
- package/dist/internal/cli-runtime.d.ts +12 -11
- package/dist/internal/cli-runtime.mjs +39 -36
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +112 -14
- package/dist/internal/client-runtime.d.mts +29 -22
- package/dist/internal/client-runtime.d.ts +29 -22
- package/dist/internal/client-runtime.mjs +104 -6
- package/dist/internal/compression-runtime.d.mts +5 -4
- package/dist/internal/compression-runtime.d.ts +5 -4
- package/dist/internal/config-runtime.cjs +16 -16
- package/dist/internal/config-runtime.d.mts +7 -6
- package/dist/internal/config-runtime.d.ts +7 -6
- package/dist/internal/config-runtime.mjs +15 -15
- package/dist/internal/docs-precompiled-runtime.cjs +1 -1
- package/dist/internal/docs-precompiled-runtime.mjs +1 -1
- package/dist/internal/form-actions.cjs +3 -3
- package/dist/internal/form-actions.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/island-codec.cjs +3 -3
- package/dist/internal/island-codec.mjs +2 -2
- package/dist/internal/island-value-store.d.mts +1 -1
- package/dist/internal/island-value-store.d.ts +1 -1
- package/dist/internal/islands-boot.cjs +39 -5
- package/dist/internal/islands-boot.d.mts +19 -1
- package/dist/internal/islands-boot.d.ts +19 -1
- package/dist/internal/islands-boot.mjs +38 -4
- package/dist/internal/islands-runtime.cjs +10 -56
- package/dist/internal/islands-runtime.mjs +6 -52
- package/dist/internal/islands-server.cjs +4 -4
- package/dist/internal/islands-server.mjs +3 -3
- package/dist/internal/islx-actions-client.cjs +36 -0
- package/dist/internal/islx-actions-client.d.mts +13 -0
- package/dist/internal/islx-actions-client.d.ts +13 -0
- package/dist/internal/islx-actions-client.mjs +36 -0
- package/dist/internal/islx-actions-server.cjs +8 -0
- package/dist/internal/islx-actions-server.d.mts +6 -0
- package/dist/internal/islx-actions-server.d.ts +6 -0
- package/dist/internal/islx-actions-server.mjs +8 -0
- package/dist/internal/islx-client.d.mts +0 -4
- package/dist/internal/islx-client.d.ts +0 -4
- package/dist/internal/isolated-boundary.cjs +3 -3
- package/dist/internal/isolated-boundary.d.mts +1 -1
- package/dist/internal/isolated-boundary.d.ts +1 -1
- package/dist/internal/isolated-boundary.mjs +2 -2
- package/dist/internal/metadata-image-runtime.cjs +4 -2
- package/dist/internal/metadata-image-runtime.d.mts +18 -2
- package/dist/internal/metadata-image-runtime.d.ts +18 -2
- package/dist/internal/metadata-image-runtime.mjs +5 -3
- package/dist/internal/native-server-fns.cjs +5 -4
- package/dist/internal/native-server-fns.mjs +4 -3
- package/dist/internal/navigation-neutral.cjs +36 -0
- package/dist/internal/navigation-neutral.d.mts +14 -0
- package/dist/internal/navigation-neutral.d.ts +14 -0
- package/dist/internal/navigation-neutral.mjs +36 -0
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +36 -36
- package/dist/internal/production-runtime.d.mts +15 -13
- package/dist/internal/production-runtime.d.ts +15 -13
- package/dist/internal/production-runtime.mjs +46 -46
- package/dist/internal/server-tree.cjs +5 -4
- package/dist/internal/server-tree.d.mts +3 -4
- package/dist/internal/server-tree.d.ts +3 -4
- package/dist/internal/server-tree.mjs +4 -3
- package/dist/internal/spa-router.cjs +44 -0
- package/dist/internal/spa-router.d.mts +42 -0
- package/dist/internal/spa-router.d.ts +42 -0
- package/dist/internal/spa-router.mjs +44 -0
- package/dist/internal/start-manifest.d.mts +5 -4
- package/dist/internal/start-manifest.d.ts +5 -4
- package/dist/internal/vercel-edge-middleware.cjs +4 -4
- package/dist/internal/vercel-edge-middleware.mjs +3 -3
- package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
- package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
- package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
- package/dist/layers-XLOMMQP7.cjs +21 -0
- package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
- package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
- package/dist/markdown.cjs +3 -3
- package/dist/markdown.d.mts +5 -4
- package/dist/markdown.d.ts +5 -4
- package/dist/markdown.mjs +2 -2
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +5 -4
- package/dist/middleware.d.ts +5 -4
- package/dist/middleware.mjs +9 -9
- package/dist/{mount.d-AcJaUtHF.d.mts → mount.d-DOaeUoWq.d.mts} +1 -1
- package/dist/{mount.d-CPzqOm-a.d.ts → mount.d-DwXjaOHY.d.ts} +1 -1
- package/dist/{native-server-fn-handler-XRTZR7SZ.cjs → native-server-fn-handler-57TCQPSM.cjs} +6 -6
- package/dist/{native-server-fn-handler-WYYY4YBN.mjs → native-server-fn-handler-PYK65A46.mjs} +5 -5
- package/dist/{native-tree-MNUFN5G6.cjs → native-tree-5TENEQ7Y.cjs} +4 -4
- package/dist/{native-tree-JDI3LJSH.mjs → native-tree-LNO7K6JR.mjs} +3 -3
- package/dist/{navigation-delegate.d-C4i5Y39E.d.mts → navigation-delegate.d-BElGUMgt.d.mts} +1 -1
- package/dist/{navigation-delegate.d-_Df9DnPY.d.ts → navigation-delegate.d-o3pPd9VI.d.ts} +1 -1
- package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
- package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
- package/dist/navigation.cjs +6 -6
- package/dist/navigation.d.mts +10 -9
- package/dist/navigation.d.ts +10 -9
- package/dist/navigation.mjs +5 -5
- package/dist/{nitro-NUCTYEKJ.cjs → nitro-XGIO6EQN.cjs} +7 -7
- package/dist/{nitro-VCJ6QQSI.mjs → nitro-YLTGVGK4.mjs} +3 -3
- package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
- package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
- package/dist/observability.cjs +8 -2
- package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.mts} +17 -1
- package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.ts} +17 -1
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/observability.mjs +7 -1
- package/dist/{plugin-TV6W7YNK.mjs → plugin-33I3V42N.mjs} +1 -1
- package/dist/{plugin-AGEFSU7K.cjs → plugin-LN3JBZRR.cjs} +2 -2
- package/dist/plugin.cjs +50 -48
- package/dist/plugin.d.mts +9 -8
- package/dist/plugin.d.ts +9 -8
- package/dist/plugin.mjs +49 -47
- package/dist/query/client.cjs +10 -10
- package/dist/query/client.mjs +5 -5
- package/dist/{render-plan.d-CslZE7o7.d.ts → render-plan.d-BD06tqFA.d.ts} +1 -1
- package/dist/{render-plan.d-4V_NmaA6.d.mts → render-plan.d-xWCRAJeR.d.mts} +1 -1
- package/dist/renderer/none/server.cjs +5 -1
- package/dist/renderer/none/server.d.mts +3 -1
- package/dist/renderer/none/server.d.ts +3 -1
- package/dist/renderer/none/server.mjs +4 -0
- package/dist/renderer/react/server.cjs +6 -6
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +34 -15
- package/dist/renderer-client.d.mts +16 -100
- package/dist/renderer-client.d.ts +16 -100
- package/dist/renderer-client.mjs +23 -4
- package/dist/renderer.cjs +4 -2
- package/dist/renderer.d.mts +49 -6
- package/dist/renderer.d.ts +49 -6
- package/dist/renderer.mjs +3 -1
- package/dist/{request.d-CbV3y7j3.d.ts → request.d-DUMuWxSN.d.ts} +1 -1
- package/dist/{request.d-CmLTxEgS.d.mts → request.d-Dx82V8bz.d.mts} +1 -1
- package/dist/request.d.mts +6 -5
- package/dist/request.d.ts +6 -5
- package/dist/{route-rendering.d-CETnXNez.d.ts → route-rendering.d-BwBVpLtD.d.ts} +1 -1
- package/dist/{route-rendering.d-CmoqfOmj.d.mts → route-rendering.d-DJh6GauM.d.mts} +1 -1
- package/dist/{router.d-ktz7pwYm.d.mts → router.d-BtkKDxUB.d.mts} +1 -1
- package/dist/{router.d-Dga3N5YO.d.ts → router.d-CJBSG5jr.d.ts} +1 -1
- package/dist/routes.cjs +5 -5
- package/dist/routes.d.mts +5 -4
- package/dist/routes.d.ts +5 -4
- package/dist/routes.mjs +4 -4
- package/dist/{rsc-pipeline-N7CWJW7T.mjs → rsc-pipeline-GD6KLOIG.mjs} +20 -20
- package/dist/{rsc-pipeline-JLYD26AR.cjs → rsc-pipeline-H5AXQA7A.cjs} +21 -21
- package/dist/{runtime-QXX2A4TS.mjs → runtime-OJ7FXFUI.mjs} +22 -22
- package/dist/{runtime-F5NSS4DD.cjs → runtime-YWQVBC3V.cjs} +32 -32
- package/dist/{runtime.d-BWLZUOfA.d.ts → runtime.d-BQnD0cfC.d.ts} +1 -1
- package/dist/{runtime.d-DuaXEM0p.d.mts → runtime.d-C4SuZXf6.d.mts} +1 -1
- package/dist/{schema-dev-notice-2GN5V7Y2.mjs → schema-dev-notice-EUPAUJVN.mjs} +2 -2
- package/dist/{schema-dev-notice-6VCOZGG2.cjs → schema-dev-notice-ZSCL47CT.cjs} +5 -5
- package/dist/search-client-A7YJT7JZ.cjs +15 -0
- package/dist/{search-client-W4PEFAQB.mjs → search-client-GIXIEU75.mjs} +1 -1
- package/dist/server-action-security.cjs +1 -1
- package/dist/server-action-security.mjs +1 -1
- package/dist/{server-components-status.d-CqxtJmqP.d.mts → server-components-status.d-9rH7ZoEq.d.mts} +1 -1
- package/dist/{server-components-status.d-C5JpC7_Y.d.ts → server-components-status.d-rfKOcE0N.d.ts} +1 -1
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +7 -6
- package/dist/server-plugins.d.ts +7 -6
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +95 -90
- package/dist/server.d.mts +16 -15
- package/dist/server.d.ts +16 -15
- package/dist/server.mjs +61 -56
- package/dist/{session-AK2OA5UZ.mjs → session-4IB34X35.mjs} +2 -2
- package/dist/session-MOYQJ7E6.cjs +24 -0
- package/dist/{spa-router.d-C3LzwTlY.d.ts → spa-router.d-DMKiBsHH.d.ts} +20 -4
- package/dist/{spa-router.d-BLE188EL.d.mts → spa-router.d-V6XLSTCy.d.mts} +20 -4
- package/dist/{ssg.d-QrFyU6T4.d.mts → ssg.d-BnCKPQL0.d.mts} +2 -2
- package/dist/{ssg.d-DisOfj0I.d.ts → ssg.d-MNedvvMB.d.ts} +2 -2
- package/dist/storage.cjs +2 -2
- package/dist/storage.d.mts +112 -96
- package/dist/storage.d.ts +112 -96
- package/dist/storage.mjs +1 -1
- package/dist/store-core.d-Ad5biajo.d.ts +301 -0
- package/dist/store-core.d-BqJI1-ix.d.mts +301 -0
- package/dist/testing.cjs +13 -13
- package/dist/testing.d.mts +5 -4
- package/dist/testing.d.ts +5 -4
- package/dist/testing.mjs +10 -10
- package/dist/{types.d-DW2vyaUq.d.mts → types.d-C5hlNbHa.d.mts} +8 -1
- package/dist/{types.d-DW2vyaUq.d.ts → types.d-C5hlNbHa.d.ts} +8 -1
- package/dist/{utils.d-BlWZFgdL.d.mts → utils.d-BEKLWa0Z.d.mts} +1 -1
- package/dist/{utils.d-7YcgfTCK.d.ts → utils.d-BdjHKDuT.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +55 -49
- package/dist/vite.d.mts +26 -10
- package/dist/vite.d.ts +26 -10
- package/dist/vite.mjs +54 -48
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +23 -2
- package/types/images.d.ts +9 -0
- package/dist/analyzer-KVTUYGTT.cjs +0 -16
- package/dist/chunk-CQL5ZGFU.cjs +0 -50
- package/dist/chunk-HONTCUK6.mjs +0 -203
- package/dist/chunk-K6PGK7DC.cjs +0 -203
- package/dist/chunk-NBIVGHAT.mjs +0 -50
- package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
- package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
- package/dist/layers-HMEGUEXM.cjs +0 -21
- package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
- package/dist/search-client-6NVC6HM2.cjs +0 -15
- package/dist/session-H4TWP73H.cjs +0 -24
- package/dist/{chunk-JKFN3YVG.mjs → chunk-6JWXHPVR.mjs} +0 -0
- package/dist/{chunk-522K362I.mjs → chunk-C2OLXVUC.mjs} +0 -0
- package/dist/{chunk-MALGIHIC.cjs → chunk-HS4JPIGR.cjs} +0 -0
- package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
- package/dist/{chunk-CUZT7474.cjs → chunk-TCMRLW3K.cjs} +0 -0
- package/dist/{chunk-Q3DO7MVK.mjs → chunk-URBP6DLH.mjs} +0 -0
- package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
- /package/dist/{chunk-AOTD2N5P.cjs → chunk-WGWWRV2M.cjs} +0 -0
|
@@ -126,6 +126,7 @@ function renderSqlTable(model, dialect, modelLookup) {
|
|
|
126
126
|
const tableName = quoteSqlIdentifier(dialect, model.modelName);
|
|
127
127
|
const lines = [`CREATE TABLE IF NOT EXISTS ${tableName} (`];
|
|
128
128
|
const columns = [];
|
|
129
|
+
const foreignKeys = [];
|
|
129
130
|
const internalReferences = createInternalReferenceLookup(model, dialect, modelLookup);
|
|
130
131
|
for (const [fieldKey, field] of Object.entries(model.model.fields)) {
|
|
131
132
|
assertNoSchemaListField(
|
|
@@ -151,7 +152,9 @@ function renderSqlTable(model, dialect, modelLookup) {
|
|
|
151
152
|
}
|
|
152
153
|
const crossOwner = model.foreignKeys?.[fieldKey];
|
|
153
154
|
const reference = internalReferences.get(fieldKey) ?? (crossOwner ? `REFERENCES ${quoteSqlIdentifier(dialect, crossOwner.table)} (${quoteSqlIdentifier(dialect, crossOwner.column)})${crossOwner.onDelete !== "noAction" ? ` ON DELETE ${SQL_ON_DELETE_ACTIONS[crossOwner.onDelete]}` : ""}` : void 0);
|
|
154
|
-
if (reference) {
|
|
155
|
+
if (reference && dialect === "mysql") {
|
|
156
|
+
foreignKeys.push(` FOREIGN KEY (${quoteSqlIdentifier(dialect, field.name)}) ${reference}`);
|
|
157
|
+
} else if (reference) {
|
|
155
158
|
parts.push(reference);
|
|
156
159
|
} else if (field.reference) {
|
|
157
160
|
parts.push(
|
|
@@ -166,6 +169,7 @@ function renderSqlTable(model, dialect, modelLookup) {
|
|
|
166
169
|
` ${definition.unique ? "UNIQUE KEY" : "KEY"} ${quoteSqlIdentifier(dialect, definition.name)} (${definition.columns.join(", ")})`
|
|
167
170
|
);
|
|
168
171
|
}
|
|
172
|
+
columns.push(...foreignKeys);
|
|
169
173
|
}
|
|
170
174
|
lines.push(columns.join(",\n"));
|
|
171
175
|
lines.push(");");
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-4QENVMG7.mjs";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U6GMCDRS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/server-components-status.ts
|
|
10
10
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -90,7 +90,7 @@ function formatFarmRscBlockingMessage(blockingKeys) {
|
|
|
90
90
|
var warnedFallback = false;
|
|
91
91
|
async function resolveFarmRscCheckConfig(config, root, mode) {
|
|
92
92
|
if (!config?.extends) return config;
|
|
93
|
-
const { resolveFarmLayers } = await import("./layers-
|
|
93
|
+
const { resolveFarmLayers } = await import("./layers-744BBUY5.mjs");
|
|
94
94
|
return (await resolveFarmLayers(config, { root, mode })).config;
|
|
95
95
|
}
|
|
96
96
|
function farmAppUsesRscPipeline(config, root) {
|
|
@@ -20,7 +20,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
|
20
20
|
var _chunk7Q7UB4TLcjs = require('./chunk-7Q7UB4TL.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -546,7 +546,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
546
546
|
pathname,
|
|
547
547
|
name: entry.filePath
|
|
548
548
|
};
|
|
549
|
-
|
|
549
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "middleware.start", ...middlewareEvent });
|
|
550
550
|
try {
|
|
551
551
|
const returnedResponse = await executeHandlers(entry.handlers, ctx);
|
|
552
552
|
currentRequest = contextState.getRequest();
|
|
@@ -555,7 +555,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
555
555
|
returnedResponse,
|
|
556
556
|
mapToHeaders(contextState.headers)
|
|
557
557
|
);
|
|
558
|
-
|
|
558
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
559
559
|
type: "middleware.shortCircuit",
|
|
560
560
|
...middlewareEvent,
|
|
561
561
|
status: response.status
|
|
@@ -572,7 +572,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
572
572
|
}
|
|
573
573
|
if (ctx._handled || ctx.response.headersSent || ctx.response.writableEnded) {
|
|
574
574
|
const response = contextState.getResponse() || new Response(null);
|
|
575
|
-
|
|
575
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
576
576
|
type: "middleware.shortCircuit",
|
|
577
577
|
...middlewareEvent,
|
|
578
578
|
status: response.status
|
|
@@ -587,7 +587,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
587
587
|
guarded
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
|
-
|
|
590
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
591
591
|
type: "middleware.complete",
|
|
592
592
|
...middlewareEvent,
|
|
593
593
|
durationMs: Date.now() - middlewareStartTime
|
|
@@ -600,7 +600,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
600
600
|
new Response(null, { status: redirect.status, headers: { Location: redirect.url } }),
|
|
601
601
|
mapToHeaders(contextState.headers)
|
|
602
602
|
);
|
|
603
|
-
|
|
603
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
604
604
|
type: "middleware.shortCircuit",
|
|
605
605
|
...middlewareEvent,
|
|
606
606
|
status: response.status
|
|
@@ -616,7 +616,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
618
|
if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error)) {
|
|
619
|
-
|
|
619
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "middleware.shortCircuit", ...middlewareEvent, status: 404 });
|
|
620
620
|
return {
|
|
621
621
|
request: currentRequest,
|
|
622
622
|
response: null,
|
|
@@ -628,7 +628,7 @@ function createProductionMiddlewareRunner(options = {}) {
|
|
|
628
628
|
notFound: true
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
|
|
631
|
+
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
632
632
|
type: "middleware.error",
|
|
633
633
|
...middlewareEvent,
|
|
634
634
|
error
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
14
14
|
|
|
15
15
|
// src/client-plugin-build.ts
|
|
16
16
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -284,7 +284,7 @@ function isArrayIndex(key) {
|
|
|
284
284
|
// src/plugin-server-runtime.ts
|
|
285
285
|
function hasFarmServerRuntimePlugins(plugins) {
|
|
286
286
|
return (plugins || []).some((plugin) => {
|
|
287
|
-
if (
|
|
287
|
+
if (_chunkWGWWRV2Mcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
|
|
288
288
|
return Boolean(
|
|
289
289
|
plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
|
|
290
290
|
);
|
|
@@ -354,11 +354,11 @@ async function loadTailwindVitePlugin(options = {}, importTailwind = () => impor
|
|
|
354
354
|
try {
|
|
355
355
|
const tailwindVite = (await importTailwind()).default;
|
|
356
356
|
const plugin = options.builder ? adaptTailwindVitePlugin(tailwindVite(), options.builder) : tailwindVite();
|
|
357
|
-
if (options.announce)
|
|
357
|
+
if (options.announce) _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Enabled built-in Tailwind support (@tailwindcss/vite)");
|
|
358
358
|
return plugin;
|
|
359
359
|
} catch (error) {
|
|
360
360
|
if (_chunkKORZ6PREcjs.isMissingPackageError.call(void 0, error, "@tailwindcss/vite")) return createMissingTailwindPlugin();
|
|
361
|
-
|
|
361
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
362
362
|
`Tailwind plugin auto-enable failed${options.label ? ` ${options.label}` : ""}; continuing without it: ${error.message}`
|
|
363
363
|
);
|
|
364
364
|
return void 0;
|
|
@@ -378,7 +378,7 @@ function createMissingTailwindPlugin() {
|
|
|
378
378
|
}
|
|
379
379
|
warnedMissingTailwind = true;
|
|
380
380
|
const file = _path2.default.relative(root, id.split("?", 1)[0]).replace(/\\/g, "/");
|
|
381
|
-
|
|
381
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
382
382
|
`${file} imports Tailwind CSS, but @tailwindcss/vite is not installed; continuing without Tailwind. ${TAILWIND_VITE_INSTALL_HINT}`
|
|
383
383
|
);
|
|
384
384
|
return null;
|
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
_listFarmRegisteredMCPServers
|
|
3
3
|
} from "./chunk-F7MJWW6A.mjs";
|
|
4
4
|
import {
|
|
5
|
+
_withFarmToolCallPayload,
|
|
5
6
|
emitFarmEvent
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EILUVBKS.mjs";
|
|
7
8
|
import {
|
|
8
9
|
applyFarmBasePath,
|
|
9
10
|
stripFarmBasePath
|
|
@@ -81,8 +82,9 @@ async function _readFarmRegisteredMCPCalls(request, basePath) {
|
|
|
81
82
|
if (!isObject(message) || message.method !== "tools/call" || !isRequestId(message.id)) {
|
|
82
83
|
return [];
|
|
83
84
|
}
|
|
84
|
-
const
|
|
85
|
-
|
|
85
|
+
const params = isObject(message.params) ? message.params : void 0;
|
|
86
|
+
const tool = params?.name;
|
|
87
|
+
return typeof tool === "string" && TOOL_NAME.test(tool) ? [{ id: message.id, tool, arguments: params?.arguments }] : [];
|
|
86
88
|
});
|
|
87
89
|
return calls.length ? { server, calls, startedAt } : void 0;
|
|
88
90
|
}
|
|
@@ -102,22 +104,31 @@ function _observeFarmRegisteredMCPResponse(response, observed, waitUntil) {
|
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
106
|
async function reportOutcomes(body, eventStream, { server, calls, startedAt }) {
|
|
105
|
-
const pending = new Map(calls.map((call) => [call.id, call
|
|
107
|
+
const pending = new Map(calls.map((call) => [call.id, call]));
|
|
106
108
|
const answer = (message) => {
|
|
107
109
|
if (!isObject(message) || !isRequestId(message.id) || !isObject(message.result)) return;
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
110
|
+
const call = pending.get(message.id);
|
|
111
|
+
if (call === void 0) return;
|
|
110
112
|
pending.delete(message.id);
|
|
111
113
|
const outcome = message.result.isError === true ? "error" : "success";
|
|
112
|
-
emitFarmEvent(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
emitFarmEvent(
|
|
115
|
+
// Only Farm Infra analytics reads the arguments and result, never logs or traces.
|
|
116
|
+
_withFarmToolCallPayload(
|
|
117
|
+
{
|
|
118
|
+
type: "mcp.tool.complete",
|
|
119
|
+
level: outcome === "error" ? "error" : "info",
|
|
120
|
+
route: server.path,
|
|
121
|
+
server: server.name,
|
|
122
|
+
tool: call.tool,
|
|
123
|
+
outcome,
|
|
124
|
+
durationMs: Math.max(0, performance.now() - startedAt)
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
...call.arguments === void 0 ? {} : { arguments: call.arguments },
|
|
128
|
+
result: message.result
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
);
|
|
121
132
|
};
|
|
122
133
|
const reader = body.getReader();
|
|
123
134
|
const decoder = new TextDecoder();
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
+
var _chunkPWMJBCANcjs = require('./chunk-PWMJBCAN.cjs');
|
|
3
4
|
|
|
4
5
|
|
|
6
|
+
var _chunkMOGRRZMWcjs = require('./chunk-MOGRRZMW.cjs');
|
|
5
7
|
|
|
6
8
|
|
|
7
|
-
var _chunkDPBQRDWWcjs = require('./chunk-DPBQRDWW.cjs');
|
|
8
9
|
|
|
10
|
+
var _chunkY2FEFQAYcjs = require('./chunk-Y2FEFQAY.cjs');
|
|
9
11
|
|
|
10
|
-
var _chunkX3Y6JWJGcjs = require('./chunk-X3Y6JWJG.cjs');
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
var _chunkF7PKUP6Pcjs = require('./chunk-F7PKUP6P.cjs');
|
|
14
14
|
|
|
15
|
+
var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
var _chunkY2FEFQAYcjs = require('./chunk-Y2FEFQAY.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkBBVLOENDcjs = require('./chunk-BBVLOEND.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
@@ -49,7 +49,14 @@ var FARM_RSC_CONFIG_KEYS = [
|
|
|
49
49
|
"agent",
|
|
50
50
|
"mcp"
|
|
51
51
|
];
|
|
52
|
-
var FARM_RSC_PASSTHROUGH_KEYS = [
|
|
52
|
+
var FARM_RSC_PASSTHROUGH_KEYS = [
|
|
53
|
+
"i18n",
|
|
54
|
+
"cache",
|
|
55
|
+
"redirects",
|
|
56
|
+
"rewrites",
|
|
57
|
+
"headers",
|
|
58
|
+
"compress"
|
|
59
|
+
];
|
|
53
60
|
function pickImportTarget(entry) {
|
|
54
61
|
if (typeof entry === "string") return entry;
|
|
55
62
|
if (!entry || typeof entry !== "object") return void 0;
|
|
@@ -60,7 +67,7 @@ function pickImportTarget(entry) {
|
|
|
60
67
|
return void 0;
|
|
61
68
|
}
|
|
62
69
|
async function importFromApp(root, packageName, subpath = ".") {
|
|
63
|
-
const packageDir =
|
|
70
|
+
const packageDir = _chunkBBVLOENDcjs.findFarmAppPackageDir.call(void 0, root, packageName);
|
|
64
71
|
if (!packageDir) return void 0;
|
|
65
72
|
const manifest = JSON.parse(_fs.readFileSync.call(void 0, _path2.default.join(packageDir, "package.json"), "utf8"));
|
|
66
73
|
const exportsMap = manifest.exports;
|
|
@@ -87,12 +94,12 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
87
94
|
importFromApp(root, "@vitejs/plugin-rsc"),
|
|
88
95
|
importFromApp(root, "@vitejs/plugin-react")
|
|
89
96
|
]);
|
|
90
|
-
if (!pluginRsc || !viteRsc || !
|
|
97
|
+
if (!pluginRsc || !viteRsc || !_chunkBBVLOENDcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
|
|
91
98
|
throw new Error(
|
|
92
|
-
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${
|
|
99
|
+
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${_chunkBBVLOENDcjs.FARM_RSC_INSTALL_HINT}`
|
|
93
100
|
);
|
|
94
101
|
}
|
|
95
|
-
const layered = await
|
|
102
|
+
const layered = await _chunkBBVLOENDcjs.resolveFarmRscCheckConfig.call(void 0,
|
|
96
103
|
userConfig,
|
|
97
104
|
root,
|
|
98
105
|
options.command === "build" ? "production" : "development"
|
|
@@ -106,9 +113,9 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
106
113
|
},
|
|
107
114
|
options.command
|
|
108
115
|
);
|
|
109
|
-
const blockingKeys =
|
|
116
|
+
const blockingKeys = _chunkBBVLOENDcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
|
|
110
117
|
if (blockingKeys.length > 0) {
|
|
111
|
-
throw new Error(`[Farm.js] ${
|
|
118
|
+
throw new Error(`[Farm.js] ${_chunkBBVLOENDcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
|
|
112
119
|
}
|
|
113
120
|
const { plugins: vitePlugins = [], ...viteOptions } = _nullishCoalesce(config.vite, () => ( {}));
|
|
114
121
|
const rscConfig = {};
|
|
@@ -116,10 +123,10 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
116
123
|
if (config[key] !== void 0) rscConfig[key] = config[key];
|
|
117
124
|
}
|
|
118
125
|
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await _chunkY2FEFQAYcjs.loadFarmReactPlugin.call(void 0, )).default : void 0)));
|
|
119
|
-
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await
|
|
126
|
+
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, );
|
|
120
127
|
const platform = _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, );
|
|
121
128
|
const mobileClient = config.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
|
|
122
|
-
const clientPluginEntry =
|
|
129
|
+
const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
123
130
|
config.plugins,
|
|
124
131
|
root,
|
|
125
132
|
typeof config.srcDir === "string" ? config.srcDir : "src",
|
|
@@ -156,7 +163,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
156
163
|
server: { environmentName: "rsc" },
|
|
157
164
|
config: {
|
|
158
165
|
preset: options.preset,
|
|
159
|
-
outputDir: options.outputDir &&
|
|
166
|
+
outputDir: options.outputDir && _chunkMOGRRZMWcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
160
167
|
}
|
|
161
168
|
})
|
|
162
169
|
]
|
|
@@ -176,14 +183,14 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
176
183
|
async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
177
184
|
const kept = _nullishCoalesce(config.plugins, () => ( []));
|
|
178
185
|
const names = new Set(
|
|
179
|
-
kept.filter((plugin) =>
|
|
186
|
+
kept.filter((plugin) => _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, [plugin])).map((plugin) => plugin.name)
|
|
180
187
|
);
|
|
181
188
|
if (names.size === 0) return void 0;
|
|
182
189
|
const loads = (plugin) => {
|
|
183
190
|
const candidate = plugin;
|
|
184
|
-
return !!candidate && names.has(candidate.name) &&
|
|
191
|
+
return !!candidate && names.has(candidate.name) && _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, [candidate]);
|
|
185
192
|
};
|
|
186
|
-
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-
|
|
193
|
+
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-XLOMMQP7.cjs");
|
|
187
194
|
const files = [];
|
|
188
195
|
if (userConfig.extends) {
|
|
189
196
|
const { layers } = await resolveFarmLayers(userConfig, { root, mode: "production" });
|
|
@@ -210,7 +217,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
210
217
|
}
|
|
211
218
|
async function configureFarmRscPlugins(config, command) {
|
|
212
219
|
if (config.plugins.length === 0) return config;
|
|
213
|
-
const { PluginManager } = await import("./plugin-
|
|
220
|
+
const { PluginManager } = await import("./plugin-LN3JBZRR.cjs");
|
|
214
221
|
const manager = new PluginManager({
|
|
215
222
|
config,
|
|
216
223
|
isDev: command === "serve",
|
|
@@ -225,7 +232,7 @@ async function createFarmRscDevServer(userConfig, options) {
|
|
|
225
232
|
const config = await createFarmRscViteConfig(userConfig, { ...configOptions, command: "serve" });
|
|
226
233
|
return createServer({
|
|
227
234
|
...config,
|
|
228
|
-
plugins: [..._nullishCoalesce(config.plugins, () => ( [])),
|
|
235
|
+
plugins: [..._nullishCoalesce(config.plugins, () => ( [])), _chunkPWMJBCANcjs.createFarmDevLoopbackPlugin.call(void 0, )],
|
|
229
236
|
...host === void 0 ? {} : { server: { ...config.server, host } }
|
|
230
237
|
});
|
|
231
238
|
}
|
|
@@ -9,10 +9,10 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
9
9
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkLKIG5SM6cjs = require('./chunk-LKIG5SM6.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkHS4JPIGRcjs = require('./chunk-HS4JPIGR.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
|
|
@@ -26,7 +26,7 @@ var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkWIZRYFB2cjs = require('./chunk-WIZRYFB2.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
@@ -46,7 +46,7 @@ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
@@ -148,7 +148,7 @@ function farmApiPlugin(options = {}) {
|
|
|
148
148
|
const existing = apiRoutesCache.get(routePath);
|
|
149
149
|
const existingFile = _optionalChain([endpointSources, 'access', _4 => _4.get, 'call', _5 => _5(routePath), 'optionalAccess', _6 => _6.get, 'call', _7 => _7(normalizedMethod)]);
|
|
150
150
|
if (existingFile) {
|
|
151
|
-
throw new (0,
|
|
151
|
+
throw new (0, _chunkLKIG5SM6cjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
|
|
152
152
|
}
|
|
153
153
|
if (existing) {
|
|
154
154
|
if (!existing.methods.includes(normalizedMethod)) {
|
|
@@ -224,7 +224,7 @@ function farmApiPlugin(options = {}) {
|
|
|
224
224
|
const createRouter = async () => {
|
|
225
225
|
const plugins = options.plugins ? await (_nullishCoalesce(routePlugins, () => ( (routePlugins = Promise.resolve(options.plugins({ root: projectRoot })))))) : [];
|
|
226
226
|
pluginMergedRoutes = plugins.length ? new Map(
|
|
227
|
-
|
|
227
|
+
_chunkWIZRYFB2cjs.mergePluginAPIRoutes.call(void 0, [...apiRoutesCache.values()], plugins, void 0, {
|
|
228
228
|
bodySizeLimit,
|
|
229
229
|
// A plugin calling an app endpoint (an MCP tool, say) goes back through this server,
|
|
230
230
|
// so the middleware that guards the endpoint's path runs for it.
|
|
@@ -244,7 +244,7 @@ function farmApiPlugin(options = {}) {
|
|
|
244
244
|
const url = new URL(request.url);
|
|
245
245
|
const method = request.method.toUpperCase();
|
|
246
246
|
const pathname = url.pathname;
|
|
247
|
-
const match =
|
|
247
|
+
const match = _chunkWIZRYFB2cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), pathname, basePath);
|
|
248
248
|
if (!match) {
|
|
249
249
|
return new Response(JSON.stringify({ error: "Not Found" }), {
|
|
250
250
|
status: 404,
|
|
@@ -252,21 +252,21 @@ function farmApiPlugin(options = {}) {
|
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
const { route, params } = match;
|
|
255
|
-
const endpoint =
|
|
255
|
+
const endpoint = _chunkWIZRYFB2cjs.resolveAPIRouteEndpoint.call(void 0, route, method);
|
|
256
256
|
if (!endpoint) {
|
|
257
257
|
return new Response(JSON.stringify({ error: "Method Not Allowed" }), {
|
|
258
258
|
status: 405,
|
|
259
259
|
headers: {
|
|
260
|
-
Allow:
|
|
260
|
+
Allow: _chunkWIZRYFB2cjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
|
|
261
261
|
"Content-Type": "application/json"
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
try {
|
|
266
|
-
return await
|
|
266
|
+
return await _chunkWIZRYFB2cjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, bodySizeLimit);
|
|
267
267
|
} catch (error) {
|
|
268
268
|
console.error(`[API Error] ${pathname}:`, error);
|
|
269
|
-
return
|
|
269
|
+
return _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
272
|
log(`API router created with ${totalEndpoints} endpoints`);
|
|
@@ -310,7 +310,7 @@ function farmApiPlugin(options = {}) {
|
|
|
310
310
|
const routeModule = await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, filePath);
|
|
311
311
|
const endpoints = {};
|
|
312
312
|
const availableMethods = [];
|
|
313
|
-
for (const method of
|
|
313
|
+
for (const method of _chunkWIZRYFB2cjs.API_ROUTE_METHODS) {
|
|
314
314
|
if (routeModule[method]) {
|
|
315
315
|
availableMethods.push(method);
|
|
316
316
|
endpoints[method] = routeModule[method];
|
|
@@ -323,7 +323,7 @@ function farmApiPlugin(options = {}) {
|
|
|
323
323
|
log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
|
|
324
324
|
}
|
|
325
325
|
} catch (e) {
|
|
326
|
-
if (e instanceof
|
|
326
|
+
if (e instanceof _chunkLKIG5SM6cjs.APIRouteConflictError || e instanceof _chunkML4TOUZPcjs.AmbiguousRouteError) throw e;
|
|
327
327
|
log(`API route load failed at ${filePath}: ${e.message}`);
|
|
328
328
|
}
|
|
329
329
|
}
|
|
@@ -350,7 +350,7 @@ function farmApiPlugin(options = {}) {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
} catch (e) {
|
|
353
|
-
if (e instanceof
|
|
353
|
+
if (e instanceof _chunkLKIG5SM6cjs.APIRouteConflictError || e instanceof _chunkML4TOUZPcjs.AmbiguousRouteError) throw e;
|
|
354
354
|
log(`Root routes.ts load failed: ${e.message}`);
|
|
355
355
|
}
|
|
356
356
|
break;
|
|
@@ -360,14 +360,14 @@ function farmApiPlugin(options = {}) {
|
|
|
360
360
|
const discoverProgrammaticRoutes = async () => {
|
|
361
361
|
const path = await import("path");
|
|
362
362
|
const srcRoot = path.join(server.config.root, srcDir);
|
|
363
|
-
const routeFiles =
|
|
363
|
+
const routeFiles = _chunkHS4JPIGRcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot);
|
|
364
364
|
if (routeFiles.length === 0) return;
|
|
365
365
|
const { getProgrammaticRouteManifest } = await import("./routes.cjs");
|
|
366
366
|
for (const routeFile of routeFiles) {
|
|
367
367
|
try {
|
|
368
368
|
const routesModule = await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0,
|
|
369
369
|
server,
|
|
370
|
-
|
|
370
|
+
_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, routeFile, server.config.root)
|
|
371
371
|
);
|
|
372
372
|
const manifest = getProgrammaticRouteManifest(routesModule);
|
|
373
373
|
if (!manifest) continue;
|
|
@@ -381,7 +381,7 @@ function farmApiPlugin(options = {}) {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
} catch (e) {
|
|
384
|
-
if (e instanceof
|
|
384
|
+
if (e instanceof _chunkLKIG5SM6cjs.APIRouteConflictError || e instanceof _chunkML4TOUZPcjs.AmbiguousRouteError) throw e;
|
|
385
385
|
log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
@@ -433,7 +433,7 @@ function farmApiPlugin(options = {}) {
|
|
|
433
433
|
const runWithDevI18n = async (req, res, handle) => {
|
|
434
434
|
const i18n = await devI18n;
|
|
435
435
|
const pathname = (req.url || "/").split("?")[0];
|
|
436
|
-
if (!
|
|
436
|
+
if (!_chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, pathname, basePath) && !_chunkWIZRYFB2cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), pathname, basePath)) {
|
|
437
437
|
return handle();
|
|
438
438
|
}
|
|
439
439
|
const headers = new Headers();
|
|
@@ -472,15 +472,15 @@ function farmApiPlugin(options = {}) {
|
|
|
472
472
|
if (discoveryPromise) await waitForDiscovery();
|
|
473
473
|
const farmMiddleware = server.__farmMiddleware__;
|
|
474
474
|
let middlewareRan = false;
|
|
475
|
-
if (!
|
|
476
|
-
if (!farmMiddleware || !apiRouterHandler || !
|
|
475
|
+
if (!_chunkWIZRYFB2cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), pathname, basePath)) {
|
|
476
|
+
if (!farmMiddleware || !apiRouterHandler || !_chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, pathname, basePath)) {
|
|
477
477
|
return next();
|
|
478
478
|
}
|
|
479
479
|
await _optionalChain([farmMiddleware, 'access', _10 => _10.waitForDiscovery, 'optionalCall', _11 => _11()]);
|
|
480
480
|
if (await farmMiddleware.execute(req, res, pathname, /* @__PURE__ */ new Map())) return;
|
|
481
481
|
middlewareRan = true;
|
|
482
482
|
const rewrittenPathname = (req.url || url).split("?")[0];
|
|
483
|
-
if (rewrittenPathname === pathname || !
|
|
483
|
+
if (rewrittenPathname === pathname || !_chunkWIZRYFB2cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), rewrittenPathname, basePath)) {
|
|
484
484
|
return next();
|
|
485
485
|
}
|
|
486
486
|
}
|
|
@@ -501,7 +501,7 @@ function farmApiPlugin(options = {}) {
|
|
|
501
501
|
}
|
|
502
502
|
const currentUrl = req.url || url;
|
|
503
503
|
const currentPathname = currentUrl.split("?")[0];
|
|
504
|
-
if (currentPathname !== pathname && !
|
|
504
|
+
if (currentPathname !== pathname && !_chunkWIZRYFB2cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), currentPathname, basePath)) {
|
|
505
505
|
return next();
|
|
506
506
|
}
|
|
507
507
|
const fullUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req);
|
|
@@ -538,7 +538,7 @@ function farmApiPlugin(options = {}) {
|
|
|
538
538
|
console.error("[FARM] API error:", error);
|
|
539
539
|
res.statusCode = 500;
|
|
540
540
|
res.setHeader("Content-Type", "application/json");
|
|
541
|
-
res.end(
|
|
541
|
+
res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
542
542
|
}
|
|
543
543
|
});
|
|
544
544
|
server.middlewares.use((req, res, next) => {
|
|
@@ -562,13 +562,13 @@ function farmApiPlugin(options = {}) {
|
|
|
562
562
|
}
|
|
563
563
|
res.statusCode = 500;
|
|
564
564
|
res.setHeader("Content-Type", "application/json");
|
|
565
|
-
res.end(
|
|
565
|
+
res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
566
566
|
});
|
|
567
567
|
});
|
|
568
568
|
};
|
|
569
569
|
},
|
|
570
570
|
async handleHotUpdate({ file, server, modules }) {
|
|
571
|
-
const normalizedFile =
|
|
571
|
+
const normalizedFile = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, file);
|
|
572
572
|
const fileName = normalizedFile.split("/").pop() || "";
|
|
573
573
|
if (fileName === "routes.ts" || fileName === "routes.tsx" || fileName === "routes.js" || _chunkYUCU6XB4cjs.isProgrammaticRoutesFileName.call(void 0, fileName)) {
|
|
574
574
|
log(`Root routes file updated: ${fileName}`);
|
|
@@ -606,7 +606,7 @@ function farmApiPlugin(options = {}) {
|
|
|
606
606
|
log(`API router recreated`);
|
|
607
607
|
} catch (e) {
|
|
608
608
|
restoreRouteState(previousState);
|
|
609
|
-
if (e instanceof
|
|
609
|
+
if (e instanceof _chunkLKIG5SM6cjs.APIRouteConflictError || e instanceof _chunkML4TOUZPcjs.AmbiguousRouteError) throw e;
|
|
610
610
|
log(`Root routes.ts HMR failed: ${e.message}`);
|
|
611
611
|
}
|
|
612
612
|
return [];
|
|
@@ -634,7 +634,7 @@ function farmApiPlugin(options = {}) {
|
|
|
634
634
|
const routeModule = await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
|
|
635
635
|
removeEndpointsFromFile(file);
|
|
636
636
|
const availableMethods = [];
|
|
637
|
-
for (const method of
|
|
637
|
+
for (const method of _chunkWIZRYFB2cjs.API_ROUTE_METHODS) {
|
|
638
638
|
if (!routeModule[method]) continue;
|
|
639
639
|
availableMethods.push(method);
|
|
640
640
|
addEndpoint(routePath, file, method, routeModule[method]);
|
|
@@ -644,7 +644,7 @@ function farmApiPlugin(options = {}) {
|
|
|
644
644
|
log(`API router recreated`);
|
|
645
645
|
} catch (e) {
|
|
646
646
|
restoreRouteState(previousState);
|
|
647
|
-
if (e instanceof
|
|
647
|
+
if (e instanceof _chunkLKIG5SM6cjs.APIRouteConflictError || e instanceof _chunkML4TOUZPcjs.AmbiguousRouteError) throw e;
|
|
648
648
|
log(`API route HMR failed: ${e.message}`);
|
|
649
649
|
}
|
|
650
650
|
return [];
|