@farm.js/core 0.1.51-beta.0 → 0.1.51-beta.1
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-D44ip11f.d.mts → agent-mcp.d-BPzpKBHQ.d.mts} +1 -1
- package/dist/{agent-mcp-BBMfNpsC.d.ts → agent-mcp.d-ZuuNgrkQ.d.ts} +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-AZULAOPL.cjs} +2 -2
- package/dist/{analyzer-HOUCQR3K.mjs → analyzer-V74FTD2F.mjs} +1 -1
- 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-BJDcZn3W.d.mts} +1 -1
- package/dist/{app-manifest-BC6mFn5A.d.mts → app-manifest.d-HWhqbP2X.d.ts} +1 -1
- package/dist/app-markdown.d.mts +14 -14
- package/dist/app-markdown.d.ts +14 -14
- package/dist/{app-CourU3rQ.d.ts → app.d-B5EWdob-.d.ts} +12 -10
- package/dist/{app-aeD4s_mg.d.mts → app.d-DOGW1KI8.d.mts} +12 -10
- package/dist/{chunk-DWW3AMJX.cjs → chunk-2756SHCI.cjs} +282 -248
- package/dist/{chunk-AMRK3P6W.mjs → chunk-5A5GAZ75.mjs} +182 -68
- 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-QI5AQMEE.mjs → chunk-72NBDVWQ.mjs} +1 -1
- package/dist/{chunk-X5BCMLGP.cjs → chunk-AGR7VJH2.cjs} +1 -1
- package/dist/{chunk-OD6WM3I7.mjs → chunk-AV26KHTG.mjs} +1 -1
- package/dist/{chunk-I2ZA5SXS.mjs → chunk-BSEKNTMS.mjs} +53 -19
- package/dist/{chunk-WAPQWAE6.cjs → chunk-CECUDGXQ.cjs} +9 -8
- package/dist/{chunk-IUQLRTTO.mjs → chunk-CO6UYM2D.mjs} +14 -1
- package/dist/{chunk-WVX3BUNJ.mjs → chunk-CZ35L6PL.mjs} +8 -1
- package/dist/{chunk-4GJJ65RB.mjs → chunk-EIMK7D2D.mjs} +24 -5
- package/dist/{chunk-CY7H5KS4.cjs → chunk-EKJYE4Y7.cjs} +2 -2
- package/dist/{chunk-ZF3GX4O7.mjs → chunk-EOSFVNXZ.mjs} +1 -1
- package/dist/{chunk-S5ZA2T2W.mjs → chunk-EWC76P5D.mjs} +21 -7
- package/dist/{chunk-3HA7PP72.mjs → chunk-I3EFXUAR.mjs} +60 -13
- package/dist/{chunk-VO6NLTV4.cjs → chunk-IFBINMI4.cjs} +3 -3
- package/dist/{chunk-VIFPE5RG.cjs → chunk-JVBNKWLV.cjs} +81 -34
- package/dist/{chunk-JF5CNHHF.mjs → chunk-KMB5BMFX.mjs} +118 -8
- package/dist/{chunk-YLNBWUVS.mjs → chunk-KU7MBLDZ.mjs} +1 -1
- package/dist/{chunk-J37KTQIA.cjs → chunk-NK2VWS7P.cjs} +52 -3
- package/dist/{chunk-WSY2JD7O.mjs → chunk-NN3MOPSI.mjs} +1 -1
- package/dist/{chunk-R5P4KFPM.mjs → chunk-QAIAFCRZ.mjs} +8 -6
- package/dist/{chunk-75WWOZ5C.mjs → chunk-QOSDWGKT.mjs} +1 -1
- package/dist/{chunk-J22JD5YJ.cjs → chunk-RMPNYUGT.cjs} +9 -7
- package/dist/{chunk-XWC5NAHV.mjs → chunk-SCRC5AMM.mjs} +2 -2
- package/dist/{chunk-QK3HBOTG.cjs → chunk-TT66CP3P.cjs} +5 -5
- package/dist/{chunk-Y7TLL65B.cjs → chunk-UQHIWZZ6.cjs} +11 -4
- package/dist/{chunk-O3MMJPC2.cjs → chunk-VITZRYW3.cjs} +119 -9
- package/dist/{chunk-PPDHCRTC.mjs → chunk-VS7EHLLW.mjs} +1 -1
- package/dist/{chunk-USL2ANCB.cjs → chunk-X2AMN2WV.cjs} +2 -2
- package/dist/{chunk-F42U3R4F.cjs → chunk-X2M4XN4V.cjs} +55 -41
- package/dist/{chunk-SO3T6T4I.cjs → chunk-XY4DYGSU.cjs} +358 -244
- package/dist/{chunk-HHFMECFO.mjs → chunk-Y2G5SJFB.mjs} +2 -1
- package/dist/{chunk-Z5MZDFX4.cjs → chunk-YIHRZBD7.cjs} +14 -1
- 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-CFBEfVPO.d.ts → client-plugins.d-C0n8Yhh-.d.ts} +41 -12
- package/dist/{client-plugins-cqy_dQd0.d.mts → client-plugins.d-C_3CdALC.d.mts} +41 -12
- 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.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-4MLL3RAL.mjs → devtools-BU5IT2PD.mjs} +3 -3
- package/dist/{devtools-4ZLMD454.cjs → devtools-KJFUE5FO.cjs} +4 -4
- 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 +19 -17
- package/dist/{index-BYkNbeQV.d.mts → index.d-B6M_8kmo.d.ts} +2 -2
- 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-CsGxS-hZ.d.mts} +2 -2
- package/dist/index.d.mts +42 -42
- package/dist/index.d.ts +42 -42
- package/dist/index.mjs +18 -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 +15 -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 +14 -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 +18 -18
- package/dist/internal/config-runtime.d.ts +18 -18
- 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 +7 -3
- package/dist/internal/production-runtime.d.mts +33 -30
- package/dist/internal/production-runtime.d.ts +33 -30
- package/dist/internal/production-runtime.mjs +6 -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-DLhbfEN4.d.mts → navigation-delegate.d-C0BbdUgN.d.mts} +1 -1
- package/dist/{navigation-delegate-BU4xqdnw.d.ts → navigation-delegate.d-jArRF0ZP.d.ts} +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-DFaQ1qaV.d.mts} +3 -3
- package/dist/{production-runtime-C78A8YgK.d.ts → production-runtime.d-UnXmSS_S.d.ts} +3 -3
- package/dist/{programmatic-routes-client-NpqGBn-i.d.mts → programmatic-routes-client.d-BIowUXQC.d.mts} +10 -2
- package/dist/{programmatic-routes-client-CBqkNhBy.d.ts → programmatic-routes-client.d-VZ0qcbH4.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-C9sWvDTv.d.mts → render-plan.d-BB6KrYjP.d.ts} +2 -2
- package/dist/{render-plan-CrqcBbnV.d.ts → render-plan.d-BNeqyPyJ.d.mts} +2 -2
- package/dist/renderer-client.d.mts +19 -19
- package/dist/renderer-client.d.ts +19 -19
- package/dist/{request-WwB1-Uim.d.mts → request.d-BV1munmx.d.mts} +1 -1
- package/dist/{request-BizeuqD7.d.ts → request.d-Bxhghm76.d.ts} +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-BIf7zE9d.d.ts} +1 -1
- package/dist/{route-rendering-S6NFjnx4.d.mts → route-rendering.d-DShqKlgK.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-BIheIy9G.d.mts → router.d-BE7i84fb.d.mts} +1 -1
- package/dist/{router-BUD_j2EL.d.ts → router.d-Bw3K3b0a.d.ts} +1 -1
- package/dist/{routes-8PT9cl60.d.ts → routes.d-DVZQL0-H.d.ts} +3 -3
- package/dist/{routes-kEUsXHx3.d.mts → routes.d-_5tBQexL.d.mts} +3 -3
- package/dist/routes.d.mts +13 -13
- package/dist/routes.d.ts +13 -13
- package/dist/{rsc-pipeline-OLAVIKI3.mjs → rsc-pipeline-FBM6NFYY.mjs} +5 -5
- package/dist/{rsc-pipeline-JRGUZBYM.cjs → rsc-pipeline-IQI5XQLS.cjs} +6 -6
- package/dist/{runtime-OGCHDACZ.mjs → runtime-2JYIDUON.mjs} +4 -4
- package/dist/{runtime-G23RSLEK.cjs → runtime-DXEVFYLE.cjs} +6 -6
- 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-CQgoYR0Q.d.mts} +4 -4
- package/dist/{runtime-CgJwe6H_.d.mts → runtime.d-CfhaLPl-.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/{spa-router-CVOL0Vrq.d.mts → spa-router.d-C5opIgXg.d.ts} +5 -5
- package/dist/{spa-router-Kytv4jSB.d.ts → spa-router.d-D63jb6nX.d.mts} +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-Dsa1HZ7X.d.mts → utils.d-CO-U4OVZ.d.mts} +1 -1
- package/dist/{utils-DbyXlzaj.d.ts → utils.d-CkpTqTsC.d.ts} +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 +3 -3
- /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/{config-CnhyvvmT.d.mts → config.d-CnhyvvmT.d.mts} +0 -0
- /package/dist/{config-CnhyvvmT.d.ts → config.d-CnhyvvmT.d.ts} +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
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createFarmReactRefreshPlugins,
|
|
3
3
|
farmDesktopDevGuardPlugin,
|
|
4
4
|
isFarmReactRefreshActive
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QOSDWGKT.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createFarmServerFnBoundaryModule,
|
|
8
8
|
isFarmServerFnBoundaryId,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
resolveFarmIsolatedClientHydrationMode,
|
|
38
38
|
resolveModuleSourcePath,
|
|
39
39
|
stripUseClientDirective
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-EWC76P5D.mjs";
|
|
41
41
|
import {
|
|
42
42
|
loadTailwindVitePlugin
|
|
43
43
|
} from "./chunk-PIHKO25G.mjs";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
import {
|
|
51
51
|
generateFarmTypeArtifacts,
|
|
52
52
|
resolveRouteRenderingConfig
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-CZ35L6PL.mjs";
|
|
54
54
|
import {
|
|
55
55
|
createFarmRouteRenderPlan,
|
|
56
56
|
farmPathGuardCoversEndpoint,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
resolveFarmMCPRouteLabel,
|
|
80
80
|
resolveFarmMarkdownRouteLabel,
|
|
81
81
|
setFarmRouteLabel
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-QAIAFCRZ.mjs";
|
|
83
83
|
import {
|
|
84
84
|
FARM_DEFAULT_MCP_PATH
|
|
85
85
|
} from "./chunk-KRRZJ77U.mjs";
|
|
@@ -87,10 +87,13 @@ import {
|
|
|
87
87
|
resolveFarmLayoutFonts
|
|
88
88
|
} from "./chunk-HZOMT5DY.mjs";
|
|
89
89
|
import {
|
|
90
|
+
farmBrowserBuiltinsOptimizerPlugin,
|
|
90
91
|
farmEnvironmentFunctionsPlugin,
|
|
91
92
|
generateProgrammaticClientRouteModule,
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
loadFarmBrowserBuiltin,
|
|
94
|
+
programmaticClientRouteKey,
|
|
95
|
+
resolveFarmBrowserBuiltin
|
|
96
|
+
} from "./chunk-ZQ5BDNKW.mjs";
|
|
94
97
|
import {
|
|
95
98
|
createFarmMarkdownSourceResponse,
|
|
96
99
|
isFarmMarkdownPageFile,
|
|
@@ -161,10 +164,10 @@ import {
|
|
|
161
164
|
getIntegrationDocumentNavigationMatchers,
|
|
162
165
|
getIntegrationProviders,
|
|
163
166
|
matchIntegrationRoute
|
|
164
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-Y2G5SJFB.mjs";
|
|
165
168
|
import {
|
|
166
169
|
MiddlewareManager
|
|
167
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-NN3MOPSI.mjs";
|
|
168
171
|
import {
|
|
169
172
|
_runWithMiddlewareContext,
|
|
170
173
|
_runWithMiddlewareData
|
|
@@ -226,8 +229,9 @@ import {
|
|
|
226
229
|
} from "./chunk-2DA7CLY7.mjs";
|
|
227
230
|
import {
|
|
228
231
|
applyWebResponseHeaders,
|
|
232
|
+
fetchFarmExternalRewrite,
|
|
229
233
|
sendWebResponse
|
|
230
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-CO6UYM2D.mjs";
|
|
231
235
|
import {
|
|
232
236
|
createFarmNodeRequestAbortSignal,
|
|
233
237
|
createFarmNodeRequestBodyStream,
|
|
@@ -240,7 +244,7 @@ import {
|
|
|
240
244
|
} from "./chunk-LM2YOGDK.mjs";
|
|
241
245
|
import {
|
|
242
246
|
FARM_VERSION
|
|
243
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-EOSFVNXZ.mjs";
|
|
244
248
|
import {
|
|
245
249
|
DEFAULT_FARM_API_BASE_PATH
|
|
246
250
|
} from "./chunk-BLD5GVCG.mjs";
|
|
@@ -295,6 +299,7 @@ function transformFarmFormActionModule(options) {
|
|
|
295
299
|
|
|
296
300
|
// src/vite.ts
|
|
297
301
|
import { parseSync } from "vite";
|
|
302
|
+
import { isBuiltin } from "module";
|
|
298
303
|
|
|
299
304
|
// src/dev-preview-guard.ts
|
|
300
305
|
import { promises as fsp } from "fs";
|
|
@@ -595,7 +600,7 @@ function formatClientBoundaryWarning(id, findings) {
|
|
|
595
600
|
}
|
|
596
601
|
if (builtinImports.length > 0) {
|
|
597
602
|
lines.push(
|
|
598
|
-
`- import of ${builtinImports.join(", ")} \u2014 stubbed
|
|
603
|
+
`- import of ${builtinImports.join(", ")} \u2014 stubbed in the browser, where exports without a Web API equivalent are undefined. Move the import into server-only code.`
|
|
599
604
|
);
|
|
600
605
|
}
|
|
601
606
|
return lines.join("\n");
|
|
@@ -760,7 +765,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
760
765
|
return import("./workflows.mjs");
|
|
761
766
|
}
|
|
762
767
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
763
|
-
return import("./devtools-
|
|
768
|
+
return import("./devtools-BU5IT2PD.mjs");
|
|
764
769
|
}
|
|
765
770
|
function loadFarmDevtoolsUIRuntime() {
|
|
766
771
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -800,11 +805,19 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
800
805
|
return {
|
|
801
806
|
name: "farm:server-only-entries",
|
|
802
807
|
enforce: "pre",
|
|
808
|
+
config() {
|
|
809
|
+
return {
|
|
810
|
+
optimizeDeps: { rolldownOptions: { plugins: [farmBrowserBuiltinsOptimizerPlugin()] } }
|
|
811
|
+
};
|
|
812
|
+
},
|
|
803
813
|
configResolved(config) {
|
|
804
814
|
root = config.root;
|
|
805
815
|
},
|
|
806
816
|
resolveId(id, importer, options) {
|
|
807
817
|
if (id === FARM_PLATFORM_ENTRY) return options?.ssr ? null : FARM_PLATFORM_CLIENT_ID;
|
|
818
|
+
if (!options?.ssr && isBuiltin(id)) {
|
|
819
|
+
return resolveFarmBrowserBuiltin(this, id, importer, options);
|
|
820
|
+
}
|
|
808
821
|
if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
|
|
809
822
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
810
823
|
if (!options?.ssr) {
|
|
@@ -821,7 +834,8 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
821
834
|
return null;
|
|
822
835
|
},
|
|
823
836
|
load(id) {
|
|
824
|
-
|
|
837
|
+
if (id === FARM_PLATFORM_CLIENT_ID) return createFarmPlatformClientModule();
|
|
838
|
+
return loadFarmBrowserBuiltin(id) ?? null;
|
|
825
839
|
}
|
|
826
840
|
};
|
|
827
841
|
}
|
|
@@ -904,6 +918,17 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
904
918
|
});
|
|
905
919
|
};
|
|
906
920
|
}
|
|
921
|
+
async function proxyFarmExternalRewrite(req, res, bodySizeLimit) {
|
|
922
|
+
const destination = req.url;
|
|
923
|
+
if (!destination || !/^https?:\/\//i.test(destination)) return false;
|
|
924
|
+
let request = createRequestFromNodeRequest(req, new URL(destination));
|
|
925
|
+
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
926
|
+
const body = await readNodeRequestBody(req, bodySizeLimit);
|
|
927
|
+
request = new Request(request, { body: toRequestBody(body) });
|
|
928
|
+
}
|
|
929
|
+
await sendWebResponse(res, await fetchFarmExternalRewrite(request));
|
|
930
|
+
return true;
|
|
931
|
+
}
|
|
907
932
|
function toRequestBody(body) {
|
|
908
933
|
if (!body) return void 0;
|
|
909
934
|
const copy = new Uint8Array(body.byteLength);
|
|
@@ -1193,10 +1218,12 @@ function rewriteEarlySsrRelativeImports(options) {
|
|
|
1193
1218
|
const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
|
|
1194
1219
|
const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
|
|
1195
1220
|
const resolvedPath = path5.resolve(path5.dirname(cleanId), sourcePath);
|
|
1221
|
+
const moduleId = toViteModuleId(resolvedPath, options.root);
|
|
1222
|
+
const specifier = moduleId.startsWith("/@fs/") ? toPosixPath(resolvedPath) : moduleId;
|
|
1196
1223
|
replacements.push({
|
|
1197
1224
|
start: source.start,
|
|
1198
1225
|
end: source.end,
|
|
1199
|
-
code: JSON.stringify(`${
|
|
1226
|
+
code: JSON.stringify(`${specifier}${suffix}`)
|
|
1200
1227
|
});
|
|
1201
1228
|
});
|
|
1202
1229
|
if (replacements.length === 0) return null;
|
|
@@ -2295,7 +2322,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2295
2322
|
computed: docsResponse,
|
|
2296
2323
|
label: resolveFarmDocsEngineRouteLabel(
|
|
2297
2324
|
stripFarmBasePath(requestPathname, farmConfig.basePath),
|
|
2298
|
-
{
|
|
2325
|
+
{
|
|
2326
|
+
path: farmConfig.docs?.entry || "/docs",
|
|
2327
|
+
roots: farmConfig.docs?.roots?.map((root) => root.entry)
|
|
2328
|
+
}
|
|
2299
2329
|
)
|
|
2300
2330
|
}
|
|
2301
2331
|
);
|
|
@@ -2569,7 +2599,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2569
2599
|
await pm.runHookParallel("beforeRequest", req, res);
|
|
2570
2600
|
}
|
|
2571
2601
|
}
|
|
2572
|
-
if (res.writableEnded) {
|
|
2602
|
+
if (res.writableEnded || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
|
|
2573
2603
|
const duration2 = Date.now() - startTime2;
|
|
2574
2604
|
logResponse(method2, urlPath2, res.statusCode || 200, duration2, "API");
|
|
2575
2605
|
return;
|
|
@@ -2729,7 +2759,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2729
2759
|
route: setFarmRouteLabel(
|
|
2730
2760
|
{ pathname: pathname2, pattern: apiLifecyclePayload.routePath },
|
|
2731
2761
|
resolveFarmDocsRouteLabel(pathname2, {
|
|
2732
|
-
path: farmConfig.docs?.entry || "/docs"
|
|
2762
|
+
path: farmConfig.docs?.entry || "/docs",
|
|
2763
|
+
roots: farmConfig.docs?.roots?.map((root) => root.entry)
|
|
2733
2764
|
})
|
|
2734
2765
|
)
|
|
2735
2766
|
}) : await invokeDocsAPIHandler(request);
|
|
@@ -3247,7 +3278,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3247
3278
|
}
|
|
3248
3279
|
}
|
|
3249
3280
|
}
|
|
3250
|
-
if (res.writableEnded || responseInterceptor?.isEnded()) {
|
|
3281
|
+
if (res.writableEnded || responseInterceptor?.isEnded() || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
|
|
3251
3282
|
if (!responseInterceptor?.isEnded()) {
|
|
3252
3283
|
const duration = Date.now() - startTime;
|
|
3253
3284
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
@@ -5711,7 +5742,10 @@ function farmIslandsOnlyDocument() {
|
|
|
5711
5742
|
const rootContainer = document.getElementById('root')
|
|
5712
5743
|
|
|
5713
5744
|
if (!rootContainer) {
|
|
5714
|
-
|
|
5745
|
+
// A document Farm did not render as a page (the docs renderer's) has nothing to hydrate.
|
|
5746
|
+
if (window.__FARM_PAGE_MODULE__ !== undefined) {
|
|
5747
|
+
console.error('[Farm.js] Root container not found')
|
|
5748
|
+
}
|
|
5715
5749
|
return
|
|
5716
5750
|
}
|
|
5717
5751
|
|
|
@@ -19,7 +19,7 @@ var _chunkITV4QQL2cjs = require('./chunk-ITV4QQL2.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -776,6 +776,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
776
776
|
}
|
|
777
777
|
},
|
|
778
778
|
async beforeRequest(req, res, context) {
|
|
779
|
+
if (req.url && !req.url.startsWith("/")) return;
|
|
779
780
|
const fullUrl = `http://${req.headers.host || "localhost"}${req.url || "/"}`;
|
|
780
781
|
const url = new URL(fullUrl);
|
|
781
782
|
const pathname = url.pathname;
|
|
@@ -806,7 +807,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
806
807
|
} catch (error) {
|
|
807
808
|
const response = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
808
809
|
if (!response) throw error;
|
|
809
|
-
await
|
|
810
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
|
|
810
811
|
return null;
|
|
811
812
|
}
|
|
812
813
|
};
|
|
@@ -854,10 +855,10 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
854
855
|
for (const cookie of forwardedCookies) {
|
|
855
856
|
setCookieHeaders.append("set-cookie", cookie);
|
|
856
857
|
}
|
|
857
|
-
|
|
858
|
+
_chunkYIHRZBD7cjs.applyWebResponseHeaders.call(void 0, res, setCookieHeaders, { appendSetCookie: true });
|
|
858
859
|
}
|
|
859
860
|
if (response) {
|
|
860
|
-
await
|
|
861
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
|
|
861
862
|
await emitIntegrationLog(integration, {
|
|
862
863
|
category: integration.category,
|
|
863
864
|
slot: integration.category,
|
|
@@ -950,7 +951,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
950
951
|
try {
|
|
951
952
|
const validation = await validateIntegrationRouteInput(route, request, url);
|
|
952
953
|
if (!validation.success) {
|
|
953
|
-
await
|
|
954
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, validation.response);
|
|
954
955
|
await emitIntegrationLog(integration, {
|
|
955
956
|
category: integration.category,
|
|
956
957
|
slot: integration.category,
|
|
@@ -973,7 +974,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
973
974
|
for (const middlewareEntry of route.middleware || []) {
|
|
974
975
|
const middlewareResponse = await middlewareEntry.handler(request, handlerContext);
|
|
975
976
|
if (middlewareResponse) {
|
|
976
|
-
await
|
|
977
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, middlewareResponse);
|
|
977
978
|
await emitIntegrationLog(integration, {
|
|
978
979
|
category: integration.category,
|
|
979
980
|
slot: integration.category,
|
|
@@ -1005,7 +1006,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
1005
1006
|
handlerContext,
|
|
1006
1007
|
beforeResponse
|
|
1007
1008
|
);
|
|
1008
|
-
await
|
|
1009
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response2);
|
|
1009
1010
|
await emitIntegrationLog(integration, {
|
|
1010
1011
|
category: integration.category,
|
|
1011
1012
|
slot: integration.category,
|
|
@@ -1031,7 +1032,7 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
1031
1032
|
handlerContext,
|
|
1032
1033
|
handlerResponse
|
|
1033
1034
|
);
|
|
1034
|
-
await
|
|
1035
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
|
|
1035
1036
|
await emitIntegrationLog(integration, {
|
|
1036
1037
|
category: integration.category,
|
|
1037
1038
|
slot: integration.category,
|
|
@@ -152,8 +152,21 @@ async function sendWebResponse(res, response) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
+
async function fetchFarmExternalRewrite(request) {
|
|
156
|
+
const response = await fetch(request);
|
|
157
|
+
if (!response.headers.has("content-encoding")) return response;
|
|
158
|
+
const headers = new Headers(response.headers);
|
|
159
|
+
headers.delete("content-encoding");
|
|
160
|
+
headers.delete("content-length");
|
|
161
|
+
return new Response(response.body, {
|
|
162
|
+
status: response.status,
|
|
163
|
+
statusText: response.statusText,
|
|
164
|
+
headers
|
|
165
|
+
});
|
|
166
|
+
}
|
|
155
167
|
|
|
156
168
|
export {
|
|
157
169
|
applyWebResponseHeaders,
|
|
158
|
-
sendWebResponse
|
|
170
|
+
sendWebResponse,
|
|
171
|
+
fetchFarmExternalRewrite
|
|
159
172
|
};
|
|
@@ -407,6 +407,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
407
407
|
const ssgPages = [];
|
|
408
408
|
const ssrRoutes = [];
|
|
409
409
|
const staticCandidateRoutes = [];
|
|
410
|
+
let staticCandidateDocsPages = 0;
|
|
410
411
|
for (const route of routes) {
|
|
411
412
|
try {
|
|
412
413
|
const mod = await loadModule(route.filePath);
|
|
@@ -453,7 +454,8 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
453
454
|
} else {
|
|
454
455
|
ssrRoutes.push(route.path);
|
|
455
456
|
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(mod, source, { isDynamic: route.isDynamic }).candidate) {
|
|
456
|
-
|
|
457
|
+
if (options.docsAdapterRoutes?.owns(route.path)) staticCandidateDocsPages += 1;
|
|
458
|
+
else staticCandidateRoutes.push(route.path);
|
|
457
459
|
}
|
|
458
460
|
}
|
|
459
461
|
} catch (error) {
|
|
@@ -472,6 +474,11 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
472
474
|
Add \`export const dynamic = "force-static";\` after verifying that imported code does not read cookies, headers, authentication, or other request data.`
|
|
473
475
|
);
|
|
474
476
|
}
|
|
477
|
+
if (staticCandidateDocsPages > 0 && !options.docsAdapterRoutes?.prerender) {
|
|
478
|
+
console.warn(
|
|
479
|
+
`[Farm.js] ${staticCandidateDocsPages} docs page${staticCandidateDocsPages === 1 ? " renders" : "s render"} on each request. Set \`docs.prerender: true\` in farm.config.ts to prerender docs pages on Node and serverless targets.`
|
|
480
|
+
);
|
|
481
|
+
}
|
|
475
482
|
return { ssg: ssgPages, ssr: ssrRoutes };
|
|
476
483
|
}
|
|
477
484
|
function isSSGModule(mod) {
|
|
@@ -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({
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
collectSSGPages,
|
|
6
6
|
matchSSGPage,
|
|
7
7
|
resolveRouteRenderingConfigFromFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CZ35L6PL.mjs";
|
|
9
9
|
import {
|
|
10
10
|
classifyFarmDocumentPrefix,
|
|
11
11
|
composeFarmFullDocument,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-7UPCJDB5.mjs";
|
|
34
34
|
import {
|
|
35
35
|
listFarmMCPLlmsTxtLinks
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QAIAFCRZ.mjs";
|
|
37
37
|
import {
|
|
38
38
|
FARM_DEFAULT_MCP_PATH,
|
|
39
39
|
collectFarmDefaultMCPPages,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
createEvaluatedRouteGraph,
|
|
61
61
|
mergeProgrammaticClientRoutes,
|
|
62
62
|
resolveProgrammaticClientRoutes
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-ZQ5BDNKW.mjs";
|
|
64
64
|
import {
|
|
65
65
|
createFarmMarkdownRouteModuleFromFile,
|
|
66
66
|
loadFarmMdxComponents
|
|
@@ -164,7 +164,7 @@ import {
|
|
|
164
164
|
getIntegrationProviders,
|
|
165
165
|
getRegisteredIntegrationAPIManifest,
|
|
166
166
|
isFarmIntegrationProviderComponentReference
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-Y2G5SJFB.mjs";
|
|
168
168
|
import {
|
|
169
169
|
createRouteSlotContainerId,
|
|
170
170
|
parseRouteSlotFile
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
} from "./chunk-2DA7CLY7.mjs";
|
|
242
242
|
import {
|
|
243
243
|
sendWebResponse
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-CO6UYM2D.mjs";
|
|
245
245
|
import {
|
|
246
246
|
matchesFarmIfNoneMatch,
|
|
247
247
|
resolveFarmServerConfig
|
|
@@ -254,7 +254,7 @@ import {
|
|
|
254
254
|
} from "./chunk-LM2YOGDK.mjs";
|
|
255
255
|
import {
|
|
256
256
|
FARM_VERSION
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-EOSFVNXZ.mjs";
|
|
258
258
|
import {
|
|
259
259
|
resolveFarmTrailingSlashRedirect,
|
|
260
260
|
setFarmTrailingSlashPreference
|
|
@@ -2865,6 +2865,18 @@ var RouteManager = class {
|
|
|
2865
2865
|
}
|
|
2866
2866
|
}
|
|
2867
2867
|
}
|
|
2868
|
+
/** The page routes a docs adapter answers before Farm's own page rendering. */
|
|
2869
|
+
getDocsAdapterRoutes() {
|
|
2870
|
+
const docs = this.config.docs;
|
|
2871
|
+
if (!docs || typeof docs !== "object" || !docs.enabled || !docs.adapter || !docs.adapter.server || !docs.adapter.react || !isReactRenderer(this.config.renderer)) {
|
|
2872
|
+
return void 0;
|
|
2873
|
+
}
|
|
2874
|
+
const entry = `/${String(docs.entry || "docs").replace(/^\/+|\/+$/g, "")}`;
|
|
2875
|
+
return {
|
|
2876
|
+
owns: (routePath) => entry === "/" || routePath === entry || routePath.startsWith(`${entry}/`),
|
|
2877
|
+
prerender: docs.prerender === true
|
|
2878
|
+
};
|
|
2879
|
+
}
|
|
2868
2880
|
/**
|
|
2869
2881
|
* Collect SSG pages for static generation
|
|
2870
2882
|
*
|
|
@@ -2879,8 +2891,10 @@ var RouteManager = class {
|
|
|
2879
2891
|
pattern: entry.pattern
|
|
2880
2892
|
}));
|
|
2881
2893
|
const i18n = this.getI18nConfig();
|
|
2894
|
+
const docsAdapterRoutes = this.getDocsAdapterRoutes();
|
|
2882
2895
|
const result = await collectSSGPages(routes, (filePath) => this.loadRouteModule(filePath), {
|
|
2883
|
-
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n)
|
|
2896
|
+
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
|
|
2897
|
+
...docsAdapterRoutes ? { docsAdapterRoutes } : {}
|
|
2884
2898
|
});
|
|
2885
2899
|
if (!i18n) {
|
|
2886
2900
|
return result;
|
|
@@ -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-KMB5BMFX.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,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRMPNYUGTcjs = require('./chunk-RMPNYUGT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkWJFFPXCVcjs = require('./chunk-WJFFPXCV.cjs');
|
|
@@ -273,7 +273,7 @@ function requestEvent(metadata, method, status, durationMs) {
|
|
|
273
273
|
id: uuid(),
|
|
274
274
|
requestId: metadata.id,
|
|
275
275
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
276
|
-
route: routeTemplate(
|
|
276
|
+
route: routeTemplate(_chunkRMPNYUGTcjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
277
277
|
agent: metadata.agent,
|
|
278
278
|
kind: "request",
|
|
279
279
|
method,
|
|
@@ -286,7 +286,7 @@ function toolEvent(metadata, event) {
|
|
|
286
286
|
id: uuid(),
|
|
287
287
|
requestId: metadata.id,
|
|
288
288
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
289
|
-
route: routeTemplate(
|
|
289
|
+
route: routeTemplate(_chunkRMPNYUGTcjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
290
290
|
agent: metadata.agent,
|
|
291
291
|
kind: "mcp.tool",
|
|
292
292
|
tool: event.tool,
|