@farm.js/core 0.1.74 → 0.1.76
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-handler-NRIL4JBC.cjs → agent-mcp-handler-73SGWVZT.cjs} +9 -9
- package/dist/{agent-mcp-handler-HX4F4VKN.mjs → agent-mcp-handler-PJKZHYSA.mjs} +8 -8
- package/dist/{agent-mcp.d-CX8_oOT_.d.ts → agent-mcp.d-Cftp2kFv.d.ts} +24 -2
- package/dist/{agent-mcp.d-BEhDfdWc.d.mts → agent-mcp.d-D0FMmqi0.d.mts} +24 -2
- package/dist/agent-runtime.cjs +7 -7
- package/dist/agent-runtime.d.mts +7 -5
- package/dist/agent-runtime.d.ts +7 -5
- package/dist/agent-runtime.mjs +6 -6
- package/dist/analyzer-KFJGYJS7.cjs +16 -0
- package/dist/{analyzer-2K35LIQZ.mjs → analyzer-NLQKPN74.mjs} +2 -2
- package/dist/api/client.cjs +4 -4
- package/dist/api/client.mjs +3 -3
- package/dist/api/client.native.cjs +6 -6
- package/dist/api/client.native.mjs +3 -3
- package/dist/api/node.cjs +12 -12
- package/dist/api/node.d.mts +9 -7
- package/dist/api/node.d.ts +9 -7
- package/dist/api/node.mjs +11 -11
- package/dist/api/route-manager.cjs +20 -20
- package/dist/api/route-manager.d.mts +9 -7
- package/dist/api/route-manager.d.ts +9 -7
- package/dist/api/route-manager.mjs +19 -19
- package/dist/api/runtime.cjs +11 -11
- package/dist/api/runtime.d.mts +8 -6
- package/dist/api/runtime.d.ts +8 -6
- package/dist/api/runtime.mjs +10 -10
- package/dist/api.cjs +23 -23
- package/dist/api.d.mts +10 -8
- package/dist/api.d.ts +10 -8
- package/dist/api.mjs +22 -22
- package/dist/{app-manifest.d-CVEx1CFB.d.ts → app-manifest.d-7PmA_9hm.d.ts} +1 -1
- package/dist/{app-manifest.d-BcXt2yCx.d.mts → app-manifest.d-cpOw_sV5.d.mts} +1 -1
- package/dist/app-markdown.cjs +7 -7
- package/dist/app-markdown.d.mts +8 -6
- package/dist/app-markdown.d.ts +8 -6
- package/dist/app-markdown.mjs +6 -6
- package/dist/{app.d-DowzSmT5.d.mts → app.d-DUZvwnFF.d.mts} +30 -4
- package/dist/{app.d-B6i8CSrx.d.ts → app.d-wOkxXre8.d.ts} +30 -4
- package/dist/{base-path.d-BJ3SYpB8.d.mts → base-path.d-m7wvRMnG.d.mts} +15 -1
- package/dist/{base-path.d-BJ3SYpB8.d.ts → base-path.d-m7wvRMnG.d.ts} +15 -1
- package/dist/cache.cjs +2 -2
- package/dist/cache.d.mts +14 -1
- package/dist/cache.d.ts +14 -1
- package/dist/cache.mjs +1 -1
- package/dist/{chunk-JYNNIGQO.cjs → chunk-25JGHAGH.cjs} +11 -1
- package/dist/{chunk-BFOMCSZ2.mjs → chunk-2GZZVIXY.mjs} +184 -27
- package/dist/{chunk-4BS3HSY7.cjs → chunk-2JEXQAIR.cjs} +2 -2
- package/dist/{chunk-GWXZS7K5.mjs → chunk-2LKUR5QJ.mjs} +1 -1
- package/dist/chunk-2PJVEL56.cjs +90 -0
- package/dist/{chunk-4M5ESTJ2.cjs → chunk-2RSVYJT6.cjs} +19 -3
- package/dist/{chunk-Q3MVNRAO.cjs → chunk-2WKGQCAV.cjs} +1010 -587
- package/dist/{chunk-PG6ZIHKE.cjs → chunk-2YJ4DHTD.cjs} +2 -2
- package/dist/{chunk-MGZVDX4R.mjs → chunk-3AJQFVWW.mjs} +3 -3
- package/dist/{chunk-DRHHTHA3.mjs → chunk-3GMD2E4Q.mjs} +3 -3
- package/dist/{chunk-B4CWYGCG.mjs → chunk-3OYFMOBY.mjs} +1 -1
- package/dist/{chunk-S3D6SL2V.cjs → chunk-42EUEYW6.cjs} +17 -12
- package/dist/{chunk-D2IAYGYA.mjs → chunk-47R7CX4A.mjs} +6 -6
- package/dist/{chunk-YQWRBBAA.mjs → chunk-4PWGLPL6.mjs} +1 -1
- package/dist/{chunk-7S7AAK2D.mjs → chunk-4QBFYEDC.mjs} +2 -1
- package/dist/{chunk-KMYOKQPP.cjs → chunk-4VLXQ55O.cjs} +27 -22
- package/dist/{chunk-XGJVRPYL.cjs → chunk-52LTENRE.cjs} +3 -3
- package/dist/{chunk-RQ4UZJPR.cjs → chunk-5AMH6AFA.cjs} +5 -3
- package/dist/{chunk-FEQ72ZHD.mjs → chunk-5EEQNZLU.mjs} +6 -6
- package/dist/{chunk-AYP2YFVN.mjs → chunk-5KAEGBIL.mjs} +75 -42
- package/dist/{chunk-IJFNXP3D.cjs → chunk-5QZT2EQN.cjs} +2 -2
- package/dist/{chunk-X2KNHD4B.mjs → chunk-5WFPZG7K.mjs} +8 -8
- package/dist/{chunk-TPDKFRQX.cjs → chunk-62DZHPDK.cjs} +16 -11
- package/dist/{chunk-DTBRSRTR.cjs → chunk-63EFR2WF.cjs} +6 -5
- package/dist/{chunk-2RCCFB2Y.cjs → chunk-6B44ZU5P.cjs} +11 -11
- package/dist/{chunk-ZRCGPSUM.cjs → chunk-6D3CJFNU.cjs} +37 -21
- package/dist/{chunk-FCBUNILW.mjs → chunk-6MNDFNZW.mjs} +4 -4
- package/dist/{chunk-O2A6HE76.cjs → chunk-6ZFGWB75.cjs} +115 -21
- package/dist/{chunk-ACAEFEOH.cjs → chunk-7564NP5Z.cjs} +10 -10
- package/dist/{chunk-7H45IJWO.mjs → chunk-7DBJ2SWK.mjs} +1 -1
- package/dist/chunk-7E4FDO5X.mjs +265 -0
- package/dist/{chunk-FPBOAG6N.cjs → chunk-7EOSFIPN.cjs} +3 -3
- package/dist/{chunk-DRBXYJZ6.mjs → chunk-7FQFK3OA.mjs} +2 -2
- package/dist/{chunk-TUOO6IK3.mjs → chunk-7H2TXT2K.mjs} +11 -1
- package/dist/{chunk-A4PWGL46.mjs → chunk-7KDCVSTR.mjs} +4 -4
- package/dist/{chunk-GPICBTDV.cjs → chunk-7Q2YWZF7.cjs} +6 -6
- package/dist/{chunk-CFG4QERR.cjs → chunk-7Q7UB4TL.cjs} +2 -2
- package/dist/{chunk-IP2R2TAE.mjs → chunk-A2VFKOQL.mjs} +1 -1
- package/dist/chunk-A3LNXQJJ.cjs +265 -0
- package/dist/{chunk-S6O2L47H.mjs → chunk-AG27TI6Q.mjs} +67 -5
- package/dist/{chunk-DC2AXGNZ.mjs → chunk-AM2M56SL.mjs} +1 -1
- package/dist/{chunk-JRHGJVJH.mjs → chunk-B5QRNCIE.mjs} +1 -1
- package/dist/{chunk-FYV6DTAG.cjs → chunk-BBRSPKFI.cjs} +585 -601
- package/dist/{chunk-R6Q6VSGU.mjs → chunk-BGUTIQII.mjs} +1 -1
- package/dist/{chunk-3OMLZLDE.cjs → chunk-BNCKXPCU.cjs} +44 -0
- package/dist/{chunk-BPAXGCKX.mjs → chunk-BRNPLD22.mjs} +30 -17
- package/dist/{chunk-35GBGSQZ.cjs → chunk-BYJPBJ4E.cjs} +3 -3
- package/dist/{chunk-V6T3UJAH.cjs → chunk-CCQZDOQR.cjs} +17 -17
- package/dist/{chunk-JZGL2PIH.mjs → chunk-CDT7CGQT.mjs} +2 -2
- package/dist/{chunk-BNXV3PRM.mjs → chunk-CF74ABRI.mjs} +10 -10
- package/dist/chunk-CIY74JLV.cjs +134 -0
- package/dist/{chunk-JI6N4W2I.mjs → chunk-CKBBKRBO.mjs} +840 -228
- package/dist/{chunk-IZ5WOTQP.mjs → chunk-CLM73YYD.mjs} +2 -2
- package/dist/{chunk-FGXSWRWA.mjs → chunk-CSAIIMY3.mjs} +1 -1
- package/dist/{chunk-EF5AP4CV.cjs → chunk-CYNQPKA4.cjs} +2 -2
- package/dist/{chunk-M53MIIXY.mjs → chunk-CZOXZ6WQ.mjs} +1 -1
- package/dist/{chunk-ROPMQNCG.mjs → chunk-DASQJ5UD.mjs} +2 -2
- package/dist/{chunk-BWFBTTJ5.cjs → chunk-DD22NQFX.cjs} +2 -2
- package/dist/{chunk-56HHUSR5.cjs → chunk-DTNWLRRF.cjs} +1308 -696
- package/dist/{chunk-AL6E63FZ.mjs → chunk-DUSTJ6A5.mjs} +20 -17
- package/dist/{chunk-BUC3FDYC.cjs → chunk-DVW6SKHA.cjs} +2 -2
- package/dist/{chunk-EWIEJQP6.cjs → chunk-DZ3AZ7UK.cjs} +52 -52
- package/dist/{chunk-6YFC3ZFX.mjs → chunk-DZXD6CYJ.mjs} +1 -1
- package/dist/{chunk-BIX46FTI.mjs → chunk-E77ZKNPN.mjs} +10 -2
- package/dist/{chunk-Q4G52OSW.mjs → chunk-EMTN5ABC.mjs} +1 -1
- package/dist/{chunk-GK2GBIXD.mjs → chunk-ERT6HQAI.mjs} +8 -3
- package/dist/{chunk-ZLRWO5GK.mjs → chunk-F35C3TJZ.mjs} +1 -1
- package/dist/{chunk-F244KE2D.cjs → chunk-F4ID7BGO.cjs} +33 -30
- package/dist/{chunk-C7GJDVN4.mjs → chunk-F7MJWW6A.mjs} +1 -1
- package/dist/{chunk-WTTJ2YS2.mjs → chunk-FCAYYLAE.mjs} +18 -2
- package/dist/{chunk-PWKAX5MS.cjs → chunk-FDZZ6K3N.cjs} +6 -6
- package/dist/{chunk-MHLNWRCJ.cjs → chunk-FE6KYDHC.cjs} +3 -3
- package/dist/{chunk-PTLXHRJZ.mjs → chunk-FLMALEY2.mjs} +37 -4
- package/dist/{chunk-GRHSQYD4.cjs → chunk-G7B6NU4X.cjs} +11 -11
- package/dist/{chunk-E4T7WJJN.mjs → chunk-GAAK3HDZ.mjs} +28 -7
- package/dist/{chunk-QMNWKQL4.cjs → chunk-GC5ROI3A.cjs} +4 -4
- package/dist/{chunk-JXIYH2NO.cjs → chunk-GCJ4GNMC.cjs} +4 -4
- package/dist/{chunk-KNEYWPZV.mjs → chunk-GFXKO4UW.mjs} +42 -10
- package/dist/{chunk-GUZC226X.mjs → chunk-GLVDXRG2.mjs} +1 -1
- package/dist/{chunk-JZ43UD6S.mjs → chunk-GP5BWTO7.mjs} +13 -13
- package/dist/{chunk-OWQV6MLM.cjs → chunk-GYJT2U7J.cjs} +2 -1
- package/dist/{chunk-LHFGTR7F.mjs → chunk-H76C5AOU.mjs} +104 -10
- package/dist/{chunk-XZPI44Q7.cjs → chunk-H7OFZJCV.cjs} +8 -8
- package/dist/{chunk-2TZ3F6TN.cjs → chunk-HFJLMALC.cjs} +25 -25
- package/dist/{chunk-NET6PBUH.cjs → chunk-HKGU2X4I.cjs} +2 -2
- package/dist/{chunk-CROAFCMW.mjs → chunk-HONTCUK6.mjs} +1 -1
- package/dist/{chunk-7PJARAQQ.mjs → chunk-HQ2VAJLW.mjs} +1 -1
- package/dist/{chunk-FN5UEC7I.mjs → chunk-IG2JE6WJ.mjs} +1 -1
- package/dist/{chunk-MQ4DYVFS.cjs → chunk-IIHZ2BEE.cjs} +3 -3
- package/dist/{chunk-FNWL5DMG.cjs → chunk-IXO6O2EL.cjs} +6 -6
- package/dist/{chunk-B5WZP3T3.cjs → chunk-IYFBLWXU.cjs} +41 -23
- package/dist/{chunk-R4BWNP73.mjs → chunk-JA6RML7C.mjs} +3 -3
- package/dist/{chunk-JSUVQ5HG.cjs → chunk-JHZ6HULQ.cjs} +12 -9
- package/dist/{chunk-UHAARKF3.mjs → chunk-JL6XHQZF.mjs} +5 -5
- package/dist/{chunk-KWUZJZ23.mjs → chunk-JRBWBMP2.mjs} +4 -3
- package/dist/{chunk-YH33PZ3K.mjs → chunk-K6DXKHFE.mjs} +1 -1
- package/dist/{chunk-AXVRUDMB.cjs → chunk-K6PGK7DC.cjs} +2 -2
- package/dist/{chunk-72NTEYCX.mjs → chunk-KHS3T3E5.mjs} +15 -10
- package/dist/{chunk-J42QN7OC.cjs → chunk-KQS27YN7.cjs} +6 -6
- package/dist/{chunk-KUMKBBYP.mjs → chunk-KUXEII7V.mjs} +1 -1
- package/dist/{chunk-CA7DNRHO.cjs → chunk-L6E5BSNU.cjs} +3 -3
- package/dist/{chunk-47ZDUDN5.cjs → chunk-L7Y65BQU.cjs} +64 -32
- package/dist/{chunk-OSKIG4OP.mjs → chunk-LPXJEZJK.mjs} +30 -14
- package/dist/{chunk-CF77L6RL.mjs → chunk-LQBV2Y37.mjs} +4 -4
- package/dist/{chunk-HK4VJI27.cjs → chunk-LQWIIBI2.cjs} +11 -1
- package/dist/{chunk-YTVSWXEZ.cjs → chunk-ML4TOUZP.cjs} +76 -43
- package/dist/{chunk-6JEXH7N6.mjs → chunk-MOS2N377.mjs} +1 -1
- package/dist/{chunk-ZD7JUTBY.mjs → chunk-NLATR3T3.mjs} +2 -2
- package/dist/{chunk-3BUJIPKE.cjs → chunk-NSNQLBHR.cjs} +2 -2
- package/dist/chunk-NUWUEXUD.mjs +55 -0
- package/dist/{chunk-WS4SLJW5.mjs → chunk-O225GNEU.mjs} +186 -202
- package/dist/{chunk-53EHWHT2.cjs → chunk-O4JYMU5N.cjs} +35 -22
- package/dist/{chunk-TNYC3TYP.mjs → chunk-O7JEFGUV.mjs} +2 -2
- package/dist/{chunk-62ZRA7XU.mjs → chunk-OCLCA3X3.mjs} +1 -1
- package/dist/{chunk-CXQZQK6R.mjs → chunk-OVUU2RCQ.mjs} +2 -2
- package/dist/{chunk-65OS2TOT.cjs → chunk-OWO7KDZ3.cjs} +34 -34
- package/dist/{chunk-HBLYSWIJ.cjs → chunk-PBJ7MEOV.cjs} +9 -9
- package/dist/{chunk-RBRIKT6B.mjs → chunk-PDACTAVX.mjs} +3 -3
- package/dist/{chunk-AO5IRA2N.mjs → chunk-PE2LEWXA.mjs} +6 -3
- package/dist/{chunk-VZKCGHWC.cjs → chunk-PG7J7XYT.cjs} +6 -6
- package/dist/{chunk-MMK4MZUN.mjs → chunk-PKXGFQZS.mjs} +1 -1
- package/dist/{chunk-NKETXVKP.mjs → chunk-PL7MCYYD.mjs} +32 -14
- package/dist/{chunk-P3EZKU6L.cjs → chunk-PSNYVBWC.cjs} +38 -38
- package/dist/chunk-PWHF2C6A.mjs +134 -0
- package/dist/{chunk-77SVUQM5.cjs → chunk-PXXG5BID.cjs} +10 -10
- package/dist/{chunk-JWHRVBCZ.cjs → chunk-Q2EKSSEG.cjs} +21 -21
- package/dist/{chunk-TJVUTGED.mjs → chunk-Q4X3MX4J.mjs} +201 -3
- package/dist/{chunk-XXKMAHYE.mjs → chunk-Q7JMHO5U.mjs} +2 -2
- package/dist/{chunk-EHJOSIXM.cjs → chunk-QDHR54S6.cjs} +11 -11
- package/dist/{chunk-ZOYKJBP5.cjs → chunk-QKW6DLDT.cjs} +2 -2
- package/dist/{chunk-NXGQIXR7.cjs → chunk-QP4GYVRR.cjs} +313 -156
- package/dist/{chunk-3ODLJRA6.mjs → chunk-QSLGE2ZC.mjs} +1 -1
- package/dist/{chunk-ENYBDM4U.cjs → chunk-QTDIOZV6.cjs} +15 -7
- package/dist/{chunk-FSODPZRT.cjs → chunk-QUEYL2WM.cjs} +10 -10
- package/dist/{chunk-ZDAEHG2O.cjs → chunk-QYOAGT3E.cjs} +3 -3
- package/dist/{chunk-VKLV7GF4.mjs → chunk-R5X7FDOG.mjs} +1 -1
- package/dist/{chunk-O47W53D3.cjs → chunk-RDADQG5S.cjs} +7 -77
- package/dist/chunk-RDSHEHBA.mjs +82 -0
- package/dist/{chunk-K3RU5MOR.mjs → chunk-RK4MGL6Q.mjs} +1 -1
- package/dist/{chunk-LRB5OVRT.cjs → chunk-RKQOMG2X.cjs} +2 -2
- package/dist/chunk-RQRTH57V.cjs +82 -0
- package/dist/{chunk-MUITBU5Z.mjs → chunk-S7QEQCVV.mjs} +2 -2
- package/dist/{chunk-HKZVC5GP.cjs → chunk-SFSTZ7TB.cjs} +8 -8
- package/dist/{chunk-VFPFXMTF.mjs → chunk-SGQXJVFX.mjs} +1 -1
- package/dist/{chunk-ZZGANFQH.cjs → chunk-SX535SU5.cjs} +12 -12
- package/dist/{chunk-NLBK37HI.cjs → chunk-SXXSQVKK.cjs} +4 -4
- package/dist/{chunk-ELJQWUAR.mjs → chunk-SYPEMXW2.mjs} +2 -2
- package/dist/{chunk-D4TYE6MY.cjs → chunk-TMVVBK5S.cjs} +2 -2
- package/dist/{chunk-BSJMWCWM.cjs → chunk-TZ2YPXLB.cjs} +7 -7
- package/dist/{chunk-JMYXO572.cjs → chunk-UBXNTZCY.cjs} +205 -7
- package/dist/{chunk-OEL5EPOJ.mjs → chunk-UD6KTSJS.mjs} +6 -76
- package/dist/{chunk-2EVESLP3.mjs → chunk-UJIBSFUE.mjs} +4 -4
- package/dist/chunk-UNOXV37V.cjs +55 -0
- package/dist/{chunk-H2ZJ35NW.mjs → chunk-UOE6ZZZP.mjs} +1 -1
- package/dist/{chunk-O6K4G7YA.mjs → chunk-URQW27KO.mjs} +10 -5
- package/dist/{chunk-B3XY6FMC.mjs → chunk-VDJ3CLBR.mjs} +3 -3
- package/dist/chunk-VDQZV6BX.mjs +17 -0
- package/dist/{chunk-2DOI6HLJ.cjs → chunk-VJ6L7TII.cjs} +3 -3
- package/dist/{chunk-QL3YZTGZ.cjs → chunk-VJI2LWTL.cjs} +2 -2
- package/dist/{chunk-7RKHXF4P.mjs → chunk-WGNGM6MJ.mjs} +2 -2
- package/dist/{chunk-DM2YGTRH.cjs → chunk-WILPJVQE.cjs} +23 -23
- package/dist/{chunk-4AB62NMW.cjs → chunk-WJDMH3E7.cjs} +4 -4
- package/dist/chunk-WKVYF2B5.cjs +17 -0
- package/dist/{chunk-737MIVX3.cjs → chunk-WMJQNVKX.cjs} +24 -24
- package/dist/{chunk-MKQ27TGW.cjs → chunk-WRWJ7IWT.cjs} +7 -7
- package/dist/{chunk-Y4FEQBKY.cjs → chunk-WW62HKA2.cjs} +47 -26
- package/dist/{chunk-IG4IQMIW.mjs → chunk-X3HUT4JU.mjs} +1 -1
- package/dist/{chunk-XVSBALOY.cjs → chunk-X3Y6JWJG.cjs} +3 -3
- package/dist/{chunk-RSL3YFJG.cjs → chunk-XLOORES5.cjs} +1 -1
- package/dist/{chunk-LIQJYEQP.cjs → chunk-XRFGOYXG.cjs} +4 -4
- package/dist/{chunk-42KMUIWZ.cjs → chunk-XX6ZA2IO.cjs} +3 -3
- package/dist/{chunk-6IOZPJ3I.cjs → chunk-Y3DO7BIJ.cjs} +69 -7
- package/dist/{chunk-L5JDKFMQ.cjs → chunk-YBXIVQCE.cjs} +4 -4
- package/dist/{chunk-YWDRWG4L.mjs → chunk-YHE7HH2I.mjs} +875 -452
- package/dist/{chunk-G7S6XG6X.cjs → chunk-YN7G22MP.cjs} +6 -6
- package/dist/{chunk-4MU4QCX4.mjs → chunk-YONTMPZ6.mjs} +1 -1
- package/dist/{chunk-AU5UPNOD.mjs → chunk-YQXJY7E7.mjs} +3 -3
- package/dist/{chunk-VKRMO3EZ.cjs → chunk-YRXPDKMM.cjs} +10 -10
- package/dist/{chunk-QDWMCFTH.mjs → chunk-YT2ZMLXK.mjs} +1 -1
- package/dist/{chunk-EMRYJG4U.cjs → chunk-YTNE4KGC.cjs} +3 -3
- package/dist/{chunk-E7QOEV5Z.cjs → chunk-YUCU6XB4.cjs} +4 -4
- package/dist/{chunk-NLRAQXAA.mjs → chunk-YVVY276M.mjs} +1 -1
- package/dist/{chunk-MQ5HA7H2.mjs → chunk-Z2FFLTF5.mjs} +3 -3
- package/dist/{chunk-JSDV2NUN.mjs → chunk-Z3QXQN4U.mjs} +1 -1
- package/dist/{chunk-HRQV5Q3J.mjs → chunk-Z4IRG4RG.mjs} +96 -9
- package/dist/{chunk-JOECBGY7.mjs → chunk-ZEWWZJPZ.mjs} +3 -1
- package/dist/{chunk-2GQBBOFH.mjs → chunk-ZIAWO6BC.mjs} +11 -1
- package/dist/{chunk-WH3PBJS7.cjs → chunk-ZIOFRBIU.cjs} +100 -13
- package/dist/{chunk-3OJNNCDL.cjs → chunk-ZNXU4E6A.cjs} +8 -8
- package/dist/{chunk-KIRIFO6T.mjs → chunk-ZO6TOLHL.mjs} +44 -0
- package/dist/cli-runtime.d-D84CwyPI.d.ts +535 -0
- package/dist/cli-runtime.d-OQY2pgwK.d.mts +535 -0
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-component.d-DYOwmq0c.d.ts → client-component.d-Bf8jZqW7.d.ts} +2 -137
- package/dist/{client-component.d-edV76QvU.d.mts → client-component.d-Bh6CfC5z.d.mts} +2 -137
- package/dist/{client-plugins.d-BmJYW2FY.d.ts → client-plugins.d-DuujrC8d.d.ts} +27 -6
- package/dist/{client-plugins.d-DwvqqGsU.d.mts → client-plugins.d-r3K2oQ6w.d.mts} +27 -6
- package/dist/client-plugins.d.mts +7 -5
- package/dist/client-plugins.d.ts +7 -5
- package/dist/client.cjs +15 -13
- package/dist/client.d.mts +12 -10
- package/dist/client.d.ts +12 -10
- package/dist/client.mjs +14 -12
- package/dist/config.d.mts +7 -5
- package/dist/config.d.ts +7 -5
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/desktop.d.mts +8 -6
- package/dist/desktop.d.ts +8 -6
- package/dist/{devtools-YMDS7PUA.cjs → devtools-3WZIZ7KK.cjs} +20 -20
- package/dist/{devtools-WPX62NG2.mjs → devtools-MBZPUH3U.mjs} +18 -18
- package/dist/docs.cjs +27 -21
- package/dist/docs.d.mts +15 -56
- package/dist/docs.d.ts +15 -56
- package/dist/docs.mjs +26 -20
- package/dist/environment/vite.cjs +6 -6
- package/dist/environment/vite.mjs +5 -5
- package/dist/handler.d-Bd5lRSvb.d.ts +62 -0
- package/dist/handler.d-SRH-AKzf.d.mts +62 -0
- package/dist/headers.cjs +3 -3
- package/dist/{headers.d-BtNxFc2s.d.mts → headers.d-CHHvyaIG.d.mts} +1 -1
- package/dist/{headers.d-BIbQyAxJ.d.ts → headers.d-D-OvGikv.d.ts} +1 -1
- package/dist/headers.mjs +2 -2
- package/dist/i18n/client.cjs +15 -16
- package/dist/i18n/client.mjs +5 -6
- package/dist/i18n/index.cjs +4 -4
- package/dist/i18n/index.mjs +3 -3
- package/dist/i18n/server.cjs +5 -5
- package/dist/i18n/server.mjs +4 -4
- package/dist/image/server.cjs +5 -4
- package/dist/image/server.d.mts +5 -1
- package/dist/image/server.d.ts +5 -1
- package/dist/image/server.mjs +4 -3
- package/dist/image/sharp.cjs +53 -89
- package/dist/image/sharp.d.mts +2 -1
- package/dist/image/sharp.d.ts +2 -1
- package/dist/image/sharp.mjs +50 -86
- package/dist/index.cjs +105 -97
- package/dist/index.d-BOPsgMlI.d.mts +16 -0
- package/dist/index.d-BiUtYJUG.d.ts +16 -0
- package/dist/index.d.mts +40 -557
- package/dist/index.d.ts +40 -557
- package/dist/index.mjs +102 -94
- package/dist/integrations/orm.cjs +3 -3
- package/dist/integrations/orm.d.mts +6 -4
- package/dist/integrations/orm.d.ts +6 -4
- package/dist/integrations/orm.mjs +2 -2
- package/dist/integrations.cjs +7 -7
- package/dist/integrations.d.mts +7 -5
- package/dist/integrations.d.ts +7 -5
- package/dist/integrations.mjs +6 -6
- package/dist/internal/app-markdown-runtime.cjs +6 -6
- package/dist/internal/app-markdown-runtime.d.mts +8 -6
- package/dist/internal/app-markdown-runtime.d.ts +8 -6
- package/dist/internal/app-markdown-runtime.mjs +5 -5
- package/dist/internal/build-runtime.cjs +71 -69
- package/dist/internal/build-runtime.d.mts +10 -7
- package/dist/internal/build-runtime.d.ts +10 -7
- package/dist/internal/build-runtime.mjs +70 -68
- package/dist/internal/cli-runtime.cjs +40 -35
- package/dist/internal/cli-runtime.d.mts +45 -0
- package/dist/internal/cli-runtime.d.ts +45 -0
- package/dist/internal/cli-runtime.mjs +39 -34
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +23 -2
- package/dist/internal/client-runtime.d.mts +36 -13
- package/dist/internal/client-runtime.d.ts +36 -13
- package/dist/internal/client-runtime.mjs +23 -2
- package/dist/internal/compression-runtime.d.mts +7 -5
- package/dist/internal/compression-runtime.d.ts +7 -5
- package/dist/internal/config-runtime.cjs +20 -20
- package/dist/internal/config-runtime.d.mts +9 -7
- package/dist/internal/config-runtime.d.ts +9 -7
- package/dist/internal/config-runtime.mjs +19 -19
- package/dist/internal/form-actions.cjs +6 -6
- package/dist/internal/form-actions.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +15 -15
- package/dist/internal/infra-analytics-runtime.mjs +13 -13
- package/dist/internal/islands-server.cjs +2 -2
- package/dist/internal/islands-server.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +4 -4
- package/dist/internal/metadata-image-runtime.mjs +3 -3
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +65 -42
- package/dist/internal/production-runtime.d.mts +86 -17
- package/dist/internal/production-runtime.d.ts +86 -17
- package/dist/internal/production-runtime.mjs +68 -45
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/start-manifest.cjs +54 -0
- package/dist/internal/start-manifest.d.mts +45 -0
- package/dist/internal/start-manifest.d.ts +45 -0
- package/dist/internal/start-manifest.mjs +54 -0
- package/dist/internal/vercel-edge-middleware.cjs +8 -8
- package/dist/internal/vercel-edge-middleware.mjs +7 -7
- package/dist/{lifecycle.d-OtGWAvJT.d.mts → lifecycle.d-VzcXyEyn.d.mts} +1 -1
- package/dist/{lifecycle.d-OtGWAvJT.d.ts → lifecycle.d-VzcXyEyn.d.ts} +1 -1
- package/dist/manager-R7FV4A56.cjs +18 -0
- package/dist/{manager-RHB2P35B.mjs → manager-YO2RHDYU.mjs} +5 -5
- package/dist/markdown.cjs +5 -5
- package/dist/markdown.d.mts +7 -5
- package/dist/markdown.d.ts +7 -5
- package/dist/markdown.mjs +4 -4
- package/dist/middleware.cjs +14 -14
- package/dist/middleware.d.mts +7 -5
- package/dist/middleware.d.ts +7 -5
- package/dist/middleware.mjs +13 -13
- package/dist/{mount.d-C-u7rFkM.d.ts → mount.d-C2yq0Zzz.d.ts} +1 -1
- package/dist/{mount.d-6bhpBQQB.d.mts → mount.d-vq1HTq5u.d.mts} +1 -1
- package/dist/{native-server-fn-handler-W4FSD76W.cjs → native-server-fn-handler-IWNKQEXK.cjs} +9 -8
- package/dist/{native-server-fn-handler-I66X4E5S.mjs → native-server-fn-handler-LII4MDRR.mjs} +8 -7
- package/dist/native-tree-D3PW64ZL.cjs +28 -0
- package/dist/{native-tree-3X23BT3N.mjs → native-tree-G6ZWS7IR.mjs} +5 -5
- package/dist/{navigation-delegate.d-xsG4T1x-.d.ts → navigation-delegate.d-D7xIin3i.d.ts} +1 -1
- package/dist/{navigation-delegate.d-nx6gtsY4.d.mts → navigation-delegate.d-DS2Sqm7E.d.mts} +1 -1
- package/dist/navigation.cjs +13 -11
- package/dist/navigation.d.mts +10 -8
- package/dist/navigation.d.ts +10 -8
- package/dist/navigation.mjs +12 -10
- package/dist/{nitro-SSFTPZMW.cjs → nitro-HKMVYIXY.cjs} +13 -13
- package/dist/{nitro-XTQ2HKDL.mjs → nitro-RHLKLYXH.mjs} +8 -8
- package/dist/{plugin-QZT747YW.mjs → plugin-6CHZBFJD.mjs} +2 -2
- package/dist/{plugin-5PIQQVRP.cjs → plugin-YXPIS3XX.cjs} +3 -3
- package/dist/plugin.cjs +64 -62
- package/dist/plugin.d.mts +11 -8
- package/dist/plugin.d.ts +11 -8
- package/dist/plugin.mjs +63 -61
- package/dist/query/client.cjs +20 -9
- package/dist/query/client.mjs +16 -5
- package/dist/{render-plan.d-gW0fwKz2.d.ts → render-plan.d-BCq0nfdw.d.ts} +1 -1
- package/dist/{render-plan.d-B5y3h97B.d.mts → render-plan.d-X6KqerAM.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +9 -1
- package/dist/renderer/react/server.d.mts +9 -1
- package/dist/renderer/react/server.d.ts +9 -1
- package/dist/renderer/react/server.mjs +8 -0
- package/dist/renderer-client.cjs +25 -26
- package/dist/renderer-client.d.mts +10 -8
- package/dist/renderer-client.d.ts +10 -8
- package/dist/renderer-client.mjs +15 -16
- package/dist/request.cjs +2 -2
- package/dist/{request.d-B0ugAadD.d.ts → request.d-Be9rWboC.d.mts} +7 -2
- package/dist/{request.d-DLq33nYo.d.mts → request.d-CPdq2_kC.d.ts} +7 -2
- package/dist/request.d.mts +8 -6
- package/dist/request.d.ts +8 -6
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-DSeIV7yV.d.mts → route-rendering.d-CIPli7Ve.d.mts} +1 -1
- package/dist/{route-rendering.d-ytaqDQD6.d.ts → route-rendering.d-CKB5GhQr.d.ts} +1 -1
- package/dist/router.cjs +4 -4
- package/dist/{router.d-BaEAEGPg.d.ts → router.d-CvrbOXzF.d.ts} +1 -1
- package/dist/{router.d-Chd5cpe3.d.mts → router.d-VxTgLGxN.d.mts} +1 -1
- package/dist/router.mjs +3 -3
- package/dist/routes.cjs +6 -6
- package/dist/routes.d.mts +7 -5
- package/dist/routes.d.ts +7 -5
- package/dist/routes.mjs +5 -5
- package/dist/{rsc-pipeline-DPMYONEV.mjs → rsc-pipeline-FPE4OL57.mjs} +22 -22
- package/dist/{rsc-pipeline-XIUUMMG5.cjs → rsc-pipeline-TPHK74VE.cjs} +23 -23
- package/dist/{runtime-XIUJZTZ3.mjs → runtime-45BD33OJ.mjs} +27 -27
- package/dist/{runtime-WD77S3C5.cjs → runtime-UBG657UC.cjs} +38 -38
- package/dist/{runtime.d-DpCs0eAO.d.mts → runtime.d-Cn1jiDNI.d.mts} +1 -1
- package/dist/{runtime.d-h2USyQsz.d.ts → runtime.d-Ps54JWpo.d.ts} +1 -1
- package/dist/safe-fetch.cjs +15 -0
- package/dist/safe-fetch.d.mts +61 -0
- package/dist/safe-fetch.d.ts +61 -0
- package/dist/safe-fetch.mjs +15 -0
- package/dist/{schema-dev-notice-C2JINRZI.mjs → schema-dev-notice-CA55V57L.mjs} +2 -2
- package/dist/{schema-dev-notice-X7GG7QVB.cjs → schema-dev-notice-RWA2UTR6.cjs} +3 -3
- package/dist/{schema.d-Dny9pnrm.d.mts → schema.d-BM-uVGpx.d.mts} +1 -1
- package/dist/{schema.d-Dny9pnrm.d.ts → schema.d-BM-uVGpx.d.ts} +1 -1
- package/dist/schema.d.mts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/server-action-security.cjs +5 -5
- package/dist/server-action-security.mjs +4 -4
- package/dist/{index.d-CQ_wUzOV.d.ts → server-components-status.d-Dhtbs5lC.d.ts} +2 -15
- package/dist/{index.d-CQdDRXd1.d.mts → server-components-status.d-DnmipSb3.d.mts} +2 -15
- package/dist/server-fn.cjs +8 -7
- package/dist/server-fn.mjs +7 -6
- package/dist/server-plugins.cjs +7 -7
- package/dist/server-plugins.d.mts +9 -7
- package/dist/server-plugins.d.ts +9 -7
- package/dist/server-plugins.mjs +6 -6
- package/dist/server-query.cjs +9 -8
- package/dist/server-query.mjs +8 -7
- package/dist/server.cjs +107 -98
- package/dist/server.d.mts +20 -17
- package/dist/server.d.ts +20 -17
- package/dist/server.mjs +78 -69
- package/dist/session-ACVUJ5XV.cjs +23 -0
- package/dist/{session-QZXZOPR2.mjs → session-ASQTJNBK.mjs} +2 -2
- package/dist/{spa-router.d-DCQVtEaE.d.mts → spa-router.d-DXm5J9rM.d.mts} +4 -3
- package/dist/{spa-router.d-DpdJHs1q.d.ts → spa-router.d-cppVufl2.d.ts} +4 -3
- package/dist/ssg.d-CI5OFl8H.d.ts +138 -0
- package/dist/ssg.d-Duzy1wQc.d.mts +138 -0
- package/dist/storage.cjs +4 -2
- package/dist/storage.d.mts +14 -4
- package/dist/storage.d.ts +14 -4
- package/dist/storage.mjs +3 -1
- package/dist/testing.cjs +31 -31
- package/dist/testing.d.mts +7 -5
- package/dist/testing.d.ts +7 -5
- package/dist/testing.mjs +23 -23
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/{types.d-BnIqOn9w.d.ts → types.d-D5cY6XjK.d.mts} +43 -2
- package/dist/{types.d-BnIqOn9w.d.mts → types.d-D5cY6XjK.d.ts} +43 -2
- package/dist/{utils.d-DKDZtAY5.d.mts → utils.d-CNI-I8ZV.d.mts} +1 -1
- package/dist/{utils.d-DmicwMvS.d.ts → utils.d-D3dfy8zh.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +64 -62
- package/dist/vite.d.mts +17 -9
- package/dist/vite.d.ts +17 -9
- package/dist/vite.mjs +63 -61
- package/dist/workflows.cjs +7 -7
- package/dist/workflows.mjs +6 -6
- package/package.json +27 -3
- package/dist/analyzer-6EOYURMV.cjs +0 -16
- package/dist/chunk-D4XGKF67.cjs +0 -127
- package/dist/chunk-MFQGU5CC.mjs +0 -127
- package/dist/chunk-NCIAP562.mjs +0 -27
- package/dist/chunk-QQ44FYRO.cjs +0 -27
- package/dist/chunk-RI3EVPKD.cjs +0 -57
- package/dist/manager-S77ZARTC.cjs +0 -18
- package/dist/native-tree-TAPKR7QJ.cjs +0 -28
- package/dist/session-2Q72D4QV.cjs +0 -23
- /package/dist/{chunk-PMU4U2W2.cjs → chunk-22T75EML.cjs} +0 -0
- /package/dist/{chunk-Z5ZZAGIH.mjs → chunk-LSHUCNIF.mjs} +0 -0
|
@@ -7,10 +7,10 @@ var _chunk3QM74STYcjs = require('./chunk-3QM74STY.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkVJ6L7TIIcjs = require('./chunk-VJ6L7TII.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -38,39 +38,40 @@ var _chunkO47W53D3cjs = require('./chunk-O47W53D3.cjs');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var _chunk56HHUSR5cjs = require('./chunk-56HHUSR5.cjs');
|
|
42
41
|
|
|
43
42
|
|
|
43
|
+
var _chunkDTNWLRRFcjs = require('./chunk-DTNWLRRF.cjs');
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
var _chunkENYBDM4Ucjs = require('./chunk-ENYBDM4U.cjs');
|
|
47
46
|
|
|
48
47
|
|
|
49
|
-
var
|
|
48
|
+
var _chunkQTDIOZV6cjs = require('./chunk-QTDIOZV6.cjs');
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
var _chunk22T75EMLcjs = require('./chunk-22T75EML.cjs');
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
|
|
56
|
-
var
|
|
58
|
+
var _chunk7564NP5Zcjs = require('./chunk-7564NP5Z.cjs');
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
|
|
60
62
|
|
|
61
|
-
var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
|
|
67
|
+
var _chunk6ZFGWB75cjs = require('./chunk-6ZFGWB75.cjs');
|
|
66
68
|
|
|
67
69
|
|
|
70
|
+
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
68
71
|
|
|
69
72
|
|
|
70
|
-
var _chunkO2A6HE76cjs = require('./chunk-O2A6HE76.cjs');
|
|
71
73
|
|
|
72
74
|
|
|
73
|
-
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
74
75
|
|
|
75
76
|
|
|
76
77
|
|
|
@@ -81,17 +82,18 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
81
82
|
|
|
82
83
|
|
|
83
84
|
|
|
85
|
+
var _chunkWILPJVQEcjs = require('./chunk-WILPJVQE.cjs');
|
|
84
86
|
|
|
85
87
|
|
|
88
|
+
var _chunkYRXPDKMMcjs = require('./chunk-YRXPDKMM.cjs');
|
|
86
89
|
|
|
87
90
|
|
|
88
|
-
var
|
|
91
|
+
var _chunkTMVVBK5Scjs = require('./chunk-TMVVBK5S.cjs');
|
|
89
92
|
|
|
90
93
|
|
|
91
|
-
var _chunkVKRMO3EZcjs = require('./chunk-VKRMO3EZ.cjs');
|
|
92
94
|
|
|
93
95
|
|
|
94
|
-
var
|
|
96
|
+
var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
|
|
95
97
|
|
|
96
98
|
|
|
97
99
|
var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
@@ -135,7 +137,9 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
|
135
137
|
|
|
136
138
|
|
|
137
139
|
|
|
138
|
-
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
var _chunkQP4GYVRRcjs = require('./chunk-QP4GYVRR.cjs');
|
|
139
143
|
|
|
140
144
|
|
|
141
145
|
|
|
@@ -149,7 +153,7 @@ var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
|
|
|
149
153
|
var _chunkUVV3I5QAcjs = require('./chunk-UVV3I5QA.cjs');
|
|
150
154
|
|
|
151
155
|
|
|
152
|
-
var
|
|
156
|
+
var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
|
|
153
157
|
|
|
154
158
|
|
|
155
159
|
|
|
@@ -159,10 +163,10 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
|
159
163
|
|
|
160
164
|
|
|
161
165
|
|
|
162
|
-
var
|
|
166
|
+
var _chunkF4ID7BGOcjs = require('./chunk-F4ID7BGO.cjs');
|
|
163
167
|
|
|
164
168
|
|
|
165
|
-
var
|
|
169
|
+
var _chunkWRWJ7IWTcjs = require('./chunk-WRWJ7IWT.cjs');
|
|
166
170
|
|
|
167
171
|
|
|
168
172
|
var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
@@ -192,7 +196,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
|
192
196
|
|
|
193
197
|
|
|
194
198
|
|
|
195
|
-
var
|
|
199
|
+
var _chunkPG7J7XYTcjs = require('./chunk-PG7J7XYT.cjs');
|
|
196
200
|
|
|
197
201
|
|
|
198
202
|
|
|
@@ -204,21 +208,21 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
|
204
208
|
|
|
205
209
|
|
|
206
210
|
|
|
207
|
-
var
|
|
211
|
+
var _chunk2YJ4DHTDcjs = require('./chunk-2YJ4DHTD.cjs');
|
|
208
212
|
|
|
209
213
|
|
|
210
214
|
|
|
211
215
|
|
|
212
216
|
|
|
213
217
|
|
|
214
|
-
var
|
|
218
|
+
var _chunkOWO7KDZ3cjs = require('./chunk-OWO7KDZ3.cjs');
|
|
215
219
|
|
|
216
220
|
|
|
217
221
|
|
|
218
222
|
var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
|
|
219
223
|
|
|
220
224
|
|
|
221
|
-
var
|
|
225
|
+
var _chunkWW62HKA2cjs = require('./chunk-WW62HKA2.cjs');
|
|
222
226
|
|
|
223
227
|
|
|
224
228
|
|
|
@@ -234,10 +238,10 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
234
238
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
235
239
|
|
|
236
240
|
|
|
237
|
-
var
|
|
241
|
+
var _chunkHFJLMALCcjs = require('./chunk-HFJLMALC.cjs');
|
|
238
242
|
|
|
239
243
|
|
|
240
|
-
var
|
|
244
|
+
var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
|
|
241
245
|
|
|
242
246
|
|
|
243
247
|
|
|
@@ -246,15 +250,15 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
|
246
250
|
|
|
247
251
|
|
|
248
252
|
|
|
249
|
-
var
|
|
253
|
+
var _chunk4VLXQ55Ocjs = require('./chunk-4VLXQ55O.cjs');
|
|
250
254
|
|
|
251
255
|
|
|
252
|
-
var
|
|
256
|
+
var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
|
|
253
257
|
|
|
254
258
|
|
|
255
259
|
|
|
256
260
|
|
|
257
|
-
var
|
|
261
|
+
var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
258
262
|
|
|
259
263
|
|
|
260
264
|
var _chunkY3WG64CPcjs = require('./chunk-Y3WG64CP.cjs');
|
|
@@ -267,7 +271,7 @@ var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
|
267
271
|
|
|
268
272
|
|
|
269
273
|
|
|
270
|
-
var
|
|
274
|
+
var _chunk25JGHAGHcjs = require('./chunk-25JGHAGH.cjs');
|
|
271
275
|
|
|
272
276
|
|
|
273
277
|
|
|
@@ -276,7 +280,7 @@ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
|
|
|
276
280
|
|
|
277
281
|
|
|
278
282
|
|
|
279
|
-
var
|
|
283
|
+
var _chunkGC5ROI3Acjs = require('./chunk-GC5ROI3A.cjs');
|
|
280
284
|
|
|
281
285
|
|
|
282
286
|
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
@@ -286,7 +290,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
|
286
290
|
|
|
287
291
|
|
|
288
292
|
|
|
289
|
-
var
|
|
293
|
+
var _chunk7Q7UB4TLcjs = require('./chunk-7Q7UB4TL.cjs');
|
|
290
294
|
|
|
291
295
|
|
|
292
296
|
|
|
@@ -297,7 +301,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
|
297
301
|
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
298
302
|
|
|
299
303
|
|
|
300
|
-
var
|
|
304
|
+
var _chunkXLOORES5cjs = require('./chunk-XLOORES5.cjs');
|
|
301
305
|
|
|
302
306
|
|
|
303
307
|
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
@@ -309,7 +313,8 @@ var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
|
|
|
309
313
|
|
|
310
314
|
|
|
311
315
|
|
|
312
|
-
|
|
316
|
+
|
|
317
|
+
var _chunkY3DO7BIJcjs = require('./chunk-Y3DO7BIJ.cjs');
|
|
313
318
|
|
|
314
319
|
|
|
315
320
|
var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
@@ -321,18 +326,19 @@ var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
|
321
326
|
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
322
327
|
|
|
323
328
|
|
|
329
|
+
|
|
324
330
|
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
325
331
|
|
|
326
332
|
|
|
327
333
|
|
|
328
334
|
|
|
329
335
|
|
|
330
|
-
var
|
|
336
|
+
var _chunkH7OFZJCVcjs = require('./chunk-H7OFZJCV.cjs');
|
|
331
337
|
|
|
332
338
|
|
|
333
339
|
|
|
334
340
|
|
|
335
|
-
var
|
|
341
|
+
var _chunk2RSVYJT6cjs = require('./chunk-2RSVYJT6.cjs');
|
|
336
342
|
|
|
337
343
|
|
|
338
344
|
var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
|
|
@@ -621,7 +627,8 @@ var VITE_MODULE_QUERY_FLAGS = [
|
|
|
621
627
|
];
|
|
622
628
|
var SCRIPT_FETCH_DESTINATIONS = /* @__PURE__ */ new Set(["script", "worker", "sharedworker", "serviceworker"]);
|
|
623
629
|
function isViteModuleRequest(url, headers) {
|
|
624
|
-
if (VITE_MODULE_QUERY_FLAGS.some((flag) => url.searchParams.
|
|
630
|
+
if (VITE_MODULE_QUERY_FLAGS.some((flag) => url.searchParams.getAll(flag).includes("")))
|
|
631
|
+
return true;
|
|
625
632
|
const destination = headers["sec-fetch-dest"];
|
|
626
633
|
const value = Array.isArray(destination) ? destination[0] : destination;
|
|
627
634
|
return value !== void 0 && SCRIPT_FETCH_DESTINATIONS.has(value.toLowerCase());
|
|
@@ -693,7 +700,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
693
700
|
return null;
|
|
694
701
|
}
|
|
695
702
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
696
|
-
return
|
|
703
|
+
return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
|
|
697
704
|
"CLIENT_SERVER_FUNCTION",
|
|
698
705
|
id,
|
|
699
706
|
`${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
|
|
@@ -952,21 +959,21 @@ function readPropertyKey(property) {
|
|
|
952
959
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
953
960
|
switch (finding.kind) {
|
|
954
961
|
case "server-env":
|
|
955
|
-
return
|
|
962
|
+
return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
|
|
956
963
|
"CLIENT_SERVER_ENV",
|
|
957
964
|
file,
|
|
958
965
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
959
966
|
location
|
|
960
967
|
);
|
|
961
968
|
case "public-env":
|
|
962
|
-
return
|
|
969
|
+
return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
|
|
963
970
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
964
971
|
file,
|
|
965
972
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
966
973
|
location
|
|
967
974
|
);
|
|
968
975
|
case "builtin":
|
|
969
|
-
return
|
|
976
|
+
return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
|
|
970
977
|
"CLIENT_NODE_BUILTIN",
|
|
971
978
|
file,
|
|
972
979
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1205,7 +1212,7 @@ function resolveFarmPageDataFailure(error) {
|
|
|
1205
1212
|
}
|
|
1206
1213
|
|
|
1207
1214
|
// src/openapi/dev-status.ts
|
|
1208
|
-
function reportOpenAPIDevGenerationResult(spec, output =
|
|
1215
|
+
function reportOpenAPIDevGenerationResult(spec, output = _chunkGC5ROI3Acjs.logger) {
|
|
1209
1216
|
if (spec) {
|
|
1210
1217
|
output.success("\u2705 OpenAPI documentation enabled");
|
|
1211
1218
|
return;
|
|
@@ -1216,13 +1223,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkQMNWKQL4cjs.logge
|
|
|
1216
1223
|
// src/vite.ts
|
|
1217
1224
|
var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
|
|
1218
1225
|
function farmLlmsTxtGeneratedPaths(config) {
|
|
1219
|
-
const llms =
|
|
1226
|
+
const llms = _chunkWRWJ7IWTcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
|
|
1220
1227
|
if (!llms.enabled) return [];
|
|
1221
1228
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
1222
1229
|
}
|
|
1223
1230
|
function farmAgentGeneratedPaths(config) {
|
|
1224
|
-
const crawlers =
|
|
1225
|
-
const sitemap =
|
|
1231
|
+
const crawlers = _chunkF4ID7BGOcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
|
|
1232
|
+
const sitemap = _chunkF4ID7BGOcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
|
|
1226
1233
|
return [
|
|
1227
1234
|
...farmLlmsTxtGeneratedPaths(config),
|
|
1228
1235
|
...sitemap.enabled ? ["/sitemap.xml"] : [],
|
|
@@ -1261,13 +1268,13 @@ function loadFarmDocsSearchDevRuntime() {
|
|
|
1261
1268
|
return import("./search-client-ZZLKVO5R.cjs");
|
|
1262
1269
|
}
|
|
1263
1270
|
function loadFarmOpenAPIDevRuntime() {
|
|
1264
|
-
return import("./manager-
|
|
1271
|
+
return import("./manager-R7FV4A56.cjs");
|
|
1265
1272
|
}
|
|
1266
1273
|
function loadFarmWorkflowsDevRuntime() {
|
|
1267
1274
|
return import("./workflows.cjs");
|
|
1268
1275
|
}
|
|
1269
1276
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1270
|
-
return import("./devtools-
|
|
1277
|
+
return import("./devtools-3WZIZ7KK.cjs");
|
|
1271
1278
|
}
|
|
1272
1279
|
function loadFarmDevtoolsUIRuntime() {
|
|
1273
1280
|
return import("./devtools-ui-SYRUXUA7.cjs");
|
|
@@ -1298,16 +1305,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1298
1305
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1299
1306
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1300
1307
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1301
|
-
|
|
1302
|
-
new RegExp(`^${
|
|
1308
|
+
_chunkDTNWLRRFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1309
|
+
new RegExp(`^${_chunkQP4GYVRRcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1303
1310
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1304
1311
|
// included.
|
|
1305
1312
|
/^node:/,
|
|
1306
|
-
|
|
1313
|
+
_chunkDTNWLRRFcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1307
1314
|
];
|
|
1308
1315
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1309
|
-
|
|
1310
|
-
new RegExp(`^${
|
|
1316
|
+
_chunkDTNWLRRFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1317
|
+
new RegExp(`^${_chunkQP4GYVRRcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1311
1318
|
];
|
|
1312
1319
|
function createFarmPlatformClientModule(platform) {
|
|
1313
1320
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1343,18 +1350,18 @@ function farmIslandContainersPlugin(config) {
|
|
|
1343
1350
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1344
1351
|
return null;
|
|
1345
1352
|
}
|
|
1346
|
-
if (
|
|
1353
|
+
if (_chunkQP4GYVRRcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1347
1354
|
const file = id.split("?", 1)[0];
|
|
1348
|
-
const bindings =
|
|
1355
|
+
const bindings = _chunkQP4GYVRRcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1349
1356
|
if (bindings.length === 0) return null;
|
|
1350
|
-
const grown =
|
|
1357
|
+
const grown = _chunkQP4GYVRRcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1351
1358
|
code,
|
|
1352
1359
|
file,
|
|
1353
1360
|
bindings,
|
|
1354
|
-
reference:
|
|
1361
|
+
reference: _chunkQP4GYVRRcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1355
1362
|
});
|
|
1356
1363
|
if (grown === null) return null;
|
|
1357
|
-
|
|
1364
|
+
_chunkQP4GYVRRcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1358
1365
|
return { code: grown, map: null };
|
|
1359
1366
|
}
|
|
1360
1367
|
};
|
|
@@ -1366,11 +1373,17 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1366
1373
|
name: "farm:server-only-entries",
|
|
1367
1374
|
enforce: "pre",
|
|
1368
1375
|
config(config) {
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1371
|
-
|
|
1376
|
+
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1377
|
+
if (options.distDir) {
|
|
1378
|
+
_chunkQP4GYVRRcjs.usePackageScanCacheFile.call(void 0,
|
|
1379
|
+
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1382
|
+
const bundledPackages = _chunkQP4GYVRRcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1383
|
+
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1384
|
+
_chunkQP4GYVRRcjs.persistPackageScanCache.call(void 0, );
|
|
1372
1385
|
return {
|
|
1373
|
-
optimizeDeps: { rolldownOptions: { plugins: [
|
|
1386
|
+
optimizeDeps: { rolldownOptions: { plugins: [_chunkQP4GYVRRcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
|
|
1374
1387
|
ssr: {
|
|
1375
1388
|
noExternal: [
|
|
1376
1389
|
// Resolve `server-only` here rather than in Node, which would load its throwing build.
|
|
@@ -1378,7 +1391,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1378
1391
|
// Packages Node cannot load as a bundler does (stylesheet imports, `module`-only ESM).
|
|
1379
1392
|
...bundledPackages.map(({ name }) => name)
|
|
1380
1393
|
],
|
|
1381
|
-
...
|
|
1394
|
+
...prebundle
|
|
1382
1395
|
}
|
|
1383
1396
|
};
|
|
1384
1397
|
},
|
|
@@ -1394,8 +1407,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1394
1407
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1395
1408
|
}
|
|
1396
1409
|
this.error(
|
|
1397
|
-
|
|
1398
|
-
|
|
1410
|
+
_chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
|
|
1411
|
+
_chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
|
|
1399
1412
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1400
1413
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1401
1414
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1405,9 +1418,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1405
1418
|
);
|
|
1406
1419
|
}
|
|
1407
1420
|
if (!_optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1408
|
-
return
|
|
1421
|
+
return _chunkQP4GYVRRcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1409
1422
|
}
|
|
1410
|
-
const resolveFrom = importer ?
|
|
1423
|
+
const resolveFrom = importer ? _chunkQP4GYVRRcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1411
1424
|
if (resolveFrom) {
|
|
1412
1425
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1413
1426
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1424,8 +1437,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1424
1437
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1425
1438
|
if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr])) {
|
|
1426
1439
|
this.error(
|
|
1427
|
-
|
|
1428
|
-
|
|
1440
|
+
_chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
|
|
1441
|
+
_chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
|
|
1429
1442
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1430
1443
|
_nullishCoalesce(importer, () => ( id)),
|
|
1431
1444
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1450,7 +1463,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1450
1463
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1451
1464
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
1452
1465
|
}
|
|
1453
|
-
return _nullishCoalesce(
|
|
1466
|
+
return _nullishCoalesce(_chunkQP4GYVRRcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1454
1467
|
}
|
|
1455
1468
|
}
|
|
1456
1469
|
};
|
|
@@ -1483,7 +1496,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1483
1496
|
if (!snapshot) return "";
|
|
1484
1497
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
1485
1498
|
if (snapshot.routing === "none") return runtime;
|
|
1486
|
-
return `${
|
|
1499
|
+
return `${_chunk6ZFGWB75cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1487
1500
|
}
|
|
1488
1501
|
function getPublicEnvDefine(config) {
|
|
1489
1502
|
const publicEnv = _optionalChain([config, 'access', _76 => _76.env, 'optionalAccess', _77 => _77.public]);
|
|
@@ -1507,7 +1520,7 @@ function createRequestFromNodeRequest(req, url, signal) {
|
|
|
1507
1520
|
signal
|
|
1508
1521
|
});
|
|
1509
1522
|
}
|
|
1510
|
-
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request) =>
|
|
1523
|
+
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request) => _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request)) {
|
|
1511
1524
|
const middleware = _chunkP2355C6Ecjs._withAfterNodeMiddleware.call(void 0, handler);
|
|
1512
1525
|
return (req, res, next) => {
|
|
1513
1526
|
const traceUrl = resolveTraceUrl(req);
|
|
@@ -1530,7 +1543,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
1530
1543
|
}
|
|
1531
1544
|
res.statusCode = 500;
|
|
1532
1545
|
res.setHeader("Content-Type", "application/json");
|
|
1533
|
-
res.end(
|
|
1546
|
+
res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1534
1547
|
});
|
|
1535
1548
|
};
|
|
1536
1549
|
}
|
|
@@ -1538,10 +1551,10 @@ function sendFarmDevErrorJSON(res) {
|
|
|
1538
1551
|
res.statusCode = 500;
|
|
1539
1552
|
res.setHeader("Content-Type", "application/json");
|
|
1540
1553
|
res.setHeader("Cache-Control", "private, no-store");
|
|
1541
|
-
res.end(
|
|
1554
|
+
res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1542
1555
|
}
|
|
1543
1556
|
function createFarmDevMiddlewareErrorResponse() {
|
|
1544
|
-
return new Response(
|
|
1557
|
+
return new Response(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
|
|
1545
1558
|
status: 500,
|
|
1546
1559
|
headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
|
|
1547
1560
|
});
|
|
@@ -1553,15 +1566,15 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
|
|
|
1553
1566
|
}
|
|
1554
1567
|
function sendFarmDevRuntimeHookError(res, json) {
|
|
1555
1568
|
setFarmDevRuntimeHookErrorHead(res, json);
|
|
1556
|
-
res.end(json ?
|
|
1569
|
+
res.end(json ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1557
1570
|
}
|
|
1558
1571
|
function opensFarmDevRuntimeSession(pm) {
|
|
1559
|
-
return pm.hasRuntimeRequestHooks() ||
|
|
1572
|
+
return pm.hasRuntimeRequestHooks() || _chunkQTDIOZV6cjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
|
|
1560
1573
|
}
|
|
1561
1574
|
var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1575
|
+
_chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
1576
|
+
_chunkH7OFZJCVcjs.FARM_CONFIG_REDIRECTS_PLUGIN_NAME,
|
|
1577
|
+
_chunkH7OFZJCVcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME
|
|
1565
1578
|
]);
|
|
1566
1579
|
function isFarmConfigRoutePlugin(plugin) {
|
|
1567
1580
|
return FARM_CONFIG_ROUTE_PLUGIN_NAMES.has(plugin.name);
|
|
@@ -1572,7 +1585,7 @@ async function proxyFarmExternalRewrite(req, res, bodySizeLimit) {
|
|
|
1572
1585
|
if (!destination || !/^https?:\/\//i.test(destination)) return false;
|
|
1573
1586
|
let request = createRequestFromNodeRequest(req, new URL(destination));
|
|
1574
1587
|
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
1575
|
-
const body = await
|
|
1588
|
+
const body = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0, req, bodySizeLimit);
|
|
1576
1589
|
request = new Request(request, { method: request.method, body: toRequestBody(body) });
|
|
1577
1590
|
}
|
|
1578
1591
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, await _chunkJRGR5Z4Kcjs.fetchFarmExternalRewrite.call(void 0, request));
|
|
@@ -1669,7 +1682,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1669
1682
|
res.end = originalEnd;
|
|
1670
1683
|
res.writeHead = originalWriteHead;
|
|
1671
1684
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1672
|
-
delete res[
|
|
1685
|
+
delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1673
1686
|
};
|
|
1674
1687
|
let runtimeHookFailed = false;
|
|
1675
1688
|
const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
|
|
@@ -1683,7 +1696,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1683
1696
|
const writeRuntimeHookFailure = () => {
|
|
1684
1697
|
setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
|
|
1685
1698
|
originalWriteHead(500);
|
|
1686
|
-
originalWrite(options.jsonError ?
|
|
1699
|
+
originalWrite(options.jsonError ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1687
1700
|
};
|
|
1688
1701
|
const htmlChunks = [];
|
|
1689
1702
|
const responseChunks = [];
|
|
@@ -1793,7 +1806,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1793
1806
|
});
|
|
1794
1807
|
res.end = ((...args) => {
|
|
1795
1808
|
interceptedEnd = true;
|
|
1796
|
-
res[
|
|
1809
|
+
res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
|
|
1797
1810
|
if (afterResponseCalled) return res;
|
|
1798
1811
|
afterResponseCalled = true;
|
|
1799
1812
|
options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
|
|
@@ -1876,7 +1889,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1876
1889
|
res.end = originalEnd;
|
|
1877
1890
|
res.writeHead = originalWriteHead;
|
|
1878
1891
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1879
|
-
delete res[
|
|
1892
|
+
delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1880
1893
|
originalEnd(...originalEndArgs);
|
|
1881
1894
|
}).catch((error) => {
|
|
1882
1895
|
reportFailure(error);
|
|
@@ -1893,14 +1906,14 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1893
1906
|
res.end = originalEnd;
|
|
1894
1907
|
res.writeHead = originalWriteHead;
|
|
1895
1908
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1896
|
-
delete res[
|
|
1909
|
+
delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1897
1910
|
originalEnd(body, callback);
|
|
1898
1911
|
} else {
|
|
1899
1912
|
res.write = originalWrite;
|
|
1900
1913
|
res.end = originalEnd;
|
|
1901
1914
|
res.writeHead = originalWriteHead;
|
|
1902
1915
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1903
|
-
delete res[
|
|
1916
|
+
delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1904
1917
|
originalEnd(...originalEndArgs);
|
|
1905
1918
|
}
|
|
1906
1919
|
});
|
|
@@ -1961,7 +1974,7 @@ function fileContainsProgrammaticPageRoute(file) {
|
|
|
1961
1974
|
return false;
|
|
1962
1975
|
}
|
|
1963
1976
|
try {
|
|
1964
|
-
return
|
|
1977
|
+
return _chunkYUCU6XB4cjs.scanProgrammaticPagePaths.call(void 0, fs2.readFileSync(file, "utf8")).length > 0;
|
|
1965
1978
|
} catch (e15) {
|
|
1966
1979
|
return false;
|
|
1967
1980
|
}
|
|
@@ -2021,8 +2034,8 @@ function rewriteEarlySsrRelativeImports(options) {
|
|
|
2021
2034
|
const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
|
|
2022
2035
|
const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
|
|
2023
2036
|
const resolvedPath = path6.resolve(path6.dirname(cleanId), sourcePath);
|
|
2024
|
-
const moduleId =
|
|
2025
|
-
const specifier = moduleId.startsWith("/@fs/") ?
|
|
2037
|
+
const moduleId = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, resolvedPath, options.root);
|
|
2038
|
+
const specifier = moduleId.startsWith("/@fs/") ? _chunkGC5ROI3Acjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
|
|
2026
2039
|
replacements.push({
|
|
2027
2040
|
start: source.start,
|
|
2028
2041
|
end: source.end,
|
|
@@ -2064,7 +2077,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2064
2077
|
return null;
|
|
2065
2078
|
}
|
|
2066
2079
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2067
|
-
const everyExportIsComponent = options.code.includes(
|
|
2080
|
+
const everyExportIsComponent = options.code.includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2068
2081
|
const replacements = [];
|
|
2069
2082
|
const wrapperStatements = [];
|
|
2070
2083
|
const originalEntries = [];
|
|
@@ -2215,16 +2228,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2215
2228
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2216
2229
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2217
2230
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2218
|
-
if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(
|
|
2231
|
+
if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkQP4GYVRRcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2219
2232
|
}
|
|
2220
2233
|
findings.push(finding);
|
|
2221
2234
|
}
|
|
2222
2235
|
if (findings.length === 0) return;
|
|
2223
2236
|
warnedClientBoundaryIds.add(id);
|
|
2224
|
-
const locate =
|
|
2225
|
-
|
|
2237
|
+
const locate = _chunkQP4GYVRRcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2238
|
+
_chunkGC5ROI3Acjs.logger.warn(
|
|
2226
2239
|
findings.map(
|
|
2227
|
-
(finding) =>
|
|
2240
|
+
(finding) => _chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
|
|
2228
2241
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2229
2242
|
config.root
|
|
2230
2243
|
)
|
|
@@ -2265,7 +2278,7 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2265
2278
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2266
2279
|
const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2267
2280
|
const imageImports = farmImageImportsPlugin();
|
|
2268
|
-
const fontImports =
|
|
2281
|
+
const fontImports = _chunkDTNWLRRFcjs.farmFontImportsPlugin.call(void 0, {
|
|
2269
2282
|
root: options.root,
|
|
2270
2283
|
basePath: options.basePath,
|
|
2271
2284
|
publicDir: options.publicDir
|
|
@@ -2274,7 +2287,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2274
2287
|
const isFarmGeneratedOutput = (file) => {
|
|
2275
2288
|
const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _105 => _105.getConfig, 'call', _106 => _106(), 'access', _107 => _107.root]), () => ( options.root));
|
|
2276
2289
|
if (!root) return file.includes("/.farm/");
|
|
2277
|
-
const output =
|
|
2290
|
+
const output = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
|
|
2278
2291
|
return file === output || file.startsWith(`${output}/`);
|
|
2279
2292
|
};
|
|
2280
2293
|
let serverFnTransformActive = false;
|
|
@@ -2312,6 +2325,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2312
2325
|
let openAPIManager = null;
|
|
2313
2326
|
let middlewareManager;
|
|
2314
2327
|
let refreshRouteDiscovery = null;
|
|
2328
|
+
const pendingRouteReloads = /* @__PURE__ */ new Set();
|
|
2315
2329
|
let workflowHandler = null;
|
|
2316
2330
|
let isBuild = false;
|
|
2317
2331
|
let farmOwnsDevCors = false;
|
|
@@ -2344,11 +2358,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2344
2358
|
isBuild = configEnv.command === "build";
|
|
2345
2359
|
const farmAliases = {
|
|
2346
2360
|
..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2347
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} :
|
|
2361
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkDTNWLRRFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2348
2362
|
};
|
|
2349
2363
|
if (Object.keys(farmAliases).length > 0) {
|
|
2350
2364
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2351
|
-
userConfig.resolve.alias =
|
|
2365
|
+
userConfig.resolve.alias = _chunkDTNWLRRFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2352
2366
|
}
|
|
2353
2367
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2354
2368
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _127 => _127.server, 'optionalAccess', _128 => _128.cors]) === void 0;
|
|
@@ -2390,7 +2404,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2390
2404
|
);
|
|
2391
2405
|
reactRefreshActive = _chunk3QM74STYcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
2392
2406
|
if (_optionalChain([options, 'access', _134 => _134.experimental, 'optionalAccess', _135 => _135.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
2393
|
-
|
|
2407
|
+
_chunkGC5ROI3Acjs.logger.warn(
|
|
2394
2408
|
"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."
|
|
2395
2409
|
);
|
|
2396
2410
|
}
|
|
@@ -2412,7 +2426,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2412
2426
|
_optionalChain([pm, 'optionalAccess', _142 => _142.getPlugins, 'call', _143 => _143(), 'access', _144 => _144.filter, 'call', _145 => _145(isFarmConfigRoutePlugin), 'access', _146 => _146.map, 'call', _147 => _147((plugin2) => plugin2.name)])
|
|
2413
2427
|
);
|
|
2414
2428
|
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _148 => _148.getPlugins, 'call', _149 => _149()]), () => ( []))).flatMap((plugin2) => {
|
|
2415
|
-
const matcher =
|
|
2429
|
+
const matcher = _chunkH7OFZJCVcjs.getConfigRedirectMatcher.call(void 0, plugin2);
|
|
2416
2430
|
return matcher ? [matcher] : [];
|
|
2417
2431
|
});
|
|
2418
2432
|
const emitPluginError = async (phase, error, meta) => {
|
|
@@ -2422,7 +2436,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2422
2436
|
} catch (e21) {
|
|
2423
2437
|
}
|
|
2424
2438
|
};
|
|
2425
|
-
farmApp = new (0,
|
|
2439
|
+
farmApp = new (0, _chunkDTNWLRRFcjs.FarmApp)(
|
|
2426
2440
|
{
|
|
2427
2441
|
...options,
|
|
2428
2442
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2430,7 +2444,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2430
2444
|
server
|
|
2431
2445
|
);
|
|
2432
2446
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2433
|
-
|
|
2447
|
+
_chunkQP4GYVRRcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2434
2448
|
farmApp.getConfig().root,
|
|
2435
2449
|
options.distDir || ".farm"
|
|
2436
2450
|
)
|
|
@@ -2441,15 +2455,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2441
2455
|
let farmAppPackages;
|
|
2442
2456
|
if (_optionalChain([farmConfig, 'access', _150 => _150.agent, 'optionalAccess', _151 => _151.noindexPreviews])) {
|
|
2443
2457
|
farmMiddlewares.use((_req, res, next) => {
|
|
2444
|
-
if (
|
|
2445
|
-
res.setHeader("X-Robots-Tag",
|
|
2458
|
+
if (_chunkTMVVBK5Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2459
|
+
res.setHeader("X-Robots-Tag", _chunkF4ID7BGOcjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2446
2460
|
}
|
|
2447
2461
|
next();
|
|
2448
2462
|
});
|
|
2449
2463
|
}
|
|
2450
2464
|
const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2451
2465
|
const devBuiltInRoutePaths = new Set(
|
|
2452
|
-
|
|
2466
|
+
_chunkWILPJVQEcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2453
2467
|
agent: {
|
|
2454
2468
|
apiCatalog: true,
|
|
2455
2469
|
mcp: true,
|
|
@@ -2460,12 +2474,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2460
2474
|
openapi: options.openapi
|
|
2461
2475
|
})
|
|
2462
2476
|
);
|
|
2463
|
-
const serverConfig =
|
|
2477
|
+
const serverConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, farmConfig.server);
|
|
2464
2478
|
globalThis.__FARM_IMAGE_CONFIG__ = _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0, farmConfig.images);
|
|
2465
2479
|
let imageHandler = null;
|
|
2466
2480
|
if (farmConfig.images.provider !== "none") {
|
|
2467
2481
|
const { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } = await import("./image/sharp.cjs");
|
|
2468
|
-
imageHandler =
|
|
2482
|
+
imageHandler = _chunkRDADQG5Scjs.createFarmImageHandler.call(void 0, farmConfig.images, {
|
|
2469
2483
|
transform: createSharpImageTransformer(),
|
|
2470
2484
|
fetchRemote: createNodeImageFetcher(farmConfig.images),
|
|
2471
2485
|
validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
|
|
@@ -2473,7 +2487,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2473
2487
|
// a caller-controlled Host header.
|
|
2474
2488
|
trustedLocalOrigin: () => _optionalChain([server, 'access', _152 => _152.resolvedUrls, 'optionalAccess', _153 => _153.local, 'access', _154 => _154[0]]),
|
|
2475
2489
|
onError(error) {
|
|
2476
|
-
|
|
2490
|
+
_chunkGC5ROI3Acjs.logger.error(
|
|
2477
2491
|
`Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2478
2492
|
);
|
|
2479
2493
|
}
|
|
@@ -2499,7 +2513,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2499
2513
|
);
|
|
2500
2514
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2501
2515
|
try {
|
|
2502
|
-
const result = await
|
|
2516
|
+
const result = await _chunk7564NP5Zcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2503
2517
|
root: farmConfig.root,
|
|
2504
2518
|
srcDir: farmConfig.srcDir,
|
|
2505
2519
|
layers: farmConfig.layers,
|
|
@@ -2528,7 +2542,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2528
2542
|
}
|
|
2529
2543
|
} catch (e) {
|
|
2530
2544
|
const message = e instanceof Error ? e.message : String(e);
|
|
2531
|
-
|
|
2545
|
+
_chunkGC5ROI3Acjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
2532
2546
|
if (pm) {
|
|
2533
2547
|
await emitPluginError("type-artifact-generation", e, { reason });
|
|
2534
2548
|
}
|
|
@@ -2557,7 +2571,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2557
2571
|
};
|
|
2558
2572
|
const isProgrammaticRouteFile = (file) => {
|
|
2559
2573
|
const normalized = file.replace(/\\/g, "/");
|
|
2560
|
-
return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) &&
|
|
2574
|
+
return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) && _chunkYUCU6XB4cjs.isProgrammaticRoutesFileName.call(void 0, normalized);
|
|
2561
2575
|
};
|
|
2562
2576
|
const isProgrammaticRouteSourceFile = (file) => {
|
|
2563
2577
|
const normalized = file.replace(/\\/g, "/");
|
|
@@ -2578,10 +2592,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2578
2592
|
let typeArtifactGenScheduled = null;
|
|
2579
2593
|
let pendingTypeArtifacts = createEmptyTypeArtifactSelection();
|
|
2580
2594
|
let pendingTypeArtifactReason = "";
|
|
2581
|
-
let
|
|
2582
|
-
let pendingRouteRefreshIncludesMiddleware = false;
|
|
2595
|
+
let queuedRouteFiles;
|
|
2583
2596
|
const scheduleTypeArtifactGen = (file, event, selection) => {
|
|
2584
|
-
const normalizedFile =
|
|
2597
|
+
const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
|
|
2585
2598
|
for (const [artifact, enabled] of Object.entries(selection)) {
|
|
2586
2599
|
if (enabled) {
|
|
2587
2600
|
pendingTypeArtifacts[artifact] = true;
|
|
@@ -2602,7 +2615,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2602
2615
|
["add", "change", "unlink"].forEach((ev) => {
|
|
2603
2616
|
server.watcher.on(ev, (file) => {
|
|
2604
2617
|
if (ev === "add") {
|
|
2605
|
-
|
|
2618
|
+
_chunk25JGHAGHcjs.invalidateFailedFarmDevModules.call(void 0, server);
|
|
2606
2619
|
}
|
|
2607
2620
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
2608
2621
|
const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
|
|
@@ -2618,24 +2631,33 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2618
2631
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
2619
2632
|
}
|
|
2620
2633
|
if (isI18nCatalogFile(file)) {
|
|
2621
|
-
_optionalChain([farmApp, 'optionalAccess', _162 => _162.getI18nRuntime, 'call', _163 => _163(), 'access', _164 => _164.reload, 'call', _165 => _165(), 'access', _166 => _166.then, 'call', _167 => _167(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _168 => _168.catch, 'call', _169 => _169((error) =>
|
|
2634
|
+
_optionalChain([farmApp, 'optionalAccess', _162 => _162.getI18nRuntime, 'call', _163 => _163(), 'access', _164 => _164.reload, 'call', _165 => _165(), 'access', _166 => _166.then, 'call', _167 => _167(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _168 => _168.catch, 'call', _169 => _169((error) => _chunkGC5ROI3Acjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
2622
2635
|
}
|
|
2623
2636
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2624
2637
|
if (isRouteRefreshEvent) {
|
|
2625
|
-
if (
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2638
|
+
if (!queuedRouteFiles) {
|
|
2639
|
+
const files = /* @__PURE__ */ new Set();
|
|
2640
|
+
queuedRouteFiles = files;
|
|
2641
|
+
pendingRouteReloads.add(files);
|
|
2642
|
+
setTimeout(async () => {
|
|
2643
|
+
queuedRouteFiles = void 0;
|
|
2644
|
+
try {
|
|
2645
|
+
await Promise.all([
|
|
2646
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _170 => _170(`${ev} ${file}`)]),
|
|
2647
|
+
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _171 => _171.reload, 'call', _172 => _172()]) : void 0
|
|
2648
|
+
]);
|
|
2649
|
+
if (pendingRouteReloads.size === 1)
|
|
2650
|
+
server.ws.send({ type: "full-reload", path: "*" });
|
|
2651
|
+
} catch (error) {
|
|
2652
|
+
_chunkGC5ROI3Acjs.logger.warn(
|
|
2653
|
+
`Route refresh failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2654
|
+
);
|
|
2655
|
+
} finally {
|
|
2656
|
+
pendingRouteReloads.delete(files);
|
|
2657
|
+
}
|
|
2637
2658
|
}, 50);
|
|
2638
2659
|
}
|
|
2660
|
+
queuedRouteFiles.add(normalizedFile);
|
|
2639
2661
|
}
|
|
2640
2662
|
});
|
|
2641
2663
|
});
|
|
@@ -2669,7 +2691,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2669
2691
|
const dispatchToDevServer = _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server);
|
|
2670
2692
|
if (options.mobileClient) {
|
|
2671
2693
|
const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
|
|
2672
|
-
const load = (file) =>
|
|
2694
|
+
const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
|
|
2673
2695
|
globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
|
|
2674
2696
|
_optionalChain([server, 'access', _173 => _173.httpServer, 'optionalAccess', _174 => _174.once, 'call', _175 => _175("close", () => {
|
|
2675
2697
|
const globals = globalThis;
|
|
@@ -2678,7 +2700,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2678
2700
|
}
|
|
2679
2701
|
})]);
|
|
2680
2702
|
}
|
|
2681
|
-
apiRouteManager = new (0,
|
|
2703
|
+
apiRouteManager = new (0, _chunkHFJLMALCcjs.APIRouteManager)(appDirs, server, {
|
|
2682
2704
|
plugins: farmConfig.plugins,
|
|
2683
2705
|
i18n: farmApp.getI18nRuntime(),
|
|
2684
2706
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2702,17 +2724,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2702
2724
|
discoveredWorkflows = await discoverFarmWorkflows(
|
|
2703
2725
|
{ ...farmConfig, workflows: workflowConfig },
|
|
2704
2726
|
{
|
|
2705
|
-
loadModule: async (filePath) =>
|
|
2727
|
+
loadModule: async (filePath) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, filePath)
|
|
2706
2728
|
}
|
|
2707
2729
|
);
|
|
2708
2730
|
if (discoveredWorkflows.length > 0) {
|
|
2709
2731
|
workflowHandler = createFarmWorkflowRequestHandler({
|
|
2710
2732
|
workflows: discoveredWorkflows,
|
|
2711
2733
|
config: workflowConfig,
|
|
2712
|
-
loadModule: async (workflow) =>
|
|
2734
|
+
loadModule: async (workflow) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
|
|
2713
2735
|
server: farmConfig.server
|
|
2714
2736
|
});
|
|
2715
|
-
|
|
2737
|
+
_chunkGC5ROI3Acjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
|
|
2716
2738
|
}
|
|
2717
2739
|
}
|
|
2718
2740
|
if (pm) {
|
|
@@ -2724,7 +2746,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2724
2746
|
});
|
|
2725
2747
|
}
|
|
2726
2748
|
}
|
|
2727
|
-
middlewareManager = new (0,
|
|
2749
|
+
middlewareManager = new (0, _chunkWW62HKA2cjs.MiddlewareManager)(
|
|
2728
2750
|
appDirs,
|
|
2729
2751
|
server,
|
|
2730
2752
|
farmConfig.middleware,
|
|
@@ -2768,7 +2790,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2768
2790
|
await openAPIManager.invalidateCache();
|
|
2769
2791
|
}
|
|
2770
2792
|
if (process.env.FARM_VERBOSE) {
|
|
2771
|
-
|
|
2793
|
+
_chunkGC5ROI3Acjs.logger.info(`Refreshed routes: ${reason}`);
|
|
2772
2794
|
}
|
|
2773
2795
|
};
|
|
2774
2796
|
const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
|
|
@@ -2780,7 +2802,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2780
2802
|
return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
2781
2803
|
};
|
|
2782
2804
|
releaseDocsMCPServers();
|
|
2783
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
2805
|
+
const isFarmDocsPathGuarded = (href) => _chunk6ZFGWB75cjs.farmPathGuardCoversPage.call(void 0,
|
|
2784
2806
|
{
|
|
2785
2807
|
config: farmConfig,
|
|
2786
2808
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2793,7 +2815,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2793
2815
|
clientEntry: "/@farm/client.js",
|
|
2794
2816
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2795
2817
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2796
|
-
globalStylesheetHref:
|
|
2818
|
+
globalStylesheetHref: _chunkDTNWLRRFcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2797
2819
|
farmConfig.root,
|
|
2798
2820
|
farmConfig.srcDir
|
|
2799
2821
|
),
|
|
@@ -2806,10 +2828,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2806
2828
|
_url.pathToFileURL.call(void 0, file).href
|
|
2807
2829
|
);
|
|
2808
2830
|
}
|
|
2809
|
-
return
|
|
2831
|
+
return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _184 => _184.id]), () => ( specifier)));
|
|
2810
2832
|
},
|
|
2811
2833
|
registerMCPServer: (mcpServer) => {
|
|
2812
|
-
const dispose =
|
|
2834
|
+
const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
2813
2835
|
docsMCPServerDisposers.add(dispose);
|
|
2814
2836
|
return () => {
|
|
2815
2837
|
docsMCPServerDisposers.delete(dispose);
|
|
@@ -2824,7 +2846,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2824
2846
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2825
2847
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2826
2848
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2827
|
-
globalStylesheetHref:
|
|
2849
|
+
globalStylesheetHref: _chunkDTNWLRRFcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2828
2850
|
farmConfig.root,
|
|
2829
2851
|
farmConfig.srcDir
|
|
2830
2852
|
),
|
|
@@ -2844,7 +2866,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2844
2866
|
}).then(
|
|
2845
2867
|
(pages) => new Set(pages),
|
|
2846
2868
|
(error) => {
|
|
2847
|
-
|
|
2869
|
+
_chunkGC5ROI3Acjs.logger.warn(
|
|
2848
2870
|
`Farm Infra analytics reports docs pages by the docs route, not each page's path: listing them failed (${error instanceof Error ? error.message : String(error)}).`
|
|
2849
2871
|
);
|
|
2850
2872
|
return void 0;
|
|
@@ -2859,108 +2881,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2859
2881
|
});
|
|
2860
2882
|
}
|
|
2861
2883
|
}
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
const pathname = new URL(request.url).pathname;
|
|
2867
|
-
const matchedRoute = routeManager.matchRoute(pathname);
|
|
2868
|
-
const layoutEntries = matchedRoute.layouts.map((layout) => ({
|
|
2869
|
-
...layout,
|
|
2870
|
-
metadata: _chunkNXGQIXR7cjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
|
|
2871
|
-
}));
|
|
2872
|
-
if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
|
|
2873
|
-
return response;
|
|
2874
|
-
}
|
|
2875
|
-
const source = await response.text();
|
|
2876
|
-
const bodyMatch = source.match(/<body([^>]*)>([\s\S]*?)<\/body>/i);
|
|
2877
|
-
if (!bodyMatch) {
|
|
2878
|
-
return new Response(source, {
|
|
2879
|
-
status: response.status,
|
|
2880
|
-
statusText: response.statusText,
|
|
2881
|
-
headers: response.headers
|
|
2882
|
-
});
|
|
2883
|
-
}
|
|
2884
|
-
const docsRenderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _196 => _196.getConfig, 'call', _197 => _197()]), () => ( options))).renderer);
|
|
2885
|
-
const [rendererRuntime, layoutModules] = await Promise.all([
|
|
2886
|
-
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
|
|
2887
|
-
Promise.all(
|
|
2888
|
-
layoutEntries.map((layout) => routeManager.loadLayoutModule(layout.modulePath))
|
|
2889
|
-
)
|
|
2890
|
-
]);
|
|
2891
|
-
const hydrationStrategies = layoutEntries.flatMap(
|
|
2892
|
-
(layout) => layout.metadata.shouldHydrate && layout.metadata.islandStrategy ? [layout.metadata.islandStrategy] : []
|
|
2893
|
-
);
|
|
2894
|
-
const islandStrategy = hydrationStrategies.every(
|
|
2895
|
-
(strategy) => strategy === hydrationStrategies[0]
|
|
2896
|
-
) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
|
|
2897
|
-
const params = matchedRoute.params || {};
|
|
2898
|
-
const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
|
|
2899
|
-
const clientLayouts = Object.fromEntries(
|
|
2900
|
-
layoutEntries.map((layout) => [
|
|
2901
|
-
layout.pattern,
|
|
2902
|
-
{
|
|
2903
|
-
modulePath: toUrlPath(layout.modulePath),
|
|
2904
|
-
pattern: layout.pattern,
|
|
2905
|
-
shouldHydrate: layout.metadata.shouldHydrate,
|
|
2906
|
-
islandStrategy: layout.metadata.islandStrategy,
|
|
2907
|
-
preloads: [toUrlPath(layout.modulePath)],
|
|
2908
|
-
assets: []
|
|
2909
|
-
}
|
|
2910
|
-
])
|
|
2911
|
-
);
|
|
2912
|
-
const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
|
|
2913
|
-
const pageModulePath = _optionalChain([matchedRoute, 'access', _198 => _198.route, 'optionalAccess', _199 => _199.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
|
|
2914
|
-
const bootstrapScript = `<script>
|
|
2915
|
-
window.__FARM_PROPS__ = ${inlineValue({ params })};
|
|
2916
|
-
window.__FARM_ROUTE_SLOTS__ = [];
|
|
2917
|
-
window.__FARM_DEPLOYMENT_ID__ = ${inlineValue(farmConfig.deploymentId)};
|
|
2918
|
-
window.__FARM_PATH__ = ${inlineValue(pathname)};
|
|
2919
|
-
window.__FARM_IS_CLIENT__ = false;
|
|
2920
|
-
window.__FARM_PAGE_SHOULD_HYDRATE__ = false;
|
|
2921
|
-
window.__FARM_LAYOUT_SHOULD_HYDRATE__ = true;
|
|
2922
|
-
window.__FARM_SHOULD_HYDRATE__ = true;
|
|
2923
|
-
window.__FARM_ISLAND_STRATEGY__ = ${inlineValue(islandStrategy)};
|
|
2924
|
-
window.__FARM_PAGE_MODULE__ = ${inlineValue(pageModulePath)};
|
|
2925
|
-
window.__FARM_LOADING_MODULE__ = null;
|
|
2926
|
-
window.__FARM_MANIFEST__ = ${inlineValue({
|
|
2927
|
-
routes: {},
|
|
2928
|
-
layouts: clientLayouts,
|
|
2929
|
-
slots: [],
|
|
2930
|
-
clientEntry: "/@farm/client.js",
|
|
2931
|
-
sharedAssets: []
|
|
2932
|
-
})};
|
|
2933
|
-
</script>`;
|
|
2934
|
-
let wrappedElement = rendererRuntime.createElement("div", {
|
|
2935
|
-
id: "__farm_page__",
|
|
2936
|
-
"data-farm-client": "false",
|
|
2937
|
-
"data-farm-layout-client": "true",
|
|
2938
|
-
"data-farm-island": "page",
|
|
2939
|
-
"data-farm-island-strategy": islandStrategy,
|
|
2940
|
-
dangerouslySetInnerHTML: { __html: bootstrapScript + bodyMatch[2] }
|
|
2884
|
+
if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
|
|
2885
|
+
const docsContentDirs = farmDocsDevRuntime.getFarmDocsContentDirs(farmConfig.docs, {
|
|
2886
|
+
root: farmConfig.root,
|
|
2887
|
+
srcDir: farmConfig.srcDir
|
|
2941
2888
|
});
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2889
|
+
server.watcher.add(docsContentDirs);
|
|
2890
|
+
for (const event of ["add", "change", "unlink"]) {
|
|
2891
|
+
server.watcher.on(event, (file) => {
|
|
2892
|
+
const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
|
|
2893
|
+
if (appDirSlugs.some((appDir) => normalizedFile.startsWith(`${appDir}/`))) return;
|
|
2894
|
+
const contentDirs = docsContentDirs.filter(
|
|
2895
|
+
(contentDir) => farmDocsDevRuntime.isFarmDocsContentFile(contentDir, file)
|
|
2896
|
+
);
|
|
2897
|
+
if (contentDirs.length === 0) return;
|
|
2898
|
+
for (const contentDir of contentDirs) {
|
|
2899
|
+
farmDocsDevRuntime.invalidateFarmDocsLastModified(contentDir);
|
|
2900
|
+
}
|
|
2901
|
+
logUpdate(
|
|
2902
|
+
"PAGE",
|
|
2903
|
+
`${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, path6.relative(farmConfig.root, file))}`
|
|
2904
|
+
);
|
|
2905
|
+
server.ws.send({ type: "full-reload", path: "*" });
|
|
2906
|
+
});
|
|
2950
2907
|
}
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
);
|
|
2954
|
-
const html = source.replace(bodyMatch[0], `<body${bodyMatch[1]}>${rootMarkup}</body>`);
|
|
2955
|
-
const headers = new Headers(response.headers);
|
|
2956
|
-
headers.delete("content-length");
|
|
2957
|
-
headers.delete("etag");
|
|
2958
|
-
return new Response(html, {
|
|
2959
|
-
status: response.status,
|
|
2960
|
-
statusText: response.statusText,
|
|
2961
|
-
headers
|
|
2962
|
-
});
|
|
2963
|
-
};
|
|
2908
|
+
}
|
|
2909
|
+
const wrapFarmDocsResponseWithLayouts = (request, response) => farmApp.getServerRenderer().wrapDocsResponseWithLayouts(request, response);
|
|
2964
2910
|
const farmDocsAPIHandler = farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs) ? farmDocsDevRuntime.createFarmDocsAPIHandler({
|
|
2965
2911
|
rootDir: farmConfig.root,
|
|
2966
2912
|
srcDir: farmConfig.srcDir,
|
|
@@ -3007,9 +2953,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3007
2953
|
}
|
|
3008
2954
|
},
|
|
3009
2955
|
(request) => {
|
|
3010
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3011
|
-
const currentServerConfig =
|
|
3012
|
-
return
|
|
2956
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _189 => _189.getConfig, 'call', _190 => _190()]), () => ( options));
|
|
2957
|
+
const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2958
|
+
return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
|
|
3013
2959
|
trustProxy: currentServerConfig.trustProxy
|
|
3014
2960
|
});
|
|
3015
2961
|
}
|
|
@@ -3023,9 +2969,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3023
2969
|
withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
|
|
3024
2970
|
const requestUrl = req.url || "/";
|
|
3025
2971
|
const requestMethod = req.method || "GET";
|
|
3026
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3027
|
-
const currentServerConfig =
|
|
3028
|
-
const parsedRequestUrl =
|
|
2972
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _191 => _191.getConfig, 'call', _192 => _192()]), () => ( options));
|
|
2973
|
+
const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
2974
|
+
const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3029
2975
|
trustProxy: currentServerConfig.trustProxy
|
|
3030
2976
|
});
|
|
3031
2977
|
const fullUrl = parsedRequestUrl.toString();
|
|
@@ -3046,7 +2992,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3046
2992
|
}
|
|
3047
2993
|
}
|
|
3048
2994
|
if (requestMethod === "OPTIONS" && req.headers.origin && req.headers["access-control-request-method"]) {
|
|
3049
|
-
const preflightHeaders =
|
|
2995
|
+
const preflightHeaders = _chunkIIHZ2BEEcjs.resolveRouteRuleCorsPreflightHeaders.call(void 0,
|
|
3050
2996
|
currentConfig.routeRules,
|
|
3051
2997
|
requestPathname
|
|
3052
2998
|
);
|
|
@@ -3065,6 +3011,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3065
3011
|
return;
|
|
3066
3012
|
}
|
|
3067
3013
|
}
|
|
3014
|
+
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3015
|
+
res.statusCode = 200;
|
|
3016
|
+
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3017
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkDTNWLRRFcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3018
|
+
return;
|
|
3019
|
+
}
|
|
3068
3020
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
3069
3021
|
if ((requestMethod === "GET" || requestMethod === "HEAD") && farmDocsFontPath && fs2.existsSync(farmDocsFontPath)) {
|
|
3070
3022
|
res.statusCode = 200;
|
|
@@ -3117,7 +3069,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3117
3069
|
openapi: options.openapi
|
|
3118
3070
|
},
|
|
3119
3071
|
workflows: discoveredWorkflows,
|
|
3120
|
-
plugins: _optionalChain([pm, 'optionalAccess',
|
|
3072
|
+
plugins: _optionalChain([pm, 'optionalAccess', _193 => _193.getSortedPlugins, 'call', _194 => _194()])
|
|
3121
3073
|
});
|
|
3122
3074
|
res.statusCode = 200;
|
|
3123
3075
|
res.setHeader(
|
|
@@ -3130,7 +3082,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3130
3082
|
} else {
|
|
3131
3083
|
if (!warnedDeprecatedDevtoolsDashboard) {
|
|
3132
3084
|
warnedDeprecatedDevtoolsDashboard = true;
|
|
3133
|
-
|
|
3085
|
+
_chunkGC5ROI3Acjs.logger.warn(
|
|
3134
3086
|
"The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
|
|
3135
3087
|
);
|
|
3136
3088
|
}
|
|
@@ -3141,7 +3093,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3141
3093
|
}
|
|
3142
3094
|
const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
|
|
3143
3095
|
const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
|
|
3144
|
-
const runtimeHookErrorAnswersJSON = rendererDisabled ||
|
|
3096
|
+
const runtimeHookErrorAnswersJSON = rendererDisabled || _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
|
|
3145
3097
|
const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
|
|
3146
3098
|
let pageHookRouteMatch;
|
|
3147
3099
|
const pageHookRoute = () => {
|
|
@@ -3152,10 +3104,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3152
3104
|
render: {
|
|
3153
3105
|
pathname: pathname2,
|
|
3154
3106
|
method: requestMethod,
|
|
3155
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
3156
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
3107
|
+
routePattern: _optionalChain([match, 'optionalAccess', _195 => _195.route, 'optionalAccess', _196 => _196.pattern]) || null,
|
|
3108
|
+
params: _optionalChain([match, 'optionalAccess', _197 => _197.params]) || {}
|
|
3157
3109
|
},
|
|
3158
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
3110
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _198 => _198.layouts]) || []).map((layout) => layout.pattern)
|
|
3159
3111
|
};
|
|
3160
3112
|
return pageHookRouteMatch;
|
|
3161
3113
|
};
|
|
@@ -3190,13 +3142,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3190
3142
|
};
|
|
3191
3143
|
const meetsRequestedURLRoutes = configRewriteSource === void 0 && !deferredDottedRequests.has(req);
|
|
3192
3144
|
const routeRedirect = meetsRequestedURLRoutes ? farmApp.getRouteManager().matchRedirect(requestPathname, parsedRequestUrl.search) : null;
|
|
3193
|
-
if (meetsRequestedURLRoutes && (routeRedirect || pm && (configRoutePlugins.has(
|
|
3145
|
+
if (meetsRequestedURLRoutes && (routeRedirect || pm && (configRoutePlugins.has(_chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME) || configRedirectMatchers.length > 0)) && !isViteOwnedRequest()) {
|
|
3194
3146
|
let redirect = routeRedirect;
|
|
3195
3147
|
try {
|
|
3196
3148
|
if (pm) {
|
|
3197
3149
|
await pm.runHookParallelFiltered(
|
|
3198
3150
|
"beforeRequest",
|
|
3199
|
-
(plugin2) => plugin2.name ===
|
|
3151
|
+
(plugin2) => plugin2.name === _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
3200
3152
|
req,
|
|
3201
3153
|
res
|
|
3202
3154
|
);
|
|
@@ -3222,7 +3174,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3222
3174
|
const redirectResponse = response;
|
|
3223
3175
|
try {
|
|
3224
3176
|
const metadataRoute = matchAppMetadataRoute(requestPathname);
|
|
3225
|
-
const kind = metadataRoute ? "asset" :
|
|
3177
|
+
const kind = metadataRoute ? "asset" : _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
|
|
3226
3178
|
response = await pm.runRuntimeRequest(
|
|
3227
3179
|
createRequestFromNodeRequest(req, parsedRequestUrl),
|
|
3228
3180
|
async () => {
|
|
@@ -3243,7 +3195,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3243
3195
|
}
|
|
3244
3196
|
}
|
|
3245
3197
|
const runAppMiddlewareForContentRoute = async () => {
|
|
3246
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
3198
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _199 => _199.hasMiddleware, 'call', _200 => _200()])) return false;
|
|
3247
3199
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
3248
3200
|
return runFarmMiddlewareWithNavigation(
|
|
3249
3201
|
farmApp.getServerRenderer(),
|
|
@@ -3281,7 +3233,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3281
3233
|
return response.status;
|
|
3282
3234
|
};
|
|
3283
3235
|
const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
|
|
3284
|
-
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess',
|
|
3236
|
+
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _201 => _201.hasRuntimeHook, 'call', _202 => _202("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _203 => _203.hasMiddleware, 'call', _204 => _204()]) ? interceptFarmDevPageResponse({
|
|
3285
3237
|
req,
|
|
3286
3238
|
res,
|
|
3287
3239
|
pm,
|
|
@@ -3294,7 +3246,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3294
3246
|
urlPath: requestUrl,
|
|
3295
3247
|
pathname: requestPathname,
|
|
3296
3248
|
startTime: Date.now(),
|
|
3297
|
-
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall',
|
|
3249
|
+
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _205 => _205(status)]),
|
|
3298
3250
|
// The runtime reports a runtime.after failure itself.
|
|
3299
3251
|
emitError: async () => {
|
|
3300
3252
|
},
|
|
@@ -3305,7 +3257,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3305
3257
|
handled = await runAppMiddlewareForContentRoute();
|
|
3306
3258
|
} catch (error) {
|
|
3307
3259
|
if (runtimeHookErrorAnswersJSON || res.headersSent) {
|
|
3308
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3260
|
+
_optionalChain([interceptor, 'optionalAccess', _206 => _206.release, 'call', _207 => _207()]);
|
|
3309
3261
|
throw error;
|
|
3310
3262
|
}
|
|
3311
3263
|
if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
|
|
@@ -3313,10 +3265,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3313
3265
|
return true;
|
|
3314
3266
|
}
|
|
3315
3267
|
if (!handled) {
|
|
3316
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3268
|
+
_optionalChain([interceptor, 'optionalAccess', _208 => _208.release, 'call', _209 => _209()]);
|
|
3317
3269
|
return false;
|
|
3318
3270
|
}
|
|
3319
|
-
if (!_optionalChain([interceptor, 'optionalAccess',
|
|
3271
|
+
if (!_optionalChain([interceptor, 'optionalAccess', _210 => _210.isEnded, 'call', _211 => _211()])) _optionalChain([logResponse2, 'optionalCall', _212 => _212(res.statusCode || 200)]);
|
|
3320
3272
|
return true;
|
|
3321
3273
|
};
|
|
3322
3274
|
const serveBuiltInRoute = async (respond, {
|
|
@@ -3325,7 +3277,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3325
3277
|
label
|
|
3326
3278
|
} = {}) => {
|
|
3327
3279
|
const discard = async () => {
|
|
3328
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
3280
|
+
await _optionalChain([computed, 'optionalAccess', _213 => _213.body, 'optionalAccess', _214 => _214.cancel, 'call', _215 => _215(), 'access', _216 => _216.catch, 'call', _217 => _217(() => {
|
|
3329
3281
|
})]);
|
|
3330
3282
|
};
|
|
3331
3283
|
const sendRuntimeResponse = async (runtimeSession3, response2) => {
|
|
@@ -3342,9 +3294,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3342
3294
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3343
3295
|
try {
|
|
3344
3296
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3345
|
-
const route =
|
|
3297
|
+
const route = _chunkWILPJVQEcjs.setFarmRouteLabel.call(void 0,
|
|
3346
3298
|
{ pathname: requestPathname },
|
|
3347
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3299
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkWILPJVQEcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3348
3300
|
);
|
|
3349
3301
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3350
3302
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3382,11 +3334,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3382
3334
|
}
|
|
3383
3335
|
responding = true;
|
|
3384
3336
|
response = await respond(
|
|
3385
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
3337
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _218 => _218.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
3386
3338
|
);
|
|
3387
3339
|
} catch (error) {
|
|
3388
3340
|
if (!responding && !res.headersSent) {
|
|
3389
|
-
|
|
3341
|
+
_chunkGC5ROI3Acjs.logger.error(`Middleware error: ${error}`);
|
|
3390
3342
|
await discard();
|
|
3391
3343
|
await sendMiddlewareErrorJSON(runtimeSession2, error);
|
|
3392
3344
|
return;
|
|
@@ -3402,7 +3354,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3402
3354
|
else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3403
3355
|
};
|
|
3404
3356
|
const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
3405
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
3357
|
+
if (openAPIManager && _optionalChain([options, 'access', _219 => _219.openapi, 'optionalAccess', _220 => _220.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
3406
3358
|
const specManager = openAPIManager;
|
|
3407
3359
|
await serveBuiltInRoute(async () => {
|
|
3408
3360
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -3422,7 +3374,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3422
3374
|
});
|
|
3423
3375
|
return;
|
|
3424
3376
|
}
|
|
3425
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
3377
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _221 => _221.openapi, 'optionalAccess', _222 => _222.route])) {
|
|
3426
3378
|
const docsManager = openAPIManager;
|
|
3427
3379
|
await serveBuiltInRoute(
|
|
3428
3380
|
async () => {
|
|
@@ -3433,8 +3385,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3433
3385
|
);
|
|
3434
3386
|
return;
|
|
3435
3387
|
}
|
|
3436
|
-
if (_optionalChain([options, 'access',
|
|
3437
|
-
const manifestGuardCoversPath = (path7) =>
|
|
3388
|
+
if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunkWILPJVQEcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3389
|
+
const manifestGuardCoversPath = (path7) => _chunk6ZFGWB75cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3438
3390
|
{
|
|
3439
3391
|
config: farmConfig,
|
|
3440
3392
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -3443,25 +3395,25 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3443
3395
|
apiServerBasePath
|
|
3444
3396
|
);
|
|
3445
3397
|
await serveBuiltInRoute(async () => {
|
|
3446
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3447
|
-
const manifest = await
|
|
3398
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkDTNWLRRFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3399
|
+
const manifest = await _chunkWILPJVQEcjs.createFarmAppManifestResponse.call(void 0,
|
|
3448
3400
|
new Request(parsedRequestUrl, {
|
|
3449
3401
|
method: requestMethod,
|
|
3450
3402
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3451
3403
|
}),
|
|
3452
3404
|
{
|
|
3453
|
-
...
|
|
3405
|
+
..._chunkWILPJVQEcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3454
3406
|
build: "development",
|
|
3455
3407
|
packages: farmAppPackages,
|
|
3456
3408
|
// Read again on each request; unchanged files come from a cache.
|
|
3457
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
3409
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkDTNWLRRFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3458
3410
|
}),
|
|
3459
3411
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3460
3412
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
3461
3413
|
guardCoversPath: manifestGuardCoversPath,
|
|
3462
3414
|
// A docs runtime's MCP server lists its tools when asked, read on each request.
|
|
3463
3415
|
...farmDocsHandler ? {
|
|
3464
|
-
registeredMCP: (request) =>
|
|
3416
|
+
registeredMCP: (request) => _chunkVJ6L7TIIcjs._listFarmRegisteredMCPServerTools.call(void 0, farmDocsHandler, request, {
|
|
3465
3417
|
basePath: farmConfig.basePath,
|
|
3466
3418
|
guardCoversPath: manifestGuardCoversPath
|
|
3467
3419
|
})
|
|
@@ -3472,11 +3424,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3472
3424
|
});
|
|
3473
3425
|
return;
|
|
3474
3426
|
}
|
|
3475
|
-
if (_optionalChain([options, 'access',
|
|
3427
|
+
if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkWILPJVQEcjs.FARM_API_CATALOG_PATH) {
|
|
3476
3428
|
await serveBuiltInRoute(
|
|
3477
|
-
() =>
|
|
3429
|
+
() => _chunkWILPJVQEcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3478
3430
|
requestMethod,
|
|
3479
|
-
|
|
3431
|
+
_chunkWILPJVQEcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3480
3432
|
new Request(parsedRequestUrl, {
|
|
3481
3433
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3482
3434
|
})
|
|
@@ -3484,8 +3436,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3484
3436
|
);
|
|
3485
3437
|
return;
|
|
3486
3438
|
}
|
|
3487
|
-
if (_optionalChain([options, 'access',
|
|
3488
|
-
const aiCatalog =
|
|
3439
|
+
if (_optionalChain([options, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.aiCatalog]) !== false) {
|
|
3440
|
+
const aiCatalog = _chunkWILPJVQEcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3489
3441
|
new Request(parsedRequestUrl, {
|
|
3490
3442
|
method: requestMethod,
|
|
3491
3443
|
headers: {
|
|
@@ -3525,15 +3477,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3525
3477
|
method: requestMethod,
|
|
3526
3478
|
headers: docsHeaders
|
|
3527
3479
|
});
|
|
3528
|
-
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body:
|
|
3480
|
+
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
|
|
3529
3481
|
const docsHandlerRequest = new Request(docsRequest, docsBodyInit);
|
|
3530
|
-
const registeredMCPCalls = await
|
|
3482
|
+
const registeredMCPCalls = await _chunkVJ6L7TIIcjs._readFarmRegisteredMCPCalls.call(void 0,
|
|
3531
3483
|
docsHandlerRequest,
|
|
3532
3484
|
farmConfig.basePath
|
|
3533
3485
|
);
|
|
3534
3486
|
const docsResponse = await farmDocsHandler(docsHandlerRequest);
|
|
3535
3487
|
if (docsResponse) {
|
|
3536
|
-
const docsPage = _optionalChain([docsResponse, 'access',
|
|
3488
|
+
const docsPage = _optionalChain([docsResponse, 'access', _232 => _232.headers, 'access', _233 => _233.get, 'call', _234 => _234("content-type"), 'optionalAccess', _235 => _235.toLowerCase, 'call', _236 => _236(), 'access', _237 => _237.includes, 'call', _238 => _238("text/html")]);
|
|
3537
3489
|
await serveBuiltInRoute(
|
|
3538
3490
|
async (request) => {
|
|
3539
3491
|
if (!docsPage) {
|
|
@@ -3541,9 +3493,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3541
3493
|
docsRequest,
|
|
3542
3494
|
docsResponse
|
|
3543
3495
|
);
|
|
3544
|
-
return
|
|
3496
|
+
return _chunk2RSVYJT6cjs._runWithCurrentRequest.call(void 0,
|
|
3545
3497
|
request,
|
|
3546
|
-
() =>
|
|
3498
|
+
() => _chunkVJ6L7TIIcjs._observeFarmRegisteredMCPResponse.call(void 0, response, registeredMCPCalls)
|
|
3547
3499
|
);
|
|
3548
3500
|
}
|
|
3549
3501
|
const deploymentMismatch = _chunkNLBHLPEOcjs.getFarmDeploymentMismatch.call(void 0,
|
|
@@ -3551,7 +3503,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3551
3503
|
farmConfig.deploymentId
|
|
3552
3504
|
);
|
|
3553
3505
|
if (deploymentMismatch) {
|
|
3554
|
-
await _optionalChain([docsResponse, 'access',
|
|
3506
|
+
await _optionalChain([docsResponse, 'access', _239 => _239.body, 'optionalAccess', _240 => _240.cancel, 'call', _241 => _241()]);
|
|
3555
3507
|
return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
|
|
3556
3508
|
}
|
|
3557
3509
|
return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
|
|
@@ -3567,11 +3519,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3567
3519
|
{
|
|
3568
3520
|
kind: "docs",
|
|
3569
3521
|
computed: docsResponse,
|
|
3570
|
-
label:
|
|
3522
|
+
label: _chunkWILPJVQEcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3571
3523
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3572
3524
|
{
|
|
3573
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3574
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3525
|
+
path: _optionalChain([farmConfig, 'access', _242 => _242.docs, 'optionalAccess', _243 => _243.entry]) || "/docs",
|
|
3526
|
+
roots: _optionalChain([farmConfig, 'access', _244 => _244.docs, 'optionalAccess', _245 => _245.roots, 'optionalAccess', _246 => _246.map, 'call', _247 => _247((root) => root.entry)]),
|
|
3575
3527
|
pages: await getFarmDocsPagePaths()
|
|
3576
3528
|
}
|
|
3577
3529
|
)
|
|
@@ -3580,9 +3532,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3580
3532
|
return;
|
|
3581
3533
|
}
|
|
3582
3534
|
}
|
|
3583
|
-
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access',
|
|
3584
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
3585
|
-
const treeBodyInit = requestMethod === "POST" ? { body:
|
|
3535
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _248 => _248.headers, 'access', _249 => _249.accept, 'optionalAccess', _250 => _250.includes, 'call', _251 => _251(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
3536
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-D3PW64ZL.cjs");
|
|
3537
|
+
const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
|
|
3586
3538
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
3587
3539
|
request: new Request(fullUrl, {
|
|
3588
3540
|
method: requestMethod,
|
|
@@ -3592,24 +3544,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3592
3544
|
// As for the Markdown mirror: this server's own listener, redirects not followed.
|
|
3593
3545
|
renderPage: (request) => _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3594
3546
|
new Request(request, {
|
|
3595
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3547
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3596
3548
|
})
|
|
3597
3549
|
)
|
|
3598
3550
|
});
|
|
3599
3551
|
await serveBuiltInRoute(() => treeResponse, {
|
|
3600
3552
|
computed: treeResponse,
|
|
3601
|
-
label: _nullishCoalesce(_optionalChain([farmApp, 'access',
|
|
3553
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _252 => _252.getRouteManager, 'call', _253 => _253(), 'access', _254 => _254.matchRoute, 'call', _255 => _255(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _256 => _256.route, 'optionalAccess', _257 => _257.pattern]), () => ( null))
|
|
3602
3554
|
});
|
|
3603
3555
|
return;
|
|
3604
3556
|
}
|
|
3605
3557
|
const markdownRouteLabel = () => (
|
|
3606
3558
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3607
|
-
|
|
3559
|
+
_chunkWILPJVQEcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3608
3560
|
toRoutePathname(requestPathname),
|
|
3609
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
3561
|
+
(page) => _optionalChain([farmApp, 'access', _258 => _258.getRouteManager, 'call', _259 => _259(), 'access', _260 => _260.matchRoute, 'call', _261 => _261(page), 'access', _262 => _262.route, 'optionalAccess', _263 => _263.pattern])
|
|
3610
3562
|
)
|
|
3611
3563
|
);
|
|
3612
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
3564
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunkPG7J7XYTcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
3613
3565
|
request: new Request(fullUrl, {
|
|
3614
3566
|
method: requestMethod,
|
|
3615
3567
|
headers: docsHeaders
|
|
@@ -3618,13 +3570,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3618
3570
|
routePathname: toRoutePathname,
|
|
3619
3571
|
resolveSource: async (pathname2) => {
|
|
3620
3572
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
3621
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
3573
|
+
const sourcePath = _optionalChain([match, 'access', _264 => _264.route, 'optionalAccess', _265 => _265.markdownSourcePath]) || (match.route && _chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
3622
3574
|
if (!sourcePath) {
|
|
3623
3575
|
return null;
|
|
3624
3576
|
}
|
|
3625
3577
|
return {
|
|
3626
3578
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3627
|
-
|
|
3579
|
+
// Project-relative, as production sends it: never the machine's path.
|
|
3580
|
+
filePath: _chunkDTNWLRRFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3628
3581
|
};
|
|
3629
3582
|
},
|
|
3630
3583
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -3638,7 +3591,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3638
3591
|
farmApp.getConfig().trailingSlash === true
|
|
3639
3592
|
),
|
|
3640
3593
|
{
|
|
3641
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3594
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3642
3595
|
}
|
|
3643
3596
|
)
|
|
3644
3597
|
)
|
|
@@ -3650,7 +3603,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3650
3603
|
});
|
|
3651
3604
|
return;
|
|
3652
3605
|
}
|
|
3653
|
-
const markdownResponse = viteModuleRequest ? null : await
|
|
3606
|
+
const markdownResponse = viteModuleRequest ? null : await _chunk2YJ4DHTDcjs.createMarkdownMirrorResponse.call(void 0, {
|
|
3654
3607
|
request: new Request(fullUrl, {
|
|
3655
3608
|
method: requestMethod,
|
|
3656
3609
|
headers: docsHeaders
|
|
@@ -3675,7 +3628,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3675
3628
|
headers,
|
|
3676
3629
|
// Only accepted mirrors need disconnect listeners. An earlier
|
|
3677
3630
|
// close (for example while the docs handler ran) must also abort.
|
|
3678
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3631
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3679
3632
|
}
|
|
3680
3633
|
)
|
|
3681
3634
|
);
|
|
@@ -3689,16 +3642,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3689
3642
|
});
|
|
3690
3643
|
return;
|
|
3691
3644
|
}
|
|
3692
|
-
if (!viteModuleRequest &&
|
|
3693
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
3645
|
+
if (!viteModuleRequest && _chunk2YJ4DHTDcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
3646
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkPG7J7XYTcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
|
|
3694
3647
|
if (!markdownRoute.route) {
|
|
3695
3648
|
await serveBuiltInRoute(
|
|
3696
3649
|
() => new Response(
|
|
3697
|
-
|
|
3650
|
+
_chunk2YJ4DHTDcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
|
|
3698
3651
|
{
|
|
3699
3652
|
status: 404,
|
|
3700
3653
|
headers: {
|
|
3701
|
-
"Content-Type":
|
|
3654
|
+
"Content-Type": _chunk2YJ4DHTDcjs.FARM_MARKDOWN_CONTENT_TYPE,
|
|
3702
3655
|
"X-Farm-Markdown-Error": "404",
|
|
3703
3656
|
"Cache-Control": "no-store"
|
|
3704
3657
|
}
|
|
@@ -3708,7 +3661,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3708
3661
|
return;
|
|
3709
3662
|
}
|
|
3710
3663
|
}
|
|
3711
|
-
const markdownPageTarget =
|
|
3664
|
+
const markdownPageTarget = _chunk2YJ4DHTDcjs.resolveMarkdownMirrorTarget.call(void 0,
|
|
3712
3665
|
farmApp.getConfig().md,
|
|
3713
3666
|
requestPathname,
|
|
3714
3667
|
{
|
|
@@ -3733,13 +3686,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3733
3686
|
let workflowBody;
|
|
3734
3687
|
try {
|
|
3735
3688
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
3736
|
-
workflowBody = await
|
|
3689
|
+
workflowBody = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0,
|
|
3737
3690
|
req,
|
|
3738
3691
|
currentServerConfig.bodySizeLimit
|
|
3739
3692
|
);
|
|
3740
3693
|
}
|
|
3741
3694
|
} catch (error) {
|
|
3742
|
-
const response =
|
|
3695
|
+
const response = _chunk7Q7UB4TLcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3743
3696
|
if (!response) throw error;
|
|
3744
3697
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3745
3698
|
return;
|
|
@@ -3749,7 +3702,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3749
3702
|
method: requestMethod,
|
|
3750
3703
|
headers: docsHeaders,
|
|
3751
3704
|
body: toRequestBody(workflowBody),
|
|
3752
|
-
signal:
|
|
3705
|
+
signal: _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3753
3706
|
})
|
|
3754
3707
|
);
|
|
3755
3708
|
if (workflowResponse) {
|
|
@@ -3759,7 +3712,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3759
3712
|
}
|
|
3760
3713
|
const configuredIntegrations = currentConfig.integrations;
|
|
3761
3714
|
const tryConfiguredIntegrationRoute = async () => {
|
|
3762
|
-
const matchedRoute =
|
|
3715
|
+
const matchedRoute = _chunkOWO7KDZ3cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3763
3716
|
pathname: requestPathname,
|
|
3764
3717
|
method: requestMethod
|
|
3765
3718
|
});
|
|
@@ -3773,8 +3726,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3773
3726
|
await pm.runHookParallelFiltered(
|
|
3774
3727
|
"beforeRequest",
|
|
3775
3728
|
(plugin2) => {
|
|
3776
|
-
const owner =
|
|
3777
|
-
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess',
|
|
3729
|
+
const owner = _chunkOWO7KDZ3cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3730
|
+
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _266 => _266.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3778
3731
|
},
|
|
3779
3732
|
req,
|
|
3780
3733
|
res
|
|
@@ -3793,17 +3746,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3793
3746
|
}
|
|
3794
3747
|
let body;
|
|
3795
3748
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
3796
|
-
body = await
|
|
3749
|
+
body = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
3797
3750
|
}
|
|
3798
3751
|
const integrationRequest = new Request(fullUrl, {
|
|
3799
3752
|
method: req.method,
|
|
3800
3753
|
headers,
|
|
3801
3754
|
body: toRequestBody(body),
|
|
3802
|
-
signal:
|
|
3755
|
+
signal: _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3803
3756
|
});
|
|
3804
3757
|
const dispatchIntegration = async (request, runtime) => {
|
|
3805
3758
|
try {
|
|
3806
|
-
const result = await
|
|
3759
|
+
const result = await _chunkOWO7KDZ3cjs.dispatchIntegrationRequest.call(void 0,
|
|
3807
3760
|
{
|
|
3808
3761
|
integration: matchedRoute.integration,
|
|
3809
3762
|
config: currentConfig,
|
|
@@ -3811,16 +3764,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3811
3764
|
isProd: false
|
|
3812
3765
|
},
|
|
3813
3766
|
request,
|
|
3814
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
3767
|
+
{ clientAddress: _optionalChain([req, 'access', _267 => _267.socket, 'optionalAccess', _268 => _268.remoteAddress]) }
|
|
3815
3768
|
);
|
|
3816
3769
|
if (!result) {
|
|
3817
3770
|
throw new Error(`Matched integration route did not return a response`);
|
|
3818
3771
|
}
|
|
3819
3772
|
return result;
|
|
3820
3773
|
} catch (error) {
|
|
3821
|
-
|
|
3822
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3823
|
-
return
|
|
3774
|
+
_chunkGC5ROI3Acjs.logger.error(`Integration route error: ${error}`);
|
|
3775
|
+
await _optionalChain([runtime, 'optionalAccess', _269 => _269.reportError, 'call', _270 => _270(error)]);
|
|
3776
|
+
return _chunk4VLXQ55Ocjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3824
3777
|
}
|
|
3825
3778
|
};
|
|
3826
3779
|
runtimeReportsErrors = Boolean(pm);
|
|
@@ -3839,7 +3792,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3839
3792
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
3840
3793
|
return true;
|
|
3841
3794
|
} catch (error) {
|
|
3842
|
-
const bodyErrorResponse =
|
|
3795
|
+
const bodyErrorResponse = _chunk7Q7UB4TLcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3843
3796
|
if (bodyErrorResponse) {
|
|
3844
3797
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
3845
3798
|
return true;
|
|
@@ -3854,32 +3807,32 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3854
3807
|
integration: matchedRoute.key
|
|
3855
3808
|
});
|
|
3856
3809
|
}
|
|
3857
|
-
|
|
3810
|
+
_chunkGC5ROI3Acjs.logger.error(`Integration route error: ${error}`);
|
|
3858
3811
|
if (runtimeReportsErrors) {
|
|
3859
3812
|
if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3860
3813
|
else if (!res.writableEnded) res.end();
|
|
3861
3814
|
} else if (!res.writableEnded) {
|
|
3862
3815
|
res.statusCode = 500;
|
|
3863
3816
|
res.setHeader("Content-Type", "application/json");
|
|
3864
|
-
res.end(
|
|
3817
|
+
res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
3865
3818
|
}
|
|
3866
3819
|
return true;
|
|
3867
3820
|
}
|
|
3868
3821
|
};
|
|
3869
|
-
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(
|
|
3822
|
+
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(_chunkH7OFZJCVcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME)) {
|
|
3870
3823
|
const hasLocalDevRoute = () => {
|
|
3871
3824
|
const routeManager3 = farmApp.getRouteManager();
|
|
3872
3825
|
return Boolean(
|
|
3873
|
-
|
|
3826
|
+
_chunkOWO7KDZ3cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3874
3827
|
pathname: requestPathname,
|
|
3875
3828
|
method: requestMethod
|
|
3876
|
-
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3829
|
+
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _271 => _271.isFarmDocsAPIRequest, 'call', _272 => _272(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
3877
3830
|
);
|
|
3878
3831
|
};
|
|
3879
3832
|
try {
|
|
3880
3833
|
await pm.runHookParallelFiltered(
|
|
3881
3834
|
"beforeRequest",
|
|
3882
|
-
(plugin2) => plugin2.name ===
|
|
3835
|
+
(plugin2) => plugin2.name === _chunkH7OFZJCVcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
3883
3836
|
req,
|
|
3884
3837
|
res
|
|
3885
3838
|
);
|
|
@@ -3907,11 +3860,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3907
3860
|
}
|
|
3908
3861
|
const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
|
|
3909
3862
|
const hasMatchedApiRoute = Boolean(matchedApiRoute);
|
|
3910
|
-
if (hasMatchedApiRoute ||
|
|
3863
|
+
if (hasMatchedApiRoute || _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
|
|
3911
3864
|
const startTime2 = Date.now();
|
|
3912
3865
|
const method2 = req.method || "GET";
|
|
3913
3866
|
const urlPath2 = req.url || "/";
|
|
3914
|
-
const pathname2 =
|
|
3867
|
+
const pathname2 = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3915
3868
|
trustProxy: currentServerConfig.trustProxy
|
|
3916
3869
|
}).pathname;
|
|
3917
3870
|
try {
|
|
@@ -3933,10 +3886,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3933
3886
|
urlPath: urlPath2,
|
|
3934
3887
|
method: method2
|
|
3935
3888
|
});
|
|
3936
|
-
|
|
3889
|
+
_chunkGC5ROI3Acjs.logger.error(`Request hook error: ${error}`);
|
|
3937
3890
|
res.statusCode = 500;
|
|
3938
3891
|
res.setHeader("Content-Type", "application/json");
|
|
3939
|
-
res.end(
|
|
3892
|
+
res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
3940
3893
|
return;
|
|
3941
3894
|
}
|
|
3942
3895
|
const createAPIRequest = async () => {
|
|
@@ -3948,30 +3901,30 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3948
3901
|
}
|
|
3949
3902
|
let body;
|
|
3950
3903
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
3951
|
-
body = await
|
|
3904
|
+
body = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
3952
3905
|
}
|
|
3953
3906
|
return new Request(
|
|
3954
|
-
|
|
3907
|
+
_chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3955
3908
|
trustProxy: currentServerConfig.trustProxy
|
|
3956
3909
|
}),
|
|
3957
3910
|
{
|
|
3958
3911
|
method: req.method,
|
|
3959
3912
|
headers,
|
|
3960
3913
|
body: toRequestBody(body),
|
|
3961
|
-
signal:
|
|
3914
|
+
signal: _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3962
3915
|
}
|
|
3963
3916
|
);
|
|
3964
3917
|
};
|
|
3965
3918
|
const isDocsAPIRequest = Boolean(
|
|
3966
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3919
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _273 => _273.isFarmDocsAPIRequest, 'call', _274 => _274(pathname2)])
|
|
3967
3920
|
);
|
|
3968
3921
|
const docsRuntimeOptions = () => ({
|
|
3969
3922
|
kind: "docs",
|
|
3970
|
-
route:
|
|
3923
|
+
route: _chunkWILPJVQEcjs.setFarmRouteLabel.call(void 0,
|
|
3971
3924
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
3972
|
-
|
|
3973
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3974
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3925
|
+
_chunkWILPJVQEcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
3926
|
+
path: _optionalChain([farmConfig, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.entry]) || "/docs",
|
|
3927
|
+
roots: _optionalChain([farmConfig, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.roots, 'optionalAccess', _279 => _279.map, 'call', _280 => _280((root) => root.entry)])
|
|
3975
3928
|
})
|
|
3976
3929
|
)
|
|
3977
3930
|
});
|
|
@@ -3996,7 +3949,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3996
3949
|
return;
|
|
3997
3950
|
}
|
|
3998
3951
|
} catch (error) {
|
|
3999
|
-
const bodyErrorResponse =
|
|
3952
|
+
const bodyErrorResponse = _chunk7Q7UB4TLcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4000
3953
|
if (bodyErrorResponse) {
|
|
4001
3954
|
logResponse(
|
|
4002
3955
|
method2,
|
|
@@ -4008,7 +3961,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4008
3961
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4009
3962
|
return;
|
|
4010
3963
|
}
|
|
4011
|
-
|
|
3964
|
+
_chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
|
|
4012
3965
|
sendFarmDevRuntimeHookError(res, true);
|
|
4013
3966
|
return;
|
|
4014
3967
|
}
|
|
@@ -4028,7 +3981,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4028
3981
|
if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
|
|
4029
3982
|
throw error;
|
|
4030
3983
|
}
|
|
4031
|
-
|
|
3984
|
+
_chunkGC5ROI3Acjs.logger.error(`Middleware error: ${error}`);
|
|
4032
3985
|
const status = await sendMiddlewareErrorJSON(runtimeSession2, error);
|
|
4033
3986
|
logResponse(method2, urlPath2, status, Date.now() - startTime2, "API");
|
|
4034
3987
|
return;
|
|
@@ -4046,14 +3999,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4046
3999
|
(_request, runtime) => handler(request, runtime)
|
|
4047
4000
|
) : pm ? pm.runRuntimeRequest(request, handler, options2) : handler(request);
|
|
4048
4001
|
const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
|
|
4049
|
-
const routedPathname =
|
|
4002
|
+
const routedPathname = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4050
4003
|
trustProxy: currentServerConfig.trustProxy
|
|
4051
4004
|
}).pathname;
|
|
4052
4005
|
const rewritten = routedPathname !== pathname2;
|
|
4053
4006
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
4054
4007
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
4055
4008
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
4056
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
4009
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _281 => _281.route, 'access', _282 => _282.path]) || urlPath2;
|
|
4057
4010
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
4058
4011
|
type: "route.matched",
|
|
4059
4012
|
pathname: pathname2,
|
|
@@ -4102,9 +4055,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4102
4055
|
durationMs: Date.now() - startTime2,
|
|
4103
4056
|
error
|
|
4104
4057
|
});
|
|
4105
|
-
|
|
4106
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
4107
|
-
response =
|
|
4058
|
+
_chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
|
|
4059
|
+
await _optionalChain([runtime, 'optionalAccess', _283 => _283.reportError, 'call', _284 => _284(error)]);
|
|
4060
|
+
response = _chunk4VLXQ55Ocjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
4108
4061
|
}
|
|
4109
4062
|
return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
|
|
4110
4063
|
};
|
|
@@ -4131,13 +4084,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4131
4084
|
error
|
|
4132
4085
|
});
|
|
4133
4086
|
}
|
|
4134
|
-
const bodyErrorResponse =
|
|
4087
|
+
const bodyErrorResponse = _chunk7Q7UB4TLcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4135
4088
|
if (bodyErrorResponse) {
|
|
4136
4089
|
logResponse(method2, urlPath2, bodyErrorResponse.status, duration, "API");
|
|
4137
4090
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4138
4091
|
return;
|
|
4139
4092
|
}
|
|
4140
|
-
|
|
4093
|
+
_chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
|
|
4141
4094
|
sendFarmDevRuntimeHookError(res, true);
|
|
4142
4095
|
return;
|
|
4143
4096
|
}
|
|
@@ -4174,12 +4127,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4174
4127
|
return;
|
|
4175
4128
|
}
|
|
4176
4129
|
} catch (error) {
|
|
4177
|
-
const bodyErrorResponse =
|
|
4130
|
+
const bodyErrorResponse = _chunk7Q7UB4TLcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4178
4131
|
if (bodyErrorResponse) {
|
|
4179
4132
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4180
4133
|
return;
|
|
4181
4134
|
}
|
|
4182
|
-
|
|
4135
|
+
_chunkGC5ROI3Acjs.logger.error(`Docs API route error: ${error}`);
|
|
4183
4136
|
sendFarmDevRuntimeHookError(res, true);
|
|
4184
4137
|
return;
|
|
4185
4138
|
}
|
|
@@ -4203,17 +4156,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4203
4156
|
logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
|
|
4204
4157
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
|
|
4205
4158
|
} catch (error) {
|
|
4206
|
-
|
|
4159
|
+
_chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
|
|
4207
4160
|
sendFarmDevRuntimeHookError(res, true);
|
|
4208
4161
|
}
|
|
4209
4162
|
return;
|
|
4210
4163
|
}
|
|
4211
|
-
if (_optionalChain([req, 'access',
|
|
4164
|
+
if (_optionalChain([req, 'access', _285 => _285.url, 'optionalAccess', _286 => _286.startsWith, 'call', _287 => _287("/@")]) || _optionalChain([req, 'access', _288 => _288.url, 'optionalAccess', _289 => _289.startsWith, 'call', _290 => _290("/node_modules")])) {
|
|
4212
4165
|
return next();
|
|
4213
4166
|
}
|
|
4214
4167
|
if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
|
|
4215
4168
|
requestPathname,
|
|
4216
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4169
|
+
_optionalChain([farmApp, 'optionalAccess', _291 => _291.getRouteManager, 'call', _292 => _292()]),
|
|
4217
4170
|
[server.config.publicDir, server.config.root],
|
|
4218
4171
|
farmAgentGeneratedPaths(farmConfig),
|
|
4219
4172
|
requestMethod
|
|
@@ -4221,7 +4174,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4221
4174
|
if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
|
|
4222
4175
|
return next();
|
|
4223
4176
|
}
|
|
4224
|
-
if (_optionalChain([req, 'access',
|
|
4177
|
+
if (_optionalChain([req, 'access', _293 => _293.url, 'optionalAccess', _294 => _294.startsWith, 'call', _295 => _295("/__farm/page-data")])) {
|
|
4225
4178
|
const urlObj = parsedRequestUrl;
|
|
4226
4179
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
4227
4180
|
let renderedRequest;
|
|
@@ -4229,7 +4182,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4229
4182
|
const request = createRequestFromNodeRequest(
|
|
4230
4183
|
req,
|
|
4231
4184
|
urlObj,
|
|
4232
|
-
|
|
4185
|
+
_chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
4233
4186
|
);
|
|
4234
4187
|
const deploymentMismatch = _chunkNLBHLPEOcjs.getFarmDeploymentMismatch.call(void 0,
|
|
4235
4188
|
request,
|
|
@@ -4251,7 +4204,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4251
4204
|
renderedRequest = targetRequest;
|
|
4252
4205
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
4253
4206
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
4254
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4207
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _296 => _296.hasMiddleware, 'call', _297 => _297()])) {
|
|
4255
4208
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
4256
4209
|
const targetNodeResponse = createPageDataMiddlewareResponse(res);
|
|
4257
4210
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
@@ -4285,10 +4238,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4285
4238
|
if (pm) {
|
|
4286
4239
|
await pm.runHookParallel("afterRouteMatch", {
|
|
4287
4240
|
pathname: targetPath,
|
|
4288
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
4289
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
4290
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4291
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
4241
|
+
matched: !!_optionalChain([match, 'optionalAccess', _298 => _298.route]),
|
|
4242
|
+
routePattern: _optionalChain([match, 'optionalAccess', _299 => _299.route, 'optionalAccess', _300 => _300.pattern]) || null,
|
|
4243
|
+
params: _optionalChain([match, 'optionalAccess', _301 => _301.params]) || {},
|
|
4244
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _302 => _302.layouts]) || []).map((l) => l.pattern)
|
|
4292
4245
|
});
|
|
4293
4246
|
}
|
|
4294
4247
|
if (!match) {
|
|
@@ -4304,6 +4257,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4304
4257
|
res.end(JSON.stringify({ error: "Route not found" }));
|
|
4305
4258
|
return;
|
|
4306
4259
|
}
|
|
4260
|
+
const trailingSlashLocation = _chunkDVJM55D2cjs.resolveFarmTrailingSlashRedirect.call(void 0,
|
|
4261
|
+
targetRequestUrl,
|
|
4262
|
+
farmApp.getConfig().trailingSlash === true
|
|
4263
|
+
);
|
|
4264
|
+
if (trailingSlashLocation) {
|
|
4265
|
+
await sendFarmPageDataRedirect(
|
|
4266
|
+
res,
|
|
4267
|
+
{ location: trailingSlashLocation, status: 308 },
|
|
4268
|
+
farmConfig.deploymentId
|
|
4269
|
+
);
|
|
4270
|
+
return;
|
|
4271
|
+
}
|
|
4307
4272
|
const routeModule = await routeManager3.loadRouteModule(route.modulePath);
|
|
4308
4273
|
const loadingBoundary = routeManager3.getMatchingLoading(
|
|
4309
4274
|
targetRequestUrl.pathname,
|
|
@@ -4311,7 +4276,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4311
4276
|
);
|
|
4312
4277
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4313
4278
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4314
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4279
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkQP4GYVRRcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4315
4280
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4316
4281
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4317
4282
|
let mergedMetadata = {};
|
|
@@ -4319,7 +4284,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4319
4284
|
layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
|
|
4320
4285
|
);
|
|
4321
4286
|
const layoutHydrationMetadata = layouts.map(
|
|
4322
|
-
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4287
|
+
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4288
|
+
(entry) => entry.pattern === layout.pattern
|
|
4289
|
+
), () => ( {
|
|
4290
|
+
..._chunkQP4GYVRRcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4291
|
+
serverTree: false
|
|
4292
|
+
}))
|
|
4323
4293
|
);
|
|
4324
4294
|
const shouldHydrateLayout = layoutHydrationMetadata.some(
|
|
4325
4295
|
(metadata) => metadata.shouldHydrate
|
|
@@ -4331,17 +4301,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4331
4301
|
)
|
|
4332
4302
|
];
|
|
4333
4303
|
const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4334
|
-
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4335
|
-
) === "islands" ?
|
|
4304
|
+
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]), () => ( options))), 'access', _305 => _305.experimental, 'optionalAccess', _306 => _306.serverComponents])
|
|
4305
|
+
) === "islands" ? _chunkDTNWLRRFcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4336
4306
|
route,
|
|
4337
4307
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4338
4308
|
layouts.map((layout, index) => ({
|
|
4339
4309
|
pattern: layout.pattern,
|
|
4340
4310
|
modulePath: layout.modulePath,
|
|
4341
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4311
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _307 => _307[index], 'optionalAccess', _308 => _308.shouldHydrate]) === true,
|
|
4342
4312
|
// Manifest entries carry it; metadata read from source does not.
|
|
4343
|
-
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4344
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
4313
|
+
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _309 => _309[index], 'optionalAccess', _310 => _310.hasIsolatedClientBoundaries]) === true,
|
|
4314
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _311 => _311[index], 'optionalAccess', _312 => _312.islandStrategy]), () => ( null))
|
|
4345
4315
|
})),
|
|
4346
4316
|
server.config.root,
|
|
4347
4317
|
true
|
|
@@ -4368,28 +4338,28 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4368
4338
|
routePath: route.pattern
|
|
4369
4339
|
});
|
|
4370
4340
|
for (const layoutModule of layoutModules) {
|
|
4371
|
-
mergedMetadata =
|
|
4341
|
+
mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0, mergedMetadata, layoutModule.metadata);
|
|
4372
4342
|
if (typeof layoutModule.generateMetadata === "function") {
|
|
4373
|
-
mergedMetadata =
|
|
4343
|
+
mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0,
|
|
4374
4344
|
mergedMetadata,
|
|
4375
4345
|
await layoutModule.generateMetadata({ params: routeProps.params })
|
|
4376
4346
|
);
|
|
4377
4347
|
}
|
|
4378
|
-
mergedMetadata = await
|
|
4348
|
+
mergedMetadata = await _chunkY3DO7BIJcjs.mergeModuleViewport.call(void 0, mergedMetadata, layoutModule, {
|
|
4379
4349
|
params: routeProps.params
|
|
4380
4350
|
});
|
|
4381
4351
|
}
|
|
4382
|
-
mergedMetadata =
|
|
4352
|
+
mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0, mergedMetadata, routeModule.metadata);
|
|
4383
4353
|
if (typeof routeModule.generateMetadata === "function") {
|
|
4384
|
-
mergedMetadata =
|
|
4354
|
+
mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0,
|
|
4385
4355
|
mergedMetadata,
|
|
4386
4356
|
await routeModule.generateMetadata(routeProps)
|
|
4387
4357
|
);
|
|
4388
4358
|
}
|
|
4389
|
-
mergedMetadata = await
|
|
4390
|
-
mergedMetadata =
|
|
4359
|
+
mergedMetadata = await _chunkY3DO7BIJcjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
|
|
4360
|
+
mergedMetadata = _chunkY3DO7BIJcjs.addMetadataMarkdownAlternate.call(void 0,
|
|
4391
4361
|
mergedMetadata,
|
|
4392
|
-
|
|
4362
|
+
_chunk2YJ4DHTDcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
|
|
4393
4363
|
routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
|
|
4394
4364
|
})
|
|
4395
4365
|
);
|
|
@@ -4398,7 +4368,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4398
4368
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4399
4369
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4400
4370
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4401
|
-
), () => (
|
|
4371
|
+
), () => ( _chunkQP4GYVRRcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4402
4372
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4403
4373
|
request: targetRequest,
|
|
4404
4374
|
params: slot.params,
|
|
@@ -4443,16 +4413,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4443
4413
|
})
|
|
4444
4414
|
);
|
|
4445
4415
|
const projectRoot = server.config.root;
|
|
4446
|
-
const toUrlPath = (absolutePath) =>
|
|
4447
|
-
const renderPlan =
|
|
4416
|
+
const toUrlPath = (absolutePath) => _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
4417
|
+
const renderPlan = _chunk6ZFGWB75cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
4448
4418
|
pageShouldHydrate: shouldHydrate,
|
|
4449
4419
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4450
4420
|
islandStrategy: hydrationIslandStrategy,
|
|
4451
|
-
rendering:
|
|
4421
|
+
rendering: _chunk7564NP5Zcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4452
4422
|
});
|
|
4453
4423
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4454
|
-
const layoutStartIndex =
|
|
4455
|
-
|
|
4424
|
+
const layoutStartIndex = _chunk6ZFGWB75cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
4425
|
+
_chunk6ZFGWB75cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
4456
4426
|
destinationLayoutPatterns
|
|
4457
4427
|
);
|
|
4458
4428
|
const renderer = farmApp.getServerRenderer();
|
|
@@ -4462,12 +4432,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4462
4432
|
middlewareContext,
|
|
4463
4433
|
() => renderer.renderNavigationFragment({
|
|
4464
4434
|
PageComponent: routeModule.default,
|
|
4465
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
4435
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _313 => _313.default]),
|
|
4466
4436
|
pageProps: routeProps,
|
|
4467
4437
|
params,
|
|
4468
4438
|
layouts: layouts.map((layout, index) => ({
|
|
4469
4439
|
pattern: layout.pattern,
|
|
4470
|
-
module: layoutModules[index]
|
|
4440
|
+
module: layoutModules[index],
|
|
4441
|
+
serverTree: _optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.serverTree])
|
|
4471
4442
|
})),
|
|
4472
4443
|
layoutStartIndex,
|
|
4473
4444
|
slots: routeSlots.map((slot) => ({
|
|
@@ -4524,7 +4495,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4524
4495
|
from: interceptFromHeader,
|
|
4525
4496
|
slots: routeSlots.filter((slot) => slot.interception).map((slot) => slot.name)
|
|
4526
4497
|
} : void 0,
|
|
4527
|
-
i18n:
|
|
4498
|
+
i18n: _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, )
|
|
4528
4499
|
};
|
|
4529
4500
|
await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
|
|
4530
4501
|
res,
|
|
@@ -4533,7 +4504,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4533
4504
|
{
|
|
4534
4505
|
status: 200,
|
|
4535
4506
|
headers: {
|
|
4536
|
-
"Cache-Control":
|
|
4507
|
+
"Cache-Control": _chunk6ZFGWB75cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
4537
4508
|
"X-Farm-Navigation": "html-fragment",
|
|
4538
4509
|
Vary: "X-Farm-Layout-Chain",
|
|
4539
4510
|
[_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
@@ -4541,7 +4512,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4541
4512
|
},
|
|
4542
4513
|
{
|
|
4543
4514
|
onError(error, id) {
|
|
4544
|
-
|
|
4515
|
+
_chunkGC5ROI3Acjs.logger.error(`Deferred route data ${id} failed: ${error}`);
|
|
4545
4516
|
}
|
|
4546
4517
|
}
|
|
4547
4518
|
)
|
|
@@ -4571,33 +4542,33 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4571
4542
|
const startTime = Date.now();
|
|
4572
4543
|
const method = req.method || "GET";
|
|
4573
4544
|
const urlPath = req.url || "/";
|
|
4574
|
-
const requestedPathname =
|
|
4545
|
+
const requestedPathname = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4575
4546
|
trustProxy: currentServerConfig.trustProxy
|
|
4576
4547
|
}).pathname;
|
|
4577
4548
|
const routeManager2 = farmApp.getRouteManager();
|
|
4578
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4579
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4580
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4549
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasHook, 'call', _317 => _317("beforeRequest")]), () => ( false));
|
|
4550
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _318 => _318.hasHook, 'call', _319 => _319("afterResponse")]), () => ( false));
|
|
4551
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _320 => _320.hasHook, 'call', _321 => _321("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _322 => _322.hasHook, 'call', _323 => _323("afterRender")]), () => ( false)));
|
|
4581
4552
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4582
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4553
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _324 => _324.hasRuntimeHook, 'call', _325 => _325("after")]), () => ( false));
|
|
4583
4554
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4584
4555
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4585
|
-
const mcpLabel =
|
|
4556
|
+
const mcpLabel = _chunkWILPJVQEcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4586
4557
|
if (mcpLabel) return mcpLabel;
|
|
4587
4558
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4588
|
-
return routePathname ===
|
|
4559
|
+
return routePathname === _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
4589
4560
|
};
|
|
4590
4561
|
const pageRuntimeOptions = (pathname2) => {
|
|
4591
4562
|
const match = routeManager2.matchRoute(pathname2);
|
|
4592
4563
|
return {
|
|
4593
4564
|
kind: "page",
|
|
4594
|
-
route:
|
|
4565
|
+
route: _chunkWILPJVQEcjs.setFarmRouteLabel.call(void 0,
|
|
4595
4566
|
{
|
|
4596
4567
|
pathname: pathname2,
|
|
4597
|
-
pattern: _optionalChain([match, 'optionalAccess',
|
|
4598
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4568
|
+
pattern: _optionalChain([match, 'optionalAccess', _326 => _326.route, 'optionalAccess', _327 => _327.pattern]) || null,
|
|
4569
|
+
params: _optionalChain([match, 'optionalAccess', _328 => _328.params]) || {}
|
|
4599
4570
|
},
|
|
4600
|
-
_optionalChain([match, 'optionalAccess',
|
|
4571
|
+
_optionalChain([match, 'optionalAccess', _329 => _329.route]) ? null : pageBuiltInRouteLabel(pathname2)
|
|
4601
4572
|
)
|
|
4602
4573
|
};
|
|
4603
4574
|
};
|
|
@@ -4677,7 +4648,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4677
4648
|
}) : void 0;
|
|
4678
4649
|
let middlewareFailed = false;
|
|
4679
4650
|
try {
|
|
4680
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4651
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _330 => _330.hasMiddleware, 'call', _331 => _331()])) {
|
|
4681
4652
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
4682
4653
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
4683
4654
|
farmApp.getServerRenderer(),
|
|
@@ -4690,7 +4661,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4690
4661
|
throw error;
|
|
4691
4662
|
});
|
|
4692
4663
|
if (handled) {
|
|
4693
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4664
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.isEnded, 'call', _333 => _333()])) {
|
|
4694
4665
|
const duration = Date.now() - startTime;
|
|
4695
4666
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4696
4667
|
}
|
|
@@ -4705,8 +4676,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4705
4676
|
res
|
|
4706
4677
|
);
|
|
4707
4678
|
}
|
|
4708
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
4709
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4679
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _334 => _334.isEnded, 'call', _335 => _335()])) {
|
|
4680
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _336 => _336.isEnded, 'call', _337 => _337()])) {
|
|
4710
4681
|
const duration = Date.now() - startTime;
|
|
4711
4682
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4712
4683
|
}
|
|
@@ -4725,8 +4696,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4725
4696
|
await pm.reportRuntimeRequestError(runtimeSession, error);
|
|
4726
4697
|
} else {
|
|
4727
4698
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
4728
|
-
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4729
|
-
_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4699
|
+
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _338 => _338.isEnded, 'call', _339 => _339()])) {
|
|
4700
|
+
_optionalChain([responseInterceptor, 'optionalAccess', _340 => _340.release, 'call', _341 => _341()]);
|
|
4730
4701
|
console.error("[FARM] Page error:", error);
|
|
4731
4702
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4732
4703
|
return;
|
|
@@ -4743,7 +4714,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4743
4714
|
}
|
|
4744
4715
|
})
|
|
4745
4716
|
);
|
|
4746
|
-
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access',
|
|
4717
|
+
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _342 => _342.stack, 'access', _343 => _343.at, 'call', _344 => _344(-1), 'optionalAccess', _345 => _345.handle]);
|
|
4747
4718
|
if (farmOwnsDevCors && viteServer.config.server.cors === false) {
|
|
4748
4719
|
farmMiddlewares.use(createFarmDevViteCorsMiddleware());
|
|
4749
4720
|
}
|
|
@@ -4757,7 +4728,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4757
4728
|
}
|
|
4758
4729
|
if (!rendererDisabled) return next();
|
|
4759
4730
|
const requested = _nullishCoalesce(_nullishCoalesce(req.originalUrl, () => ( req.url)), () => ( "/"));
|
|
4760
|
-
const pathname =
|
|
4731
|
+
const pathname = _chunk2RSVYJT6cjs.parseFarmRequestTarget.call(void 0, requested, "http://localhost").pathname;
|
|
4761
4732
|
res.statusCode = 404;
|
|
4762
4733
|
res.setHeader("Content-Type", "application/json");
|
|
4763
4734
|
res.end(JSON.stringify({ error: "Not found", pathname }));
|
|
@@ -4772,7 +4743,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4772
4743
|
});
|
|
4773
4744
|
}
|
|
4774
4745
|
if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
|
|
4775
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
4746
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347(), 'access', _348 => _348.root]) || _optionalChain([server, 'optionalAccess', _349 => _349.config, 'access', _350 => _350.root]) || options.root;
|
|
4776
4747
|
return this.resolve(id, path6.join(root, "package.json"), {
|
|
4777
4748
|
...resolveOptions,
|
|
4778
4749
|
skipSelf: true
|
|
@@ -4786,7 +4757,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4786
4757
|
const imageId = await imageImports.resolveId.call(this, id, importer, resolveOptions);
|
|
4787
4758
|
if (imageId) return imageId;
|
|
4788
4759
|
}
|
|
4789
|
-
if (
|
|
4760
|
+
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4790
4761
|
return id;
|
|
4791
4762
|
}
|
|
4792
4763
|
if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
|
|
@@ -4800,7 +4771,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4800
4771
|
}
|
|
4801
4772
|
},
|
|
4802
4773
|
async load(id, loadOptions) {
|
|
4803
|
-
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess',
|
|
4774
|
+
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _351 => _351.ssr]) && !farmSetupContext.getStore()) {
|
|
4804
4775
|
await pendingClientSetup;
|
|
4805
4776
|
}
|
|
4806
4777
|
if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
@@ -4817,9 +4788,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4817
4788
|
const imageModule = await imageImports.load.call(this, id);
|
|
4818
4789
|
if (imageModule) return imageModule;
|
|
4819
4790
|
}
|
|
4820
|
-
if (
|
|
4821
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
4822
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
4791
|
+
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4792
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _352 => _352.getConfig, 'call', _353 => _353(), 'access', _354 => _354.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4793
|
+
const root = _optionalChain([server, 'optionalAccess', _355 => _355.config, 'access', _356 => _356.root]) || options.root;
|
|
4823
4794
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4824
4795
|
return generateProgrammaticClientRouteModuleForId(
|
|
4825
4796
|
id,
|
|
@@ -4835,65 +4806,65 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4835
4806
|
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
4836
4807
|
}
|
|
4837
4808
|
if (isFarmClientVirtualId(id)) {
|
|
4838
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
4839
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4840
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4841
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4842
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4809
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358()]);
|
|
4810
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4811
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.integrations]) || options.integrations;
|
|
4812
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.root]) || _optionalChain([server, 'optionalAccess', _362 => _362.config, 'access', _363 => _363.root]) || process.cwd();
|
|
4813
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.docs]);
|
|
4843
4814
|
const adapterOwnsDocsRuntime = Boolean(
|
|
4844
|
-
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess',
|
|
4815
|
+
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _365 => _365.adapter, 'optionalAccess', _366 => _366.server]) && docs.adapter.react
|
|
4845
4816
|
);
|
|
4846
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4817
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _367 => _367.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4847
4818
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
4848
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4849
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4819
|
+
_optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
4820
|
+
_optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
4850
4821
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
4851
4822
|
]);
|
|
4852
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
4823
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _370 => _370.isFarmDocsSearchEnabled, 'call', _371 => _371(docs)]), () => ( false));
|
|
4853
4824
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
4854
4825
|
docsSearchEnabled,
|
|
4855
4826
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
4856
4827
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
4857
4828
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4858
4829
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4859
|
-
const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ?
|
|
4860
|
-
const isolatedHydrationMode =
|
|
4861
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4830
|
+
const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkOWO7KDZ3cjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
4831
|
+
const isolatedHydrationMode = _chunkQP4GYVRRcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4832
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.isolatedClientHydration]),
|
|
4862
4833
|
{
|
|
4863
|
-
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4834
|
+
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.experimental, 'optionalAccess', _375 => _375.serverComponents])) === "rsc",
|
|
4864
4835
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
4865
4836
|
}
|
|
4866
4837
|
);
|
|
4867
4838
|
return generateClientCode(
|
|
4868
4839
|
integrationProviders,
|
|
4869
4840
|
[
|
|
4870
|
-
...
|
|
4871
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
4841
|
+
..._chunkOWO7KDZ3cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
4842
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _376 => _376.getFarmDocsDocumentNavigationMatchers, 'call', _377 => _377(docs)]), () => ( []))
|
|
4872
4843
|
],
|
|
4873
4844
|
generatedDocsSearchRuntime,
|
|
4874
4845
|
`${generatedDevtoolsClientRuntime}
|
|
4875
4846
|
${generatedDevIndicatorsClientRuntime}`,
|
|
4876
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4847
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.plugins]) || [],
|
|
4877
4848
|
root,
|
|
4878
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4879
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4880
|
-
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess',
|
|
4849
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.srcDir]) || options.srcDir || "src",
|
|
4850
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
4851
|
+
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _381 => _381.adapter, 'optionalAccess', _382 => _382.react]) : void 0,
|
|
4881
4852
|
renderer,
|
|
4882
|
-
isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
4883
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4884
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4885
|
-
|
|
4886
|
-
|
|
4853
|
+
isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _383 => _383.getRouteManager, 'call', _384 => _384(), 'access', _385 => _385.getIsolatedClientBoundaryModules, 'call', _386 => _386(root)])))), 'optionalAccess', _387 => _387.size]) > 0,
|
|
4854
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.trailingSlash]), () => ( false)),
|
|
4855
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.basePath]), () => ( "/")),
|
|
4856
|
+
_chunkDTNWLRRFcjs.generateClientCachePersistenceCode.call(void 0,
|
|
4857
|
+
_chunkDTNWLRRFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
|
|
4887
4858
|
),
|
|
4888
4859
|
_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
4889
|
-
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4860
|
+
_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "islands"
|
|
4890
4861
|
);
|
|
4891
4862
|
}
|
|
4892
4863
|
if (id === "/@farm/server") {
|
|
4893
4864
|
return generateServerCode();
|
|
4894
4865
|
}
|
|
4895
4866
|
if (id === "/@farm/manifest") {
|
|
4896
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
4867
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _393 => _393.getRouteManager, 'call', _394 => _394()]);
|
|
4897
4868
|
if (!routeManager) {
|
|
4898
4869
|
return `
|
|
4899
4870
|
export const getManifest = () => ({
|
|
@@ -4905,11 +4876,11 @@ export const getManifest = () => ({
|
|
|
4905
4876
|
});
|
|
4906
4877
|
`;
|
|
4907
4878
|
}
|
|
4908
|
-
const globalStylesheetHref =
|
|
4879
|
+
const globalStylesheetHref = _chunkDTNWLRRFcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4909
4880
|
server.config.root,
|
|
4910
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4881
|
+
_optionalChain([farmApp, 'optionalAccess', _395 => _395.getConfig, 'call', _396 => _396(), 'access', _397 => _397.srcDir])
|
|
4911
4882
|
);
|
|
4912
|
-
const fullManifest =
|
|
4883
|
+
const fullManifest = _chunkDTNWLRRFcjs.createFarmDevClientManifest.call(void 0,
|
|
4913
4884
|
routeManager.generateClientManifest(server.config.root),
|
|
4914
4885
|
{
|
|
4915
4886
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -4925,64 +4896,64 @@ export { manifest };
|
|
|
4925
4896
|
}
|
|
4926
4897
|
},
|
|
4927
4898
|
async transform(code, id, transformOptions) {
|
|
4928
|
-
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess',
|
|
4899
|
+
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) && !farmSetupContext.getStore()) {
|
|
4929
4900
|
await pendingClientSetup;
|
|
4930
4901
|
}
|
|
4931
|
-
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess',
|
|
4932
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4902
|
+
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
4903
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _400 => _400.getConfig, 'call', _401 => _401()]), () => ( options));
|
|
4933
4904
|
let rewrotePackageImports = false;
|
|
4934
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
4905
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkQP4GYVRRcjs.hasUseClientDirective.call(void 0, code)) {
|
|
4935
4906
|
const file = id.split("?", 1)[0];
|
|
4936
|
-
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
4907
|
+
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd();
|
|
4937
4908
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
4938
4909
|
const rewrite = () => {
|
|
4939
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4910
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
|
|
4940
4911
|
if (farmReactServerFiles.has(file)) {
|
|
4941
|
-
for (const child of
|
|
4912
|
+
for (const child of _chunkQP4GYVRRcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
4942
4913
|
farmReactServerFiles.add(child);
|
|
4943
4914
|
}
|
|
4944
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
4915
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkQP4GYVRRcjs.getFarmClientReachableModules.call(void 0,
|
|
4945
4916
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
4946
4917
|
projectRoot
|
|
4947
4918
|
).has(path6.resolve(file));
|
|
4948
|
-
const reactServer = !serverModule ? null :
|
|
4919
|
+
const reactServer = !serverModule ? null : _chunkQP4GYVRRcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
4949
4920
|
code,
|
|
4950
4921
|
file,
|
|
4951
|
-
reference: (specifier, exportName) =>
|
|
4922
|
+
reference: (specifier, exportName) => _chunkQP4GYVRRcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
4952
4923
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
4953
4924
|
});
|
|
4954
4925
|
if (reactServer !== null) {
|
|
4955
4926
|
code = reactServer;
|
|
4956
4927
|
rewrotePackageImports = true;
|
|
4957
4928
|
}
|
|
4958
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
4929
|
+
const internal = farmReactServerFiles.has(file) ? _chunkQP4GYVRRcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
4959
4930
|
code,
|
|
4960
4931
|
file,
|
|
4961
|
-
reference: (clientFile) =>
|
|
4932
|
+
reference: (clientFile) => _chunkQP4GYVRRcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
4962
4933
|
}) : null;
|
|
4963
4934
|
if (internal !== null) {
|
|
4964
4935
|
code = internal;
|
|
4965
4936
|
rewrotePackageImports = true;
|
|
4966
4937
|
}
|
|
4967
4938
|
}
|
|
4968
|
-
const rewritePackageImports = (source2) =>
|
|
4939
|
+
const rewritePackageImports = (source2) => _chunkQP4GYVRRcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
4969
4940
|
code: source2,
|
|
4970
4941
|
file,
|
|
4971
4942
|
root: projectRoot,
|
|
4972
|
-
isClientPackage: (specifier) =>
|
|
4943
|
+
isClientPackage: (specifier) => _chunkQP4GYVRRcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
4973
4944
|
});
|
|
4974
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
4945
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _408 => _408.getRouteManager, 'call', _409 => _409()]);
|
|
4975
4946
|
const source = code;
|
|
4976
4947
|
const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
|
|
4977
4948
|
if (referenced !== null) {
|
|
4978
4949
|
code = referenced;
|
|
4979
4950
|
rewrotePackageImports = true;
|
|
4980
4951
|
}
|
|
4981
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
4952
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true) {
|
|
4982
4953
|
const cached = rewriteFarmReactCacheImport(
|
|
4983
4954
|
code,
|
|
4984
4955
|
file,
|
|
4985
|
-
_optionalChain([runtimeModule, 'optionalCall',
|
|
4956
|
+
_optionalChain([runtimeModule, 'optionalCall', _411 => _411(FARM_REACT_CACHE_MODULE)])
|
|
4986
4957
|
);
|
|
4987
4958
|
if (cached !== null) {
|
|
4988
4959
|
code = cached;
|
|
@@ -4990,46 +4961,46 @@ export { manifest };
|
|
|
4990
4961
|
}
|
|
4991
4962
|
}
|
|
4992
4963
|
};
|
|
4993
|
-
if (buildSnapshot)
|
|
4964
|
+
if (buildSnapshot) _chunkQP4GYVRRcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
4994
4965
|
else rewrite();
|
|
4995
4966
|
}
|
|
4996
4967
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
4997
4968
|
const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
4998
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
4969
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) === true ? "rsc" : "client"
|
|
4999
4970
|
});
|
|
5000
4971
|
if (serverFns) {
|
|
5001
4972
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
5002
4973
|
code = serverFns.code;
|
|
5003
4974
|
}
|
|
5004
4975
|
}
|
|
5005
|
-
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
4976
|
+
if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
5006
4977
|
const file = id.split("?", 1)[0];
|
|
5007
4978
|
const actionModule = transformFarmFormActionModule({
|
|
5008
4979
|
code,
|
|
5009
4980
|
id,
|
|
5010
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5011
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
4981
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _415 => _415.config, 'access', _416 => _416.root]) || process.cwd(),
|
|
4982
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _417 => _417.ssr]) === true,
|
|
5012
4983
|
// Parsed by file type: page components are TSX.
|
|
5013
4984
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program,
|
|
5014
4985
|
runtimeModule
|
|
5015
4986
|
});
|
|
5016
4987
|
if (actionModule) return { code: actionModule, map: null };
|
|
5017
4988
|
}
|
|
5018
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5019
|
-
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess',
|
|
5020
|
-
if (
|
|
5021
|
-
const redacted =
|
|
4989
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr])) {
|
|
4990
|
+
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420(), 'optionalAccess', _421 => _421.docs]));
|
|
4991
|
+
if (_chunkDTNWLRRFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
4992
|
+
const redacted = _chunkDTNWLRRFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5022
4993
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5023
4994
|
}
|
|
5024
4995
|
}
|
|
5025
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5026
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5027
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
4996
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr])) {
|
|
4997
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _423 => _423.getConfig, 'call', _424 => _424()]), () => ( options));
|
|
4998
|
+
if ((_optionalChain([currentConfig, 'access', _425 => _425.experimental, 'optionalAccess', _426 => _426.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5028
4999
|
const violation = findClientServerFnViolation(code, id);
|
|
5029
5000
|
if (violation) {
|
|
5030
|
-
const locate =
|
|
5001
|
+
const locate = _chunkQP4GYVRRcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5031
5002
|
this.error(
|
|
5032
|
-
|
|
5003
|
+
_chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
|
|
5033
5004
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5034
5005
|
currentConfig.root
|
|
5035
5006
|
)
|
|
@@ -5037,8 +5008,8 @@ export { manifest };
|
|
|
5037
5008
|
}
|
|
5038
5009
|
}
|
|
5039
5010
|
}
|
|
5040
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5041
|
-
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5011
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
5012
|
+
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429()]), () => ( options)));
|
|
5042
5013
|
}
|
|
5043
5014
|
if (typeof imageImports.transform === "function") {
|
|
5044
5015
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -5053,13 +5024,13 @@ export { manifest };
|
|
|
5053
5024
|
id,
|
|
5054
5025
|
transformOptions
|
|
5055
5026
|
);
|
|
5056
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
5027
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _430 => _430.code, 'optionalAccess', _431 => _431.toString, 'call', _432 => _432()]);
|
|
5057
5028
|
if (fontCode) {
|
|
5058
5029
|
transformedCode = fontCode;
|
|
5059
5030
|
transformed = true;
|
|
5060
5031
|
}
|
|
5061
5032
|
}
|
|
5062
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5033
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _433 => _433.ssr]) && server) {
|
|
5063
5034
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
5064
5035
|
code: transformedCode,
|
|
5065
5036
|
id,
|
|
@@ -5071,26 +5042,26 @@ export { manifest };
|
|
|
5071
5042
|
transformed = true;
|
|
5072
5043
|
}
|
|
5073
5044
|
}
|
|
5074
|
-
if (
|
|
5045
|
+
if (_chunkQP4GYVRRcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5075
5046
|
const clientBoundarySource = transformedCode;
|
|
5076
5047
|
const moduleInfo = this.getModuleInfo(id);
|
|
5077
5048
|
if (moduleInfo) {
|
|
5078
5049
|
moduleInfo.isClientComponent = true;
|
|
5079
5050
|
}
|
|
5080
|
-
transformedCode =
|
|
5051
|
+
transformedCode = _chunkQP4GYVRRcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5081
5052
|
transformed = true;
|
|
5082
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5053
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _434 => _434.getConfig, 'call', _435 => _435()]), () => ( options));
|
|
5083
5054
|
let isolatedModuleReference = null;
|
|
5084
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5055
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _436 => _436.config, 'access', _437 => _437.root]) || process.cwd();
|
|
5085
5056
|
const cleanId = id.split("?", 1)[0];
|
|
5086
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
5087
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
5088
|
-
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
5089
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5090
|
-
isolatedModuleReference =
|
|
5091
|
-
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access',
|
|
5092
|
-
const explicitStrategy =
|
|
5093
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5057
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _438 => _438.getRouteManager, 'call', _439 => _439(), 'access', _440 => _440.getIsolatedClientBoundaryModules, 'call', _441 => _441(root)])));
|
|
5058
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _442 => _442.has, 'call', _443 => _443(path6.resolve(cleanId))]) === true;
|
|
5059
|
+
if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkQP4GYVRRcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5060
|
+
cleanId.replace(/\\/g, "/").includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5061
|
+
isolatedModuleReference = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5062
|
+
const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _444 => _444.experimental, 'optionalAccess', _445 => _445.serverComponents])) === "islands";
|
|
5063
|
+
const explicitStrategy = _chunkQP4GYVRRcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5064
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkDTNWLRRFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5094
5065
|
if (inference) {
|
|
5095
5066
|
for (const file of inference.files) {
|
|
5096
5067
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5103,8 +5074,8 @@ export { manifest };
|
|
|
5103
5074
|
islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
|
|
5104
5075
|
parse: (source) => this.parse(source),
|
|
5105
5076
|
slots: islandsMode,
|
|
5106
|
-
browser: _optionalChain([transformOptions, 'optionalAccess',
|
|
5107
|
-
inferredInteraction: _optionalChain([inference, 'optionalAccess',
|
|
5077
|
+
browser: _optionalChain([transformOptions, 'optionalAccess', _446 => _446.ssr]) !== true,
|
|
5078
|
+
inferredInteraction: _optionalChain([inference, 'optionalAccess', _447 => _447.strategy]) === "interaction",
|
|
5108
5079
|
runtimeModule
|
|
5109
5080
|
});
|
|
5110
5081
|
if (!transformedBoundary) {
|
|
@@ -5135,7 +5106,7 @@ export { manifest };
|
|
|
5135
5106
|
);
|
|
5136
5107
|
return;
|
|
5137
5108
|
}` : "";
|
|
5138
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
5109
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _448 => _448.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
5139
5110
|
if (import.meta.hot) {
|
|
5140
5111
|
import.meta.hot.accept((newModule) => {
|
|
5141
5112
|
${isolatedHmrUpdate}
|
|
@@ -5186,19 +5157,19 @@ if (import.meta.hot) {
|
|
|
5186
5157
|
if (!routeManager) return;
|
|
5187
5158
|
const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
|
|
5188
5159
|
if (ssgPages.length === 0) {
|
|
5189
|
-
|
|
5160
|
+
_chunkGC5ROI3Acjs.logger.info("No SSG pages found - all pages will use SSR");
|
|
5190
5161
|
return;
|
|
5191
5162
|
}
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
const outDir = path6.join(_optionalChain([server, 'optionalAccess',
|
|
5163
|
+
_chunkGC5ROI3Acjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
5164
|
+
_chunkGC5ROI3Acjs.logger.info("Pre-rendering SSG pages...");
|
|
5165
|
+
const outDir = path6.join(_optionalChain([server, 'optionalAccess', _449 => _449.config, 'access', _450 => _450.root]) || process.cwd(), options.outDir || "dist");
|
|
5195
5166
|
const clientDir = path6.join(outDir, "client");
|
|
5196
5167
|
for (const page of ssgPages) {
|
|
5197
5168
|
try {
|
|
5198
5169
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
5199
5170
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
5200
5171
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
5201
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
5172
|
+
if (!_optionalChain([mod, 'optionalAccess', _451 => _451.default])) return;
|
|
5202
5173
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
5203
5174
|
const layoutModules = await Promise.all(
|
|
5204
5175
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -5227,10 +5198,10 @@ if (import.meta.hot) {
|
|
|
5227
5198
|
);
|
|
5228
5199
|
}
|
|
5229
5200
|
const html = renderToString(pageElement);
|
|
5230
|
-
const i18nSnapshot =
|
|
5201
|
+
const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
5231
5202
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
5232
5203
|
const fullHtml = `<!DOCTYPE html>
|
|
5233
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
5204
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _452 => _452.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
5234
5205
|
<head>
|
|
5235
5206
|
<meta charset="utf-8">
|
|
5236
5207
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -5248,10 +5219,10 @@ if (import.meta.hot) {
|
|
|
5248
5219
|
fs2.mkdirSync(path6.dirname(outputPath), { recursive: true });
|
|
5249
5220
|
fs2.writeFileSync(outputPath, fullHtml);
|
|
5250
5221
|
const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
|
|
5251
|
-
|
|
5222
|
+
_chunkGC5ROI3Acjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
|
|
5252
5223
|
});
|
|
5253
5224
|
} catch (error) {
|
|
5254
|
-
|
|
5225
|
+
_chunkGC5ROI3Acjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
|
|
5255
5226
|
}
|
|
5256
5227
|
}
|
|
5257
5228
|
const manifestPath = path6.join(outDir, "__ssg_manifest.json");
|
|
@@ -5267,20 +5238,20 @@ if (import.meta.hot) {
|
|
|
5267
5238
|
2
|
|
5268
5239
|
)
|
|
5269
5240
|
);
|
|
5270
|
-
|
|
5241
|
+
_chunkGC5ROI3Acjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
|
|
5271
5242
|
} catch (error) {
|
|
5272
|
-
|
|
5243
|
+
_chunkGC5ROI3Acjs.logger.error(`SSG build failed: ${error}`);
|
|
5273
5244
|
}
|
|
5274
5245
|
},
|
|
5275
5246
|
watchChange(id, change) {
|
|
5276
|
-
const watched =
|
|
5247
|
+
const watched = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, id);
|
|
5277
5248
|
if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
|
|
5278
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
5249
|
+
_optionalChain([farmApp, 'optionalAccess', _453 => _453.getRouteManager, 'call', _454 => _454(), 'access', _455 => _455.noteSourceChange, 'call', _456 => _456(id, change.event)]);
|
|
5279
5250
|
}
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5251
|
+
_chunkQP4GYVRRcjs.invalidateFarmClientReachableModules.call(void 0, );
|
|
5252
|
+
_chunkQP4GYVRRcjs.invalidateFarmClientOnlyScan.call(void 0, );
|
|
5253
|
+
_chunkDTNWLRRFcjs.invalidateFarmRouteRootInferences.call(void 0, );
|
|
5254
|
+
_chunkQP4GYVRRcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5284
5255
|
},
|
|
5285
5256
|
async handleHotUpdate(ctx) {
|
|
5286
5257
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5301,31 +5272,41 @@ if (import.meta.hot) {
|
|
|
5301
5272
|
}
|
|
5302
5273
|
for (const island of _nullishCoalesce(farmIslandInferenceDependents.get(path6.resolve(file)), () => ( []))) {
|
|
5303
5274
|
if (island === path6.resolve(file)) continue;
|
|
5304
|
-
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(
|
|
5275
|
+
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, island)), () => ( []))) {
|
|
5305
5276
|
server2.moduleGraph.invalidateModule(mod);
|
|
5306
5277
|
}
|
|
5307
5278
|
}
|
|
5308
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
5279
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _457 => _457.getConfig, 'call', _458 => _458()]);
|
|
5309
5280
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
5281
|
+
const reloadAfterEdit = () => {
|
|
5282
|
+
for (const files of pendingRouteReloads) {
|
|
5283
|
+
if (files.has(normalizedFile)) return;
|
|
5284
|
+
}
|
|
5285
|
+
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5286
|
+
};
|
|
5287
|
+
if (normalizedFile.includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5288
|
+
path6.posix.join(
|
|
5289
|
+
_chunkGC5ROI3Acjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
|
|
5290
|
+
_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5291
|
+
)
|
|
5292
|
+
))
|
|
5293
|
+
return modules;
|
|
5310
5294
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5311
|
-
(appDir) => normalizedFile.startsWith(`${
|
|
5295
|
+
(appDir) => normalizedFile.startsWith(`${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5312
5296
|
)) {
|
|
5313
5297
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5314
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5315
|
-
|
|
5298
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
|
|
5299
|
+
reloadAfterEdit();
|
|
5316
5300
|
return [];
|
|
5317
5301
|
}
|
|
5318
5302
|
const currentSrcRoot = currentFarmConfig ? _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
|
|
5319
|
-
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) &&
|
|
5303
|
+
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkYUCU6XB4cjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
|
|
5320
5304
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5321
5305
|
for (const mod of modules) {
|
|
5322
5306
|
server2.moduleGraph.invalidateModule(mod);
|
|
5323
5307
|
}
|
|
5324
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5325
|
-
|
|
5326
|
-
type: "full-reload",
|
|
5327
|
-
path: "*"
|
|
5328
|
-
});
|
|
5308
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
|
|
5309
|
+
reloadAfterEdit();
|
|
5329
5310
|
return [];
|
|
5330
5311
|
}
|
|
5331
5312
|
if (currentSrcRoot && isPotentialProgrammaticRouteSourceFile(normalizedFile, currentSrcRoot) && fileContainsProgrammaticPageRoute(file)) {
|
|
@@ -5334,24 +5315,21 @@ if (import.meta.hot) {
|
|
|
5334
5315
|
for (const mod of modules) {
|
|
5335
5316
|
server2.moduleGraph.invalidateModule(mod);
|
|
5336
5317
|
}
|
|
5337
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5338
|
-
|
|
5339
|
-
type: "full-reload",
|
|
5340
|
-
path: "*"
|
|
5341
|
-
});
|
|
5318
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
|
|
5319
|
+
reloadAfterEdit();
|
|
5342
5320
|
return [];
|
|
5343
5321
|
}
|
|
5344
|
-
if (apiRouteManager &&
|
|
5345
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5322
|
+
if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
5323
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
|
|
5346
5324
|
}
|
|
5347
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5348
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5325
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
|
|
5326
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
|
|
5349
5327
|
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5350
|
-
const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5328
|
+
const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
|
|
5351
5329
|
let clientPlanCurrent = false;
|
|
5352
5330
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5353
5331
|
const routeManager = planRouteManager;
|
|
5354
|
-
if (_optionalChain([routeManager, 'optionalAccess',
|
|
5332
|
+
if (_optionalChain([routeManager, 'optionalAccess', _469 => _469.isEditPlanNeutral, 'call', _470 => _470(file)])) {
|
|
5355
5333
|
clientPlanCurrent = true;
|
|
5356
5334
|
} else if (routeManager) {
|
|
5357
5335
|
routeManager.noteSourceChange(file, "update");
|
|
@@ -5375,7 +5353,7 @@ if (import.meta.hot) {
|
|
|
5375
5353
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5376
5354
|
for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
|
|
5377
5355
|
if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
|
|
5378
|
-
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(
|
|
5356
|
+
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
|
|
5379
5357
|
server2.moduleGraph.invalidateModule(mod);
|
|
5380
5358
|
}
|
|
5381
5359
|
}
|
|
@@ -5383,12 +5361,12 @@ if (import.meta.hot) {
|
|
|
5383
5361
|
const clientModule = server2.moduleGraph.getModuleById(clientId);
|
|
5384
5362
|
if (clientModule) server2.moduleGraph.invalidateModule(clientModule);
|
|
5385
5363
|
}
|
|
5386
|
-
|
|
5364
|
+
reloadAfterEdit();
|
|
5387
5365
|
return [];
|
|
5388
5366
|
}
|
|
5389
5367
|
clientPlanCurrent = true;
|
|
5390
5368
|
} catch (error) {
|
|
5391
|
-
|
|
5369
|
+
_chunkGC5ROI3Acjs.logger.warn(
|
|
5392
5370
|
`[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
|
|
5393
5371
|
);
|
|
5394
5372
|
return modules;
|
|
@@ -5399,7 +5377,7 @@ if (import.meta.hot) {
|
|
|
5399
5377
|
if (normalizedFile.includes("middleware.")) {
|
|
5400
5378
|
if (middlewareManager) {
|
|
5401
5379
|
await middlewareManager.reload();
|
|
5402
|
-
|
|
5380
|
+
_chunkGC5ROI3Acjs.logger.success("\u2705 Middleware reloaded!");
|
|
5403
5381
|
if (initialPluginManager) {
|
|
5404
5382
|
for (const middleware of middlewareManager.getMiddlewares()) {
|
|
5405
5383
|
await initialPluginManager.runHookParallel("middlewareDiscovered", {
|
|
@@ -5412,7 +5390,7 @@ if (import.meta.hot) {
|
|
|
5412
5390
|
}
|
|
5413
5391
|
return [];
|
|
5414
5392
|
}
|
|
5415
|
-
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess',
|
|
5393
|
+
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _471 => _471.getRouteManager, 'call', _472 => _472(), 'access', _473 => _473.invalidateClientManifest, 'call', _474 => _474()]);
|
|
5416
5394
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
5417
5395
|
if (manifestModule) {
|
|
5418
5396
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -5423,16 +5401,13 @@ if (import.meta.hot) {
|
|
|
5423
5401
|
for (const mod of modules) {
|
|
5424
5402
|
server2.moduleGraph.invalidateModule(mod);
|
|
5425
5403
|
}
|
|
5426
|
-
|
|
5427
|
-
type: "full-reload",
|
|
5428
|
-
path: "*"
|
|
5429
|
-
});
|
|
5404
|
+
reloadAfterEdit();
|
|
5430
5405
|
return [];
|
|
5431
5406
|
}
|
|
5432
5407
|
}
|
|
5433
|
-
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access',
|
|
5408
|
+
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _475 => _475.environments, 'access', _476 => _476.client, 'optionalAccess', _477 => _477.moduleGraph, 'access', _478 => _478.getModulesByFile, 'call', _479 => _479(normalizedFile), 'optionalAccess', _480 => _480.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
|
|
5434
5409
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5435
|
-
|
|
5410
|
+
reloadAfterEdit();
|
|
5436
5411
|
return [];
|
|
5437
5412
|
}
|
|
5438
5413
|
return modules;
|
|
@@ -5528,7 +5503,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5528
5503
|
return (...args) => {
|
|
5529
5504
|
if (captures(target.statusCode, target.getHeader("location"))) {
|
|
5530
5505
|
const callback = args.find((arg) => typeof arg === "function");
|
|
5531
|
-
_optionalChain([callback, 'optionalCall',
|
|
5506
|
+
_optionalChain([callback, 'optionalCall', _481 => _481()]);
|
|
5532
5507
|
return property === "write" ? true : response;
|
|
5533
5508
|
}
|
|
5534
5509
|
return target[property](...args);
|
|
@@ -5592,42 +5567,42 @@ function isFarmClientVirtualId(id) {
|
|
|
5592
5567
|
}
|
|
5593
5568
|
function isClientEnvironment(context, loadOptions) {
|
|
5594
5569
|
const environment = context.environment;
|
|
5595
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5596
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5597
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
5570
|
+
if (_optionalChain([environment, 'optionalAccess', _482 => _482.config, 'optionalAccess', _483 => _483.consumer])) return environment.config.consumer === "client";
|
|
5571
|
+
if (_optionalChain([environment, 'optionalAccess', _484 => _484.name])) return environment.name === "client";
|
|
5572
|
+
return _optionalChain([loadOptions, 'optionalAccess', _485 => _485.ssr]) !== true;
|
|
5598
5573
|
}
|
|
5599
5574
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
5600
|
-
const graph = _optionalChain([server, 'access',
|
|
5575
|
+
const graph = _optionalChain([server, 'access', _486 => _486.environments, 'optionalAccess', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph]);
|
|
5601
5576
|
if (!graph) return;
|
|
5602
5577
|
for (const [id, module] of graph.idToModuleMap) {
|
|
5603
|
-
if (
|
|
5578
|
+
if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
5604
5579
|
}
|
|
5605
5580
|
}
|
|
5606
5581
|
function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, clientRoutes, watchFile) {
|
|
5607
|
-
const parsed =
|
|
5582
|
+
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5608
5583
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5609
5584
|
watchFile(routesFile);
|
|
5610
|
-
return
|
|
5585
|
+
return _chunkQP4GYVRRcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5611
5586
|
kind: parsed.kind,
|
|
5612
5587
|
routePath: parsed.routePath,
|
|
5613
5588
|
routesFile,
|
|
5614
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
5615
|
-
|
|
5589
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _489 => _489.routes, 'access', _490 => _490.get, 'call', _491 => _491(
|
|
5590
|
+
_chunkQP4GYVRRcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5616
5591
|
)]),
|
|
5617
5592
|
rendererServer: renderer.server,
|
|
5618
5593
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5619
5594
|
});
|
|
5620
5595
|
}
|
|
5621
5596
|
function resolveRealModuleFile(filePath, root) {
|
|
5622
|
-
const resolved = _nullishCoalesce(
|
|
5597
|
+
const resolved = _nullishCoalesce(_chunkQP4GYVRRcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5623
5598
|
try {
|
|
5624
|
-
return
|
|
5599
|
+
return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5625
5600
|
} catch (e28) {
|
|
5626
|
-
return
|
|
5601
|
+
return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, resolved);
|
|
5627
5602
|
}
|
|
5628
5603
|
}
|
|
5629
5604
|
function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk67MZTLTFcjs.REACT_RENDERER) {
|
|
5630
|
-
const parsed =
|
|
5605
|
+
const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5631
5606
|
if (!parsed) {
|
|
5632
5607
|
return "";
|
|
5633
5608
|
}
|
|
@@ -5919,7 +5894,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
|
|
|
5919
5894
|
`.trim();
|
|
5920
5895
|
}
|
|
5921
5896
|
function toProgrammaticRouteImportSpecifier(filePath, root) {
|
|
5922
|
-
return root ?
|
|
5897
|
+
return root ? _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, filePath, root) : filePath;
|
|
5923
5898
|
}
|
|
5924
5899
|
async function parseRouteModuleProps(routeModule, input) {
|
|
5925
5900
|
if (typeof routeModule.__farmResolveRouteProps === "function") {
|
|
@@ -5933,12 +5908,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
5933
5908
|
}
|
|
5934
5909
|
const schemas = routeModule.__farmRouteSchemas;
|
|
5935
5910
|
const params = parseRouteModuleSchema(
|
|
5936
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
5911
|
+
_optionalChain([schemas, 'optionalAccess', _492 => _492.params]),
|
|
5937
5912
|
input.props.params,
|
|
5938
5913
|
"params",
|
|
5939
5914
|
input.routePath
|
|
5940
5915
|
);
|
|
5941
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
5916
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _493 => _493.search]), input.search, "search", input.routePath);
|
|
5942
5917
|
return {
|
|
5943
5918
|
...input.props,
|
|
5944
5919
|
params,
|
|
@@ -5958,12 +5933,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
5958
5933
|
}
|
|
5959
5934
|
}
|
|
5960
5935
|
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
5961
|
-
const providerClientCode =
|
|
5936
|
+
const providerClientCode = _chunkDTNWLRRFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
5962
5937
|
integrationProviders,
|
|
5963
5938
|
root,
|
|
5964
5939
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
5965
5940
|
);
|
|
5966
|
-
const clientPluginEntry =
|
|
5941
|
+
const clientPluginEntry = _chunkQTDIOZV6cjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
5967
5942
|
plugins,
|
|
5968
5943
|
root,
|
|
5969
5944
|
srcDir,
|
|
@@ -5971,8 +5946,9 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
|
|
|
5971
5946
|
);
|
|
5972
5947
|
const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
5973
5948
|
const rendererClientImports = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
|
|
5974
|
-
import { hydrateRoot, createRoot } from 'react-dom/client'
|
|
5975
|
-
import
|
|
5949
|
+
import { hydrateRoot, createRoot } from 'react-dom/client'
|
|
5950
|
+
import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : appSetupPath ? `import React, { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
|
|
5951
|
+
import __farmAppSetup from ${JSON.stringify(_chunkGC5ROI3Acjs.toViteModuleId.call(void 0, appSetupPath, root))}
|
|
5976
5952
|
__farmConfigureApp(__farmAppSetup)` : `import React, { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}`;
|
|
5977
5953
|
const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
|
|
5978
5954
|
const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
@@ -6012,7 +5988,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6012
5988
|
return null;
|
|
6013
5989
|
}
|
|
6014
5990
|
}
|
|
6015
|
-
${islandValues ? `${
|
|
5991
|
+
${islandValues ? `${_chunkDTNWLRRFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6016
5992
|
let farmLastRouteState = null;
|
|
6017
5993
|
|
|
6018
5994
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -6032,7 +6008,7 @@ ${isolatedHydrationImport}
|
|
|
6032
6008
|
import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
|
|
6033
6009
|
import { createClientPluginManager } from '@farm.js/core/plugin/client'
|
|
6034
6010
|
import { isFarmRouteActive } from '@farm.js/core/router'
|
|
6035
|
-
import { installFarmLinkPrefetch, isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
6011
|
+
import { installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
6036
6012
|
import { reviveDeferredData } from '@farm.js/core/deferred'
|
|
6037
6013
|
import {
|
|
6038
6014
|
createFarmDeploymentMismatchError,
|
|
@@ -6852,7 +6828,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
6852
6828
|
return loadedLayouts;
|
|
6853
6829
|
}
|
|
6854
6830
|
|
|
6855
|
-
${
|
|
6831
|
+
${_chunkDTNWLRRFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
6856
6832
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
6857
6833
|
let wrapped = element;
|
|
6858
6834
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -6977,12 +6953,13 @@ async function tryHydrateImportedPage(
|
|
|
6977
6953
|
hydrationOptions = {},
|
|
6978
6954
|
) {
|
|
6979
6955
|
const modulePath = route?.modulePath;
|
|
6980
|
-
|
|
6956
|
+
const pageShouldHydrate = hydrationOptions.pageShouldHydrate !== false;
|
|
6957
|
+
const layoutShouldHydrate = hydrationOptions.layoutShouldHydrate === true;
|
|
6958
|
+
// Layouts that hydrate around server HTML need no page module: a docs runtime page has none.
|
|
6959
|
+
if ((!modulePath && (pageShouldHydrate || !layoutShouldHydrate)) || signal?.aborted) {
|
|
6981
6960
|
return false;
|
|
6982
6961
|
}
|
|
6983
6962
|
|
|
6984
|
-
const pageShouldHydrate = hydrationOptions.pageShouldHydrate !== false;
|
|
6985
|
-
const layoutShouldHydrate = hydrationOptions.layoutShouldHydrate === true;
|
|
6986
6963
|
const islandStrategy = hydrationOptions.islandStrategy || route.islandStrategy || 'load';
|
|
6987
6964
|
let pageElement = null;
|
|
6988
6965
|
// Import layouts before the page, root first, so Vite injects their CSS in the same
|
|
@@ -7037,10 +7014,12 @@ async function tryHydrateImportedPage(
|
|
|
7037
7014
|
);
|
|
7038
7015
|
} else if (layoutShouldHydrate) {
|
|
7039
7016
|
currentPageProps = existingProps || { params };
|
|
7017
|
+
// A navigation passes the page element of the document it fetched, read as it is rather
|
|
7018
|
+
// than serialized and parsed again; hydration reads the page in this document.
|
|
7040
7019
|
const serverPage = document.getElementById('__farm_page__');
|
|
7041
|
-
const pageSource =
|
|
7042
|
-
?
|
|
7043
|
-
:
|
|
7020
|
+
const pageSource = hydrationOptions.navigationPage === undefined
|
|
7021
|
+
? serverPage
|
|
7022
|
+
: hydrationOptions.navigationPage;
|
|
7044
7023
|
const serverTree = pageSource
|
|
7045
7024
|
? await createFarmServerTreePageElement(pageSource, window.location.pathname)
|
|
7046
7025
|
: null;
|
|
@@ -7051,9 +7030,7 @@ async function tryHydrateImportedPage(
|
|
|
7051
7030
|
false,
|
|
7052
7031
|
islandStrategy,
|
|
7053
7032
|
null,
|
|
7054
|
-
|
|
7055
|
-
? hydrationOptions.serverHtml
|
|
7056
|
-
: serverPage ? serverPage.innerHTML : '',
|
|
7033
|
+
pageSource ? pageSource.innerHTML : '',
|
|
7057
7034
|
);
|
|
7058
7035
|
}
|
|
7059
7036
|
if (signal?.aborted || !container?.isConnected || !pageElement) return false;
|
|
@@ -7074,7 +7051,7 @@ async function tryHydrateImportedPage(
|
|
|
7074
7051
|
wrap: wrapFarmClientRouteGraph,
|
|
7075
7052
|
};
|
|
7076
7053
|
} else if (useHydrate && container?.id === '__farm_page__') {
|
|
7077
|
-
wrappedElement = wrapFarmClientRouteGraph(pageElement);
|
|
7054
|
+
wrappedElement = wrapFarmClientRouteGraph(${_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
|
|
7078
7055
|
} else {
|
|
7079
7056
|
wrappedElement = await buildWrappedHydrationElement(
|
|
7080
7057
|
currentPageComponent,
|
|
@@ -7131,13 +7108,25 @@ function findLayoutBoundary(root, pattern) {
|
|
|
7131
7108
|
return null;
|
|
7132
7109
|
}
|
|
7133
7110
|
|
|
7111
|
+
// A layout that renders the document itself has no boundary element: the document names it.
|
|
7112
|
+
function readDocumentLayoutPatterns() {
|
|
7113
|
+
try {
|
|
7114
|
+
const patterns = JSON.parse(document.documentElement.getAttribute('data-farm-document-layouts') || '[]');
|
|
7115
|
+
return Array.isArray(patterns) ? patterns.filter((pattern) => typeof pattern === 'string') : [];
|
|
7116
|
+
} catch {
|
|
7117
|
+
return [];
|
|
7118
|
+
}
|
|
7119
|
+
}
|
|
7120
|
+
|
|
7134
7121
|
function readActiveLayoutPatterns() {
|
|
7135
|
-
return
|
|
7136
|
-
.
|
|
7137
|
-
|
|
7122
|
+
return readDocumentLayoutPatterns().concat(
|
|
7123
|
+
Array.from(document.querySelectorAll('[data-farm-layout-boundary="true"]'))
|
|
7124
|
+
.map((element) => element.getAttribute('data-farm-layout-pattern'))
|
|
7125
|
+
.filter(Boolean),
|
|
7126
|
+
);
|
|
7138
7127
|
}
|
|
7139
7128
|
|
|
7140
|
-
${
|
|
7129
|
+
${_chunkDTNWLRRFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7141
7130
|
|
|
7142
7131
|
function activateFragmentScripts(root) {
|
|
7143
7132
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7196,7 +7185,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7196
7185
|
return shell.innerHTML;
|
|
7197
7186
|
}
|
|
7198
7187
|
|
|
7199
|
-
${islandValues ?
|
|
7188
|
+
${islandValues ? _chunkDTNWLRRFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7200
7189
|
container,
|
|
7201
7190
|
fragment,
|
|
7202
7191
|
currentPatterns,
|
|
@@ -7269,7 +7258,7 @@ ${islandValues ? `
|
|
|
7269
7258
|
return nextTarget;
|
|
7270
7259
|
}
|
|
7271
7260
|
|
|
7272
|
-
${islandValues ? `${
|
|
7261
|
+
${islandValues ? `${_chunkDTNWLRRFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7273
7262
|
|
|
7274
7263
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7275
7264
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -7578,7 +7567,7 @@ async function renderPage(pageData, info) {
|
|
|
7578
7567
|
pageShouldHydrate,
|
|
7579
7568
|
layoutShouldHydrate,
|
|
7580
7569
|
islandStrategy: route.islandStrategy,
|
|
7581
|
-
|
|
7570
|
+
navigationPage: nextPage,
|
|
7582
7571
|
layoutSource: fragment,
|
|
7583
7572
|
loadingModulePath: route.loadingModulePath,
|
|
7584
7573
|
},
|
|
@@ -7760,7 +7749,8 @@ function farmIslandsOnlyDocument() {
|
|
|
7760
7749
|
if (hydratedSlots) replayPreHydrationClicks();
|
|
7761
7750
|
return
|
|
7762
7751
|
}
|
|
7763
|
-
|
|
7752
|
+
// Layouts that hydrate around server HTML need no page module: a docs runtime page has none.
|
|
7753
|
+
if (!modulePath && (pageShouldHydrate || !layoutShouldHydrate)) {
|
|
7764
7754
|
console.error('[Farm.js] No page module path found')
|
|
7765
7755
|
return
|
|
7766
7756
|
}
|
|
@@ -7928,14 +7918,8 @@ document.addEventListener('click', function(event) {
|
|
|
7928
7918
|
|
|
7929
7919
|
// Use SPA router
|
|
7930
7920
|
event.preventDefault();
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
const viewTransitionValue = target.getAttribute('data-view-transition');
|
|
7934
|
-
const viewTransition = viewTransitionValue === 'auto'
|
|
7935
|
-
? 'auto'
|
|
7936
|
-
: viewTransitionValue === 'true';
|
|
7937
|
-
|
|
7938
|
-
spaRouter.navigate(href, { replace, scroll, viewTransition });
|
|
7921
|
+
rememberFarmLinkLocale(target);
|
|
7922
|
+
spaRouter.navigate(href, readFarmLinkNavigateOptions(target));
|
|
7939
7923
|
});
|
|
7940
7924
|
|
|
7941
7925
|
// Link anchors on a page that does not hydrate prefetch through the router as Link would.
|
|
@@ -7971,9 +7955,9 @@ function generateClientManifest(bundle) {
|
|
|
7971
7955
|
return manifest;
|
|
7972
7956
|
}
|
|
7973
7957
|
async function defineConfig(config = {}) {
|
|
7974
|
-
const tailwindVitePlugin = await
|
|
7958
|
+
const tailwindVitePlugin = await _chunkQTDIOZV6cjs.loadTailwindVitePlugin.call(void 0, );
|
|
7975
7959
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
7976
|
-
if (_optionalChain([config, 'access',
|
|
7960
|
+
if (_optionalChain([config, 'access', _494 => _494.extends, 'optionalAccess', _495 => _495.length])) {
|
|
7977
7961
|
const { config: layeredConfig } = await import("./layers-7P4RLKVX.cjs").then(
|
|
7978
7962
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
7979
7963
|
root: appRoot,
|
|
@@ -7983,7 +7967,7 @@ async function defineConfig(config = {}) {
|
|
|
7983
7967
|
config = layeredConfig;
|
|
7984
7968
|
}
|
|
7985
7969
|
config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
7986
|
-
config.images =
|
|
7970
|
+
config.images = _chunkDTNWLRRFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
7987
7971
|
const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
7988
7972
|
ssr: true
|
|
7989
7973
|
});
|
|
@@ -8075,13 +8059,13 @@ async function defineConfig(config = {}) {
|
|
|
8075
8059
|
if (!serverStarted) {
|
|
8076
8060
|
serverStarted = true;
|
|
8077
8061
|
const elapsed = Date.now() - startTime;
|
|
8078
|
-
const address = _optionalChain([server, 'access',
|
|
8062
|
+
const address = _optionalChain([server, 'access', _496 => _496.httpServer, 'optionalAccess', _497 => _497.address, 'call', _498 => _498()]);
|
|
8079
8063
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
8080
8064
|
const hostConfig = server.config.server.host;
|
|
8081
8065
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8082
8066
|
console.log("");
|
|
8083
8067
|
console.log(
|
|
8084
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8068
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkXLOORES5cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8085
8069
|
);
|
|
8086
8070
|
console.log("");
|
|
8087
8071
|
console.log(
|
|
@@ -8115,23 +8099,23 @@ async function defineConfig(config = {}) {
|
|
|
8115
8099
|
plugins: [
|
|
8116
8100
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8117
8101
|
_chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8118
|
-
|
|
8102
|
+
_chunkDTNWLRRFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8119
8103
|
tailwindVitePlugin,
|
|
8120
8104
|
...rendererVitePlugins,
|
|
8121
8105
|
...reactRefreshPlugins,
|
|
8122
8106
|
viteBrowserExternalPlugin,
|
|
8123
8107
|
farmI18nClientBridgePlugin(),
|
|
8124
|
-
farmServerOnlyEntriesPlugin(),
|
|
8108
|
+
farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
|
|
8125
8109
|
farmIslandContainersPlugin(config),
|
|
8126
8110
|
farmPlugin(config),
|
|
8127
|
-
|
|
8111
|
+
_chunkQP4GYVRRcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8128
8112
|
farmBrandingPlugin
|
|
8129
8113
|
],
|
|
8130
8114
|
customLogger: farmLogger,
|
|
8131
8115
|
clearScreen: false,
|
|
8132
8116
|
optimizeDeps: {
|
|
8133
|
-
...
|
|
8134
|
-
|
|
8117
|
+
..._chunkDTNWLRRFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8118
|
+
_chunkDTNWLRRFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8135
8119
|
appRoot,
|
|
8136
8120
|
_chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8137
8121
|
),
|
|
@@ -8174,7 +8158,7 @@ async function defineConfig(config = {}) {
|
|
|
8174
8158
|
// Stub out problematic server-only modules during dev mode
|
|
8175
8159
|
alias: {
|
|
8176
8160
|
..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8177
|
-
...
|
|
8161
|
+
..._chunkDTNWLRRFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8178
8162
|
// Nitro internals that should not be resolved in browser
|
|
8179
8163
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8180
8164
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|