@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkT3SMMLSBcjs = require('./chunk-T3SMMLSB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@ var _chunk26CNCIFIcjs = require('./chunk-26CNCIFI.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk2OFP3IVAcjs = require('./chunk-2OFP3IVA.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ var _chunkGDM3ZD2Ocjs = require('./chunk-GDM3ZD2O.cjs');
|
|
|
25
25
|
var _chunk2LHZD3OPcjs = require('./chunk-2LHZD3OP.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
@@ -42,7 +42,7 @@ function collectSchemaDependencies(owners) {
|
|
|
42
42
|
for (const owner of owners) {
|
|
43
43
|
try {
|
|
44
44
|
known.set(owner.name, _chunkGBMWLDCCcjs.resolveSchemaModels.call(void 0, owner.name, owner.schema));
|
|
45
|
-
for (const model of
|
|
45
|
+
for (const model of _chunk2OFP3IVAcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]])) {
|
|
46
46
|
creators.set(model.modelName.toLowerCase(), owner.name);
|
|
47
47
|
claimedKeys.set(model.modelKey, owner.name);
|
|
48
48
|
}
|
|
@@ -66,7 +66,7 @@ function collectSchemaDependencies(owners) {
|
|
|
66
66
|
if (creator && creator !== owner.name) needs.add(creator);
|
|
67
67
|
};
|
|
68
68
|
try {
|
|
69
|
-
for (const model of
|
|
69
|
+
for (const model of _chunk2OFP3IVAcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]])) {
|
|
70
70
|
for (const field of Object.values(model.model.fields)) {
|
|
71
71
|
if (field.reference) add(referencedTable(owner.name, field.reference.model));
|
|
72
72
|
}
|
|
@@ -117,17 +117,17 @@ async function withTimeout(work, timeoutMs) {
|
|
|
117
117
|
var formatSeconds = (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`;
|
|
118
118
|
function collectSchemaOwners(config) {
|
|
119
119
|
const owners = [];
|
|
120
|
-
const integrationSchemas =
|
|
120
|
+
const integrationSchemas = _chunkWGWWRV2Mcjs.getIntegrationSchemas.call(void 0, config.integrations);
|
|
121
121
|
let integrationClient;
|
|
122
122
|
for (const [name, schema] of Object.entries(integrationSchemas)) {
|
|
123
123
|
owners.push({
|
|
124
124
|
name,
|
|
125
125
|
kind: "integration",
|
|
126
126
|
schema,
|
|
127
|
-
resolveClient: (resolved) => _nullishCoalesce(integrationClient, () => ( (integrationClient =
|
|
127
|
+
resolveClient: (resolved) => _nullishCoalesce(integrationClient, () => ( (integrationClient = _chunkT3SMMLSBcjs.resolveIntegrationOrmRuntimeClient.call(void 0, { config: resolved }))))
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
for (const declaration of
|
|
130
|
+
for (const declaration of _chunk2OFP3IVAcjs.findSchemaTableOwners.call(void 0, config)) {
|
|
131
131
|
if (owners.some((owner) => owner.name === declaration.name)) continue;
|
|
132
132
|
owners.push({
|
|
133
133
|
name: declaration.name,
|
|
@@ -155,7 +155,7 @@ function resolveSchemaExecutor(client, owner, timeoutMs) {
|
|
|
155
155
|
if (candidate === void 0 || candidate === null) continue;
|
|
156
156
|
let adapter;
|
|
157
157
|
try {
|
|
158
|
-
adapter =
|
|
158
|
+
adapter = _chunk2OFP3IVAcjs.createSchemaExecutor.call(void 0, candidate, owner);
|
|
159
159
|
} catch (e3) {
|
|
160
160
|
continue;
|
|
161
161
|
}
|
|
@@ -174,7 +174,7 @@ function resolveSchemaExecutor(client, owner, timeoutMs) {
|
|
|
174
174
|
}
|
|
175
175
|
return void 0;
|
|
176
176
|
}
|
|
177
|
-
var describeReferencedTable = (database, table) =>
|
|
177
|
+
var describeReferencedTable = (database, table) => _chunk2OFP3IVAcjs.describeSchemaTable.call(void 0, database.executor, database.dialect, table);
|
|
178
178
|
async function checkSchema(config, options = {}) {
|
|
179
179
|
const timeoutMs = _nullishCoalesce(options.timeoutMs, () => ( DEFAULT_TIMEOUT_MS));
|
|
180
180
|
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
@@ -208,7 +208,7 @@ async function checkSchema(config, options = {}) {
|
|
|
208
208
|
for (const owner of owners) {
|
|
209
209
|
try {
|
|
210
210
|
knownModels.set(owner.name, _chunkGBMWLDCCcjs.resolveSchemaModels.call(void 0, owner.name, owner.schema));
|
|
211
|
-
ownedModels.set(owner.name,
|
|
211
|
+
ownedModels.set(owner.name, _chunk2OFP3IVAcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]]));
|
|
212
212
|
} catch (error) {
|
|
213
213
|
issues.push({
|
|
214
214
|
severity: "error",
|
|
@@ -364,9 +364,9 @@ async function checkSchema(config, options = {}) {
|
|
|
364
364
|
const database = databases.get(owner.name);
|
|
365
365
|
if (!models || !database) continue;
|
|
366
366
|
try {
|
|
367
|
-
const crossOwner = await
|
|
367
|
+
const crossOwner = await _chunk2OFP3IVAcjs.planCrossOwnerReferences.call(void 0,
|
|
368
368
|
owner,
|
|
369
|
-
|
|
369
|
+
_chunk2OFP3IVAcjs.findSchemaTableOwners.call(void 0, config),
|
|
370
370
|
database.dialect,
|
|
371
371
|
database.executor
|
|
372
372
|
);
|
|
@@ -379,7 +379,7 @@ async function checkSchema(config, options = {}) {
|
|
|
379
379
|
onDelete: reference.onDelete
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
-
const stepPlan = _optionalChain([owner, 'access', _30 => _30.migrations, 'optionalAccess', _31 => _31.length]) ? await
|
|
382
|
+
const stepPlan = _optionalChain([owner, 'access', _30 => _30.migrations, 'optionalAccess', _31 => _31.length]) ? await _chunk2OFP3IVAcjs.planOwnerSchemaSteps.call(void 0, {
|
|
383
383
|
owner: owner.name,
|
|
384
384
|
schema: owner.schema,
|
|
385
385
|
steps: owner.migrations,
|
|
@@ -394,15 +394,15 @@ async function checkSchema(config, options = {}) {
|
|
|
394
394
|
const plan = await checkOwnerTables(
|
|
395
395
|
owner,
|
|
396
396
|
// What a pending rename will produce is not missing yet.
|
|
397
|
-
|
|
397
|
+
_chunk2OFP3IVAcjs.withoutRenameTargets.call(void 0, models, stepPlan),
|
|
398
398
|
database.dialect,
|
|
399
399
|
database.executor,
|
|
400
400
|
issues
|
|
401
401
|
);
|
|
402
402
|
const pending = plan.statements.length + (_nullishCoalesce(_optionalChain([plan, 'access', _32 => _32.upgrades, 'optionalAccess', _33 => _33.length]), () => ( 0)));
|
|
403
|
-
const state = pending > 0 ? await
|
|
404
|
-
const changes = state ?
|
|
405
|
-
if (state && changes &&
|
|
403
|
+
const state = pending > 0 ? await _chunk2OFP3IVAcjs.readSchemaState.call(void 0, database.executor, database.dialect, owner.name) : void 0;
|
|
404
|
+
const changes = state ? _chunk2OFP3IVAcjs.diffSchemaSnapshots.call(void 0, state.snapshot, _chunk2OFP3IVAcjs.createSchemaSnapshot.call(void 0, models)) : void 0;
|
|
405
|
+
if (state && changes && _chunk2OFP3IVAcjs.hasSchemaChanges.call(void 0, changes)) {
|
|
406
406
|
const versions = state.version && owner.version && state.version !== owner.version ? `upgraded ${state.version} \u2192 ${owner.version}` : "changed since it was last migrated";
|
|
407
407
|
issues.push({
|
|
408
408
|
severity: "warning",
|
|
@@ -438,7 +438,7 @@ async function checkSchema(config, options = {}) {
|
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
async function checkOwnerTables(owner, models, dialect, executor, issues) {
|
|
441
|
-
const plan = await
|
|
441
|
+
const plan = await _chunk2OFP3IVAcjs.planSchemaMigration.call(void 0, models, dialect, executor);
|
|
442
442
|
const present = /* @__PURE__ */ new Set([
|
|
443
443
|
...plan.upToDate,
|
|
444
444
|
...plan.drift.map((drift) => drift.table),
|
|
@@ -519,7 +519,7 @@ async function checkOwnerTables(owner, models, dialect, executor, issues) {
|
|
|
519
519
|
table: key.table,
|
|
520
520
|
column: key.column,
|
|
521
521
|
message: `"${key.table}.${key.column}" has no foreign key to "${key.referencedTable}.${key.referencedColumn}", which ${owner.name} could have.`,
|
|
522
|
-
hint: dialect === "sqlite" ? "SQLite can only add a foreign key when it creates the table." : `Allow it with \`${
|
|
522
|
+
hint: dialect === "sqlite" ? "SQLite can only add a foreign key when it creates the table." : `Allow it with \`${_chunk2OFP3IVAcjs.describeForeignKeyApproval.call(void 0, { owner: owner.name, modelKey: key.modelKey })}\` in farm.config, then run \`farm ${owner.name} migrate --apply\`. Rows that point at nothing are checked first.`
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
return plan;
|
|
@@ -601,9 +601,9 @@ async function checkReferences(owner, models, database, databases, resolveTarget
|
|
|
601
601
|
continue;
|
|
602
602
|
}
|
|
603
603
|
if (database.dialect === "sqlite" || dialect === "sqlite") continue;
|
|
604
|
-
const expected =
|
|
605
|
-
const mine =
|
|
606
|
-
const theirs =
|
|
604
|
+
const expected = _chunk2OFP3IVAcjs.getSqlColumnType.call(void 0, field, database.dialect);
|
|
605
|
+
const mine = _chunk2OFP3IVAcjs.columnTypeFamily.call(void 0, expected);
|
|
606
|
+
const theirs = _chunk2OFP3IVAcjs.columnTypeFamily.call(void 0, column.type);
|
|
607
607
|
if (mine && theirs && mine !== theirs) {
|
|
608
608
|
issues.push({
|
|
609
609
|
severity: "warning",
|
|
@@ -621,7 +621,7 @@ async function checkReferences(owner, models, database, databases, resolveTarget
|
|
|
621
621
|
async function checkExtensions(owner, extensions, databaseForTable, ownDatabase, allowExtend, issues) {
|
|
622
622
|
for (const extension of extensions) {
|
|
623
623
|
const database = _nullishCoalesce(databaseForTable(extension.table), () => ( ownDatabase));
|
|
624
|
-
const table = await
|
|
624
|
+
const table = await _chunk2OFP3IVAcjs.describeSchemaTable.call(void 0, database.executor, database.dialect, extension.table);
|
|
625
625
|
const columns = extension.fields.map(({ field }) => field.name);
|
|
626
626
|
if (!table) {
|
|
627
627
|
issues.push({
|
|
@@ -653,9 +653,9 @@ async function checkExtensions(owner, extensions, databaseForTable, ownDatabase,
|
|
|
653
653
|
continue;
|
|
654
654
|
}
|
|
655
655
|
if (database.dialect === "sqlite") continue;
|
|
656
|
-
const expected =
|
|
657
|
-
const mine =
|
|
658
|
-
const theirs =
|
|
656
|
+
const expected = _chunk2OFP3IVAcjs.getSqlColumnType.call(void 0, field, database.dialect);
|
|
657
|
+
const mine = _chunk2OFP3IVAcjs.columnTypeFamily.call(void 0, expected);
|
|
658
|
+
const theirs = _chunk2OFP3IVAcjs.columnTypeFamily.call(void 0, existing.type);
|
|
659
659
|
if (mine && theirs && mine !== theirs) {
|
|
660
660
|
issues.push({
|
|
661
661
|
severity: "warning",
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
|
|
4
4
|
|
|
5
5
|
// src/app-markdown.ts
|
|
6
6
|
var _promises = require('fs/promises');
|
|
@@ -8,11 +8,12 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
8
8
|
var _url = require('url');
|
|
9
9
|
async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
|
|
10
10
|
const source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
11
|
-
return
|
|
11
|
+
return _chunk26WP75W5cjs.createFarmMarkdownRouteModule.call(void 0, {
|
|
12
12
|
source,
|
|
13
13
|
filePath,
|
|
14
14
|
components: options.components,
|
|
15
|
-
config: options.config
|
|
15
|
+
config: options.config,
|
|
16
|
+
renderer: options.renderer
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
async function loadFarmMdxComponents(config, options) {
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
collectFarmLlmsTxtPages,
|
|
3
3
|
getFarmAgentPagePublicPath,
|
|
4
4
|
resolveFarmAgentOrigin
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XGL42MQ7.mjs";
|
|
6
6
|
import {
|
|
7
7
|
getFarmMarkdownMirrorPath,
|
|
8
8
|
isFarmMarkdownMirrorExposed
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YU2MNIIY.mjs";
|
|
10
10
|
import {
|
|
11
11
|
_listFarmMCPCatalogs,
|
|
12
12
|
_listFarmRegisteredMCPServers
|
|
@@ -1,7 +1,7 @@
|
|
|
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(); } } 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 _chunkN3H7UPBMcjs = require('./chunk-N3H7UPBM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkGVYZCJZHcjs = require('./chunk-GVYZCJZH.cjs');
|
|
@@ -18,7 +18,7 @@ var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
|
|
|
18
18
|
var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
@@ -1296,11 +1296,11 @@ function shouldReturnMarkdown(request) {
|
|
|
1296
1296
|
if (url.pathname.endsWith(".md")) return true;
|
|
1297
1297
|
const accept = request.headers.get("accept");
|
|
1298
1298
|
const markdown = Math.max(
|
|
1299
|
-
|
|
1300
|
-
|
|
1299
|
+
_chunk2NOHVIJ3cjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
|
|
1300
|
+
_chunk2NOHVIJ3cjs.farmAcceptQuality.call(void 0, accept, "text/plain")
|
|
1301
1301
|
);
|
|
1302
1302
|
if (markdown <= 0) return false;
|
|
1303
|
-
return markdown >=
|
|
1303
|
+
return markdown >= _chunk2NOHVIJ3cjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
|
|
1304
1304
|
}
|
|
1305
1305
|
function escapeAttribute(value) {
|
|
1306
1306
|
return escapeHtml(value).replace(/'/g, "'");
|
|
@@ -1862,7 +1862,7 @@ function renderDocsSearchMount(clientEntry) {
|
|
|
1862
1862
|
${_chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script type="module" src="${escapeAttribute(clientEntry)}"></script>`)}`;
|
|
1863
1863
|
}
|
|
1864
1864
|
function renderDocsSearchBootstrapScript() {
|
|
1865
|
-
return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script>${
|
|
1865
|
+
return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script>${_chunkN3H7UPBMcjs.generateFarmDocsSearchBootstrapRuntime.call(void 0, )}</script>`);
|
|
1866
1866
|
}
|
|
1867
1867
|
function renderPixelToc(items) {
|
|
1868
1868
|
if (items.length === 0) return '<p class="toc-empty">No sections</p>';
|
|
@@ -1918,7 +1918,7 @@ function renderPixelDocsHtml(page, pages, docs, clientEntry, faviconHref, reques
|
|
|
1918
1918
|
const renderedMarkdown = renderMarkdownDocument(page.body, getThemeTocDepth(docs));
|
|
1919
1919
|
const tocItems = renderedMarkdown.tocItems;
|
|
1920
1920
|
const themeName = getThemeName(docs);
|
|
1921
|
-
const searchEnabled =
|
|
1921
|
+
const searchEnabled = _chunkN3H7UPBMcjs.isFarmDocsSearchEnabled.call(void 0, docs);
|
|
1922
1922
|
const socialMetadata = isFarmDocsSocialImageEnabled(page, docs) ? renderFarmDocsSocialMetadata(
|
|
1923
1923
|
createFarmDocsSocialImageDescriptor(page, docs, requestUrl, socialImageFormat, basePath),
|
|
1924
1924
|
getFarmDocsCustomSocialImage(page)
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatFarmHydrateExportError,
|
|
3
|
+
readFarmHydrateExport
|
|
4
|
+
} from "./chunk-D2VAANBS.mjs";
|
|
1
5
|
import {
|
|
2
6
|
isFarmIslandStrategy
|
|
3
7
|
} from "./chunk-S32PDOLO.mjs";
|
|
@@ -7,10 +11,11 @@ import {
|
|
|
7
11
|
} from "./chunk-4QENVMG7.mjs";
|
|
8
12
|
import {
|
|
9
13
|
getFarmSourceRoots
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Z3RM3VA2.mjs";
|
|
11
15
|
import {
|
|
16
|
+
getFarmRendererComponentExtensions,
|
|
12
17
|
isReactRenderer
|
|
13
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2HMSSPCZ.mjs";
|
|
14
19
|
import {
|
|
15
20
|
PROGRAMMATIC_ROUTE_FILE_NAMES,
|
|
16
21
|
getProgrammaticRouteDefinitionSource,
|
|
@@ -18,10 +23,10 @@ import {
|
|
|
18
23
|
} from "./chunk-DZXD6CYJ.mjs";
|
|
19
24
|
import {
|
|
20
25
|
logger
|
|
21
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-U6GMCDRS.mjs";
|
|
22
27
|
import {
|
|
23
28
|
FARM_VERSION
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-D77OGI6X.mjs";
|
|
25
30
|
|
|
26
31
|
// src/environment-vite.ts
|
|
27
32
|
import { existsSync, readFileSync, realpathSync } from "fs";
|
|
@@ -49,7 +54,7 @@ var FARM_DIAGNOSTIC_RULES = {
|
|
|
49
54
|
},
|
|
50
55
|
CLIENT_SERVER_FUNCTION: {
|
|
51
56
|
severity: "error",
|
|
52
|
-
fix: "
|
|
57
|
+
fix: "Set experimental.serverActions: true so client imports become server references (a React app outside islands mode also needs @farm.js/plugin/rsc), or call it from server code, or expose an API route and call it with createAPIClient.",
|
|
53
58
|
docs: BOUNDARY_DOCS
|
|
54
59
|
},
|
|
55
60
|
CLIENT_SERVER_ONLY_IMPORT: {
|
|
@@ -1293,7 +1298,7 @@ export default __farmComponent;
|
|
|
1293
1298
|
...route.serverProps ? [`__farmServerHooks: ${JSON.stringify(route.serverProps)}`] : []
|
|
1294
1299
|
];
|
|
1295
1300
|
return `
|
|
1296
|
-
import * as __farmRendererRuntime from ${JSON.stringify(options.
|
|
1301
|
+
import * as __farmRendererRuntime from ${JSON.stringify(options.rendererClient)};
|
|
1297
1302
|
import { createRouteModuleFromProgrammaticPage as __farmCreatePageRouteModule } from "@farm.js/core/routes";
|
|
1298
1303
|
${component}
|
|
1299
1304
|
${pending}
|
|
@@ -2337,6 +2342,41 @@ function readIfExists(filePath) {
|
|
|
2337
2342
|
(content) => content !== null
|
|
2338
2343
|
);
|
|
2339
2344
|
}
|
|
2345
|
+
var MARKDOWN_MODULE = /\.mdx?$/i;
|
|
2346
|
+
function readModuleCode(filePath) {
|
|
2347
|
+
const content = readIfExists(filePath);
|
|
2348
|
+
if (content === null || !MARKDOWN_MODULE.test(filePath)) return content;
|
|
2349
|
+
return memoizeInFarmSourceSnapshot("markdown-code", content, () => scanMarkdownCode(content));
|
|
2350
|
+
}
|
|
2351
|
+
function scanMarkdownCode(content) {
|
|
2352
|
+
const lines = content.split(/\r?\n/);
|
|
2353
|
+
const code = [];
|
|
2354
|
+
let index = 0;
|
|
2355
|
+
if (/^---\s*$/.test(lines[0] ?? "")) {
|
|
2356
|
+
const end = lines.findIndex((line, lineIndex) => lineIndex > 0 && /^---\s*$/.test(line));
|
|
2357
|
+
if (end > 0) index = end + 1;
|
|
2358
|
+
}
|
|
2359
|
+
let fence = null;
|
|
2360
|
+
let inCode = false;
|
|
2361
|
+
for (; index < lines.length; index++) {
|
|
2362
|
+
const line = lines[index];
|
|
2363
|
+
const marker = /^ {0,3}(`{3,}|~{3,})/.exec(line)?.[1];
|
|
2364
|
+
if (fence) {
|
|
2365
|
+
if (marker?.[0] === fence[0] && marker.length >= fence.length && line.trim() === marker) {
|
|
2366
|
+
fence = null;
|
|
2367
|
+
}
|
|
2368
|
+
} else if (inCode) {
|
|
2369
|
+
inCode = line.trim() !== "";
|
|
2370
|
+
code.push(line);
|
|
2371
|
+
} else if (marker) {
|
|
2372
|
+
fence = marker;
|
|
2373
|
+
} else if (/^(?:import|export)(?=[\s{*])/.test(line)) {
|
|
2374
|
+
inCode = true;
|
|
2375
|
+
code.push(line);
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
return code.join("\n");
|
|
2379
|
+
}
|
|
2340
2380
|
function readSourceFile(filePath) {
|
|
2341
2381
|
const content = readSourceFileContents(filePath);
|
|
2342
2382
|
if (content !== null) noteFarmSourceRead(filePath);
|
|
@@ -2444,22 +2484,7 @@ function hasUseClientDirective(content) {
|
|
|
2444
2484
|
return false;
|
|
2445
2485
|
}
|
|
2446
2486
|
function hasHydrateExport(content) {
|
|
2447
|
-
|
|
2448
|
-
return false;
|
|
2449
|
-
}
|
|
2450
|
-
if (/\bexport\s+const\s+hydrate\s*=\s*true\b/.test(content)) {
|
|
2451
|
-
return true;
|
|
2452
|
-
}
|
|
2453
|
-
for (const match of content.matchAll(/\bexport\s*\{([^}]*)\}/g)) {
|
|
2454
|
-
for (const specifier of match[1].split(",")) {
|
|
2455
|
-
const parts = specifier.trim().split(/\s+as\s+/);
|
|
2456
|
-
const exportedName2 = (parts[1] ?? parts[0])?.trim();
|
|
2457
|
-
if (exportedName2 === "hydrate") {
|
|
2458
|
-
return true;
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
return false;
|
|
2487
|
+
return readFarmHydrateExport(content)?.value === true;
|
|
2463
2488
|
}
|
|
2464
2489
|
var REGEXP_PREFIX_PUNCTUATION = /* @__PURE__ */ new Set([
|
|
2465
2490
|
"(",
|
|
@@ -2713,7 +2738,7 @@ function isAsyncLocalDeclaration(tokens, name) {
|
|
|
2713
2738
|
}
|
|
2714
2739
|
return false;
|
|
2715
2740
|
}
|
|
2716
|
-
function parseClientModuleMetadata(content, inspectIslandExport) {
|
|
2741
|
+
function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
|
|
2717
2742
|
if (!content) {
|
|
2718
2743
|
return {
|
|
2719
2744
|
isClientComponent: false,
|
|
@@ -2722,7 +2747,11 @@ function parseClientModuleMetadata(content, inspectIslandExport) {
|
|
|
2722
2747
|
};
|
|
2723
2748
|
}
|
|
2724
2749
|
const isClientComponent = hasUseClientDirective(content);
|
|
2725
|
-
const
|
|
2750
|
+
const hydrate = readFarmHydrateExport(content);
|
|
2751
|
+
if (inspectIslandExport && hydrate && hydrate.value === null) {
|
|
2752
|
+
throw new Error(formatFarmHydrateExportError(hydrate, sourcePath));
|
|
2753
|
+
}
|
|
2754
|
+
const hasHydrate = hydrate?.value === true;
|
|
2726
2755
|
return {
|
|
2727
2756
|
isClientComponent,
|
|
2728
2757
|
hasHydrateExport: hasHydrate,
|
|
@@ -2805,7 +2834,11 @@ function getClientModuleHydrationPlan(modulePath, root, mode = "off", options =
|
|
|
2805
2834
|
return plan;
|
|
2806
2835
|
}
|
|
2807
2836
|
const resolvedPath = resolveOwnerSourcePath(resolveModuleSourcePath(modulePath, root), root);
|
|
2808
|
-
const owner = parseClientModuleMetadata(
|
|
2837
|
+
const owner = parseClientModuleMetadata(
|
|
2838
|
+
readIfExists(resolvedPath ?? ""),
|
|
2839
|
+
true,
|
|
2840
|
+
resolvedPath ?? void 0
|
|
2841
|
+
);
|
|
2809
2842
|
if (!resolvedPath || owner.isClientComponent || owner.hasHydrateExport) return plan;
|
|
2810
2843
|
const layout = collectIsolatedClientBoundaries(resolvedPath, root, {
|
|
2811
2844
|
allowDynamicCardinality: true,
|
|
@@ -2857,7 +2890,7 @@ function planClientModuleHydration(modulePath, root, mode, options) {
|
|
|
2857
2890
|
if (mode === "off" && !asyncOwner) return emptyPlan();
|
|
2858
2891
|
const resolvedPath = resolveOwnerSourcePath(resolveModuleSourcePath(modulePath, root), root);
|
|
2859
2892
|
const content = readIfExists(resolvedPath ?? "");
|
|
2860
|
-
const parsed = parseClientModuleMetadata(content, true);
|
|
2893
|
+
const parsed = parseClientModuleMetadata(content, true, resolvedPath ?? void 0);
|
|
2861
2894
|
if (!resolvedPath) return emptyPlan("the owner source could not be resolved");
|
|
2862
2895
|
if (parsed.isClientComponent) {
|
|
2863
2896
|
return emptyPlan("the owner is already a client component");
|
|
@@ -3157,11 +3190,12 @@ function findParserSensitiveJsxContainer(content, localBindings) {
|
|
|
3157
3190
|
for (let index = 0; index < tokens.length - 1; index++) {
|
|
3158
3191
|
if (tokens[index].value !== "<") continue;
|
|
3159
3192
|
if (tokens[index + 1].value === "/") {
|
|
3160
|
-
const closing = tokens[index + 2]
|
|
3161
|
-
const at = closing ? open.lastIndexOf(closing) : -1;
|
|
3193
|
+
const closing = tokens[index + 2];
|
|
3194
|
+
const at = closing?.kind === "identifier" ? open.lastIndexOf(closing.value) : -1;
|
|
3162
3195
|
if (at !== -1) open.length = at;
|
|
3163
3196
|
continue;
|
|
3164
3197
|
}
|
|
3198
|
+
if (tokens[index + 1].kind !== "identifier") continue;
|
|
3165
3199
|
const tag = tokens[index + 1].value;
|
|
3166
3200
|
if (names.has(tag)) {
|
|
3167
3201
|
let container;
|
|
@@ -3378,7 +3412,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3378
3412
|
if (cached !== void 0) return cached;
|
|
3379
3413
|
if (visiting.has(moduleSourcePath)) return 0;
|
|
3380
3414
|
visiting.add(moduleSourcePath);
|
|
3381
|
-
const content =
|
|
3415
|
+
const content = readModuleCode(moduleSourcePath);
|
|
3382
3416
|
const parsed = parseClientModuleMetadata(content, false);
|
|
3383
3417
|
if (parsed.isClientComponent) {
|
|
3384
3418
|
if (!isIsolatableClientBoundarySource(content)) {
|
|
@@ -3401,7 +3435,14 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3401
3435
|
}
|
|
3402
3436
|
const importedBindings = getStaticImportBindings(content);
|
|
3403
3437
|
let estimatedBoundaryCount2 = 0;
|
|
3404
|
-
|
|
3438
|
+
const specifiers = new Set(getImportSpecifiers(content));
|
|
3439
|
+
for (const specifier of getImportSpecifiers(content, { dynamic: true })) {
|
|
3440
|
+
if (specifiers.has(specifier)) continue;
|
|
3441
|
+
const imported = resolveImportedModule(moduleSourcePath, specifier, root);
|
|
3442
|
+
if (!imported.local || !imported.path || !MARKDOWN_MODULE.test(imported.path)) continue;
|
|
3443
|
+
estimatedBoundaryCount2 += visit(imported.path);
|
|
3444
|
+
}
|
|
3445
|
+
for (const specifier of specifiers) {
|
|
3405
3446
|
const imported = resolveImportedModule(moduleSourcePath, specifier, root);
|
|
3406
3447
|
const importedPath = imported.path;
|
|
3407
3448
|
if (!importedPath) continue;
|
|
@@ -3517,7 +3558,7 @@ function inspectClientModuleMetadata(resolvedPath, root, visited, inspectIslandE
|
|
|
3517
3558
|
const target = resolveDefaultReexport(resolvedPath, content, root);
|
|
3518
3559
|
if (target) return inspectClientModuleMetadata(target, root, visited, true);
|
|
3519
3560
|
}
|
|
3520
|
-
const parsed = parseClientModuleMetadata(content, inspectIslandExport);
|
|
3561
|
+
const parsed = parseClientModuleMetadata(content, inspectIslandExport, resolvedPath);
|
|
3521
3562
|
if (parsed.isClientComponent) {
|
|
3522
3563
|
return {
|
|
3523
3564
|
isClientComponent: true,
|
|
@@ -4223,7 +4264,7 @@ var ENVIRONMENT_FUNCTIONS = /* @__PURE__ */ new Set([
|
|
|
4223
4264
|
]);
|
|
4224
4265
|
var MODULE_EXTENSION_RE2 = /\.[cm]?[jt]sx?$/;
|
|
4225
4266
|
function transformEnvironmentFunctions(options) {
|
|
4226
|
-
if (!isTransformableModule(options.id) || !containsEnvironmentFunction(options.code)) {
|
|
4267
|
+
if (!isTransformableModule(options.id, options.componentExtensions) || !containsEnvironmentFunction(options.code)) {
|
|
4227
4268
|
return null;
|
|
4228
4269
|
}
|
|
4229
4270
|
let output = options.code;
|
|
@@ -4255,6 +4296,9 @@ function transformEnvironmentFunctions(options) {
|
|
|
4255
4296
|
}
|
|
4256
4297
|
function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
4257
4298
|
let routesFiles = /* @__PURE__ */ new Set();
|
|
4299
|
+
const componentExtensions = new Set(
|
|
4300
|
+
getFarmRendererComponentExtensions(options.renderer || void 0)
|
|
4301
|
+
);
|
|
4258
4302
|
let farmApi;
|
|
4259
4303
|
let isBuild = false;
|
|
4260
4304
|
let projectRoot = process.cwd();
|
|
@@ -4303,7 +4347,13 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4303
4347
|
transformOptions?.ssr
|
|
4304
4348
|
);
|
|
4305
4349
|
const parse3 = (source) => this.parse(source);
|
|
4306
|
-
const result = transformEnvironmentFunctions({
|
|
4350
|
+
const result = transformEnvironmentFunctions({
|
|
4351
|
+
code,
|
|
4352
|
+
id,
|
|
4353
|
+
environment,
|
|
4354
|
+
parse: parse3,
|
|
4355
|
+
componentExtensions
|
|
4356
|
+
});
|
|
4307
4357
|
if (environment === "client" && !isBuild && !parseProgrammaticRouteModuleId(id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
|
|
4308
4358
|
this.error(routeSourceError(moduleFile(id)));
|
|
4309
4359
|
}
|
|
@@ -4627,9 +4677,11 @@ function isEnvironmentFunctionKind(value) {
|
|
|
4627
4677
|
function containsEnvironmentFunction(code) {
|
|
4628
4678
|
return Array.from(ENVIRONMENT_FUNCTIONS).some((name) => code.includes(name));
|
|
4629
4679
|
}
|
|
4630
|
-
function isTransformableModule(id) {
|
|
4631
|
-
const cleanId = id.split("?",
|
|
4632
|
-
|
|
4680
|
+
function isTransformableModule(id, componentExtensions = /* @__PURE__ */ new Set()) {
|
|
4681
|
+
const [cleanId = id, query = ""] = id.split("?", 2);
|
|
4682
|
+
if (/\.d\.[cm]?ts$/.test(cleanId)) return false;
|
|
4683
|
+
if (MODULE_EXTENSION_RE2.test(cleanId)) return true;
|
|
4684
|
+
return componentExtensions.has(path8.extname(cleanId).toLowerCase()) && !/(?:^|&)type=style\b/.test(query);
|
|
4633
4685
|
}
|
|
4634
4686
|
function transformError(id, message) {
|
|
4635
4687
|
return new Error(`[Farm environment functions] ${message} in ${id.split("?", 1)[0]}`);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
beginFarmServerQueryAction,
|
|
3
|
+
completeFarmServerQueryAction,
|
|
4
|
+
shouldApplyFarmServerQueryActionResult
|
|
5
|
+
} from "./chunk-XMHERKSE.mjs";
|
|
6
|
+
import {
|
|
7
|
+
isFarmIslandsActionResult
|
|
8
|
+
} from "./chunk-X3EFRVXY.mjs";
|
|
9
|
+
import {
|
|
10
|
+
applyFarmCacheInvalidations
|
|
11
|
+
} from "./chunk-AZQXXXDX.mjs";
|
|
12
|
+
|
|
13
|
+
// src/islands-action-client.ts
|
|
14
|
+
function createFarmServerFnTransportError(value) {
|
|
15
|
+
const failure = value;
|
|
16
|
+
const error = new Error(
|
|
17
|
+
failure && typeof failure.message === "string" ? failure.message : "Server function failed"
|
|
18
|
+
);
|
|
19
|
+
if (failure && failure.name === "ServerFnFailure" && typeof failure.code === "string" && Number.isInteger(failure.status) && failure.status >= 400 && failure.status <= 599 && Object.prototype.hasOwnProperty.call(failure, "data")) {
|
|
20
|
+
error.name = "ServerFnFailure";
|
|
21
|
+
error.code = failure.code;
|
|
22
|
+
error.status = failure.status;
|
|
23
|
+
error.data = failure.data;
|
|
24
|
+
Object.defineProperty(error, /* @__PURE__ */ Symbol.for("farm.server-fn.failure"), {
|
|
25
|
+
value: true,
|
|
26
|
+
enumerable: false
|
|
27
|
+
});
|
|
28
|
+
return error;
|
|
29
|
+
}
|
|
30
|
+
error.name = "ServerActionError";
|
|
31
|
+
return error;
|
|
32
|
+
}
|
|
33
|
+
var farmIslandsActionInterceptor = async (call, next) => {
|
|
34
|
+
const invocation = beginFarmServerQueryAction(call.id, call.args);
|
|
35
|
+
let result;
|
|
36
|
+
try {
|
|
37
|
+
result = await next();
|
|
38
|
+
} catch (error2) {
|
|
39
|
+
if (error2 instanceof Error && error2.message.startsWith("Server action failed")) {
|
|
40
|
+
throw createFarmServerFnTransportError(void 0);
|
|
41
|
+
}
|
|
42
|
+
throw error2;
|
|
43
|
+
}
|
|
44
|
+
if (!isFarmIslandsActionResult(result)) return result;
|
|
45
|
+
const { invalidations, error } = result.__farmAction;
|
|
46
|
+
if (shouldApplyFarmServerQueryActionResult(invocation))
|
|
47
|
+
applyFarmCacheInvalidations(invalidations);
|
|
48
|
+
if (error) throw createFarmServerFnTransportError(error);
|
|
49
|
+
return completeFarmServerQueryAction(invocation, result.value);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
farmIslandsActionInterceptor
|
|
54
|
+
};
|