@farm.js/core 0.2.0-beta.1 → 0.2.0-beta.4
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/THIRD-PARTY-LICENSES.md +3220 -0
- package/dist/after.cjs +3 -3
- package/dist/after.mjs +1 -1
- package/dist/{agent-mcp-handler-GDY5CPPW.mjs → agent-mcp-handler-BY7VJQ4W.mjs} +5 -5
- package/dist/agent-mcp-handler-S4UTE7NO.cjs +21 -0
- package/dist/{agent-mcp.d-CMGqpUbk.d.mts → agent-mcp.d-BdFnjlAT.d.mts} +1 -1
- package/dist/{agent-mcp.d-BdM0pIrD.d.ts → agent-mcp.d-CAwDC9y4.d.ts} +1 -1
- package/dist/agent-runtime.cjs +25 -22
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-3AMJK27J.cjs +17 -0
- package/dist/{analyzer-RYSF2BM3.mjs → analyzer-K3S4YRAH.mjs} +3 -3
- package/dist/api/client.cjs +16 -16
- package/dist/api/client.mjs +1 -1
- package/dist/api/client.native.cjs +21 -18
- package/dist/api/client.native.mjs +1 -1
- package/dist/api/node.cjs +29 -26
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/node.mjs +1 -1
- package/dist/api/route-manager.cjs +45 -45
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +4 -4
- package/dist/api/runtime.cjs +25 -25
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api/runtime.mjs +1 -1
- package/dist/api.cjs +57 -57
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +5 -5
- package/dist/{app-manifest.d-BeDB2OVm.d.mts → app-manifest.d-COs1wBGz.d.mts} +1 -1
- package/dist/{app-manifest.d-COhjPgHn.d.ts → app-manifest.d-Dczk-fwt.d.ts} +1 -1
- package/dist/app-markdown-compiler-4RCCOTTF.cjs +33007 -0
- package/dist/app-markdown-compiler-OM2AMFRK.mjs +32402 -0
- package/dist/app-markdown.cjs +18 -16
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +8 -6
- package/dist/{app.d-CoY-zsJt.d.ts → app.d-DREl_yXh.d.ts} +26 -10
- package/dist/{app.d-DE5KNbmf.d.mts → app.d-LepnxO-5.d.mts} +26 -10
- package/dist/cache.cjs +8 -8
- package/dist/cache.mjs +1 -1
- package/dist/{chunk-AG27TI6Q.mjs → chunk-23NBOP43.mjs} +3 -0
- package/dist/{chunk-OLKYHTLN.cjs → chunk-25CHWAZY.cjs} +14 -10
- package/dist/{chunk-26WP75W5.cjs → chunk-27IPPPCV.cjs} +51 -40
- package/dist/{chunk-PHCJJJZV.cjs → chunk-2HC46EGU.cjs} +6 -2
- package/dist/{chunk-MF3IA2AW.cjs → chunk-2L4M6YUG.cjs} +6 -1
- package/dist/{chunk-YPAOC3FO.mjs → chunk-2ORWY3SE.mjs} +4 -4
- package/dist/{chunk-VGZIIOU6.cjs → chunk-2PSN2PUJ.cjs} +12 -8
- package/dist/{chunk-CIY74JLV.cjs → chunk-2RA2VIKN.cjs} +9 -5
- package/dist/{chunk-NZRAUCUL.cjs → chunk-2UV765GT.cjs} +26 -20
- package/dist/{chunk-A3LNXQJJ.cjs → chunk-2VLW3HWJ.cjs} +9 -2
- package/dist/{chunk-4EBC7EMW.cjs → chunk-323JTLXR.cjs} +6 -1
- package/dist/{chunk-7KJJ4SBS.cjs → chunk-32HGOX3M.cjs} +6 -1
- package/dist/{chunk-RKQOMG2X.cjs → chunk-3ACTVXZG.cjs} +9 -5
- package/dist/{chunk-N3H7UPBM.cjs → chunk-3EZHMZGD.cjs} +6 -1
- package/dist/{chunk-LQWIIBI2.cjs → chunk-3KLDTMIC.cjs} +6 -1
- package/dist/{chunk-OO7DYIJD.cjs → chunk-3YT7DIIS.cjs} +7 -1
- package/dist/{chunk-HR5GU4UU.cjs → chunk-4A6WSOZH.cjs} +55 -49
- package/dist/{chunk-E5UN4OWX.cjs → chunk-4JARM2QQ.cjs} +6 -1
- package/dist/{chunk-VGVRGGP4.cjs → chunk-4JCX33RZ.cjs} +13 -8
- package/dist/chunk-4RLFAN7T.cjs +6 -0
- package/dist/{chunk-OZUINP2P.cjs → chunk-4USE4SEU.cjs} +19 -15
- package/dist/{chunk-PENBZAHJ.cjs → chunk-57OAZCWQ.cjs} +6 -1
- package/dist/{chunk-TWFJJPE7.cjs → chunk-5BZ7PR3T.cjs} +42 -38
- package/dist/{chunk-JYQ6DGPW.cjs → chunk-5P3TZGS3.cjs} +52 -45
- package/dist/{chunk-2U2GRXP5.mjs → chunk-5UMPMVNF.mjs} +1 -1
- package/dist/{chunk-OZC2JPW6.cjs → chunk-5XYJ5KRN.cjs} +6 -1
- package/dist/{chunk-QKW6DLDT.cjs → chunk-5YT2ZSWS.cjs} +17 -13
- package/dist/{chunk-QCKSYYXK.cjs → chunk-63S7DAEG.cjs} +21 -17
- package/dist/{chunk-FDGYDQGL.cjs → chunk-66WIOZXX.cjs} +7 -1
- package/dist/{chunk-MHKPXX3J.cjs → chunk-6AUPJYHF.cjs} +13 -9
- package/dist/{chunk-DVJM55D2.cjs → chunk-6FIY4KBC.cjs} +6 -1
- package/dist/{chunk-TIZJYHB7.mjs → chunk-6IUWKO2Q.mjs} +15 -0
- package/dist/{chunk-VWIW47FW.cjs → chunk-6K7LEL2T.cjs} +6 -1
- package/dist/{chunk-UZCMMJJT.cjs → chunk-6NQ63L6N.cjs} +6 -1
- package/dist/{chunk-BTVDYS4B.cjs → chunk-6QCZWAGO.cjs} +6 -1
- package/dist/{chunk-RDADQG5S.cjs → chunk-6QWCFVGL.cjs} +14 -7
- package/dist/{chunk-JRGR5Z4K.cjs → chunk-6VC7NUY3.cjs} +6 -1
- package/dist/{chunk-CKPTIEDX.cjs → chunk-7BFFBYLN.cjs} +6 -1
- package/dist/{chunk-7Q7UB4TL.cjs → chunk-7GKZDRY2.cjs} +9 -5
- package/dist/{chunk-WP77JDKI.cjs → chunk-7JI7W2MD.cjs} +34 -30
- package/dist/{chunk-C7LCTVJ2.cjs → chunk-7JZVCHNF.cjs} +10 -6
- package/dist/{chunk-QZUCVJZJ.cjs → chunk-7M3X4CBY.cjs} +6 -1
- package/dist/{chunk-7JUIK547.cjs → chunk-7MQMWGTL.cjs} +6 -1
- package/dist/{chunk-PIUTGRDI.cjs → chunk-7O3YJ6NP.cjs} +6 -1
- package/dist/{chunk-SXCL2MIN.cjs → chunk-7V5MQSBL.cjs} +9 -1
- package/dist/{chunk-7U4XF76R.cjs → chunk-7ZDLE77P.cjs} +12 -8
- package/dist/{chunk-NU5XLYRN.cjs → chunk-A2ELHZBZ.cjs} +10 -1
- package/dist/{chunk-DMSXZNQR.cjs → chunk-ADCVSTFV.cjs} +18 -11
- package/dist/{chunk-ISSFWEPY.mjs → chunk-AGEBFYHF.mjs} +35 -18
- package/dist/{chunk-ND65INFS.cjs → chunk-AGT633OM.cjs} +27 -23
- package/dist/{chunk-WEZTGM7N.cjs → chunk-APKULXZV.cjs} +11 -9
- package/dist/chunk-AZJEQ5CR.cjs +6 -0
- package/dist/{chunk-ZMSVKVI3.cjs → chunk-B2VSX33T.cjs} +6 -1
- package/dist/{chunk-AQIRXBBY.cjs → chunk-B6JPBPBQ.cjs} +6 -1
- package/dist/{chunk-QBXS4TNG.mjs → chunk-BL54BTVJ.mjs} +1 -1
- package/dist/{chunk-W76C7TCW.cjs → chunk-BNVQSUZK.cjs} +6 -2
- package/dist/{chunk-MNUYXZV7.cjs → chunk-BNWADCG2.cjs} +6 -1
- package/dist/{chunk-CCAUIBIS.cjs → chunk-BRWSQDKO.cjs} +10 -1
- package/dist/{chunk-6BMAGVDI.cjs → chunk-C4DZAEVT.cjs} +48 -41
- package/dist/{chunk-KQS27YN7.cjs → chunk-C6DR4JAR.cjs} +14 -10
- package/dist/{chunk-Y3WG64CP.cjs → chunk-CH2JX3CM.cjs} +6 -1
- package/dist/{chunk-KQ6TYQU7.cjs → chunk-COMBIEAP.cjs} +44 -36
- package/dist/{chunk-YU2MNIIY.mjs → chunk-CRF5MOLO.mjs} +17 -4
- package/dist/{chunk-YUQUGVSV.cjs → chunk-CTTXHHZG.cjs} +50 -46
- package/dist/{chunk-FDZZ6K3N.cjs → chunk-CUW7K4AU.cjs} +14 -10
- package/dist/{chunk-NQ3Y6E2T.mjs → chunk-CV4MOEMO.mjs} +2 -2
- package/dist/chunk-CWSUKW2H.cjs +6 -0
- package/dist/{chunk-DZC2XGK4.mjs → chunk-D5OY5OKA.mjs} +132 -48
- package/dist/{chunk-T3SMMLSB.cjs → chunk-DB4NOIQC.cjs} +12 -8
- package/dist/{chunk-PKV3JGMS.mjs → chunk-DFLCEMQ3.mjs} +1 -1
- package/dist/{chunk-OWOUTKIJ.cjs → chunk-DQYMTSF3.cjs} +6 -1
- package/dist/{chunk-7V5M43ND.mjs → chunk-DVL3UVYT.mjs} +2 -2
- package/dist/{chunk-ZSVFI7JM.cjs → chunk-DVXT7RLV.cjs} +23 -18
- package/dist/{chunk-UNOXV37V.cjs → chunk-DYGHX2UR.cjs} +6 -1
- package/dist/{chunk-M3JYBZO2.cjs → chunk-E5AC7E25.cjs} +24 -20
- package/dist/{chunk-LSHX2H5G.cjs → chunk-EBE6BK54.cjs} +6 -1
- package/dist/{chunk-YNPVG2GG.mjs → chunk-EBVKVDQA.mjs} +1 -1
- package/dist/{chunk-WT6RAN2I.cjs → chunk-EGMJ5KEU.cjs} +6 -1
- package/dist/{chunk-22KXTL3I.cjs → chunk-EJLMRNSV.cjs} +24 -19
- package/dist/{chunk-RDNKQ5MK.cjs → chunk-EMM3YXXI.cjs} +19 -15
- package/dist/{chunk-EACD6ND7.cjs → chunk-ERSLQ4C7.cjs} +18 -11
- package/dist/{chunk-4WXNTAOM.mjs → chunk-EUVHELJL.mjs} +1 -1
- package/dist/{chunk-J6TZRYCO.cjs → chunk-F5JTXLS7.cjs} +6 -1
- package/dist/{chunk-FLKG2PYH.cjs → chunk-F5T55PYX.cjs} +103 -95
- package/dist/{chunk-N2ZMSSPP.cjs → chunk-FYVSAWJP.cjs} +77 -70
- package/dist/{chunk-HUGPJFOC.cjs → chunk-G22QP2MX.cjs} +9 -5
- package/dist/{chunk-PMJSG4JS.cjs → chunk-G5KGLMPN.cjs} +6 -1
- package/dist/{chunk-R5U7OIPI.cjs → chunk-GAII22G2.cjs} +6 -1
- package/dist/{chunk-6CTFVBAT.cjs → chunk-GKYOFMPQ.cjs} +6 -1
- package/dist/{chunk-JYT7AN37.cjs → chunk-GLP3ID53.cjs} +6 -1
- package/dist/{chunk-QBJ6N5MT.mjs → chunk-GN2RXH72.mjs} +1 -1
- package/dist/{chunk-RQRTH57V.cjs → chunk-GQONHUMI.cjs} +6 -1
- package/dist/{chunk-EOXPRC2C.cjs → chunk-GQQID5IB.cjs} +7 -1
- package/dist/{chunk-IUKBPBM7.cjs → chunk-GUDYDNKU.cjs} +6 -1
- package/dist/{chunk-6GJZJAED.mjs → chunk-GUNPDMSX.mjs} +1 -1
- package/dist/{chunk-KCJBIWBM.mjs → chunk-GVORDLLV.mjs} +1 -1
- package/dist/{chunk-ZZGQD3LL.mjs → chunk-GXWCR7PP.mjs} +11 -5
- package/dist/{chunk-VS7HLH4S.cjs → chunk-GYH2B4YQ.cjs} +12 -8
- package/dist/{chunk-IJPRCQHW.cjs → chunk-H3TYWCMG.cjs} +18 -14
- package/dist/{chunk-2OF5RPVU.cjs → chunk-H5AC3XSE.cjs} +18 -14
- package/dist/{chunk-ZIOFRBIU.cjs → chunk-H7INTSUK.cjs} +15 -9
- package/dist/{chunk-RFNQTQ44.cjs → chunk-HBRCMX24.cjs} +10 -5
- package/dist/{chunk-XRSNW4IU.mjs → chunk-HDZ2AMDD.mjs} +5 -0
- package/dist/{chunk-UA77C2ZA.cjs → chunk-HF3JJPH4.cjs} +58 -50
- package/dist/{chunk-CPMK7EFR.mjs → chunk-HFOME6I2.mjs} +7 -7
- package/dist/{chunk-XGL42MQ7.mjs → chunk-HIDZM23B.mjs} +1 -1
- package/dist/{chunk-T7UC2ORA.cjs → chunk-HP7QYVST.cjs} +7 -1
- package/dist/{chunk-JP5TWUK2.cjs → chunk-HSAHQBMG.cjs} +8 -4
- package/dist/{chunk-3BTN3NP7.cjs → chunk-I5PDHLKE.cjs} +6 -2
- package/dist/{chunk-L4B7PB3H.cjs → chunk-IASZIYNM.cjs} +1384 -757
- package/dist/{chunk-2RSVYJT6.cjs → chunk-IBZW57NW.cjs} +9 -5
- package/dist/{chunk-KORZ6PRE.cjs → chunk-IDUGG7VR.cjs} +6 -1
- package/dist/{chunk-6JHZPB52.cjs → chunk-IEZFFXSC.cjs} +10 -6
- package/dist/{chunk-VACYUMXW.cjs → chunk-IGA3OTFY.cjs} +37 -29
- package/dist/{chunk-4ZVKDHS6.cjs → chunk-IGBQSUT5.cjs} +55 -40
- package/dist/{chunk-OQOII62L.mjs → chunk-II4ENBE4.mjs} +1 -1
- package/dist/{chunk-JIBEFLQ7.cjs → chunk-IKYNDANT.cjs} +7 -1
- package/dist/{chunk-Z43CIBUR.cjs → chunk-IU4YTFFQ.cjs} +16 -12
- package/dist/{chunk-KBGZ5FD6.cjs → chunk-IVEV44O2.cjs} +6 -2
- package/dist/{chunk-MCSRMEQV.cjs → chunk-J2JMESBJ.cjs} +6 -1
- package/dist/{chunk-WMRGIQTA.cjs → chunk-J3RIMCBD.cjs} +6 -1
- package/dist/{chunk-N4AQNEXR.cjs → chunk-JIBZ6SCC.cjs} +6 -1
- package/dist/{chunk-IZYFP7IN.cjs → chunk-JOSR2E2C.cjs} +17 -13
- package/dist/{chunk-AOKXITZ6.cjs → chunk-JOZDAIKZ.cjs} +6 -1
- package/dist/{chunk-NG2EZ6QS.cjs → chunk-JYQMGMKT.cjs} +20 -6
- package/dist/{chunk-J6RFB324.cjs → chunk-JZCUDAH2.cjs} +6 -1
- package/dist/{chunk-ECVSRE4Y.mjs → chunk-K44IR6WC.mjs} +1 -1
- package/dist/{chunk-SUCDVKUB.cjs → chunk-K6LZMZNB.cjs} +6 -1
- package/dist/{chunk-GYJT2U7J.cjs → chunk-KAD5WBY4.cjs} +9 -5
- package/dist/{chunk-52Q4OB4A.cjs → chunk-KBURN62Z.cjs} +10 -6
- package/dist/{chunk-O4JYMU5N.cjs → chunk-KDUVIJSZ.cjs} +22 -18
- package/dist/{chunk-2LHZD3OP.cjs → chunk-KEBD377T.cjs} +6 -2
- package/dist/{chunk-3DE6RK7K.cjs → chunk-KHTJVI6B.cjs} +6 -1
- package/dist/{chunk-OY5XDG24.cjs → chunk-KI3B3H5K.cjs} +9 -5
- package/dist/{chunk-KRU3XPOW.cjs → chunk-KM7ZRKCH.cjs} +61 -49
- package/dist/{chunk-P2355C6E.cjs → chunk-KSRWTQ6J.cjs} +6 -1
- package/dist/{chunk-SHIWRBFI.cjs → chunk-KUG3P3GY.cjs} +6 -1
- package/dist/{chunk-T7HGXF7D.cjs → chunk-KXCPX3HE.cjs} +11 -7
- package/dist/{chunk-C5QHZ626.cjs → chunk-KXXZDS7C.cjs} +6 -1
- package/dist/{chunk-DUIP64BF.cjs → chunk-KYFTDHNN.cjs} +6 -1
- package/dist/{chunk-VXCFJWK5.cjs → chunk-L6CW5AWM.cjs} +6 -1
- package/dist/{chunk-XGPRM7OK.cjs → chunk-LEK3P2ZD.cjs} +16 -7
- package/dist/{chunk-HA7YRO53.cjs → chunk-LF7HAALM.cjs} +6 -1
- package/dist/{chunk-2KMIJDY6.cjs → chunk-LG62AYPQ.cjs} +6 -1
- package/dist/{chunk-SMUW7UST.mjs → chunk-LO5BNR6Y.mjs} +7 -2
- package/dist/{chunk-4A6A6P4T.mjs → chunk-LOQVWATF.mjs} +2 -2
- package/dist/{chunk-PEQJ4UUT.mjs → chunk-LP6DIYGA.mjs} +2 -2
- package/dist/{chunk-PWDBWXQI.cjs → chunk-LVYUTMW4.cjs} +6 -1
- package/dist/{chunk-EBKYRP2P.mjs → chunk-LWQ6IESX.mjs} +1 -1
- package/dist/{chunk-XRRHPBG2.cjs → chunk-M6W3AN57.cjs} +6 -1
- package/dist/{chunk-PZXYAWYG.cjs → chunk-M7RS7HSB.cjs} +13 -8
- package/dist/{chunk-27ESPHQA.cjs → chunk-MBDDLYT5.cjs} +59 -38
- package/dist/{chunk-CEVXKJKF.cjs → chunk-MMSCWTJT.cjs} +6 -1
- package/dist/{chunk-OOOUYA6L.mjs → chunk-MRDI6MTL.mjs} +8 -8
- package/dist/{chunk-B3HQTGXS.cjs → chunk-N4AM7Q34.cjs} +83 -74
- package/dist/{chunk-DXUXQP2T.cjs → chunk-N4C72FCD.cjs} +6 -1
- package/dist/{chunk-H7REG7OX.cjs → chunk-NKW4JEOH.cjs} +13 -9
- package/dist/{chunk-XRFGOYXG.cjs → chunk-NMMCBJZM.cjs} +17 -12
- package/dist/{chunk-FJGA3XWL.cjs → chunk-NNHIV3O2.cjs} +9 -2
- package/dist/{chunk-SHDCKRP4.cjs → chunk-NQUZDXKJ.cjs} +7 -3
- package/dist/{chunk-Y3DO7BIJ.cjs → chunk-O7B6LJWE.cjs} +10 -3
- package/dist/{chunk-5GFTMTX3.cjs → chunk-OBERQH7M.cjs} +42 -37
- package/dist/{chunk-NW3DL2PM.cjs → chunk-OCQSYDMG.cjs} +11 -4
- package/dist/{chunk-ZNXU4E6A.cjs → chunk-OSLI2SCA.cjs} +83 -72
- package/dist/{chunk-HLYRXN2I.cjs → chunk-OUOUPA37.cjs} +6 -1
- package/dist/{chunk-YIGUFJMR.cjs → chunk-OVSK47CZ.cjs} +6 -1
- package/dist/{chunk-ATYTLVSI.cjs → chunk-OX63SW6N.cjs} +7 -1
- package/dist/{chunk-YKHRCY4T.cjs → chunk-P2LSRUQB.cjs} +6 -1
- package/dist/{chunk-XJDB564A.cjs → chunk-P4ZLFUNB.cjs} +7 -2
- package/dist/{chunk-2OFP3IVA.cjs → chunk-P5RNGH52.cjs} +32 -18
- package/dist/{chunk-VZWAXQME.mjs → chunk-P67RLOMO.mjs} +34 -2
- package/dist/{chunk-6FXBJPF5.cjs → chunk-PCF54MSR.cjs} +6 -1
- package/dist/{chunk-GVYZCJZH.cjs → chunk-PHYSFHJK.cjs} +6 -1
- package/dist/{chunk-4DCWVSL2.cjs → chunk-PHZ7MLRQ.cjs} +6 -1
- package/dist/{chunk-PCAEJNQF.cjs → chunk-PNMRXZS5.cjs} +13 -9
- package/dist/{chunk-HS4JPIGR.cjs → chunk-PRKFECGT.cjs} +7 -3
- package/dist/{chunk-OIPPISQ6.cjs → chunk-PSALMEHJ.cjs} +431 -212
- package/dist/{chunk-YUCU6XB4.cjs → chunk-PYPHM7AS.cjs} +9 -4
- package/dist/{chunk-ZPQY7O64.cjs → chunk-QBCR2EHA.cjs} +9 -5
- package/dist/{chunk-H7OFZJCV.cjs → chunk-QBMMQS25.cjs} +14 -8
- package/dist/{chunk-Y2FEFQAY.cjs → chunk-QCVP22KW.cjs} +8 -5
- package/dist/{chunk-J3GFOQOL.cjs → chunk-QGJL7EPX.cjs} +13 -9
- package/dist/{chunk-2PE5STAR.cjs → chunk-QHHEL4ZO.cjs} +6 -2
- package/dist/{chunk-LTOT5KVJ.mjs → chunk-QKXQFBNL.mjs} +1 -1
- package/dist/{chunk-L6E5BSNU.cjs → chunk-QT7MJL5E.cjs} +7 -3
- package/dist/{chunk-ERMUL73L.cjs → chunk-QTGYT2DF.cjs} +6 -1
- package/dist/{chunk-WBTHHTBO.cjs → chunk-QW5I5D5T.cjs} +6 -1
- package/dist/{chunk-IIHZ2BEE.cjs → chunk-QZRFEHMS.cjs} +15 -11
- package/dist/{chunk-HXNLKCWH.cjs → chunk-QZVPBDF7.cjs} +6 -1
- package/dist/{chunk-W53Z4WDI.cjs → chunk-R6GOH5CH.cjs} +18 -14
- package/dist/{chunk-2BEGVSDF.cjs → chunk-RBDAW6IZ.cjs} +7 -3
- package/dist/{chunk-PLJMEUAN.cjs → chunk-RFKPIAOF.cjs} +9 -1
- package/dist/{chunk-HQEYZSF3.cjs → chunk-RGIHE6YL.cjs} +6 -2
- package/dist/{chunk-6B44ZU5P.cjs → chunk-RHORD2K2.cjs} +19 -15
- package/dist/{chunk-5AL2GXAU.mjs → chunk-RKWZ6F5D.mjs} +2 -2
- package/dist/{chunk-OCS3PSYR.cjs → chunk-RLC7NNTA.cjs} +6 -1
- package/dist/{chunk-STF6VDYQ.cjs → chunk-RQSPBWXJ.cjs} +6 -1
- package/dist/{chunk-RWR7SMD7.cjs → chunk-S2QSTMBE.cjs} +7 -3
- package/dist/{chunk-HZY63K5C.mjs → chunk-S6MGFULY.mjs} +2 -2
- package/dist/{chunk-GCJ4GNMC.cjs → chunk-SGBEJBBB.cjs} +8 -4
- package/dist/chunk-SGRWZEQC.cjs +44 -0
- package/dist/{chunk-NDMPGFKL.cjs → chunk-SIQPXYBB.cjs} +6 -1
- package/dist/{chunk-2HTNASSB.cjs → chunk-SM4Y7CL4.cjs} +10 -6
- package/dist/{chunk-UNJZGVPU.cjs → chunk-SQ5O5EDN.cjs} +6 -1
- package/dist/{chunk-A25FXJ7D.cjs → chunk-SWOJU7LI.cjs} +6 -1
- package/dist/{chunk-BNH53KOT.cjs → chunk-SZBBBLLS.cjs} +6 -1
- package/dist/{chunk-23BZ7ZH6.mjs → chunk-T4NOMZTS.mjs} +7 -4
- package/dist/{chunk-ML4TOUZP.cjs → chunk-T4YCWRCJ.cjs} +6 -1
- package/dist/{chunk-NDOE76QC.cjs → chunk-TDAH76RR.cjs} +8 -4
- package/dist/{chunk-D22BUQKW.cjs → chunk-TFCBJFP7.cjs} +6 -1
- package/dist/{chunk-ICOJ2BC6.mjs → chunk-TP3ISVRU.mjs} +26 -19
- package/dist/{chunk-3EIPOTZV.cjs → chunk-TP7JAC3T.cjs} +6 -2
- package/dist/{chunk-4IE3YK7U.mjs → chunk-TQCDN4DV.mjs} +1 -1
- package/dist/{chunk-FB4CWSC2.cjs → chunk-TSLXAEGM.cjs} +16 -12
- package/dist/{chunk-2NOHVIJ3.cjs → chunk-U2HFXURZ.cjs} +36 -13
- package/dist/{chunk-SHD265HW.cjs → chunk-U3NUGF2E.cjs} +7 -1
- package/dist/{chunk-SVXOCTQ2.cjs → chunk-UARKTC55.cjs} +6 -1
- package/dist/{chunk-KBIM7PFQ.cjs → chunk-UBH2OARS.cjs} +758 -643
- package/dist/{chunk-WX752VMN.mjs → chunk-UCRNNDNS.mjs} +1 -1
- package/dist/{chunk-UZM3PDKK.cjs → chunk-UGL4BDNB.cjs} +27 -3
- package/dist/{chunk-GBMWLDCC.cjs → chunk-UHTXBC4Q.cjs} +7 -1
- package/dist/{chunk-47JV57DA.cjs → chunk-UOFTT6S4.cjs} +6 -1
- package/dist/{chunk-MO4UTDQ6.mjs → chunk-V36K4TSU.mjs} +2 -2
- package/dist/{chunk-SPKZCFPH.mjs → chunk-V5F6HN7E.mjs} +4 -4
- package/dist/{chunk-I2RBHZF7.cjs → chunk-VB7P66Q4.cjs} +6 -1
- package/dist/{chunk-BIAGSYIZ.cjs → chunk-VD7ENQP2.cjs} +54 -47
- package/dist/{chunk-NVXU5BEG.mjs → chunk-VGX75645.mjs} +266 -61
- package/dist/{chunk-NLBHLPEO.cjs → chunk-VIDUNAQE.cjs} +6 -1
- package/dist/{chunk-6ETHVRFO.cjs → chunk-VMIR4SUL.cjs} +760 -714
- package/dist/{chunk-VM57CK74.cjs → chunk-VNWKJOJF.cjs} +6 -1
- package/dist/{chunk-HENPVGZC.cjs → chunk-VQYGXWCS.cjs} +103 -63
- package/dist/{chunk-AMMFRXFW.mjs → chunk-VS4ABIJJ.mjs} +1 -1
- package/dist/{chunk-MPU5DOXX.cjs → chunk-VUCDMV3Q.cjs} +6 -1
- package/dist/{chunk-CIQCJ72N.mjs → chunk-VVIO7QGN.mjs} +772 -176
- package/dist/{chunk-L2GUEYHR.cjs → chunk-VZ2P6GRC.cjs} +8 -1
- package/dist/{chunk-3SPECQXI.cjs → chunk-W4KSV6GX.cjs} +13 -9
- package/dist/{chunk-KMGHXIDA.cjs → chunk-W4WFKRLR.cjs} +17 -13
- package/dist/chunk-W7BMZI3I.cjs +6 -0
- package/dist/{chunk-HR4N2K4V.mjs → chunk-WABOJXAA.mjs} +2 -2
- package/dist/{chunk-LTXKRIST.mjs → chunk-WANLI3ZC.mjs} +2 -2
- package/dist/{chunk-SNP33A33.cjs → chunk-WCPGU6J6.cjs} +6 -1
- package/dist/{chunk-2OR5WAD5.cjs → chunk-WFNL24R6.cjs} +58 -43
- package/dist/{chunk-XOFJUSWC.cjs → chunk-WJ5ADUI2.cjs} +18 -14
- package/dist/{chunk-Z7ZRBCAB.mjs → chunk-WLOIUPV2.mjs} +97 -66
- package/dist/{chunk-TE7AX6HB.mjs → chunk-WV63R4GE.mjs} +1 -1
- package/dist/{chunk-JCYDWJVO.cjs → chunk-WZSLDPVZ.cjs} +13 -9
- package/dist/{chunk-O5YM6GU3.mjs → chunk-X2TC6PBK.mjs} +1 -1
- package/dist/{chunk-BSX5OGSD.cjs → chunk-XE3E4MER.cjs} +24 -20
- package/dist/{chunk-3BIASUGR.cjs → chunk-XEPUUTGC.cjs} +6 -1
- package/dist/{chunk-HQKCSJEH.cjs → chunk-XH4GQ7MT.cjs} +17 -10
- package/dist/{chunk-SIECKBNK.cjs → chunk-XJEOHDPN.cjs} +6 -1
- package/dist/{chunk-5AMH6AFA.cjs → chunk-XK7SRVHC.cjs} +15 -11
- package/dist/chunk-XPVS4HKU.cjs +16 -0
- package/dist/{chunk-WKVYF2B5.cjs → chunk-XSJYXUY6.cjs} +6 -1
- package/dist/{chunk-5DX3O6TT.cjs → chunk-XSLYRNNA.cjs} +8 -4
- package/dist/{chunk-UUQNJDGH.cjs → chunk-XTQPYWQW.cjs} +6 -1
- package/dist/{chunk-3HLQTOVU.cjs → chunk-XVD5Y6S4.cjs} +6 -1
- package/dist/{chunk-7Q2YWZF7.cjs → chunk-XXBWKAJF.cjs} +14 -10
- package/dist/{chunk-YDXLC4DW.cjs → chunk-XZ6L3FUU.cjs} +6 -1
- package/dist/{chunk-FZ7OUN5M.cjs → chunk-Y3HLU2XL.cjs} +6 -2
- package/dist/{chunk-I2BYNELA.cjs → chunk-Y6WRVFD6.cjs} +9 -5
- package/dist/{chunk-OOZEU5KK.cjs → chunk-YC3LKWJO.cjs} +6 -1
- package/dist/{chunk-SXXSQVKK.cjs → chunk-YCIFGYBY.cjs} +13 -8
- package/dist/{chunk-CYOTNHDF.cjs → chunk-YHALJBYT.cjs} +6 -2
- package/dist/{chunk-WOAXQ5MZ.cjs → chunk-YLEL4ZRQ.cjs} +18 -14
- package/dist/{chunk-WEGAVN37.cjs → chunk-YMJK6VWQ.cjs} +6 -1
- package/dist/{chunk-2HW5LWAH.cjs → chunk-YQ5NVEFS.cjs} +6 -1
- package/dist/{chunk-AQLHD6HZ.cjs → chunk-YQXLBYY2.cjs} +20 -11
- package/dist/{chunk-IBEHVSU4.cjs → chunk-YUV5XXDC.cjs} +6 -1
- package/dist/{chunk-PWMJBCAN.cjs → chunk-YV47TSSB.cjs} +7 -3
- package/dist/{chunk-X333W5KV.cjs → chunk-YZMSJRM5.cjs} +6 -1
- package/dist/{chunk-VFMHE5D3.cjs → chunk-Z23OCU33.cjs} +29 -25
- package/dist/{chunk-DBYNZIIQ.cjs → chunk-Z2JQR56W.cjs} +6 -1
- package/dist/{chunk-RK3YYUX6.cjs → chunk-ZKVA2TV6.cjs} +6 -1
- package/dist/{chunk-SAPG45RA.cjs → chunk-ZPZGC6OD.cjs} +31 -27
- package/dist/{chunk-DV52ZS53.cjs → chunk-ZRRNF26T.cjs} +6 -2
- package/dist/{chunk-PO5MXV5X.cjs → chunk-ZSSBEPN4.cjs} +6 -1
- package/dist/{cli-runtime.d-qL44rqYO.d.mts → cli-runtime.d-BGaFPum1.d.mts} +5 -5
- package/dist/{cli-runtime.d-jqZ7YCsm.d.ts → cli-runtime.d-Bvfxt4uo.d.ts} +5 -5
- package/dist/client/lifecycle.cjs +8 -3
- package/dist/client/lifecycle.mjs +1 -1
- package/dist/{client-component.d-B2L2LyAr.d.mts → client-component.d-BA6kXI5L.d.mts} +1 -1
- package/dist/{client-component.d-BDD5aiUb.d.ts → client-component.d-LSEmRhuI.d.ts} +1 -1
- package/dist/client-plugins.cjs +8 -3
- package/dist/{client-plugins.d-Crct3m_r.d.ts → client-plugins.d-CQ6AGHP0.d.ts} +44 -4
- package/dist/{client-plugins.d-Dzc3vOw_.d.mts → client-plugins.d-CVUMc2ai.d.mts} +44 -4
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +51 -51
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/client.mjs +4 -4
- package/dist/config.cjs +3 -3
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/cron.cjs +9 -9
- package/dist/cron.mjs +1 -1
- package/dist/deferred.cjs +3 -3
- package/dist/deferred.mjs +1 -1
- package/dist/deployment.cjs +3 -3
- package/dist/deployment.mjs +1 -1
- package/dist/desktop.cjs +4 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/desktop.mjs +1 -1
- package/dist/{dev-guard-VIEEA4LS.cjs → dev-guard-M3ZCDWCK.cjs} +14 -11
- package/dist/{dev-guard-K3GJDPEQ.mjs → dev-guard-TFVWJNIB.mjs} +2 -2
- package/dist/{devtools-JTJA2KIZ.cjs → devtools-OBQY3XOY.cjs} +72 -69
- package/dist/{devtools-5DBTT2DI.mjs → devtools-RYTO2V7G.mjs} +7 -7
- package/dist/{devtools-client-BKBCCORT.cjs → devtools-client-3K67NMWA.cjs} +7 -4
- package/dist/{devtools-client-L4MUWD6K.mjs → devtools-client-WAMA6Q77.mjs} +1 -1
- package/dist/{devtools-ui-C2EMF2SO.cjs → devtools-ui-TPBPQEEB.cjs} +4 -1
- package/dist/{devtools-ui-BOG33MT5.mjs → devtools-ui-UYEVDADD.mjs} +1 -1
- package/dist/docs.cjs +72 -72
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +9 -9
- package/dist/env-types.cjs +4 -4
- package/dist/env-types.mjs +1 -1
- package/dist/env.cjs +4 -4
- package/dist/env.mjs +1 -1
- package/dist/environment/vite.cjs +16 -16
- package/dist/environment/vite.mjs +3 -3
- package/dist/environment.cjs +3 -3
- package/dist/environment.mjs +1 -1
- package/dist/font.cjs +3 -3
- package/dist/font.mjs +1 -1
- package/dist/{handler.d-B1S1ZBqS.d.mts → handler.d-DLKZDAYR.d.mts} +1 -1
- package/dist/{handler.d-ZweCBJD4.d.ts → handler.d-nkrNn_0M.d.ts} +1 -1
- package/dist/headers.cjs +6 -6
- package/dist/{headers.d-C-yGl_f6.d.mts → headers.d-C3k520Fc.d.mts} +1 -1
- package/dist/{headers.d-BgBdQN8x.d.ts → headers.d-DVBrYnqP.d.ts} +1 -1
- package/dist/headers.mjs +1 -1
- package/dist/i18n/client.cjs +23 -20
- package/dist/i18n/client.mjs +1 -1
- package/dist/i18n/index.cjs +12 -7
- package/dist/i18n/index.mjs +1 -1
- package/dist/i18n/server.cjs +11 -11
- package/dist/i18n/server.mjs +1 -1
- package/dist/image/server.cjs +8 -8
- package/dist/image/server.mjs +1 -1
- package/dist/image/sharp.cjs +21 -18
- package/dist/image/sharp.mjs +1 -1
- package/dist/image.cjs +7 -4
- package/dist/image.mjs +1 -1
- package/dist/index.cjs +232 -216
- package/dist/{index.d-13h3oDu7.d.mts → index.d-5PDB032w.d.mts} +1 -1
- package/dist/{index.d-CtoniAXT.d.ts → index.d-e5WhoB07.d.ts} +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.mjs +53 -49
- package/dist/instrumentation.cjs +5 -5
- package/dist/instrumentation.mjs +1 -1
- package/dist/integrations/orm.cjs +7 -7
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations/orm.mjs +3 -3
- package/dist/integrations.cjs +24 -22
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +4 -2
- package/dist/internal/app-markdown-runtime.cjs +16 -14
- package/dist/internal/app-markdown-runtime.d.mts +10 -5
- package/dist/internal/app-markdown-runtime.d.ts +10 -5
- package/dist/internal/app-markdown-runtime.mjs +7 -5
- package/dist/internal/build-runtime.cjs +186 -181
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +38 -38
- package/dist/internal/cli-runtime.cjs +105 -100
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +17 -17
- package/dist/internal/client-error-overlay.cjs +12 -9
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +37 -26
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/client-runtime.mjs +1 -1
- package/dist/internal/compression-runtime.cjs +4 -4
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/compression-runtime.mjs +1 -1
- package/dist/internal/config-runtime.cjs +85 -82
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +9 -9
- package/dist/internal/desktop-guard.cjs +5 -5
- package/dist/internal/desktop-guard.mjs +1 -1
- package/dist/internal/docs-precompiled-runtime.cjs +10 -7
- package/dist/internal/docs-precompiled-runtime.mjs +1 -1
- package/dist/internal/form-actions-client.cjs +4 -1
- package/dist/internal/form-actions-client.mjs +1 -1
- package/dist/internal/form-actions.cjs +13 -13
- package/dist/internal/form-actions.mjs +1 -1
- package/dist/internal/infra-analytics-runtime.cjs +32 -29
- package/dist/internal/infra-analytics-runtime.mjs +8 -8
- package/dist/internal/island-codec.cjs +4 -4
- package/dist/internal/island-codec.mjs +1 -1
- package/dist/internal/island-value-store.cjs +4 -1
- package/dist/internal/island-value-store.mjs +1 -1
- package/dist/internal/islands-action-client.cjs +10 -10
- package/dist/internal/islands-action-client.mjs +1 -1
- package/dist/internal/islands-boot.cjs +6 -3
- package/dist/internal/islands-boot.mjs +1 -1
- package/dist/internal/islands-runtime.cjs +12 -9
- package/dist/internal/islands-runtime.mjs +2 -2
- package/dist/internal/islands-server-tree.cjs +4 -1
- package/dist/internal/islands-server-tree.mjs +1 -1
- package/dist/internal/islands-server.cjs +9 -6
- package/dist/internal/islands-server.mjs +1 -1
- package/dist/internal/islx-actions-client.cjs +13 -10
- package/dist/internal/islx-actions-client.mjs +1 -1
- package/dist/internal/islx-actions-server.cjs +4 -1
- package/dist/internal/islx-actions-server.mjs +1 -1
- package/dist/internal/islx-client.cjs +7 -4
- package/dist/internal/islx-client.mjs +2 -2
- package/dist/internal/islx-react.cjs +4 -1
- package/dist/internal/islx-server.cjs +4 -1
- package/dist/internal/isolated-boundary.cjs +5 -5
- package/dist/internal/isolated-boundary.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +8 -8
- package/dist/internal/metadata-image-runtime.d.mts +2 -2
- package/dist/internal/metadata-image-runtime.d.ts +2 -2
- package/dist/internal/metadata-image-runtime.mjs +1 -1
- package/dist/internal/native-server-fns.cjs +10 -10
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/navigation-neutral.cjs +6 -3
- package/dist/internal/navigation-neutral.mjs +1 -1
- package/dist/internal/product-telemetry-runtime.cjs +4 -4
- package/dist/internal/product-telemetry-runtime.mjs +3 -3
- package/dist/internal/production-node-env.cjs +3 -3
- package/dist/internal/production-node-env.mjs +2 -2
- package/dist/internal/production-runtime.cjs +97 -89
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +14 -14
- package/dist/internal/react-cache.cjs +10 -7
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/renderer-islands.cjs +4 -1
- package/dist/internal/renderer-islands.mjs +1 -1
- package/dist/internal/request-cookies.cjs +3 -3
- package/dist/internal/request-cookies.mjs +1 -1
- package/dist/internal/server-fn-transform.cjs +3 -3
- package/dist/internal/server-fn-transform.mjs +1 -1
- package/dist/internal/server-tree.cjs +5 -5
- package/dist/internal/server-tree.mjs +1 -1
- package/dist/internal/spa-router.cjs +20 -20
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/spa-router.mjs +3 -3
- package/dist/internal/start-manifest.cjs +4 -1
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/internal/start-manifest.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +23 -20
- package/dist/internal/vercel-edge-middleware.mjs +1 -1
- package/dist/json-ld.cjs +4 -1
- package/dist/json-ld.mjs +1 -1
- package/dist/layers-GP57TBE2.cjs +21 -0
- package/dist/{layers-744BBUY5.mjs → layers-IMRXNZRB.mjs} +1 -1
- package/dist/{libsql-http-M6LMNXCN.cjs → libsql-http-5GYGFVGC.cjs} +94 -87
- package/dist/{libsql-http-2QD224YS.mjs → libsql-http-PBJXNEOX.mjs} +1 -1
- package/dist/manager-3DFQDKJ6.cjs +18 -0
- package/dist/{manager-7BNSJKME.mjs → manager-GZUTAN5Q.mjs} +2 -2
- package/dist/markdown.cjs +12 -12
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +2 -2
- package/dist/middleware.cjs +32 -32
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/middleware.mjs +4 -4
- package/dist/mobile.cjs +4 -1
- package/dist/mobile.mjs +1 -1
- package/dist/{modules-3Q2ZCY4Q.mjs → modules-IVJXVV4W.mjs} +1 -1
- package/dist/modules-JDPCBWND.cjs +13 -0
- package/dist/{mount.d-_6Un9wdK.d.mts → mount.d-COIrFH0i.d.mts} +1 -1
- package/dist/{mount.d-DyKlRR6z.d.ts → mount.d-Cbz8vsSZ.d.ts} +1 -1
- package/dist/{native-server-fn-handler-PYK65A46.mjs → native-server-fn-handler-IMLQMSIR.mjs} +1 -1
- package/dist/native-server-fn-handler-U7I6H6MM.cjs +30 -0
- package/dist/{native-specs-A7YOL463.mjs → native-specs-4DOPYSOJ.mjs} +1 -1
- package/dist/native-specs-IXHEIZCD.cjs +15 -0
- package/dist/{native-tree-LNO7K6JR.mjs → native-tree-2GQMSOLV.mjs} +3 -3
- package/dist/native-tree-PHCV43W4.cjs +28 -0
- package/dist/native.cjs +4 -1
- package/dist/native.mjs +1 -1
- package/dist/{navigation-delegate.d-BbW1_pf_.d.ts → navigation-delegate.d-dlnYTX-Y.d.ts} +1 -1
- package/dist/{navigation-delegate.d-B9GjWbov.d.mts → navigation-delegate.d-yulG9Dp5.d.mts} +1 -1
- package/dist/navigation.cjs +26 -26
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +5 -5
- package/dist/{nitro-FK3SZM4H.mjs → nitro-6HSEGMWJ.mjs} +2 -2
- package/dist/{nitro-YDFMH5PY.cjs → nitro-K4MCBBB6.cjs} +31 -28
- package/dist/{node-module-bundle-ZWCQJCKA.mjs → node-module-bundle-4IN4YCDV.mjs} +1 -1
- package/dist/node-module-bundle-PHKRIHI6.cjs +15 -0
- package/dist/observability.cjs +3 -3
- package/dist/observability.mjs +1 -1
- package/dist/og.cjs +4 -1
- package/dist/og.mjs +1 -1
- package/dist/platform.cjs +4 -1
- package/dist/platform.mjs +1 -1
- package/dist/{plugin-EVKQZBNW.mjs → plugin-B7I5QVBE.mjs} +2 -2
- package/dist/plugin-QYBJSGHG.cjs +33 -0
- package/dist/plugin.cjs +175 -170
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +31 -31
- package/dist/{port-STMSGUVU.cjs → port-2YV5GBDN.cjs} +13 -10
- package/dist/{port-CEZTV776.mjs → port-4ZIDLV4Z.mjs} +1 -1
- package/dist/query/client.cjs +38 -34
- package/dist/query/client.mjs +3 -3
- package/dist/query/index.cjs +5 -5
- package/dist/query/index.mjs +1 -1
- package/dist/query/parsers.cjs +3 -3
- package/dist/query/parsers.mjs +1 -1
- package/dist/query/server.cjs +8 -5
- package/dist/query/server.mjs +1 -1
- package/dist/{render-plan.d-DaM1NPnm.d.mts → render-plan.d-BW56oxMP.d.mts} +1 -1
- package/dist/{render-plan.d-D0FV9lDT.d.ts → render-plan.d-Cz7bQmcf.d.ts} +1 -1
- package/dist/renderer/none/server.cjs +4 -1
- package/dist/renderer/none/server.mjs +1 -1
- package/dist/renderer/react/client.cjs +4 -1
- package/dist/renderer/react/client.mjs +1 -1
- package/dist/renderer/react/server.cjs +14 -11
- package/dist/renderer/react/server.mjs +1 -1
- package/dist/renderer/react/vite.cjs +4 -1
- package/dist/renderer/react/vite.mjs +1 -1
- package/dist/renderer-client.cjs +67 -64
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +3 -3
- package/dist/renderer.cjs +11 -6
- package/dist/renderer.d.mts +22 -11
- package/dist/renderer.d.ts +22 -11
- package/dist/renderer.mjs +1 -1
- package/dist/request.cjs +9 -4
- package/dist/{request.d-CrXC7voZ.d.ts → request.d-BaFROByP.d.ts} +1 -1
- package/dist/{request.d-DVSLilGx.d.mts → request.d-BwgX-7Wi.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-CWi3UYtR.d.mts → route-rendering.d-BzeFPYGc.d.mts} +1 -1
- package/dist/{route-rendering.d-OfbM_rj8.d.ts → route-rendering.d-D4kUuncg.d.ts} +1 -1
- package/dist/router.cjs +5 -5
- package/dist/{router.d-Bm9FNSu3.d.ts → router.d-B9qJdgjt.d.ts} +1 -1
- package/dist/{router.d-YKVirmj4.d.mts → router.d-D-p8WElf.d.mts} +1 -1
- package/dist/router.mjs +1 -1
- package/dist/routes.cjs +16 -16
- package/dist/routes.d.mts +3 -3
- package/dist/routes.d.ts +3 -3
- package/dist/routes.mjs +1 -1
- package/dist/{rsc-pipeline-W5DSWDHD.mjs → rsc-pipeline-Y6D6KBES.mjs} +12 -12
- package/dist/rsc-pipeline-YHVEHWTU.cjs +91 -0
- package/dist/{runtime-UOZKSM5S.mjs → runtime-62ZIEV6U.mjs} +11 -11
- package/dist/{runtime-YV4X5FAK.cjs → runtime-LKEMFXHW.cjs} +129 -119
- package/dist/{runtime.d-BVj6apd0.d.mts → runtime.d-BUtDIrRJ.d.mts} +1 -1
- package/dist/{runtime.d-D7QYVJGO.d.ts → runtime.d-Du64AX3R.d.ts} +1 -1
- package/dist/safe-fetch.cjs +4 -4
- package/dist/safe-fetch.mjs +1 -1
- package/dist/{schema-dev-notice-EUPAUJVN.mjs → schema-dev-notice-EZAOFO7A.mjs} +1 -1
- package/dist/{schema-dev-notice-ZSCL47CT.cjs → schema-dev-notice-Y4J5KPEY.cjs} +16 -13
- package/dist/schema.cjs +4 -4
- package/dist/schema.mjs +1 -1
- package/dist/{search-client-GIXIEU75.mjs → search-client-HN3ZY6AK.mjs} +1 -1
- package/dist/search-client-Z7KDVD4C.cjs +15 -0
- package/dist/server-action-security.cjs +10 -10
- package/dist/server-action-security.mjs +1 -1
- package/dist/{server-components-status.d-BDVcxi0z.d.mts → server-components-status.d-B0YP-m9A.d.mts} +1 -1
- package/dist/{server-components-status.d-CfKDpmCH.d.ts → server-components-status.d-CvFhb6-t.d.ts} +1 -1
- package/dist/server-fn-client.cjs +4 -4
- package/dist/server-fn-client.mjs +1 -1
- package/dist/server-fn.cjs +17 -17
- package/dist/server-fn.mjs +1 -1
- package/dist/server-plugins.cjs +21 -16
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query-client.cjs +10 -10
- package/dist/server-query-client.mjs +1 -1
- package/dist/server-query.cjs +19 -19
- package/dist/server-query.mjs +1 -1
- package/dist/server.cjs +225 -216
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +34 -34
- package/dist/session-J7NTZI56.cjs +24 -0
- package/dist/{session-4IB34X35.mjs → session-ZFM3RDG2.mjs} +3 -3
- package/dist/{spa-router.d-DGmropfK.d.mts → spa-router.d-CkR14oGH.d.mts} +2 -2
- package/dist/{spa-router.d-nE1jHNGt.d.ts → spa-router.d-D4ye2WFk.d.ts} +2 -2
- package/dist/{ssg.d-jXlUAKzg.d.ts → ssg.d-BCJB_f7B.d.ts} +2 -2
- package/dist/{ssg.d-DS-gXUbf.d.mts → ssg.d-DFs97VTY.d.mts} +2 -2
- package/dist/storage.cjs +4 -4
- package/dist/storage.mjs +2 -2
- package/dist/{store-core.d-B5cwOd8g.d.ts → store-core.d-0W2YScl8.d.ts} +2 -2
- package/dist/{store-core.d-C-gATBwd.d.mts → store-core.d-Vk5UDKeC.d.mts} +2 -2
- package/dist/testing.cjs +65 -62
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +4 -4
- package/dist/theme/client.cjs +5 -5
- package/dist/theme/client.mjs +1 -1
- package/dist/theme/index.cjs +4 -4
- package/dist/theme/index.mjs +1 -1
- package/dist/theme/runtime.cjs +3 -3
- package/dist/theme/runtime.mjs +1 -1
- package/dist/theme/server.cjs +8 -8
- package/dist/theme/server.mjs +1 -1
- package/dist/{utils.d-BODwBtkz.d.ts → utils.d-Ba3N28fk.d.ts} +1 -1
- package/dist/{utils.d-Cmj-fzds.d.mts → utils.d-Cloiko8d.d.mts} +1 -1
- package/dist/version.cjs +3 -3
- package/dist/version.mjs +2 -2
- package/dist/vite.cjs +168 -168
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +31 -31
- package/dist/workflows.cjs +14 -14
- package/dist/workflows.mjs +2 -2
- package/package.json +5 -5
- package/LICENSE +0 -22
- package/dist/agent-mcp-handler-IUL6OPC3.cjs +0 -21
- package/dist/analyzer-IIWSUXSQ.cjs +0 -17
- package/dist/chunk-3376ZTRC.cjs +0 -1
- package/dist/chunk-K5NI5YQR.cjs +0 -1
- package/dist/chunk-MCJLA63J.cjs +0 -1
- package/dist/chunk-THGSPDFD.cjs +0 -40
- package/dist/chunk-V3Y3R3JJ.cjs +0 -9
- package/dist/chunk-YTAABQEV.cjs +0 -1
- package/dist/layers-XLOMMQP7.cjs +0 -21
- package/dist/manager-37UJPUN4.cjs +0 -18
- package/dist/modules-KDHFBQ6L.cjs +0 -13
- package/dist/native-server-fn-handler-57TCQPSM.cjs +0 -30
- package/dist/native-specs-JDPH26AO.cjs +0 -15
- package/dist/native-tree-5TENEQ7Y.cjs +0 -28
- package/dist/node-module-bundle-TNSY5PAC.cjs +0 -15
- package/dist/plugin-MWO3G2XM.cjs +0 -33
- package/dist/rsc-pipeline-LGXJGGMW.cjs +0 -91
- package/dist/search-client-A7YJT7JZ.cjs +0 -15
- package/dist/session-MOYQJ7E6.cjs +0 -24
- package/dist/{chunk-IVP5Q4BX.mjs → chunk-6IKUYFNQ.mjs} +0 -0
- package/dist/{chunk-D7LXBLUW.mjs → chunk-FYTZZM5U.mjs} +3 -3
- /package/dist/{chunk-URBP6DLH.mjs → chunk-LQZXCSYG.mjs} +0 -0
- /package/dist/{chunk-M6AJZ4XR.mjs → chunk-QNJUQIUZ.mjs} +0 -0
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkQCVP22KWcjs = require('./chunk-QCVP22KW.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkW4KSV6GXcjs = require('./chunk-W4KSV6GX.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -44,25 +44,25 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkUBH2OARScjs = require('./chunk-UBH2OARS.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunkADCVSTFVcjs = require('./chunk-ADCVSTFV.cjs');
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkIGA3OTFYcjs = require('./chunk-IGA3OTFY.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkYQXLBYY2cjs = require('./chunk-YQXLBYY2.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkKM7ZRKCHcjs = require('./chunk-KM7ZRKCH.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunkMBDDLYT5cjs = require('./chunk-MBDDLYT5.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -71,10 +71,10 @@ var _chunk27ESPHQAcjs = require('./chunk-27ESPHQA.cjs');
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
var
|
|
74
|
+
var _chunkIGBQSUT5cjs = require('./chunk-IGBQSUT5.cjs');
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
@@ -89,21 +89,21 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunkC4DZAEVTcjs = require('./chunk-C4DZAEVT.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
var
|
|
95
|
+
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkNNHIV3O2cjs = require('./chunk-NNHIV3O2.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
var
|
|
103
|
+
var _chunk7O3YJ6NPcjs = require('./chunk-7O3YJ6NP.cjs');
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
var
|
|
106
|
+
var _chunkSIQPXYBBcjs = require('./chunk-SIQPXYBB.cjs');
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
|
|
@@ -146,46 +146,46 @@ var _chunkNDMPGFKLcjs = require('./chunk-NDMPGFKL.cjs');
|
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
var _chunkOIPPISQ6cjs = require('./chunk-OIPPISQ6.cjs');
|
|
150
149
|
|
|
151
150
|
|
|
151
|
+
var _chunkPSALMEHJcjs = require('./chunk-PSALMEHJ.cjs');
|
|
152
152
|
|
|
153
|
-
var _chunkXJDB564Acjs = require('./chunk-XJDB564A.cjs');
|
|
154
153
|
|
|
155
154
|
|
|
155
|
+
var _chunkP4ZLFUNBcjs = require('./chunk-P4ZLFUNB.cjs');
|
|
156
156
|
|
|
157
|
-
var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
|
|
158
157
|
|
|
159
158
|
|
|
159
|
+
var _chunkQTGYT2DFcjs = require('./chunk-QTGYT2DF.cjs');
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
var _chunkL2GUEYHRcjs = require('./chunk-L2GUEYHR.cjs');
|
|
163
162
|
|
|
164
163
|
|
|
165
|
-
var
|
|
164
|
+
var _chunkVZ2P6GRCcjs = require('./chunk-VZ2P6GRC.cjs');
|
|
166
165
|
|
|
167
166
|
|
|
167
|
+
var _chunkQZRFEHMScjs = require('./chunk-QZRFEHMS.cjs');
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
171
170
|
|
|
172
171
|
|
|
173
|
-
var
|
|
172
|
+
var _chunkRQSPBWXJcjs = require('./chunk-RQSPBWXJ.cjs');
|
|
174
173
|
|
|
175
174
|
|
|
175
|
+
var _chunkIU4YTFFQcjs = require('./chunk-IU4YTFFQ.cjs');
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
|
|
179
178
|
|
|
180
179
|
|
|
181
|
-
var
|
|
180
|
+
var _chunkERSLQ4C7cjs = require('./chunk-ERSLQ4C7.cjs');
|
|
182
181
|
|
|
183
182
|
|
|
183
|
+
var _chunk25CHWAZYcjs = require('./chunk-25CHWAZY.cjs');
|
|
184
184
|
|
|
185
185
|
|
|
186
|
-
var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
187
186
|
|
|
188
187
|
|
|
188
|
+
var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
|
|
@@ -194,181 +194,192 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
|
194
194
|
|
|
195
195
|
|
|
196
196
|
|
|
197
|
-
var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.cjs');
|
|
198
197
|
|
|
199
198
|
|
|
200
|
-
var
|
|
199
|
+
var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
|
|
201
200
|
|
|
202
201
|
|
|
203
|
-
var
|
|
202
|
+
var _chunkXH4GQ7MTcjs = require('./chunk-XH4GQ7MT.cjs');
|
|
204
203
|
|
|
205
204
|
|
|
205
|
+
var _chunkTP7JAC3Tcjs = require('./chunk-TP7JAC3T.cjs');
|
|
206
206
|
|
|
207
207
|
|
|
208
|
-
var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
|
|
209
208
|
|
|
210
209
|
|
|
210
|
+
var _chunk27IPPPCVcjs = require('./chunk-27IPPPCV.cjs');
|
|
211
211
|
|
|
212
|
-
var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
213
212
|
|
|
214
213
|
|
|
214
|
+
var _chunkYQ5NVEFScjs = require('./chunk-YQ5NVEFS.cjs');
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
|
|
220
|
-
var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
|
|
221
220
|
|
|
222
221
|
|
|
222
|
+
var _chunkU2HFXURZcjs = require('./chunk-U2HFXURZ.cjs');
|
|
223
223
|
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
|
|
227
|
-
var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
|
|
228
227
|
|
|
229
228
|
|
|
230
229
|
|
|
231
|
-
var
|
|
230
|
+
var _chunkN4AM7Q34cjs = require('./chunk-N4AM7Q34.cjs');
|
|
232
231
|
|
|
233
232
|
|
|
234
|
-
var _chunkUA77C2ZAcjs = require('./chunk-UA77C2ZA.cjs');
|
|
235
233
|
|
|
234
|
+
var _chunkYZMSJRM5cjs = require('./chunk-YZMSJRM5.cjs');
|
|
236
235
|
|
|
237
236
|
|
|
238
|
-
var
|
|
237
|
+
var _chunkHF3JJPH4cjs = require('./chunk-HF3JJPH4.cjs');
|
|
239
238
|
|
|
240
239
|
|
|
241
|
-
var _chunkBNH53KOTcjs = require('./chunk-BNH53KOT.cjs');
|
|
242
240
|
|
|
241
|
+
var _chunkXZ6L3FUUcjs = require('./chunk-XZ6L3FUU.cjs');
|
|
243
242
|
|
|
244
|
-
var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
245
243
|
|
|
244
|
+
var _chunkSZBBBLLScjs = require('./chunk-SZBBBLLS.cjs');
|
|
246
245
|
|
|
247
|
-
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
248
246
|
|
|
247
|
+
var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
|
|
249
248
|
|
|
250
|
-
var _chunkTWFJJPE7cjs = require('./chunk-TWFJJPE7.cjs');
|
|
251
249
|
|
|
250
|
+
var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
|
|
252
251
|
|
|
253
252
|
|
|
254
|
-
var
|
|
253
|
+
var _chunk5BZ7PR3Tcjs = require('./chunk-5BZ7PR3T.cjs');
|
|
255
254
|
|
|
256
255
|
|
|
257
|
-
var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
|
|
258
256
|
|
|
257
|
+
var _chunkXJEOHDPNcjs = require('./chunk-XJEOHDPN.cjs');
|
|
259
258
|
|
|
260
259
|
|
|
261
|
-
var
|
|
260
|
+
var _chunkYCIFGYBYcjs = require('./chunk-YCIFGYBY.cjs');
|
|
262
261
|
|
|
263
262
|
|
|
264
263
|
|
|
264
|
+
var _chunkIDUGG7VRcjs = require('./chunk-IDUGG7VR.cjs');
|
|
265
265
|
|
|
266
|
-
var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
|
|
267
266
|
|
|
268
267
|
|
|
269
|
-
var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
|
|
270
268
|
|
|
269
|
+
var _chunk5P3TZGS3cjs = require('./chunk-5P3TZGS3.cjs');
|
|
271
270
|
|
|
272
271
|
|
|
272
|
+
var _chunk3ACTVXZGcjs = require('./chunk-3ACTVXZG.cjs');
|
|
273
273
|
|
|
274
|
-
var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
275
274
|
|
|
276
275
|
|
|
277
|
-
var _chunkY3WG64CPcjs = require('./chunk-Y3WG64CP.cjs');
|
|
278
276
|
|
|
277
|
+
var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
|
|
279
278
|
|
|
280
279
|
|
|
280
|
+
var _chunkCH2JX3CMcjs = require('./chunk-CH2JX3CM.cjs');
|
|
281
281
|
|
|
282
|
-
var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
283
282
|
|
|
284
283
|
|
|
285
284
|
|
|
285
|
+
var _chunk6VC7NUY3cjs = require('./chunk-6VC7NUY3.cjs');
|
|
286
286
|
|
|
287
|
-
var _chunkI2RBHZF7cjs = require('./chunk-I2RBHZF7.cjs');
|
|
288
287
|
|
|
289
288
|
|
|
290
289
|
|
|
291
|
-
var
|
|
290
|
+
var _chunkVB7P66Q4cjs = require('./chunk-VB7P66Q4.cjs');
|
|
292
291
|
|
|
293
292
|
|
|
294
293
|
|
|
294
|
+
var _chunkB2VSX33Tcjs = require('./chunk-B2VSX33T.cjs');
|
|
295
295
|
|
|
296
|
-
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
297
296
|
|
|
298
297
|
|
|
299
|
-
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
300
298
|
|
|
299
|
+
var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
|
|
301
300
|
|
|
302
301
|
|
|
302
|
+
var _chunkH5AC3XSEcjs = require('./chunk-H5AC3XSE.cjs');
|
|
303
303
|
|
|
304
304
|
|
|
305
305
|
|
|
306
|
-
var _chunk7Q7UB4TLcjs = require('./chunk-7Q7UB4TL.cjs');
|
|
307
306
|
|
|
308
307
|
|
|
309
308
|
|
|
310
|
-
var
|
|
309
|
+
var _chunk7GKZDRY2cjs = require('./chunk-7GKZDRY2.cjs');
|
|
311
310
|
|
|
312
311
|
|
|
313
312
|
|
|
314
|
-
var
|
|
313
|
+
var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
|
|
315
314
|
|
|
316
315
|
|
|
317
|
-
var _chunkV3Y3R3JJcjs = require('./chunk-V3Y3R3JJ.cjs');
|
|
318
316
|
|
|
317
|
+
var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
|
|
319
318
|
|
|
320
|
-
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
321
319
|
|
|
320
|
+
var _chunkXPVS4HKUcjs = require('./chunk-XPVS4HKU.cjs');
|
|
322
321
|
|
|
323
322
|
|
|
324
|
-
var
|
|
323
|
+
var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
|
|
325
324
|
|
|
326
325
|
|
|
327
326
|
|
|
328
|
-
var
|
|
327
|
+
var _chunkJ2JMESBJcjs = require('./chunk-J2JMESBJ.cjs');
|
|
329
328
|
|
|
330
329
|
|
|
331
330
|
|
|
331
|
+
var _chunkS2QSTMBEcjs = require('./chunk-S2QSTMBE.cjs');
|
|
332
332
|
|
|
333
333
|
|
|
334
|
-
var _chunkY3DO7BIJcjs = require('./chunk-Y3DO7BIJ.cjs');
|
|
335
334
|
|
|
336
335
|
|
|
337
|
-
var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
338
336
|
|
|
337
|
+
var _chunkO7B6LJWEcjs = require('./chunk-O7B6LJWE.cjs');
|
|
339
338
|
|
|
340
339
|
|
|
340
|
+
var _chunkZ2JQR56Wcjs = require('./chunk-Z2JQR56W.cjs');
|
|
341
341
|
|
|
342
342
|
|
|
343
|
-
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
344
343
|
|
|
345
344
|
|
|
346
345
|
|
|
347
|
-
var
|
|
346
|
+
var _chunkVIDUNAQEcjs = require('./chunk-VIDUNAQE.cjs');
|
|
348
347
|
|
|
349
348
|
|
|
350
349
|
|
|
350
|
+
var _chunk6FIY4KBCcjs = require('./chunk-6FIY4KBC.cjs');
|
|
351
351
|
|
|
352
352
|
|
|
353
|
-
var _chunkH7OFZJCVcjs = require('./chunk-H7OFZJCV.cjs');
|
|
354
353
|
|
|
355
354
|
|
|
356
355
|
|
|
356
|
+
var _chunkQBMMQS25cjs = require('./chunk-QBMMQS25.cjs');
|
|
357
357
|
|
|
358
|
-
var _chunk2RSVYJT6cjs = require('./chunk-2RSVYJT6.cjs');
|
|
359
358
|
|
|
359
|
+
var _chunkSWOJU7LIcjs = require('./chunk-SWOJU7LI.cjs');
|
|
360
360
|
|
|
361
|
-
var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
|
|
362
361
|
|
|
363
362
|
|
|
364
363
|
|
|
365
|
-
var
|
|
364
|
+
var _chunkIBZW57NWcjs = require('./chunk-IBZW57NW.cjs');
|
|
366
365
|
|
|
367
366
|
|
|
367
|
+
var _chunk7MQMWGTLcjs = require('./chunk-7MQMWGTL.cjs');
|
|
368
368
|
|
|
369
|
-
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
var _chunkTFCBJFP7cjs = require('./chunk-TFCBJFP7.cjs');
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
377
|
+
|
|
378
|
+
// src/vite.ts
|
|
379
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
370
380
|
|
|
371
381
|
// src/form-actions-transform.ts
|
|
382
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
372
383
|
var _crypto = require('crypto');
|
|
373
384
|
var _compiler = require('@farm.js/islx/compiler');
|
|
374
385
|
var _path2 = require('path'); var path2 = _interopRequireWildcard(_path2); var path6 = _interopRequireWildcard(_path2); var path3 = _interopRequireWildcard(_path2);
|
|
@@ -398,10 +409,11 @@ var _async_hooks = require('async_hooks');
|
|
|
398
409
|
var _module = require('module');
|
|
399
410
|
|
|
400
411
|
// src/dev-preview-guard.ts
|
|
412
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
401
413
|
var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
|
|
402
414
|
|
|
403
415
|
function isFarmPreviewTunnelRequest(headers) {
|
|
404
|
-
return headers[
|
|
416
|
+
return headers[_chunkXH4GQ7MTcjs.FARM_PREVIEW_REQUEST_HEADER] !== void 0;
|
|
405
417
|
}
|
|
406
418
|
var VITE_DEFAULT_FS_DENY = [
|
|
407
419
|
".env",
|
|
@@ -516,6 +528,7 @@ function isInside(directory, file) {
|
|
|
516
528
|
}
|
|
517
529
|
|
|
518
530
|
// src/server/dev-cors.ts
|
|
531
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
519
532
|
var VITE_DEFAULT_CORS_ORIGIN = /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/;
|
|
520
533
|
var VITE_DEFAULT_CORS_METHODS = "GET,HEAD,PUT,PATCH,POST,DELETE";
|
|
521
534
|
function appendVary(res, value) {
|
|
@@ -553,6 +566,7 @@ function createFarmDevViteCorsMiddleware() {
|
|
|
553
566
|
var _url = require('url');
|
|
554
567
|
|
|
555
568
|
// src/dev-static.ts
|
|
569
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
556
570
|
|
|
557
571
|
|
|
558
572
|
function shouldBypassFarmRouterForDottedPath(pathname, routeManager, baseDirs, generatedPaths = [], method = "GET") {
|
|
@@ -702,6 +716,7 @@ function devServableFileExists(pathname, baseDirs) {
|
|
|
702
716
|
}
|
|
703
717
|
|
|
704
718
|
// src/server-query-boundary.ts
|
|
719
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
705
720
|
var SERVER_FN_FACTORIES = ["createServerQuery", "createServerFn"];
|
|
706
721
|
var FARM_CORE_IMPORT_RE = /import\s*(?!type\b)(?:[\w$]+\s*,\s*)?\{([^}]*)\}\s*from\s*(["'])@farm\.js\/core(?:\/[\w./-]+)?\2/g;
|
|
707
722
|
function findClientServerFnViolation(code, id) {
|
|
@@ -719,7 +734,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
719
734
|
return null;
|
|
720
735
|
}
|
|
721
736
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
722
|
-
return
|
|
737
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
723
738
|
"CLIENT_SERVER_FUNCTION",
|
|
724
739
|
id,
|
|
725
740
|
`${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.`,
|
|
@@ -728,6 +743,7 @@ function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
|
728
743
|
}
|
|
729
744
|
|
|
730
745
|
// src/client-boundary-env.ts
|
|
746
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
731
747
|
|
|
732
748
|
var FUNCTION_BODY_TYPES = /* @__PURE__ */ new Set([
|
|
733
749
|
"FunctionDeclaration",
|
|
@@ -978,21 +994,21 @@ function readPropertyKey(property) {
|
|
|
978
994
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
979
995
|
switch (finding.kind) {
|
|
980
996
|
case "server-env":
|
|
981
|
-
return
|
|
997
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
982
998
|
"CLIENT_SERVER_ENV",
|
|
983
999
|
file,
|
|
984
1000
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
985
1001
|
location
|
|
986
1002
|
);
|
|
987
1003
|
case "public-env":
|
|
988
|
-
return
|
|
1004
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
989
1005
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
990
1006
|
file,
|
|
991
1007
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
992
1008
|
location
|
|
993
1009
|
);
|
|
994
1010
|
case "builtin":
|
|
995
|
-
return
|
|
1011
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
996
1012
|
"CLIENT_NODE_BUILTIN",
|
|
997
1013
|
file,
|
|
998
1014
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1002,6 +1018,7 @@ function createClientBoundaryDiagnostic(file, finding, location) {
|
|
|
1002
1018
|
}
|
|
1003
1019
|
|
|
1004
1020
|
// src/image-vite.ts
|
|
1021
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1005
1022
|
var _promises = require('fs/promises');
|
|
1006
1023
|
|
|
1007
1024
|
var _imagesize = require('image-size');
|
|
@@ -1069,6 +1086,7 @@ async function createBlurDataURL(bytes) {
|
|
|
1069
1086
|
}
|
|
1070
1087
|
|
|
1071
1088
|
// src/dev/deferred-setup.ts
|
|
1089
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1072
1090
|
function createFarmDeferredMiddleware(ready) {
|
|
1073
1091
|
const stack = [];
|
|
1074
1092
|
const run = (req, res, next) => {
|
|
@@ -1108,6 +1126,7 @@ function createFarmDeferredMiddleware(ready) {
|
|
|
1108
1126
|
|
|
1109
1127
|
|
|
1110
1128
|
// src/islands-react-cache-transform.ts
|
|
1129
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1111
1130
|
|
|
1112
1131
|
var _parseAst = require('rolldown/parseAst');
|
|
1113
1132
|
var FARM_REACT_CACHE_MODULE = "@farm.js/core/internal/react-cache";
|
|
@@ -1202,8 +1221,9 @@ import { ${[...used].map((name) => `${name} as ${REACT_CACHE_APIS[name]}`).join(
|
|
|
1202
1221
|
}
|
|
1203
1222
|
|
|
1204
1223
|
// src/navigation/page-data-error.ts
|
|
1224
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1205
1225
|
function resolveFarmPageDataFailure(error) {
|
|
1206
|
-
if (
|
|
1226
|
+
if (_chunk7MQMWGTLcjs.isFarmNotFoundError.call(void 0, error)) {
|
|
1207
1227
|
return {
|
|
1208
1228
|
status: 404,
|
|
1209
1229
|
payload: {
|
|
@@ -1232,7 +1252,8 @@ function resolveFarmPageDataFailure(error) {
|
|
|
1232
1252
|
}
|
|
1233
1253
|
|
|
1234
1254
|
// src/openapi/dev-status.ts
|
|
1235
|
-
|
|
1255
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1256
|
+
function reportOpenAPIDevGenerationResult(spec, output = _chunk7ZDLE77Pcjs.logger) {
|
|
1236
1257
|
if (spec) {
|
|
1237
1258
|
output.success("\u2705 OpenAPI documentation enabled");
|
|
1238
1259
|
return;
|
|
@@ -1243,13 +1264,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunk7U4XF76Rcjs.logge
|
|
|
1243
1264
|
// src/vite.ts
|
|
1244
1265
|
var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
|
|
1245
1266
|
function farmLlmsTxtGeneratedPaths(config) {
|
|
1246
|
-
const llms =
|
|
1267
|
+
const llms = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
|
|
1247
1268
|
if (!llms.enabled) return [];
|
|
1248
1269
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
1249
1270
|
}
|
|
1250
1271
|
function farmAgentGeneratedPaths(config) {
|
|
1251
|
-
const crawlers =
|
|
1252
|
-
const sitemap =
|
|
1272
|
+
const crawlers = _chunkERSLQ4C7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
|
|
1273
|
+
const sitemap = _chunkERSLQ4C7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
|
|
1253
1274
|
return [
|
|
1254
1275
|
...farmLlmsTxtGeneratedPaths(config),
|
|
1255
1276
|
...sitemap.enabled ? ["/sitemap.xml"] : [],
|
|
@@ -1285,22 +1306,22 @@ function loadFarmDocsDevRuntime() {
|
|
|
1285
1306
|
return import("./docs.cjs");
|
|
1286
1307
|
}
|
|
1287
1308
|
function loadFarmDocsSearchDevRuntime() {
|
|
1288
|
-
return import("./search-client-
|
|
1309
|
+
return import("./search-client-Z7KDVD4C.cjs");
|
|
1289
1310
|
}
|
|
1290
1311
|
function loadFarmOpenAPIDevRuntime() {
|
|
1291
|
-
return import("./manager-
|
|
1312
|
+
return import("./manager-3DFQDKJ6.cjs");
|
|
1292
1313
|
}
|
|
1293
1314
|
function loadFarmWorkflowsDevRuntime() {
|
|
1294
1315
|
return import("./workflows.cjs");
|
|
1295
1316
|
}
|
|
1296
1317
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1297
|
-
return import("./devtools-
|
|
1318
|
+
return import("./devtools-OBQY3XOY.cjs");
|
|
1298
1319
|
}
|
|
1299
1320
|
function loadFarmDevtoolsUIRuntime() {
|
|
1300
|
-
return import("./devtools-ui-
|
|
1321
|
+
return import("./devtools-ui-TPBPQEEB.cjs");
|
|
1301
1322
|
}
|
|
1302
1323
|
function loadFarmDevtoolsClientRuntime() {
|
|
1303
|
-
return import("./devtools-client-
|
|
1324
|
+
return import("./devtools-client-3K67NMWA.cjs");
|
|
1304
1325
|
}
|
|
1305
1326
|
function farmI18nClientBridgePlugin() {
|
|
1306
1327
|
return {
|
|
@@ -1319,7 +1340,7 @@ function farmI18nClientBridgePlugin() {
|
|
|
1319
1340
|
};
|
|
1320
1341
|
}
|
|
1321
1342
|
function farmNavigationPlugin(renderer) {
|
|
1322
|
-
const otherRenderer = !
|
|
1343
|
+
const otherRenderer = !_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
|
|
1323
1344
|
return {
|
|
1324
1345
|
name: "farm:navigation",
|
|
1325
1346
|
config() {
|
|
@@ -1344,16 +1365,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1344
1365
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1345
1366
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1346
1367
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1347
|
-
|
|
1348
|
-
new RegExp(`^${
|
|
1368
|
+
_chunkUBH2OARScjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1369
|
+
new RegExp(`^${_chunkPSALMEHJcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1349
1370
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1350
1371
|
// included.
|
|
1351
1372
|
/^node:/,
|
|
1352
|
-
|
|
1373
|
+
_chunkUBH2OARScjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1353
1374
|
];
|
|
1354
1375
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1355
|
-
|
|
1356
|
-
new RegExp(`^${
|
|
1376
|
+
_chunkUBH2OARScjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1377
|
+
new RegExp(`^${_chunkPSALMEHJcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1357
1378
|
];
|
|
1358
1379
|
function createFarmPlatformClientModule(platform) {
|
|
1359
1380
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1376,32 +1397,44 @@ function createFarmServerPrebundleConfig(bundledPackages) {
|
|
|
1376
1397
|
}
|
|
1377
1398
|
function farmIslandContainersPlugin(config) {
|
|
1378
1399
|
let root = _nullishCoalesce(config.root, () => ( process.cwd()));
|
|
1400
|
+
let farmApi;
|
|
1379
1401
|
return {
|
|
1380
1402
|
name: "farm:island-containers",
|
|
1381
1403
|
enforce: "pre",
|
|
1382
1404
|
configResolved(resolved) {
|
|
1383
1405
|
root = config.root || resolved.root;
|
|
1406
|
+
farmApi = _optionalChain([resolved, 'access', _70 => _70.plugins, 'access', _71 => _71.find, 'call', _72 => _72((plugin) => plugin.name === "farm"), 'optionalAccess', _73 => _73.api]);
|
|
1384
1407
|
},
|
|
1385
|
-
transform
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1408
|
+
transform: {
|
|
1409
|
+
// Most modules a build transforms open no container element. The bundler skips them
|
|
1410
|
+
// without calling into JavaScript.
|
|
1411
|
+
filter: {
|
|
1412
|
+
id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
|
|
1413
|
+
code: _chunkPSALMEHJcjs.FARM_ISLAND_CONTAINER_TAG
|
|
1414
|
+
},
|
|
1415
|
+
handler(code, id) {
|
|
1416
|
+
if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _74 => _74.experimental, 'optionalAccess', _75 => _75.serverComponents])) !== "islands") {
|
|
1417
|
+
return null;
|
|
1418
|
+
}
|
|
1419
|
+
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1420
|
+
return null;
|
|
1421
|
+
}
|
|
1422
|
+
if (_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1423
|
+
if (!_chunkPSALMEHJcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
|
|
1424
|
+
const file = id.split("?", 1)[0];
|
|
1425
|
+
const inspect = () => _chunkPSALMEHJcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1426
|
+
const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
|
|
1427
|
+
if (bindings.length === 0) return null;
|
|
1428
|
+
const grown = _chunkPSALMEHJcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1429
|
+
code,
|
|
1430
|
+
file,
|
|
1431
|
+
bindings,
|
|
1432
|
+
reference: _chunkPSALMEHJcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1433
|
+
});
|
|
1434
|
+
if (grown === null) return null;
|
|
1435
|
+
_chunkPSALMEHJcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1436
|
+
return { code: grown, map: null };
|
|
1391
1437
|
}
|
|
1392
|
-
if (_chunkOIPPISQ6cjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1393
|
-
const file = id.split("?", 1)[0];
|
|
1394
|
-
const bindings = _chunkOIPPISQ6cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1395
|
-
if (bindings.length === 0) return null;
|
|
1396
|
-
const grown = _chunkOIPPISQ6cjs.wrapFarmIslandContainers.call(void 0, {
|
|
1397
|
-
code,
|
|
1398
|
-
file,
|
|
1399
|
-
bindings,
|
|
1400
|
-
reference: _chunkOIPPISQ6cjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1401
|
-
});
|
|
1402
|
-
if (grown === null) return null;
|
|
1403
|
-
_chunkOIPPISQ6cjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1404
|
-
return { code: grown, map: null };
|
|
1405
1438
|
}
|
|
1406
1439
|
};
|
|
1407
1440
|
}
|
|
@@ -1414,18 +1447,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1414
1447
|
config(config) {
|
|
1415
1448
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1416
1449
|
if (options.distDir) {
|
|
1417
|
-
|
|
1450
|
+
_chunkPSALMEHJcjs.usePackageScanCacheFile.call(void 0,
|
|
1418
1451
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1419
1452
|
);
|
|
1420
1453
|
}
|
|
1421
|
-
const bundledPackages =
|
|
1454
|
+
const bundledPackages = _chunkPSALMEHJcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1422
1455
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1423
|
-
|
|
1456
|
+
_chunkPSALMEHJcjs.persistPackageScanCache.call(void 0, );
|
|
1424
1457
|
return {
|
|
1425
1458
|
optimizeDeps: {
|
|
1426
1459
|
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1427
1460
|
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1428
|
-
rolldownOptions: { plugins: [
|
|
1461
|
+
rolldownOptions: { plugins: [_chunkPSALMEHJcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1429
1462
|
},
|
|
1430
1463
|
ssr: {
|
|
1431
1464
|
noExternal: [
|
|
@@ -1445,14 +1478,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1445
1478
|
resolveId: {
|
|
1446
1479
|
filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
|
|
1447
1480
|
handler(id, importer, options2) {
|
|
1448
|
-
if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess',
|
|
1481
|
+
if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _76 => _76.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
|
|
1449
1482
|
if (id === SERVER_ONLY_PACKAGE) {
|
|
1450
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
1483
|
+
if (_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) || _optionalChain([options2, 'optionalAccess', _78 => _78.scan])) {
|
|
1451
1484
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1452
1485
|
}
|
|
1453
1486
|
this.error(
|
|
1454
|
-
|
|
1455
|
-
|
|
1487
|
+
_chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
1488
|
+
_chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
1456
1489
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1457
1490
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1458
1491
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1461,10 +1494,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1461
1494
|
)
|
|
1462
1495
|
);
|
|
1463
1496
|
}
|
|
1464
|
-
if (!_optionalChain([options2, 'optionalAccess',
|
|
1465
|
-
return
|
|
1497
|
+
if (!_optionalChain([options2, 'optionalAccess', _79 => _79.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1498
|
+
return _chunkPSALMEHJcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1466
1499
|
}
|
|
1467
|
-
const resolveFrom = importer ?
|
|
1500
|
+
const resolveFrom = importer ? _chunkPSALMEHJcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1468
1501
|
if (resolveFrom) {
|
|
1469
1502
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1470
1503
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1479,10 +1512,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1479
1512
|
}
|
|
1480
1513
|
if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
|
|
1481
1514
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1482
|
-
if (!_optionalChain([options2, 'optionalAccess',
|
|
1515
|
+
if (!_optionalChain([options2, 'optionalAccess', _80 => _80.ssr])) {
|
|
1483
1516
|
this.error(
|
|
1484
|
-
|
|
1485
|
-
|
|
1517
|
+
_chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
1518
|
+
_chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
1486
1519
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1487
1520
|
_nullishCoalesce(importer, () => ( id)),
|
|
1488
1521
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1491,10 +1524,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1491
1524
|
)
|
|
1492
1525
|
);
|
|
1493
1526
|
}
|
|
1494
|
-
vercelOgInstalled || (vercelOgInstalled =
|
|
1527
|
+
vercelOgInstalled || (vercelOgInstalled = _chunkIDUGG7VRcjs.isOptionalPeerInstalled.call(void 0, root, "@vercel/og"));
|
|
1495
1528
|
if (!vercelOgInstalled) {
|
|
1496
1529
|
this.error(
|
|
1497
|
-
`${id} needs @vercel/og, which is not installed${importedBy}. ${
|
|
1530
|
+
`${id} needs @vercel/og, which is not installed${importedBy}. ${_chunkIDUGG7VRcjs.VERCEL_OG_INSTALL_HINT}`
|
|
1498
1531
|
);
|
|
1499
1532
|
}
|
|
1500
1533
|
return null;
|
|
@@ -1505,9 +1538,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1505
1538
|
handler(id) {
|
|
1506
1539
|
if (id === FARM_SERVER_ONLY_PACKAGE_ID) return "export {};";
|
|
1507
1540
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1508
|
-
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => (
|
|
1541
|
+
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkYQXLBYY2cjs.resolveFarmPlatform.call(void 0, ))));
|
|
1509
1542
|
}
|
|
1510
|
-
return _nullishCoalesce(
|
|
1543
|
+
return _nullishCoalesce(_chunkPSALMEHJcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1511
1544
|
}
|
|
1512
1545
|
}
|
|
1513
1546
|
};
|
|
@@ -1540,10 +1573,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1540
1573
|
if (!snapshot) return "";
|
|
1541
1574
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
1542
1575
|
if (snapshot.routing === "none") return runtime;
|
|
1543
|
-
return `${
|
|
1576
|
+
return `${_chunkIGBQSUT5cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1544
1577
|
}
|
|
1545
1578
|
function getPublicEnvDefine(config) {
|
|
1546
|
-
const publicEnv = _optionalChain([config, 'access',
|
|
1579
|
+
const publicEnv = _optionalChain([config, 'access', _81 => _81.env, 'optionalAccess', _82 => _82.public]);
|
|
1547
1580
|
if (!isResolvedEnvScope(publicEnv)) {
|
|
1548
1581
|
return {};
|
|
1549
1582
|
}
|
|
@@ -1564,15 +1597,15 @@ function createRequestFromNodeRequest(req, url, signal) {
|
|
|
1564
1597
|
signal
|
|
1565
1598
|
});
|
|
1566
1599
|
}
|
|
1567
|
-
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request) =>
|
|
1568
|
-
const middleware =
|
|
1600
|
+
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request) => _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request)) {
|
|
1601
|
+
const middleware = _chunkKSRWTQ6Jcjs._withAfterNodeMiddleware.call(void 0, handler);
|
|
1569
1602
|
return (req, res, next) => {
|
|
1570
1603
|
const traceUrl = resolveTraceUrl(req);
|
|
1571
1604
|
const traceRequest = createRequestFromNodeRequest(req, traceUrl);
|
|
1572
|
-
const run = () =>
|
|
1605
|
+
const run = () => _chunkRFKPIAOFcjs.runWithFarmRequestSpan.call(void 0, traceRequest, () => middleware(req, res, next), {
|
|
1573
1606
|
getStatusCode: () => res.statusCode || 200
|
|
1574
1607
|
});
|
|
1575
|
-
const result = apiRuntime ?
|
|
1608
|
+
const result = apiRuntime ? _chunkIVEV44O2cjs._runWithAPIRequestRuntime.call(void 0, apiRuntime, run) : run();
|
|
1576
1609
|
return Promise.resolve(result).catch((error) => {
|
|
1577
1610
|
console.error(
|
|
1578
1611
|
`[FARM] Unhandled error while handling ${req.method || "GET"} ${req.url || "/"}:`,
|
|
@@ -1582,12 +1615,12 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
1582
1615
|
return;
|
|
1583
1616
|
}
|
|
1584
1617
|
if (res.headersSent) {
|
|
1585
|
-
_optionalChain([res, 'access',
|
|
1618
|
+
_optionalChain([res, 'access', _83 => _83.destroy, 'optionalCall', _84 => _84(error instanceof Error ? error : new Error(String(error)))]);
|
|
1586
1619
|
return;
|
|
1587
1620
|
}
|
|
1588
1621
|
res.statusCode = 500;
|
|
1589
1622
|
res.setHeader("Content-Type", "application/json");
|
|
1590
|
-
res.end(
|
|
1623
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1591
1624
|
});
|
|
1592
1625
|
};
|
|
1593
1626
|
}
|
|
@@ -1595,10 +1628,10 @@ function sendFarmDevErrorJSON(res) {
|
|
|
1595
1628
|
res.statusCode = 500;
|
|
1596
1629
|
res.setHeader("Content-Type", "application/json");
|
|
1597
1630
|
res.setHeader("Cache-Control", "private, no-store");
|
|
1598
|
-
res.end(
|
|
1631
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1599
1632
|
}
|
|
1600
1633
|
function createFarmDevMiddlewareErrorResponse() {
|
|
1601
|
-
return new Response(
|
|
1634
|
+
return new Response(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
|
|
1602
1635
|
status: 500,
|
|
1603
1636
|
headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
|
|
1604
1637
|
});
|
|
@@ -1610,15 +1643,15 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
|
|
|
1610
1643
|
}
|
|
1611
1644
|
function sendFarmDevRuntimeHookError(res, json) {
|
|
1612
1645
|
setFarmDevRuntimeHookErrorHead(res, json);
|
|
1613
|
-
res.end(json ?
|
|
1646
|
+
res.end(json ? _chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1614
1647
|
}
|
|
1615
1648
|
function opensFarmDevRuntimeSession(pm) {
|
|
1616
|
-
return pm.hasRuntimeRequestHooks() ||
|
|
1649
|
+
return pm.hasRuntimeRequestHooks() || _chunkADCVSTFVcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
|
|
1617
1650
|
}
|
|
1618
1651
|
var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1652
|
+
_chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
1653
|
+
_chunkQBMMQS25cjs.FARM_CONFIG_REDIRECTS_PLUGIN_NAME,
|
|
1654
|
+
_chunkQBMMQS25cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME
|
|
1622
1655
|
]);
|
|
1623
1656
|
function isFarmConfigRoutePlugin(plugin) {
|
|
1624
1657
|
return FARM_CONFIG_ROUTE_PLUGIN_NAMES.has(plugin.name);
|
|
@@ -1629,10 +1662,10 @@ async function proxyFarmExternalRewrite(req, res, bodySizeLimit) {
|
|
|
1629
1662
|
if (!destination || !/^https?:\/\//i.test(destination)) return false;
|
|
1630
1663
|
let request = createRequestFromNodeRequest(req, new URL(destination));
|
|
1631
1664
|
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
1632
|
-
const body = await
|
|
1665
|
+
const body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, bodySizeLimit);
|
|
1633
1666
|
request = new Request(request, { method: request.method, body: toRequestBody(body) });
|
|
1634
1667
|
}
|
|
1635
|
-
await
|
|
1668
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, await _chunk6VC7NUY3cjs.fetchFarmExternalRewrite.call(void 0, request));
|
|
1636
1669
|
return true;
|
|
1637
1670
|
}
|
|
1638
1671
|
function toRequestBody(body) {
|
|
@@ -1669,7 +1702,7 @@ function applyWebResponseToNodeResponse(response, res) {
|
|
|
1669
1702
|
for (const name of res.getHeaderNames()) {
|
|
1670
1703
|
res.removeHeader(name);
|
|
1671
1704
|
}
|
|
1672
|
-
|
|
1705
|
+
_chunk6VC7NUY3cjs.applyWebResponseHeaders.call(void 0, res, response.headers);
|
|
1673
1706
|
}
|
|
1674
1707
|
function toNodeResponseBuffer(chunk, encoding) {
|
|
1675
1708
|
if (chunk === void 0 || chunk === null || typeof chunk === "function") return void 0;
|
|
@@ -1718,7 +1751,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1718
1751
|
const originalWrite = res.write.bind(res);
|
|
1719
1752
|
const originalEnd = res.end.bind(res);
|
|
1720
1753
|
const originalWriteHead = res.writeHead.bind(res);
|
|
1721
|
-
const originalFlushHeaders = _optionalChain([res, 'access',
|
|
1754
|
+
const originalFlushHeaders = _optionalChain([res, 'access', _85 => _85.flushHeaders, 'optionalAccess', _86 => _86.bind, 'call', _87 => _87(res)]);
|
|
1722
1755
|
let afterResponseCalled = false;
|
|
1723
1756
|
let interceptedEnd = false;
|
|
1724
1757
|
const restore = () => {
|
|
@@ -1726,7 +1759,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1726
1759
|
res.end = originalEnd;
|
|
1727
1760
|
res.writeHead = originalWriteHead;
|
|
1728
1761
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1729
|
-
delete res[
|
|
1762
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1730
1763
|
};
|
|
1731
1764
|
let runtimeHookFailed = false;
|
|
1732
1765
|
const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
|
|
@@ -1740,7 +1773,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1740
1773
|
const writeRuntimeHookFailure = () => {
|
|
1741
1774
|
setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
|
|
1742
1775
|
originalWriteHead(500);
|
|
1743
|
-
originalWrite(options.jsonError ?
|
|
1776
|
+
originalWrite(options.jsonError ? _chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1744
1777
|
};
|
|
1745
1778
|
const htmlChunks = [];
|
|
1746
1779
|
const responseChunks = [];
|
|
@@ -1780,7 +1813,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1780
1813
|
).then(async (runtimeResponse) => {
|
|
1781
1814
|
applyWebResponseToNodeResponse(runtimeResponse, res);
|
|
1782
1815
|
if (!res.headersSent) originalWriteHead(res.statusCode);
|
|
1783
|
-
_optionalChain([originalFlushHeaders, 'optionalCall',
|
|
1816
|
+
_optionalChain([originalFlushHeaders, 'optionalCall', _88 => _88()]);
|
|
1784
1817
|
if (!runtimeResponse.body) return;
|
|
1785
1818
|
const reader = runtimeResponse.body.getReader();
|
|
1786
1819
|
for (; ; ) {
|
|
@@ -1829,7 +1862,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1829
1862
|
if (streamsThroughRuntime()) {
|
|
1830
1863
|
streamRuntimeChunk(bufferChunk);
|
|
1831
1864
|
const callback = args.find((arg) => typeof arg === "function");
|
|
1832
|
-
_optionalChain([callback, 'optionalCall',
|
|
1865
|
+
_optionalChain([callback, 'optionalCall', _89 => _89()]);
|
|
1833
1866
|
return true;
|
|
1834
1867
|
}
|
|
1835
1868
|
if (isHtmlResponse && bufferChunk) {
|
|
@@ -1841,7 +1874,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1841
1874
|
const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
|
|
1842
1875
|
if (shouldBufferResponse) {
|
|
1843
1876
|
const callback = args.find((arg) => typeof arg === "function");
|
|
1844
|
-
_optionalChain([callback, 'optionalCall',
|
|
1877
|
+
_optionalChain([callback, 'optionalCall', _90 => _90()]);
|
|
1845
1878
|
return true;
|
|
1846
1879
|
}
|
|
1847
1880
|
const writeResult = originalWrite(chunk, ...args);
|
|
@@ -1850,7 +1883,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1850
1883
|
});
|
|
1851
1884
|
res.end = ((...args) => {
|
|
1852
1885
|
interceptedEnd = true;
|
|
1853
|
-
res[
|
|
1886
|
+
res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
|
|
1854
1887
|
if (afterResponseCalled) return res;
|
|
1855
1888
|
afterResponseCalled = true;
|
|
1856
1889
|
options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
|
|
@@ -1933,7 +1966,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1933
1966
|
res.end = originalEnd;
|
|
1934
1967
|
res.writeHead = originalWriteHead;
|
|
1935
1968
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1936
|
-
delete res[
|
|
1969
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1937
1970
|
originalEnd(...originalEndArgs);
|
|
1938
1971
|
}).catch((error) => {
|
|
1939
1972
|
reportFailure(error);
|
|
@@ -1950,14 +1983,14 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1950
1983
|
res.end = originalEnd;
|
|
1951
1984
|
res.writeHead = originalWriteHead;
|
|
1952
1985
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1953
|
-
delete res[
|
|
1986
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1954
1987
|
originalEnd(body, callback);
|
|
1955
1988
|
} else {
|
|
1956
1989
|
res.write = originalWrite;
|
|
1957
1990
|
res.end = originalEnd;
|
|
1958
1991
|
res.writeHead = originalWriteHead;
|
|
1959
1992
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1960
|
-
delete res[
|
|
1993
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1961
1994
|
originalEnd(...originalEndArgs);
|
|
1962
1995
|
}
|
|
1963
1996
|
});
|
|
@@ -1985,22 +2018,22 @@ function getEnvDefines(config, configEnv) {
|
|
|
1985
2018
|
__FARM_API_BASE_URL__: JSON.stringify(getFarmAPIBaseURLDefine(config)),
|
|
1986
2019
|
__FARM_PUBLIC_ENV__: JSON.stringify(getPublicEnvDefine(config)),
|
|
1987
2020
|
__FARM_IMAGE_CONFIG__: JSON.stringify(
|
|
1988
|
-
|
|
1989
|
-
|
|
2021
|
+
_chunkJ2JMESBJcjs.getPublicFarmImageConfig.call(void 0,
|
|
2022
|
+
_chunkJ2JMESBJcjs.resolveFarmImageConfig.call(void 0,
|
|
1990
2023
|
config.images,
|
|
1991
|
-
|
|
2024
|
+
_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
|
|
1992
2025
|
)
|
|
1993
2026
|
)
|
|
1994
2027
|
)
|
|
1995
2028
|
};
|
|
1996
|
-
if (_optionalChain([configEnv, 'optionalAccess',
|
|
1997
|
-
defines.__FARM_ENV__ = JSON.stringify(
|
|
2029
|
+
if (_optionalChain([configEnv, 'optionalAccess', _91 => _91.isSsrBuild])) {
|
|
2030
|
+
defines.__FARM_ENV__ = JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
|
|
1998
2031
|
}
|
|
1999
2032
|
return defines;
|
|
2000
2033
|
}
|
|
2001
2034
|
function getFarmAPIBaseURLDefine(config) {
|
|
2002
|
-
const baseURL = _optionalChain([config, 'access',
|
|
2003
|
-
return typeof baseURL === "string" && baseURL ? baseURL :
|
|
2035
|
+
const baseURL = _optionalChain([config, 'access', _92 => _92.api, 'optionalAccess', _93 => _93.baseURL]);
|
|
2036
|
+
return typeof baseURL === "string" && baseURL ? baseURL : _chunkG5KGLMPNcjs.DEFAULT_FARM_API_BASE_PATH;
|
|
2004
2037
|
}
|
|
2005
2038
|
function isResolvedEnvScope(value) {
|
|
2006
2039
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -2018,7 +2051,7 @@ function fileContainsProgrammaticPageRoute(file) {
|
|
|
2018
2051
|
return false;
|
|
2019
2052
|
}
|
|
2020
2053
|
try {
|
|
2021
|
-
return
|
|
2054
|
+
return _chunkPYPHM7AScjs.scanProgrammaticPagePaths.call(void 0, fs2.readFileSync(file, "utf8")).length > 0;
|
|
2022
2055
|
} catch (e15) {
|
|
2023
2056
|
return false;
|
|
2024
2057
|
}
|
|
@@ -2078,8 +2111,8 @@ function rewriteEarlySsrRelativeImports(options) {
|
|
|
2078
2111
|
const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
|
|
2079
2112
|
const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
|
|
2080
2113
|
const resolvedPath = path6.resolve(path6.dirname(cleanId), sourcePath);
|
|
2081
|
-
const moduleId =
|
|
2082
|
-
const specifier = moduleId.startsWith("/@fs/") ?
|
|
2114
|
+
const moduleId = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, resolvedPath, options.root);
|
|
2115
|
+
const specifier = moduleId.startsWith("/@fs/") ? _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
|
|
2083
2116
|
replacements.push({
|
|
2084
2117
|
start: source.start,
|
|
2085
2118
|
end: source.end,
|
|
@@ -2121,7 +2154,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2121
2154
|
return null;
|
|
2122
2155
|
}
|
|
2123
2156
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2124
|
-
const everyExportIsComponent = options.code.includes(
|
|
2157
|
+
const everyExportIsComponent = options.code.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2125
2158
|
const replacements = [];
|
|
2126
2159
|
const wrapperStatements = [];
|
|
2127
2160
|
const originalEntries = [];
|
|
@@ -2140,9 +2173,9 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2140
2173
|
transformedExports++;
|
|
2141
2174
|
};
|
|
2142
2175
|
for (const node of body) {
|
|
2143
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
2176
|
+
if (_optionalChain([node, 'optionalAccess', _94 => _94.type]) === "ExportDefaultDeclaration" && node.declaration) {
|
|
2144
2177
|
const declaration2 = node.declaration;
|
|
2145
|
-
if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access',
|
|
2178
|
+
if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _95 => _95.id, 'optionalAccess', _96 => _96.name])) {
|
|
2146
2179
|
replacements.push({
|
|
2147
2180
|
start: node.start,
|
|
2148
2181
|
end: node.end,
|
|
@@ -2160,11 +2193,11 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2160
2193
|
}
|
|
2161
2194
|
continue;
|
|
2162
2195
|
}
|
|
2163
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
2196
|
+
if (_optionalChain([node, 'optionalAccess', _97 => _97.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
|
|
2164
2197
|
const specifiers = (node.specifiers || []).filter(
|
|
2165
2198
|
(specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
|
|
2166
2199
|
);
|
|
2167
|
-
const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess',
|
|
2200
|
+
const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _98 => _98.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _99 => _99.value]), () => ( "")))));
|
|
2168
2201
|
const isComponentExport = (specifier) => {
|
|
2169
2202
|
const exported = specifierName(specifier.exported);
|
|
2170
2203
|
return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
|
|
@@ -2191,14 +2224,14 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2191
2224
|
if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
|
|
2192
2225
|
continue;
|
|
2193
2226
|
}
|
|
2194
|
-
if (_optionalChain([node, 'optionalAccess',
|
|
2227
|
+
if (_optionalChain([node, 'optionalAccess', _100 => _100.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
|
|
2195
2228
|
const declaration = node.declaration;
|
|
2196
2229
|
const declaredNames = [];
|
|
2197
|
-
if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access',
|
|
2230
|
+
if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _101 => _101.id, 'optionalAccess', _102 => _102.name])) {
|
|
2198
2231
|
declaredNames.push(declaration.id.name);
|
|
2199
2232
|
} else if (declaration.type === "VariableDeclaration") {
|
|
2200
2233
|
for (const declarator of declaration.declarations || []) {
|
|
2201
|
-
if (_optionalChain([declarator, 'access',
|
|
2234
|
+
if (_optionalChain([declarator, 'access', _103 => _103.id, 'optionalAccess', _104 => _104.type]) === "Identifier") declaredNames.push(declarator.id.name);
|
|
2202
2235
|
}
|
|
2203
2236
|
}
|
|
2204
2237
|
const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
|
|
@@ -2271,21 +2304,21 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2271
2304
|
} catch (e20) {
|
|
2272
2305
|
return;
|
|
2273
2306
|
}
|
|
2274
|
-
const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access',
|
|
2307
|
+
const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _105 => _105.env, 'optionalAccess', _106 => _106.public]), () => ( {}))));
|
|
2275
2308
|
const findings = [];
|
|
2276
2309
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2277
2310
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2278
2311
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2279
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
2312
|
+
if (!_optionalChain([resolved, 'optionalAccess', _107 => _107.id, 'access', _108 => _108.startsWith, 'call', _109 => _109(_chunkPSALMEHJcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2280
2313
|
}
|
|
2281
2314
|
findings.push(finding);
|
|
2282
2315
|
}
|
|
2283
2316
|
if (findings.length === 0) return;
|
|
2284
2317
|
warnedClientBoundaryIds.add(id);
|
|
2285
|
-
const locate =
|
|
2286
|
-
|
|
2318
|
+
const locate = _chunkPSALMEHJcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2319
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2287
2320
|
findings.map(
|
|
2288
|
-
(finding) =>
|
|
2321
|
+
(finding) => _chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
2289
2322
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2290
2323
|
config.root
|
|
2291
2324
|
)
|
|
@@ -2302,10 +2335,10 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
|
|
|
2302
2335
|
);
|
|
2303
2336
|
}
|
|
2304
2337
|
function shouldEmitFarmClientRootHmr(renderer) {
|
|
2305
|
-
return
|
|
2338
|
+
return _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
|
|
2306
2339
|
}
|
|
2307
2340
|
function reachesSharedFarmRendererIsland(graph, file, islandModules) {
|
|
2308
|
-
const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess',
|
|
2341
|
+
const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _110 => _110.getModulesByFile, 'call', _111 => _111(file)]), () => ( [])));
|
|
2309
2342
|
const seen = new Set(queue);
|
|
2310
2343
|
for (const node of queue) {
|
|
2311
2344
|
if (node.file && islandModules.has(path6.resolve(node.file))) {
|
|
@@ -2325,7 +2358,7 @@ function toFarmRuntimeModuleId(specifier) {
|
|
|
2325
2358
|
return FARM_RUNTIME_MODULE_PREFIX + specifier;
|
|
2326
2359
|
}
|
|
2327
2360
|
function getFarmCoreFile() {
|
|
2328
|
-
return typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0,
|
|
2361
|
+
return typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0, _chunkUGL4BDNBcjs.define_import_meta_default.url);
|
|
2329
2362
|
}
|
|
2330
2363
|
var FARM_SOURCE_ALIAS_PROBES = [
|
|
2331
2364
|
"@/x",
|
|
@@ -2349,25 +2382,25 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2349
2382
|
);
|
|
2350
2383
|
}
|
|
2351
2384
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2352
|
-
const rendererDisabled =
|
|
2385
|
+
const rendererDisabled = _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2353
2386
|
const imageImports = farmImageImportsPlugin();
|
|
2354
|
-
const fontImports =
|
|
2387
|
+
const fontImports = _chunkUBH2OARScjs.farmFontImportsPlugin.call(void 0, {
|
|
2355
2388
|
root: options.root,
|
|
2356
2389
|
basePath: options.basePath,
|
|
2357
2390
|
publicDir: options.publicDir,
|
|
2358
2391
|
// A production build never starts the app, so it reads the directories from these options.
|
|
2359
|
-
isLayoutModule: (id) =>
|
|
2392
|
+
isLayoutModule: (id) => _chunkUBH2OARScjs.isFarmLayoutModule.call(void 0, id, _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113()]), () => ( options))))
|
|
2360
2393
|
});
|
|
2361
2394
|
let farmApp;
|
|
2362
2395
|
const isFarmGeneratedOutput = (file) => {
|
|
2363
|
-
const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
2396
|
+
const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _114 => _114.getConfig, 'call', _115 => _115(), 'access', _116 => _116.root]), () => ( options.root));
|
|
2364
2397
|
if (!root) return file.includes("/.farm/");
|
|
2365
|
-
const output =
|
|
2398
|
+
const output = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
|
|
2366
2399
|
return file === output || file.startsWith(`${output}/`);
|
|
2367
2400
|
};
|
|
2368
2401
|
let serverFnTransformActive = false;
|
|
2369
2402
|
const getFarmRenderedServerModules = () => {
|
|
2370
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
2403
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _117 => _117.getRouteManager, 'call', _118 => _118()]);
|
|
2371
2404
|
if (!routeManager) return /* @__PURE__ */ new Set();
|
|
2372
2405
|
const files = /* @__PURE__ */ new Set();
|
|
2373
2406
|
for (const entries of [
|
|
@@ -2380,15 +2413,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2380
2413
|
for (const entry of entries.values()) files.add(entry.modulePath);
|
|
2381
2414
|
}
|
|
2382
2415
|
const config = farmApp.getConfig();
|
|
2383
|
-
const mdxComponents =
|
|
2384
|
-
|
|
2416
|
+
const mdxComponents = _chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0,
|
|
2417
|
+
_chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, config.mdx),
|
|
2385
2418
|
config.root
|
|
2386
2419
|
);
|
|
2387
2420
|
if (mdxComponents) files.add(mdxComponents);
|
|
2388
2421
|
return files;
|
|
2389
2422
|
};
|
|
2390
|
-
const islxActionsMode = () =>
|
|
2391
|
-
const islandsServerFns = () =>
|
|
2423
|
+
const islxActionsMode = () => _chunkUBH2OARScjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
|
|
2424
|
+
const islandsServerFns = () => _chunkUBH2OARScjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _121 => _121.getConfig, 'call', _122 => _122()]), () => ( options)));
|
|
2392
2425
|
let reactRefreshActive = false;
|
|
2393
2426
|
let server;
|
|
2394
2427
|
let deferredGates;
|
|
@@ -2408,7 +2441,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2408
2441
|
docsMCPServerDisposers.clear();
|
|
2409
2442
|
};
|
|
2410
2443
|
const logUpdate = (tag, message) => {
|
|
2411
|
-
const pc =
|
|
2444
|
+
const pc = _chunkCH2JX3CMcjs.createCliColors.call(void 0, );
|
|
2412
2445
|
const log = [
|
|
2413
2446
|
pc.dim("[") + pc.bold(pc.blue("FARM")) + pc.dim("]"),
|
|
2414
2447
|
pc.dim("[") + pc.bold(pc.cyan(tag)) + pc.dim("]"),
|
|
@@ -2417,28 +2450,38 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2417
2450
|
].join(" ");
|
|
2418
2451
|
console.log(log);
|
|
2419
2452
|
};
|
|
2420
|
-
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
2453
|
+
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _123 => _123.getRouteManager, 'call', _124 => _124(), 'access', _125 => _125.getProgrammaticClientRoutes, 'call', _126 => _126()])));
|
|
2454
|
+
const inBuildPackageCache = _chunkPSALMEHJcjs.bindPackageClientBoundaryCache.call(void 0, );
|
|
2455
|
+
const inspectPackages = (operation) => {
|
|
2456
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _127 => _127.getRouteManager, 'call', _128 => _128()]);
|
|
2457
|
+
return inBuildPackageCache(
|
|
2458
|
+
() => routeManager ? routeManager.inspectPackages(operation) : operation()
|
|
2459
|
+
);
|
|
2460
|
+
};
|
|
2421
2461
|
const isOutsideAppRoot = (file) => {
|
|
2422
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
2462
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _129 => _129.getConfig, 'call', _130 => _130(), 'access', _131 => _131.root]) || _optionalChain([server, 'optionalAccess', _132 => _132.config, 'access', _133 => _133.root]) || options.root;
|
|
2423
2463
|
if (!root) return false;
|
|
2424
2464
|
const relative4 = path6.relative(root, file.split("?", 1)[0]);
|
|
2425
2465
|
return relative4.startsWith("..") || path6.isAbsolute(relative4);
|
|
2426
2466
|
};
|
|
2427
2467
|
const plugin = {
|
|
2428
2468
|
name: "farm",
|
|
2429
|
-
api: {
|
|
2469
|
+
api: {
|
|
2470
|
+
getProgrammaticClientRoutes,
|
|
2471
|
+
inspectPackages
|
|
2472
|
+
},
|
|
2430
2473
|
config(userConfig, configEnv) {
|
|
2431
2474
|
isBuild = configEnv.command === "build";
|
|
2432
2475
|
const farmAliases = {
|
|
2433
|
-
...
|
|
2434
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access',
|
|
2476
|
+
..._chunkKBURN62Zcjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2477
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _134 => _134.resolve, 'optionalAccess', _135 => _135.alias])) ? {} : _chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2435
2478
|
};
|
|
2436
2479
|
if (Object.keys(farmAliases).length > 0) {
|
|
2437
2480
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2438
|
-
userConfig.resolve.alias =
|
|
2481
|
+
userConfig.resolve.alias = _chunkUBH2OARScjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2439
2482
|
}
|
|
2440
2483
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2441
|
-
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access',
|
|
2484
|
+
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _136 => _136.server, 'optionalAccess', _137 => _137.cors]) === void 0;
|
|
2442
2485
|
return {
|
|
2443
2486
|
// Honor Farm's publicDir so the dev server serves the same static
|
|
2444
2487
|
// directory the production client build emits.
|
|
@@ -2451,13 +2494,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2451
2494
|
...farmOwnsDevCors ? { cors: false } : {},
|
|
2452
2495
|
fs: {
|
|
2453
2496
|
...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
|
|
2454
|
-
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access',
|
|
2497
|
+
deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _138 => _138.server, 'optionalAccess', _139 => _139.fs, 'optionalAccess', _140 => _140.deny]), options)
|
|
2455
2498
|
}
|
|
2456
2499
|
}
|
|
2457
2500
|
};
|
|
2458
2501
|
},
|
|
2459
2502
|
configEnvironment(name, environmentConfig, env) {
|
|
2460
|
-
if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access',
|
|
2503
|
+
if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _141 => _141.dev, 'optionalAccess', _142 => _142.createEnvironment])) {
|
|
2461
2504
|
return;
|
|
2462
2505
|
}
|
|
2463
2506
|
return {
|
|
@@ -2475,9 +2518,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2475
2518
|
serverFnTransformActive = config.plugins.some(
|
|
2476
2519
|
(plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
2477
2520
|
);
|
|
2478
|
-
reactRefreshActive =
|
|
2479
|
-
if (_optionalChain([options, 'access',
|
|
2480
|
-
|
|
2521
|
+
reactRefreshActive = _chunkQCVP22KWcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
2522
|
+
if (_optionalChain([options, 'access', _143 => _143.experimental, 'optionalAccess', _144 => _144.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
2523
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2481
2524
|
"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."
|
|
2482
2525
|
);
|
|
2483
2526
|
}
|
|
@@ -2485,21 +2528,21 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2485
2528
|
async configureServer(viteServer) {
|
|
2486
2529
|
viteServer.middlewares.use(
|
|
2487
2530
|
createFarmDevPreviewGuard(viteServer, {
|
|
2488
|
-
getSourceRoots: () =>
|
|
2531
|
+
getSourceRoots: () => _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _145 => _145.getConfig, 'call', _146 => _146()]), () => ( options)))
|
|
2489
2532
|
})
|
|
2490
2533
|
);
|
|
2491
2534
|
if (typeof fontImports.configureServer === "function") {
|
|
2492
2535
|
await fontImports.configureServer.call(this, viteServer);
|
|
2493
2536
|
}
|
|
2494
2537
|
server = viteServer;
|
|
2495
|
-
const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess',
|
|
2496
|
-
const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess',
|
|
2538
|
+
const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _147 => _147.pre, 'access', _148 => _148.target]), () => ( viteServer.middlewares));
|
|
2539
|
+
const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _149 => _149.post, 'access', _150 => _150.target]), () => ( viteServer.middlewares));
|
|
2497
2540
|
const pm = initialPluginManager;
|
|
2498
2541
|
const configRoutePlugins = new Set(
|
|
2499
|
-
_optionalChain([pm, 'optionalAccess',
|
|
2542
|
+
_optionalChain([pm, 'optionalAccess', _151 => _151.getPlugins, 'call', _152 => _152(), 'access', _153 => _153.filter, 'call', _154 => _154(isFarmConfigRoutePlugin), 'access', _155 => _155.map, 'call', _156 => _156((plugin2) => plugin2.name)])
|
|
2500
2543
|
);
|
|
2501
|
-
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
2502
|
-
const matcher =
|
|
2544
|
+
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _157 => _157.getPlugins, 'call', _158 => _158()]), () => ( []))).flatMap((plugin2) => {
|
|
2545
|
+
const matcher = _chunkQBMMQS25cjs.getConfigRedirectMatcher.call(void 0, plugin2);
|
|
2503
2546
|
return matcher ? [matcher] : [];
|
|
2504
2547
|
});
|
|
2505
2548
|
const emitPluginError = async (phase, error, meta) => {
|
|
@@ -2509,7 +2552,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2509
2552
|
} catch (e21) {
|
|
2510
2553
|
}
|
|
2511
2554
|
};
|
|
2512
|
-
farmApp = new (0,
|
|
2555
|
+
farmApp = new (0, _chunkUBH2OARScjs.FarmApp)(
|
|
2513
2556
|
{
|
|
2514
2557
|
...options,
|
|
2515
2558
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2517,7 +2560,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2517
2560
|
server
|
|
2518
2561
|
);
|
|
2519
2562
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2520
|
-
|
|
2563
|
+
_chunkPSALMEHJcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2521
2564
|
farmApp.getConfig().root,
|
|
2522
2565
|
options.distDir || ".farm"
|
|
2523
2566
|
)
|
|
@@ -2526,17 +2569,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2526
2569
|
await farmApp.initialize();
|
|
2527
2570
|
const farmConfig = farmApp.getConfig();
|
|
2528
2571
|
let farmAppPackages;
|
|
2529
|
-
if (_optionalChain([farmConfig, 'access',
|
|
2572
|
+
if (_optionalChain([farmConfig, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.noindexPreviews])) {
|
|
2530
2573
|
farmMiddlewares.use((_req, res, next) => {
|
|
2531
|
-
if (
|
|
2532
|
-
res.setHeader("X-Robots-Tag",
|
|
2574
|
+
if (_chunkNNHIV3O2cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2575
|
+
res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2533
2576
|
}
|
|
2534
2577
|
next();
|
|
2535
2578
|
});
|
|
2536
2579
|
}
|
|
2537
|
-
const apiServerBasePath =
|
|
2580
|
+
const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2538
2581
|
const devBuiltInRoutePaths = new Set(
|
|
2539
|
-
|
|
2582
|
+
_chunkC4DZAEVTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2540
2583
|
agent: {
|
|
2541
2584
|
apiCatalog: true,
|
|
2542
2585
|
mcp: true,
|
|
@@ -2547,46 +2590,46 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2547
2590
|
openapi: options.openapi
|
|
2548
2591
|
})
|
|
2549
2592
|
);
|
|
2550
|
-
const serverConfig =
|
|
2551
|
-
globalThis.__FARM_IMAGE_CONFIG__ =
|
|
2593
|
+
const serverConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, farmConfig.server);
|
|
2594
|
+
globalThis.__FARM_IMAGE_CONFIG__ = _chunkJ2JMESBJcjs.getPublicFarmImageConfig.call(void 0, farmConfig.images);
|
|
2552
2595
|
let imageHandler = null;
|
|
2553
2596
|
if (farmConfig.images.provider !== "none") {
|
|
2554
2597
|
const { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } = await import("./image/sharp.cjs");
|
|
2555
|
-
imageHandler =
|
|
2598
|
+
imageHandler = _chunk6QWCFVGLcjs.createFarmImageHandler.call(void 0, farmConfig.images, {
|
|
2556
2599
|
transform: createSharpImageTransformer(),
|
|
2557
2600
|
fetchRemote: createNodeImageFetcher(farmConfig.images),
|
|
2558
2601
|
validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
|
|
2559
2602
|
// Vite owns this address. Unlike request.url, it cannot be replaced by
|
|
2560
2603
|
// a caller-controlled Host header.
|
|
2561
|
-
trustedLocalOrigin: () => _optionalChain([server, 'access',
|
|
2604
|
+
trustedLocalOrigin: () => _optionalChain([server, 'access', _161 => _161.resolvedUrls, 'optionalAccess', _162 => _162.local, 'access', _163 => _163[0]]),
|
|
2562
2605
|
onError(error) {
|
|
2563
|
-
|
|
2606
|
+
_chunk7ZDLE77Pcjs.logger.error(
|
|
2564
2607
|
`Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2565
2608
|
);
|
|
2566
2609
|
}
|
|
2567
2610
|
});
|
|
2568
2611
|
}
|
|
2569
|
-
const sourceRoots =
|
|
2612
|
+
const sourceRoots = _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, farmConfig);
|
|
2570
2613
|
server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
|
|
2571
2614
|
if (farmConfig.i18n.enabled) {
|
|
2572
2615
|
server.watcher.add(
|
|
2573
2616
|
farmConfig.i18n.locales.map(
|
|
2574
|
-
(locale) =>
|
|
2617
|
+
(locale) => _chunkB2VSX33Tcjs.resolveFarmI18nMessagePath.call(void 0, farmConfig.i18n, locale)
|
|
2575
2618
|
)
|
|
2576
2619
|
);
|
|
2577
2620
|
}
|
|
2578
2621
|
const workflowConfig = farmConfig.workflows;
|
|
2579
2622
|
const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
|
|
2580
2623
|
const getExtraRouteTypes = () => [
|
|
2581
|
-
..._optionalChain([options, 'access',
|
|
2582
|
-
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2624
|
+
..._optionalChain([options, 'access', _164 => _164.openapi, 'optionalAccess', _165 => _165.enabled]) && options.openapi.route ? [options.openapi.route] : [],
|
|
2625
|
+
..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _166 => _166.getFarmDocsRouteTypeEntries, 'call', _167 => _167(farmConfig.docs)]), () => ( []))
|
|
2583
2626
|
];
|
|
2584
2627
|
const appDirSlugs = sourceRoots.map(
|
|
2585
2628
|
(source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
|
|
2586
2629
|
);
|
|
2587
2630
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2588
2631
|
try {
|
|
2589
|
-
const result = await
|
|
2632
|
+
const result = await _chunkKM7ZRKCHcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2590
2633
|
root: farmConfig.root,
|
|
2591
2634
|
srcDir: farmConfig.srcDir,
|
|
2592
2635
|
layers: farmConfig.layers,
|
|
@@ -2617,7 +2660,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2617
2660
|
}
|
|
2618
2661
|
} catch (e) {
|
|
2619
2662
|
const message = e instanceof Error ? e.message : String(e);
|
|
2620
|
-
|
|
2663
|
+
_chunk7ZDLE77Pcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
2621
2664
|
if (pm) {
|
|
2622
2665
|
await emitPluginError("type-artifact-generation", e, { reason });
|
|
2623
2666
|
}
|
|
@@ -2628,10 +2671,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2628
2671
|
(source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
|
|
2629
2672
|
);
|
|
2630
2673
|
const layerConfigFiles = new Set(
|
|
2631
|
-
farmConfig.layers.map((layer) => _optionalChain([layer, 'access',
|
|
2674
|
+
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _168 => _168.configFile, 'optionalAccess', _169 => _169.replace, 'call', _170 => _170(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
2632
2675
|
);
|
|
2633
2676
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
2634
|
-
...
|
|
2677
|
+
..._chunkHP7QYVSTcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
2635
2678
|
".md",
|
|
2636
2679
|
".mdx"
|
|
2637
2680
|
]);
|
|
@@ -2640,14 +2683,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2640
2683
|
const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
|
|
2641
2684
|
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
|
|
2642
2685
|
};
|
|
2643
|
-
const polyroute =
|
|
2686
|
+
const polyroute = _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2644
2687
|
const isApiRouteFile = (file) => {
|
|
2645
2688
|
const normalized = file.replace(/\\/g, "/");
|
|
2646
|
-
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) &&
|
|
2689
|
+
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
|
|
2647
2690
|
};
|
|
2648
2691
|
const isProgrammaticRouteFile = (file) => {
|
|
2649
2692
|
const normalized = file.replace(/\\/g, "/");
|
|
2650
|
-
return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) &&
|
|
2693
|
+
return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalized);
|
|
2651
2694
|
};
|
|
2652
2695
|
const isProgrammaticRouteSourceFile = (file) => {
|
|
2653
2696
|
const normalized = file.replace(/\\/g, "/");
|
|
@@ -2656,17 +2699,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2656
2699
|
);
|
|
2657
2700
|
};
|
|
2658
2701
|
const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
|
|
2659
|
-
const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess',
|
|
2702
|
+
const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _171 => _171.getRouteManager, 'call', _172 => _172(), 'access', _173 => _173.isRendererRouteFile, 'call', _174 => _174(file)]) === true;
|
|
2660
2703
|
const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
|
|
2661
2704
|
file.replace(/\\/g, "/")
|
|
2662
2705
|
);
|
|
2663
|
-
const isI18nCatalogFile = (file) =>
|
|
2706
|
+
const isI18nCatalogFile = (file) => _chunkB2VSX33Tcjs.isFarmI18nCatalogFile.call(void 0, farmConfig.i18n, file);
|
|
2664
2707
|
let typeArtifactGenScheduled = null;
|
|
2665
2708
|
let pendingTypeArtifacts = createEmptyTypeArtifactSelection();
|
|
2666
2709
|
let pendingTypeArtifactReason = "";
|
|
2667
2710
|
let queuedRouteFiles;
|
|
2668
2711
|
const scheduleTypeArtifactGen = (file, event, selection) => {
|
|
2669
|
-
const normalizedFile =
|
|
2712
|
+
const normalizedFile = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, file);
|
|
2670
2713
|
for (const [artifact, enabled] of Object.entries(selection)) {
|
|
2671
2714
|
if (enabled) {
|
|
2672
2715
|
pendingTypeArtifacts[artifact] = true;
|
|
@@ -2687,7 +2730,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2687
2730
|
["add", "change", "unlink"].forEach((ev) => {
|
|
2688
2731
|
server.watcher.on(ev, (file) => {
|
|
2689
2732
|
if (ev === "add") {
|
|
2690
|
-
|
|
2733
|
+
_chunkVB7P66Q4cjs.invalidateFailedFarmDevModules.call(void 0, server);
|
|
2691
2734
|
}
|
|
2692
2735
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
2693
2736
|
const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
|
|
@@ -2703,7 +2746,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2703
2746
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
2704
2747
|
}
|
|
2705
2748
|
if (isI18nCatalogFile(file)) {
|
|
2706
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
2749
|
+
_optionalChain([farmApp, 'optionalAccess', _175 => _175.getI18nRuntime, 'call', _176 => _176(), 'access', _177 => _177.reload, 'call', _178 => _178(), 'access', _179 => _179.then, 'call', _180 => _180(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _181 => _181.catch, 'call', _182 => _182((error) => _chunk7ZDLE77Pcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
2707
2750
|
}
|
|
2708
2751
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || polyroute && isApiRouteFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2709
2752
|
if (isRouteRefreshEvent) {
|
|
@@ -2715,13 +2758,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2715
2758
|
queuedRouteFiles = void 0;
|
|
2716
2759
|
try {
|
|
2717
2760
|
await Promise.all([
|
|
2718
|
-
_optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
2719
|
-
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess',
|
|
2761
|
+
_optionalChain([refreshRouteDiscovery, 'optionalCall', _183 => _183(`${ev} ${file}`)]),
|
|
2762
|
+
[...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _184 => _184.reload, 'call', _185 => _185()]) : void 0
|
|
2720
2763
|
]);
|
|
2721
2764
|
if (pendingRouteReloads.size === 1)
|
|
2722
2765
|
server.ws.send({ type: "full-reload", path: "*" });
|
|
2723
2766
|
} catch (error) {
|
|
2724
|
-
|
|
2767
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2725
2768
|
`Route refresh failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2726
2769
|
);
|
|
2727
2770
|
} finally {
|
|
@@ -2733,7 +2776,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2733
2776
|
}
|
|
2734
2777
|
});
|
|
2735
2778
|
});
|
|
2736
|
-
const appDirs =
|
|
2779
|
+
const appDirs = _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, farmConfig);
|
|
2737
2780
|
const routeManager = farmApp.getRouteManager();
|
|
2738
2781
|
const discoveredRoutes = [];
|
|
2739
2782
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
@@ -2760,19 +2803,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2760
2803
|
layoutCount: discoveredRoutes.filter((r) => r.kind === "layout").length
|
|
2761
2804
|
});
|
|
2762
2805
|
}
|
|
2763
|
-
const dispatchToDevServer =
|
|
2806
|
+
const dispatchToDevServer = _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server);
|
|
2764
2807
|
if (options.mobileClient) {
|
|
2765
2808
|
const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
|
|
2766
|
-
const load = (file) =>
|
|
2809
|
+
const load = (file) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, file);
|
|
2767
2810
|
globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
|
|
2768
|
-
_optionalChain([server, 'access',
|
|
2811
|
+
_optionalChain([server, 'access', _186 => _186.httpServer, 'optionalAccess', _187 => _187.once, 'call', _188 => _188("close", () => {
|
|
2769
2812
|
const globals = globalThis;
|
|
2770
2813
|
if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
|
|
2771
2814
|
delete globals[FARM_DEV_SERVER_MODULE_LOADER];
|
|
2772
2815
|
}
|
|
2773
2816
|
})]);
|
|
2774
2817
|
}
|
|
2775
|
-
apiRouteManager = new (0,
|
|
2818
|
+
apiRouteManager = new (0, _chunk5BZ7PR3Tcjs.APIRouteManager)(appDirs, server, {
|
|
2776
2819
|
plugins: farmConfig.plugins,
|
|
2777
2820
|
i18n: farmApp.getI18nRuntime(),
|
|
2778
2821
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2781,7 +2824,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2781
2824
|
// so the endpoint's middleware and integration guards run for it, as in production.
|
|
2782
2825
|
dispatch: (request) => {
|
|
2783
2826
|
const url = new URL(request.url);
|
|
2784
|
-
url.pathname =
|
|
2827
|
+
url.pathname = _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, url.pathname, farmConfig.basePath);
|
|
2785
2828
|
return dispatchToDevServer(new Request(url, request));
|
|
2786
2829
|
}
|
|
2787
2830
|
});
|
|
@@ -2796,17 +2839,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2796
2839
|
discoveredWorkflows = await discoverFarmWorkflows(
|
|
2797
2840
|
{ ...farmConfig, workflows: workflowConfig },
|
|
2798
2841
|
{
|
|
2799
|
-
loadModule: async (filePath) =>
|
|
2842
|
+
loadModule: async (filePath) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, filePath)
|
|
2800
2843
|
}
|
|
2801
2844
|
);
|
|
2802
2845
|
if (discoveredWorkflows.length > 0) {
|
|
2803
2846
|
workflowHandler = createFarmWorkflowRequestHandler({
|
|
2804
2847
|
workflows: discoveredWorkflows,
|
|
2805
2848
|
config: workflowConfig,
|
|
2806
|
-
loadModule: async (workflow) =>
|
|
2849
|
+
loadModule: async (workflow) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
|
|
2807
2850
|
server: farmConfig.server
|
|
2808
2851
|
});
|
|
2809
|
-
|
|
2852
|
+
_chunk7ZDLE77Pcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
|
|
2810
2853
|
}
|
|
2811
2854
|
}
|
|
2812
2855
|
if (pm) {
|
|
@@ -2818,7 +2861,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2818
2861
|
});
|
|
2819
2862
|
}
|
|
2820
2863
|
}
|
|
2821
|
-
middlewareManager = new (0,
|
|
2864
|
+
middlewareManager = new (0, _chunkHF3JJPH4cjs.MiddlewareManager)(
|
|
2822
2865
|
appDirs,
|
|
2823
2866
|
server,
|
|
2824
2867
|
farmConfig.middleware,
|
|
@@ -2839,11 +2882,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2839
2882
|
});
|
|
2840
2883
|
}
|
|
2841
2884
|
}
|
|
2842
|
-
if (_optionalChain([options, 'access',
|
|
2885
|
+
if (_optionalChain([options, 'access', _189 => _189.openapi, 'optionalAccess', _190 => _190.enabled])) {
|
|
2843
2886
|
const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
|
|
2844
2887
|
openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
|
|
2845
2888
|
mode: "development",
|
|
2846
|
-
apiBaseURL: typeof _optionalChain([options, 'access',
|
|
2889
|
+
apiBaseURL: typeof _optionalChain([options, 'access', _191 => _191.api, 'optionalAccess', _192 => _192.baseURL]) === "string" ? options.api.baseURL : void 0,
|
|
2847
2890
|
routes: () => apiRouteManager.getRoutes().values(),
|
|
2848
2891
|
loadModule: (filePath) => apiRouteManager.loadModule(filePath)
|
|
2849
2892
|
});
|
|
@@ -2862,19 +2905,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2862
2905
|
await openAPIManager.invalidateCache();
|
|
2863
2906
|
}
|
|
2864
2907
|
if (process.env.FARM_VERBOSE) {
|
|
2865
|
-
|
|
2908
|
+
_chunk7ZDLE77Pcjs.logger.info(`Refreshed routes: ${reason}`);
|
|
2866
2909
|
}
|
|
2867
2910
|
};
|
|
2868
|
-
const farmDocsFontAssetList = farmDocsDevRuntime ?
|
|
2911
|
+
const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
|
|
2869
2912
|
const resolveDocsLayoutFonts = async (pathname) => {
|
|
2870
2913
|
const layouts = routeManager.matchRoute(pathname).layouts;
|
|
2871
2914
|
const layoutModules = await Promise.all(
|
|
2872
2915
|
layouts.map((layout) => routeManager.loadLayoutModule(layout.modulePath))
|
|
2873
2916
|
);
|
|
2874
|
-
return
|
|
2917
|
+
return _chunkSIQPXYBBcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
2875
2918
|
};
|
|
2876
2919
|
releaseDocsMCPServers();
|
|
2877
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
2920
|
+
const isFarmDocsPathGuarded = (href) => _chunkIGBQSUT5cjs.farmPathGuardCoversPage.call(void 0,
|
|
2878
2921
|
{
|
|
2879
2922
|
config: farmConfig,
|
|
2880
2923
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2888,23 +2931,23 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2888
2931
|
rendererServer: farmConfig.renderer.server,
|
|
2889
2932
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2890
2933
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2891
|
-
globalStylesheetHref:
|
|
2934
|
+
globalStylesheetHref: _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2892
2935
|
farmConfig.root,
|
|
2893
2936
|
farmConfig.srcDir
|
|
2894
2937
|
),
|
|
2895
2938
|
loadModule: async (specifier) => {
|
|
2896
2939
|
const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
|
|
2897
|
-
if (specifier === _optionalChain([farmConfig, 'access',
|
|
2940
|
+
if (specifier === _optionalChain([farmConfig, 'access', _193 => _193.docs, 'access', _194 => _194.adapter, 'optionalAccess', _195 => _195.server]) && _optionalChain([resolved, 'optionalAccess', _196 => _196.id])) {
|
|
2898
2941
|
const file = resolved.id.split("?", 1)[0];
|
|
2899
2942
|
return import(
|
|
2900
2943
|
/* @vite-ignore */
|
|
2901
2944
|
_url.pathToFileURL.call(void 0, file).href
|
|
2902
2945
|
);
|
|
2903
2946
|
}
|
|
2904
|
-
return
|
|
2947
|
+
return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _197 => _197.id]), () => ( specifier)));
|
|
2905
2948
|
},
|
|
2906
2949
|
registerMCPServer: (mcpServer) => {
|
|
2907
|
-
const dispose =
|
|
2950
|
+
const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
2908
2951
|
docsMCPServerDisposers.add(dispose);
|
|
2909
2952
|
return () => {
|
|
2910
2953
|
docsMCPServerDisposers.delete(dispose);
|
|
@@ -2916,10 +2959,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2916
2959
|
root: farmConfig.root,
|
|
2917
2960
|
srcDir: farmConfig.srcDir,
|
|
2918
2961
|
clientEntry: "/@farm/client.js",
|
|
2919
|
-
fontAssets:
|
|
2962
|
+
fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2920
2963
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2921
2964
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2922
|
-
globalStylesheetHref:
|
|
2965
|
+
globalStylesheetHref: _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2923
2966
|
farmConfig.root,
|
|
2924
2967
|
farmConfig.srcDir
|
|
2925
2968
|
),
|
|
@@ -2927,7 +2970,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2927
2970
|
basePath: farmConfig.basePath
|
|
2928
2971
|
}) : null;
|
|
2929
2972
|
const farmDocsListsPages = Boolean(
|
|
2930
|
-
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess',
|
|
2973
|
+
farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _198 => _198.getPlugins, 'call', _199 => _199(), 'access', _200 => _200.some, 'call', _201 => _201((plugin2) => plugin2.name === "farm:infra-analytics")])
|
|
2931
2974
|
);
|
|
2932
2975
|
let farmDocsPagePaths;
|
|
2933
2976
|
const getFarmDocsPagePaths = () => {
|
|
@@ -2939,7 +2982,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2939
2982
|
}).then(
|
|
2940
2983
|
(pages) => new Set(pages),
|
|
2941
2984
|
(error) => {
|
|
2942
|
-
|
|
2985
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2943
2986
|
`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)}).`
|
|
2944
2987
|
);
|
|
2945
2988
|
return void 0;
|
|
@@ -2954,22 +2997,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2954
2997
|
});
|
|
2955
2998
|
}
|
|
2956
2999
|
}
|
|
2957
|
-
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess',
|
|
3000
|
+
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _202 => _202.getPlugins, 'call', _203 => _203(), 'access', _204 => _204.find, 'call', _205 => _205((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
2958
3001
|
if (farmInfraAnalyticsPlugin) {
|
|
2959
|
-
|
|
3002
|
+
_chunkMBDDLYT5cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
2960
3003
|
if (farmDocsDevRuntime) {
|
|
2961
|
-
const label =
|
|
2962
|
-
|
|
3004
|
+
const label = _chunkC4DZAEVTcjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
3005
|
+
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
2963
3006
|
{
|
|
2964
|
-
path: _optionalChain([farmConfig, 'access',
|
|
2965
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3007
|
+
path: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.entry]) || "/docs",
|
|
3008
|
+
roots: _optionalChain([farmConfig, 'access', _208 => _208.docs, 'optionalAccess', _209 => _209.roots, 'optionalAccess', _210 => _210.map, 'call', _211 => _211((root) => root.entry)]),
|
|
2966
3009
|
pages: await getFarmDocsPagePaths()
|
|
2967
3010
|
}
|
|
2968
3011
|
);
|
|
2969
|
-
if (label) return
|
|
3012
|
+
if (label) return _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
2970
3013
|
}
|
|
2971
3014
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
2972
|
-
return { pathname, pattern: _optionalChain([match, 'access',
|
|
3015
|
+
return { pathname, pattern: _optionalChain([match, 'access', _212 => _212.route, 'optionalAccess', _213 => _213.pattern]) || null };
|
|
2973
3016
|
});
|
|
2974
3017
|
}
|
|
2975
3018
|
if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
|
|
@@ -2980,7 +3023,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2980
3023
|
server.watcher.add(docsContentDirs);
|
|
2981
3024
|
for (const event of ["add", "change", "unlink"]) {
|
|
2982
3025
|
server.watcher.on(event, (file) => {
|
|
2983
|
-
const normalizedFile =
|
|
3026
|
+
const normalizedFile = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, file);
|
|
2984
3027
|
if (appDirSlugs.some((appDir) => normalizedFile.startsWith(`${appDir}/`))) return;
|
|
2985
3028
|
const contentDirs = docsContentDirs.filter(
|
|
2986
3029
|
(contentDir) => farmDocsDevRuntime.isFarmDocsContentFile(contentDir, file)
|
|
@@ -2991,7 +3034,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2991
3034
|
}
|
|
2992
3035
|
logUpdate(
|
|
2993
3036
|
"PAGE",
|
|
2994
|
-
`${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${
|
|
3037
|
+
`${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.relative(farmConfig.root, file))}`
|
|
2995
3038
|
);
|
|
2996
3039
|
server.ws.send({ type: "full-reload", path: "*" });
|
|
2997
3040
|
});
|
|
@@ -3018,7 +3061,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3018
3061
|
return;
|
|
3019
3062
|
}
|
|
3020
3063
|
logResponse.__last = { key: dedupeKey, ts: now };
|
|
3021
|
-
const pc =
|
|
3064
|
+
const pc = _chunkCH2JX3CMcjs.createCliColors.call(void 0, );
|
|
3022
3065
|
let statusColor = pc.green;
|
|
3023
3066
|
if (status >= 500) statusColor = pc.red;
|
|
3024
3067
|
else if (status >= 400) statusColor = pc.yellow;
|
|
@@ -3044,9 +3087,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3044
3087
|
}
|
|
3045
3088
|
},
|
|
3046
3089
|
(request) => {
|
|
3047
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3048
|
-
const currentServerConfig =
|
|
3049
|
-
return
|
|
3090
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
|
|
3091
|
+
const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
3092
|
+
return _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request, {
|
|
3050
3093
|
trustProxy: currentServerConfig.trustProxy
|
|
3051
3094
|
});
|
|
3052
3095
|
}
|
|
@@ -3060,9 +3103,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3060
3103
|
withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
|
|
3061
3104
|
const requestUrl = req.url || "/";
|
|
3062
3105
|
const requestMethod = req.method || "GET";
|
|
3063
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3064
|
-
const currentServerConfig =
|
|
3065
|
-
const parsedRequestUrl =
|
|
3106
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _216 => _216.getConfig, 'call', _217 => _217()]), () => ( options));
|
|
3107
|
+
const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
3108
|
+
const parsedRequestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3066
3109
|
trustProxy: currentServerConfig.trustProxy
|
|
3067
3110
|
});
|
|
3068
3111
|
const fullUrl = parsedRequestUrl.toString();
|
|
@@ -3083,7 +3126,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3083
3126
|
}
|
|
3084
3127
|
}
|
|
3085
3128
|
if (requestMethod === "OPTIONS" && req.headers.origin && req.headers["access-control-request-method"]) {
|
|
3086
|
-
const preflightHeaders =
|
|
3129
|
+
const preflightHeaders = _chunkQZRFEHMScjs.resolveRouteRuleCorsPreflightHeaders.call(void 0,
|
|
3087
3130
|
currentConfig.routeRules,
|
|
3088
3131
|
requestPathname
|
|
3089
3132
|
);
|
|
@@ -3098,14 +3141,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3098
3141
|
createRequestFromNodeRequest(req, new URL(fullUrl))
|
|
3099
3142
|
);
|
|
3100
3143
|
if (imageResponse) {
|
|
3101
|
-
await
|
|
3144
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, imageResponse);
|
|
3102
3145
|
return;
|
|
3103
3146
|
}
|
|
3104
3147
|
}
|
|
3105
3148
|
if (pm && requestMethod !== "GET" && requestMethod !== "HEAD" && pm._hasRuntimeEndpoint(requestPathname)) {
|
|
3106
3149
|
let body;
|
|
3107
3150
|
try {
|
|
3108
|
-
body = await
|
|
3151
|
+
body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
3109
3152
|
} catch (error) {
|
|
3110
3153
|
res.statusCode = _nullishCoalesce(error.status, () => ( 400));
|
|
3111
3154
|
res.end();
|
|
@@ -3124,13 +3167,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3124
3167
|
sendFarmDevRuntimeHookError(res, true);
|
|
3125
3168
|
return;
|
|
3126
3169
|
}
|
|
3127
|
-
await
|
|
3170
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3128
3171
|
return;
|
|
3129
3172
|
}
|
|
3130
|
-
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname ===
|
|
3173
|
+
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3131
3174
|
res.statusCode = 200;
|
|
3132
3175
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3133
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3176
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkUBH2OARScjs.FARM_VIDEO_PLAYER_HTML);
|
|
3134
3177
|
return;
|
|
3135
3178
|
}
|
|
3136
3179
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3142,7 +3185,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3142
3185
|
else fs2.createReadStream(farmDocsFontPath).pipe(res);
|
|
3143
3186
|
return;
|
|
3144
3187
|
}
|
|
3145
|
-
if (requestMethod === "GET" && (requestPathname ===
|
|
3188
|
+
if (requestMethod === "GET" && (requestPathname === _chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH || requestPathname === `${_chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH}.json`)) {
|
|
3146
3189
|
if (!farmConfig.devtools.enabled) {
|
|
3147
3190
|
res.statusCode = 404;
|
|
3148
3191
|
res.setHeader("Content-Type", "text/plain; charset=utf-8");
|
|
@@ -3150,19 +3193,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3150
3193
|
res.end("Farm DevTools are disabled.");
|
|
3151
3194
|
return;
|
|
3152
3195
|
}
|
|
3153
|
-
if (requestPathname ===
|
|
3196
|
+
if (requestPathname === _chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH && parsedRequestUrl.searchParams.get("embedded") !== "1" && !rendererDisabled) {
|
|
3154
3197
|
let launchUrl = new URL(farmConfig.basePath || "/", parsedRequestUrl.origin);
|
|
3155
3198
|
const referrer = req.headers.referer;
|
|
3156
3199
|
if (referrer) {
|
|
3157
3200
|
try {
|
|
3158
3201
|
const referrerUrl = new URL(referrer);
|
|
3159
|
-
if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(
|
|
3202
|
+
if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(_chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH)) {
|
|
3160
3203
|
launchUrl = referrerUrl;
|
|
3161
3204
|
}
|
|
3162
3205
|
} catch (e23) {
|
|
3163
3206
|
}
|
|
3164
3207
|
}
|
|
3165
|
-
launchUrl.searchParams.set(
|
|
3208
|
+
launchUrl.searchParams.set(_chunkRQSPBWXJcjs.FARM_DEVTOOLS_LAUNCH_PARAM, "1");
|
|
3166
3209
|
res.statusCode = 302;
|
|
3167
3210
|
res.setHeader(
|
|
3168
3211
|
"Location",
|
|
@@ -3185,7 +3228,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3185
3228
|
openapi: options.openapi
|
|
3186
3229
|
},
|
|
3187
3230
|
workflows: discoveredWorkflows,
|
|
3188
|
-
plugins: _optionalChain([pm, 'optionalAccess',
|
|
3231
|
+
plugins: _optionalChain([pm, 'optionalAccess', _218 => _218.getSortedPlugins, 'call', _219 => _219()])
|
|
3189
3232
|
});
|
|
3190
3233
|
res.statusCode = 200;
|
|
3191
3234
|
res.setHeader(
|
|
@@ -3198,7 +3241,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3198
3241
|
} else {
|
|
3199
3242
|
if (!warnedDeprecatedDevtoolsDashboard) {
|
|
3200
3243
|
warnedDeprecatedDevtoolsDashboard = true;
|
|
3201
|
-
|
|
3244
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
3202
3245
|
"The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
|
|
3203
3246
|
);
|
|
3204
3247
|
}
|
|
@@ -3209,7 +3252,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3209
3252
|
}
|
|
3210
3253
|
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]));
|
|
3211
3254
|
const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
|
|
3212
|
-
const runtimeHookErrorAnswersJSON = rendererDisabled ||
|
|
3255
|
+
const runtimeHookErrorAnswersJSON = rendererDisabled || _chunk5P3TZGS3cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
|
|
3213
3256
|
const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
|
|
3214
3257
|
let pageHookRouteMatch;
|
|
3215
3258
|
const pageHookRoute = () => {
|
|
@@ -3220,10 +3263,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3220
3263
|
render: {
|
|
3221
3264
|
pathname: pathname2,
|
|
3222
3265
|
method: requestMethod,
|
|
3223
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
3224
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
3266
|
+
routePattern: _optionalChain([match, 'optionalAccess', _220 => _220.route, 'optionalAccess', _221 => _221.pattern]) || null,
|
|
3267
|
+
params: _optionalChain([match, 'optionalAccess', _222 => _222.params]) || {}
|
|
3225
3268
|
},
|
|
3226
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
3269
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _223 => _223.layouts]) || []).map((layout) => layout.pattern)
|
|
3227
3270
|
};
|
|
3228
3271
|
return pageHookRouteMatch;
|
|
3229
3272
|
};
|
|
@@ -3258,13 +3301,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3258
3301
|
};
|
|
3259
3302
|
const meetsRequestedURLRoutes = configRewriteSource === void 0 && !deferredDottedRequests.has(req);
|
|
3260
3303
|
const routeRedirect = meetsRequestedURLRoutes ? farmApp.getRouteManager().matchRedirect(requestPathname, parsedRequestUrl.search) : null;
|
|
3261
|
-
if (meetsRequestedURLRoutes && (routeRedirect || pm && (configRoutePlugins.has(
|
|
3304
|
+
if (meetsRequestedURLRoutes && (routeRedirect || pm && (configRoutePlugins.has(_chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME) || configRedirectMatchers.length > 0)) && !isViteOwnedRequest()) {
|
|
3262
3305
|
let redirect = routeRedirect;
|
|
3263
3306
|
try {
|
|
3264
3307
|
if (pm) {
|
|
3265
3308
|
await pm.runHookParallelFiltered(
|
|
3266
3309
|
"beforeRequest",
|
|
3267
|
-
(plugin2) => plugin2.name ===
|
|
3310
|
+
(plugin2) => plugin2.name === _chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
3268
3311
|
req,
|
|
3269
3312
|
res
|
|
3270
3313
|
);
|
|
@@ -3290,7 +3333,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3290
3333
|
const redirectResponse = response;
|
|
3291
3334
|
try {
|
|
3292
3335
|
const metadataRoute = matchAppMetadataRoute(requestPathname);
|
|
3293
|
-
const kind = metadataRoute ? "asset" :
|
|
3336
|
+
const kind = metadataRoute ? "asset" : _chunk5P3TZGS3cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
|
|
3294
3337
|
response = await pm.runRuntimeRequest(
|
|
3295
3338
|
createRequestFromNodeRequest(req, parsedRequestUrl),
|
|
3296
3339
|
async () => {
|
|
@@ -3305,13 +3348,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3305
3348
|
return;
|
|
3306
3349
|
}
|
|
3307
3350
|
}
|
|
3308
|
-
await
|
|
3351
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3309
3352
|
logResponse(requestMethod, requestUrl, res.statusCode, 0, "PAGE");
|
|
3310
3353
|
return;
|
|
3311
3354
|
}
|
|
3312
3355
|
}
|
|
3313
3356
|
const runAppMiddlewareForContentRoute = async () => {
|
|
3314
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
3357
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _224 => _224.hasMiddleware, 'call', _225 => _225()])) return false;
|
|
3315
3358
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
3316
3359
|
return runFarmMiddlewareWithNavigation(
|
|
3317
3360
|
farmApp.getServerRenderer(),
|
|
@@ -3345,11 +3388,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3345
3388
|
return 500;
|
|
3346
3389
|
}
|
|
3347
3390
|
}
|
|
3348
|
-
await
|
|
3391
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3349
3392
|
return response.status;
|
|
3350
3393
|
};
|
|
3351
3394
|
const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
|
|
3352
|
-
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess',
|
|
3395
|
+
const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _226 => _226.hasRuntimeHook, 'call', _227 => _227("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _228 => _228.hasMiddleware, 'call', _229 => _229()]) ? interceptFarmDevPageResponse({
|
|
3353
3396
|
req,
|
|
3354
3397
|
res,
|
|
3355
3398
|
pm,
|
|
@@ -3362,7 +3405,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3362
3405
|
urlPath: requestUrl,
|
|
3363
3406
|
pathname: requestPathname,
|
|
3364
3407
|
startTime: Date.now(),
|
|
3365
|
-
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall',
|
|
3408
|
+
logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _230 => _230(status)]),
|
|
3366
3409
|
// The runtime reports a runtime.after failure itself.
|
|
3367
3410
|
emitError: async () => {
|
|
3368
3411
|
},
|
|
@@ -3373,7 +3416,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3373
3416
|
handled = await runAppMiddlewareForContentRoute();
|
|
3374
3417
|
} catch (error) {
|
|
3375
3418
|
if (runtimeHookErrorAnswersJSON || res.headersSent) {
|
|
3376
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3419
|
+
_optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
|
|
3377
3420
|
throw error;
|
|
3378
3421
|
}
|
|
3379
3422
|
if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
|
|
@@ -3381,10 +3424,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3381
3424
|
return true;
|
|
3382
3425
|
}
|
|
3383
3426
|
if (!handled) {
|
|
3384
|
-
_optionalChain([interceptor, 'optionalAccess',
|
|
3427
|
+
_optionalChain([interceptor, 'optionalAccess', _233 => _233.release, 'call', _234 => _234()]);
|
|
3385
3428
|
return false;
|
|
3386
3429
|
}
|
|
3387
|
-
if (!_optionalChain([interceptor, 'optionalAccess',
|
|
3430
|
+
if (!_optionalChain([interceptor, 'optionalAccess', _235 => _235.isEnded, 'call', _236 => _236()])) _optionalChain([logResponse2, 'optionalCall', _237 => _237(res.statusCode || 200)]);
|
|
3388
3431
|
return true;
|
|
3389
3432
|
};
|
|
3390
3433
|
const serveBuiltInRoute = async (respond, {
|
|
@@ -3393,7 +3436,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3393
3436
|
label
|
|
3394
3437
|
} = {}) => {
|
|
3395
3438
|
const discard = async () => {
|
|
3396
|
-
await _optionalChain([computed, 'optionalAccess',
|
|
3439
|
+
await _optionalChain([computed, 'optionalAccess', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240(), 'access', _241 => _241.catch, 'call', _242 => _242(() => {
|
|
3397
3440
|
})]);
|
|
3398
3441
|
};
|
|
3399
3442
|
const sendRuntimeResponse = async (runtimeSession3, response2) => {
|
|
@@ -3404,15 +3447,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3404
3447
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3405
3448
|
return;
|
|
3406
3449
|
}
|
|
3407
|
-
await
|
|
3450
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, runtimeResponse);
|
|
3408
3451
|
};
|
|
3409
3452
|
let runtimeSession2;
|
|
3410
3453
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3411
3454
|
try {
|
|
3412
|
-
const routePathname =
|
|
3413
|
-
const route =
|
|
3455
|
+
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3456
|
+
const route = _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
|
|
3414
3457
|
{ pathname: requestPathname },
|
|
3415
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3458
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkC4DZAEVTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3416
3459
|
);
|
|
3417
3460
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3418
3461
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3450,11 +3493,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3450
3493
|
}
|
|
3451
3494
|
responding = true;
|
|
3452
3495
|
response = await respond(
|
|
3453
|
-
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess',
|
|
3496
|
+
_nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _243 => _243.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
|
|
3454
3497
|
);
|
|
3455
3498
|
} catch (error) {
|
|
3456
3499
|
if (!responding && !res.headersSent) {
|
|
3457
|
-
|
|
3500
|
+
_chunk7ZDLE77Pcjs.logger.error(`Middleware error: ${error}`);
|
|
3458
3501
|
await discard();
|
|
3459
3502
|
await sendMiddlewareErrorJSON(runtimeSession2, error);
|
|
3460
3503
|
return;
|
|
@@ -3467,10 +3510,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3467
3510
|
}
|
|
3468
3511
|
if (!response) return;
|
|
3469
3512
|
if (runtimeSession2) await sendRuntimeResponse(runtimeSession2, response);
|
|
3470
|
-
else await
|
|
3513
|
+
else await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3471
3514
|
};
|
|
3472
|
-
const openAPIRequestPathname = openAPIManager ?
|
|
3473
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
3515
|
+
const openAPIRequestPathname = openAPIManager ? _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
3516
|
+
if (openAPIManager && _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
3474
3517
|
const specManager = openAPIManager;
|
|
3475
3518
|
await serveBuiltInRoute(async () => {
|
|
3476
3519
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
@@ -3490,7 +3533,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3490
3533
|
});
|
|
3491
3534
|
return;
|
|
3492
3535
|
}
|
|
3493
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
3536
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _246 => _246.openapi, 'optionalAccess', _247 => _247.route])) {
|
|
3494
3537
|
const docsManager = openAPIManager;
|
|
3495
3538
|
await serveBuiltInRoute(
|
|
3496
3539
|
async () => {
|
|
@@ -3501,8 +3544,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3501
3544
|
);
|
|
3502
3545
|
return;
|
|
3503
3546
|
}
|
|
3504
|
-
if (_optionalChain([options, 'access',
|
|
3505
|
-
const manifestGuardCoversPath = (path7) =>
|
|
3547
|
+
if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false && _chunkC4DZAEVTcjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3548
|
+
const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3506
3549
|
{
|
|
3507
3550
|
config: farmConfig,
|
|
3508
3551
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -3511,25 +3554,25 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3511
3554
|
apiServerBasePath
|
|
3512
3555
|
);
|
|
3513
3556
|
await serveBuiltInRoute(async () => {
|
|
3514
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3515
|
-
const manifest = await
|
|
3557
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkUBH2OARScjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3558
|
+
const manifest = await _chunkC4DZAEVTcjs.createFarmAppManifestResponse.call(void 0,
|
|
3516
3559
|
new Request(parsedRequestUrl, {
|
|
3517
3560
|
method: requestMethod,
|
|
3518
3561
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3519
3562
|
}),
|
|
3520
3563
|
{
|
|
3521
|
-
...
|
|
3564
|
+
..._chunkC4DZAEVTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3522
3565
|
build: "development",
|
|
3523
3566
|
packages: farmAppPackages,
|
|
3524
3567
|
// Read again on each request; unchanged files come from a cache.
|
|
3525
|
-
webmcpTools: _optionalChain([farmConfig, 'access',
|
|
3568
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ? _chunkUBH2OARScjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3526
3569
|
}),
|
|
3527
3570
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3528
3571
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
3529
3572
|
guardCoversPath: manifestGuardCoversPath,
|
|
3530
3573
|
// A docs runtime's MCP server lists its tools when asked, read on each request.
|
|
3531
3574
|
...farmDocsHandler ? {
|
|
3532
|
-
registeredMCP: (request) =>
|
|
3575
|
+
registeredMCP: (request) => _chunkW4KSV6GXcjs._listFarmRegisteredMCPServerTools.call(void 0, farmDocsHandler, request, {
|
|
3533
3576
|
basePath: farmConfig.basePath,
|
|
3534
3577
|
guardCoversPath: manifestGuardCoversPath
|
|
3535
3578
|
})
|
|
@@ -3540,11 +3583,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3540
3583
|
});
|
|
3541
3584
|
return;
|
|
3542
3585
|
}
|
|
3543
|
-
if (_optionalChain([options, 'access',
|
|
3586
|
+
if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkC4DZAEVTcjs.FARM_API_CATALOG_PATH) {
|
|
3544
3587
|
await serveBuiltInRoute(
|
|
3545
|
-
() =>
|
|
3588
|
+
() => _chunkC4DZAEVTcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3546
3589
|
requestMethod,
|
|
3547
|
-
|
|
3590
|
+
_chunkC4DZAEVTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3548
3591
|
new Request(parsedRequestUrl, {
|
|
3549
3592
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3550
3593
|
})
|
|
@@ -3552,8 +3595,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3552
3595
|
);
|
|
3553
3596
|
return;
|
|
3554
3597
|
}
|
|
3555
|
-
if (_optionalChain([options, 'access',
|
|
3556
|
-
const aiCatalog =
|
|
3598
|
+
if (_optionalChain([options, 'access', _255 => _255.agent, 'optionalAccess', _256 => _256.aiCatalog]) !== false) {
|
|
3599
|
+
const aiCatalog = _chunkC4DZAEVTcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3557
3600
|
new Request(parsedRequestUrl, {
|
|
3558
3601
|
method: requestMethod,
|
|
3559
3602
|
headers: {
|
|
@@ -3593,15 +3636,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3593
3636
|
method: requestMethod,
|
|
3594
3637
|
headers: docsHeaders
|
|
3595
3638
|
});
|
|
3596
|
-
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body:
|
|
3639
|
+
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
|
|
3597
3640
|
const docsHandlerRequest = new Request(docsRequest, docsBodyInit);
|
|
3598
|
-
const registeredMCPCalls = await
|
|
3641
|
+
const registeredMCPCalls = await _chunkW4KSV6GXcjs._readFarmRegisteredMCPCalls.call(void 0,
|
|
3599
3642
|
docsHandlerRequest,
|
|
3600
3643
|
farmConfig.basePath
|
|
3601
3644
|
);
|
|
3602
3645
|
const docsResponse = await farmDocsHandler(docsHandlerRequest);
|
|
3603
3646
|
if (docsResponse) {
|
|
3604
|
-
const docsPage = _optionalChain([docsResponse, 'access',
|
|
3647
|
+
const docsPage = _optionalChain([docsResponse, 'access', _257 => _257.headers, 'access', _258 => _258.get, 'call', _259 => _259("content-type"), 'optionalAccess', _260 => _260.toLowerCase, 'call', _261 => _261(), 'access', _262 => _262.includes, 'call', _263 => _263("text/html")]);
|
|
3605
3648
|
await serveBuiltInRoute(
|
|
3606
3649
|
async (request) => {
|
|
3607
3650
|
if (!docsPage) {
|
|
@@ -3609,37 +3652,42 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3609
3652
|
docsRequest,
|
|
3610
3653
|
docsResponse
|
|
3611
3654
|
);
|
|
3612
|
-
return
|
|
3655
|
+
return _chunkIBZW57NWcjs._runWithCurrentRequest.call(void 0,
|
|
3613
3656
|
request,
|
|
3614
|
-
() =>
|
|
3657
|
+
() => _chunkW4KSV6GXcjs._observeFarmRegisteredMCPResponse.call(void 0, response, registeredMCPCalls)
|
|
3615
3658
|
);
|
|
3616
3659
|
}
|
|
3617
|
-
const deploymentMismatch =
|
|
3660
|
+
const deploymentMismatch = _chunkVIDUNAQEcjs.getFarmDeploymentMismatch.call(void 0,
|
|
3618
3661
|
request,
|
|
3619
3662
|
farmConfig.deploymentId
|
|
3620
3663
|
);
|
|
3621
3664
|
if (deploymentMismatch) {
|
|
3622
|
-
await _optionalChain([docsResponse, 'access',
|
|
3623
|
-
return
|
|
3665
|
+
await _optionalChain([docsResponse, 'access', _264 => _264.body, 'optionalAccess', _265 => _265.cancel, 'call', _266 => _266()]);
|
|
3666
|
+
return _chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
|
|
3624
3667
|
}
|
|
3625
|
-
|
|
3668
|
+
const page = _chunkSWOJU7LIcjs._withFarmResponseHeaders.call(void 0,
|
|
3626
3669
|
await wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse),
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3670
|
+
(headers) => {
|
|
3671
|
+
const vary = (_nullishCoalesce(headers.get("Vary"), () => ( ""))).split(",").map((value) => value.trim()).filter(Boolean);
|
|
3672
|
+
if (!vary.some((value) => value.toLowerCase() === "accept")) {
|
|
3673
|
+
headers.set("Vary", [...vary, "Accept"].join(", "));
|
|
3674
|
+
}
|
|
3632
3675
|
}
|
|
3633
3676
|
);
|
|
3677
|
+
return _chunkVIDUNAQEcjs.withFarmDeploymentResponse.call(void 0, page, farmConfig.deploymentId, {
|
|
3678
|
+
setCookie: request.method.toUpperCase() === "GET",
|
|
3679
|
+
cookiePath: farmConfig.basePath || "/",
|
|
3680
|
+
secureCookie: new URL(request.url).protocol === "https:"
|
|
3681
|
+
});
|
|
3634
3682
|
},
|
|
3635
3683
|
{
|
|
3636
3684
|
kind: "docs",
|
|
3637
3685
|
computed: docsResponse,
|
|
3638
|
-
label:
|
|
3639
|
-
|
|
3686
|
+
label: _chunkC4DZAEVTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3687
|
+
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3640
3688
|
{
|
|
3641
|
-
path: _optionalChain([farmConfig, 'access',
|
|
3642
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
3689
|
+
path: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.entry]) || "/docs",
|
|
3690
|
+
roots: _optionalChain([farmConfig, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.roots, 'optionalAccess', _271 => _271.map, 'call', _272 => _272((root) => root.entry)]),
|
|
3643
3691
|
pages: await getFarmDocsPagePaths()
|
|
3644
3692
|
}
|
|
3645
3693
|
)
|
|
@@ -3648,9 +3696,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3648
3696
|
return;
|
|
3649
3697
|
}
|
|
3650
3698
|
}
|
|
3651
|
-
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access',
|
|
3652
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
3653
|
-
const treeBodyInit = requestMethod === "POST" ? { body:
|
|
3699
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _273 => _273.headers, 'access', _274 => _274.accept, 'optionalAccess', _275 => _275.includes, 'call', _276 => _276(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
3700
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-PHCV43W4.cjs");
|
|
3701
|
+
const treeBodyInit = requestMethod === "POST" ? { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
|
|
3654
3702
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
3655
3703
|
request: new Request(fullUrl, {
|
|
3656
3704
|
method: requestMethod,
|
|
@@ -3658,26 +3706,26 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3658
3706
|
...treeBodyInit
|
|
3659
3707
|
}),
|
|
3660
3708
|
// As for the Markdown mirror: this server's own listener, redirects not followed.
|
|
3661
|
-
renderPage: (request) =>
|
|
3709
|
+
renderPage: (request) => _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3662
3710
|
new Request(request, {
|
|
3663
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3711
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3664
3712
|
})
|
|
3665
3713
|
)
|
|
3666
3714
|
});
|
|
3667
3715
|
await serveBuiltInRoute(() => treeResponse, {
|
|
3668
3716
|
computed: treeResponse,
|
|
3669
|
-
label: _nullishCoalesce(_optionalChain([farmApp, 'access',
|
|
3717
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern]), () => ( null))
|
|
3670
3718
|
});
|
|
3671
3719
|
return;
|
|
3672
3720
|
}
|
|
3673
3721
|
const markdownRouteLabel = () => (
|
|
3674
3722
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3675
|
-
|
|
3723
|
+
_chunkC4DZAEVTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3676
3724
|
toRoutePathname(requestPathname),
|
|
3677
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
3725
|
+
(page) => _optionalChain([farmApp, 'access', _283 => _283.getRouteManager, 'call', _284 => _284(), 'access', _285 => _285.matchRoute, 'call', _286 => _286(page), 'access', _287 => _287.route, 'optionalAccess', _288 => _288.pattern])
|
|
3678
3726
|
)
|
|
3679
3727
|
);
|
|
3680
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
3728
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunk27IPPPCVcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
3681
3729
|
request: new Request(fullUrl, {
|
|
3682
3730
|
method: requestMethod,
|
|
3683
3731
|
headers: docsHeaders
|
|
@@ -3686,28 +3734,28 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3686
3734
|
routePathname: toRoutePathname,
|
|
3687
3735
|
resolveSource: async (pathname2) => {
|
|
3688
3736
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
3689
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
3737
|
+
const sourcePath = _optionalChain([match, 'access', _289 => _289.route, 'optionalAccess', _290 => _290.markdownSourcePath]) || (match.route && _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
3690
3738
|
if (!sourcePath) {
|
|
3691
3739
|
return null;
|
|
3692
3740
|
}
|
|
3693
3741
|
return {
|
|
3694
3742
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3695
3743
|
// Project-relative, as production sends it: never the machine's path.
|
|
3696
|
-
filePath:
|
|
3744
|
+
filePath: _chunkUBH2OARScjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3697
3745
|
};
|
|
3698
3746
|
},
|
|
3699
3747
|
// The anonymous check goes through this server, so its guards and
|
|
3700
3748
|
// middleware see the page's own path, as in production. It connects to
|
|
3701
3749
|
// this server's own listener, never the host the caller's Host names. The
|
|
3702
3750
|
// page is asked for at the URL it answers at, not through the trailing-slash 308.
|
|
3703
|
-
renderPage: async (request) =>
|
|
3751
|
+
renderPage: async (request) => _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3704
3752
|
new Request(
|
|
3705
|
-
|
|
3753
|
+
_chunk6FIY4KBCcjs.toFarmTrailingSlashPageRequest.call(void 0,
|
|
3706
3754
|
request,
|
|
3707
3755
|
farmApp.getConfig().trailingSlash === true
|
|
3708
3756
|
),
|
|
3709
3757
|
{
|
|
3710
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3758
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3711
3759
|
}
|
|
3712
3760
|
)
|
|
3713
3761
|
)
|
|
@@ -3719,7 +3767,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3719
3767
|
});
|
|
3720
3768
|
return;
|
|
3721
3769
|
}
|
|
3722
|
-
const markdownResponse = viteModuleRequest ? null : await
|
|
3770
|
+
const markdownResponse = viteModuleRequest ? null : await _chunkU2HFXURZcjs.createMarkdownMirrorResponse.call(void 0, {
|
|
3723
3771
|
request: new Request(fullUrl, {
|
|
3724
3772
|
method: requestMethod,
|
|
3725
3773
|
headers: docsHeaders
|
|
@@ -3734,9 +3782,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3734
3782
|
renderPage: async (request) => {
|
|
3735
3783
|
const headers = new Headers(request.headers);
|
|
3736
3784
|
headers.delete("accept-encoding");
|
|
3737
|
-
return
|
|
3785
|
+
return _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3738
3786
|
new Request(
|
|
3739
|
-
|
|
3787
|
+
_chunk6FIY4KBCcjs.toFarmTrailingSlashPageRequest.call(void 0,
|
|
3740
3788
|
request,
|
|
3741
3789
|
farmApp.getConfig().trailingSlash === true
|
|
3742
3790
|
),
|
|
@@ -3744,7 +3792,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3744
3792
|
headers,
|
|
3745
3793
|
// Only accepted mirrors need disconnect listeners. An earlier
|
|
3746
3794
|
// close (for example while the docs handler ran) must also abort.
|
|
3747
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3795
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3748
3796
|
}
|
|
3749
3797
|
)
|
|
3750
3798
|
);
|
|
@@ -3758,16 +3806,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3758
3806
|
});
|
|
3759
3807
|
return;
|
|
3760
3808
|
}
|
|
3761
|
-
if (!viteModuleRequest &&
|
|
3762
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
3809
|
+
if (!viteModuleRequest && _chunkU2HFXURZcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
3810
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunk27IPPPCVcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
|
|
3763
3811
|
if (!markdownRoute.route) {
|
|
3764
3812
|
await serveBuiltInRoute(
|
|
3765
3813
|
() => new Response(
|
|
3766
|
-
|
|
3814
|
+
_chunkU2HFXURZcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
|
|
3767
3815
|
{
|
|
3768
3816
|
status: 404,
|
|
3769
3817
|
headers: {
|
|
3770
|
-
"Content-Type":
|
|
3818
|
+
"Content-Type": _chunkU2HFXURZcjs.FARM_MARKDOWN_CONTENT_TYPE,
|
|
3771
3819
|
"X-Farm-Markdown-Error": "404",
|
|
3772
3820
|
"Cache-Control": "no-store"
|
|
3773
3821
|
}
|
|
@@ -3777,7 +3825,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3777
3825
|
return;
|
|
3778
3826
|
}
|
|
3779
3827
|
}
|
|
3780
|
-
const markdownPageTarget =
|
|
3828
|
+
const markdownPageTarget = _chunkU2HFXURZcjs.resolveMarkdownMirrorTarget.call(void 0,
|
|
3781
3829
|
farmApp.getConfig().md,
|
|
3782
3830
|
requestPathname,
|
|
3783
3831
|
{
|
|
@@ -3802,15 +3850,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3802
3850
|
let workflowBody;
|
|
3803
3851
|
try {
|
|
3804
3852
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
3805
|
-
workflowBody = await
|
|
3853
|
+
workflowBody = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0,
|
|
3806
3854
|
req,
|
|
3807
3855
|
currentServerConfig.bodySizeLimit
|
|
3808
3856
|
);
|
|
3809
3857
|
}
|
|
3810
3858
|
} catch (error) {
|
|
3811
|
-
const response =
|
|
3859
|
+
const response = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3812
3860
|
if (!response) throw error;
|
|
3813
|
-
await
|
|
3861
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3814
3862
|
return;
|
|
3815
3863
|
}
|
|
3816
3864
|
const workflowResponse = await workflowHandler(
|
|
@@ -3818,17 +3866,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3818
3866
|
method: requestMethod,
|
|
3819
3867
|
headers: docsHeaders,
|
|
3820
3868
|
body: toRequestBody(workflowBody),
|
|
3821
|
-
signal:
|
|
3869
|
+
signal: _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3822
3870
|
})
|
|
3823
3871
|
);
|
|
3824
3872
|
if (workflowResponse) {
|
|
3825
|
-
await
|
|
3873
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, workflowResponse);
|
|
3826
3874
|
return;
|
|
3827
3875
|
}
|
|
3828
3876
|
}
|
|
3829
3877
|
const configuredIntegrations = currentConfig.integrations;
|
|
3830
3878
|
const tryConfiguredIntegrationRoute = async () => {
|
|
3831
|
-
const matchedRoute =
|
|
3879
|
+
const matchedRoute = _chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3832
3880
|
pathname: requestPathname,
|
|
3833
3881
|
method: requestMethod
|
|
3834
3882
|
});
|
|
@@ -3842,8 +3890,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3842
3890
|
await pm.runHookParallelFiltered(
|
|
3843
3891
|
"beforeRequest",
|
|
3844
3892
|
(plugin2) => {
|
|
3845
|
-
const owner =
|
|
3846
|
-
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess',
|
|
3893
|
+
const owner = _chunkN4AM7Q34cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3894
|
+
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _291 => _291.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3847
3895
|
},
|
|
3848
3896
|
req,
|
|
3849
3897
|
res
|
|
@@ -3862,17 +3910,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3862
3910
|
}
|
|
3863
3911
|
let body;
|
|
3864
3912
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
3865
|
-
body = await
|
|
3913
|
+
body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
3866
3914
|
}
|
|
3867
3915
|
const integrationRequest = new Request(fullUrl, {
|
|
3868
3916
|
method: req.method,
|
|
3869
3917
|
headers,
|
|
3870
3918
|
body: toRequestBody(body),
|
|
3871
|
-
signal:
|
|
3919
|
+
signal: _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3872
3920
|
});
|
|
3873
3921
|
const dispatchIntegration = async (request, runtime) => {
|
|
3874
3922
|
try {
|
|
3875
|
-
const result = await
|
|
3923
|
+
const result = await _chunkN4AM7Q34cjs.dispatchIntegrationRequest.call(void 0,
|
|
3876
3924
|
{
|
|
3877
3925
|
integration: matchedRoute.integration,
|
|
3878
3926
|
config: currentConfig,
|
|
@@ -3880,16 +3928,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3880
3928
|
isProd: false
|
|
3881
3929
|
},
|
|
3882
3930
|
request,
|
|
3883
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
3931
|
+
{ clientAddress: _optionalChain([req, 'access', _292 => _292.socket, 'optionalAccess', _293 => _293.remoteAddress]) }
|
|
3884
3932
|
);
|
|
3885
3933
|
if (!result) {
|
|
3886
3934
|
throw new Error(`Matched integration route did not return a response`);
|
|
3887
3935
|
}
|
|
3888
3936
|
return result;
|
|
3889
3937
|
} catch (error) {
|
|
3890
|
-
|
|
3891
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
3892
|
-
return
|
|
3938
|
+
_chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
|
|
3939
|
+
await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
|
|
3940
|
+
return _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3893
3941
|
}
|
|
3894
3942
|
};
|
|
3895
3943
|
runtimeReportsErrors = Boolean(pm);
|
|
@@ -3905,12 +3953,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3905
3953
|
}
|
|
3906
3954
|
const duration = Date.now() - startTime2;
|
|
3907
3955
|
logResponse(requestMethod, requestUrl, response.status, duration, "API");
|
|
3908
|
-
await
|
|
3956
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3909
3957
|
return true;
|
|
3910
3958
|
} catch (error) {
|
|
3911
|
-
const bodyErrorResponse =
|
|
3959
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3912
3960
|
if (bodyErrorResponse) {
|
|
3913
|
-
await
|
|
3961
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
3914
3962
|
return true;
|
|
3915
3963
|
}
|
|
3916
3964
|
const duration = Date.now() - startTime2;
|
|
@@ -3923,32 +3971,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3923
3971
|
integration: matchedRoute.key
|
|
3924
3972
|
});
|
|
3925
3973
|
}
|
|
3926
|
-
|
|
3974
|
+
_chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
|
|
3927
3975
|
if (runtimeReportsErrors) {
|
|
3928
3976
|
if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3929
3977
|
else if (!res.writableEnded) res.end();
|
|
3930
3978
|
} else if (!res.writableEnded) {
|
|
3931
3979
|
res.statusCode = 500;
|
|
3932
3980
|
res.setHeader("Content-Type", "application/json");
|
|
3933
|
-
res.end(
|
|
3981
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
3934
3982
|
}
|
|
3935
3983
|
return true;
|
|
3936
3984
|
}
|
|
3937
3985
|
};
|
|
3938
|
-
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(
|
|
3986
|
+
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(_chunkQBMMQS25cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME)) {
|
|
3939
3987
|
const hasLocalDevRoute = () => {
|
|
3940
3988
|
const routeManager3 = farmApp.getRouteManager();
|
|
3941
3989
|
return Boolean(
|
|
3942
|
-
|
|
3990
|
+
_chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3943
3991
|
pathname: requestPathname,
|
|
3944
3992
|
method: requestMethod
|
|
3945
|
-
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
3993
|
+
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
3946
3994
|
);
|
|
3947
3995
|
};
|
|
3948
3996
|
try {
|
|
3949
3997
|
await pm.runHookParallelFiltered(
|
|
3950
3998
|
"beforeRequest",
|
|
3951
|
-
(plugin2) => plugin2.name ===
|
|
3999
|
+
(plugin2) => plugin2.name === _chunkQBMMQS25cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
3952
4000
|
req,
|
|
3953
4001
|
res
|
|
3954
4002
|
);
|
|
@@ -3976,11 +4024,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3976
4024
|
}
|
|
3977
4025
|
const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
|
|
3978
4026
|
const hasMatchedApiRoute = Boolean(matchedApiRoute);
|
|
3979
|
-
if (hasMatchedApiRoute ||
|
|
4027
|
+
if (hasMatchedApiRoute || _chunk5P3TZGS3cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
|
|
3980
4028
|
const startTime2 = Date.now();
|
|
3981
4029
|
const method2 = req.method || "GET";
|
|
3982
4030
|
const urlPath2 = req.url || "/";
|
|
3983
|
-
const pathname2 =
|
|
4031
|
+
const pathname2 = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3984
4032
|
trustProxy: currentServerConfig.trustProxy
|
|
3985
4033
|
}).pathname;
|
|
3986
4034
|
try {
|
|
@@ -4002,10 +4050,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4002
4050
|
urlPath: urlPath2,
|
|
4003
4051
|
method: method2
|
|
4004
4052
|
});
|
|
4005
|
-
|
|
4053
|
+
_chunk7ZDLE77Pcjs.logger.error(`Request hook error: ${error}`);
|
|
4006
4054
|
res.statusCode = 500;
|
|
4007
4055
|
res.setHeader("Content-Type", "application/json");
|
|
4008
|
-
res.end(
|
|
4056
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
4009
4057
|
return;
|
|
4010
4058
|
}
|
|
4011
4059
|
const createAPIRequest = async () => {
|
|
@@ -4017,30 +4065,30 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4017
4065
|
}
|
|
4018
4066
|
let body;
|
|
4019
4067
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
4020
|
-
body = await
|
|
4068
|
+
body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
4021
4069
|
}
|
|
4022
4070
|
return new Request(
|
|
4023
|
-
|
|
4071
|
+
_chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4024
4072
|
trustProxy: currentServerConfig.trustProxy
|
|
4025
4073
|
}),
|
|
4026
4074
|
{
|
|
4027
4075
|
method: req.method,
|
|
4028
4076
|
headers,
|
|
4029
4077
|
body: toRequestBody(body),
|
|
4030
|
-
signal:
|
|
4078
|
+
signal: _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
4031
4079
|
}
|
|
4032
4080
|
);
|
|
4033
4081
|
};
|
|
4034
4082
|
const isDocsAPIRequest = Boolean(
|
|
4035
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
4083
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _298 => _298.isFarmDocsAPIRequest, 'call', _299 => _299(pathname2)])
|
|
4036
4084
|
);
|
|
4037
4085
|
const docsRuntimeOptions = () => ({
|
|
4038
4086
|
kind: "docs",
|
|
4039
|
-
route:
|
|
4087
|
+
route: _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
|
|
4040
4088
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4041
|
-
|
|
4042
|
-
path: _optionalChain([farmConfig, 'access',
|
|
4043
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
4089
|
+
_chunkC4DZAEVTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4090
|
+
path: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.entry]) || "/docs",
|
|
4091
|
+
roots: _optionalChain([farmConfig, 'access', _302 => _302.docs, 'optionalAccess', _303 => _303.roots, 'optionalAccess', _304 => _304.map, 'call', _305 => _305((root) => root.entry)])
|
|
4044
4092
|
})
|
|
4045
4093
|
)
|
|
4046
4094
|
});
|
|
@@ -4061,11 +4109,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4061
4109
|
runtimeSession2.response
|
|
4062
4110
|
);
|
|
4063
4111
|
logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
|
|
4064
|
-
await
|
|
4112
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
4065
4113
|
return;
|
|
4066
4114
|
}
|
|
4067
4115
|
} catch (error) {
|
|
4068
|
-
const bodyErrorResponse =
|
|
4116
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4069
4117
|
if (bodyErrorResponse) {
|
|
4070
4118
|
logResponse(
|
|
4071
4119
|
method2,
|
|
@@ -4074,10 +4122,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4074
4122
|
Date.now() - startTime2,
|
|
4075
4123
|
"API"
|
|
4076
4124
|
);
|
|
4077
|
-
await
|
|
4125
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4078
4126
|
return;
|
|
4079
4127
|
}
|
|
4080
|
-
|
|
4128
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4081
4129
|
sendFarmDevRuntimeHookError(res, true);
|
|
4082
4130
|
return;
|
|
4083
4131
|
}
|
|
@@ -4097,7 +4145,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4097
4145
|
if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
|
|
4098
4146
|
throw error;
|
|
4099
4147
|
}
|
|
4100
|
-
|
|
4148
|
+
_chunk7ZDLE77Pcjs.logger.error(`Middleware error: ${error}`);
|
|
4101
4149
|
const status = await sendMiddlewareErrorJSON(runtimeSession2, error);
|
|
4102
4150
|
logResponse(method2, urlPath2, status, Date.now() - startTime2, "API");
|
|
4103
4151
|
return;
|
|
@@ -4115,20 +4163,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4115
4163
|
(_request, runtime) => handler(request, runtime)
|
|
4116
4164
|
) : pm ? pm.runRuntimeRequest(request, handler, options2) : handler(request);
|
|
4117
4165
|
const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
|
|
4118
|
-
const routedPathname =
|
|
4166
|
+
const routedPathname = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4119
4167
|
trustProxy: currentServerConfig.trustProxy
|
|
4120
4168
|
}).pathname;
|
|
4121
4169
|
const rewritten = routedPathname !== pathname2;
|
|
4122
4170
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
4123
4171
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
4124
4172
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
4125
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
4126
|
-
|
|
4173
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _306 => _306.route, 'access', _307 => _307.path]) || urlPath2;
|
|
4174
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4127
4175
|
type: "route.matched",
|
|
4128
4176
|
pathname: pathname2,
|
|
4129
4177
|
route: apiRoutePattern
|
|
4130
4178
|
});
|
|
4131
|
-
|
|
4179
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4132
4180
|
type: "api.request.start",
|
|
4133
4181
|
pathname: pathname2,
|
|
4134
4182
|
route: apiRoutePattern,
|
|
@@ -4153,7 +4201,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4153
4201
|
try {
|
|
4154
4202
|
response = await apiHandler(handledRequest);
|
|
4155
4203
|
apiOutcomeReported = true;
|
|
4156
|
-
|
|
4204
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4157
4205
|
type: "api.request.complete",
|
|
4158
4206
|
pathname: pathname2,
|
|
4159
4207
|
route: apiRoutePattern,
|
|
@@ -4163,7 +4211,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4163
4211
|
});
|
|
4164
4212
|
} catch (error) {
|
|
4165
4213
|
apiOutcomeReported = true;
|
|
4166
|
-
|
|
4214
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4167
4215
|
type: "api.error",
|
|
4168
4216
|
pathname: pathname2,
|
|
4169
4217
|
route: apiRoutePattern,
|
|
@@ -4171,9 +4219,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4171
4219
|
durationMs: Date.now() - startTime2,
|
|
4172
4220
|
error
|
|
4173
4221
|
});
|
|
4174
|
-
|
|
4175
|
-
await _optionalChain([runtime, 'optionalAccess',
|
|
4176
|
-
response =
|
|
4222
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4223
|
+
await _optionalChain([runtime, 'optionalAccess', _308 => _308.reportError, 'call', _309 => _309(error)]);
|
|
4224
|
+
response = _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
4177
4225
|
}
|
|
4178
4226
|
return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
|
|
4179
4227
|
};
|
|
@@ -4186,12 +4234,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4186
4234
|
});
|
|
4187
4235
|
const duration = Date.now() - startTime2;
|
|
4188
4236
|
logResponse(method2, urlPath2, handledResponse.status, duration, "API");
|
|
4189
|
-
await
|
|
4237
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, handledResponse);
|
|
4190
4238
|
return;
|
|
4191
4239
|
} catch (error) {
|
|
4192
4240
|
const duration = Date.now() - startTime2;
|
|
4193
4241
|
if (!apiOutcomeReported) {
|
|
4194
|
-
|
|
4242
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4195
4243
|
type: "api.error",
|
|
4196
4244
|
pathname: pathname2,
|
|
4197
4245
|
route: apiRoutePattern,
|
|
@@ -4200,13 +4248,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4200
4248
|
error
|
|
4201
4249
|
});
|
|
4202
4250
|
}
|
|
4203
|
-
const bodyErrorResponse =
|
|
4251
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4204
4252
|
if (bodyErrorResponse) {
|
|
4205
4253
|
logResponse(method2, urlPath2, bodyErrorResponse.status, duration, "API");
|
|
4206
|
-
await
|
|
4254
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4207
4255
|
return;
|
|
4208
4256
|
}
|
|
4209
|
-
|
|
4257
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4210
4258
|
sendFarmDevRuntimeHookError(res, true);
|
|
4211
4259
|
return;
|
|
4212
4260
|
}
|
|
@@ -4239,16 +4287,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4239
4287
|
if (docsResponse) {
|
|
4240
4288
|
const duration = Date.now() - startTime2;
|
|
4241
4289
|
logResponse(method2, urlPath2, docsResponse.status, duration, "API");
|
|
4242
|
-
await
|
|
4290
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, docsResponse);
|
|
4243
4291
|
return;
|
|
4244
4292
|
}
|
|
4245
4293
|
} catch (error) {
|
|
4246
|
-
const bodyErrorResponse =
|
|
4294
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4247
4295
|
if (bodyErrorResponse) {
|
|
4248
|
-
await
|
|
4296
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4249
4297
|
return;
|
|
4250
4298
|
}
|
|
4251
|
-
|
|
4299
|
+
_chunk7ZDLE77Pcjs.logger.error(`Docs API route error: ${error}`);
|
|
4252
4300
|
sendFarmDevRuntimeHookError(res, true);
|
|
4253
4301
|
return;
|
|
4254
4302
|
}
|
|
@@ -4270,19 +4318,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4270
4318
|
})
|
|
4271
4319
|
);
|
|
4272
4320
|
logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
|
|
4273
|
-
await
|
|
4321
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
4274
4322
|
} catch (error) {
|
|
4275
|
-
|
|
4323
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4276
4324
|
sendFarmDevRuntimeHookError(res, true);
|
|
4277
4325
|
}
|
|
4278
4326
|
return;
|
|
4279
4327
|
}
|
|
4280
|
-
if (_optionalChain([req, 'access',
|
|
4328
|
+
if (_optionalChain([req, 'access', _310 => _310.url, 'optionalAccess', _311 => _311.startsWith, 'call', _312 => _312("/@")]) || _optionalChain([req, 'access', _313 => _313.url, 'optionalAccess', _314 => _314.startsWith, 'call', _315 => _315("/node_modules")])) {
|
|
4281
4329
|
return next();
|
|
4282
4330
|
}
|
|
4283
4331
|
if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
|
|
4284
4332
|
requestPathname,
|
|
4285
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
4333
|
+
_optionalChain([farmApp, 'optionalAccess', _316 => _316.getRouteManager, 'call', _317 => _317()]),
|
|
4286
4334
|
[server.config.publicDir, server.config.root],
|
|
4287
4335
|
farmAgentGeneratedPaths(farmConfig),
|
|
4288
4336
|
requestMethod
|
|
@@ -4290,7 +4338,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4290
4338
|
if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
|
|
4291
4339
|
return next();
|
|
4292
4340
|
}
|
|
4293
|
-
if (_optionalChain([req, 'access',
|
|
4341
|
+
if (_optionalChain([req, 'access', _318 => _318.url, 'optionalAccess', _319 => _319.startsWith, 'call', _320 => _320("/__farm/page-data")])) {
|
|
4294
4342
|
const urlObj = parsedRequestUrl;
|
|
4295
4343
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
4296
4344
|
let renderedRequest;
|
|
@@ -4298,16 +4346,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4298
4346
|
const request = createRequestFromNodeRequest(
|
|
4299
4347
|
req,
|
|
4300
4348
|
urlObj,
|
|
4301
|
-
|
|
4349
|
+
_chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
4302
4350
|
);
|
|
4303
|
-
const deploymentMismatch =
|
|
4351
|
+
const deploymentMismatch = _chunkVIDUNAQEcjs.getFarmDeploymentMismatch.call(void 0,
|
|
4304
4352
|
request,
|
|
4305
4353
|
farmConfig.deploymentId
|
|
4306
4354
|
);
|
|
4307
4355
|
if (deploymentMismatch) {
|
|
4308
|
-
await
|
|
4356
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
|
|
4309
4357
|
res,
|
|
4310
|
-
|
|
4358
|
+
_chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch)
|
|
4311
4359
|
);
|
|
4312
4360
|
return;
|
|
4313
4361
|
}
|
|
@@ -4320,7 +4368,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4320
4368
|
renderedRequest = targetRequest;
|
|
4321
4369
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
4322
4370
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
4323
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4371
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _321 => _321.hasMiddleware, 'call', _322 => _322()])) {
|
|
4324
4372
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
4325
4373
|
const targetNodeResponse = createPageDataMiddlewareResponse(res);
|
|
4326
4374
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
@@ -4354,10 +4402,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4354
4402
|
if (pm) {
|
|
4355
4403
|
await pm.runHookParallel("afterRouteMatch", {
|
|
4356
4404
|
pathname: targetPath,
|
|
4357
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
4358
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
4359
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4360
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
4405
|
+
matched: !!_optionalChain([match, 'optionalAccess', _323 => _323.route]),
|
|
4406
|
+
routePattern: _optionalChain([match, 'optionalAccess', _324 => _324.route, 'optionalAccess', _325 => _325.pattern]) || null,
|
|
4407
|
+
params: _optionalChain([match, 'optionalAccess', _326 => _326.params]) || {},
|
|
4408
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _327 => _327.layouts]) || []).map((l) => l.pattern)
|
|
4361
4409
|
});
|
|
4362
4410
|
}
|
|
4363
4411
|
if (!match) {
|
|
@@ -4373,7 +4421,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4373
4421
|
res.end(JSON.stringify({ error: "Route not found" }));
|
|
4374
4422
|
return;
|
|
4375
4423
|
}
|
|
4376
|
-
const trailingSlashLocation =
|
|
4424
|
+
const trailingSlashLocation = _chunk6FIY4KBCcjs.resolveFarmTrailingSlashRedirect.call(void 0,
|
|
4377
4425
|
targetRequestUrl,
|
|
4378
4426
|
farmApp.getConfig().trailingSlash === true
|
|
4379
4427
|
);
|
|
@@ -4392,7 +4440,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4392
4440
|
);
|
|
4393
4441
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4394
4442
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4395
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4443
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4396
4444
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4397
4445
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4398
4446
|
let mergedMetadata = {};
|
|
@@ -4403,7 +4451,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4403
4451
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4404
4452
|
(entry) => entry.pattern === layout.pattern
|
|
4405
4453
|
), () => ( {
|
|
4406
|
-
...
|
|
4454
|
+
..._chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4407
4455
|
serverTree: false
|
|
4408
4456
|
}))
|
|
4409
4457
|
);
|
|
@@ -4416,35 +4464,35 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4416
4464
|
(metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
|
|
4417
4465
|
)
|
|
4418
4466
|
];
|
|
4419
|
-
const hydrationIslandStrategy =
|
|
4420
|
-
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
4421
|
-
) === "islands" ?
|
|
4467
|
+
const hydrationIslandStrategy = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4468
|
+
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options))), 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])
|
|
4469
|
+
) === "islands" ? _chunkUBH2OARScjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4422
4470
|
route,
|
|
4423
4471
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4424
4472
|
layouts.map((layout, index) => ({
|
|
4425
4473
|
pattern: layout.pattern,
|
|
4426
4474
|
modulePath: layout.modulePath,
|
|
4427
|
-
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4475
|
+
shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.shouldHydrate]) === true,
|
|
4428
4476
|
// Manifest entries carry it; metadata read from source does not.
|
|
4429
|
-
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4430
|
-
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access',
|
|
4477
|
+
hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _334 => _334[index], 'optionalAccess', _335 => _335.hasIsolatedClientBoundaries]) === true,
|
|
4478
|
+
islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _336 => _336[index], 'optionalAccess', _337 => _337.islandStrategy]), () => ( null))
|
|
4431
4479
|
})),
|
|
4432
4480
|
server.config.root,
|
|
4433
4481
|
true
|
|
4434
4482
|
) : hydrationStrategies.every((strategy) => strategy === hydrationStrategies[0]) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
|
|
4435
4483
|
const targetUrl = new URL(targetPath, "http://localhost");
|
|
4436
|
-
const searchParams =
|
|
4437
|
-
const routeContext = await
|
|
4484
|
+
const searchParams = _chunkK6LZMZNBcjs.searchParamsToObject.call(void 0, targetUrl.searchParams);
|
|
4485
|
+
const routeContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4438
4486
|
request: targetRequest,
|
|
4439
4487
|
params,
|
|
4440
4488
|
search: searchParams,
|
|
4441
4489
|
path: targetUrl.pathname
|
|
4442
4490
|
});
|
|
4443
4491
|
const routeProps = await parseRouteModuleProps(routeModule, {
|
|
4444
|
-
props:
|
|
4492
|
+
props: _chunkYZMSJRM5cjs.withFarmRouteContext.call(void 0,
|
|
4445
4493
|
{
|
|
4446
4494
|
params,
|
|
4447
|
-
searchParams:
|
|
4495
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, searchParams),
|
|
4448
4496
|
path: targetUrl.pathname,
|
|
4449
4497
|
middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
|
|
4450
4498
|
},
|
|
@@ -4454,28 +4502,28 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4454
4502
|
routePath: route.pattern
|
|
4455
4503
|
});
|
|
4456
4504
|
for (const layoutModule of layoutModules) {
|
|
4457
|
-
mergedMetadata =
|
|
4505
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0, mergedMetadata, layoutModule.metadata);
|
|
4458
4506
|
if (typeof layoutModule.generateMetadata === "function") {
|
|
4459
|
-
mergedMetadata =
|
|
4507
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0,
|
|
4460
4508
|
mergedMetadata,
|
|
4461
4509
|
await layoutModule.generateMetadata({ params: routeProps.params })
|
|
4462
4510
|
);
|
|
4463
4511
|
}
|
|
4464
|
-
mergedMetadata = await
|
|
4512
|
+
mergedMetadata = await _chunkO7B6LJWEcjs.mergeModuleViewport.call(void 0, mergedMetadata, layoutModule, {
|
|
4465
4513
|
params: routeProps.params
|
|
4466
4514
|
});
|
|
4467
4515
|
}
|
|
4468
|
-
mergedMetadata =
|
|
4516
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0, mergedMetadata, routeModule.metadata);
|
|
4469
4517
|
if (typeof routeModule.generateMetadata === "function") {
|
|
4470
|
-
mergedMetadata =
|
|
4518
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0,
|
|
4471
4519
|
mergedMetadata,
|
|
4472
4520
|
await routeModule.generateMetadata(routeProps)
|
|
4473
4521
|
);
|
|
4474
4522
|
}
|
|
4475
|
-
mergedMetadata = await
|
|
4476
|
-
mergedMetadata =
|
|
4523
|
+
mergedMetadata = await _chunkO7B6LJWEcjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
|
|
4524
|
+
mergedMetadata = _chunkO7B6LJWEcjs.addMetadataMarkdownAlternate.call(void 0,
|
|
4477
4525
|
mergedMetadata,
|
|
4478
|
-
|
|
4526
|
+
_chunkU2HFXURZcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
|
|
4479
4527
|
routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
|
|
4480
4528
|
})
|
|
4481
4529
|
);
|
|
@@ -4484,18 +4532,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4484
4532
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4485
4533
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4486
4534
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4487
|
-
), () => (
|
|
4488
|
-
const slotContext = await
|
|
4535
|
+
), () => ( _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4536
|
+
const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4489
4537
|
request: targetRequest,
|
|
4490
4538
|
params: slot.params,
|
|
4491
4539
|
search: searchParams,
|
|
4492
4540
|
path: targetUrl.pathname
|
|
4493
4541
|
});
|
|
4494
4542
|
const slotProps = await parseRouteModuleProps(slotModule, {
|
|
4495
|
-
props:
|
|
4543
|
+
props: _chunkYZMSJRM5cjs.withFarmRouteContext.call(void 0,
|
|
4496
4544
|
{
|
|
4497
4545
|
params: slot.params,
|
|
4498
|
-
searchParams:
|
|
4546
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, searchParams),
|
|
4499
4547
|
path: targetUrl.pathname
|
|
4500
4548
|
},
|
|
4501
4549
|
slotContext
|
|
@@ -4529,32 +4577,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4529
4577
|
})
|
|
4530
4578
|
);
|
|
4531
4579
|
const projectRoot = server.config.root;
|
|
4532
|
-
const toUrlPath = (absolutePath) =>
|
|
4533
|
-
const renderPlan =
|
|
4580
|
+
const toUrlPath = (absolutePath) => _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
4581
|
+
const renderPlan = _chunkIGBQSUT5cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
4534
4582
|
pageShouldHydrate: shouldHydrate,
|
|
4535
4583
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4536
4584
|
islandStrategy: hydrationIslandStrategy,
|
|
4537
|
-
rendering:
|
|
4585
|
+
rendering: _chunkKM7ZRKCHcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4538
4586
|
});
|
|
4539
4587
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4540
|
-
const layoutStartIndex =
|
|
4541
|
-
|
|
4588
|
+
const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
4589
|
+
_chunkIGBQSUT5cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
4542
4590
|
destinationLayoutPatterns
|
|
4543
4591
|
);
|
|
4544
4592
|
const renderer = farmApp.getServerRenderer();
|
|
4545
|
-
const fragmentHtml = await
|
|
4593
|
+
const fragmentHtml = await _chunkXZ6L3FUUcjs._runWithMiddlewareData.call(void 0,
|
|
4546
4594
|
middlewareMap,
|
|
4547
|
-
() =>
|
|
4595
|
+
() => _chunkXZ6L3FUUcjs._runWithMiddlewareContext.call(void 0,
|
|
4548
4596
|
middlewareContext,
|
|
4549
4597
|
() => renderer.renderNavigationFragment({
|
|
4550
4598
|
PageComponent: routeModule.default,
|
|
4551
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
4599
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _338 => _338.default]),
|
|
4552
4600
|
pageProps: routeProps,
|
|
4553
4601
|
params,
|
|
4554
4602
|
layouts: layouts.map((layout, index) => ({
|
|
4555
4603
|
pattern: layout.pattern,
|
|
4556
4604
|
module: layoutModules[index],
|
|
4557
|
-
serverTree: _optionalChain([layoutHydrationMetadata, 'access',
|
|
4605
|
+
serverTree: _optionalChain([layoutHydrationMetadata, 'access', _339 => _339[index], 'optionalAccess', _340 => _340.serverTree])
|
|
4558
4606
|
})),
|
|
4559
4607
|
layoutStartIndex,
|
|
4560
4608
|
slots: routeSlots.map((slot) => ({
|
|
@@ -4611,24 +4659,24 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4611
4659
|
from: interceptFromHeader,
|
|
4612
4660
|
slots: routeSlots.filter((slot) => slot.interception).map((slot) => slot.name)
|
|
4613
4661
|
} : void 0,
|
|
4614
|
-
i18n:
|
|
4662
|
+
i18n: _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, )
|
|
4615
4663
|
};
|
|
4616
|
-
await
|
|
4664
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
|
|
4617
4665
|
res,
|
|
4618
|
-
|
|
4666
|
+
_chunkZ2JQR56Wcjs.createDeferredDataResponse.call(void 0,
|
|
4619
4667
|
pageData,
|
|
4620
4668
|
{
|
|
4621
4669
|
status: 200,
|
|
4622
4670
|
headers: {
|
|
4623
|
-
"Cache-Control":
|
|
4671
|
+
"Cache-Control": _chunkIGBQSUT5cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
4624
4672
|
"X-Farm-Navigation": "html-fragment",
|
|
4625
4673
|
Vary: "X-Farm-Layout-Chain",
|
|
4626
|
-
[
|
|
4674
|
+
[_chunkVIDUNAQEcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
4627
4675
|
}
|
|
4628
4676
|
},
|
|
4629
4677
|
{
|
|
4630
4678
|
onError(error, id) {
|
|
4631
|
-
|
|
4679
|
+
_chunk7ZDLE77Pcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
|
|
4632
4680
|
}
|
|
4633
4681
|
}
|
|
4634
4682
|
)
|
|
@@ -4658,33 +4706,33 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4658
4706
|
const startTime = Date.now();
|
|
4659
4707
|
const method = req.method || "GET";
|
|
4660
4708
|
const urlPath = req.url || "/";
|
|
4661
|
-
const requestedPathname =
|
|
4709
|
+
const requestedPathname = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4662
4710
|
trustProxy: currentServerConfig.trustProxy
|
|
4663
4711
|
}).pathname;
|
|
4664
4712
|
const routeManager2 = farmApp.getRouteManager();
|
|
4665
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4666
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4667
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4713
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("beforeRequest")]), () => ( false));
|
|
4714
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("afterResponse")]), () => ( false));
|
|
4715
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasHook, 'call', _346 => _346("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _347 => _347.hasHook, 'call', _348 => _348("afterRender")]), () => ( false)));
|
|
4668
4716
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4669
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
4717
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _349 => _349.hasRuntimeHook, 'call', _350 => _350("after")]), () => ( false));
|
|
4670
4718
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4671
|
-
const routePathname =
|
|
4672
|
-
const mcpLabel =
|
|
4719
|
+
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4720
|
+
const mcpLabel = _chunkC4DZAEVTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4673
4721
|
if (mcpLabel) return mcpLabel;
|
|
4674
4722
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4675
|
-
return routePathname ===
|
|
4723
|
+
return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
4676
4724
|
};
|
|
4677
4725
|
const pageRuntimeOptions = (pathname2) => {
|
|
4678
4726
|
const match = routeManager2.matchRoute(pathname2);
|
|
4679
4727
|
return {
|
|
4680
4728
|
kind: "page",
|
|
4681
|
-
route:
|
|
4729
|
+
route: _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
|
|
4682
4730
|
{
|
|
4683
4731
|
pathname: pathname2,
|
|
4684
|
-
pattern: _optionalChain([match, 'optionalAccess',
|
|
4685
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
4732
|
+
pattern: _optionalChain([match, 'optionalAccess', _351 => _351.route, 'optionalAccess', _352 => _352.pattern]) || null,
|
|
4733
|
+
params: _optionalChain([match, 'optionalAccess', _353 => _353.params]) || {}
|
|
4686
4734
|
},
|
|
4687
|
-
_optionalChain([match, 'optionalAccess',
|
|
4735
|
+
_optionalChain([match, 'optionalAccess', _354 => _354.route]) ? null : pageBuiltInRouteLabel(pathname2)
|
|
4688
4736
|
)
|
|
4689
4737
|
};
|
|
4690
4738
|
};
|
|
@@ -4708,7 +4756,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4708
4756
|
))));
|
|
4709
4757
|
if (routedRequest instanceof Response) {
|
|
4710
4758
|
const response = await pm.endRuntimeRequest(runtimeSession, routedRequest);
|
|
4711
|
-
await
|
|
4759
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
4712
4760
|
return;
|
|
4713
4761
|
}
|
|
4714
4762
|
pm.copyRequestContext(routedRequest, req);
|
|
@@ -4764,7 +4812,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4764
4812
|
}) : void 0;
|
|
4765
4813
|
let middlewareFailed = false;
|
|
4766
4814
|
try {
|
|
4767
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
4815
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _355 => _355.hasMiddleware, 'call', _356 => _356()])) {
|
|
4768
4816
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
4769
4817
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
4770
4818
|
farmApp.getServerRenderer(),
|
|
@@ -4777,7 +4825,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4777
4825
|
throw error;
|
|
4778
4826
|
});
|
|
4779
4827
|
if (handled) {
|
|
4780
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4828
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
|
|
4781
4829
|
const duration = Date.now() - startTime;
|
|
4782
4830
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4783
4831
|
}
|
|
@@ -4792,8 +4840,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4792
4840
|
res
|
|
4793
4841
|
);
|
|
4794
4842
|
}
|
|
4795
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
4796
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4843
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
|
|
4844
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.isEnded, 'call', _362 => _362()])) {
|
|
4797
4845
|
const duration = Date.now() - startTime;
|
|
4798
4846
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
4799
4847
|
}
|
|
@@ -4812,8 +4860,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4812
4860
|
await pm.reportRuntimeRequestError(runtimeSession, error);
|
|
4813
4861
|
} else {
|
|
4814
4862
|
await pm.failRuntimeRequest(runtimeSession, error);
|
|
4815
|
-
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4816
|
-
_optionalChain([responseInterceptor, 'optionalAccess',
|
|
4863
|
+
if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _363 => _363.isEnded, 'call', _364 => _364()])) {
|
|
4864
|
+
_optionalChain([responseInterceptor, 'optionalAccess', _365 => _365.release, 'call', _366 => _366()]);
|
|
4817
4865
|
console.error("[FARM] Page error:", error);
|
|
4818
4866
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
4819
4867
|
return;
|
|
@@ -4830,7 +4878,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4830
4878
|
}
|
|
4831
4879
|
})
|
|
4832
4880
|
);
|
|
4833
|
-
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access',
|
|
4881
|
+
const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _367 => _367.stack, 'access', _368 => _368.at, 'call', _369 => _369(-1), 'optionalAccess', _370 => _370.handle]);
|
|
4834
4882
|
if (farmOwnsDevCors && viteServer.config.server.cors === false) {
|
|
4835
4883
|
farmMiddlewares.use(createFarmDevViteCorsMiddleware());
|
|
4836
4884
|
}
|
|
@@ -4844,7 +4892,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4844
4892
|
}
|
|
4845
4893
|
if (!rendererDisabled) return next();
|
|
4846
4894
|
const requested = _nullishCoalesce(_nullishCoalesce(req.originalUrl, () => ( req.url)), () => ( "/"));
|
|
4847
|
-
const pathname =
|
|
4895
|
+
const pathname = _chunkIBZW57NWcjs.parseFarmRequestTarget.call(void 0, requested, "http://localhost").pathname;
|
|
4848
4896
|
res.statusCode = 404;
|
|
4849
4897
|
res.setHeader("Content-Type", "application/json");
|
|
4850
4898
|
res.end(JSON.stringify({ error: "Not found", pathname }));
|
|
@@ -4859,7 +4907,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4859
4907
|
});
|
|
4860
4908
|
}
|
|
4861
4909
|
if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
|
|
4862
|
-
const root = _optionalChain([farmApp, 'optionalAccess',
|
|
4910
|
+
const root = _optionalChain([farmApp, 'optionalAccess', _371 => _371.getConfig, 'call', _372 => _372(), 'access', _373 => _373.root]) || _optionalChain([server, 'optionalAccess', _374 => _374.config, 'access', _375 => _375.root]) || options.root;
|
|
4863
4911
|
return this.resolve(id, path6.join(root, "package.json"), {
|
|
4864
4912
|
...resolveOptions,
|
|
4865
4913
|
skipSelf: true
|
|
@@ -4873,7 +4921,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4873
4921
|
const imageId = await imageImports.resolveId.call(this, id, importer, resolveOptions);
|
|
4874
4922
|
if (imageId) return imageId;
|
|
4875
4923
|
}
|
|
4876
|
-
if (
|
|
4924
|
+
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4877
4925
|
return id;
|
|
4878
4926
|
}
|
|
4879
4927
|
if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
|
|
@@ -4887,14 +4935,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4887
4935
|
}
|
|
4888
4936
|
},
|
|
4889
4937
|
async load(id, loadOptions) {
|
|
4890
|
-
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess',
|
|
4938
|
+
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _376 => _376.ssr]) && !farmSetupContext.getStore()) {
|
|
4891
4939
|
await pendingClientSetup;
|
|
4892
4940
|
}
|
|
4893
|
-
if (
|
|
4941
|
+
if (_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
4894
4942
|
const file = id.split("?", 1)[0];
|
|
4895
4943
|
this.addWatchFile(file);
|
|
4896
4944
|
const source = await fs2.promises.readFile(file, "utf8");
|
|
4897
|
-
return _nullishCoalesce(
|
|
4945
|
+
return _nullishCoalesce(_chunk7O3YJ6NPcjs.createFarmServerFnBoundaryModule.call(void 0, source, file), () => ( "export {};\n"));
|
|
4898
4946
|
}
|
|
4899
4947
|
if (typeof fontImports.load === "function") {
|
|
4900
4948
|
const fontModule = await fontImports.load.call(this, id);
|
|
@@ -4904,9 +4952,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4904
4952
|
const imageModule = await imageImports.load.call(this, id);
|
|
4905
4953
|
if (imageModule) return imageModule;
|
|
4906
4954
|
}
|
|
4907
|
-
if (
|
|
4908
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
4909
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
4955
|
+
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4956
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _377 => _377.getConfig, 'call', _378 => _378(), 'access', _379 => _379.renderer]) || _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4957
|
+
const root = _optionalChain([server, 'optionalAccess', _380 => _380.config, 'access', _381 => _381.root]) || options.root;
|
|
4910
4958
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4911
4959
|
return generateProgrammaticClientRouteModuleForId(
|
|
4912
4960
|
id,
|
|
@@ -4922,63 +4970,63 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4922
4970
|
return FARM_DEV_CLIENT_BOOT_MODULE;
|
|
4923
4971
|
}
|
|
4924
4972
|
if (isFarmClientVirtualId(id)) {
|
|
4925
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
4926
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4927
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4928
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4929
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
4930
|
-
const adapterOwnsDocsRuntime =
|
|
4931
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4973
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _382 => _382.getConfig, 'call', _383 => _383()]);
|
|
4974
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.renderer]) || _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4975
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.integrations]) || options.integrations;
|
|
4976
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.root]) || _optionalChain([server, 'optionalAccess', _387 => _387.config, 'access', _388 => _388.root]) || process.cwd();
|
|
4977
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.docs]);
|
|
4978
|
+
const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
|
|
4979
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4932
4980
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
4933
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4934
|
-
_optionalChain([docs, 'optionalAccess',
|
|
4981
|
+
_optionalChain([docs, 'optionalAccess', _391 => _391.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
4982
|
+
_optionalChain([docs, 'optionalAccess', _392 => _392.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
4935
4983
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
4936
4984
|
]);
|
|
4937
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
4985
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _393 => _393.isFarmDocsSearchEnabled, 'call', _394 => _394(docs)]), () => ( false));
|
|
4938
4986
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
4939
4987
|
docsSearchEnabled,
|
|
4940
4988
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
4941
4989
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
4942
4990
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4943
|
-
const generatedDevIndicatorsClientRuntime = farmApp ?
|
|
4944
|
-
const integrationProviders =
|
|
4945
|
-
const isolatedHydrationMode =
|
|
4946
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4991
|
+
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4992
|
+
const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
|
|
4993
|
+
const isolatedHydrationMode = _chunkPSALMEHJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4994
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.experimental, 'optionalAccess', _396 => _396.isolatedClientHydration]),
|
|
4947
4995
|
{
|
|
4948
|
-
serverComponents:
|
|
4949
|
-
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) =>
|
|
4996
|
+
serverComponents: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.experimental, 'optionalAccess', _398 => _398.serverComponents])) === "rsc",
|
|
4997
|
+
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider))
|
|
4950
4998
|
}
|
|
4951
4999
|
);
|
|
4952
5000
|
return generateClientCode(
|
|
4953
5001
|
integrationProviders,
|
|
4954
5002
|
[
|
|
4955
|
-
...
|
|
4956
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
5003
|
+
..._chunkN4AM7Q34cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
5004
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _399 => _399.getFarmDocsDocumentNavigationMatchers, 'call', _400 => _400(docs)]), () => ( []))
|
|
4957
5005
|
],
|
|
4958
5006
|
generatedDocsSearchRuntime,
|
|
4959
5007
|
`${generatedDevtoolsClientRuntime}
|
|
4960
5008
|
${generatedDevIndicatorsClientRuntime}`,
|
|
4961
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
5009
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.plugins]) || [],
|
|
4962
5010
|
root,
|
|
4963
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4964
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4965
|
-
adapterOwnsDocsRuntime ?
|
|
5011
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.srcDir]) || options.srcDir || "src",
|
|
5012
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
5013
|
+
adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _404 => _404.adapter])) : void 0,
|
|
4966
5014
|
renderer,
|
|
4967
|
-
isolatedHydrationMode === "enabled" ||
|
|
4968
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4969
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
4970
|
-
|
|
4971
|
-
|
|
5015
|
+
isolatedHydrationMode === "enabled" || _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406(), 'access', _407 => _407.getIsolatedClientBoundaryModules, 'call', _408 => _408(root)])))), 'optionalAccess', _409 => _409.size]) > 0,
|
|
5016
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _410 => _410.trailingSlash]), () => ( false)),
|
|
5017
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _411 => _411.basePath]), () => ( "/")),
|
|
5018
|
+
_chunkUBH2OARScjs.generateClientCachePersistenceCode.call(void 0,
|
|
5019
|
+
_chunkUBH2OARScjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _412 => _412.cache]))
|
|
4972
5020
|
),
|
|
4973
|
-
adapterOwnsDocsRuntime ?
|
|
4974
|
-
|
|
5021
|
+
adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
5022
|
+
_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands"
|
|
4975
5023
|
);
|
|
4976
5024
|
}
|
|
4977
5025
|
if (id === "/@farm/server") {
|
|
4978
5026
|
return generateServerCode();
|
|
4979
5027
|
}
|
|
4980
5028
|
if (id === "/@farm/manifest") {
|
|
4981
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5029
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _415 => _415.getRouteManager, 'call', _416 => _416()]);
|
|
4982
5030
|
if (!routeManager) {
|
|
4983
5031
|
return `
|
|
4984
5032
|
export const getManifest = () => ({
|
|
@@ -4990,11 +5038,11 @@ export const getManifest = () => ({
|
|
|
4990
5038
|
});
|
|
4991
5039
|
`;
|
|
4992
5040
|
}
|
|
4993
|
-
const globalStylesheetHref =
|
|
5041
|
+
const globalStylesheetHref = _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
4994
5042
|
server.config.root,
|
|
4995
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
5043
|
+
_optionalChain([farmApp, 'optionalAccess', _417 => _417.getConfig, 'call', _418 => _418(), 'access', _419 => _419.srcDir])
|
|
4996
5044
|
);
|
|
4997
|
-
const fullManifest =
|
|
5045
|
+
const fullManifest = _chunkUBH2OARScjs.createFarmDevClientManifest.call(void 0,
|
|
4998
5046
|
routeManager.generateClientManifest(server.config.root),
|
|
4999
5047
|
{
|
|
5000
5048
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -5010,64 +5058,63 @@ export { manifest };
|
|
|
5010
5058
|
}
|
|
5011
5059
|
},
|
|
5012
5060
|
async transform(code, id, transformOptions) {
|
|
5013
|
-
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess',
|
|
5061
|
+
if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) && !farmSetupContext.getStore()) {
|
|
5014
5062
|
await pendingClientSetup;
|
|
5015
5063
|
}
|
|
5016
|
-
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess',
|
|
5017
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5064
|
+
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
5065
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _422 => _422.getConfig, 'call', _423 => _423()]), () => ( options));
|
|
5018
5066
|
let rewrotePackageImports = false;
|
|
5019
|
-
if (
|
|
5067
|
+
if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _424 => _424.experimental, 'optionalAccess', _425 => _425.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, code)) {
|
|
5020
5068
|
const file = id.split("?", 1)[0];
|
|
5021
|
-
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5069
|
+
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _427 => _427.config, 'access', _428 => _428.root]) || process.cwd();
|
|
5022
5070
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
5023
5071
|
const rewrite = () => {
|
|
5024
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5072
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _429 => _429.ssr]) === true) {
|
|
5025
5073
|
if (farmReactServerFiles.has(file)) {
|
|
5026
|
-
for (const child of
|
|
5074
|
+
for (const child of _chunkPSALMEHJcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
5027
5075
|
farmReactServerFiles.add(child);
|
|
5028
5076
|
}
|
|
5029
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5077
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkPSALMEHJcjs.getFarmClientReachableModules.call(void 0,
|
|
5030
5078
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5031
5079
|
projectRoot
|
|
5032
5080
|
).has(path6.resolve(file));
|
|
5033
|
-
const reactServer = !serverModule ? null :
|
|
5081
|
+
const reactServer = !serverModule ? null : _chunkPSALMEHJcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5034
5082
|
code,
|
|
5035
5083
|
file,
|
|
5036
|
-
reference: (specifier, exportName) =>
|
|
5084
|
+
reference: (specifier, exportName) => _chunkPSALMEHJcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5037
5085
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5038
5086
|
});
|
|
5039
5087
|
if (reactServer !== null) {
|
|
5040
5088
|
code = reactServer;
|
|
5041
5089
|
rewrotePackageImports = true;
|
|
5042
5090
|
}
|
|
5043
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5091
|
+
const internal = farmReactServerFiles.has(file) ? _chunkPSALMEHJcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5044
5092
|
code,
|
|
5045
5093
|
file,
|
|
5046
|
-
reference: (clientFile) =>
|
|
5094
|
+
reference: (clientFile) => _chunkPSALMEHJcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5047
5095
|
}) : null;
|
|
5048
5096
|
if (internal !== null) {
|
|
5049
5097
|
code = internal;
|
|
5050
5098
|
rewrotePackageImports = true;
|
|
5051
5099
|
}
|
|
5052
5100
|
}
|
|
5053
|
-
const rewritePackageImports = (source2) =>
|
|
5101
|
+
const rewritePackageImports = (source2) => _chunkPSALMEHJcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5054
5102
|
code: source2,
|
|
5055
5103
|
file,
|
|
5056
5104
|
root: projectRoot,
|
|
5057
|
-
isClientPackage: (specifier) =>
|
|
5105
|
+
isClientPackage: (specifier) => _chunkPSALMEHJcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5058
5106
|
});
|
|
5059
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess', _424 => _424.getRouteManager, 'call', _425 => _425()]);
|
|
5060
5107
|
const source = code;
|
|
5061
|
-
const referenced =
|
|
5108
|
+
const referenced = inspectPackages(() => rewritePackageImports(source));
|
|
5062
5109
|
if (referenced !== null) {
|
|
5063
5110
|
code = referenced;
|
|
5064
5111
|
rewrotePackageImports = true;
|
|
5065
5112
|
}
|
|
5066
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5113
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) === true) {
|
|
5067
5114
|
const cached = rewriteFarmReactCacheImport(
|
|
5068
5115
|
code,
|
|
5069
5116
|
file,
|
|
5070
|
-
_optionalChain([runtimeModule, 'optionalCall',
|
|
5117
|
+
_optionalChain([runtimeModule, 'optionalCall', _431 => _431(FARM_REACT_CACHE_MODULE)])
|
|
5071
5118
|
);
|
|
5072
5119
|
if (cached !== null) {
|
|
5073
5120
|
code = cached;
|
|
@@ -5075,12 +5122,12 @@ export { manifest };
|
|
|
5075
5122
|
}
|
|
5076
5123
|
}
|
|
5077
5124
|
};
|
|
5078
|
-
if (buildSnapshot)
|
|
5125
|
+
if (buildSnapshot) _chunkPSALMEHJcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5079
5126
|
else rewrite();
|
|
5080
5127
|
}
|
|
5081
|
-
if (islandsServerFns() && !
|
|
5082
|
-
const serverFns =
|
|
5083
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
5128
|
+
if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
5129
|
+
const serverFns = _chunk7O3YJ6NPcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
5130
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr]) === true ? "rsc" : "client"
|
|
5084
5131
|
});
|
|
5085
5132
|
if (serverFns) {
|
|
5086
5133
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
@@ -5093,8 +5140,8 @@ export { manifest };
|
|
|
5093
5140
|
const actionModule = transformFarmFormActionModule({
|
|
5094
5141
|
code,
|
|
5095
5142
|
id,
|
|
5096
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5097
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
5143
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd(),
|
|
5144
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _435 => _435.ssr]) === true,
|
|
5098
5145
|
// Parsed by file type: page components are TSX.
|
|
5099
5146
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program,
|
|
5100
5147
|
runtimeModule,
|
|
@@ -5102,21 +5149,21 @@ export { manifest };
|
|
|
5102
5149
|
});
|
|
5103
5150
|
if (actionModule) return { code: actionModule, map: null };
|
|
5104
5151
|
}
|
|
5105
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5106
|
-
const docsConfigModule =
|
|
5107
|
-
if (
|
|
5108
|
-
const redacted =
|
|
5152
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr])) {
|
|
5153
|
+
const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438(), 'optionalAccess', _439 => _439.docs]));
|
|
5154
|
+
if (_chunkUBH2OARScjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5155
|
+
const redacted = _chunkUBH2OARScjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5109
5156
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5110
5157
|
}
|
|
5111
5158
|
}
|
|
5112
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5113
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5114
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
5159
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _440 => _440.ssr])) {
|
|
5160
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _441 => _441.getConfig, 'call', _442 => _442()]), () => ( options));
|
|
5161
|
+
if ((_optionalChain([currentConfig, 'access', _443 => _443.experimental, 'optionalAccess', _444 => _444.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5115
5162
|
const violation = findClientServerFnViolation(code, id);
|
|
5116
5163
|
if (violation) {
|
|
5117
|
-
const locate =
|
|
5164
|
+
const locate = _chunkPSALMEHJcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5118
5165
|
this.error(
|
|
5119
|
-
|
|
5166
|
+
_chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
5120
5167
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5121
5168
|
currentConfig.root
|
|
5122
5169
|
)
|
|
@@ -5124,8 +5171,8 @@ export { manifest };
|
|
|
5124
5171
|
}
|
|
5125
5172
|
}
|
|
5126
5173
|
}
|
|
5127
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
5128
|
-
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5174
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
5175
|
+
await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _446 => _446.getConfig, 'call', _447 => _447()]), () => ( options)));
|
|
5129
5176
|
}
|
|
5130
5177
|
if (typeof imageImports.transform === "function") {
|
|
5131
5178
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -5140,13 +5187,13 @@ export { manifest };
|
|
|
5140
5187
|
id,
|
|
5141
5188
|
transformOptions
|
|
5142
5189
|
);
|
|
5143
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
5190
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _448 => _448.code, 'optionalAccess', _449 => _449.toString, 'call', _450 => _450()]);
|
|
5144
5191
|
if (fontCode) {
|
|
5145
5192
|
transformedCode = fontCode;
|
|
5146
5193
|
transformed = true;
|
|
5147
5194
|
}
|
|
5148
5195
|
}
|
|
5149
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5196
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _451 => _451.ssr]) && server) {
|
|
5150
5197
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
5151
5198
|
code: transformedCode,
|
|
5152
5199
|
id,
|
|
@@ -5158,27 +5205,27 @@ export { manifest };
|
|
|
5158
5205
|
transformed = true;
|
|
5159
5206
|
}
|
|
5160
5207
|
}
|
|
5161
|
-
if (
|
|
5208
|
+
if (_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5162
5209
|
const clientBoundarySource = transformedCode;
|
|
5163
5210
|
const moduleInfo = this.getModuleInfo(id);
|
|
5164
5211
|
if (moduleInfo) {
|
|
5165
5212
|
moduleInfo.isClientComponent = true;
|
|
5166
5213
|
}
|
|
5167
|
-
transformedCode =
|
|
5214
|
+
transformedCode = _chunkPSALMEHJcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5168
5215
|
transformed = true;
|
|
5169
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
5216
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _452 => _452.getConfig, 'call', _453 => _453()]), () => ( options));
|
|
5170
5217
|
let isolatedModuleReference = null;
|
|
5171
5218
|
let rendererIslandModule = false;
|
|
5172
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
5219
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _454 => _454.config, 'access', _455 => _455.root]) || process.cwd();
|
|
5173
5220
|
const cleanId = id.split("?", 1)[0];
|
|
5174
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
5175
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
5176
|
-
if (
|
|
5177
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5178
|
-
isolatedModuleReference =
|
|
5179
|
-
const islandsMode =
|
|
5180
|
-
const explicitStrategy =
|
|
5181
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5221
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _456 => _456.getRouteManager, 'call', _457 => _457(), 'access', _458 => _458.getIsolatedClientBoundaryModules, 'call', _459 => _459(root)])));
|
|
5222
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _460 => _460.has, 'call', _461 => _461(path6.resolve(cleanId))]) === true;
|
|
5223
|
+
if (_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkPSALMEHJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5224
|
+
cleanId.replace(/\\/g, "/").includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5225
|
+
isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5226
|
+
const islandsMode = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _462 => _462.experimental, 'optionalAccess', _463 => _463.serverComponents])) === "islands";
|
|
5227
|
+
const explicitStrategy = _chunkPSALMEHJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5228
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkUBH2OARScjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5182
5229
|
if (inference) {
|
|
5183
5230
|
for (const file of inference.files) {
|
|
5184
5231
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5191,8 +5238,8 @@ export { manifest };
|
|
|
5191
5238
|
islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
|
|
5192
5239
|
parse: (source) => this.parse(source),
|
|
5193
5240
|
slots: islandsMode,
|
|
5194
|
-
browser: _optionalChain([transformOptions, 'optionalAccess',
|
|
5195
|
-
inferredInteraction: _optionalChain([inference, 'optionalAccess',
|
|
5241
|
+
browser: _optionalChain([transformOptions, 'optionalAccess', _464 => _464.ssr]) !== true,
|
|
5242
|
+
inferredInteraction: _optionalChain([inference, 'optionalAccess', _465 => _465.strategy]) === "interaction",
|
|
5196
5243
|
runtimeModule
|
|
5197
5244
|
});
|
|
5198
5245
|
if (!transformedBoundary) {
|
|
@@ -5201,14 +5248,14 @@ export { manifest };
|
|
|
5201
5248
|
);
|
|
5202
5249
|
}
|
|
5203
5250
|
transformedCode = transformedBoundary;
|
|
5204
|
-
} else if (selectedForIsolatedHydration &&
|
|
5251
|
+
} else if (selectedForIsolatedHydration && _chunkIU4YTFFQcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkPSALMEHJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5205
5252
|
rendererIslandModule = true;
|
|
5206
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
5207
|
-
const renderer =
|
|
5253
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _466 => _466.ssr]) === true) {
|
|
5254
|
+
const renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5208
5255
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5209
5256
|
code: transformedCode,
|
|
5210
|
-
moduleReference:
|
|
5211
|
-
islandStrategy: _nullishCoalesce(
|
|
5257
|
+
moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5258
|
+
islandStrategy: _nullishCoalesce(_chunkPSALMEHJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5212
5259
|
parse: (source) => this.parse(source),
|
|
5213
5260
|
withIsland: renderer.server
|
|
5214
5261
|
});
|
|
@@ -5241,17 +5288,17 @@ export { manifest };
|
|
|
5241
5288
|
);
|
|
5242
5289
|
return;
|
|
5243
5290
|
}` : "";
|
|
5244
|
-
const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess',
|
|
5291
|
+
const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _467 => _467.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
|
|
5245
5292
|
const hmrCode = rendererIslandHmr ? `
|
|
5246
5293
|
if (import.meta.hot) {
|
|
5247
5294
|
import.meta.hot.accept((newModule) => {
|
|
5248
5295
|
const runtime = window.__FARM_ISOLATED_HYDRATION_RUNTIME__;
|
|
5249
|
-
if (!newModule || !runtime?.updateModule?.(${JSON.stringify(
|
|
5296
|
+
if (!newModule || !runtime?.updateModule?.(${JSON.stringify(_chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root))}, newModule)) {
|
|
5250
5297
|
import.meta.hot.invalidate();
|
|
5251
5298
|
}
|
|
5252
5299
|
});
|
|
5253
5300
|
}
|
|
5254
|
-
` : _optionalChain([transformOptions, 'optionalAccess',
|
|
5301
|
+
` : _optionalChain([transformOptions, 'optionalAccess', _468 => _468.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
5255
5302
|
if (import.meta.hot) {
|
|
5256
5303
|
import.meta.hot.accept((newModule) => {
|
|
5257
5304
|
${isolatedHmrUpdate}
|
|
@@ -5302,19 +5349,19 @@ if (import.meta.hot) {
|
|
|
5302
5349
|
if (!routeManager) return;
|
|
5303
5350
|
const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
|
|
5304
5351
|
if (ssgPages.length === 0) {
|
|
5305
|
-
|
|
5352
|
+
_chunk7ZDLE77Pcjs.logger.info("No SSG pages found - all pages will use SSR");
|
|
5306
5353
|
return;
|
|
5307
5354
|
}
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
const outDir = path6.join(_optionalChain([server, 'optionalAccess',
|
|
5355
|
+
_chunk7ZDLE77Pcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
5356
|
+
_chunk7ZDLE77Pcjs.logger.info("Pre-rendering SSG pages...");
|
|
5357
|
+
const outDir = path6.join(_optionalChain([server, 'optionalAccess', _469 => _469.config, 'access', _470 => _470.root]) || process.cwd(), options.outDir || "dist");
|
|
5311
5358
|
const clientDir = path6.join(outDir, "client");
|
|
5312
5359
|
for (const page of ssgPages) {
|
|
5313
5360
|
try {
|
|
5314
5361
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
5315
5362
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
5316
5363
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
5317
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
5364
|
+
if (!_optionalChain([mod, 'optionalAccess', _471 => _471.default])) return;
|
|
5318
5365
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
5319
5366
|
const layoutModules = await Promise.all(
|
|
5320
5367
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -5324,7 +5371,7 @@ if (import.meta.hot) {
|
|
|
5324
5371
|
const PageComponent = mod.default;
|
|
5325
5372
|
const pageProps = {
|
|
5326
5373
|
params: page.params,
|
|
5327
|
-
searchParams:
|
|
5374
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, {}),
|
|
5328
5375
|
path: page.urlPath
|
|
5329
5376
|
};
|
|
5330
5377
|
let pageElement = React.createElement(
|
|
@@ -5343,10 +5390,10 @@ if (import.meta.hot) {
|
|
|
5343
5390
|
);
|
|
5344
5391
|
}
|
|
5345
5392
|
const html = renderToString(pageElement);
|
|
5346
|
-
const i18nSnapshot =
|
|
5393
|
+
const i18nSnapshot = _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
5347
5394
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
5348
5395
|
const fullHtml = `<!DOCTYPE html>
|
|
5349
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
5396
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _472 => _472.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
5350
5397
|
<head>
|
|
5351
5398
|
<meta charset="utf-8">
|
|
5352
5399
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -5364,10 +5411,10 @@ if (import.meta.hot) {
|
|
|
5364
5411
|
fs2.mkdirSync(path6.dirname(outputPath), { recursive: true });
|
|
5365
5412
|
fs2.writeFileSync(outputPath, fullHtml);
|
|
5366
5413
|
const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
|
|
5367
|
-
|
|
5414
|
+
_chunk7ZDLE77Pcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
|
|
5368
5415
|
});
|
|
5369
5416
|
} catch (error) {
|
|
5370
|
-
|
|
5417
|
+
_chunk7ZDLE77Pcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
|
|
5371
5418
|
}
|
|
5372
5419
|
}
|
|
5373
5420
|
const manifestPath = path6.join(outDir, "__ssg_manifest.json");
|
|
@@ -5383,20 +5430,19 @@ if (import.meta.hot) {
|
|
|
5383
5430
|
2
|
|
5384
5431
|
)
|
|
5385
5432
|
);
|
|
5386
|
-
|
|
5433
|
+
_chunk7ZDLE77Pcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
|
|
5387
5434
|
} catch (error) {
|
|
5388
|
-
|
|
5435
|
+
_chunk7ZDLE77Pcjs.logger.error(`SSG build failed: ${error}`);
|
|
5389
5436
|
}
|
|
5390
5437
|
},
|
|
5391
5438
|
watchChange(id, change) {
|
|
5392
|
-
const watched =
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
}
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
_chunkOIPPISQ6cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5439
|
+
const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
|
|
5440
|
+
const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
|
|
5441
|
+
if (appSource) _optionalChain([farmApp, 'optionalAccess', _473 => _473.getRouteManager, 'call', _474 => _474(), 'access', _475 => _475.noteSourceChange, 'call', _476 => _476(id, change.event)]);
|
|
5442
|
+
_chunkPSALMEHJcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
|
|
5443
|
+
_chunkPSALMEHJcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
|
|
5444
|
+
_chunkUBH2OARScjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
|
|
5445
|
+
_chunkPSALMEHJcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5400
5446
|
},
|
|
5401
5447
|
async handleHotUpdate(ctx) {
|
|
5402
5448
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5417,11 +5463,11 @@ if (import.meta.hot) {
|
|
|
5417
5463
|
}
|
|
5418
5464
|
for (const island of _nullishCoalesce(farmIslandInferenceDependents.get(path6.resolve(file)), () => ( []))) {
|
|
5419
5465
|
if (island === path6.resolve(file)) continue;
|
|
5420
|
-
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(
|
|
5466
|
+
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, island)), () => ( []))) {
|
|
5421
5467
|
server2.moduleGraph.invalidateModule(mod);
|
|
5422
5468
|
}
|
|
5423
5469
|
}
|
|
5424
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
5470
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getConfig, 'call', _478 => _478()]);
|
|
5425
5471
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
5426
5472
|
const reloadAfterEdit = () => {
|
|
5427
5473
|
for (const files of pendingRouteReloads) {
|
|
@@ -5429,31 +5475,31 @@ if (import.meta.hot) {
|
|
|
5429
5475
|
}
|
|
5430
5476
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5431
5477
|
};
|
|
5432
|
-
if (normalizedFile.includes(
|
|
5478
|
+
if (normalizedFile.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5433
5479
|
path6.posix.join(
|
|
5434
|
-
|
|
5435
|
-
|
|
5480
|
+
_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.root]) || options.root || server2.config.root),
|
|
5481
|
+
_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5436
5482
|
)
|
|
5437
5483
|
))
|
|
5438
5484
|
return modules;
|
|
5439
|
-
if (currentFarmConfig &&
|
|
5485
|
+
if (currentFarmConfig && _chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0,
|
|
5440
5486
|
path6.posix.basename(normalizedFile),
|
|
5441
|
-
|
|
5442
|
-
) &&
|
|
5443
|
-
(appDir) => normalizedFile.startsWith(`${
|
|
5487
|
+
_chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
|
|
5488
|
+
) && _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5489
|
+
(appDir) => normalizedFile.startsWith(`${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5444
5490
|
)) {
|
|
5445
5491
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5446
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5492
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _480 => _480(`updated ${file}`)]);
|
|
5447
5493
|
reloadAfterEdit();
|
|
5448
5494
|
return [];
|
|
5449
5495
|
}
|
|
5450
|
-
const currentSrcRoot = currentFarmConfig ?
|
|
5451
|
-
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) &&
|
|
5496
|
+
const currentSrcRoot = currentFarmConfig ? _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
|
|
5497
|
+
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
|
|
5452
5498
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5453
5499
|
for (const mod of modules) {
|
|
5454
5500
|
server2.moduleGraph.invalidateModule(mod);
|
|
5455
5501
|
}
|
|
5456
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5502
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _481 => _481(`updated ${file}`)]);
|
|
5457
5503
|
reloadAfterEdit();
|
|
5458
5504
|
return [];
|
|
5459
5505
|
}
|
|
@@ -5463,22 +5509,22 @@ if (import.meta.hot) {
|
|
|
5463
5509
|
for (const mod of modules) {
|
|
5464
5510
|
server2.moduleGraph.invalidateModule(mod);
|
|
5465
5511
|
}
|
|
5466
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5512
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _482 => _482(`updated ${file}`)]);
|
|
5467
5513
|
reloadAfterEdit();
|
|
5468
5514
|
return [];
|
|
5469
5515
|
}
|
|
5470
|
-
if (apiRouteManager &&
|
|
5471
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
5516
|
+
if (apiRouteManager && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
5517
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _483 => _483(`updated ${file}`)]);
|
|
5472
5518
|
}
|
|
5473
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
5474
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
5519
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _484 => _484.experimental, 'optionalAccess', _485 => _485.isolatedClientHydration]);
|
|
5520
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _486 => _486.getRouteManager, 'call', _487 => _487()]);
|
|
5475
5521
|
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5476
|
-
const tracksAsyncOwnerIslands =
|
|
5522
|
+
const tracksAsyncOwnerIslands = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _488 => _488.renderer])) && planRouteManager !== void 0;
|
|
5477
5523
|
let clientPlanCurrent = false;
|
|
5478
5524
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5479
5525
|
const routeManager = planRouteManager;
|
|
5480
|
-
await _optionalChain([ctx, 'access',
|
|
5481
|
-
if (_optionalChain([routeManager, 'optionalAccess',
|
|
5526
|
+
await _optionalChain([ctx, 'access', _489 => _489.read, 'optionalCall', _490 => _490()]);
|
|
5527
|
+
if (_optionalChain([routeManager, 'optionalAccess', _491 => _491.isEditPlanNeutral, 'call', _492 => _492(file)])) {
|
|
5482
5528
|
clientPlanCurrent = true;
|
|
5483
5529
|
} else if (routeManager) {
|
|
5484
5530
|
routeManager.noteSourceChange(file, "update");
|
|
@@ -5502,7 +5548,7 @@ if (import.meta.hot) {
|
|
|
5502
5548
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5503
5549
|
for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
|
|
5504
5550
|
if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
|
|
5505
|
-
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(
|
|
5551
|
+
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
|
|
5506
5552
|
server2.moduleGraph.invalidateModule(mod);
|
|
5507
5553
|
}
|
|
5508
5554
|
}
|
|
@@ -5515,19 +5561,19 @@ if (import.meta.hot) {
|
|
|
5515
5561
|
}
|
|
5516
5562
|
clientPlanCurrent = true;
|
|
5517
5563
|
} catch (error) {
|
|
5518
|
-
|
|
5564
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
5519
5565
|
`[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
|
|
5520
5566
|
);
|
|
5521
5567
|
return modules;
|
|
5522
5568
|
}
|
|
5523
5569
|
}
|
|
5524
5570
|
}
|
|
5525
|
-
const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess',
|
|
5571
|
+
const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _493 => _493.getRouteManager, 'call', _494 => _494(), 'access', _495 => _495.isRendererRouteModule, 'call', _496 => _496(normalizedFile)]) === true;
|
|
5526
5572
|
if (normalizedFile.includes("/app/") || rendererRouteFile) {
|
|
5527
5573
|
if (normalizedFile.includes("middleware.")) {
|
|
5528
5574
|
if (middlewareManager) {
|
|
5529
5575
|
await middlewareManager.reload();
|
|
5530
|
-
|
|
5576
|
+
_chunk7ZDLE77Pcjs.logger.success("\u2705 Middleware reloaded!");
|
|
5531
5577
|
if (initialPluginManager) {
|
|
5532
5578
|
for (const middleware of middlewareManager.getMiddlewares()) {
|
|
5533
5579
|
await initialPluginManager.runHookParallel("middlewareDiscovered", {
|
|
@@ -5540,7 +5586,7 @@ if (import.meta.hot) {
|
|
|
5540
5586
|
}
|
|
5541
5587
|
return [];
|
|
5542
5588
|
}
|
|
5543
|
-
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess',
|
|
5589
|
+
if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _497 => _497.getRouteManager, 'call', _498 => _498(), 'access', _499 => _499.invalidateClientManifest, 'call', _500 => _500()]);
|
|
5544
5590
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
5545
5591
|
if (manifestModule) {
|
|
5546
5592
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -5555,15 +5601,15 @@ if (import.meta.hot) {
|
|
|
5555
5601
|
return [];
|
|
5556
5602
|
}
|
|
5557
5603
|
}
|
|
5558
|
-
if (currentFarmConfig && planRouteManager &&
|
|
5559
|
-
_optionalChain([server2, 'access',
|
|
5604
|
+
if (currentFarmConfig && planRouteManager && _chunkIU4YTFFQcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
|
|
5605
|
+
_optionalChain([server2, 'access', _501 => _501.environments, 'access', _502 => _502.client, 'optionalAccess', _503 => _503.moduleGraph]),
|
|
5560
5606
|
normalizedFile,
|
|
5561
5607
|
planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
|
|
5562
5608
|
)) {
|
|
5563
5609
|
reloadAfterEdit();
|
|
5564
5610
|
return [];
|
|
5565
5611
|
}
|
|
5566
|
-
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access',
|
|
5612
|
+
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _504 => _504.environments, 'access', _505 => _505.client, 'optionalAccess', _506 => _506.moduleGraph, 'access', _507 => _507.getModulesByFile, 'call', _508 => _508(normalizedFile), 'optionalAccess', _509 => _509.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
|
|
5567
5613
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5568
5614
|
reloadAfterEdit();
|
|
5569
5615
|
return [];
|
|
@@ -5636,7 +5682,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5636
5682
|
const captures = (status, location) => {
|
|
5637
5683
|
if (redirect) return true;
|
|
5638
5684
|
if (passthrough) return false;
|
|
5639
|
-
redirect =
|
|
5685
|
+
redirect = _chunkS2QSTMBEcjs.getFarmPageDataRedirectFromResponse.call(void 0,
|
|
5640
5686
|
status,
|
|
5641
5687
|
Array.isArray(location) ? location[0] : typeof location === "string" ? location : null
|
|
5642
5688
|
);
|
|
@@ -5661,7 +5707,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5661
5707
|
return (...args) => {
|
|
5662
5708
|
if (captures(target.statusCode, target.getHeader("location"))) {
|
|
5663
5709
|
const callback = args.find((arg) => typeof arg === "function");
|
|
5664
|
-
_optionalChain([callback, 'optionalCall',
|
|
5710
|
+
_optionalChain([callback, 'optionalCall', _510 => _510()]);
|
|
5665
5711
|
return property === "write" ? true : response;
|
|
5666
5712
|
}
|
|
5667
5713
|
return target[property](...args);
|
|
@@ -5694,9 +5740,9 @@ function readWriteHeadLocation(headers) {
|
|
|
5694
5740
|
}
|
|
5695
5741
|
async function sendFarmPageDataRedirect(res, redirect, deploymentId) {
|
|
5696
5742
|
for (const name of ["location", "content-length", "content-type"]) res.removeHeader(name);
|
|
5697
|
-
await
|
|
5743
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
|
|
5698
5744
|
res,
|
|
5699
|
-
|
|
5745
|
+
_chunkVIDUNAQEcjs.withFarmDeploymentResponse.call(void 0, _chunkS2QSTMBEcjs.createFarmPageDataRedirectResponse.call(void 0, redirect), deploymentId)
|
|
5700
5746
|
);
|
|
5701
5747
|
}
|
|
5702
5748
|
function resolveDevelopmentRoot(farmRoot, viteRoot) {
|
|
@@ -5725,43 +5771,43 @@ function isFarmClientVirtualId(id) {
|
|
|
5725
5771
|
}
|
|
5726
5772
|
function isClientEnvironment(context, loadOptions) {
|
|
5727
5773
|
const environment = context.environment;
|
|
5728
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5729
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
5730
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
5774
|
+
if (_optionalChain([environment, 'optionalAccess', _511 => _511.config, 'optionalAccess', _512 => _512.consumer])) return environment.config.consumer === "client";
|
|
5775
|
+
if (_optionalChain([environment, 'optionalAccess', _513 => _513.name])) return environment.name === "client";
|
|
5776
|
+
return _optionalChain([loadOptions, 'optionalAccess', _514 => _514.ssr]) !== true;
|
|
5731
5777
|
}
|
|
5732
5778
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
5733
|
-
const graph = _optionalChain([server, 'access',
|
|
5779
|
+
const graph = _optionalChain([server, 'access', _515 => _515.environments, 'optionalAccess', _516 => _516.client, 'optionalAccess', _517 => _517.moduleGraph]);
|
|
5734
5780
|
if (!graph) return;
|
|
5735
5781
|
for (const [id, module] of graph.idToModuleMap) {
|
|
5736
|
-
if (
|
|
5782
|
+
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
5737
5783
|
}
|
|
5738
5784
|
}
|
|
5739
5785
|
function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, clientRoutes, watchFile) {
|
|
5740
|
-
const parsed =
|
|
5786
|
+
const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5741
5787
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5742
5788
|
watchFile(routesFile);
|
|
5743
|
-
return
|
|
5789
|
+
return _chunkPSALMEHJcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5744
5790
|
kind: parsed.kind,
|
|
5745
5791
|
routePath: parsed.routePath,
|
|
5746
5792
|
routesFile,
|
|
5747
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
5748
|
-
|
|
5793
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _518 => _518.routes, 'access', _519 => _519.get, 'call', _520 => _520(
|
|
5794
|
+
_chunkPSALMEHJcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5749
5795
|
)]),
|
|
5750
5796
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5751
|
-
rendererClient:
|
|
5797
|
+
rendererClient: _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
5752
5798
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5753
5799
|
});
|
|
5754
5800
|
}
|
|
5755
5801
|
function resolveRealModuleFile(filePath, root) {
|
|
5756
|
-
const resolved = _nullishCoalesce(
|
|
5802
|
+
const resolved = _nullishCoalesce(_chunkPSALMEHJcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5757
5803
|
try {
|
|
5758
|
-
return
|
|
5804
|
+
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5759
5805
|
} catch (e29) {
|
|
5760
|
-
return
|
|
5806
|
+
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolved);
|
|
5761
5807
|
}
|
|
5762
5808
|
}
|
|
5763
|
-
function generateProgrammaticRouteModule(moduleId, root, renderer =
|
|
5764
|
-
const parsed =
|
|
5809
|
+
function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkHP7QYVSTcjs.REACT_RENDERER) {
|
|
5810
|
+
const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5765
5811
|
if (!parsed) {
|
|
5766
5812
|
return "";
|
|
5767
5813
|
}
|
|
@@ -6053,7 +6099,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
|
|
|
6053
6099
|
`.trim();
|
|
6054
6100
|
}
|
|
6055
6101
|
function toProgrammaticRouteImportSpecifier(filePath, root) {
|
|
6056
|
-
return root ?
|
|
6102
|
+
return root ? _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
|
|
6057
6103
|
}
|
|
6058
6104
|
async function parseRouteModuleProps(routeModule, input) {
|
|
6059
6105
|
if (typeof routeModule.__farmResolveRouteProps === "function") {
|
|
@@ -6067,17 +6113,17 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
6067
6113
|
}
|
|
6068
6114
|
const schemas = routeModule.__farmRouteSchemas;
|
|
6069
6115
|
const params = parseRouteModuleSchema(
|
|
6070
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
6116
|
+
_optionalChain([schemas, 'optionalAccess', _521 => _521.params]),
|
|
6071
6117
|
input.props.params,
|
|
6072
6118
|
"params",
|
|
6073
6119
|
input.routePath
|
|
6074
6120
|
);
|
|
6075
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
6121
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _522 => _522.search]), input.search, "search", input.routePath);
|
|
6076
6122
|
return {
|
|
6077
6123
|
...input.props,
|
|
6078
6124
|
params,
|
|
6079
6125
|
search,
|
|
6080
|
-
searchParams:
|
|
6126
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, search)
|
|
6081
6127
|
};
|
|
6082
6128
|
}
|
|
6083
6129
|
function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
@@ -6091,20 +6137,20 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6091
6137
|
throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
|
|
6092
6138
|
}
|
|
6093
6139
|
}
|
|
6094
|
-
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer =
|
|
6095
|
-
const providerClientCode =
|
|
6140
|
+
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkHP7QYVSTcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
6141
|
+
const providerClientCode = _chunkUBH2OARScjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6096
6142
|
integrationProviders,
|
|
6097
6143
|
root,
|
|
6098
6144
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
6099
6145
|
);
|
|
6100
|
-
const clientPluginEntry =
|
|
6146
|
+
const clientPluginEntry = _chunkADCVSTFVcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
6101
6147
|
plugins,
|
|
6102
6148
|
root,
|
|
6103
6149
|
srcDir,
|
|
6104
6150
|
publicRuntimeConfig
|
|
6105
6151
|
);
|
|
6106
|
-
const appSetupPath =
|
|
6107
|
-
const rendererClientImports =
|
|
6152
|
+
const appSetupPath = _chunkHP7QYVSTcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
6153
|
+
const rendererClientImports = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
|
|
6108
6154
|
import { hydrateRoot, createRoot } from 'react-dom/client'
|
|
6109
6155
|
import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
|
|
6110
6156
|
// Named exports only: a renderer's client module needs no default export. `React` is a
|
|
@@ -6112,19 +6158,19 @@ import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
|
|
|
6112
6158
|
// optional export (`Children`, `markFunctionComponent`) feature-checked on the namespace.
|
|
6113
6159
|
appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
|
|
6114
6160
|
import { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
|
|
6115
|
-
import __farmAppSetup from ${JSON.stringify(
|
|
6161
|
+
import __farmAppSetup from ${JSON.stringify(_chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, appSetupPath, root))}
|
|
6116
6162
|
const React = { ...__farmRendererClient }
|
|
6117
6163
|
__farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
|
|
6118
6164
|
import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
|
|
6119
6165
|
const React = { ...__farmRendererClient }`
|
|
6120
6166
|
);
|
|
6121
|
-
const rendererIslands = isolatedHydrationEnabled && !islandValues && !
|
|
6167
|
+
const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
|
|
6122
6168
|
const isolatedHydrationImport = rendererIslands ? "import { createFarmRendererIslandRuntime } from '@farm.js/core/internal/renderer-islands'" : 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'"}` : "";
|
|
6123
|
-
const docsAdapterImportBlock =
|
|
6169
|
+
const docsAdapterImportBlock = _chunkP4ZLFUNBcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
6124
6170
|
docsAdapterUI,
|
|
6125
6171
|
docsConfigModule,
|
|
6126
6172
|
// Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
|
|
6127
|
-
|
|
6173
|
+
_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
|
|
6128
6174
|
);
|
|
6129
6175
|
const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
|
|
6130
6176
|
renderer: React,
|
|
@@ -6190,7 +6236,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6190
6236
|
return null;
|
|
6191
6237
|
}
|
|
6192
6238
|
}
|
|
6193
|
-
${islandValues ? `${
|
|
6239
|
+
${islandValues ? `${_chunkUBH2OARScjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6194
6240
|
let farmLastRouteState = null;
|
|
6195
6241
|
|
|
6196
6242
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -7031,7 +7077,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
7031
7077
|
return loadedLayouts;
|
|
7032
7078
|
}
|
|
7033
7079
|
|
|
7034
|
-
${
|
|
7080
|
+
${_chunkUBH2OARScjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
7035
7081
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
7036
7082
|
let wrapped = element;
|
|
7037
7083
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7110,7 +7156,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
|
|
|
7110
7156
|
|
|
7111
7157
|
function hydrateFarmRoute(container, route) {
|
|
7112
7158
|
farmLastRouteState = route;
|
|
7113
|
-
${
|
|
7159
|
+
${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
|
|
7114
7160
|
}
|
|
7115
7161
|
|
|
7116
7162
|
function renderFarmRoute(root, route) {
|
|
@@ -7254,7 +7300,7 @@ async function tryHydrateImportedPage(
|
|
|
7254
7300
|
wrap: wrapFarmClientRouteGraph,
|
|
7255
7301
|
};
|
|
7256
7302
|
} else if (useHydrate && container?.id === '__farm_page__') {
|
|
7257
|
-
wrappedElement = wrapFarmClientRouteGraph(${
|
|
7303
|
+
wrappedElement = wrapFarmClientRouteGraph(${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
|
|
7258
7304
|
} else {
|
|
7259
7305
|
wrappedElement = await buildWrappedHydrationElement(
|
|
7260
7306
|
currentPageComponent,
|
|
@@ -7331,7 +7377,7 @@ function readActiveLayoutPatterns() {
|
|
|
7331
7377
|
);
|
|
7332
7378
|
}
|
|
7333
7379
|
|
|
7334
|
-
${
|
|
7380
|
+
${_chunkUBH2OARScjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7335
7381
|
|
|
7336
7382
|
function activateFragmentScripts(root) {
|
|
7337
7383
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7390,7 +7436,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7390
7436
|
return shell.innerHTML;
|
|
7391
7437
|
}
|
|
7392
7438
|
|
|
7393
|
-
${islandValues ?
|
|
7439
|
+
${islandValues ? _chunkUBH2OARScjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7394
7440
|
container,
|
|
7395
7441
|
fragment,
|
|
7396
7442
|
currentPatterns,
|
|
@@ -7465,9 +7511,9 @@ ${islandValues ? `
|
|
|
7465
7511
|
return nextTarget;
|
|
7466
7512
|
}
|
|
7467
7513
|
|
|
7468
|
-
${islandValues ? `${
|
|
7514
|
+
${islandValues ? `${_chunkUBH2OARScjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7469
7515
|
|
|
7470
|
-
${
|
|
7516
|
+
${_chunkUBH2OARScjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7471
7517
|
|
|
7472
7518
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7473
7519
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8171,10 +8217,10 @@ function generateClientManifest(bundle) {
|
|
|
8171
8217
|
return manifest;
|
|
8172
8218
|
}
|
|
8173
8219
|
async function defineConfig(config = {}) {
|
|
8174
|
-
const tailwindVitePlugin = await
|
|
8220
|
+
const tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, );
|
|
8175
8221
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
8176
|
-
if (_optionalChain([config, 'access',
|
|
8177
|
-
const { config: layeredConfig } = await import("./layers-
|
|
8222
|
+
if (_optionalChain([config, 'access', _523 => _523.extends, 'optionalAccess', _524 => _524.length])) {
|
|
8223
|
+
const { config: layeredConfig } = await import("./layers-GP57TBE2.cjs").then(
|
|
8178
8224
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
8179
8225
|
root: appRoot,
|
|
8180
8226
|
mode: process.env.NODE_ENV === "production" ? "production" : "development"
|
|
@@ -8182,12 +8228,12 @@ async function defineConfig(config = {}) {
|
|
|
8182
8228
|
);
|
|
8183
8229
|
config = layeredConfig;
|
|
8184
8230
|
}
|
|
8185
|
-
config.renderer =
|
|
8186
|
-
config.images =
|
|
8187
|
-
const rendererVitePlugins = await
|
|
8231
|
+
config.renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8232
|
+
config.images = _chunkUBH2OARScjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8233
|
+
const rendererVitePlugins = await _chunkHP7QYVSTcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8188
8234
|
ssr: true
|
|
8189
8235
|
});
|
|
8190
|
-
const reactRefreshPlugins =
|
|
8236
|
+
const reactRefreshPlugins = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkQCVP22KWcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
8191
8237
|
const nodeBuiltinStubs = {
|
|
8192
8238
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
8193
8239
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -8246,7 +8292,7 @@ async function defineConfig(config = {}) {
|
|
|
8246
8292
|
return null;
|
|
8247
8293
|
}
|
|
8248
8294
|
};
|
|
8249
|
-
const pc =
|
|
8295
|
+
const pc = _chunkCH2JX3CMcjs.createCliColors.call(void 0, );
|
|
8250
8296
|
let serverStarted = false;
|
|
8251
8297
|
let startTime = Date.now();
|
|
8252
8298
|
const farmLogger = {
|
|
@@ -8275,20 +8321,20 @@ async function defineConfig(config = {}) {
|
|
|
8275
8321
|
if (!serverStarted) {
|
|
8276
8322
|
serverStarted = true;
|
|
8277
8323
|
const elapsed = Date.now() - startTime;
|
|
8278
|
-
const address = _optionalChain([server, 'access',
|
|
8324
|
+
const address = _optionalChain([server, 'access', _525 => _525.httpServer, 'optionalAccess', _526 => _526.address, 'call', _527 => _527()]);
|
|
8279
8325
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
8280
8326
|
const hostConfig = server.config.server.host;
|
|
8281
8327
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8282
8328
|
console.log("");
|
|
8283
8329
|
console.log(
|
|
8284
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8330
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkXPVS4HKUcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8285
8331
|
);
|
|
8286
8332
|
console.log("");
|
|
8287
8333
|
console.log(
|
|
8288
8334
|
` ${pc.dim("\u279C")} ${pc.bold("Local:")} ${pc.cyan(`http://localhost:${resolvedPort}/`)}`
|
|
8289
8335
|
);
|
|
8290
8336
|
if (isExposed) {
|
|
8291
|
-
const os =
|
|
8337
|
+
const os = _chunkUGL4BDNBcjs.__require.call(void 0, "os");
|
|
8292
8338
|
const interfaces = os.networkInterfaces();
|
|
8293
8339
|
for (const name of Object.keys(interfaces)) {
|
|
8294
8340
|
for (const iface of interfaces[name] || []) {
|
|
@@ -8314,8 +8360,8 @@ async function defineConfig(config = {}) {
|
|
|
8314
8360
|
return {
|
|
8315
8361
|
plugins: [
|
|
8316
8362
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8317
|
-
|
|
8318
|
-
|
|
8363
|
+
_chunkQCVP22KWcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8364
|
+
_chunkUBH2OARScjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8319
8365
|
tailwindVitePlugin,
|
|
8320
8366
|
...rendererVitePlugins,
|
|
8321
8367
|
...reactRefreshPlugins,
|
|
@@ -8325,16 +8371,16 @@ async function defineConfig(config = {}) {
|
|
|
8325
8371
|
farmNavigationPlugin(config.renderer),
|
|
8326
8372
|
farmIslandContainersPlugin(config),
|
|
8327
8373
|
farmPlugin(config),
|
|
8328
|
-
|
|
8374
|
+
_chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8329
8375
|
farmBrandingPlugin
|
|
8330
8376
|
],
|
|
8331
8377
|
customLogger: farmLogger,
|
|
8332
8378
|
clearScreen: false,
|
|
8333
8379
|
optimizeDeps: {
|
|
8334
|
-
...
|
|
8335
|
-
|
|
8380
|
+
..._chunkUBH2OARScjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8381
|
+
_chunkUBH2OARScjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8336
8382
|
appRoot,
|
|
8337
|
-
|
|
8383
|
+
_chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8338
8384
|
),
|
|
8339
8385
|
config.renderer,
|
|
8340
8386
|
appRoot
|
|
@@ -8375,8 +8421,8 @@ async function defineConfig(config = {}) {
|
|
|
8375
8421
|
dedupe: [...config.renderer.dedupe || []],
|
|
8376
8422
|
// Stub out problematic server-only modules during dev mode
|
|
8377
8423
|
alias: {
|
|
8378
|
-
...
|
|
8379
|
-
...
|
|
8424
|
+
..._chunkKBURN62Zcjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8425
|
+
..._chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8380
8426
|
// Nitro internals that should not be resolved in browser
|
|
8381
8427
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8382
8428
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|