@farm.js/core 0.1.78 → 0.1.80
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-BPa5n0ld.d.ts} +1 -1
- package/dist/{agent-mcp.d-CYHfcjur.d.mts → agent-mcp.d-DOP95Jxm.d.mts} +1 -1
- package/dist/agent-runtime.cjs +2 -2
- package/dist/agent-runtime.d.mts +4 -4
- package/dist/agent-runtime.d.ts +4 -4
- package/dist/agent-runtime.mjs +1 -1
- package/dist/{analyzer-M2BG6QYU.mjs → analyzer-F7CWE5VA.mjs} +2 -2
- package/dist/analyzer-I7RBBQ65.cjs +16 -0
- package/dist/api/node.cjs +6 -6
- package/dist/api/node.d.mts +6 -6
- package/dist/api/node.d.ts +6 -6
- package/dist/api/node.mjs +5 -5
- package/dist/api/route-manager.cjs +8 -8
- package/dist/api/route-manager.d.mts +6 -6
- package/dist/api/route-manager.d.ts +6 -6
- package/dist/api/route-manager.mjs +7 -7
- package/dist/api/runtime.cjs +5 -5
- package/dist/api/runtime.d.mts +5 -5
- package/dist/api/runtime.d.ts +5 -5
- package/dist/api/runtime.mjs +4 -4
- package/dist/api.cjs +10 -10
- package/dist/api.d.mts +7 -7
- package/dist/api.d.ts +7 -7
- package/dist/api.mjs +9 -9
- package/dist/{app-manifest.d-6NCkLQ1y.d.mts → app-manifest.d-9UD6BznX.d.mts} +1 -1
- package/dist/{app-manifest.d-DuqLBcmi.d.ts → app-manifest.d-CO6Iu0Hx.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -5
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/app-markdown.mjs +4 -4
- package/dist/{app.d-Dk2HkvPh.d.mts → app.d-DXeRWZK7.d.mts} +4 -4
- package/dist/{app.d-Bz6vYBFF.d.ts → app.d-DwX1ePhs.d.ts} +4 -4
- package/dist/cache.cjs +3 -3
- package/dist/cache.mjs +2 -2
- package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
- package/dist/{chunk-4SLHSODZ.cjs → chunk-2FK47RRZ.cjs} +13 -13
- package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
- package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
- package/dist/{chunk-B3IRRANH.mjs → chunk-2RRTOKRZ.mjs} +1 -1
- package/dist/{chunk-PNWRH6TR.mjs → chunk-3JQBQG7K.mjs} +4 -4
- package/dist/{chunk-H76C5AOU.mjs → chunk-3K2E55BJ.mjs} +2 -2
- package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
- package/dist/{chunk-R77D7TCZ.mjs → chunk-44G4XHEL.mjs} +13 -6
- package/dist/{chunk-6XDDE7M6.cjs → chunk-4H4ZXUNB.cjs} +3 -3
- package/dist/{chunk-LIC6CMLB.mjs → chunk-4MIDUSIX.mjs} +13 -13
- package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
- package/dist/{chunk-VRI43FDN.mjs → chunk-4WXNTAOM.mjs} +1 -1
- package/dist/{chunk-5KISFWD2.cjs → chunk-5OAN7BG5.cjs} +12 -12
- package/dist/{chunk-DPBQRDWW.cjs → chunk-5VDJEKGK.cjs} +3 -3
- 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-K3ZELA6U.cjs → chunk-7DD5TNPS.cjs} +8 -8
- package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
- package/dist/{chunk-62DZHPDK.cjs → chunk-7YLDUB4R.cjs} +10 -10
- package/dist/{chunk-ZEWIWAS2.mjs → chunk-A5D3UMLJ.mjs} +1 -1
- package/dist/{chunk-NNGBTJCX.cjs → chunk-ANZLZNNX.cjs} +83 -25
- package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
- package/dist/{chunk-ZCYGYIC2.cjs → chunk-AXA2BSX3.cjs} +2 -2
- package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
- package/dist/{chunk-X2SEYK7I.mjs → chunk-BPWTSPK6.mjs} +3 -3
- package/dist/{chunk-LMXGCFAM.cjs → chunk-CCMP4JD2.cjs} +1 -1
- package/dist/{chunk-JHZ6HULQ.cjs → chunk-CGIVCGH5.cjs} +2 -2
- package/dist/{chunk-ERT6HQAI.mjs → chunk-CNDBLUKI.mjs} +2 -2
- package/dist/{chunk-OGVOKAQU.mjs → chunk-COTFX4GT.mjs} +1 -1
- package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
- package/dist/{chunk-2G6JPLSL.cjs → chunk-DVHFIETW.cjs} +25 -18
- package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
- package/dist/{chunk-VCW6BR6U.mjs → chunk-EG5YBYHO.mjs} +2 -2
- package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
- package/dist/{chunk-XT2CHTDN.mjs → chunk-EY7ED5UW.mjs} +3 -3
- package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
- package/dist/{chunk-DD2ANOEF.cjs → chunk-G4SZC2WH.cjs} +589 -472
- package/dist/{chunk-H5OVJHXY.cjs → chunk-GAWSWJJ2.cjs} +27 -27
- package/dist/{chunk-CKNZJFK5.cjs → chunk-GBESKA76.cjs} +3 -3
- package/dist/{chunk-EBFTAVGD.mjs → chunk-GBW5DU7V.mjs} +327 -210
- package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
- package/dist/{chunk-Q2EKSSEG.cjs → chunk-HEDGTXXB.cjs} +14 -14
- package/dist/{chunk-5QZT2EQN.cjs → chunk-HNUBRUFQ.cjs} +2 -2
- package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
- package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
- package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
- package/dist/{chunk-VRJAMU34.mjs → chunk-JGEN2FIT.mjs} +1 -1
- package/dist/{chunk-QES76U42.mjs → chunk-K3XKEZR6.mjs} +3 -3
- package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
- package/dist/{chunk-7JTVN6IJ.mjs → chunk-KEU55O2D.mjs} +1 -1
- package/dist/{chunk-5REIO5DT.mjs → chunk-KKVRWNDH.mjs} +3 -3
- package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
- package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
- package/dist/{chunk-F7PKUP6P.cjs → chunk-LVGB5PYK.cjs} +27 -27
- package/dist/{chunk-7RQ5KAK6.mjs → chunk-MDEFTF63.mjs} +69 -14
- package/dist/{chunk-IWGGRXD2.cjs → chunk-MHKPXX3J.cjs} +2 -2
- package/dist/{chunk-5DREJN4G.cjs → chunk-MQOHYV6L.cjs} +15 -15
- package/dist/{chunk-BGUTIQII.mjs → chunk-MUZHULW2.mjs} +1 -1
- package/dist/{chunk-WGNGM6MJ.mjs → chunk-MZ5QGWRW.mjs} +2 -2
- package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
- package/dist/{chunk-WJ4NUY2H.mjs → chunk-NJ4OASLP.mjs} +4 -4
- package/dist/{chunk-EVVV2XZ2.cjs → chunk-NW3DL2PM.cjs} +53 -7
- package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
- package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
- package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
- package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
- package/dist/{chunk-PG7J7XYT.cjs → chunk-Q4TRGTO7.cjs} +6 -6
- package/dist/{chunk-KUXEII7V.mjs → chunk-Q4YEAWUK.mjs} +1 -1
- package/dist/{chunk-IGE5BAWK.mjs → chunk-QBJ6N5MT.mjs} +53 -7
- package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
- package/dist/{chunk-S6RUJRWI.mjs → chunk-QHAISITM.mjs} +1 -1
- package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
- package/dist/{chunk-TZ2YPXLB.cjs → chunk-RLCOWWE5.cjs} +7 -7
- package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
- package/dist/{chunk-VO5XDZHK.mjs → chunk-RPA45OQS.mjs} +2 -2
- package/dist/{chunk-A37D6LOS.mjs → chunk-RQBGHHOQ.mjs} +1 -1
- package/dist/{chunk-BZJYPIFZ.cjs → chunk-SDICLSQU.cjs} +8 -8
- 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-LJKTJNOF.cjs → chunk-TS3ZHJN5.cjs} +3 -3
- 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-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
- package/dist/{chunk-PE2LEWXA.mjs → chunk-UJPE75GF.mjs} +1 -1
- package/dist/{chunk-6ZFGWB75.cjs → chunk-UWOCYINY.cjs} +4 -4
- package/dist/{chunk-E7V2GYBP.mjs → chunk-V73Y4UBL.mjs} +67 -9
- package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
- package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
- package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
- package/dist/{chunk-47R7CX4A.mjs → chunk-WBPVLCNE.mjs} +1 -1
- package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
- package/dist/{chunk-NB2ZEBIS.cjs → chunk-WJ2O2MPP.cjs} +287 -288
- package/dist/{chunk-HVMQAVZK.cjs → chunk-X4TSMQWF.cjs} +333 -303
- package/dist/{chunk-DASQJ5UD.mjs → chunk-XF7MJSUS.mjs} +1 -1
- package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
- package/dist/{chunk-YN7G22MP.cjs → chunk-XKUKWMGX.cjs} +3 -3
- package/dist/{chunk-FOULIN4S.cjs → chunk-XY5OZQF6.cjs} +2 -2
- package/dist/{chunk-RIMEFQYO.mjs → chunk-XZBBKZGW.mjs} +73 -74
- package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
- package/dist/{chunk-A7EJATEW.mjs → chunk-YN3YMSKD.mjs} +3 -3
- package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
- package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
- package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
- package/dist/{chunk-KZ5BOWJS.cjs → chunk-Z4SMFUZ7.cjs} +28 -28
- package/dist/{chunk-MBD34AS5.cjs → chunk-Z5BANEQD.cjs} +6 -6
- package/dist/{chunk-AHGOHPRN.mjs → chunk-ZDYYZX73.mjs} +60 -30
- package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
- package/dist/{chunk-XGS76V7L.cjs → chunk-ZPEZXQTM.cjs} +22 -22
- package/dist/{chunk-ODYKCC6W.cjs → chunk-ZVSQN7NC.cjs} +135 -80
- package/dist/{cli-runtime.d-BG9q2_vC.d.ts → cli-runtime.d-8BhZy_wr.d.ts} +7 -6
- package/dist/{cli-runtime.d-CGMGs1Zz.d.mts → cli-runtime.d-DPNTN-JV.d.mts} +7 -6
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-component.d-CdsG1E7p.d.mts → client-component.d-CMCdyAr8.d.mts} +1 -1
- package/dist/{client-component.d-B84GPb_u.d.ts → client-component.d-CkDcob6D.d.ts} +1 -1
- package/dist/{client-plugins.d-FptsHgls.d.ts → client-plugins.d-BYIovYqX.d.ts} +4 -4
- package/dist/{client-plugins.d-DX-iCJWE.d.mts → client-plugins.d-WcMwOZGZ.d.mts} +4 -4
- package/dist/client-plugins.d.mts +4 -4
- package/dist/client-plugins.d.ts +4 -4
- package/dist/client.cjs +3 -3
- package/dist/client.d.mts +9 -9
- package/dist/client.d.ts +9 -9
- package/dist/client.mjs +2 -2
- package/dist/config.d.mts +4 -4
- package/dist/config.d.ts +4 -4
- package/dist/cron.cjs +3 -3
- package/dist/cron.mjs +2 -2
- package/dist/desktop.d.mts +5 -5
- package/dist/desktop.d.ts +5 -5
- package/dist/{devtools-7P3OUNLV.mjs → devtools-F3FDFV26.mjs} +10 -10
- package/dist/{devtools-TMATFNUY.cjs → devtools-JJOYTIMS.cjs} +12 -12
- package/dist/docs.cjs +14 -14
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +13 -13
- package/dist/environment/vite.cjs +5 -5
- package/dist/environment/vite.d.mts +9 -0
- package/dist/environment/vite.d.ts +9 -0
- package/dist/environment/vite.mjs +4 -4
- package/dist/{handler.d-Cy3XbY_W.d.ts → handler.d-BwdOyc9x.d.ts} +1 -1
- package/dist/{handler.d-DSwLTpa5.d.mts → handler.d-s3IM6pbJ.d.mts} +1 -1
- package/dist/{headers.d-DiL9YTH3.d.mts → headers.d-BR-OXrqQ.d.mts} +1 -1
- package/dist/{headers.d-Qbjo38a0.d.ts → headers.d-CAW4wPey.d.ts} +1 -1
- package/dist/index.cjs +65 -59
- package/dist/{index.d-CqQKX3s6.d.mts → index.d-BEVK61zS.d.mts} +1 -1
- package/dist/{index.d-OccJoC6I.d.ts → index.d-ah2c89Wu.d.ts} +1 -1
- package/dist/index.d.mts +25 -25
- package/dist/index.d.ts +25 -25
- package/dist/index.mjs +67 -61
- package/dist/integrations/orm.cjs +3 -3
- package/dist/integrations/orm.d.mts +4 -4
- package/dist/integrations/orm.d.ts +4 -4
- package/dist/integrations/orm.mjs +2 -2
- package/dist/integrations.cjs +2 -2
- package/dist/integrations.d.mts +4 -4
- package/dist/integrations.d.ts +4 -4
- package/dist/integrations.mjs +1 -1
- package/dist/internal/app-markdown-runtime.cjs +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +5 -5
- package/dist/internal/app-markdown-runtime.d.ts +5 -5
- package/dist/internal/app-markdown-runtime.mjs +3 -3
- package/dist/internal/build-runtime.cjs +47 -47
- package/dist/internal/build-runtime.d.mts +7 -7
- package/dist/internal/build-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.mjs +46 -46
- package/dist/internal/cli-runtime.cjs +29 -26
- package/dist/internal/cli-runtime.d.mts +11 -11
- package/dist/internal/cli-runtime.d.ts +11 -11
- package/dist/internal/cli-runtime.mjs +28 -25
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +48 -11
- package/dist/internal/client-runtime.d.mts +17 -21
- package/dist/internal/client-runtime.d.ts +17 -21
- package/dist/internal/client-runtime.mjs +37 -0
- package/dist/internal/compression-runtime.d.mts +4 -4
- package/dist/internal/compression-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.cjs +12 -12
- package/dist/internal/config-runtime.d.mts +6 -6
- package/dist/internal/config-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.mjs +11 -11
- package/dist/internal/infra-analytics-runtime.cjs +10 -10
- package/dist/internal/infra-analytics-runtime.mjs +8 -8
- package/dist/internal/islands-boot.cjs +33 -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 +32 -4
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +26 -26
- package/dist/internal/production-runtime.d.mts +14 -13
- package/dist/internal/production-runtime.d.ts +14 -13
- package/dist/internal/production-runtime.mjs +27 -27
- package/dist/internal/spa-router.cjs +44 -0
- package/dist/internal/spa-router.d.mts +41 -0
- package/dist/internal/spa-router.d.ts +41 -0
- package/dist/internal/spa-router.mjs +44 -0
- package/dist/internal/start-manifest.d.mts +4 -4
- package/dist/internal/start-manifest.d.ts +4 -4
- package/dist/internal/vercel-edge-middleware.cjs +3 -3
- package/dist/internal/vercel-edge-middleware.mjs +2 -2
- 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 +4 -4
- package/dist/markdown.d.ts +4 -4
- package/dist/markdown.mjs +2 -2
- package/dist/middleware.cjs +8 -8
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +7 -7
- package/dist/{mount.d-CPzqOm-a.d.ts → mount.d-DcoPFqv5.d.ts} +1 -1
- package/dist/{mount.d-AcJaUtHF.d.mts → mount.d-Ylo-CmzK.d.mts} +1 -1
- package/dist/{native-server-fn-handler-WYYY4YBN.mjs → native-server-fn-handler-OXFTI6V5.mjs} +4 -4
- package/dist/{native-server-fn-handler-XRTZR7SZ.cjs → native-server-fn-handler-TNVFEQW3.cjs} +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-_Df9DnPY.d.ts → navigation-delegate.d-2MK4YSlL.d.ts} +1 -1
- package/dist/{navigation-delegate.d-C4i5Y39E.d.mts → navigation-delegate.d-BA5h0fbE.d.mts} +1 -1
- package/dist/navigation.cjs +4 -4
- package/dist/navigation.d.mts +7 -7
- package/dist/navigation.d.ts +7 -7
- package/dist/navigation.mjs +3 -3
- package/dist/{nitro-NUCTYEKJ.cjs → nitro-6UOJXJZ6.cjs} +7 -7
- package/dist/{nitro-VCJ6QQSI.mjs → nitro-C3MYDX7V.mjs} +3 -3
- 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 +37 -37
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +36 -36
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +1 -1
- package/dist/{render-plan.d-CslZE7o7.d.ts → render-plan.d-2o-AG-ot.d.ts} +1 -1
- package/dist/{render-plan.d-4V_NmaA6.d.mts → render-plan.d-ChYBMhLu.d.mts} +1 -1
- package/dist/renderer-client.cjs +4 -4
- package/dist/renderer-client.d.mts +7 -7
- package/dist/renderer-client.d.ts +7 -7
- package/dist/renderer-client.mjs +1 -1
- package/dist/renderer.d.mts +16 -1
- package/dist/renderer.d.ts +16 -1
- package/dist/{request.d-CbV3y7j3.d.ts → request.d-CE0FIkiM.d.ts} +1 -1
- package/dist/{request.d-CmLTxEgS.d.mts → request.d-RCnCBuWq.d.mts} +1 -1
- package/dist/request.d.mts +5 -5
- package/dist/request.d.ts +5 -5
- package/dist/{route-rendering.d-CETnXNez.d.ts → route-rendering.d-BTPOM2nU.d.ts} +1 -1
- package/dist/{route-rendering.d-CmoqfOmj.d.mts → route-rendering.d-BZJnfKsp.d.mts} +1 -1
- package/dist/{router.d-Dga3N5YO.d.ts → router.d-BU_WE6Ol.d.ts} +1 -1
- package/dist/{router.d-ktz7pwYm.d.mts → router.d-D8Vvwl4i.d.mts} +1 -1
- package/dist/routes.cjs +4 -4
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/routes.mjs +3 -3
- package/dist/{rsc-pipeline-JLYD26AR.cjs → rsc-pipeline-A3R4U26C.cjs} +15 -15
- package/dist/{rsc-pipeline-N7CWJW7T.mjs → rsc-pipeline-JZWVSHOR.mjs} +14 -14
- package/dist/{runtime-QXX2A4TS.mjs → runtime-SQFRHRGJ.mjs} +18 -18
- package/dist/{runtime-F5NSS4DD.cjs → runtime-WZ3CHHGJ.cjs} +26 -26
- package/dist/{runtime.d-DuaXEM0p.d.mts → runtime.d-BnmuOXVD.d.mts} +1 -1
- package/dist/{runtime.d-BWLZUOfA.d.ts → runtime.d-DJ6IIKcF.d.ts} +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-components-status.d-C5JpC7_Y.d.ts → server-components-status.d-BeqSXcjM.d.ts} +1 -1
- package/dist/{server-components-status.d-CqxtJmqP.d.mts → server-components-status.d-BzOg9M8g.d.mts} +1 -1
- package/dist/server-fn.cjs +4 -4
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.d.mts +6 -6
- package/dist/server-plugins.d.ts +6 -6
- package/dist/server-query.cjs +5 -5
- package/dist/server-query.mjs +4 -4
- package/dist/server.cjs +73 -73
- package/dist/server.d.mts +15 -15
- package/dist/server.d.ts +15 -15
- package/dist/server.mjs +47 -47
- 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-BOwuVkMl.d.ts} +20 -4
- package/dist/{spa-router.d-BLE188EL.d.mts → spa-router.d-CDpftSsk.d.mts} +20 -4
- package/dist/{ssg.d-DisOfj0I.d.ts → ssg.d-BTVqyq8T.d.ts} +2 -2
- package/dist/{ssg.d-QrFyU6T4.d.mts → ssg.d-Bx_WFuwg.d.mts} +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/testing.cjs +11 -11
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.mjs +8 -8
- 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-JkrpS-NJ.d.mts} +1 -1
- package/dist/{utils.d-7YcgfTCK.d.ts → utils.d-_dvevm5s.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +39 -37
- package/dist/vite.d.mts +15 -10
- package/dist/vite.d.ts +15 -10
- package/dist/vite.mjs +38 -36
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +7 -1
- package/types/images.d.ts +9 -0
- package/dist/analyzer-KVTUYGTT.cjs +0 -16
- package/dist/search-client-6NVC6HM2.cjs +0 -15
- package/dist/session-H4TWP73H.cjs +0 -24
- package/dist/{chunk-GFXKO4UW.mjs → chunk-3XTRT3MB.mjs} +48 -48
- 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-CUZT7474.cjs → chunk-TCMRLW3K.cjs} +0 -0
- package/dist/{chunk-Q3DO7MVK.mjs → chunk-URBP6DLH.mjs} +0 -0
- package/dist/{chunk-AOTD2N5P.cjs → chunk-WGWWRV2M.cjs} +0 -0
- package/dist/{chunk-L7Y65BQU.cjs → chunk-WHEQJN4G.cjs} +48 -48
|
@@ -7,21 +7,22 @@ var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
|
|
|
7
7
|
var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
|
|
11
|
-
|
|
12
10
|
|
|
13
11
|
var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
|
|
14
12
|
|
|
15
13
|
|
|
14
|
+
var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
var
|
|
22
|
+
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
var
|
|
25
|
+
var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
|
|
25
26
|
|
|
26
27
|
// src/environment-vite.ts
|
|
27
28
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -878,7 +879,7 @@ function usePackageScanCacheFile(file) {
|
|
|
878
879
|
const stored = /* @__PURE__ */ new Map();
|
|
879
880
|
try {
|
|
880
881
|
const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
|
|
881
|
-
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm ===
|
|
882
|
+
if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkCCMP4JD2cjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
|
|
882
883
|
for (const [directory, scan] of Object.entries(value.scans)) {
|
|
883
884
|
if (isStoredPackageScan(scan)) stored.set(directory, scan);
|
|
884
885
|
}
|
|
@@ -907,7 +908,7 @@ function persistPackageScanCache() {
|
|
|
907
908
|
_fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
|
|
908
909
|
_fs2.default.writeFileSync(
|
|
909
910
|
temporary,
|
|
910
|
-
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm:
|
|
911
|
+
JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkCCMP4JD2cjs.FARM_VERSION, scans })
|
|
911
912
|
);
|
|
912
913
|
_fs2.default.renameSync(temporary, cache2.file);
|
|
913
914
|
cache2.dirty = false;
|
|
@@ -2207,7 +2208,7 @@ var PackageClientBoundaryCache = class {
|
|
|
2207
2208
|
}
|
|
2208
2209
|
const contents = JSON.stringify({
|
|
2209
2210
|
schema: SCHEMA_VERSION,
|
|
2210
|
-
farm:
|
|
2211
|
+
farm: _chunkCCMP4JD2cjs.FARM_VERSION,
|
|
2211
2212
|
paths,
|
|
2212
2213
|
entries
|
|
2213
2214
|
});
|
|
@@ -2247,7 +2248,7 @@ function readStoredCache(file) {
|
|
|
2247
2248
|
} catch (e37) {
|
|
2248
2249
|
return null;
|
|
2249
2250
|
}
|
|
2250
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
2251
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkCCMP4JD2cjs.FARM_VERSION) {
|
|
2251
2252
|
return null;
|
|
2252
2253
|
}
|
|
2253
2254
|
const { paths, entries } = value;
|
|
@@ -2258,7 +2259,7 @@ function readStoredCache(file) {
|
|
|
2258
2259
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
2259
2260
|
if (usable.length > 0) valid[key] = usable;
|
|
2260
2261
|
}
|
|
2261
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
2262
|
+
return { schema: SCHEMA_VERSION, farm: _chunkCCMP4JD2cjs.FARM_VERSION, paths, entries: valid };
|
|
2262
2263
|
}
|
|
2263
2264
|
function isRecord(value) {
|
|
2264
2265
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -2337,6 +2338,41 @@ function readIfExists(filePath) {
|
|
|
2337
2338
|
(content) => content !== null
|
|
2338
2339
|
);
|
|
2339
2340
|
}
|
|
2341
|
+
var MARKDOWN_MODULE = /\.mdx?$/i;
|
|
2342
|
+
function readModuleCode(filePath) {
|
|
2343
|
+
const content = readIfExists(filePath);
|
|
2344
|
+
if (content === null || !MARKDOWN_MODULE.test(filePath)) return content;
|
|
2345
|
+
return memoizeInFarmSourceSnapshot("markdown-code", content, () => scanMarkdownCode(content));
|
|
2346
|
+
}
|
|
2347
|
+
function scanMarkdownCode(content) {
|
|
2348
|
+
const lines = content.split(/\r?\n/);
|
|
2349
|
+
const code = [];
|
|
2350
|
+
let index = 0;
|
|
2351
|
+
if (/^---\s*$/.test(_nullishCoalesce(lines[0], () => ( "")))) {
|
|
2352
|
+
const end = lines.findIndex((line, lineIndex) => lineIndex > 0 && /^---\s*$/.test(line));
|
|
2353
|
+
if (end > 0) index = end + 1;
|
|
2354
|
+
}
|
|
2355
|
+
let fence = null;
|
|
2356
|
+
let inCode = false;
|
|
2357
|
+
for (; index < lines.length; index++) {
|
|
2358
|
+
const line = lines[index];
|
|
2359
|
+
const marker = _optionalChain([/^ {0,3}(`{3,}|~{3,})/, 'access', _120 => _120.exec, 'call', _121 => _121(line), 'optionalAccess', _122 => _122[1]]);
|
|
2360
|
+
if (fence) {
|
|
2361
|
+
if (_optionalChain([marker, 'optionalAccess', _123 => _123[0]]) === fence[0] && marker.length >= fence.length && line.trim() === marker) {
|
|
2362
|
+
fence = null;
|
|
2363
|
+
}
|
|
2364
|
+
} else if (inCode) {
|
|
2365
|
+
inCode = line.trim() !== "";
|
|
2366
|
+
code.push(line);
|
|
2367
|
+
} else if (marker) {
|
|
2368
|
+
fence = marker;
|
|
2369
|
+
} else if (/^(?:import|export)(?=[\s{*])/.test(line)) {
|
|
2370
|
+
inCode = true;
|
|
2371
|
+
code.push(line);
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
return code.join("\n");
|
|
2375
|
+
}
|
|
2340
2376
|
function readSourceFile(filePath) {
|
|
2341
2377
|
const content = readSourceFileContents(filePath);
|
|
2342
2378
|
if (content !== null) noteFarmSourceRead(filePath);
|
|
@@ -2374,7 +2410,7 @@ function resolveModuleSourcePath(modulePath, root) {
|
|
|
2374
2410
|
candidates.add(_path2.default.join(root, normalized));
|
|
2375
2411
|
candidates.add(_path2.default.resolve(root, normalized));
|
|
2376
2412
|
}
|
|
2377
|
-
if (_optionalChain([withoutQuery, 'optionalAccess',
|
|
2413
|
+
if (_optionalChain([withoutQuery, 'optionalAccess', _124 => _124.startsWith, 'call', _125 => _125("/src/")])) {
|
|
2378
2414
|
const normalized = withoutQuery.replace(/^\/+/, "");
|
|
2379
2415
|
candidates.add(_path2.default.join(process.cwd(), normalized));
|
|
2380
2416
|
candidates.add(_path2.default.resolve(process.cwd(), normalized));
|
|
@@ -2453,7 +2489,7 @@ function hasHydrateExport(content) {
|
|
|
2453
2489
|
for (const match of content.matchAll(/\bexport\s*\{([^}]*)\}/g)) {
|
|
2454
2490
|
for (const specifier of match[1].split(",")) {
|
|
2455
2491
|
const parts = specifier.trim().split(/\s+as\s+/);
|
|
2456
|
-
const exportedName2 = _optionalChain([(_nullishCoalesce(parts[1], () => ( parts[0]))), 'optionalAccess',
|
|
2492
|
+
const exportedName2 = _optionalChain([(_nullishCoalesce(parts[1], () => ( parts[0]))), 'optionalAccess', _126 => _126.trim, 'call', _127 => _127()]);
|
|
2457
2493
|
if (exportedName2 === "hydrate") {
|
|
2458
2494
|
return true;
|
|
2459
2495
|
}
|
|
@@ -2648,7 +2684,7 @@ function isIslandExportStart(tokens, index) {
|
|
|
2648
2684
|
const token = tokens[index];
|
|
2649
2685
|
const previous = tokens[index - 1];
|
|
2650
2686
|
const startsStatement = !previous || previous.value === ";" || previous.value === "{" || previous.value === "}" || token.line > previous.line;
|
|
2651
|
-
return startsStatement && token.value === "export" && _optionalChain([tokens, 'access',
|
|
2687
|
+
return startsStatement && token.value === "export" && _optionalChain([tokens, 'access', _128 => _128[index + 1], 'optionalAccess', _129 => _129.value]) === "const" && _optionalChain([tokens, 'access', _130 => _130[index + 2], 'optionalAccess', _131 => _131.value]) === "island";
|
|
2652
2688
|
}
|
|
2653
2689
|
function getIslandStrategyExport(content) {
|
|
2654
2690
|
if (!content) return null;
|
|
@@ -2656,15 +2692,15 @@ function getIslandStrategyExport(content) {
|
|
|
2656
2692
|
for (let index = 0; index < tokens.length - 2; index++) {
|
|
2657
2693
|
if (!isIslandExportStart(tokens, index)) continue;
|
|
2658
2694
|
let valueIndex = index + 3;
|
|
2659
|
-
if (_optionalChain([tokens, 'access',
|
|
2695
|
+
if (_optionalChain([tokens, 'access', _132 => _132[valueIndex], 'optionalAccess', _133 => _133.value]) === ":") {
|
|
2660
2696
|
while (valueIndex < tokens.length && tokens[valueIndex].value !== "=") valueIndex++;
|
|
2661
2697
|
}
|
|
2662
|
-
if (_optionalChain([tokens, 'access',
|
|
2698
|
+
if (_optionalChain([tokens, 'access', _134 => _134[valueIndex], 'optionalAccess', _135 => _135.value]) !== "=") break;
|
|
2663
2699
|
valueIndex++;
|
|
2664
2700
|
const literal = tokens[valueIndex];
|
|
2665
2701
|
if (!literal || literal.kind !== "string" || !_chunk7KJJ4SBScjs.isFarmIslandStrategy.call(void 0, literal.value)) break;
|
|
2666
2702
|
let trailingIndex = valueIndex + 1;
|
|
2667
|
-
if (_optionalChain([tokens, 'access',
|
|
2703
|
+
if (_optionalChain([tokens, 'access', _136 => _136[trailingIndex], 'optionalAccess', _137 => _137.value]) === "as" && _optionalChain([tokens, 'access', _138 => _138[trailingIndex + 1], 'optionalAccess', _139 => _139.value]) === "const") {
|
|
2668
2704
|
trailingIndex += 2;
|
|
2669
2705
|
}
|
|
2670
2706
|
const trailing = tokens[trailingIndex];
|
|
@@ -2690,13 +2726,13 @@ function hasAsyncDefaultExport(content) {
|
|
|
2690
2726
|
for (let index = 0; index < tokens.length - 2; index++) {
|
|
2691
2727
|
const token = tokens[index];
|
|
2692
2728
|
if (token.kind !== "identifier" || token.value !== "export") continue;
|
|
2693
|
-
if (_optionalChain([tokens, 'access',
|
|
2694
|
-
if (_optionalChain([tokens, 'access',
|
|
2729
|
+
if (_optionalChain([tokens, 'access', _140 => _140[index - 1], 'optionalAccess', _141 => _141.value]) === ".") continue;
|
|
2730
|
+
if (_optionalChain([tokens, 'access', _142 => _142[index + 1], 'optionalAccess', _143 => _143.value]) !== "default") continue;
|
|
2695
2731
|
const exported = tokens[index + 2];
|
|
2696
2732
|
if (exported.kind === "identifier" && exported.value === "async") {
|
|
2697
2733
|
return true;
|
|
2698
2734
|
}
|
|
2699
|
-
if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access',
|
|
2735
|
+
if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access', _144 => _144[index + 3], 'optionalAccess', _145 => _145.value]) !== "(" && isAsyncLocalDeclaration(tokens, exported.value)) {
|
|
2700
2736
|
return true;
|
|
2701
2737
|
}
|
|
2702
2738
|
}
|
|
@@ -2704,10 +2740,10 @@ function hasAsyncDefaultExport(content) {
|
|
|
2704
2740
|
}
|
|
2705
2741
|
function isAsyncLocalDeclaration(tokens, name) {
|
|
2706
2742
|
for (let index = 0; index < tokens.length - 2; index++) {
|
|
2707
|
-
if (tokens[index].value === "async" && _optionalChain([tokens, 'access',
|
|
2743
|
+
if (tokens[index].value === "async" && _optionalChain([tokens, 'access', _146 => _146[index + 1], 'optionalAccess', _147 => _147.value]) === "function" && _optionalChain([tokens, 'access', _148 => _148[index + 2], 'optionalAccess', _149 => _149.value]) === name) {
|
|
2708
2744
|
return true;
|
|
2709
2745
|
}
|
|
2710
|
-
if (tokens[index].value === name && _optionalChain([tokens, 'access',
|
|
2746
|
+
if (tokens[index].value === name && _optionalChain([tokens, 'access', _150 => _150[index + 1], 'optionalAccess', _151 => _151.value]) === "=" && _optionalChain([tokens, 'access', _152 => _152[index + 2], 'optionalAccess', _153 => _153.value]) === "async") {
|
|
2711
2747
|
return true;
|
|
2712
2748
|
}
|
|
2713
2749
|
}
|
|
@@ -2921,7 +2957,7 @@ function planClientModuleHydration(modulePath, root, mode, options) {
|
|
|
2921
2957
|
return plan;
|
|
2922
2958
|
}
|
|
2923
2959
|
function usesFarmServerTree(plan) {
|
|
2924
|
-
return _optionalChain([plan, 'optionalAccess',
|
|
2960
|
+
return _optionalChain([plan, 'optionalAccess', _154 => _154.asyncOwnerIslands]) === true && plan.isolatedBoundaries.length > 0;
|
|
2925
2961
|
}
|
|
2926
2962
|
function getMarkdownPageHydrationPlan(componentsModulePath, root, mode = "off", options = {}) {
|
|
2927
2963
|
const plan = {
|
|
@@ -3076,7 +3112,7 @@ function getStaticImportBindings(content) {
|
|
|
3076
3112
|
if (!content) return bindings;
|
|
3077
3113
|
const tokens = tokenizeModuleSource(content);
|
|
3078
3114
|
for (let index = 0; index < tokens.length; index++) {
|
|
3079
|
-
if (tokens[index].value !== "import" || _optionalChain([tokens, 'access',
|
|
3115
|
+
if (tokens[index].value !== "import" || _optionalChain([tokens, 'access', _155 => _155[index - 1], 'optionalAccess', _156 => _156.value]) === ".") continue;
|
|
3080
3116
|
const first = tokens[index + 1];
|
|
3081
3117
|
if (!first || first.value === "type" || first.value === "(" || first.kind === "string") {
|
|
3082
3118
|
continue;
|
|
@@ -3084,7 +3120,7 @@ function getStaticImportBindings(content) {
|
|
|
3084
3120
|
let fromIndex = -1;
|
|
3085
3121
|
for (let cursor = index + 1; cursor < tokens.length; cursor++) {
|
|
3086
3122
|
if (tokens[cursor].value === ";") break;
|
|
3087
|
-
if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access',
|
|
3123
|
+
if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access', _157 => _157[cursor + 1], 'optionalAccess', _158 => _158.kind]) === "string") {
|
|
3088
3124
|
fromIndex = cursor;
|
|
3089
3125
|
break;
|
|
3090
3126
|
}
|
|
@@ -3093,13 +3129,13 @@ function getStaticImportBindings(content) {
|
|
|
3093
3129
|
const specifier = tokens[fromIndex + 1].value;
|
|
3094
3130
|
const clause = tokens.slice(index + 1, fromIndex);
|
|
3095
3131
|
const localNames = [];
|
|
3096
|
-
if (_optionalChain([clause, 'access',
|
|
3132
|
+
if (_optionalChain([clause, 'access', _159 => _159[0], 'optionalAccess', _160 => _160.kind]) === "identifier" && clause[0].value !== "type") {
|
|
3097
3133
|
localNames.push(clause[0].value);
|
|
3098
3134
|
}
|
|
3099
3135
|
const namespaceAs = clause.findIndex(
|
|
3100
|
-
(token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access',
|
|
3136
|
+
(token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access', _161 => _161[clauseIndex + 1], 'optionalAccess', _162 => _162.value]) === "as"
|
|
3101
3137
|
);
|
|
3102
|
-
if (namespaceAs !== -1 && _optionalChain([clause, 'access',
|
|
3138
|
+
if (namespaceAs !== -1 && _optionalChain([clause, 'access', _163 => _163[namespaceAs + 2], 'optionalAccess', _164 => _164.kind]) === "identifier") {
|
|
3103
3139
|
localNames.push(clause[namespaceAs + 2].value);
|
|
3104
3140
|
}
|
|
3105
3141
|
const openingBrace = clause.findIndex((token) => token.value === "{");
|
|
@@ -3109,11 +3145,11 @@ function getStaticImportBindings(content) {
|
|
|
3109
3145
|
if (openingBrace !== -1 && closingBrace !== -1) {
|
|
3110
3146
|
let entryStart = openingBrace + 1;
|
|
3111
3147
|
for (let cursor = entryStart; cursor <= closingBrace; cursor++) {
|
|
3112
|
-
if (cursor !== closingBrace && _optionalChain([clause, 'access',
|
|
3148
|
+
if (cursor !== closingBrace && _optionalChain([clause, 'access', _165 => _165[cursor], 'optionalAccess', _166 => _166.value]) !== ",") continue;
|
|
3113
3149
|
const entry = clause.slice(entryStart, cursor).filter((token) => token.value !== "type");
|
|
3114
3150
|
const asIndex = entry.findIndex((token) => token.value === "as");
|
|
3115
3151
|
const local = asIndex === -1 ? entry[0] : entry[asIndex + 1];
|
|
3116
|
-
if (_optionalChain([local, 'optionalAccess',
|
|
3152
|
+
if (_optionalChain([local, 'optionalAccess', _167 => _167.kind]) === "identifier") localNames.push(local.value);
|
|
3117
3153
|
entryStart = cursor + 1;
|
|
3118
3154
|
}
|
|
3119
3155
|
}
|
|
@@ -3150,18 +3186,19 @@ function findParserSensitiveJsxContainer(content, localBindings) {
|
|
|
3150
3186
|
const open = [];
|
|
3151
3187
|
const isSelfClosing = (openingIndex) => {
|
|
3152
3188
|
for (let index = openingIndex; index < tokens.length; index++) {
|
|
3153
|
-
if (tokens[index].value === ">") return _optionalChain([tokens, 'access',
|
|
3189
|
+
if (tokens[index].value === ">") return _optionalChain([tokens, 'access', _168 => _168[index - 1], 'optionalAccess', _169 => _169.value]) === "/";
|
|
3154
3190
|
}
|
|
3155
3191
|
return false;
|
|
3156
3192
|
};
|
|
3157
3193
|
for (let index = 0; index < tokens.length - 1; index++) {
|
|
3158
3194
|
if (tokens[index].value !== "<") continue;
|
|
3159
3195
|
if (tokens[index + 1].value === "/") {
|
|
3160
|
-
const closing =
|
|
3161
|
-
const at = closing ? open.lastIndexOf(closing) : -1;
|
|
3196
|
+
const closing = tokens[index + 2];
|
|
3197
|
+
const at = _optionalChain([closing, 'optionalAccess', _170 => _170.kind]) === "identifier" ? open.lastIndexOf(closing.value) : -1;
|
|
3162
3198
|
if (at !== -1) open.length = at;
|
|
3163
3199
|
continue;
|
|
3164
3200
|
}
|
|
3201
|
+
if (tokens[index + 1].kind !== "identifier") continue;
|
|
3165
3202
|
const tag = tokens[index + 1].value;
|
|
3166
3203
|
if (names.has(tag)) {
|
|
3167
3204
|
let container;
|
|
@@ -3200,7 +3237,7 @@ function findMatchingToken(tokens, openingIndex, opening, closing) {
|
|
|
3200
3237
|
}
|
|
3201
3238
|
function containsClientJsx(tokens, start, end, clientBindings) {
|
|
3202
3239
|
for (let index = start; index < end; index++) {
|
|
3203
|
-
if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access',
|
|
3240
|
+
if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access', _171 => _171[index + 1], 'optionalAccess', _172 => _172.value]))) return true;
|
|
3204
3241
|
}
|
|
3205
3242
|
return false;
|
|
3206
3243
|
}
|
|
@@ -3238,7 +3275,7 @@ function getClientRenderingHelpers(tokens, clientBindings) {
|
|
|
3238
3275
|
let helperName;
|
|
3239
3276
|
let bodyStart = -1;
|
|
3240
3277
|
let bodyEnd = -1;
|
|
3241
|
-
if (tokens[index].value === "function" && _optionalChain([tokens, 'access',
|
|
3278
|
+
if (tokens[index].value === "function" && _optionalChain([tokens, 'access', _173 => _173[index + 1], 'optionalAccess', _174 => _174.kind]) === "identifier") {
|
|
3242
3279
|
helperName = tokens[index + 1].value;
|
|
3243
3280
|
const parametersStart = tokens.findIndex(
|
|
3244
3281
|
(token, tokenIndex) => tokenIndex > index + 1 && token.value === "("
|
|
@@ -3248,21 +3285,21 @@ function getClientRenderingHelpers(tokens, clientBindings) {
|
|
|
3248
3285
|
(token, tokenIndex) => tokenIndex > parametersEnd && token.value === "{"
|
|
3249
3286
|
);
|
|
3250
3287
|
if (bodyStart !== -1) bodyEnd = findMatchingToken(tokens, bodyStart, "{", "}");
|
|
3251
|
-
} else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access',
|
|
3288
|
+
} else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access', _175 => _175[index + 1], 'optionalAccess', _176 => _176.kind]) === "identifier") {
|
|
3252
3289
|
helperName = tokens[index + 1].value;
|
|
3253
3290
|
let assignmentIndex = -1;
|
|
3254
3291
|
let arrowIndex = -1;
|
|
3255
3292
|
for (let cursor = index + 2; cursor < tokens.length; cursor++) {
|
|
3256
3293
|
if (tokens[cursor].value === ";") break;
|
|
3257
3294
|
if (assignmentIndex === -1 && tokens[cursor].value === "=") assignmentIndex = cursor;
|
|
3258
|
-
if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access',
|
|
3295
|
+
if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access', _177 => _177[cursor + 1], 'optionalAccess', _178 => _178.value]) === ">") {
|
|
3259
3296
|
arrowIndex = cursor;
|
|
3260
3297
|
break;
|
|
3261
3298
|
}
|
|
3262
3299
|
}
|
|
3263
3300
|
if (arrowIndex !== -1) {
|
|
3264
3301
|
bodyStart = arrowIndex + 2;
|
|
3265
|
-
bodyEnd = _optionalChain([tokens, 'access',
|
|
3302
|
+
bodyEnd = _optionalChain([tokens, 'access', _179 => _179[bodyStart], 'optionalAccess', _180 => _180.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : findStatementEnd(tokens, bodyStart);
|
|
3266
3303
|
} else if (assignmentIndex !== -1) {
|
|
3267
3304
|
bodyStart = assignmentIndex + 1;
|
|
3268
3305
|
bodyEnd = findStatementEnd(tokens, bodyStart);
|
|
@@ -3302,14 +3339,14 @@ function passesElementValuedProps(content, localBindings) {
|
|
|
3302
3339
|
else if (value === "}") braceDepth--;
|
|
3303
3340
|
else if (value === "<" && braceDepth > 0) return true;
|
|
3304
3341
|
else if (value === ">" && braceDepth === 0) {
|
|
3305
|
-
selfClosing = _optionalChain([tokens, 'access',
|
|
3342
|
+
selfClosing = _optionalChain([tokens, 'access', _181 => _181[cursor - 1], 'optionalAccess', _182 => _182.value]) === "/";
|
|
3306
3343
|
break;
|
|
3307
3344
|
}
|
|
3308
3345
|
}
|
|
3309
3346
|
if (selfClosing || cursor >= tokens.length) continue;
|
|
3310
3347
|
for (let child = cursor + 1; child < tokens.length; child++) {
|
|
3311
3348
|
if (tokens[child].value !== "<") continue;
|
|
3312
|
-
const closesBoundary = _optionalChain([tokens, 'access',
|
|
3349
|
+
const closesBoundary = _optionalChain([tokens, 'access', _183 => _183[child + 1], 'optionalAccess', _184 => _184.value]) === "/" && _optionalChain([tokens, 'access', _185 => _185[child + 2], 'optionalAccess', _186 => _186.value]) === name;
|
|
3313
3350
|
if (!closesBoundary) return true;
|
|
3314
3351
|
break;
|
|
3315
3352
|
}
|
|
@@ -3331,7 +3368,7 @@ function rendersOnlyLeafElements(content, localBindings) {
|
|
|
3331
3368
|
else if (value === "<" && braceDepth > 0) return false;
|
|
3332
3369
|
else if (value === ">" && braceDepth === 0) break;
|
|
3333
3370
|
}
|
|
3334
|
-
if (cursor >= tokens.length || _optionalChain([tokens, 'access',
|
|
3371
|
+
if (cursor >= tokens.length || _optionalChain([tokens, 'access', _187 => _187[cursor - 1], 'optionalAccess', _188 => _188.value]) !== "/") return false;
|
|
3335
3372
|
}
|
|
3336
3373
|
return true;
|
|
3337
3374
|
}
|
|
@@ -3343,9 +3380,9 @@ function hasDynamicJsxCardinality(content, localBindings) {
|
|
|
3343
3380
|
const containsDynamicRenderer = (start, end) => containsClientJsx(tokens, start, end, clientBindings) || tokens.slice(start, end).some((token) => renderingHelpers.has(token.value));
|
|
3344
3381
|
for (let index = 0; index < tokens.length; index++) {
|
|
3345
3382
|
let callStart = -1;
|
|
3346
|
-
if (tokens[index].value === "." && (_optionalChain([tokens, 'access',
|
|
3383
|
+
if (tokens[index].value === "." && (_optionalChain([tokens, 'access', _189 => _189[index + 1], 'optionalAccess', _190 => _190.value]) === "map" || _optionalChain([tokens, 'access', _191 => _191[index + 1], 'optionalAccess', _192 => _192.value]) === "flatMap") && _optionalChain([tokens, 'access', _193 => _193[index + 2], 'optionalAccess', _194 => _194.value]) === "(") {
|
|
3347
3384
|
callStart = index + 2;
|
|
3348
|
-
} else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access',
|
|
3385
|
+
} else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access', _195 => _195[index + 1], 'optionalAccess', _196 => _196.value]) === "." && _optionalChain([tokens, 'access', _197 => _197[index + 2], 'optionalAccess', _198 => _198.value]) === "from" && _optionalChain([tokens, 'access', _199 => _199[index + 3], 'optionalAccess', _200 => _200.value]) === "(") {
|
|
3349
3386
|
callStart = index + 3;
|
|
3350
3387
|
}
|
|
3351
3388
|
if (callStart !== -1) {
|
|
@@ -3354,10 +3391,10 @@ function hasDynamicJsxCardinality(content, localBindings) {
|
|
|
3354
3391
|
index = callEnd;
|
|
3355
3392
|
continue;
|
|
3356
3393
|
}
|
|
3357
|
-
if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access',
|
|
3394
|
+
if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access', _201 => _201[index + 1], 'optionalAccess', _202 => _202.value]) === "(") {
|
|
3358
3395
|
const conditionEnd = findMatchingToken(tokens, index + 1, "(", ")");
|
|
3359
3396
|
const bodyStart = conditionEnd + 1;
|
|
3360
|
-
const bodyEnd = _optionalChain([tokens, 'access',
|
|
3397
|
+
const bodyEnd = _optionalChain([tokens, 'access', _203 => _203[bodyStart], 'optionalAccess', _204 => _204.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : tokens.findIndex((token, tokenIndex) => tokenIndex > bodyStart && token.value === ";");
|
|
3361
3398
|
if (containsDynamicRenderer(bodyStart, bodyEnd === -1 ? tokens.length : bodyEnd)) return true;
|
|
3362
3399
|
}
|
|
3363
3400
|
}
|
|
@@ -3378,7 +3415,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3378
3415
|
if (cached !== void 0) return cached;
|
|
3379
3416
|
if (visiting.has(moduleSourcePath)) return 0;
|
|
3380
3417
|
visiting.add(moduleSourcePath);
|
|
3381
|
-
const content =
|
|
3418
|
+
const content = readModuleCode(moduleSourcePath);
|
|
3382
3419
|
const parsed = parseClientModuleMetadata(content, false);
|
|
3383
3420
|
if (parsed.isClientComponent) {
|
|
3384
3421
|
if (!isIsolatableClientBoundarySource(content)) {
|
|
@@ -3401,7 +3438,14 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3401
3438
|
}
|
|
3402
3439
|
const importedBindings = getStaticImportBindings(content);
|
|
3403
3440
|
let estimatedBoundaryCount2 = 0;
|
|
3404
|
-
|
|
3441
|
+
const specifiers = new Set(getImportSpecifiers(content));
|
|
3442
|
+
for (const specifier of getImportSpecifiers(content, { dynamic: true })) {
|
|
3443
|
+
if (specifiers.has(specifier)) continue;
|
|
3444
|
+
const imported = resolveImportedModule(moduleSourcePath, specifier, root);
|
|
3445
|
+
if (!imported.local || !imported.path || !MARKDOWN_MODULE.test(imported.path)) continue;
|
|
3446
|
+
estimatedBoundaryCount2 += visit(imported.path);
|
|
3447
|
+
}
|
|
3448
|
+
for (const specifier of specifiers) {
|
|
3405
3449
|
const imported = resolveImportedModule(moduleSourcePath, specifier, root);
|
|
3406
3450
|
const importedPath = imported.path;
|
|
3407
3451
|
if (!importedPath) continue;
|
|
@@ -3469,7 +3513,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
|
|
|
3469
3513
|
const localBindings = _nullishCoalesce(importedBindings.get(specifier), () => ( []));
|
|
3470
3514
|
const staticUses = countStaticJsxUses(content, localBindings);
|
|
3471
3515
|
if (staticUses > 0) {
|
|
3472
|
-
const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call',
|
|
3516
|
+
const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call', _205 => _205(_nullishCoalesce(content, () => ( "")), moduleSourcePath, localBindings), 'optionalAccess', _206 => _206.length]), () => ( 0))) > 0;
|
|
3473
3517
|
if (grows) visit(ensureFarmIslandContainerReference(projectRoot));
|
|
3474
3518
|
const container = grows ? void 0 : findParserSensitiveJsxContainer(content, localBindings);
|
|
3475
3519
|
if (container) {
|
|
@@ -3595,7 +3639,7 @@ function inspectPackageClientBoundary(resolvedPath, root, visited) {
|
|
|
3595
3639
|
}
|
|
3596
3640
|
function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
|
|
3597
3641
|
if (!resolvedPath || visited.has(resolvedPath)) {
|
|
3598
|
-
if (resolvedPath) _optionalChain([trace2, 'optionalAccess',
|
|
3642
|
+
if (resolvedPath) _optionalChain([trace2, 'optionalAccess', _207 => _207.stop, 'call', _208 => _208(resolvedPath)]);
|
|
3599
3643
|
return {
|
|
3600
3644
|
isClientComponent: false,
|
|
3601
3645
|
shouldHydrate: false,
|
|
@@ -3603,7 +3647,7 @@ function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
|
|
|
3603
3647
|
};
|
|
3604
3648
|
}
|
|
3605
3649
|
visited.add(resolvedPath);
|
|
3606
|
-
_optionalChain([trace2, 'optionalAccess',
|
|
3650
|
+
_optionalChain([trace2, 'optionalAccess', _209 => _209.visit, 'call', _210 => _210(resolvedPath)]);
|
|
3607
3651
|
const content = readIfExists(resolvedPath);
|
|
3608
3652
|
const parsed = parseClientModuleMetadata(content, false);
|
|
3609
3653
|
let importsClientBoundary = false;
|
|
@@ -3661,7 +3705,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3661
3705
|
braceDepth = Math.max(0, braceDepth - 1);
|
|
3662
3706
|
continue;
|
|
3663
3707
|
}
|
|
3664
|
-
if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access',
|
|
3708
|
+
if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access', _211 => _211[index - 1], 'optionalAccess', _212 => _212.value]) !== "." && _optionalChain([tokens, 'access', _213 => _213[index + 1], 'optionalAccess', _214 => _214.value]) === "(" && _optionalChain([tokens, 'access', _215 => _215[index + 2], 'optionalAccess', _216 => _216.kind]) === "string") {
|
|
3665
3709
|
matches.add(tokens[index + 2].value);
|
|
3666
3710
|
continue;
|
|
3667
3711
|
}
|
|
@@ -3671,7 +3715,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3671
3715
|
}
|
|
3672
3716
|
if (reexportsOnly && keyword.value !== "export") continue;
|
|
3673
3717
|
const previous = tokens[index - 1];
|
|
3674
|
-
if (_optionalChain([previous, 'optionalAccess',
|
|
3718
|
+
if (_optionalChain([previous, 'optionalAccess', _217 => _217.value]) === ".") continue;
|
|
3675
3719
|
const first = tokens[index + 1];
|
|
3676
3720
|
if (!first || first.value === "type" || first.value === "(" || first.value === ".") {
|
|
3677
3721
|
continue;
|
|
@@ -3687,7 +3731,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3687
3731
|
for (let cursor = index + 1; cursor < tokens.length; cursor++) {
|
|
3688
3732
|
const token = tokens[cursor];
|
|
3689
3733
|
if (token.value === ";") break;
|
|
3690
|
-
if (token.value === "from" && _optionalChain([tokens, 'access',
|
|
3734
|
+
if (token.value === "from" && _optionalChain([tokens, 'access', _218 => _218[cursor + 1], 'optionalAccess', _219 => _219.kind]) === "string") {
|
|
3691
3735
|
fromIndex = cursor;
|
|
3692
3736
|
break;
|
|
3693
3737
|
}
|
|
@@ -3705,14 +3749,14 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
|
|
|
3705
3749
|
return Array.from(matches);
|
|
3706
3750
|
}
|
|
3707
3751
|
function isTypeOnlyNamedClause(tokens, startIndex, endIndex) {
|
|
3708
|
-
if (_optionalChain([tokens, 'access',
|
|
3752
|
+
if (_optionalChain([tokens, 'access', _220 => _220[startIndex], 'optionalAccess', _221 => _221.value]) !== "{") return false;
|
|
3709
3753
|
const closingBraceIndex = tokens.findIndex(
|
|
3710
3754
|
(token, index) => index > startIndex && index < endIndex && token.value === "}"
|
|
3711
3755
|
);
|
|
3712
3756
|
if (closingBraceIndex === -1) return false;
|
|
3713
3757
|
let entryStartsAt = startIndex + 1;
|
|
3714
3758
|
for (let index = entryStartsAt; index <= closingBraceIndex; index++) {
|
|
3715
|
-
if (index !== closingBraceIndex && _optionalChain([tokens, 'access',
|
|
3759
|
+
if (index !== closingBraceIndex && _optionalChain([tokens, 'access', _222 => _222[index], 'optionalAccess', _223 => _223.value]) !== ",") continue;
|
|
3716
3760
|
const entry = tokens.slice(entryStartsAt, index);
|
|
3717
3761
|
if (entry.length > 0 && entry[0].value !== "type") return false;
|
|
3718
3762
|
entryStartsAt = index + 1;
|
|
@@ -3752,7 +3796,7 @@ function warnUnresolvedAliasImport(importerPath, specifier, root) {
|
|
|
3752
3796
|
if (!ALIAS_IMPORT.test(specifier) || warnedUnresolvedAliasImports.has(specifier)) return;
|
|
3753
3797
|
warnedUnresolvedAliasImports.add(specifier);
|
|
3754
3798
|
const importer = root ? _path2.default.relative(root, importerPath) : importerPath;
|
|
3755
|
-
|
|
3799
|
+
_chunk7U4XF76Rcjs.logger.warn(
|
|
3756
3800
|
`Could not resolve "${specifier}" (imported by ${importer}) while checking which pages need client JavaScript. If it holds client components, they will not hydrate. Map the alias in tsconfig.json "paths" or package.json "imports".`
|
|
3757
3801
|
);
|
|
3758
3802
|
}
|
|
@@ -3793,7 +3837,7 @@ function getProjectImportAliases(projectRoot) {
|
|
|
3793
3837
|
const sourceDir = _chunkRE5E2G5Scjs.getFarmProjectSourceDir.call(void 0, projectRoot);
|
|
3794
3838
|
const cacheStamp = `${stamp}:${sourceDir}`;
|
|
3795
3839
|
const cached = projectImportAliasCache.get(projectRoot);
|
|
3796
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
3840
|
+
if (_optionalChain([cached, 'optionalAccess', _224 => _224.stamp]) === cacheStamp) return cached.aliases;
|
|
3797
3841
|
const aliases = [
|
|
3798
3842
|
...readTsconfigPathAliases(projectRoot),
|
|
3799
3843
|
...readPackageImportAliases(projectRoot)
|
|
@@ -3814,7 +3858,7 @@ function readTsconfigPathAliases(projectRoot) {
|
|
|
3814
3858
|
const configPath = _path2.default.join(projectRoot, name);
|
|
3815
3859
|
if (!_fs2.default.existsSync(configPath)) continue;
|
|
3816
3860
|
const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set());
|
|
3817
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
3861
|
+
if (!_optionalChain([resolved, 'optionalAccess', _225 => _225.paths])) return [];
|
|
3818
3862
|
const base2 = _nullishCoalesce(resolved.baseUrl, () => ( resolved.pathsDirectory));
|
|
3819
3863
|
return Object.entries(resolved.paths).flatMap(([pattern, targets]) => {
|
|
3820
3864
|
if (!Array.isArray(targets)) return [];
|
|
@@ -3849,18 +3893,18 @@ function readTsconfigPaths(configPath, visited) {
|
|
|
3849
3893
|
inherited = _nullishCoalesce(readTsconfigPaths(parentPath, visited), () => ( inherited));
|
|
3850
3894
|
}
|
|
3851
3895
|
const options = _nullishCoalesce(config.compilerOptions, () => ( {}));
|
|
3852
|
-
const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess',
|
|
3896
|
+
const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess', _226 => _226.baseUrl]);
|
|
3853
3897
|
if (options.paths && typeof options.paths === "object") {
|
|
3854
3898
|
return { paths: options.paths, pathsDirectory: directory, baseUrl };
|
|
3855
3899
|
}
|
|
3856
3900
|
return inherited ? { ...inherited, baseUrl } : { pathsDirectory: directory, baseUrl };
|
|
3857
3901
|
}
|
|
3858
3902
|
function readPackageImportAliases(projectRoot) {
|
|
3859
|
-
const imports = _optionalChain([readPackageJson, 'call',
|
|
3903
|
+
const imports = _optionalChain([readPackageJson, 'call', _227 => _227(_path2.default.join(projectRoot, "package.json")), 'optionalAccess', _228 => _228.imports]);
|
|
3860
3904
|
if (!imports || typeof imports !== "object") return [];
|
|
3861
3905
|
return Object.entries(imports).flatMap(([pattern, value]) => {
|
|
3862
3906
|
const target = resolveConditionalExportTarget(value);
|
|
3863
|
-
if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess',
|
|
3907
|
+
if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess', _229 => _229.startsWith, 'call', _230 => _230("./")])) return [];
|
|
3864
3908
|
const wildcardIndex = pattern.indexOf("*");
|
|
3865
3909
|
return [
|
|
3866
3910
|
{
|
|
@@ -3926,15 +3970,15 @@ function resolvePackageModuleSourcePath(importerPath, specifier, root) {
|
|
|
3926
3970
|
const packageJsonPath = _path2.default.join(packageDirectory, "package.json");
|
|
3927
3971
|
const packageJson = readPackageJson(packageJsonPath);
|
|
3928
3972
|
const exportKey = packageSubpath ? `./${packageSubpath}` : ".";
|
|
3929
|
-
const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess',
|
|
3973
|
+
const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess', _231 => _231.exports]), exportKey);
|
|
3930
3974
|
const candidates = /* @__PURE__ */ new Set();
|
|
3931
|
-
if (_optionalChain([exportTarget, 'optionalAccess',
|
|
3975
|
+
if (_optionalChain([exportTarget, 'optionalAccess', _232 => _232.startsWith, 'call', _233 => _233("./")])) {
|
|
3932
3976
|
candidates.add(_path2.default.resolve(packageDirectory, exportTarget));
|
|
3933
3977
|
}
|
|
3934
3978
|
if (packageSubpath) {
|
|
3935
3979
|
candidates.add(_path2.default.join(packageDirectory, packageSubpath));
|
|
3936
3980
|
} else {
|
|
3937
|
-
for (const entry of [_optionalChain([packageJson, 'optionalAccess',
|
|
3981
|
+
for (const entry of [_optionalChain([packageJson, 'optionalAccess', _234 => _234.browser]), _optionalChain([packageJson, 'optionalAccess', _235 => _235.module]), _optionalChain([packageJson, 'optionalAccess', _236 => _236.main])]) {
|
|
3938
3982
|
if (typeof entry === "string") candidates.add(_path2.default.resolve(packageDirectory, entry));
|
|
3939
3983
|
}
|
|
3940
3984
|
candidates.add(_path2.default.join(packageDirectory, "index"));
|
|
@@ -3999,7 +4043,7 @@ function resolvePackageExport(exportsField, exportKey) {
|
|
|
3999
4043
|
if (!exportKey.startsWith(prefix) || !exportKey.endsWith(suffix)) continue;
|
|
4000
4044
|
const wildcard = exportKey.slice(prefix.length, exportKey.length - suffix.length);
|
|
4001
4045
|
const target = resolveConditionalExportTarget(value);
|
|
4002
|
-
return _nullishCoalesce(_optionalChain([target, 'optionalAccess',
|
|
4046
|
+
return _nullishCoalesce(_optionalChain([target, 'optionalAccess', _237 => _237.replace, 'call', _238 => _238("*", wildcard)]), () => ( null));
|
|
4003
4047
|
}
|
|
4004
4048
|
return null;
|
|
4005
4049
|
}
|
|
@@ -4042,7 +4086,7 @@ function resolveSourceCandidatePath(candidate) {
|
|
|
4042
4086
|
}
|
|
4043
4087
|
for (const sourcePath of paths) {
|
|
4044
4088
|
try {
|
|
4045
|
-
if (_optionalChain([_fs2.default, 'access',
|
|
4089
|
+
if (_optionalChain([_fs2.default, 'access', _239 => _239.statSync, 'call', _240 => _240(sourcePath, { throwIfNoEntry: false }), 'optionalAccess', _241 => _241.isFile, 'call', _242 => _242()])) return sourcePath;
|
|
4046
4090
|
} catch (e46) {
|
|
4047
4091
|
}
|
|
4048
4092
|
}
|
|
@@ -4223,7 +4267,7 @@ var ENVIRONMENT_FUNCTIONS = /* @__PURE__ */ new Set([
|
|
|
4223
4267
|
]);
|
|
4224
4268
|
var MODULE_EXTENSION_RE2 = /\.[cm]?[jt]sx?$/;
|
|
4225
4269
|
function transformEnvironmentFunctions(options) {
|
|
4226
|
-
if (!isTransformableModule(options.id) || !containsEnvironmentFunction(options.code)) {
|
|
4270
|
+
if (!isTransformableModule(options.id, options.componentExtensions) || !containsEnvironmentFunction(options.code)) {
|
|
4227
4271
|
return null;
|
|
4228
4272
|
}
|
|
4229
4273
|
let output = options.code;
|
|
@@ -4255,18 +4299,21 @@ function transformEnvironmentFunctions(options) {
|
|
|
4255
4299
|
}
|
|
4256
4300
|
function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
4257
4301
|
let routesFiles = /* @__PURE__ */ new Set();
|
|
4302
|
+
const componentExtensions = new Set(
|
|
4303
|
+
_chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, options.renderer || void 0)
|
|
4304
|
+
);
|
|
4258
4305
|
let farmApi;
|
|
4259
4306
|
let isBuild = false;
|
|
4260
4307
|
let projectRoot = process.cwd();
|
|
4261
4308
|
let sources;
|
|
4262
4309
|
const routeSourceFiles = () => {
|
|
4263
|
-
const clientRoutes = _optionalChain([farmApi, 'optionalAccess',
|
|
4264
|
-
if (_optionalChain([sources, 'optionalAccess',
|
|
4310
|
+
const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _243 => _243.getProgrammaticClientRoutes, 'call', _244 => _244()]);
|
|
4311
|
+
if (_optionalChain([sources, 'optionalAccess', _245 => _245.for]) !== clientRoutes || !sources) {
|
|
4265
4312
|
sources = {
|
|
4266
4313
|
for: clientRoutes,
|
|
4267
4314
|
files: /* @__PURE__ */ new Set([
|
|
4268
4315
|
...routesFiles,
|
|
4269
|
-
...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess',
|
|
4316
|
+
...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _246 => _246.routeSourceFiles]), () => ( []))].map(resolvedFile)
|
|
4270
4317
|
])
|
|
4271
4318
|
};
|
|
4272
4319
|
}
|
|
@@ -4287,7 +4334,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4287
4334
|
configResolved(config) {
|
|
4288
4335
|
isBuild = config.command === "build";
|
|
4289
4336
|
projectRoot = config.root;
|
|
4290
|
-
farmApi = _optionalChain([config, 'access',
|
|
4337
|
+
farmApi = _optionalChain([config, 'access', _247 => _247.plugins, 'access', _248 => _248.find, 'call', _249 => _249((plugin) => plugin.name === "farm"), 'optionalAccess', _250 => _250.api]);
|
|
4291
4338
|
sources = void 0;
|
|
4292
4339
|
routesFiles = new Set(
|
|
4293
4340
|
_chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
|
|
@@ -4300,14 +4347,20 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4300
4347
|
transform(code, id, transformOptions) {
|
|
4301
4348
|
const environment = resolveBuildEnvironment(
|
|
4302
4349
|
this,
|
|
4303
|
-
_optionalChain([transformOptions, 'optionalAccess',
|
|
4350
|
+
_optionalChain([transformOptions, 'optionalAccess', _251 => _251.ssr])
|
|
4304
4351
|
);
|
|
4305
4352
|
const parse3 = (source) => this.parse(source);
|
|
4306
|
-
const result = transformEnvironmentFunctions({
|
|
4353
|
+
const result = transformEnvironmentFunctions({
|
|
4354
|
+
code,
|
|
4355
|
+
id,
|
|
4356
|
+
environment,
|
|
4357
|
+
parse: parse3,
|
|
4358
|
+
componentExtensions
|
|
4359
|
+
});
|
|
4307
4360
|
if (environment === "client" && !isBuild && !_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
|
|
4308
4361
|
this.error(routeSourceError(moduleFile(id)));
|
|
4309
4362
|
}
|
|
4310
|
-
if (environment === "server" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access',
|
|
4363
|
+
if (environment === "server" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _252 => _252.experimental, 'optionalAccess', _253 => _253.serverComponents])) === "islands" && isApplicationScript(id)) {
|
|
4311
4364
|
const file = id.split("?", 1)[0];
|
|
4312
4365
|
const root = _fs.realpathSync.call(void 0, _nullishCoalesce(options.root, () => ( projectRoot)));
|
|
4313
4366
|
const clientCode = getFarmClientReachableModules(root, root).has(_path2.default.resolve(file)) || _fs.existsSync.call(void 0, file) && hasUseClientDirective(_fs.readFileSync.call(void 0, file, "utf8"));
|
|
@@ -4341,7 +4394,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4341
4394
|
for (const id of this.getModuleIds()) {
|
|
4342
4395
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4343
4396
|
const chain = findClientNodeBuiltinChain(id, (moduleId) => {
|
|
4344
|
-
return _optionalChain([this, 'access',
|
|
4397
|
+
return _optionalChain([this, 'access', _254 => _254.getModuleInfo, 'call', _255 => _255(moduleId), 'optionalAccess', _256 => _256.importedIds]);
|
|
4345
4398
|
});
|
|
4346
4399
|
if (chain) {
|
|
4347
4400
|
this.error(
|
|
@@ -4359,8 +4412,8 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
|
|
|
4359
4412
|
}
|
|
4360
4413
|
if (!forbidden.has(moduleFile(id))) continue;
|
|
4361
4414
|
const info = this.getModuleInfo(id);
|
|
4362
|
-
if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess',
|
|
4363
|
-
this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess',
|
|
4415
|
+
if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _257 => _257.code]))) continue;
|
|
4416
|
+
this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _258 => _258.importers, 'access', _259 => _259.map, 'call', _260 => _260(moduleFile)])));
|
|
4364
4417
|
}
|
|
4365
4418
|
}
|
|
4366
4419
|
};
|
|
@@ -4379,8 +4432,8 @@ function resolvedFile(filePath) {
|
|
|
4379
4432
|
}
|
|
4380
4433
|
}
|
|
4381
4434
|
function resolveBuildEnvironment(context, ssr) {
|
|
4382
|
-
if (_optionalChain([context, 'access',
|
|
4383
|
-
if (_optionalChain([context, 'access',
|
|
4435
|
+
if (_optionalChain([context, 'access', _261 => _261.environment, 'optionalAccess', _262 => _262.name]) === "client") return "client";
|
|
4436
|
+
if (_optionalChain([context, 'access', _263 => _263.environment, 'optionalAccess', _264 => _264.name]) === "rsc" || _optionalChain([context, 'access', _265 => _265.environment, 'optionalAccess', _266 => _266.name]) === "ssr") {
|
|
4384
4437
|
return "server";
|
|
4385
4438
|
}
|
|
4386
4439
|
return ssr ? "server" : "client";
|
|
@@ -4627,9 +4680,11 @@ function isEnvironmentFunctionKind(value) {
|
|
|
4627
4680
|
function containsEnvironmentFunction(code) {
|
|
4628
4681
|
return Array.from(ENVIRONMENT_FUNCTIONS).some((name) => code.includes(name));
|
|
4629
4682
|
}
|
|
4630
|
-
function isTransformableModule(id) {
|
|
4631
|
-
const cleanId = id.split("?",
|
|
4632
|
-
|
|
4683
|
+
function isTransformableModule(id, componentExtensions = /* @__PURE__ */ new Set()) {
|
|
4684
|
+
const [cleanId = id, query = ""] = id.split("?", 2);
|
|
4685
|
+
if (/\.d\.[cm]?ts$/.test(cleanId)) return false;
|
|
4686
|
+
if (MODULE_EXTENSION_RE2.test(cleanId)) return true;
|
|
4687
|
+
return componentExtensions.has(_path2.default.extname(cleanId).toLowerCase()) && !/(?:^|&)type=style\b/.test(query);
|
|
4633
4688
|
}
|
|
4634
4689
|
function transformError(id, message) {
|
|
4635
4690
|
return new Error(`[Farm environment functions] ${message} in ${id.split("?", 1)[0]}`);
|