@farm.js/core 0.1.81 → 0.1.83
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-Cxi3214_.d.ts → agent-mcp.d-7uKdOttc.d.ts} +1 -1
- package/dist/{agent-mcp.d-DMqOqnOA.d.mts → agent-mcp.d-LChlR2au.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-WGH6J2HN.cjs +17 -0
- package/dist/{analyzer-IC66UJCU.mjs → analyzer-Y6IY26HI.mjs} +2 -2
- package/dist/api/node.cjs +5 -4
- package/dist/api/node.d.mts +4 -3
- package/dist/api/node.d.ts +4 -3
- package/dist/api/node.mjs +4 -3
- package/dist/api/route-manager.cjs +5 -4
- package/dist/api/route-manager.d.mts +4 -3
- package/dist/api/route-manager.d.ts +4 -3
- package/dist/api/route-manager.mjs +4 -3
- package/dist/api/runtime.cjs +4 -3
- package/dist/api/runtime.d.mts +3 -2
- package/dist/api/runtime.d.ts +3 -2
- package/dist/api/runtime.mjs +3 -2
- package/dist/api.cjs +7 -6
- package/dist/api.d.mts +5 -4
- package/dist/api.d.ts +5 -4
- package/dist/api.mjs +6 -5
- package/dist/{app-manifest.d-C8Cswd31.d.ts → app-manifest.d-CRp21oAz.d.ts} +1 -1
- package/dist/{app-manifest.d-Bbxp5kes.d.mts → app-manifest.d-QMdmqqCr.d.mts} +1 -1
- package/dist/app-markdown.d.mts +3 -2
- package/dist/app-markdown.d.ts +3 -2
- package/dist/{app.d-DGIoFt5D.d.ts → app.d-CVPu_hoD.d.ts} +51 -4
- package/dist/{app.d-BJuSurgy.d.mts → app.d-eSm7jgoc.d.mts} +51 -4
- package/dist/{chunk-NSLRK5DK.cjs → chunk-3CZ4MJHW.cjs} +1 -1
- package/dist/{chunk-CPZZBCPO.cjs → chunk-3DAJXBSL.cjs} +2 -2
- package/dist/chunk-3DE6RK7K.cjs +36 -0
- package/dist/{chunk-XMHERKSE.mjs → chunk-42IBGQTN.mjs} +5 -12
- package/dist/{chunk-GY63XD6K.mjs → chunk-43N3X6OO.mjs} +1 -1
- package/dist/{chunk-MOGRRZMW.cjs → chunk-55UJGUBP.cjs} +35 -30
- package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
- package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
- package/dist/{chunk-LKIG5SM6.cjs → chunk-5P65LXGU.cjs} +9 -9
- package/dist/{chunk-TPA2PV5J.mjs → chunk-5V6HSJFG.mjs} +24 -1
- package/dist/chunk-5X5GJU5A.cjs +426 -0
- package/dist/{chunk-UF4BNKKJ.mjs → chunk-6QYPP5KC.mjs} +2 -2
- package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
- package/dist/{chunk-OIWDEDUO.cjs → chunk-7X2CYE66.cjs} +419 -357
- package/dist/{chunk-XOGCNKB7.cjs → chunk-A5BHJHDF.cjs} +3 -3
- package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
- package/dist/{chunk-HTNJ7A4D.mjs → chunk-B5SJYXJK.mjs} +177 -67
- package/dist/chunk-BUQR7KKO.mjs +17 -0
- package/dist/{chunk-OO4GVGM3.mjs → chunk-CA2HBLXP.mjs} +11 -1
- package/dist/{chunk-724WT3NI.mjs → chunk-CRE642TW.mjs} +1 -1
- package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
- package/dist/{chunk-IPG6B25T.mjs → chunk-DPUZVGXH.mjs} +203 -54
- package/dist/{chunk-ZIYJWJV2.cjs → chunk-DZTWUEBB.cjs} +8 -8
- package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
- package/dist/{chunk-46UV2E7I.cjs → chunk-EFI6QWBQ.cjs} +200 -90
- package/dist/chunk-ELNRKD4V.mjs +426 -0
- package/dist/{chunk-XOXCQGAF.mjs → chunk-FFWSER54.mjs} +1 -1
- package/dist/chunk-FZ7OUN5M.cjs +30 -0
- package/dist/{chunk-5MMKNW7Q.cjs → chunk-H7REG7OX.cjs} +15 -8
- package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
- package/dist/{chunk-OUDNUFVR.cjs → chunk-HRH7OKBQ.cjs} +6 -4
- package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
- package/dist/{chunk-ADQ2LATR.cjs → chunk-IABI62FH.cjs} +2 -2
- package/dist/{chunk-TLSGRK7E.mjs → chunk-IAIRQAHA.mjs} +3 -1
- package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
- package/dist/{chunk-EX6ZSN5P.cjs → chunk-IZYFP7IN.cjs} +17 -24
- package/dist/chunk-J6RFB324.cjs +17 -0
- package/dist/{chunk-CL7BUGVB.cjs → chunk-JHRJ5V2F.cjs} +509 -360
- package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
- package/dist/{chunk-POL5RCVU.mjs → chunk-K3GHY7GY.mjs} +14 -9
- package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
- package/dist/{chunk-UVV3I5QA.cjs → chunk-L2GUEYHR.cjs} +29 -6
- package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
- package/dist/{chunk-E3HBD2K3.cjs → chunk-LN6FAYNB.cjs} +36 -31
- package/dist/chunk-M6AJZ4XR.mjs +30 -0
- package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
- package/dist/{chunk-6WVRVGKC.mjs → chunk-NAHDG6UX.mjs} +1 -1
- package/dist/{chunk-NOYKBGUK.mjs → chunk-NDWI6FDH.mjs} +558 -212
- package/dist/{chunk-OFVCWV2D.cjs → chunk-NEKO3HM2.cjs} +11 -1
- package/dist/{chunk-M6DAIE4T.cjs → chunk-NGTZHWBG.cjs} +78 -9
- package/dist/{chunk-D77OGI6X.mjs → chunk-NKVBWPXR.mjs} +1 -1
- package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
- package/dist/{chunk-W6C3LEXX.cjs → chunk-OM6JIIJU.cjs} +155 -20
- package/dist/{chunk-S3IWDDQ3.mjs → chunk-ORBBAA7B.mjs} +1 -1
- package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
- package/dist/{chunk-BJWJP5A4.mjs → chunk-R3VLM2MW.mjs} +3 -3
- package/dist/{chunk-I4WZRG73.mjs → chunk-RB5IGN3N.mjs} +13 -6
- package/dist/{chunk-2HMSSPCZ.mjs → chunk-RGTZAM6Y.mjs} +71 -2
- package/dist/{chunk-IM3UINTZ.mjs → chunk-RNJX3MD6.mjs} +151 -16
- package/dist/{chunk-EJCVG25Z.mjs → chunk-S3R4JDRO.mjs} +17 -9
- package/dist/{chunk-2Y2HRZQY.cjs → chunk-SLIXHUMS.cjs} +931 -585
- package/dist/{chunk-WFVSAT7Y.cjs → chunk-T7HGXF7D.cjs} +3 -3
- package/dist/{chunk-ZKNXCRUQ.cjs → chunk-U54REWMJ.cjs} +23 -23
- package/dist/{chunk-YH7ENV3K.mjs → chunk-U56Z3755.mjs} +13 -8
- package/dist/chunk-U6XYBTUT.mjs +36 -0
- package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
- package/dist/{chunk-RZ6XUEQS.mjs → chunk-VQ6IXALL.mjs} +2 -2
- package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
- package/dist/{chunk-FYZD7DUS.cjs → chunk-WCSBYQOT.cjs} +4 -4
- package/dist/{chunk-5N526T7Q.mjs → chunk-WZV2G2A6.mjs} +95 -33
- package/dist/{chunk-SM2SYWAR.cjs → chunk-XJDB564A.cjs} +18 -10
- package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
- package/dist/{cli-runtime.d-D8O1v2_X.d.mts → cli-runtime.d-C7aMfoTq.d.mts} +8 -6
- package/dist/{cli-runtime.d-hf4L1MNP.d.ts → cli-runtime.d-DaElKjaL.d.ts} +8 -6
- package/dist/{client-component.d-DFwUHlOz.d.mts → client-component.d-DLMCzmUx.d.mts} +1 -1
- package/dist/{client-component.d-CX8UCQh-.d.ts → client-component.d-DLknFP8l.d.ts} +1 -1
- package/dist/{client-plugins.d-qWp8hNwd.d.ts → client-plugins.d-BVXjyIkY.d.ts} +20 -1
- package/dist/{client-plugins.d-BflSNO-b.d.mts → client-plugins.d-BwKwuO_0.d.mts} +20 -1
- package/dist/client-plugins.d.mts +2 -1
- package/dist/client-plugins.d.ts +2 -1
- package/dist/client.cjs +4 -3
- package/dist/client.d.mts +10 -9
- package/dist/client.d.ts +10 -9
- package/dist/client.mjs +3 -2
- 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-XJHODO5H.mjs → devtools-OI52TCSD.mjs} +8 -7
- package/dist/{devtools-EI5N366Z.cjs → devtools-ZM2AR36W.cjs} +11 -10
- package/dist/docs.cjs +13 -11
- package/dist/docs.d.mts +15 -6
- package/dist/docs.d.ts +15 -6
- package/dist/docs.mjs +12 -10
- package/dist/environment/vite.cjs +4 -4
- package/dist/environment/vite.d.mts +1 -0
- package/dist/environment/vite.d.ts +1 -0
- package/dist/environment/vite.mjs +3 -3
- package/dist/{generate-route-types.d-CaGMIaNI.d.mts → generate-route-types.d-BFOMM8Ef.d.mts} +3 -0
- package/dist/{generate-route-types.d-B76M5R11.d.ts → generate-route-types.d-C2m8myHb.d.ts} +3 -0
- package/dist/{handler.d-DoH5Krkq.d.mts → handler.d-BKTWzzNA.d.mts} +1 -1
- package/dist/{handler.d-C2oRihfa.d.ts → handler.d-Dzpyg3-N.d.ts} +1 -1
- package/dist/{headers.d-BrX53wFQ.d.mts → headers.d-5opjyhXw.d.mts} +1 -1
- package/dist/{headers.d-Dj0mfYpb.d.ts → headers.d-PZyXcDAH.d.ts} +1 -1
- package/dist/index.cjs +38 -35
- package/dist/{index.d-DzDHOttz.d.mts → index.d-C0Mie66f.d.mts} +1 -1
- package/dist/{index.d-Dhc2scRl.d.ts → index.d-DV2q-0mE.d.ts} +1 -1
- package/dist/index.d.mts +26 -25
- package/dist/index.d.ts +26 -25
- package/dist/index.mjs +38 -35
- 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.d.mts +3 -2
- package/dist/internal/app-markdown-runtime.d.ts +3 -2
- package/dist/internal/build-runtime.cjs +31 -30
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +30 -29
- package/dist/internal/cli-runtime.cjs +12 -11
- package/dist/internal/cli-runtime.d.mts +8 -7
- package/dist/internal/cli-runtime.d.ts +8 -7
- package/dist/internal/cli-runtime.mjs +11 -10
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +2 -1
- package/dist/internal/compression-runtime.d.ts +2 -1
- package/dist/internal/config-runtime.cjs +10 -9
- package/dist/internal/config-runtime.d.mts +6 -5
- package/dist/internal/config-runtime.d.ts +6 -5
- package/dist/internal/config-runtime.mjs +9 -8
- package/dist/internal/infra-analytics-runtime.cjs +8 -6
- 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 +8 -6
- package/dist/internal/islands-action-client.cjs +18 -0
- package/dist/internal/islands-action-client.d.mts +18 -0
- package/dist/internal/islands-action-client.d.ts +18 -0
- package/dist/internal/islands-action-client.mjs +18 -0
- package/dist/internal/islands-boot.cjs +54 -20
- package/dist/internal/islands-boot.d.mts +5 -3
- package/dist/internal/islands-boot.d.ts +5 -3
- package/dist/internal/islands-boot.mjs +49 -15
- package/dist/internal/islands-runtime.cjs +3 -8
- package/dist/internal/islands-runtime.mjs +4 -9
- package/dist/internal/islx-actions-client.cjs +4 -3
- package/dist/internal/islx-actions-client.mjs +3 -2
- package/dist/internal/islx-actions-server.d.mts +0 -2
- package/dist/internal/islx-actions-server.d.ts +0 -2
- package/dist/internal/islx-client.cjs +13 -1
- package/dist/internal/islx-client.d.mts +11 -0
- package/dist/internal/islx-client.d.ts +11 -0
- package/dist/internal/islx-client.mjs +14 -0
- package/dist/internal/metadata-image-runtime.d.mts +1 -0
- package/dist/internal/metadata-image-runtime.d.ts +1 -0
- 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 +12 -7
- package/dist/internal/production-runtime.d.mts +14 -12
- package/dist/internal/production-runtime.d.ts +14 -12
- package/dist/internal/production-runtime.mjs +11 -6
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/start-manifest.d.mts +2 -1
- package/dist/internal/start-manifest.d.ts +2 -1
- package/dist/markdown.d.mts +2 -1
- package/dist/markdown.d.ts +2 -1
- package/dist/middleware.d.mts +2 -1
- package/dist/middleware.d.ts +2 -1
- package/dist/mobile.d.mts +6 -3
- package/dist/mobile.d.ts +6 -3
- package/dist/{mount.d-DOaeUoWq.d.mts → mount.d-CZ_qL1iS.d.mts} +1 -1
- package/dist/{mount.d-DwXjaOHY.d.ts → mount.d-gWul1GA1.d.ts} +1 -1
- package/dist/{navigation-delegate.d-BElGUMgt.d.mts → navigation-delegate.d-BBTzhJLj.d.mts} +1 -1
- package/dist/{navigation-delegate.d-o3pPd9VI.d.ts → navigation-delegate.d-BZsYEAet.d.ts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/{nitro-YLTGVGK4.mjs → nitro-FK3SZM4H.mjs} +1 -1
- package/dist/{nitro-XGIO6EQN.cjs → nitro-YDFMH5PY.cjs} +4 -4
- package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
- package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
- package/dist/plugin.cjs +25 -23
- package/dist/plugin.d.mts +6 -6
- package/dist/plugin.d.ts +6 -6
- package/dist/plugin.mjs +24 -22
- package/dist/{render-plan.d-BD06tqFA.d.ts → render-plan.d-AaJsYPX-.d.ts} +1 -1
- package/dist/{render-plan.d-xWCRAJeR.d.mts → render-plan.d-bnWxS12w.d.mts} +1 -1
- package/dist/renderer-client.cjs +54 -10
- package/dist/renderer-client.d.mts +8 -7
- package/dist/renderer-client.d.ts +8 -7
- package/dist/renderer-client.mjs +50 -6
- package/dist/renderer.cjs +6 -2
- package/dist/renderer.d.mts +97 -4
- package/dist/renderer.d.ts +97 -4
- package/dist/renderer.mjs +5 -1
- package/dist/{request.d-Dx82V8bz.d.mts → request.d-C2HOn3Hi.d.mts} +1 -1
- package/dist/{request.d-DUMuWxSN.d.ts → request.d-CAeitOG1.d.ts} +1 -1
- package/dist/request.d.mts +3 -2
- package/dist/request.d.ts +3 -2
- package/dist/{route-rendering.d-BwBVpLtD.d.ts → route-rendering.d-A1dIkUK5.d.ts} +1 -1
- package/dist/{route-rendering.d-DJh6GauM.d.mts → route-rendering.d-CYA-ulnX.d.mts} +1 -1
- package/dist/{router.d-BtkKDxUB.d.mts → router.d-8lxnzlkr.d.mts} +1 -1
- package/dist/{router.d-CJBSG5jr.d.ts → router.d-A_Yt6jYz.d.ts} +1 -1
- package/dist/{routes.d-CCccJRrp.d.mts → routes.d-BWvpUoYu.d.mts} +1 -1
- package/dist/{routes.d-b7khoRoU.d.ts → routes.d-D7RWvfqL.d.ts} +1 -1
- package/dist/routes.d.mts +2 -1
- package/dist/routes.d.ts +2 -1
- package/dist/{rsc-pipeline-H5AXQA7A.cjs → rsc-pipeline-MFJZGDPE.cjs} +11 -10
- package/dist/{rsc-pipeline-GD6KLOIG.mjs → rsc-pipeline-TRZVFCBX.mjs} +10 -9
- package/dist/{runtime-YWQVBC3V.cjs → runtime-MJUG2HGR.cjs} +15 -13
- package/dist/{runtime-OJ7FXFUI.mjs → runtime-O4Y3Z6V3.mjs} +11 -9
- package/dist/{runtime.d-BQnD0cfC.d.ts → runtime.d-BPyvWrgQ.d.ts} +1 -1
- package/dist/{runtime.d-C4SuZXf6.d.mts → runtime.d-C_rZ9_DD.d.mts} +1 -1
- package/dist/{server-components-status.d-9rH7ZoEq.d.mts → server-components-status.d-BpxiEMQE.d.mts} +1 -1
- package/dist/{server-components-status.d-rfKOcE0N.d.ts → server-components-status.d-C2UEKJn7.d.ts} +1 -1
- package/dist/server-plugins.d.mts +4 -3
- package/dist/server-plugins.d.ts +4 -3
- package/dist/server-query-call.d-rVM_lsYk.d.mts +15 -0
- package/dist/server-query-call.d-rVM_lsYk.d.ts +15 -0
- package/dist/server-query-client.cjs +5 -3
- package/dist/server-query-client.d.mts +3 -2
- package/dist/server-query-client.d.ts +3 -2
- package/dist/server-query-client.mjs +5 -3
- package/dist/{server-query-runtime.d-DXRNhX_3.d.ts → server-query-runtime.d-BlHd90D0.d.ts} +2 -8
- package/dist/{server-query-runtime.d-aP52iuL5.d.mts → server-query-runtime.d-CCLGkQtE.d.mts} +2 -8
- package/dist/server.cjs +58 -52
- package/dist/server.d.mts +12 -12
- package/dist/server.d.ts +12 -12
- package/dist/server.mjs +34 -28
- package/dist/{spa-router.d-V6XLSTCy.d.mts → spa-router.d-BD-6WX1R.d.mts} +2 -2
- package/dist/{spa-router.d-DMKiBsHH.d.ts → spa-router.d-Cw5i_15e.d.ts} +2 -2
- package/dist/{ssg.d-MNedvvMB.d.ts → ssg.d-Bifiq0EL.d.ts} +2 -2
- package/dist/{ssg.d-BnCKPQL0.d.mts → ssg.d-CCE9aob5.d.mts} +2 -2
- package/dist/{store-core.d-Ad5biajo.d.ts → store-core.d-5tVn5vi1.d.ts} +12 -4
- package/dist/{store-core.d-BqJI1-ix.d.mts → store-core.d-BN2MxSG9.d.mts} +12 -4
- package/dist/testing.cjs +5 -4
- package/dist/testing.d.mts +2 -1
- package/dist/testing.d.ts +2 -1
- package/dist/testing.mjs +4 -3
- package/dist/{utils.d-BdjHKDuT.d.ts → utils.d-BUjpSNIO.d.ts} +1 -1
- package/dist/{utils.d-BEKLWa0Z.d.mts → utils.d-wGPLeVbq.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +25 -23
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +24 -22
- package/package.json +7 -2
- package/dist/analyzer-435DCIQ6.cjs +0 -17
- package/dist/chunk-AHVF5GI2.cjs +0 -229
- package/dist/chunk-ONSZP5JK.mjs +0 -229
|
@@ -8,7 +8,8 @@ var DEFAULT_RENDERER_CAPABILITIES = Object.freeze({
|
|
|
8
8
|
// Conservative default: assume a re-render rebuilds until a renderer states
|
|
9
9
|
// otherwise, so callers do not silently rely on reconciliation.
|
|
10
10
|
reconcilesRerenders: false,
|
|
11
|
-
functionComponents: false
|
|
11
|
+
functionComponents: false,
|
|
12
|
+
hydrationFallback: false
|
|
12
13
|
});
|
|
13
14
|
function getFarmRendererCapabilities(renderer) {
|
|
14
15
|
const defaultStreaming = {
|
|
@@ -36,7 +37,8 @@ function getFarmRendererCapabilities(renderer) {
|
|
|
36
37
|
...Object.keys(runtimes).length > 0 ? { runtimes } : {}
|
|
37
38
|
},
|
|
38
39
|
reconcilesRerenders: renderer?.capabilities?.reconcilesRerenders ?? DEFAULT_RENDERER_CAPABILITIES.reconcilesRerenders,
|
|
39
|
-
functionComponents: renderer?.capabilities?.functionComponents ?? DEFAULT_RENDERER_CAPABILITIES.functionComponents
|
|
40
|
+
functionComponents: renderer?.capabilities?.functionComponents ?? DEFAULT_RENDERER_CAPABILITIES.functionComponents,
|
|
41
|
+
hydrationFallback: renderer?.capabilities?.hydrationFallback ?? DEFAULT_RENDERER_CAPABILITIES.hydrationFallback
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
function getFarmRendererStreamingCapabilitiesForRuntime(renderer, runtime) {
|
|
@@ -150,6 +152,15 @@ function isFarmRendererDisabled(renderer) {
|
|
|
150
152
|
function defineRenderer(renderer) {
|
|
151
153
|
return renderer;
|
|
152
154
|
}
|
|
155
|
+
var FARM_RENDERER_STRATEGIES = {
|
|
156
|
+
load: true,
|
|
157
|
+
idle: true,
|
|
158
|
+
visible: true,
|
|
159
|
+
interaction: true
|
|
160
|
+
};
|
|
161
|
+
function isFarmRendererStrategy(value) {
|
|
162
|
+
return typeof value === "string" && Object.prototype.hasOwnProperty.call(FARM_RENDERER_STRATEGIES, value);
|
|
163
|
+
}
|
|
153
164
|
function resolveFarmRenderer(renderer) {
|
|
154
165
|
if (renderer === false || isFarmRendererDisabled(renderer)) renderer = NO_RENDERER;
|
|
155
166
|
const resolved = renderer || REACT_RENDERER;
|
|
@@ -162,6 +173,37 @@ function resolveFarmRenderer(renderer) {
|
|
|
162
173
|
if (resolved.appSetup !== void 0 && (typeof resolved.appSetup !== "string" || resolved.appSetup.trim().length === 0)) {
|
|
163
174
|
throw new TypeError("Farm renderer `appSetup` must be a non-empty module path.");
|
|
164
175
|
}
|
|
176
|
+
const issues = [];
|
|
177
|
+
if (resolved.routes !== void 0 && typeof resolved.routes !== "function") {
|
|
178
|
+
issues.push("`routes` must be a method that returns `{ dir?, resolve(file) }`.");
|
|
179
|
+
}
|
|
180
|
+
const hydration = resolved.hydration;
|
|
181
|
+
if (hydration !== void 0) {
|
|
182
|
+
if (!hydration || typeof hydration !== "object" || Array.isArray(hydration)) {
|
|
183
|
+
issues.push("`hydration` must be an object.");
|
|
184
|
+
} else {
|
|
185
|
+
const options = hydration;
|
|
186
|
+
for (const key of ["pages", "layouts"]) {
|
|
187
|
+
if (options[key] !== void 0 && typeof options[key] !== "boolean") {
|
|
188
|
+
issues.push(`\`hydration.${key}\` must be true or false.`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (options.strategy !== void 0 && !isFarmRendererStrategy(options.strategy)) {
|
|
192
|
+
issues.push(
|
|
193
|
+
`\`hydration.strategy\` must be "load", "idle", "visible", or "interaction"; got ${JSON.stringify(options.strategy)}.`
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
if (options.resolve !== void 0 && typeof options.resolve !== "function") {
|
|
197
|
+
issues.push("`hydration.resolve` must be a method that reads a file's source.");
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (issues.length > 0) {
|
|
202
|
+
throw new TypeError(
|
|
203
|
+
`Farm renderer \`${resolved.name}\` is invalid:
|
|
204
|
+
${issues.map((issue) => `- ${issue}`).join("\n")}`
|
|
205
|
+
);
|
|
206
|
+
}
|
|
165
207
|
return {
|
|
166
208
|
...resolved,
|
|
167
209
|
componentExtensions: [...resolved.componentExtensions || []],
|
|
@@ -172,6 +214,31 @@ function resolveFarmRenderer(renderer) {
|
|
|
172
214
|
options: resolved.options ? { ...resolved.options } : void 0
|
|
173
215
|
};
|
|
174
216
|
}
|
|
217
|
+
function createFarmRendererHookError(message, cause) {
|
|
218
|
+
const error = new Error(message);
|
|
219
|
+
error.cause = cause;
|
|
220
|
+
return error;
|
|
221
|
+
}
|
|
222
|
+
function readFarmRendererHydration(value, where) {
|
|
223
|
+
const result = {};
|
|
224
|
+
if (value.hydrate !== void 0) {
|
|
225
|
+
if (typeof value.hydrate !== "boolean") {
|
|
226
|
+
throw new TypeError(
|
|
227
|
+
`${where} returned \`hydrate: ${JSON.stringify(value.hydrate)}\`. Return true or false, or leave it out.`
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
result.hydrate = value.hydrate;
|
|
231
|
+
}
|
|
232
|
+
if (value.strategy !== void 0) {
|
|
233
|
+
if (!isFarmRendererStrategy(value.strategy)) {
|
|
234
|
+
throw new TypeError(
|
|
235
|
+
`${where} returned \`strategy: ${JSON.stringify(value.strategy)}\`. Return "load", "idle", "visible", or "interaction", or leave it out.`
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
result.strategy = value.strategy;
|
|
239
|
+
}
|
|
240
|
+
return result;
|
|
241
|
+
}
|
|
175
242
|
async function readFarmRendererWebStream(stream) {
|
|
176
243
|
const reader = stream.getReader();
|
|
177
244
|
const decoder = new TextDecoder();
|
|
@@ -239,6 +306,8 @@ export {
|
|
|
239
306
|
isFarmRendererDisabled,
|
|
240
307
|
defineRenderer,
|
|
241
308
|
resolveFarmRenderer,
|
|
309
|
+
createFarmRendererHookError,
|
|
310
|
+
readFarmRendererHydration,
|
|
242
311
|
readFarmRendererWebStream,
|
|
243
312
|
isReactRenderer,
|
|
244
313
|
resolveFarmRendererAppSetup,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFarmRouteLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VQ6IXALL.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
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFarmDocsAdapterUIModule
|
|
3
|
+
} from "./chunk-5V6HSJFG.mjs";
|
|
4
|
+
|
|
1
5
|
// src/docs/adapter-client.ts
|
|
2
6
|
function getFarmDocsAdapterConfigModule(docs) {
|
|
3
|
-
if (!docs?.enabled || !docs.adapter
|
|
7
|
+
if (!docs?.enabled || !getFarmDocsAdapterUIModule(docs.adapter) || !docs.configPath) {
|
|
8
|
+
return void 0;
|
|
9
|
+
}
|
|
4
10
|
return docs.configPath.endsWith(".json") ? void 0 : docs.configPath.replace(/\\/g, "/");
|
|
5
11
|
}
|
|
6
|
-
function generateFarmDocsAdapterClientRuntime(
|
|
7
|
-
if (!
|
|
12
|
+
function generateFarmDocsAdapterClientRuntime(uiModule, configModule, rendererClient) {
|
|
13
|
+
if (!uiModule) {
|
|
8
14
|
return `
|
|
9
15
|
async function hydrateFarmDocsAdapterRuntime() {
|
|
10
16
|
return false;
|
|
@@ -18,17 +24,19 @@ async function hydrateFarmDocsAdapterRuntime() {
|
|
|
18
24
|
// The docs server flags pages whose config holds what its JSON copy cannot (icons,
|
|
19
25
|
// MDX components, callbacks); the adapter restores those from the module itself.
|
|
20
26
|
// Fetch it alongside the adapter rather than after it: they don't depend on each other.
|
|
21
|
-
const [
|
|
22
|
-
import(${JSON.stringify(
|
|
23
|
-
runtime.configModule ? ${configModule ? `import(${JSON.stringify(configModule)})` : "undefined"} : undefined
|
|
27
|
+
const [FarmDocsAdapterUI, configModule${rendererClient ? ", renderer" : ""}] = await Promise.all([
|
|
28
|
+
import(${JSON.stringify(uiModule)}),
|
|
29
|
+
runtime.configModule ? ${configModule ? `import(${JSON.stringify(configModule)})` : "undefined"} : undefined,${rendererClient ? `
|
|
30
|
+
import(${JSON.stringify(rendererClient)}),` : ""}
|
|
24
31
|
]);
|
|
25
|
-
if (typeof
|
|
32
|
+
if (typeof FarmDocsAdapterUI.hydrateFarmDocs !== "function") {
|
|
26
33
|
throw new Error("The configured Farm docs adapter does not export hydrateFarmDocs().");
|
|
27
34
|
}
|
|
28
|
-
|
|
35
|
+
FarmDocsAdapterUI.hydrateFarmDocs({
|
|
29
36
|
config: runtime.config || {},
|
|
30
37
|
data: runtime.data,
|
|
31
|
-
...(configModule ? { configModule: configModule.default ?? configModule } : {})
|
|
38
|
+
...(configModule ? { configModule: configModule.default ?? configModule } : {}),${rendererClient ? `
|
|
39
|
+
renderer,` : ""}
|
|
32
40
|
});
|
|
33
41
|
return true;
|
|
34
42
|
}
|