@farm.js/core 0.1.51-beta.0 → 0.1.51-beta.2
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-BBMfNpsC.d.ts → agent-mcp.d-CR5Ov83o.d.ts} +1 -1
- package/dist/{agent-mcp-D44ip11f.d.mts → agent-mcp.d-Z5DuwrqW.d.mts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +13 -13
- package/dist/agent-runtime.d.ts +13 -13
- package/dist/agent-runtime.mjs +2 -2
- package/dist/{analyzer-VKUDHNDF.cjs → analyzer-T76CN3S7.cjs} +70 -21
- package/dist/{analyzer-HOUCQR3K.mjs → analyzer-Z6TNEAET.mjs} +70 -21
- package/dist/api/client.d.mts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/route-manager.d.mts +19 -19
- package/dist/api/route-manager.d.ts +19 -19
- package/dist/api/runtime.d.mts +15 -15
- package/dist/api/runtime.d.ts +15 -15
- package/dist/{api-client-CvI5oOBE.d.ts → api-client.d-BWcqZciH.d.ts} +3 -3
- package/dist/{api-client-CFdv-Xgh.d.mts → api-client.d-CeA6tNA6.d.mts} +3 -3
- package/dist/api.cjs +3 -3
- package/dist/api.d.mts +21 -21
- package/dist/api.d.ts +21 -21
- package/dist/api.mjs +2 -2
- package/dist/{app-manifest-LzjoNPeq.d.ts → app-manifest.d-CAHkOBFa.d.mts} +1 -1
- package/dist/{app-manifest-BC6mFn5A.d.mts → app-manifest.d-DiWr_Jfx.d.ts} +1 -1
- package/dist/app-markdown.d.mts +14 -14
- package/dist/app-markdown.d.ts +14 -14
- package/dist/{app-aeD4s_mg.d.mts → app.d-BfgJCsTQ.d.mts} +12 -10
- package/dist/{app-CourU3rQ.d.ts → app.d-DmapqkbV.d.ts} +12 -10
- package/dist/{chunk-AMRK3P6W.mjs → chunk-4SSRBCBR.mjs} +233 -84
- package/dist/{chunk-PDJSL7PL.cjs → chunk-5IONBVJY.cjs} +3 -3
- package/dist/{chunk-IOUOGRDX.cjs → chunk-5N7QAGEA.cjs} +25 -6
- package/dist/{chunk-DGOLAZLV.cjs → chunk-65Y5SIBH.cjs} +1 -1
- package/dist/{chunk-ZF3GX4O7.mjs → chunk-6CYQQQGR.mjs} +1 -1
- package/dist/{chunk-QI5AQMEE.mjs → chunk-72NBDVWQ.mjs} +1 -1
- package/dist/{chunk-I2ZA5SXS.mjs → chunk-74Z5KX4A.mjs} +53 -19
- package/dist/chunk-7FVVQEVL.cjs +541 -0
- package/dist/{chunk-OD6WM3I7.mjs → chunk-AV26KHTG.mjs} +1 -1
- package/dist/chunk-C3BOESDW.mjs +541 -0
- package/dist/{chunk-WAPQWAE6.cjs → chunk-CECUDGXQ.cjs} +9 -8
- package/dist/{chunk-IUQLRTTO.mjs → chunk-CO6UYM2D.mjs} +14 -1
- package/dist/{chunk-JF5CNHHF.mjs → chunk-CTM4SPB3.mjs} +123 -8
- package/dist/{chunk-WVX3BUNJ.mjs → chunk-CZ35L6PL.mjs} +8 -1
- package/dist/{chunk-SO3T6T4I.cjs → chunk-DTU4PX7V.cjs} +408 -259
- package/dist/{chunk-YLNBWUVS.mjs → chunk-E6LTONL4.mjs} +1 -1
- package/dist/{chunk-R5P4KFPM.mjs → chunk-E73PGHSR.mjs} +8 -6
- package/dist/{chunk-4GJJ65RB.mjs → chunk-EIMK7D2D.mjs} +24 -5
- package/dist/{chunk-CY7H5KS4.cjs → chunk-EKJYE4Y7.cjs} +2 -2
- package/dist/{chunk-3HA7PP72.mjs → chunk-FM2UEKS2.mjs} +60 -13
- package/dist/{chunk-VIFPE5RG.cjs → chunk-GNJIYJMS.cjs} +81 -34
- package/dist/{chunk-X5BCMLGP.cjs → chunk-GUJTVM36.cjs} +1 -1
- package/dist/{chunk-XWC5NAHV.mjs → chunk-IBSAYAWB.mjs} +2 -2
- package/dist/{chunk-J22JD5YJ.cjs → chunk-J3LBO2O4.cjs} +9 -7
- package/dist/{chunk-J37KTQIA.cjs → chunk-NK2VWS7P.cjs} +52 -3
- package/dist/{chunk-WSY2JD7O.mjs → chunk-NN3MOPSI.mjs} +1 -1
- package/dist/{chunk-O3MMJPC2.cjs → chunk-NPQLMP7M.cjs} +124 -9
- package/dist/{chunk-QK3HBOTG.cjs → chunk-NXBHYO7S.cjs} +5 -5
- package/dist/{chunk-S5ZA2T2W.mjs → chunk-PMKUU273.mjs} +21 -7
- package/dist/{chunk-75WWOZ5C.mjs → chunk-QOSDWGKT.mjs} +1 -1
- package/dist/{chunk-VO6NLTV4.cjs → chunk-QXPSWMUD.cjs} +3 -3
- package/dist/{chunk-Y7TLL65B.cjs → chunk-UQHIWZZ6.cjs} +11 -4
- package/dist/{chunk-PPDHCRTC.mjs → chunk-VS7EHLLW.mjs} +1 -1
- package/dist/{chunk-F42U3R4F.cjs → chunk-WZW6LEHM.cjs} +55 -41
- package/dist/{chunk-USL2ANCB.cjs → chunk-X2AMN2WV.cjs} +2 -2
- package/dist/{chunk-HHFMECFO.mjs → chunk-Y2G5SJFB.mjs} +2 -1
- package/dist/{chunk-Z5MZDFX4.cjs → chunk-YIHRZBD7.cjs} +14 -1
- package/dist/{chunk-DWW3AMJX.cjs → chunk-YU42A5MA.cjs} +282 -248
- package/dist/{chunk-MMEEXMUQ.cjs → chunk-ZOWNWHK6.cjs} +2 -2
- package/dist/{chunk-C5JXCUKR.mjs → chunk-ZQ5BDNKW.mjs} +51 -2
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-plugins-cqy_dQd0.d.mts → client-plugins.d-Bx3FXpqm.d.mts} +57 -15
- package/dist/{client-plugins-CFBEfVPO.d.ts → client-plugins.d-TiLbS5j4.d.ts} +57 -15
- package/dist/client-plugins.d.mts +13 -13
- package/dist/client-plugins.d.ts +13 -13
- package/dist/client.d.mts +24 -24
- package/dist/client.d.ts +24 -24
- package/dist/{config-CnhyvvmT.d.mts → config.d-iRPI16ku.d.mts} +6 -2
- package/dist/{config-CnhyvvmT.d.ts → config.d-iRPI16ku.d.ts} +6 -2
- package/dist/config.d.mts +13 -13
- package/dist/config.d.ts +13 -13
- package/dist/desktop.d.mts +14 -14
- package/dist/desktop.d.ts +14 -14
- package/dist/{dev-guard-YLO5DE3H.cjs → dev-guard-2UW2KERP.cjs} +2 -2
- package/dist/{dev-guard-4PFQNXQX.mjs → dev-guard-ONNMVQUN.mjs} +1 -1
- package/dist/{devtools-4ZLMD454.cjs → devtools-6XWCZIGO.cjs} +4 -4
- package/dist/{devtools-4MLL3RAL.mjs → devtools-UQLDAOEI.mjs} +3 -3
- package/dist/docs.cjs +8 -6
- package/dist/docs.d.mts +23 -15
- package/dist/docs.d.ts +23 -15
- package/dist/docs.mjs +7 -5
- package/dist/environment/vite.cjs +2 -2
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +1 -1
- package/dist/{generate-route-types-TF5Wwtvz.d.mts → generate-route-types.d-BL2pq6xC.d.ts} +1 -1
- package/dist/{generate-route-types-DQP0cUzk.d.ts → generate-route-types.d-BoVDU8qX.d.mts} +1 -1
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/image/server.d.mts +1 -1
- package/dist/image/server.d.ts +1 -1
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/index.cjs +20 -17
- package/dist/{index-D3l4tREW.d.ts → index.d-BNNDpql4.d.ts} +2 -2
- package/dist/{index-DPUAPho_.d.mts → index.d-BqcfqJvt.d.mts} +2 -2
- package/dist/{index-BxjN_UDZ.d.ts → index.d-YxJ2AiDF.d.mts} +2 -2
- package/dist/{index-BYkNbeQV.d.mts → index.d-yueUNipJ.d.ts} +2 -2
- package/dist/index.d.mts +42 -42
- package/dist/index.d.ts +42 -42
- package/dist/index.mjs +19 -16
- package/dist/instrumentation.d.mts +2 -2
- package/dist/instrumentation.d.ts +2 -2
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +13 -13
- package/dist/integrations.d.ts +13 -13
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +14 -14
- package/dist/internal/app-markdown-runtime.d.ts +14 -14
- package/dist/internal/build-runtime.cjs +16 -15
- package/dist/internal/build-runtime.d.mts +16 -16
- package/dist/internal/build-runtime.d.ts +16 -16
- package/dist/internal/build-runtime.mjs +15 -14
- package/dist/internal/cli-runtime.cjs +7 -7
- package/dist/internal/cli-runtime.mjs +6 -6
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +21 -21
- package/dist/internal/client-runtime.d.ts +21 -21
- package/dist/internal/compression-runtime.d.mts +13 -13
- package/dist/internal/compression-runtime.d.ts +13 -13
- package/dist/internal/config-runtime.cjs +5 -5
- package/dist/internal/config-runtime.d.mts +29 -92
- package/dist/internal/config-runtime.d.ts +29 -92
- package/dist/internal/config-runtime.mjs +4 -4
- package/dist/internal/form-actions.d.mts +1 -1
- package/dist/internal/form-actions.d.ts +1 -1
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/island-value-store.d.mts +1 -1
- package/dist/internal/island-value-store.d.ts +1 -1
- package/dist/internal/islands-runtime.d.mts +1 -1
- package/dist/internal/islands-runtime.d.ts +1 -1
- package/dist/internal/isolated-boundary.d.mts +2 -2
- package/dist/internal/isolated-boundary.d.ts +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +11 -3
- package/dist/internal/production-runtime.d.mts +57 -31
- package/dist/internal/production-runtime.d.ts +57 -31
- package/dist/internal/production-runtime.mjs +10 -2
- package/dist/internal/server-tree.d.mts +1 -1
- package/dist/internal/server-tree.d.ts +1 -1
- package/dist/markdown.d.mts +13 -13
- package/dist/markdown.d.ts +13 -13
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.d.mts +15 -15
- package/dist/middleware.d.ts +15 -15
- package/dist/middleware.mjs +3 -3
- package/dist/mobile.d.mts +7 -7
- package/dist/mobile.d.ts +7 -7
- package/dist/{navigation-delegate-BU4xqdnw.d.ts → navigation-delegate.d-BY1e_Xrh.d.ts} +1 -1
- package/dist/{navigation-delegate-DLhbfEN4.d.mts → navigation-delegate.d-HnDXhlyP.d.mts} +1 -1
- package/dist/navigation.d.mts +17 -17
- package/dist/navigation.d.ts +17 -17
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/plugin.cjs +11 -11
- package/dist/plugin.d.mts +17 -17
- package/dist/plugin.d.ts +17 -17
- package/dist/plugin.mjs +10 -10
- package/dist/{production-runtime-DLA4J5WG.d.mts → production-runtime.d-BpJUDzP8.d.mts} +3 -3
- package/dist/{production-runtime-C78A8YgK.d.ts → production-runtime.d-lMjvE9cf.d.ts} +3 -3
- package/dist/{programmatic-routes-client-NpqGBn-i.d.mts → programmatic-routes-client.d-6CGQ3TCk.d.mts} +10 -2
- package/dist/{programmatic-routes-client-CBqkNhBy.d.ts → programmatic-routes-client.d-BlFp5hv4.d.ts} +10 -2
- package/dist/query/client.d.mts +1 -1
- package/dist/query/client.d.ts +1 -1
- package/dist/query/index.d.mts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/server.d.mts +1 -1
- package/dist/query/server.d.ts +1 -1
- package/dist/{render-plan-CrqcBbnV.d.ts → render-plan.d-BH9edqKs.d.mts} +2 -2
- package/dist/{render-plan-C9sWvDTv.d.mts → render-plan.d-DhP0mTHF.d.ts} +2 -2
- package/dist/renderer-client.d.mts +19 -19
- package/dist/renderer-client.d.ts +19 -19
- package/dist/{request-BizeuqD7.d.ts → request.d-BVZrsR1v.d.ts} +1 -1
- package/dist/{request-WwB1-Uim.d.mts → request.d-DJFRdKi8.d.mts} +1 -1
- package/dist/request.d.mts +14 -14
- package/dist/request.d.ts +14 -14
- package/dist/{resolver-CJ-D9nP-.d.ts → resolver.d-BHyZgpa7.d.ts} +1 -1
- package/dist/{resolver-TDyZKgKI.d.mts → resolver.d-JnZKKsc5.d.mts} +1 -1
- package/dist/response.d-BolW0Vx_.d.mts +10 -0
- package/dist/response.d-BolW0Vx_.d.ts +10 -0
- package/dist/{route-rendering-BGhJN64l.d.ts → route-rendering.d-B00JtK_-.d.ts} +1 -1
- package/dist/{route-rendering-S6NFjnx4.d.mts → route-rendering.d-Bpmw7PED.d.mts} +1 -1
- package/dist/{route-2_yXC6gv.d.mts → route.d-BaVH3V0w.d.mts} +1 -1
- package/dist/{route-DFhZj6jN.d.ts → route.d-DBTEqifW.d.ts} +1 -1
- package/dist/{router-BUD_j2EL.d.ts → router.d-Bd1x9XxQ.d.ts} +1 -1
- package/dist/{router-BIheIy9G.d.mts → router.d-e0jQ3jQ-.d.mts} +1 -1
- package/dist/{routes-kEUsXHx3.d.mts → routes.d-Cmv8TgVq.d.mts} +91 -4
- package/dist/{routes-8PT9cl60.d.ts → routes.d-D96Dq9lz.d.ts} +91 -4
- package/dist/routes.d.mts +13 -13
- package/dist/routes.d.ts +13 -13
- package/dist/{rsc-pipeline-JRGUZBYM.cjs → rsc-pipeline-DX4OC5FN.cjs} +6 -6
- package/dist/{rsc-pipeline-OLAVIKI3.mjs → rsc-pipeline-ZQ4CTVEG.mjs} +5 -5
- package/dist/{runtime-OGCHDACZ.mjs → runtime-NPDRDV6R.mjs} +66 -17
- package/dist/{runtime-G23RSLEK.cjs → runtime-NQ3EDSA7.cjs} +75 -26
- package/dist/{runtime-CihDZ2Rn.d.mts → runtime.d-3iJAKptR.d.mts} +2 -2
- package/dist/{runtime-C4CmlOOh.d.ts → runtime.d-BtL3PCL3.d.ts} +2 -2
- package/dist/{runtime-CWP-21hP.d.ts → runtime.d-CgB3IJDq.d.mts} +4 -4
- package/dist/{runtime-CgJwe6H_.d.mts → runtime.d-D-td-RR3.d.ts} +4 -4
- package/dist/server-action-security.d.mts +1 -1
- package/dist/server-action-security.d.ts +1 -1
- package/dist/server-fn-client.d.mts +5 -5
- package/dist/server-fn-client.d.ts +5 -5
- package/dist/server-fn.d.mts +3 -3
- package/dist/server-fn.d.ts +3 -3
- package/dist/server-plugins.d.mts +14 -14
- package/dist/server-plugins.d.ts +14 -14
- package/dist/server-query-client.d.mts +5 -5
- package/dist/server-query-client.d.ts +5 -5
- package/dist/server-query.d.mts +2 -2
- package/dist/server-query.d.ts +2 -2
- package/dist/server.cjs +31 -31
- package/dist/server.d.mts +28 -29
- package/dist/server.d.ts +28 -29
- package/dist/server.mjs +13 -13
- package/dist/session-AAU7RNRO.cjs +23 -0
- package/dist/session-IGEDQ5PY.mjs +23 -0
- package/dist/{spa-router-Kytv4jSB.d.ts → spa-router.d-BWDhS0FK.d.mts} +5 -5
- package/dist/{spa-router-CVOL0Vrq.d.mts → spa-router.d-CO01mVOM.d.ts} +5 -5
- package/dist/storage.d.mts +2 -2
- package/dist/storage.d.ts +2 -2
- package/dist/testing.d.mts +14 -14
- package/dist/testing.d.ts +14 -14
- package/dist/theme/client.d.mts +1 -1
- package/dist/theme/client.d.ts +1 -1
- package/dist/theme/index.d.mts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/runtime.d.mts +1 -1
- package/dist/theme/runtime.d.ts +1 -1
- package/dist/theme/server.d.mts +1 -1
- package/dist/theme/server.d.ts +1 -1
- package/dist/{utils-DbyXlzaj.d.ts → utils.d-B77__yh8.d.ts} +1 -1
- package/dist/{utils-Dsa1HZ7X.d.mts → utils.d-DRDazhCA.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +11 -11
- package/dist/vite.d.mts +20 -19
- package/dist/vite.d.ts +20 -19
- package/dist/vite.mjs +10 -10
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/package.json +5 -5
- /package/dist/{base-path-BOUV5ozD.d.mts → base-path.d-BOUV5ozD.d.mts} +0 -0
- /package/dist/{base-path-BOUV5ozD.d.ts → base-path.d-BOUV5ozD.d.ts} +0 -0
- /package/dist/{chunk-recovery-lnQFzcQP.d.mts → chunk-recovery.d-lnQFzcQP.d.mts} +0 -0
- /package/dist/{chunk-recovery-lnQFzcQP.d.ts → chunk-recovery.d-lnQFzcQP.d.ts} +0 -0
- /package/dist/{client-cache-Deoqq-nM.d.ts → client-cache.d-Deoqq-nM.d.ts} +0 -0
- /package/dist/{client-cache-di_Nasxa.d.mts → client-cache.d-di_Nasxa.d.mts} +0 -0
- /package/dist/{endpoint-BgHn0lhl.d.ts → endpoint.d-BgHn0lhl.d.ts} +0 -0
- /package/dist/{endpoint-BkMSCRf6.d.mts → endpoint.d-BkMSCRf6.d.mts} +0 -0
- /package/dist/{image-config-CeDgNyX4.d.mts → image-config.d-CeDgNyX4.d.mts} +0 -0
- /package/dist/{image-config-CeDgNyX4.d.ts → image-config.d-CeDgNyX4.d.ts} +0 -0
- /package/dist/{instrumentation-runtime-CX9Zh-16.d.mts → instrumentation-runtime.d-CX9Zh-16.d.mts} +0 -0
- /package/dist/{instrumentation-runtime-CX9Zh-16.d.ts → instrumentation-runtime.d-CX9Zh-16.d.ts} +0 -0
- /package/dist/{island-value-protocol-BRayRghM.d.mts → island-value-protocol.d-BRayRghM.d.mts} +0 -0
- /package/dist/{island-value-protocol-BRayRghM.d.ts → island-value-protocol.d-BRayRghM.d.ts} +0 -0
- /package/dist/{island-CfGru1MO.d.mts → island.d-CfGru1MO.d.mts} +0 -0
- /package/dist/{island-CfGru1MO.d.ts → island.d-CfGru1MO.d.ts} +0 -0
- /package/dist/{layers-CcS42OGR.d.mts → layers.d-CcS42OGR.d.mts} +0 -0
- /package/dist/{layers-CcS42OGR.d.ts → layers.d-CcS42OGR.d.ts} +0 -0
- /package/dist/{lifecycle-C2aLBOwu.d.mts → lifecycle.d-C2aLBOwu.d.mts} +0 -0
- /package/dist/{lifecycle-C2aLBOwu.d.ts → lifecycle.d-C2aLBOwu.d.ts} +0 -0
- /package/dist/{observability-B2363jB6.d.mts → observability.d-B2363jB6.d.mts} +0 -0
- /package/dist/{observability-B2363jB6.d.ts → observability.d-B2363jB6.d.ts} +0 -0
- /package/dist/{params-BALtrRim.d.ts → params.d-BALtrRim.d.ts} +0 -0
- /package/dist/{params-ry-lxqmy.d.mts → params.d-ry-lxqmy.d.mts} +0 -0
- /package/dist/{production-vite-BQFAlG7n.d.mts → production-vite.d-BQFAlG7n.d.mts} +0 -0
- /package/dist/{production-vite-BQFAlG7n.d.ts → production-vite.d-BQFAlG7n.d.ts} +0 -0
- /package/dist/{route-pattern-CVsVbq5n.d.mts → route-pattern.d-CVsVbq5n.d.mts} +0 -0
- /package/dist/{route-pattern-CVsVbq5n.d.ts → route-pattern.d-CVsVbq5n.d.ts} +0 -0
- /package/dist/{server-client-bridge-DKWDl5NB.d.mts → server-client-bridge.d-DKWDl5NB.d.mts} +0 -0
- /package/dist/{server-client-bridge-DKWDl5NB.d.ts → server-client-bridge.d-DKWDl5NB.d.ts} +0 -0
- /package/dist/{server-fn-error-DrcH9cc1.d.mts → server-fn-error.d-DrcH9cc1.d.mts} +0 -0
- /package/dist/{server-fn-error-DrcH9cc1.d.ts → server-fn-error.d-DrcH9cc1.d.ts} +0 -0
- /package/dist/{server-query-runtime-DXRNhX_3.d.ts → server-query-runtime.d-DXRNhX_3.d.ts} +0 -0
- /package/dist/{server-query-runtime-aP52iuL5.d.mts → server-query-runtime.d-aP52iuL5.d.mts} +0 -0
- /package/dist/{types-BnIqOn9w.d.mts → types.d-BnIqOn9w.d.mts} +0 -0
- /package/dist/{types-BnIqOn9w.d.ts → types.d-BnIqOn9w.d.ts} +0 -0
- /package/dist/{types-C41ePjvP.d.mts → types.d-C41ePjvP.d.mts} +0 -0
- /package/dist/{types-C41ePjvP.d.ts → types.d-C41ePjvP.d.ts} +0 -0
- /package/dist/{types-DQnyD3VD.d.mts → types.d-DQnyD3VD.d.mts} +0 -0
- /package/dist/{types-DQnyD3VD.d.ts → types.d-DQnyD3VD.d.ts} +0 -0
- /package/dist/{workflows-CRMzQZ3k.d.mts → workflows.d-CRMzQZ3k.d.mts} +0 -0
- /package/dist/{workflows-CRMzQZ3k.d.ts → workflows.d-CRMzQZ3k.d.ts} +0 -0
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-LM2YOGDK.mjs";
|
|
24
24
|
import {
|
|
25
25
|
FARM_VERSION
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6CYQQQGR.mjs";
|
|
27
27
|
import {
|
|
28
28
|
applyFarmBasePath
|
|
29
29
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -441,14 +441,16 @@ function resolveFarmDocsRouteLabel(routePathname, docs) {
|
|
|
441
441
|
const apiPath = normalize(docs.apiPath ?? "/api/docs");
|
|
442
442
|
if (pathname === apiPath) return apiPath;
|
|
443
443
|
if (pathname.startsWith(`${apiPath}/`)) return `${apiPath}/[...path]`;
|
|
444
|
-
const entry = normalize(docs.path);
|
|
445
|
-
const base = entry === "/" ? "" : entry;
|
|
446
444
|
const markdown = pathname.toLowerCase().endsWith(".md");
|
|
447
445
|
const page = markdown ? pathname.slice(0, -".md".length) : pathname;
|
|
448
|
-
|
|
449
|
-
|
|
446
|
+
const entries = [docs.path, ...docs.roots ?? []].map(normalize).sort((a, b) => b.length - a.length);
|
|
447
|
+
for (const entry of entries) {
|
|
448
|
+
const base = entry === "/" ? "" : entry;
|
|
449
|
+
if (page === entry || entry === "/" && page === "/index") {
|
|
450
|
+
return markdown ? getFarmMarkdownMirrorPath(entry) : entry;
|
|
451
|
+
}
|
|
452
|
+
if (page.startsWith(`${base}/`)) return `${base}/[...slug]${markdown ? ".md" : ""}`;
|
|
450
453
|
}
|
|
451
|
-
if (page.startsWith(`${base}/`)) return `${base}/[...slug]${markdown ? ".md" : ""}`;
|
|
452
454
|
return null;
|
|
453
455
|
}
|
|
454
456
|
function resolveFarmDocsEngineRouteLabel(routePathname, docs) {
|
|
@@ -651,16 +651,34 @@ function resolveFarmDocsContentDir(docs, options) {
|
|
|
651
651
|
if (existsSync2(appDocsDir)) return appDocsDir;
|
|
652
652
|
return path2.join(root, entryDir);
|
|
653
653
|
}
|
|
654
|
+
function getFarmDocsRoots(docs) {
|
|
655
|
+
return [
|
|
656
|
+
docs,
|
|
657
|
+
...(docs.roots ?? []).map((root) => ({
|
|
658
|
+
...docs,
|
|
659
|
+
entry: root.entry,
|
|
660
|
+
contentDir: root.contentDir,
|
|
661
|
+
config: root.config,
|
|
662
|
+
runtimeConfig: root.runtimeConfig,
|
|
663
|
+
configOverrides: root.configOverrides,
|
|
664
|
+
roots: void 0
|
|
665
|
+
}))
|
|
666
|
+
];
|
|
667
|
+
}
|
|
654
668
|
function getFarmDocsRouteTypeEntries(docs) {
|
|
655
669
|
if (!docs?.enabled) return [];
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
670
|
+
return getFarmDocsRoots(docs).flatMap((root) => {
|
|
671
|
+
const entry = normalizeEntry2(root.entry);
|
|
672
|
+
if (entry === "/") return ["/", "/[...docs]"];
|
|
673
|
+
return [entry, `${entry}/[...docs]`];
|
|
674
|
+
});
|
|
659
675
|
}
|
|
660
676
|
function getFarmDocsDocumentNavigationMatchers(docs) {
|
|
661
677
|
if (!docs?.enabled) return [];
|
|
662
|
-
|
|
663
|
-
|
|
678
|
+
return getFarmDocsRoots(docs).map((root) => {
|
|
679
|
+
const entry = normalizeEntry2(root.entry);
|
|
680
|
+
return entry === "/" ? "/(.*)" : `${entry}(.*)`;
|
|
681
|
+
});
|
|
664
682
|
}
|
|
665
683
|
function getRequestSlug(docs, request) {
|
|
666
684
|
const pathname = new URL(request.url).pathname;
|
|
@@ -1921,6 +1939,7 @@ export {
|
|
|
1921
1939
|
createFarmDocsLastModifiedManifest,
|
|
1922
1940
|
isFarmDocsRequest,
|
|
1923
1941
|
resolveFarmDocsContentDir,
|
|
1942
|
+
getFarmDocsRoots,
|
|
1924
1943
|
getFarmDocsRouteTypeEntries,
|
|
1925
1944
|
getFarmDocsDocumentNavigationMatchers,
|
|
1926
1945
|
loadFarmDocsPage,
|
|
@@ -29,7 +29,7 @@ var _chunkSYW346ZNcjs = require('./chunk-SYW346ZN.cjs');
|
|
|
29
29
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkCECUDGXQcjs = require('./chunk-CECUDGXQ.cjs');
|
|
33
33
|
|
|
34
34
|
// src/schema-dependencies.ts
|
|
35
35
|
function collectSchemaDependencies(owners) {
|
|
@@ -115,7 +115,7 @@ async function withTimeout(work, timeoutMs) {
|
|
|
115
115
|
var formatSeconds = (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`;
|
|
116
116
|
function collectSchemaOwners(config) {
|
|
117
117
|
const owners = [];
|
|
118
|
-
const integrationSchemas =
|
|
118
|
+
const integrationSchemas = _chunkCECUDGXQcjs.getIntegrationSchemas.call(void 0, config.integrations);
|
|
119
119
|
let integrationClient;
|
|
120
120
|
for (const [name, schema] of Object.entries(integrationSchemas)) {
|
|
121
121
|
owners.push({
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
discoverFarmDocsPages,
|
|
3
3
|
getFarmDocsMarkdownPath,
|
|
4
|
+
getFarmDocsRoots,
|
|
4
5
|
loadFarmDocsPage,
|
|
5
6
|
resolveFarmDocsContentDir,
|
|
6
7
|
toFarmDocsMarkdownPage
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EIMK7D2D.mjs";
|
|
8
9
|
import {
|
|
9
10
|
docsEngine,
|
|
10
11
|
loadFarmDocsEngine
|
|
11
12
|
} from "./chunk-VE3FWJBO.mjs";
|
|
12
13
|
import {
|
|
13
14
|
resolveDocsConfig
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CTM4SPB3.mjs";
|
|
15
16
|
import {
|
|
16
17
|
getFarmDocsAdapterConfigModule,
|
|
17
18
|
isSecretDocsConfigKey
|
|
@@ -26,7 +27,7 @@ function hasFarmDocsRuntimeAdapter(docs) {
|
|
|
26
27
|
}
|
|
27
28
|
function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded) {
|
|
28
29
|
if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
|
|
29
|
-
const guarded = discoverFarmDocsPages(resolveFarmDocsContentDir(
|
|
30
|
+
const guarded = getFarmDocsRoots(docs).flatMap((root) => discoverFarmDocsPages(resolveFarmDocsContentDir(root, options), root)).filter((page) => isPathGuarded(page.href) || isPathGuarded(getFarmDocsMarkdownPath(page.href))).map((page) => page.href);
|
|
30
31
|
if (guarded.length === 0) return;
|
|
31
32
|
throw new Error(
|
|
32
33
|
`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. 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.`
|
|
@@ -39,9 +40,17 @@ async function loadFarmDocsConfigModule(docs, loadModule) {
|
|
|
39
40
|
const config = loaded?.default ?? loaded;
|
|
40
41
|
return config && typeof config === "object" ? config : void 0;
|
|
41
42
|
}
|
|
43
|
+
function getFarmDocsConfigModuleRoot(moduleConfig, entry) {
|
|
44
|
+
const { roots, ...shared } = moduleConfig;
|
|
45
|
+
const route = entry.replace(/^\/+|\/+$/g, "");
|
|
46
|
+
const own = Array.isArray(roots) ? roots.find(
|
|
47
|
+
(root) => Boolean(root) && typeof root === "object" && typeof root.entry === "string" && root.entry.replace(/^\/+|\/+$/g, "") === route
|
|
48
|
+
) : void 0;
|
|
49
|
+
return own ? { ...shared, ...own } : shared;
|
|
50
|
+
}
|
|
42
51
|
function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
43
52
|
return {
|
|
44
|
-
...moduleConfig ? { ...moduleConfig, ...docs.configOverrides } : docs.runtimeConfig ?? docs.config,
|
|
53
|
+
...moduleConfig ? { ...getFarmDocsConfigModuleRoot(moduleConfig, docs.entry), ...docs.configOverrides } : docs.runtimeConfig ?? docs.config,
|
|
45
54
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
46
55
|
docsPath: docs.entry,
|
|
47
56
|
contentDir: resolveFarmDocsContentDir(docs, options)
|
|
@@ -56,6 +65,11 @@ async function compileFarmDocsAdapterEdgeManifest(docs, options) {
|
|
|
56
65
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
57
66
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
58
67
|
}
|
|
68
|
+
if (docs.roots?.length) {
|
|
69
|
+
throw new Error(
|
|
70
|
+
"Several docs roots are not supported on edge deployments yet; they need a Node.js deployment target."
|
|
71
|
+
);
|
|
72
|
+
}
|
|
59
73
|
const compilerEntry = docs.adapter.edgeCompiler;
|
|
60
74
|
if (!compilerEntry) {
|
|
61
75
|
throw new Error(
|
|
@@ -96,6 +110,27 @@ async function compileFarmDocsAdapterEdgeManifest(docs, options) {
|
|
|
96
110
|
}
|
|
97
111
|
return manifest;
|
|
98
112
|
}
|
|
113
|
+
async function listFarmDocsAdapterPages(docs, options) {
|
|
114
|
+
if (!hasFarmDocsRuntimeAdapter(docs)) return null;
|
|
115
|
+
const requireFromApp = createRequire(path.join(options.root, "package.json"));
|
|
116
|
+
const serverModule = await import(
|
|
117
|
+
/* @vite-ignore */
|
|
118
|
+
pathToFileURL(requireFromApp.resolve(docs.adapter.server)).href
|
|
119
|
+
);
|
|
120
|
+
if (typeof serverModule.listFarmDocsPages !== "function") return null;
|
|
121
|
+
const listPages = serverModule.listFarmDocsPages;
|
|
122
|
+
const pages = (await Promise.all(
|
|
123
|
+
getFarmDocsRoots(docs).map(
|
|
124
|
+
(root) => listPages(createFarmDocsAdapterRuntimeConfig(root, options), { rootDir: options.root })
|
|
125
|
+
)
|
|
126
|
+
)).flat();
|
|
127
|
+
if (!Array.isArray(pages) || pages.some((page) => typeof page !== "string" || !page.startsWith("/"))) {
|
|
128
|
+
throw new Error(
|
|
129
|
+
`Farm docs adapter ${JSON.stringify(docs.adapter.id)} listed docs pages that are not absolute paths.`
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
return [...new Set(pages)];
|
|
133
|
+
}
|
|
99
134
|
async function createFarmDocsAdapterHandler(docs, options) {
|
|
100
135
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
101
136
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
@@ -104,26 +139,36 @@ async function createFarmDocsAdapterHandler(docs, options) {
|
|
|
104
139
|
const serverModule = await options.loadModule(
|
|
105
140
|
docs.adapter.server
|
|
106
141
|
);
|
|
107
|
-
|
|
142
|
+
const multiRoot = Boolean(docs.roots?.length);
|
|
143
|
+
const handlerExport = multiRoot ? "createFarmDocsMultiRuntimeHandler" : "createFarmDocsRuntimeHandler";
|
|
144
|
+
if (typeof serverModule[handlerExport] !== "function") {
|
|
108
145
|
const adapterId = JSON.stringify(docs.adapter.id);
|
|
109
146
|
const serverEntry = JSON.stringify(docs.adapter.server);
|
|
110
147
|
throw new Error(
|
|
111
|
-
`Farm docs adapter ${adapterId} does not export
|
|
148
|
+
`Farm docs adapter ${adapterId} does not export ${handlerExport} from ${serverEntry}. ` + (multiRoot ? "Upgrade the adapter to a release that serves several docs roots, or remove the roots." : "Upgrade the adapter to a runtime-enabled release.")
|
|
112
149
|
);
|
|
113
150
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
options,
|
|
117
|
-
await loadFarmDocsConfigModule(docs, options.loadModule)
|
|
118
|
-
);
|
|
119
|
-
return serverModule.createFarmDocsRuntimeHandler(runtimeConfig, {
|
|
151
|
+
const moduleConfig = await loadFarmDocsConfigModule(docs, options.loadModule);
|
|
152
|
+
const handlerOptions = {
|
|
120
153
|
rootDir: options.root,
|
|
121
154
|
clientEntry: options.clientEntry,
|
|
122
155
|
stylesheets: getFarmDocsAdapterStylesheets(options),
|
|
123
156
|
resolveLayoutFonts: options.resolveLayoutFonts,
|
|
124
157
|
loadReactModule: () => options.loadModule(docs.adapter.react),
|
|
125
158
|
...options.registerMCPServer ? { registerMCPServer: options.registerMCPServer } : {}
|
|
126
|
-
}
|
|
159
|
+
};
|
|
160
|
+
if (multiRoot) {
|
|
161
|
+
return serverModule.createFarmDocsMultiRuntimeHandler(
|
|
162
|
+
getFarmDocsRoots(docs).map(
|
|
163
|
+
(root) => createFarmDocsAdapterRuntimeConfig(root, options, moduleConfig)
|
|
164
|
+
),
|
|
165
|
+
handlerOptions
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
return serverModule.createFarmDocsRuntimeHandler(
|
|
169
|
+
createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig),
|
|
170
|
+
handlerOptions
|
|
171
|
+
);
|
|
127
172
|
}
|
|
128
173
|
|
|
129
174
|
// src/docs/api.ts
|
|
@@ -658,7 +703,9 @@ function createFarmDocsAPIHandler(options = {}, cloudIntegration) {
|
|
|
658
703
|
export {
|
|
659
704
|
hasFarmDocsRuntimeAdapter,
|
|
660
705
|
assertFarmDocsAdapterServesNoGuardedPages,
|
|
706
|
+
getFarmDocsConfigModuleRoot,
|
|
661
707
|
compileFarmDocsAdapterEdgeManifest,
|
|
708
|
+
listFarmDocsAdapterPages,
|
|
662
709
|
createFarmDocsAdapterHandler,
|
|
663
710
|
isFarmDocsAPIRequest,
|
|
664
711
|
createDocsAPI,
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
var _chunk5N7QAGEAcjs = require('./chunk-5N7QAGEA.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
var
|
|
15
|
+
var _chunkNPQLMP7Mcjs = require('./chunk-NPQLMP7M.cjs');
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
@@ -26,7 +27,7 @@ function hasFarmDocsRuntimeAdapter(docs) {
|
|
|
26
27
|
}
|
|
27
28
|
function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded) {
|
|
28
29
|
if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
|
|
29
|
-
const guarded =
|
|
30
|
+
const guarded = _chunk5N7QAGEAcjs.getFarmDocsRoots.call(void 0, docs).flatMap((root) => _chunk5N7QAGEAcjs.discoverFarmDocsPages.call(void 0, _chunk5N7QAGEAcjs.resolveFarmDocsContentDir.call(void 0, root, options), root)).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunk5N7QAGEAcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
|
|
30
31
|
if (guarded.length === 0) return;
|
|
31
32
|
throw new Error(
|
|
32
33
|
`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. 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.`
|
|
@@ -39,12 +40,20 @@ async function loadFarmDocsConfigModule(docs, loadModule) {
|
|
|
39
40
|
const config = _nullishCoalesce(_optionalChain([loaded, 'optionalAccess', _4 => _4.default]), () => ( loaded));
|
|
40
41
|
return config && typeof config === "object" ? config : void 0;
|
|
41
42
|
}
|
|
43
|
+
function getFarmDocsConfigModuleRoot(moduleConfig, entry) {
|
|
44
|
+
const { roots, ...shared } = moduleConfig;
|
|
45
|
+
const route = entry.replace(/^\/+|\/+$/g, "");
|
|
46
|
+
const own = Array.isArray(roots) ? roots.find(
|
|
47
|
+
(root) => Boolean(root) && typeof root === "object" && typeof root.entry === "string" && root.entry.replace(/^\/+|\/+$/g, "") === route
|
|
48
|
+
) : void 0;
|
|
49
|
+
return own ? { ...shared, ...own } : shared;
|
|
50
|
+
}
|
|
42
51
|
function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
43
52
|
return {
|
|
44
|
-
...moduleConfig ? { ...moduleConfig, ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
53
|
+
...moduleConfig ? { ...getFarmDocsConfigModuleRoot(moduleConfig, docs.entry), ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
45
54
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
46
55
|
docsPath: docs.entry,
|
|
47
|
-
contentDir:
|
|
56
|
+
contentDir: _chunk5N7QAGEAcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
|
|
48
57
|
};
|
|
49
58
|
}
|
|
50
59
|
function getFarmDocsAdapterStylesheets(options) {
|
|
@@ -56,6 +65,11 @@ async function compileFarmDocsAdapterEdgeManifest(docs, options) {
|
|
|
56
65
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
57
66
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
58
67
|
}
|
|
68
|
+
if (_optionalChain([docs, 'access', _5 => _5.roots, 'optionalAccess', _6 => _6.length])) {
|
|
69
|
+
throw new Error(
|
|
70
|
+
"Several docs roots are not supported on edge deployments yet; they need a Node.js deployment target."
|
|
71
|
+
);
|
|
72
|
+
}
|
|
59
73
|
const compilerEntry = docs.adapter.edgeCompiler;
|
|
60
74
|
if (!compilerEntry) {
|
|
61
75
|
throw new Error(
|
|
@@ -96,6 +110,27 @@ async function compileFarmDocsAdapterEdgeManifest(docs, options) {
|
|
|
96
110
|
}
|
|
97
111
|
return manifest;
|
|
98
112
|
}
|
|
113
|
+
async function listFarmDocsAdapterPages(docs, options) {
|
|
114
|
+
if (!hasFarmDocsRuntimeAdapter(docs)) return null;
|
|
115
|
+
const requireFromApp = _module.createRequire.call(void 0, _path2.default.join(options.root, "package.json"));
|
|
116
|
+
const serverModule = await import(
|
|
117
|
+
/* @vite-ignore */
|
|
118
|
+
_url.pathToFileURL.call(void 0, requireFromApp.resolve(docs.adapter.server)).href
|
|
119
|
+
);
|
|
120
|
+
if (typeof serverModule.listFarmDocsPages !== "function") return null;
|
|
121
|
+
const listPages = serverModule.listFarmDocsPages;
|
|
122
|
+
const pages = (await Promise.all(
|
|
123
|
+
_chunk5N7QAGEAcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
124
|
+
(root) => listPages(createFarmDocsAdapterRuntimeConfig(root, options), { rootDir: options.root })
|
|
125
|
+
)
|
|
126
|
+
)).flat();
|
|
127
|
+
if (!Array.isArray(pages) || pages.some((page) => typeof page !== "string" || !page.startsWith("/"))) {
|
|
128
|
+
throw new Error(
|
|
129
|
+
`Farm docs adapter ${JSON.stringify(docs.adapter.id)} listed docs pages that are not absolute paths.`
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
return [...new Set(pages)];
|
|
133
|
+
}
|
|
99
134
|
async function createFarmDocsAdapterHandler(docs, options) {
|
|
100
135
|
if (!hasFarmDocsRuntimeAdapter(docs)) {
|
|
101
136
|
throw new Error("Farm docs adapter requires server and react runtime entrypoints.");
|
|
@@ -104,26 +139,36 @@ async function createFarmDocsAdapterHandler(docs, options) {
|
|
|
104
139
|
const serverModule = await options.loadModule(
|
|
105
140
|
docs.adapter.server
|
|
106
141
|
);
|
|
107
|
-
|
|
142
|
+
const multiRoot = Boolean(_optionalChain([docs, 'access', _7 => _7.roots, 'optionalAccess', _8 => _8.length]));
|
|
143
|
+
const handlerExport = multiRoot ? "createFarmDocsMultiRuntimeHandler" : "createFarmDocsRuntimeHandler";
|
|
144
|
+
if (typeof serverModule[handlerExport] !== "function") {
|
|
108
145
|
const adapterId = JSON.stringify(docs.adapter.id);
|
|
109
146
|
const serverEntry = JSON.stringify(docs.adapter.server);
|
|
110
147
|
throw new Error(
|
|
111
|
-
`Farm docs adapter ${adapterId} does not export
|
|
148
|
+
`Farm docs adapter ${adapterId} does not export ${handlerExport} from ${serverEntry}. ` + (multiRoot ? "Upgrade the adapter to a release that serves several docs roots, or remove the roots." : "Upgrade the adapter to a runtime-enabled release.")
|
|
112
149
|
);
|
|
113
150
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
options,
|
|
117
|
-
await loadFarmDocsConfigModule(docs, options.loadModule)
|
|
118
|
-
);
|
|
119
|
-
return serverModule.createFarmDocsRuntimeHandler(runtimeConfig, {
|
|
151
|
+
const moduleConfig = await loadFarmDocsConfigModule(docs, options.loadModule);
|
|
152
|
+
const handlerOptions = {
|
|
120
153
|
rootDir: options.root,
|
|
121
154
|
clientEntry: options.clientEntry,
|
|
122
155
|
stylesheets: getFarmDocsAdapterStylesheets(options),
|
|
123
156
|
resolveLayoutFonts: options.resolveLayoutFonts,
|
|
124
157
|
loadReactModule: () => options.loadModule(docs.adapter.react),
|
|
125
158
|
...options.registerMCPServer ? { registerMCPServer: options.registerMCPServer } : {}
|
|
126
|
-
}
|
|
159
|
+
};
|
|
160
|
+
if (multiRoot) {
|
|
161
|
+
return serverModule.createFarmDocsMultiRuntimeHandler(
|
|
162
|
+
_chunk5N7QAGEAcjs.getFarmDocsRoots.call(void 0, docs).map(
|
|
163
|
+
(root) => createFarmDocsAdapterRuntimeConfig(root, options, moduleConfig)
|
|
164
|
+
),
|
|
165
|
+
handlerOptions
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
return serverModule.createFarmDocsRuntimeHandler(
|
|
169
|
+
createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig),
|
|
170
|
+
handlerOptions
|
|
171
|
+
);
|
|
127
172
|
}
|
|
128
173
|
|
|
129
174
|
// src/docs/api.ts
|
|
@@ -158,7 +203,7 @@ function omitHeadBody(response) {
|
|
|
158
203
|
});
|
|
159
204
|
}
|
|
160
205
|
function normalizeAction(value) {
|
|
161
|
-
return _optionalChain([value, 'optionalAccess',
|
|
206
|
+
return _optionalChain([value, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10(), 'access', _11 => _11.toLowerCase, 'call', _12 => _12(), 'access', _13 => _13.replace, 'call', _14 => _14(/_/g, "-")]) || void 0;
|
|
162
207
|
}
|
|
163
208
|
function getDocsTitle(docs) {
|
|
164
209
|
return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
|
|
@@ -257,25 +302,25 @@ function getDocsAPIFormat(request) {
|
|
|
257
302
|
return normalizeAction(url.searchParams.get("format") || url.searchParams.get("type")) || getDocsAPIPathTarget(request).format;
|
|
258
303
|
}
|
|
259
304
|
function getDocsDescription(docs) {
|
|
260
|
-
return _optionalChain([docs, 'access',
|
|
305
|
+
return _optionalChain([docs, 'access', _15 => _15.config, 'access', _16 => _16.metadata, 'optionalAccess', _17 => _17.description]);
|
|
261
306
|
}
|
|
262
307
|
function getLoadedDocsPages(context) {
|
|
263
|
-
return
|
|
308
|
+
return _chunk5N7QAGEAcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunk5N7QAGEAcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
|
|
264
309
|
}
|
|
265
310
|
function toDocsSourcePage(page) {
|
|
266
311
|
return {
|
|
267
|
-
...
|
|
312
|
+
..._chunk5N7QAGEAcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
268
313
|
sourcePath: page.sourcePath
|
|
269
314
|
};
|
|
270
315
|
}
|
|
271
316
|
function toDocsSitemapPage(page) {
|
|
272
317
|
return {
|
|
273
|
-
...
|
|
318
|
+
..._chunk5N7QAGEAcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
274
319
|
sourcePath: page.sourcePath
|
|
275
320
|
};
|
|
276
321
|
}
|
|
277
322
|
function toDocsLlmsPage(page) {
|
|
278
|
-
return
|
|
323
|
+
return _chunk5N7QAGEAcjs.toFarmDocsMarkdownPage.call(void 0, page);
|
|
279
324
|
}
|
|
280
325
|
function getDocsLlmsOptions(context, request) {
|
|
281
326
|
const configured = isRecord(context.docs.config.llmsTxt) ? context.docs.config.llmsTxt : {};
|
|
@@ -362,7 +407,7 @@ function renderAgentsDocument(context, request) {
|
|
|
362
407
|
function buildAgentSpec(context, request) {
|
|
363
408
|
const url = new URL(request.url);
|
|
364
409
|
const origin = url.origin;
|
|
365
|
-
const pages =
|
|
410
|
+
const pages = _chunk5N7QAGEAcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
|
|
366
411
|
(page) => !context.isPathGuarded(page.href)
|
|
367
412
|
);
|
|
368
413
|
const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
|
|
@@ -450,7 +495,7 @@ function buildPublicConfig(context) {
|
|
|
450
495
|
};
|
|
451
496
|
}
|
|
452
497
|
function buildDiagnostics(context) {
|
|
453
|
-
const pages =
|
|
498
|
+
const pages = _chunk5N7QAGEAcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
454
499
|
const diagnostics = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
|
|
455
500
|
entry: context.docs.entry,
|
|
456
501
|
mcp: {
|
|
@@ -500,19 +545,19 @@ async function searchDocs(context, request, query) {
|
|
|
500
545
|
const page = sourcePageByUrl.get(pageUrl);
|
|
501
546
|
return {
|
|
502
547
|
...result,
|
|
503
|
-
title: _optionalChain([page, 'optionalAccess',
|
|
504
|
-
href: _optionalChain([page, 'optionalAccess',
|
|
505
|
-
description: result.description || _optionalChain([page, 'optionalAccess',
|
|
548
|
+
title: _optionalChain([page, 'optionalAccess', _18 => _18.title]) || result.content,
|
|
549
|
+
href: _optionalChain([page, 'optionalAccess', _19 => _19.url]) || pageUrl,
|
|
550
|
+
description: result.description || _optionalChain([page, 'optionalAccess', _20 => _20.description])
|
|
506
551
|
};
|
|
507
552
|
});
|
|
508
553
|
}
|
|
509
554
|
async function resolveAPIContext(options) {
|
|
510
555
|
await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
|
|
511
556
|
const runtimeConfig = globalThis.__FARM_DOCS_RUNTIME_CONFIG__;
|
|
512
|
-
const root = options.rootDir || options.root || _optionalChain([runtimeConfig, 'optionalAccess',
|
|
513
|
-
const srcDir = options.srcDir || _optionalChain([runtimeConfig, 'optionalAccess',
|
|
557
|
+
const root = options.rootDir || options.root || _optionalChain([runtimeConfig, 'optionalAccess', _21 => _21.root]) || process.cwd();
|
|
558
|
+
const srcDir = options.srcDir || _optionalChain([runtimeConfig, 'optionalAccess', _22 => _22.srcDir]) || "src";
|
|
514
559
|
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;
|
|
515
|
-
const docsInput = _nullishCoalesce(_nullishCoalesce(options.docs, () => ( (canUseRuntimeDocs ? _optionalChain([runtimeConfig, 'optionalAccess',
|
|
560
|
+
const docsInput = _nullishCoalesce(_nullishCoalesce(options.docs, () => ( (canUseRuntimeDocs ? _optionalChain([runtimeConfig, 'optionalAccess', _23 => _23.docs]) : void 0))), () => ( {
|
|
516
561
|
enabled: true,
|
|
517
562
|
entry: options.entry,
|
|
518
563
|
docsPath: options.docsPath,
|
|
@@ -520,13 +565,13 @@ async function resolveAPIContext(options) {
|
|
|
520
565
|
config: options.config,
|
|
521
566
|
configPath: options.configPath
|
|
522
567
|
}));
|
|
523
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
524
|
-
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess',
|
|
568
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkNPQLMP7Mcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
569
|
+
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _24 => _24.guardedPaths]), () => ( [])));
|
|
525
570
|
return {
|
|
526
571
|
root,
|
|
527
572
|
srcDir,
|
|
528
573
|
docs,
|
|
529
|
-
contentDir:
|
|
574
|
+
contentDir: _chunk5N7QAGEAcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
|
|
530
575
|
diagnostics: options.diagnostics === true,
|
|
531
576
|
isPathGuarded: _nullishCoalesce(options.isPathGuarded, () => ( ((pathname) => guardedPaths.has(pathname))))
|
|
532
577
|
};
|
|
@@ -585,12 +630,12 @@ async function handleDocsAPIGet(request, context) {
|
|
|
585
630
|
if (format === "markdown" || url.pathname.endsWith(".md")) {
|
|
586
631
|
const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
|
|
587
632
|
const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
|
|
588
|
-
const page =
|
|
633
|
+
const page = _chunk5N7QAGEAcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
|
|
589
634
|
if (!page || context.isPathGuarded(page.href)) {
|
|
590
635
|
return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
|
|
591
636
|
}
|
|
592
637
|
return text(
|
|
593
|
-
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(
|
|
638
|
+
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunk5N7QAGEAcjs.toFarmDocsMarkdownPage.call(void 0, page), {
|
|
594
639
|
origin: new URL(request.url).origin,
|
|
595
640
|
llms: getDocsLlmsOptions(context, request),
|
|
596
641
|
sitemap: context.docs.config.sitemap
|
|
@@ -663,4 +708,6 @@ function createFarmDocsAPIHandler(options = {}, cloudIntegration) {
|
|
|
663
708
|
|
|
664
709
|
|
|
665
710
|
|
|
666
|
-
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
exports.hasFarmDocsRuntimeAdapter = hasFarmDocsRuntimeAdapter; exports.assertFarmDocsAdapterServesNoGuardedPages = assertFarmDocsAdapterServesNoGuardedPages; exports.getFarmDocsConfigModuleRoot = getFarmDocsConfigModuleRoot; exports.compileFarmDocsAdapterEdgeManifest = compileFarmDocsAdapterEdgeManifest; exports.listFarmDocsAdapterPages = listFarmDocsAdapterPages; exports.createFarmDocsAdapterHandler = createFarmDocsAdapterHandler; exports.isFarmDocsAPIRequest = isFarmDocsAPIRequest; exports.createDocsAPI = createDocsAPI; exports.createFarmDocsAPIHandler = createFarmDocsAPIHandler;
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
} from "./chunk-LMFJCXDD.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveDeployOutputPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CTM4SPB3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
farmDesktopDevGuardPlugin,
|
|
13
13
|
loadFarmReactPlugin
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QOSDWGKT.mjs";
|
|
15
15
|
import {
|
|
16
16
|
loadTailwindVitePlugin
|
|
17
17
|
} from "./chunk-PIHKO25G.mjs";
|
|
@@ -23,7 +23,7 @@ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
|
23
23
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkGUJTVM36cjs = require('./chunk-GUJTVM36.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -282,7 +282,7 @@ function createFarmAppManifest(input) {
|
|
|
282
282
|
return {
|
|
283
283
|
schemaVersion: 1,
|
|
284
284
|
app: app ? {
|
|
285
|
-
...app.version ? { farm:
|
|
285
|
+
...app.version ? { farm: _chunkGUJTVM36cjs.FARM_VERSION } : {},
|
|
286
286
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
287
287
|
basePath: input.basePath,
|
|
288
288
|
...app.build ? { build: input.build } : {}
|
|
@@ -441,14 +441,16 @@ function resolveFarmDocsRouteLabel(routePathname, docs) {
|
|
|
441
441
|
const apiPath = normalize(_nullishCoalesce(docs.apiPath, () => ( "/api/docs")));
|
|
442
442
|
if (pathname === apiPath) return apiPath;
|
|
443
443
|
if (pathname.startsWith(`${apiPath}/`)) return `${apiPath}/[...path]`;
|
|
444
|
-
const entry = normalize(docs.path);
|
|
445
|
-
const base = entry === "/" ? "" : entry;
|
|
446
444
|
const markdown = pathname.toLowerCase().endsWith(".md");
|
|
447
445
|
const page = markdown ? pathname.slice(0, -".md".length) : pathname;
|
|
448
|
-
|
|
449
|
-
|
|
446
|
+
const entries = [docs.path, ..._nullishCoalesce(docs.roots, () => ( []))].map(normalize).sort((a, b) => b.length - a.length);
|
|
447
|
+
for (const entry of entries) {
|
|
448
|
+
const base = entry === "/" ? "" : entry;
|
|
449
|
+
if (page === entry || entry === "/" && page === "/index") {
|
|
450
|
+
return markdown ? _chunkWJFFPXCVcjs.getFarmMarkdownMirrorPath.call(void 0, entry) : entry;
|
|
451
|
+
}
|
|
452
|
+
if (page.startsWith(`${base}/`)) return `${base}/[...slug]${markdown ? ".md" : ""}`;
|
|
450
453
|
}
|
|
451
|
-
if (page.startsWith(`${base}/`)) return `${base}/[...slug]${markdown ? ".md" : ""}`;
|
|
452
454
|
return null;
|
|
453
455
|
}
|
|
454
456
|
function resolveFarmDocsEngineRouteLabel(routePathname, docs) {
|