@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,14 +1,14 @@
|
|
|
1
|
-
import { aH as FarmConfig, P as ParsedRoute,
|
|
2
|
-
import {
|
|
1
|
+
import { aH as FarmConfig, P as ParsedRoute, bs as ResolvedFarmRouteRuntimeConfig, bt as ApplicationMetadataRouteKind, i as RouteModule, aX as LayoutModule, b8 as SSGCollectionResult, G as FarmRedirectStatus, t as FarmRequest, u as FarmResponse, bu as ResolvedFarmAPIConfig, bv as FarmDocsResolvedConfig, bo as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, bw as ResolvedFarmDevIndicatorsConfig, bx as ResolvedFarmAuthConfig, by as ResolvedFarmPerformanceConfig, bz as ResolvedFarmSecurityConfig } from './client-plugins.d-D7dHV1Nf.js';
|
|
2
|
+
import { FarmWorkflowsResolvedConfig } from './workflows.js';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.js';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.js';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.js';
|
|
6
|
-
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-
|
|
6
|
+
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-CfJxuXZl.js';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-
|
|
8
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-DnIgriX1.js';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
|
|
10
10
|
import { FarmRenderer, FarmServerRendererRuntime } from './renderer.js';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan.d-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan.d-W6LmjD6y.js';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types.d-C41ePjvP.js';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime.d-BtL3PCL3.js';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types.d-DQnyD3VD.js';
|
|
@@ -301,7 +301,7 @@ declare class RouteManager {
|
|
|
301
301
|
* Log discovered routes for debugging
|
|
302
302
|
*/
|
|
303
303
|
private logRoutes;
|
|
304
|
-
/** The page routes
|
|
304
|
+
/** The page routes the docs runtime answers before Farm's own page rendering. */
|
|
305
305
|
private getDocsAdapterRoutes;
|
|
306
306
|
/**
|
|
307
307
|
* Collect SSG pages for static generation
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { aH as FarmConfig, P as ParsedRoute,
|
|
2
|
-
import {
|
|
1
|
+
import { aH as FarmConfig, P as ParsedRoute, bs as ResolvedFarmRouteRuntimeConfig, bt as ApplicationMetadataRouteKind, i as RouteModule, aX as LayoutModule, b8 as SSGCollectionResult, G as FarmRedirectStatus, t as FarmRequest, u as FarmResponse, bu as ResolvedFarmAPIConfig, bv as FarmDocsResolvedConfig, bo as FarmMarkdownResolvedConfig, h as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, bw as ResolvedFarmDevIndicatorsConfig, bx as ResolvedFarmAuthConfig, by as ResolvedFarmPerformanceConfig, bz as ResolvedFarmSecurityConfig } from './client-plugins.d-Do5ULA0x.mjs';
|
|
2
|
+
import { FarmWorkflowsResolvedConfig } from './workflows.mjs';
|
|
3
3
|
import { FarmCronResolvedConfig } from './cron.mjs';
|
|
4
4
|
import { R as ResolvedFarmImageConfig } from './image-config.d-ByhQ0TT7.mjs';
|
|
5
5
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
|
|
6
|
-
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-
|
|
6
|
+
import { I as IsolatedClientBoundaryReference, P as ProgrammaticClientRoutes } from './client-component.d-CnEeVvGG.mjs';
|
|
7
7
|
import { ViteDevServer } from 'vite';
|
|
8
|
-
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-
|
|
8
|
+
import { M as MetadataImageKind, c as createFarmDefaultMCPServer } from './agent-mcp.d-DOfBMEzP.mjs';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
|
|
10
10
|
import { FarmRenderer, FarmServerRendererRuntime } from './renderer.mjs';
|
|
11
|
-
import { F as FarmRouteRenderPlan } from './render-plan.d-
|
|
11
|
+
import { F as FarmRouteRenderPlan } from './render-plan.d-CzGDjcT0.mjs';
|
|
12
12
|
import { R as ResolvedFarmI18nConfig } from './types.d-C41ePjvP.mjs';
|
|
13
13
|
import { F as FarmI18nRuntime } from './runtime.d-3iJAKptR.mjs';
|
|
14
14
|
import { R as ResolvedFarmThemeConfig } from './types.d-DQnyD3VD.mjs';
|
|
@@ -301,7 +301,7 @@ declare class RouteManager {
|
|
|
301
301
|
* Log discovered routes for debugging
|
|
302
302
|
*/
|
|
303
303
|
private logRoutes;
|
|
304
|
-
/** The page routes
|
|
304
|
+
/** The page routes the docs runtime answers before Farm's own page rendering. */
|
|
305
305
|
private getDocsAdapterRoutes;
|
|
306
306
|
/**
|
|
307
307
|
* Collect SSG pages for static generation
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @internal Configure the app-wide URL preference for framework link rendering. */
|
|
2
2
|
declare function setFarmTrailingSlashPreference(enabled: boolean | undefined): void;
|
|
3
|
+
declare function normalizeFarmTrailingSlashPathname(pathname: string, enabled: boolean): string;
|
|
3
4
|
declare function resolveFarmTrailingSlashRedirect(url: URL, enabled: boolean): string | null;
|
|
4
5
|
|
|
5
6
|
/** @internal Configure the app-wide base path for framework link rendering. */
|
|
@@ -7,4 +8,4 @@ declare function setFarmBasePath(basePath: string | undefined): void;
|
|
|
7
8
|
declare function applyFarmBasePath(href: string, basePath?: string): string;
|
|
8
9
|
declare function stripFarmBasePath(pathname: string, basePath?: string): string;
|
|
9
10
|
|
|
10
|
-
export { setFarmTrailingSlashPreference as a, stripFarmBasePath as b, applyFarmBasePath as c, resolveFarmTrailingSlashRedirect as r, setFarmBasePath as s };
|
|
11
|
+
export { setFarmTrailingSlashPreference as a, stripFarmBasePath as b, applyFarmBasePath as c, normalizeFarmTrailingSlashPathname as n, resolveFarmTrailingSlashRedirect as r, setFarmBasePath as s };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @internal Configure the app-wide URL preference for framework link rendering. */
|
|
2
2
|
declare function setFarmTrailingSlashPreference(enabled: boolean | undefined): void;
|
|
3
|
+
declare function normalizeFarmTrailingSlashPathname(pathname: string, enabled: boolean): string;
|
|
3
4
|
declare function resolveFarmTrailingSlashRedirect(url: URL, enabled: boolean): string | null;
|
|
4
5
|
|
|
5
6
|
/** @internal Configure the app-wide base path for framework link rendering. */
|
|
@@ -7,4 +8,4 @@ declare function setFarmBasePath(basePath: string | undefined): void;
|
|
|
7
8
|
declare function applyFarmBasePath(href: string, basePath?: string): string;
|
|
8
9
|
declare function stripFarmBasePath(pathname: string, basePath?: string): string;
|
|
9
10
|
|
|
10
|
-
export { setFarmTrailingSlashPreference as a, stripFarmBasePath as b, applyFarmBasePath as c, resolveFarmTrailingSlashRedirect as r, setFarmBasePath as s };
|
|
11
|
+
export { setFarmTrailingSlashPreference as a, stripFarmBasePath as b, applyFarmBasePath as c, normalizeFarmTrailingSlashPathname as n, resolveFarmTrailingSlashRedirect as r, setFarmBasePath as s };
|
|
@@ -24,4 +24,5 @@ function resolveFarmTrailingSlashRedirect(url, enabled) {
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
exports.setFarmTrailingSlashPreference = setFarmTrailingSlashPreference; exports.getFarmTrailingSlashPreference = getFarmTrailingSlashPreference; exports.normalizeFarmTrailingSlashPathname = normalizeFarmTrailingSlashPathname; exports.resolveFarmTrailingSlashRedirect = resolveFarmTrailingSlashRedirect;
|
|
@@ -74,16 +74,25 @@ async function evaluateMdxSource(source, filePath) {
|
|
|
74
74
|
}
|
|
75
75
|
function createFarmMarkdownRouteModule(input) {
|
|
76
76
|
const { body } = parseMarkdownFrontmatter(input.source);
|
|
77
|
-
const components = input.components || {};
|
|
78
77
|
const className = _optionalChain([input, 'access', _6 => _6.config, 'optionalAccess', _7 => _7.className]) || "farm-markdown";
|
|
79
78
|
let evaluatedPromise;
|
|
79
|
+
let componentsPromise;
|
|
80
80
|
const loadContent = async () => {
|
|
81
81
|
_nullishCoalesce(evaluatedPromise, () => ( (evaluatedPromise = evaluateMdxSource(body, input.filePath))));
|
|
82
82
|
return evaluatedPromise;
|
|
83
83
|
};
|
|
84
|
+
const loadComponents = () => {
|
|
85
|
+
const configured = input.components;
|
|
86
|
+
if (typeof configured !== "function") return configured || {};
|
|
87
|
+
_nullishCoalesce(componentsPromise, () => ( (componentsPromise = configured().catch((error) => {
|
|
88
|
+
componentsPromise = void 0;
|
|
89
|
+
throw error;
|
|
90
|
+
}))));
|
|
91
|
+
return componentsPromise;
|
|
92
|
+
};
|
|
84
93
|
async function FarmMarkdownPage(props) {
|
|
85
94
|
const { createElement } = await import("react");
|
|
86
|
-
const evaluated = await loadContent();
|
|
95
|
+
const [evaluated, components] = await Promise.all([loadContent(), loadComponents()]);
|
|
87
96
|
const MDXContent = evaluated.default;
|
|
88
97
|
return createElement(
|
|
89
98
|
"article",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkASYOWPSRcjs = require('./chunk-ASYOWPSR.cjs');
|
|
4
4
|
|
|
5
5
|
// src/instrumentation.ts
|
|
6
6
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -9,12 +9,14 @@ var _url = require('url');
|
|
|
9
9
|
var INSTRUMENTATION_EXTENSIONS = ["ts", "mts", "js", "mjs"];
|
|
10
10
|
function resolveFarmInstrumentationFile(root, srcDir = "src") {
|
|
11
11
|
const candidates = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
.../* @__PURE__ */ new Set([
|
|
13
|
+
...INSTRUMENTATION_EXTENSIONS.map(
|
|
14
|
+
(extension) => _path2.default.join(root, srcDir, `instrumentation.${extension}`)
|
|
15
|
+
),
|
|
16
|
+
...INSTRUMENTATION_EXTENSIONS.map(
|
|
17
|
+
(extension) => _path2.default.join(root, `instrumentation.${extension}`)
|
|
18
|
+
)
|
|
19
|
+
])
|
|
18
20
|
].filter((candidate) => _fs2.default.existsSync(candidate));
|
|
19
21
|
if (candidates.length > 1) {
|
|
20
22
|
throw new Error(
|
|
@@ -30,7 +32,7 @@ async function loadFarmInstrumentation(filePath, root) {
|
|
|
30
32
|
const outputDirectory = _path2.default.join(root, ".farm", ".instrumentation-loader");
|
|
31
33
|
const outputFile = _path2.default.join(outputDirectory, "instrumentation.mjs");
|
|
32
34
|
await _fs2.default.promises.mkdir(outputDirectory, { recursive: true });
|
|
33
|
-
await
|
|
35
|
+
await _chunkASYOWPSRcjs.bundleNodeModule.call(void 0, {
|
|
34
36
|
root,
|
|
35
37
|
entry: filePath,
|
|
36
38
|
outfile: outputFile,
|
|
@@ -93,7 +93,7 @@ function formatFarmRscBlockingMessage(blockingKeys) {
|
|
|
93
93
|
var warnedFallback = false;
|
|
94
94
|
async function resolveFarmRscCheckConfig(config, root, mode) {
|
|
95
95
|
if (!config?.extends) return config;
|
|
96
|
-
const { resolveFarmLayers } = await import("./layers-
|
|
96
|
+
const { resolveFarmLayers } = await import("./layers-XQ7VFMWO.mjs");
|
|
97
97
|
return (await resolveFarmLayers(config, { root, mode })).config;
|
|
98
98
|
}
|
|
99
99
|
function farmAppUsesRscPipeline(config, root) {
|
|
@@ -127,7 +127,7 @@ function formatFarmRscIgnoredMessage(ignoredKeys) {
|
|
|
127
127
|
}
|
|
128
128
|
if (others.length < ignoredKeys.length) {
|
|
129
129
|
clauses.push(
|
|
130
|
-
"runs only the browser `client` hooks of `plugins` and ignores their other hooks."
|
|
130
|
+
"runs only the `configure` and browser `client` hooks of `plugins` and ignores their other hooks."
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
return `experimental.serverComponents runs on the RSC pipeline, which ${clauses.join(" It also ")}`;
|
|
@@ -29,7 +29,7 @@ var _chunkCQL5ZGFUcjs = require('./chunk-CQL5ZGFU.cjs');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkI7J5RLGOcjs = require('./chunk-I7J5RLGO.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
@@ -687,7 +687,7 @@ var SPARouter = class {
|
|
|
687
687
|
async requestPageData(path, recover, interceptFrom, activeLayoutChain, signal, cacheData, resolvePrefetch) {
|
|
688
688
|
const response = await fetch(`/__farm/page-data?path=${encodeURIComponent(path)}`, {
|
|
689
689
|
signal,
|
|
690
|
-
headers:
|
|
690
|
+
headers: _chunkI7J5RLGOcjs.createFarmDeploymentRequestHeaders.call(void 0, this.options.deploymentId, {
|
|
691
691
|
Accept: "application/x-farm-deferred+json, application/json",
|
|
692
692
|
"X-Farm-SPA": "1",
|
|
693
693
|
...activeLayoutChain ? { "X-Farm-Layout-Chain": activeLayoutChain } : {},
|
|
@@ -696,8 +696,8 @@ var SPARouter = class {
|
|
|
696
696
|
..._chunkCQL5ZGFUcjs.getFarmIslandValueHeaders.call(void 0, )
|
|
697
697
|
})
|
|
698
698
|
});
|
|
699
|
-
if (
|
|
700
|
-
const error =
|
|
699
|
+
if (_chunkI7J5RLGOcjs.isFarmDeploymentMismatchResponse.call(void 0, response, this.options.deploymentId)) {
|
|
700
|
+
const error = _chunkI7J5RLGOcjs.createFarmDeploymentMismatchError.call(void 0,
|
|
701
701
|
response,
|
|
702
702
|
this.options.deploymentId || "unknown"
|
|
703
703
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return 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; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _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; }
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkFVYBEMODcjs = require('./chunk-FVYBEMOD.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk6GQJVY4Ecjs = require('./chunk-6GQJVY4E.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -37,19 +37,31 @@ var _url = require('url');
|
|
|
37
37
|
function hasFarmDocsRuntimeAdapter(docs) {
|
|
38
38
|
return Boolean(_optionalChain([docs, 'optionalAccess', _ => _.enabled]) && _optionalChain([docs, 'access', _2 => _2.adapter, 'optionalAccess', _3 => _3.server]) && docs.adapter.react);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function farmDocsAdapterServesGuardedPages(docs) {
|
|
41
|
+
return Boolean(
|
|
42
|
+
hasFarmDocsRuntimeAdapter(docs) && _optionalChain([docs, 'access', _4 => _4.adapter, 'access', _5 => _5.capabilities, 'optionalAccess', _6 => _6.includes, 'call', _7 => _7("guarded-pages")])
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded, runtime = "node") {
|
|
41
46
|
if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
|
|
42
|
-
const
|
|
47
|
+
const servesGuardedPages = farmDocsAdapterServesGuardedPages(docs);
|
|
48
|
+
if (servesGuardedPages && runtime !== "edge") return;
|
|
49
|
+
const guarded = _chunkFVYBEMODcjs.getFarmDocsRoots.call(void 0, docs).flatMap((root) => _chunkFVYBEMODcjs.discoverFarmDocsPages.call(void 0, _chunkFVYBEMODcjs.resolveFarmDocsContentDir.call(void 0, root, options), root)).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunkFVYBEMODcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
|
|
43
50
|
if (guarded.length === 0) return;
|
|
51
|
+
if (servesGuardedPages) {
|
|
52
|
+
throw new Error(
|
|
53
|
+
`Docs pages behind a path guard (${guarded.join(", ")}) would be public on an edge target: the docs adapter ${JSON.stringify(docs.adapter.id)} serves a build-time snapshot of their content in llms-full.txt, search, Markdown, and MCP, where no guard runs. Deploy to a Node or serverless target, or move those pages out of the docs content directory.`
|
|
54
|
+
);
|
|
55
|
+
}
|
|
44
56
|
throw new Error(
|
|
45
|
-
`Docs pages behind a path guard (${guarded.join(", ")}) would be public: the docs adapter ${JSON.stringify(docs.adapter.id)} serves their content in llms-full.txt, search, Markdown, and MCP without running the app's guards.
|
|
57
|
+
`Docs pages behind a path guard (${guarded.join(", ")}) would be public: the docs adapter ${JSON.stringify(docs.adapter.id)} serves their content in llms-full.txt, search, Markdown, and MCP without running the app's guards. Upgrade the adapter to a release that keeps guarded pages off those surfaces (@farming-labs/farmjs declares it as the \`guarded-pages\` capability), move those pages out of the docs content directory, or set docs.adapter = false to use Farm's built-in docs runtime, which keeps guarded pages off anonymous surfaces.`
|
|
46
58
|
);
|
|
47
59
|
}
|
|
48
60
|
async function loadFarmDocsConfigModule(docs, loadModule) {
|
|
49
61
|
const configModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs);
|
|
50
62
|
if (!configModule) return void 0;
|
|
51
63
|
const loaded = await loadModule(configModule);
|
|
52
|
-
const config = _nullishCoalesce(_optionalChain([loaded, 'optionalAccess',
|
|
64
|
+
const config = _nullishCoalesce(_optionalChain([loaded, 'optionalAccess', _8 => _8.default]), () => ( loaded));
|
|
53
65
|
return config && typeof config === "object" ? config : void 0;
|
|
54
66
|
}
|
|
55
67
|
function getFarmDocsConfigModuleRoot(moduleConfig, entry) {
|
|
@@ -65,7 +77,7 @@ function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
|
65
77
|
...moduleConfig ? { ...getFarmDocsConfigModuleRoot(moduleConfig, docs.entry), ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
66
78
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
67
79
|
docsPath: docs.entry,
|
|
68
|
-
contentDir:
|
|
80
|
+
contentDir: _chunkFVYBEMODcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
|
|
69
81
|
};
|
|
70
82
|
}
|
|
71
83
|
function getFarmDocsAdapterStylesheets(options) {
|
|
@@ -77,7 +89,7 @@ async function compileFarmDocsAdapterEdgeManifest(docs, options) {
|
|
|
77
89
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
78
90
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
79
91
|
}
|
|
80
|
-
if (_optionalChain([docs, 'access',
|
|
92
|
+
if (_optionalChain([docs, 'access', _9 => _9.roots, 'optionalAccess', _10 => _10.length])) {
|
|
81
93
|
throw new Error(
|
|
82
94
|
"Several docs roots are not supported on edge deployments yet; they need a Node.js deployment target."
|
|
83
95
|
);
|
|
@@ -132,7 +144,7 @@ async function listFarmDocsAdapterPages(docs, options) {
|
|
|
132
144
|
if (typeof serverModule.listFarmDocsPages !== "function") return null;
|
|
133
145
|
const listPages = serverModule.listFarmDocsPages;
|
|
134
146
|
const pages = (await Promise.all(
|
|
135
|
-
|
|
147
|
+
_chunkFVYBEMODcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
136
148
|
(root) => listPages(createFarmDocsAdapterRuntimeConfig(root, options), { rootDir: options.root })
|
|
137
149
|
)
|
|
138
150
|
)).flat();
|
|
@@ -143,6 +155,12 @@ async function listFarmDocsAdapterPages(docs, options) {
|
|
|
143
155
|
}
|
|
144
156
|
return [...new Set(pages)];
|
|
145
157
|
}
|
|
158
|
+
async function listFarmDocsPagePaths(docs, options) {
|
|
159
|
+
if (options.adapter) return await _asyncNullishCoalesce(await listFarmDocsAdapterPages(docs, options), async () => ( []));
|
|
160
|
+
return _chunkFVYBEMODcjs.getFarmDocsRoots.call(void 0, docs).flatMap(
|
|
161
|
+
(root) => _chunkFVYBEMODcjs.discoverFarmDocsPages.call(void 0, _chunkFVYBEMODcjs.resolveFarmDocsContentDir.call(void 0, root, options), root).map(({ href }) => href)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
146
164
|
async function createFarmDocsAdapterHandler(docs, options) {
|
|
147
165
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
148
166
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
@@ -151,7 +169,7 @@ async function createFarmDocsAdapterHandler(docs, options) {
|
|
|
151
169
|
const serverModule = await options.loadModule(
|
|
152
170
|
docs.adapter.server
|
|
153
171
|
);
|
|
154
|
-
const multiRoot = Boolean(_optionalChain([docs, 'access',
|
|
172
|
+
const multiRoot = Boolean(_optionalChain([docs, 'access', _11 => _11.roots, 'optionalAccess', _12 => _12.length]));
|
|
155
173
|
const handlerExport = multiRoot ? "createFarmDocsMultiRuntimeHandler" : "createFarmDocsRuntimeHandler";
|
|
156
174
|
if (typeof serverModule[handlerExport] !== "function") {
|
|
157
175
|
const adapterId = JSON.stringify(docs.adapter.id);
|
|
@@ -167,11 +185,12 @@ async function createFarmDocsAdapterHandler(docs, options) {
|
|
|
167
185
|
stylesheets: getFarmDocsAdapterStylesheets(options),
|
|
168
186
|
resolveLayoutFonts: options.resolveLayoutFonts,
|
|
169
187
|
loadReactModule: () => options.loadModule(docs.adapter.react),
|
|
170
|
-
...options.registerMCPServer ? { registerMCPServer: options.registerMCPServer } : {}
|
|
188
|
+
...options.registerMCPServer ? { registerMCPServer: options.registerMCPServer } : {},
|
|
189
|
+
...options.isPathGuarded && farmDocsAdapterServesGuardedPages(docs) ? { isPathGuarded: options.isPathGuarded } : {}
|
|
171
190
|
};
|
|
172
191
|
if (multiRoot) {
|
|
173
192
|
return serverModule.createFarmDocsMultiRuntimeHandler(
|
|
174
|
-
|
|
193
|
+
_chunkFVYBEMODcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
175
194
|
(root) => createFarmDocsAdapterRuntimeConfig(root, options, moduleConfig)
|
|
176
195
|
),
|
|
177
196
|
handlerOptions
|
|
@@ -215,7 +234,7 @@ function omitHeadBody(response) {
|
|
|
215
234
|
});
|
|
216
235
|
}
|
|
217
236
|
function normalizeAction(value) {
|
|
218
|
-
return _optionalChain([value, 'optionalAccess',
|
|
237
|
+
return _optionalChain([value, 'optionalAccess', _13 => _13.trim, 'call', _14 => _14(), 'access', _15 => _15.toLowerCase, 'call', _16 => _16(), 'access', _17 => _17.replace, 'call', _18 => _18(/_/g, "-")]) || void 0;
|
|
219
238
|
}
|
|
220
239
|
function getDocsTitle(docs) {
|
|
221
240
|
return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
|
|
@@ -314,25 +333,25 @@ function getDocsAPIFormat(request) {
|
|
|
314
333
|
return normalizeAction(url.searchParams.get("format") || url.searchParams.get("type")) || getDocsAPIPathTarget(request).format;
|
|
315
334
|
}
|
|
316
335
|
function getDocsDescription(docs) {
|
|
317
|
-
return _optionalChain([docs, 'access',
|
|
336
|
+
return _optionalChain([docs, 'access', _19 => _19.config, 'access', _20 => _20.metadata, 'optionalAccess', _21 => _21.description]);
|
|
318
337
|
}
|
|
319
338
|
function getLoadedDocsPages(context) {
|
|
320
|
-
return
|
|
339
|
+
return _chunkFVYBEMODcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunkFVYBEMODcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
|
|
321
340
|
}
|
|
322
341
|
function toDocsSourcePage(page, basePath) {
|
|
323
342
|
return {
|
|
324
|
-
...
|
|
343
|
+
..._chunkFVYBEMODcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
|
|
325
344
|
sourcePath: page.sourcePath
|
|
326
345
|
};
|
|
327
346
|
}
|
|
328
347
|
function toDocsLlmsPage(page) {
|
|
329
|
-
return
|
|
348
|
+
return _chunkFVYBEMODcjs.toFarmDocsMarkdownPage.call(void 0, page);
|
|
330
349
|
}
|
|
331
350
|
function getDocsLlmsOptions(context, request) {
|
|
332
351
|
const configured = isRecord(context.docs.config.llmsTxt) ? context.docs.config.llmsTxt : {};
|
|
333
352
|
return {
|
|
334
353
|
enabled: true,
|
|
335
|
-
baseUrl:
|
|
354
|
+
baseUrl: _chunkFVYBEMODcjs.getFarmDocsSiteUrl.call(void 0, request, context.basePath),
|
|
336
355
|
siteTitle: getDocsTitle(context.docs),
|
|
337
356
|
siteDescription: getDocsDescription(context.docs),
|
|
338
357
|
...configured
|
|
@@ -373,7 +392,7 @@ function getDocsDiscoveryOptions(context, request) {
|
|
|
373
392
|
};
|
|
374
393
|
}
|
|
375
394
|
function buildSitemapManifest(context, request) {
|
|
376
|
-
return
|
|
395
|
+
return _chunkFVYBEMODcjs.buildFarmDocsSitemapManifest.call(void 0,
|
|
377
396
|
getLoadedDocsPages(context),
|
|
378
397
|
context.docs,
|
|
379
398
|
new URL(request.url).origin,
|
|
@@ -412,7 +431,7 @@ function renderAgentsDocument(context, request) {
|
|
|
412
431
|
function buildAgentSpec(context, request) {
|
|
413
432
|
const url = new URL(request.url);
|
|
414
433
|
const origin = url.origin;
|
|
415
|
-
const pages =
|
|
434
|
+
const pages = _chunkFVYBEMODcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
|
|
416
435
|
(page) => !context.isPathGuarded(page.href)
|
|
417
436
|
);
|
|
418
437
|
const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
|
|
@@ -428,7 +447,7 @@ function buildAgentSpec(context, request) {
|
|
|
428
447
|
},
|
|
429
448
|
entry: context.docs.entry,
|
|
430
449
|
routes: {
|
|
431
|
-
docs: `${origin}${
|
|
450
|
+
docs: `${origin}${_chunkFVYBEMODcjs.getFarmDocsPublicEntry.call(void 0, context.docs, context.basePath)}`,
|
|
432
451
|
config: `${origin}/api/docs?format=config`,
|
|
433
452
|
search: `${origin}/api/docs?query=<term>`,
|
|
434
453
|
markdown: `${origin}/api/docs/<slug>.md`,
|
|
@@ -501,7 +520,7 @@ function buildPublicConfig(context) {
|
|
|
501
520
|
};
|
|
502
521
|
}
|
|
503
522
|
function buildDiagnostics(context) {
|
|
504
|
-
const pages =
|
|
523
|
+
const pages = _chunkFVYBEMODcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
505
524
|
const diagnostics = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
|
|
506
525
|
entry: context.docs.entry,
|
|
507
526
|
mcp: {
|
|
@@ -551,19 +570,19 @@ async function searchDocs(context, request, query) {
|
|
|
551
570
|
const page = sourcePageByUrl.get(pageUrl);
|
|
552
571
|
return {
|
|
553
572
|
...result,
|
|
554
|
-
title: _optionalChain([page, 'optionalAccess',
|
|
555
|
-
href: _optionalChain([page, 'optionalAccess',
|
|
556
|
-
description: result.description || _optionalChain([page, 'optionalAccess',
|
|
573
|
+
title: _optionalChain([page, 'optionalAccess', _22 => _22.title]) || result.content,
|
|
574
|
+
href: _optionalChain([page, 'optionalAccess', _23 => _23.url]) || pageUrl,
|
|
575
|
+
description: result.description || _optionalChain([page, 'optionalAccess', _24 => _24.description])
|
|
557
576
|
};
|
|
558
577
|
});
|
|
559
578
|
}
|
|
560
579
|
async function resolveAPIContext(options) {
|
|
561
580
|
await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
|
|
562
581
|
const runtimeConfig = globalThis.__FARM_DOCS_RUNTIME_CONFIG__;
|
|
563
|
-
const root = options.rootDir || options.root || _optionalChain([runtimeConfig, 'optionalAccess',
|
|
564
|
-
const srcDir = options.srcDir || _optionalChain([runtimeConfig, 'optionalAccess',
|
|
582
|
+
const root = options.rootDir || options.root || _optionalChain([runtimeConfig, 'optionalAccess', _25 => _25.root]) || process.cwd();
|
|
583
|
+
const srcDir = options.srcDir || _optionalChain([runtimeConfig, 'optionalAccess', _26 => _26.srcDir]) || "src";
|
|
565
584
|
const canUseRuntimeDocs = options.docs === void 0 && options.config === void 0 && options.configPath === void 0 && options.entry === void 0 && options.docsPath === void 0 && options.contentDir === void 0 && options.root === void 0 && options.rootDir === void 0 && options.srcDir === void 0;
|
|
566
|
-
const docsInput = _nullishCoalesce(_nullishCoalesce(options.docs, () => ( (canUseRuntimeDocs ? _optionalChain([runtimeConfig, 'optionalAccess',
|
|
585
|
+
const docsInput = _nullishCoalesce(_nullishCoalesce(options.docs, () => ( (canUseRuntimeDocs ? _optionalChain([runtimeConfig, 'optionalAccess', _27 => _27.docs]) : void 0))), () => ( {
|
|
567
586
|
enabled: true,
|
|
568
587
|
entry: options.entry,
|
|
569
588
|
docsPath: options.docsPath,
|
|
@@ -571,16 +590,16 @@ async function resolveAPIContext(options) {
|
|
|
571
590
|
config: options.config,
|
|
572
591
|
configPath: options.configPath
|
|
573
592
|
}));
|
|
574
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
575
|
-
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess',
|
|
593
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunk6GQJVY4Ecjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
594
|
+
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _28 => _28.guardedPaths]), () => ( [])));
|
|
576
595
|
return {
|
|
577
596
|
root,
|
|
578
597
|
srcDir,
|
|
579
598
|
docs,
|
|
580
|
-
contentDir:
|
|
599
|
+
contentDir: _chunkFVYBEMODcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
|
|
581
600
|
diagnostics: options.diagnostics === true,
|
|
582
601
|
isPathGuarded: _nullishCoalesce(options.isPathGuarded, () => ( ((pathname) => guardedPaths.has(pathname)))),
|
|
583
|
-
basePath: _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, _nullishCoalesce(options.basePath, () => ( _optionalChain([runtimeConfig, 'optionalAccess',
|
|
602
|
+
basePath: _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, _nullishCoalesce(options.basePath, () => ( _optionalChain([runtimeConfig, 'optionalAccess', _29 => _29.basePath]))))
|
|
584
603
|
};
|
|
585
604
|
}
|
|
586
605
|
async function handleDocsAPIGet(request, context) {
|
|
@@ -625,22 +644,22 @@ async function handleDocsAPIGet(request, context) {
|
|
|
625
644
|
}
|
|
626
645
|
if (format === "robots") {
|
|
627
646
|
return text(
|
|
628
|
-
|
|
647
|
+
_chunkFVYBEMODcjs.renderFarmDocsRobotsTxt.call(void 0, context.docs, new URL(request.url).origin, context.basePath),
|
|
629
648
|
"text/plain; charset=utf-8"
|
|
630
649
|
);
|
|
631
650
|
}
|
|
632
651
|
if (format === "markdown" || url.pathname.endsWith(".md")) {
|
|
633
652
|
const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
|
|
634
653
|
const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
|
|
635
|
-
const page =
|
|
654
|
+
const page = _chunkFVYBEMODcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
|
|
636
655
|
if (!page || context.isPathGuarded(page.href)) {
|
|
637
656
|
return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
|
|
638
657
|
}
|
|
639
658
|
return text(
|
|
640
|
-
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(
|
|
659
|
+
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunkFVYBEMODcjs.toFarmDocsMarkdownPage.call(void 0, page, context.basePath), {
|
|
641
660
|
origin: new URL(request.url).origin,
|
|
642
661
|
llms: getDocsLlmsOptions(context, request),
|
|
643
|
-
sitemap:
|
|
662
|
+
sitemap: _chunkFVYBEMODcjs.toFarmDocsPublicSitemapConfig.call(void 0, context.docs.config.sitemap, context.basePath)
|
|
644
663
|
}),
|
|
645
664
|
"text/markdown; charset=utf-8"
|
|
646
665
|
);
|
|
@@ -712,4 +731,6 @@ function createFarmDocsAPIHandler(options = {}, cloudIntegration) {
|
|
|
712
731
|
|
|
713
732
|
|
|
714
733
|
|
|
715
|
-
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
exports.hasFarmDocsRuntimeAdapter = hasFarmDocsRuntimeAdapter; exports.farmDocsAdapterServesGuardedPages = farmDocsAdapterServesGuardedPages; exports.assertFarmDocsAdapterServesNoGuardedPages = assertFarmDocsAdapterServesNoGuardedPages; exports.getFarmDocsConfigModuleRoot = getFarmDocsConfigModuleRoot; exports.compileFarmDocsAdapterEdgeManifest = compileFarmDocsAdapterEdgeManifest; exports.listFarmDocsAdapterPages = listFarmDocsAdapterPages; exports.listFarmDocsPagePaths = listFarmDocsPagePaths; exports.createFarmDocsAdapterHandler = createFarmDocsAdapterHandler; exports.isFarmDocsAPIRequest = isFarmDocsAPIRequest; exports.createDocsAPI = createDocsAPI; exports.createFarmDocsAPIHandler = createFarmDocsAPIHandler;
|