@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
|
@@ -43,19 +43,19 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
var
|
|
46
|
+
var _chunkJHRJ5V2Fcjs = require('./chunk-JHRJ5V2F.cjs');
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkHRH7OKBQcjs = require('./chunk-HRH7OKBQ.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
@@ -67,12 +67,13 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
var _chunkOM6JIIJUcjs = require('./chunk-OM6JIIJU.cjs');
|
|
76
77
|
|
|
77
78
|
|
|
78
79
|
|
|
@@ -85,13 +86,15 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
85
86
|
|
|
86
87
|
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
var _chunkWCSBYQOTcjs = require('./chunk-WCSBYQOT.cjs');
|
|
89
92
|
|
|
90
93
|
|
|
91
94
|
var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
|
|
92
95
|
|
|
93
96
|
|
|
94
|
-
var
|
|
97
|
+
var _chunkIABI62FHcjs = require('./chunk-IABI62FH.cjs');
|
|
95
98
|
|
|
96
99
|
|
|
97
100
|
|
|
@@ -142,18 +145,20 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
|
142
145
|
|
|
143
146
|
|
|
144
147
|
|
|
145
|
-
var
|
|
148
|
+
var _chunkEFI6QWBQcjs = require('./chunk-EFI6QWBQ.cjs');
|
|
146
149
|
|
|
147
150
|
|
|
148
151
|
|
|
149
|
-
var
|
|
152
|
+
var _chunkXJDB564Acjs = require('./chunk-XJDB564A.cjs');
|
|
150
153
|
|
|
151
154
|
|
|
152
155
|
|
|
153
156
|
var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
|
|
154
157
|
|
|
155
158
|
|
|
156
|
-
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
var _chunkL2GUEYHRcjs = require('./chunk-L2GUEYHR.cjs');
|
|
157
162
|
|
|
158
163
|
|
|
159
164
|
var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
|
|
@@ -166,7 +171,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
|
166
171
|
|
|
167
172
|
|
|
168
173
|
|
|
169
|
-
var
|
|
174
|
+
var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
|
|
170
175
|
|
|
171
176
|
|
|
172
177
|
var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
|
|
@@ -187,13 +192,16 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
|
187
192
|
|
|
188
193
|
|
|
189
194
|
|
|
190
|
-
var
|
|
195
|
+
var _chunkNGTZHWBGcjs = require('./chunk-NGTZHWBG.cjs');
|
|
191
196
|
|
|
192
197
|
|
|
193
198
|
|
|
194
199
|
var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
|
|
195
200
|
|
|
196
201
|
|
|
202
|
+
var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
|
|
203
|
+
|
|
204
|
+
|
|
197
205
|
var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
198
206
|
|
|
199
207
|
|
|
@@ -218,7 +226,7 @@ var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
|
|
|
218
226
|
|
|
219
227
|
|
|
220
228
|
|
|
221
|
-
var
|
|
229
|
+
var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
|
|
222
230
|
|
|
223
231
|
|
|
224
232
|
|
|
@@ -241,7 +249,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
241
249
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
242
250
|
|
|
243
251
|
|
|
244
|
-
var
|
|
252
|
+
var _chunk5P65LXGUcjs = require('./chunk-5P65LXGU.cjs');
|
|
245
253
|
|
|
246
254
|
|
|
247
255
|
var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
|
|
@@ -253,7 +261,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
|
253
261
|
|
|
254
262
|
|
|
255
263
|
|
|
256
|
-
var
|
|
264
|
+
var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
|
|
257
265
|
|
|
258
266
|
|
|
259
267
|
var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
|
|
@@ -304,7 +312,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
304
312
|
var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
|
|
305
313
|
|
|
306
314
|
|
|
307
|
-
var
|
|
315
|
+
var _chunk3CZ4MJHWcjs = require('./chunk-3CZ4MJHW.cjs');
|
|
308
316
|
|
|
309
317
|
|
|
310
318
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -386,9 +394,8 @@ var _module = require('module');
|
|
|
386
394
|
// src/dev-preview-guard.ts
|
|
387
395
|
var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
|
|
388
396
|
|
|
389
|
-
var FARM_PREVIEW_REQUEST_HEADER = "x-farm-preview";
|
|
390
397
|
function isFarmPreviewTunnelRequest(headers) {
|
|
391
|
-
return headers[FARM_PREVIEW_REQUEST_HEADER] !== void 0;
|
|
398
|
+
return headers[_chunkHQKCSJEHcjs.FARM_PREVIEW_REQUEST_HEADER] !== void 0;
|
|
392
399
|
}
|
|
393
400
|
var VITE_DEFAULT_FS_DENY = [
|
|
394
401
|
".env",
|
|
@@ -706,7 +713,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
706
713
|
return null;
|
|
707
714
|
}
|
|
708
715
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
709
|
-
return
|
|
716
|
+
return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
|
|
710
717
|
"CLIENT_SERVER_FUNCTION",
|
|
711
718
|
id,
|
|
712
719
|
`${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
|
|
@@ -965,21 +972,21 @@ function readPropertyKey(property) {
|
|
|
965
972
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
966
973
|
switch (finding.kind) {
|
|
967
974
|
case "server-env":
|
|
968
|
-
return
|
|
975
|
+
return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
|
|
969
976
|
"CLIENT_SERVER_ENV",
|
|
970
977
|
file,
|
|
971
978
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
972
979
|
location
|
|
973
980
|
);
|
|
974
981
|
case "public-env":
|
|
975
|
-
return
|
|
982
|
+
return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
|
|
976
983
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
977
984
|
file,
|
|
978
985
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
979
986
|
location
|
|
980
987
|
);
|
|
981
988
|
case "builtin":
|
|
982
|
-
return
|
|
989
|
+
return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
|
|
983
990
|
"CLIENT_NODE_BUILTIN",
|
|
984
991
|
file,
|
|
985
992
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1235,8 +1242,8 @@ function farmLlmsTxtGeneratedPaths(config) {
|
|
|
1235
1242
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
1236
1243
|
}
|
|
1237
1244
|
function farmAgentGeneratedPaths(config) {
|
|
1238
|
-
const crawlers =
|
|
1239
|
-
const sitemap =
|
|
1245
|
+
const crawlers = _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
|
|
1246
|
+
const sitemap = _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
|
|
1240
1247
|
return [
|
|
1241
1248
|
...farmLlmsTxtGeneratedPaths(config),
|
|
1242
1249
|
...sitemap.enabled ? ["/sitemap.xml"] : [],
|
|
@@ -1281,7 +1288,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1281
1288
|
return import("./workflows.cjs");
|
|
1282
1289
|
}
|
|
1283
1290
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1284
|
-
return import("./devtools-
|
|
1291
|
+
return import("./devtools-ZM2AR36W.cjs");
|
|
1285
1292
|
}
|
|
1286
1293
|
function loadFarmDevtoolsUIRuntime() {
|
|
1287
1294
|
return import("./devtools-ui-C2EMF2SO.cjs");
|
|
@@ -1306,7 +1313,7 @@ function farmI18nClientBridgePlugin() {
|
|
|
1306
1313
|
};
|
|
1307
1314
|
}
|
|
1308
1315
|
function farmNavigationPlugin(renderer) {
|
|
1309
|
-
const otherRenderer = !
|
|
1316
|
+
const otherRenderer = !_chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
|
|
1310
1317
|
return {
|
|
1311
1318
|
name: "farm:navigation",
|
|
1312
1319
|
config() {
|
|
@@ -1331,16 +1338,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1331
1338
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1332
1339
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1333
1340
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1334
|
-
|
|
1335
|
-
new RegExp(`^${
|
|
1341
|
+
_chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1342
|
+
new RegExp(`^${_chunkEFI6QWBQcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1336
1343
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1337
1344
|
// included.
|
|
1338
1345
|
/^node:/,
|
|
1339
|
-
|
|
1346
|
+
_chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1340
1347
|
];
|
|
1341
1348
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1342
|
-
|
|
1343
|
-
new RegExp(`^${
|
|
1349
|
+
_chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1350
|
+
new RegExp(`^${_chunkEFI6QWBQcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1344
1351
|
];
|
|
1345
1352
|
function createFarmPlatformClientModule(platform) {
|
|
1346
1353
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1376,18 +1383,18 @@ function farmIslandContainersPlugin(config) {
|
|
|
1376
1383
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1377
1384
|
return null;
|
|
1378
1385
|
}
|
|
1379
|
-
if (
|
|
1386
|
+
if (_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1380
1387
|
const file = id.split("?", 1)[0];
|
|
1381
|
-
const bindings =
|
|
1388
|
+
const bindings = _chunkEFI6QWBQcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1382
1389
|
if (bindings.length === 0) return null;
|
|
1383
|
-
const grown =
|
|
1390
|
+
const grown = _chunkEFI6QWBQcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1384
1391
|
code,
|
|
1385
1392
|
file,
|
|
1386
1393
|
bindings,
|
|
1387
|
-
reference:
|
|
1394
|
+
reference: _chunkEFI6QWBQcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1388
1395
|
});
|
|
1389
1396
|
if (grown === null) return null;
|
|
1390
|
-
|
|
1397
|
+
_chunkEFI6QWBQcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1391
1398
|
return { code: grown, map: null };
|
|
1392
1399
|
}
|
|
1393
1400
|
};
|
|
@@ -1401,15 +1408,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1401
1408
|
config(config) {
|
|
1402
1409
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1403
1410
|
if (options.distDir) {
|
|
1404
|
-
|
|
1411
|
+
_chunkEFI6QWBQcjs.usePackageScanCacheFile.call(void 0,
|
|
1405
1412
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1406
1413
|
);
|
|
1407
1414
|
}
|
|
1408
|
-
const bundledPackages =
|
|
1415
|
+
const bundledPackages = _chunkEFI6QWBQcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1409
1416
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1410
|
-
|
|
1417
|
+
_chunkEFI6QWBQcjs.persistPackageScanCache.call(void 0, );
|
|
1411
1418
|
return {
|
|
1412
|
-
optimizeDeps: { rolldownOptions: { plugins: [
|
|
1419
|
+
optimizeDeps: { rolldownOptions: { plugins: [_chunkEFI6QWBQcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
|
|
1413
1420
|
ssr: {
|
|
1414
1421
|
noExternal: [
|
|
1415
1422
|
// Resolve `server-only` here rather than in Node, which would load its throwing build.
|
|
@@ -1433,8 +1440,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1433
1440
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1434
1441
|
}
|
|
1435
1442
|
this.error(
|
|
1436
|
-
|
|
1437
|
-
|
|
1443
|
+
_chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
|
|
1444
|
+
_chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
|
|
1438
1445
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1439
1446
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1440
1447
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1444,9 +1451,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1444
1451
|
);
|
|
1445
1452
|
}
|
|
1446
1453
|
if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1447
|
-
return
|
|
1454
|
+
return _chunkEFI6QWBQcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1448
1455
|
}
|
|
1449
|
-
const resolveFrom = importer ?
|
|
1456
|
+
const resolveFrom = importer ? _chunkEFI6QWBQcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1450
1457
|
if (resolveFrom) {
|
|
1451
1458
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1452
1459
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1463,8 +1470,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1463
1470
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1464
1471
|
if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
|
|
1465
1472
|
this.error(
|
|
1466
|
-
|
|
1467
|
-
|
|
1473
|
+
_chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
|
|
1474
|
+
_chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
|
|
1468
1475
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1469
1476
|
_nullishCoalesce(importer, () => ( id)),
|
|
1470
1477
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1489,7 +1496,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1489
1496
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1490
1497
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1491
1498
|
}
|
|
1492
|
-
return _nullishCoalesce(
|
|
1499
|
+
return _nullishCoalesce(_chunkEFI6QWBQcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1493
1500
|
}
|
|
1494
1501
|
}
|
|
1495
1502
|
};
|
|
@@ -1522,7 +1529,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1522
1529
|
if (!snapshot) return "";
|
|
1523
1530
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
1524
1531
|
if (snapshot.routing === "none") return runtime;
|
|
1525
|
-
return `${
|
|
1532
|
+
return `${_chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1526
1533
|
}
|
|
1527
1534
|
function getPublicEnvDefine(config) {
|
|
1528
1535
|
const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
|
|
@@ -1569,7 +1576,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
1569
1576
|
}
|
|
1570
1577
|
res.statusCode = 500;
|
|
1571
1578
|
res.setHeader("Content-Type", "application/json");
|
|
1572
|
-
res.end(
|
|
1579
|
+
res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1573
1580
|
});
|
|
1574
1581
|
};
|
|
1575
1582
|
}
|
|
@@ -1577,10 +1584,10 @@ function sendFarmDevErrorJSON(res) {
|
|
|
1577
1584
|
res.statusCode = 500;
|
|
1578
1585
|
res.setHeader("Content-Type", "application/json");
|
|
1579
1586
|
res.setHeader("Cache-Control", "private, no-store");
|
|
1580
|
-
res.end(
|
|
1587
|
+
res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1581
1588
|
}
|
|
1582
1589
|
function createFarmDevMiddlewareErrorResponse() {
|
|
1583
|
-
return new Response(
|
|
1590
|
+
return new Response(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
|
|
1584
1591
|
status: 500,
|
|
1585
1592
|
headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
|
|
1586
1593
|
});
|
|
@@ -1592,10 +1599,10 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
|
|
|
1592
1599
|
}
|
|
1593
1600
|
function sendFarmDevRuntimeHookError(res, json) {
|
|
1594
1601
|
setFarmDevRuntimeHookErrorHead(res, json);
|
|
1595
|
-
res.end(json ?
|
|
1602
|
+
res.end(json ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1596
1603
|
}
|
|
1597
1604
|
function opensFarmDevRuntimeSession(pm) {
|
|
1598
|
-
return pm.hasRuntimeRequestHooks() ||
|
|
1605
|
+
return pm.hasRuntimeRequestHooks() || _chunkDMSXZNQRcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
|
|
1599
1606
|
}
|
|
1600
1607
|
var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
|
|
1601
1608
|
_chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
@@ -1708,7 +1715,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1708
1715
|
res.end = originalEnd;
|
|
1709
1716
|
res.writeHead = originalWriteHead;
|
|
1710
1717
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1711
|
-
delete res[
|
|
1718
|
+
delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1712
1719
|
};
|
|
1713
1720
|
let runtimeHookFailed = false;
|
|
1714
1721
|
const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
|
|
@@ -1722,7 +1729,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1722
1729
|
const writeRuntimeHookFailure = () => {
|
|
1723
1730
|
setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
|
|
1724
1731
|
originalWriteHead(500);
|
|
1725
|
-
originalWrite(options.jsonError ?
|
|
1732
|
+
originalWrite(options.jsonError ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1726
1733
|
};
|
|
1727
1734
|
const htmlChunks = [];
|
|
1728
1735
|
const responseChunks = [];
|
|
@@ -1832,7 +1839,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1832
1839
|
});
|
|
1833
1840
|
res.end = ((...args) => {
|
|
1834
1841
|
interceptedEnd = true;
|
|
1835
|
-
res[
|
|
1842
|
+
res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
|
|
1836
1843
|
if (afterResponseCalled) return res;
|
|
1837
1844
|
afterResponseCalled = true;
|
|
1838
1845
|
options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
|
|
@@ -1915,7 +1922,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1915
1922
|
res.end = originalEnd;
|
|
1916
1923
|
res.writeHead = originalWriteHead;
|
|
1917
1924
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1918
|
-
delete res[
|
|
1925
|
+
delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1919
1926
|
originalEnd(...originalEndArgs);
|
|
1920
1927
|
}).catch((error) => {
|
|
1921
1928
|
reportFailure(error);
|
|
@@ -1932,14 +1939,14 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1932
1939
|
res.end = originalEnd;
|
|
1933
1940
|
res.writeHead = originalWriteHead;
|
|
1934
1941
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1935
|
-
delete res[
|
|
1942
|
+
delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1936
1943
|
originalEnd(body, callback);
|
|
1937
1944
|
} else {
|
|
1938
1945
|
res.write = originalWrite;
|
|
1939
1946
|
res.end = originalEnd;
|
|
1940
1947
|
res.writeHead = originalWriteHead;
|
|
1941
1948
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1942
|
-
delete res[
|
|
1949
|
+
delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1943
1950
|
originalEnd(...originalEndArgs);
|
|
1944
1951
|
}
|
|
1945
1952
|
});
|
|
@@ -1970,7 +1977,7 @@ function getEnvDefines(config, configEnv) {
|
|
|
1970
1977
|
_chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
|
|
1971
1978
|
_chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
|
|
1972
1979
|
config.images,
|
|
1973
|
-
|
|
1980
|
+
_chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
|
|
1974
1981
|
)
|
|
1975
1982
|
)
|
|
1976
1983
|
)
|
|
@@ -2103,7 +2110,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2103
2110
|
return null;
|
|
2104
2111
|
}
|
|
2105
2112
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2106
|
-
const everyExportIsComponent = options.code.includes(
|
|
2113
|
+
const everyExportIsComponent = options.code.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2107
2114
|
const replacements = [];
|
|
2108
2115
|
const wrapperStatements = [];
|
|
2109
2116
|
const originalEntries = [];
|
|
@@ -2254,16 +2261,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2254
2261
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2255
2262
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2256
2263
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2257
|
-
if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(
|
|
2264
|
+
if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkEFI6QWBQcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2258
2265
|
}
|
|
2259
2266
|
findings.push(finding);
|
|
2260
2267
|
}
|
|
2261
2268
|
if (findings.length === 0) return;
|
|
2262
2269
|
warnedClientBoundaryIds.add(id);
|
|
2263
|
-
const locate =
|
|
2270
|
+
const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2264
2271
|
_chunk7U4XF76Rcjs.logger.warn(
|
|
2265
2272
|
findings.map(
|
|
2266
|
-
(finding) =>
|
|
2273
|
+
(finding) => _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
|
|
2267
2274
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2268
2275
|
config.root
|
|
2269
2276
|
)
|
|
@@ -2280,7 +2287,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
|
|
|
2280
2287
|
);
|
|
2281
2288
|
}
|
|
2282
2289
|
function shouldEmitFarmClientRootHmr(renderer) {
|
|
2283
|
-
return
|
|
2290
|
+
return _chunkNGTZHWBGcjs.getFarmRendererCapabilities.call(void 0, _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
|
|
2284
2291
|
}
|
|
2285
2292
|
var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
|
|
2286
2293
|
function toFarmRuntimeModuleId(specifier) {
|
|
@@ -2311,9 +2318,9 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2311
2318
|
);
|
|
2312
2319
|
}
|
|
2313
2320
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2314
|
-
const rendererDisabled =
|
|
2321
|
+
const rendererDisabled = _chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2315
2322
|
const imageImports = farmImageImportsPlugin();
|
|
2316
|
-
const fontImports =
|
|
2323
|
+
const fontImports = _chunkJHRJ5V2Fcjs.farmFontImportsPlugin.call(void 0, {
|
|
2317
2324
|
root: options.root,
|
|
2318
2325
|
basePath: options.basePath,
|
|
2319
2326
|
publicDir: options.publicDir
|
|
@@ -2347,8 +2354,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2347
2354
|
if (mdxComponents) files.add(mdxComponents);
|
|
2348
2355
|
return files;
|
|
2349
2356
|
};
|
|
2350
|
-
const islxActionsMode = () =>
|
|
2351
|
-
const islandsServerFns = () =>
|
|
2357
|
+
const islxActionsMode = () => _chunkJHRJ5V2Fcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
|
|
2358
|
+
const islandsServerFns = () => _chunkJHRJ5V2Fcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
|
|
2352
2359
|
let reactRefreshActive = false;
|
|
2353
2360
|
let server;
|
|
2354
2361
|
let deferredGates;
|
|
@@ -2391,11 +2398,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2391
2398
|
isBuild = configEnv.command === "build";
|
|
2392
2399
|
const farmAliases = {
|
|
2393
2400
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2394
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} :
|
|
2401
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkJHRJ5V2Fcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2395
2402
|
};
|
|
2396
2403
|
if (Object.keys(farmAliases).length > 0) {
|
|
2397
2404
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2398
|
-
userConfig.resolve.alias =
|
|
2405
|
+
userConfig.resolve.alias = _chunkJHRJ5V2Fcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2399
2406
|
}
|
|
2400
2407
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2401
2408
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
|
|
@@ -2469,7 +2476,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2469
2476
|
} catch (e21) {
|
|
2470
2477
|
}
|
|
2471
2478
|
};
|
|
2472
|
-
farmApp = new (0,
|
|
2479
|
+
farmApp = new (0, _chunkJHRJ5V2Fcjs.FarmApp)(
|
|
2473
2480
|
{
|
|
2474
2481
|
...options,
|
|
2475
2482
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2477,7 +2484,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2477
2484
|
server
|
|
2478
2485
|
);
|
|
2479
2486
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2480
|
-
|
|
2487
|
+
_chunkEFI6QWBQcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2481
2488
|
farmApp.getConfig().root,
|
|
2482
2489
|
options.distDir || ".farm"
|
|
2483
2490
|
)
|
|
@@ -2488,15 +2495,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2488
2495
|
let farmAppPackages;
|
|
2489
2496
|
if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
|
|
2490
2497
|
farmMiddlewares.use((_req, res, next) => {
|
|
2491
|
-
if (
|
|
2492
|
-
res.setHeader("X-Robots-Tag",
|
|
2498
|
+
if (_chunkIABI62FHcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2499
|
+
res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2493
2500
|
}
|
|
2494
2501
|
next();
|
|
2495
2502
|
});
|
|
2496
2503
|
}
|
|
2497
2504
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2498
2505
|
const devBuiltInRoutePaths = new Set(
|
|
2499
|
-
|
|
2506
|
+
_chunkWCSBYQOTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2500
2507
|
agent: {
|
|
2501
2508
|
apiCatalog: true,
|
|
2502
2509
|
mcp: true,
|
|
@@ -2546,7 +2553,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2546
2553
|
);
|
|
2547
2554
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2548
2555
|
try {
|
|
2549
|
-
const result = await
|
|
2556
|
+
const result = await _chunkHRH7OKBQcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2550
2557
|
root: farmConfig.root,
|
|
2551
2558
|
srcDir: farmConfig.srcDir,
|
|
2552
2559
|
layers: farmConfig.layers,
|
|
@@ -2555,6 +2562,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2555
2562
|
extraRoutes: getExtraRouteTypes(),
|
|
2556
2563
|
suppressLintOnLink: farmConfig.suppressLintOnLink,
|
|
2557
2564
|
componentExtensions: farmConfig.renderer.componentExtensions,
|
|
2565
|
+
renderer: farmConfig.renderer,
|
|
2558
2566
|
i18nConfig: farmConfig.i18n,
|
|
2559
2567
|
...selection
|
|
2560
2568
|
});
|
|
@@ -2590,7 +2598,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2590
2598
|
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
2591
2599
|
);
|
|
2592
2600
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
2593
|
-
...
|
|
2601
|
+
..._chunkNGTZHWBGcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
2594
2602
|
".md",
|
|
2595
2603
|
".mdx"
|
|
2596
2604
|
]);
|
|
@@ -2614,6 +2622,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2614
2622
|
);
|
|
2615
2623
|
};
|
|
2616
2624
|
const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
|
|
2625
|
+
const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _161 => _161.getRouteManager, 'call', _162 => _162(), 'access', _163 => _163.isRendererRouteFile, 'call', _164 => _164(file)]) === true;
|
|
2617
2626
|
const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
|
|
2618
2627
|
file.replace(/\\/g, "/")
|
|
2619
2628
|
);
|
|
@@ -2650,7 +2659,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2650
2659
|
const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
|
|
2651
2660
|
const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
|
|
2652
2661
|
const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
|
|
2653
|
-
routes: ev !== "change" && isRouteModuleFile(file) || programmaticRouteChanged,
|
|
2662
|
+
routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
|
|
2654
2663
|
api: isApiRouteFile(file) || programmaticRouteChanged,
|
|
2655
2664
|
env: false,
|
|
2656
2665
|
images: false,
|
|
@@ -2660,9 +2669,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2660
2669
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
2661
2670
|
}
|
|
2662
2671
|
if (isI18nCatalogFile(file)) {
|
|
2663
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
2672
|
+
_optionalChain([farmApp, 'optionalAccess', _165 => _165.getI18nRuntime, 'call', _166 => _166(), 'access', _167 => _167.reload, 'call', _168 => _168(), 'access', _169 => _169.then, 'call', _170 => _170(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _171 => _171.catch, 'call', _172 => _172((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
2664
2673
|
}
|
|
2665
|
-
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2674
|
+
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2666
2675
|
if (isRouteRefreshEvent) {
|
|
2667
2676
|
if (!queuedRouteFiles) {
|
|
2668
2677
|
const files = /* @__PURE__ */ new Set();
|
|
@@ -2672,8 +2681,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2672
2681
|
queuedRouteFiles = void 0;
|
|
2673
2682
|
try {
|
|
2674
2683
|
await Promise.all([
|
|
2675
|
-
_optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
2676
|
-
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess',
|
|
2684
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _173 => _173(`${ev} ${file}`)]),
|
|
2685
|
+
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _174 => _174.reload, 'call', _175 => _175()]) : void 0
|
|
2677
2686
|
]);
|
|
2678
2687
|
if (pendingRouteReloads.size === 1)
|
|
2679
2688
|
server.ws.send({ type: "full-reload", path: "*" });
|
|
@@ -2722,14 +2731,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2722
2731
|
const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
|
|
2723
2732
|
const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
|
|
2724
2733
|
globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
|
|
2725
|
-
_optionalChain([server, 'access',
|
|
2734
|
+
_optionalChain([server, 'access', _176 => _176.httpServer, 'optionalAccess', _177 => _177.once, 'call', _178 => _178("close", () => {
|
|
2726
2735
|
const globals = globalThis;
|
|
2727
2736
|
if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
|
|
2728
2737
|
delete globals[FARM_DEV_SERVER_MODULE_LOADER];
|
|
2729
2738
|
}
|
|
2730
2739
|
})]);
|
|
2731
2740
|
}
|
|
2732
|
-
apiRouteManager = new (0,
|
|
2741
|
+
apiRouteManager = new (0, _chunk5P65LXGUcjs.APIRouteManager)(appDirs, server, {
|
|
2733
2742
|
plugins: farmConfig.plugins,
|
|
2734
2743
|
i18n: farmApp.getI18nRuntime(),
|
|
2735
2744
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2796,11 +2805,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2796
2805
|
});
|
|
2797
2806
|
}
|
|
2798
2807
|
}
|
|
2799
|
-
if (_optionalChain([options, 'access',
|
|
2808
|
+
if (_optionalChain([options, 'access', _179 => _179.openapi, 'optionalAccess', _180 => _180.enabled])) {
|
|
2800
2809
|
const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
|
|
2801
2810
|
openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
|
|
2802
2811
|
mode: "development",
|
|
2803
|
-
apiBaseURL: typeof _optionalChain([options, 'access',
|
|
2812
|
+
apiBaseURL: typeof _optionalChain([options, 'access', _181 => _181.api, 'optionalAccess', _182 => _182.baseURL]) === "string" ? options.api.baseURL : void 0,
|
|
2804
2813
|
routes: () => apiRouteManager.getRoutes().values(),
|
|
2805
2814
|
loadModule: (filePath) => apiRouteManager.loadModule(filePath)
|
|
2806
2815
|
});
|
|
@@ -2831,7 +2840,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2831
2840
|
return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
2832
2841
|
};
|
|
2833
2842
|
releaseDocsMCPServers();
|
|
2834
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
2843
|
+
const isFarmDocsPathGuarded = (href) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
|
|
2835
2844
|
{
|
|
2836
2845
|
config: farmConfig,
|
|
2837
2846
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2842,22 +2851,23 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2842
2851
|
root: farmConfig.root,
|
|
2843
2852
|
srcDir: farmConfig.srcDir,
|
|
2844
2853
|
clientEntry: "/@farm/client.js",
|
|
2854
|
+
rendererServer: farmConfig.renderer.server,
|
|
2845
2855
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2846
2856
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2847
|
-
globalStylesheetHref:
|
|
2857
|
+
globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2848
2858
|
farmConfig.root,
|
|
2849
2859
|
farmConfig.srcDir
|
|
2850
2860
|
),
|
|
2851
2861
|
loadModule: async (specifier) => {
|
|
2852
2862
|
const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
|
|
2853
|
-
if (specifier === _optionalChain([farmConfig, 'access',
|
|
2863
|
+
if (specifier === _optionalChain([farmConfig, 'access', _183 => _183.docs, 'access', _184 => _184.adapter, 'optionalAccess', _185 => _185.server]) && _optionalChain([resolved, 'optionalAccess', _186 => _186.id])) {
|
|
2854
2864
|
const file = resolved.id.split("?", 1)[0];
|
|
2855
2865
|
return import(
|
|
2856
2866
|
/* @vite-ignore */
|
|
2857
2867
|
_url.pathToFileURL.call(void 0, file).href
|
|
2858
2868
|
);
|
|
2859
2869
|
}
|
|
2860
|
-
return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
2870
|
+
return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _187 => _187.id]), () => ( specifier)));
|
|
2861
2871
|
},
|
|
2862
2872
|
registerMCPServer: (mcpServer) => {
|
|
2863
2873
|
const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
@@ -2875,7 +2885,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2875
2885
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2876
2886
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2877
2887
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2878
|
-
globalStylesheetHref:
|
|
2888
|
+
globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2879
2889
|
farmConfig.root,
|
|
2880
2890
|
farmConfig.srcDir
|
|
2881
2891
|
),
|
|
@@ -2883,7 +2893,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2883
2893
|
basePath: farmConfig.basePath
|
|
2884
2894
|
}) : null;
|
|
2885
2895
|
const farmDocsListsPages = Boolean(
|
|
2886
|
-
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess',
|
|
2896
|
+
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _188 => _188.getPlugins, 'call', _189 => _189(), 'access', _190 => _190.some, 'call', _191 => _191((plugin2) => plugin2.name === "farm:infra-analytics")])
|
|
2887
2897
|
);
|
|
2888
2898
|
let farmDocsPagePaths;
|
|
2889
2899
|
const getFarmDocsPagePaths = () => {
|
|
@@ -2910,6 +2920,24 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2910
2920
|
});
|
|
2911
2921
|
}
|
|
2912
2922
|
}
|
|
2923
|
+
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.find, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
2924
|
+
if (farmInfraAnalyticsPlugin) {
|
|
2925
|
+
_chunkOM6JIIJUcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
2926
|
+
if (farmDocsDevRuntime) {
|
|
2927
|
+
const label = _chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
2928
|
+
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
2929
|
+
{
|
|
2930
|
+
path: _optionalChain([farmConfig, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.entry]) || "/docs",
|
|
2931
|
+
roots: _optionalChain([farmConfig, 'access', _198 => _198.docs, 'optionalAccess', _199 => _199.roots, 'optionalAccess', _200 => _200.map, 'call', _201 => _201((root) => root.entry)]),
|
|
2932
|
+
pages: await getFarmDocsPagePaths()
|
|
2933
|
+
}
|
|
2934
|
+
);
|
|
2935
|
+
if (label) return _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
2936
|
+
}
|
|
2937
|
+
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
2938
|
+
return { pathname, pattern: _optionalChain([match, 'access', _202 => _202.route, 'optionalAccess', _203 => _203.pattern]) || null };
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2913
2941
|
if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
|
|
2914
2942
|
const docsContentDirs = farmDocsDevRuntime.getFarmDocsContentDirs(farmConfig.docs, {
|
|
2915
2943
|
root: farmConfig.root,
|
|
@@ -2982,7 +3010,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2982
3010
|
}
|
|
2983
3011
|
},
|
|
2984
3012
|
(request) => {
|
|
2985
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3013
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _204 => _204.getConfig, 'call', _205 => _205()]), () => ( options));
|
|
2986
3014
|
const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2987
3015
|
return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
|
|
2988
3016
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -2998,7 +3026,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2998
3026
|
withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
|
|
2999
3027
|
const requestUrl = req.url || "/";
|
|
3000
3028
|
const requestMethod = req.method || "GET";
|
|
3001
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3029
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _206 => _206.getConfig, 'call', _207 => _207()]), () => ( options));
|
|
3002
3030
|
const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
3003
3031
|
const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3004
3032
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -3040,10 +3068,35 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3040
3068
|
return;
|
|
3041
3069
|
}
|
|
3042
3070
|
}
|
|
3071
|
+
if (pm && requestMethod !== "GET" && requestMethod !== "HEAD" && pm._hasRuntimeEndpoint(requestPathname)) {
|
|
3072
|
+
let body;
|
|
3073
|
+
try {
|
|
3074
|
+
body = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
3075
|
+
} catch (error) {
|
|
3076
|
+
res.statusCode = _nullishCoalesce(error.status, () => ( 400));
|
|
3077
|
+
res.end();
|
|
3078
|
+
return;
|
|
3079
|
+
}
|
|
3080
|
+
let response;
|
|
3081
|
+
try {
|
|
3082
|
+
const endpointRequest = createRequestFromNodeRequest(req, parsedRequestUrl);
|
|
3083
|
+
response = await pm.runRuntimeRequest(
|
|
3084
|
+
new Request(endpointRequest, { method: requestMethod, body: toRequestBody(body) }),
|
|
3085
|
+
// An endpoint answers before the handler would run.
|
|
3086
|
+
() => new Response(null, { status: 404 }),
|
|
3087
|
+
{ kind: "request", route: { pathname: requestPathname } }
|
|
3088
|
+
);
|
|
3089
|
+
} catch (e22) {
|
|
3090
|
+
sendFarmDevRuntimeHookError(res, true);
|
|
3091
|
+
return;
|
|
3092
|
+
}
|
|
3093
|
+
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3094
|
+
return;
|
|
3095
|
+
}
|
|
3043
3096
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3044
3097
|
res.statusCode = 200;
|
|
3045
3098
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3046
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3099
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkJHRJ5V2Fcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3047
3100
|
return;
|
|
3048
3101
|
}
|
|
3049
3102
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3072,7 +3125,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3072
3125
|
if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_PATH)) {
|
|
3073
3126
|
launchUrl = referrerUrl;
|
|
3074
3127
|
}
|
|
3075
|
-
} catch (
|
|
3128
|
+
} catch (e23) {
|
|
3076
3129
|
}
|
|
3077
3130
|
}
|
|
3078
3131
|
launchUrl.searchParams.set(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_LAUNCH_PARAM, "1");
|
|
@@ -3098,7 +3151,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3098
3151
|
openapi: options.openapi
|
|
3099
3152
|
},
|
|
3100
3153
|
workflows: discoveredWorkflows,
|
|
3101
|
-
plugins: _optionalChain([pm, 'optionalAccess',
|
|
3154
|
+
plugins: _optionalChain([pm, 'optionalAccess', _208 => _208.getSortedPlugins, 'call', _209 => _209()])
|
|
3102
3155
|
});
|
|
3103
3156
|
res.statusCode = 200;
|
|
3104
3157
|
res.setHeader(
|
|
@@ -3122,7 +3175,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3122
3175
|
}
|
|
3123
3176
|
const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
|
|
3124
3177
|
const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
|
|
3125
|
-
const runtimeHookErrorAnswersJSON = rendererDisabled ||
|
|
3178
|
+
const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
|
|
3126
3179
|
const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
|
|
3127
3180
|
let pageHookRouteMatch;
|
|
3128
3181
|
const pageHookRoute = () => {
|
|
@@ -3133,10 +3186,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3133
3186
|
render: {
|
|
3134
3187
|
pathname: pathname2,
|
|
3135
3188
|
method: requestMethod,
|
|
3136
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
3137
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
3189
|
+
routePattern: _optionalChain([match, 'optionalAccess', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null,
|
|
3190
|
+
params: _optionalChain([match, 'optionalAccess', _212 => _212.params]) || {}
|
|
3138
3191
|
},
|
|
3139
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
3192
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _213 => _213.layouts]) || []).map((layout) => layout.pattern)
|
|
3140
3193
|
};
|
|
3141
3194
|
return pageHookRouteMatch;
|
|
3142
3195
|
};
|
|
@@ -3203,7 +3256,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3203
3256
|
const redirectResponse = response;
|
|
3204
3257
|
try {
|
|
3205
3258
|
const metadataRoute = matchAppMetadataRoute(requestPathname);
|
|
3206
|
-
const kind = metadataRoute ? "asset" :
|
|
3259
|
+
const kind = metadataRoute ? "asset" : _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
|
|
3207
3260
|
response = await pm.runRuntimeRequest(
|
|
3208
3261
|
createRequestFromNodeRequest(req, parsedRequestUrl),
|
|
3209
3262
|
async () => {
|
|
@@ -3212,7 +3265,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3212
3265
|
},
|
|
3213
3266
|
{ kind, route: { pathname: requestPathname, ...metadataRoute } }
|
|
3214
3267
|
);
|
|
3215
|
-
} catch (
|
|
3268
|
+
} catch (e24) {
|
|
3216
3269
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3217
3270
|
logResponse(requestMethod, requestUrl, 500, 0, "PAGE");
|
|
3218
3271
|
return;
|
|
@@ -3224,7 +3277,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3224
3277
|
}
|
|
3225
3278
|
}
|
|
3226
3279
|
const runAppMiddlewareForContentRoute = async () => {
|
|
3227
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
3280
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()])) return false;
|
|
3228
3281
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
3229
3282
|
return runFarmMiddlewareWithNavigation(
|
|
3230
3283
|
farmApp.getServerRenderer(),
|
|
@@ -3253,7 +3306,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3253
3306
|
return errorResponse;
|
|
3254
3307
|
}
|
|
3255
3308
|
);
|
|
3256
|
-
} catch (
|
|
3309
|
+
} catch (e25) {
|
|
3257
3310
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3258
3311
|
return 500;
|
|
3259
3312
|
}
|
|
@@ -3262,7 +3315,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3262
3315
|
return response.status;
|
|
3263
3316
|
};
|
|
3264
3317
|
const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
|
|
3265
|
-
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess',
|
|
3318
|
+
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _216 => _216.hasRuntimeHook, 'call', _217 => _217("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _218 => _218.hasMiddleware, 'call', _219 => _219()]) ? interceptFarmDevPageResponse({
|
|
3266
3319
|
req,
|
|
3267
3320
|
res,
|
|
3268
3321
|
pm,
|
|
@@ -3275,7 +3328,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3275
3328
|
urlPath: requestUrl,
|
|
3276
3329
|
pathname: requestPathname,
|
|
3277
3330
|
startTime: Date.now(),
|
|
3278
|
-
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall',
|
|
3331
|
+
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _220 => _220(status)]),
|
|
3279
3332
|
// The runtime reports a runtime.after failure itself.
|
|
3280
3333
|
emitError: async () => {
|
|
3281
3334
|
},
|
|
@@ -3286,7 +3339,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3286
3339
|
handled = await runAppMiddlewareForContentRoute();
|
|
3287
3340
|
} catch (error) {
|
|
3288
3341
|
if (runtimeHookErrorAnswersJSON || res.headersSent) {
|
|
3289
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3342
|
+
_optionalChain([interceptor, 'optionalAccess', _221 => _221.release, 'call', _222 => _222()]);
|
|
3290
3343
|
throw error;
|
|
3291
3344
|
}
|
|
3292
3345
|
if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
|
|
@@ -3294,10 +3347,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3294
3347
|
return true;
|
|
3295
3348
|
}
|
|
3296
3349
|
if (!handled) {
|
|
3297
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3350
|
+
_optionalChain([interceptor, 'optionalAccess', _223 => _223.release, 'call', _224 => _224()]);
|
|
3298
3351
|
return false;
|
|
3299
3352
|
}
|
|
3300
|
-
if (!_optionalChain([interceptor, 'optionalAccess',
|
|
3353
|
+
if (!_optionalChain([interceptor, 'optionalAccess', _225 => _225.isEnded, 'call', _226 => _226()])) _optionalChain([logResponse2, 'optionalCall', _227 => _227(res.statusCode || 200)]);
|
|
3301
3354
|
return true;
|
|
3302
3355
|
};
|
|
3303
3356
|
const serveBuiltInRoute = async (respond, {
|
|
@@ -3306,14 +3359,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3306
3359
|
label
|
|
3307
3360
|
} = {}) => {
|
|
3308
3361
|
const discard = async () => {
|
|
3309
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
3362
|
+
await _optionalChain([computed, 'optionalAccess', _228 => _228.body, 'optionalAccess', _229 => _229.cancel, 'call', _230 => _230(), 'access', _231 => _231.catch, 'call', _232 => _232(() => {
|
|
3310
3363
|
})]);
|
|
3311
3364
|
};
|
|
3312
3365
|
const sendRuntimeResponse = async (runtimeSession3, response2) => {
|
|
3313
3366
|
let runtimeResponse;
|
|
3314
3367
|
try {
|
|
3315
3368
|
runtimeResponse = await pm.endRuntimeRequest(runtimeSession3, response2);
|
|
3316
|
-
} catch (
|
|
3369
|
+
} catch (e26) {
|
|
3317
3370
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3318
3371
|
return;
|
|
3319
3372
|
}
|
|
@@ -3323,15 +3376,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3323
3376
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3324
3377
|
try {
|
|
3325
3378
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3326
|
-
const route =
|
|
3379
|
+
const route = _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
|
|
3327
3380
|
{ pathname: requestPathname },
|
|
3328
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3381
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3329
3382
|
);
|
|
3330
3383
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3331
3384
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
3332
3385
|
{ kind, route }
|
|
3333
3386
|
);
|
|
3334
|
-
} catch (
|
|
3387
|
+
} catch (e27) {
|
|
3335
3388
|
await discard();
|
|
3336
3389
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3337
3390
|
return;
|
|
@@ -3363,7 +3416,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3363
3416
|
}
|
|
3364
3417
|
responding = true;
|
|
3365
3418
|
response = await respond(
|
|
3366
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
3419
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _233 => _233.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
3367
3420
|
);
|
|
3368
3421
|
} catch (error) {
|
|
3369
3422
|
if (!responding && !res.headersSent) {
|
|
@@ -3383,7 +3436,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3383
3436
|
else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3384
3437
|
};
|
|
3385
3438
|
const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
3386
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
3439
|
+
if (openAPIManager && _optionalChain([options, 'access', _234 => _234.openapi, 'optionalAccess', _235 => _235.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
3387
3440
|
const specManager = openAPIManager;
|
|
3388
3441
|
await serveBuiltInRoute(async () => {
|
|
3389
3442
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -3403,7 +3456,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3403
3456
|
});
|
|
3404
3457
|
return;
|
|
3405
3458
|
}
|
|
3406
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
3459
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _236 => _236.openapi, 'optionalAccess', _237 => _237.route])) {
|
|
3407
3460
|
const docsManager = openAPIManager;
|
|
3408
3461
|
await serveBuiltInRoute(
|
|
3409
3462
|
async () => {
|
|
@@ -3414,8 +3467,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3414
3467
|
);
|
|
3415
3468
|
return;
|
|
3416
3469
|
}
|
|
3417
|
-
if (_optionalChain([options, 'access',
|
|
3418
|
-
const manifestGuardCoversPath = (path7) =>
|
|
3470
|
+
if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunkWCSBYQOTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3471
|
+
const manifestGuardCoversPath = (path7) => _chunkNEKO3HM2cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3419
3472
|
{
|
|
3420
3473
|
config: farmConfig,
|
|
3421
3474
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -3424,18 +3477,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3424
3477
|
apiServerBasePath
|
|
3425
3478
|
);
|
|
3426
3479
|
await serveBuiltInRoute(async () => {
|
|
3427
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3428
|
-
const manifest = await
|
|
3480
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkJHRJ5V2Fcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3481
|
+
const manifest = await _chunkWCSBYQOTcjs.createFarmAppManifestResponse.call(void 0,
|
|
3429
3482
|
new Request(parsedRequestUrl, {
|
|
3430
3483
|
method: requestMethod,
|
|
3431
3484
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3432
3485
|
}),
|
|
3433
3486
|
{
|
|
3434
|
-
...
|
|
3487
|
+
..._chunkWCSBYQOTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3435
3488
|
build: "development",
|
|
3436
3489
|
packages: farmAppPackages,
|
|
3437
3490
|
// Read again on each request; unchanged files come from a cache.
|
|
3438
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
3491
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkJHRJ5V2Fcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3439
3492
|
}),
|
|
3440
3493
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3441
3494
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3453,11 +3506,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3453
3506
|
});
|
|
3454
3507
|
return;
|
|
3455
3508
|
}
|
|
3456
|
-
if (_optionalChain([options, 'access',
|
|
3509
|
+
if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkWCSBYQOTcjs.FARM_API_CATALOG_PATH) {
|
|
3457
3510
|
await serveBuiltInRoute(
|
|
3458
|
-
() =>
|
|
3511
|
+
() => _chunkWCSBYQOTcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3459
3512
|
requestMethod,
|
|
3460
|
-
|
|
3513
|
+
_chunkWCSBYQOTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3461
3514
|
new Request(parsedRequestUrl, {
|
|
3462
3515
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3463
3516
|
})
|
|
@@ -3465,8 +3518,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3465
3518
|
);
|
|
3466
3519
|
return;
|
|
3467
3520
|
}
|
|
3468
|
-
if (_optionalChain([options, 'access',
|
|
3469
|
-
const aiCatalog =
|
|
3521
|
+
if (_optionalChain([options, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) !== false) {
|
|
3522
|
+
const aiCatalog = _chunkWCSBYQOTcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3470
3523
|
new Request(parsedRequestUrl, {
|
|
3471
3524
|
method: requestMethod,
|
|
3472
3525
|
headers: {
|
|
@@ -3514,7 +3567,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3514
3567
|
);
|
|
3515
3568
|
const docsResponse = await farmDocsHandler(docsHandlerRequest);
|
|
3516
3569
|
if (docsResponse) {
|
|
3517
|
-
const docsPage = _optionalChain([docsResponse, 'access',
|
|
3570
|
+
const docsPage = _optionalChain([docsResponse, 'access', _247 => _247.headers, 'access', _248 => _248.get, 'call', _249 => _249("content-type"), 'optionalAccess', _250 => _250.toLowerCase, 'call', _251 => _251(), 'access', _252 => _252.includes, 'call', _253 => _253("text/html")]);
|
|
3518
3571
|
await serveBuiltInRoute(
|
|
3519
3572
|
async (request) => {
|
|
3520
3573
|
if (!docsPage) {
|
|
@@ -3532,7 +3585,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3532
3585
|
farmConfig.deploymentId
|
|
3533
3586
|
);
|
|
3534
3587
|
if (deploymentMismatch) {
|
|
3535
|
-
await _optionalChain([docsResponse, 'access',
|
|
3588
|
+
await _optionalChain([docsResponse, 'access', _254 => _254.body, 'optionalAccess', _255 => _255.cancel, 'call', _256 => _256()]);
|
|
3536
3589
|
return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
|
|
3537
3590
|
}
|
|
3538
3591
|
return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
|
|
@@ -3548,11 +3601,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3548
3601
|
{
|
|
3549
3602
|
kind: "docs",
|
|
3550
3603
|
computed: docsResponse,
|
|
3551
|
-
label:
|
|
3604
|
+
label: _chunkWCSBYQOTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3552
3605
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3553
3606
|
{
|
|
3554
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3555
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3607
|
+
path: _optionalChain([farmConfig, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.entry]) || "/docs",
|
|
3608
|
+
roots: _optionalChain([farmConfig, 'access', _259 => _259.docs, 'optionalAccess', _260 => _260.roots, 'optionalAccess', _261 => _261.map, 'call', _262 => _262((root) => root.entry)]),
|
|
3556
3609
|
pages: await getFarmDocsPagePaths()
|
|
3557
3610
|
}
|
|
3558
3611
|
)
|
|
@@ -3561,7 +3614,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3561
3614
|
return;
|
|
3562
3615
|
}
|
|
3563
3616
|
}
|
|
3564
|
-
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access',
|
|
3617
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _263 => _263.headers, 'access', _264 => _264.accept, 'optionalAccess', _265 => _265.includes, 'call', _266 => _266(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
3565
3618
|
const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
|
|
3566
3619
|
const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
|
|
3567
3620
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
@@ -3579,15 +3632,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3579
3632
|
});
|
|
3580
3633
|
await serveBuiltInRoute(() => treeResponse, {
|
|
3581
3634
|
computed: treeResponse,
|
|
3582
|
-
label: _nullishCoalesce(_optionalChain([farmApp, 'access',
|
|
3635
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _267 => _267.getRouteManager, 'call', _268 => _268(), 'access', _269 => _269.matchRoute, 'call', _270 => _270(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _271 => _271.route, 'optionalAccess', _272 => _272.pattern]), () => ( null))
|
|
3583
3636
|
});
|
|
3584
3637
|
return;
|
|
3585
3638
|
}
|
|
3586
3639
|
const markdownRouteLabel = () => (
|
|
3587
3640
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3588
|
-
|
|
3641
|
+
_chunkWCSBYQOTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3589
3642
|
toRoutePathname(requestPathname),
|
|
3590
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
3643
|
+
(page) => _optionalChain([farmApp, 'access', _273 => _273.getRouteManager, 'call', _274 => _274(), 'access', _275 => _275.matchRoute, 'call', _276 => _276(page), 'access', _277 => _277.route, 'optionalAccess', _278 => _278.pattern])
|
|
3591
3644
|
)
|
|
3592
3645
|
);
|
|
3593
3646
|
const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
@@ -3599,14 +3652,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3599
3652
|
routePathname: toRoutePathname,
|
|
3600
3653
|
resolveSource: async (pathname2) => {
|
|
3601
3654
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
3602
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
3655
|
+
const sourcePath = _optionalChain([match, 'access', _279 => _279.route, 'optionalAccess', _280 => _280.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
3603
3656
|
if (!sourcePath) {
|
|
3604
3657
|
return null;
|
|
3605
3658
|
}
|
|
3606
3659
|
return {
|
|
3607
3660
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3608
3661
|
// Project-relative, as production sends it: never the machine's path.
|
|
3609
|
-
filePath:
|
|
3662
|
+
filePath: _chunkJHRJ5V2Fcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3610
3663
|
};
|
|
3611
3664
|
},
|
|
3612
3665
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -3741,7 +3794,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3741
3794
|
}
|
|
3742
3795
|
const configuredIntegrations = currentConfig.integrations;
|
|
3743
3796
|
const tryConfiguredIntegrationRoute = async () => {
|
|
3744
|
-
const matchedRoute =
|
|
3797
|
+
const matchedRoute = _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3745
3798
|
pathname: requestPathname,
|
|
3746
3799
|
method: requestMethod
|
|
3747
3800
|
});
|
|
@@ -3755,8 +3808,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3755
3808
|
await pm.runHookParallelFiltered(
|
|
3756
3809
|
"beforeRequest",
|
|
3757
3810
|
(plugin2) => {
|
|
3758
|
-
const owner =
|
|
3759
|
-
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess',
|
|
3811
|
+
const owner = _chunkB3HQTGXScjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3812
|
+
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _281 => _281.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3760
3813
|
},
|
|
3761
3814
|
req,
|
|
3762
3815
|
res
|
|
@@ -3785,7 +3838,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3785
3838
|
});
|
|
3786
3839
|
const dispatchIntegration = async (request, runtime) => {
|
|
3787
3840
|
try {
|
|
3788
|
-
const result = await
|
|
3841
|
+
const result = await _chunkB3HQTGXScjs.dispatchIntegrationRequest.call(void 0,
|
|
3789
3842
|
{
|
|
3790
3843
|
integration: matchedRoute.integration,
|
|
3791
3844
|
config: currentConfig,
|
|
@@ -3793,7 +3846,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3793
3846
|
isProd: false
|
|
3794
3847
|
},
|
|
3795
3848
|
request,
|
|
3796
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
3849
|
+
{ clientAddress: _optionalChain([req, 'access', _282 => _282.socket, 'optionalAccess', _283 => _283.remoteAddress]) }
|
|
3797
3850
|
);
|
|
3798
3851
|
if (!result) {
|
|
3799
3852
|
throw new Error(`Matched integration route did not return a response`);
|
|
@@ -3801,8 +3854,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3801
3854
|
return result;
|
|
3802
3855
|
} catch (error) {
|
|
3803
3856
|
_chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
|
|
3804
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3805
|
-
return
|
|
3857
|
+
await _optionalChain([runtime, 'optionalAccess', _284 => _284.reportError, 'call', _285 => _285(error)]);
|
|
3858
|
+
return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3806
3859
|
}
|
|
3807
3860
|
};
|
|
3808
3861
|
runtimeReportsErrors = Boolean(pm);
|
|
@@ -3843,7 +3896,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3843
3896
|
} else if (!res.writableEnded) {
|
|
3844
3897
|
res.statusCode = 500;
|
|
3845
3898
|
res.setHeader("Content-Type", "application/json");
|
|
3846
|
-
res.end(
|
|
3899
|
+
res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
3847
3900
|
}
|
|
3848
3901
|
return true;
|
|
3849
3902
|
}
|
|
@@ -3852,10 +3905,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3852
3905
|
const hasLocalDevRoute = () => {
|
|
3853
3906
|
const routeManager3 = farmApp.getRouteManager();
|
|
3854
3907
|
return Boolean(
|
|
3855
|
-
|
|
3908
|
+
_chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3856
3909
|
pathname: requestPathname,
|
|
3857
3910
|
method: requestMethod
|
|
3858
|
-
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3911
|
+
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _286 => _286.isFarmDocsAPIRequest, 'call', _287 => _287(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
3859
3912
|
);
|
|
3860
3913
|
};
|
|
3861
3914
|
try {
|
|
@@ -3889,7 +3942,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3889
3942
|
}
|
|
3890
3943
|
const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
|
|
3891
3944
|
const hasMatchedApiRoute = Boolean(matchedApiRoute);
|
|
3892
|
-
if (hasMatchedApiRoute ||
|
|
3945
|
+
if (hasMatchedApiRoute || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
|
|
3893
3946
|
const startTime2 = Date.now();
|
|
3894
3947
|
const method2 = req.method || "GET";
|
|
3895
3948
|
const urlPath2 = req.url || "/";
|
|
@@ -3918,7 +3971,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3918
3971
|
_chunk7U4XF76Rcjs.logger.error(`Request hook error: ${error}`);
|
|
3919
3972
|
res.statusCode = 500;
|
|
3920
3973
|
res.setHeader("Content-Type", "application/json");
|
|
3921
|
-
res.end(
|
|
3974
|
+
res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
3922
3975
|
return;
|
|
3923
3976
|
}
|
|
3924
3977
|
const createAPIRequest = async () => {
|
|
@@ -3945,15 +3998,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3945
3998
|
);
|
|
3946
3999
|
};
|
|
3947
4000
|
const isDocsAPIRequest = Boolean(
|
|
3948
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
4001
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _288 => _288.isFarmDocsAPIRequest, 'call', _289 => _289(pathname2)])
|
|
3949
4002
|
);
|
|
3950
4003
|
const docsRuntimeOptions = () => ({
|
|
3951
4004
|
kind: "docs",
|
|
3952
|
-
route:
|
|
4005
|
+
route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
|
|
3953
4006
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
3954
|
-
|
|
3955
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3956
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
4007
|
+
_chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4008
|
+
path: _optionalChain([farmConfig, 'access', _290 => _290.docs, 'optionalAccess', _291 => _291.entry]) || "/docs",
|
|
4009
|
+
roots: _optionalChain([farmConfig, 'access', _292 => _292.docs, 'optionalAccess', _293 => _293.roots, 'optionalAccess', _294 => _294.map, 'call', _295 => _295((root) => root.entry)])
|
|
3957
4010
|
})
|
|
3958
4011
|
)
|
|
3959
4012
|
});
|
|
@@ -4035,7 +4088,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4035
4088
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
4036
4089
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
4037
4090
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
4038
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
4091
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _296 => _296.route, 'access', _297 => _297.path]) || urlPath2;
|
|
4039
4092
|
_chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
|
|
4040
4093
|
type: "route.matched",
|
|
4041
4094
|
pathname: pathname2,
|
|
@@ -4085,8 +4138,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4085
4138
|
error
|
|
4086
4139
|
});
|
|
4087
4140
|
_chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
|
|
4088
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
4089
|
-
response =
|
|
4141
|
+
await _optionalChain([runtime, 'optionalAccess', _298 => _298.reportError, 'call', _299 => _299(error)]);
|
|
4142
|
+
response = _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
4090
4143
|
}
|
|
4091
4144
|
return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
|
|
4092
4145
|
};
|
|
@@ -4190,12 +4243,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4190
4243
|
}
|
|
4191
4244
|
return;
|
|
4192
4245
|
}
|
|
4193
|
-
if (_optionalChain([req, 'access',
|
|
4246
|
+
if (_optionalChain([req, 'access', _300 => _300.url, 'optionalAccess', _301 => _301.startsWith, 'call', _302 => _302("/@")]) || _optionalChain([req, 'access', _303 => _303.url, 'optionalAccess', _304 => _304.startsWith, 'call', _305 => _305("/node_modules")])) {
|
|
4194
4247
|
return next();
|
|
4195
4248
|
}
|
|
4196
4249
|
if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
|
|
4197
4250
|
requestPathname,
|
|
4198
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4251
|
+
_optionalChain([farmApp, 'optionalAccess', _306 => _306.getRouteManager, 'call', _307 => _307()]),
|
|
4199
4252
|
[server.config.publicDir, server.config.root],
|
|
4200
4253
|
farmAgentGeneratedPaths(farmConfig),
|
|
4201
4254
|
requestMethod
|
|
@@ -4203,7 +4256,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4203
4256
|
if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
|
|
4204
4257
|
return next();
|
|
4205
4258
|
}
|
|
4206
|
-
if (_optionalChain([req, 'access',
|
|
4259
|
+
if (_optionalChain([req, 'access', _308 => _308.url, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("/__farm/page-data")])) {
|
|
4207
4260
|
const urlObj = parsedRequestUrl;
|
|
4208
4261
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
4209
4262
|
let renderedRequest;
|
|
@@ -4233,7 +4286,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4233
4286
|
renderedRequest = targetRequest;
|
|
4234
4287
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
4235
4288
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
4236
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4289
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _311 => _311.hasMiddleware, 'call', _312 => _312()])) {
|
|
4237
4290
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
4238
4291
|
const targetNodeResponse = createPageDataMiddlewareResponse(res);
|
|
4239
4292
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
@@ -4267,10 +4320,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4267
4320
|
if (pm) {
|
|
4268
4321
|
await pm.runHookParallel("afterRouteMatch", {
|
|
4269
4322
|
pathname: targetPath,
|
|
4270
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
4271
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
4272
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4273
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
4323
|
+
matched: !!_optionalChain([match, 'optionalAccess', _313 => _313.route]),
|
|
4324
|
+
routePattern: _optionalChain([match, 'optionalAccess', _314 => _314.route, 'optionalAccess', _315 => _315.pattern]) || null,
|
|
4325
|
+
params: _optionalChain([match, 'optionalAccess', _316 => _316.params]) || {},
|
|
4326
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _317 => _317.layouts]) || []).map((l) => l.pattern)
|
|
4274
4327
|
});
|
|
4275
4328
|
}
|
|
4276
4329
|
if (!match) {
|
|
@@ -4305,7 +4358,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4305
4358
|
);
|
|
4306
4359
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4307
4360
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4308
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4361
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4309
4362
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4310
4363
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4311
4364
|
let mergedMetadata = {};
|
|
@@ -4316,7 +4369,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4316
4369
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4317
4370
|
(entry) => entry.pattern === layout.pattern
|
|
4318
4371
|
), () => ( {
|
|
4319
|
-
...
|
|
4372
|
+
..._chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4320
4373
|
serverTree: false
|
|
4321
4374
|
}))
|
|
4322
4375
|
);
|
|
@@ -4330,17 +4383,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4330
4383
|
)
|
|
4331
4384
|
];
|
|
4332
4385
|
const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4333
|
-
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4334
|
-
) === "islands" ?
|
|
4386
|
+
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options))), 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverComponents])
|
|
4387
|
+
) === "islands" ? _chunkJHRJ5V2Fcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4335
4388
|
route,
|
|
4336
4389
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4337
4390
|
layouts.map((layout, index) => ({
|
|
4338
4391
|
pattern: layout.pattern,
|
|
4339
4392
|
modulePath: layout.modulePath,
|
|
4340
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4393
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _322 => _322[index], 'optionalAccess', _323 => _323.shouldHydrate]) === true,
|
|
4341
4394
|
// Manifest entries carry it; metadata read from source does not.
|
|
4342
|
-
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4343
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
4395
|
+
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _324 => _324[index], 'optionalAccess', _325 => _325.hasIsolatedClientBoundaries]) === true,
|
|
4396
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _326 => _326[index], 'optionalAccess', _327 => _327.islandStrategy]), () => ( null))
|
|
4344
4397
|
})),
|
|
4345
4398
|
server.config.root,
|
|
4346
4399
|
true
|
|
@@ -4397,7 +4450,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4397
4450
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4398
4451
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4399
4452
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4400
|
-
), () => (
|
|
4453
|
+
), () => ( _chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4401
4454
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4402
4455
|
request: targetRequest,
|
|
4403
4456
|
params: slot.params,
|
|
@@ -4443,15 +4496,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4443
4496
|
);
|
|
4444
4497
|
const projectRoot = server.config.root;
|
|
4445
4498
|
const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
4446
|
-
const renderPlan =
|
|
4499
|
+
const renderPlan = _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
4447
4500
|
pageShouldHydrate: shouldHydrate,
|
|
4448
4501
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4449
4502
|
islandStrategy: hydrationIslandStrategy,
|
|
4450
|
-
rendering:
|
|
4503
|
+
rendering: _chunkHRH7OKBQcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4451
4504
|
});
|
|
4452
4505
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4453
|
-
const layoutStartIndex =
|
|
4454
|
-
|
|
4506
|
+
const layoutStartIndex = _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
4507
|
+
_chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
4455
4508
|
destinationLayoutPatterns
|
|
4456
4509
|
);
|
|
4457
4510
|
const renderer = farmApp.getServerRenderer();
|
|
@@ -4461,13 +4514,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4461
4514
|
middlewareContext,
|
|
4462
4515
|
() => renderer.renderNavigationFragment({
|
|
4463
4516
|
PageComponent: routeModule.default,
|
|
4464
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
4517
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _328 => _328.default]),
|
|
4465
4518
|
pageProps: routeProps,
|
|
4466
4519
|
params,
|
|
4467
4520
|
layouts: layouts.map((layout, index) => ({
|
|
4468
4521
|
pattern: layout.pattern,
|
|
4469
4522
|
module: layoutModules[index],
|
|
4470
|
-
serverTree: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4523
|
+
serverTree: _optionalChain([layoutHydrationMetadata, 'access', _329 => _329[index], 'optionalAccess', _330 => _330.serverTree])
|
|
4471
4524
|
})),
|
|
4472
4525
|
layoutStartIndex,
|
|
4473
4526
|
slots: routeSlots.map((slot) => ({
|
|
@@ -4533,7 +4586,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4533
4586
|
{
|
|
4534
4587
|
status: 200,
|
|
4535
4588
|
headers: {
|
|
4536
|
-
"Cache-Control":
|
|
4589
|
+
"Cache-Control": _chunkNEKO3HM2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
4537
4590
|
"X-Farm-Navigation": "html-fragment",
|
|
4538
4591
|
Vary: "X-Farm-Layout-Chain",
|
|
4539
4592
|
[_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
@@ -4575,14 +4628,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4575
4628
|
trustProxy: currentServerConfig.trustProxy
|
|
4576
4629
|
}).pathname;
|
|
4577
4630
|
const routeManager2 = farmApp.getRouteManager();
|
|
4578
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4579
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4580
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4631
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _331 => _331.hasHook, 'call', _332 => _332("beforeRequest")]), () => ( false));
|
|
4632
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _333 => _333.hasHook, 'call', _334 => _334("afterResponse")]), () => ( false));
|
|
4633
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasHook, 'call', _336 => _336("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("afterRender")]), () => ( false)));
|
|
4581
4634
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4582
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4635
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasRuntimeHook, 'call', _340 => _340("after")]), () => ( false));
|
|
4583
4636
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4584
4637
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4585
|
-
const mcpLabel =
|
|
4638
|
+
const mcpLabel = _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4586
4639
|
if (mcpLabel) return mcpLabel;
|
|
4587
4640
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4588
4641
|
return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4591,13 +4644,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4591
4644
|
const match = routeManager2.matchRoute(pathname2);
|
|
4592
4645
|
return {
|
|
4593
4646
|
kind: "page",
|
|
4594
|
-
route:
|
|
4647
|
+
route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
|
|
4595
4648
|
{
|
|
4596
4649
|
pathname: pathname2,
|
|
4597
|
-
pattern: _optionalChain([match, 'optionalAccess',
|
|
4598
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4650
|
+
pattern: _optionalChain([match, 'optionalAccess', _341 => _341.route, 'optionalAccess', _342 => _342.pattern]) || null,
|
|
4651
|
+
params: _optionalChain([match, 'optionalAccess', _343 => _343.params]) || {}
|
|
4599
4652
|
},
|
|
4600
|
-
_optionalChain([match, 'optionalAccess',
|
|
4653
|
+
_optionalChain([match, 'optionalAccess', _344 => _344.route]) ? null : pageBuiltInRouteLabel(pathname2)
|
|
4601
4654
|
)
|
|
4602
4655
|
};
|
|
4603
4656
|
};
|
|
@@ -4677,7 +4730,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4677
4730
|
}) : void 0;
|
|
4678
4731
|
let middlewareFailed = false;
|
|
4679
4732
|
try {
|
|
4680
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4733
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _345 => _345.hasMiddleware, 'call', _346 => _346()])) {
|
|
4681
4734
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
4682
4735
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
4683
4736
|
farmApp.getServerRenderer(),
|
|
@@ -4690,7 +4743,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4690
4743
|
throw error;
|
|
4691
4744
|
});
|
|
4692
4745
|
if (handled) {
|
|
4693
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4746
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _347 => _347.isEnded, 'call', _348 => _348()])) {
|
|
4694
4747
|
const duration = Date.now() - startTime;
|
|
4695
4748
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4696
4749
|
}
|
|
@@ -4705,8 +4758,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4705
4758
|
res
|
|
4706
4759
|
);
|
|
4707
4760
|
}
|
|
4708
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
4709
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4761
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _349 => _349.isEnded, 'call', _350 => _350()])) {
|
|
4762
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.isEnded, 'call', _352 => _352()])) {
|
|
4710
4763
|
const duration = Date.now() - startTime;
|
|
4711
4764
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4712
4765
|
}
|
|
@@ -4725,8 +4778,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4725
4778
|
await pm.reportRuntimeRequestError(runtimeSession, error);
|
|
4726
4779
|
} else {
|
|
4727
4780
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
4728
|
-
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4729
|
-
_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4781
|
+
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
|
|
4782
|
+
_optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.release, 'call', _356 => _356()]);
|
|
4730
4783
|
console.error("[FARM] Page error:", error);
|
|
4731
4784
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4732
4785
|
return;
|
|
@@ -4743,7 +4796,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4743
4796
|
}
|
|
4744
4797
|
})
|
|
4745
4798
|
);
|
|
4746
|
-
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access',
|
|
4799
|
+
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _357 => _357.stack, 'access', _358 => _358.at, 'call', _359 => _359(-1), 'optionalAccess', _360 => _360.handle]);
|
|
4747
4800
|
if (farmOwnsDevCors && viteServer.config.server.cors === false) {
|
|
4748
4801
|
farmMiddlewares.use(createFarmDevViteCorsMiddleware());
|
|
4749
4802
|
}
|
|
@@ -4772,7 +4825,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4772
4825
|
});
|
|
4773
4826
|
}
|
|
4774
4827
|
if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
|
|
4775
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
4828
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _361 => _361.getConfig, 'call', _362 => _362(), 'access', _363 => _363.root]) || _optionalChain([server, 'optionalAccess', _364 => _364.config, 'access', _365 => _365.root]) || options.root;
|
|
4776
4829
|
return this.resolve(id, path6.join(root, "package.json"), {
|
|
4777
4830
|
...resolveOptions,
|
|
4778
4831
|
skipSelf: true
|
|
@@ -4800,7 +4853,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4800
4853
|
}
|
|
4801
4854
|
},
|
|
4802
4855
|
async load(id, loadOptions) {
|
|
4803
|
-
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess',
|
|
4856
|
+
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _366 => _366.ssr]) && !farmSetupContext.getStore()) {
|
|
4804
4857
|
await pendingClientSetup;
|
|
4805
4858
|
}
|
|
4806
4859
|
if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
@@ -4818,8 +4871,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4818
4871
|
if (imageModule) return imageModule;
|
|
4819
4872
|
}
|
|
4820
4873
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4821
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
4822
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
4874
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4875
|
+
const root = _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
|
|
4823
4876
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4824
4877
|
return generateProgrammaticClientRouteModuleForId(
|
|
4825
4878
|
id,
|
|
@@ -4835,65 +4888,63 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4835
4888
|
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
4836
4889
|
}
|
|
4837
4890
|
if (isFarmClientVirtualId(id)) {
|
|
4838
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
4839
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4840
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4841
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4842
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4843
|
-
const adapterOwnsDocsRuntime =
|
|
4844
|
-
|
|
4845
|
-
);
|
|
4846
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _366 => _366.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4891
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _372 => _372.getConfig, 'call', _373 => _373()]);
|
|
4892
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4893
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.integrations]) || options.integrations;
|
|
4894
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.root]) || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
|
|
4895
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.docs]);
|
|
4896
|
+
const adapterOwnsDocsRuntime = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
|
|
4897
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4847
4898
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
4848
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4849
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4899
|
+
_optionalChain([docs, 'optionalAccess', _381 => _381.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
4900
|
+
_optionalChain([docs, 'optionalAccess', _382 => _382.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
4850
4901
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
4851
4902
|
]);
|
|
4852
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
4903
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _383 => _383.isFarmDocsSearchEnabled, 'call', _384 => _384(docs)]), () => ( false));
|
|
4853
4904
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
4854
4905
|
docsSearchEnabled,
|
|
4855
4906
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
4856
4907
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
4857
4908
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4858
|
-
const generatedDevIndicatorsClientRuntime = farmApp ?
|
|
4859
|
-
const integrationProviders =
|
|
4860
|
-
const isolatedHydrationMode =
|
|
4861
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4909
|
+
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4910
|
+
const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
|
|
4911
|
+
const isolatedHydrationMode = _chunkEFI6QWBQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4912
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.isolatedClientHydration]),
|
|
4862
4913
|
{
|
|
4863
|
-
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4914
|
+
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
|
|
4864
4915
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
4865
4916
|
}
|
|
4866
4917
|
);
|
|
4867
4918
|
return generateClientCode(
|
|
4868
4919
|
integrationProviders,
|
|
4869
4920
|
[
|
|
4870
|
-
...
|
|
4871
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
4921
|
+
..._chunkB3HQTGXScjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
4922
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _389 => _389.getFarmDocsDocumentNavigationMatchers, 'call', _390 => _390(docs)]), () => ( []))
|
|
4872
4923
|
],
|
|
4873
4924
|
generatedDocsSearchRuntime,
|
|
4874
4925
|
`${generatedDevtoolsClientRuntime}
|
|
4875
4926
|
${generatedDevIndicatorsClientRuntime}`,
|
|
4876
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4927
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.plugins]) || [],
|
|
4877
4928
|
root,
|
|
4878
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4879
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4880
|
-
|
|
4929
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _392 => _392.srcDir]) || options.srcDir || "src",
|
|
4930
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
4931
|
+
adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _394 => _394.adapter])) : void 0,
|
|
4881
4932
|
renderer,
|
|
4882
|
-
isolatedHydrationMode === "enabled" ||
|
|
4883
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4884
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4885
|
-
|
|
4886
|
-
|
|
4933
|
+
isolatedHydrationMode === "enabled" || _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _395 => _395.getRouteManager, 'call', _396 => _396(), 'access', _397 => _397.getIsolatedClientBoundaryModules, 'call', _398 => _398(root)])))), 'optionalAccess', _399 => _399.size]) > 0,
|
|
4934
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.trailingSlash]), () => ( false)),
|
|
4935
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.basePath]), () => ( "/")),
|
|
4936
|
+
_chunkJHRJ5V2Fcjs.generateClientCachePersistenceCode.call(void 0,
|
|
4937
|
+
_chunkJHRJ5V2Fcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
|
|
4887
4938
|
),
|
|
4888
|
-
|
|
4889
|
-
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4939
|
+
adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4940
|
+
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
|
|
4890
4941
|
);
|
|
4891
4942
|
}
|
|
4892
4943
|
if (id === "/@farm/server") {
|
|
4893
4944
|
return generateServerCode();
|
|
4894
4945
|
}
|
|
4895
4946
|
if (id === "/@farm/manifest") {
|
|
4896
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
4947
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406()]);
|
|
4897
4948
|
if (!routeManager) {
|
|
4898
4949
|
return `
|
|
4899
4950
|
export const getManifest = () => ({
|
|
@@ -4905,11 +4956,11 @@ export const getManifest = () => ({
|
|
|
4905
4956
|
});
|
|
4906
4957
|
`;
|
|
4907
4958
|
}
|
|
4908
|
-
const globalStylesheetHref =
|
|
4959
|
+
const globalStylesheetHref = _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4909
4960
|
server.config.root,
|
|
4910
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4961
|
+
_optionalChain([farmApp, 'optionalAccess', _407 => _407.getConfig, 'call', _408 => _408(), 'access', _409 => _409.srcDir])
|
|
4911
4962
|
);
|
|
4912
|
-
const fullManifest =
|
|
4963
|
+
const fullManifest = _chunkJHRJ5V2Fcjs.createFarmDevClientManifest.call(void 0,
|
|
4913
4964
|
routeManager.generateClientManifest(server.config.root),
|
|
4914
4965
|
{
|
|
4915
4966
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -4925,64 +4976,64 @@ export { manifest };
|
|
|
4925
4976
|
}
|
|
4926
4977
|
},
|
|
4927
4978
|
async transform(code, id, transformOptions) {
|
|
4928
|
-
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess',
|
|
4979
|
+
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) && !farmSetupContext.getStore()) {
|
|
4929
4980
|
await pendingClientSetup;
|
|
4930
4981
|
}
|
|
4931
|
-
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess',
|
|
4932
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4982
|
+
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
4983
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _412 => _412.getConfig, 'call', _413 => _413()]), () => ( options));
|
|
4933
4984
|
let rewrotePackageImports = false;
|
|
4934
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
4985
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, code)) {
|
|
4935
4986
|
const file = id.split("?", 1)[0];
|
|
4936
|
-
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
4987
|
+
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
|
|
4937
4988
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
4938
4989
|
const rewrite = () => {
|
|
4939
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4990
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
|
|
4940
4991
|
if (farmReactServerFiles.has(file)) {
|
|
4941
|
-
for (const child of
|
|
4992
|
+
for (const child of _chunkEFI6QWBQcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
4942
4993
|
farmReactServerFiles.add(child);
|
|
4943
4994
|
}
|
|
4944
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
4995
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkEFI6QWBQcjs.getFarmClientReachableModules.call(void 0,
|
|
4945
4996
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
4946
4997
|
projectRoot
|
|
4947
4998
|
).has(path6.resolve(file));
|
|
4948
|
-
const reactServer = !serverModule ? null :
|
|
4999
|
+
const reactServer = !serverModule ? null : _chunkEFI6QWBQcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
4949
5000
|
code,
|
|
4950
5001
|
file,
|
|
4951
|
-
reference: (specifier, exportName) =>
|
|
5002
|
+
reference: (specifier, exportName) => _chunkEFI6QWBQcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
4952
5003
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
4953
5004
|
});
|
|
4954
5005
|
if (reactServer !== null) {
|
|
4955
5006
|
code = reactServer;
|
|
4956
5007
|
rewrotePackageImports = true;
|
|
4957
5008
|
}
|
|
4958
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5009
|
+
const internal = farmReactServerFiles.has(file) ? _chunkEFI6QWBQcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
4959
5010
|
code,
|
|
4960
5011
|
file,
|
|
4961
|
-
reference: (clientFile) =>
|
|
5012
|
+
reference: (clientFile) => _chunkEFI6QWBQcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
4962
5013
|
}) : null;
|
|
4963
5014
|
if (internal !== null) {
|
|
4964
5015
|
code = internal;
|
|
4965
5016
|
rewrotePackageImports = true;
|
|
4966
5017
|
}
|
|
4967
5018
|
}
|
|
4968
|
-
const rewritePackageImports = (source2) =>
|
|
5019
|
+
const rewritePackageImports = (source2) => _chunkEFI6QWBQcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
4969
5020
|
code: source2,
|
|
4970
5021
|
file,
|
|
4971
5022
|
root: projectRoot,
|
|
4972
|
-
isClientPackage: (specifier) =>
|
|
5023
|
+
isClientPackage: (specifier) => _chunkEFI6QWBQcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
4973
5024
|
});
|
|
4974
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5025
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _420 => _420.getRouteManager, 'call', _421 => _421()]);
|
|
4975
5026
|
const source = code;
|
|
4976
5027
|
const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
|
|
4977
5028
|
if (referenced !== null) {
|
|
4978
5029
|
code = referenced;
|
|
4979
5030
|
rewrotePackageImports = true;
|
|
4980
5031
|
}
|
|
4981
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5032
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true) {
|
|
4982
5033
|
const cached = rewriteFarmReactCacheImport(
|
|
4983
5034
|
code,
|
|
4984
5035
|
file,
|
|
4985
|
-
_optionalChain([runtimeModule, 'optionalCall',
|
|
5036
|
+
_optionalChain([runtimeModule, 'optionalCall', _423 => _423(FARM_REACT_CACHE_MODULE)])
|
|
4986
5037
|
);
|
|
4987
5038
|
if (cached !== null) {
|
|
4988
5039
|
code = cached;
|
|
@@ -4990,12 +5041,12 @@ export { manifest };
|
|
|
4990
5041
|
}
|
|
4991
5042
|
}
|
|
4992
5043
|
};
|
|
4993
|
-
if (buildSnapshot)
|
|
5044
|
+
if (buildSnapshot) _chunkEFI6QWBQcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
4994
5045
|
else rewrite();
|
|
4995
5046
|
}
|
|
4996
5047
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
4997
5048
|
const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
4998
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
5049
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) === true ? "rsc" : "client"
|
|
4999
5050
|
});
|
|
5000
5051
|
if (serverFns) {
|
|
5001
5052
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
@@ -5008,8 +5059,8 @@ export { manifest };
|
|
|
5008
5059
|
const actionModule = transformFarmFormActionModule({
|
|
5009
5060
|
code,
|
|
5010
5061
|
id,
|
|
5011
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5012
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
5062
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _425 => _425.config, 'access', _426 => _426.root]) || process.cwd(),
|
|
5063
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) === true,
|
|
5013
5064
|
// Parsed by file type: page components are TSX.
|
|
5014
5065
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program,
|
|
5015
5066
|
runtimeModule,
|
|
@@ -5017,21 +5068,21 @@ export { manifest };
|
|
|
5017
5068
|
});
|
|
5018
5069
|
if (actionModule) return { code: actionModule, map: null };
|
|
5019
5070
|
}
|
|
5020
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5021
|
-
const docsConfigModule =
|
|
5022
|
-
if (
|
|
5023
|
-
const redacted =
|
|
5071
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
|
|
5072
|
+
const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
|
|
5073
|
+
if (_chunkJHRJ5V2Fcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5074
|
+
const redacted = _chunkJHRJ5V2Fcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5024
5075
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5025
5076
|
}
|
|
5026
5077
|
}
|
|
5027
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5028
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5029
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
5078
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
|
|
5079
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434()]), () => ( options));
|
|
5080
|
+
if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5030
5081
|
const violation = findClientServerFnViolation(code, id);
|
|
5031
5082
|
if (violation) {
|
|
5032
|
-
const locate =
|
|
5083
|
+
const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5033
5084
|
this.error(
|
|
5034
|
-
|
|
5085
|
+
_chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
|
|
5035
5086
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5036
5087
|
currentConfig.root
|
|
5037
5088
|
)
|
|
@@ -5039,8 +5090,8 @@ export { manifest };
|
|
|
5039
5090
|
}
|
|
5040
5091
|
}
|
|
5041
5092
|
}
|
|
5042
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5043
|
-
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5093
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _437 => _437.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
5094
|
+
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _438 => _438.getConfig, 'call', _439 => _439()]), () => ( options)));
|
|
5044
5095
|
}
|
|
5045
5096
|
if (typeof imageImports.transform === "function") {
|
|
5046
5097
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -5055,13 +5106,13 @@ export { manifest };
|
|
|
5055
5106
|
id,
|
|
5056
5107
|
transformOptions
|
|
5057
5108
|
);
|
|
5058
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
5109
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _440 => _440.code, 'optionalAccess', _441 => _441.toString, 'call', _442 => _442()]);
|
|
5059
5110
|
if (fontCode) {
|
|
5060
5111
|
transformedCode = fontCode;
|
|
5061
5112
|
transformed = true;
|
|
5062
5113
|
}
|
|
5063
5114
|
}
|
|
5064
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5115
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) && server) {
|
|
5065
5116
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
5066
5117
|
code: transformedCode,
|
|
5067
5118
|
id,
|
|
@@ -5073,26 +5124,26 @@ export { manifest };
|
|
|
5073
5124
|
transformed = true;
|
|
5074
5125
|
}
|
|
5075
5126
|
}
|
|
5076
|
-
if (
|
|
5127
|
+
if (_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5077
5128
|
const clientBoundarySource = transformedCode;
|
|
5078
5129
|
const moduleInfo = this.getModuleInfo(id);
|
|
5079
5130
|
if (moduleInfo) {
|
|
5080
5131
|
moduleInfo.isClientComponent = true;
|
|
5081
5132
|
}
|
|
5082
|
-
transformedCode =
|
|
5133
|
+
transformedCode = _chunkEFI6QWBQcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5083
5134
|
transformed = true;
|
|
5084
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5135
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
|
|
5085
5136
|
let isolatedModuleReference = null;
|
|
5086
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5137
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
|
|
5087
5138
|
const cleanId = id.split("?", 1)[0];
|
|
5088
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
5089
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
5090
|
-
if (
|
|
5091
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5139
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
|
|
5140
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
|
|
5141
|
+
if (_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkEFI6QWBQcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5142
|
+
cleanId.replace(/\\/g, "/").includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5092
5143
|
isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5093
|
-
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access',
|
|
5094
|
-
const explicitStrategy =
|
|
5095
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5144
|
+
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
|
|
5145
|
+
const explicitStrategy = _chunkEFI6QWBQcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5146
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkJHRJ5V2Fcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5096
5147
|
if (inference) {
|
|
5097
5148
|
for (const file of inference.files) {
|
|
5098
5149
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5105,8 +5156,8 @@ export { manifest };
|
|
|
5105
5156
|
islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
|
|
5106
5157
|
parse: (source) => this.parse(source),
|
|
5107
5158
|
slots: islandsMode,
|
|
5108
|
-
browser: _optionalChain([transformOptions, 'optionalAccess',
|
|
5109
|
-
inferredInteraction: _optionalChain([inference, 'optionalAccess',
|
|
5159
|
+
browser: _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) !== true,
|
|
5160
|
+
inferredInteraction: _optionalChain([inference, 'optionalAccess', _457 => _457.strategy]) === "interaction",
|
|
5110
5161
|
runtimeModule
|
|
5111
5162
|
});
|
|
5112
5163
|
if (!transformedBoundary) {
|
|
@@ -5137,7 +5188,7 @@ export { manifest };
|
|
|
5137
5188
|
);
|
|
5138
5189
|
return;
|
|
5139
5190
|
}` : "";
|
|
5140
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
5191
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
5141
5192
|
if (import.meta.hot) {
|
|
5142
5193
|
import.meta.hot.accept((newModule) => {
|
|
5143
5194
|
${isolatedHmrUpdate}
|
|
@@ -5193,14 +5244,14 @@ if (import.meta.hot) {
|
|
|
5193
5244
|
}
|
|
5194
5245
|
_chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
5195
5246
|
_chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
|
|
5196
|
-
const outDir = path6.join(_optionalChain([server, 'optionalAccess',
|
|
5247
|
+
const outDir = path6.join(_optionalChain([server, 'optionalAccess', _459 => _459.config, 'access', _460 => _460.root]) || process.cwd(), options.outDir || "dist");
|
|
5197
5248
|
const clientDir = path6.join(outDir, "client");
|
|
5198
5249
|
for (const page of ssgPages) {
|
|
5199
5250
|
try {
|
|
5200
5251
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
5201
5252
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
5202
5253
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
5203
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
5254
|
+
if (!_optionalChain([mod, 'optionalAccess', _461 => _461.default])) return;
|
|
5204
5255
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
5205
5256
|
const layoutModules = await Promise.all(
|
|
5206
5257
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -5232,7 +5283,7 @@ if (import.meta.hot) {
|
|
|
5232
5283
|
const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
5233
5284
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
5234
5285
|
const fullHtml = `<!DOCTYPE html>
|
|
5235
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
5286
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _462 => _462.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
5236
5287
|
<head>
|
|
5237
5288
|
<meta charset="utf-8">
|
|
5238
5289
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -5277,12 +5328,12 @@ if (import.meta.hot) {
|
|
|
5277
5328
|
watchChange(id, change) {
|
|
5278
5329
|
const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
|
|
5279
5330
|
if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
|
|
5280
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
5331
|
+
_optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464(), 'access', _465 => _465.noteSourceChange, 'call', _466 => _466(id, change.event)]);
|
|
5281
5332
|
}
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5333
|
+
_chunkEFI6QWBQcjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
5334
|
+
_chunkEFI6QWBQcjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
5335
|
+
_chunkJHRJ5V2Fcjs.invalidateFarmRouteRootInferences.call(void 0, );
|
|
5336
|
+
_chunkEFI6QWBQcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5286
5337
|
},
|
|
5287
5338
|
async handleHotUpdate(ctx) {
|
|
5288
5339
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5307,7 +5358,7 @@ if (import.meta.hot) {
|
|
|
5307
5358
|
server2.moduleGraph.invalidateModule(mod);
|
|
5308
5359
|
}
|
|
5309
5360
|
}
|
|
5310
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
5361
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _467 => _467.getConfig, 'call', _468 => _468()]);
|
|
5311
5362
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
5312
5363
|
const reloadAfterEdit = () => {
|
|
5313
5364
|
for (const files of pendingRouteReloads) {
|
|
@@ -5315,10 +5366,10 @@ if (import.meta.hot) {
|
|
|
5315
5366
|
}
|
|
5316
5367
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5317
5368
|
};
|
|
5318
|
-
if (normalizedFile.includes(
|
|
5369
|
+
if (normalizedFile.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5319
5370
|
path6.posix.join(
|
|
5320
|
-
_chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5321
|
-
|
|
5371
|
+
_chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _469 => _469.root]) || options.root || server2.config.root),
|
|
5372
|
+
_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5322
5373
|
)
|
|
5323
5374
|
))
|
|
5324
5375
|
return modules;
|
|
@@ -5326,7 +5377,7 @@ if (import.meta.hot) {
|
|
|
5326
5377
|
(appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5327
5378
|
)) {
|
|
5328
5379
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5329
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5380
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
|
|
5330
5381
|
reloadAfterEdit();
|
|
5331
5382
|
return [];
|
|
5332
5383
|
}
|
|
@@ -5336,7 +5387,7 @@ if (import.meta.hot) {
|
|
|
5336
5387
|
for (const mod of modules) {
|
|
5337
5388
|
server2.moduleGraph.invalidateModule(mod);
|
|
5338
5389
|
}
|
|
5339
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5390
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
|
|
5340
5391
|
reloadAfterEdit();
|
|
5341
5392
|
return [];
|
|
5342
5393
|
}
|
|
@@ -5346,22 +5397,22 @@ if (import.meta.hot) {
|
|
|
5346
5397
|
for (const mod of modules) {
|
|
5347
5398
|
server2.moduleGraph.invalidateModule(mod);
|
|
5348
5399
|
}
|
|
5349
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5400
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
|
|
5350
5401
|
reloadAfterEdit();
|
|
5351
5402
|
return [];
|
|
5352
5403
|
}
|
|
5353
5404
|
if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
5354
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5405
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
|
|
5355
5406
|
}
|
|
5356
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5357
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5407
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _474 => _474.experimental, 'optionalAccess', _475 => _475.isolatedClientHydration]);
|
|
5408
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _476 => _476.getRouteManager, 'call', _477 => _477()]);
|
|
5358
5409
|
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5359
|
-
const tracksAsyncOwnerIslands =
|
|
5410
|
+
const tracksAsyncOwnerIslands = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _478 => _478.renderer])) && planRouteManager !== void 0;
|
|
5360
5411
|
let clientPlanCurrent = false;
|
|
5361
5412
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5362
5413
|
const routeManager = planRouteManager;
|
|
5363
|
-
await _optionalChain([ctx, 'access',
|
|
5364
|
-
if (_optionalChain([routeManager, 'optionalAccess',
|
|
5414
|
+
await _optionalChain([ctx, 'access', _479 => _479.read, 'optionalCall', _480 => _480()]);
|
|
5415
|
+
if (_optionalChain([routeManager, 'optionalAccess', _481 => _481.isEditPlanNeutral, 'call', _482 => _482(file)])) {
|
|
5365
5416
|
clientPlanCurrent = true;
|
|
5366
5417
|
} else if (routeManager) {
|
|
5367
5418
|
routeManager.noteSourceChange(file, "update");
|
|
@@ -5405,7 +5456,8 @@ if (import.meta.hot) {
|
|
|
5405
5456
|
}
|
|
5406
5457
|
}
|
|
5407
5458
|
}
|
|
5408
|
-
|
|
5459
|
+
const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _483 => _483.getRouteManager, 'call', _484 => _484(), 'access', _485 => _485.isRendererRouteModule, 'call', _486 => _486(normalizedFile)]) === true;
|
|
5460
|
+
if (normalizedFile.includes("/app/") || rendererRouteFile) {
|
|
5409
5461
|
if (normalizedFile.includes("middleware.")) {
|
|
5410
5462
|
if (middlewareManager) {
|
|
5411
5463
|
await middlewareManager.reload();
|
|
@@ -5422,12 +5474,12 @@ if (import.meta.hot) {
|
|
|
5422
5474
|
}
|
|
5423
5475
|
return [];
|
|
5424
5476
|
}
|
|
5425
|
-
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess',
|
|
5477
|
+
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _487 => _487.getRouteManager, 'call', _488 => _488(), 'access', _489 => _489.invalidateClientManifest, 'call', _490 => _490()]);
|
|
5426
5478
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
5427
5479
|
if (manifestModule) {
|
|
5428
5480
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
5429
5481
|
}
|
|
5430
|
-
if (normalizedFile.includes("page.") || normalizedFile.includes("layout.")) {
|
|
5482
|
+
if (normalizedFile.includes("page.") || normalizedFile.includes("layout.") || rendererRouteFile) {
|
|
5431
5483
|
const shortPath = normalizedFile.split("/app/")[1] || normalizedFile;
|
|
5432
5484
|
logUpdate("PAGE", `updated ${shortPath}`);
|
|
5433
5485
|
for (const mod of modules) {
|
|
@@ -5437,7 +5489,7 @@ if (import.meta.hot) {
|
|
|
5437
5489
|
return [];
|
|
5438
5490
|
}
|
|
5439
5491
|
}
|
|
5440
|
-
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access',
|
|
5492
|
+
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _491 => _491.environments, 'access', _492 => _492.client, 'optionalAccess', _493 => _493.moduleGraph, 'access', _494 => _494.getModulesByFile, 'call', _495 => _495(normalizedFile), 'optionalAccess', _496 => _496.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
|
|
5441
5493
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5442
5494
|
reloadAfterEdit();
|
|
5443
5495
|
return [];
|
|
@@ -5535,7 +5587,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5535
5587
|
return (...args) => {
|
|
5536
5588
|
if (captures(target.statusCode, target.getHeader("location"))) {
|
|
5537
5589
|
const callback = args.find((arg) => typeof arg === "function");
|
|
5538
|
-
_optionalChain([callback, 'optionalCall',
|
|
5590
|
+
_optionalChain([callback, 'optionalCall', _497 => _497()]);
|
|
5539
5591
|
return property === "write" ? true : response;
|
|
5540
5592
|
}
|
|
5541
5593
|
return target[property](...args);
|
|
@@ -5580,7 +5632,7 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
|
|
|
5580
5632
|
if (fs2.realpathSync(farmRoot) === fs2.realpathSync(viteRoot)) {
|
|
5581
5633
|
return path6.resolve(viteRoot);
|
|
5582
5634
|
}
|
|
5583
|
-
} catch (
|
|
5635
|
+
} catch (e28) {
|
|
5584
5636
|
}
|
|
5585
5637
|
return farmRoot;
|
|
5586
5638
|
}
|
|
@@ -5599,12 +5651,12 @@ function isFarmClientVirtualId(id) {
|
|
|
5599
5651
|
}
|
|
5600
5652
|
function isClientEnvironment(context, loadOptions) {
|
|
5601
5653
|
const environment = context.environment;
|
|
5602
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5603
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5604
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
5654
|
+
if (_optionalChain([environment, 'optionalAccess', _498 => _498.config, 'optionalAccess', _499 => _499.consumer])) return environment.config.consumer === "client";
|
|
5655
|
+
if (_optionalChain([environment, 'optionalAccess', _500 => _500.name])) return environment.name === "client";
|
|
5656
|
+
return _optionalChain([loadOptions, 'optionalAccess', _501 => _501.ssr]) !== true;
|
|
5605
5657
|
}
|
|
5606
5658
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
5607
|
-
const graph = _optionalChain([server, 'access',
|
|
5659
|
+
const graph = _optionalChain([server, 'access', _502 => _502.environments, 'optionalAccess', _503 => _503.client, 'optionalAccess', _504 => _504.moduleGraph]);
|
|
5608
5660
|
if (!graph) return;
|
|
5609
5661
|
for (const [id, module] of graph.idToModuleMap) {
|
|
5610
5662
|
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
@@ -5614,27 +5666,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5614
5666
|
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5615
5667
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5616
5668
|
watchFile(routesFile);
|
|
5617
|
-
return
|
|
5669
|
+
return _chunkEFI6QWBQcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5618
5670
|
kind: parsed.kind,
|
|
5619
5671
|
routePath: parsed.routePath,
|
|
5620
5672
|
routesFile,
|
|
5621
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
5622
|
-
|
|
5673
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _505 => _505.routes, 'access', _506 => _506.get, 'call', _507 => _507(
|
|
5674
|
+
_chunkEFI6QWBQcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5623
5675
|
)]),
|
|
5624
5676
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5625
|
-
rendererClient:
|
|
5677
|
+
rendererClient: _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
5626
5678
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5627
5679
|
});
|
|
5628
5680
|
}
|
|
5629
5681
|
function resolveRealModuleFile(filePath, root) {
|
|
5630
|
-
const resolved = _nullishCoalesce(
|
|
5682
|
+
const resolved = _nullishCoalesce(_chunkEFI6QWBQcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5631
5683
|
try {
|
|
5632
5684
|
return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5633
|
-
} catch (
|
|
5685
|
+
} catch (e29) {
|
|
5634
5686
|
return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
|
|
5635
5687
|
}
|
|
5636
5688
|
}
|
|
5637
|
-
function generateProgrammaticRouteModule(moduleId, root, renderer =
|
|
5689
|
+
function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkNGTZHWBGcjs.REACT_RENDERER) {
|
|
5638
5690
|
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5639
5691
|
if (!parsed) {
|
|
5640
5692
|
return "";
|
|
@@ -5941,12 +5993,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
5941
5993
|
}
|
|
5942
5994
|
const schemas = routeModule.__farmRouteSchemas;
|
|
5943
5995
|
const params = parseRouteModuleSchema(
|
|
5944
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
5996
|
+
_optionalChain([schemas, 'optionalAccess', _508 => _508.params]),
|
|
5945
5997
|
input.props.params,
|
|
5946
5998
|
"params",
|
|
5947
5999
|
input.routePath
|
|
5948
6000
|
);
|
|
5949
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
6001
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _509 => _509.search]), input.search, "search", input.routePath);
|
|
5950
6002
|
return {
|
|
5951
6003
|
...input.props,
|
|
5952
6004
|
params,
|
|
@@ -5965,20 +6017,20 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
5965
6017
|
throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
|
|
5966
6018
|
}
|
|
5967
6019
|
}
|
|
5968
|
-
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0,
|
|
5969
|
-
const providerClientCode =
|
|
6020
|
+
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkNGTZHWBGcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
6021
|
+
const providerClientCode = _chunkJHRJ5V2Fcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
5970
6022
|
integrationProviders,
|
|
5971
6023
|
root,
|
|
5972
6024
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
5973
6025
|
);
|
|
5974
|
-
const clientPluginEntry =
|
|
6026
|
+
const clientPluginEntry = _chunkDMSXZNQRcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
5975
6027
|
plugins,
|
|
5976
6028
|
root,
|
|
5977
6029
|
srcDir,
|
|
5978
6030
|
publicRuntimeConfig
|
|
5979
6031
|
);
|
|
5980
|
-
const appSetupPath =
|
|
5981
|
-
const rendererClientImports =
|
|
6032
|
+
const appSetupPath = _chunkNGTZHWBGcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
6033
|
+
const rendererClientImports = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
|
|
5982
6034
|
import { hydrateRoot, createRoot } from 'react-dom/client'
|
|
5983
6035
|
import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
|
|
5984
6036
|
// Named exports only: a renderer's client module needs no default export. `React` is a
|
|
@@ -5993,9 +6045,11 @@ import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
|
|
|
5993
6045
|
const React = { ...__farmRendererClient }`
|
|
5994
6046
|
);
|
|
5995
6047
|
const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
|
|
5996
|
-
const docsAdapterImportBlock =
|
|
5997
|
-
|
|
5998
|
-
docsConfigModule
|
|
6048
|
+
const docsAdapterImportBlock = _chunkXJDB564Acjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
6049
|
+
docsAdapterUI,
|
|
6050
|
+
docsConfigModule,
|
|
6051
|
+
// Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
|
|
6052
|
+
_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
|
|
5999
6053
|
);
|
|
6000
6054
|
const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
|
|
6001
6055
|
ReactRuntime: React,
|
|
@@ -6030,7 +6084,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6030
6084
|
return null;
|
|
6031
6085
|
}
|
|
6032
6086
|
}
|
|
6033
|
-
${islandValues ? `${
|
|
6087
|
+
${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6034
6088
|
let farmLastRouteState = null;
|
|
6035
6089
|
|
|
6036
6090
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -6871,7 +6925,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
6871
6925
|
return loadedLayouts;
|
|
6872
6926
|
}
|
|
6873
6927
|
|
|
6874
|
-
${
|
|
6928
|
+
${_chunkJHRJ5V2Fcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
6875
6929
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
6876
6930
|
let wrapped = element;
|
|
6877
6931
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -6950,7 +7004,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
|
|
|
6950
7004
|
|
|
6951
7005
|
function hydrateFarmRoute(container, route) {
|
|
6952
7006
|
farmLastRouteState = route;
|
|
6953
|
-
${
|
|
7007
|
+
${_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
|
|
6954
7008
|
}
|
|
6955
7009
|
|
|
6956
7010
|
function renderFarmRoute(root, route) {
|
|
@@ -7094,7 +7148,7 @@ async function tryHydrateImportedPage(
|
|
|
7094
7148
|
wrap: wrapFarmClientRouteGraph,
|
|
7095
7149
|
};
|
|
7096
7150
|
} else if (useHydrate && container?.id === '__farm_page__') {
|
|
7097
|
-
wrappedElement = wrapFarmClientRouteGraph(${
|
|
7151
|
+
wrappedElement = wrapFarmClientRouteGraph(${_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
|
|
7098
7152
|
} else {
|
|
7099
7153
|
wrappedElement = await buildWrappedHydrationElement(
|
|
7100
7154
|
currentPageComponent,
|
|
@@ -7114,6 +7168,8 @@ async function tryHydrateImportedPage(
|
|
|
7114
7168
|
window.__FARM_REACT_ROOT__ = reactRoot;
|
|
7115
7169
|
return true;
|
|
7116
7170
|
} catch (error) {
|
|
7171
|
+
// The page still works, but the server's DOM, focus, and typed input are gone, so say so.
|
|
7172
|
+
console.error('[Farm.js] Hydration error; rendering the page on the client instead:', error);
|
|
7117
7173
|
appRoot = createRoot(container);
|
|
7118
7174
|
if (routeState) renderFarmRoute(appRoot, routeState);
|
|
7119
7175
|
else appRoot.render(wrappedElement);
|
|
@@ -7169,7 +7225,7 @@ function readActiveLayoutPatterns() {
|
|
|
7169
7225
|
);
|
|
7170
7226
|
}
|
|
7171
7227
|
|
|
7172
|
-
${
|
|
7228
|
+
${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7173
7229
|
|
|
7174
7230
|
function activateFragmentScripts(root) {
|
|
7175
7231
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7228,7 +7284,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7228
7284
|
return shell.innerHTML;
|
|
7229
7285
|
}
|
|
7230
7286
|
|
|
7231
|
-
${islandValues ?
|
|
7287
|
+
${islandValues ? _chunkJHRJ5V2Fcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7232
7288
|
container,
|
|
7233
7289
|
fragment,
|
|
7234
7290
|
currentPatterns,
|
|
@@ -7250,6 +7306,8 @@ ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function repl
|
|
|
7250
7306
|
) {
|
|
7251
7307
|
sharedCount++;
|
|
7252
7308
|
}
|
|
7309
|
+
// After the comparison: a noscript turned to text serializes escaped in the template's document.
|
|
7310
|
+
adoptFarmParsedNodes(fragment);
|
|
7253
7311
|
|
|
7254
7312
|
const fragmentTreeRoot = nextPatterns.length > 0
|
|
7255
7313
|
? find(fragment, nextPatterns[0])
|
|
@@ -7301,9 +7359,9 @@ ${islandValues ? `
|
|
|
7301
7359
|
return nextTarget;
|
|
7302
7360
|
}
|
|
7303
7361
|
|
|
7304
|
-
${islandValues ? `${
|
|
7362
|
+
${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7305
7363
|
|
|
7306
|
-
${
|
|
7364
|
+
${_chunkJHRJ5V2Fcjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7307
7365
|
|
|
7308
7366
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7309
7367
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -7473,9 +7531,12 @@ async function streamFarmDevNavigation(stream, root, generation) {
|
|
|
7473
7531
|
observer.disconnect();
|
|
7474
7532
|
return stream.cancel();
|
|
7475
7533
|
}
|
|
7476
|
-
const parsed = new DOMParser()
|
|
7534
|
+
const parsed = new DOMParser()
|
|
7535
|
+
.parseFromString('<div id="root">' + flush, 'text/html')
|
|
7536
|
+
.getElementById('root');
|
|
7537
|
+
adoptFarmParsedNodes(parsed);
|
|
7477
7538
|
const fragment = document.createDocumentFragment();
|
|
7478
|
-
for (const node of Array.from(parsed.
|
|
7539
|
+
for (const node of Array.from(parsed.childNodes)) fragment.appendChild(node);
|
|
7479
7540
|
activateFragmentScripts(fragment);
|
|
7480
7541
|
root.appendChild(fragment);
|
|
7481
7542
|
}
|
|
@@ -7628,6 +7689,7 @@ async function renderPage(pageData, info) {
|
|
|
7628
7689
|
${isolatedHydrationEnabled ? "disposeFarmIsolatedClientBoundaries(container);" : ""}
|
|
7629
7690
|
if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
|
|
7630
7691
|
if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
|
|
7692
|
+
adoptFarmParsedNodes(fragment);
|
|
7631
7693
|
container.replaceChildren(fragment);
|
|
7632
7694
|
activateFragmentScripts(container);
|
|
7633
7695
|
} else {
|
|
@@ -8004,9 +8066,9 @@ function generateClientManifest(bundle) {
|
|
|
8004
8066
|
return manifest;
|
|
8005
8067
|
}
|
|
8006
8068
|
async function defineConfig(config = {}) {
|
|
8007
|
-
const tailwindVitePlugin = await
|
|
8069
|
+
const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
|
|
8008
8070
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
8009
|
-
if (_optionalChain([config, 'access',
|
|
8071
|
+
if (_optionalChain([config, 'access', _510 => _510.extends, 'optionalAccess', _511 => _511.length])) {
|
|
8010
8072
|
const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
|
|
8011
8073
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
8012
8074
|
root: appRoot,
|
|
@@ -8015,12 +8077,12 @@ async function defineConfig(config = {}) {
|
|
|
8015
8077
|
);
|
|
8016
8078
|
config = layeredConfig;
|
|
8017
8079
|
}
|
|
8018
|
-
config.renderer =
|
|
8019
|
-
config.images =
|
|
8020
|
-
const rendererVitePlugins = await
|
|
8080
|
+
config.renderer = _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8081
|
+
config.images = _chunkJHRJ5V2Fcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8082
|
+
const rendererVitePlugins = await _chunkNGTZHWBGcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8021
8083
|
ssr: true
|
|
8022
8084
|
});
|
|
8023
|
-
const reactRefreshPlugins =
|
|
8085
|
+
const reactRefreshPlugins = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
8024
8086
|
const nodeBuiltinStubs = {
|
|
8025
8087
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
8026
8088
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -8108,13 +8170,13 @@ async function defineConfig(config = {}) {
|
|
|
8108
8170
|
if (!serverStarted) {
|
|
8109
8171
|
serverStarted = true;
|
|
8110
8172
|
const elapsed = Date.now() - startTime;
|
|
8111
|
-
const address = _optionalChain([server, 'access',
|
|
8173
|
+
const address = _optionalChain([server, 'access', _512 => _512.httpServer, 'optionalAccess', _513 => _513.address, 'call', _514 => _514()]);
|
|
8112
8174
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
8113
8175
|
const hostConfig = server.config.server.host;
|
|
8114
8176
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8115
8177
|
console.log("");
|
|
8116
8178
|
console.log(
|
|
8117
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8179
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk3CZ4MJHWcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8118
8180
|
);
|
|
8119
8181
|
console.log("");
|
|
8120
8182
|
console.log(
|
|
@@ -8148,7 +8210,7 @@ async function defineConfig(config = {}) {
|
|
|
8148
8210
|
plugins: [
|
|
8149
8211
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8150
8212
|
_chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8151
|
-
|
|
8213
|
+
_chunkJHRJ5V2Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8152
8214
|
tailwindVitePlugin,
|
|
8153
8215
|
...rendererVitePlugins,
|
|
8154
8216
|
...reactRefreshPlugins,
|
|
@@ -8158,14 +8220,14 @@ async function defineConfig(config = {}) {
|
|
|
8158
8220
|
farmNavigationPlugin(config.renderer),
|
|
8159
8221
|
farmIslandContainersPlugin(config),
|
|
8160
8222
|
farmPlugin(config),
|
|
8161
|
-
|
|
8223
|
+
_chunkEFI6QWBQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8162
8224
|
farmBrandingPlugin
|
|
8163
8225
|
],
|
|
8164
8226
|
customLogger: farmLogger,
|
|
8165
8227
|
clearScreen: false,
|
|
8166
8228
|
optimizeDeps: {
|
|
8167
|
-
...
|
|
8168
|
-
|
|
8229
|
+
..._chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8230
|
+
_chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8169
8231
|
appRoot,
|
|
8170
8232
|
_chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8171
8233
|
),
|
|
@@ -8209,7 +8271,7 @@ async function defineConfig(config = {}) {
|
|
|
8209
8271
|
// Stub out problematic server-only modules during dev mode
|
|
8210
8272
|
alias: {
|
|
8211
8273
|
..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8212
|
-
...
|
|
8274
|
+
..._chunkJHRJ5V2Fcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8213
8275
|
// Nitro internals that should not be resolved in browser
|
|
8214
8276
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8215
8277
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|