@farm.js/core 0.1.51-beta.0 → 0.1.51-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-BBMfNpsC.d.ts → agent-mcp.d-CR5Ov83o.d.ts} +1 -1
- package/dist/{agent-mcp-D44ip11f.d.mts → agent-mcp.d-Z5DuwrqW.d.mts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +13 -13
- package/dist/agent-runtime.d.ts +13 -13
- package/dist/agent-runtime.mjs +2 -2
- package/dist/{analyzer-VKUDHNDF.cjs → analyzer-T76CN3S7.cjs} +70 -21
- package/dist/{analyzer-HOUCQR3K.mjs → analyzer-Z6TNEAET.mjs} +70 -21
- package/dist/api/client.d.mts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/route-manager.d.mts +19 -19
- package/dist/api/route-manager.d.ts +19 -19
- package/dist/api/runtime.d.mts +15 -15
- package/dist/api/runtime.d.ts +15 -15
- package/dist/{api-client-CvI5oOBE.d.ts → api-client.d-BWcqZciH.d.ts} +3 -3
- package/dist/{api-client-CFdv-Xgh.d.mts → api-client.d-CeA6tNA6.d.mts} +3 -3
- package/dist/api.cjs +3 -3
- package/dist/api.d.mts +21 -21
- package/dist/api.d.ts +21 -21
- package/dist/api.mjs +2 -2
- package/dist/{app-manifest-LzjoNPeq.d.ts → app-manifest.d-CAHkOBFa.d.mts} +1 -1
- package/dist/{app-manifest-BC6mFn5A.d.mts → app-manifest.d-DiWr_Jfx.d.ts} +1 -1
- package/dist/app-markdown.d.mts +14 -14
- package/dist/app-markdown.d.ts +14 -14
- package/dist/{app-aeD4s_mg.d.mts → app.d-BfgJCsTQ.d.mts} +12 -10
- package/dist/{app-CourU3rQ.d.ts → app.d-DmapqkbV.d.ts} +12 -10
- package/dist/{chunk-AMRK3P6W.mjs → chunk-4SSRBCBR.mjs} +233 -84
- package/dist/{chunk-PDJSL7PL.cjs → chunk-5IONBVJY.cjs} +3 -3
- package/dist/{chunk-IOUOGRDX.cjs → chunk-5N7QAGEA.cjs} +25 -6
- package/dist/{chunk-DGOLAZLV.cjs → chunk-65Y5SIBH.cjs} +1 -1
- package/dist/{chunk-ZF3GX4O7.mjs → chunk-6CYQQQGR.mjs} +1 -1
- package/dist/{chunk-QI5AQMEE.mjs → chunk-72NBDVWQ.mjs} +1 -1
- package/dist/{chunk-I2ZA5SXS.mjs → chunk-74Z5KX4A.mjs} +53 -19
- package/dist/chunk-7FVVQEVL.cjs +541 -0
- package/dist/{chunk-OD6WM3I7.mjs → chunk-AV26KHTG.mjs} +1 -1
- package/dist/chunk-C3BOESDW.mjs +541 -0
- package/dist/{chunk-WAPQWAE6.cjs → chunk-CECUDGXQ.cjs} +9 -8
- package/dist/{chunk-IUQLRTTO.mjs → chunk-CO6UYM2D.mjs} +14 -1
- package/dist/{chunk-JF5CNHHF.mjs → chunk-CTM4SPB3.mjs} +123 -8
- package/dist/{chunk-WVX3BUNJ.mjs → chunk-CZ35L6PL.mjs} +8 -1
- package/dist/{chunk-SO3T6T4I.cjs → chunk-DTU4PX7V.cjs} +408 -259
- package/dist/{chunk-YLNBWUVS.mjs → chunk-E6LTONL4.mjs} +1 -1
- package/dist/{chunk-R5P4KFPM.mjs → chunk-E73PGHSR.mjs} +8 -6
- package/dist/{chunk-4GJJ65RB.mjs → chunk-EIMK7D2D.mjs} +24 -5
- package/dist/{chunk-CY7H5KS4.cjs → chunk-EKJYE4Y7.cjs} +2 -2
- package/dist/{chunk-3HA7PP72.mjs → chunk-FM2UEKS2.mjs} +60 -13
- package/dist/{chunk-VIFPE5RG.cjs → chunk-GNJIYJMS.cjs} +81 -34
- package/dist/{chunk-X5BCMLGP.cjs → chunk-GUJTVM36.cjs} +1 -1
- package/dist/{chunk-XWC5NAHV.mjs → chunk-IBSAYAWB.mjs} +2 -2
- package/dist/{chunk-J22JD5YJ.cjs → chunk-J3LBO2O4.cjs} +9 -7
- package/dist/{chunk-J37KTQIA.cjs → chunk-NK2VWS7P.cjs} +52 -3
- package/dist/{chunk-WSY2JD7O.mjs → chunk-NN3MOPSI.mjs} +1 -1
- package/dist/{chunk-O3MMJPC2.cjs → chunk-NPQLMP7M.cjs} +124 -9
- package/dist/{chunk-QK3HBOTG.cjs → chunk-NXBHYO7S.cjs} +5 -5
- package/dist/{chunk-S5ZA2T2W.mjs → chunk-PMKUU273.mjs} +21 -7
- package/dist/{chunk-75WWOZ5C.mjs → chunk-QOSDWGKT.mjs} +1 -1
- package/dist/{chunk-VO6NLTV4.cjs → chunk-QXPSWMUD.cjs} +3 -3
- package/dist/{chunk-Y7TLL65B.cjs → chunk-UQHIWZZ6.cjs} +11 -4
- package/dist/{chunk-PPDHCRTC.mjs → chunk-VS7EHLLW.mjs} +1 -1
- package/dist/{chunk-F42U3R4F.cjs → chunk-WZW6LEHM.cjs} +55 -41
- package/dist/{chunk-USL2ANCB.cjs → chunk-X2AMN2WV.cjs} +2 -2
- package/dist/{chunk-HHFMECFO.mjs → chunk-Y2G5SJFB.mjs} +2 -1
- package/dist/{chunk-Z5MZDFX4.cjs → chunk-YIHRZBD7.cjs} +14 -1
- package/dist/{chunk-DWW3AMJX.cjs → chunk-YU42A5MA.cjs} +282 -248
- package/dist/{chunk-MMEEXMUQ.cjs → chunk-ZOWNWHK6.cjs} +2 -2
- package/dist/{chunk-C5JXCUKR.mjs → chunk-ZQ5BDNKW.mjs} +51 -2
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-plugins-cqy_dQd0.d.mts → client-plugins.d-Bx3FXpqm.d.mts} +57 -15
- package/dist/{client-plugins-CFBEfVPO.d.ts → client-plugins.d-TiLbS5j4.d.ts} +57 -15
- package/dist/client-plugins.d.mts +13 -13
- package/dist/client-plugins.d.ts +13 -13
- package/dist/client.d.mts +24 -24
- package/dist/client.d.ts +24 -24
- package/dist/{config-CnhyvvmT.d.mts → config.d-iRPI16ku.d.mts} +6 -2
- package/dist/{config-CnhyvvmT.d.ts → config.d-iRPI16ku.d.ts} +6 -2
- package/dist/config.d.mts +13 -13
- package/dist/config.d.ts +13 -13
- package/dist/desktop.d.mts +14 -14
- package/dist/desktop.d.ts +14 -14
- package/dist/{dev-guard-YLO5DE3H.cjs → dev-guard-2UW2KERP.cjs} +2 -2
- package/dist/{dev-guard-4PFQNXQX.mjs → dev-guard-ONNMVQUN.mjs} +1 -1
- package/dist/{devtools-4ZLMD454.cjs → devtools-6XWCZIGO.cjs} +4 -4
- package/dist/{devtools-4MLL3RAL.mjs → devtools-UQLDAOEI.mjs} +3 -3
- package/dist/docs.cjs +8 -6
- package/dist/docs.d.mts +23 -15
- package/dist/docs.d.ts +23 -15
- package/dist/docs.mjs +7 -5
- package/dist/environment/vite.cjs +2 -2
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +1 -1
- package/dist/{generate-route-types-TF5Wwtvz.d.mts → generate-route-types.d-BL2pq6xC.d.ts} +1 -1
- package/dist/{generate-route-types-DQP0cUzk.d.ts → generate-route-types.d-BoVDU8qX.d.mts} +1 -1
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/image/server.d.mts +1 -1
- package/dist/image/server.d.ts +1 -1
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/index.cjs +20 -17
- package/dist/{index-D3l4tREW.d.ts → index.d-BNNDpql4.d.ts} +2 -2
- package/dist/{index-DPUAPho_.d.mts → index.d-BqcfqJvt.d.mts} +2 -2
- package/dist/{index-BxjN_UDZ.d.ts → index.d-YxJ2AiDF.d.mts} +2 -2
- package/dist/{index-BYkNbeQV.d.mts → index.d-yueUNipJ.d.ts} +2 -2
- package/dist/index.d.mts +42 -42
- package/dist/index.d.ts +42 -42
- package/dist/index.mjs +19 -16
- package/dist/instrumentation.d.mts +2 -2
- package/dist/instrumentation.d.ts +2 -2
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +13 -13
- package/dist/integrations.d.ts +13 -13
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +14 -14
- package/dist/internal/app-markdown-runtime.d.ts +14 -14
- package/dist/internal/build-runtime.cjs +16 -15
- package/dist/internal/build-runtime.d.mts +16 -16
- package/dist/internal/build-runtime.d.ts +16 -16
- package/dist/internal/build-runtime.mjs +15 -14
- package/dist/internal/cli-runtime.cjs +7 -7
- package/dist/internal/cli-runtime.mjs +6 -6
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +21 -21
- package/dist/internal/client-runtime.d.ts +21 -21
- package/dist/internal/compression-runtime.d.mts +13 -13
- package/dist/internal/compression-runtime.d.ts +13 -13
- package/dist/internal/config-runtime.cjs +5 -5
- package/dist/internal/config-runtime.d.mts +29 -92
- package/dist/internal/config-runtime.d.ts +29 -92
- package/dist/internal/config-runtime.mjs +4 -4
- package/dist/internal/form-actions.d.mts +1 -1
- package/dist/internal/form-actions.d.ts +1 -1
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/island-value-store.d.mts +1 -1
- package/dist/internal/island-value-store.d.ts +1 -1
- package/dist/internal/islands-runtime.d.mts +1 -1
- package/dist/internal/islands-runtime.d.ts +1 -1
- package/dist/internal/isolated-boundary.d.mts +2 -2
- package/dist/internal/isolated-boundary.d.ts +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +11 -3
- package/dist/internal/production-runtime.d.mts +57 -31
- package/dist/internal/production-runtime.d.ts +57 -31
- package/dist/internal/production-runtime.mjs +10 -2
- package/dist/internal/server-tree.d.mts +1 -1
- package/dist/internal/server-tree.d.ts +1 -1
- package/dist/markdown.d.mts +13 -13
- package/dist/markdown.d.ts +13 -13
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.d.mts +15 -15
- package/dist/middleware.d.ts +15 -15
- package/dist/middleware.mjs +3 -3
- package/dist/mobile.d.mts +7 -7
- package/dist/mobile.d.ts +7 -7
- package/dist/{navigation-delegate-BU4xqdnw.d.ts → navigation-delegate.d-BY1e_Xrh.d.ts} +1 -1
- package/dist/{navigation-delegate-DLhbfEN4.d.mts → navigation-delegate.d-HnDXhlyP.d.mts} +1 -1
- package/dist/navigation.d.mts +17 -17
- package/dist/navigation.d.ts +17 -17
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/plugin.cjs +11 -11
- package/dist/plugin.d.mts +17 -17
- package/dist/plugin.d.ts +17 -17
- package/dist/plugin.mjs +10 -10
- package/dist/{production-runtime-DLA4J5WG.d.mts → production-runtime.d-BpJUDzP8.d.mts} +3 -3
- package/dist/{production-runtime-C78A8YgK.d.ts → production-runtime.d-lMjvE9cf.d.ts} +3 -3
- package/dist/{programmatic-routes-client-NpqGBn-i.d.mts → programmatic-routes-client.d-6CGQ3TCk.d.mts} +10 -2
- package/dist/{programmatic-routes-client-CBqkNhBy.d.ts → programmatic-routes-client.d-BlFp5hv4.d.ts} +10 -2
- package/dist/query/client.d.mts +1 -1
- package/dist/query/client.d.ts +1 -1
- package/dist/query/index.d.mts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/server.d.mts +1 -1
- package/dist/query/server.d.ts +1 -1
- package/dist/{render-plan-CrqcBbnV.d.ts → render-plan.d-BH9edqKs.d.mts} +2 -2
- package/dist/{render-plan-C9sWvDTv.d.mts → render-plan.d-DhP0mTHF.d.ts} +2 -2
- package/dist/renderer-client.d.mts +19 -19
- package/dist/renderer-client.d.ts +19 -19
- package/dist/{request-BizeuqD7.d.ts → request.d-BVZrsR1v.d.ts} +1 -1
- package/dist/{request-WwB1-Uim.d.mts → request.d-DJFRdKi8.d.mts} +1 -1
- package/dist/request.d.mts +14 -14
- package/dist/request.d.ts +14 -14
- package/dist/{resolver-CJ-D9nP-.d.ts → resolver.d-BHyZgpa7.d.ts} +1 -1
- package/dist/{resolver-TDyZKgKI.d.mts → resolver.d-JnZKKsc5.d.mts} +1 -1
- package/dist/response.d-BolW0Vx_.d.mts +10 -0
- package/dist/response.d-BolW0Vx_.d.ts +10 -0
- package/dist/{route-rendering-BGhJN64l.d.ts → route-rendering.d-B00JtK_-.d.ts} +1 -1
- package/dist/{route-rendering-S6NFjnx4.d.mts → route-rendering.d-Bpmw7PED.d.mts} +1 -1
- package/dist/{route-2_yXC6gv.d.mts → route.d-BaVH3V0w.d.mts} +1 -1
- package/dist/{route-DFhZj6jN.d.ts → route.d-DBTEqifW.d.ts} +1 -1
- package/dist/{router-BUD_j2EL.d.ts → router.d-Bd1x9XxQ.d.ts} +1 -1
- package/dist/{router-BIheIy9G.d.mts → router.d-e0jQ3jQ-.d.mts} +1 -1
- package/dist/{routes-kEUsXHx3.d.mts → routes.d-Cmv8TgVq.d.mts} +91 -4
- package/dist/{routes-8PT9cl60.d.ts → routes.d-D96Dq9lz.d.ts} +91 -4
- package/dist/routes.d.mts +13 -13
- package/dist/routes.d.ts +13 -13
- package/dist/{rsc-pipeline-JRGUZBYM.cjs → rsc-pipeline-DX4OC5FN.cjs} +6 -6
- package/dist/{rsc-pipeline-OLAVIKI3.mjs → rsc-pipeline-ZQ4CTVEG.mjs} +5 -5
- package/dist/{runtime-OGCHDACZ.mjs → runtime-NPDRDV6R.mjs} +66 -17
- package/dist/{runtime-G23RSLEK.cjs → runtime-NQ3EDSA7.cjs} +75 -26
- package/dist/{runtime-CihDZ2Rn.d.mts → runtime.d-3iJAKptR.d.mts} +2 -2
- package/dist/{runtime-C4CmlOOh.d.ts → runtime.d-BtL3PCL3.d.ts} +2 -2
- package/dist/{runtime-CWP-21hP.d.ts → runtime.d-CgB3IJDq.d.mts} +4 -4
- package/dist/{runtime-CgJwe6H_.d.mts → runtime.d-D-td-RR3.d.ts} +4 -4
- package/dist/server-action-security.d.mts +1 -1
- package/dist/server-action-security.d.ts +1 -1
- package/dist/server-fn-client.d.mts +5 -5
- package/dist/server-fn-client.d.ts +5 -5
- package/dist/server-fn.d.mts +3 -3
- package/dist/server-fn.d.ts +3 -3
- package/dist/server-plugins.d.mts +14 -14
- package/dist/server-plugins.d.ts +14 -14
- package/dist/server-query-client.d.mts +5 -5
- package/dist/server-query-client.d.ts +5 -5
- package/dist/server-query.d.mts +2 -2
- package/dist/server-query.d.ts +2 -2
- package/dist/server.cjs +31 -31
- package/dist/server.d.mts +28 -29
- package/dist/server.d.ts +28 -29
- package/dist/server.mjs +13 -13
- package/dist/session-AAU7RNRO.cjs +23 -0
- package/dist/session-IGEDQ5PY.mjs +23 -0
- package/dist/{spa-router-Kytv4jSB.d.ts → spa-router.d-BWDhS0FK.d.mts} +5 -5
- package/dist/{spa-router-CVOL0Vrq.d.mts → spa-router.d-CO01mVOM.d.ts} +5 -5
- package/dist/storage.d.mts +2 -2
- package/dist/storage.d.ts +2 -2
- package/dist/testing.d.mts +14 -14
- package/dist/testing.d.ts +14 -14
- package/dist/theme/client.d.mts +1 -1
- package/dist/theme/client.d.ts +1 -1
- package/dist/theme/index.d.mts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/runtime.d.mts +1 -1
- package/dist/theme/runtime.d.ts +1 -1
- package/dist/theme/server.d.mts +1 -1
- package/dist/theme/server.d.ts +1 -1
- package/dist/{utils-DbyXlzaj.d.ts → utils.d-B77__yh8.d.ts} +1 -1
- package/dist/{utils-Dsa1HZ7X.d.mts → utils.d-DRDazhCA.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +11 -11
- package/dist/vite.d.mts +20 -19
- package/dist/vite.d.ts +20 -19
- package/dist/vite.mjs +10 -10
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/package.json +5 -5
- /package/dist/{base-path-BOUV5ozD.d.mts → base-path.d-BOUV5ozD.d.mts} +0 -0
- /package/dist/{base-path-BOUV5ozD.d.ts → base-path.d-BOUV5ozD.d.ts} +0 -0
- /package/dist/{chunk-recovery-lnQFzcQP.d.mts → chunk-recovery.d-lnQFzcQP.d.mts} +0 -0
- /package/dist/{chunk-recovery-lnQFzcQP.d.ts → chunk-recovery.d-lnQFzcQP.d.ts} +0 -0
- /package/dist/{client-cache-Deoqq-nM.d.ts → client-cache.d-Deoqq-nM.d.ts} +0 -0
- /package/dist/{client-cache-di_Nasxa.d.mts → client-cache.d-di_Nasxa.d.mts} +0 -0
- /package/dist/{endpoint-BgHn0lhl.d.ts → endpoint.d-BgHn0lhl.d.ts} +0 -0
- /package/dist/{endpoint-BkMSCRf6.d.mts → endpoint.d-BkMSCRf6.d.mts} +0 -0
- /package/dist/{image-config-CeDgNyX4.d.mts → image-config.d-CeDgNyX4.d.mts} +0 -0
- /package/dist/{image-config-CeDgNyX4.d.ts → image-config.d-CeDgNyX4.d.ts} +0 -0
- /package/dist/{instrumentation-runtime-CX9Zh-16.d.mts → instrumentation-runtime.d-CX9Zh-16.d.mts} +0 -0
- /package/dist/{instrumentation-runtime-CX9Zh-16.d.ts → instrumentation-runtime.d-CX9Zh-16.d.ts} +0 -0
- /package/dist/{island-value-protocol-BRayRghM.d.mts → island-value-protocol.d-BRayRghM.d.mts} +0 -0
- /package/dist/{island-value-protocol-BRayRghM.d.ts → island-value-protocol.d-BRayRghM.d.ts} +0 -0
- /package/dist/{island-CfGru1MO.d.mts → island.d-CfGru1MO.d.mts} +0 -0
- /package/dist/{island-CfGru1MO.d.ts → island.d-CfGru1MO.d.ts} +0 -0
- /package/dist/{layers-CcS42OGR.d.mts → layers.d-CcS42OGR.d.mts} +0 -0
- /package/dist/{layers-CcS42OGR.d.ts → layers.d-CcS42OGR.d.ts} +0 -0
- /package/dist/{lifecycle-C2aLBOwu.d.mts → lifecycle.d-C2aLBOwu.d.mts} +0 -0
- /package/dist/{lifecycle-C2aLBOwu.d.ts → lifecycle.d-C2aLBOwu.d.ts} +0 -0
- /package/dist/{observability-B2363jB6.d.mts → observability.d-B2363jB6.d.mts} +0 -0
- /package/dist/{observability-B2363jB6.d.ts → observability.d-B2363jB6.d.ts} +0 -0
- /package/dist/{params-BALtrRim.d.ts → params.d-BALtrRim.d.ts} +0 -0
- /package/dist/{params-ry-lxqmy.d.mts → params.d-ry-lxqmy.d.mts} +0 -0
- /package/dist/{production-vite-BQFAlG7n.d.mts → production-vite.d-BQFAlG7n.d.mts} +0 -0
- /package/dist/{production-vite-BQFAlG7n.d.ts → production-vite.d-BQFAlG7n.d.ts} +0 -0
- /package/dist/{route-pattern-CVsVbq5n.d.mts → route-pattern.d-CVsVbq5n.d.mts} +0 -0
- /package/dist/{route-pattern-CVsVbq5n.d.ts → route-pattern.d-CVsVbq5n.d.ts} +0 -0
- /package/dist/{server-client-bridge-DKWDl5NB.d.mts → server-client-bridge.d-DKWDl5NB.d.mts} +0 -0
- /package/dist/{server-client-bridge-DKWDl5NB.d.ts → server-client-bridge.d-DKWDl5NB.d.ts} +0 -0
- /package/dist/{server-fn-error-DrcH9cc1.d.mts → server-fn-error.d-DrcH9cc1.d.mts} +0 -0
- /package/dist/{server-fn-error-DrcH9cc1.d.ts → server-fn-error.d-DrcH9cc1.d.ts} +0 -0
- /package/dist/{server-query-runtime-DXRNhX_3.d.ts → server-query-runtime.d-DXRNhX_3.d.ts} +0 -0
- /package/dist/{server-query-runtime-aP52iuL5.d.mts → server-query-runtime.d-aP52iuL5.d.mts} +0 -0
- /package/dist/{types-BnIqOn9w.d.mts → types.d-BnIqOn9w.d.mts} +0 -0
- /package/dist/{types-BnIqOn9w.d.ts → types.d-BnIqOn9w.d.ts} +0 -0
- /package/dist/{types-C41ePjvP.d.mts → types.d-C41ePjvP.d.mts} +0 -0
- /package/dist/{types-C41ePjvP.d.ts → types.d-C41ePjvP.d.ts} +0 -0
- /package/dist/{types-DQnyD3VD.d.mts → types.d-DQnyD3VD.d.mts} +0 -0
- /package/dist/{types-DQnyD3VD.d.ts → types.d-DQnyD3VD.d.ts} +0 -0
- /package/dist/{workflows-CRMzQZ3k.d.mts → workflows.d-CRMzQZ3k.d.mts} +0 -0
- /package/dist/{workflows-CRMzQZ3k.d.ts → workflows.d-CRMzQZ3k.d.ts} +0 -0
|
@@ -13,23 +13,28 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
generateNativeMCPPluginSource
|
|
15
15
|
} from "./chunk-KQH2COEJ.mjs";
|
|
16
|
+
import {
|
|
17
|
+
FARM_MOBILE_SESSION_PLUGIN
|
|
18
|
+
} from "./chunk-C3BOESDW.mjs";
|
|
16
19
|
import {
|
|
17
20
|
assertFarmDocsAdapterServesNoGuardedPages,
|
|
18
21
|
compileFarmDocsAdapterEdgeManifest,
|
|
19
22
|
createFarmDocsAPIHandler,
|
|
20
|
-
hasFarmDocsRuntimeAdapter
|
|
21
|
-
|
|
23
|
+
hasFarmDocsRuntimeAdapter,
|
|
24
|
+
listFarmDocsAdapterPages
|
|
25
|
+
} from "./chunk-FM2UEKS2.mjs";
|
|
22
26
|
import {
|
|
23
27
|
FARM_DOCS_LAST_MODIFIED_MANIFEST,
|
|
24
28
|
createFarmDocsHandler,
|
|
25
29
|
createFarmDocsLastModifiedManifest,
|
|
26
30
|
discoverFarmDocsPages,
|
|
27
31
|
getFarmDocsMarkdownPath,
|
|
32
|
+
getFarmDocsRoots,
|
|
28
33
|
getFarmDocsRouteTypeEntries,
|
|
29
34
|
loadFarmDocsPage,
|
|
30
35
|
resolveFarmDocsContentDir,
|
|
31
36
|
toFarmDocsMarkdownPage
|
|
32
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-EIMK7D2D.mjs";
|
|
33
38
|
import {
|
|
34
39
|
generateFarmDocsSearchClientRuntime,
|
|
35
40
|
isFarmDocsSearchEnabled,
|
|
@@ -37,7 +42,7 @@ import {
|
|
|
37
42
|
} from "./chunk-ALEUMLJN.mjs";
|
|
38
43
|
import {
|
|
39
44
|
FARM_PRERENDER_ENV
|
|
40
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-E6LTONL4.mjs";
|
|
41
46
|
import {
|
|
42
47
|
resolveFarmInstrumentationFile
|
|
43
48
|
} from "./chunk-N35YPV4N.mjs";
|
|
@@ -52,7 +57,7 @@ import {
|
|
|
52
57
|
getDeployTargetForPreset,
|
|
53
58
|
hasCustomFarmRouteContext,
|
|
54
59
|
resolveDeployOutputPath
|
|
55
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-CTM4SPB3.mjs";
|
|
56
61
|
import {
|
|
57
62
|
DEFAULT_NOT_FOUND_STYLES,
|
|
58
63
|
FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
|
|
@@ -84,7 +89,7 @@ import {
|
|
|
84
89
|
resolveFarmIsolatedClientHydrationMode,
|
|
85
90
|
resolveFarmNotFoundComponentPath,
|
|
86
91
|
usesFarmServerTree
|
|
87
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-PMKUU273.mjs";
|
|
88
93
|
import {
|
|
89
94
|
loadTailwindVitePlugin
|
|
90
95
|
} from "./chunk-PIHKO25G.mjs";
|
|
@@ -95,7 +100,7 @@ import {
|
|
|
95
100
|
generateFarmTypeArtifacts,
|
|
96
101
|
readRouteRenderingDirectiveFromFile,
|
|
97
102
|
resolveRouteRenderingConfigFromFile
|
|
98
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-CZ35L6PL.mjs";
|
|
99
104
|
import {
|
|
100
105
|
HOISTED_HEAD_ELEMENT,
|
|
101
106
|
appMiddlewareMayHandlePath,
|
|
@@ -122,7 +127,7 @@ import {
|
|
|
122
127
|
listFarmBuiltInRoutePaths,
|
|
123
128
|
resolveFarmApiCatalogInput,
|
|
124
129
|
resolveFarmAppManifestInput
|
|
125
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-E73PGHSR.mjs";
|
|
126
131
|
import {
|
|
127
132
|
FARM_DEFAULT_MCP_PATH,
|
|
128
133
|
createFarmDefaultMCPServer,
|
|
@@ -130,7 +135,7 @@ import {
|
|
|
130
135
|
} from "./chunk-KRRZJ77U.mjs";
|
|
131
136
|
import {
|
|
132
137
|
farmEnvironmentFunctionsPlugin
|
|
133
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-ZQ5BDNKW.mjs";
|
|
134
139
|
import {
|
|
135
140
|
isFarmMarkdownPageFile
|
|
136
141
|
} from "./chunk-GW4YUIHW.mjs";
|
|
@@ -193,7 +198,7 @@ import {
|
|
|
193
198
|
import {
|
|
194
199
|
getFarmIntegrationPluginServerRuntime,
|
|
195
200
|
getIntegrationProviders
|
|
196
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-Y2G5SJFB.mjs";
|
|
197
202
|
import {
|
|
198
203
|
FARM_INTEGRATION_API_BASE_PATH_KEY
|
|
199
204
|
} from "./chunk-F6TLUMH7.mjs";
|
|
@@ -231,7 +236,7 @@ import {
|
|
|
231
236
|
} from "./chunk-LM2YOGDK.mjs";
|
|
232
237
|
import {
|
|
233
238
|
FARM_VERSION
|
|
234
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-6CYQQQGR.mjs";
|
|
235
240
|
import {
|
|
236
241
|
getFarmPresetRuntime
|
|
237
242
|
} from "./chunk-UAQD67HM.mjs";
|
|
@@ -1682,15 +1687,14 @@ function createServerChunkMinifyPlugin(options) {
|
|
|
1682
1687
|
function trimSlashes(value) {
|
|
1683
1688
|
return value.replace(/^\/+|\/+$/g, "");
|
|
1684
1689
|
}
|
|
1685
|
-
function resolveBuildDocsContentDir(
|
|
1686
|
-
|
|
1687
|
-
const configuredContentDir = config.docs.contentDir || config.docs.config.contentDir;
|
|
1690
|
+
function resolveBuildDocsContentDir(docs, root, srcDir) {
|
|
1691
|
+
const configuredContentDir = docs.contentDir || docs.config.contentDir;
|
|
1688
1692
|
if (typeof configuredContentDir === "string" && configuredContentDir.trim()) {
|
|
1689
1693
|
const contentDir = path10.isAbsolute(configuredContentDir) ? configuredContentDir : path10.join(root, configuredContentDir);
|
|
1690
1694
|
return existsSync2(contentDir) ? contentDir : null;
|
|
1691
1695
|
}
|
|
1692
|
-
const entryDir =
|
|
1693
|
-
const appDocsDir = path10.join(root,
|
|
1696
|
+
const entryDir = docs.config.entry || trimSlashes(docs.entry) || "docs";
|
|
1697
|
+
const appDocsDir = path10.join(root, srcDir || "src", "app", entryDir);
|
|
1694
1698
|
if (existsSync2(appDocsDir)) return appDocsDir;
|
|
1695
1699
|
const rootDocsDir = path10.join(root, entryDir);
|
|
1696
1700
|
return existsSync2(rootDocsDir) ? rootDocsDir : null;
|
|
@@ -1754,7 +1758,9 @@ function hasFarmPluginRoutes(config) {
|
|
|
1754
1758
|
}
|
|
1755
1759
|
function farmServerRuntimePluginsMayHandlePath(config, pathname) {
|
|
1756
1760
|
return (config.plugins || []).some(
|
|
1757
|
-
(plugin) => getFarmIntegrationPluginServerRuntime(plugin) !== false &&
|
|
1761
|
+
(plugin) => getFarmIntegrationPluginServerRuntime(plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
|
|
1762
|
+
// prerendered file never answers or sends; its endpoints live under /__farm/.
|
|
1763
|
+
plugin.name !== FARM_MOBILE_SESSION_PLUGIN && farmPluginMayAffectRuntimePath(plugin, pathname)
|
|
1758
1764
|
);
|
|
1759
1765
|
}
|
|
1760
1766
|
async function discoverMiddlewareRoutes(appDir) {
|
|
@@ -2212,9 +2218,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2212
2218
|
const adapterOwnsDocsRuntime = Boolean(
|
|
2213
2219
|
isReactRenderer(config.renderer) && config.docs?.enabled && config.docs.adapter?.server && config.docs.adapter.react
|
|
2214
2220
|
);
|
|
2215
|
-
const
|
|
2216
|
-
|
|
2217
|
-
|
|
2221
|
+
const docsEntries = config.docs?.enabled ? getFarmDocsRoots(config.docs).map(
|
|
2222
|
+
(docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
|
|
2223
|
+
) : [];
|
|
2224
|
+
const adapterDocsEntry = docsEntries[0] ?? null;
|
|
2225
|
+
const isAdapterDocsRoute = (routePattern) => adapterOwnsDocsRuntime && docsEntries.some(
|
|
2226
|
+
(docsEntry) => docsEntry === "/" || routePattern === docsEntry || routePattern.startsWith(`${docsEntry}/`)
|
|
2218
2227
|
);
|
|
2219
2228
|
const syntheticDocsEntry = config.docs?.enabled && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
2220
2229
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
@@ -2264,7 +2273,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2264
2273
|
layoutAppliesToRoute
|
|
2265
2274
|
);
|
|
2266
2275
|
for (const layout of clientLayouts) {
|
|
2267
|
-
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) ||
|
|
2276
|
+
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
2268
2277
|
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
2269
2278
|
logger.warn(`\u26A0\uFE0F ${describeSuppressedAsyncHydration(layout.pattern, layout.fallbackReason)}`);
|
|
2270
2279
|
}
|
|
@@ -2372,7 +2381,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2372
2381
|
srcDir,
|
|
2373
2382
|
adapterOwnsDocsRuntime ? false : isFarmDocsSearchEnabled(config.docs),
|
|
2374
2383
|
adapterOwnsDocsRuntime ? void 0 : resolveFarmDocsSearchClientModule(root),
|
|
2375
|
-
config.docs?.enabled ? config.docs.entry : void 0,
|
|
2384
|
+
config.docs?.enabled ? getFarmDocsRoots(config.docs).map((docsRoot) => docsRoot.entry) : void 0,
|
|
2376
2385
|
adapterOwnsDocsRuntime ? config.docs.adapter?.react : void 0,
|
|
2377
2386
|
config.i18n,
|
|
2378
2387
|
config.plugins,
|
|
@@ -2440,28 +2449,9 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2440
2449
|
return "assets/[name]-h[hash][extname]";
|
|
2441
2450
|
}
|
|
2442
2451
|
},
|
|
2443
|
-
//
|
|
2452
|
+
// A browser cannot load a Node builtin: farmServerOnlyEntriesPlugin
|
|
2453
|
+
// resolves one to Farm's browser module for it instead.
|
|
2444
2454
|
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
2455
|
if (id === "fsevents" || id.includes("fsevents") || id.endsWith(".node")) {
|
|
2466
2456
|
return true;
|
|
2467
2457
|
}
|
|
@@ -2657,21 +2647,24 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
2657
2647
|
return response;
|
|
2658
2648
|
}
|
|
2659
2649
|
|
|
2660
|
-
${streamNavigations ?
|
|
2661
|
-
|
|
2662
|
-
// Reads a streamed navigation (F-Stream) up to the end of React's shell. \`next\` then resolves
|
|
2650
|
+
${streamNavigations ? `// Reads a streamed navigation (F-Stream) up to the end of React's shell. \`next\` then resolves
|
|
2663
2651
|
// with each later flush as it ends, and null at the end; a document without a marker is all shell.
|
|
2664
|
-
|
|
2652
|
+
// The marker carries the random token the server sent in the F-Flush header, so page content
|
|
2653
|
+
// cannot forge a boundary; a response without a valid token is all shell.
|
|
2654
|
+
async function readFarmNavigationStream(body, flushToken) {
|
|
2665
2655
|
const reader = body.getReader();
|
|
2666
2656
|
const decoder = new TextDecoder();
|
|
2657
|
+
const marker = typeof flushToken === "string" && /^[0-9a-f]{32}$/.test(flushToken)
|
|
2658
|
+
? "<!--farm-flush:" + flushToken + "-->"
|
|
2659
|
+
: "";
|
|
2667
2660
|
let text = "";
|
|
2668
2661
|
let done = false;
|
|
2669
2662
|
const next = async function() {
|
|
2670
2663
|
for (;;) {
|
|
2671
|
-
const at = text.indexOf(
|
|
2664
|
+
const at = marker ? text.indexOf(marker) : -1;
|
|
2672
2665
|
if (at !== -1) {
|
|
2673
2666
|
const flush = text.slice(0, at);
|
|
2674
|
-
text = text.slice(at +
|
|
2667
|
+
text = text.slice(at + marker.length);
|
|
2675
2668
|
return flush;
|
|
2676
2669
|
}
|
|
2677
2670
|
if (done) {
|
|
@@ -3245,7 +3238,7 @@ ${streamNavigations ? ` // A streamed navigation swaps in the page's shell; its
|
|
|
3245
3238
|
}
|
|
3246
3239
|
};
|
|
3247
3240
|
${streamNavigations ? ` if (streamShell && response.body) {
|
|
3248
|
-
const streamed = await readFarmNavigationStream(response.body);
|
|
3241
|
+
const streamed = await readFarmNavigationStream(response.body, response.headers.get("F-Flush"));
|
|
3249
3242
|
if (!streamed.next) {
|
|
3250
3243
|
store(streamed.shell);
|
|
3251
3244
|
return streamed.shell;
|
|
@@ -3524,8 +3517,18 @@ function isFarmLocaleDocumentChange() {
|
|
|
3524
3517
|
return false;
|
|
3525
3518
|
}
|
|
3526
3519
|
`;
|
|
3527
|
-
const
|
|
3528
|
-
const
|
|
3520
|
+
const docsEntryPaths = typeof docsEntryPath === "string" ? [docsEntryPath] : docsEntryPath ?? [];
|
|
3521
|
+
const docsNavigationRuntime = docsEntryPaths.length > 1 ? `
|
|
3522
|
+
const farmDocsEntryPaths = ${JSON.stringify(docsEntryPaths)};
|
|
3523
|
+
function isFarmDocsPath(pathname) {
|
|
3524
|
+
const routePathname = getFarmRoutePathname(pathname);
|
|
3525
|
+
const normalizedPath = routePathname.length > 1 ? routePathname.replace(/\\/+$/, "") : routePathname;
|
|
3526
|
+
return farmDocsEntryPaths.some(
|
|
3527
|
+
(entryPath) => normalizedPath === entryPath || normalizedPath.startsWith(entryPath + "/"),
|
|
3528
|
+
);
|
|
3529
|
+
}
|
|
3530
|
+
` : docsEntryPaths[0] ? `
|
|
3531
|
+
const farmDocsEntryPath = ${JSON.stringify(docsEntryPaths[0])};
|
|
3529
3532
|
function isFarmDocsPath(pathname) {
|
|
3530
3533
|
const routePathname = getFarmRoutePathname(pathname);
|
|
3531
3534
|
const normalizedPath = routePathname.length > 1 ? routePathname.replace(/\\/+$/, "") : routePathname;
|
|
@@ -5571,15 +5574,14 @@ function readFarmPageLastModified(pageRoutes) {
|
|
|
5571
5574
|
}
|
|
5572
5575
|
function getFarmDocsGuardedPaths(config, middlewareRoutes) {
|
|
5573
5576
|
if (!config.docs?.enabled) return [];
|
|
5574
|
-
const
|
|
5575
|
-
root: config.root,
|
|
5576
|
-
srcDir: config.srcDir
|
|
5577
|
-
});
|
|
5577
|
+
const options = { root: config.root, srcDir: config.srcDir };
|
|
5578
5578
|
const guards = {
|
|
5579
5579
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
5580
5580
|
middlewareRoutes
|
|
5581
5581
|
};
|
|
5582
|
-
return
|
|
5582
|
+
return getFarmDocsRoots(config.docs).flatMap(
|
|
5583
|
+
(docsRoot) => discoverFarmDocsPages(resolveFarmDocsContentDir(docsRoot, options), docsRoot)
|
|
5584
|
+
).flatMap((page) => [page.href, getFarmDocsMarkdownPath(page.href)]).filter((pathname) => farmPathGuardCoversPage(guards, pathname));
|
|
5583
5585
|
}
|
|
5584
5586
|
function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
5585
5587
|
const llmsTxt = agent?.llmsTxt;
|
|
@@ -5593,10 +5595,34 @@ function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
|
5593
5595
|
...agent?.crawlers?.enabled || ownedByFile("robots") ? ["/robots.txt"] : []
|
|
5594
5596
|
];
|
|
5595
5597
|
}
|
|
5598
|
+
function generateFarmDocsAdapterHandlerArguments(docs, docsConfigModulePath) {
|
|
5599
|
+
const runtimeConfig = (root) => `{
|
|
5600
|
+
${docsConfigModulePath ? `...getFarmDocsConfigModuleRoot(farmDocsConfigModule.default || farmDocsConfigModule, ${root}.entry),
|
|
5601
|
+
...${root}.configOverrides,` : `...${root}.config,`}
|
|
5602
|
+
entry: ${root}.config?.entry || String(${root}.entry || "/docs").replace(/^\\/+|\\/+$/g, "") || "docs",
|
|
5603
|
+
docsPath: ${root}.entry,
|
|
5604
|
+
contentDir: ${root}.contentDir || ${root}.config?.contentDir,
|
|
5605
|
+
}`;
|
|
5606
|
+
if (docs?.roots?.length) {
|
|
5607
|
+
return {
|
|
5608
|
+
factory: "createFarmDocsAdapterMultiRuntimeHandler",
|
|
5609
|
+
config: `[farmDocsResolvedConfig, ...farmDocsResolvedConfig.roots].map((farmDocsRoot) => (${runtimeConfig("farmDocsRoot")}))`
|
|
5610
|
+
};
|
|
5611
|
+
}
|
|
5612
|
+
return {
|
|
5613
|
+
factory: "createFarmDocsAdapterRuntimeHandler",
|
|
5614
|
+
config: runtimeConfig("farmDocsResolvedConfig")
|
|
5615
|
+
};
|
|
5616
|
+
}
|
|
5596
5617
|
function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
|
|
5597
5618
|
if (!docs.enabled) return "null";
|
|
5598
|
-
const
|
|
5619
|
+
const serializableDocs = docs.roots?.length ? {
|
|
5599
5620
|
...docs,
|
|
5621
|
+
// React elements and functions do not survive JSON; see runtimeConfig below.
|
|
5622
|
+
roots: docs.roots.map((docsRoot) => ({ ...docsRoot, runtimeConfig: void 0 }))
|
|
5623
|
+
} : docs;
|
|
5624
|
+
const baseConfig = {
|
|
5625
|
+
...serializableDocs,
|
|
5600
5626
|
contentDir: void 0,
|
|
5601
5627
|
...precompiled ? { configPath: void 0 } : {},
|
|
5602
5628
|
config: void 0,
|
|
@@ -5614,7 +5640,7 @@ function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
|
|
|
5614
5640
|
config: nestedConfig
|
|
5615
5641
|
});
|
|
5616
5642
|
}
|
|
5617
|
-
|
|
5643
|
+
const expression = `farmDocsBundledContentDir
|
|
5618
5644
|
? {
|
|
5619
5645
|
...${JSON.stringify(baseConfig)},
|
|
5620
5646
|
contentDir: farmDocsBundledContentDir,
|
|
@@ -5623,7 +5649,19 @@ function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false) {
|
|
|
5623
5649
|
contentDir: farmDocsBundledContentDir,
|
|
5624
5650
|
},
|
|
5625
5651
|
}
|
|
5626
|
-
: ${JSON.stringify({ ...
|
|
5652
|
+
: ${JSON.stringify({ ...serializableDocs, runtimeConfig: void 0 })}`;
|
|
5653
|
+
if (!docs.roots?.length) return expression;
|
|
5654
|
+
return `((farmDocs) => ({
|
|
5655
|
+
...farmDocs,
|
|
5656
|
+
roots: farmDocs.roots.map((farmDocsRoot, index) => {
|
|
5657
|
+
const contentDir = farmDocsBundledRootsDir
|
|
5658
|
+
? farmDocsJoin(farmDocsBundledRootsDir, String(index))
|
|
5659
|
+
: null;
|
|
5660
|
+
return contentDir && farmDocsExistsSync(contentDir)
|
|
5661
|
+
? { ...farmDocsRoot, contentDir, config: { ...farmDocsRoot.config, contentDir } }
|
|
5662
|
+
: farmDocsRoot;
|
|
5663
|
+
}),
|
|
5664
|
+
}))(${expression})`;
|
|
5627
5665
|
}
|
|
5628
5666
|
function toVirtualEntryImportSpecifier(modulePath) {
|
|
5629
5667
|
return JSON.stringify(modulePath.replace(/\\/g, "/"));
|
|
@@ -5938,7 +5976,13 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
|
|
|
5938
5976
|
const adapterOwnsDocsRuntime = Boolean(
|
|
5939
5977
|
isReactRenderer(config.renderer) && config.docs?.enabled && config.docs.adapter?.server && config.docs.adapter.react
|
|
5940
5978
|
);
|
|
5979
|
+
if (config.docs?.enabled && config.docs.roots?.length && !adapterOwnsDocsRuntime) {
|
|
5980
|
+
throw new Error(
|
|
5981
|
+
"Several docs roots need the docs adapter, which serves the React renderer only; Farm's built-in docs renderer serves a single docs root."
|
|
5982
|
+
);
|
|
5983
|
+
}
|
|
5941
5984
|
const docsConfigModulePath = adapterOwnsDocsRuntime && !hasPrecompiledDocs && config.docs.configPath && !config.docs.configPath.endsWith(".json") ? config.docs.configPath : void 0;
|
|
5985
|
+
const adapterHandler = generateFarmDocsAdapterHandlerArguments(config.docs, docsConfigModulePath);
|
|
5942
5986
|
const hasIsolatedClientGraphRuntime = isReactRenderer(config.renderer) && isolatedClientBoundaryModules.size > 0;
|
|
5943
5987
|
const rendererStreamingCapabilities = getFarmRendererStreamingCapabilitiesForRuntime(
|
|
5944
5988
|
config.renderer,
|
|
@@ -6335,6 +6379,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6335
6379
|
resolveFarmInstrumentationRuntime,
|
|
6336
6380
|
resolveFarmPreviewDeployment,
|
|
6337
6381
|
resolveFarmWebRequestOrigin,
|
|
6382
|
+
fetchFarmExternalRewrite,
|
|
6338
6383
|
runWithFarmRequestSpan,
|
|
6339
6384
|
createFarmSearchParams,
|
|
6340
6385
|
searchParamsToObject,
|
|
@@ -6366,8 +6411,8 @@ const isFarmDocsAPIRequest = (requestOrPathname) => {
|
|
|
6366
6411
|
: new URL(requestOrPathname.url).pathname;
|
|
6367
6412
|
const apiPath = ${JSON.stringify(farmDocsPrecompiledManifest?.apiPath || "/api/docs")};
|
|
6368
6413
|
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)};
|
|
6414
|
+
};` : adapterOwnsDocsRuntime ? `import { ${docsConfigModulePath ? "getFarmDocsConfigModuleRoot, " : ""}isFarmDocsAPIRequest } from "@farm.js/core/docs";
|
|
6415
|
+
import { ${config.docs.roots?.length ? "createFarmDocsMultiRuntimeHandler as createFarmDocsAdapterMultiRuntimeHandler" : "createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler"} } from ${JSON.stringify(config.docs.adapter.server)};
|
|
6371
6416
|
import * as FarmDocsAdapterReact from ${JSON.stringify(config.docs.adapter.react)};${docsConfigModulePath ? `
|
|
6372
6417
|
import * as farmDocsConfigModule from ${toVirtualEntryImportSpecifier(docsConfigModulePath)};` : ""}` : `import { createFarmDocsAPIHandler, createFarmDocsHandler, isFarmDocsAPIRequest } from "@farm.js/core/docs";` : "";
|
|
6373
6418
|
const docsFontImport = config.docs?.enabled && !hasPrecompiledDocs ? `import { resolveFarmLayoutFonts } from "@farm.js/core/font";` : "";
|
|
@@ -6396,12 +6441,16 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
|
|
|
6396
6441
|
const instrumentationImport = instrumentationPath ? `import * as FarmInstrumentationModule from ${toVirtualEntryImportSpecifier(instrumentationPath)};` : "";
|
|
6397
6442
|
const nativeAuth = generateNativeAuthIntegrationSource(config.auth);
|
|
6398
6443
|
const nativeMCP = generateNativeMCPPluginSource(config.mcp);
|
|
6444
|
+
const mobileSession = (config.plugins || []).some(
|
|
6445
|
+
(plugin) => plugin?.name === FARM_MOBILE_SESSION_PLUGIN
|
|
6446
|
+
);
|
|
6399
6447
|
const integrationImports = `
|
|
6400
6448
|
${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
|
|
6401
6449
|
${layerConfigImports}
|
|
6402
6450
|
${integrationRuntimeImport}
|
|
6403
6451
|
${nativeAuth.importSource}
|
|
6404
6452
|
${nativeMCP.importSource}
|
|
6453
|
+
${mobileSession ? `import { createFarmMobileSessionPlugin as __farmCreateMobileSessionPlugin } from "@farm.js/core/internal/production-runtime";` : ""}
|
|
6405
6454
|
`;
|
|
6406
6455
|
const imageRuntime = resolveFarmImageServerRuntime(config.images, preset);
|
|
6407
6456
|
const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
|
|
@@ -6682,6 +6731,10 @@ const configuredPlugins = [
|
|
|
6682
6731
|
${hasCompressionRuntime && hasPluginRuntime ? "createCompressionPlugin()," : ""}
|
|
6683
6732
|
${hasRuntimeIntegrationConfig ? "...resolveIntegrationPlugins(serverRuntimeIntegrations)," : ""}
|
|
6684
6733
|
${nativeMCP.pluginSource}
|
|
6734
|
+
${mobileSession ? `__farmCreateMobileSessionPlugin({
|
|
6735
|
+
basePath: ${JSON.stringify(config.basePath)},
|
|
6736
|
+
integrations: () => serverRuntimeIntegrations,
|
|
6737
|
+
}),` : ""}
|
|
6685
6738
|
${hasConfiguredRuntimePlugins ? `...farmRuntimeConfigs.flatMap((runtimeConfig) =>
|
|
6686
6739
|
Array.isArray(runtimeConfig.plugins) ? runtimeConfig.plugins : [],
|
|
6687
6740
|
),` : ""}
|
|
@@ -6785,7 +6838,20 @@ const farmDocsBundledContentDir = ${config.docs?.enabled && !hasPrecompiledDocs
|
|
|
6785
6838
|
} catch {
|
|
6786
6839
|
return null;
|
|
6787
6840
|
}
|
|
6788
|
-
})()` : "null"}
|
|
6841
|
+
})()` : "null"};${config.docs?.enabled && !hasPrecompiledDocs && config.docs.roots?.length ? `
|
|
6842
|
+
const farmDocsBundledRootsDir = (() => {
|
|
6843
|
+
try {
|
|
6844
|
+
const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
|
|
6845
|
+
const candidates = [
|
|
6846
|
+
farmDocsJoin(currentDir, "farm-docs-roots"),
|
|
6847
|
+
farmDocsJoin(currentDir, "..", "farm-docs-roots"),
|
|
6848
|
+
farmDocsJoin(currentDir, "..", "..", "farm-docs-roots"),
|
|
6849
|
+
];
|
|
6850
|
+
return candidates.find((candidate) => farmDocsExistsSync(candidate)) || null;
|
|
6851
|
+
} catch {
|
|
6852
|
+
return null;
|
|
6853
|
+
}
|
|
6854
|
+
})();` : ""}
|
|
6789
6855
|
const farmDocsResolvedConfig = ${generateFarmDocsRuntimeConfigExpression(config.docs, hasPrecompiledDocs)};
|
|
6790
6856
|
const farmDocsRuntimeRoot = ${hasPrecompiledDocs ? '"."' : `farmDocsBundledContentDir || ${JSON.stringify(config.root)}`};
|
|
6791
6857
|
// Docs pages a path-specific guard covers, decided at build time. The docs API and the
|
|
@@ -6823,12 +6889,7 @@ const farmDocsModulePreloadPaths = farmDocsModulePreloads
|
|
|
6823
6889
|
),
|
|
6824
6890
|
}
|
|
6825
6891
|
: 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
|
-
}, {
|
|
6892
|
+
const farmDocsHandler = ${config.docs?.enabled ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `${adapterHandler.factory}(${adapterHandler.config}, {
|
|
6832
6893
|
rootDir: farmDocsRuntimeRoot,
|
|
6833
6894
|
// A production build's content cannot change, so the adapter reads its
|
|
6834
6895
|
// navigation once instead of scanning the content directory per request.
|
|
@@ -7033,10 +7094,22 @@ function escapeFarmHtmlAttribute(value) {
|
|
|
7033
7094
|
.replace(/>/g, ">");
|
|
7034
7095
|
}
|
|
7035
7096
|
|
|
7036
|
-
|
|
7037
|
-
|
|
7097
|
+
// A streamed navigation's flush marker token: 128 random bits, hex.
|
|
7098
|
+
function createFarmFlushToken() {
|
|
7099
|
+
const bytes = new Uint8Array(16);
|
|
7100
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
7101
|
+
let token = "";
|
|
7102
|
+
for (const byte of bytes) token += byte.toString(16).padStart(2, "0");
|
|
7103
|
+
return token;
|
|
7104
|
+
}
|
|
7105
|
+
|
|
7106
|
+
async function renderFarmElement(ReactDOMServer, element, routeKey, flushToken = "") {
|
|
7107
|
+
// Written after each React flush in a streamed navigation (flushToken): the browser swaps in
|
|
7038
7108
|
// the shell, then adds each Suspense boundary as soon as the flush that completed it ends.
|
|
7039
|
-
|
|
7109
|
+
// The token is random per response and reaches the browser in the F-Flush header, so page
|
|
7110
|
+
// content cannot forge a boundary.
|
|
7111
|
+
const flushMarkers = Boolean(flushToken);
|
|
7112
|
+
const FARM_FLUSH_MARKER = flushMarkers ? "<!--farm-flush:" + flushToken + "-->" : "";
|
|
7040
7113
|
// Islands mode: each render writes its islands' values itself, so a request that renders twice
|
|
7041
7114
|
// (notFound(), or a synchronous attempt that suspends and streams) still sends them.
|
|
7042
7115
|
if (typeof farmIslandsRender === "function") element = farmIslandsRender(element);
|
|
@@ -8480,7 +8553,7 @@ const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
|
8480
8553
|
)});
|
|
8481
8554
|
${config.docs?.enabled ? `const farmDocsRouteLabelInput = {
|
|
8482
8555
|
path: normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs"),
|
|
8483
|
-
apiPath: ${JSON.stringify(farmDocsPrecompiledManifest?.apiPath || "/api/docs")},
|
|
8556
|
+
apiPath: ${JSON.stringify(farmDocsPrecompiledManifest?.apiPath || "/api/docs")},${config.docs.roots?.length ? "\n roots: farmDocsResolvedConfig.roots.map((farmDocsRoot) => farmDocsRoot.entry)," : ""}
|
|
8484
8557
|
};
|
|
8485
8558
|
` : ""}// The request's route payload, for a handler that learns what answered while it handles.
|
|
8486
8559
|
const farmRouteLabelSlot = Symbol("farm.route.label.slot");
|
|
@@ -8855,7 +8928,7 @@ async function resolveFarmRequestInContext(
|
|
|
8855
8928
|
if (rewriteDestination) {
|
|
8856
8929
|
let rewrittenRequest = createRewrittenRequest(request, rewriteDestination);
|
|
8857
8930
|
if (new URL(rewrittenRequest.url).origin !== url.origin) {
|
|
8858
|
-
return
|
|
8931
|
+
return fetchFarmExternalRewrite(rewrittenRequest);
|
|
8859
8932
|
}
|
|
8860
8933
|
if (farmPluginRuntime) {
|
|
8861
8934
|
// Plugin guards ran on the requested URL. Re-run only runtime.before
|
|
@@ -9574,10 +9647,13 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9574
9647
|
!route.shouldHydrate &&
|
|
9575
9648
|
request.headers.get("f-render") === "tree";
|
|
9576
9649
|
// A navigation the browser streams marks where each React flush ends, so the browser
|
|
9577
|
-
// shows the page before its Suspense content arrives (FARM_FLUSH_MARKER).
|
|
9578
|
-
|
|
9650
|
+
// shows the page before its Suspense content arrives (FARM_FLUSH_MARKER). The marker
|
|
9651
|
+
// carries a random token sent in the F-Flush header: page content cannot forge one.
|
|
9652
|
+
const farmFlushToken = request.headers.get("f-stream") === "flush"
|
|
9653
|
+
? createFarmFlushToken()
|
|
9654
|
+
: "";` : `const farmLayoutKeyOf = null;
|
|
9579
9655
|
const farmPayloadOnlyNavigation = false;
|
|
9580
|
-
const
|
|
9656
|
+
const farmFlushToken = "";`}
|
|
9581
9657
|
const renderPageElement = async () => {
|
|
9582
9658
|
// First, render the page content
|
|
9583
9659
|
let pageElement;
|
|
@@ -9699,7 +9775,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9699
9775
|
}
|
|
9700
9776
|
|
|
9701
9777
|
wrappedElement = wrapWithFarmIntegrationProviders(wrappedElement);
|
|
9702
|
-
return renderFarmElement(ReactDOMServer, wrappedElement, route.pattern,
|
|
9778
|
+
return renderFarmElement(ReactDOMServer, wrappedElement, route.pattern, farmFlushToken);
|
|
9703
9779
|
};
|
|
9704
9780
|
const renderedPage = ${hasMiddlewareRuntime ? `await _runWithMiddlewareData(middlewareData, () =>
|
|
9705
9781
|
_runWithMiddlewareContext(middlewareContext, renderPageElement)
|
|
@@ -10006,7 +10082,11 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10006
10082
|
);
|
|
10007
10083
|
return applyProductionMiddlewareHeaders(farmOwnedResponse(streamedDocument, {
|
|
10008
10084
|
status: pageStatus,
|
|
10009
|
-
headers: {
|
|
10085
|
+
headers: {
|
|
10086
|
+
...responseHeaders,
|
|
10087
|
+
"x-farm-preload-streaming": "1",
|
|
10088
|
+
...(farmFlushToken ? { "F-Flush": farmFlushToken } : {}),
|
|
10089
|
+
},
|
|
10010
10090
|
}), middlewareHeaders);
|
|
10011
10091
|
}
|
|
10012
10092
|
|
|
@@ -10689,6 +10769,29 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
10689
10769
|
}
|
|
10690
10770
|
return void 0;
|
|
10691
10771
|
}
|
|
10772
|
+
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
10773
|
+
if (!config.docs?.enabled || !config.docs.prerender) return [];
|
|
10774
|
+
if (!isReactRenderer(config.renderer) || !hasFarmDocsRuntimeAdapter(config.docs)) {
|
|
10775
|
+
logger.warn(
|
|
10776
|
+
"docs.prerender needs a docs adapter such as @farming-labs/farmjs; Farm's built-in docs renderer keeps rendering docs pages on request."
|
|
10777
|
+
);
|
|
10778
|
+
return [];
|
|
10779
|
+
}
|
|
10780
|
+
if (getFarmPresetRuntime(preset) === "edge") {
|
|
10781
|
+
logger.info(
|
|
10782
|
+
`\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
|
|
10783
|
+
);
|
|
10784
|
+
return [];
|
|
10785
|
+
}
|
|
10786
|
+
const pages = await listFarmDocsAdapterPages(config.docs, { root, srcDir: config.srcDir });
|
|
10787
|
+
if (!pages) {
|
|
10788
|
+
logger.warn(
|
|
10789
|
+
`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.`
|
|
10790
|
+
);
|
|
10791
|
+
return [];
|
|
10792
|
+
}
|
|
10793
|
+
return pages;
|
|
10794
|
+
}
|
|
10692
10795
|
function hasFarmNitroCacheRouteRule(routeRules) {
|
|
10693
10796
|
return Object.values(routeRules || {}).some((rule) => {
|
|
10694
10797
|
const swr = rule?.swr;
|
|
@@ -10730,12 +10833,19 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
10730
10833
|
const ssgCollectionPromise = routeManager.collectSSGPages();
|
|
10731
10834
|
const middlewareRoutesPromise = discoverMiddlewareRoutes(getFarmAppDirectories(config));
|
|
10732
10835
|
const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
|
|
10836
|
+
const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
|
|
10733
10837
|
const farmWorkflows = await prepareFarmWorkflowsForNitro(config);
|
|
10734
10838
|
const farmCron = await prepareFarmCronForNitro(config);
|
|
10735
|
-
const [
|
|
10839
|
+
const [
|
|
10840
|
+
{ ssg: ssgPages },
|
|
10841
|
+
middlewareRoutes,
|
|
10842
|
+
[configuredRedirects, configuredRewrites],
|
|
10843
|
+
docsPrerenderPages
|
|
10844
|
+
] = await Promise.all([
|
|
10736
10845
|
ssgCollectionPromise,
|
|
10737
10846
|
middlewareRoutesPromise,
|
|
10738
|
-
configuredResponseRoutesPromise
|
|
10847
|
+
configuredResponseRoutesPromise,
|
|
10848
|
+
docsPrerenderPagesPromise
|
|
10739
10849
|
]);
|
|
10740
10850
|
const redirectSources = [
|
|
10741
10851
|
...routeManager.getRedirects().map((route) => route.source),
|
|
@@ -10744,7 +10854,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
10744
10854
|
const rewriteSources = configuredRewrites.map((route) => route.source);
|
|
10745
10855
|
const prerenderRoutes = [];
|
|
10746
10856
|
const skippedPrerenderRoutes = [];
|
|
10747
|
-
const middlewareRoutesWithConfig = ssgPages.length > 0 ? await Promise.all(
|
|
10857
|
+
const middlewareRoutesWithConfig = ssgPages.length > 0 || docsPrerenderPages.length > 0 ? await Promise.all(
|
|
10748
10858
|
middlewareRoutes.map(async (route) => ({
|
|
10749
10859
|
...route,
|
|
10750
10860
|
config: await readMiddlewareFileConfig(route.filePath)
|
|
@@ -10767,6 +10877,26 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
10767
10877
|
}
|
|
10768
10878
|
prerenderRoutes.push(page.urlPath);
|
|
10769
10879
|
}
|
|
10880
|
+
const docsRouteRuntimeManifest = {
|
|
10881
|
+
...routeRuntimeManifest,
|
|
10882
|
+
routes: routeRuntimeManifest.routes.filter((entry) => entry.kind !== "page")
|
|
10883
|
+
};
|
|
10884
|
+
for (const pathname of docsPrerenderPages) {
|
|
10885
|
+
if (prerenderRoutes.includes(pathname)) continue;
|
|
10886
|
+
const reason = getPhysicalPrerenderBypassReason({
|
|
10887
|
+
config,
|
|
10888
|
+
middlewareRoutes: middlewareRoutesWithConfig,
|
|
10889
|
+
routeRuntimeManifest: docsRouteRuntimeManifest,
|
|
10890
|
+
redirectSources,
|
|
10891
|
+
rewriteSources,
|
|
10892
|
+
pathname
|
|
10893
|
+
});
|
|
10894
|
+
if (reason) {
|
|
10895
|
+
skippedPrerenderRoutes.push({ pathname, reason });
|
|
10896
|
+
continue;
|
|
10897
|
+
}
|
|
10898
|
+
prerenderRoutes.push(pathname);
|
|
10899
|
+
}
|
|
10770
10900
|
for (const skipped of skippedPrerenderRoutes) {
|
|
10771
10901
|
logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
|
|
10772
10902
|
}
|
|
@@ -11500,9 +11630,28 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
11500
11630
|
logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
|
|
11501
11631
|
}
|
|
11502
11632
|
async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
11503
|
-
|
|
11633
|
+
if (!config.docs?.enabled) return;
|
|
11634
|
+
const [mainRoot, ...extraRoots] = getFarmDocsRoots(config.docs);
|
|
11635
|
+
await copyFarmDocsRootContent(
|
|
11636
|
+
mainRoot,
|
|
11637
|
+
root,
|
|
11638
|
+
config.srcDir,
|
|
11639
|
+
path10.join(nitroFuncDir, "farm-docs-content"),
|
|
11640
|
+
fs4
|
|
11641
|
+
);
|
|
11642
|
+
for (const [index, docsRoot] of extraRoots.entries()) {
|
|
11643
|
+
await copyFarmDocsRootContent(
|
|
11644
|
+
docsRoot,
|
|
11645
|
+
root,
|
|
11646
|
+
config.srcDir,
|
|
11647
|
+
path10.join(nitroFuncDir, "farm-docs-roots", String(index)),
|
|
11648
|
+
fs4
|
|
11649
|
+
);
|
|
11650
|
+
}
|
|
11651
|
+
}
|
|
11652
|
+
async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs4) {
|
|
11653
|
+
const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
|
|
11504
11654
|
if (!docsContentDir) return;
|
|
11505
|
-
const bundledContentDir = path10.join(nitroFuncDir, "farm-docs-content");
|
|
11506
11655
|
const lastModifiedManifest = createFarmDocsLastModifiedManifest(docsContentDir, {
|
|
11507
11656
|
fallback: "now"
|
|
11508
11657
|
});
|
|
@@ -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;
|