@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
|
@@ -17,19 +17,21 @@ import {
|
|
|
17
17
|
assertFarmDocsAdapterServesNoGuardedPages,
|
|
18
18
|
compileFarmDocsAdapterEdgeManifest,
|
|
19
19
|
createFarmDocsAPIHandler,
|
|
20
|
-
hasFarmDocsRuntimeAdapter
|
|
21
|
-
|
|
20
|
+
hasFarmDocsRuntimeAdapter,
|
|
21
|
+
listFarmDocsAdapterPages
|
|
22
|
+
} from "./chunk-I3EFXUAR.mjs";
|
|
22
23
|
import {
|
|
23
24
|
FARM_DOCS_LAST_MODIFIED_MANIFEST,
|
|
24
25
|
createFarmDocsHandler,
|
|
25
26
|
createFarmDocsLastModifiedManifest,
|
|
26
27
|
discoverFarmDocsPages,
|
|
27
28
|
getFarmDocsMarkdownPath,
|
|
29
|
+
getFarmDocsRoots,
|
|
28
30
|
getFarmDocsRouteTypeEntries,
|
|
29
31
|
loadFarmDocsPage,
|
|
30
32
|
resolveFarmDocsContentDir,
|
|
31
33
|
toFarmDocsMarkdownPage
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-EIMK7D2D.mjs";
|
|
33
35
|
import {
|
|
34
36
|
generateFarmDocsSearchClientRuntime,
|
|
35
37
|
isFarmDocsSearchEnabled,
|
|
@@ -37,7 +39,7 @@ import {
|
|
|
37
39
|
} from "./chunk-ALEUMLJN.mjs";
|
|
38
40
|
import {
|
|
39
41
|
FARM_PRERENDER_ENV
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KU7MBLDZ.mjs";
|
|
41
43
|
import {
|
|
42
44
|
resolveFarmInstrumentationFile
|
|
43
45
|
} from "./chunk-N35YPV4N.mjs";
|
|
@@ -52,7 +54,7 @@ import {
|
|
|
52
54
|
getDeployTargetForPreset,
|
|
53
55
|
hasCustomFarmRouteContext,
|
|
54
56
|
resolveDeployOutputPath
|
|
55
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-KMB5BMFX.mjs";
|
|
56
58
|
import {
|
|
57
59
|
DEFAULT_NOT_FOUND_STYLES,
|
|
58
60
|
FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
|
|
@@ -84,7 +86,7 @@ import {
|
|
|
84
86
|
resolveFarmIsolatedClientHydrationMode,
|
|
85
87
|
resolveFarmNotFoundComponentPath,
|
|
86
88
|
usesFarmServerTree
|
|
87
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-EWC76P5D.mjs";
|
|
88
90
|
import {
|
|
89
91
|
loadTailwindVitePlugin
|
|
90
92
|
} from "./chunk-PIHKO25G.mjs";
|
|
@@ -95,7 +97,7 @@ import {
|
|
|
95
97
|
generateFarmTypeArtifacts,
|
|
96
98
|
readRouteRenderingDirectiveFromFile,
|
|
97
99
|
resolveRouteRenderingConfigFromFile
|
|
98
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-CZ35L6PL.mjs";
|
|
99
101
|
import {
|
|
100
102
|
HOISTED_HEAD_ELEMENT,
|
|
101
103
|
appMiddlewareMayHandlePath,
|
|
@@ -122,7 +124,7 @@ import {
|
|
|
122
124
|
listFarmBuiltInRoutePaths,
|
|
123
125
|
resolveFarmApiCatalogInput,
|
|
124
126
|
resolveFarmAppManifestInput
|
|
125
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-QAIAFCRZ.mjs";
|
|
126
128
|
import {
|
|
127
129
|
FARM_DEFAULT_MCP_PATH,
|
|
128
130
|
createFarmDefaultMCPServer,
|
|
@@ -130,7 +132,7 @@ import {
|
|
|
130
132
|
} from "./chunk-KRRZJ77U.mjs";
|
|
131
133
|
import {
|
|
132
134
|
farmEnvironmentFunctionsPlugin
|
|
133
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-ZQ5BDNKW.mjs";
|
|
134
136
|
import {
|
|
135
137
|
isFarmMarkdownPageFile
|
|
136
138
|
} from "./chunk-GW4YUIHW.mjs";
|
|
@@ -193,7 +195,7 @@ import {
|
|
|
193
195
|
import {
|
|
194
196
|
getFarmIntegrationPluginServerRuntime,
|
|
195
197
|
getIntegrationProviders
|
|
196
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-Y2G5SJFB.mjs";
|
|
197
199
|
import {
|
|
198
200
|
FARM_INTEGRATION_API_BASE_PATH_KEY
|
|
199
201
|
} from "./chunk-F6TLUMH7.mjs";
|
|
@@ -231,7 +233,7 @@ import {
|
|
|
231
233
|
} from "./chunk-LM2YOGDK.mjs";
|
|
232
234
|
import {
|
|
233
235
|
FARM_VERSION
|
|
234
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-EOSFVNXZ.mjs";
|
|
235
237
|
import {
|
|
236
238
|
getFarmPresetRuntime
|
|
237
239
|
} from "./chunk-UAQD67HM.mjs";
|
|
@@ -1682,15 +1684,14 @@ function createServerChunkMinifyPlugin(options) {
|
|
|
1682
1684
|
function trimSlashes(value) {
|
|
1683
1685
|
return value.replace(/^\/+|\/+$/g, "");
|
|
1684
1686
|
}
|
|
1685
|
-
function resolveBuildDocsContentDir(
|
|
1686
|
-
|
|
1687
|
-
const configuredContentDir = config.docs.contentDir || config.docs.config.contentDir;
|
|
1687
|
+
function resolveBuildDocsContentDir(docs, root, srcDir) {
|
|
1688
|
+
const configuredContentDir = docs.contentDir || docs.config.contentDir;
|
|
1688
1689
|
if (typeof configuredContentDir === "string" && configuredContentDir.trim()) {
|
|
1689
1690
|
const contentDir = path10.isAbsolute(configuredContentDir) ? configuredContentDir : path10.join(root, configuredContentDir);
|
|
1690
1691
|
return existsSync2(contentDir) ? contentDir : null;
|
|
1691
1692
|
}
|
|
1692
|
-
const entryDir =
|
|
1693
|
-
const appDocsDir = path10.join(root,
|
|
1693
|
+
const entryDir = docs.config.entry || trimSlashes(docs.entry) || "docs";
|
|
1694
|
+
const appDocsDir = path10.join(root, srcDir || "src", "app", entryDir);
|
|
1694
1695
|
if (existsSync2(appDocsDir)) return appDocsDir;
|
|
1695
1696
|
const rootDocsDir = path10.join(root, entryDir);
|
|
1696
1697
|
return existsSync2(rootDocsDir) ? rootDocsDir : null;
|
|
@@ -2212,9 +2213,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2212
2213
|
const adapterOwnsDocsRuntime = Boolean(
|
|
2213
2214
|
isReactRenderer(config.renderer) && config.docs?.enabled && config.docs.adapter?.server && config.docs.adapter.react
|
|
2214
2215
|
);
|
|
2215
|
-
const
|
|
2216
|
-
|
|
2217
|
-
|
|
2216
|
+
const docsEntries = config.docs?.enabled ? getFarmDocsRoots(config.docs).map(
|
|
2217
|
+
(docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
|
|
2218
|
+
) : [];
|
|
2219
|
+
const adapterDocsEntry = docsEntries[0] ?? null;
|
|
2220
|
+
const isAdapterDocsRoute = (routePattern) => adapterOwnsDocsRuntime && docsEntries.some(
|
|
2221
|
+
(docsEntry) => docsEntry === "/" || routePattern === docsEntry || routePattern.startsWith(`${docsEntry}/`)
|
|
2218
2222
|
);
|
|
2219
2223
|
const syntheticDocsEntry = config.docs?.enabled && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
2220
2224
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
@@ -2264,7 +2268,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2264
2268
|
layoutAppliesToRoute
|
|
2265
2269
|
);
|
|
2266
2270
|
for (const layout of clientLayouts) {
|
|
2267
|
-
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) ||
|
|
2271
|
+
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
2268
2272
|
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
2269
2273
|
logger.warn(`\u26A0\uFE0F ${describeSuppressedAsyncHydration(layout.pattern, layout.fallbackReason)}`);
|
|
2270
2274
|
}
|
|
@@ -2372,7 +2376,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2372
2376
|
srcDir,
|
|
2373
2377
|
adapterOwnsDocsRuntime ? false : isFarmDocsSearchEnabled(config.docs),
|
|
2374
2378
|
adapterOwnsDocsRuntime ? void 0 : resolveFarmDocsSearchClientModule(root),
|
|
2375
|
-
config.docs?.enabled ? config.docs.entry : void 0,
|
|
2379
|
+
config.docs?.enabled ? getFarmDocsRoots(config.docs).map((docsRoot) => docsRoot.entry) : void 0,
|
|
2376
2380
|
adapterOwnsDocsRuntime ? config.docs.adapter?.react : void 0,
|
|
2377
2381
|
config.i18n,
|
|
2378
2382
|
config.plugins,
|
|
@@ -2440,28 +2444,9 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2440
2444
|
return "assets/[name]-h[hash][extname]";
|
|
2441
2445
|
}
|
|
2442
2446
|
},
|
|
2443
|
-
//
|
|
2447
|
+
// A browser cannot load a Node builtin: farmServerOnlyEntriesPlugin
|
|
2448
|
+
// resolves one to Farm's browser module for it instead.
|
|
2444
2449
|
external: (id) => {
|
|
2445
|
-
if (id.startsWith("node:") || [
|
|
2446
|
-
"path",
|
|
2447
|
-
"url",
|
|
2448
|
-
"fs",
|
|
2449
|
-
"fs/promises",
|
|
2450
|
-
"os",
|
|
2451
|
-
"crypto",
|
|
2452
|
-
"http",
|
|
2453
|
-
"https",
|
|
2454
|
-
"net",
|
|
2455
|
-
"stream",
|
|
2456
|
-
"util",
|
|
2457
|
-
"events",
|
|
2458
|
-
"child_process",
|
|
2459
|
-
"module",
|
|
2460
|
-
"tty",
|
|
2461
|
-
"dns"
|
|
2462
|
-
].includes(id)) {
|
|
2463
|
-
return true;
|
|
2464
|
-
}
|
|
2465
2450
|
if (id === "fsevents" || id.includes("fsevents") || id.endsWith(".node")) {
|
|
2466
2451
|
return true;
|
|
2467
2452
|
}
|
|
@@ -3524,8 +3509,18 @@ function isFarmLocaleDocumentChange() {
|
|
|
3524
3509
|
return false;
|
|
3525
3510
|
}
|
|
3526
3511
|
`;
|
|
3527
|
-
const
|
|
3528
|
-
const
|
|
3512
|
+
const docsEntryPaths = typeof docsEntryPath === "string" ? [docsEntryPath] : docsEntryPath ?? [];
|
|
3513
|
+
const docsNavigationRuntime = docsEntryPaths.length > 1 ? `
|
|
3514
|
+
const farmDocsEntryPaths = ${JSON.stringify(docsEntryPaths)};
|
|
3515
|
+
function isFarmDocsPath(pathname) {
|
|
3516
|
+
const routePathname = getFarmRoutePathname(pathname);
|
|
3517
|
+
const normalizedPath = routePathname.length > 1 ? routePathname.replace(/\\/+$/, "") : routePathname;
|
|
3518
|
+
return farmDocsEntryPaths.some(
|
|
3519
|
+
(entryPath) => normalizedPath === entryPath || normalizedPath.startsWith(entryPath + "/"),
|
|
3520
|
+
);
|
|
3521
|
+
}
|
|
3522
|
+
` : docsEntryPaths[0] ? `
|
|
3523
|
+
const farmDocsEntryPath = ${JSON.stringify(docsEntryPaths[0])};
|
|
3529
3524
|
function isFarmDocsPath(pathname) {
|
|
3530
3525
|
const routePathname = getFarmRoutePathname(pathname);
|
|
3531
3526
|
const normalizedPath = routePathname.length > 1 ? routePathname.replace(/\\/+$/, "") : routePathname;
|
|
@@ -5571,15 +5566,14 @@ function readFarmPageLastModified(pageRoutes) {
|
|
|
5571
5566
|
}
|
|
5572
5567
|
function getFarmDocsGuardedPaths(config, middlewareRoutes) {
|
|
5573
5568
|
if (!config.docs?.enabled) return [];
|
|
5574
|
-
const
|
|
5575
|
-
root: config.root,
|
|
5576
|
-
srcDir: config.srcDir
|
|
5577
|
-
});
|
|
5569
|
+
const options = { root: config.root, srcDir: config.srcDir };
|
|
5578
5570
|
const guards = {
|
|
5579
5571
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
5580
5572
|
middlewareRoutes
|
|
5581
5573
|
};
|
|
5582
|
-
return
|
|
5574
|
+
return getFarmDocsRoots(config.docs).flatMap(
|
|
5575
|
+
(docsRoot) => discoverFarmDocsPages(resolveFarmDocsContentDir(docsRoot, options), docsRoot)
|
|
5576
|
+
).flatMap((page) => [page.href, getFarmDocsMarkdownPath(page.href)]).filter((pathname) => farmPathGuardCoversPage(guards, pathname));
|
|
5583
5577
|
}
|
|
5584
5578
|
function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
5585
5579
|
const llmsTxt = agent?.llmsTxt;
|
|
@@ -5593,10 +5587,34 @@ function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
|
5593
5587
|
...agent?.crawlers?.enabled || ownedByFile("robots") ? ["/robots.txt"] : []
|
|
5594
5588
|
];
|
|
5595
5589
|
}
|
|
5590
|
+
function generateFarmDocsAdapterHandlerArguments(docs, docsConfigModulePath) {
|
|
5591
|
+
const runtimeConfig = (root) => `{
|
|
5592
|
+
${docsConfigModulePath ? `...getFarmDocsConfigModuleRoot(farmDocsConfigModule.default || farmDocsConfigModule, ${root}.entry),
|
|
5593
|
+
...${root}.configOverrides,` : `...${root}.config,`}
|
|
5594
|
+
entry: ${root}.config?.entry || String(${root}.entry || "/docs").replace(/^\\/+|\\/+$/g, "") || "docs",
|
|
5595
|
+
docsPath: ${root}.entry,
|
|
5596
|
+
contentDir: ${root}.contentDir || ${root}.config?.contentDir,
|
|
5597
|
+
}`;
|
|
5598
|
+
if (docs?.roots?.length) {
|
|
5599
|
+
return {
|
|
5600
|
+
factory: "createFarmDocsAdapterMultiRuntimeHandler",
|
|
5601
|
+
config: `[farmDocsResolvedConfig, ...farmDocsResolvedConfig.roots].map((farmDocsRoot) => (${runtimeConfig("farmDocsRoot")}))`
|
|
5602
|
+
};
|
|
5603
|
+
}
|
|
5604
|
+
return {
|
|
5605
|
+
factory: "createFarmDocsAdapterRuntimeHandler",
|
|
5606
|
+
config: runtimeConfig("farmDocsResolvedConfig")
|
|
5607
|
+
};
|
|
5608
|
+
}
|
|
5596
5609
|
function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
|
|
5597
5610
|
if (!docs.enabled) return "null";
|
|
5598
|
-
const
|
|
5611
|
+
const serializableDocs = docs.roots?.length ? {
|
|
5599
5612
|
...docs,
|
|
5613
|
+
// React elements and functions do not survive JSON; see runtimeConfig below.
|
|
5614
|
+
roots: docs.roots.map((docsRoot) => ({ ...docsRoot, runtimeConfig: void 0 }))
|
|
5615
|
+
} : docs;
|
|
5616
|
+
const baseConfig = {
|
|
5617
|
+
...serializableDocs,
|
|
5600
5618
|
contentDir: void 0,
|
|
5601
5619
|
...precompiled ? { configPath: void 0 } : {},
|
|
5602
5620
|
config: void 0,
|
|
@@ -5614,7 +5632,7 @@ function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
|
|
|
5614
5632
|
config: nestedConfig
|
|
5615
5633
|
});
|
|
5616
5634
|
}
|
|
5617
|
-
|
|
5635
|
+
const expression = `farmDocsBundledContentDir
|
|
5618
5636
|
? {
|
|
5619
5637
|
...${JSON.stringify(baseConfig)},
|
|
5620
5638
|
contentDir: farmDocsBundledContentDir,
|
|
@@ -5623,7 +5641,19 @@ function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
|
|
|
5623
5641
|
contentDir: farmDocsBundledContentDir,
|
|
5624
5642
|
},
|
|
5625
5643
|
}
|
|
5626
|
-
: ${JSON.stringify({ ...
|
|
5644
|
+
: ${JSON.stringify({ ...serializableDocs, runtimeConfig: void 0 })}`;
|
|
5645
|
+
if (!docs.roots?.length) return expression;
|
|
5646
|
+
return `((farmDocs) => ({
|
|
5647
|
+
...farmDocs,
|
|
5648
|
+
roots: farmDocs.roots.map((farmDocsRoot, index) => {
|
|
5649
|
+
const contentDir = farmDocsBundledRootsDir
|
|
5650
|
+
? farmDocsJoin(farmDocsBundledRootsDir, String(index))
|
|
5651
|
+
: null;
|
|
5652
|
+
return contentDir && farmDocsExistsSync(contentDir)
|
|
5653
|
+
? { ...farmDocsRoot, contentDir, config: { ...farmDocsRoot.config, contentDir } }
|
|
5654
|
+
: farmDocsRoot;
|
|
5655
|
+
}),
|
|
5656
|
+
}))(${expression})`;
|
|
5627
5657
|
}
|
|
5628
5658
|
function toVirtualEntryImportSpecifier(modulePath) {
|
|
5629
5659
|
return JSON.stringify(modulePath.replace(/\\/g, "/"));
|
|
@@ -5938,7 +5968,13 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
|
|
|
5938
5968
|
const adapterOwnsDocsRuntime = Boolean(
|
|
5939
5969
|
isReactRenderer(config.renderer) && config.docs?.enabled && config.docs.adapter?.server && config.docs.adapter.react
|
|
5940
5970
|
);
|
|
5971
|
+
if (config.docs?.enabled && config.docs.roots?.length && !adapterOwnsDocsRuntime) {
|
|
5972
|
+
throw new Error(
|
|
5973
|
+
"Several docs roots need the docs adapter, which serves the React renderer only; Farm's built-in docs renderer serves a single docs root."
|
|
5974
|
+
);
|
|
5975
|
+
}
|
|
5941
5976
|
const docsConfigModulePath = adapterOwnsDocsRuntime && !hasPrecompiledDocs && config.docs.configPath && !config.docs.configPath.endsWith(".json") ? config.docs.configPath : void 0;
|
|
5977
|
+
const adapterHandler = generateFarmDocsAdapterHandlerArguments(config.docs, docsConfigModulePath);
|
|
5942
5978
|
const hasIsolatedClientGraphRuntime = isReactRenderer(config.renderer) && isolatedClientBoundaryModules.size > 0;
|
|
5943
5979
|
const rendererStreamingCapabilities = getFarmRendererStreamingCapabilitiesForRuntime(
|
|
5944
5980
|
config.renderer,
|
|
@@ -6335,6 +6371,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6335
6371
|
resolveFarmInstrumentationRuntime,
|
|
6336
6372
|
resolveFarmPreviewDeployment,
|
|
6337
6373
|
resolveFarmWebRequestOrigin,
|
|
6374
|
+
fetchFarmExternalRewrite,
|
|
6338
6375
|
runWithFarmRequestSpan,
|
|
6339
6376
|
createFarmSearchParams,
|
|
6340
6377
|
searchParamsToObject,
|
|
@@ -6366,8 +6403,8 @@ const isFarmDocsAPIRequest = (requestOrPathname) => {
|
|
|
6366
6403
|
: new URL(requestOrPathname.url).pathname;
|
|
6367
6404
|
const apiPath = ${JSON.stringify(farmDocsPrecompiledManifest?.apiPath || "/api/docs")};
|
|
6368
6405
|
return pathname === apiPath || pathname.startsWith(apiPath + "/");
|
|
6369
|
-
};` : adapterOwnsDocsRuntime ? `import { isFarmDocsAPIRequest } from "@farm.js/core/docs";
|
|
6370
|
-
import { createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler } from ${JSON.stringify(config.docs.adapter.server)};
|
|
6406
|
+
};` : adapterOwnsDocsRuntime ? `import { ${docsConfigModulePath ? "getFarmDocsConfigModuleRoot, " : ""}isFarmDocsAPIRequest } from "@farm.js/core/docs";
|
|
6407
|
+
import { ${config.docs.roots?.length ? "createFarmDocsMultiRuntimeHandler as createFarmDocsAdapterMultiRuntimeHandler" : "createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler"} } from ${JSON.stringify(config.docs.adapter.server)};
|
|
6371
6408
|
import * as FarmDocsAdapterReact from ${JSON.stringify(config.docs.adapter.react)};${docsConfigModulePath ? `
|
|
6372
6409
|
import * as farmDocsConfigModule from ${toVirtualEntryImportSpecifier(docsConfigModulePath)};` : ""}` : `import { createFarmDocsAPIHandler, createFarmDocsHandler, isFarmDocsAPIRequest } from "@farm.js/core/docs";` : "";
|
|
6373
6410
|
const docsFontImport = config.docs?.enabled && !hasPrecompiledDocs ? `import { resolveFarmLayoutFonts } from "@farm.js/core/font";` : "";
|
|
@@ -6785,7 +6822,20 @@ const farmDocsBundledContentDir = ${config.docs?.enabled && !hasPrecompiledDocs
|
|
|
6785
6822
|
} catch {
|
|
6786
6823
|
return null;
|
|
6787
6824
|
}
|
|
6788
|
-
})()` : "null"}
|
|
6825
|
+
})()` : "null"};${config.docs?.enabled && !hasPrecompiledDocs && config.docs.roots?.length ? `
|
|
6826
|
+
const farmDocsBundledRootsDir = (() => {
|
|
6827
|
+
try {
|
|
6828
|
+
const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
|
|
6829
|
+
const candidates = [
|
|
6830
|
+
farmDocsJoin(currentDir, "farm-docs-roots"),
|
|
6831
|
+
farmDocsJoin(currentDir, "..", "farm-docs-roots"),
|
|
6832
|
+
farmDocsJoin(currentDir, "..", "..", "farm-docs-roots"),
|
|
6833
|
+
];
|
|
6834
|
+
return candidates.find((candidate) => farmDocsExistsSync(candidate)) || null;
|
|
6835
|
+
} catch {
|
|
6836
|
+
return null;
|
|
6837
|
+
}
|
|
6838
|
+
})();` : ""}
|
|
6789
6839
|
const farmDocsResolvedConfig = ${generateFarmDocsRuntimeConfigExpression(config.docs, hasPrecompiledDocs)};
|
|
6790
6840
|
const farmDocsRuntimeRoot = ${hasPrecompiledDocs ? '"."' : `farmDocsBundledContentDir || ${JSON.stringify(config.root)}`};
|
|
6791
6841
|
// Docs pages a path-specific guard covers, decided at build time. The docs API and the
|
|
@@ -6823,12 +6873,7 @@ const farmDocsModulePreloadPaths = farmDocsModulePreloads
|
|
|
6823
6873
|
),
|
|
6824
6874
|
}
|
|
6825
6875
|
: undefined;
|
|
6826
|
-
const farmDocsHandler = ${config.docs?.enabled ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ?
|
|
6827
|
-
${docsConfigModulePath ? "...(farmDocsConfigModule.default || farmDocsConfigModule),\n ...farmDocsResolvedConfig.configOverrides," : "...farmDocsResolvedConfig.config,"}
|
|
6828
|
-
entry: farmDocsResolvedConfig.config?.entry || String(farmDocsResolvedConfig.entry || "/docs").replace(/^\\/+|\\/+$/g, "") || "docs",
|
|
6829
|
-
docsPath: farmDocsResolvedConfig.entry,
|
|
6830
|
-
contentDir: farmDocsResolvedConfig.contentDir || farmDocsResolvedConfig.config?.contentDir,
|
|
6831
|
-
}, {
|
|
6876
|
+
const farmDocsHandler = ${config.docs?.enabled ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `${adapterHandler.factory}(${adapterHandler.config}, {
|
|
6832
6877
|
rootDir: farmDocsRuntimeRoot,
|
|
6833
6878
|
// A production build's content cannot change, so the adapter reads its
|
|
6834
6879
|
// navigation once instead of scanning the content directory per request.
|
|
@@ -8480,7 +8525,7 @@ const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
|
8480
8525
|
)});
|
|
8481
8526
|
${config.docs?.enabled ? `const farmDocsRouteLabelInput = {
|
|
8482
8527
|
path: normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs"),
|
|
8483
|
-
apiPath: ${JSON.stringify(farmDocsPrecompiledManifest?.apiPath || "/api/docs")},
|
|
8528
|
+
apiPath: ${JSON.stringify(farmDocsPrecompiledManifest?.apiPath || "/api/docs")},${config.docs.roots?.length ? "\n roots: farmDocsResolvedConfig.roots.map((farmDocsRoot) => farmDocsRoot.entry)," : ""}
|
|
8484
8529
|
};
|
|
8485
8530
|
` : ""}// The request's route payload, for a handler that learns what answered while it handles.
|
|
8486
8531
|
const farmRouteLabelSlot = Symbol("farm.route.label.slot");
|
|
@@ -8855,7 +8900,7 @@ async function resolveFarmRequestInContext(
|
|
|
8855
8900
|
if (rewriteDestination) {
|
|
8856
8901
|
let rewrittenRequest = createRewrittenRequest(request, rewriteDestination);
|
|
8857
8902
|
if (new URL(rewrittenRequest.url).origin !== url.origin) {
|
|
8858
|
-
return
|
|
8903
|
+
return fetchFarmExternalRewrite(rewrittenRequest);
|
|
8859
8904
|
}
|
|
8860
8905
|
if (farmPluginRuntime) {
|
|
8861
8906
|
// Plugin guards ran on the requested URL. Re-run only runtime.before
|
|
@@ -10689,6 +10734,29 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
10689
10734
|
}
|
|
10690
10735
|
return void 0;
|
|
10691
10736
|
}
|
|
10737
|
+
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
10738
|
+
if (!config.docs?.enabled || !config.docs.prerender) return [];
|
|
10739
|
+
if (!isReactRenderer(config.renderer) || !hasFarmDocsRuntimeAdapter(config.docs)) {
|
|
10740
|
+
logger.warn(
|
|
10741
|
+
"docs.prerender needs a docs adapter such as @farming-labs/farmjs; Farm's built-in docs renderer keeps rendering docs pages on request."
|
|
10742
|
+
);
|
|
10743
|
+
return [];
|
|
10744
|
+
}
|
|
10745
|
+
if (getFarmPresetRuntime(preset) === "edge") {
|
|
10746
|
+
logger.info(
|
|
10747
|
+
`\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
|
|
10748
|
+
);
|
|
10749
|
+
return [];
|
|
10750
|
+
}
|
|
10751
|
+
const pages = await listFarmDocsAdapterPages(config.docs, { root, srcDir: config.srcDir });
|
|
10752
|
+
if (!pages) {
|
|
10753
|
+
logger.warn(
|
|
10754
|
+
`The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
|
|
10755
|
+
);
|
|
10756
|
+
return [];
|
|
10757
|
+
}
|
|
10758
|
+
return pages;
|
|
10759
|
+
}
|
|
10692
10760
|
function hasFarmNitroCacheRouteRule(routeRules) {
|
|
10693
10761
|
return Object.values(routeRules || {}).some((rule) => {
|
|
10694
10762
|
const swr = rule?.swr;
|
|
@@ -10730,12 +10798,19 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
10730
10798
|
const ssgCollectionPromise = routeManager.collectSSGPages();
|
|
10731
10799
|
const middlewareRoutesPromise = discoverMiddlewareRoutes(getFarmAppDirectories(config));
|
|
10732
10800
|
const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
|
|
10801
|
+
const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
|
|
10733
10802
|
const farmWorkflows = await prepareFarmWorkflowsForNitro(config);
|
|
10734
10803
|
const farmCron = await prepareFarmCronForNitro(config);
|
|
10735
|
-
const [
|
|
10804
|
+
const [
|
|
10805
|
+
{ ssg: ssgPages },
|
|
10806
|
+
middlewareRoutes,
|
|
10807
|
+
[configuredRedirects, configuredRewrites],
|
|
10808
|
+
docsPrerenderPages
|
|
10809
|
+
] = await Promise.all([
|
|
10736
10810
|
ssgCollectionPromise,
|
|
10737
10811
|
middlewareRoutesPromise,
|
|
10738
|
-
configuredResponseRoutesPromise
|
|
10812
|
+
configuredResponseRoutesPromise,
|
|
10813
|
+
docsPrerenderPagesPromise
|
|
10739
10814
|
]);
|
|
10740
10815
|
const redirectSources = [
|
|
10741
10816
|
...routeManager.getRedirects().map((route) => route.source),
|
|
@@ -10744,7 +10819,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
10744
10819
|
const rewriteSources = configuredRewrites.map((route) => route.source);
|
|
10745
10820
|
const prerenderRoutes = [];
|
|
10746
10821
|
const skippedPrerenderRoutes = [];
|
|
10747
|
-
const middlewareRoutesWithConfig = ssgPages.length > 0 ? await Promise.all(
|
|
10822
|
+
const middlewareRoutesWithConfig = ssgPages.length > 0 || docsPrerenderPages.length > 0 ? await Promise.all(
|
|
10748
10823
|
middlewareRoutes.map(async (route) => ({
|
|
10749
10824
|
...route,
|
|
10750
10825
|
config: await readMiddlewareFileConfig(route.filePath)
|
|
@@ -10767,6 +10842,26 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
10767
10842
|
}
|
|
10768
10843
|
prerenderRoutes.push(page.urlPath);
|
|
10769
10844
|
}
|
|
10845
|
+
const docsRouteRuntimeManifest = {
|
|
10846
|
+
...routeRuntimeManifest,
|
|
10847
|
+
routes: routeRuntimeManifest.routes.filter((entry) => entry.kind !== "page")
|
|
10848
|
+
};
|
|
10849
|
+
for (const pathname of docsPrerenderPages) {
|
|
10850
|
+
if (prerenderRoutes.includes(pathname)) continue;
|
|
10851
|
+
const reason = getPhysicalPrerenderBypassReason({
|
|
10852
|
+
config,
|
|
10853
|
+
middlewareRoutes: middlewareRoutesWithConfig,
|
|
10854
|
+
routeRuntimeManifest: docsRouteRuntimeManifest,
|
|
10855
|
+
redirectSources,
|
|
10856
|
+
rewriteSources,
|
|
10857
|
+
pathname
|
|
10858
|
+
});
|
|
10859
|
+
if (reason) {
|
|
10860
|
+
skippedPrerenderRoutes.push({ pathname, reason });
|
|
10861
|
+
continue;
|
|
10862
|
+
}
|
|
10863
|
+
prerenderRoutes.push(pathname);
|
|
10864
|
+
}
|
|
10770
10865
|
for (const skipped of skippedPrerenderRoutes) {
|
|
10771
10866
|
logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
|
|
10772
10867
|
}
|
|
@@ -11500,9 +11595,28 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
11500
11595
|
logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
|
|
11501
11596
|
}
|
|
11502
11597
|
async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
11503
|
-
|
|
11598
|
+
if (!config.docs?.enabled) return;
|
|
11599
|
+
const [mainRoot, ...extraRoots] = getFarmDocsRoots(config.docs);
|
|
11600
|
+
await copyFarmDocsRootContent(
|
|
11601
|
+
mainRoot,
|
|
11602
|
+
root,
|
|
11603
|
+
config.srcDir,
|
|
11604
|
+
path10.join(nitroFuncDir, "farm-docs-content"),
|
|
11605
|
+
fs4
|
|
11606
|
+
);
|
|
11607
|
+
for (const [index, docsRoot] of extraRoots.entries()) {
|
|
11608
|
+
await copyFarmDocsRootContent(
|
|
11609
|
+
docsRoot,
|
|
11610
|
+
root,
|
|
11611
|
+
config.srcDir,
|
|
11612
|
+
path10.join(nitroFuncDir, "farm-docs-roots", String(index)),
|
|
11613
|
+
fs4
|
|
11614
|
+
);
|
|
11615
|
+
}
|
|
11616
|
+
}
|
|
11617
|
+
async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs4) {
|
|
11618
|
+
const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
|
|
11504
11619
|
if (!docsContentDir) return;
|
|
11505
|
-
const bundledContentDir = path10.join(nitroFuncDir, "farm-docs-content");
|
|
11506
11620
|
const lastModifiedManifest = createFarmDocsLastModifiedManifest(docsContentDir, {
|
|
11507
11621
|
fallback: "now"
|
|
11508
11622
|
});
|
|
@@ -40,7 +40,7 @@ var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
|
|
|
40
40
|
var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -457,11 +457,11 @@ function farmApiPlugin(options = {}) {
|
|
|
457
457
|
const response = await apiRouterHandler(request);
|
|
458
458
|
const duration = Date.now() - startTime;
|
|
459
459
|
logResponse(method, currentPathname, response.status, duration);
|
|
460
|
-
await
|
|
460
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
|
|
461
461
|
} catch (error) {
|
|
462
462
|
const bodyErrorResponse = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
463
463
|
if (bodyErrorResponse) {
|
|
464
|
-
await
|
|
464
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
const duration = Date.now() - startTime;
|
|
@@ -651,16 +651,34 @@ function resolveFarmDocsContentDir(docs, options) {
|
|
|
651
651
|
if (_fs.existsSync.call(void 0, appDocsDir)) return appDocsDir;
|
|
652
652
|
return _path2.default.join(root, entryDir);
|
|
653
653
|
}
|
|
654
|
+
function getFarmDocsRoots(docs) {
|
|
655
|
+
return [
|
|
656
|
+
docs,
|
|
657
|
+
...(_nullishCoalesce(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 (!_optionalChain([docs, 'optionalAccess', _44 => _44.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 (!_optionalChain([docs, 'optionalAccess', _45 => _45.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;
|
|
@@ -1928,4 +1946,5 @@ function createFarmDocsHandler(docs, options) {
|
|
|
1928
1946
|
|
|
1929
1947
|
|
|
1930
1948
|
|
|
1931
|
-
|
|
1949
|
+
|
|
1950
|
+
exports.FARM_DOCS_LAST_MODIFIED_MANIFEST = FARM_DOCS_LAST_MODIFIED_MANIFEST; exports.createFarmDocsLastModifiedManifest = createFarmDocsLastModifiedManifest; exports.isFarmDocsRequest = isFarmDocsRequest; exports.resolveFarmDocsContentDir = resolveFarmDocsContentDir; exports.getFarmDocsRoots = getFarmDocsRoots; exports.getFarmDocsRouteTypeEntries = getFarmDocsRouteTypeEntries; exports.getFarmDocsDocumentNavigationMatchers = getFarmDocsDocumentNavigationMatchers; exports.loadFarmDocsPage = loadFarmDocsPage; exports.getFarmDocsMarkdownPath = getFarmDocsMarkdownPath; exports.discoverFarmDocsPages = discoverFarmDocsPages; exports.toFarmDocsMarkdownPage = toFarmDocsMarkdownPage; exports.createFarmDocsHandler = createFarmDocsHandler;
|
|
@@ -15,7 +15,7 @@ function farmDesktopDevGuardPlugin(basePath) {
|
|
|
15
15
|
order: "pre",
|
|
16
16
|
async handler(server) {
|
|
17
17
|
if (_chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ) !== "desktop") return;
|
|
18
|
-
const { createFarmDesktopDevGuard } = await import("./dev-guard-
|
|
18
|
+
const { createFarmDesktopDevGuard } = await import("./dev-guard-2UW2KERP.cjs");
|
|
19
19
|
server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
|
|
20
20
|
}
|
|
21
21
|
}
|