@farm.js/core 0.1.67 → 0.1.69
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-DWyWkTSy.d.mts → agent-mcp.d-DOfBMEzP.d.mts} +1 -1
- package/dist/{agent-mcp.d-BFu9xHAi.d.ts → agent-mcp.d-DnIgriX1.d.ts} +1 -1
- package/dist/agent-runtime.d.mts +5 -3
- package/dist/agent-runtime.d.ts +5 -3
- package/dist/{analyzer-TTIIXXMQ.mjs → analyzer-NAL5TJUP.mjs} +2 -2
- package/dist/analyzer-SAJSV6SP.cjs +16 -0
- package/dist/api/node.d.mts +7 -5
- package/dist/api/node.d.ts +7 -5
- package/dist/api/route-manager.d.mts +7 -5
- package/dist/api/route-manager.d.ts +7 -5
- package/dist/api/runtime.d.mts +6 -4
- package/dist/api/runtime.d.ts +6 -4
- package/dist/api.cjs +2 -2
- package/dist/api.d.mts +8 -23
- package/dist/api.d.ts +8 -23
- package/dist/api.mjs +1 -1
- package/dist/{app-manifest.d-CwfhGrVR.d.ts → app-manifest.d-CaAcaukR.d.ts} +1 -1
- package/dist/{app-manifest.d-CRmjN5j9.d.mts → app-manifest.d-_BVbI0xp.d.mts} +1 -1
- package/dist/app-markdown.cjs +3 -3
- package/dist/app-markdown.d.mts +10 -10
- package/dist/app-markdown.d.ts +10 -10
- package/dist/app-markdown.mjs +2 -2
- package/dist/{app.d-BX9LVTiP.d.ts → app.d-BWeDqOaF.d.ts} +6 -6
- package/dist/{app.d-uBBUxwyV.d.mts → app.d-CaPwtytN.d.mts} +6 -6
- package/dist/{base-path.d-BOUV5ozD.d.mts → base-path.d-CTDVF0Fc.d.mts} +2 -1
- package/dist/{base-path.d-BOUV5ozD.d.ts → base-path.d-CTDVF0Fc.d.ts} +2 -1
- package/dist/{chunk-HM7AGSKU.cjs → chunk-22LGTSBA.cjs} +1 -1
- package/dist/{chunk-4JX3M4C6.cjs → chunk-23VJEGKC.cjs} +2 -1
- package/dist/{chunk-V5MQMQ2P.mjs → chunk-2P7UYHZP.mjs} +1 -1
- package/dist/{chunk-Q37INCXG.cjs → chunk-3EEINK7G.cjs} +11 -2
- package/dist/{chunk-BRWIVOV4.cjs → chunk-3GNHJ3RN.cjs} +10 -8
- package/dist/{chunk-QJVW76JG.mjs → chunk-3Y52TWYU.mjs} +2 -2
- package/dist/{chunk-OB3IFUK6.cjs → chunk-437QZIC2.cjs} +4 -4
- package/dist/{chunk-DCXSIEFE.cjs → chunk-4JRAMCUP.cjs} +59 -38
- package/dist/{chunk-Q5UX55YA.cjs → chunk-4W4ZWSV2.cjs} +887 -485
- package/dist/{chunk-JWSI5WO4.mjs → chunk-4ZXKYCYK.mjs} +1 -1
- package/dist/{chunk-N35YPV4N.mjs → chunk-57QAQU4F.mjs} +9 -7
- package/dist/{chunk-AQDLVHNF.mjs → chunk-5FBZJJGA.mjs} +17 -0
- package/dist/{chunk-HP2DQGQH.mjs → chunk-5TOWKGV3.mjs} +1 -1
- package/dist/{chunk-556H7JCE.cjs → chunk-6GQJVY4E.cjs} +32 -27
- package/dist/{chunk-PL6RTBDE.cjs → chunk-ABIBASLJ.cjs} +2 -2
- package/dist/{chunk-H37MDCPR.mjs → chunk-ANMIR6US.mjs} +1 -1
- package/dist/{chunk-DQJ2CIH7.cjs → chunk-ASYOWPSR.cjs} +2 -1
- package/dist/{chunk-QGJ4FI2G.mjs → chunk-C6HGUTXB.mjs} +113 -29
- package/dist/{chunk-UHNSY2PQ.mjs → chunk-CKCKCUYO.mjs} +826 -424
- package/dist/{chunk-IRA2CZAY.mjs → chunk-CRVSYDHV.mjs} +2 -2
- package/dist/{chunk-2ZOYOYEE.mjs → chunk-D5F7RPZP.mjs} +71 -1
- package/dist/{chunk-N5DQMOAG.cjs → chunk-DHR2WDSL.cjs} +275 -92
- package/dist/{chunk-QGQP6QKO.cjs → chunk-DWLNLU55.cjs} +2 -2
- package/dist/{chunk-52Y3C3HG.mjs → chunk-E7VF3LQ5.mjs} +3 -2
- package/dist/{chunk-V5RTHYJB.cjs → chunk-F6YLXK5L.cjs} +93 -25
- package/dist/{chunk-HNVAZGQD.cjs → chunk-FJMC24KG.cjs} +2 -2
- package/dist/{chunk-KCY52OUQ.cjs → chunk-FSODPZRT.cjs} +1 -1
- package/dist/{chunk-PPX7UOFY.cjs → chunk-FVYBEMOD.cjs} +55 -38
- package/dist/{chunk-6YBYX4K4.mjs → chunk-G7NBPP7H.mjs} +1 -1
- package/dist/{chunk-HFHJJXSV.mjs → chunk-GFPS7MNE.mjs} +1 -1
- package/dist/{chunk-LPIZMU7D.cjs → chunk-GQ6QOH7T.cjs} +9 -5
- package/dist/{chunk-BZWTBELF.cjs → chunk-GTQOEEE7.cjs} +77 -7
- package/dist/{chunk-6V5YWI4W.cjs → chunk-GUMKIQJL.cjs} +2 -2
- package/dist/{chunk-3T5TLFCQ.mjs → chunk-HEJM46HQ.mjs} +11 -2
- package/dist/{chunk-F43OG25P.cjs → chunk-I7J5RLGO.cjs} +15 -1
- package/dist/chunk-ICFPTHXM.mjs +97 -0
- package/dist/{chunk-WGHY3OL5.mjs → chunk-IYLZZTP6.mjs} +233 -50
- package/dist/{chunk-WUTFJOV7.cjs → chunk-JFPKARWM.cjs} +16 -8
- package/dist/{chunk-TEG6HJVF.mjs → chunk-JL2YW5KX.mjs} +1 -0
- package/dist/{chunk-23PVOIPT.cjs → chunk-L5OZN6YW.cjs} +3 -3
- package/dist/{chunk-QITSS4TD.cjs → chunk-L6NWQ3DR.cjs} +537 -356
- package/dist/{chunk-3T7ALZJF.cjs → chunk-LR4KP3I7.cjs} +2 -2
- package/dist/{chunk-CO3YMZFD.mjs → chunk-MAGFDK4Q.mjs} +1 -1
- package/dist/{chunk-VFXE6NWR.mjs → chunk-MGKWYPE3.mjs} +2 -1
- package/dist/{chunk-5TA63JD3.mjs → chunk-MGZVDX4R.mjs} +1 -1
- package/dist/{chunk-6SQZXRJ2.cjs → chunk-MMDKYJ5V.cjs} +7 -7
- package/dist/{chunk-5Y2P454O.cjs → chunk-MTBDJ326.cjs} +6 -5
- package/dist/{chunk-XUES6OET.mjs → chunk-MV7NWU23.mjs} +1 -1
- package/dist/{chunk-4IHMHFQB.cjs → chunk-NG2EZ6QS.cjs} +28 -1
- package/dist/{chunk-F7JKVHU2.mjs → chunk-NVOMQLI2.mjs} +15 -1
- package/dist/{chunk-5IQ2ERQA.cjs → chunk-O47W53D3.cjs} +1 -1
- package/dist/{chunk-22IWL4YD.cjs → chunk-OCNV4CI2.cjs} +21 -2
- package/dist/{chunk-3TXKFRSO.mjs → chunk-OEL5EPOJ.mjs} +1 -1
- package/dist/{chunk-E6CD45JK.mjs → chunk-PDQ6EGPK.mjs} +26 -5
- package/dist/{chunk-VK54PDQ6.mjs → chunk-PEYDQMSA.mjs} +86 -18
- package/dist/{chunk-KSZK34HU.mjs → chunk-PJQ5W356.mjs} +16 -8
- package/dist/{chunk-72KCTHLV.cjs → chunk-PRL7FXG4.cjs} +113 -29
- package/dist/{chunk-JSOCDYER.cjs → chunk-Q4HH5Q6A.cjs} +15 -1
- package/dist/{chunk-YVTS3S3F.cjs → chunk-QOGIZKSO.cjs} +3 -3
- package/dist/{chunk-DB2HSHQA.cjs → chunk-QSUYB3RH.cjs} +14 -14
- package/dist/{chunk-724MGMIL.mjs → chunk-R2ZHU37O.mjs} +19 -0
- package/dist/{chunk-YQYTQJZN.mjs → chunk-RLH5AH2M.mjs} +1 -1
- package/dist/{chunk-WDD5CTZW.mjs → chunk-SZORL7EW.mjs} +24 -19
- package/dist/{chunk-6R53ZWX2.cjs → chunk-TKYOJ5G2.cjs} +3 -3
- package/dist/{chunk-XNZWMXCF.mjs → chunk-UHU4QALN.mjs} +330 -149
- package/dist/{chunk-J7JHVCWA.cjs → chunk-UKZ6AWKZ.cjs} +2 -1
- package/dist/{chunk-GTV2ABO7.mjs → chunk-ULMXZYOA.mjs} +162 -33
- package/dist/{chunk-4DRINDGN.cjs → chunk-VO65MYJD.cjs} +254 -125
- package/dist/chunk-W44X6IC2.cjs +97 -0
- package/dist/{chunk-UHE5JUKB.mjs → chunk-XCAQTCGK.mjs} +1 -1
- package/dist/{chunk-DGOFR7D5.cjs → chunk-Y6KHPJDB.cjs} +2 -2
- package/dist/{chunk-DXZ57EPE.mjs → chunk-YOHHL2UE.mjs} +14 -0
- package/dist/{chunk-KWFNUODD.mjs → chunk-YVPX5PI5.mjs} +1 -0
- package/dist/{chunk-HRPTMX5C.mjs → chunk-ZR2QB45W.mjs} +7 -3
- package/dist/{chunk-JVM3DKZE.mjs → chunk-ZYCEEE3V.mjs} +1 -1
- package/dist/{chunk-5FE5YT2N.mjs → chunk-ZZGQD3LL.mjs} +28 -1
- package/dist/{client-component.d-DWRKyAp5.d.ts → client-component.d-CfJxuXZl.d.ts} +2 -2
- package/dist/{client-component.d-CDRvRmbU.d.mts → client-component.d-CnEeVvGG.d.mts} +2 -2
- package/dist/{client-plugins.d-CrKZiNSN.d.ts → client-plugins.d-D7dHV1Nf.d.ts} +37 -236
- package/dist/{client-plugins.d-BNILjfX3.d.mts → client-plugins.d-Do5ULA0x.d.mts} +37 -236
- package/dist/client-plugins.d.mts +5 -3
- package/dist/client-plugins.d.ts +5 -3
- package/dist/client.cjs +6 -6
- package/dist/client.d.mts +10 -8
- package/dist/client.d.ts +10 -8
- package/dist/client.mjs +5 -5
- package/dist/config.d.mts +5 -3
- package/dist/config.d.ts +5 -3
- package/dist/deployment.cjs +4 -2
- package/dist/deployment.d.mts +15 -1
- package/dist/deployment.d.ts +15 -1
- package/dist/deployment.mjs +3 -1
- package/dist/desktop.d.mts +6 -4
- package/dist/desktop.d.ts +6 -4
- package/dist/{devtools-RZVT4JVN.cjs → devtools-7HNDS4SY.cjs} +7 -7
- package/dist/{devtools-UFQYT3VA.mjs → devtools-BP4EBTKQ.mjs} +6 -6
- package/dist/docs.cjs +11 -9
- package/dist/docs.d.mts +19 -5
- package/dist/docs.d.ts +19 -5
- package/dist/docs.mjs +11 -9
- package/dist/environment/vite.cjs +5 -5
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +4 -4
- package/dist/{generate-route-types.d-BL2pq6xC.d.ts → generate-route-types.d-B76M5R11.d.ts} +1 -1
- package/dist/{generate-route-types.d-BoVDU8qX.d.mts → generate-route-types.d-CaGMIaNI.d.mts} +1 -1
- package/dist/image/server.cjs +2 -2
- package/dist/image/server.mjs +1 -1
- package/dist/image/sharp.cjs +9 -9
- package/dist/image/sharp.mjs +1 -1
- package/dist/index.cjs +45 -39
- package/dist/{index.d-Bdm6866n.d.mts → index.d-B1MpEJAo.d.mts} +1 -1
- package/dist/{index.d-Dey5T14f.d.ts → index.d-CVFk37uX.d.ts} +1 -1
- package/dist/index.d.mts +26 -23
- package/dist/index.d.ts +26 -23
- package/dist/index.mjs +48 -42
- package/dist/instrumentation.cjs +3 -3
- package/dist/instrumentation.mjs +2 -2
- package/dist/integrations/orm.d.mts +5 -3
- package/dist/integrations/orm.d.ts +5 -3
- package/dist/integrations.d.mts +5 -3
- package/dist/integrations.d.ts +5 -3
- package/dist/internal/app-markdown-runtime.cjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +12 -5
- package/dist/internal/app-markdown-runtime.d.ts +12 -5
- package/dist/internal/app-markdown-runtime.mjs +1 -1
- package/dist/internal/build-runtime.cjs +34 -32
- package/dist/internal/build-runtime.d.mts +7 -5
- package/dist/internal/build-runtime.d.ts +7 -5
- package/dist/internal/build-runtime.mjs +33 -31
- package/dist/internal/cli-runtime.cjs +10 -10
- package/dist/internal/cli-runtime.mjs +9 -9
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +31 -36
- package/dist/internal/client-runtime.d.mts +9 -7
- package/dist/internal/client-runtime.d.ts +9 -7
- package/dist/internal/client-runtime.mjs +22 -27
- package/dist/internal/compression-runtime.d.mts +5 -3
- package/dist/internal/compression-runtime.d.ts +5 -3
- package/dist/internal/config-runtime.cjs +8 -8
- package/dist/internal/config-runtime.d.mts +9 -7
- package/dist/internal/config-runtime.d.ts +9 -7
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/form-actions.cjs +7 -2
- package/dist/internal/form-actions.d.mts +10 -3
- package/dist/internal/form-actions.d.ts +10 -3
- package/dist/internal/form-actions.mjs +8 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/islands-boot.cjs +6 -1
- package/dist/internal/islands-boot.mjs +6 -1
- 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-node-env.cjs +4 -2
- package/dist/internal/production-node-env.d.mts +22 -1
- package/dist/internal/production-node-env.d.ts +22 -1
- package/dist/internal/production-node-env.mjs +3 -1
- package/dist/internal/production-runtime.cjs +17 -9
- package/dist/internal/production-runtime.d.mts +31 -19
- package/dist/internal/production-runtime.d.ts +31 -19
- package/dist/internal/production-runtime.mjs +18 -10
- package/dist/internal/server-tree.cjs +2 -2
- package/dist/internal/server-tree.d.mts +0 -5
- package/dist/internal/server-tree.d.ts +0 -5
- package/dist/internal/server-tree.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +87 -0
- package/dist/internal/vercel-edge-middleware.d.mts +39 -0
- package/dist/internal/vercel-edge-middleware.d.ts +39 -0
- package/dist/internal/vercel-edge-middleware.mjs +87 -0
- package/dist/layers-7P4RLKVX.cjs +20 -0
- package/dist/{layers-T55SA47E.mjs → layers-XQ7VFMWO.mjs} +4 -2
- package/dist/{layers.d-CcS42OGR.d.mts → layers.d-CH0bC4QL.d.mts} +2 -1
- package/dist/{layers.d-CcS42OGR.d.ts → layers.d-CH0bC4QL.d.ts} +2 -1
- package/dist/markdown.d.mts +5 -3
- package/dist/markdown.d.ts +5 -3
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.d.mts +8 -5
- package/dist/middleware.d.ts +8 -5
- package/dist/middleware.mjs +6 -6
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/{mount.d-BP0nLYQO.d.mts → mount.d-CBqr-LfI.d.mts} +1 -1
- package/dist/{mount.d-CkiPky_F.d.ts → mount.d-CGzN61Kq.d.ts} +1 -1
- package/dist/{navigation-delegate.d-CdBP-hkZ.d.mts → navigation-delegate.d-BwCOhpj7.d.mts} +1 -1
- package/dist/{navigation-delegate.d-DchcGzAQ.d.ts → navigation-delegate.d-CLH2dXjy.d.ts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +8 -6
- package/dist/navigation.d.ts +8 -6
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-55YOZWRA.mjs → nitro-NSTXT7LB.mjs} +2 -2
- package/dist/{nitro-EEX2J3KB.cjs → nitro-Y3LGITW3.cjs} +4 -4
- package/dist/node-module-bundle-LIZ2KMVW.cjs +13 -0
- package/dist/node-module-bundle-VR6NV6AI.mjs +13 -0
- package/dist/{plugin-WIU4GDD4.cjs → plugin-F2O4BFTK.cjs} +2 -2
- package/dist/{plugin-SAS22JL7.mjs → plugin-VEBRN7A3.mjs} +1 -1
- package/dist/plugin.cjs +23 -23
- package/dist/plugin.d.mts +7 -5
- package/dist/plugin.d.ts +7 -5
- package/dist/plugin.mjs +22 -22
- package/dist/{production-runtime.d-Dou_Htas.d.ts → production-runtime.d-BMyyLGBB.d.ts} +3 -57
- package/dist/{production-runtime.d-VwsBzIee.d.mts → production-runtime.d-DMZY3OgV.d.mts} +3 -57
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-LKymStDJ.d.mts → render-plan.d-CzGDjcT0.d.mts} +1 -1
- package/dist/{render-plan.d-D8UakAIk.d.ts → render-plan.d-W6LmjD6y.d.ts} +1 -1
- package/dist/renderer/react/server.cjs +2 -2
- package/dist/renderer/react/server.mjs +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +8 -6
- package/dist/renderer-client.d.ts +8 -6
- package/dist/renderer-client.mjs +2 -2
- package/dist/renderer.d.mts +5 -0
- package/dist/renderer.d.ts +5 -0
- package/dist/{request.d-B928QjWy.d.ts → request.d-CTVRZiQv.d.ts} +1 -1
- package/dist/{request.d-KG-4d2eG.d.mts → request.d-CgNVderU.d.mts} +1 -1
- package/dist/request.d.mts +6 -4
- package/dist/request.d.ts +6 -4
- package/dist/{route-rendering.d-NIHQeb4m.d.mts → route-rendering.d-D0bmZVJA.d.mts} +1 -1
- package/dist/{route-rendering.d-DoEe_w9t.d.ts → route-rendering.d-FDSNtCMg.d.ts} +1 -1
- package/dist/{router.d-DYnRHQwz.d.ts → router.d-DZ3ldniI.d.ts} +1 -1
- package/dist/{router.d-B8PkJSGp.d.mts → router.d-GRKm_uAV.d.mts} +1 -1
- package/dist/{routes.d-uUBZyWoK.d.ts → routes.d-9GFFNioh.d.ts} +1 -1
- package/dist/{routes.d-DgZ_jgGG.d.mts → routes.d-CrEy0lJS.d.mts} +1 -1
- package/dist/routes.d.mts +5 -3
- package/dist/routes.d.ts +5 -3
- package/dist/{rsc-pipeline-7K5H2RPH.cjs → rsc-pipeline-J4KKBSCH.cjs} +10 -10
- package/dist/{rsc-pipeline-4OJ5ZQNZ.mjs → rsc-pipeline-PJZOVYSY.mjs} +9 -9
- package/dist/{runtime-X52Q7JFR.cjs → runtime-OLEO5NXF.cjs} +20 -20
- package/dist/{runtime-U7O3HZOZ.mjs → runtime-QDBSE4H6.mjs} +12 -12
- package/dist/{runtime.d-BxQIzwfy.d.mts → runtime.d-DqXihlxm.d.mts} +1 -1
- package/dist/{runtime.d-DP7mEkEF.d.ts → runtime.d-pqFQBU2N.d.ts} +1 -1
- package/dist/server-http.d-rAe7lAQc.d.mts +70 -0
- package/dist/server-http.d-rAe7lAQc.d.ts +70 -0
- package/dist/server-plugins.d.mts +6 -4
- package/dist/server-plugins.d.ts +6 -4
- package/dist/server.cjs +52 -50
- package/dist/server.d-C5FFrZAo.d.ts +57 -0
- package/dist/server.d-DgC8xew5.d.mts +57 -0
- package/dist/server.d.mts +13 -11
- package/dist/server.d.ts +13 -11
- package/dist/server.mjs +31 -29
- package/dist/{spa-router.d-DsFDHTsv.d.ts → spa-router.d-DhOhaQ-7.d.ts} +2 -2
- package/dist/{spa-router.d-BgHPVMhz.d.mts → spa-router.d-Dhvy60p4.d.mts} +2 -2
- package/dist/testing.d.mts +5 -3
- package/dist/testing.d.ts +5 -3
- package/dist/types.d-xCIhyjOq.d.mts +233 -0
- package/dist/types.d-xCIhyjOq.d.ts +233 -0
- package/dist/{utils.d-zxAVcf_V.d.ts → utils.d-BVCMRRau.d.ts} +1 -1
- package/dist/{utils.d-BKyKDBR1.d.mts → utils.d-Q8EHCpkF.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +23 -23
- package/dist/vite.d.mts +10 -8
- package/dist/vite.d.ts +10 -8
- package/dist/vite.mjs +22 -22
- package/dist/workflows.cjs +2 -2
- package/dist/workflows.d.mts +121 -1
- package/dist/workflows.d.ts +121 -1
- package/dist/workflows.mjs +1 -1
- package/package.json +7 -2
- package/dist/analyzer-KVZGVY5Q.cjs +0 -16
- package/dist/chunk-CLFEQGET.cjs +0 -60
- package/dist/chunk-MK5E44WP.mjs +0 -60
- package/dist/layers-DMRXRL7F.cjs +0 -18
- package/dist/node-module-bundle-7JHPPF6B.mjs +0 -11
- package/dist/node-module-bundle-YJGYBOGK.cjs +0 -11
- package/dist/workflows.d-CRMzQZ3k.d.mts +0 -188
- package/dist/workflows.d-CRMzQZ3k.d.ts +0 -188
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQ4HH5Q6Acjs = require('./chunk-Q4HH5Q6A.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
var _chunkYVTS3S3Fcjs = require('./chunk-YVTS3S3F.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkQOGIZKSOcjs = require('./chunk-QOGIZKSO.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkAXVRUDMBcjs = require('./chunk-AXVRUDMB.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -42,7 +42,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
42
42
|
var _chunkUPOYKX4Scjs = require('./chunk-UPOYKX4S.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _chunkGQ6QOH7Tcjs = require('./chunk-GQ6QOH7T.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
@@ -53,7 +53,9 @@ var _chunkLPIZMU7Dcjs = require('./chunk-LPIZMU7D.cjs');
|
|
|
53
53
|
var _chunkX3MHKLCOcjs = require('./chunk-X3MHKLCO.cjs');
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var _chunkW44X6IC2cjs = require('./chunk-W44X6IC2.cjs');
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
|
|
@@ -74,7 +76,7 @@ var _chunkXGJVRPYLcjs = require('./chunk-XGJVRPYL.cjs');
|
|
|
74
76
|
|
|
75
77
|
|
|
76
78
|
|
|
77
|
-
var
|
|
79
|
+
var _chunkVO65MYJDcjs = require('./chunk-VO65MYJD.cjs');
|
|
78
80
|
|
|
79
81
|
|
|
80
82
|
var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
|
|
@@ -91,7 +93,7 @@ var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
|
|
|
91
93
|
var _chunkUVV3I5QAcjs = require('./chunk-UVV3I5QA.cjs');
|
|
92
94
|
|
|
93
95
|
|
|
94
|
-
var
|
|
96
|
+
var _chunkOCNV4CI2cjs = require('./chunk-OCNV4CI2.cjs');
|
|
95
97
|
|
|
96
98
|
|
|
97
99
|
var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
@@ -126,7 +128,7 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
|
126
128
|
|
|
127
129
|
|
|
128
130
|
|
|
129
|
-
var
|
|
131
|
+
var _chunkMTBDJ326cjs = require('./chunk-MTBDJ326.cjs');
|
|
130
132
|
|
|
131
133
|
|
|
132
134
|
|
|
@@ -152,10 +154,10 @@ var _chunk4P5634G6cjs = require('./chunk-4P5634G6.cjs');
|
|
|
152
154
|
|
|
153
155
|
|
|
154
156
|
|
|
155
|
-
var
|
|
157
|
+
var _chunkLR4KP3I7cjs = require('./chunk-LR4KP3I7.cjs');
|
|
156
158
|
|
|
157
159
|
|
|
158
|
-
var
|
|
160
|
+
var _chunk3EEINK7Gcjs = require('./chunk-3EEINK7G.cjs');
|
|
159
161
|
|
|
160
162
|
|
|
161
163
|
|
|
@@ -171,7 +173,7 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
|
171
173
|
var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
|
|
172
174
|
|
|
173
175
|
|
|
174
|
-
var
|
|
176
|
+
var _chunkFSODPZRTcjs = require('./chunk-FSODPZRT.cjs');
|
|
175
177
|
|
|
176
178
|
|
|
177
179
|
var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
|
|
@@ -276,11 +278,11 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
276
278
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
277
279
|
|
|
278
280
|
|
|
279
|
-
var
|
|
281
|
+
var _chunk22LGTSBAcjs = require('./chunk-22LGTSBA.cjs');
|
|
280
282
|
|
|
281
283
|
|
|
282
284
|
|
|
283
|
-
var
|
|
285
|
+
var _chunk23VJEGKCcjs = require('./chunk-23VJEGKC.cjs');
|
|
284
286
|
|
|
285
287
|
|
|
286
288
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -303,7 +305,7 @@ var _chunk6IOZPJ3Icjs = require('./chunk-6IOZPJ3I.cjs');
|
|
|
303
305
|
|
|
304
306
|
|
|
305
307
|
|
|
306
|
-
var
|
|
308
|
+
var _chunkI7J5RLGOcjs = require('./chunk-I7J5RLGO.cjs');
|
|
307
309
|
|
|
308
310
|
|
|
309
311
|
|
|
@@ -457,7 +459,7 @@ var RouteManager = class {
|
|
|
457
459
|
this.redirects = /* @__PURE__ */ new Map();
|
|
458
460
|
this.programmaticPages = /* @__PURE__ */ new Map();
|
|
459
461
|
this.programmaticLayouts = /* @__PURE__ */ new Map();
|
|
460
|
-
this.programmaticClientRoutes =
|
|
462
|
+
this.programmaticClientRoutes = _chunkVO65MYJDcjs.mergeProgrammaticClientRoutes.call(void 0, []);
|
|
461
463
|
this.reportedIslandsErrors = /* @__PURE__ */ new Set();
|
|
462
464
|
this.config = config;
|
|
463
465
|
this.viteServer = viteServer;
|
|
@@ -485,11 +487,11 @@ var RouteManager = class {
|
|
|
485
487
|
this.programmaticPages.clear();
|
|
486
488
|
this.programmaticLayouts.clear();
|
|
487
489
|
const programmaticClientRoutes = [];
|
|
488
|
-
for (const source of
|
|
490
|
+
for (const source of _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, this.config)) {
|
|
489
491
|
await this.discoverFileRoutes(source);
|
|
490
492
|
await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
|
|
491
493
|
}
|
|
492
|
-
this.programmaticClientRoutes =
|
|
494
|
+
this.programmaticClientRoutes = _chunkVO65MYJDcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
|
|
493
495
|
for (const slot of this.routeSlots.values()) {
|
|
494
496
|
if (slot.interception && !this.pageRouteShapes.has(_chunkYTVSWXEZcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
|
|
495
497
|
throw new (0, _chunkYTVSWXEZcjs.AmbiguousRouteError)(
|
|
@@ -758,7 +760,7 @@ var RouteManager = class {
|
|
|
758
760
|
return this.clientManifestCache.manifest;
|
|
759
761
|
}
|
|
760
762
|
const cacheFile = this.packageClientBoundaryCacheFile;
|
|
761
|
-
return cacheFile ?
|
|
763
|
+
return cacheFile ? _chunkVO65MYJDcjs.runWithPackageClientBoundaryCacheFile.call(void 0,
|
|
762
764
|
cacheFile,
|
|
763
765
|
() => this.computeClientManifest(normalizedProjectRoot)
|
|
764
766
|
) : this.computeClientManifest(normalizedProjectRoot);
|
|
@@ -791,28 +793,28 @@ var RouteManager = class {
|
|
|
791
793
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
792
794
|
);
|
|
793
795
|
}
|
|
794
|
-
const isolatedMode =
|
|
796
|
+
const isolatedMode = _chunkVO65MYJDcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
795
797
|
_optionalChain([this, 'access', _12 => _12.config, 'access', _13 => _13.experimental, 'optionalAccess', _14 => _14.isolatedClientHydration]),
|
|
796
798
|
{
|
|
797
799
|
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _15 => _15.config, 'access', _16 => _16.experimental, 'optionalAccess', _17 => _17.serverComponents])) === "rsc",
|
|
798
800
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
799
801
|
}
|
|
800
802
|
);
|
|
801
|
-
const planOptions =
|
|
803
|
+
const planOptions = _chunkVO65MYJDcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
802
804
|
this.config.renderer,
|
|
803
805
|
Boolean(unsupportedIntegrationProvider)
|
|
804
806
|
);
|
|
805
807
|
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _18 => _18.config, 'access', _19 => _19.experimental, 'optionalAccess', _20 => _20.serverComponents])) === "islands";
|
|
806
808
|
const layoutEntries = Array.from(this.layouts.values()).map((entry) => ({
|
|
807
809
|
entry,
|
|
808
|
-
metadata:
|
|
810
|
+
metadata: _chunkVO65MYJDcjs.getClientModuleHydrationPlan.call(void 0,
|
|
809
811
|
entry.modulePath,
|
|
810
812
|
normalizedProjectRoot,
|
|
811
813
|
isolatedMode,
|
|
812
814
|
islandsMode ? { ...planOptions, serverTreeLayouts: true } : planOptions
|
|
813
815
|
)
|
|
814
816
|
}));
|
|
815
|
-
const markdownPagePlan =
|
|
817
|
+
const markdownPagePlan = _chunkVO65MYJDcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
816
818
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
|
|
817
819
|
normalizedProjectRoot,
|
|
818
820
|
isolatedMode,
|
|
@@ -820,13 +822,13 @@ var RouteManager = class {
|
|
|
820
822
|
);
|
|
821
823
|
const routeEntries = Array.from(this.routes.values()).map((entry) => ({
|
|
822
824
|
entry,
|
|
823
|
-
metadata:
|
|
825
|
+
metadata: _chunk3EEINK7Gcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : _chunkVO65MYJDcjs.getClientModuleHydrationPlan.call(void 0, entry.modulePath, normalizedProjectRoot, isolatedMode, {
|
|
824
826
|
...planOptions,
|
|
825
827
|
serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.serverComponents])) === "islands"
|
|
826
828
|
})
|
|
827
829
|
}));
|
|
828
830
|
const markdownFallback = routeEntries.find(
|
|
829
|
-
({ entry, metadata }) =>
|
|
831
|
+
({ entry, metadata }) => _chunk3EEINK7Gcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
|
|
830
832
|
);
|
|
831
833
|
if (markdownFallback) {
|
|
832
834
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
@@ -834,7 +836,7 @@ var RouteManager = class {
|
|
|
834
836
|
);
|
|
835
837
|
}
|
|
836
838
|
const markdownStaticPackages = _optionalChain([routeEntries, 'access', _24 => _24.find, 'call', _25 => _25(
|
|
837
|
-
({ entry, metadata }) =>
|
|
839
|
+
({ entry, metadata }) => _chunk3EEINK7Gcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
|
|
838
840
|
), 'optionalAccess', _26 => _26.metadata, 'access', _27 => _27.staticPackageBoundaries]);
|
|
839
841
|
if (markdownStaticPackages) {
|
|
840
842
|
_chunkQMNWKQL4cjs.logger.info(
|
|
@@ -842,12 +844,12 @@ var RouteManager = class {
|
|
|
842
844
|
);
|
|
843
845
|
}
|
|
844
846
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
845
|
-
if (
|
|
847
|
+
if (_chunk3EEINK7Gcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
|
|
846
848
|
_chunkQMNWKQL4cjs.logger.info(
|
|
847
849
|
`[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
848
850
|
);
|
|
849
851
|
}
|
|
850
|
-
|
|
852
|
+
_chunkVO65MYJDcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
851
853
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
852
854
|
pattern: entry.pattern,
|
|
853
855
|
depth: _chunkUPOYKX4Scjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
|
|
@@ -894,7 +896,7 @@ var RouteManager = class {
|
|
|
894
896
|
modulePath: toUrlPath(boundary.modulePath)
|
|
895
897
|
}))
|
|
896
898
|
} : {},
|
|
897
|
-
...
|
|
899
|
+
..._chunkVO65MYJDcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
|
|
898
900
|
renderPlan: _chunkUPOYKX4Scjs.createFarmRouteRenderPlan.call(void 0, {
|
|
899
901
|
pageShouldHydrate: metadata.shouldHydrate,
|
|
900
902
|
layoutShouldHydrate,
|
|
@@ -936,7 +938,7 @@ var RouteManager = class {
|
|
|
936
938
|
...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
|
|
937
939
|
}));
|
|
938
940
|
const slots = Array.from(this.routeSlots.values()).map((entry) => {
|
|
939
|
-
const metadata =
|
|
941
|
+
const metadata = _chunkVO65MYJDcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
|
|
940
942
|
return {
|
|
941
943
|
name: entry.name,
|
|
942
944
|
ownerPattern: entry.ownerPattern,
|
|
@@ -952,7 +954,7 @@ var RouteManager = class {
|
|
|
952
954
|
};
|
|
953
955
|
});
|
|
954
956
|
const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
|
|
955
|
-
metadata:
|
|
957
|
+
metadata: _chunkVO65MYJDcjs.getClientModuleHydrationPlan.call(void 0,
|
|
956
958
|
entry.modulePath,
|
|
957
959
|
normalizedProjectRoot,
|
|
958
960
|
isolatedMode,
|
|
@@ -1043,14 +1045,15 @@ var RouteManager = class {
|
|
|
1043
1045
|
const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
|
|
1044
1046
|
return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
|
|
1045
1047
|
}
|
|
1046
|
-
if (
|
|
1048
|
+
if (_chunk3EEINK7Gcjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
|
|
1047
1049
|
const mdxConfig = _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx);
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1050
|
+
const viteServer = this.viteServer;
|
|
1051
|
+
return await _chunkLR4KP3I7cjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
|
|
1052
|
+
// Loaded on render: the route runtime manifest only reads metadata and rendering config.
|
|
1053
|
+
components: () => _chunkLR4KP3I7cjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
|
|
1054
|
+
root: this.config.root,
|
|
1055
|
+
loadModule: viteServer ? (componentModulePath) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
|
|
1056
|
+
}),
|
|
1054
1057
|
config: mdxConfig
|
|
1055
1058
|
});
|
|
1056
1059
|
}
|
|
@@ -1150,8 +1153,8 @@ var RouteManager = class {
|
|
|
1150
1153
|
}
|
|
1151
1154
|
}
|
|
1152
1155
|
for (const [pattern, group] of canonicalPageGroups) {
|
|
1153
|
-
const componentFiles = group.files.filter((file) => !
|
|
1154
|
-
const markdownFiles = group.files.filter(
|
|
1156
|
+
const componentFiles = group.files.filter((file) => !_chunk3EEINK7Gcjs.isFarmMarkdownPageFile.call(void 0, file));
|
|
1157
|
+
const markdownFiles = group.files.filter(_chunk3EEINK7Gcjs.isFarmMarkdownPageFile);
|
|
1155
1158
|
if (componentFiles.length > 1) {
|
|
1156
1159
|
throw new Error(
|
|
1157
1160
|
`Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path3.default.join(appDir, file)).join(" and ")}.`
|
|
@@ -1297,11 +1300,11 @@ var RouteManager = class {
|
|
|
1297
1300
|
srcDir: source.srcDir,
|
|
1298
1301
|
loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
|
|
1299
1302
|
});
|
|
1300
|
-
const graph = this.viteServer ?
|
|
1303
|
+
const graph = this.viteServer ? _chunkVO65MYJDcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
|
|
1301
1304
|
for (const { filePath, manifest } of manifests) {
|
|
1302
1305
|
if (graph) {
|
|
1303
1306
|
clientRoutes.push(
|
|
1304
|
-
|
|
1307
|
+
_chunkVO65MYJDcjs.resolveProgrammaticClientRoutes.call(void 0, {
|
|
1305
1308
|
graph,
|
|
1306
1309
|
routesFile: toRealPath(filePath),
|
|
1307
1310
|
routes: manifest.routes,
|
|
@@ -1490,12 +1493,12 @@ var RouteManager = class {
|
|
|
1490
1493
|
}
|
|
1491
1494
|
}
|
|
1492
1495
|
}
|
|
1493
|
-
/** The page routes
|
|
1496
|
+
/** The page routes the docs runtime answers before Farm's own page rendering. */
|
|
1494
1497
|
getDocsAdapterRoutes() {
|
|
1495
1498
|
const docs = this.config.docs;
|
|
1496
|
-
if (!docs || typeof docs !== "object" || !docs.enabled
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
+
if (!docs || typeof docs !== "object" || !docs.enabled) return void 0;
|
|
1500
|
+
const usesAdapter = Boolean(docs.adapter && docs.adapter.server && docs.adapter.react);
|
|
1501
|
+
if (usesAdapter && !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer)) return void 0;
|
|
1499
1502
|
const entry = `/${String(docs.entry || "docs").replace(/^\/+|\/+$/g, "")}`;
|
|
1500
1503
|
return {
|
|
1501
1504
|
owns: (routePath) => entry === "/" || routePath === entry || routePath.startsWith(`${entry}/`),
|
|
@@ -1517,7 +1520,7 @@ var RouteManager = class {
|
|
|
1517
1520
|
}));
|
|
1518
1521
|
const i18n = this.getI18nConfig();
|
|
1519
1522
|
const docsAdapterRoutes = this.getDocsAdapterRoutes();
|
|
1520
|
-
const result = await
|
|
1523
|
+
const result = await _chunkQOGIZKSOcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
|
|
1521
1524
|
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
|
|
1522
1525
|
...docsAdapterRoutes ? { docsAdapterRoutes } : {}
|
|
1523
1526
|
});
|
|
@@ -1564,7 +1567,7 @@ var RouteManager = class {
|
|
|
1564
1567
|
async isRouteSSG(modulePath) {
|
|
1565
1568
|
try {
|
|
1566
1569
|
const mod = await this.loadRouteModule(modulePath);
|
|
1567
|
-
const rendering = await
|
|
1570
|
+
const rendering = await _chunkQOGIZKSOcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1568
1571
|
return rendering.ssg;
|
|
1569
1572
|
} catch (e) {
|
|
1570
1573
|
return false;
|
|
@@ -1576,7 +1579,7 @@ var RouteManager = class {
|
|
|
1576
1579
|
async hasRouteISR(modulePath) {
|
|
1577
1580
|
try {
|
|
1578
1581
|
const mod = await this.loadRouteModule(modulePath);
|
|
1579
|
-
const rendering = await
|
|
1582
|
+
const rendering = await _chunkQOGIZKSOcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1580
1583
|
return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
|
|
1581
1584
|
} catch (e2) {
|
|
1582
1585
|
return false;
|
|
@@ -1588,7 +1591,7 @@ var RouteManager = class {
|
|
|
1588
1591
|
async getRouteRevalidateInterval(modulePath) {
|
|
1589
1592
|
try {
|
|
1590
1593
|
const mod = await this.loadRouteModule(modulePath);
|
|
1591
|
-
const rendering = await
|
|
1594
|
+
const rendering = await _chunkQOGIZKSOcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
1592
1595
|
return rendering.revalidate;
|
|
1593
1596
|
} catch (e3) {
|
|
1594
1597
|
return void 0;
|
|
@@ -2654,7 +2657,7 @@ function isFontLoaderKind(value) {
|
|
|
2654
2657
|
return typeof value === "string" && FONT_FUNCTIONS.has(value);
|
|
2655
2658
|
}
|
|
2656
2659
|
function containsFontFunction(code) {
|
|
2657
|
-
return Array.from(FONT_FUNCTIONS).some((name) => code.includes(name));
|
|
2660
|
+
return code.includes("@farm.js/core") && Array.from(FONT_FUNCTIONS).some((name) => code.includes(name));
|
|
2658
2661
|
}
|
|
2659
2662
|
function requireString(value, id, label) {
|
|
2660
2663
|
if (typeof value !== "string" || value.trim() === "") {
|
|
@@ -2854,7 +2857,7 @@ function inferFarmIslandStrategy(filePath, root) {
|
|
|
2854
2857
|
const result = _compiler.inferStrategy.call(void 0, file, code, {
|
|
2855
2858
|
parse: parseFarmIslandSource,
|
|
2856
2859
|
resolve: (specifier, importer) => {
|
|
2857
|
-
const resolved =
|
|
2860
|
+
const resolved = _chunkVO65MYJDcjs.resolveImportedModule.call(void 0, importer, specifier, root);
|
|
2858
2861
|
return resolved.local ? resolved.path : null;
|
|
2859
2862
|
}
|
|
2860
2863
|
});
|
|
@@ -2868,7 +2871,7 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
2868
2871
|
const files = [];
|
|
2869
2872
|
const modules = [];
|
|
2870
2873
|
for (const owner of owners) {
|
|
2871
|
-
const rendered =
|
|
2874
|
+
const rendered = _chunkVO65MYJDcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
|
|
2872
2875
|
if (!rendered) {
|
|
2873
2876
|
return {
|
|
2874
2877
|
strategy: null,
|
|
@@ -2884,7 +2887,7 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
2884
2887
|
source = fs.default.readFileSync(module, "utf8");
|
|
2885
2888
|
} catch (e10) {
|
|
2886
2889
|
}
|
|
2887
|
-
if (
|
|
2890
|
+
if (_chunkVO65MYJDcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
|
|
2888
2891
|
}
|
|
2889
2892
|
for (const module of modules) {
|
|
2890
2893
|
const result = inferFarmIslandStrategy(module, root);
|
|
@@ -3226,7 +3229,7 @@ function createDefaultErrorDiagnostics(error, root) {
|
|
|
3226
3229
|
function canBootFarmIslandsClient(config) {
|
|
3227
3230
|
const docs = config.docs;
|
|
3228
3231
|
const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
|
|
3229
|
-
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _55 => _55.experimental, 'optionalAccess', _56 => _56.serverComponents])) === "islands" && !docsEnabled &&
|
|
3232
|
+
return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _55 => _55.experimental, 'optionalAccess', _56 => _56.serverComponents])) === "islands" && !docsEnabled && _chunkQ4HH5Q6Acjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkQ4HH5Q6Acjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
|
|
3230
3233
|
}
|
|
3231
3234
|
|
|
3232
3235
|
// src/server/renderer.ts
|
|
@@ -3305,7 +3308,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
|
|
|
3305
3308
|
function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
|
|
3306
3309
|
if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
|
|
3307
3310
|
warnedSuppressedAsyncHydrationModules.add(modulePath);
|
|
3308
|
-
_chunkQMNWKQL4cjs.logger.warn(
|
|
3311
|
+
_chunkQMNWKQL4cjs.logger.warn(_chunkVO65MYJDcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
|
|
3309
3312
|
}
|
|
3310
3313
|
var fullDocumentRoutes = /* @__PURE__ */ new Set();
|
|
3311
3314
|
var documentLayouts = /* @__PURE__ */ new WeakMap();
|
|
@@ -3358,7 +3361,7 @@ function createPPRRefreshScript() {
|
|
|
3358
3361
|
}
|
|
3359
3362
|
function createPreHydrationClickQueueScript() {
|
|
3360
3363
|
const selector = JSON.stringify(_chunk7KJJ4SBScjs.FARM_ISLAND_REPLAYABLE_SELECTOR);
|
|
3361
|
-
return `<script>(function(){if(window.__FARM_PREHYDRATION_CLICK_QUEUE__)return;var queue=[];window.__FARM_PREHYDRATION_CLICK_QUEUE__=queue;window.__FARM_HYDRATED__=false;document.documentElement.dataset.farmHydrated="false";function isModified(event){return !!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}function inHydrated(node){return !!(node&&node.closest&&node.closest('[data-farm-island-hydrated="true"]'))}function closestQueuedTarget(target){while(target&&target!==document.documentElement){if(target.matches&&target.matches(${selector}))return target;target=target.parentElement}return null}function announce(target,kind){document.dispatchEvent(new CustomEvent("farm:island-interaction",{detail:{target:target,kind:kind||null}}))}function hold(event,target,kind){if(!queue.some(function(item){return item.target===target})){queue.push({target:target,kind:kind,createdAt:Date.now()});announce(target,kind)}event.preventDefault();event.stopImmediatePropagation()}document.addEventListener("click",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented||event.button!==0||isModified(event))return;var target=closestQueuedTarget(event.target);if(!target||target.closest&&target.closest("a[href]")||inHydrated(target))return;hold(event,target,"click")},true);document.addEventListener("submit",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented)return;var form=event.target;if(!form||form.nodeName!=="FORM"||inHydrated(form))return;hold(event,form,"submit")},true);function observe(event){if(window.__FARM_HYDRATED__)return;var target=event.target;if(!(target&&target.closest)||inHydrated(target))return;announce(target,null)}document.addEventListener("pointerdown",observe,true);document.addEventListener("focusin",observe,true);})();</script>`;
|
|
3364
|
+
return `<script>(function(){if(window.__FARM_PREHYDRATION_CLICK_QUEUE__)return;var queue=[];window.__FARM_PREHYDRATION_CLICK_QUEUE__=queue;window.__FARM_HYDRATED__=false;document.documentElement.dataset.farmHydrated="false";function isModified(event){return !!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}function inHydrated(node){return !!(node&&node.closest&&node.closest('[data-farm-island-hydrated="true"]'))}function closestQueuedTarget(target){while(target&&target!==document.documentElement){if(target.matches&&target.matches(${selector}))return target;target=target.parentElement}return null}function announce(target,kind){document.dispatchEvent(new CustomEvent("farm:island-interaction",{detail:{target:target,kind:kind||null}}))}function submits(target,kind){return kind==="submit"||!!(target.form&&target.type==="submit")}function hold(event,target,kind){if(!(submits(target,kind)&&queue.some(function(item){return item.target===target}))){queue.push({target:target,kind:kind,createdAt:Date.now()});announce(target,kind)}event.preventDefault();event.stopImmediatePropagation()}document.addEventListener("click",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented||event.button!==0||isModified(event))return;var target=closestQueuedTarget(event.target);if(!target||target.closest&&target.closest("a[href]")||inHydrated(target))return;hold(event,target,"click")},true);document.addEventListener("submit",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented)return;var form=event.target;if(!form||form.nodeName!=="FORM"||inHydrated(form))return;hold(event,form,"submit")},true);function observe(event){if(window.__FARM_HYDRATED__)return;var target=event.target;if(!(target&&target.closest)||inHydrated(target))return;announce(target,null)}document.addEventListener("pointerdown",observe,true);document.addEventListener("focusin",observe,true);})();</script>`;
|
|
3362
3365
|
}
|
|
3363
3366
|
function rendererRenderOptions() {
|
|
3364
3367
|
const nonce = _chunk3BIASUGRcjs._resolveCurrentCspNonce.call(void 0, );
|
|
@@ -3509,7 +3512,7 @@ var ServerRenderer = class {
|
|
|
3509
3512
|
_chunkXGJVRPYLcjs.uninstallFarmIslandValues.call(void 0, );
|
|
3510
3513
|
}
|
|
3511
3514
|
if (_optionalChain([this, 'access', _61 => _61.config, 'access', _62 => _62.notFound, 'optionalAccess', _63 => _63.component, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()])) {
|
|
3512
|
-
resolveFarmNotFoundComponentPath(this.config,
|
|
3515
|
+
resolveFarmNotFoundComponentPath(this.config, _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, this.config));
|
|
3513
3516
|
}
|
|
3514
3517
|
const loaded = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer) ? await import("./renderer/react/server.cjs") : _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
|
|
3515
3518
|
_chunk67MZTLTFcjs.resolveFarmRendererModule.call(void 0,
|
|
@@ -3662,6 +3665,7 @@ var ServerRenderer = class {
|
|
|
3662
3665
|
writable.once("error", reject);
|
|
3663
3666
|
const stream = renderToPipeableStream(element, {
|
|
3664
3667
|
nonce: _chunk3BIASUGRcjs._resolveCurrentCspNonce.call(void 0, ),
|
|
3668
|
+
formState: _chunkW44X6IC2cjs.getFarmFormState.call(void 0, ),
|
|
3665
3669
|
...inlineBoundaries ? {
|
|
3666
3670
|
progressiveChunkSize: Number.MAX_SAFE_INTEGER,
|
|
3667
3671
|
onAllReady() {
|
|
@@ -3720,7 +3724,7 @@ var ServerRenderer = class {
|
|
|
3720
3724
|
await this.initialize();
|
|
3721
3725
|
if (this.viteServer) await this.applyRendererAppSetup();
|
|
3722
3726
|
_chunkD22BUQKWcjs.setFarmBasePath.call(void 0, this.config.basePath);
|
|
3723
|
-
|
|
3727
|
+
_chunk23VJEGKCcjs.setFarmTrailingSlashPreference.call(void 0, this.config.trailingSlash);
|
|
3724
3728
|
let element = this.rendererRuntime.createElement(input.PageComponent, input.pageProps);
|
|
3725
3729
|
if (input.LoadingComponent) {
|
|
3726
3730
|
element = this.rendererRuntime.createElement(
|
|
@@ -3817,7 +3821,7 @@ var ServerRenderer = class {
|
|
|
3817
3821
|
* Check if a path should be served from SSG cache
|
|
3818
3822
|
*/
|
|
3819
3823
|
async shouldServeSSG(pathname) {
|
|
3820
|
-
const ssgPage =
|
|
3824
|
+
const ssgPage = _chunkQOGIZKSOcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
|
|
3821
3825
|
if (!ssgPage) return null;
|
|
3822
3826
|
const cached = await this.getCachedSSGPage(pathname);
|
|
3823
3827
|
if (cached && await this.dataCache.isStaleAsync(cached)) {
|
|
@@ -4050,7 +4054,7 @@ var ServerRenderer = class {
|
|
|
4050
4054
|
await this.initialize();
|
|
4051
4055
|
if (this.viteServer) await this.applyRendererAppSetup();
|
|
4052
4056
|
_chunkD22BUQKWcjs.setFarmBasePath.call(void 0, this.config.basePath);
|
|
4053
|
-
|
|
4057
|
+
_chunk23VJEGKCcjs.setFarmTrailingSlashPreference.call(void 0, this.config.trailingSlash);
|
|
4054
4058
|
const cspNonce = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, this.security);
|
|
4055
4059
|
if (cspNonce) {
|
|
4056
4060
|
req.__FARM_CSP_NONCE__ = cspNonce;
|
|
@@ -4147,7 +4151,7 @@ var ServerRenderer = class {
|
|
|
4147
4151
|
this.applyDeploymentHeaders(req, res);
|
|
4148
4152
|
const match = this.routeManager.matchRoute(pathname);
|
|
4149
4153
|
if (match.route) {
|
|
4150
|
-
const redirectLocation =
|
|
4154
|
+
const redirectLocation = _chunk23VJEGKCcjs.resolveFarmTrailingSlashRedirect.call(void 0, url, this.config.trailingSlash);
|
|
4151
4155
|
if (redirectLocation) {
|
|
4152
4156
|
res.statusCode = 308;
|
|
4153
4157
|
res.setHeader("Location", redirectLocation);
|
|
@@ -4201,9 +4205,14 @@ var ServerRenderer = class {
|
|
|
4201
4205
|
toMiddlewareMap(req.__FARM_MIDDLEWARE_DATA__),
|
|
4202
4206
|
() => _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0,
|
|
4203
4207
|
toMiddlewareMap(req.__FARM_MIDDLEWARE_CONTEXT__),
|
|
4204
|
-
() =>
|
|
4208
|
+
() => _chunkW44X6IC2cjs.handleFarmFormActionRequest.call(void 0,
|
|
4205
4209
|
formActionRequest,
|
|
4206
|
-
_chunk4P5634G6cjs.resolveServerActionsConfig.call(void 0, this.config.serverActions)
|
|
4210
|
+
_chunk4P5634G6cjs.resolveServerActionsConfig.call(void 0, this.config.serverActions),
|
|
4211
|
+
// Before a rewrite, the URL the browser posted to.
|
|
4212
|
+
new URL(
|
|
4213
|
+
_nullishCoalesce(_nullishCoalesce(req.originalUrl, () => ( req.url)), () => ( "/")),
|
|
4214
|
+
formActionRequest.url
|
|
4215
|
+
).href
|
|
4207
4216
|
)
|
|
4208
4217
|
)
|
|
4209
4218
|
);
|
|
@@ -4275,7 +4284,7 @@ var ServerRenderer = class {
|
|
|
4275
4284
|
throw error;
|
|
4276
4285
|
}
|
|
4277
4286
|
}
|
|
4278
|
-
const renderingConfig = await
|
|
4287
|
+
const renderingConfig = await _chunkQOGIZKSOcjs.resolveRouteRenderingConfigFromFile.call(void 0,
|
|
4279
4288
|
routeModule,
|
|
4280
4289
|
route.modulePath,
|
|
4281
4290
|
{ experimentalPPR: _optionalChain([this, 'access', _99 => _99.config, 'access', _100 => _100.experimental, 'optionalAccess', _101 => _101.ppr]) === true }
|
|
@@ -4361,7 +4370,7 @@ var ServerRenderer = class {
|
|
|
4361
4370
|
const routeManifestEntry = routeManifest.routes.find(
|
|
4362
4371
|
(entry) => entry.pattern === route.pattern
|
|
4363
4372
|
);
|
|
4364
|
-
const moduleMetadata = routeManifestEntry ||
|
|
4373
|
+
const moduleMetadata = routeManifestEntry || _chunkVO65MYJDcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
|
|
4365
4374
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4366
4375
|
const renderedRouteSlots = await Promise.all(
|
|
4367
4376
|
routeSlots.map(async (slot) => {
|
|
@@ -5164,7 +5173,7 @@ var ServerRenderer = class {
|
|
|
5164
5173
|
if (this.routeManager.matchRoute(_chunkX3MHKLCOcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
|
|
5165
5174
|
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkX3MHKLCOcjs.createFarmDefaultMCPServer.call(void 0,
|
|
5166
5175
|
readAppPackageIdentity(this.config.root),
|
|
5167
|
-
|
|
5176
|
+
_chunk22LGTSBAcjs.FARM_VERSION
|
|
5168
5177
|
))));
|
|
5169
5178
|
return _chunkX3MHKLCOcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
|
|
5170
5179
|
}
|
|
@@ -5249,7 +5258,7 @@ var ServerRenderer = class {
|
|
|
5249
5258
|
pages,
|
|
5250
5259
|
config,
|
|
5251
5260
|
rootMetadata,
|
|
5252
|
-
mcp: _optionalChain([this, 'access', _178 => _178.config, 'access', _179 => _179.agent, 'optionalAccess', _180 => _180.aiCatalog]) === false ? [] :
|
|
5261
|
+
mcp: _optionalChain([this, 'access', _178 => _178.config, 'access', _179 => _179.agent, 'optionalAccess', _180 => _180.aiCatalog]) === false ? [] : _chunkGQ6QOH7Tcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
|
|
5253
5262
|
basePath: this.config.basePath,
|
|
5254
5263
|
apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
|
|
5255
5264
|
_chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
|
|
@@ -5806,7 +5815,7 @@ window.__FARM_LOADING_MODULE__ = ${JSON.stringify(
|
|
|
5806
5815
|
window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
5807
5816
|
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkBDYM2TN3cjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
5808
5817
|
window.__FARM_I18N__ = ${_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
|
|
5809
|
-
</script
|
|
5818
|
+
</script>${_chunkW44X6IC2cjs.renderFarmFormStateScript.call(void 0, )}`;
|
|
5810
5819
|
const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
|
|
5811
5820
|
const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
|
|
5812
5821
|
const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
|
|
@@ -5845,6 +5854,7 @@ window.__FARM_I18N__ = ${_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
5845
5854
|
const earlyClientScript = bootClient ? createFarmDevBootScript(waitingRoot, rootStrategy) : FARM_DEV_EARLY_CLIENT_SCRIPT;
|
|
5846
5855
|
const { pipe, abort } = renderToPipeableStream(streamRoot, {
|
|
5847
5856
|
nonce: cspNonce,
|
|
5857
|
+
formState: _chunkW44X6IC2cjs.getFarmFormState.call(void 0, ),
|
|
5848
5858
|
onShellReady() {
|
|
5849
5859
|
if (pendingNavigationError) {
|
|
5850
5860
|
_optionalChain([abort, 'optionalCall', _211 => _211(pendingNavigationError)]);
|
|
@@ -6148,7 +6158,7 @@ window.__FARM_I18N__ = ${_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6148
6158
|
async loadNotFoundModule() {
|
|
6149
6159
|
const notFoundPath = resolveFarmNotFoundComponentPath(
|
|
6150
6160
|
this.config,
|
|
6151
|
-
|
|
6161
|
+
_chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, this.config)
|
|
6152
6162
|
);
|
|
6153
6163
|
if (!notFoundPath) return null;
|
|
6154
6164
|
return await this.routeManager.loadRouteModule(notFoundPath);
|
|
@@ -6233,7 +6243,7 @@ window.__FARM_I18N__ = ${_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6233
6243
|
}
|
|
6234
6244
|
const notFoundPath = resolveFarmNotFoundComponentPath(
|
|
6235
6245
|
this.config,
|
|
6236
|
-
|
|
6246
|
+
_chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, this.config)
|
|
6237
6247
|
);
|
|
6238
6248
|
if (notFoundPath) {
|
|
6239
6249
|
const notFoundModule = await this.loadNotFoundModule();
|
|
@@ -6295,7 +6305,7 @@ window.__FARM_I18N__ = ${_chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6295
6305
|
stack: _optionalChain([diagnostics, 'optionalAccess', _235 => _235.stack]),
|
|
6296
6306
|
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _236 => _236.sourceFrame]),
|
|
6297
6307
|
development: isDev,
|
|
6298
|
-
farmVersion:
|
|
6308
|
+
farmVersion: _chunk22LGTSBAcjs.FARM_VERSION,
|
|
6299
6309
|
nodeVersion: process.version,
|
|
6300
6310
|
mode: isDev ? "development" : "production"
|
|
6301
6311
|
})
|
|
@@ -6419,11 +6429,11 @@ ${clientScript}
|
|
|
6419
6429
|
}
|
|
6420
6430
|
applyDeploymentHeaders(req, res) {
|
|
6421
6431
|
const deploymentId = this.getDeploymentId();
|
|
6422
|
-
res.setHeader(
|
|
6432
|
+
res.setHeader(_chunkI7J5RLGOcjs.FARM_DEPLOYMENT_ID_HEADER, deploymentId);
|
|
6423
6433
|
if ((req.method || "GET").toUpperCase() !== "GET") return;
|
|
6424
6434
|
const forwardedProto = req.headers["x-forwarded-proto"];
|
|
6425
6435
|
const isSecure = _optionalChain([(Array.isArray(forwardedProto) ? forwardedProto[0] : forwardedProto), 'optionalAccess', _247 => _247.split, 'call', _248 => _248(","), 'access', _249 => _249[0], 'optionalAccess', _250 => _250.trim, 'call', _251 => _251()]) === "https" || Boolean(_optionalChain([req, 'access', _252 => _252.socket, 'optionalAccess', _253 => _253.encrypted]));
|
|
6426
|
-
const cookie =
|
|
6436
|
+
const cookie = _chunkI7J5RLGOcjs.createFarmDeploymentCookie.call(void 0, deploymentId, this.config.basePath || "/", isSecure);
|
|
6427
6437
|
const existing = res.getHeader("Set-Cookie");
|
|
6428
6438
|
if (Array.isArray(existing)) {
|
|
6429
6439
|
res.setHeader("Set-Cookie", [...existing, cookie]);
|
|
@@ -6514,10 +6524,10 @@ var FarmApp = class {
|
|
|
6514
6524
|
plugins: config.plugins || [],
|
|
6515
6525
|
migrations: config.migrations || { commands: [] },
|
|
6516
6526
|
cron: _chunkYAEN3L2Fcjs.resolveCronConfig.call(void 0, config.cron),
|
|
6517
|
-
workflows:
|
|
6527
|
+
workflows: _chunkFSODPZRTcjs.resolveWorkflowsConfig.call(void 0, config.workflows),
|
|
6518
6528
|
api: normalizeFarmAppAPIConfig(config.api),
|
|
6519
6529
|
middleware: config.middleware || {},
|
|
6520
|
-
routeRules:
|
|
6530
|
+
routeRules: _chunkOCNV4CI2cjs.normalizeRouteRules.call(void 0, config.routeRules),
|
|
6521
6531
|
context: config.context || (() => void 0),
|
|
6522
6532
|
server: _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, config.server),
|
|
6523
6533
|
serverActions: _chunk4P5634G6cjs.resolveServerActionsConfig.call(void 0, config.serverActions),
|
|
@@ -6577,12 +6587,12 @@ var FarmApp = class {
|
|
|
6577
6587
|
);
|
|
6578
6588
|
}
|
|
6579
6589
|
async verifyAppStructure() {
|
|
6580
|
-
const appDirs =
|
|
6590
|
+
const appDirs = _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, this.config);
|
|
6581
6591
|
const hasAppDirectory = (await Promise.all(appDirs.map((appDir) => _chunkQMNWKQL4cjs.fileExists.call(void 0, appDir)))).some(
|
|
6582
6592
|
Boolean
|
|
6583
6593
|
);
|
|
6584
6594
|
if (!hasAppDirectory) {
|
|
6585
|
-
const routeFiles =
|
|
6595
|
+
const routeFiles = _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
|
|
6586
6596
|
(source) => _chunkQEJWNXRIcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
|
|
6587
6597
|
);
|
|
6588
6598
|
if (routeFiles.length > 0) {
|
|
@@ -7072,6 +7082,83 @@ async function buildFarmTreeLayouts(layouts, params, source, options) {
|
|
|
7072
7082
|
}
|
|
7073
7083
|
`;
|
|
7074
7084
|
|
|
7085
|
+
// src/client/navigation-scripts.ts
|
|
7086
|
+
var FARM_NAVIGATION_SCRIPT_SOURCE = `// The nonce the page's Content Security Policy trusts: the one of the response that loaded the
|
|
7087
|
+
// document, read once, before a navigation adds scripts that carry another response's nonce.
|
|
7088
|
+
const farmDocumentScriptNonce = (function() {
|
|
7089
|
+
if (typeof document === "undefined") return "";
|
|
7090
|
+
const script = document.querySelector("script[data-farm-runtime]") || document.querySelector("script[nonce]");
|
|
7091
|
+
return (script && script.nonce) || "";
|
|
7092
|
+
})();
|
|
7093
|
+
|
|
7094
|
+
// A runnable copy of a script a navigation inserted as markup. A script its response nonced runs
|
|
7095
|
+
// with the page's nonce; one it left without a nonce stays without, so the policy still blocks it.
|
|
7096
|
+
function createFarmNavigationScript(script) {
|
|
7097
|
+
const freshScript = document.createElement("script");
|
|
7098
|
+
for (const attribute of Array.from(script.attributes)) {
|
|
7099
|
+
if (attribute.name !== "nonce") freshScript.setAttribute(attribute.name, attribute.value);
|
|
7100
|
+
}
|
|
7101
|
+
if (farmDocumentScriptNonce && (script.nonce || script.getAttribute("nonce"))) {
|
|
7102
|
+
freshScript.nonce = farmDocumentScriptNonce;
|
|
7103
|
+
}
|
|
7104
|
+
freshScript.textContent = script.textContent || "";
|
|
7105
|
+
return freshScript;
|
|
7106
|
+
}
|
|
7107
|
+
// React streams Suspense content after its fallback, in a hidden segment that a reveal script
|
|
7108
|
+
// ($RC for a boundary, $RS for a segment placeholder) moves into place. This makes the same moves
|
|
7109
|
+
// in a parsed page, before it goes on screen, and drops the calls it made, so the islands in that
|
|
7110
|
+
// content are where the swap looks for them (a refresh keeps them).
|
|
7111
|
+
function revealFarmStreamedContent(root) {
|
|
7112
|
+
const find = function(id) {
|
|
7113
|
+
return root.querySelector('[id="' + id.replace(/"/g, "") + '"]');
|
|
7114
|
+
};
|
|
7115
|
+
for (const script of Array.from(root.querySelectorAll("script:not([type]), script[type='text/javascript']"))) {
|
|
7116
|
+
const source = script.textContent || "";
|
|
7117
|
+
if (source.indexOf("$RC(") === -1 && source.indexOf("$RS(") === -1) continue;
|
|
7118
|
+
let rest = source;
|
|
7119
|
+
for (const call of source.matchAll(/\\$R([CS])\\("([^"]+)","([^"]+)"\\);?/g)) {
|
|
7120
|
+
const [text, kind, first, second] = call;
|
|
7121
|
+
if (kind === "S") {
|
|
7122
|
+
const segment = find(first);
|
|
7123
|
+
const placeholder = find(second);
|
|
7124
|
+
if (!segment || !placeholder) continue;
|
|
7125
|
+
while (segment.firstChild) placeholder.parentNode.insertBefore(segment.firstChild, placeholder);
|
|
7126
|
+
placeholder.remove();
|
|
7127
|
+
segment.remove();
|
|
7128
|
+
} else {
|
|
7129
|
+
const boundary = find(first);
|
|
7130
|
+
const segment = find(second);
|
|
7131
|
+
if (!boundary || !segment) continue;
|
|
7132
|
+
const parent = boundary.parentNode;
|
|
7133
|
+
const start = boundary.previousSibling;
|
|
7134
|
+
// The fallback goes, up to the boundary's closing comment (nested boundaries skipped).
|
|
7135
|
+
let node = boundary;
|
|
7136
|
+
let depth = 0;
|
|
7137
|
+
while (node) {
|
|
7138
|
+
if (node.nodeType === 8) {
|
|
7139
|
+
const data = node.data;
|
|
7140
|
+
if (data === "/$" || data === "/&") {
|
|
7141
|
+
if (depth === 0) break;
|
|
7142
|
+
depth--;
|
|
7143
|
+
} else if (data === "$" || data === "$?" || data === "$~" || data === "$!" || data === "&") {
|
|
7144
|
+
depth++;
|
|
7145
|
+
}
|
|
7146
|
+
}
|
|
7147
|
+
const next = node.nextSibling;
|
|
7148
|
+
parent.removeChild(node);
|
|
7149
|
+
node = next;
|
|
7150
|
+
}
|
|
7151
|
+
while (segment.firstChild) parent.insertBefore(segment.firstChild, node);
|
|
7152
|
+
segment.remove();
|
|
7153
|
+
if (start && start.nodeType === 8) start.data = "$";
|
|
7154
|
+
}
|
|
7155
|
+
rest = rest.replace(text, "");
|
|
7156
|
+
}
|
|
7157
|
+
script.textContent = rest;
|
|
7158
|
+
}
|
|
7159
|
+
}
|
|
7160
|
+
`;
|
|
7161
|
+
|
|
7075
7162
|
// src/client/navigation-stream-client.ts
|
|
7076
7163
|
var FARM_NAVIGATION_STREAM_READER_SOURCE = `// Reads a streamed navigation (F-Stream) up to the end of React's shell. \`next\` then resolves
|
|
7077
7164
|
// with each later flush as it ends, and null at the end; a document without a marker is all shell.
|
|
@@ -7116,6 +7203,91 @@ async function readFarmNavigationStream(body, flushToken) {
|
|
|
7116
7203
|
};
|
|
7117
7204
|
}`;
|
|
7118
7205
|
|
|
7206
|
+
// src/client/refresh-fields.ts
|
|
7207
|
+
var FARM_REFRESH_FIELDS_SOURCE = `// The server-rendered fields of a tree: islands keep their own.
|
|
7208
|
+
function listFarmServerFields(root) {
|
|
7209
|
+
return Array.from(root.querySelectorAll("input, textarea, select")).filter(function(field) {
|
|
7210
|
+
return !field.closest("f-island");
|
|
7211
|
+
});
|
|
7212
|
+
}
|
|
7213
|
+
|
|
7214
|
+
// Reads the fields of a tree about to be replaced: their order, and which one has the focus.
|
|
7215
|
+
function captureFarmServerFields(root) {
|
|
7216
|
+
const fields = listFarmServerFields(root);
|
|
7217
|
+
const focused = fields.indexOf(document.activeElement);
|
|
7218
|
+
const field = fields[focused];
|
|
7219
|
+
let selection = null;
|
|
7220
|
+
try {
|
|
7221
|
+
if (field && typeof field.selectionStart === "number") {
|
|
7222
|
+
selection = [field.selectionStart, field.selectionEnd, field.selectionDirection];
|
|
7223
|
+
}
|
|
7224
|
+
} catch {}
|
|
7225
|
+
return { fields, focused, selection };
|
|
7226
|
+
}
|
|
7227
|
+
|
|
7228
|
+
function isSameFarmField(current, next) {
|
|
7229
|
+
return current.tagName === next.tagName &&
|
|
7230
|
+
current.type === next.type &&
|
|
7231
|
+
current.name === next.name &&
|
|
7232
|
+
current.id === next.id;
|
|
7233
|
+
}
|
|
7234
|
+
|
|
7235
|
+
// Gives the replacing tree's fields what the user changed in the replaced one, and the focus.
|
|
7236
|
+
function restoreFarmServerFields(captured, root) {
|
|
7237
|
+
const fields = listFarmServerFields(root);
|
|
7238
|
+
captured.fields.forEach(function(current, index) {
|
|
7239
|
+
const next = fields[index];
|
|
7240
|
+
if (!next || !isSameFarmField(current, next)) return;
|
|
7241
|
+
if (current.form && current.form.getAttribute("aria-busy") === "true") return;
|
|
7242
|
+
if (current.tagName === "SELECT") {
|
|
7243
|
+
const changed = Array.from(current.options).some(function(option) {
|
|
7244
|
+
return option.selected !== option.defaultSelected;
|
|
7245
|
+
});
|
|
7246
|
+
if (!changed) return;
|
|
7247
|
+
const values = new Set(Array.from(current.selectedOptions, function(option) {
|
|
7248
|
+
return option.value;
|
|
7249
|
+
}));
|
|
7250
|
+
Array.from(next.options).forEach(function(option) {
|
|
7251
|
+
option.selected = values.has(option.value);
|
|
7252
|
+
});
|
|
7253
|
+
} else if (current.type === "checkbox" || current.type === "radio") {
|
|
7254
|
+
if (current.checked !== current.defaultChecked) next.checked = current.checked;
|
|
7255
|
+
} else if (current.type !== "file" && current.value !== current.defaultValue) {
|
|
7256
|
+
next.value = current.value;
|
|
7257
|
+
}
|
|
7258
|
+
});
|
|
7259
|
+
const focused = fields[captured.focused];
|
|
7260
|
+
if (!focused || !isSameFarmField(captured.fields[captured.focused], focused)) return;
|
|
7261
|
+
focused.focus({ preventScroll: true });
|
|
7262
|
+
if (captured.selection) {
|
|
7263
|
+
try {
|
|
7264
|
+
focused.setSelectionRange(captured.selection[0], captured.selection[1], captured.selection[2]);
|
|
7265
|
+
} catch {}
|
|
7266
|
+
}
|
|
7267
|
+
}
|
|
7268
|
+
`;
|
|
7269
|
+
|
|
7270
|
+
// src/utils/hook-filters.ts
|
|
7271
|
+
|
|
7272
|
+
|
|
7273
|
+
function escapeRegExp(value) {
|
|
7274
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7275
|
+
}
|
|
7276
|
+
function exactIdPattern(ids) {
|
|
7277
|
+
return new RegExp(`^(?:${ids.map(escapeRegExp).join("|")})(?:\\?.*)?$`);
|
|
7278
|
+
}
|
|
7279
|
+
function fileNamePattern(files) {
|
|
7280
|
+
const names = /* @__PURE__ */ new Set();
|
|
7281
|
+
for (const file of files) {
|
|
7282
|
+
names.add(path3.default.basename(file));
|
|
7283
|
+
try {
|
|
7284
|
+
names.add(path3.default.basename(_fs.realpathSync.call(void 0, file)));
|
|
7285
|
+
} catch (e23) {
|
|
7286
|
+
}
|
|
7287
|
+
}
|
|
7288
|
+
return new RegExp(`(?:^|/)(?:${[...names].map(escapeRegExp).join("|")})(?:\\?.*)?$`);
|
|
7289
|
+
}
|
|
7290
|
+
|
|
7119
7291
|
// src/docs/client-config.ts
|
|
7120
7292
|
|
|
7121
7293
|
|
|
@@ -7177,7 +7349,7 @@ function isFarmDocsClientConfigModule(id, configModule) {
|
|
|
7177
7349
|
if (file === configModule) return true;
|
|
7178
7350
|
try {
|
|
7179
7351
|
return file === _fs.realpathSync.call(void 0, configModule).replace(/\\/g, "/");
|
|
7180
|
-
} catch (
|
|
7352
|
+
} catch (e24) {
|
|
7181
7353
|
return false;
|
|
7182
7354
|
}
|
|
7183
7355
|
}
|
|
@@ -7185,10 +7357,14 @@ function farmDocsClientConfigPlugin(configModule) {
|
|
|
7185
7357
|
return {
|
|
7186
7358
|
name: "farm:docs-client-config",
|
|
7187
7359
|
enforce: "pre",
|
|
7188
|
-
transform
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7360
|
+
transform: {
|
|
7361
|
+
// Never matches without a docs config module, so the bundler never calls the handler.
|
|
7362
|
+
filter: { id: configModule ? fileNamePattern([configModule]) : /(?!)/ },
|
|
7363
|
+
handler(code, id, options) {
|
|
7364
|
+
if (_optionalChain([options, 'optionalAccess', _280 => _280.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
|
|
7365
|
+
const redacted = redactFarmDocsClientConfig(code, id.split("?")[0]);
|
|
7366
|
+
return redacted === null ? null : { code: redacted, map: null };
|
|
7367
|
+
}
|
|
7192
7368
|
}
|
|
7193
7369
|
};
|
|
7194
7370
|
}
|
|
@@ -7378,17 +7554,20 @@ function createFarmThemeCssPlugin(input, basePath = "/") {
|
|
|
7378
7554
|
return {
|
|
7379
7555
|
name: "farm:theme-css",
|
|
7380
7556
|
enforce: "pre",
|
|
7381
|
-
transform
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7557
|
+
transform: {
|
|
7558
|
+
filter: { id: /\.css(?:\?.*)?$/, code: /@import\s+["']tailwindcss["']/ },
|
|
7559
|
+
handler(code, id) {
|
|
7560
|
+
if (!config.enabled || !/\.css(?:\?.*)?$/.test(id) || !/@import\s+["']tailwindcss["']/.test(code) || /@custom-variant\s+dark\b/.test(code)) {
|
|
7561
|
+
return null;
|
|
7562
|
+
}
|
|
7563
|
+
return {
|
|
7564
|
+
code: `${code.trimEnd()}
|
|
7387
7565
|
|
|
7388
7566
|
${FARM_DARK_VARIANT}
|
|
7389
7567
|
`,
|
|
7390
|
-
|
|
7391
|
-
|
|
7568
|
+
map: null
|
|
7569
|
+
};
|
|
7570
|
+
}
|
|
7392
7571
|
}
|
|
7393
7572
|
};
|
|
7394
7573
|
}
|
|
@@ -7428,4 +7607,8 @@ ${FARM_DARK_VARIANT}
|
|
|
7428
7607
|
|
|
7429
7608
|
|
|
7430
7609
|
|
|
7431
|
-
|
|
7610
|
+
|
|
7611
|
+
|
|
7612
|
+
|
|
7613
|
+
|
|
7614
|
+
exports.RouteManager = RouteManager; exports.resolveDevGlobalStylesheetHref = resolveDevGlobalStylesheetHref; exports.collectDevStylesheetUrls = collectDevStylesheetUrls; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.inferFarmIslandStrategy = inferFarmIslandStrategy; exports.resolveFarmRouteRootStrategy = resolveFarmRouteRootStrategy; exports.canBootFarmIslandsClient = canBootFarmIslandsClient; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.resolveFarmImageServerRuntime = resolveFarmImageServerRuntime; exports.resolveFarmAppPackages = resolveFarmAppPackages; exports.collectFarmWebMCPTools = collectFarmWebMCPTools; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE = FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE; exports.FARM_NAVIGATION_SCRIPT_SOURCE = FARM_NAVIGATION_SCRIPT_SOURCE; exports.FARM_NAVIGATION_STREAM_READER_SOURCE = FARM_NAVIGATION_STREAM_READER_SOURCE; exports.FARM_REFRESH_FIELDS_SOURCE = FARM_REFRESH_FIELDS_SOURCE; exports.exactIdPattern = exactIdPattern; exports.fileNamePattern = fileNamePattern; exports.redactFarmDocsClientConfig = redactFarmDocsClientConfig; exports.isFarmDocsClientConfigModule = isFarmDocsClientConfigModule; exports.farmDocsClientConfigPlugin = farmDocsClientConfigPlugin; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin;
|