@farm.js/core 0.1.51-beta.0 → 0.1.51-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-D44ip11f.d.mts → agent-mcp.d-BPzpKBHQ.d.mts} +1 -1
- package/dist/{agent-mcp-BBMfNpsC.d.ts → agent-mcp.d-ZuuNgrkQ.d.ts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +13 -13
- package/dist/agent-runtime.d.ts +13 -13
- package/dist/agent-runtime.mjs +2 -2
- package/dist/{analyzer-VKUDHNDF.cjs → analyzer-AZULAOPL.cjs} +2 -2
- package/dist/{analyzer-HOUCQR3K.mjs → analyzer-V74FTD2F.mjs} +1 -1
- package/dist/api/client.d.mts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/route-manager.d.mts +19 -19
- package/dist/api/route-manager.d.ts +19 -19
- package/dist/api/runtime.d.mts +15 -15
- package/dist/api/runtime.d.ts +15 -15
- package/dist/{api-client-CvI5oOBE.d.ts → api-client.d-BWcqZciH.d.ts} +3 -3
- package/dist/{api-client-CFdv-Xgh.d.mts → api-client.d-CeA6tNA6.d.mts} +3 -3
- package/dist/api.cjs +3 -3
- package/dist/api.d.mts +21 -21
- package/dist/api.d.ts +21 -21
- package/dist/api.mjs +2 -2
- package/dist/{app-manifest-LzjoNPeq.d.ts → app-manifest.d-BJDcZn3W.d.mts} +1 -1
- package/dist/{app-manifest-BC6mFn5A.d.mts → app-manifest.d-HWhqbP2X.d.ts} +1 -1
- package/dist/app-markdown.d.mts +14 -14
- package/dist/app-markdown.d.ts +14 -14
- package/dist/{app-CourU3rQ.d.ts → app.d-B5EWdob-.d.ts} +12 -10
- package/dist/{app-aeD4s_mg.d.mts → app.d-DOGW1KI8.d.mts} +12 -10
- package/dist/{chunk-DWW3AMJX.cjs → chunk-2756SHCI.cjs} +282 -248
- package/dist/{chunk-AMRK3P6W.mjs → chunk-5A5GAZ75.mjs} +182 -68
- package/dist/{chunk-PDJSL7PL.cjs → chunk-5IONBVJY.cjs} +3 -3
- package/dist/{chunk-IOUOGRDX.cjs → chunk-5N7QAGEA.cjs} +25 -6
- package/dist/{chunk-DGOLAZLV.cjs → chunk-65Y5SIBH.cjs} +1 -1
- package/dist/{chunk-QI5AQMEE.mjs → chunk-72NBDVWQ.mjs} +1 -1
- package/dist/{chunk-X5BCMLGP.cjs → chunk-AGR7VJH2.cjs} +1 -1
- package/dist/{chunk-OD6WM3I7.mjs → chunk-AV26KHTG.mjs} +1 -1
- package/dist/{chunk-I2ZA5SXS.mjs → chunk-BSEKNTMS.mjs} +53 -19
- package/dist/{chunk-WAPQWAE6.cjs → chunk-CECUDGXQ.cjs} +9 -8
- package/dist/{chunk-IUQLRTTO.mjs → chunk-CO6UYM2D.mjs} +14 -1
- package/dist/{chunk-WVX3BUNJ.mjs → chunk-CZ35L6PL.mjs} +8 -1
- package/dist/{chunk-4GJJ65RB.mjs → chunk-EIMK7D2D.mjs} +24 -5
- package/dist/{chunk-CY7H5KS4.cjs → chunk-EKJYE4Y7.cjs} +2 -2
- package/dist/{chunk-ZF3GX4O7.mjs → chunk-EOSFVNXZ.mjs} +1 -1
- package/dist/{chunk-S5ZA2T2W.mjs → chunk-EWC76P5D.mjs} +21 -7
- package/dist/{chunk-3HA7PP72.mjs → chunk-I3EFXUAR.mjs} +60 -13
- package/dist/{chunk-VO6NLTV4.cjs → chunk-IFBINMI4.cjs} +3 -3
- package/dist/{chunk-VIFPE5RG.cjs → chunk-JVBNKWLV.cjs} +81 -34
- package/dist/{chunk-JF5CNHHF.mjs → chunk-KMB5BMFX.mjs} +118 -8
- package/dist/{chunk-YLNBWUVS.mjs → chunk-KU7MBLDZ.mjs} +1 -1
- package/dist/{chunk-J37KTQIA.cjs → chunk-NK2VWS7P.cjs} +52 -3
- package/dist/{chunk-WSY2JD7O.mjs → chunk-NN3MOPSI.mjs} +1 -1
- package/dist/{chunk-R5P4KFPM.mjs → chunk-QAIAFCRZ.mjs} +8 -6
- package/dist/{chunk-75WWOZ5C.mjs → chunk-QOSDWGKT.mjs} +1 -1
- package/dist/{chunk-J22JD5YJ.cjs → chunk-RMPNYUGT.cjs} +9 -7
- package/dist/{chunk-XWC5NAHV.mjs → chunk-SCRC5AMM.mjs} +2 -2
- package/dist/{chunk-QK3HBOTG.cjs → chunk-TT66CP3P.cjs} +5 -5
- package/dist/{chunk-Y7TLL65B.cjs → chunk-UQHIWZZ6.cjs} +11 -4
- package/dist/{chunk-O3MMJPC2.cjs → chunk-VITZRYW3.cjs} +119 -9
- package/dist/{chunk-PPDHCRTC.mjs → chunk-VS7EHLLW.mjs} +1 -1
- package/dist/{chunk-USL2ANCB.cjs → chunk-X2AMN2WV.cjs} +2 -2
- package/dist/{chunk-F42U3R4F.cjs → chunk-X2M4XN4V.cjs} +55 -41
- package/dist/{chunk-SO3T6T4I.cjs → chunk-XY4DYGSU.cjs} +358 -244
- package/dist/{chunk-HHFMECFO.mjs → chunk-Y2G5SJFB.mjs} +2 -1
- package/dist/{chunk-Z5MZDFX4.cjs → chunk-YIHRZBD7.cjs} +14 -1
- package/dist/{chunk-MMEEXMUQ.cjs → chunk-ZOWNWHK6.cjs} +2 -2
- package/dist/{chunk-C5JXCUKR.mjs → chunk-ZQ5BDNKW.mjs} +51 -2
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-plugins-CFBEfVPO.d.ts → client-plugins.d-C0n8Yhh-.d.ts} +41 -12
- package/dist/{client-plugins-cqy_dQd0.d.mts → client-plugins.d-C_3CdALC.d.mts} +41 -12
- package/dist/client-plugins.d.mts +13 -13
- package/dist/client-plugins.d.ts +13 -13
- package/dist/client.d.mts +24 -24
- package/dist/client.d.ts +24 -24
- package/dist/config.d.mts +13 -13
- package/dist/config.d.ts +13 -13
- package/dist/desktop.d.mts +14 -14
- package/dist/desktop.d.ts +14 -14
- package/dist/{dev-guard-YLO5DE3H.cjs → dev-guard-2UW2KERP.cjs} +2 -2
- package/dist/{dev-guard-4PFQNXQX.mjs → dev-guard-ONNMVQUN.mjs} +1 -1
- package/dist/{devtools-4MLL3RAL.mjs → devtools-BU5IT2PD.mjs} +3 -3
- package/dist/{devtools-4ZLMD454.cjs → devtools-KJFUE5FO.cjs} +4 -4
- package/dist/docs.cjs +8 -6
- package/dist/docs.d.mts +23 -15
- package/dist/docs.d.ts +23 -15
- package/dist/docs.mjs +7 -5
- package/dist/environment/vite.cjs +2 -2
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +1 -1
- package/dist/{generate-route-types-TF5Wwtvz.d.mts → generate-route-types.d-BL2pq6xC.d.ts} +1 -1
- package/dist/{generate-route-types-DQP0cUzk.d.ts → generate-route-types.d-BoVDU8qX.d.mts} +1 -1
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/image/server.d.mts +1 -1
- package/dist/image/server.d.ts +1 -1
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/index.cjs +19 -17
- package/dist/{index-BYkNbeQV.d.mts → index.d-B6M_8kmo.d.ts} +2 -2
- package/dist/{index-D3l4tREW.d.ts → index.d-BNNDpql4.d.ts} +2 -2
- package/dist/{index-DPUAPho_.d.mts → index.d-BqcfqJvt.d.mts} +2 -2
- package/dist/{index-BxjN_UDZ.d.ts → index.d-CsGxS-hZ.d.mts} +2 -2
- package/dist/index.d.mts +42 -42
- package/dist/index.d.ts +42 -42
- package/dist/index.mjs +18 -16
- package/dist/instrumentation.d.mts +2 -2
- package/dist/instrumentation.d.ts +2 -2
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +13 -13
- package/dist/integrations.d.ts +13 -13
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +14 -14
- package/dist/internal/app-markdown-runtime.d.ts +14 -14
- package/dist/internal/build-runtime.cjs +15 -15
- package/dist/internal/build-runtime.d.mts +16 -16
- package/dist/internal/build-runtime.d.ts +16 -16
- package/dist/internal/build-runtime.mjs +14 -14
- package/dist/internal/cli-runtime.cjs +7 -7
- package/dist/internal/cli-runtime.mjs +6 -6
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +21 -21
- package/dist/internal/client-runtime.d.ts +21 -21
- package/dist/internal/compression-runtime.d.mts +13 -13
- package/dist/internal/compression-runtime.d.ts +13 -13
- package/dist/internal/config-runtime.cjs +5 -5
- package/dist/internal/config-runtime.d.mts +18 -18
- package/dist/internal/config-runtime.d.ts +18 -18
- package/dist/internal/config-runtime.mjs +4 -4
- package/dist/internal/form-actions.d.mts +1 -1
- package/dist/internal/form-actions.d.ts +1 -1
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/island-value-store.d.mts +1 -1
- package/dist/internal/island-value-store.d.ts +1 -1
- package/dist/internal/islands-runtime.d.mts +1 -1
- package/dist/internal/islands-runtime.d.ts +1 -1
- package/dist/internal/isolated-boundary.d.mts +2 -2
- package/dist/internal/isolated-boundary.d.ts +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +7 -3
- package/dist/internal/production-runtime.d.mts +33 -30
- package/dist/internal/production-runtime.d.ts +33 -30
- package/dist/internal/production-runtime.mjs +6 -2
- package/dist/internal/server-tree.d.mts +1 -1
- package/dist/internal/server-tree.d.ts +1 -1
- package/dist/markdown.d.mts +13 -13
- package/dist/markdown.d.ts +13 -13
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.d.mts +15 -15
- package/dist/middleware.d.ts +15 -15
- package/dist/middleware.mjs +3 -3
- package/dist/mobile.d.mts +7 -7
- package/dist/mobile.d.ts +7 -7
- package/dist/{navigation-delegate-DLhbfEN4.d.mts → navigation-delegate.d-C0BbdUgN.d.mts} +1 -1
- package/dist/{navigation-delegate-BU4xqdnw.d.ts → navigation-delegate.d-jArRF0ZP.d.ts} +1 -1
- package/dist/navigation.d.mts +17 -17
- package/dist/navigation.d.ts +17 -17
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/plugin.cjs +11 -11
- package/dist/plugin.d.mts +17 -17
- package/dist/plugin.d.ts +17 -17
- package/dist/plugin.mjs +10 -10
- package/dist/{production-runtime-DLA4J5WG.d.mts → production-runtime.d-DFaQ1qaV.d.mts} +3 -3
- package/dist/{production-runtime-C78A8YgK.d.ts → production-runtime.d-UnXmSS_S.d.ts} +3 -3
- package/dist/{programmatic-routes-client-NpqGBn-i.d.mts → programmatic-routes-client.d-BIowUXQC.d.mts} +10 -2
- package/dist/{programmatic-routes-client-CBqkNhBy.d.ts → programmatic-routes-client.d-VZ0qcbH4.d.ts} +10 -2
- package/dist/query/client.d.mts +1 -1
- package/dist/query/client.d.ts +1 -1
- package/dist/query/index.d.mts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/server.d.mts +1 -1
- package/dist/query/server.d.ts +1 -1
- package/dist/{render-plan-C9sWvDTv.d.mts → render-plan.d-BB6KrYjP.d.ts} +2 -2
- package/dist/{render-plan-CrqcBbnV.d.ts → render-plan.d-BNeqyPyJ.d.mts} +2 -2
- package/dist/renderer-client.d.mts +19 -19
- package/dist/renderer-client.d.ts +19 -19
- package/dist/{request-WwB1-Uim.d.mts → request.d-BV1munmx.d.mts} +1 -1
- package/dist/{request-BizeuqD7.d.ts → request.d-Bxhghm76.d.ts} +1 -1
- package/dist/request.d.mts +14 -14
- package/dist/request.d.ts +14 -14
- package/dist/{resolver-CJ-D9nP-.d.ts → resolver.d-BHyZgpa7.d.ts} +1 -1
- package/dist/{resolver-TDyZKgKI.d.mts → resolver.d-JnZKKsc5.d.mts} +1 -1
- package/dist/response.d-BolW0Vx_.d.mts +10 -0
- package/dist/response.d-BolW0Vx_.d.ts +10 -0
- package/dist/{route-rendering-BGhJN64l.d.ts → route-rendering.d-BIf7zE9d.d.ts} +1 -1
- package/dist/{route-rendering-S6NFjnx4.d.mts → route-rendering.d-DShqKlgK.d.mts} +1 -1
- package/dist/{route-2_yXC6gv.d.mts → route.d-BaVH3V0w.d.mts} +1 -1
- package/dist/{route-DFhZj6jN.d.ts → route.d-DBTEqifW.d.ts} +1 -1
- package/dist/{router-BIheIy9G.d.mts → router.d-BE7i84fb.d.mts} +1 -1
- package/dist/{router-BUD_j2EL.d.ts → router.d-Bw3K3b0a.d.ts} +1 -1
- package/dist/{routes-8PT9cl60.d.ts → routes.d-DVZQL0-H.d.ts} +3 -3
- package/dist/{routes-kEUsXHx3.d.mts → routes.d-_5tBQexL.d.mts} +3 -3
- package/dist/routes.d.mts +13 -13
- package/dist/routes.d.ts +13 -13
- package/dist/{rsc-pipeline-OLAVIKI3.mjs → rsc-pipeline-FBM6NFYY.mjs} +5 -5
- package/dist/{rsc-pipeline-JRGUZBYM.cjs → rsc-pipeline-IQI5XQLS.cjs} +6 -6
- package/dist/{runtime-OGCHDACZ.mjs → runtime-2JYIDUON.mjs} +4 -4
- package/dist/{runtime-G23RSLEK.cjs → runtime-DXEVFYLE.cjs} +6 -6
- package/dist/{runtime-CihDZ2Rn.d.mts → runtime.d-3iJAKptR.d.mts} +2 -2
- package/dist/{runtime-C4CmlOOh.d.ts → runtime.d-BtL3PCL3.d.ts} +2 -2
- package/dist/{runtime-CWP-21hP.d.ts → runtime.d-CQgoYR0Q.d.mts} +4 -4
- package/dist/{runtime-CgJwe6H_.d.mts → runtime.d-CfhaLPl-.d.ts} +4 -4
- package/dist/server-action-security.d.mts +1 -1
- package/dist/server-action-security.d.ts +1 -1
- package/dist/server-fn-client.d.mts +5 -5
- package/dist/server-fn-client.d.ts +5 -5
- package/dist/server-fn.d.mts +3 -3
- package/dist/server-fn.d.ts +3 -3
- package/dist/server-plugins.d.mts +14 -14
- package/dist/server-plugins.d.ts +14 -14
- package/dist/server-query-client.d.mts +5 -5
- package/dist/server-query-client.d.ts +5 -5
- package/dist/server-query.d.mts +2 -2
- package/dist/server-query.d.ts +2 -2
- package/dist/server.cjs +31 -31
- package/dist/server.d.mts +28 -29
- package/dist/server.d.ts +28 -29
- package/dist/server.mjs +13 -13
- package/dist/{spa-router-CVOL0Vrq.d.mts → spa-router.d-C5opIgXg.d.ts} +5 -5
- package/dist/{spa-router-Kytv4jSB.d.ts → spa-router.d-D63jb6nX.d.mts} +5 -5
- package/dist/storage.d.mts +2 -2
- package/dist/storage.d.ts +2 -2
- package/dist/testing.d.mts +14 -14
- package/dist/testing.d.ts +14 -14
- package/dist/theme/client.d.mts +1 -1
- package/dist/theme/client.d.ts +1 -1
- package/dist/theme/index.d.mts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/runtime.d.mts +1 -1
- package/dist/theme/runtime.d.ts +1 -1
- package/dist/theme/server.d.mts +1 -1
- package/dist/theme/server.d.ts +1 -1
- package/dist/{utils-Dsa1HZ7X.d.mts → utils.d-CO-U4OVZ.d.mts} +1 -1
- package/dist/{utils-DbyXlzaj.d.ts → utils.d-CkpTqTsC.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +11 -11
- package/dist/vite.d.mts +20 -19
- package/dist/vite.d.ts +20 -19
- package/dist/vite.mjs +10 -10
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/package.json +3 -3
- /package/dist/{base-path-BOUV5ozD.d.mts → base-path.d-BOUV5ozD.d.mts} +0 -0
- /package/dist/{base-path-BOUV5ozD.d.ts → base-path.d-BOUV5ozD.d.ts} +0 -0
- /package/dist/{chunk-recovery-lnQFzcQP.d.mts → chunk-recovery.d-lnQFzcQP.d.mts} +0 -0
- /package/dist/{chunk-recovery-lnQFzcQP.d.ts → chunk-recovery.d-lnQFzcQP.d.ts} +0 -0
- /package/dist/{client-cache-Deoqq-nM.d.ts → client-cache.d-Deoqq-nM.d.ts} +0 -0
- /package/dist/{client-cache-di_Nasxa.d.mts → client-cache.d-di_Nasxa.d.mts} +0 -0
- /package/dist/{config-CnhyvvmT.d.mts → config.d-CnhyvvmT.d.mts} +0 -0
- /package/dist/{config-CnhyvvmT.d.ts → config.d-CnhyvvmT.d.ts} +0 -0
- /package/dist/{endpoint-BgHn0lhl.d.ts → endpoint.d-BgHn0lhl.d.ts} +0 -0
- /package/dist/{endpoint-BkMSCRf6.d.mts → endpoint.d-BkMSCRf6.d.mts} +0 -0
- /package/dist/{image-config-CeDgNyX4.d.mts → image-config.d-CeDgNyX4.d.mts} +0 -0
- /package/dist/{image-config-CeDgNyX4.d.ts → image-config.d-CeDgNyX4.d.ts} +0 -0
- /package/dist/{instrumentation-runtime-CX9Zh-16.d.mts → instrumentation-runtime.d-CX9Zh-16.d.mts} +0 -0
- /package/dist/{instrumentation-runtime-CX9Zh-16.d.ts → instrumentation-runtime.d-CX9Zh-16.d.ts} +0 -0
- /package/dist/{island-value-protocol-BRayRghM.d.mts → island-value-protocol.d-BRayRghM.d.mts} +0 -0
- /package/dist/{island-value-protocol-BRayRghM.d.ts → island-value-protocol.d-BRayRghM.d.ts} +0 -0
- /package/dist/{island-CfGru1MO.d.mts → island.d-CfGru1MO.d.mts} +0 -0
- /package/dist/{island-CfGru1MO.d.ts → island.d-CfGru1MO.d.ts} +0 -0
- /package/dist/{layers-CcS42OGR.d.mts → layers.d-CcS42OGR.d.mts} +0 -0
- /package/dist/{layers-CcS42OGR.d.ts → layers.d-CcS42OGR.d.ts} +0 -0
- /package/dist/{lifecycle-C2aLBOwu.d.mts → lifecycle.d-C2aLBOwu.d.mts} +0 -0
- /package/dist/{lifecycle-C2aLBOwu.d.ts → lifecycle.d-C2aLBOwu.d.ts} +0 -0
- /package/dist/{observability-B2363jB6.d.mts → observability.d-B2363jB6.d.mts} +0 -0
- /package/dist/{observability-B2363jB6.d.ts → observability.d-B2363jB6.d.ts} +0 -0
- /package/dist/{params-BALtrRim.d.ts → params.d-BALtrRim.d.ts} +0 -0
- /package/dist/{params-ry-lxqmy.d.mts → params.d-ry-lxqmy.d.mts} +0 -0
- /package/dist/{production-vite-BQFAlG7n.d.mts → production-vite.d-BQFAlG7n.d.mts} +0 -0
- /package/dist/{production-vite-BQFAlG7n.d.ts → production-vite.d-BQFAlG7n.d.ts} +0 -0
- /package/dist/{route-pattern-CVsVbq5n.d.mts → route-pattern.d-CVsVbq5n.d.mts} +0 -0
- /package/dist/{route-pattern-CVsVbq5n.d.ts → route-pattern.d-CVsVbq5n.d.ts} +0 -0
- /package/dist/{server-client-bridge-DKWDl5NB.d.mts → server-client-bridge.d-DKWDl5NB.d.mts} +0 -0
- /package/dist/{server-client-bridge-DKWDl5NB.d.ts → server-client-bridge.d-DKWDl5NB.d.ts} +0 -0
- /package/dist/{server-fn-error-DrcH9cc1.d.mts → server-fn-error.d-DrcH9cc1.d.mts} +0 -0
- /package/dist/{server-fn-error-DrcH9cc1.d.ts → server-fn-error.d-DrcH9cc1.d.ts} +0 -0
- /package/dist/{server-query-runtime-DXRNhX_3.d.ts → server-query-runtime.d-DXRNhX_3.d.ts} +0 -0
- /package/dist/{server-query-runtime-aP52iuL5.d.mts → server-query-runtime.d-aP52iuL5.d.mts} +0 -0
- /package/dist/{types-BnIqOn9w.d.mts → types.d-BnIqOn9w.d.mts} +0 -0
- /package/dist/{types-BnIqOn9w.d.ts → types.d-BnIqOn9w.d.ts} +0 -0
- /package/dist/{types-C41ePjvP.d.mts → types.d-C41ePjvP.d.mts} +0 -0
- /package/dist/{types-C41ePjvP.d.ts → types.d-C41ePjvP.d.ts} +0 -0
- /package/dist/{types-DQnyD3VD.d.mts → types.d-DQnyD3VD.d.mts} +0 -0
- /package/dist/{types-DQnyD3VD.d.ts → types.d-DQnyD3VD.d.ts} +0 -0
- /package/dist/{workflows-CRMzQZ3k.d.mts → workflows.d-CRMzQZ3k.d.mts} +0 -0
- /package/dist/{workflows-CRMzQZ3k.d.ts → workflows.d-CRMzQZ3k.d.ts} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk65Y5SIBHcjs = require('./chunk-65Y5SIBH.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -37,7 +37,7 @@ var _chunkA5BJKSZEcjs = require('./chunk-A5BJKSZE.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkX2M4XN4Vcjs = require('./chunk-X2M4XN4V.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunkLNM57D3Hcjs = require('./chunk-LNM57D3H.cjs');
|
|
@@ -50,7 +50,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
var
|
|
53
|
+
var _chunkUQHIWZZ6cjs = require('./chunk-UQHIWZZ6.cjs');
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
@@ -79,7 +79,7 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkRMPNYUGTcjs = require('./chunk-RMPNYUGT.cjs');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
var _chunkSBABQKPTcjs = require('./chunk-SBABQKPT.cjs');
|
|
@@ -90,7 +90,10 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
var _chunkNK2VWS7Pcjs = require('./chunk-NK2VWS7P.cjs');
|
|
94
97
|
|
|
95
98
|
|
|
96
99
|
|
|
@@ -161,10 +164,10 @@ var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
|
|
|
161
164
|
|
|
162
165
|
|
|
163
166
|
|
|
164
|
-
var
|
|
167
|
+
var _chunkCECUDGXQcjs = require('./chunk-CECUDGXQ.cjs');
|
|
165
168
|
|
|
166
169
|
|
|
167
|
-
var
|
|
170
|
+
var _chunkX2AMN2WVcjs = require('./chunk-X2AMN2WV.cjs');
|
|
168
171
|
|
|
169
172
|
|
|
170
173
|
|
|
@@ -227,7 +230,8 @@ var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
|
227
230
|
|
|
228
231
|
|
|
229
232
|
|
|
230
|
-
|
|
233
|
+
|
|
234
|
+
var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
|
|
231
235
|
|
|
232
236
|
|
|
233
237
|
|
|
@@ -240,7 +244,7 @@ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
|
240
244
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
241
245
|
|
|
242
246
|
|
|
243
|
-
var
|
|
247
|
+
var _chunkAGR7VJH2cjs = require('./chunk-AGR7VJH2.cjs');
|
|
244
248
|
|
|
245
249
|
|
|
246
250
|
var _chunkIWFV5ZEDcjs = require('./chunk-IWFV5ZED.cjs');
|
|
@@ -295,6 +299,7 @@ function transformFarmFormActionModule(options) {
|
|
|
295
299
|
|
|
296
300
|
// src/vite.ts
|
|
297
301
|
var _vite = require('vite');
|
|
302
|
+
var _module = require('module');
|
|
298
303
|
|
|
299
304
|
// src/dev-preview-guard.ts
|
|
300
305
|
var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
|
|
@@ -595,7 +600,7 @@ function formatClientBoundaryWarning(id, findings) {
|
|
|
595
600
|
}
|
|
596
601
|
if (builtinImports.length > 0) {
|
|
597
602
|
lines.push(
|
|
598
|
-
`- import of ${builtinImports.join(", ")} \u2014 stubbed
|
|
603
|
+
`- import of ${builtinImports.join(", ")} \u2014 stubbed in the browser, where exports without a Web API equivalent are undefined. Move the import into server-only code.`
|
|
599
604
|
);
|
|
600
605
|
}
|
|
601
606
|
return lines.join("\n");
|
|
@@ -760,7 +765,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
760
765
|
return import("./workflows.cjs");
|
|
761
766
|
}
|
|
762
767
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
763
|
-
return import("./devtools-
|
|
768
|
+
return import("./devtools-KJFUE5FO.cjs");
|
|
764
769
|
}
|
|
765
770
|
function loadFarmDevtoolsUIRuntime() {
|
|
766
771
|
return import("./devtools-ui-SYRUXUA7.cjs");
|
|
@@ -800,14 +805,22 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
800
805
|
return {
|
|
801
806
|
name: "farm:server-only-entries",
|
|
802
807
|
enforce: "pre",
|
|
808
|
+
config() {
|
|
809
|
+
return {
|
|
810
|
+
optimizeDeps: { rolldownOptions: { plugins: [_chunkNK2VWS7Pcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } }
|
|
811
|
+
};
|
|
812
|
+
},
|
|
803
813
|
configResolved(config) {
|
|
804
814
|
root = config.root;
|
|
805
815
|
},
|
|
806
816
|
resolveId(id, importer, options) {
|
|
807
817
|
if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options, 'optionalAccess', _46 => _46.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
|
|
818
|
+
if (!_optionalChain([options, 'optionalAccess', _47 => _47.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
819
|
+
return _chunkNK2VWS7Pcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options);
|
|
820
|
+
}
|
|
808
821
|
if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
|
|
809
822
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
810
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
823
|
+
if (!_optionalChain([options, 'optionalAccess', _48 => _48.ssr])) {
|
|
811
824
|
this.error(
|
|
812
825
|
`${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
|
|
813
826
|
);
|
|
@@ -821,7 +834,8 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
821
834
|
return null;
|
|
822
835
|
},
|
|
823
836
|
load(id) {
|
|
824
|
-
|
|
837
|
+
if (id === FARM_PLATFORM_CLIENT_ID) return createFarmPlatformClientModule();
|
|
838
|
+
return _nullishCoalesce(_chunkNK2VWS7Pcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
825
839
|
}
|
|
826
840
|
};
|
|
827
841
|
}
|
|
@@ -856,7 +870,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
856
870
|
return `${_chunk76GHW3WIcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
857
871
|
}
|
|
858
872
|
function getPublicEnvDefine(config) {
|
|
859
|
-
const publicEnv = _optionalChain([config, 'access',
|
|
873
|
+
const publicEnv = _optionalChain([config, 'access', _49 => _49.env, 'optionalAccess', _50 => _50.public]);
|
|
860
874
|
if (!isResolvedEnvScope(publicEnv)) {
|
|
861
875
|
return {};
|
|
862
876
|
}
|
|
@@ -895,7 +909,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
895
909
|
return;
|
|
896
910
|
}
|
|
897
911
|
if (res.headersSent) {
|
|
898
|
-
_optionalChain([res, 'access',
|
|
912
|
+
_optionalChain([res, 'access', _51 => _51.destroy, 'optionalCall', _52 => _52(error instanceof Error ? error : new Error(String(error)))]);
|
|
899
913
|
return;
|
|
900
914
|
}
|
|
901
915
|
res.statusCode = 500;
|
|
@@ -904,6 +918,17 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
904
918
|
});
|
|
905
919
|
};
|
|
906
920
|
}
|
|
921
|
+
async function proxyFarmExternalRewrite(req, res, bodySizeLimit) {
|
|
922
|
+
const destination = req.url;
|
|
923
|
+
if (!destination || !/^https?:\/\//i.test(destination)) return false;
|
|
924
|
+
let request = createRequestFromNodeRequest(req, new URL(destination));
|
|
925
|
+
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
926
|
+
const body = await _chunkLIFUPCXWcjs.readNodeRequestBody.call(void 0, req, bodySizeLimit);
|
|
927
|
+
request = new Request(request, { body: toRequestBody(body) });
|
|
928
|
+
}
|
|
929
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, await _chunkYIHRZBD7cjs.fetchFarmExternalRewrite.call(void 0, request));
|
|
930
|
+
return true;
|
|
931
|
+
}
|
|
907
932
|
function toRequestBody(body) {
|
|
908
933
|
if (!body) return void 0;
|
|
909
934
|
const copy = new Uint8Array(body.byteLength);
|
|
@@ -938,7 +963,7 @@ function applyWebResponseToNodeResponse(response, res) {
|
|
|
938
963
|
for (const name of res.getHeaderNames()) {
|
|
939
964
|
res.removeHeader(name);
|
|
940
965
|
}
|
|
941
|
-
|
|
966
|
+
_chunkYIHRZBD7cjs.applyWebResponseHeaders.call(void 0, res, response.headers);
|
|
942
967
|
}
|
|
943
968
|
function toNodeResponseBuffer(chunk, encoding) {
|
|
944
969
|
if (chunk === void 0 || chunk === null || typeof chunk === "function") return void 0;
|
|
@@ -987,7 +1012,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
987
1012
|
const originalWrite = res.write.bind(res);
|
|
988
1013
|
const originalEnd = res.end.bind(res);
|
|
989
1014
|
const originalWriteHead = res.writeHead.bind(res);
|
|
990
|
-
const originalFlushHeaders = _optionalChain([res, 'access',
|
|
1015
|
+
const originalFlushHeaders = _optionalChain([res, 'access', _53 => _53.flushHeaders, 'optionalAccess', _54 => _54.bind, 'call', _55 => _55(res)]);
|
|
991
1016
|
let afterResponseCalled = false;
|
|
992
1017
|
let interceptedEnd = false;
|
|
993
1018
|
const htmlChunks = [];
|
|
@@ -1027,7 +1052,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1027
1052
|
const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
|
|
1028
1053
|
if (shouldBufferResponse) {
|
|
1029
1054
|
const callback = args.find((arg) => typeof arg === "function");
|
|
1030
|
-
_optionalChain([callback, 'optionalCall',
|
|
1055
|
+
_optionalChain([callback, 'optionalCall', _56 => _56()]);
|
|
1031
1056
|
return true;
|
|
1032
1057
|
}
|
|
1033
1058
|
const writeResult = originalWrite(chunk, ...args);
|
|
@@ -1140,13 +1165,13 @@ function getEnvDefines(config, configEnv) {
|
|
|
1140
1165
|
_chunkHEPJIKKQcjs.getPublicFarmImageConfig.call(void 0, _chunkHEPJIKKQcjs.resolveFarmImageConfig.call(void 0, config.images))
|
|
1141
1166
|
)
|
|
1142
1167
|
};
|
|
1143
|
-
if (_optionalChain([configEnv, 'optionalAccess',
|
|
1168
|
+
if (_optionalChain([configEnv, 'optionalAccess', _57 => _57.isSsrBuild])) {
|
|
1144
1169
|
defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
|
|
1145
1170
|
}
|
|
1146
1171
|
return defines;
|
|
1147
1172
|
}
|
|
1148
1173
|
function getFarmAPIBaseURLDefine(config) {
|
|
1149
|
-
const baseURL = _optionalChain([config, 'access',
|
|
1174
|
+
const baseURL = _optionalChain([config, 'access', _58 => _58.api, 'optionalAccess', _59 => _59.baseURL]);
|
|
1150
1175
|
return typeof baseURL === "string" && baseURL ? baseURL : _chunkIWFV5ZEDcjs.DEFAULT_FARM_API_BASE_PATH;
|
|
1151
1176
|
}
|
|
1152
1177
|
function isResolvedEnvScope(value) {
|
|
@@ -1193,10 +1218,12 @@ function rewriteEarlySsrRelativeImports(options) {
|
|
|
1193
1218
|
const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
|
|
1194
1219
|
const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
|
|
1195
1220
|
const resolvedPath = path5.resolve(path5.dirname(cleanId), sourcePath);
|
|
1221
|
+
const moduleId = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, resolvedPath, options.root);
|
|
1222
|
+
const specifier = moduleId.startsWith("/@fs/") ? _chunkVQJYGZNXcjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
|
|
1196
1223
|
replacements.push({
|
|
1197
1224
|
start: source.start,
|
|
1198
1225
|
end: source.end,
|
|
1199
|
-
code: JSON.stringify(`${
|
|
1226
|
+
code: JSON.stringify(`${specifier}${suffix}`)
|
|
1200
1227
|
});
|
|
1201
1228
|
});
|
|
1202
1229
|
if (replacements.length === 0) return null;
|
|
@@ -1232,9 +1259,9 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1232
1259
|
transformedExports++;
|
|
1233
1260
|
};
|
|
1234
1261
|
for (const node of body) {
|
|
1235
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
1262
|
+
if (_optionalChain([node, 'optionalAccess', _60 => _60.type]) === "ExportDefaultDeclaration" && node.declaration) {
|
|
1236
1263
|
const declaration2 = node.declaration;
|
|
1237
|
-
if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access',
|
|
1264
|
+
if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _61 => _61.id, 'optionalAccess', _62 => _62.name])) {
|
|
1238
1265
|
replacements.push({
|
|
1239
1266
|
start: node.start,
|
|
1240
1267
|
end: node.end,
|
|
@@ -1252,11 +1279,11 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1252
1279
|
}
|
|
1253
1280
|
continue;
|
|
1254
1281
|
}
|
|
1255
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
1282
|
+
if (_optionalChain([node, 'optionalAccess', _63 => _63.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
|
|
1256
1283
|
const specifiers = (node.specifiers || []).filter(
|
|
1257
1284
|
(specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
|
|
1258
1285
|
);
|
|
1259
|
-
const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess',
|
|
1286
|
+
const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _64 => _64.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _65 => _65.value]), () => ( "")))));
|
|
1260
1287
|
const isComponentExport = (specifier) => {
|
|
1261
1288
|
const exported = specifierName(specifier.exported);
|
|
1262
1289
|
return exported === "default" || /^[A-Z]/.test(exported);
|
|
@@ -1283,14 +1310,14 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1283
1310
|
if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
|
|
1284
1311
|
continue;
|
|
1285
1312
|
}
|
|
1286
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
1313
|
+
if (_optionalChain([node, 'optionalAccess', _66 => _66.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
|
|
1287
1314
|
const declaration = node.declaration;
|
|
1288
1315
|
const declaredNames = [];
|
|
1289
|
-
if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access',
|
|
1316
|
+
if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _67 => _67.id, 'optionalAccess', _68 => _68.name])) {
|
|
1290
1317
|
declaredNames.push(declaration.id.name);
|
|
1291
1318
|
} else if (declaration.type === "VariableDeclaration") {
|
|
1292
1319
|
for (const declarator of declaration.declarations || []) {
|
|
1293
|
-
if (_optionalChain([declarator, 'access',
|
|
1320
|
+
if (_optionalChain([declarator, 'access', _69 => _69.id, 'optionalAccess', _70 => _70.type]) === "Identifier") declaredNames.push(declarator.id.name);
|
|
1294
1321
|
}
|
|
1295
1322
|
}
|
|
1296
1323
|
const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
|
|
@@ -1354,7 +1381,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
1354
1381
|
} catch (e11) {
|
|
1355
1382
|
return;
|
|
1356
1383
|
}
|
|
1357
|
-
const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access',
|
|
1384
|
+
const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _71 => _71.env, 'optionalAccess', _72 => _72.public]), () => ( {}))));
|
|
1358
1385
|
const findings = analyzeClientBoundary(program, publicKeys);
|
|
1359
1386
|
if (findings.envKeys.length === 0 && findings.publicEnvKeys.length === 0 && findings.builtinImports.length === 0) {
|
|
1360
1387
|
return;
|
|
@@ -1374,7 +1401,7 @@ function hasViteAlias(alias, find) {
|
|
|
1374
1401
|
}
|
|
1375
1402
|
function farmPlugin(options = {}, initialPluginManager) {
|
|
1376
1403
|
const imageImports = farmImageImportsPlugin();
|
|
1377
|
-
const fontImports =
|
|
1404
|
+
const fontImports = _chunkX2M4XN4Vcjs.farmFontImportsPlugin.call(void 0, {
|
|
1378
1405
|
root: options.root,
|
|
1379
1406
|
basePath: options.basePath,
|
|
1380
1407
|
publicDir: options.publicDir
|
|
@@ -1382,8 +1409,8 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1382
1409
|
let farmApp;
|
|
1383
1410
|
let serverFnTransformActive = false;
|
|
1384
1411
|
const islandsServerFns = () => {
|
|
1385
|
-
const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
1386
|
-
return _optionalChain([config, 'access',
|
|
1412
|
+
const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _73 => _73.getConfig, 'call', _74 => _74()]), () => ( options));
|
|
1413
|
+
return _optionalChain([config, 'access', _75 => _75.experimental, 'optionalAccess', _76 => _76.serverActions]) === true && _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _77 => _77.experimental, 'optionalAccess', _78 => _78.serverComponents])) === "islands";
|
|
1387
1414
|
};
|
|
1388
1415
|
let reactRefreshActive = false;
|
|
1389
1416
|
let server;
|
|
@@ -1408,14 +1435,14 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1408
1435
|
].join(" ");
|
|
1409
1436
|
console.log(log);
|
|
1410
1437
|
};
|
|
1411
|
-
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
1438
|
+
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _79 => _79.getRouteManager, 'call', _80 => _80(), 'access', _81 => _81.getProgrammaticClientRoutes, 'call', _82 => _82()])));
|
|
1412
1439
|
return {
|
|
1413
1440
|
name: "farm",
|
|
1414
1441
|
api: { getProgrammaticClientRoutes },
|
|
1415
1442
|
config(userConfig, configEnv) {
|
|
1416
1443
|
isBuild = configEnv.command === "build";
|
|
1417
1444
|
const layerAliases = _chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, options.layers);
|
|
1418
|
-
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access',
|
|
1445
|
+
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _83 => _83.resolve, 'optionalAccess', _84 => _84.alias]), "@") ? {} : _chunkX2M4XN4Vcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
|
|
1419
1446
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
1420
1447
|
return {
|
|
1421
1448
|
// Honor Farm's publicDir so the dev server serves the same static
|
|
@@ -1431,7 +1458,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1431
1458
|
server: {
|
|
1432
1459
|
fs: {
|
|
1433
1460
|
...layerRoots.length ? { allow: [path5.resolve(options.root || process.cwd()), ...layerRoots] } : {},
|
|
1434
|
-
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access',
|
|
1461
|
+
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _85 => _85.server, 'optionalAccess', _86 => _86.fs, 'optionalAccess', _87 => _87.deny]), options)
|
|
1435
1462
|
}
|
|
1436
1463
|
}
|
|
1437
1464
|
};
|
|
@@ -1443,8 +1470,8 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1443
1470
|
serverFnTransformActive = config.plugins.some(
|
|
1444
1471
|
(plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
1445
1472
|
);
|
|
1446
|
-
reactRefreshActive =
|
|
1447
|
-
if (_optionalChain([options, 'access',
|
|
1473
|
+
reactRefreshActive = _chunk65Y5SIBHcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
1474
|
+
if (_optionalChain([options, 'access', _88 => _88.experimental, 'optionalAccess', _89 => _89.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
1448
1475
|
_chunkVQJYGZNXcjs.logger.warn(
|
|
1449
1476
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
1450
1477
|
);
|
|
@@ -1453,7 +1480,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1453
1480
|
async configureServer(viteServer) {
|
|
1454
1481
|
viteServer.middlewares.use(
|
|
1455
1482
|
createFarmDevPreviewGuard(viteServer, {
|
|
1456
|
-
getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
1483
|
+
getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _90 => _90.getConfig, 'call', _91 => _91()]), () => ( options)))
|
|
1457
1484
|
})
|
|
1458
1485
|
);
|
|
1459
1486
|
if (typeof fontImports.configureServer === "function") {
|
|
@@ -1468,7 +1495,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1468
1495
|
} catch (e12) {
|
|
1469
1496
|
}
|
|
1470
1497
|
};
|
|
1471
|
-
farmApp = new (0,
|
|
1498
|
+
farmApp = new (0, _chunkX2M4XN4Vcjs.FarmApp)(
|
|
1472
1499
|
{
|
|
1473
1500
|
...options,
|
|
1474
1501
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -1478,7 +1505,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1478
1505
|
await farmApp.initialize();
|
|
1479
1506
|
const farmConfig = farmApp.getConfig();
|
|
1480
1507
|
let farmAppPackages;
|
|
1481
|
-
if (_optionalChain([farmConfig, 'access',
|
|
1508
|
+
if (_optionalChain([farmConfig, 'access', _92 => _92.agent, 'optionalAccess', _93 => _93.noindexPreviews])) {
|
|
1482
1509
|
server.middlewares.use((_req, res, next) => {
|
|
1483
1510
|
if (_chunkSGBNF56Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
1484
1511
|
res.setHeader("X-Robots-Tag", _chunkNYQSC4DXcjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
@@ -1488,7 +1515,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1488
1515
|
}
|
|
1489
1516
|
const apiServerBasePath = _chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
1490
1517
|
const devBuiltInRoutePaths = new Set(
|
|
1491
|
-
|
|
1518
|
+
_chunkRMPNYUGTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
1492
1519
|
agent: {
|
|
1493
1520
|
apiCatalog: true,
|
|
1494
1521
|
mcp: true,
|
|
@@ -1510,7 +1537,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1510
1537
|
validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
|
|
1511
1538
|
// Vite owns this address. Unlike request.url, it cannot be replaced by
|
|
1512
1539
|
// a caller-controlled Host header.
|
|
1513
|
-
trustedLocalOrigin: () => _optionalChain([server, 'access',
|
|
1540
|
+
trustedLocalOrigin: () => _optionalChain([server, 'access', _94 => _94.resolvedUrls, 'optionalAccess', _95 => _95.local, 'access', _96 => _96[0]]),
|
|
1514
1541
|
onError(error) {
|
|
1515
1542
|
_chunkVQJYGZNXcjs.logger.error(
|
|
1516
1543
|
`Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -1530,15 +1557,15 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1530
1557
|
const workflowConfig = farmConfig.workflows;
|
|
1531
1558
|
const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
|
|
1532
1559
|
const getExtraRouteTypes = () => [
|
|
1533
|
-
..._optionalChain([options, 'access',
|
|
1534
|
-
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
1560
|
+
..._optionalChain([options, 'access', _97 => _97.openapi, 'optionalAccess', _98 => _98.enabled]) && options.openapi.route ? [options.openapi.route] : [],
|
|
1561
|
+
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _99 => _99.getFarmDocsRouteTypeEntries, 'call', _100 => _100(farmConfig.docs)]), () => ( []))
|
|
1535
1562
|
];
|
|
1536
1563
|
const appDirSlugs = sourceRoots.map(
|
|
1537
1564
|
(source) => path5.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
|
|
1538
1565
|
);
|
|
1539
1566
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
1540
1567
|
try {
|
|
1541
|
-
const result = await
|
|
1568
|
+
const result = await _chunkUQHIWZZ6cjs.generateFarmTypeArtifacts.call(void 0, {
|
|
1542
1569
|
root: farmConfig.root,
|
|
1543
1570
|
srcDir: farmConfig.srcDir,
|
|
1544
1571
|
layers: farmConfig.layers,
|
|
@@ -1578,7 +1605,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1578
1605
|
(source) => path5.join(source.root, source.srcDir).replace(/\\/g, "/")
|
|
1579
1606
|
);
|
|
1580
1607
|
const layerConfigFiles = new Set(
|
|
1581
|
-
farmConfig.layers.map((layer) => _optionalChain([layer, 'access',
|
|
1608
|
+
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _101 => _101.configFile, 'optionalAccess', _102 => _102.replace, 'call', _103 => _103(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
1582
1609
|
);
|
|
1583
1610
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
1584
1611
|
..._chunkRD623KW4cjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
@@ -1657,7 +1684,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1657
1684
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
1658
1685
|
}
|
|
1659
1686
|
if (isI18nCatalogFile(file)) {
|
|
1660
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
1687
|
+
_optionalChain([farmApp, 'optionalAccess', _104 => _104.getI18nRuntime, 'call', _105 => _105(), 'access', _106 => _106.reload, 'call', _107 => _107(), 'access', _108 => _108.then, 'call', _109 => _109(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _110 => _110.catch, 'call', _111 => _111((error) => _chunkVQJYGZNXcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
1661
1688
|
}
|
|
1662
1689
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
1663
1690
|
if (isRouteRefreshEvent) {
|
|
@@ -1670,8 +1697,8 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1670
1697
|
const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
|
|
1671
1698
|
pendingRouteRefreshIncludesMiddleware = false;
|
|
1672
1699
|
Promise.all([
|
|
1673
|
-
_optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
1674
|
-
reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess',
|
|
1700
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _112 => _112(`${ev} ${file}`)]),
|
|
1701
|
+
reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _113 => _113.reload, 'call', _114 => _114()]) : void 0
|
|
1675
1702
|
]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkVQJYGZNXcjs.logger.warn(`Route refresh failed: ${error.message}`));
|
|
1676
1703
|
}, 50);
|
|
1677
1704
|
}
|
|
@@ -1752,7 +1779,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1752
1779
|
});
|
|
1753
1780
|
}
|
|
1754
1781
|
}
|
|
1755
|
-
middlewareManager = new (0,
|
|
1782
|
+
middlewareManager = new (0, _chunkX2AMN2WVcjs.MiddlewareManager)(
|
|
1756
1783
|
appDirs,
|
|
1757
1784
|
server,
|
|
1758
1785
|
farmConfig.middleware,
|
|
@@ -1773,11 +1800,11 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1773
1800
|
});
|
|
1774
1801
|
}
|
|
1775
1802
|
}
|
|
1776
|
-
if (_optionalChain([options, 'access',
|
|
1803
|
+
if (_optionalChain([options, 'access', _115 => _115.openapi, 'optionalAccess', _116 => _116.enabled])) {
|
|
1777
1804
|
const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
|
|
1778
1805
|
openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
|
|
1779
1806
|
mode: "development",
|
|
1780
|
-
apiBaseURL: typeof _optionalChain([options, 'access',
|
|
1807
|
+
apiBaseURL: typeof _optionalChain([options, 'access', _117 => _117.api, 'optionalAccess', _118 => _118.baseURL]) === "string" ? options.api.baseURL : void 0
|
|
1781
1808
|
});
|
|
1782
1809
|
const spec = await openAPIManager.generateSpec();
|
|
1783
1810
|
reportOpenAPIDevGenerationResult(spec);
|
|
@@ -1819,19 +1846,19 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1819
1846
|
clientEntry: "/@farm/client.js",
|
|
1820
1847
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
1821
1848
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
1822
|
-
globalStylesheetHref:
|
|
1849
|
+
globalStylesheetHref: _chunkX2M4XN4Vcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
1823
1850
|
farmConfig.root,
|
|
1824
1851
|
farmConfig.srcDir
|
|
1825
1852
|
),
|
|
1826
1853
|
loadModule: async (specifier) => {
|
|
1827
1854
|
const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
|
|
1828
|
-
if (specifier === _optionalChain([farmConfig, 'access',
|
|
1855
|
+
if (specifier === _optionalChain([farmConfig, 'access', _119 => _119.docs, 'access', _120 => _120.adapter, 'optionalAccess', _121 => _121.server]) && _optionalChain([resolved, 'optionalAccess', _122 => _122.id])) {
|
|
1829
1856
|
return import(
|
|
1830
1857
|
/* @vite-ignore */
|
|
1831
1858
|
_url.pathToFileURL.call(void 0, resolved.id).href
|
|
1832
1859
|
);
|
|
1833
1860
|
}
|
|
1834
|
-
return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
1861
|
+
return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _123 => _123.id]), () => ( specifier)));
|
|
1835
1862
|
},
|
|
1836
1863
|
registerMCPServer: (mcpServer) => {
|
|
1837
1864
|
const dispose = _chunk6ONBZGVHcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
@@ -1849,21 +1876,21 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1849
1876
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
1850
1877
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
1851
1878
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
1852
|
-
globalStylesheetHref:
|
|
1879
|
+
globalStylesheetHref: _chunkX2M4XN4Vcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
1853
1880
|
farmConfig.root,
|
|
1854
1881
|
farmConfig.srcDir
|
|
1855
1882
|
),
|
|
1856
1883
|
isPathGuarded: isFarmDocsPathGuarded
|
|
1857
1884
|
}) : null;
|
|
1858
1885
|
const wrapFarmDocsResponseWithLayouts = async (request, response) => {
|
|
1859
|
-
if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access',
|
|
1886
|
+
if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _124 => _124.headers, 'access', _125 => _125.get, 'call', _126 => _126("content-type"), 'optionalAccess', _127 => _127.toLowerCase, 'call', _128 => _128(), 'access', _129 => _129.includes, 'call', _130 => _130("text/html")])) {
|
|
1860
1887
|
return response;
|
|
1861
1888
|
}
|
|
1862
1889
|
const pathname = new URL(request.url).pathname;
|
|
1863
1890
|
const matchedRoute = routeManager.matchRoute(pathname);
|
|
1864
1891
|
const layoutEntries = matchedRoute.layouts.map((layout) => ({
|
|
1865
1892
|
...layout,
|
|
1866
|
-
metadata:
|
|
1893
|
+
metadata: _chunkX2M4XN4Vcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
|
|
1867
1894
|
}));
|
|
1868
1895
|
if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
|
|
1869
1896
|
return response;
|
|
@@ -1877,7 +1904,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1877
1904
|
headers: response.headers
|
|
1878
1905
|
});
|
|
1879
1906
|
}
|
|
1880
|
-
const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
1907
|
+
const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _131 => _131.getConfig, 'call', _132 => _132()]), () => ( options))).renderer);
|
|
1881
1908
|
const [rendererRuntime, layoutModules] = await Promise.all([
|
|
1882
1909
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
|
|
1883
1910
|
Promise.all(
|
|
@@ -1906,7 +1933,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1906
1933
|
])
|
|
1907
1934
|
);
|
|
1908
1935
|
const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
|
|
1909
|
-
const pageModulePath = _optionalChain([matchedRoute, 'access',
|
|
1936
|
+
const pageModulePath = _optionalChain([matchedRoute, 'access', _133 => _133.route, 'optionalAccess', _134 => _134.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
|
|
1910
1937
|
const bootstrapScript = `<script>
|
|
1911
1938
|
window.__FARM_PROPS__ = ${inlineValue({ params })};
|
|
1912
1939
|
window.__FARM_ROUTE_SLOTS__ = [];
|
|
@@ -2002,7 +2029,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2002
2029
|
}
|
|
2003
2030
|
},
|
|
2004
2031
|
(request) => {
|
|
2005
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2032
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _135 => _135.getConfig, 'call', _136 => _136()]), () => ( options));
|
|
2006
2033
|
const currentServerConfig = _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2007
2034
|
return _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, request, {
|
|
2008
2035
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -2013,7 +2040,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2013
2040
|
withAPIRequestTracing(async (req, res, next) => {
|
|
2014
2041
|
const requestUrl = req.url || "/";
|
|
2015
2042
|
const requestMethod = req.method || "GET";
|
|
2016
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2043
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _137 => _137.getConfig, 'call', _138 => _138()]), () => ( options));
|
|
2017
2044
|
const currentServerConfig = _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2018
2045
|
const parsedRequestUrl = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
2019
2046
|
trustProxy: currentServerConfig.trustProxy
|
|
@@ -2025,7 +2052,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2025
2052
|
createRequestFromNodeRequest(req, new URL(fullUrl))
|
|
2026
2053
|
);
|
|
2027
2054
|
if (imageResponse) {
|
|
2028
|
-
await
|
|
2055
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, imageResponse);
|
|
2029
2056
|
return;
|
|
2030
2057
|
}
|
|
2031
2058
|
}
|
|
@@ -2081,7 +2108,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2081
2108
|
openapi: options.openapi
|
|
2082
2109
|
},
|
|
2083
2110
|
workflows: discoveredWorkflows,
|
|
2084
|
-
plugins: _optionalChain([pm, 'optionalAccess',
|
|
2111
|
+
plugins: _optionalChain([pm, 'optionalAccess', _139 => _139.getSortedPlugins, 'call', _140 => _140()])
|
|
2085
2112
|
});
|
|
2086
2113
|
res.statusCode = 200;
|
|
2087
2114
|
res.setHeader(
|
|
@@ -2104,7 +2131,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2104
2131
|
return;
|
|
2105
2132
|
}
|
|
2106
2133
|
const runAppMiddlewareForContentRoute = async () => {
|
|
2107
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
2134
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _141 => _141.hasMiddleware, 'call', _142 => _142()])) return false;
|
|
2108
2135
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
2109
2136
|
return runFarmMiddlewareWithNavigation(
|
|
2110
2137
|
farmApp.getServerRenderer(),
|
|
@@ -2120,16 +2147,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2120
2147
|
label
|
|
2121
2148
|
} = {}) => {
|
|
2122
2149
|
const discard = async () => {
|
|
2123
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
2150
|
+
await _optionalChain([computed, 'optionalAccess', _143 => _143.body, 'optionalAccess', _144 => _144.cancel, 'call', _145 => _145(), 'access', _146 => _146.catch, 'call', _147 => _147(() => {
|
|
2124
2151
|
})]);
|
|
2125
2152
|
};
|
|
2126
2153
|
let runtimeSession2;
|
|
2127
|
-
if (_optionalChain([pm, 'optionalAccess',
|
|
2154
|
+
if (_optionalChain([pm, 'optionalAccess', _148 => _148.hasRuntimeRequestHooks, 'call', _149 => _149()])) {
|
|
2128
2155
|
try {
|
|
2129
2156
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
2130
|
-
const route =
|
|
2157
|
+
const route = _chunkRMPNYUGTcjs.setFarmRouteLabel.call(void 0,
|
|
2131
2158
|
{ pathname: requestPathname },
|
|
2132
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
2159
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkRMPNYUGTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
2133
2160
|
);
|
|
2134
2161
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
2135
2162
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -2145,7 +2172,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2145
2172
|
}
|
|
2146
2173
|
if (runtimeSession2.response) {
|
|
2147
2174
|
await discard();
|
|
2148
|
-
await
|
|
2175
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0,
|
|
2149
2176
|
res,
|
|
2150
2177
|
await pm.endRuntimeRequest(runtimeSession2, runtimeSession2.response)
|
|
2151
2178
|
);
|
|
@@ -2161,20 +2188,20 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2161
2188
|
let response;
|
|
2162
2189
|
try {
|
|
2163
2190
|
response = await respond(
|
|
2164
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
2191
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _150 => _150.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
2165
2192
|
);
|
|
2166
2193
|
} catch (error) {
|
|
2167
2194
|
if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
|
|
2168
2195
|
throw error;
|
|
2169
2196
|
}
|
|
2170
2197
|
if (!response) return;
|
|
2171
|
-
await
|
|
2198
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0,
|
|
2172
2199
|
res,
|
|
2173
2200
|
runtimeSession2 ? await pm.endRuntimeRequest(runtimeSession2, response) : response
|
|
2174
2201
|
);
|
|
2175
2202
|
};
|
|
2176
2203
|
const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
2177
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
2204
|
+
if (openAPIManager && _optionalChain([options, 'access', _151 => _151.openapi, 'optionalAccess', _152 => _152.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
2178
2205
|
const specManager = openAPIManager;
|
|
2179
2206
|
await serveBuiltInRoute(async () => {
|
|
2180
2207
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -2194,7 +2221,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2194
2221
|
});
|
|
2195
2222
|
return;
|
|
2196
2223
|
}
|
|
2197
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
2224
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _153 => _153.openapi, 'optionalAccess', _154 => _154.route])) {
|
|
2198
2225
|
const docsManager = openAPIManager;
|
|
2199
2226
|
await serveBuiltInRoute(
|
|
2200
2227
|
async () => {
|
|
@@ -2205,20 +2232,20 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2205
2232
|
);
|
|
2206
2233
|
return;
|
|
2207
2234
|
}
|
|
2208
|
-
if (_optionalChain([options, 'access',
|
|
2235
|
+
if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.manifest]) !== false && _chunkRMPNYUGTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
2209
2236
|
await serveBuiltInRoute(async () => {
|
|
2210
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
2211
|
-
const manifest = await
|
|
2237
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkX2M4XN4Vcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
2238
|
+
const manifest = await _chunkRMPNYUGTcjs.createFarmAppManifestResponse.call(void 0,
|
|
2212
2239
|
new Request(parsedRequestUrl, {
|
|
2213
2240
|
method: requestMethod,
|
|
2214
2241
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
2215
2242
|
}),
|
|
2216
2243
|
{
|
|
2217
|
-
...
|
|
2244
|
+
..._chunkRMPNYUGTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
2218
2245
|
build: "development",
|
|
2219
2246
|
packages: farmAppPackages,
|
|
2220
2247
|
// Read again on each request; unchanged files come from a cache.
|
|
2221
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
2248
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _157 => _157.plugins, 'optionalAccess', _158 => _158.some, 'call', _159 => _159(({ name }) => name === "farm:webmcp")]) ? _chunkX2M4XN4Vcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
2222
2249
|
}),
|
|
2223
2250
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
2224
2251
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -2236,11 +2263,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2236
2263
|
});
|
|
2237
2264
|
return;
|
|
2238
2265
|
}
|
|
2239
|
-
if (_optionalChain([options, 'access',
|
|
2266
|
+
if (_optionalChain([options, 'access', _160 => _160.agent, 'optionalAccess', _161 => _161.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkRMPNYUGTcjs.FARM_API_CATALOG_PATH) {
|
|
2240
2267
|
await serveBuiltInRoute(
|
|
2241
|
-
() =>
|
|
2268
|
+
() => _chunkRMPNYUGTcjs.createFarmApiCatalogResponse.call(void 0,
|
|
2242
2269
|
requestMethod,
|
|
2243
|
-
|
|
2270
|
+
_chunkRMPNYUGTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
2244
2271
|
new Request(parsedRequestUrl, {
|
|
2245
2272
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
2246
2273
|
})
|
|
@@ -2248,8 +2275,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2248
2275
|
);
|
|
2249
2276
|
return;
|
|
2250
2277
|
}
|
|
2251
|
-
if (_optionalChain([options, 'access',
|
|
2252
|
-
const aiCatalog =
|
|
2278
|
+
if (_optionalChain([options, 'access', _162 => _162.agent, 'optionalAccess', _163 => _163.aiCatalog]) !== false) {
|
|
2279
|
+
const aiCatalog = _chunkRMPNYUGTcjs.createFarmAiCatalogResponse.call(void 0,
|
|
2253
2280
|
new Request(parsedRequestUrl, {
|
|
2254
2281
|
method: requestMethod,
|
|
2255
2282
|
headers: {
|
|
@@ -2293,18 +2320,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2293
2320
|
{
|
|
2294
2321
|
kind: "docs",
|
|
2295
2322
|
computed: docsResponse,
|
|
2296
|
-
label:
|
|
2323
|
+
label: _chunkRMPNYUGTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
2297
2324
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
2298
|
-
{
|
|
2325
|
+
{
|
|
2326
|
+
path: _optionalChain([farmConfig, 'access', _164 => _164.docs, 'optionalAccess', _165 => _165.entry]) || "/docs",
|
|
2327
|
+
roots: _optionalChain([farmConfig, 'access', _166 => _166.docs, 'optionalAccess', _167 => _167.roots, 'optionalAccess', _168 => _168.map, 'call', _169 => _169((root) => root.entry)])
|
|
2328
|
+
}
|
|
2299
2329
|
)
|
|
2300
2330
|
}
|
|
2301
2331
|
);
|
|
2302
2332
|
return;
|
|
2303
2333
|
}
|
|
2304
2334
|
}
|
|
2305
|
-
const markdownRouteLabel = () =>
|
|
2335
|
+
const markdownRouteLabel = () => _chunkRMPNYUGTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
2306
2336
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
2307
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
2337
|
+
(page) => _optionalChain([farmApp, 'access', _170 => _170.getRouteManager, 'call', _171 => _171(), 'access', _172 => _172.matchRoute, 'call', _173 => _173(page), 'access', _174 => _174.route, 'optionalAccess', _175 => _175.pattern])
|
|
2308
2338
|
);
|
|
2309
2339
|
const markdownSourceResponse = viteModuleRequest ? null : await _chunkJATTVAHAcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
2310
2340
|
request: new Request(fullUrl, {
|
|
@@ -2314,7 +2344,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2314
2344
|
config: farmApp.getConfig().mdx,
|
|
2315
2345
|
resolveSource: async (pathname2) => {
|
|
2316
2346
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
2317
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
2347
|
+
const sourcePath = _optionalChain([match, 'access', _176 => _176.route, 'optionalAccess', _177 => _177.markdownSourcePath]) || (match.route && _chunkJATTVAHAcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
2318
2348
|
if (!sourcePath) {
|
|
2319
2349
|
return null;
|
|
2320
2350
|
}
|
|
@@ -2422,7 +2452,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2422
2452
|
} catch (error) {
|
|
2423
2453
|
const response = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
2424
2454
|
if (!response) throw error;
|
|
2425
|
-
await
|
|
2455
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
|
|
2426
2456
|
return;
|
|
2427
2457
|
}
|
|
2428
2458
|
const workflowResponse = await workflowHandler(
|
|
@@ -2434,13 +2464,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2434
2464
|
})
|
|
2435
2465
|
);
|
|
2436
2466
|
if (workflowResponse) {
|
|
2437
|
-
await
|
|
2467
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, workflowResponse);
|
|
2438
2468
|
return;
|
|
2439
2469
|
}
|
|
2440
2470
|
}
|
|
2441
2471
|
const configuredIntegrations = currentConfig.integrations;
|
|
2442
2472
|
const tryConfiguredIntegrationRoute = async () => {
|
|
2443
|
-
const matchedRoute =
|
|
2473
|
+
const matchedRoute = _chunkCECUDGXQcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
2444
2474
|
pathname: requestPathname,
|
|
2445
2475
|
method: requestMethod
|
|
2446
2476
|
});
|
|
@@ -2453,8 +2483,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2453
2483
|
await pm.runHookParallelFiltered(
|
|
2454
2484
|
"beforeRequest",
|
|
2455
2485
|
(plugin) => {
|
|
2456
|
-
const owner =
|
|
2457
|
-
return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess',
|
|
2486
|
+
const owner = _chunkCECUDGXQcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
|
|
2487
|
+
return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _178 => _178.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
2458
2488
|
},
|
|
2459
2489
|
req,
|
|
2460
2490
|
res
|
|
@@ -2482,7 +2512,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2482
2512
|
signal: _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
2483
2513
|
});
|
|
2484
2514
|
const dispatchIntegration = async (request) => {
|
|
2485
|
-
const result = await
|
|
2515
|
+
const result = await _chunkCECUDGXQcjs.dispatchIntegrationRequest.call(void 0,
|
|
2486
2516
|
{
|
|
2487
2517
|
integration: matchedRoute.integration,
|
|
2488
2518
|
config: currentConfig,
|
|
@@ -2490,7 +2520,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2490
2520
|
isProd: false
|
|
2491
2521
|
},
|
|
2492
2522
|
request,
|
|
2493
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
2523
|
+
{ clientAddress: _optionalChain([req, 'access', _179 => _179.socket, 'optionalAccess', _180 => _180.remoteAddress]) }
|
|
2494
2524
|
);
|
|
2495
2525
|
if (!result) {
|
|
2496
2526
|
throw new Error(`Matched integration route did not return a response`);
|
|
@@ -2509,12 +2539,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2509
2539
|
}
|
|
2510
2540
|
const duration = Date.now() - startTime2;
|
|
2511
2541
|
logResponse(requestMethod, requestUrl, response.status, duration, "API");
|
|
2512
|
-
await
|
|
2542
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
|
|
2513
2543
|
return true;
|
|
2514
2544
|
} catch (error) {
|
|
2515
2545
|
const bodyErrorResponse = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
2516
2546
|
if (bodyErrorResponse) {
|
|
2517
|
-
await
|
|
2547
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
2518
2548
|
return true;
|
|
2519
2549
|
}
|
|
2520
2550
|
const duration = Date.now() - startTime2;
|
|
@@ -2554,7 +2584,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2554
2584
|
trustProxy: currentServerConfig.trustProxy
|
|
2555
2585
|
}).pathname;
|
|
2556
2586
|
const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
|
|
2557
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2587
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _181 => _181.isFarmDocsAPIRequest, 'call', _182 => _182(requestPathname)])
|
|
2558
2588
|
);
|
|
2559
2589
|
try {
|
|
2560
2590
|
if (pm) {
|
|
@@ -2569,7 +2599,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2569
2599
|
await pm.runHookParallel("beforeRequest", req, res);
|
|
2570
2600
|
}
|
|
2571
2601
|
}
|
|
2572
|
-
if (res.writableEnded) {
|
|
2602
|
+
if (res.writableEnded || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
|
|
2573
2603
|
const duration2 = Date.now() - startTime2;
|
|
2574
2604
|
logResponse(method2, urlPath2, res.statusCode || 200, duration2, "API");
|
|
2575
2605
|
return;
|
|
@@ -2598,7 +2628,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2598
2628
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
2599
2629
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
2600
2630
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
2601
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
2631
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _183 => _183.route, 'access', _184 => _184.path]) || urlPath2;
|
|
2602
2632
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
2603
2633
|
type: "route.matched",
|
|
2604
2634
|
pathname: pathname2,
|
|
@@ -2659,7 +2689,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2659
2689
|
durationMs: duration2
|
|
2660
2690
|
});
|
|
2661
2691
|
logResponse(method2, urlPath2, handledResponse.status, duration2, "API");
|
|
2662
|
-
await
|
|
2692
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, handledResponse);
|
|
2663
2693
|
return;
|
|
2664
2694
|
} catch (error) {
|
|
2665
2695
|
const duration2 = Date.now() - startTime2;
|
|
@@ -2674,7 +2704,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2674
2704
|
const bodyErrorResponse = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
2675
2705
|
if (bodyErrorResponse) {
|
|
2676
2706
|
logResponse(method2, urlPath2, bodyErrorResponse.status, duration2, "API");
|
|
2677
|
-
await
|
|
2707
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
2678
2708
|
return;
|
|
2679
2709
|
}
|
|
2680
2710
|
await emitPluginError("api-handler", error, {
|
|
@@ -2688,7 +2718,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2688
2718
|
return;
|
|
2689
2719
|
}
|
|
2690
2720
|
}
|
|
2691
|
-
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2721
|
+
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _185 => _185.isFarmDocsAPIRequest, 'call', _186 => _186(pathname2)])) {
|
|
2692
2722
|
try {
|
|
2693
2723
|
const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
|
|
2694
2724
|
const headers = new Headers();
|
|
@@ -2726,23 +2756,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2726
2756
|
};
|
|
2727
2757
|
const docsResponse = pm ? await pm.runRuntimeRequest(request, invokeDocsAPIHandler, {
|
|
2728
2758
|
kind: "docs",
|
|
2729
|
-
route:
|
|
2759
|
+
route: _chunkRMPNYUGTcjs.setFarmRouteLabel.call(void 0,
|
|
2730
2760
|
{ pathname: pathname2, pattern: apiLifecyclePayload.routePath },
|
|
2731
|
-
|
|
2732
|
-
path: _optionalChain([farmConfig, 'access',
|
|
2761
|
+
_chunkRMPNYUGTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
2762
|
+
path: _optionalChain([farmConfig, 'access', _187 => _187.docs, 'optionalAccess', _188 => _188.entry]) || "/docs",
|
|
2763
|
+
roots: _optionalChain([farmConfig, 'access', _189 => _189.docs, 'optionalAccess', _190 => _190.roots, 'optionalAccess', _191 => _191.map, 'call', _192 => _192((root) => root.entry)])
|
|
2733
2764
|
})
|
|
2734
2765
|
)
|
|
2735
2766
|
}) : await invokeDocsAPIHandler(request);
|
|
2736
2767
|
if (docsResponse) {
|
|
2737
2768
|
const duration2 = Date.now() - startTime2;
|
|
2738
2769
|
logResponse(method2, urlPath2, docsResponse.status, duration2, "API");
|
|
2739
|
-
await
|
|
2770
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, docsResponse);
|
|
2740
2771
|
return;
|
|
2741
2772
|
}
|
|
2742
2773
|
} catch (error) {
|
|
2743
2774
|
const bodyErrorResponse = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
2744
2775
|
if (bodyErrorResponse) {
|
|
2745
|
-
await
|
|
2776
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
2746
2777
|
return;
|
|
2747
2778
|
}
|
|
2748
2779
|
await emitPluginError("docs-api-handler", error, {
|
|
@@ -2763,18 +2794,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2763
2794
|
res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
|
|
2764
2795
|
return;
|
|
2765
2796
|
}
|
|
2766
|
-
if (_optionalChain([req, 'access',
|
|
2797
|
+
if (_optionalChain([req, 'access', _193 => _193.url, 'optionalAccess', _194 => _194.startsWith, 'call', _195 => _195("/@")]) || _optionalChain([req, 'access', _196 => _196.url, 'optionalAccess', _197 => _197.startsWith, 'call', _198 => _198("/node_modules")])) {
|
|
2767
2798
|
return next();
|
|
2768
2799
|
}
|
|
2769
2800
|
if (shouldBypassFarmRouterForDottedPath(
|
|
2770
2801
|
requestPathname,
|
|
2771
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
2802
|
+
_optionalChain([farmApp, 'optionalAccess', _199 => _199.getRouteManager, 'call', _200 => _200()]),
|
|
2772
2803
|
[server.config.publicDir, server.config.root],
|
|
2773
2804
|
farmAgentGeneratedPaths(farmConfig)
|
|
2774
2805
|
)) {
|
|
2775
2806
|
return next();
|
|
2776
2807
|
}
|
|
2777
|
-
if (_optionalChain([req, 'access',
|
|
2808
|
+
if (_optionalChain([req, 'access', _201 => _201.url, 'optionalAccess', _202 => _202.startsWith, 'call', _203 => _203("/__farm/page-data")])) {
|
|
2778
2809
|
const urlObj = parsedRequestUrl;
|
|
2779
2810
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
2780
2811
|
try {
|
|
@@ -2788,7 +2819,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2788
2819
|
farmConfig.deploymentId
|
|
2789
2820
|
);
|
|
2790
2821
|
if (deploymentMismatch) {
|
|
2791
|
-
await
|
|
2822
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0,
|
|
2792
2823
|
res,
|
|
2793
2824
|
_chunkE552H232cjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch)
|
|
2794
2825
|
);
|
|
@@ -2802,7 +2833,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2802
2833
|
});
|
|
2803
2834
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
2804
2835
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
2805
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
2836
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _204 => _204.hasMiddleware, 'call', _205 => _205()])) {
|
|
2806
2837
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
2807
2838
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
2808
2839
|
farmApp.getServerRenderer(),
|
|
@@ -2830,10 +2861,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2830
2861
|
if (pm) {
|
|
2831
2862
|
await pm.runHookParallel("afterRouteMatch", {
|
|
2832
2863
|
pathname: targetPath,
|
|
2833
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
2834
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
2835
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
2836
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
2864
|
+
matched: !!_optionalChain([match, 'optionalAccess', _206 => _206.route]),
|
|
2865
|
+
routePattern: _optionalChain([match, 'optionalAccess', _207 => _207.route, 'optionalAccess', _208 => _208.pattern]) || null,
|
|
2866
|
+
params: _optionalChain([match, 'optionalAccess', _209 => _209.params]) || {},
|
|
2867
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _210 => _210.layouts]) || []).map((l) => l.pattern)
|
|
2837
2868
|
});
|
|
2838
2869
|
}
|
|
2839
2870
|
if (!match) {
|
|
@@ -2856,7 +2887,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2856
2887
|
);
|
|
2857
2888
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
2858
2889
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
2859
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
2890
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkX2M4XN4Vcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
2860
2891
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
2861
2892
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
2862
2893
|
let mergedMetadata = {};
|
|
@@ -2864,7 +2895,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2864
2895
|
layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
|
|
2865
2896
|
);
|
|
2866
2897
|
const layoutHydrationMetadata = layouts.map(
|
|
2867
|
-
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => (
|
|
2898
|
+
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkX2M4XN4Vcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
|
|
2868
2899
|
);
|
|
2869
2900
|
const shouldHydrateLayout = layoutHydrationMetadata.some(
|
|
2870
2901
|
(metadata) => metadata.shouldHydrate
|
|
@@ -2928,7 +2959,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2928
2959
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
2929
2960
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
2930
2961
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
2931
|
-
), () => (
|
|
2962
|
+
), () => ( _chunkX2M4XN4Vcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
2932
2963
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
2933
2964
|
request: targetRequest,
|
|
2934
2965
|
params: slot.params,
|
|
@@ -2978,7 +3009,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2978
3009
|
pageShouldHydrate: shouldHydrate,
|
|
2979
3010
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
2980
3011
|
islandStrategy: hydrationIslandStrategy,
|
|
2981
|
-
rendering:
|
|
3012
|
+
rendering: _chunkUQHIWZZ6cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
2982
3013
|
});
|
|
2983
3014
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
2984
3015
|
const layoutStartIndex = _chunk76GHW3WIcjs.getSharedLayoutPrefixLength.call(void 0,
|
|
@@ -2992,7 +3023,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2992
3023
|
middlewareContext,
|
|
2993
3024
|
() => renderer.renderNavigationFragment({
|
|
2994
3025
|
PageComponent: routeModule.default,
|
|
2995
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
3026
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _211 => _211.default]),
|
|
2996
3027
|
pageProps: routeProps,
|
|
2997
3028
|
params,
|
|
2998
3029
|
layouts: layouts.map((layout, index) => ({
|
|
@@ -3056,7 +3087,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3056
3087
|
} : void 0,
|
|
3057
3088
|
i18n: _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, )
|
|
3058
3089
|
};
|
|
3059
|
-
await
|
|
3090
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0,
|
|
3060
3091
|
res,
|
|
3061
3092
|
_chunkXQSYOVCWcjs.createDeferredDataResponse.call(void 0,
|
|
3062
3093
|
pageData,
|
|
@@ -3100,18 +3131,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3100
3131
|
trustProxy: currentServerConfig.trustProxy
|
|
3101
3132
|
}).pathname;
|
|
3102
3133
|
const routeManager2 = farmApp.getRouteManager();
|
|
3103
|
-
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3104
|
-
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3105
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3106
|
-
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3107
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3108
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3109
|
-
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3110
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3134
|
+
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _212 => _212.hasHook, 'call', _213 => _213("beforeRouteMatch")]), () => ( false));
|
|
3135
|
+
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _214 => _214.hasHook, 'call', _215 => _215("afterRouteMatch")]), () => ( false));
|
|
3136
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _216 => _216.hasHook, 'call', _217 => _217("beforeRequest")]), () => ( false));
|
|
3137
|
+
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _218 => _218.hasHook, 'call', _219 => _219("beforeRender")]), () => ( false));
|
|
3138
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _220 => _220.hasHook, 'call', _221 => _221("afterResponse")]), () => ( false));
|
|
3139
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _222 => _222.hasHook, 'call', _223 => _223("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _224 => _224.hasHook, 'call', _225 => _225("afterRender")]), () => ( false)));
|
|
3140
|
+
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _226 => _226.hasRuntimeRequestHooks, 'call', _227 => _227()]), () => ( false));
|
|
3141
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _228 => _228.hasRuntimeHook, 'call', _229 => _229("after")]), () => ( false));
|
|
3111
3142
|
const requestedMatch = routeManager2.matchRoute(requestedPathname);
|
|
3112
3143
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
3113
3144
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
3114
|
-
const mcpLabel =
|
|
3145
|
+
const mcpLabel = _chunkRMPNYUGTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
3115
3146
|
if (mcpLabel) return mcpLabel;
|
|
3116
3147
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
3117
3148
|
return routePathname === _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -3123,13 +3154,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3123
3154
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
3124
3155
|
{
|
|
3125
3156
|
kind: "page",
|
|
3126
|
-
route:
|
|
3157
|
+
route: _chunkRMPNYUGTcjs.setFarmRouteLabel.call(void 0,
|
|
3127
3158
|
{
|
|
3128
3159
|
pathname: requestedPathname,
|
|
3129
|
-
pattern: _optionalChain([requestedMatch, 'optionalAccess',
|
|
3130
|
-
params: _optionalChain([requestedMatch, 'optionalAccess',
|
|
3160
|
+
pattern: _optionalChain([requestedMatch, 'optionalAccess', _230 => _230.route, 'optionalAccess', _231 => _231.pattern]) || null,
|
|
3161
|
+
params: _optionalChain([requestedMatch, 'optionalAccess', _232 => _232.params]) || {}
|
|
3131
3162
|
},
|
|
3132
|
-
_optionalChain([requestedMatch, 'optionalAccess',
|
|
3163
|
+
_optionalChain([requestedMatch, 'optionalAccess', _233 => _233.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
|
|
3133
3164
|
)
|
|
3134
3165
|
}
|
|
3135
3166
|
);
|
|
@@ -3140,7 +3171,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3140
3171
|
runtimeSession,
|
|
3141
3172
|
runtimeSession.response
|
|
3142
3173
|
);
|
|
3143
|
-
await
|
|
3174
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, response);
|
|
3144
3175
|
return;
|
|
3145
3176
|
}
|
|
3146
3177
|
} catch (error) {
|
|
@@ -3162,17 +3193,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3162
3193
|
if (pm && hasAfterRouteMatchHook) {
|
|
3163
3194
|
await pm.runHookParallel("afterRouteMatch", {
|
|
3164
3195
|
pathname,
|
|
3165
|
-
matched: !!_optionalChain([routeMatch, 'optionalAccess',
|
|
3166
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
3167
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
3168
|
-
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess',
|
|
3196
|
+
matched: !!_optionalChain([routeMatch, 'optionalAccess', _234 => _234.route]),
|
|
3197
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _235 => _235.route, 'optionalAccess', _236 => _236.pattern]) || null,
|
|
3198
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _237 => _237.params]) || {},
|
|
3199
|
+
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _238 => _238.layouts]) || []).map((l) => l.pattern)
|
|
3169
3200
|
});
|
|
3170
3201
|
}
|
|
3171
3202
|
const renderPayload = {
|
|
3172
3203
|
pathname,
|
|
3173
3204
|
method,
|
|
3174
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
3175
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
3205
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _239 => _239.route, 'optionalAccess', _240 => _240.pattern]) || null,
|
|
3206
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _241 => _241.params]) || {}
|
|
3176
3207
|
};
|
|
3177
3208
|
const shouldInterceptResponse = Boolean(
|
|
3178
3209
|
pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
|
|
@@ -3194,7 +3225,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3194
3225
|
emitError: (error) => emitPluginError("response-end", error, { pathname })
|
|
3195
3226
|
}) : void 0;
|
|
3196
3227
|
try {
|
|
3197
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
3228
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _242 => _242.hasMiddleware, 'call', _243 => _243()])) {
|
|
3198
3229
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
3199
3230
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
3200
3231
|
farmApp.getServerRenderer(),
|
|
@@ -3204,7 +3235,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3204
3235
|
() => middlewareManager.execute(req, res)
|
|
3205
3236
|
);
|
|
3206
3237
|
if (handled) {
|
|
3207
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
3238
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _244 => _244.isEnded, 'call', _245 => _245()])) {
|
|
3208
3239
|
const duration = Date.now() - startTime;
|
|
3209
3240
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
3210
3241
|
}
|
|
@@ -3217,14 +3248,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3217
3248
|
req.url || "/",
|
|
3218
3249
|
`http://${req.headers.host || "localhost:3000"}`
|
|
3219
3250
|
).pathname;
|
|
3220
|
-
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access',
|
|
3251
|
+
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _246 => _246.matchRoute, 'call', _247 => _247(currentPathname), 'optionalAccess', _248 => _248.route]));
|
|
3221
3252
|
await pm.runHookParallelFiltered(
|
|
3222
3253
|
"beforeRequest",
|
|
3223
3254
|
(plugin) => !hasLocalPageRoute || plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
3224
3255
|
req,
|
|
3225
3256
|
res
|
|
3226
3257
|
);
|
|
3227
|
-
if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access',
|
|
3258
|
+
if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _249 => _249.url, 'optionalAccess', _250 => _250.startsWith, 'call', _251 => _251("/")]) && !res.writableEnded) {
|
|
3228
3259
|
const destinationUrl = new URL(req.url, fullUrl);
|
|
3229
3260
|
const destinationMatch = routeManager2.matchRoute(destinationUrl.pathname);
|
|
3230
3261
|
const guarded = await pm.runRuntimeBeforeForRewrite(
|
|
@@ -3234,21 +3265,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3234
3265
|
kind: "page",
|
|
3235
3266
|
route: {
|
|
3236
3267
|
pathname: destinationUrl.pathname,
|
|
3237
|
-
pattern: _optionalChain([destinationMatch, 'optionalAccess',
|
|
3238
|
-
params: _optionalChain([destinationMatch, 'optionalAccess',
|
|
3268
|
+
pattern: _optionalChain([destinationMatch, 'optionalAccess', _252 => _252.route, 'optionalAccess', _253 => _253.pattern]) || null,
|
|
3269
|
+
params: _optionalChain([destinationMatch, 'optionalAccess', _254 => _254.params]) || {}
|
|
3239
3270
|
}
|
|
3240
3271
|
}
|
|
3241
3272
|
);
|
|
3242
3273
|
if (guarded instanceof Response) {
|
|
3243
|
-
await
|
|
3274
|
+
await _chunkYIHRZBD7cjs.sendWebResponse.call(void 0, res, guarded);
|
|
3244
3275
|
} else {
|
|
3245
3276
|
pm.copyRequestContext(guarded, req);
|
|
3246
3277
|
applyWebRequestToNodeRequest(guarded, req);
|
|
3247
3278
|
}
|
|
3248
3279
|
}
|
|
3249
3280
|
}
|
|
3250
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
3251
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
3281
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _255 => _255.isEnded, 'call', _256 => _256()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
|
|
3282
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _257 => _257.isEnded, 'call', _258 => _258()])) {
|
|
3252
3283
|
const duration = Date.now() - startTime;
|
|
3253
3284
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
3254
3285
|
}
|
|
@@ -3312,8 +3343,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3312
3343
|
if (imageModule) return imageModule;
|
|
3313
3344
|
}
|
|
3314
3345
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
3315
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
3316
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
3346
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _259 => _259.getConfig, 'call', _260 => _260(), 'access', _261 => _261.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
3347
|
+
const root = _optionalChain([server, 'optionalAccess', _262 => _262.config, 'access', _263 => _263.root]) || options.root;
|
|
3317
3348
|
if (isClientEnvironment(this, loadOptions)) {
|
|
3318
3349
|
return generateProgrammaticClientRouteModuleForId(
|
|
3319
3350
|
id,
|
|
@@ -3326,65 +3357,65 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3326
3357
|
return generateProgrammaticRouteModule(id, root, renderer);
|
|
3327
3358
|
}
|
|
3328
3359
|
if (isFarmClientVirtualId(id)) {
|
|
3329
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
3330
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3331
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3332
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3333
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3360
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _264 => _264.getConfig, 'call', _265 => _265()]);
|
|
3361
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _266 => _266.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
3362
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _267 => _267.integrations]) || options.integrations;
|
|
3363
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _268 => _268.root]) || _optionalChain([server, 'optionalAccess', _269 => _269.config, 'access', _270 => _270.root]) || process.cwd();
|
|
3364
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _271 => _271.docs]);
|
|
3334
3365
|
const adapterOwnsDocsRuntime = Boolean(
|
|
3335
|
-
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess',
|
|
3366
|
+
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _272 => _272.adapter, 'optionalAccess', _273 => _273.server]) && docs.adapter.react
|
|
3336
3367
|
);
|
|
3337
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3368
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _274 => _274.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
3338
3369
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
3339
|
-
_optionalChain([docs, 'optionalAccess',
|
|
3340
|
-
_optionalChain([docs, 'optionalAccess',
|
|
3370
|
+
_optionalChain([docs, 'optionalAccess', _275 => _275.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
3371
|
+
_optionalChain([docs, 'optionalAccess', _276 => _276.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
3341
3372
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
3342
3373
|
]);
|
|
3343
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
3374
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _277 => _277.isFarmDocsSearchEnabled, 'call', _278 => _278(docs)]), () => ( false));
|
|
3344
3375
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
3345
3376
|
docsSearchEnabled,
|
|
3346
3377
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
3347
3378
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
3348
3379
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
3349
3380
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkBPNOYILCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
3350
|
-
const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ?
|
|
3351
|
-
const isolatedHydrationMode =
|
|
3352
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3381
|
+
const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
3382
|
+
const isolatedHydrationMode = _chunkX2M4XN4Vcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
3383
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _279 => _279.experimental, 'optionalAccess', _280 => _280.isolatedClientHydration]),
|
|
3353
3384
|
{
|
|
3354
|
-
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3385
|
+
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _281 => _281.experimental, 'optionalAccess', _282 => _282.serverComponents])) === "rsc",
|
|
3355
3386
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
3356
3387
|
}
|
|
3357
3388
|
);
|
|
3358
3389
|
return generateClientCode(
|
|
3359
3390
|
integrationProviders,
|
|
3360
3391
|
[
|
|
3361
|
-
...
|
|
3362
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
3392
|
+
..._chunkCECUDGXQcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
3393
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _283 => _283.getFarmDocsDocumentNavigationMatchers, 'call', _284 => _284(docs)]), () => ( []))
|
|
3363
3394
|
],
|
|
3364
3395
|
generatedDocsSearchRuntime,
|
|
3365
3396
|
`${generatedDevtoolsClientRuntime}
|
|
3366
3397
|
${generatedDevIndicatorsClientRuntime}`,
|
|
3367
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3398
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _285 => _285.plugins]) || [],
|
|
3368
3399
|
root,
|
|
3369
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3370
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3371
|
-
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess',
|
|
3400
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _286 => _286.srcDir]) || options.srcDir || "src",
|
|
3401
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _287 => _287.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
3402
|
+
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _288 => _288.adapter, 'optionalAccess', _289 => _289.react]) : void 0,
|
|
3372
3403
|
renderer,
|
|
3373
|
-
isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
3374
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3375
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3376
|
-
|
|
3377
|
-
|
|
3404
|
+
isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291(), 'access', _292 => _292.getIsolatedClientBoundaryModules, 'call', _293 => _293(root)])))), 'optionalAccess', _294 => _294.size]) > 0,
|
|
3405
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _295 => _295.trailingSlash]), () => ( false)),
|
|
3406
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _296 => _296.basePath]), () => ( "/")),
|
|
3407
|
+
_chunkX2M4XN4Vcjs.generateClientCachePersistenceCode.call(void 0,
|
|
3408
|
+
_chunkX2M4XN4Vcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _297 => _297.cache]))
|
|
3378
3409
|
),
|
|
3379
3410
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
3380
|
-
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3411
|
+
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _298 => _298.experimental, 'optionalAccess', _299 => _299.serverComponents])) === "islands"
|
|
3381
3412
|
);
|
|
3382
3413
|
}
|
|
3383
3414
|
if (id === "/@farm/server") {
|
|
3384
3415
|
return generateServerCode();
|
|
3385
3416
|
}
|
|
3386
3417
|
if (id === "/@farm/manifest") {
|
|
3387
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
3418
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _300 => _300.getRouteManager, 'call', _301 => _301()]);
|
|
3388
3419
|
if (!routeManager) {
|
|
3389
3420
|
return `
|
|
3390
3421
|
export const getManifest = () => ({
|
|
@@ -3397,9 +3428,9 @@ export const getManifest = () => ({
|
|
|
3397
3428
|
`;
|
|
3398
3429
|
}
|
|
3399
3430
|
const manifest = routeManager.generateClientManifest(server.config.root);
|
|
3400
|
-
const globalStylesheetHref =
|
|
3431
|
+
const globalStylesheetHref = _chunkX2M4XN4Vcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
3401
3432
|
server.config.root,
|
|
3402
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3433
|
+
_optionalChain([farmApp, 'optionalAccess', _302 => _302.getConfig, 'call', _303 => _303(), 'access', _304 => _304.srcDir])
|
|
3403
3434
|
);
|
|
3404
3435
|
const fullManifest = {
|
|
3405
3436
|
clientEntry: "/@farm/client.js",
|
|
@@ -3455,46 +3486,46 @@ export const manifest = getManifest();
|
|
|
3455
3486
|
}
|
|
3456
3487
|
},
|
|
3457
3488
|
async transform(code, id, transformOptions) {
|
|
3458
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3489
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _305 => _305.getConfig, 'call', _306 => _306()]), () => ( options));
|
|
3459
3490
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3460
3491
|
const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
3461
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
3492
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _307 => _307.ssr]) === true ? "rsc" : "client"
|
|
3462
3493
|
});
|
|
3463
3494
|
if (serverFns) {
|
|
3464
3495
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
3465
3496
|
code = serverFns.code;
|
|
3466
3497
|
}
|
|
3467
3498
|
}
|
|
3468
|
-
if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
3499
|
+
if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _308 => _308.experimental, 'optionalAccess', _309 => _309.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3469
3500
|
const file = id.split("?", 1)[0];
|
|
3470
3501
|
const actionModule = transformFarmFormActionModule({
|
|
3471
3502
|
code,
|
|
3472
3503
|
id,
|
|
3473
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
3474
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
3504
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _310 => _310.config, 'access', _311 => _311.root]) || process.cwd(),
|
|
3505
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _312 => _312.ssr]) === true,
|
|
3475
3506
|
// Parsed by file type: page components are TSX.
|
|
3476
3507
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program
|
|
3477
3508
|
});
|
|
3478
3509
|
if (actionModule) return { code: actionModule, map: null };
|
|
3479
3510
|
}
|
|
3480
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3481
|
-
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess',
|
|
3482
|
-
if (
|
|
3483
|
-
const redacted =
|
|
3511
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _313 => _313.ssr])) {
|
|
3512
|
+
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _314 => _314.getConfig, 'call', _315 => _315(), 'optionalAccess', _316 => _316.docs]));
|
|
3513
|
+
if (_chunkX2M4XN4Vcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
3514
|
+
const redacted = _chunkX2M4XN4Vcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
3484
3515
|
if (redacted !== null) return { code: redacted, map: null };
|
|
3485
3516
|
}
|
|
3486
3517
|
}
|
|
3487
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3488
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3489
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
3518
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _317 => _317.ssr])) {
|
|
3519
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options));
|
|
3520
|
+
if ((_optionalChain([currentConfig, 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
3490
3521
|
const violation = findClientServerFnViolation(code, id);
|
|
3491
3522
|
if (violation) {
|
|
3492
3523
|
this.error(formatServerFnBoundaryError(violation, id));
|
|
3493
3524
|
}
|
|
3494
3525
|
}
|
|
3495
3526
|
}
|
|
3496
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3497
|
-
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3527
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _322 => _322.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
3528
|
+
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _323 => _323.getConfig, 'call', _324 => _324()]), () => ( options)));
|
|
3498
3529
|
}
|
|
3499
3530
|
if (typeof imageImports.transform === "function") {
|
|
3500
3531
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -3509,13 +3540,13 @@ export const manifest = getManifest();
|
|
|
3509
3540
|
id,
|
|
3510
3541
|
transformOptions
|
|
3511
3542
|
);
|
|
3512
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
3543
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _325 => _325.code, 'optionalAccess', _326 => _326.toString, 'call', _327 => _327()]);
|
|
3513
3544
|
if (fontCode) {
|
|
3514
3545
|
transformedCode = fontCode;
|
|
3515
3546
|
transformed = true;
|
|
3516
3547
|
}
|
|
3517
3548
|
}
|
|
3518
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
3549
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _328 => _328.ssr]) && server) {
|
|
3519
3550
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
3520
3551
|
code: transformedCode,
|
|
3521
3552
|
id,
|
|
@@ -3527,28 +3558,28 @@ export const manifest = getManifest();
|
|
|
3527
3558
|
transformed = true;
|
|
3528
3559
|
}
|
|
3529
3560
|
}
|
|
3530
|
-
if (
|
|
3561
|
+
if (_chunkX2M4XN4Vcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
3531
3562
|
const clientBoundarySource = transformedCode;
|
|
3532
3563
|
const moduleInfo = this.getModuleInfo(id);
|
|
3533
3564
|
if (moduleInfo) {
|
|
3534
3565
|
moduleInfo.isClientComponent = true;
|
|
3535
3566
|
}
|
|
3536
|
-
transformedCode =
|
|
3567
|
+
transformedCode = _chunkX2M4XN4Vcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
3537
3568
|
transformed = true;
|
|
3538
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3569
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _329 => _329.getConfig, 'call', _330 => _330()]), () => ( options));
|
|
3539
3570
|
let isolatedModuleReference = null;
|
|
3540
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
3571
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _331 => _331.config, 'access', _332 => _332.root]) || process.cwd();
|
|
3541
3572
|
const cleanId = id.split("?", 1)[0];
|
|
3542
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
3543
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
3544
|
-
if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration &&
|
|
3573
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _333 => _333.getRouteManager, 'call', _334 => _334(), 'access', _335 => _335.getIsolatedClientBoundaryModules, 'call', _336 => _336(root)])));
|
|
3574
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _337 => _337.has, 'call', _338 => _338(path5.resolve(cleanId))]) === true;
|
|
3575
|
+
if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkX2M4XN4Vcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
|
|
3545
3576
|
isolatedModuleReference = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
3546
3577
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
3547
3578
|
code: transformedCode,
|
|
3548
3579
|
moduleReference: isolatedModuleReference,
|
|
3549
|
-
islandStrategy: _nullishCoalesce(
|
|
3580
|
+
islandStrategy: _nullishCoalesce(_chunkX2M4XN4Vcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
3550
3581
|
parse: (source) => this.parse(source),
|
|
3551
|
-
slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access',
|
|
3582
|
+
slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _339 => _339.experimental, 'optionalAccess', _340 => _340.serverComponents])) === "islands"
|
|
3552
3583
|
});
|
|
3553
3584
|
if (!transformedBoundary) {
|
|
3554
3585
|
this.error(
|
|
@@ -3578,7 +3609,7 @@ export const manifest = getManifest();
|
|
|
3578
3609
|
);
|
|
3579
3610
|
return;
|
|
3580
3611
|
}` : "";
|
|
3581
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
3612
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _341 => _341.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
3582
3613
|
if (import.meta.hot) {
|
|
3583
3614
|
import.meta.hot.accept((newModule) => {
|
|
3584
3615
|
${isolatedHmrUpdate}
|
|
@@ -3633,14 +3664,14 @@ if (import.meta.hot) {
|
|
|
3633
3664
|
}
|
|
3634
3665
|
_chunkVQJYGZNXcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
3635
3666
|
_chunkVQJYGZNXcjs.logger.info("Pre-rendering SSG pages...");
|
|
3636
|
-
const outDir = path5.join(_optionalChain([server, 'optionalAccess',
|
|
3667
|
+
const outDir = path5.join(_optionalChain([server, 'optionalAccess', _342 => _342.config, 'access', _343 => _343.root]) || process.cwd(), options.outDir || "dist");
|
|
3637
3668
|
const clientDir = path5.join(outDir, "client");
|
|
3638
3669
|
for (const page of ssgPages) {
|
|
3639
3670
|
try {
|
|
3640
3671
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
3641
3672
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
3642
3673
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
3643
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
3674
|
+
if (!_optionalChain([mod, 'optionalAccess', _344 => _344.default])) return;
|
|
3644
3675
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
3645
3676
|
const layoutModules = await Promise.all(
|
|
3646
3677
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -3672,7 +3703,7 @@ if (import.meta.hot) {
|
|
|
3672
3703
|
const i18nSnapshot = _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
3673
3704
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
3674
3705
|
const fullHtml = `<!DOCTYPE html>
|
|
3675
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
3706
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _345 => _345.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
3676
3707
|
<head>
|
|
3677
3708
|
<meta charset="utf-8">
|
|
3678
3709
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -3730,13 +3761,13 @@ if (import.meta.hot) {
|
|
|
3730
3761
|
});
|
|
3731
3762
|
}
|
|
3732
3763
|
}
|
|
3733
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
3764
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347()]);
|
|
3734
3765
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
3735
3766
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
3736
3767
|
(appDir) => normalizedFile.startsWith(`${_chunkVQJYGZNXcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
3737
3768
|
)) {
|
|
3738
3769
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
3739
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3770
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _348 => _348(`updated ${file}`)]);
|
|
3740
3771
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
3741
3772
|
return [];
|
|
3742
3773
|
}
|
|
@@ -3746,7 +3777,7 @@ if (import.meta.hot) {
|
|
|
3746
3777
|
for (const mod of modules) {
|
|
3747
3778
|
server2.moduleGraph.invalidateModule(mod);
|
|
3748
3779
|
}
|
|
3749
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3780
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _349 => _349(`updated ${file}`)]);
|
|
3750
3781
|
server2.ws.send({
|
|
3751
3782
|
type: "full-reload",
|
|
3752
3783
|
path: "*"
|
|
@@ -3759,7 +3790,7 @@ if (import.meta.hot) {
|
|
|
3759
3790
|
for (const mod of modules) {
|
|
3760
3791
|
server2.moduleGraph.invalidateModule(mod);
|
|
3761
3792
|
}
|
|
3762
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3793
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _350 => _350(`updated ${file}`)]);
|
|
3763
3794
|
server2.ws.send({
|
|
3764
3795
|
type: "full-reload",
|
|
3765
3796
|
path: "*"
|
|
@@ -3767,12 +3798,12 @@ if (import.meta.hot) {
|
|
|
3767
3798
|
return [];
|
|
3768
3799
|
}
|
|
3769
3800
|
if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
3770
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3801
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _351 => _351(`updated ${file}`)]);
|
|
3771
3802
|
}
|
|
3772
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
3773
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
3803
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _352 => _352.experimental, 'optionalAccess', _353 => _353.isolatedClientHydration]);
|
|
3804
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _354 => _354.getRouteManager, 'call', _355 => _355()]);
|
|
3774
3805
|
const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
|
|
3775
|
-
const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
3806
|
+
const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _356 => _356.renderer])) && planRouteManager !== void 0;
|
|
3776
3807
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
3777
3808
|
const routeManager = planRouteManager;
|
|
3778
3809
|
if (routeManager) {
|
|
@@ -3832,7 +3863,7 @@ if (import.meta.hot) {
|
|
|
3832
3863
|
}
|
|
3833
3864
|
return [];
|
|
3834
3865
|
}
|
|
3835
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3866
|
+
_optionalChain([farmApp, 'optionalAccess', _357 => _357.getRouteManager, 'call', _358 => _358(), 'access', _359 => _359.invalidateClientManifest, 'call', _360 => _360()]);
|
|
3836
3867
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
3837
3868
|
if (manifestModule) {
|
|
3838
3869
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -3888,12 +3919,12 @@ function isFarmClientVirtualId(id) {
|
|
|
3888
3919
|
}
|
|
3889
3920
|
function isClientEnvironment(context, loadOptions) {
|
|
3890
3921
|
const environment = context.environment;
|
|
3891
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
3892
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
3893
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
3922
|
+
if (_optionalChain([environment, 'optionalAccess', _361 => _361.config, 'optionalAccess', _362 => _362.consumer])) return environment.config.consumer === "client";
|
|
3923
|
+
if (_optionalChain([environment, 'optionalAccess', _363 => _363.name])) return environment.name === "client";
|
|
3924
|
+
return _optionalChain([loadOptions, 'optionalAccess', _364 => _364.ssr]) !== true;
|
|
3894
3925
|
}
|
|
3895
3926
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
3896
|
-
const graph = _optionalChain([server, 'access',
|
|
3927
|
+
const graph = _optionalChain([server, 'access', _365 => _365.environments, 'optionalAccess', _366 => _366.client, 'optionalAccess', _367 => _367.moduleGraph]);
|
|
3897
3928
|
if (!graph) return;
|
|
3898
3929
|
for (const [id, module] of graph.idToModuleMap) {
|
|
3899
3930
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
@@ -3903,19 +3934,19 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
3903
3934
|
const parsed = _chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
3904
3935
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
3905
3936
|
watchFile(routesFile);
|
|
3906
|
-
return
|
|
3937
|
+
return _chunkNK2VWS7Pcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
3907
3938
|
kind: parsed.kind,
|
|
3908
3939
|
routePath: parsed.routePath,
|
|
3909
3940
|
routesFile,
|
|
3910
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
3911
|
-
|
|
3941
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _368 => _368.routes, 'access', _369 => _369.get, 'call', _370 => _370(
|
|
3942
|
+
_chunkNK2VWS7Pcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
3912
3943
|
)]),
|
|
3913
3944
|
rendererServer: renderer.server,
|
|
3914
3945
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
3915
3946
|
});
|
|
3916
3947
|
}
|
|
3917
3948
|
function resolveRealModuleFile(filePath, root) {
|
|
3918
|
-
const resolved = _nullishCoalesce(
|
|
3949
|
+
const resolved = _nullishCoalesce(_chunkX2M4XN4Vcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
3919
3950
|
try {
|
|
3920
3951
|
return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
3921
3952
|
} catch (e15) {
|
|
@@ -4229,12 +4260,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
4229
4260
|
}
|
|
4230
4261
|
const schemas = routeModule.__farmRouteSchemas;
|
|
4231
4262
|
const params = parseRouteModuleSchema(
|
|
4232
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
4263
|
+
_optionalChain([schemas, 'optionalAccess', _371 => _371.params]),
|
|
4233
4264
|
input.props.params,
|
|
4234
4265
|
"params",
|
|
4235
4266
|
input.routePath
|
|
4236
4267
|
);
|
|
4237
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
4268
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _372 => _372.search]), input.search, "search", input.routePath);
|
|
4238
4269
|
return {
|
|
4239
4270
|
...input.props,
|
|
4240
4271
|
params,
|
|
@@ -4254,12 +4285,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
4254
4285
|
}
|
|
4255
4286
|
}
|
|
4256
4287
|
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkRD623KW4cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
4257
|
-
const providerClientCode =
|
|
4288
|
+
const providerClientCode = _chunkX2M4XN4Vcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
4258
4289
|
integrationProviders,
|
|
4259
4290
|
root,
|
|
4260
4291
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
4261
4292
|
);
|
|
4262
|
-
const clientPluginEntry =
|
|
4293
|
+
const clientPluginEntry = _chunkX2M4XN4Vcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
4263
4294
|
plugins,
|
|
4264
4295
|
root,
|
|
4265
4296
|
srcDir,
|
|
@@ -4307,7 +4338,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
4307
4338
|
return null;
|
|
4308
4339
|
}
|
|
4309
4340
|
}
|
|
4310
|
-
${islandValues ? `${
|
|
4341
|
+
${islandValues ? `${_chunkX2M4XN4Vcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
4311
4342
|
let farmLastRouteState = null;
|
|
4312
4343
|
|
|
4313
4344
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -5116,7 +5147,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
5116
5147
|
return loadedLayouts;
|
|
5117
5148
|
}
|
|
5118
5149
|
|
|
5119
|
-
${
|
|
5150
|
+
${_chunkX2M4XN4Vcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
5120
5151
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
5121
5152
|
let wrapped = element;
|
|
5122
5153
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -5711,7 +5742,10 @@ function farmIslandsOnlyDocument() {
|
|
|
5711
5742
|
const rootContainer = document.getElementById('root')
|
|
5712
5743
|
|
|
5713
5744
|
if (!rootContainer) {
|
|
5714
|
-
|
|
5745
|
+
// A document Farm did not render as a page (the docs renderer's) has nothing to hydrate.
|
|
5746
|
+
if (window.__FARM_PAGE_MODULE__ !== undefined) {
|
|
5747
|
+
console.error('[Farm.js] Root container not found')
|
|
5748
|
+
}
|
|
5715
5749
|
return
|
|
5716
5750
|
}
|
|
5717
5751
|
|
|
@@ -5969,7 +6003,7 @@ function generateClientManifest(bundle) {
|
|
|
5969
6003
|
async function defineConfig(config = {}) {
|
|
5970
6004
|
const tailwindVitePlugin = await _chunkLNM57D3Hcjs.loadTailwindVitePlugin.call(void 0, );
|
|
5971
6005
|
const appRoot = path5.resolve(config.root || process.cwd());
|
|
5972
|
-
if (_optionalChain([config, 'access',
|
|
6006
|
+
if (_optionalChain([config, 'access', _373 => _373.extends, 'optionalAccess', _374 => _374.length])) {
|
|
5973
6007
|
const { config: layeredConfig } = await import("./layers-DMRXRL7F.cjs").then(
|
|
5974
6008
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
5975
6009
|
root: appRoot,
|
|
@@ -5979,11 +6013,11 @@ async function defineConfig(config = {}) {
|
|
|
5979
6013
|
config = layeredConfig;
|
|
5980
6014
|
}
|
|
5981
6015
|
config.renderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
5982
|
-
config.images =
|
|
6016
|
+
config.images = _chunkX2M4XN4Vcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
5983
6017
|
const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
5984
6018
|
ssr: true
|
|
5985
6019
|
});
|
|
5986
|
-
const reactRefreshPlugins = _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) ? await
|
|
6020
|
+
const reactRefreshPlugins = _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) ? await _chunk65Y5SIBHcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
5987
6021
|
const nodeBuiltinStubs = {
|
|
5988
6022
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
5989
6023
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -6071,13 +6105,13 @@ async function defineConfig(config = {}) {
|
|
|
6071
6105
|
if (!serverStarted) {
|
|
6072
6106
|
serverStarted = true;
|
|
6073
6107
|
const elapsed = Date.now() - startTime;
|
|
6074
|
-
const address = _optionalChain([server, 'access',
|
|
6108
|
+
const address = _optionalChain([server, 'access', _375 => _375.httpServer, 'optionalAccess', _376 => _376.address, 'call', _377 => _377()]);
|
|
6075
6109
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
6076
6110
|
const hostConfig = server.config.server.host;
|
|
6077
6111
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
6078
6112
|
console.log("");
|
|
6079
6113
|
console.log(
|
|
6080
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
6114
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkAGR7VJH2cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
6081
6115
|
);
|
|
6082
6116
|
console.log("");
|
|
6083
6117
|
console.log(
|
|
@@ -6110,8 +6144,8 @@ async function defineConfig(config = {}) {
|
|
|
6110
6144
|
return {
|
|
6111
6145
|
plugins: [
|
|
6112
6146
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
6113
|
-
|
|
6114
|
-
|
|
6147
|
+
_chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
6148
|
+
_chunkX2M4XN4Vcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
6115
6149
|
tailwindVitePlugin,
|
|
6116
6150
|
...rendererVitePlugins,
|
|
6117
6151
|
...reactRefreshPlugins,
|
|
@@ -6119,14 +6153,14 @@ async function defineConfig(config = {}) {
|
|
|
6119
6153
|
farmI18nClientBridgePlugin(),
|
|
6120
6154
|
farmServerOnlyEntriesPlugin(),
|
|
6121
6155
|
farmPlugin(config),
|
|
6122
|
-
|
|
6156
|
+
_chunkNK2VWS7Pcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
6123
6157
|
farmBrandingPlugin
|
|
6124
6158
|
],
|
|
6125
6159
|
customLogger: farmLogger,
|
|
6126
6160
|
clearScreen: false,
|
|
6127
6161
|
optimizeDeps: {
|
|
6128
|
-
...
|
|
6129
|
-
|
|
6162
|
+
..._chunkX2M4XN4Vcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
6163
|
+
_chunkX2M4XN4Vcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
6130
6164
|
appRoot,
|
|
6131
6165
|
_chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
6132
6166
|
),
|
|
@@ -6169,7 +6203,7 @@ async function defineConfig(config = {}) {
|
|
|
6169
6203
|
// Stub out problematic server-only modules during dev mode
|
|
6170
6204
|
alias: {
|
|
6171
6205
|
..._chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
6172
|
-
...
|
|
6206
|
+
..._chunkX2M4XN4Vcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
6173
6207
|
// Nitro internals that should not be resolved in browser
|
|
6174
6208
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
6175
6209
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|