@farm.js/core 0.1.80 → 0.1.82
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.d-BPa5n0ld.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
- package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
- package/dist/agent-runtime.cjs +4 -3
- package/dist/agent-runtime.d.mts +2 -1
- package/dist/agent-runtime.d.ts +2 -1
- package/dist/agent-runtime.mjs +3 -2
- package/dist/analyzer-LV23T6QN.cjs +17 -0
- package/dist/{analyzer-F7CWE5VA.mjs → analyzer-RPU2KG4J.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 +6 -5
- package/dist/api/node.d.mts +4 -3
- package/dist/api/node.d.ts +4 -3
- package/dist/api/node.mjs +5 -4
- package/dist/api/route-manager.cjs +7 -6
- package/dist/api/route-manager.d.mts +4 -3
- package/dist/api/route-manager.d.ts +4 -3
- package/dist/api/route-manager.mjs +6 -5
- package/dist/api/runtime.cjs +5 -4
- package/dist/api/runtime.d.mts +3 -2
- package/dist/api/runtime.d.ts +3 -2
- package/dist/api/runtime.mjs +4 -3
- package/dist/api.cjs +9 -8
- package/dist/api.d.mts +5 -4
- package/dist/api.d.ts +5 -4
- package/dist/api.mjs +8 -7
- package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
- package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
- package/dist/app-markdown.cjs +3 -3
- package/dist/app-markdown.d.mts +5 -4
- package/dist/app-markdown.d.ts +5 -4
- package/dist/app-markdown.mjs +2 -2
- package/dist/{app.d-DXeRWZK7.d.mts → app.d-C0ePpuaG.d.mts} +30 -4
- package/dist/{app.d-DwX1ePhs.d.ts → app.d-CIoXsAbN.d.ts} +30 -4
- package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
- package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
- package/dist/chunk-2UYYXSUS.mjs +401 -0
- package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
- package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
- package/dist/chunk-3DE6RK7K.cjs +36 -0
- package/dist/{chunk-GBW5DU7V.mjs → chunk-47I2MYIR.mjs} +487 -304
- package/dist/{chunk-RQBGHHOQ.mjs → chunk-4X7LSGM6.mjs} +1 -1
- package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
- package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
- package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
- package/dist/chunk-5MMKNW7Q.cjs +54 -0
- package/dist/{chunk-AXA2BSX3.cjs → chunk-5MUFW5UU.cjs} +22 -21
- package/dist/{chunk-MQOHYV6L.cjs → chunk-5P65LXGU.cjs} +11 -11
- package/dist/{chunk-KEU55O2D.mjs → chunk-63ZE6B6M.mjs} +7 -6
- package/dist/{chunk-TS3ZHJN5.cjs → chunk-6BPFIYGY.cjs} +3 -3
- package/dist/{chunk-NJ4OASLP.mjs → chunk-6QYPP5KC.mjs} +2 -2
- package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
- package/dist/{chunk-G4SZC2WH.cjs → chunk-AIPZDBP6.cjs} +557 -374
- package/dist/{chunk-X4TSMQWF.cjs → chunk-ARORZ3MH.cjs} +548 -397
- package/dist/{chunk-K3XKEZR6.mjs → chunk-AUFEM3FB.mjs} +1 -1
- package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
- package/dist/{chunk-5OAN7BG5.cjs → chunk-B2PGVHBG.cjs} +4 -4
- package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
- package/dist/chunk-B7L24VPX.cjs +401 -0
- package/dist/{chunk-5VDJEKGK.cjs → chunk-BBVLOEND.cjs} +1 -1
- package/dist/{chunk-XF7MJSUS.mjs → chunk-BCQIXH7L.mjs} +1 -1
- package/dist/{chunk-67MZTLTF.cjs → chunk-BCTHOQPP.cjs} +37 -9
- package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
- package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
- package/dist/{chunk-QHAISITM.mjs → chunk-C3VCYOU4.mjs} +1 -1
- package/dist/chunk-C5QHZ626.cjs +85 -0
- package/dist/{chunk-3K2E55BJ.mjs → chunk-CA2HBLXP.mjs} +13 -3
- package/dist/{chunk-ANZLZNNX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
- package/dist/{chunk-4MIDUSIX.mjs → chunk-CJDBTTLB.mjs} +17 -17
- package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
- package/dist/chunk-D2VAANBS.mjs +48 -0
- package/dist/{chunk-XZBBKZGW.mjs → chunk-DAXU2NBE.mjs} +128 -41
- package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
- package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
- package/dist/{chunk-ZVSQN7NC.cjs → chunk-DRO3NXA3.cjs} +40 -43
- package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
- package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
- package/dist/{chunk-MDEFTF63.mjs → chunk-EL2Z6YFZ.mjs} +25 -28
- package/dist/chunk-EZYKV24V.mjs +385 -0
- package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
- package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
- package/dist/{chunk-V73Y4UBL.mjs → chunk-GXLNARPO.mjs} +151 -16
- package/dist/{chunk-ZPEZXQTM.cjs → chunk-HHQEKLZL.cjs} +2 -2
- package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
- package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
- package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
- package/dist/{chunk-44G4XHEL.mjs → chunk-I4DR3HCH.mjs} +11 -11
- package/dist/chunk-I4WZRG73.mjs +54 -0
- package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
- package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
- package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
- package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
- package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
- package/dist/{chunk-CCMP4JD2.cjs → chunk-JK26IMT7.cjs} +1 -1
- package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
- package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
- package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
- package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
- package/dist/{chunk-LVGB5PYK.cjs → chunk-LM2ZDNDD.cjs} +28 -28
- package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
- package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
- package/dist/{chunk-DVHFIETW.cjs → chunk-N2EFMN2K.cjs} +18 -18
- package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
- package/dist/{chunk-KKVRWNDH.mjs → chunk-NAHDG6UX.mjs} +4 -4
- package/dist/{chunk-UWOCYINY.cjs → chunk-NEKO3HM2.cjs} +12 -2
- package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
- package/dist/{chunk-ZDYYZX73.mjs → chunk-NRCKBDYP.mjs} +266 -115
- package/dist/{chunk-EG5YBYHO.mjs → chunk-OMB7UGVW.mjs} +1 -1
- package/dist/{chunk-JGEN2FIT.mjs → chunk-OP5VI4TP.mjs} +1 -1
- package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
- package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
- package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
- package/dist/{chunk-WJ2O2MPP.cjs → chunk-Q2VOT3K2.cjs} +494 -407
- package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
- package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
- package/dist/{chunk-3JQBQG7K.mjs → chunk-QSMUMK7Y.mjs} +2 -2
- package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
- package/dist/{chunk-GCRT6GJG.mjs → chunk-RMLR5RMH.mjs} +30 -2
- package/dist/{chunk-XY5OZQF6.cjs → chunk-RMPUEH5T.cjs} +2 -2
- package/dist/{chunk-7DD5TNPS.cjs → chunk-S7WZUK3B.cjs} +2 -2
- package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
- package/dist/{chunk-Z4SMFUZ7.cjs → chunk-U54REWMJ.cjs} +23 -23
- package/dist/chunk-U6XYBTUT.mjs +36 -0
- package/dist/chunk-UDMBUTJD.mjs +85 -0
- package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
- package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
- package/dist/{chunk-SDICLSQU.cjs → chunk-VMBIKDKW.cjs} +10 -10
- package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
- package/dist/chunk-VS7HLH4S.cjs +385 -0
- package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
- 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-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
- package/dist/{chunk-2RRTOKRZ.mjs → chunk-YHM4PXJY.mjs} +1 -1
- package/dist/{chunk-A5D3UMLJ.mjs → chunk-YSU3WCW6.mjs} +1 -1
- package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
- package/dist/{chunk-YN3YMSKD.mjs → chunk-ZIZRIZLP.mjs} +3 -3
- package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
- package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
- package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
- package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
- package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-C1WM3ieD.d.mts} +7 -13
- package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-DcmDzcSC.d.ts} +7 -13
- package/dist/client-plugins.d.mts +2 -1
- package/dist/client-plugins.d.ts +2 -1
- package/dist/client.cjs +9 -8
- package/dist/client.d.mts +20 -151
- package/dist/client.d.ts +20 -151
- package/dist/client.mjs +8 -7
- package/dist/config.d.mts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/desktop.d.mts +3 -2
- package/dist/desktop.d.ts +3 -2
- package/dist/{devtools-JJOYTIMS.cjs → devtools-5B7NZE6F.cjs} +15 -14
- package/dist/{devtools-F3FDFV26.mjs → devtools-C5GXZZ7E.mjs} +12 -11
- package/dist/docs.cjs +14 -13
- package/dist/docs.d.mts +4 -3
- package/dist/docs.d.ts +4 -3
- package/dist/docs.mjs +13 -12
- package/dist/environment/vite.cjs +7 -6
- package/dist/environment/vite.mjs +6 -5
- package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
- package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
- package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
- package/dist/{headers.d-CAW4wPey.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
- package/dist/index.cjs +68 -65
- package/dist/{index.d-BEVK61zS.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
- package/dist/{index.d-ah2c89Wu.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
- package/dist/index.d.mts +25 -23
- package/dist/index.d.ts +25 -23
- package/dist/index.mjs +72 -69
- package/dist/instrumentation.cjs +3 -3
- package/dist/instrumentation.mjs +2 -2
- package/dist/integrations/orm.d.mts +2 -1
- package/dist/integrations/orm.d.ts +2 -1
- package/dist/integrations.cjs +4 -3
- package/dist/integrations.d.mts +2 -1
- package/dist/integrations.d.ts +2 -1
- package/dist/integrations.mjs +3 -2
- package/dist/internal/app-markdown-runtime.cjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +12 -5
- package/dist/internal/app-markdown-runtime.d.ts +12 -5
- package/dist/internal/app-markdown-runtime.mjs +1 -1
- package/dist/internal/build-runtime.cjs +49 -47
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +48 -46
- package/dist/internal/cli-runtime.cjs +25 -24
- package/dist/internal/cli-runtime.d.mts +8 -7
- package/dist/internal/cli-runtime.d.ts +8 -7
- package/dist/internal/cli-runtime.mjs +26 -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 +76 -15
- package/dist/internal/client-runtime.d.mts +18 -7
- package/dist/internal/client-runtime.d.ts +18 -7
- package/dist/internal/client-runtime.mjs +67 -6
- package/dist/internal/compression-runtime.d.mts +2 -1
- package/dist/internal/compression-runtime.d.ts +2 -1
- package/dist/internal/config-runtime.cjs +14 -13
- package/dist/internal/config-runtime.d.mts +4 -3
- package/dist/internal/config-runtime.d.ts +4 -3
- package/dist/internal/config-runtime.mjs +13 -12
- 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 +9 -7
- package/dist/internal/infra-analytics-runtime.d.mts +8 -2
- package/dist/internal/infra-analytics-runtime.d.ts +8 -2
- package/dist/internal/infra-analytics-runtime.mjs +9 -7
- 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 +63 -23
- package/dist/internal/islands-boot.d.mts +5 -3
- package/dist/internal/islands-boot.d.ts +5 -3
- package/dist/internal/islands-boot.mjs +58 -18
- 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 +30 -25
- package/dist/internal/production-runtime.d.mts +14 -11
- package/dist/internal/production-runtime.d.ts +14 -11
- package/dist/internal/production-runtime.mjs +35 -30
- 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 +3 -3
- package/dist/internal/spa-router.d.mts +4 -3
- package/dist/internal/spa-router.d.ts +4 -3
- package/dist/internal/spa-router.mjs +2 -2
- package/dist/internal/start-manifest.d.mts +2 -1
- package/dist/internal/start-manifest.d.ts +2 -1
- package/dist/internal/vercel-edge-middleware.cjs +1 -1
- package/dist/internal/vercel-edge-middleware.mjs +1 -1
- 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/markdown.d.mts +2 -1
- package/dist/markdown.d.ts +2 -1
- package/dist/middleware.cjs +5 -5
- package/dist/middleware.d.mts +2 -1
- package/dist/middleware.d.ts +2 -1
- package/dist/middleware.mjs +4 -4
- package/dist/{mount.d-DcoPFqv5.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
- package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
- package/dist/{native-server-fn-handler-TNVFEQW3.cjs → native-server-fn-handler-57TCQPSM.cjs} +4 -4
- package/dist/{native-server-fn-handler-OXFTI6V5.mjs → native-server-fn-handler-PYK65A46.mjs} +3 -3
- package/dist/{navigation-delegate.d-2MK4YSlL.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
- package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +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 +7 -6
- package/dist/navigation.d.ts +7 -6
- package/dist/navigation.mjs +5 -5
- package/dist/{nitro-C3MYDX7V.mjs → nitro-FK3SZM4H.mjs} +2 -2
- package/dist/{nitro-6UOJXJZ6.cjs → nitro-YDFMH5PY.cjs} +6 -6
- 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/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
- package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
- package/dist/plugin.cjs +41 -37
- package/dist/plugin.d.mts +6 -5
- package/dist/plugin.d.ts +6 -5
- package/dist/plugin.mjs +40 -36
- package/dist/query/client.cjs +10 -10
- package/dist/query/client.mjs +5 -5
- package/dist/{render-plan.d-2o-AG-ot.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
- package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-CK5Lggyb.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 +79 -17
- package/dist/renderer-client.d.mts +13 -97
- package/dist/renderer-client.d.ts +13 -97
- package/dist/renderer-client.mjs +69 -7
- package/dist/renderer.cjs +4 -2
- package/dist/renderer.d.mts +43 -5
- package/dist/renderer.d.ts +43 -5
- package/dist/renderer.mjs +3 -1
- package/dist/{request.d-RCnCBuWq.d.mts → request.d-BhggxQf3.d.mts} +1 -1
- package/dist/{request.d-CE0FIkiM.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
- package/dist/request.d.mts +3 -2
- package/dist/request.d.ts +3 -2
- package/dist/{route-rendering.d-BTPOM2nU.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
- package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
- package/dist/{router.d-BU_WE6Ol.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
- package/dist/{router.d-D8Vvwl4i.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
- package/dist/routes.cjs +1 -1
- package/dist/routes.d.mts +2 -1
- package/dist/routes.d.ts +2 -1
- package/dist/routes.mjs +1 -1
- package/dist/{rsc-pipeline-A3R4U26C.cjs → rsc-pipeline-5AOF64FL.cjs} +19 -18
- package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-DNRLYOJ7.mjs} +18 -17
- package/dist/{runtime-SQFRHRGJ.mjs → runtime-EHG2FRXZ.mjs} +18 -17
- package/dist/{runtime-WZ3CHHGJ.cjs → runtime-ZVHG5SRB.cjs} +20 -19
- package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
- package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
- package/dist/server-action-security.cjs +1 -1
- package/dist/server-action-security.mjs +1 -1
- package/dist/{server-components-status.d-BeqSXcjM.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
- package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +4 -3
- package/dist/server-plugins.d.ts +4 -3
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +82 -71
- package/dist/server.d.mts +12 -11
- package/dist/server.d.ts +12 -11
- package/dist/server.mjs +61 -50
- package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-Bjgl-Osi.d.ts} +3 -3
- package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-l3G38xHa.d.mts} +3 -3
- package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
- package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
- package/dist/store-core.d-BZjuC6Zc.d.mts +309 -0
- package/dist/store-core.d-BaOUOPf7.d.ts +309 -0
- package/dist/testing.cjs +7 -6
- package/dist/testing.d.mts +2 -1
- package/dist/testing.d.ts +2 -1
- package/dist/testing.mjs +6 -5
- package/dist/{utils.d-_dvevm5s.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
- package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +43 -37
- package/dist/vite.d.mts +18 -7
- package/dist/vite.d.ts +18 -7
- package/dist/vite.mjs +42 -36
- package/dist/workflows.cjs +2 -2
- package/dist/workflows.mjs +1 -1
- package/package.json +17 -2
- package/dist/analyzer-I7RBBQ65.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/{chunk-EY7ED5UW.mjs → chunk-3RVLJTFZ.mjs} +3 -3
- package/dist/{chunk-UJPE75GF.mjs → chunk-J2VUPCCR.mjs} +3 -3
- package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
- package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
- package/dist/{chunk-2FK47RRZ.cjs → chunk-VGHDPEPQ.cjs} +2 -2
- package/dist/{chunk-CGIVCGH5.cjs → chunk-XOFJUSWC.cjs} +2 -2
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFarmRouteLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QSMUMK7Y.mjs";
|
|
4
4
|
import {
|
|
5
5
|
_classifyFarmMCPSession,
|
|
6
6
|
_farmMCPClientSession,
|
|
7
7
|
_isFarmMCPRequest,
|
|
8
8
|
classifyFarmClient
|
|
9
9
|
} from "./chunk-YU2MNIIY.mjs";
|
|
10
|
+
import {
|
|
11
|
+
validateIntegrationRequestOrigin
|
|
12
|
+
} from "./chunk-PNMAD3OS.mjs";
|
|
10
13
|
import {
|
|
11
14
|
_farmToolCallPayload,
|
|
12
15
|
onFarmEvent
|
|
@@ -97,7 +100,10 @@ function routeTemplate(pattern) {
|
|
|
97
100
|
var PATH = /^\/(?!\/)[\w!$%&'()*+,\-./:;=@[\]^|~]*$/;
|
|
98
101
|
var MAX_PATH_LENGTH = 1024;
|
|
99
102
|
function requestPath(request) {
|
|
100
|
-
|
|
103
|
+
return appPath(new URL(request.url).pathname);
|
|
104
|
+
}
|
|
105
|
+
function appPath(pathname) {
|
|
106
|
+
const path = stripFarmBasePath(pathname);
|
|
101
107
|
return path.length <= MAX_PATH_LENGTH && PATH.test(path) ? path : void 0;
|
|
102
108
|
}
|
|
103
109
|
function duration(value) {
|
|
@@ -283,7 +289,8 @@ function createFarmInfraAnalyticsExporter(options, send = (input, init) => fetch
|
|
|
283
289
|
if (queue.length) diagnostic({ code: "dropped", count: queue.length });
|
|
284
290
|
queue.length = 0;
|
|
285
291
|
}
|
|
286
|
-
|
|
292
|
+
const accepting = () => !stopped && !closing;
|
|
293
|
+
return { enqueue, flush, close, accepting };
|
|
287
294
|
}
|
|
288
295
|
var CONTEXT_KEY = "farm.infra.analytics";
|
|
289
296
|
function beginRequest(request, route, waitUntil) {
|
|
@@ -383,12 +390,15 @@ function toolPayload(value) {
|
|
|
383
390
|
}
|
|
384
391
|
return { value: redacted };
|
|
385
392
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
if (!payload) return {};
|
|
393
|
+
var PAYLOAD_KEYS = ["arguments", "result"];
|
|
394
|
+
function toolPayloadFields(payload, omitted = []) {
|
|
389
395
|
const fields = {};
|
|
390
|
-
for (const key of
|
|
391
|
-
if (
|
|
396
|
+
for (const key of PAYLOAD_KEYS) {
|
|
397
|
+
if (omitted.includes(key)) {
|
|
398
|
+
(fields.omitted ?? (fields.omitted = [])).push(key);
|
|
399
|
+
continue;
|
|
400
|
+
}
|
|
401
|
+
if (!payload || !(key in payload)) continue;
|
|
392
402
|
const kept = toolPayload(payload[key]);
|
|
393
403
|
if (kept === "omitted") (fields.omitted ?? (fields.omitted = [])).push(key);
|
|
394
404
|
else if (kept) fields[key] = kept.value;
|
|
@@ -407,12 +417,113 @@ function toolEvent(metadata, event, payloads) {
|
|
|
407
417
|
tool: event.tool,
|
|
408
418
|
outcome: event.outcome,
|
|
409
419
|
durationMs: duration(event.durationMs),
|
|
410
|
-
...payloads ? toolPayloadFields(event) : {}
|
|
420
|
+
...payloads ? toolPayloadFields(_farmToolCallPayload(event)) : {}
|
|
411
421
|
};
|
|
412
422
|
}
|
|
413
|
-
|
|
423
|
+
var FARM_WEBMCP_REPORT_PATH = "/_farm/webmcp/tool-calls";
|
|
424
|
+
var MAX_REPORT_BYTES = 32 * 1024;
|
|
425
|
+
var WEBMCP_TOOL = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
426
|
+
var PAGE_PATH = /^\/(?!\/)[\x21\x22\x24-\x3e\x40-\x5b\x5d-\x7e]*$/;
|
|
427
|
+
var MAX_PAGE_PATH = 2048;
|
|
428
|
+
var REPORT_FIELDS = /* @__PURE__ */ new Set([
|
|
429
|
+
"tool",
|
|
430
|
+
"outcome",
|
|
431
|
+
"durationMs",
|
|
432
|
+
"path",
|
|
433
|
+
...PAYLOAD_KEYS,
|
|
434
|
+
"omitted"
|
|
435
|
+
]);
|
|
436
|
+
function webMCPReport(value) {
|
|
437
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
438
|
+
const report = value;
|
|
439
|
+
if (Object.keys(report).some((key) => !REPORT_FIELDS.has(key))) return void 0;
|
|
440
|
+
const { tool, outcome, durationMs, path, omitted } = report;
|
|
441
|
+
const valid = typeof tool === "string" && WEBMCP_TOOL.test(tool) && (outcome === "success" || outcome === "error") && typeof durationMs === "number" && Number.isFinite(durationMs) && durationMs >= 0 && typeof path === "string" && path.length <= MAX_PAGE_PATH && PAGE_PATH.test(path) && (omitted === void 0 || Array.isArray(omitted) && omitted.every(
|
|
442
|
+
(key, index) => PAYLOAD_KEYS.includes(key) && omitted.indexOf(key) === index && !(key in report)
|
|
443
|
+
));
|
|
444
|
+
return valid ? report : void 0;
|
|
445
|
+
}
|
|
446
|
+
async function readReport(request) {
|
|
447
|
+
const declared = request.headers.get("content-length");
|
|
448
|
+
if (declared !== null && Number(declared) > MAX_REPORT_BYTES) return null;
|
|
449
|
+
if (!request.body) return "";
|
|
450
|
+
const reader = request.body.getReader();
|
|
451
|
+
const chunks = [];
|
|
452
|
+
let size = 0;
|
|
453
|
+
try {
|
|
454
|
+
for (; ; ) {
|
|
455
|
+
const { done, value } = await reader.read();
|
|
456
|
+
if (done) break;
|
|
457
|
+
size += value.byteLength;
|
|
458
|
+
if (size > MAX_REPORT_BYTES) return null;
|
|
459
|
+
chunks.push(value);
|
|
460
|
+
}
|
|
461
|
+
} finally {
|
|
462
|
+
void reader.cancel().catch(() => {
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
const body = new Uint8Array(size);
|
|
466
|
+
let offset = 0;
|
|
467
|
+
for (const chunk of chunks) {
|
|
468
|
+
body.set(chunk, offset);
|
|
469
|
+
offset += chunk.byteLength;
|
|
470
|
+
}
|
|
471
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(body);
|
|
472
|
+
}
|
|
473
|
+
var refuse = (status, error, headers = {}) => Response.json({ error }, { status, headers: { "cache-control": "no-store", ...headers } });
|
|
474
|
+
async function receiveWebMCPReport(request, exporter, options, webmcp, waitUntil) {
|
|
475
|
+
if (!exporter.accepting()) return refuse(404, "analytics_off");
|
|
476
|
+
if (request.method !== "POST") return refuse(405, "method", { allow: "POST" });
|
|
477
|
+
if (!validateIntegrationRequestOrigin(request).ok) return refuse(403, "origin");
|
|
478
|
+
const type = request.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase();
|
|
479
|
+
if (type !== "application/json") return refuse(415, "content_type");
|
|
480
|
+
let report;
|
|
481
|
+
try {
|
|
482
|
+
const text = await readReport(request);
|
|
483
|
+
if (text === null) return refuse(413, "too_large");
|
|
484
|
+
report = webMCPReport(JSON.parse(text));
|
|
485
|
+
} catch {
|
|
486
|
+
report = void 0;
|
|
487
|
+
}
|
|
488
|
+
if (!report) return refuse(400, "invalid_report");
|
|
489
|
+
let route;
|
|
490
|
+
try {
|
|
491
|
+
route = await webmcp.route?.(report.path);
|
|
492
|
+
} catch {
|
|
493
|
+
route = void 0;
|
|
494
|
+
}
|
|
495
|
+
const path = appPath(report.path);
|
|
496
|
+
exporter.enqueue({
|
|
497
|
+
id: uuid(),
|
|
498
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
499
|
+
route: routeTemplate(getFarmRouteLabel(route)),
|
|
500
|
+
...path ? { path } : {},
|
|
501
|
+
agent: classifyFarmClient(request),
|
|
502
|
+
kind: "mcp.tool",
|
|
503
|
+
source: "webmcp",
|
|
504
|
+
tool: report.tool,
|
|
505
|
+
outcome: report.outcome,
|
|
506
|
+
durationMs: duration(report.durationMs),
|
|
507
|
+
...options.toolPayloads !== false ? toolPayloadFields(report, report.omitted) : {}
|
|
508
|
+
});
|
|
509
|
+
waitUntil(exporter.flush());
|
|
510
|
+
return new Response(null, { status: 204, headers: { "cache-control": "no-store" } });
|
|
511
|
+
}
|
|
512
|
+
var webMCPOptions = /* @__PURE__ */ new WeakMap();
|
|
513
|
+
function _setFarmInfraAnalyticsWebMCPRoute(plugin, route) {
|
|
514
|
+
const options = webMCPOptions.get(plugin);
|
|
515
|
+
if (options) options.route = route;
|
|
516
|
+
}
|
|
517
|
+
function _farmWebMCPReportsEnabled(plugins) {
|
|
518
|
+
return (plugins ?? []).some((plugin) => {
|
|
519
|
+
const candidate = plugin;
|
|
520
|
+
return candidate?.name === "farm:webmcp" && candidate.client?.public?.analytics !== false;
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
function farmInfraAnalyticsPlugin(options, send, runtimeOptions = {}) {
|
|
414
524
|
const contextKey = `${CONTEXT_KEY}.${uuid()}`;
|
|
415
|
-
|
|
525
|
+
const webmcp = runtimeOptions.webmcp ? { ...runtimeOptions.webmcp } : void 0;
|
|
526
|
+
const plugin = {
|
|
416
527
|
name: "farm:infra-analytics",
|
|
417
528
|
enforce: "post",
|
|
418
529
|
setup(context) {
|
|
@@ -426,6 +537,20 @@ function farmInfraAnalyticsPlugin(options, send) {
|
|
|
426
537
|
runtime: {
|
|
427
538
|
// Recording a request decides nothing about who may read the response.
|
|
428
539
|
cache: "public",
|
|
540
|
+
...webmcp ? {
|
|
541
|
+
endpoints: [
|
|
542
|
+
{
|
|
543
|
+
path: FARM_WEBMCP_REPORT_PATH,
|
|
544
|
+
handler: (event) => receiveWebMCPReport(
|
|
545
|
+
event.request,
|
|
546
|
+
event.state.exporter,
|
|
547
|
+
options,
|
|
548
|
+
webmcp,
|
|
549
|
+
event.waitUntil
|
|
550
|
+
)
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
} : {},
|
|
429
554
|
start(context) {
|
|
430
555
|
const { exporter } = context.state;
|
|
431
556
|
context.state.unsubscribe = onFarmEvent(
|
|
@@ -446,6 +571,8 @@ function farmInfraAnalyticsPlugin(options, send) {
|
|
|
446
571
|
event.req.set(contextKey, beginRequest(event.request, event.route, event.waitUntil));
|
|
447
572
|
},
|
|
448
573
|
after(event) {
|
|
574
|
+
if (event.kind === "endpoint" && webmcp && event.route?.pattern === FARM_WEBMCP_REPORT_PATH)
|
|
575
|
+
return;
|
|
449
576
|
const metadata = event.req.get(contextKey) ?? (event.kind === "endpoint" ? beginRequest(event.request, event.route, event.waitUntil) : void 0);
|
|
450
577
|
if (!metadata || metadata.completed || !event.state) return;
|
|
451
578
|
metadata.completed = true;
|
|
@@ -471,9 +598,12 @@ function farmInfraAnalyticsPlugin(options, send) {
|
|
|
471
598
|
}
|
|
472
599
|
}
|
|
473
600
|
};
|
|
601
|
+
if (webmcp) webMCPOptions.set(plugin, webmcp);
|
|
602
|
+
return plugin;
|
|
474
603
|
}
|
|
475
|
-
function farmInfraAnalyticsRecorder(options, send) {
|
|
604
|
+
function farmInfraAnalyticsRecorder(options, send, runtimeOptions = {}) {
|
|
476
605
|
const exporter = createFarmInfraAnalyticsExporter(options, send);
|
|
606
|
+
const webmcp = runtimeOptions.webmcp;
|
|
477
607
|
const requests = new AsyncLocalStorage();
|
|
478
608
|
const unsubscribe = onFarmEvent(
|
|
479
609
|
(event) => {
|
|
@@ -490,6 +620,9 @@ function farmInfraAnalyticsRecorder(options, send) {
|
|
|
490
620
|
if (runtime.kind === "asset") return handler();
|
|
491
621
|
const background = (promise) => waitUntil ? waitUntil(promise) : void promise.catch(() => {
|
|
492
622
|
});
|
|
623
|
+
if (webmcp && stripFarmBasePath(new URL(request.url).pathname).replace(/(.)\/+$/, "$1") === FARM_WEBMCP_REPORT_PATH) {
|
|
624
|
+
return receiveWebMCPReport(request, exporter, options, webmcp, background);
|
|
625
|
+
}
|
|
493
626
|
const metadata = beginRequest(request, runtime.route, background);
|
|
494
627
|
const startedAt = performance.now();
|
|
495
628
|
let response;
|
|
@@ -541,17 +674,19 @@ function stopReason(event) {
|
|
|
541
674
|
}
|
|
542
675
|
return `Farm Infra answered ${event.status}. Check FARMJS_API_KEY and FARMJS_PROJECT_ID, then restart the server.`;
|
|
543
676
|
}
|
|
544
|
-
function createFarmInfraAnalyticsPlugin(env = processEnv(), warn = console.warn) {
|
|
677
|
+
function createFarmInfraAnalyticsPlugin(env = processEnv(), warn = console.warn, runtimeOptions) {
|
|
545
678
|
const options = linkedOptions(env, warn);
|
|
546
|
-
return options ? farmInfraAnalyticsPlugin(options) : null;
|
|
679
|
+
return options ? farmInfraAnalyticsPlugin(options, void 0, runtimeOptions) : null;
|
|
547
680
|
}
|
|
548
|
-
function createFarmInfraAnalyticsRecorder(env = processEnv(), warn = console.warn) {
|
|
681
|
+
function createFarmInfraAnalyticsRecorder(env = processEnv(), warn = console.warn, runtimeOptions) {
|
|
549
682
|
const options = linkedOptions(env, warn);
|
|
550
|
-
return options ? farmInfraAnalyticsRecorder(options) : null;
|
|
683
|
+
return options ? farmInfraAnalyticsRecorder(options, void 0, runtimeOptions) : null;
|
|
551
684
|
}
|
|
552
685
|
|
|
553
686
|
export {
|
|
554
687
|
FARM_PRERENDER_ENV,
|
|
688
|
+
_setFarmInfraAnalyticsWebMCPRoute,
|
|
689
|
+
_farmWebMCPReportsEnabled,
|
|
555
690
|
createFarmInfraAnalyticsPlugin,
|
|
556
691
|
createFarmInfraAnalyticsRecorder
|
|
557
692
|
};
|
|
@@ -18,7 +18,7 @@ var _chunkHR5GU4UUcjs = require('./chunk-HR5GU4UU.cjs');
|
|
|
18
18
|
var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkLM2ZDNDDcjs = require('./chunk-LM2ZDNDD.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -593,7 +593,7 @@ async function resolveAPIContext(options) {
|
|
|
593
593
|
config: options.config,
|
|
594
594
|
configPath: options.configPath
|
|
595
595
|
}));
|
|
596
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
596
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkLM2ZDNDDcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
597
597
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _28 => _28.guardedPaths]), () => ( [])));
|
|
598
598
|
return {
|
|
599
599
|
root,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
|
|
4
4
|
|
|
5
5
|
// src/app-markdown.ts
|
|
6
6
|
var _promises = require('fs/promises');
|
|
@@ -8,11 +8,12 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
8
8
|
var _url = require('url');
|
|
9
9
|
async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
|
|
10
10
|
const source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
11
|
-
return
|
|
11
|
+
return _chunk26WP75W5cjs.createFarmMarkdownRouteModule.call(void 0, {
|
|
12
12
|
source,
|
|
13
13
|
filePath,
|
|
14
14
|
components: options.components,
|
|
15
|
-
config: options.config
|
|
15
|
+
config: options.config,
|
|
16
|
+
renderer: options.renderer
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
async function loadFarmMdxComponents(config, options) {
|
|
@@ -9,6 +9,9 @@ var _chunkSHIWRBFIcjs = require('./chunk-SHIWRBFI.cjs');
|
|
|
9
9
|
|
|
10
10
|
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
11
11
|
|
|
12
|
+
// src/preview-request.ts
|
|
13
|
+
var FARM_PREVIEW_REQUEST_HEADER = "x-farm-preview";
|
|
14
|
+
|
|
12
15
|
// src/cron.ts
|
|
13
16
|
var DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
|
|
14
17
|
var FARM_CRON_MANIFEST = "cron-manifest.json";
|
|
@@ -200,7 +203,9 @@ function isCronRequestAuthorized(request, options = {}) {
|
|
|
200
203
|
const secretEnv = options.secretEnv || DEFAULT_FARM_CRON_SECRET_ENV;
|
|
201
204
|
const secret = options.secret || _chunk2KMIJDY6cjs.readFarmEnvironmentValue.call(void 0, secretEnv);
|
|
202
205
|
if (!secret) {
|
|
203
|
-
return options.allowUnsecured === true || !_chunk2KMIJDY6cjs.getFarmRuntimeBindings.call(void 0, ) && isExplicitDevelopmentEnv()
|
|
206
|
+
return options.allowUnsecured === true || !_chunk2KMIJDY6cjs.getFarmRuntimeBindings.call(void 0, ) && isExplicitDevelopmentEnv() && // Development stays open for the developer's own machine, not for visitors to a
|
|
207
|
+
// `farm preview` URL. The preview marks every request it tunnels in.
|
|
208
|
+
!request.headers.get(FARM_PREVIEW_REQUEST_HEADER);
|
|
204
209
|
}
|
|
205
210
|
const authorization = request.headers.get("authorization") || "";
|
|
206
211
|
const bearer = _optionalChain([/^Bearer (.*)$/i, 'access', _ => _.exec, 'call', _2 => _2(authorization), 'optionalAccess', _3 => _3[1]]) || "";
|
|
@@ -677,4 +682,5 @@ function safeFileName(value) {
|
|
|
677
682
|
|
|
678
683
|
|
|
679
684
|
|
|
680
|
-
|
|
685
|
+
|
|
686
|
+
exports.FARM_PREVIEW_REQUEST_HEADER = FARM_PREVIEW_REQUEST_HEADER; exports.DEFAULT_FARM_CRON_SECRET_ENV = DEFAULT_FARM_CRON_SECRET_ENV; exports.FARM_CRON_MANIFEST = FARM_CRON_MANIFEST; exports.resolveCronConfig = resolveCronConfig; exports.prepareFarmCronForNitro = prepareFarmCronForNitro; exports.createFarmCronManifest = createFarmCronManifest; exports.createFarmCronVercelCrons = createFarmCronVercelCrons; exports.applyFarmCronVercelCrons = applyFarmCronVercelCrons; exports.createFarmCronCloudflareTriggers = createFarmCronCloudflareTriggers; exports.toFarmCronCloudflareSchedule = toFarmCronCloudflareSchedule; exports.toFarmCronCloudflareScheduledTasks = toFarmCronCloudflareScheduledTasks; exports.createFarmCronCloudflareConfig = createFarmCronCloudflareConfig; exports.mergeScheduledTasks = mergeScheduledTasks; exports.isCronRequestAuthorized = isCronRequestAuthorized; exports.FARM_CRON_SIGNATURE_HEADER = FARM_CRON_SIGNATURE_HEADER; exports.farmCronSignature = farmCronSignature; exports.authorizeCronRequest = authorizeCronRequest; exports.cronRoute = cronRoute; exports.FARM_CRON_NAME_SEGMENT_PATTERN = FARM_CRON_NAME_SEGMENT_PATTERN; exports.normalizeCronExpression = normalizeCronExpression;
|
|
@@ -62,43 +62,9 @@ function describeIntegrationOriginRejection(reason) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
// src/api/route-schema.ts
|
|
66
|
-
async function parseRouteSchema(schema, value) {
|
|
67
|
-
if (schema.parseAsync) return schema.parseAsync(value);
|
|
68
|
-
if (schema["~standard"]) {
|
|
69
|
-
const result = await schema["~standard"].validate(value);
|
|
70
|
-
if (result.issues)
|
|
71
|
-
throw Object.assign(new Error("Validation failed"), { issues: result.issues });
|
|
72
|
-
return result.value;
|
|
73
|
-
}
|
|
74
|
-
if (schema.parse) return schema.parse(value);
|
|
75
|
-
throw new TypeError("Route validators must implement Standard Schema or parse().");
|
|
76
|
-
}
|
|
77
|
-
var PUBLIC_MESSAGE_CODES = /* @__PURE__ */ new Set(["custom", "invalid_type"]);
|
|
78
|
-
function toPublicValidationIssues(error) {
|
|
79
|
-
const issues = _optionalChain([error, 'optionalAccess', _18 => _18.issues]);
|
|
80
|
-
const list = Array.isArray(issues) ? issues : Array.isArray(_optionalChain([error, 'optionalAccess', _19 => _19.errors])) ? error.errors : [];
|
|
81
|
-
return list.map((issue) => {
|
|
82
|
-
const { path, code, message } = _nullishCoalesce(issue, () => ( {}));
|
|
83
|
-
return {
|
|
84
|
-
path: Array.isArray(path) ? path.map(toPublicPathSegment) : [],
|
|
85
|
-
...typeof code === "string" ? { code } : {},
|
|
86
|
-
message: PUBLIC_MESSAGE_CODES.has(code) && typeof message === "string" && message ? message : "Invalid value"
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function toPublicPathSegment(segment) {
|
|
91
|
-
const key = segment && typeof segment === "object" && "key" in segment ? segment.key : segment;
|
|
92
|
-
if (typeof key === "number") return key;
|
|
93
|
-
if (typeof key === "symbol") return key.description || key.toString();
|
|
94
|
-
return String(key);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
65
|
|
|
100
66
|
|
|
101
67
|
|
|
102
68
|
|
|
103
69
|
|
|
104
|
-
exports.resolveIntegrationAllowedOrigins = resolveIntegrationAllowedOrigins; exports.validateIntegrationRequestOrigin = validateIntegrationRequestOrigin; exports.rejectCrossSiteNonJSONBody = rejectCrossSiteNonJSONBody; exports.describeIntegrationOriginRejection = describeIntegrationOriginRejection;
|
|
70
|
+
exports.resolveIntegrationAllowedOrigins = resolveIntegrationAllowedOrigins; exports.validateIntegrationRequestOrigin = validateIntegrationRequestOrigin; exports.rejectCrossSiteNonJSONBody = rejectCrossSiteNonJSONBody; exports.describeIntegrationOriginRejection = describeIntegrationOriginRejection;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FARM_RSC_INSTALL_HINT,
|
|
3
|
-
findFarmAppPackageDir,
|
|
4
|
-
formatFarmRscBlockingMessage,
|
|
5
|
-
inspectFarmServerComponents,
|
|
6
|
-
resolveFarmRscCheckConfig
|
|
7
|
-
} from "./chunk-A5D3UMLJ.mjs";
|
|
8
1
|
import {
|
|
9
2
|
createFarmDevLoopbackPlugin
|
|
10
3
|
} from "./chunk-RLEAVG6G.mjs";
|
|
11
4
|
import {
|
|
12
5
|
resolveDeployOutputPath
|
|
13
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CJDBTTLB.mjs";
|
|
14
7
|
import {
|
|
15
8
|
farmDesktopDevGuardPlugin,
|
|
16
9
|
loadFarmReactPlugin
|
|
@@ -19,7 +12,14 @@ import {
|
|
|
19
12
|
generateFarmClientPluginEntryCode,
|
|
20
13
|
hasFarmServerRuntimePlugins,
|
|
21
14
|
loadTailwindVitePlugin
|
|
22
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MO4UTDQ6.mjs";
|
|
16
|
+
import {
|
|
17
|
+
FARM_RSC_INSTALL_HINT,
|
|
18
|
+
findFarmAppPackageDir,
|
|
19
|
+
formatFarmRscBlockingMessage,
|
|
20
|
+
inspectFarmServerComponents,
|
|
21
|
+
resolveFarmRscCheckConfig
|
|
22
|
+
} from "./chunk-YSU3WCW6.mjs";
|
|
23
23
|
import {
|
|
24
24
|
resolveFarmPlatform
|
|
25
25
|
} from "./chunk-SMUW7UST.mjs";
|
|
@@ -190,7 +190,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
190
190
|
const candidate = plugin;
|
|
191
191
|
return !!candidate && names.has(candidate.name) && hasFarmServerRuntimePlugins([candidate]);
|
|
192
192
|
};
|
|
193
|
-
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-
|
|
193
|
+
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-744BBUY5.mjs");
|
|
194
194
|
const files = [];
|
|
195
195
|
if (userConfig.extends) {
|
|
196
196
|
const { layers } = await resolveFarmLayers(userConfig, { root, mode: "production" });
|
|
@@ -217,7 +217,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
217
217
|
}
|
|
218
218
|
async function configureFarmRscPlugins(config, command) {
|
|
219
219
|
if (config.plugins.length === 0) return config;
|
|
220
|
-
const { PluginManager } = await import("./plugin-
|
|
220
|
+
const { PluginManager } = await import("./plugin-QOTAPTVV.mjs");
|
|
221
221
|
const manager = new PluginManager({
|
|
222
222
|
config,
|
|
223
223
|
isDev: command === "serve",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
beginFarmServerQueryAction,
|
|
3
|
+
completeFarmServerQueryAction,
|
|
4
|
+
shouldApplyFarmServerQueryActionResult
|
|
5
|
+
} from "./chunk-XMHERKSE.mjs";
|
|
6
|
+
import {
|
|
7
|
+
isFarmIslandsActionResult
|
|
8
|
+
} from "./chunk-X3EFRVXY.mjs";
|
|
9
|
+
import {
|
|
10
|
+
applyFarmCacheInvalidations
|
|
11
|
+
} from "./chunk-AZQXXXDX.mjs";
|
|
12
|
+
|
|
13
|
+
// src/islands-action-client.ts
|
|
14
|
+
function createFarmServerFnTransportError(value) {
|
|
15
|
+
const failure = value;
|
|
16
|
+
const error = new Error(
|
|
17
|
+
failure && typeof failure.message === "string" ? failure.message : "Server function failed"
|
|
18
|
+
);
|
|
19
|
+
if (failure && failure.name === "ServerFnFailure" && typeof failure.code === "string" && Number.isInteger(failure.status) && failure.status >= 400 && failure.status <= 599 && Object.prototype.hasOwnProperty.call(failure, "data")) {
|
|
20
|
+
error.name = "ServerFnFailure";
|
|
21
|
+
error.code = failure.code;
|
|
22
|
+
error.status = failure.status;
|
|
23
|
+
error.data = failure.data;
|
|
24
|
+
Object.defineProperty(error, /* @__PURE__ */ Symbol.for("farm.server-fn.failure"), {
|
|
25
|
+
value: true,
|
|
26
|
+
enumerable: false
|
|
27
|
+
});
|
|
28
|
+
return error;
|
|
29
|
+
}
|
|
30
|
+
error.name = "ServerActionError";
|
|
31
|
+
return error;
|
|
32
|
+
}
|
|
33
|
+
var farmIslandsActionInterceptor = async (call, next) => {
|
|
34
|
+
const invocation = beginFarmServerQueryAction(call.id, call.args);
|
|
35
|
+
let result;
|
|
36
|
+
try {
|
|
37
|
+
result = await next();
|
|
38
|
+
} catch (error2) {
|
|
39
|
+
if (error2 instanceof Error && error2.message.startsWith("Server action failed")) {
|
|
40
|
+
throw createFarmServerFnTransportError(void 0);
|
|
41
|
+
}
|
|
42
|
+
throw error2;
|
|
43
|
+
}
|
|
44
|
+
if (!isFarmIslandsActionResult(result)) return result;
|
|
45
|
+
const { invalidations, error } = result.__farmAction;
|
|
46
|
+
if (shouldApplyFarmServerQueryActionResult(invocation))
|
|
47
|
+
applyFarmCacheInvalidations(invalidations);
|
|
48
|
+
if (error) throw createFarmServerFnTransportError(error);
|
|
49
|
+
return completeFarmServerQueryAction(invocation, result.value);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
farmIslandsActionInterceptor
|
|
54
|
+
};
|
|
@@ -75,18 +75,34 @@ async function compileFarmMarkdownPage(body) {
|
|
|
75
75
|
}
|
|
76
76
|
var AsyncFunction = Object.getPrototypeOf(async () => {
|
|
77
77
|
}).constructor;
|
|
78
|
-
async function runFarmMarkdownPage(code, filePath) {
|
|
79
|
-
const { Fragment, jsx, jsxs } = await import("react/jsx-runtime");
|
|
80
|
-
|
|
78
|
+
async function runFarmMarkdownPage(code, filePath, renderer) {
|
|
79
|
+
const { Fragment, jsx, jsxs } = renderer ? createFarmMarkdownJsxRuntime(renderer) : await import("react/jsx-runtime");
|
|
80
|
+
const evaluated = await new AsyncFunction(code)({
|
|
81
|
+
Fragment,
|
|
82
|
+
jsx,
|
|
83
|
+
jsxs,
|
|
84
|
+
baseUrl: pathToFileURL(filePath)
|
|
85
|
+
});
|
|
86
|
+
renderer?.markFunctionComponent?.(evaluated.default);
|
|
87
|
+
return evaluated;
|
|
88
|
+
}
|
|
89
|
+
function createFarmMarkdownJsxRuntime(renderer) {
|
|
90
|
+
const toElement = (staticChildren) => (type, props, key) => {
|
|
91
|
+
const { children, ...rest } = props;
|
|
92
|
+
if (key !== void 0) rest.key = key;
|
|
93
|
+
if (children === void 0) return renderer.createElement(type, rest);
|
|
94
|
+
return staticChildren && Array.isArray(children) ? renderer.createElement(type, rest, ...children) : renderer.createElement(type, rest, children);
|
|
95
|
+
};
|
|
96
|
+
return { Fragment: renderer.Fragment, jsx: toElement(false), jsxs: toElement(true) };
|
|
81
97
|
}
|
|
82
98
|
var FARM_MARKDOWN_PRECOMPILED_PAGES = /* @__PURE__ */ Symbol.for("farm.markdown.precompiledPages");
|
|
83
99
|
function precompiledFarmMarkdownPage(body) {
|
|
84
100
|
const pages = globalThis[FARM_MARKDOWN_PRECOMPILED_PAGES];
|
|
85
101
|
return pages?.get(body);
|
|
86
102
|
}
|
|
87
|
-
async function evaluateMdxSource(body, filePath) {
|
|
103
|
+
async function evaluateMdxSource(body, filePath, renderer) {
|
|
88
104
|
const code = precompiledFarmMarkdownPage(body) ?? await compileFarmMarkdownPage(body);
|
|
89
|
-
return runFarmMarkdownPage(code, filePath);
|
|
105
|
+
return runFarmMarkdownPage(code, filePath, renderer);
|
|
90
106
|
}
|
|
91
107
|
var MARKDOWN_ROUTE_CONFIG_EXPORT = /^export\s+const\s+(dynamic|revalidate|ssg)\s*=\s*("[^"\\]*"|'[^'\\]*'|\d+(?:\.\d+)?|true|false)\s*;?\s*$/;
|
|
92
108
|
function readFarmMarkdownRouteConfig(body) {
|
|
@@ -115,7 +131,7 @@ function createFarmMarkdownRouteModule(input) {
|
|
|
115
131
|
let evaluatedPromise;
|
|
116
132
|
let componentsPromise;
|
|
117
133
|
const loadContent = async () => {
|
|
118
|
-
evaluatedPromise ?? (evaluatedPromise = evaluateMdxSource(body, input.filePath));
|
|
134
|
+
evaluatedPromise ?? (evaluatedPromise = evaluateMdxSource(body, input.filePath, input.renderer));
|
|
119
135
|
return evaluatedPromise;
|
|
120
136
|
};
|
|
121
137
|
const loadComponents = () => {
|
|
@@ -128,7 +144,7 @@ function createFarmMarkdownRouteModule(input) {
|
|
|
128
144
|
return componentsPromise;
|
|
129
145
|
};
|
|
130
146
|
async function FarmMarkdownPage(props) {
|
|
131
|
-
const { createElement } = await import("react");
|
|
147
|
+
const { createElement } = input.renderer ?? await import("react");
|
|
132
148
|
const [evaluated, components] = await Promise.all([loadContent(), loadComponents()]);
|
|
133
149
|
const MDXContent = evaluated.default;
|
|
134
150
|
return createElement(
|
|
@@ -322,10 +322,9 @@ var PluginManager = class {
|
|
|
322
322
|
this.runtimeEndpoints = endpoints;
|
|
323
323
|
return endpoints;
|
|
324
324
|
}
|
|
325
|
-
|
|
325
|
+
matchRuntimeEndpoint(requestPathname) {
|
|
326
326
|
const endpoints = this.getRuntimeEndpoints();
|
|
327
327
|
if (endpoints.length === 0) return void 0;
|
|
328
|
-
const requestPathname = new URL(request.url).pathname;
|
|
329
328
|
const basePath = normalizeFarmBasePath(this.context.config.basePath);
|
|
330
329
|
if (basePath && requestPathname !== basePath && !requestPathname.startsWith(`${basePath}/`)) {
|
|
331
330
|
return void 0;
|
|
@@ -333,7 +332,15 @@ var PluginManager = class {
|
|
|
333
332
|
const pathname = normalizeRuntimeEndpointRequestPath(
|
|
334
333
|
stripFarmBasePath(requestPathname, basePath)
|
|
335
334
|
);
|
|
336
|
-
|
|
335
|
+
return endpoints.find((entry) => entry.path === pathname);
|
|
336
|
+
}
|
|
337
|
+
/** @internal Whether a plugin runtime endpoint answers this request path (with the base path). */
|
|
338
|
+
_hasRuntimeEndpoint(requestPathname) {
|
|
339
|
+
return this.matchRuntimeEndpoint(requestPathname) !== void 0;
|
|
340
|
+
}
|
|
341
|
+
async runRuntimeEndpoint(request, options, waitUntil, onMatch) {
|
|
342
|
+
const requestPathname = new URL(request.url).pathname;
|
|
343
|
+
const match = this.matchRuntimeEndpoint(requestPathname);
|
|
337
344
|
if (!match) return void 0;
|
|
338
345
|
const endpointOptions = {
|
|
339
346
|
...options,
|