@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
@@ -65,12 +65,12 @@ function collectFarmLlmsTxtPages(sources, options) {
|
|
|
65
65
|
for (const source of sources) {
|
|
66
66
|
const path = source.pattern;
|
|
67
67
|
if (path.includes("[") || pages.has(path)) continue;
|
|
68
|
-
if (include.length && !include.some((pattern) =>
|
|
68
|
+
if (include.length && !include.some((pattern) => _chunk2NOHVIJ3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
69
69
|
continue;
|
|
70
70
|
}
|
|
71
|
-
if (exclude.some((pattern) =>
|
|
71
|
+
if (exclude.some((pattern) => _chunk2NOHVIJ3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
72
72
|
if (isFarmMetadataNoIndex(source.metadata)) continue;
|
|
73
|
-
const target =
|
|
73
|
+
const target = _chunk2NOHVIJ3cjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? getFarmAgentPagePublicPath(_chunk2NOHVIJ3cjs.getFarmMarkdownMirrorPath.call(void 0, path), options) : _chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
|
|
74
74
|
getFarmAgentPagePublicPath(path, options),
|
|
75
75
|
options.trailingSlash === true
|
|
76
76
|
);
|
|
@@ -199,7 +199,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
199
199
|
try {
|
|
200
200
|
const response = await fetchMarkdown(
|
|
201
201
|
new Request(url, {
|
|
202
|
-
headers: { accept: "text/markdown", [
|
|
202
|
+
headers: { accept: "text/markdown", [_chunk2NOHVIJ3cjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
|
|
203
203
|
})
|
|
204
204
|
);
|
|
205
205
|
const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-YFTGIHNC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
resolveFarmComponentExtensions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2HMSSPCZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
parseRouteSlotFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CYRO3WP4.mjs";
|
|
10
10
|
import {
|
|
11
11
|
discoverProgrammaticRoutePaths
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-URBP6DLH.mjs";
|
|
13
13
|
import {
|
|
14
14
|
parseRoutePath
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U6GMCDRS.mjs";
|
|
16
16
|
|
|
17
17
|
// src/routing/generate-route-types.ts
|
|
18
18
|
import * as path from "path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_ERROR_STYLES
|
|
3
3
|
} from "./chunk-XAXTTBUT.mjs";
|
|
4
|
-
import {
|
|
5
|
-
serializeFarmLlmsTxt
|
|
6
|
-
} from "./chunk-S7QEQCVV.mjs";
|
|
7
4
|
import {
|
|
8
5
|
stampFarmCspNonce
|
|
9
6
|
} from "./chunk-22W4FNTG.mjs";
|
|
7
|
+
import {
|
|
8
|
+
serializeFarmLlmsTxt
|
|
9
|
+
} from "./chunk-XGL42MQ7.mjs";
|
|
10
10
|
import {
|
|
11
11
|
emitFarmAgentRead
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YU2MNIIY.mjs";
|
|
13
13
|
import {
|
|
14
14
|
resolveFarmThemeConfig
|
|
15
15
|
} from "./chunk-YWPNIYUP.mjs";
|
|
@@ -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 _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 _chunkAHVF5GI2cjs = require('./chunk-AHVF5GI2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkA4WWKG2Bcjs = require('./chunk-A4WWKG2B.cjs');
|
|
@@ -26,10 +26,10 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
@@ -44,7 +44,7 @@ var _chunkXRRHPBG2cjs = require('./chunk-XRRHPBG2.cjs');
|
|
|
44
44
|
var _chunkCYOTNHDFcjs = require('./chunk-CYOTNHDF.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkVGVRGGP4cjs = require('./chunk-VGVRGGP4.cjs');
|
|
48
48
|
|
|
49
49
|
// src/ssg.ts
|
|
50
50
|
var _fs = require('fs'); var fs = _interopRequireWildcard(_fs);
|
|
@@ -424,7 +424,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
424
424
|
continue;
|
|
425
425
|
}
|
|
426
426
|
const source = await _promises.readFile.call(void 0, route.filePath, "utf8").catch(() => void 0);
|
|
427
|
-
if (_optionalChain([options, 'access', _41 => _41.docsAdapterRoutes, 'optionalAccess', _42 => _42.owns, 'call', _43 => _43(route.path)]) &&
|
|
427
|
+
if (_optionalChain([options, 'access', _41 => _41.docsAdapterRoutes, 'optionalAccess', _42 => _42.owns, 'call', _43 => _43(route.path)]) && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, route.filePath)) {
|
|
428
428
|
ssrRoutes.push(route.path);
|
|
429
429
|
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(null, source, { isDynamic: route.isDynamic }).candidate) {
|
|
430
430
|
staticCandidateDocsPages += 1;
|
|
@@ -796,8 +796,8 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
796
796
|
const shouldGenerateEnv = options.env !== false;
|
|
797
797
|
const shouldGenerateImages = options.images !== false;
|
|
798
798
|
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access', _51 => _51.i18nConfig, 'optionalAccess', _52 => _52.enabled]);
|
|
799
|
-
const sourceRoots =
|
|
800
|
-
const appDirs =
|
|
799
|
+
const sourceRoots = _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
|
|
800
|
+
const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
|
|
801
801
|
const result = {
|
|
802
802
|
apiRoutes: [],
|
|
803
803
|
stalePaths: []
|
|
@@ -814,7 +814,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
814
814
|
componentExtensions: options.componentExtensions,
|
|
815
815
|
sourceRoots
|
|
816
816
|
};
|
|
817
|
-
unifiedSections.push(await
|
|
817
|
+
unifiedSections.push(await _chunkAHVF5GI2cjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
|
|
818
818
|
result.routeTypesPath = unifiedTypesPath;
|
|
819
819
|
} else if (shouldGenerateRoutes) {
|
|
820
820
|
const routeOptions = {
|
|
@@ -828,18 +828,18 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
828
828
|
};
|
|
829
829
|
if (options.check) {
|
|
830
830
|
const routeTypesPath = resolveGeneratedPath(root, srcDir, options.routeTypesOutFile);
|
|
831
|
-
const content = await
|
|
831
|
+
const content = await _chunkAHVF5GI2cjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
|
|
832
832
|
checkGeneratedFile(routeTypesPath, content, result.stalePaths);
|
|
833
833
|
result.routeTypesPath = routeTypesPath;
|
|
834
834
|
} else {
|
|
835
|
-
result.routeTypesPath = await
|
|
835
|
+
result.routeTypesPath = await _chunkAHVF5GI2cjs.generateRouteTypes.call(void 0, routeOptions);
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
if (shouldGenerateApi) {
|
|
839
839
|
const generator = new (0, _chunkA4WWKG2Bcjs.APITypeGenerator)(appDirs);
|
|
840
840
|
const apiRoutes = generator.scanAPIRoutes();
|
|
841
841
|
const apiTypesPath = options.apiTypesOutFile ? _path.resolve.call(void 0, root, options.apiTypesOutFile) : _path.join.call(void 0, root, srcDir, "lib", "api.generated.ts");
|
|
842
|
-
const pluginRoutes =
|
|
842
|
+
const pluginRoutes = _chunkVGVRGGP4cjs.resolvePluginRoutes.call(void 0,
|
|
843
843
|
_optionalChain([options, 'access', _53 => _53.plugins, 'optionalAccess', _54 => _54.filter, 'call', _55 => _55((plugin) => plugin.name !== _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN)])
|
|
844
844
|
);
|
|
845
845
|
const configFiles = [
|
|
@@ -993,7 +993,7 @@ function createStorageMountDeclarations(options, outPath) {
|
|
|
993
993
|
const storage = options.storage;
|
|
994
994
|
if (!storage || !("mounts" in storage) || !Object.values(_nullishCoalesce(storage.mounts, () => ( {}))).some(_chunkXRRHPBG2cjs.isManagedMount))
|
|
995
995
|
return;
|
|
996
|
-
const project =
|
|
996
|
+
const project = _chunk52Q4OB4Acjs.findFarmConfigFile.call(void 0,
|
|
997
997
|
options.root,
|
|
998
998
|
options.configPath && _path.resolve.call(void 0, options.root, options.configPath)
|
|
999
999
|
);
|
|
@@ -348,6 +348,15 @@ function getSpanTraceContext(span) {
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
// src/observability.ts
|
|
351
|
+
var FARM_TOOL_CALL_PAYLOAD = /* @__PURE__ */ Symbol.for("farm.mcp.toolCallPayload");
|
|
352
|
+
function _farmToolCallPayload(event) {
|
|
353
|
+
if (!event || typeof event !== "object") return void 0;
|
|
354
|
+
const payload = event[FARM_TOOL_CALL_PAYLOAD];
|
|
355
|
+
return payload && typeof payload === "object" ? payload : void 0;
|
|
356
|
+
}
|
|
357
|
+
function _withFarmToolCallPayload(input, payload) {
|
|
358
|
+
return Object.defineProperty(input, FARM_TOOL_CALL_PAYLOAD, { value: payload });
|
|
359
|
+
}
|
|
351
360
|
var OBSERVABILITY_RUNTIME = /* @__PURE__ */ Symbol.for("@farm.js/core/observability-runtime/v1");
|
|
352
361
|
var runtime2 = globalThis;
|
|
353
362
|
var shared = _nullishCoalesce(runtime2[OBSERVABILITY_RUNTIME], () => ( (runtime2[OBSERVABILITY_RUNTIME] = {
|
|
@@ -406,6 +415,8 @@ function emitFarmEvent(input) {
|
|
|
406
415
|
...input
|
|
407
416
|
};
|
|
408
417
|
if (event.type === "route.redirect") event.to = event.to.replace(/[?#][\s\S]*$/, "");
|
|
418
|
+
const payload = _farmToolCallPayload(input);
|
|
419
|
+
if (payload) _withFarmToolCallPayload(event, payload);
|
|
409
420
|
const traceContext = recordFarmEventTrace(event);
|
|
410
421
|
if (traceContext) {
|
|
411
422
|
event.traceId = traceContext.traceId;
|
|
@@ -557,4 +568,7 @@ function formatError(error) {
|
|
|
557
568
|
|
|
558
569
|
|
|
559
570
|
|
|
560
|
-
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
exports.normalizeFarmTracingConfig = normalizeFarmTracingConfig; exports.configureFarmTracing = configureFarmTracing; exports.getFarmTraceContext = getFarmTraceContext; exports.runWithFarmSpan = runWithFarmSpan; exports.FARM_TOOL_CALL_PAYLOAD = FARM_TOOL_CALL_PAYLOAD; exports._farmToolCallPayload = _farmToolCallPayload; exports._withFarmToolCallPayload = _withFarmToolCallPayload; exports.configureFarmObservability = configureFarmObservability; exports.normalizeFarmObservabilityConfig = normalizeFarmObservabilityConfig; exports.onFarmEvent = onFarmEvent; exports.resetFarmObservability = resetFarmObservability; exports.emitFarmEvent = emitFarmEvent; exports.runWithFarmRequestSpan = runWithFarmRequestSpan;
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-AG27TI6Q.mjs";
|
|
23
23
|
import {
|
|
24
24
|
getFarmIslandValueHeaders
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UDMBUTJD.mjs";
|
|
26
26
|
import {
|
|
27
27
|
readDeferredDataResponse
|
|
28
28
|
} from "./chunk-7BIW7VCW.mjs";
|
|
@@ -32,6 +32,54 @@ import {
|
|
|
32
32
|
isFarmDeploymentMismatchResponse
|
|
33
33
|
} from "./chunk-IWJONXPF.mjs";
|
|
34
34
|
|
|
35
|
+
// src/client/history-sync.ts
|
|
36
|
+
var FARM_HISTORY_CHANGE_EVENT = "farm:historychange";
|
|
37
|
+
function writeFarmURLSearchHistory(action, href) {
|
|
38
|
+
const router = getInstalledFarmSPARouter();
|
|
39
|
+
if (!router) return false;
|
|
40
|
+
const writeURLSearch = router.writeURLSearch;
|
|
41
|
+
if (typeof writeURLSearch !== "function") return false;
|
|
42
|
+
if (window.history.state !== null && typeof window.history.state !== "object") return false;
|
|
43
|
+
writeURLSearch.call(router, action, href);
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
function navigateFarmURLSearch(action, href, scroll) {
|
|
47
|
+
const router = getInstalledFarmSPARouter();
|
|
48
|
+
if (!router || typeof router.navigate !== "function") return void 0;
|
|
49
|
+
return router.navigate(href, { replace: action === "replace", scroll });
|
|
50
|
+
}
|
|
51
|
+
function dispatchHistoryChange(kind) {
|
|
52
|
+
window.dispatchEvent(
|
|
53
|
+
new CustomEvent(FARM_HISTORY_CHANGE_EVENT, {
|
|
54
|
+
detail: { kind }
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function notifyHistoryChange(kind) {
|
|
59
|
+
if (typeof window === "undefined") return;
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
if (kind === "url-search" && !getInstalledFarmSPARouter()) {
|
|
62
|
+
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
dispatchHistoryChange(kind);
|
|
66
|
+
}, 0);
|
|
67
|
+
}
|
|
68
|
+
function notifyRouterHistoryChange() {
|
|
69
|
+
if (typeof window === "undefined") return;
|
|
70
|
+
setTimeout(() => dispatchHistoryChange("url-search"), 0);
|
|
71
|
+
}
|
|
72
|
+
function subscribeHistoryChange(listener) {
|
|
73
|
+
if (typeof window === "undefined") return () => {
|
|
74
|
+
};
|
|
75
|
+
window.addEventListener("popstate", listener);
|
|
76
|
+
window.addEventListener(FARM_HISTORY_CHANGE_EVENT, listener);
|
|
77
|
+
return () => {
|
|
78
|
+
window.removeEventListener("popstate", listener);
|
|
79
|
+
window.removeEventListener(FARM_HISTORY_CHANGE_EVENT, listener);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
35
83
|
// src/client/metadata-reconciler.ts
|
|
36
84
|
var MANAGED_ATTRIBUTE = FARM_METADATA_ATTRIBUTE;
|
|
37
85
|
var OWNED_SELECTORS = [
|
|
@@ -1185,54 +1233,6 @@ function getScrollElementStorageKey(scrollKey, key) {
|
|
|
1185
1233
|
return `farm-scroll-${scrollKey}:${key}`;
|
|
1186
1234
|
}
|
|
1187
1235
|
|
|
1188
|
-
// src/client/history-sync.ts
|
|
1189
|
-
var FARM_HISTORY_CHANGE_EVENT = "farm:historychange";
|
|
1190
|
-
function writeFarmURLSearchHistory(action, href) {
|
|
1191
|
-
const router = getInstalledFarmSPARouter();
|
|
1192
|
-
if (!router) return false;
|
|
1193
|
-
const writeURLSearch = router.writeURLSearch;
|
|
1194
|
-
if (typeof writeURLSearch !== "function") return false;
|
|
1195
|
-
if (window.history.state !== null && typeof window.history.state !== "object") return false;
|
|
1196
|
-
writeURLSearch.call(router, action, href);
|
|
1197
|
-
return true;
|
|
1198
|
-
}
|
|
1199
|
-
function navigateFarmURLSearch(action, href, scroll) {
|
|
1200
|
-
const router = getInstalledFarmSPARouter();
|
|
1201
|
-
if (!router || typeof router.navigate !== "function") return void 0;
|
|
1202
|
-
return router.navigate(href, { replace: action === "replace", scroll });
|
|
1203
|
-
}
|
|
1204
|
-
function dispatchHistoryChange(kind) {
|
|
1205
|
-
window.dispatchEvent(
|
|
1206
|
-
new CustomEvent(FARM_HISTORY_CHANGE_EVENT, {
|
|
1207
|
-
detail: { kind }
|
|
1208
|
-
})
|
|
1209
|
-
);
|
|
1210
|
-
}
|
|
1211
|
-
function notifyHistoryChange(kind) {
|
|
1212
|
-
if (typeof window === "undefined") return;
|
|
1213
|
-
setTimeout(() => {
|
|
1214
|
-
if (kind === "url-search" && !getInstalledFarmSPARouter()) {
|
|
1215
|
-
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
dispatchHistoryChange(kind);
|
|
1219
|
-
}, 0);
|
|
1220
|
-
}
|
|
1221
|
-
function notifyRouterHistoryChange() {
|
|
1222
|
-
if (typeof window === "undefined") return;
|
|
1223
|
-
setTimeout(() => dispatchHistoryChange("url-search"), 0);
|
|
1224
|
-
}
|
|
1225
|
-
function subscribeHistoryChange(listener) {
|
|
1226
|
-
if (typeof window === "undefined") return () => {
|
|
1227
|
-
};
|
|
1228
|
-
window.addEventListener("popstate", listener);
|
|
1229
|
-
window.addEventListener(FARM_HISTORY_CHANGE_EVENT, listener);
|
|
1230
|
-
return () => {
|
|
1231
|
-
window.removeEventListener("popstate", listener);
|
|
1232
|
-
window.removeEventListener(FARM_HISTORY_CHANGE_EVENT, listener);
|
|
1233
|
-
};
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
1236
|
export {
|
|
1237
1237
|
writeFarmURLSearchHistory,
|
|
1238
1238
|
navigateFarmURLSearch,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveFarmDocsContentDir,
|
|
11
11
|
toFarmDocsMarkdownPage,
|
|
12
12
|
toFarmDocsPublicSitemapConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KCJBIWBM.mjs";
|
|
14
14
|
import {
|
|
15
15
|
docsEngine,
|
|
16
16
|
loadFarmDocsEngine,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-LRPPXKCX.mjs";
|
|
19
19
|
import {
|
|
20
20
|
resolveDocsConfig
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YH7ENV3K.mjs";
|
|
22
22
|
import {
|
|
23
23
|
getFarmDocsAdapterConfigModule,
|
|
24
24
|
isSecretDocsConfigKey
|
|
@@ -85,4 +85,5 @@ function withPlainDiagnostics(error) {
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
exports.isPackageSpecifier = isPackageSpecifier; exports.isDeclarationFile = isDeclarationFile; exports.resolvePackageWithoutTsconfig = resolvePackageWithoutTsconfig; exports.bundleNodeModule = bundleNodeModule; exports.withPlainDiagnostics = withPlainDiagnostics;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
4
4
|
|
|
5
5
|
// src/server/dev-loopback.ts
|
|
6
6
|
var _net = require('net'); var _net2 = _interopRequireDefault(_net);
|
|
@@ -30,7 +30,7 @@ async function listenOnOtherLoopback(server) {
|
|
|
30
30
|
const listening = await new Promise((resolve) => {
|
|
31
31
|
const onError = (error) => {
|
|
32
32
|
if (error.code === "EADDRINUSE") {
|
|
33
|
-
|
|
33
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
34
34
|
`Another process is listening on ${formatHost(other)}:${address.port}; the dev server answers on ${formatHost(address.address)}:${address.port} only.`
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -43,7 +43,7 @@ async function listenOnOtherLoopback(server) {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
if (!listening) return;
|
|
46
|
-
loopback.on("error", (error) =>
|
|
46
|
+
loopback.on("error", (error) => _chunk7U4XF76Rcjs.logger.warn(`Dev loopback listener failed: ${String(error)}`));
|
|
47
47
|
httpServer.once("close", () => loopback.close());
|
|
48
48
|
}
|
|
49
49
|
function formatHost(address) {
|
|
@@ -80,7 +80,8 @@ async function connect(name, loadClient) {
|
|
|
80
80
|
}
|
|
81
81
|
var databaseAccessor = /* @__PURE__ */ Symbol.for("farmjs.storage.managedDatabase");
|
|
82
82
|
var mountSchema = /* @__PURE__ */ Symbol.for("farmjs.storage.managedSchema");
|
|
83
|
-
|
|
83
|
+
var mountType = /* @__PURE__ */ Symbol.for("farmjs.storage.managedType");
|
|
84
|
+
function managedSqliteDriver(name, loadClient, schema, type, mount = name) {
|
|
84
85
|
let pending;
|
|
85
86
|
let initialized;
|
|
86
87
|
let closed = false;
|
|
@@ -92,6 +93,12 @@ function managedSqliteDriver(name, loadClient, schema) {
|
|
|
92
93
|
}));
|
|
93
94
|
}
|
|
94
95
|
function kv() {
|
|
96
|
+
if (type === "sql")
|
|
97
|
+
return Promise.reject(
|
|
98
|
+
new TypeError(
|
|
99
|
+
`Storage mount ${JSON.stringify(mount)} is a SQL mount. Use getDatabase(${JSON.stringify(mount)}) to read and write it, or add a mount with \`type: "kv"\` for key-value data.`
|
|
100
|
+
)
|
|
101
|
+
);
|
|
95
102
|
return initialized ?? (initialized = client().then(async (db) => {
|
|
96
103
|
await db.execute(
|
|
97
104
|
"CREATE TABLE IF NOT EXISTS _farm_kv (key TEXT PRIMARY KEY, value TEXT NOT NULL)"
|
|
@@ -106,6 +113,7 @@ function managedSqliteDriver(name, loadClient, schema) {
|
|
|
106
113
|
name: "farm-managed-sqlite",
|
|
107
114
|
[databaseAccessor]: client,
|
|
108
115
|
[mountSchema]: schema,
|
|
116
|
+
[mountType]: type,
|
|
109
117
|
async hasItem(key) {
|
|
110
118
|
return (await (await kv()).execute({ sql: "SELECT 1 FROM _farm_kv WHERE key=?", args: [key] })).rows.length > 0;
|
|
111
119
|
},
|
|
@@ -114,6 +122,7 @@ function managedSqliteDriver(name, loadClient, schema) {
|
|
|
114
122
|
return rows[0]?.value ?? null;
|
|
115
123
|
},
|
|
116
124
|
async getKeys(base = "") {
|
|
125
|
+
if (type === "sql") return [];
|
|
117
126
|
const { rows } = await (await kv()).execute({
|
|
118
127
|
sql: "SELECT key FROM _farm_kv WHERE instr(key,?)=1 ORDER BY key",
|
|
119
128
|
args: [base]
|
|
@@ -130,6 +139,7 @@ function managedSqliteDriver(name, loadClient, schema) {
|
|
|
130
139
|
await (await kv()).execute({ sql: "DELETE FROM _farm_kv WHERE key=?", args: [key] });
|
|
131
140
|
},
|
|
132
141
|
async clear(base = "") {
|
|
142
|
+
if (type === "sql") return;
|
|
133
143
|
await (await kv()).execute({ sql: "DELETE FROM _farm_kv WHERE instr(key,?)=1", args: [base] });
|
|
134
144
|
},
|
|
135
145
|
async dispose() {
|
|
@@ -345,7 +355,9 @@ async function resolveDriver(config, mount) {
|
|
|
345
355
|
return managedSqliteDriver(
|
|
346
356
|
managedSqliteName(mount, hosted.managed),
|
|
347
357
|
() => import("./libsql-http-2QD224YS.mjs"),
|
|
348
|
-
hosted.schema
|
|
358
|
+
hosted.schema,
|
|
359
|
+
hosted.type,
|
|
360
|
+
mount
|
|
349
361
|
);
|
|
350
362
|
}
|
|
351
363
|
const driverInput = config?.driver ?? "memory";
|
|
@@ -459,23 +471,35 @@ function assertMountSchema(schema) {
|
|
|
459
471
|
throw new TypeError("Pass a schema created with defineSchema() from @farming-labs/orm.");
|
|
460
472
|
}
|
|
461
473
|
}
|
|
474
|
+
function isSqlDriver(driver) {
|
|
475
|
+
return typeof driver === "string" && Object.prototype.hasOwnProperty.call(DATABASE_CONNECTORS, driver);
|
|
476
|
+
}
|
|
462
477
|
function farmStorage(options = {}) {
|
|
463
|
-
if (!options || typeof options !== "object" || Array.isArray(options) || Object.keys(options).some(
|
|
478
|
+
if (!options || typeof options !== "object" || Array.isArray(options) || Object.keys(options).some(
|
|
479
|
+
(key) => key !== "namespace" && key !== "managed" && key !== "schema" && key !== "type"
|
|
480
|
+
))
|
|
464
481
|
throw new TypeError(
|
|
465
|
-
|
|
482
|
+
'Use farmStorage({ type: "kv" }) or farmStorage({ type: "sql" }), with optional `namespace` and `schema`.'
|
|
466
483
|
);
|
|
467
484
|
if (options.managed !== void 0 && options.managed !== true)
|
|
468
485
|
throw new TypeError("Set `managed` to true or omit it when using farmStorage().");
|
|
486
|
+
if (options.type !== void 0 && options.type !== "kv" && options.type !== "sql")
|
|
487
|
+
throw new TypeError('Set `type` to "kv" or "sql" in farmStorage().');
|
|
469
488
|
assertMountSchema(options.schema);
|
|
470
|
-
|
|
489
|
+
if (options.type === "kv" && options.schema)
|
|
490
|
+
throw new TypeError(
|
|
491
|
+
'A schema describes tables, so it needs a SQL mount. Use farmStorage({ type: "sql", schema }).'
|
|
492
|
+
);
|
|
493
|
+
return createManagedMount(options.namespace, options.schema, "farm", options.type);
|
|
471
494
|
}
|
|
472
|
-
function createManagedMount(namespace, schema, declaredDriver) {
|
|
495
|
+
function createManagedMount(namespace, schema, declaredDriver, type) {
|
|
473
496
|
const managed = namespace === void 0 ? true : { name: namespace };
|
|
474
497
|
if (managed !== true) managedSqliteName("", managed);
|
|
475
498
|
return {
|
|
476
499
|
driver: "farm-managed-sqlite",
|
|
477
500
|
managed,
|
|
478
501
|
...declaredDriver && { declaredDriver },
|
|
502
|
+
...type && { type },
|
|
479
503
|
...schema && { schema }
|
|
480
504
|
};
|
|
481
505
|
}
|
|
@@ -496,16 +520,33 @@ function resolveManagedStorageMount(config) {
|
|
|
496
520
|
if (driver !== "farm-managed-sqlite" && !isHostedDriver(driver))
|
|
497
521
|
throw new TypeError("Select a built-in storage driver to use `managed: true`.");
|
|
498
522
|
const declaredDriver = driver === "farm-managed-sqlite" ? options.declaredDriver : driver;
|
|
523
|
+
let type;
|
|
499
524
|
if (driver === "farm-managed-sqlite") {
|
|
525
|
+
type = options.type;
|
|
500
526
|
delete options.declaredDriver;
|
|
527
|
+
delete options.type;
|
|
501
528
|
if (declaredDriver !== void 0 && declaredDriver !== "farm" && !isHostedDriver(declaredDriver))
|
|
502
529
|
throw new TypeError("Use a known storage driver in the managed mount descriptor.");
|
|
530
|
+
if (type !== void 0 && type !== "kv" && type !== "sql")
|
|
531
|
+
throw new TypeError('Use `type: "kv"` or `type: "sql"` in the managed mount descriptor.');
|
|
532
|
+
if (type === void 0 && declaredDriver !== void 0 && declaredDriver !== "farm")
|
|
533
|
+
type = isSqlDriver(declaredDriver) ? "sql" : "kv";
|
|
534
|
+
} else {
|
|
535
|
+
type = isSqlDriver(driver) ? "sql" : "kv";
|
|
536
|
+
if ("type" in options)
|
|
537
|
+
throw new TypeError(
|
|
538
|
+
`Remove \`type\`: a managed ${String(driver)} mount always holds ${type === "sql" ? "tables" : "key-value data"}. Use farmStorage({ type }) to choose.`
|
|
539
|
+
);
|
|
503
540
|
}
|
|
504
541
|
if (Object.keys(options).some((key) => key !== "namespace" && key !== "schema"))
|
|
505
542
|
throw new TypeError(
|
|
506
543
|
"Remove provider connection settings and driver options when using `managed: true`."
|
|
507
544
|
);
|
|
508
545
|
assertMountSchema(options.schema);
|
|
546
|
+
if (type === "kv" && options.schema)
|
|
547
|
+
throw new TypeError(
|
|
548
|
+
driver === "farm-managed-sqlite" ? 'A schema describes tables, so it needs a SQL mount. Use farmStorage({ type: "sql", schema }).' : `${String(driver)} stores key-value data, so its mount cannot take a schema. Use a SQL driver such as sqliteStorage({ managed: true, schema }), or farmStorage({ type: "sql", schema }).`
|
|
549
|
+
);
|
|
509
550
|
let namespace;
|
|
510
551
|
if (managed === true) namespace = options.namespace;
|
|
511
552
|
else if ((driver === "sqlite" || driver === "farm-managed-sqlite") && !("namespace" in options))
|
|
@@ -515,7 +556,8 @@ function resolveManagedStorageMount(config) {
|
|
|
515
556
|
return createManagedMount(
|
|
516
557
|
namespace,
|
|
517
558
|
options.schema,
|
|
518
|
-
typeof declaredDriver === "string" ? declaredDriver : void 0
|
|
559
|
+
typeof declaredDriver === "string" ? declaredDriver : void 0,
|
|
560
|
+
type
|
|
519
561
|
);
|
|
520
562
|
}
|
|
521
563
|
function isHostedDriver(driver) {
|
|
@@ -631,6 +673,10 @@ async function getDatabase(name, options) {
|
|
|
631
673
|
throw new TypeError(
|
|
632
674
|
"Configure a managed SQLite mount named " + JSON.stringify(name) + " before calling getDatabase()."
|
|
633
675
|
);
|
|
676
|
+
if (driver[mountType] === "kv")
|
|
677
|
+
throw new TypeError(
|
|
678
|
+
`Storage mount ${JSON.stringify(name)} is a key-value mount. Use getStorage(${JSON.stringify(name)}) to read and write it, or add a mount with \`type: "sql"\` for tables.`
|
|
679
|
+
);
|
|
634
680
|
const client = await driver[databaseAccessor]();
|
|
635
681
|
if (options && "raw" in options) return client;
|
|
636
682
|
const schema = options?.schema ?? driver[mountSchema];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkXOFJUSWCcjs = require('./chunk-XOFJUSWC.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkMPU5DOXXcjs = require('./chunk-MPU5DOXX.cjs');
|
|
@@ -14,7 +14,7 @@ var _chunkXRFGOYXGcjs = require('./chunk-XRFGOYXG.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkBIAGSYIZcjs = require('./chunk-BIAGSYIZ.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -32,7 +32,7 @@ function createServerQuery(options) {
|
|
|
32
32
|
throw new TypeError("createServerQuery requires a key function");
|
|
33
33
|
}
|
|
34
34
|
const staleTime = normalizeServerQueryStaleTime(options.staleTime);
|
|
35
|
-
const execute =
|
|
35
|
+
const execute = _chunkXOFJUSWCcjs.createServerFn.call(void 0, {
|
|
36
36
|
input: options.input,
|
|
37
37
|
middleware: options.middleware,
|
|
38
38
|
handler: async (context) => {
|
|
@@ -44,7 +44,7 @@ function createServerQuery(options) {
|
|
|
44
44
|
const producer = async () => {
|
|
45
45
|
produced = true;
|
|
46
46
|
const value = await options.handler(context);
|
|
47
|
-
return
|
|
47
|
+
return _chunkXOFJUSWCcjs._parseServerFnSchema.call(void 0, options.output, value, "output", "createServerQuery");
|
|
48
48
|
};
|
|
49
49
|
let data;
|
|
50
50
|
let updatedAt;
|
|
@@ -52,14 +52,14 @@ function createServerQuery(options) {
|
|
|
52
52
|
data = await dedupeServerQueryRequest(cacheKey, context.request, producer);
|
|
53
53
|
updatedAt = Date.now();
|
|
54
54
|
} else {
|
|
55
|
-
const cache =
|
|
55
|
+
const cache = _chunkBIAGSYIZcjs.getFarmDataCache.call(void 0, );
|
|
56
56
|
data = await cache.getOrSet(cacheKey, producer, {
|
|
57
|
-
tags: [
|
|
57
|
+
tags: [_chunkBIAGSYIZcjs.createRouteDataCacheTag.call(void 0, routeKey)],
|
|
58
58
|
revalidate: staleTime === false ? false : staleTime / 1e3
|
|
59
59
|
});
|
|
60
60
|
updatedAt = await _asyncNullishCoalesce(await _asyncOptionalChain([(await cache.getEntryAsync(cacheKey, { allowStale: true })), 'optionalAccess', async _ => _.createdAt]), async () => ( Date.now()));
|
|
61
61
|
if (!produced && options.output) {
|
|
62
|
-
data =
|
|
62
|
+
data = _chunkXOFJUSWCcjs._parseServerFnSchema.call(void 0, options.output, data, "output", "createServerQuery");
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return _chunkMPU5DOXXcjs.createFarmServerQueryResult.call(void 0, data, {
|
|
@@ -92,10 +92,10 @@ function createServerQuery(options) {
|
|
|
92
92
|
enumerable: false
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
|
-
|
|
95
|
+
_chunkXOFJUSWCcjs._attachServerFunctionDescriptor.call(void 0,
|
|
96
96
|
query,
|
|
97
|
-
|
|
98
|
-
const result = await
|
|
97
|
+
_chunkXOFJUSWCcjs.createServerFunctionDescriptor.call(void 0, "query", options, async (value) => {
|
|
98
|
+
const result = await _chunkXOFJUSWCcjs._runServerFunctionForCaller.call(void 0,
|
|
99
99
|
execute,
|
|
100
100
|
value
|
|
101
101
|
);
|