@farm.js/core 0.2.0-beta.2 → 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-VX4NDDHR.mjs → agent-mcp-handler-BY7VJQ4W.mjs} +1 -1
- package/dist/agent-mcp-handler-S4UTE7NO.cjs +21 -0
- package/dist/{agent-mcp.d-DhCEzIfu.d.mts → agent-mcp.d-BdFnjlAT.d.mts} +1 -1
- package/dist/{agent-mcp.d-DBaonhLg.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-T2U345WL.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-uE0JGZKN.d.mts → app-manifest.d-COs1wBGz.d.mts} +1 -1
- package/dist/{app-manifest.d-nLVFFd7N.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 +16 -16
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/app-markdown.mjs +3 -3
- package/dist/{app.d-CwVkAUEU.d.ts → app.d-DREl_yXh.d.ts} +17 -7
- package/dist/{app.d-DGGcNXV7.d.mts → app.d-LepnxO-5.d.mts} +17 -7
- package/dist/cache.cjs +8 -8
- package/dist/cache.mjs +1 -1
- package/dist/{chunk-DA432P2F.cjs → chunk-25CHWAZY.cjs} +14 -10
- package/dist/{chunk-JDT733EW.cjs → chunk-27IPPPCV.cjs} +16 -19
- package/dist/{chunk-PHCJJJZV.cjs → chunk-2HC46EGU.cjs} +6 -2
- package/dist/{chunk-MF3IA2AW.cjs → chunk-2L4M6YUG.cjs} +6 -1
- package/dist/{chunk-P2TGLGRR.mjs → chunk-2ORWY3SE.mjs} +2 -2
- 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-ILQSRLKK.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-UWDFH3ZV.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-UCJCU2IL.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-RZI6436F.cjs → chunk-ADCVSTFV.cjs} +18 -11
- package/dist/{chunk-COK4IXOO.mjs → chunk-AGEBFYHF.mjs} +1 -1
- package/dist/{chunk-SWPLGPYF.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-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-SCE7VWPN.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-KDQKTX3Q.cjs → chunk-COMBIEAP.cjs} +44 -36
- package/dist/{chunk-YUQUGVSV.cjs → chunk-CTTXHHZG.cjs} +50 -46
- package/dist/{chunk-FDZZ6K3N.cjs → chunk-CUW7K4AU.cjs} +14 -10
- package/dist/chunk-CWSUKW2H.cjs +6 -0
- package/dist/{chunk-HVGINJTO.mjs → chunk-D5OY5OKA.mjs} +60 -29
- package/dist/{chunk-T3SMMLSB.cjs → chunk-DB4NOIQC.cjs} +12 -8
- package/dist/{chunk-SSFAPTRD.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-OLIWLN4I.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-EZUTDTFM.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-UOMSGJHK.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-QO24II6C.mjs → chunk-GXWCR7PP.mjs} +7 -3
- package/dist/{chunk-VS7HLH4S.cjs → chunk-GYH2B4YQ.cjs} +12 -8
- package/dist/{chunk-RGMUS3HO.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-UA77C2ZA.cjs → chunk-HF3JJPH4.cjs} +58 -50
- package/dist/{chunk-4Q263EQI.mjs → chunk-HFOME6I2.mjs} +7 -7
- 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-J2EKGR6E.cjs → chunk-IASZIYNM.cjs} +611 -529
- 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-YSRZSKQB.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-EODGIFI7.cjs → chunk-JYQMGMKT.cjs} +16 -4
- package/dist/{chunk-J6RFB324.cjs → chunk-JZCUDAH2.cjs} +6 -1
- package/dist/{chunk-N2BRIN7I.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-EXPVSFAG.cjs → chunk-KM7ZRKCH.cjs} +50 -41
- 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-PWDBWXQI.cjs → chunk-LVYUTMW4.cjs} +6 -1
- package/dist/{chunk-I5KPOXUE.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-UGWKNZ4U.cjs → chunk-MBDDLYT5.cjs} +25 -21
- package/dist/{chunk-CEVXKJKF.cjs → chunk-MMSCWTJT.cjs} +6 -1
- package/dist/{chunk-26ZTI2ZO.mjs → chunk-MRDI6MTL.mjs} +5 -5
- package/dist/{chunk-DVAZ53X6.cjs → chunk-N4AM7Q34.cjs} +77 -73
- 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-EA5HVG45.cjs → chunk-NNHIV3O2.cjs} +9 -2
- package/dist/{chunk-SHDCKRP4.cjs → chunk-NQUZDXKJ.cjs} +7 -3
- package/dist/{chunk-EUZFBHPP.cjs → chunk-O7B6LJWE.cjs} +7 -3
- package/dist/{chunk-SAUGKNCF.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-BW563VZZ.mjs → chunk-P67RLOMO.mjs} +1 -1
- 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-RTAWQXME.cjs → chunk-PSALMEHJ.cjs} +239 -145
- package/dist/{chunk-YUCU6XB4.cjs → chunk-PYPHM7AS.cjs} +9 -4
- package/dist/{chunk-CBB7I6HW.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-JH4CDG4G.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-WPURVYXT.cjs → chunk-RGIHE6YL.cjs} +6 -2
- package/dist/{chunk-6B44ZU5P.cjs → chunk-RHORD2K2.cjs} +19 -15
- package/dist/{chunk-7MMDEIVC.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-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-HNB5JHBO.mjs → chunk-T4NOMZTS.mjs} +3 -3
- 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-NWF2FTFV.mjs → chunk-TP3ISVRU.mjs} +2 -9
- 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-5LJF4KUZ.cjs → chunk-U2HFXURZ.cjs} +19 -9
- package/dist/{chunk-SHD265HW.cjs → chunk-U3NUGF2E.cjs} +7 -1
- package/dist/{chunk-SVXOCTQ2.cjs → chunk-UARKTC55.cjs} +6 -1
- package/dist/{chunk-M4YXD6MD.cjs → chunk-UBH2OARS.cjs} +678 -616
- 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-NNNMFSXG.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-Q637AXGZ.mjs → chunk-VGX75645.mjs} +96 -16
- package/dist/{chunk-NLBHLPEO.cjs → chunk-VIDUNAQE.cjs} +6 -1
- package/dist/{chunk-MWAWMFG3.cjs → chunk-VMIR4SUL.cjs} +552 -527
- package/dist/{chunk-VM57CK74.cjs → chunk-VNWKJOJF.cjs} +6 -1
- package/dist/{chunk-RBSGFS5X.cjs → chunk-VQYGXWCS.cjs} +62 -54
- package/dist/{chunk-V5FEFFHV.mjs → chunk-VS4ABIJJ.mjs} +1 -1
- package/dist/{chunk-MPU5DOXX.cjs → chunk-VUCDMV3Q.cjs} +6 -1
- package/dist/{chunk-XOLYZZDX.mjs → chunk-VVIO7QGN.mjs} +93 -42
- package/dist/{chunk-L2GUEYHR.cjs → chunk-VZ2P6GRC.cjs} +8 -1
- package/dist/{chunk-3SPECQXI.cjs → chunk-W4KSV6GX.cjs} +13 -9
- package/dist/{chunk-CHOOBTDD.cjs → chunk-W4WFKRLR.cjs} +17 -13
- package/dist/chunk-W7BMZI3I.cjs +6 -0
- 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-LQ3FISSD.mjs → chunk-WLOIUPV2.mjs} +53 -43
- 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-oUiNuspW.d.mts → cli-runtime.d-BGaFPum1.d.mts} +5 -5
- package/dist/{cli-runtime.d-Dbl-gIoz.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-DaUqOhZT.d.mts → client-component.d-BA6kXI5L.d.mts} +1 -1
- package/dist/{client-component.d-CT4q7tmy.d.ts → client-component.d-LSEmRhuI.d.ts} +1 -1
- package/dist/client-plugins.cjs +8 -3
- package/dist/{client-plugins.d-24qhjX8c.d.ts → client-plugins.d-CQ6AGHP0.d.ts} +14 -0
- package/dist/{client-plugins.d-BfGTqbAH.d.mts → client-plugins.d-CVUMc2ai.d.mts} +14 -0
- 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 +1 -1
- 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-5WDQQDTA.cjs → devtools-OBQY3XOY.cjs} +72 -69
- package/dist/{devtools-DPYIYHTI.mjs → devtools-RYTO2V7G.mjs} +4 -4
- 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 +5 -5
- 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-GfNuz57p.d.mts → handler.d-DLKZDAYR.d.mts} +1 -1
- package/dist/{handler.d-Oca5kNSz.d.ts → handler.d-nkrNn_0M.d.ts} +1 -1
- package/dist/headers.cjs +6 -6
- package/dist/{headers.d-C_lsQIWA.d.mts → headers.d-C3k520Fc.d.mts} +1 -1
- package/dist/{headers.d-b8gHJDvu.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 +228 -216
- package/dist/{index.d-BLtjh1aS.d.mts → index.d-5PDB032w.d.mts} +1 -1
- package/dist/{index.d-Ckv6kHFm.d.ts → index.d-e5WhoB07.d.ts} +1 -1
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/index.mjs +37 -37
- 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 +22 -22
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +14 -14
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- 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 +31 -31
- 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 +13 -13
- 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 +6 -6
- 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 +5 -5
- 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.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 +6 -6
- 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 +1 -1
- 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 +1 -1
- 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-BCS8mD4E.d.mts → mount.d-COIrFH0i.d.mts} +1 -1
- package/dist/{mount.d-DEX8eref.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-AO7PQ7FR.mjs → native-tree-2GQMSOLV.mjs} +1 -1
- 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-Cgi28e5Q.d.ts → navigation-delegate.d-dlnYTX-Y.d.ts} +1 -1
- package/dist/{navigation-delegate.d-F83ugsZW.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 +1 -1
- 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 +25 -25
- 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 +1 -1
- 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-BkVY4aFb.d.mts → render-plan.d-BW56oxMP.d.mts} +1 -1
- package/dist/{render-plan.d-DCF2GZdD.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 +1 -1
- package/dist/renderer.cjs +11 -6
- package/dist/renderer.mjs +1 -1
- package/dist/request.cjs +9 -4
- package/dist/{request.d-C5o-4dU2.d.ts → request.d-BaFROByP.d.ts} +1 -1
- package/dist/{request.d-DMPB53-i.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-DDvArvik.d.mts → route-rendering.d-BzeFPYGc.d.mts} +1 -1
- package/dist/{route-rendering.d-DfP6zRP7.d.ts → route-rendering.d-D4kUuncg.d.ts} +1 -1
- package/dist/router.cjs +5 -5
- package/dist/{router.d-s40h7aoS.d.ts → router.d-B9qJdgjt.d.ts} +1 -1
- package/dist/{router.d-1Skf2XCO.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 +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.mjs +1 -1
- package/dist/{rsc-pipeline-O2YMVHUF.mjs → rsc-pipeline-Y6D6KBES.mjs} +9 -9
- package/dist/rsc-pipeline-YHVEHWTU.cjs +91 -0
- package/dist/{runtime-K2X3IZAF.mjs → runtime-62ZIEV6U.mjs} +8 -8
- package/dist/{runtime-WOTVFYQY.cjs → runtime-LKEMFXHW.cjs} +129 -119
- package/dist/{runtime.d-Bykc5Qfg.d.mts → runtime.d-BUtDIrRJ.d.mts} +1 -1
- package/dist/{runtime.d-k-9kFUsM.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-D-HixBe0.d.mts → server-components-status.d-B0YP-m9A.d.mts} +1 -1
- package/dist/{server-components-status.d-DLNd1C5j.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 +28 -28
- package/dist/session-J7NTZI56.cjs +24 -0
- package/dist/{session-4IB34X35.mjs → session-ZFM3RDG2.mjs} +3 -3
- package/dist/{spa-router.d-DIlXwm00.d.mts → spa-router.d-CkR14oGH.d.mts} +2 -2
- package/dist/{spa-router.d-Dl-EJeJT.d.ts → spa-router.d-D4ye2WFk.d.ts} +2 -2
- package/dist/{ssg.d-bE-ylg0e.d.ts → ssg.d-BCJB_f7B.d.ts} +2 -2
- package/dist/{ssg.d-D2ZV0bhs.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-BmdnMopD.d.ts → store-core.d-0W2YScl8.d.ts} +2 -2
- package/dist/{store-core.d-DPsCYzV7.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-BFZQcBZV.d.ts → utils.d-Ba3N28fk.d.ts} +1 -1
- package/dist/{utils.d-nM3OHKq5.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 +25 -25
- 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-EXOG55M4.cjs +0 -21
- package/dist/analyzer-OWIHFO5M.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-NOSLIDSG.cjs +0 -9
- package/dist/chunk-PAKB6JHX.cjs +0 -40
- 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-52CUAP3N.cjs +0 -28
- package/dist/node-module-bundle-TNSY5PAC.cjs +0 -15
- package/dist/plugin-MWO3G2XM.cjs +0 -33
- package/dist/rsc-pipeline-SFQSMVI7.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-E72GG355.mjs → chunk-HDZ2AMDD.mjs} +0 -0
- /package/dist/{chunk-URBP6DLH.mjs → chunk-LQZXCSYG.mjs} +0 -0
- /package/dist/{chunk-M6AJZ4XR.mjs → chunk-QNJUQIUZ.mjs} +0 -0
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk4JARM2QQcjs = require('./chunk-4JARM2QQ.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk2L4M6YUGcjs = require('./chunk-2L4M6YUG.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -22,17 +22,17 @@ var _chunkMF3IA2AWcjs = require('./chunk-MF3IA2AW.cjs');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkJYQMGMKTcjs = require('./chunk-JYQMGMKT.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkVNWKJOJFcjs = require('./chunk-VNWKJOJF.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunk6AUPJYHFcjs = require('./chunk-6AUPJYHF.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkQBCR2EHAcjs = require('./chunk-QBCR2EHA.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ var _chunkCBB7I6HWcjs = require('./chunk-CBB7I6HW.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkVQYGXWCScjs = require('./chunk-VQYGXWCS.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
@@ -54,33 +54,33 @@ var _chunkRBSGFS5Xcjs = require('./chunk-RBSGFS5X.cjs');
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var _chunk4A6WSOZHcjs = require('./chunk-4A6WSOZH.cjs');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunk3EZHMZGDcjs = require('./chunk-3EZHMZGD.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunkCTTXHHZGcjs = require('./chunk-CTTXHHZG.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
var
|
|
68
|
+
var _chunkTDAH76RRcjs = require('./chunk-TDAH76RR.cjs');
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
var
|
|
74
|
+
var _chunkF5T55PYXcjs = require('./chunk-F5T55PYX.cjs');
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunkI5PDHLKEcjs = require('./chunk-I5PDHLKE.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
var
|
|
80
|
+
var _chunkRLC7NNTAcjs = require('./chunk-RLC7NNTA.cjs');
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkKDUVIJSZcjs = require('./chunk-KDUVIJSZ.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
@@ -117,27 +117,27 @@ var _chunkO4JYMU5Ncjs = require('./chunk-O4JYMU5N.cjs');
|
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
var
|
|
120
|
+
var _chunkUBH2OARScjs = require('./chunk-UBH2OARS.cjs');
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
var
|
|
127
|
+
var _chunkADCVSTFVcjs = require('./chunk-ADCVSTFV.cjs');
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
var
|
|
130
|
+
var _chunkIGA3OTFYcjs = require('./chunk-IGA3OTFY.cjs');
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
|
|
136
|
-
var
|
|
136
|
+
var _chunkKM7ZRKCHcjs = require('./chunk-KM7ZRKCH.cjs');
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
var
|
|
140
|
+
var _chunkMBDDLYT5cjs = require('./chunk-MBDDLYT5.cjs');
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
|
|
@@ -150,14 +150,14 @@ var _chunkUGWKNZ4Ucjs = require('./chunk-UGWKNZ4U.cjs');
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
var
|
|
153
|
+
var _chunkIGBQSUT5cjs = require('./chunk-IGBQSUT5.cjs');
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
var
|
|
156
|
+
var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
|
|
160
|
-
var
|
|
160
|
+
var _chunkUOFTT6S4cjs = require('./chunk-UOFTT6S4.cjs');
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
|
|
@@ -165,18 +165,18 @@ var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
|
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
|
|
168
|
-
var
|
|
168
|
+
var _chunkC4DZAEVTcjs = require('./chunk-C4DZAEVT.cjs');
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
|
|
173
|
-
var
|
|
173
|
+
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
174
174
|
|
|
175
175
|
|
|
176
|
-
var
|
|
176
|
+
var _chunkNNHIV3O2cjs = require('./chunk-NNHIV3O2.cjs');
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
var
|
|
179
|
+
var _chunk323JTLXRcjs = require('./chunk-323JTLXR.cjs');
|
|
180
180
|
|
|
181
181
|
|
|
182
182
|
|
|
@@ -194,34 +194,34 @@ var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
|
194
194
|
|
|
195
195
|
|
|
196
196
|
|
|
197
|
-
var
|
|
197
|
+
var _chunkPSALMEHJcjs = require('./chunk-PSALMEHJ.cjs');
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
-
var
|
|
201
|
+
var _chunkP4ZLFUNBcjs = require('./chunk-P4ZLFUNB.cjs');
|
|
202
202
|
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
var
|
|
205
|
+
var _chunkQTGYT2DFcjs = require('./chunk-QTGYT2DF.cjs');
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
|
|
210
|
-
var
|
|
210
|
+
var _chunkVZ2P6GRCcjs = require('./chunk-VZ2P6GRC.cjs');
|
|
211
211
|
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
var
|
|
214
|
+
var _chunkQZRFEHMScjs = require('./chunk-QZRFEHMS.cjs');
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
var
|
|
217
|
+
var _chunkIU4YTFFQcjs = require('./chunk-IU4YTFFQ.cjs');
|
|
218
218
|
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
var
|
|
221
|
+
var _chunkIEZFFXSCcjs = require('./chunk-IEZFFXSC.cjs');
|
|
222
222
|
|
|
223
223
|
|
|
224
|
-
var
|
|
224
|
+
var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
|
|
@@ -232,70 +232,70 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
|
232
232
|
|
|
233
233
|
|
|
234
234
|
|
|
235
|
-
var
|
|
235
|
+
var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
|
|
241
241
|
|
|
242
|
-
var
|
|
242
|
+
var _chunkXH4GQ7MTcjs = require('./chunk-XH4GQ7MT.cjs');
|
|
243
243
|
|
|
244
244
|
|
|
245
|
-
var
|
|
245
|
+
var _chunkNMMCBJZMcjs = require('./chunk-NMMCBJZM.cjs');
|
|
246
246
|
|
|
247
247
|
|
|
248
|
-
var
|
|
248
|
+
var _chunkTP7JAC3Tcjs = require('./chunk-TP7JAC3T.cjs');
|
|
249
249
|
|
|
250
250
|
|
|
251
251
|
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
var
|
|
254
|
+
var _chunk27IPPPCVcjs = require('./chunk-27IPPPCV.cjs');
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
|
|
258
|
-
var
|
|
258
|
+
var _chunkYQ5NVEFScjs = require('./chunk-YQ5NVEFS.cjs');
|
|
259
259
|
|
|
260
260
|
|
|
261
|
-
var
|
|
261
|
+
var _chunkU2HFXURZcjs = require('./chunk-U2HFXURZ.cjs');
|
|
262
262
|
|
|
263
263
|
|
|
264
|
-
var
|
|
264
|
+
var _chunkLVYUTMW4cjs = require('./chunk-LVYUTMW4.cjs');
|
|
265
265
|
|
|
266
266
|
|
|
267
267
|
|
|
268
|
-
var
|
|
268
|
+
var _chunkXE3E4MERcjs = require('./chunk-XE3E4MER.cjs');
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
|
|
272
272
|
|
|
273
|
-
var
|
|
273
|
+
var _chunkN4AM7Q34cjs = require('./chunk-N4AM7Q34.cjs');
|
|
274
274
|
|
|
275
275
|
|
|
276
276
|
|
|
277
|
-
var
|
|
277
|
+
var _chunk5YT2ZSWScjs = require('./chunk-5YT2ZSWS.cjs');
|
|
278
278
|
|
|
279
279
|
|
|
280
|
-
var
|
|
280
|
+
var _chunkOCQSYDMGcjs = require('./chunk-OCQSYDMG.cjs');
|
|
281
281
|
|
|
282
282
|
|
|
283
283
|
|
|
284
284
|
|
|
285
|
-
var
|
|
285
|
+
var _chunkNQUZDXKJcjs = require('./chunk-NQUZDXKJ.cjs');
|
|
286
286
|
|
|
287
287
|
|
|
288
|
-
var
|
|
288
|
+
var _chunk5BZ7PR3Tcjs = require('./chunk-5BZ7PR3T.cjs');
|
|
289
289
|
|
|
290
290
|
|
|
291
291
|
|
|
292
|
-
var
|
|
292
|
+
var _chunkXJEOHDPNcjs = require('./chunk-XJEOHDPN.cjs');
|
|
293
293
|
|
|
294
294
|
|
|
295
|
-
var
|
|
295
|
+
var _chunkYHALJBYTcjs = require('./chunk-YHALJBYT.cjs');
|
|
296
296
|
|
|
297
297
|
|
|
298
|
-
var
|
|
298
|
+
var _chunkIDUGG7VRcjs = require('./chunk-IDUGG7VR.cjs');
|
|
299
299
|
|
|
300
300
|
|
|
301
301
|
|
|
@@ -305,55 +305,59 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
|
305
305
|
|
|
306
306
|
|
|
307
307
|
|
|
308
|
-
var
|
|
308
|
+
var _chunkGUDYDNKUcjs = require('./chunk-GUDYDNKU.cjs');
|
|
309
309
|
|
|
310
310
|
|
|
311
311
|
|
|
312
312
|
|
|
313
|
-
var
|
|
313
|
+
var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
|
|
317
|
-
var
|
|
317
|
+
var _chunkH5AC3XSEcjs = require('./chunk-H5AC3XSE.cjs');
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
var
|
|
320
|
+
var _chunkXPVS4HKUcjs = require('./chunk-XPVS4HKU.cjs');
|
|
321
321
|
|
|
322
322
|
|
|
323
|
-
var
|
|
323
|
+
var _chunkO7B6LJWEcjs = require('./chunk-O7B6LJWE.cjs');
|
|
324
324
|
|
|
325
325
|
|
|
326
326
|
|
|
327
|
-
var
|
|
327
|
+
var _chunkVIDUNAQEcjs = require('./chunk-VIDUNAQE.cjs');
|
|
328
328
|
|
|
329
329
|
|
|
330
|
-
var
|
|
330
|
+
var _chunk6FIY4KBCcjs = require('./chunk-6FIY4KBC.cjs');
|
|
331
331
|
|
|
332
332
|
|
|
333
|
-
var
|
|
333
|
+
var _chunkIBZW57NWcjs = require('./chunk-IBZW57NW.cjs');
|
|
334
334
|
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
|
|
338
|
-
var
|
|
338
|
+
var _chunkTFCBJFP7cjs = require('./chunk-TFCBJFP7.cjs');
|
|
339
339
|
|
|
340
340
|
|
|
341
341
|
|
|
342
342
|
|
|
343
343
|
|
|
344
|
-
var
|
|
344
|
+
var _chunkT4YCWRCJcjs = require('./chunk-T4YCWRCJ.cjs');
|
|
345
345
|
|
|
346
346
|
|
|
347
|
-
|
|
347
|
+
|
|
348
|
+
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
348
349
|
|
|
349
350
|
// src/build/index.ts
|
|
351
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
350
352
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
351
353
|
var _fs = require('fs');
|
|
352
354
|
|
|
353
355
|
// src/nitro/universal-build.ts
|
|
356
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
354
357
|
var _crypto = require('crypto');
|
|
355
358
|
|
|
356
359
|
// src/nitro/static-range.ts
|
|
360
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
357
361
|
|
|
358
362
|
|
|
359
363
|
var FARM_NITRO_STATIC_HANDLER_SOURCE = `import { HTTPError, defineHandler } from "h3";
|
|
@@ -524,6 +528,7 @@ function toPosix(file) {
|
|
|
524
528
|
}
|
|
525
529
|
|
|
526
530
|
// src/nitro/client-css-href.ts
|
|
531
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
527
532
|
|
|
528
533
|
var FARM_CLIENT_CSS_HREF_PLACEHOLDER = "/__farm_client_css_href__";
|
|
529
534
|
var FARM_CLIENT_JS_SRC_PLACEHOLDER = "/__farm_client_js_src__";
|
|
@@ -600,6 +605,7 @@ var _module = require('module');
|
|
|
600
605
|
var _util = require('util');
|
|
601
606
|
|
|
602
607
|
// src/docs/compiler.ts
|
|
608
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
603
609
|
|
|
604
610
|
var FARM_DOCS_COMPILED_ORIGIN = "https://farm-docs-build.invalid";
|
|
605
611
|
function normalizePathname(pathname) {
|
|
@@ -641,13 +647,13 @@ function getDocsTitle(docs) {
|
|
|
641
647
|
return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
|
|
642
648
|
}
|
|
643
649
|
function loadPages(contentDir, docs) {
|
|
644
|
-
return
|
|
650
|
+
return _chunk4A6WSOZHcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunk4A6WSOZHcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
|
|
645
651
|
}
|
|
646
652
|
function findSocialImagePath(html, basePath) {
|
|
647
653
|
const match = /<meta\s+property=["']og:image["']\s+content=["']([^"']+)["']/i.exec(html) || /<meta\s+content=["']([^"']+)["']\s+property=["']og:image["']/i.exec(html);
|
|
648
654
|
if (!_optionalChain([match, 'optionalAccess', _2 => _2[1]])) return null;
|
|
649
655
|
try {
|
|
650
|
-
return
|
|
656
|
+
return _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, new URL(match[1], FARM_DOCS_COMPILED_ORIGIN).pathname, basePath);
|
|
651
657
|
} catch (e7) {
|
|
652
658
|
return null;
|
|
653
659
|
}
|
|
@@ -659,15 +665,15 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
|
|
|
659
665
|
return response;
|
|
660
666
|
}
|
|
661
667
|
async function compileFarmDocsManifest(docs, options) {
|
|
662
|
-
const contentDir =
|
|
668
|
+
const contentDir = _chunk4A6WSOZHcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
|
|
663
669
|
const pages = loadPages(contentDir, docs);
|
|
664
|
-
const basePath =
|
|
670
|
+
const basePath = _chunkTFCBJFP7cjs.normalizeFarmBasePath.call(void 0, options.basePath);
|
|
665
671
|
const absolutePaths = [
|
|
666
672
|
_path2.default.resolve(options.root),
|
|
667
673
|
_path2.default.resolve(contentDir),
|
|
668
674
|
docs.configPath || ""
|
|
669
675
|
];
|
|
670
|
-
const handler =
|
|
676
|
+
const handler = _chunk4A6WSOZHcjs.createFarmDocsHandler.call(void 0, docs, {
|
|
671
677
|
root: options.root,
|
|
672
678
|
srcDir: options.srcDir,
|
|
673
679
|
clientEntry: options.clientEntry,
|
|
@@ -677,7 +683,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
677
683
|
isPathGuarded: options.isPathGuarded,
|
|
678
684
|
basePath
|
|
679
685
|
});
|
|
680
|
-
const apiHandler =
|
|
686
|
+
const apiHandler = _chunkVQYGXWCScjs.createFarmDocsAPIHandler.call(void 0, {
|
|
681
687
|
rootDir: options.root,
|
|
682
688
|
srcDir: options.srcDir,
|
|
683
689
|
docs,
|
|
@@ -689,7 +695,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
689
695
|
const apiMarkdown = {};
|
|
690
696
|
for (const page of pages) {
|
|
691
697
|
const htmlResponse = await addHandlerRoute(routes, page.href, handler, absolutePaths);
|
|
692
|
-
const markdownPath =
|
|
698
|
+
const markdownPath = _chunk4A6WSOZHcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
|
|
693
699
|
await addHandlerRoute(routes, markdownPath, handler, absolutePaths);
|
|
694
700
|
if (htmlResponse) {
|
|
695
701
|
const socialImagePath = findSocialImagePath(await htmlResponse.text(), basePath);
|
|
@@ -774,7 +780,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
774
780
|
post: await compileResponse(postResponse, absolutePaths),
|
|
775
781
|
search: {
|
|
776
782
|
pages: publicPages.map((page) => ({
|
|
777
|
-
...
|
|
783
|
+
..._chunk4A6WSOZHcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
|
|
778
784
|
sourcePath: `farm-docs:${page.slug || "index"}`
|
|
779
785
|
})),
|
|
780
786
|
search: _nullishCoalesce(searchConfig, () => ( true)),
|
|
@@ -786,6 +792,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
786
792
|
}
|
|
787
793
|
|
|
788
794
|
// src/nitro/client-module-preloads.ts
|
|
795
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
789
796
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
790
797
|
|
|
791
798
|
var FARM_CLIENT_MODULE_PRELOADS_PLACEHOLDER = "__farm_client_module_preloads__";
|
|
@@ -832,7 +839,7 @@ function collectFarmClientModulePreloads(bundle, options) {
|
|
|
832
839
|
const addModule = (id, chunk) => {
|
|
833
840
|
const moduleId = id.split("?")[0];
|
|
834
841
|
if (!_path2.default.isAbsolute(moduleId)) return;
|
|
835
|
-
const key =
|
|
842
|
+
const key = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, moduleId, options.root);
|
|
836
843
|
if (modules[key]) return;
|
|
837
844
|
const loaded = /* @__PURE__ */ new Set([...entryLoaded, chunk.fileName]);
|
|
838
845
|
modules[key] = [chunk.fileName, ...staticImports(chunk, loaded, [])].map(index);
|
|
@@ -934,6 +941,7 @@ function encodeFarmBuildJSONPlaceholder(value) {
|
|
|
934
941
|
}
|
|
935
942
|
|
|
936
943
|
// src/nitro/client-route-table.ts
|
|
944
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
937
945
|
|
|
938
946
|
|
|
939
947
|
var FARM_CLIENT_ROUTE_TABLE_MODULE = "farm-client-routes";
|
|
@@ -954,7 +962,7 @@ function createFarmClientRouteTable(clientPages) {
|
|
|
954
962
|
function resolveFarmDocsClientRoutes(pages, docsPagePaths) {
|
|
955
963
|
const docsRoutes = /* @__PURE__ */ new Map();
|
|
956
964
|
for (const page of pages) {
|
|
957
|
-
if (page.docs) docsRoutes.set(
|
|
965
|
+
if (page.docs) docsRoutes.set(_chunkT4YCWRCJcjs.getRoutePatternShape.call(void 0, page.pattern, "router"), page);
|
|
958
966
|
}
|
|
959
967
|
const docsTemplate = docsRoutes.values().next().value;
|
|
960
968
|
const groupedDocsPages = [];
|
|
@@ -962,7 +970,7 @@ function resolveFarmDocsClientRoutes(pages, docsPagePaths) {
|
|
|
962
970
|
const shadowed = [];
|
|
963
971
|
for (const page of pages) {
|
|
964
972
|
if (page.docs) continue;
|
|
965
|
-
const shape =
|
|
973
|
+
const shape = _chunkT4YCWRCJcjs.getRoutePatternShape.call(void 0, page.pattern, "router");
|
|
966
974
|
const docsRoute = docsRoutes.get(shape);
|
|
967
975
|
const directory = page.directory ? { directory: page.directory } : {};
|
|
968
976
|
if (docsPagePaths.has(page.pattern)) {
|
|
@@ -972,7 +980,7 @@ function resolveFarmDocsClientRoutes(pages, docsPagePaths) {
|
|
|
972
980
|
}
|
|
973
981
|
} else if (!docsRoute) {
|
|
974
982
|
appPages.push(page);
|
|
975
|
-
} else if (
|
|
983
|
+
} else if (_chunkT4YCWRCJcjs.getRoutePatternSpecificity.call(void 0, docsRoute.pattern, "router").every(isStatic)) {
|
|
976
984
|
docsRoutes.delete(shape);
|
|
977
985
|
appPages.push(page);
|
|
978
986
|
} else {
|
|
@@ -1006,6 +1014,7 @@ async function readFarmClientRouteTable(buildDir) {
|
|
|
1006
1014
|
}
|
|
1007
1015
|
|
|
1008
1016
|
// src/docs/module-preloads.ts
|
|
1017
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1009
1018
|
|
|
1010
1019
|
|
|
1011
1020
|
var FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER = "__farm_docs_module_preloads__";
|
|
@@ -1093,6 +1102,7 @@ function encodeFarmDocsModulePreloads(manifest) {
|
|
|
1093
1102
|
}
|
|
1094
1103
|
|
|
1095
1104
|
// src/route-runtime-manifest.ts
|
|
1105
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1096
1106
|
|
|
1097
1107
|
var FARM_ROUTE_RUNTIME_MANIFEST = "route-runtime-manifest.json";
|
|
1098
1108
|
async function createFarmRouteRuntimeManifest(options) {
|
|
@@ -1100,7 +1110,7 @@ async function createFarmRouteRuntimeManifest(options) {
|
|
|
1100
1110
|
const routes = [];
|
|
1101
1111
|
for (const [pattern, entry] of options.routeManager.getRoutes()) {
|
|
1102
1112
|
const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
|
|
1103
|
-
const rendering = await
|
|
1113
|
+
const rendering = await _chunkKM7ZRKCHcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
|
|
1104
1114
|
const runtimeConfig = await options.routeManager.resolveRouteRuntimeConfig(pattern);
|
|
1105
1115
|
routes.push({
|
|
1106
1116
|
kind: "page",
|
|
@@ -1111,13 +1121,13 @@ async function createFarmRouteRuntimeManifest(options) {
|
|
|
1111
1121
|
});
|
|
1112
1122
|
}
|
|
1113
1123
|
for (const [pattern, route] of options.apiRouteManager.getRoutes()) {
|
|
1114
|
-
const publicPattern =
|
|
1124
|
+
const publicPattern = _chunkH5AC3XSEcjs.resolveFarmAPIServerRoutePath.call(void 0,
|
|
1115
1125
|
pattern,
|
|
1116
|
-
|
|
1126
|
+
_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, options.config.api)
|
|
1117
1127
|
);
|
|
1118
|
-
const inherited =
|
|
1119
|
-
const own =
|
|
1120
|
-
|
|
1128
|
+
const inherited = _chunkGUDYDNKUcjs.resolveFarmRouteRuleRuntimeConfig.call(void 0, publicPattern, options.config.routeRules);
|
|
1129
|
+
const own = _chunkGUDYDNKUcjs.normalizeFarmRouteRuntimeConfig.call(void 0,
|
|
1130
|
+
_chunkGUDYDNKUcjs.getFarmRouteRuntimeConfig.call(void 0, route),
|
|
1121
1131
|
`API route "${pattern}"`
|
|
1122
1132
|
);
|
|
1123
1133
|
routes.push({
|
|
@@ -1125,8 +1135,8 @@ async function createFarmRouteRuntimeManifest(options) {
|
|
|
1125
1135
|
pattern: publicPattern,
|
|
1126
1136
|
rendering: "dynamic",
|
|
1127
1137
|
source: normalizeManifestSource(root, route.filePath),
|
|
1128
|
-
...
|
|
1129
|
-
|
|
1138
|
+
..._chunkGUDYDNKUcjs.resolveFarmRouteRuntimeConfig.call(void 0,
|
|
1139
|
+
_chunkGUDYDNKUcjs.mergeFarmRouteRuntimeConfigs.call(void 0, inherited, own),
|
|
1130
1140
|
`API route "${pattern}"`
|
|
1131
1141
|
)
|
|
1132
1142
|
});
|
|
@@ -1134,9 +1144,9 @@ async function createFarmRouteRuntimeManifest(options) {
|
|
|
1134
1144
|
for (const entry of options.routeManager.getMetadataRoutes().values()) {
|
|
1135
1145
|
const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
|
|
1136
1146
|
const pattern = entry.pattern === "/" ? `/${entry.outputName}` : `${entry.pattern}/${entry.outputName}`;
|
|
1137
|
-
const inherited =
|
|
1138
|
-
const own =
|
|
1139
|
-
|
|
1147
|
+
const inherited = _chunkGUDYDNKUcjs.resolveFarmRouteRuleRuntimeConfig.call(void 0, pattern, options.config.routeRules);
|
|
1148
|
+
const own = _chunkGUDYDNKUcjs.normalizeFarmRouteRuntimeConfig.call(void 0,
|
|
1149
|
+
_chunkGUDYDNKUcjs.getFarmRouteRuntimeConfig.call(void 0, routeModule),
|
|
1140
1150
|
`Metadata route "${pattern}"`
|
|
1141
1151
|
);
|
|
1142
1152
|
routes.push({
|
|
@@ -1144,19 +1154,19 @@ async function createFarmRouteRuntimeManifest(options) {
|
|
|
1144
1154
|
pattern,
|
|
1145
1155
|
rendering: "dynamic",
|
|
1146
1156
|
source: normalizeManifestSource(root, entry.modulePath),
|
|
1147
|
-
...
|
|
1148
|
-
|
|
1157
|
+
..._chunkGUDYDNKUcjs.resolveFarmRouteRuntimeConfig.call(void 0,
|
|
1158
|
+
_chunkGUDYDNKUcjs.mergeFarmRouteRuntimeConfigs.call(void 0, inherited, own),
|
|
1149
1159
|
`Metadata route "${pattern}"`
|
|
1150
1160
|
)
|
|
1151
1161
|
});
|
|
1152
1162
|
}
|
|
1153
1163
|
for (const [pattern, rule] of Object.entries(options.config.routeRules)) {
|
|
1154
|
-
if (!
|
|
1164
|
+
if (!_chunkGUDYDNKUcjs.hasFarmRouteRuntimeControls.call(void 0, rule)) continue;
|
|
1155
1165
|
routes.push({
|
|
1156
1166
|
kind: "rule",
|
|
1157
1167
|
pattern,
|
|
1158
1168
|
rendering: rule.prerender || rule.render === "static" ? "static" : "dynamic",
|
|
1159
|
-
...
|
|
1169
|
+
..._chunkGUDYDNKUcjs.resolveFarmRouteRuntimeConfig.call(void 0, rule, `Route rule "${pattern}"`)
|
|
1160
1170
|
});
|
|
1161
1171
|
}
|
|
1162
1172
|
return {
|
|
@@ -1173,7 +1183,7 @@ async function writeFarmRouteRuntimeManifest(directory, manifest) {
|
|
|
1173
1183
|
return manifestPath;
|
|
1174
1184
|
}
|
|
1175
1185
|
function validateFarmRouteRuntimeDeployment(manifest, preset) {
|
|
1176
|
-
const runtime =
|
|
1186
|
+
const runtime = _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset);
|
|
1177
1187
|
const warnings = /* @__PURE__ */ new Set();
|
|
1178
1188
|
for (const route of manifest.routes) {
|
|
1179
1189
|
if (route.rendering === "static") continue;
|
|
@@ -1209,6 +1219,8 @@ function normalizeManifestSource(root, modulePath) {
|
|
|
1209
1219
|
}
|
|
1210
1220
|
|
|
1211
1221
|
// src/nitro/vercel-route-runtime.ts
|
|
1222
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1223
|
+
|
|
1212
1224
|
|
|
1213
1225
|
async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, basePath = "/") {
|
|
1214
1226
|
const dynamicRoutes = manifest.routes.filter(
|
|
@@ -1224,7 +1236,7 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
|
|
|
1224
1236
|
regions: route.regions,
|
|
1225
1237
|
maxDuration: route.maxDuration
|
|
1226
1238
|
};
|
|
1227
|
-
const key =
|
|
1239
|
+
const key = _chunkGUDYDNKUcjs.createFarmRouteRuntimeKey.call(void 0, config);
|
|
1228
1240
|
const group = groups.get(key) || { config, routes: [] };
|
|
1229
1241
|
group.routes.push(route);
|
|
1230
1242
|
groups.set(key, group);
|
|
@@ -1241,7 +1253,8 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
|
|
|
1241
1253
|
groupIndex += 1;
|
|
1242
1254
|
const functionName = `__farm_runtime_${groupIndex}`;
|
|
1243
1255
|
const functionDir = _path2.default.join(functionsDir, `${functionName}.func`);
|
|
1244
|
-
await fs5.
|
|
1256
|
+
await fs5.rm(functionDir, { recursive: true, force: true });
|
|
1257
|
+
await linkVercelFunctionFiles(baseFunctionDir, functionDir, fs5);
|
|
1245
1258
|
await configureVercelFunction(functionDir, group.config, fs5);
|
|
1246
1259
|
destinations.set(key, `/${functionName}`);
|
|
1247
1260
|
}
|
|
@@ -1251,7 +1264,7 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
|
|
|
1251
1264
|
const src = farmRoutePatternToVercelSource(route.pattern, basePath);
|
|
1252
1265
|
if (seenSources.has(src)) continue;
|
|
1253
1266
|
seenSources.add(src);
|
|
1254
|
-
const key =
|
|
1267
|
+
const key = _chunkGUDYDNKUcjs.createFarmRouteRuntimeKey.call(void 0, {
|
|
1255
1268
|
runtime: route.runtime === "auto" ? "node" : route.runtime,
|
|
1256
1269
|
regions: route.regions,
|
|
1257
1270
|
maxDuration: route.maxDuration
|
|
@@ -1260,6 +1273,26 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
|
|
|
1260
1273
|
}
|
|
1261
1274
|
return routes;
|
|
1262
1275
|
}
|
|
1276
|
+
var LINK_FALLBACK_CODES = /* @__PURE__ */ new Set(["EXDEV", "EPERM", "ENOTSUP", "EMLINK"]);
|
|
1277
|
+
async function linkVercelFunctionFiles(source, target, fs5, root = true) {
|
|
1278
|
+
await fs5.mkdir(target, { recursive: true });
|
|
1279
|
+
const entries = await fs5.readdir(source, { withFileTypes: true });
|
|
1280
|
+
await Promise.all(
|
|
1281
|
+
entries.map(async (entry) => {
|
|
1282
|
+
const from = _path2.default.join(source, entry.name);
|
|
1283
|
+
const to = _path2.default.join(target, entry.name);
|
|
1284
|
+
if (entry.isDirectory()) return linkVercelFunctionFiles(from, to, fs5, false);
|
|
1285
|
+
if (entry.isSymbolicLink()) return fs5.cp(from, to, { verbatimSymlinks: true });
|
|
1286
|
+
if (root && entry.name === ".vc-config.json") return fs5.copyFile(from, to);
|
|
1287
|
+
try {
|
|
1288
|
+
await fs5.link(from, to);
|
|
1289
|
+
} catch (error) {
|
|
1290
|
+
if (!LINK_FALLBACK_CODES.has(_nullishCoalesce(error.code, () => ( "")))) throw error;
|
|
1291
|
+
await fs5.copyFile(from, to, _fs.constants.COPYFILE_FICLONE);
|
|
1292
|
+
}
|
|
1293
|
+
})
|
|
1294
|
+
);
|
|
1295
|
+
}
|
|
1263
1296
|
function farmRoutePatternToVercelSource(pattern, basePath = "/") {
|
|
1264
1297
|
const normalized = normalizePattern(pattern);
|
|
1265
1298
|
const normalizedBasePath = normalizeBasePath(basePath);
|
|
@@ -1323,7 +1356,14 @@ function escapeRegExp(value) {
|
|
|
1323
1356
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1324
1357
|
}
|
|
1325
1358
|
|
|
1359
|
+
// src/nitro/vercel-not-found.ts
|
|
1360
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1361
|
+
|
|
1362
|
+
// src/nitro/vercel-assets.ts
|
|
1363
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1364
|
+
|
|
1326
1365
|
// src/nitro/immutable-assets.ts
|
|
1366
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1327
1367
|
|
|
1328
1368
|
var FARM_IMMUTABLE_ASSET_CACHE_CONTROL = "public, max-age=31536000, immutable";
|
|
1329
1369
|
var FARM_IMMUTABLE_ASSET_MAX_AGE = 31536e3;
|
|
@@ -1338,7 +1378,7 @@ function planFarmImmutableAssets(options) {
|
|
|
1338
1378
|
const cacheRulePatterns = Object.entries(_nullishCoalesce(options.routeRules, () => ( {}))).filter(
|
|
1339
1379
|
([, rule]) => Object.keys(_nullishCoalesce(_optionalChain([rule, 'optionalAccess', _28 => _28.headers]), () => ( {}))).some((name) => name.toLowerCase() === "cache-control")
|
|
1340
1380
|
).map(([pattern]) => pattern);
|
|
1341
|
-
const isImmutable = (file) => isFarmImmutableAssetPath(file) && !cacheRulePatterns.some((pattern) =>
|
|
1381
|
+
const isImmutable = (file) => isFarmImmutableAssetPath(file) && !cacheRulePatterns.some((pattern) => _chunkGUDYDNKUcjs.farmRouteRuleMatches.call(void 0, pattern, file));
|
|
1342
1382
|
const routeDirs = new Set(
|
|
1343
1383
|
(_nullishCoalesce(options.routePaths, () => ( []))).map((routePath) => routePath.split("/").filter(Boolean)[0])
|
|
1344
1384
|
);
|
|
@@ -1542,6 +1582,7 @@ function escapeRegExp3(value) {
|
|
|
1542
1582
|
}
|
|
1543
1583
|
|
|
1544
1584
|
// src/nitro/ssr-public-assets.ts
|
|
1585
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1545
1586
|
|
|
1546
1587
|
var SERVER_FILE_URL_RE = /new\s+URL\(\s*(["'`])([^"'`\\]+)\1\s*,\s*import\.meta\.url\s*\)/g;
|
|
1547
1588
|
function resolveBundleFileName(chunkFileName, relativeUrl) {
|
|
@@ -1605,7 +1646,7 @@ function collectServerOnlySSRAssets(bundle, polyroute = false) {
|
|
|
1605
1646
|
return serverOnly;
|
|
1606
1647
|
}
|
|
1607
1648
|
function canReadServerFiles(preset) {
|
|
1608
|
-
return
|
|
1649
|
+
return _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" && !preset.startsWith("cloudflare");
|
|
1609
1650
|
}
|
|
1610
1651
|
function assertServerReadSSRAssetsSupported(bundle, preset, root) {
|
|
1611
1652
|
if (canReadServerFiles(preset)) return;
|
|
@@ -1658,6 +1699,7 @@ function createServerReadSSRAssetsPlugin(bundle, ssrOutputDir) {
|
|
|
1658
1699
|
}
|
|
1659
1700
|
|
|
1660
1701
|
// src/nitro/netlify-entry.ts
|
|
1702
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1661
1703
|
|
|
1662
1704
|
|
|
1663
1705
|
function resolveNitroNetlifyEntry(nitroRuntimeEntry) {
|
|
@@ -1723,6 +1765,7 @@ export default async function farmNetlifyHandler(request, context) {
|
|
|
1723
1765
|
}
|
|
1724
1766
|
|
|
1725
1767
|
// src/build/strip-platform-config.ts
|
|
1768
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1726
1769
|
|
|
1727
1770
|
|
|
1728
1771
|
var PLATFORM_CONFIG_KEYS = /* @__PURE__ */ new Set(["desktop", "mobile"]);
|
|
@@ -1809,7 +1852,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
|
|
|
1809
1852
|
// removed block used (`readFileSync` for a version, say).
|
|
1810
1853
|
enforce: "pre",
|
|
1811
1854
|
transform: {
|
|
1812
|
-
filter: { id:
|
|
1855
|
+
filter: { id: _chunkUBH2OARScjs.fileNamePattern.call(void 0, configFiles) },
|
|
1813
1856
|
async handler(code, id) {
|
|
1814
1857
|
const file = id.split("?", 1)[0];
|
|
1815
1858
|
if (!files.has(_path2.default.resolve(file)) && !files.has(realPath(file))) return null;
|
|
@@ -1824,6 +1867,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
|
|
|
1824
1867
|
}
|
|
1825
1868
|
|
|
1826
1869
|
// src/build/markdown-precompile.ts
|
|
1870
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1827
1871
|
|
|
1828
1872
|
|
|
1829
1873
|
|
|
@@ -1877,6 +1921,7 @@ function precompileFarmMarkdownPages(bodies, coreRoot) {
|
|
|
1877
1921
|
}
|
|
1878
1922
|
|
|
1879
1923
|
// src/nitro/client-sourcemaps.ts
|
|
1924
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1880
1925
|
|
|
1881
1926
|
|
|
1882
1927
|
var FARM_CLIENT_SOURCEMAPS_DIR = "client-sourcemaps";
|
|
@@ -1911,6 +1956,7 @@ function createFarmPrivateClientSourcemapsPlugin(options) {
|
|
|
1911
1956
|
}
|
|
1912
1957
|
|
|
1913
1958
|
// src/nitro/client-brotli-assets.ts
|
|
1959
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1914
1960
|
|
|
1915
1961
|
|
|
1916
1962
|
|
|
@@ -1946,7 +1992,11 @@ async function writeFarmClientBrotliAssets(clientOutputDir) {
|
|
|
1946
1992
|
await Promise.all(Array.from({ length: _os.availableParallelism.call(void 0, ) }, next));
|
|
1947
1993
|
}
|
|
1948
1994
|
|
|
1995
|
+
// src/nitro/client-chunks.ts
|
|
1996
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1997
|
+
|
|
1949
1998
|
// src/nitro/islands-react-chunk.ts
|
|
1999
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1950
2000
|
var REACT_MODULE = /[\\/]node_modules[\\/](?:react|react-dom|scheduler)[\\/]/;
|
|
1951
2001
|
var REACT_DOM_MODULE = /[\\/]node_modules[\\/]react-dom[\\/]/;
|
|
1952
2002
|
var FARM_EAGER_COMPILE_HINT = "//# allFunctionsCalledOnLoad";
|
|
@@ -2036,6 +2086,7 @@ function createFarmClientChunksPlugin(options) {
|
|
|
2036
2086
|
}
|
|
2037
2087
|
|
|
2038
2088
|
// src/middleware/static-config.ts
|
|
2089
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
2039
2090
|
function literalMatcher(node) {
|
|
2040
2091
|
if (!node) return void 0;
|
|
2041
2092
|
if (node.type === "Literal" && typeof node.value === "string") return node.value;
|
|
@@ -2110,6 +2161,7 @@ async function readMiddlewareFileConfig(filePath) {
|
|
|
2110
2161
|
}
|
|
2111
2162
|
|
|
2112
2163
|
// src/nitro/vercel-edge-middleware.ts
|
|
2164
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
2113
2165
|
|
|
2114
2166
|
|
|
2115
2167
|
|
|
@@ -2128,7 +2180,7 @@ function escapeRegExp4(value) {
|
|
|
2128
2180
|
}
|
|
2129
2181
|
function toFarmVercelEdgeGuardedUrls(pathnames, basePath) {
|
|
2130
2182
|
return [
|
|
2131
|
-
...new Set(pathnames.flatMap((pathname) => [pathname,
|
|
2183
|
+
...new Set(pathnames.flatMap((pathname) => [pathname, _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, pathname, basePath)]))
|
|
2132
2184
|
];
|
|
2133
2185
|
}
|
|
2134
2186
|
function createFarmVercelEdgeMiddlewareRoutes(pathnames, basePath = "/") {
|
|
@@ -2159,8 +2211,8 @@ ${modules.join("\n")}
|
|
|
2159
2211
|
],
|
|
2160
2212
|
i18n: ${JSON.stringify(config.i18n)},
|
|
2161
2213
|
server: ${JSON.stringify({ trustProxy: _optionalChain([config, 'access', _64 => _64.server, 'optionalAccess', _65 => _65.trustProxy]) === true })},
|
|
2162
|
-
apiBasePath: ${JSON.stringify(
|
|
2163
|
-
notFoundPath: ${JSON.stringify(
|
|
2214
|
+
apiBasePath: ${JSON.stringify(_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))},
|
|
2215
|
+
notFoundPath: ${JSON.stringify(_chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, FARM_VERCEL_EDGE_NOT_FOUND_PATH, config.basePath))},
|
|
2164
2216
|
pages: ${JSON.stringify(toFarmVercelEdgeGuardedUrls(guardedPages, config.basePath))},
|
|
2165
2217
|
});
|
|
2166
2218
|
`;
|
|
@@ -2217,7 +2269,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
|
|
|
2217
2269
|
logLevel: "silent",
|
|
2218
2270
|
plugins: [edgeNodeModulesPlugin(coreDir, unsupported)],
|
|
2219
2271
|
resolve: {
|
|
2220
|
-
alias:
|
|
2272
|
+
alias: _chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
2221
2273
|
conditionNames: ["edge-light", "worker", "browser", "import", "module", "default"]
|
|
2222
2274
|
},
|
|
2223
2275
|
transform: {
|
|
@@ -2236,7 +2288,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
|
|
|
2236
2288
|
await bundle.close();
|
|
2237
2289
|
}
|
|
2238
2290
|
} catch (error) {
|
|
2239
|
-
throw
|
|
2291
|
+
throw _chunkLVYUTMW4cjs.withPlainDiagnostics.call(void 0, error);
|
|
2240
2292
|
} finally {
|
|
2241
2293
|
await fs5.rm(entryPath, { force: true });
|
|
2242
2294
|
}
|
|
@@ -2257,11 +2309,11 @@ Remove them from the middleware (Edge provides ${[...EDGE_NODE_MODULES].join(",
|
|
|
2257
2309
|
);
|
|
2258
2310
|
const gzippedBytes = _zlib.gzipSync.call(void 0, code).length;
|
|
2259
2311
|
if (gzippedBytes > EDGE_FUNCTION_SIZE_WARNING_BYTES) {
|
|
2260
|
-
|
|
2312
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2261
2313
|
`Vercel edge middleware is ${(gzippedBytes / 1024 / 1024).toFixed(2)} MB gzipped, over the Hobby plan's 1 MB Edge function limit (Pro allows 2 MB, Enterprise 4 MB).`
|
|
2262
2314
|
);
|
|
2263
2315
|
}
|
|
2264
|
-
|
|
2316
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
2265
2317
|
`\u{1F6E1}\uFE0F Vercel edge middleware: ${routes.length} middleware file(s) guard their prerendered pages before the CDN serves them`
|
|
2266
2318
|
);
|
|
2267
2319
|
}
|
|
@@ -2287,7 +2339,7 @@ function preloadFarmNitroBuilder() {
|
|
|
2287
2339
|
(reason) => ({ status: "rejected", reason })
|
|
2288
2340
|
);
|
|
2289
2341
|
}
|
|
2290
|
-
var _filename = typeof
|
|
2342
|
+
var _filename = typeof _chunkUGL4BDNBcjs.define_import_meta_default.url !== "undefined" ? _url.fileURLToPath.call(void 0, _chunkUGL4BDNBcjs.define_import_meta_default.url) : "";
|
|
2291
2343
|
var _dirname = _path2.default.dirname(_filename);
|
|
2292
2344
|
function findFarmCoreRoot(from) {
|
|
2293
2345
|
let dir = _path2.default.dirname(from);
|
|
@@ -2405,6 +2457,7 @@ var NITRO_EXTERNAL_MODULES = /* @__PURE__ */ new Set([
|
|
|
2405
2457
|
var NITRO_REACT_RUNTIME_MODULES = /* @__PURE__ */ new Set(["react", "react-dom", "react-dom/server"]);
|
|
2406
2458
|
var FARM_SSR_PACKAGE_IMPORT = "#farm-ssr-entry";
|
|
2407
2459
|
var FARM_SSR_OUTPUT_DIR = "farm-ssr";
|
|
2460
|
+
var PREBUILT_SSR_PRESETS = /* @__PURE__ */ new Set(["node-server", "vercel"]);
|
|
2408
2461
|
var FARM_CLIENT_BUILD_TARGET = ["es2020", "edge88", "firefox78", "chrome87", "safari14"];
|
|
2409
2462
|
function resolveNitroRuntimeDependency(root, specifier) {
|
|
2410
2463
|
return _module.createRequire.call(void 0, resolveNitroPackageEntry(root)).resolve(specifier).split(_path2.default.sep).join("/");
|
|
@@ -2439,7 +2492,7 @@ function createPrerenderMarkdownPagesPlugin(pages) {
|
|
|
2439
2492
|
const compiled = await pages;
|
|
2440
2493
|
if (compiled.size === 0) return "";
|
|
2441
2494
|
return `globalThis[Symbol.for(${JSON.stringify(
|
|
2442
|
-
|
|
2495
|
+
_chunk27IPPPCVcjs.FARM_MARKDOWN_PRECOMPILED_PAGES.description
|
|
2443
2496
|
)})] = new Map(${JSON.stringify([...compiled])});`;
|
|
2444
2497
|
}
|
|
2445
2498
|
};
|
|
@@ -2470,7 +2523,7 @@ function createPrerenderRuntimeResolverPlugin(root, resolveNitroEntry = resolveN
|
|
|
2470
2523
|
};
|
|
2471
2524
|
}
|
|
2472
2525
|
function createFarmStorageModuleRegistration(config) {
|
|
2473
|
-
const modules =
|
|
2526
|
+
const modules = _chunkOCQSYDMGcjs._collectFarmStorageModules.call(void 0, config.storage);
|
|
2474
2527
|
if (modules.length === 0) return "";
|
|
2475
2528
|
const root = config.root || process.cwd();
|
|
2476
2529
|
const projectRequire = _module.createRequire.call(void 0, _path2.default.join(root, "package.json"));
|
|
@@ -2577,7 +2630,7 @@ function hasReactDomEdgeServerBuild(root) {
|
|
|
2577
2630
|
}
|
|
2578
2631
|
}
|
|
2579
2632
|
function shouldAliasReactServerToWebBuild(renderer, preset) {
|
|
2580
|
-
return
|
|
2633
|
+
return _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge";
|
|
2581
2634
|
}
|
|
2582
2635
|
function isCloudflareImagePreset(preset) {
|
|
2583
2636
|
return preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module";
|
|
@@ -2619,7 +2672,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
|
|
|
2619
2672
|
return {
|
|
2620
2673
|
name: "farm-omitted-metadata-image-runtime",
|
|
2621
2674
|
resolveId: {
|
|
2622
|
-
filter: { id:
|
|
2675
|
+
filter: { id: _chunkUBH2OARScjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
|
|
2623
2676
|
handler(source, importer) {
|
|
2624
2677
|
if (source !== "@vercel/og") return null;
|
|
2625
2678
|
const fromCoreRuntime = importer !== void 0 && isFarmCoreModule(importer) && !/^og\.[cm]?[jt]sx?$/.test(_path2.default.basename(importer.split("?", 1)[0]));
|
|
@@ -2628,7 +2681,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
|
|
|
2628
2681
|
}
|
|
2629
2682
|
},
|
|
2630
2683
|
load: {
|
|
2631
|
-
filter: { id:
|
|
2684
|
+
filter: { id: _chunkUBH2OARScjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
|
|
2632
2685
|
handler(id) {
|
|
2633
2686
|
if (id !== FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID) return null;
|
|
2634
2687
|
return `
|
|
@@ -2677,7 +2730,7 @@ function createEdgeMetadataImageRuntimePlugin({
|
|
|
2677
2730
|
return null;
|
|
2678
2731
|
}
|
|
2679
2732
|
const resolvedPath = _path2.default.resolve(_path2.default.dirname(importer.split("?", 1)[0]), source);
|
|
2680
|
-
return { id:
|
|
2733
|
+
return { id: _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolvedPath), external: "absolute" };
|
|
2681
2734
|
}
|
|
2682
2735
|
};
|
|
2683
2736
|
}
|
|
@@ -2907,7 +2960,7 @@ function resolveBuildDocsContentDir(docs, root, srcDir) {
|
|
|
2907
2960
|
return _fs.existsSync.call(void 0, rootDocsDir) ? rootDocsDir : null;
|
|
2908
2961
|
}
|
|
2909
2962
|
function getFarmDocsBundledRootPaths(docs, root, srcDir) {
|
|
2910
|
-
return
|
|
2963
|
+
return _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, docs).slice(1).map((docsRoot) => {
|
|
2911
2964
|
const contentDir = resolveBuildDocsContentDir(docsRoot, root, srcDir);
|
|
2912
2965
|
const relativePath = contentDir ? _path2.default.relative(root, contentDir) : "";
|
|
2913
2966
|
return relativePath === ".." || relativePath.startsWith(`..${_path2.default.sep}`) || _path2.default.isAbsolute(relativePath) ? "" : relativePath.split(_path2.default.sep).join("/");
|
|
@@ -2964,9 +3017,9 @@ function hasFarmPluginRoutes(config) {
|
|
|
2964
3017
|
}
|
|
2965
3018
|
function farmServerRuntimePluginsMayHandlePath(config, pathname) {
|
|
2966
3019
|
return (config.plugins || []).some(
|
|
2967
|
-
(plugin) =>
|
|
3020
|
+
(plugin) => _chunkN4AM7Q34cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
|
|
2968
3021
|
// prerendered file never answers or sends; its endpoints live under /__farm/.
|
|
2969
|
-
plugin.name !==
|
|
3022
|
+
plugin.name !== _chunk6AUPJYHFcjs.FARM_MOBILE_SESSION_PLUGIN && _chunkUOFTT6S4cjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
|
|
2970
3023
|
);
|
|
2971
3024
|
}
|
|
2972
3025
|
async function discoverMiddlewareRoutes(appDir) {
|
|
@@ -2996,8 +3049,8 @@ async function discoverMiddlewareRoutes(appDir) {
|
|
|
2996
3049
|
}
|
|
2997
3050
|
await walk(
|
|
2998
3051
|
_path2.default.join(dir, entry.name),
|
|
2999
|
-
|
|
3000
|
-
|
|
3052
|
+
_chunkNQUZDXKJcjs.appendMiddlewareRoutePath.call(void 0, routePath, entry.name),
|
|
3053
|
+
_chunkNQUZDXKJcjs.appendMiddlewareDirectory.call(void 0, directory, entry.name),
|
|
3001
3054
|
discovered
|
|
3002
3055
|
);
|
|
3003
3056
|
}
|
|
@@ -3009,10 +3062,10 @@ async function discoverMiddlewareRoutes(appDir) {
|
|
|
3009
3062
|
routes.set(route.directory, route);
|
|
3010
3063
|
}
|
|
3011
3064
|
}
|
|
3012
|
-
return Array.from(routes.values()).sort(
|
|
3065
|
+
return Array.from(routes.values()).sort(_chunkNQUZDXKJcjs.compareMiddlewareRouteLocations).map(({ path: routePath, filePath }) => ({ path: routePath, filePath }));
|
|
3013
3066
|
}
|
|
3014
3067
|
function assertFarmDocsRuntimeSupported(config, preset) {
|
|
3015
|
-
if (!_optionalChain([config, 'access', _92 => _92.docs, 'optionalAccess', _93 => _93.enabled]) || !_optionalChain([config, 'access', _94 => _94.docs, 'access', _95 => _95.adapter, 'optionalAccess', _96 => _96.server]) ||
|
|
3068
|
+
if (!_optionalChain([config, 'access', _92 => _92.docs, 'optionalAccess', _93 => _93.enabled]) || !_optionalChain([config, 'access', _94 => _94.docs, 'access', _95 => _95.adapter, 'optionalAccess', _96 => _96.server]) || _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" || Boolean(config.docs.adapter.edgeCompiler)) {
|
|
3016
3069
|
return;
|
|
3017
3070
|
}
|
|
3018
3071
|
throw new Error(
|
|
@@ -3027,10 +3080,10 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
3027
3080
|
const distDir = config.distDir || ".farm";
|
|
3028
3081
|
const lifecyclePluginManager = options.pluginManager;
|
|
3029
3082
|
const productionViteResultPromise = Promise.allSettled([
|
|
3030
|
-
Promise.resolve(_nullishCoalesce(options.productionVite, () => (
|
|
3083
|
+
Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunk2L4M6YUGcjs.loadFarmProductionVite.call(void 0, ))))
|
|
3031
3084
|
]);
|
|
3032
3085
|
const nitroBuilderResultPromise = preloadFarmNitroBuilder();
|
|
3033
|
-
|
|
3086
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F69C} Building Farm.js application (universal) with preset: ${preset}...`);
|
|
3034
3087
|
const rendererBuild = options.rendererBuildLifetime ? void 0 : new AbortController();
|
|
3035
3088
|
const rendererBuildLifetime = _nullishCoalesce(options.rendererBuildLifetime, () => ( rendererBuild.signal));
|
|
3036
3089
|
let markdownPrecompile;
|
|
@@ -3047,7 +3100,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
3047
3100
|
routeManager.getSearchPreserveRoutes().map((route) => [route.pattern, route])
|
|
3048
3101
|
);
|
|
3049
3102
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
3050
|
-
const markdownSourcePath = entry.markdownSourcePath || (
|
|
3103
|
+
const markdownSourcePath = entry.markdownSourcePath || (_chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
|
|
3051
3104
|
const searchPreserve = searchPreserveRoutes.get(entry.pattern);
|
|
3052
3105
|
pageRoutes.push({
|
|
3053
3106
|
pattern,
|
|
@@ -3077,13 +3130,13 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
3077
3130
|
fallback: entry.fallback
|
|
3078
3131
|
})
|
|
3079
3132
|
);
|
|
3080
|
-
|
|
3133
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes`);
|
|
3081
3134
|
const fs5 = await import("fs/promises");
|
|
3082
3135
|
const layoutRoutes = Array.from(routeManager.getLayouts(), ([pattern, { modulePath }]) => ({
|
|
3083
3136
|
pattern,
|
|
3084
3137
|
modulePath
|
|
3085
3138
|
}));
|
|
3086
|
-
|
|
3139
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes and ${layoutRoutes.length} layouts`);
|
|
3087
3140
|
const isolatedClientBoundaryModules = routeManager.getIsolatedClientBoundaryModules(root);
|
|
3088
3141
|
const islandsErrors = routeManager.getIslandsErrors(root);
|
|
3089
3142
|
if (islandsErrors.length > 0) {
|
|
@@ -3102,9 +3155,9 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3102
3155
|
throw productionViteResult.reason;
|
|
3103
3156
|
}
|
|
3104
3157
|
const productionVite = productionViteResult.value;
|
|
3105
|
-
|
|
3158
|
+
_chunk7ZDLE77Pcjs.logger.info("\u26A1 Building application bundles with Vite Rolldown");
|
|
3106
3159
|
const mobileClient = shouldBuildFarmMobileClient(config);
|
|
3107
|
-
const rendererDisabled =
|
|
3160
|
+
const rendererDisabled = _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer);
|
|
3108
3161
|
const buildClientBundle = async () => {
|
|
3109
3162
|
if (rendererDisabled) {
|
|
3110
3163
|
await fs5.rm(clientOutputDir, { recursive: true, force: true });
|
|
@@ -3147,11 +3200,11 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3147
3200
|
let clientBuildResult;
|
|
3148
3201
|
let ssrBuildResult;
|
|
3149
3202
|
if (!rendererDisabled && config.renderer.buildConcurrency === "serial") {
|
|
3150
|
-
|
|
3203
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} Building client and SSR bundles serially for ${config.renderer.name}...`);
|
|
3151
3204
|
[clientBuildResult] = await Promise.allSettled([buildClientBundle()]);
|
|
3152
3205
|
[ssrBuildResult] = await Promise.allSettled([buildSSRBundle()]);
|
|
3153
3206
|
} else {
|
|
3154
|
-
|
|
3207
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
3155
3208
|
rendererDisabled ? "\u{1F4E6} Building the server bundle (renderer: false, no client bundle)..." : "\u{1F4E6} Building client and SSR bundles in parallel..."
|
|
3156
3209
|
);
|
|
3157
3210
|
[clientBuildResult, ssrBuildResult] = await Promise.allSettled([
|
|
@@ -3168,7 +3221,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3168
3221
|
if (productionVite.builder !== "rolldown" || !(clientBuildResult.reason instanceof IncompleteClientBuildOutputError)) {
|
|
3169
3222
|
throw clientBuildResult.reason;
|
|
3170
3223
|
}
|
|
3171
|
-
|
|
3224
|
+
_chunk7ZDLE77Pcjs.logger.warn("Client bundle was incomplete; retrying after the SSR build...");
|
|
3172
3225
|
try {
|
|
3173
3226
|
await buildClient(
|
|
3174
3227
|
productionVite,
|
|
@@ -3198,7 +3251,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3198
3251
|
const routeRuntimeManifest = routeRuntimeManifestResult.value;
|
|
3199
3252
|
const runtimeValidation = validateFarmRouteRuntimeDeployment(routeRuntimeManifest, preset);
|
|
3200
3253
|
for (const warning of runtimeValidation.warnings) {
|
|
3201
|
-
|
|
3254
|
+
_chunk7ZDLE77Pcjs.logger.warn(warning);
|
|
3202
3255
|
}
|
|
3203
3256
|
const { bundle: ssrBundle, entryFile: ssrEntryFile, configuredHeaderRoutes } = ssrResult;
|
|
3204
3257
|
assertServerReadSSRAssetsSupported(ssrBundle, preset, root);
|
|
@@ -3209,7 +3262,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3209
3262
|
if (config.docs.enabled) {
|
|
3210
3263
|
await copyFarmDocsFontAssetsToClient(root, clientOutputDir);
|
|
3211
3264
|
}
|
|
3212
|
-
|
|
3265
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
|
|
3213
3266
|
await buildNitroUniversal(
|
|
3214
3267
|
config,
|
|
3215
3268
|
routeManager,
|
|
@@ -3231,7 +3284,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3231
3284
|
_path2.default.join(root, distDir),
|
|
3232
3285
|
routeRuntimeManifest
|
|
3233
3286
|
);
|
|
3234
|
-
|
|
3287
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Route runtime manifest: ${_path2.default.relative(root, runtimeManifestPath)}`);
|
|
3235
3288
|
} catch (error) {
|
|
3236
3289
|
if (lifecyclePluginManager) {
|
|
3237
3290
|
await lifecyclePluginManager.runHookParallel("onError", {
|
|
@@ -3243,7 +3296,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3243
3296
|
}
|
|
3244
3297
|
});
|
|
3245
3298
|
}
|
|
3246
|
-
|
|
3299
|
+
_chunk7ZDLE77Pcjs.logger.error(`\u274C Build failed: ${error}`);
|
|
3247
3300
|
throw error;
|
|
3248
3301
|
} finally {
|
|
3249
3302
|
_optionalChain([rendererBuild, 'optionalAccess', _100 => _100.abort, 'call', _101 => _101()]);
|
|
@@ -3253,10 +3306,10 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3253
3306
|
function collectFarmPrerenderedMarkdownBodies(pageRoutes) {
|
|
3254
3307
|
const bodies = [];
|
|
3255
3308
|
for (const route of pageRoutes) {
|
|
3256
|
-
if (route.source === void 0 || !
|
|
3257
|
-
const { body } =
|
|
3258
|
-
const rendering =
|
|
3259
|
-
|
|
3309
|
+
if (route.source === void 0 || !_chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) continue;
|
|
3310
|
+
const { body } = _chunk27IPPPCVcjs.parseMarkdownFrontmatter.call(void 0, route.source);
|
|
3311
|
+
const rendering = _chunkKM7ZRKCHcjs.resolveRouteRenderingConfig.call(void 0,
|
|
3312
|
+
_chunk27IPPPCVcjs.readFarmMarkdownRouteConfig.call(void 0, body),
|
|
3260
3313
|
route.source
|
|
3261
3314
|
);
|
|
3262
3315
|
if (rendering.ssg && rendering.revalidate === void 0) bodies.push(body);
|
|
@@ -3291,15 +3344,19 @@ async function writeSSRAssetsToClient(bundle, outputDir, polyroute) {
|
|
|
3291
3344
|
}
|
|
3292
3345
|
const filePath = _path2.default.join(outputDir, fileName);
|
|
3293
3346
|
await fs5.mkdir(_path2.default.dirname(filePath), { recursive: true });
|
|
3294
|
-
|
|
3347
|
+
try {
|
|
3348
|
+
await fs5.writeFile(filePath, output.source, { flag: "wx" });
|
|
3349
|
+
} catch (error) {
|
|
3350
|
+
if (error.code !== "EEXIST") throw error;
|
|
3351
|
+
}
|
|
3295
3352
|
}
|
|
3296
3353
|
}
|
|
3297
3354
|
async function writeFarmVideoPlayerToClient(outputDir) {
|
|
3298
3355
|
const fs5 = await import("fs/promises");
|
|
3299
|
-
const filePath = _path2.default.join(outputDir,
|
|
3356
|
+
const filePath = _path2.default.join(outputDir, _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH.slice(1));
|
|
3300
3357
|
await fs5.mkdir(_path2.default.dirname(filePath), { recursive: true });
|
|
3301
3358
|
try {
|
|
3302
|
-
await fs5.writeFile(filePath,
|
|
3359
|
+
await fs5.writeFile(filePath, _chunkUBH2OARScjs.FARM_VIDEO_PLAYER_HTML, { flag: "wx" });
|
|
3303
3360
|
} catch (error) {
|
|
3304
3361
|
if (error.code !== "EEXIST") throw error;
|
|
3305
3362
|
}
|
|
@@ -3307,7 +3364,7 @@ async function writeFarmVideoPlayerToClient(outputDir) {
|
|
|
3307
3364
|
async function copyFarmDocsFontAssetsToClient(root, outputDir) {
|
|
3308
3365
|
const fs5 = await import("fs/promises");
|
|
3309
3366
|
await Promise.all(
|
|
3310
|
-
|
|
3367
|
+
_chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, root).map(async ({ sourcePath, url }) => {
|
|
3311
3368
|
const targetPath = _path2.default.join(outputDir, url.replace(/^\/+/, ""));
|
|
3312
3369
|
await fs5.mkdir(_path2.default.dirname(targetPath), { recursive: true });
|
|
3313
3370
|
await fs5.copyFile(sourcePath, targetPath);
|
|
@@ -3333,7 +3390,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
|
|
|
3333
3390
|
}
|
|
3334
3391
|
const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
|
|
3335
3392
|
await fs5.writeFile(fontCssPath, normalizedFontCss);
|
|
3336
|
-
await fs5.writeFile(clientCssPath,
|
|
3393
|
+
await fs5.writeFile(clientCssPath, _chunkUBH2OARScjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
3337
3394
|
}
|
|
3338
3395
|
function importsFarmClientBlockedPackage(id, packageName) {
|
|
3339
3396
|
return id === packageName || id.startsWith(`${packageName}/`);
|
|
@@ -3383,16 +3440,16 @@ async function validateClientBuildOutput(root, srcDir, outputDir) {
|
|
|
3383
3440
|
}
|
|
3384
3441
|
}
|
|
3385
3442
|
function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, options = {}) {
|
|
3386
|
-
const key =
|
|
3443
|
+
const key = _chunkPSALMEHJcjs.getClientModuleHydrationPlanKey.call(void 0, modulePath, root, mode, options);
|
|
3387
3444
|
let plan = cache.get(key);
|
|
3388
3445
|
if (!plan) {
|
|
3389
|
-
plan =
|
|
3446
|
+
plan = _chunkPSALMEHJcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
3390
3447
|
cache.set(key, plan);
|
|
3391
3448
|
}
|
|
3392
3449
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
3393
3450
|
}
|
|
3394
3451
|
async function buildClient(productionVite, config, root, srcDir, outputDir, pageRoutes, layoutRoutes = [], routeSlots = [], isolatedClientBoundaryModules = /* @__PURE__ */ new Set(), hydrationPlanCache = /* @__PURE__ */ new Map(), rendererBuildLifetime, programmaticClientRoutes, mobile = false, sourceSnapshot) {
|
|
3395
|
-
if (!mobile) await
|
|
3452
|
+
if (!mobile) await _chunk4JARM2QQcjs.removeFarmMobileClientManifest.call(void 0, _path2.default.dirname(outputDir));
|
|
3396
3453
|
const viteBuild = productionVite.build;
|
|
3397
3454
|
const {
|
|
3398
3455
|
farmIslandContainersPlugin,
|
|
@@ -3400,7 +3457,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3400
3457
|
farmPlugin,
|
|
3401
3458
|
farmServerOnlyEntriesPlugin
|
|
3402
3459
|
} = await import("./vite.cjs");
|
|
3403
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
3460
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
|
|
3404
3461
|
const fs5 = await import("fs/promises");
|
|
3405
3462
|
const pluginManager = new PluginManager2({
|
|
3406
3463
|
config,
|
|
@@ -3409,41 +3466,41 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3409
3466
|
});
|
|
3410
3467
|
pluginManager.addPlugins(config.plugins || []);
|
|
3411
3468
|
const clientPages = [];
|
|
3412
|
-
const integrationProviders =
|
|
3469
|
+
const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations).filter(
|
|
3413
3470
|
(provider) => provider.component || provider.type === "clerk"
|
|
3414
3471
|
);
|
|
3415
3472
|
const unsupportedIntegrationProvider = integrationProviders.find(
|
|
3416
|
-
(provider) => !
|
|
3473
|
+
(provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider)
|
|
3417
3474
|
);
|
|
3418
|
-
if (_optionalChain([config, 'access', _106 => _106.experimental, 'optionalAccess', _107 => _107.isolatedClientHydration]) === "enabled" &&
|
|
3419
|
-
|
|
3475
|
+
if (_optionalChain([config, 'access', _106 => _106.experimental, 'optionalAccess', _107 => _107.isolatedClientHydration]) === "enabled" && _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _108 => _108.experimental, 'optionalAccess', _109 => _109.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
|
|
3476
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
3420
3477
|
`[Farm.js] Client components hydrate with their route, not as islands, because integration provider "${unsupportedIntegrationProvider.name}" doesn't declare \`islands: true\`.`
|
|
3421
3478
|
);
|
|
3422
3479
|
}
|
|
3423
|
-
const isolatedMode =
|
|
3480
|
+
const isolatedMode = _chunkPSALMEHJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
3424
3481
|
_optionalChain([config, 'access', _110 => _110.experimental, 'optionalAccess', _111 => _111.isolatedClientHydration]),
|
|
3425
3482
|
{
|
|
3426
|
-
serverComponents:
|
|
3483
|
+
serverComponents: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverComponents])) === "rsc",
|
|
3427
3484
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
3428
3485
|
}
|
|
3429
3486
|
);
|
|
3430
|
-
const planOptions =
|
|
3487
|
+
const planOptions = _chunkPSALMEHJcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
3431
3488
|
config.renderer,
|
|
3432
3489
|
Boolean(unsupportedIntegrationProvider)
|
|
3433
3490
|
);
|
|
3434
3491
|
const pagePlanOptions = {
|
|
3435
3492
|
...planOptions,
|
|
3436
|
-
serverOwners:
|
|
3493
|
+
serverOwners: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _114 => _114.experimental, 'optionalAccess', _115 => _115.serverComponents])) === "islands"
|
|
3437
3494
|
};
|
|
3438
3495
|
const layoutPlanOptions = {
|
|
3439
3496
|
...planOptions,
|
|
3440
3497
|
serverTreeLayouts: pagePlanOptions.serverOwners
|
|
3441
3498
|
};
|
|
3442
|
-
const layoutAppliesToRoute =
|
|
3499
|
+
const layoutAppliesToRoute = _chunkIGBQSUT5cjs.routeBoundaryCoversDirectory;
|
|
3443
3500
|
const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
|
|
3444
|
-
const islandsMode =
|
|
3445
|
-
const adapterOwnsDocsRuntime =
|
|
3446
|
-
const docsEntries = _optionalChain([config, 'access', _118 => _118.docs, 'optionalAccess', _119 => _119.enabled]) ?
|
|
3501
|
+
const islandsMode = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _116 => _116.experimental, 'optionalAccess', _117 => _117.serverComponents])) === "islands";
|
|
3502
|
+
const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs);
|
|
3503
|
+
const docsEntries = _optionalChain([config, 'access', _118 => _118.docs, 'optionalAccess', _119 => _119.enabled]) ? _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs).map(
|
|
3447
3504
|
(docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
|
|
3448
3505
|
) : [];
|
|
3449
3506
|
const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
|
|
@@ -3452,7 +3509,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3452
3509
|
);
|
|
3453
3510
|
const syntheticDocsEntry = _optionalChain([config, 'access', _120 => _120.docs, 'optionalAccess', _121 => _121.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
3454
3511
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
3455
|
-
const plan = (operation) => sourceSnapshot ?
|
|
3512
|
+
const plan = (operation) => sourceSnapshot ? _chunkPSALMEHJcjs.withFarmSourceSnapshotOf.call(void 0, sourceSnapshot, operation) : _chunkPSALMEHJcjs.withFarmSourceSnapshot.call(void 0, operation);
|
|
3456
3513
|
const { clientLayouts, clientRouteSlots } = plan(() => {
|
|
3457
3514
|
const clientLayouts2 = layoutRoutes.map((layout) => {
|
|
3458
3515
|
try {
|
|
@@ -3480,7 +3537,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3480
3537
|
serverTreeLayout: metadata.serverTreeLayout
|
|
3481
3538
|
};
|
|
3482
3539
|
} catch (error) {
|
|
3483
|
-
|
|
3540
|
+
_chunk7ZDLE77Pcjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
|
|
3484
3541
|
return {
|
|
3485
3542
|
...layout,
|
|
3486
3543
|
shouldHydrate: false,
|
|
@@ -3499,15 +3556,15 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3499
3556
|
};
|
|
3500
3557
|
}
|
|
3501
3558
|
});
|
|
3502
|
-
const markdownPagePlan =
|
|
3503
|
-
|
|
3559
|
+
const markdownPagePlan = _chunkPSALMEHJcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
3560
|
+
_chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, config.mdx), root),
|
|
3504
3561
|
root,
|
|
3505
3562
|
isolatedMode,
|
|
3506
3563
|
{ ...planOptions, packageReferences: pagePlanOptions.serverOwners }
|
|
3507
3564
|
);
|
|
3508
3565
|
const routePlans = pageRoutes.map((route) => ({
|
|
3509
3566
|
route,
|
|
3510
|
-
metadata:
|
|
3567
|
+
metadata: _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
3511
3568
|
route.modulePath,
|
|
3512
3569
|
root,
|
|
3513
3570
|
isolatedMode,
|
|
@@ -3515,7 +3572,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3515
3572
|
pagePlanOptions
|
|
3516
3573
|
)
|
|
3517
3574
|
}));
|
|
3518
|
-
|
|
3575
|
+
_chunkPSALMEHJcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
3519
3576
|
clientLayouts2.map((layout) => ({
|
|
3520
3577
|
pattern: layout.pattern,
|
|
3521
3578
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -3524,7 +3581,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3524
3581
|
[
|
|
3525
3582
|
...routePlans.map(({ route, metadata }) => ({
|
|
3526
3583
|
pattern: routeDirectory(route),
|
|
3527
|
-
depth:
|
|
3584
|
+
depth: _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
|
|
3528
3585
|
metadata
|
|
3529
3586
|
})),
|
|
3530
3587
|
...syntheticDocsPatterns.map((pattern) => ({
|
|
@@ -3548,8 +3605,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3548
3605
|
for (const layout of clientLayouts2) {
|
|
3549
3606
|
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
3550
3607
|
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
3551
|
-
|
|
3552
|
-
`\u26A0\uFE0F ${
|
|
3608
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
3609
|
+
`\u26A0\uFE0F ${_chunkPSALMEHJcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
|
|
3553
3610
|
);
|
|
3554
3611
|
}
|
|
3555
3612
|
}
|
|
@@ -3561,7 +3618,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3561
3618
|
if (!("isolatedHydrationEligible" in metadata) || !metadata.isolatedHydrationEligible) {
|
|
3562
3619
|
continue;
|
|
3563
3620
|
}
|
|
3564
|
-
|
|
3621
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
3565
3622
|
`\u{1F4CA} Isolated hydration analysis: ${entry.modulePath} can exclude its server owner and hydrate ${metadata.isolatedBoundaries.length} client ${metadata.isolatedBoundaries.length === 1 ? "boundary" : "boundaries"}.`
|
|
3566
3623
|
);
|
|
3567
3624
|
}
|
|
@@ -3583,8 +3640,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3583
3640
|
(layout) => (layout.shouldHydrate || layout.hasIsolatedClientBoundaries) && layoutAppliesToRoute(layout.pattern, routeDirectory(route))
|
|
3584
3641
|
);
|
|
3585
3642
|
if (metadata.suppressedAsyncHydration) {
|
|
3586
|
-
|
|
3587
|
-
`\u26A0\uFE0F ${
|
|
3643
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
3644
|
+
`\u26A0\uFE0F ${_chunkPSALMEHJcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
|
|
3588
3645
|
);
|
|
3589
3646
|
}
|
|
3590
3647
|
const slotBoundaries = serverSlotPlans.filter(
|
|
@@ -3592,7 +3649,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3592
3649
|
).flatMap(({ plan: plan2 }) => plan2.isolatedBoundaries);
|
|
3593
3650
|
if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0 || slotBoundaries.length > 0) {
|
|
3594
3651
|
const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
|
|
3595
|
-
const islandStrategy =
|
|
3652
|
+
const islandStrategy = _chunkUBH2OARScjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
3596
3653
|
route,
|
|
3597
3654
|
metadata,
|
|
3598
3655
|
clientLayouts2,
|
|
@@ -3611,12 +3668,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3611
3668
|
...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
|
|
3612
3669
|
],
|
|
3613
3670
|
// The server renders a server tree only below a hydrating layout.
|
|
3614
|
-
...
|
|
3671
|
+
..._chunkPSALMEHJcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
|
|
3615
3672
|
});
|
|
3616
|
-
|
|
3673
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
|
|
3617
3674
|
}
|
|
3618
3675
|
} catch (error) {
|
|
3619
|
-
|
|
3676
|
+
_chunk7ZDLE77Pcjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
|
|
3620
3677
|
}
|
|
3621
3678
|
}
|
|
3622
3679
|
if (syntheticDocsEntry) {
|
|
@@ -3648,10 +3705,10 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3648
3705
|
}
|
|
3649
3706
|
const clientRouteSlots2 = routeSlots.filter((slot) => {
|
|
3650
3707
|
try {
|
|
3651
|
-
const metadata =
|
|
3708
|
+
const metadata = _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
|
|
3652
3709
|
return metadata.shouldHydrate && (!islandsMode || metadata.isClientComponent);
|
|
3653
3710
|
} catch (error) {
|
|
3654
|
-
|
|
3711
|
+
_chunk7ZDLE77Pcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
|
|
3655
3712
|
return false;
|
|
3656
3713
|
}
|
|
3657
3714
|
});
|
|
@@ -3660,24 +3717,24 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3660
3717
|
const docsEntryOwns = (pattern) => syntheticDocsEntry === "/" || pattern === syntheticDocsEntry || pattern.startsWith(`${syntheticDocsEntry}/`);
|
|
3661
3718
|
if (syntheticDocsEntry && clientPages.some((page) => !page.docs && docsEntryOwns(page.pattern))) {
|
|
3662
3719
|
const docsPagePaths = new Set(
|
|
3663
|
-
|
|
3664
|
-
|
|
3720
|
+
_chunk4A6WSOZHcjs.discoverFarmDocsPages.call(void 0,
|
|
3721
|
+
_chunk4A6WSOZHcjs.resolveFarmDocsContentDir.call(void 0, config.docs, { root: config.root, srcDir: config.srcDir }),
|
|
3665
3722
|
config.docs
|
|
3666
3723
|
).map((page) => page.href)
|
|
3667
3724
|
);
|
|
3668
3725
|
const resolved = resolveFarmDocsClientRoutes(clientPages, docsPagePaths);
|
|
3669
3726
|
for (const page of resolved.shadowed) {
|
|
3670
|
-
|
|
3727
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
3671
3728
|
`\u26A0\uFE0F ${page.pattern} has the URL shape of the docs route ${syntheticDocsPatterns[1]}, whose pages answer first: the page renders only at paths without a docs page, and does not hydrate as a page there.`
|
|
3672
3729
|
);
|
|
3673
3730
|
}
|
|
3674
3731
|
clientPages.splice(0, clientPages.length, ...resolved.pages);
|
|
3675
3732
|
}
|
|
3676
|
-
|
|
3733
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
3677
3734
|
`\u{1F4F1} Total hydratable routes detected: ${clientPages.length} pages, ${clientLayouts.filter((layout) => layout.shouldHydrate || layout.hasIsolatedClientBoundaries).length} layouts, and ${clientRouteSlots.length} slots`
|
|
3678
3735
|
);
|
|
3679
3736
|
const clientRouteTable = createFarmClientRouteTable(clientPages);
|
|
3680
|
-
|
|
3737
|
+
_chunkKDUVIJSZcjs.createFarmRouter.call(void 0, clientRouteTable.map((route) => ({ path: route.pattern, meta: route })));
|
|
3681
3738
|
await writeFarmClientRouteTable(_path2.default.dirname(outputDir), clientRouteTable);
|
|
3682
3739
|
const buildTarget = async (platform) => {
|
|
3683
3740
|
const clientEntryRoot = _path2.default.join(root, ".farm", "tmp");
|
|
@@ -3690,22 +3747,22 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3690
3747
|
clientRouteSlots,
|
|
3691
3748
|
root,
|
|
3692
3749
|
srcDir,
|
|
3693
|
-
adapterOwnsDocsRuntime ? false :
|
|
3694
|
-
adapterOwnsDocsRuntime ? void 0 :
|
|
3695
|
-
_optionalChain([config, 'access', _122 => _122.docs, 'optionalAccess', _123 => _123.enabled]) ?
|
|
3696
|
-
adapterOwnsDocsRuntime ?
|
|
3750
|
+
adapterOwnsDocsRuntime ? false : _chunk3EZHMZGDcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
|
|
3751
|
+
adapterOwnsDocsRuntime ? void 0 : _chunk3EZHMZGDcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
|
|
3752
|
+
_optionalChain([config, 'access', _122 => _122.docs, 'optionalAccess', _123 => _123.enabled]) ? _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
|
|
3753
|
+
adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter) : void 0,
|
|
3697
3754
|
config.i18n,
|
|
3698
3755
|
config.plugins,
|
|
3699
3756
|
config.renderer,
|
|
3700
3757
|
config.publicRuntimeConfig,
|
|
3701
3758
|
config.trailingSlash,
|
|
3702
|
-
|
|
3759
|
+
_chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations),
|
|
3703
3760
|
config.basePath,
|
|
3704
|
-
|
|
3705
|
-
adapterOwnsDocsRuntime ?
|
|
3706
|
-
|
|
3761
|
+
_chunkUBH2OARScjs.generateClientCachePersistenceCode.call(void 0, _chunkUBH2OARScjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
|
|
3762
|
+
adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
|
|
3763
|
+
_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _124 => _124.experimental, 'optionalAccess', _125 => _125.serverComponents])) === "islands",
|
|
3707
3764
|
platform,
|
|
3708
|
-
islandsMode ?
|
|
3765
|
+
islandsMode ? _chunkPSALMEHJcjs.collectFarmServerStylesheets.call(void 0,
|
|
3709
3766
|
[
|
|
3710
3767
|
...layoutRoutes.map((layout) => layout.modulePath),
|
|
3711
3768
|
...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
|
|
@@ -3713,7 +3770,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3713
3770
|
root
|
|
3714
3771
|
) : []
|
|
3715
3772
|
);
|
|
3716
|
-
const entryName = platform === "mobile" ?
|
|
3773
|
+
const entryName = platform === "mobile" ? _chunk4JARM2QQcjs.FARM_MOBILE_CLIENT_ENTRY_NAME : "farm-client";
|
|
3717
3774
|
const clientEntry = islandsMode && platform === "web" && clientHydrationCode.includes("/*farm-router-stub*/") ? splitFarmClientEntry(clientHydrationCode) : { entry: clientHydrationCode, router: void 0, root: void 0 };
|
|
3718
3775
|
await fs5.writeFile(clientEntryPath, clientEntry.entry);
|
|
3719
3776
|
await fs5.writeFile(
|
|
@@ -3729,7 +3786,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3729
3786
|
await fs5.writeFile(_path2.default.join(clientEntryDir, "farm-client-root.tsx"), clientEntry.root);
|
|
3730
3787
|
}
|
|
3731
3788
|
const clientInput = { [entryName]: clientEntryPath };
|
|
3732
|
-
if (platform === "web" &&
|
|
3789
|
+
if (platform === "web" && _chunkUBH2OARScjs.canBootFarmIslandsClient.call(void 0, config)) {
|
|
3733
3790
|
const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
|
|
3734
3791
|
await fs5.writeFile(
|
|
3735
3792
|
clientBootPath,
|
|
@@ -3740,17 +3797,17 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3740
3797
|
const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
|
|
3741
3798
|
let postcssSearchPath;
|
|
3742
3799
|
let tailwindVitePlugin = void 0;
|
|
3743
|
-
const rendererVitePlugins = await
|
|
3800
|
+
const rendererVitePlugins = await _chunkHP7QYVSTcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
|
|
3744
3801
|
ssr: false,
|
|
3745
3802
|
buildLifetime: rendererBuildLifetime
|
|
3746
3803
|
});
|
|
3747
3804
|
if (hasScopedPostcssConfig) {
|
|
3748
|
-
|
|
3805
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Using project PostCSS/Tailwind configuration");
|
|
3749
3806
|
} else {
|
|
3750
3807
|
const postcssConfigPath = _path2.default.join(clientEntryDir, "postcss.config.cjs");
|
|
3751
3808
|
await fs5.writeFile(postcssConfigPath, "module.exports = { plugins: [] };\n");
|
|
3752
3809
|
postcssSearchPath = clientEntryDir;
|
|
3753
|
-
tailwindVitePlugin = await
|
|
3810
|
+
tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, {
|
|
3754
3811
|
builder: productionVite.builder,
|
|
3755
3812
|
announce: true
|
|
3756
3813
|
});
|
|
@@ -3771,7 +3828,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3771
3828
|
target: FARM_CLIENT_BUILD_TARGET,
|
|
3772
3829
|
// Tailwind CSS 4 already requires newer browsers than that baseline. An app's own
|
|
3773
3830
|
// `build.target` or `build.cssTarget` still decides, as Vite derives one from the other.
|
|
3774
|
-
..._optionalChain([config, 'access', _126 => _126.vite, 'optionalAccess', _127 => _127.build, 'optionalAccess', _128 => _128.target]) === void 0 && _optionalChain([config, 'access', _129 => _129.vite, 'optionalAccess', _130 => _130.build, 'optionalAccess', _131 => _131.cssTarget]) === void 0 && (
|
|
3831
|
+
..._optionalChain([config, 'access', _126 => _126.vite, 'optionalAccess', _127 => _127.build, 'optionalAccess', _128 => _128.target]) === void 0 && _optionalChain([config, 'access', _129 => _129.vite, 'optionalAccess', _130 => _130.build, 'optionalAccess', _131 => _131.cssTarget]) === void 0 && (_chunkADCVSTFVcjs.includesTailwindVitePlugin.call(void 0, tailwindVitePlugin) || _chunkADCVSTFVcjs.includesTailwindVitePlugin.call(void 0, _optionalChain([config, 'access', _132 => _132.vite, 'optionalAccess', _133 => _133.plugins]))) ? { cssTarget: _chunkADCVSTFVcjs.TAILWIND_CSS_BROWSER_TARGET } : {},
|
|
3775
3832
|
outDir: outputDir,
|
|
3776
3833
|
emptyOutDir: platform === "web",
|
|
3777
3834
|
// Never public: see resolveFarmClientSourcemap.
|
|
@@ -3804,7 +3861,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3804
3861
|
}
|
|
3805
3862
|
},
|
|
3806
3863
|
plugins: [
|
|
3807
|
-
|
|
3864
|
+
_chunkUBH2OARScjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
3808
3865
|
createFarmPrivateClientSourcemapsPlugin({
|
|
3809
3866
|
outDir: _path2.default.join(
|
|
3810
3867
|
_path2.default.dirname(outputDir),
|
|
@@ -3812,7 +3869,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3812
3869
|
)
|
|
3813
3870
|
}),
|
|
3814
3871
|
// The web client's preload manifests; the mobile client records its files instead.
|
|
3815
|
-
platform === "mobile" ?
|
|
3872
|
+
platform === "mobile" ? _chunk4JARM2QQcjs.createFarmMobileClientManifestPlugin.call(void 0, {
|
|
3816
3873
|
buildDir: _path2.default.dirname(outputDir),
|
|
3817
3874
|
entryName
|
|
3818
3875
|
}) : createFarmClientModulePreloadPlugin({
|
|
@@ -3825,7 +3882,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3825
3882
|
],
|
|
3826
3883
|
rootModules: [_path2.default.join(clientEntryDir, "farm-client-root.tsx")],
|
|
3827
3884
|
// What the islands entry loads with its first render or hydration (RFC 0010).
|
|
3828
|
-
...islandsMode &&
|
|
3885
|
+
...islandsMode && _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? {
|
|
3829
3886
|
rendererImports: [
|
|
3830
3887
|
"react",
|
|
3831
3888
|
"react-dom/client",
|
|
@@ -3846,8 +3903,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3846
3903
|
importer: clientEntryPath,
|
|
3847
3904
|
entryName: "farm-client",
|
|
3848
3905
|
modules: [
|
|
3849
|
-
|
|
3850
|
-
|
|
3906
|
+
_chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter),
|
|
3907
|
+
_chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs)
|
|
3851
3908
|
].filter((specifier) => Boolean(specifier))
|
|
3852
3909
|
})
|
|
3853
3910
|
] : [],
|
|
@@ -3858,12 +3915,16 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3858
3915
|
// unless the app's config or one of its plugins splits chunks.
|
|
3859
3916
|
createFarmClientChunksPlugin({
|
|
3860
3917
|
inlineCommonChunks: platform === "web",
|
|
3861
|
-
islandsReact: islandsMode &&
|
|
3918
|
+
islandsReact: islandsMode && _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer)
|
|
3919
|
+
}),
|
|
3920
|
+
farmServerOnlyEntriesPlugin({
|
|
3921
|
+
// A desktop app's client is the web target, and its `platform()` says "desktop".
|
|
3922
|
+
platform: platform === "web" && config.desktop ? "desktop" : platform,
|
|
3923
|
+
distDir: config.distDir || ".farm"
|
|
3862
3924
|
}),
|
|
3863
|
-
farmServerOnlyEntriesPlugin({ platform, distDir: config.distDir || ".farm" }),
|
|
3864
3925
|
farmNavigationPlugin(config.renderer),
|
|
3865
|
-
|
|
3866
|
-
adapterOwnsDocsRuntime ?
|
|
3926
|
+
_chunkUBH2OARScjs.farmDocsClientConfigPlugin.call(void 0,
|
|
3927
|
+
adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
|
|
3867
3928
|
),
|
|
3868
3929
|
// Plugin to redirect @farm.js/core imports to client-only exports
|
|
3869
3930
|
{
|
|
@@ -3895,7 +3956,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3895
3956
|
},
|
|
3896
3957
|
load: {
|
|
3897
3958
|
filter: {
|
|
3898
|
-
id:
|
|
3959
|
+
id: _chunkUBH2OARScjs.exactIdPattern.call(void 0, [
|
|
3899
3960
|
"\0empty-module",
|
|
3900
3961
|
"\0empty-api-route",
|
|
3901
3962
|
"\0farm-i18n-client-bridge",
|
|
@@ -3933,7 +3994,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3933
3994
|
{ ...config, isolatedClientBoundaryModules, programmaticClientRoutes, sourceSnapshot },
|
|
3934
3995
|
pluginManager
|
|
3935
3996
|
),
|
|
3936
|
-
|
|
3997
|
+
_chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
3937
3998
|
],
|
|
3938
3999
|
mode: "production",
|
|
3939
4000
|
css: postcssSearchPath ? {
|
|
@@ -3941,7 +4002,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3941
4002
|
} : void 0,
|
|
3942
4003
|
// Ensure React is bundled for client
|
|
3943
4004
|
resolve: {
|
|
3944
|
-
alias:
|
|
4005
|
+
alias: _chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
3945
4006
|
dedupe: [...config.renderer.dedupe || []]
|
|
3946
4007
|
},
|
|
3947
4008
|
// Optimize dependencies - exclude server-side code from client bundle
|
|
@@ -3955,13 +4016,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3955
4016
|
}
|
|
3956
4017
|
};
|
|
3957
4018
|
await viteBuild(
|
|
3958
|
-
|
|
4019
|
+
_chunkUBH2OARScjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
|
|
3959
4020
|
);
|
|
3960
4021
|
if (platform === "mobile") {
|
|
3961
4022
|
await fs5.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
|
|
3962
|
-
if (!await
|
|
4023
|
+
if (!await _chunk4JARM2QQcjs.hasFarmMobileClientEntry.call(void 0, _path2.default.dirname(outputDir), outputDir)) {
|
|
3963
4024
|
throw new IncompleteClientBuildOutputError(
|
|
3964
|
-
`${
|
|
4025
|
+
`${_chunk4JARM2QQcjs.FARM_MOBILE_CLIENT_ENTRY_NAME}.js is missing or empty`
|
|
3965
4026
|
);
|
|
3966
4027
|
}
|
|
3967
4028
|
} else {
|
|
@@ -4049,9 +4110,9 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
4049
4110
|
return response;
|
|
4050
4111
|
}
|
|
4051
4112
|
|
|
4052
|
-
${streamNavigations ? `${
|
|
4113
|
+
${streamNavigations ? `${_chunkUBH2OARScjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
4053
4114
|
|
|
4054
|
-
${
|
|
4115
|
+
${_chunkUBH2OARScjs.FARM_EARLY_NAVIGATION_SOURCE}` : ""}
|
|
4055
4116
|
|
|
4056
4117
|
function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
|
|
4057
4118
|
if (error?.name === "FarmDeploymentMismatchError") {
|
|
@@ -4220,8 +4281,8 @@ for (const type of FARM_ROUTE_TABLE_INTENT_EVENTS) {
|
|
|
4220
4281
|
}`;
|
|
4221
4282
|
}
|
|
4222
4283
|
function getFarmClientLayoutMatch(pattern) {
|
|
4223
|
-
const groupScope =
|
|
4224
|
-
return groupScope ? { pattern, urlPattern:
|
|
4284
|
+
const groupScope = _chunkIGBQSUT5cjs.getRouteGroupScope.call(void 0, pattern);
|
|
4285
|
+
return groupScope ? { pattern, urlPattern: _chunkIGBQSUT5cjs.stripRouteGroups.call(void 0, pattern), groupScope } : { pattern };
|
|
4225
4286
|
}
|
|
4226
4287
|
function generateFarmClientLayoutSelectionSource() {
|
|
4227
4288
|
return `function selectFarmClientLayouts(layouts, routePathname, readDirectory) {
|
|
@@ -5359,34 +5420,34 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
5359
5420
|
secure: false
|
|
5360
5421
|
},
|
|
5361
5422
|
direction: {}
|
|
5362
|
-
}, plugins = [], renderer =
|
|
5423
|
+
}, plugins = [], renderer = _chunkHP7QYVSTcjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
|
|
5363
5424
|
const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
|
|
5364
|
-
const clientPluginEntry =
|
|
5425
|
+
const clientPluginEntry = _chunkADCVSTFVcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
5365
5426
|
plugins,
|
|
5366
5427
|
root,
|
|
5367
5428
|
srcDir,
|
|
5368
5429
|
publicRuntimeConfig,
|
|
5369
5430
|
platform
|
|
5370
5431
|
);
|
|
5371
|
-
const appSetupPath =
|
|
5372
|
-
const lazyRenderer = islandValues && platform !== "mobile" &&
|
|
5432
|
+
const appSetupPath = _chunkHP7QYVSTcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
5433
|
+
const lazyRenderer = islandValues && platform !== "mobile" && _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && clientRouteSlots.length === 0;
|
|
5373
5434
|
const lazyRoot = islandValues && platform !== "mobile";
|
|
5374
5435
|
const lazyMatcher = lazyRoot && clientPages.length > 0;
|
|
5375
|
-
const rendererClientImports = lazyRenderer ? `import { holdFarmIslandInteractions, restorePagePosition, watchFarmIslandTriggers } from "@farm.js/core/internal/client-runtime";` :
|
|
5436
|
+
const rendererClientImports = lazyRenderer ? `import { holdFarmIslandInteractions, restorePagePosition, watchFarmIslandTriggers } from "@farm.js/core/internal/client-runtime";` : _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? `import React from "react";
|
|
5376
5437
|
import { createRoot, hydrateRoot } from "react-dom/client";
|
|
5377
5438
|
import { restorePagePosition } from "@farm.js/core/internal/client-runtime";` : (
|
|
5378
5439
|
// Named exports only, as the server entry and the development client read them. A copy
|
|
5379
5440
|
// of the namespace, so feature checks of optional exports don't make Rolldown warn.
|
|
5380
5441
|
appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
|
|
5381
5442
|
import { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
|
|
5382
|
-
import __farmAppSetup from ${JSON.stringify(
|
|
5443
|
+
import __farmAppSetup from ${JSON.stringify(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appSetupPath))};
|
|
5383
5444
|
const React = { ...__farmRendererClient };
|
|
5384
5445
|
__farmConfigureApp(__farmAppSetup);` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
|
|
5385
5446
|
import { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};
|
|
5386
5447
|
const React = { ...__farmRendererClient };`
|
|
5387
5448
|
);
|
|
5388
|
-
const hydrateFarmRouteCall =
|
|
5389
|
-
const providerClientCode =
|
|
5449
|
+
const hydrateFarmRouteCall = _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);";
|
|
5450
|
+
const providerClientCode = _chunkUBH2OARScjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
5390
5451
|
integrationProviders,
|
|
5391
5452
|
root,
|
|
5392
5453
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -5410,12 +5471,12 @@ const React = { ...__farmRendererClient };`
|
|
|
5410
5471
|
const layoutRegistrations = [];
|
|
5411
5472
|
const layoutComponents = [];
|
|
5412
5473
|
const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
|
|
5413
|
-
const treeLayoutPatterns = islandValues ?
|
|
5474
|
+
const treeLayoutPatterns = islandValues ? _chunkIGBQSUT5cjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
|
|
5414
5475
|
layoutRoutes.forEach((layout, index) => {
|
|
5415
5476
|
const relativePath = toImportPath(layout.modulePath);
|
|
5416
5477
|
const treeLayout = treeLayoutPatterns.has(layout.pattern);
|
|
5417
5478
|
const rendersOnClient = treeLayout || !layout.hasIsolatedClientBoundaries && hydratingLayoutPatterns.some(
|
|
5418
|
-
(pattern) =>
|
|
5479
|
+
(pattern) => _chunkIGBQSUT5cjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
|
|
5419
5480
|
);
|
|
5420
5481
|
if (rendersOnClient && !treeLayout) {
|
|
5421
5482
|
layoutImportStatements.push(`import Layout${index} from "${relativePath}";`);
|
|
@@ -5492,11 +5553,11 @@ function isFarmDocsPath() {
|
|
|
5492
5553
|
return false;
|
|
5493
5554
|
}
|
|
5494
5555
|
`;
|
|
5495
|
-
const docsAdapterRuntime =
|
|
5556
|
+
const docsAdapterRuntime = _chunkP4ZLFUNBcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
5496
5557
|
docsAdapterUI,
|
|
5497
5558
|
docsConfigModule,
|
|
5498
5559
|
// Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
|
|
5499
|
-
|
|
5560
|
+
_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
|
|
5500
5561
|
);
|
|
5501
5562
|
if (clientPages.length === 0 && clientRouteSlots.length === 0 && !providerClientCode.hasProviders) {
|
|
5502
5563
|
return `
|
|
@@ -5510,7 +5571,7 @@ ${clientCachePersistence.imports}
|
|
|
5510
5571
|
${i18nClientRuntime}
|
|
5511
5572
|
${docsNavigationRuntime}
|
|
5512
5573
|
${docsAdapterRuntime}
|
|
5513
|
-
${
|
|
5574
|
+
${_chunk3EZHMZGDcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId)}
|
|
5514
5575
|
|
|
5515
5576
|
setFarmBasePath(${JSON.stringify(basePath)});
|
|
5516
5577
|
setFarmTrailingSlashPreference(${JSON.stringify(trailingSlash)});
|
|
@@ -5520,7 +5581,7 @@ mountFarmDocsSearch();
|
|
|
5520
5581
|
|
|
5521
5582
|
${generateUniversalRouterStateRuntime()}
|
|
5522
5583
|
|
|
5523
|
-
${
|
|
5584
|
+
${_chunkUBH2OARScjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
5524
5585
|
|
|
5525
5586
|
// SPA Router for server-rendered pages (HTML swap)
|
|
5526
5587
|
const spaRouter = {
|
|
@@ -5813,7 +5874,7 @@ installFarmLinkPrefetch();
|
|
|
5813
5874
|
clientPages.forEach((page) => {
|
|
5814
5875
|
for (const boundary of page.isolatedBoundaries) {
|
|
5815
5876
|
isolatedBoundaryModules.set(
|
|
5816
|
-
|
|
5877
|
+
_chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, boundary.modulePath, root),
|
|
5817
5878
|
toImportPath(boundary.modulePath)
|
|
5818
5879
|
);
|
|
5819
5880
|
}
|
|
@@ -5824,7 +5885,7 @@ installFarmLinkPrefetch();
|
|
|
5824
5885
|
}
|
|
5825
5886
|
});
|
|
5826
5887
|
const isolatedHydrationEnabled = isolatedBoundaryModules.size > 0;
|
|
5827
|
-
const rendererIslands = isolatedHydrationEnabled && !islandValues && !
|
|
5888
|
+
const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
|
|
5828
5889
|
const serverTreeEnabled = isolatedHydrationEnabled && clientPages.some((page) => page.serverTree);
|
|
5829
5890
|
const islandsRuntimeExports = [
|
|
5830
5891
|
"createFarmIsolatedHydrationRuntime",
|
|
@@ -6026,7 +6087,7 @@ ${docsNavigationRuntime}
|
|
|
6026
6087
|
${docsAdapterRuntime}
|
|
6027
6088
|
|
|
6028
6089
|
${imports.join("\n")}
|
|
6029
|
-
${
|
|
6090
|
+
${_chunk3EZHMZGDcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId, void 0, lazyRenderer ? "loadFarmRenderer" : void 0)}
|
|
6030
6091
|
|
|
6031
6092
|
${providerClientCode.runtime}
|
|
6032
6093
|
|
|
@@ -6062,7 +6123,7 @@ ${layoutRegistrations.join(",\n")}
|
|
|
6062
6123
|
${generateFarmClientRouteMatchSource({ lazyMatcher })}
|
|
6063
6124
|
|
|
6064
6125
|
${layoutComponentsRuntime}/*farm-root-start*/
|
|
6065
|
-
${
|
|
6126
|
+
${_chunkUBH2OARScjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
6066
6127
|
// Wrap a page element with applicable layouts
|
|
6067
6128
|
function wrapWithLayouts(pageElement, pathname, params) {
|
|
6068
6129
|
const layouts = getApplicableLayouts(pathname);
|
|
@@ -6097,7 +6158,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
|
|
|
6097
6158
|
return React.createElement("div", props, pageElement);
|
|
6098
6159
|
}
|
|
6099
6160
|
let farmLastRouteState = null;
|
|
6100
|
-
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${
|
|
6161
|
+
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkUBH2OARScjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6101
6162
|
function farmTreeLayoutsOf(pathname) {
|
|
6102
6163
|
return getApplicableLayouts(pathname).filter(function(layout) {
|
|
6103
6164
|
return layout.serverTree === true;
|
|
@@ -6212,7 +6273,7 @@ async function createMatchedHydrationRoute(matched, pathname, searchParams, navi
|
|
|
6212
6273
|
|
|
6213
6274
|
if (!pageElement) return null;
|
|
6214
6275
|
if (!hydrateLayouts) {
|
|
6215
|
-
${
|
|
6276
|
+
${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "if (hydrationContainer) pageElement = restorePagePosition(React, hydrationContainer, pageElement);" : ""}
|
|
6216
6277
|
return createFarmRouteState(pageElement, pathname, params, false);
|
|
6217
6278
|
}
|
|
6218
6279
|
if (matched.route.pageShouldHydrate) {
|
|
@@ -6241,7 +6302,7 @@ function createFarmRouteState(page, pathname, params, includeLayouts) {
|
|
|
6241
6302
|
|
|
6242
6303
|
function hydrateFarmRoute(container, route) {
|
|
6243
6304
|
farmLastRouteState = route;
|
|
6244
|
-
${
|
|
6305
|
+
${_chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).hydrationFallback ? `try {
|
|
6245
6306
|
${hydrateFarmRouteCall}
|
|
6246
6307
|
} catch (error) {
|
|
6247
6308
|
// The renderer opted in with capabilities.hydrationFallback, as development always does. The
|
|
@@ -6731,7 +6792,7 @@ function fitsSegmentResponse(currentRoot, nextRoot) {
|
|
|
6731
6792
|
return true;
|
|
6732
6793
|
}` : ""}
|
|
6733
6794
|
|
|
6734
|
-
${
|
|
6795
|
+
${_chunkUBH2OARScjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
6735
6796
|
|
|
6736
6797
|
function activateNavigationScripts(root) {
|
|
6737
6798
|
for (const script of Array.from(root?.querySelectorAll?.("script") || [])) {
|
|
@@ -6837,7 +6898,7 @@ function getLayoutShell(root, patterns, index) {
|
|
|
6837
6898
|
return shell.innerHTML;
|
|
6838
6899
|
}
|
|
6839
6900
|
|
|
6840
|
-
${islandValues ?
|
|
6901
|
+
${islandValues ? _chunkUBH2OARScjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
|
|
6841
6902
|
// A refresh keeps the islands still on the page: the ones in streamed Suspense content too.
|
|
6842
6903
|
if (refresh) revealFarmStreamedContent(nextRoot);
|
|
6843
6904
|
const currentPatterns = getLayoutPatterns(currentRoot);
|
|
@@ -7517,7 +7578,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7517
7578
|
farmPlugin,
|
|
7518
7579
|
farmServerOnlyEntriesPlugin
|
|
7519
7580
|
} = await import("./vite.cjs");
|
|
7520
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
7581
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
|
|
7521
7582
|
const fs5 = await import("fs/promises");
|
|
7522
7583
|
const pluginManager = new PluginManager2({
|
|
7523
7584
|
config,
|
|
@@ -7528,7 +7589,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7528
7589
|
const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
|
|
7529
7590
|
let postcssConfigDir;
|
|
7530
7591
|
let tailwindVitePlugin = void 0;
|
|
7531
|
-
const rendererVitePlugins = await
|
|
7592
|
+
const rendererVitePlugins = await _chunkHP7QYVSTcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
|
|
7532
7593
|
ssr: true,
|
|
7533
7594
|
buildLifetime: rendererBuildLifetime
|
|
7534
7595
|
});
|
|
@@ -7538,7 +7599,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7538
7599
|
_path2.default.join(postcssConfigDir, "postcss.config.cjs"),
|
|
7539
7600
|
"module.exports = { plugins: [] };\n"
|
|
7540
7601
|
);
|
|
7541
|
-
tailwindVitePlugin = await
|
|
7602
|
+
tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, {
|
|
7542
7603
|
builder: productionVite.builder,
|
|
7543
7604
|
label: "for SSR"
|
|
7544
7605
|
});
|
|
@@ -7617,11 +7678,11 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7617
7678
|
pattern: entry.pattern,
|
|
7618
7679
|
modulePath: entry.modulePath
|
|
7619
7680
|
})) : [];
|
|
7620
|
-
const i18nCatalogs = config.i18n.enabled ? (await
|
|
7621
|
-
const appDirs =
|
|
7681
|
+
const i18nCatalogs = config.i18n.enabled ? (await _chunkYHALJBYTcjs.readFarmI18nCatalogs.call(void 0, config.i18n)).catalogs : {};
|
|
7682
|
+
const appDirs = _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, config);
|
|
7622
7683
|
let openAPIReference = null;
|
|
7623
7684
|
if (config.openapi.enabled && config.openapi.route) {
|
|
7624
|
-
const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-
|
|
7685
|
+
const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-3DFQDKJ6.cjs");
|
|
7625
7686
|
const openAPIManager = new OpenAPIManager(appDirs, config.openapi, {
|
|
7626
7687
|
mode: "production",
|
|
7627
7688
|
apiBaseURL: config.api.baseURL,
|
|
@@ -7645,19 +7706,19 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7645
7706
|
config: await readMiddlewareFileConfig(route.filePath)
|
|
7646
7707
|
}))
|
|
7647
7708
|
);
|
|
7648
|
-
const instrumentationPath =
|
|
7649
|
-
const notFoundPath =
|
|
7709
|
+
const instrumentationPath = _chunkI5PDHLKEcjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
|
|
7710
|
+
const notFoundPath = _chunkUBH2OARScjs.resolveFarmNotFoundComponentPath.call(void 0,
|
|
7650
7711
|
config,
|
|
7651
7712
|
appDirs,
|
|
7652
7713
|
routeManager.getRendererNotFoundPath()
|
|
7653
7714
|
);
|
|
7654
|
-
if (notFoundPath)
|
|
7715
|
+
if (notFoundPath) _chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
|
|
7655
7716
|
layoutRoutes.sort((a, b) => {
|
|
7656
7717
|
const depthA = a.pattern.split("/").filter(Boolean).length;
|
|
7657
7718
|
const depthB = b.pattern.split("/").filter(Boolean).length;
|
|
7658
7719
|
return depthA - depthB;
|
|
7659
7720
|
});
|
|
7660
|
-
|
|
7721
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
7661
7722
|
`\u{1F4CB} Found ${pageRoutes.length} page routes, ${layoutRoutes.length} layouts, ${apiRoutes.length} API routes, ${applicationMetadataRoutes.length} metadata routes, and ${middlewareRoutes.length} middleware files`
|
|
7662
7723
|
);
|
|
7663
7724
|
const configuredIntegrationValues = Object.values(config.integrations || {});
|
|
@@ -7667,14 +7728,14 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7667
7728
|
const hasServerRuntimeIntegrations = configuredIntegrationValues.some(
|
|
7668
7729
|
(integration) => typeof integration === "object" && integration !== null && (!("serverRuntime" in integration) || integration.serverRuntime !== false)
|
|
7669
7730
|
);
|
|
7670
|
-
const hasIntegrationProviders =
|
|
7731
|
+
const hasIntegrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations).some(
|
|
7671
7732
|
(provider) => provider.component || provider.type === "clerk"
|
|
7672
7733
|
);
|
|
7673
7734
|
const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
|
|
7674
7735
|
const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _143 => _143.mdx, 'optionalAccess', _144 => _144.components]));
|
|
7675
|
-
const hasMiddlewareConfig =
|
|
7676
|
-
const hasRouteContextConfig =
|
|
7677
|
-
const hasServerRuntimePlugins =
|
|
7736
|
+
const hasMiddlewareConfig = _chunkIGBQSUT5cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
7737
|
+
const hasRouteContextConfig = _chunkF5T55PYXcjs.hasCustomFarmRouteContext.call(void 0, config);
|
|
7738
|
+
const hasServerRuntimePlugins = _chunkADCVSTFVcjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
|
|
7678
7739
|
const hasPluginRoutes = hasFarmPluginRoutes(config);
|
|
7679
7740
|
const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
|
|
7680
7741
|
const configModulePath = hasServerRuntimeIntegrations || hasObservabilityHandler || hasMdxComponentConfig || hasMiddlewareConfig || hasRouteContextConfig || hasServerRuntimePlugins || hasPluginRoutes || hasServerCacheConfig || hasFarmServerStorageConfig(config.storage) || hasIntegrationProviders ? await findFarmConfigPath(root) : null;
|
|
@@ -7683,19 +7744,19 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7683
7744
|
const hasConfiguredRuntimePlugins = Boolean(
|
|
7684
7745
|
hasRuntimeConfigModule && (config.plugins || []).length > 0
|
|
7685
7746
|
);
|
|
7686
|
-
if (
|
|
7747
|
+
if (_chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
7687
7748
|
const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
|
|
7688
|
-
|
|
7749
|
+
_chunkVQYGXWCScjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
|
|
7689
7750
|
config.docs,
|
|
7690
7751
|
{ root, srcDir: config.srcDir },
|
|
7691
7752
|
(pathname) => adapterGuardedPaths.has(pathname),
|
|
7692
|
-
|
|
7753
|
+
_chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? "edge" : "node"
|
|
7693
7754
|
);
|
|
7694
7755
|
}
|
|
7695
|
-
const farmDocsCspNonceMarker =
|
|
7696
|
-
const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _145 => _145.docs, 'optionalAccess', _146 => _146.enabled]) &&
|
|
7756
|
+
const farmDocsCspNonceMarker = _chunkIEZFFXSCcjs.createFarmCspNonce.call(void 0, config.security);
|
|
7757
|
+
const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _145 => _145.docs, 'optionalAccess', _146 => _146.enabled]) && _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunkIBZW57NWcjs._runWithFarmCspNonce.call(void 0,
|
|
7697
7758
|
farmDocsCspNonceMarker,
|
|
7698
|
-
async () => _optionalChain([config, 'access', _147 => _147.docs, 'access', _148 => _148.adapter, 'optionalAccess', _149 => _149.server]) ? await
|
|
7759
|
+
async () => _optionalChain([config, 'access', _147 => _147.docs, 'access', _148 => _148.adapter, 'optionalAccess', _149 => _149.server]) ? await _chunkVQYGXWCScjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
|
|
7699
7760
|
root,
|
|
7700
7761
|
srcDir: config.srcDir,
|
|
7701
7762
|
clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
|
|
@@ -7707,7 +7768,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7707
7768
|
root,
|
|
7708
7769
|
srcDir: config.srcDir,
|
|
7709
7770
|
clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
|
|
7710
|
-
fontAssets:
|
|
7771
|
+
fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, root)),
|
|
7711
7772
|
fontStylesheetHref: "/farm-fonts.css",
|
|
7712
7773
|
globalStylesheetHref: FARM_CLIENT_CSS_HREF_PLACEHOLDER,
|
|
7713
7774
|
isPathGuarded: (pathname) => guardedPaths.has(pathname),
|
|
@@ -7755,7 +7816,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7755
7816
|
(image) => image.sourceType === "module"
|
|
7756
7817
|
);
|
|
7757
7818
|
const externalMetadataImageRuntime = useExternalMetadataImageRuntime && !omitCoreMetadataImageRuntime ? ["@vercel/og"] : [];
|
|
7758
|
-
const rendererOptionalExternals =
|
|
7819
|
+
const rendererOptionalExternals = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? [] : [
|
|
7759
7820
|
"react",
|
|
7760
7821
|
"react/jsx-runtime",
|
|
7761
7822
|
"react/jsx-dev-runtime",
|
|
@@ -7858,11 +7919,11 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7858
7919
|
},
|
|
7859
7920
|
define: {
|
|
7860
7921
|
__FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
|
|
7861
|
-
__FARM_ENV__: JSON.stringify(
|
|
7922
|
+
__FARM_ENV__: JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, config.env)),
|
|
7862
7923
|
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _155 => _155.env, 'optionalAccess', _156 => _156.public]) || {})
|
|
7863
7924
|
},
|
|
7864
7925
|
plugins: [
|
|
7865
|
-
|
|
7926
|
+
_chunkUBH2OARScjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
7866
7927
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
7867
7928
|
...rendererVitePlugins,
|
|
7868
7929
|
...config.vite.plugins || [],
|
|
@@ -7882,7 +7943,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7882
7943
|
},
|
|
7883
7944
|
createVercelOgFontInlinePlugin(edgeMetadataImageRuntime.runtime)
|
|
7884
7945
|
] : [],
|
|
7885
|
-
{ ...
|
|
7946
|
+
{ ..._chunkJYQMGMKTcjs.createReactProductionModePlugin.call(void 0, ), enforce: "pre" },
|
|
7886
7947
|
farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
|
|
7887
7948
|
farmNavigationPlugin(config.renderer),
|
|
7888
7949
|
farmIslandContainersPlugin(config),
|
|
@@ -7894,7 +7955,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7894
7955
|
},
|
|
7895
7956
|
pluginManager
|
|
7896
7957
|
),
|
|
7897
|
-
|
|
7958
|
+
_chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
7898
7959
|
...hasRuntimeConfigModule ? [
|
|
7899
7960
|
farmStripPlatformConfigPlugin(
|
|
7900
7961
|
[
|
|
@@ -7906,7 +7967,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7906
7967
|
{
|
|
7907
7968
|
name: "farm-virtual-ssr-entry",
|
|
7908
7969
|
resolveId: {
|
|
7909
|
-
filter: { id:
|
|
7970
|
+
filter: { id: _chunkUBH2OARScjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
|
|
7910
7971
|
handler(id) {
|
|
7911
7972
|
if (id === virtualEntryId || id === "\0virtual:farm-ssr-entry") {
|
|
7912
7973
|
return virtualEntryId;
|
|
@@ -7915,7 +7976,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7915
7976
|
}
|
|
7916
7977
|
},
|
|
7917
7978
|
load: {
|
|
7918
|
-
filter: { id:
|
|
7979
|
+
filter: { id: _chunkUBH2OARScjs.exactIdPattern.call(void 0, [virtualEntryId]) },
|
|
7919
7980
|
handler(id) {
|
|
7920
7981
|
if (id === virtualEntryId) {
|
|
7921
7982
|
return virtualEntryCode;
|
|
@@ -7927,7 +7988,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7927
7988
|
{
|
|
7928
7989
|
name: "capture-ssr-bundle",
|
|
7929
7990
|
configResolved(config2) {
|
|
7930
|
-
polyroute =
|
|
7991
|
+
polyroute = _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, config2.plugins);
|
|
7931
7992
|
},
|
|
7932
7993
|
enforce: "post",
|
|
7933
7994
|
generateBundle: {
|
|
@@ -7955,7 +8016,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7955
8016
|
resolve: {
|
|
7956
8017
|
alias: [
|
|
7957
8018
|
...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
|
|
7958
|
-
...Object.entries(
|
|
8019
|
+
...Object.entries(_chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
|
|
7959
8020
|
([find, replacement]) => ({ find, replacement })
|
|
7960
8021
|
)
|
|
7961
8022
|
],
|
|
@@ -7963,7 +8024,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7963
8024
|
dedupe: [...config.renderer.dedupe || []]
|
|
7964
8025
|
}
|
|
7965
8026
|
};
|
|
7966
|
-
await viteBuild(
|
|
8027
|
+
await viteBuild(_chunkUBH2OARScjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
7967
8028
|
} finally {
|
|
7968
8029
|
if (postcssConfigDir) {
|
|
7969
8030
|
try {
|
|
@@ -8006,9 +8067,9 @@ function getFarmDocsGuardedPaths(config, middlewareRoutes) {
|
|
|
8006
8067
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
8007
8068
|
middlewareRoutes
|
|
8008
8069
|
};
|
|
8009
|
-
return
|
|
8010
|
-
(docsRoot) =>
|
|
8011
|
-
).flatMap((page) => [page.href,
|
|
8070
|
+
return _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
|
|
8071
|
+
(docsRoot) => _chunk4A6WSOZHcjs.discoverFarmDocsPages.call(void 0, _chunk4A6WSOZHcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
|
|
8072
|
+
).flatMap((page) => [page.href, _chunk4A6WSOZHcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkIGBQSUT5cjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
|
|
8012
8073
|
}
|
|
8013
8074
|
function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
8014
8075
|
const llmsTxt = _optionalChain([agent, 'optionalAccess', _159 => _159.llmsTxt]);
|
|
@@ -8402,41 +8463,41 @@ async function applyFarmPreloadBudget(response, pathname, request) {
|
|
|
8402
8463
|
`.trim();
|
|
8403
8464
|
}
|
|
8404
8465
|
function generateFarmRendererAppSetupServerCode(config) {
|
|
8405
|
-
const appSetupPath =
|
|
8466
|
+
const appSetupPath = _chunkHP7QYVSTcjs.resolveFarmRendererAppSetup.call(void 0, config.root || process.cwd(), config.renderer);
|
|
8406
8467
|
if (!appSetupPath) return "";
|
|
8407
8468
|
return `
|
|
8408
|
-
import __farmAppSetup from ${JSON.stringify(
|
|
8469
|
+
import __farmAppSetup from ${JSON.stringify(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appSetupPath))};
|
|
8409
8470
|
if (typeof ReactDOMServer.configureApp !== "function") {
|
|
8410
8471
|
throw new Error(${JSON.stringify(`Renderer \`${config.renderer.name}\` does not support \`appSetup\`: its server module must export configureApp().`)});
|
|
8411
8472
|
}
|
|
8412
8473
|
ReactDOMServer.configureApp(__farmAppSetup);`;
|
|
8413
8474
|
}
|
|
8414
8475
|
function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache, mobileShellLoadingRoutes = [], farmDocsAnalyticsPages = []) {
|
|
8415
|
-
const farmRendererDisabled =
|
|
8476
|
+
const farmRendererDisabled = _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer);
|
|
8416
8477
|
const farmStaticNotFoundBuild = preset === "vercel" && _optionalChain([config, 'access', _173 => _173.experimental, 'optionalAccess', _174 => _174.staticNotFound]) === true && !farmRendererDisabled;
|
|
8417
8478
|
const searchPreserveRoutes = pageRoutes.flatMap(
|
|
8418
8479
|
(route) => route.searchPreserve ? [route.searchPreserve] : []
|
|
8419
8480
|
);
|
|
8420
8481
|
const searchPreserveRoutesSource = searchPreserveRoutes.length > 0 ? JSON.stringify(searchPreserveRoutes) : "";
|
|
8421
|
-
const farmIslandsMode =
|
|
8422
|
-
const farmRendererActions =
|
|
8423
|
-
const farmClientBoot =
|
|
8482
|
+
const farmIslandsMode = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _175 => _175.experimental, 'optionalAccess', _176 => _176.serverComponents])) === "islands";
|
|
8483
|
+
const farmRendererActions = _chunkUBH2OARScjs.resolveFarmIslxActionsMode.call(void 0, config) === "renderer";
|
|
8484
|
+
const farmClientBoot = _chunkUBH2OARScjs.canBootFarmIslandsClient.call(void 0, config);
|
|
8424
8485
|
const farmMobileClient = shouldBuildFarmMobileClient(config);
|
|
8425
8486
|
const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
|
|
8426
|
-
const hasCompressionRuntime = config.compress &&
|
|
8487
|
+
const hasCompressionRuntime = config.compress && _chunkRLC7NNTAcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "edge";
|
|
8427
8488
|
const servesAgentRobotsTxt = Boolean(_optionalChain([config, 'access', _177 => _177.agent, 'optionalAccess', _178 => _178.crawlers, 'optionalAccess', _179 => _179.enabled])) && !applicationMetadataRoutes.some(
|
|
8428
8489
|
(metadata) => metadata.kind === "robots" && metadata.pattern === "/"
|
|
8429
8490
|
);
|
|
8430
8491
|
const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _180 => _180.agent, 'optionalAccess', _181 => _181.sitemap, 'optionalAccess', _182 => _182.enabled])) && !applicationMetadataRoutes.some(
|
|
8431
8492
|
(metadata) => metadata.kind === "sitemap" && metadata.pattern === "/"
|
|
8432
8493
|
);
|
|
8433
|
-
const servesDefaultMCP = _optionalChain([config, 'access', _183 => _183.agent, 'optionalAccess', _184 => _184.mcp]) === true && !
|
|
8494
|
+
const servesDefaultMCP = _optionalChain([config, 'access', _183 => _183.agent, 'optionalAccess', _184 => _184.mcp]) === true && !_chunkR6GOH5CHcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
|
|
8434
8495
|
const servesAiCatalog = _optionalChain([config, 'access', _185 => _185.agent, 'optionalAccess', _186 => _186.aiCatalog]) !== false;
|
|
8435
8496
|
const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
|
|
8436
|
-
const hasInfraAnalyticsRuntime = config.analytics !== false &&
|
|
8437
|
-
const reportsWebMCPCalls = hasInfraAnalyticsRuntime &&
|
|
8497
|
+
const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkRLC7NNTAcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
8498
|
+
const reportsWebMCPCalls = hasInfraAnalyticsRuntime && _chunkMBDDLYT5cjs._farmWebMCPReportsEnabled.call(void 0, config.plugins);
|
|
8438
8499
|
const hasPrecompiledDocs = Boolean(farmDocsPrecompiledManifest);
|
|
8439
|
-
const adapterOwnsDocsRuntime =
|
|
8500
|
+
const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs);
|
|
8440
8501
|
if (_optionalChain([config, 'access', _187 => _187.docs, 'optionalAccess', _188 => _188.enabled]) && _optionalChain([config, 'access', _189 => _189.docs, 'access', _190 => _190.roots, 'optionalAccess', _191 => _191.length]) && !adapterOwnsDocsRuntime) {
|
|
8441
8502
|
throw new Error(
|
|
8442
8503
|
"Several docs roots need a docs adapter; Farm's built-in docs renderer serves a single docs root."
|
|
@@ -8444,14 +8505,14 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
|
|
|
8444
8505
|
}
|
|
8445
8506
|
const docsConfigModulePath = adapterOwnsDocsRuntime && !hasPrecompiledDocs && config.docs.configPath && !config.docs.configPath.endsWith(".json") ? config.docs.configPath : void 0;
|
|
8446
8507
|
const adapterHandler = generateFarmDocsAdapterHandlerArguments(config.docs, docsConfigModulePath);
|
|
8447
|
-
const hasIsolatedClientGraphRuntime =
|
|
8448
|
-
const hasRendererIslandsGraph = isolatedClientBoundaryModules.size > 0 &&
|
|
8449
|
-
const rendererStreamingCapabilities =
|
|
8508
|
+
const hasIsolatedClientGraphRuntime = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) && isolatedClientBoundaryModules.size > 0;
|
|
8509
|
+
const hasRendererIslandsGraph = isolatedClientBoundaryModules.size > 0 && _chunkIU4YTFFQcjs.usesFarmRendererIslands.call(void 0, config);
|
|
8510
|
+
const rendererStreamingCapabilities = _chunkHP7QYVSTcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0,
|
|
8450
8511
|
config.renderer,
|
|
8451
|
-
|
|
8512
|
+
_chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset)
|
|
8452
8513
|
);
|
|
8453
|
-
const hasReactSyncRender =
|
|
8454
|
-
const rendererServerImports =
|
|
8514
|
+
const hasReactSyncRender = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer);
|
|
8515
|
+
const rendererServerImports = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? `import * as React from "react";
|
|
8455
8516
|
import * as ReactDOMServer from "react-dom/server";
|
|
8456
8517
|
import { markPagePosition, markLayoutPosition } from "@farm.js/core/internal/production-runtime";${hasIsolatedClientGraphRuntime ? farmIslandsMode ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph, renderFarmServerTreePage, renderFarmServerTreeLayout, withFarmIslandsRender } from "@farm.js/core/internal/islands-runtime";' : '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";\nimport { renderFarmServerTreePage } from "@farm.js/core/internal/server-tree";' : ""}` : (
|
|
8457
8518
|
// The renderer contract is the server module's named exports, which the development
|
|
@@ -8509,18 +8570,18 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8509
8570
|
(image) => image.sourceType === "module"
|
|
8510
8571
|
);
|
|
8511
8572
|
const edgeMiddlewareFilePaths = farmTargetRunsEdgeMiddleware(preset) ? middlewareRoutes.filter(isFarmEdgeMiddlewareRoute).map((route) => route.filePath) : [];
|
|
8512
|
-
const hasMiddlewareRuntime = middlewareRoutes.length > 0 ||
|
|
8513
|
-
const farmDocsFontAssets = _optionalChain([config, 'access', _192 => _192.docs, 'optionalAccess', _193 => _193.enabled]) ?
|
|
8514
|
-
const integrationProviders =
|
|
8573
|
+
const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkIGBQSUT5cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
8574
|
+
const farmDocsFontAssets = _optionalChain([config, 'access', _192 => _192.docs, 'optionalAccess', _193 => _193.enabled]) ? _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
|
|
8575
|
+
const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations);
|
|
8515
8576
|
const renderedIntegrationProviders = integrationProviders.filter(
|
|
8516
8577
|
(provider) => provider.component || provider.type === "clerk"
|
|
8517
8578
|
);
|
|
8518
|
-
if (renderedIntegrationProviders.length > 0 && !
|
|
8579
|
+
if (renderedIntegrationProviders.length > 0 && !_chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, config.renderer).functionComponents) {
|
|
8519
8580
|
throw new Error(
|
|
8520
8581
|
`Integration provider components are not supported by the "${config.renderer.name}" renderer.`
|
|
8521
8582
|
);
|
|
8522
8583
|
}
|
|
8523
|
-
const providerServerModules =
|
|
8584
|
+
const providerServerModules = _chunkUBH2OARScjs.generateFarmIntegrationProviderServerModules.call(void 0,
|
|
8524
8585
|
renderedIntegrationProviders,
|
|
8525
8586
|
config.root,
|
|
8526
8587
|
_nullishCoalesce(config.renderer.componentExtensions, () => ( []))
|
|
@@ -8538,24 +8599,24 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8538
8599
|
})
|
|
8539
8600
|
);
|
|
8540
8601
|
const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
|
|
8541
|
-
(provider) => !
|
|
8602
|
+
(provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider)
|
|
8542
8603
|
);
|
|
8543
|
-
const isolatedHydrationMode =
|
|
8604
|
+
const isolatedHydrationMode = _chunkPSALMEHJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
8544
8605
|
_optionalChain([config, 'access', _196 => _196.experimental, 'optionalAccess', _197 => _197.isolatedClientHydration]),
|
|
8545
8606
|
{
|
|
8546
|
-
serverComponents:
|
|
8607
|
+
serverComponents: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _198 => _198.experimental, 'optionalAccess', _199 => _199.serverComponents])) === "rsc",
|
|
8547
8608
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
8548
8609
|
}
|
|
8549
8610
|
);
|
|
8550
|
-
const hydrationPlanOptions =
|
|
8611
|
+
const hydrationPlanOptions = _chunkPSALMEHJcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
8551
8612
|
config.renderer,
|
|
8552
8613
|
Boolean(unsupportedIntegrationProvider)
|
|
8553
8614
|
);
|
|
8554
8615
|
const pageHydrationPlanOptions = {
|
|
8555
8616
|
...hydrationPlanOptions,
|
|
8556
|
-
serverOwners:
|
|
8617
|
+
serverOwners: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _200 => _200.experimental, 'optionalAccess', _201 => _201.serverComponents])) === "islands"
|
|
8557
8618
|
};
|
|
8558
|
-
const { layoutHydrationPlans, pageHydrationPlans } =
|
|
8619
|
+
const { layoutHydrationPlans, pageHydrationPlans } = _chunkPSALMEHJcjs.withFarmSourceSnapshot.call(void 0, () => {
|
|
8559
8620
|
const layoutHydrationPlans2 = layoutRoutes.map((layout) => ({
|
|
8560
8621
|
...layout,
|
|
8561
8622
|
hydration: getCachedClientModuleHydrationPlan(
|
|
@@ -8566,8 +8627,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8566
8627
|
{ ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
|
|
8567
8628
|
)
|
|
8568
8629
|
}));
|
|
8569
|
-
const markdownPagePlan =
|
|
8570
|
-
|
|
8630
|
+
const markdownPagePlan = _chunkPSALMEHJcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
8631
|
+
_chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
|
|
8571
8632
|
config.root,
|
|
8572
8633
|
isolatedHydrationMode,
|
|
8573
8634
|
{ ...hydrationPlanOptions, packageReferences: pageHydrationPlanOptions.serverOwners }
|
|
@@ -8575,7 +8636,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8575
8636
|
const pageHydrationPlans2 = new Map(
|
|
8576
8637
|
pageRoutes.map((route) => [
|
|
8577
8638
|
route.modulePath,
|
|
8578
|
-
|
|
8639
|
+
_chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
8579
8640
|
route.modulePath,
|
|
8580
8641
|
config.root,
|
|
8581
8642
|
isolatedHydrationMode,
|
|
@@ -8586,7 +8647,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8586
8647
|
);
|
|
8587
8648
|
return { layoutHydrationPlans: layoutHydrationPlans2, pageHydrationPlans: pageHydrationPlans2 };
|
|
8588
8649
|
});
|
|
8589
|
-
|
|
8650
|
+
_chunkPSALMEHJcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
8590
8651
|
layoutHydrationPlans.map((layout) => ({
|
|
8591
8652
|
pattern: layout.pattern,
|
|
8592
8653
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -8595,10 +8656,10 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8595
8656
|
pageRoutes.map((route) => ({
|
|
8596
8657
|
// Compared by directory so a grouped layout applies only inside its group.
|
|
8597
8658
|
pattern: _nullishCoalesce(route.directory, () => ( route.pattern)),
|
|
8598
|
-
depth:
|
|
8659
|
+
depth: _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
|
|
8599
8660
|
metadata: pageHydrationPlans.get(route.modulePath)
|
|
8600
8661
|
})),
|
|
8601
|
-
|
|
8662
|
+
_chunkIGBQSUT5cjs.routeBoundaryCoversDirectory,
|
|
8602
8663
|
{ serverOwners: pageHydrationPlanOptions.serverOwners }
|
|
8603
8664
|
);
|
|
8604
8665
|
const providerServerImports = [
|
|
@@ -8614,7 +8675,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8614
8675
|
apiImports.push(
|
|
8615
8676
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(route.filePath)};`
|
|
8616
8677
|
);
|
|
8617
|
-
if (
|
|
8678
|
+
if (_chunkXJEOHDPNcjs.isPolyrouteRouteFileName.call(void 0, _path2.default.basename(route.filePath))) {
|
|
8618
8679
|
nativeAPIRoutes.push(`[${JSON.stringify(route.path)}, ${varName}]`);
|
|
8619
8680
|
}
|
|
8620
8681
|
apiRegistrations.push(`
|
|
@@ -8628,14 +8689,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8628
8689
|
const pageRegistrations = [];
|
|
8629
8690
|
const hasMarkdownPages = pageRoutes.some((route) => route.source !== void 0);
|
|
8630
8691
|
const orderedPageRoutes = pageRoutes.map((route, index) => ({ route, index })).sort((left, right) => {
|
|
8631
|
-
const order =
|
|
8692
|
+
const order = _chunkT4YCWRCJcjs.compareRoutePatternSpecificity.call(void 0, left.route.pattern, right.route.pattern);
|
|
8632
8693
|
return order || left.index - right.index;
|
|
8633
8694
|
}).map(({ route }) => route);
|
|
8634
8695
|
orderedPageRoutes.forEach((route, index) => {
|
|
8635
8696
|
const varName = `pageRoute${index}`;
|
|
8636
|
-
if (
|
|
8637
|
-
const renderingDirective2 =
|
|
8638
|
-
const markdownServerTree = pageHydrationPlanOptions.serverOwners &&
|
|
8697
|
+
if (_chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
|
|
8698
|
+
const renderingDirective2 = _chunkKM7ZRKCHcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
|
|
8699
|
+
const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunkPSALMEHJcjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
|
|
8639
8700
|
pageRegistrations.push(`
|
|
8640
8701
|
{
|
|
8641
8702
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
@@ -8643,14 +8704,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8643
8704
|
rendering: ${JSON.stringify(renderingDirective2)},` : ""}${markdownServerTree ? "\n serverTree: true," : ""}
|
|
8644
8705
|
module: createFarmMarkdownRouteModule({
|
|
8645
8706
|
source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
|
|
8646
|
-
filePath: ${JSON.stringify(
|
|
8707
|
+
filePath: ${JSON.stringify(_chunkUBH2OARScjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.modulePath))},
|
|
8647
8708
|
components: farmMdxComponents,
|
|
8648
|
-
config: farmMdxConfig,${
|
|
8709
|
+
config: farmMdxConfig,${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: React,"}
|
|
8649
8710
|
}),
|
|
8650
8711
|
markdownSource: {
|
|
8651
8712
|
source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
|
|
8652
8713
|
filePath: ${JSON.stringify(
|
|
8653
|
-
|
|
8714
|
+
_chunkUBH2OARScjs.toBakedMarkdownSourcePath.call(void 0, config.root, _nullishCoalesce(route.markdownSourcePath, () => ( route.modulePath)))
|
|
8654
8715
|
)},
|
|
8655
8716
|
},
|
|
8656
8717
|
}`);
|
|
@@ -8660,16 +8721,16 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8660
8721
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
|
|
8661
8722
|
);
|
|
8662
8723
|
const clientMetadata = pageHydrationPlans.get(route.modulePath);
|
|
8663
|
-
const renderingDirective =
|
|
8724
|
+
const renderingDirective = _chunkKM7ZRKCHcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
|
|
8664
8725
|
pageRegistrations.push(`
|
|
8665
8726
|
{
|
|
8666
8727
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
8667
8728
|
directory: ${JSON.stringify(route.directory)},` : ""}
|
|
8668
8729
|
module: ${varName},
|
|
8669
8730
|
shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
|
|
8670
|
-
clientModule: ${JSON.stringify(
|
|
8671
|
-
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${
|
|
8672
|
-
const rootStrategy =
|
|
8731
|
+
clientModule: ${JSON.stringify(_chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
|
|
8732
|
+
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkPSALMEHJcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
|
|
8733
|
+
const rootStrategy = _chunkUBH2OARScjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
8673
8734
|
route,
|
|
8674
8735
|
clientMetadata,
|
|
8675
8736
|
layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
|
|
@@ -8682,13 +8743,13 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8682
8743
|
rendering: ${JSON.stringify(renderingDirective)},` : ""}
|
|
8683
8744
|
${route.source !== void 0 ? `markdownSource: {
|
|
8684
8745
|
source: ${JSON.stringify(route.source)},
|
|
8685
|
-
filePath: ${JSON.stringify(
|
|
8746
|
+
filePath: ${JSON.stringify(_chunkUBH2OARScjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.markdownSourcePath))},
|
|
8686
8747
|
},` : ""}
|
|
8687
8748
|
}`);
|
|
8688
8749
|
});
|
|
8689
8750
|
const layoutImports = [];
|
|
8690
8751
|
const layoutRegistrations = [];
|
|
8691
|
-
const treeLayoutPatterns = farmIslandsMode ?
|
|
8752
|
+
const treeLayoutPatterns = farmIslandsMode ? _chunkIGBQSUT5cjs.getFarmServerTreeLayoutPatterns.call(void 0,
|
|
8692
8753
|
layoutHydrationPlans.map((layout) => ({
|
|
8693
8754
|
pattern: layout.pattern,
|
|
8694
8755
|
shouldHydrate: layout.hydration.shouldHydrate,
|
|
@@ -8706,7 +8767,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8706
8767
|
pattern: ${JSON.stringify(layout.pattern)},
|
|
8707
8768
|
module: ${varName},
|
|
8708
8769
|
shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},
|
|
8709
|
-
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode &&
|
|
8770
|
+
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode && _chunkUBH2OARScjs.canFarmSkipKeptLayoutRender.call(void 0, layout.modulePath, config.root) ? "\n skipKeptRender: true," : ""}${// A layout whose client components hydrate as islands of their own (islands mode,
|
|
8710
8771
|
// isolatedClientHydration, or an async layout): it wraps a docs page as an app page.
|
|
8711
8772
|
clientMetadata.hasIsolatedClientBoundaries ? "\n islands: true," : ""}
|
|
8712
8773
|
}`);
|
|
@@ -8734,7 +8795,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8734
8795
|
containerId: ${JSON.stringify(slot.containerId)},
|
|
8735
8796
|
interception: ${JSON.stringify(slot.interception)},
|
|
8736
8797
|
fallback: ${JSON.stringify(slot.fallback)},
|
|
8737
|
-
hydrates: ${!farmIslandsMode ||
|
|
8798
|
+
hydrates: ${!farmIslandsMode || _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
|
|
8738
8799
|
module: ${varName},
|
|
8739
8800
|
}`);
|
|
8740
8801
|
});
|
|
@@ -8745,12 +8806,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8745
8806
|
errorImports.push(
|
|
8746
8807
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
|
|
8747
8808
|
);
|
|
8748
|
-
const groupScope =
|
|
8809
|
+
const groupScope = _chunkIGBQSUT5cjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
|
|
8749
8810
|
errorRegistrations.push(`
|
|
8750
8811
|
{
|
|
8751
|
-
pattern: ${JSON.stringify(
|
|
8812
|
+
pattern: ${JSON.stringify(_chunkIGBQSUT5cjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
|
|
8752
8813
|
groupScope: ${JSON.stringify(groupScope)},
|
|
8753
|
-
directoryDepth: ${
|
|
8814
|
+
directoryDepth: ${_chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
|
|
8754
8815
|
module: ${varName},
|
|
8755
8816
|
}`);
|
|
8756
8817
|
});
|
|
@@ -8762,12 +8823,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8762
8823
|
loadingImports.push(
|
|
8763
8824
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
|
|
8764
8825
|
);
|
|
8765
|
-
const groupScope =
|
|
8826
|
+
const groupScope = _chunkIGBQSUT5cjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
|
|
8766
8827
|
loadingRegistrations.push(`
|
|
8767
8828
|
{
|
|
8768
|
-
pattern: ${JSON.stringify(
|
|
8829
|
+
pattern: ${JSON.stringify(_chunkIGBQSUT5cjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
|
|
8769
8830
|
groupScope: ${JSON.stringify(groupScope)},
|
|
8770
|
-
directoryDepth: ${
|
|
8831
|
+
directoryDepth: ${_chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
|
|
8771
8832
|
module: ${varName},
|
|
8772
8833
|
}`);
|
|
8773
8834
|
});
|
|
@@ -8780,7 +8841,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
8780
8841
|
metadataImageImports.push(
|
|
8781
8842
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(image.modulePath)};`
|
|
8782
8843
|
);
|
|
8783
|
-
const component = !
|
|
8844
|
+
const component = !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) && _chunkUBH2OARScjs.isRendererCompiledComponent.call(void 0, image.modulePath, _nullishCoalesce(_optionalChain([config, 'access', _205 => _205.renderer, 'optionalAccess', _206 => _206.componentExtensions]), () => ( [])));
|
|
8784
8845
|
metadataImageRegistrations.push(`
|
|
8785
8846
|
{
|
|
8786
8847
|
pattern: ${JSON.stringify(image.pattern)},
|
|
@@ -8946,7 +9007,7 @@ import { _applyFarmMobileShellClient } from "@farm.js/core/internal/production-r
|
|
|
8946
9007
|
// The mobile client documents load when a mobile shell asks for them (RFC 0004, 7.2), filled in
|
|
8947
9008
|
// once the client build has finished (see buildNitroUniversal). A shell's document stays out of
|
|
8948
9009
|
// shared caches, which the adapter learns as it does for a guarded response.
|
|
8949
|
-
const farmMobileShellClient = JSON.parse("${
|
|
9010
|
+
const farmMobileShellClient = JSON.parse("${_chunk4JARM2QQcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER}");
|
|
8950
9011
|
function applyFarmMobileShellResponse(request, response, context) {
|
|
8951
9012
|
return _applyFarmMobileShellClient(request, response, farmMobileShellClient, () =>
|
|
8952
9013
|
context?.onGuardedResponse?.()
|
|
@@ -8997,12 +9058,12 @@ function resolveFarmMobileShellRender(request, route, routePathname) {
|
|
|
8997
9058
|
import { getFarmFormState as farmFormState, getSharedLayoutPrefixLength, handleFarmFormActionRequest, ignoreFarmHeldValues, installFarmIslandValues, parseFarmLayoutChainHeader, renderFarmFormStateScript as farmFormStateScript } from "@farm.js/core/internal/production-runtime";
|
|
8998
9059
|
import { installFarmIslandsServer } from "@farm.js/core/internal/islands-server";
|
|
8999
9060
|
installFarmIslandsServer();
|
|
9000
|
-
const farmFormActionsConfig = ${JSON.stringify(
|
|
9061
|
+
const farmFormActionsConfig = ${JSON.stringify(_chunkNMMCBJZMcjs.resolveServerActionsConfig.call(void 0, config.serverActions))};
|
|
9001
9062
|
installFarmIslandValues();
|
|
9002
9063
|
${islandsActionKeyCode("@farm.js/core/internal/islx-server")}
|
|
9003
9064
|
${FARM_SEGMENT_NAVIGATION_SERVER_RUNTIME}` : `${farmRendererActions ? `
|
|
9004
9065
|
import { handleFarmFormActionRequest } from "@farm.js/core/internal/production-runtime";
|
|
9005
|
-
const farmFormActionsConfig = ${JSON.stringify(
|
|
9066
|
+
const farmFormActionsConfig = ${JSON.stringify(_chunkNMMCBJZMcjs.resolveServerActionsConfig.call(void 0, config.serverActions))};
|
|
9006
9067
|
${islandsActionKeyCode("@farm.js/core/internal/islx-actions-server")}` : ""}
|
|
9007
9068
|
function farmFormState() { return undefined; }
|
|
9008
9069
|
function farmFormStateScript() { return ""; }`}`;
|
|
@@ -9021,7 +9082,7 @@ const isFarmDocsAPIRequest = (requestOrPathname) => {
|
|
|
9021
9082
|
return pathname === apiPath || pathname.startsWith(apiPath + "/");
|
|
9022
9083
|
};` : adapterOwnsDocsRuntime ? `import { ${docsConfigModulePath ? "getFarmDocsConfigModuleRoot, " : ""}isFarmDocsAPIRequest } from "@farm.js/core/docs";
|
|
9023
9084
|
import { ${_optionalChain([config, 'access', _214 => _214.docs, 'access', _215 => _215.roots, 'optionalAccess', _216 => _216.length]) ? "createFarmDocsMultiRuntimeHandler as createFarmDocsAdapterMultiRuntimeHandler" : "createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler"} } from ${JSON.stringify(config.docs.adapter.server)};
|
|
9024
|
-
import * as FarmDocsAdapterUI from ${JSON.stringify(
|
|
9085
|
+
import * as FarmDocsAdapterUI from ${JSON.stringify(_chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter))};${docsConfigModulePath ? `
|
|
9025
9086
|
import * as farmDocsConfigModule from ${toVirtualEntryImportSpecifier(docsConfigModulePath)};` : ""}` : `import { createFarmDocsAPIHandler, createFarmDocsHandler, isFarmDocsAPIRequest } from "@farm.js/core/docs";` : "";
|
|
9026
9087
|
const docsFontImport = _optionalChain([config, 'access', _217 => _217.docs, 'optionalAccess', _218 => _218.enabled]) && !hasPrecompiledDocs ? `import { resolveFarmLayoutFonts } from "@farm.js/core/font";` : "";
|
|
9027
9088
|
const docsRuntimeImport = _optionalChain([config, 'access', _219 => _219.docs, 'optionalAccess', _220 => _220.enabled]) && !hasPrecompiledDocs ? `import { existsSync as farmDocsExistsSync } from "node:fs";
|
|
@@ -9048,16 +9109,16 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
|
|
|
9048
9109
|
const integrationRuntimeImport = integrationRuntimeExports.length ? `import { ${integrationRuntimeExports.join(", ")} } from "@farm.js/core/integrations";` : "";
|
|
9049
9110
|
const instrumentationImport = instrumentationPath ? `import * as FarmInstrumentationModule from ${toVirtualEntryImportSpecifier(instrumentationPath)};` : "";
|
|
9050
9111
|
const nativeAuth = generateNativeAuthIntegrationSource(config.auth);
|
|
9051
|
-
const nativeMCP =
|
|
9112
|
+
const nativeMCP = _chunkVNWKJOJFcjs.generateNativeMCPPluginSource.call(void 0, config.mcp);
|
|
9052
9113
|
const mobileSession = (config.plugins || []).some(
|
|
9053
|
-
(plugin) => _optionalChain([plugin, 'optionalAccess', _225 => _225.name]) ===
|
|
9114
|
+
(plugin) => _optionalChain([plugin, 'optionalAccess', _225 => _225.name]) === _chunk6AUPJYHFcjs.FARM_MOBILE_SESSION_PLUGIN
|
|
9054
9115
|
);
|
|
9055
9116
|
const nativeServerFns = (config.plugins || []).some(
|
|
9056
|
-
(plugin) => _optionalChain([plugin, 'optionalAccess', _226 => _226.name]) ===
|
|
9057
|
-
) ?
|
|
9117
|
+
(plugin) => _optionalChain([plugin, 'optionalAccess', _226 => _226.name]) === _chunk323JTLXRcjs.FARM_NATIVE_SERVER_FN_PLUGIN
|
|
9118
|
+
) ? _chunkQBCR2EHAcjs.collectFarmNativeServerFns.call(void 0, {
|
|
9058
9119
|
root: config.root,
|
|
9059
9120
|
srcDir: config.srcDir,
|
|
9060
|
-
entries:
|
|
9121
|
+
entries: _chunkQBCR2EHAcjs.findFarmNativeScreenFiles.call(void 0, _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, config))
|
|
9061
9122
|
}) : void 0;
|
|
9062
9123
|
const integrationImports = `
|
|
9063
9124
|
${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
|
|
@@ -9072,7 +9133,7 @@ ${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.c
|
|
|
9072
9133
|
${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
|
|
9073
9134
|
});` : ""}
|
|
9074
9135
|
`;
|
|
9075
|
-
const imageRuntime =
|
|
9136
|
+
const imageRuntime = _chunkUBH2OARScjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
9076
9137
|
const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
|
|
9077
9138
|
const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
|
|
9078
9139
|
const apiHandlerCode = apiRoutes.length > 0 ? `
|
|
@@ -9209,7 +9270,7 @@ ${routeClientGraphServerRuntime}
|
|
|
9209
9270
|
const farmRendererStreamingCapabilities = ${JSON.stringify(rendererStreamingCapabilities)};
|
|
9210
9271
|
const farmRendererName = ${JSON.stringify(config.renderer.name)};
|
|
9211
9272
|
const farmReactSyncRender = ${JSON.stringify(hasReactSyncRender)};
|
|
9212
|
-
const farmRendererRuntime = ${JSON.stringify(
|
|
9273
|
+
const farmRendererRuntime = ${JSON.stringify(_chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset))};
|
|
9213
9274
|
const farmRendererRuntimeStreamingCapabilities = ReactDOMServer.capabilities &&
|
|
9214
9275
|
ReactDOMServer.capabilities.streaming;
|
|
9215
9276
|
if (farmRendererRuntimeStreamingCapabilities &&
|
|
@@ -9254,7 +9315,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
|
|
|
9254
9315
|
|
|
9255
9316
|
function renderFarmDefault404Page() {
|
|
9256
9317
|
return React.createElement(React.Fragment, null,
|
|
9257
|
-
React.createElement("style", null, ${JSON.stringify(
|
|
9318
|
+
React.createElement("style", null, ${JSON.stringify(_chunkUBH2OARScjs.DEFAULT_NOT_FOUND_STYLES)}),
|
|
9258
9319
|
React.createElement("main", {
|
|
9259
9320
|
className: "farm-default-not-found",
|
|
9260
9321
|
"aria-labelledby": "farm-default-not-found-title",
|
|
@@ -9295,8 +9356,8 @@ function createFarmNotFoundElement(pathname) {
|
|
|
9295
9356
|
function isFarmStaticNotFoundPrerender(pathname) {
|
|
9296
9357
|
return (
|
|
9297
9358
|
typeof process !== "undefined" &&
|
|
9298
|
-
process.env?.${
|
|
9299
|
-
pathname === ${JSON.stringify(
|
|
9359
|
+
process.env?.${_chunkMBDDLYT5cjs.FARM_PRERENDER_ENV} === "1" &&
|
|
9360
|
+
pathname === ${JSON.stringify(_chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, FARM_STATIC_NOT_FOUND_PATH, config.basePath))}
|
|
9300
9361
|
);
|
|
9301
9362
|
}
|
|
9302
9363
|
|
|
@@ -9367,7 +9428,7 @@ function wrapWithFarmIntegrationProviders(element) {
|
|
|
9367
9428
|
// providers, so the server renders them inside it too. React lines an island up with its tree
|
|
9368
9429
|
// position instead, and its providers render no markup.
|
|
9369
9430
|
function wrapFarmIslandIntegrationProviders(element) {
|
|
9370
|
-
return ${
|
|
9431
|
+
return ${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? "element" : "wrapWithFarmIntegrationProviders(element)"};
|
|
9371
9432
|
}
|
|
9372
9433
|
const serverRuntimeIntegrations = Object.fromEntries(
|
|
9373
9434
|
Object.entries(configuredIntegrations).filter(([, integration]) =>
|
|
@@ -9376,7 +9437,7 @@ const serverRuntimeIntegrations = Object.fromEntries(
|
|
|
9376
9437
|
);
|
|
9377
9438
|
const integrationRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs, {
|
|
9378
9439
|
integrations: configuredIntegrations,
|
|
9379
|
-
${JSON.stringify(
|
|
9440
|
+
${JSON.stringify(_chunk5YT2ZSWScjs.FARM_INTEGRATION_API_BASE_PATH_KEY)}: ${JSON.stringify(_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))},
|
|
9380
9441
|
});
|
|
9381
9442
|
const farmInfraAnalytics = ${hasInfraAnalyticsRuntime ? `${hasPluginRuntime ? "createFarmInfraAnalyticsPlugin" : "createFarmInfraAnalyticsRecorder"}(${reportsWebMCPCalls ? "{ webmcp: { route: farmWebMCPCallRoute } }" : ""})` : "null"};${reportsWebMCPCalls ? `
|
|
9382
9443
|
// A WebMCP tool call a page reports goes under that page's route, matched and labeled as a
|
|
@@ -9444,7 +9505,7 @@ ${_optionalChain([config, 'access', _236 => _236.agent, 'optionalAccess', _237 =
|
|
|
9444
9505
|
// to the build.
|
|
9445
9506
|
const farmNoindexPreview = resolveFarmPreviewDeployment(
|
|
9446
9507
|
globalThis.process?.env,
|
|
9447
|
-
${JSON.stringify(
|
|
9508
|
+
${JSON.stringify(_chunkNNHIV3O2cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
|
|
9448
9509
|
);` : ""}
|
|
9449
9510
|
const farmMdxComponents = ${mdxComponentsPath ? `(FarmMdxComponentsModule.components || Reflect.get(FarmMdxComponentsModule, "default") || {})` : `(configuredFarmMdxComponents && typeof configuredFarmMdxComponents === "object" ? configuredFarmMdxComponents : {})`};
|
|
9450
9511
|
const farmObservabilityConfig = farmUserConfig?.observability ?? ${JSON.stringify(
|
|
@@ -9559,7 +9620,7 @@ const farmDocsModulePreloadPaths = farmDocsModulePreloads
|
|
|
9559
9620
|
}
|
|
9560
9621
|
: undefined;
|
|
9561
9622
|
${adapterOwnsDocsRuntime && !hasPrecompiledDocs ? `// The renderer contract's server exports, for a docs UI that builds its pages with them.
|
|
9562
|
-
const farmDocsAppRenderer = ${
|
|
9623
|
+
const farmDocsAppRenderer = ${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? '{ name: "react", createElement: React.createElement, Fragment: React.Fragment, renderToString: ReactDOMServer.renderToString }' : "__farmRendererServer"};
|
|
9563
9624
|
` : ""}const farmDocsHandler = ${_optionalChain([config, 'access', _250 => _250.docs, 'optionalAccess', _251 => _251.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `${adapterHandler.factory}(${adapterHandler.config}, {${_optionalChain([config, 'access', _252 => _252.docs, 'access', _253 => _253.roots, 'optionalAccess', _254 => _254.length]) ? "" : `
|
|
9564
9625
|
rootDir: farmDocsRuntimeRoot,`}
|
|
9565
9626
|
// A production build's content cannot change, so the adapter reads its
|
|
@@ -9578,13 +9639,13 @@ const farmDocsAppRenderer = ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, con
|
|
|
9578
9639
|
),
|
|
9579
9640
|
loadUIModule: async () => FarmDocsAdapterUI,
|
|
9580
9641
|
// The app's renderer, for a UI that builds its pages with it.
|
|
9581
|
-
loadRenderer: async () => farmDocsAppRenderer,${
|
|
9642
|
+
loadRenderer: async () => farmDocsAppRenderer,${_chunkVZ2P6GRCcjs.getFarmDocsAdapterRenderer.call(void 0, config.docs.adapter) === "react" ? `
|
|
9582
9643
|
loadReactModule: async () => FarmDocsAdapterUI,` : ""}
|
|
9583
9644
|
// Lists the docs MCP endpoint in /.well-known/ai-catalog.json for the server's lifetime.
|
|
9584
9645
|
registerMCPServer: registerFarmMCPServer,
|
|
9585
9646
|
// A page built with this keeps its HTML string, so the preload budget and the response
|
|
9586
9647
|
// writer use it instead of reading and re-encoding the body. Older adapters ignore it.
|
|
9587
|
-
createHtmlResponse: farmOwnedHtmlResponse,${
|
|
9648
|
+
createHtmlResponse: farmOwnedHtmlResponse,${_chunkVQYGXWCScjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
|
|
9588
9649
|
// The adapter keeps pages a path guard covers off search, llms.txt, the sitemap and MCP. It
|
|
9589
9650
|
// asks about any path its own content lists, so the guards decide here, not a page list.
|
|
9590
9651
|
isPathGuarded: (pathname) =>
|
|
@@ -9649,7 +9710,7 @@ function fetchFarmInnerRequest(request, context) {
|
|
|
9649
9710
|
headers.delete("accept-encoding");
|
|
9650
9711
|
return fetch(new Request(request, { headers }), context);
|
|
9651
9712
|
}
|
|
9652
|
-
const farmLocalAPIBasePath = ${JSON.stringify(
|
|
9713
|
+
const farmLocalAPIBasePath = ${JSON.stringify(_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
|
|
9653
9714
|
// Deployment skew protection (see the deployment docs): documents embed this ID, page responses
|
|
9654
9715
|
// name it, and a page request from a browser holding another deployment's page is refused.
|
|
9655
9716
|
const farmDeploymentId = ${JSON.stringify(config.deploymentId)};${searchPreserveRoutesSource ? `
|
|
@@ -9661,12 +9722,12 @@ const farmDeploymentCookiePath = ${JSON.stringify(config.basePath || "/")};
|
|
|
9661
9722
|
// runtime request.
|
|
9662
9723
|
const farmRuntimeErrorSlot = Symbol("farm.runtime.error.slot");
|
|
9663
9724
|
const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
|
|
9664
|
-
${_optionalChain([config, 'access', _257 => _257.agent, 'optionalAccess', _258 => _258.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(
|
|
9725
|
+
${_optionalChain([config, 'access', _257 => _257.agent, 'optionalAccess', _258 => _258.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkC4DZAEVTcjs.resolveFarmApiCatalogInput.call(void 0, config))};
|
|
9665
9726
|
` : ""}${_optionalChain([config, 'access', _259 => _259.agent, 'optionalAccess', _260 => _260.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
|
|
9666
|
-
|
|
9727
|
+
_chunkC4DZAEVTcjs.resolveFarmAppManifestInput.call(void 0, config, {
|
|
9667
9728
|
build: config.deploymentId,
|
|
9668
|
-
packages:
|
|
9669
|
-
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ?
|
|
9729
|
+
packages: _chunkUBH2OARScjs.resolveFarmAppPackages.call(void 0, config.root),
|
|
9730
|
+
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkUBH2OARScjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
|
|
9670
9731
|
})
|
|
9671
9732
|
)};
|
|
9672
9733
|
${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -10454,7 +10515,7 @@ function peelFarmDocumentPrefix(markup) {
|
|
|
10454
10515
|
let inner = markup.replace(/^\\s+/, "");
|
|
10455
10516
|
let hoisted = "";
|
|
10456
10517
|
const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents;?\\s*["'][^>]*>/i;
|
|
10457
|
-
const hoistable = /${
|
|
10518
|
+
const hoistable = /${_chunkIGBQSUT5cjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
10458
10519
|
let match;
|
|
10459
10520
|
while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
|
|
10460
10521
|
if (!/^<div/i.test(match[0])) hoisted += match[0];
|
|
@@ -10483,7 +10544,7 @@ function opensFarmFullDocument(markup) {
|
|
|
10483
10544
|
// them: its own head takes them. Matches the dev renderer's takeFarmHoistedHead.
|
|
10484
10545
|
function takeFarmHoistedHead(markup) {
|
|
10485
10546
|
if (opensFarmFullDocument(markup)) return { head: "", body: markup };
|
|
10486
|
-
const hoistable = /${
|
|
10547
|
+
const hoistable = /${_chunkIGBQSUT5cjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
10487
10548
|
let head = "";
|
|
10488
10549
|
let body = markup;
|
|
10489
10550
|
let match;
|
|
@@ -11041,10 +11102,10 @@ async function handleMetadataImageRequest(request, routePathname) {
|
|
|
11041
11102
|
path: match.pagePath,
|
|
11042
11103
|
};
|
|
11043
11104
|
|
|
11044
|
-
${hasGeneratedMetadataImages ? `const value = await resolveFarmMetadataImageValue(imageModule, props${
|
|
11105
|
+
${hasGeneratedMetadataImages ? `const value = await resolveFarmMetadataImageValue(imageModule, props${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? "" : ", {\n renderer: ReactDOMServer,\n component: image.component === true,\n }"});
|
|
11045
11106
|
return createFarmMetadataImageResponse(value, imageModule, {
|
|
11046
11107
|
method,
|
|
11047
|
-
ifNoneMatch: request.headers.get("if-none-match"),${
|
|
11108
|
+
ifNoneMatch: request.headers.get("if-none-match"),${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: ReactDOMServer,"}
|
|
11048
11109
|
});` : 'throw new Error("Generated metadata image runtime is unavailable");'}
|
|
11049
11110
|
} catch (error) {
|
|
11050
11111
|
console.error("Metadata image render failed:", error);
|
|
@@ -11123,7 +11184,7 @@ function createFarmAgentRobotsResponse(request) {
|
|
|
11123
11184
|
// its nearest layout's.
|
|
11124
11185
|
const farmAgentGuardedPages = new Set(${JSON.stringify(
|
|
11125
11186
|
pageRoutes.map((route) => route.pattern).filter(
|
|
11126
|
-
(pattern) => !pattern.includes("[") &&
|
|
11187
|
+
(pattern) => !pattern.includes("[") && _chunkIGBQSUT5cjs.farmPathGuardCoversPage.call(void 0,
|
|
11127
11188
|
{
|
|
11128
11189
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
11129
11190
|
middlewareRoutes
|
|
@@ -11178,12 +11239,12 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
|
|
|
11178
11239
|
// aside for a page route that answers /mcp and for any MCP server published or
|
|
11179
11240
|
// registered at runtime, such as the docs engine's.
|
|
11180
11241
|
const farmDefaultMCPServer = ${JSON.stringify(
|
|
11181
|
-
|
|
11242
|
+
_chunkR6GOH5CHcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkXPVS4HKUcjs.FARM_VERSION)
|
|
11182
11243
|
)};
|
|
11183
11244
|
let farmDefaultMCPRouteFree;
|
|
11184
11245
|
function getFarmDefaultMCPServer() {
|
|
11185
11246
|
if (farmDefaultMCPRouteFree === undefined) {
|
|
11186
|
-
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(
|
|
11247
|
+
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH)});
|
|
11187
11248
|
}
|
|
11188
11249
|
return farmDefaultMCPRouteFree ? resolveFarmDefaultMCPServer(farmDefaultMCPServer) : undefined;
|
|
11189
11250
|
}
|
|
@@ -11372,7 +11433,7 @@ ${edgeMiddlewareFilePaths.length > 0 ? `
|
|
|
11372
11433
|
// middleware guards is never prerendered. Read once: Nitro's prerender worker sets the variable.
|
|
11373
11434
|
const farmEdgeMiddlewareFiles = new Set(${JSON.stringify(edgeMiddlewareFilePaths)});
|
|
11374
11435
|
const farmPrerendering =
|
|
11375
|
-
typeof process !== "undefined" && process.env?.${
|
|
11436
|
+
typeof process !== "undefined" && process.env?.${_chunkMBDDLYT5cjs.FARM_PRERENDER_ENV} === "1";
|
|
11376
11437
|
` : ""}
|
|
11377
11438
|
const farmMiddlewareRunner = ${hasMiddlewareRuntime ? `createProductionMiddlewareRunner({
|
|
11378
11439
|
config: farmMiddlewareConfig,
|
|
@@ -11628,7 +11689,7 @@ ${hasInfraAnalyticsRuntime ? `
|
|
|
11628
11689
|
// endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
|
|
11629
11690
|
// labeled here; route.pattern keeps meaning the matched app route for plugins.
|
|
11630
11691
|
const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
11631
|
-
|
|
11692
|
+
_chunkC4DZAEVTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
11632
11693
|
agent: {
|
|
11633
11694
|
...config.agent,
|
|
11634
11695
|
aiCatalog: servesAiCatalog,
|
|
@@ -12285,7 +12346,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
12285
12346
|
// A POST is a form a native-tier screen submitted (native-tree.ts).
|
|
12286
12347
|
if (
|
|
12287
12348
|
(request.method === "GET" || request.method === "HEAD" || request.method === "POST") &&
|
|
12288
|
-
request.headers.get("accept")?.includes(${JSON.stringify(
|
|
12349
|
+
request.headers.get("accept")?.includes(${JSON.stringify(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)})
|
|
12289
12350
|
) {
|
|
12290
12351
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
12291
12352
|
request,
|
|
@@ -12409,7 +12470,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
12409
12470
|
// agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
|
|
12410
12471
|
// public manifest, the same document for every request.
|
|
12411
12472
|
if (
|
|
12412
|
-
[${JSON.stringify(
|
|
12473
|
+
[${JSON.stringify(_chunkC4DZAEVTcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkC4DZAEVTcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
|
|
12413
12474
|
normalizeRuntimePath(routePathname),
|
|
12414
12475
|
)
|
|
12415
12476
|
) {
|
|
@@ -12421,7 +12482,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
12421
12482
|
` : ""}
|
|
12422
12483
|
${_optionalChain([config, 'access', _291 => _291.agent, 'optionalAccess', _292 => _292.apiCatalog]) ? `
|
|
12423
12484
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
12424
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
12485
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkC4DZAEVTcjs.FARM_API_CATALOG_PATH)}) {
|
|
12425
12486
|
return applyProductionMiddlewareHeaders(
|
|
12426
12487
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
12427
12488
|
middlewareHeaders,
|
|
@@ -12981,7 +13042,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
12981
13042
|
pageElement,
|
|
12982
13043
|
);
|
|
12983
13044
|
|
|
12984
|
-
${
|
|
13045
|
+
${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) pageElement = markPagePosition(React, pageElement);" : ""}
|
|
12985
13046
|
// Wrap with layouts (from innermost to outermost)
|
|
12986
13047
|
// Layouts are sorted by depth (root first), so we process in reverse
|
|
12987
13048
|
let wrappedElement = pageElement;
|
|
@@ -13055,7 +13116,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
13055
13116
|
wrappedElement = wrapFarmRouteClientGraph(wrappedElement);
|
|
13056
13117
|
}
|
|
13057
13118
|
|
|
13058
|
-
${
|
|
13119
|
+
${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) wrappedElement = markLayoutPosition(React, wrappedElement);" : ""}
|
|
13059
13120
|
wrappedElement = wrapWithFarmIntegrationProviders(wrappedElement);
|
|
13060
13121
|
return renderFarmElement(ReactDOMServer, wrappedElement, route.pattern, farmFlushToken);
|
|
13061
13122
|
};
|
|
@@ -13623,7 +13684,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
13623
13684
|
${servesDefaultMCP ? `
|
|
13624
13685
|
// agent.mcp: no app route answered /mcp, so the default read-only server may.
|
|
13625
13686
|
if (
|
|
13626
|
-
normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
13687
|
+
normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH)} &&
|
|
13627
13688
|
getFarmDefaultMCPServer()
|
|
13628
13689
|
) {
|
|
13629
13690
|
return applyProductionMiddlewareHeaders(
|
|
@@ -14223,15 +14284,15 @@ function getManifestPageEntry(manifest, pathname) {
|
|
|
14223
14284
|
pages = manifest.routes.filter((entry) => entry.kind === "page").map((entry) => ({
|
|
14224
14285
|
entry,
|
|
14225
14286
|
matches: createMiddlewarePatternMatcher(entry.pattern),
|
|
14226
|
-
specificity:
|
|
14227
|
-
})).sort((left, right) =>
|
|
14287
|
+
specificity: _chunkT4YCWRCJcjs.getRoutePatternSpecificity.call(void 0, entry.pattern)
|
|
14288
|
+
})).sort((left, right) => _chunkT4YCWRCJcjs.compareRouteSpecificity.call(void 0, left.specificity, right.specificity)).map(({ entry, matches }) => ({ entry, matches }));
|
|
14228
14289
|
manifestPageMatchers.set(manifest.routes, pages);
|
|
14229
14290
|
}
|
|
14230
14291
|
return _optionalChain([pages, 'access', _309 => _309.find, 'call', _310 => _310((page) => page.matches(pathname)), 'optionalAccess', _311 => _311.entry]);
|
|
14231
14292
|
}
|
|
14232
14293
|
function withFarmEdgeGuardedPrerenderHeaders(headers, edgeGuarded) {
|
|
14233
14294
|
if (!edgeGuarded) return headers;
|
|
14234
|
-
const cacheHeaders = /* @__PURE__ */ new Set(["cache-control", ...
|
|
14295
|
+
const cacheHeaders = /* @__PURE__ */ new Set(["cache-control", ..._chunkCTTXHHZGcjs.CDN_CACHE_CONTROL_HEADERS]);
|
|
14235
14296
|
return {
|
|
14236
14297
|
...Object.fromEntries(
|
|
14237
14298
|
Object.entries(headers).filter(([name]) => !cacheHeaders.has(name.toLowerCase()))
|
|
@@ -14264,9 +14325,9 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
14264
14325
|
if (rewriteSources.some((source) => middlewarePatternMatches(source, pathname))) {
|
|
14265
14326
|
return "rewrite";
|
|
14266
14327
|
}
|
|
14267
|
-
if (
|
|
14268
|
-
if (
|
|
14269
|
-
if (
|
|
14328
|
+
if (_chunkIGBQSUT5cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
|
|
14329
|
+
if (_chunkIGBQSUT5cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
|
|
14330
|
+
if (_chunkF5T55PYXcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
|
|
14270
14331
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
14271
14332
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
14272
14333
|
if (_optionalChain([manifestEntry, 'optionalAccess', _312 => _312.rendering]) === "dynamic") return "dynamic runtime manifest";
|
|
@@ -14293,14 +14354,14 @@ async function resolveFarmStaticNotFoundPlan(options) {
|
|
|
14293
14354
|
if (options.preset !== "vercel") {
|
|
14294
14355
|
return { reason: `it applies to the vercel target, not "${options.preset}"` };
|
|
14295
14356
|
}
|
|
14296
|
-
if (
|
|
14357
|
+
if (_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer)) {
|
|
14297
14358
|
return { reason: "the app sets `renderer: false`, so a missing URL gets a JSON 404" };
|
|
14298
14359
|
}
|
|
14299
14360
|
if (config.i18n.enabled) return { reason: "i18n may redirect any path to a locale" };
|
|
14300
14361
|
const routePatterns = /* @__PURE__ */ new Set();
|
|
14301
14362
|
const prefixPatterns = /* @__PURE__ */ new Set([
|
|
14302
14363
|
"/api",
|
|
14303
|
-
|
|
14364
|
+
_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api),
|
|
14304
14365
|
"/_farm",
|
|
14305
14366
|
"/__farm",
|
|
14306
14367
|
"/.well-known",
|
|
@@ -14343,22 +14404,33 @@ async function resolveFarmStaticNotFoundPlan(options) {
|
|
|
14343
14404
|
for (const image of routeManager.getMetadataImages().values()) {
|
|
14344
14405
|
routePatterns.add(`${image.pattern === "/" ? "" : image.pattern}/${image.fileName}`);
|
|
14345
14406
|
}
|
|
14407
|
+
const apiPrefixes = [...prefixPatterns].map(normalizeStaticNotFoundPath);
|
|
14408
|
+
for (const routePath of options.apiRoutePaths) {
|
|
14409
|
+
const pathname = normalizeStaticNotFoundPath(routePath);
|
|
14410
|
+
if (apiPrefixes.some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`))) {
|
|
14411
|
+
continue;
|
|
14412
|
+
}
|
|
14413
|
+
if (/^\/\[\[?\.\.\./.test(pathname)) {
|
|
14414
|
+
return { reason: `the API route \`${routePath}\` answers every path` };
|
|
14415
|
+
}
|
|
14416
|
+
routePatterns.add(pathname);
|
|
14417
|
+
}
|
|
14346
14418
|
for (const plugin of config.plugins || []) {
|
|
14347
|
-
if (
|
|
14348
|
-
if (plugin.name ===
|
|
14349
|
-
if (
|
|
14419
|
+
if (_chunkN4AM7Q34cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) continue;
|
|
14420
|
+
if (plugin.name === _chunk6AUPJYHFcjs.FARM_MOBILE_SESSION_PLUGIN) continue;
|
|
14421
|
+
if (_chunkUOFTT6S4cjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, FARM_STATIC_NOT_FOUND_PROBE)) {
|
|
14350
14422
|
return { reason: `the server plugin "${plugin.name}" may answer any path` };
|
|
14351
14423
|
}
|
|
14352
14424
|
for (const endpoint of _nullishCoalesce(_optionalChain([plugin, 'access', _317 => _317.runtime, 'optionalAccess', _318 => _318.endpoints]), () => ( []))) {
|
|
14353
14425
|
paths.add(
|
|
14354
|
-
|
|
14426
|
+
_chunkUOFTT6S4cjs.normalizeFarmPluginRuntimeEndpointPath.call(void 0,
|
|
14355
14427
|
endpoint.path,
|
|
14356
14428
|
`Farm plugin "${plugin.name}" runtime endpoint`
|
|
14357
14429
|
)
|
|
14358
14430
|
);
|
|
14359
14431
|
}
|
|
14360
14432
|
}
|
|
14361
|
-
if (
|
|
14433
|
+
if (_chunkIGBQSUT5cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware)) {
|
|
14362
14434
|
const entries = Array.isArray(config.middleware) ? config.middleware : [config.middleware];
|
|
14363
14435
|
for (const entry of entries) {
|
|
14364
14436
|
const refusal = addMatchers(entry.matcher, "middleware in the config");
|
|
@@ -14380,7 +14452,7 @@ async function resolveFarmStaticNotFoundPlan(options) {
|
|
|
14380
14452
|
if (refusal) return { reason: refusal };
|
|
14381
14453
|
}
|
|
14382
14454
|
for (const [key, integration] of Object.entries(config.integrations || {})) {
|
|
14383
|
-
if (!
|
|
14455
|
+
if (!_chunk5YT2ZSWScjs.isFarmIntegration.call(void 0, integration)) continue;
|
|
14384
14456
|
for (const entry of _nullishCoalesce(integration.middleware, () => ( []))) {
|
|
14385
14457
|
const refusal = addMatchers(entry.matcher, `the "${key}" integration's middleware`);
|
|
14386
14458
|
if (refusal) return { reason: refusal };
|
|
@@ -14399,13 +14471,13 @@ async function resolveFarmStaticNotFoundPlan(options) {
|
|
|
14399
14471
|
if (refusal) return { reason: refusal };
|
|
14400
14472
|
}
|
|
14401
14473
|
if (_optionalChain([config, 'access', _319 => _319.docs, 'optionalAccess', _320 => _320.enabled])) {
|
|
14402
|
-
for (const docsRoot of
|
|
14474
|
+
for (const docsRoot of _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs)) {
|
|
14403
14475
|
const entry = normalizeStaticNotFoundPath(docsRoot.entry);
|
|
14404
14476
|
if (entry === "/") return { reason: "the docs entry is `/`, so docs answer every path" };
|
|
14405
14477
|
prefixPatterns.add(entry);
|
|
14406
14478
|
}
|
|
14407
|
-
if (
|
|
14408
|
-
const adapterRoutes = await
|
|
14479
|
+
if (_chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
14480
|
+
const adapterRoutes = await _chunkVQYGXWCScjs.listFarmDocsAdapterRoutes.call(void 0, config.docs, {
|
|
14409
14481
|
root: options.root,
|
|
14410
14482
|
srcDir: config.srcDir
|
|
14411
14483
|
});
|
|
@@ -14434,9 +14506,9 @@ async function resolveFarmStaticNotFoundPlan(options) {
|
|
|
14434
14506
|
if (config.openapi.specRoute) paths.add(config.openapi.specRoute);
|
|
14435
14507
|
}
|
|
14436
14508
|
if (config.workflows.route) prefixPatterns.add(config.workflows.route);
|
|
14437
|
-
const notFoundPath =
|
|
14509
|
+
const notFoundPath = _chunkUBH2OARScjs.resolveFarmNotFoundComponentPath.call(void 0,
|
|
14438
14510
|
config,
|
|
14439
|
-
|
|
14511
|
+
_chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, config),
|
|
14440
14512
|
routeManager.getRendererNotFoundPath()
|
|
14441
14513
|
);
|
|
14442
14514
|
if (notFoundPath && /\bpathname\b/.test(_fs.readFileSync.call(void 0, notFoundPath, "utf8"))) {
|
|
@@ -14456,27 +14528,27 @@ async function resolveFarmStaticNotFoundPlan(options) {
|
|
|
14456
14528
|
}
|
|
14457
14529
|
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
14458
14530
|
if (!_optionalChain([config, 'access', _321 => _321.docs, 'optionalAccess', _322 => _322.enabled]) || !config.docs.prerender) return [];
|
|
14459
|
-
if (
|
|
14460
|
-
|
|
14531
|
+
if (_chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge") {
|
|
14532
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
14461
14533
|
`\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
|
|
14462
14534
|
);
|
|
14463
14535
|
return [];
|
|
14464
14536
|
}
|
|
14465
|
-
if (!
|
|
14466
|
-
const { pages: pages2, originDependent } =
|
|
14537
|
+
if (!_chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
14538
|
+
const { pages: pages2, originDependent } = _chunk4A6WSOZHcjs.listFarmDocsBuiltInPrerenderPages.call(void 0, config.docs, {
|
|
14467
14539
|
root,
|
|
14468
14540
|
srcDir: config.srcDir
|
|
14469
14541
|
});
|
|
14470
14542
|
if (originDependent.length > 0) {
|
|
14471
|
-
|
|
14543
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
14472
14544
|
`\u21AA Keeping ${originDependent.length} docs page(s) rendering on request: their social image metadata is an absolute URL built from the request's origin. Set docs.socialImage.baseUrl to prerender them.`
|
|
14473
14545
|
);
|
|
14474
14546
|
}
|
|
14475
14547
|
return pages2;
|
|
14476
14548
|
}
|
|
14477
|
-
const pages = await
|
|
14549
|
+
const pages = await _chunkVQYGXWCScjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
|
|
14478
14550
|
if (!pages) {
|
|
14479
|
-
|
|
14551
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
14480
14552
|
`The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
|
|
14481
14553
|
);
|
|
14482
14554
|
return [];
|
|
@@ -14484,17 +14556,17 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
14484
14556
|
return pages;
|
|
14485
14557
|
}
|
|
14486
14558
|
async function listFarmDocsAnalyticsPages(config, root, preset) {
|
|
14487
|
-
if (!_optionalChain([config, 'access', _323 => _323.docs, 'optionalAccess', _324 => _324.enabled]) || config.analytics === false ||
|
|
14559
|
+
if (!_optionalChain([config, 'access', _323 => _323.docs, 'optionalAccess', _324 => _324.enabled]) || config.analytics === false || _chunkRLC7NNTAcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "nodejs") {
|
|
14488
14560
|
return [];
|
|
14489
14561
|
}
|
|
14490
14562
|
try {
|
|
14491
|
-
return await
|
|
14563
|
+
return await _chunkVQYGXWCScjs.listFarmDocsPagePaths.call(void 0, config.docs, {
|
|
14492
14564
|
root,
|
|
14493
14565
|
srcDir: config.srcDir,
|
|
14494
|
-
adapter:
|
|
14566
|
+
adapter: _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
|
|
14495
14567
|
});
|
|
14496
14568
|
} catch (error) {
|
|
14497
|
-
|
|
14569
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
14498
14570
|
`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)}).`
|
|
14499
14571
|
);
|
|
14500
14572
|
return [];
|
|
@@ -14526,10 +14598,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
14526
14598
|
const nitroBuilder = nitroBuilderResult.value;
|
|
14527
14599
|
const isVercel = preset === "vercel";
|
|
14528
14600
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
14529
|
-
const outputDir =
|
|
14601
|
+
const outputDir = _chunkF5T55PYXcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
14530
14602
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
14531
14603
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
14532
|
-
const imageRuntime =
|
|
14604
|
+
const imageRuntime = _chunkUBH2OARScjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
14533
14605
|
const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
|
|
14534
14606
|
(image) => image.sourceType === "module"
|
|
14535
14607
|
);
|
|
@@ -14546,16 +14618,16 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
14546
14618
|
const ssrExternalsArePackaged = [...ssrExternalPackages].every(
|
|
14547
14619
|
(packageName) => copiedRuntimePackages.has(packageName)
|
|
14548
14620
|
);
|
|
14549
|
-
const isPrebuiltSSRCandidate = preset
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14621
|
+
const isPrebuiltSSRCandidate = PREBUILT_SSR_PRESETS.has(preset) && ssrExternalsArePackaged;
|
|
14622
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} Nitro output directory: ${outputDir}`);
|
|
14623
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} SSR entry file: ${ssrEntryFile}`);
|
|
14624
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} Preset: ${preset}`);
|
|
14553
14625
|
const ssgCollectionPromise = routeManager.collectSSGPages();
|
|
14554
|
-
const middlewareRoutesPromise = discoverMiddlewareRoutes(
|
|
14626
|
+
const middlewareRoutesPromise = discoverMiddlewareRoutes(_chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, config));
|
|
14555
14627
|
const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
|
|
14556
14628
|
const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
|
|
14557
|
-
const farmWorkflows = await
|
|
14558
|
-
const farmCron = await
|
|
14629
|
+
const farmWorkflows = await _chunkXE3E4MERcjs.prepareFarmWorkflowsForNitro.call(void 0, config);
|
|
14630
|
+
const farmCron = await _chunkXH4GQ7MTcjs.prepareFarmCronForNitro.call(void 0, config);
|
|
14559
14631
|
const [
|
|
14560
14632
|
{ ssg: ssgPages },
|
|
14561
14633
|
middlewareRoutes,
|
|
@@ -14585,7 +14657,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
14585
14657
|
const edgeGuardedPrerenderRoutes = [];
|
|
14586
14658
|
const addPrerenderRoute = (pathname) => {
|
|
14587
14659
|
prerenderRoutes.push(pathname);
|
|
14588
|
-
if (
|
|
14660
|
+
if (_chunkIGBQSUT5cjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
|
|
14589
14661
|
edgeGuardedPrerenderRoutes.push(pathname);
|
|
14590
14662
|
}
|
|
14591
14663
|
};
|
|
@@ -14627,45 +14699,46 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
14627
14699
|
addPrerenderRoute(pathname);
|
|
14628
14700
|
}
|
|
14629
14701
|
for (const skipped of skippedPrerenderRoutes) {
|
|
14630
|
-
|
|
14702
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
|
|
14631
14703
|
}
|
|
14632
14704
|
const staticNotFoundPlan = await resolveFarmStaticNotFoundPlan({
|
|
14633
14705
|
config,
|
|
14634
14706
|
root,
|
|
14635
14707
|
preset,
|
|
14636
14708
|
routeManager,
|
|
14709
|
+
apiRoutePaths: apiRouteManager.getRoutes().keys(),
|
|
14637
14710
|
routeRuntimeManifest,
|
|
14638
14711
|
middlewareRoutes,
|
|
14639
14712
|
redirectSources,
|
|
14640
14713
|
rewriteSources
|
|
14641
14714
|
});
|
|
14642
14715
|
if (staticNotFoundPlan && "reason" in staticNotFoundPlan) {
|
|
14643
|
-
|
|
14716
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
14644
14717
|
`\u21AA Keeping missing URLs server-handled: experimental.staticNotFound is off because ${staticNotFoundPlan.reason}`
|
|
14645
14718
|
);
|
|
14646
14719
|
}
|
|
14647
|
-
const staticNotFoundPrerenderPath = staticNotFoundPlan && "input" in staticNotFoundPlan ?
|
|
14720
|
+
const staticNotFoundPrerenderPath = staticNotFoundPlan && "input" in staticNotFoundPlan ? _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, FARM_STATIC_NOT_FOUND_PATH, config.basePath) : null;
|
|
14648
14721
|
if (farmWorkflows.workflows.length > 0) {
|
|
14649
|
-
|
|
14722
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u23F1\uFE0F Found ${farmWorkflows.workflows.length} Farm workflow task(s)`);
|
|
14650
14723
|
}
|
|
14651
14724
|
if (farmCron.jobs.length > 0 && farmCron.provider === "farmjs") {
|
|
14652
|
-
|
|
14725
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
14653
14726
|
`\u23F1\uFE0F ${farmCron.jobs.length} Farm cron job(s) for Infra; run farm cron sync after deployment`
|
|
14654
14727
|
);
|
|
14655
14728
|
} else if (farmCron.jobs.length > 0) {
|
|
14656
|
-
|
|
14729
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u23F1\uFE0F Configured ${farmCron.jobs.length} Farm cron route(s)`);
|
|
14657
14730
|
}
|
|
14658
14731
|
if (preset === "cloudflare-pages" && farmCron.jobs.length > 0 && farmCron.provider === "host") {
|
|
14659
|
-
|
|
14732
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
14660
14733
|
"Cloudflare Pages does not install Cron Triggers. Use the cloudflare-module preset or an external scheduler with .farm/cron-manifest.json."
|
|
14661
14734
|
);
|
|
14662
14735
|
}
|
|
14663
|
-
const portableScheduledTasks =
|
|
14736
|
+
const portableScheduledTasks = _chunkXH4GQ7MTcjs.mergeScheduledTasks.call(void 0,
|
|
14664
14737
|
farmWorkflows.scheduledTasks,
|
|
14665
14738
|
farmCron.scheduledTasks
|
|
14666
14739
|
);
|
|
14667
|
-
const scheduledTasks = preset.startsWith("cloudflare") ?
|
|
14668
|
-
const cloudflareCronConfig = farmCron.provider === "host" ?
|
|
14740
|
+
const scheduledTasks = preset.startsWith("cloudflare") ? _chunkXH4GQ7MTcjs.toFarmCronCloudflareScheduledTasks.call(void 0, portableScheduledTasks) : portableScheduledTasks;
|
|
14741
|
+
const cloudflareCronConfig = farmCron.provider === "host" ? _chunkXH4GQ7MTcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
|
|
14669
14742
|
const [
|
|
14670
14743
|
clientCssHref,
|
|
14671
14744
|
clientJsSrc,
|
|
@@ -14688,8 +14761,8 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
14688
14761
|
const encodedClientStylesheet = encodeFarmBuildJSONPlaceholder(
|
|
14689
14762
|
await resolveClientStylesheetLinkHref(clientOutputDir, clientCssHref)
|
|
14690
14763
|
);
|
|
14691
|
-
const encodedMobileShellClient = shouldBuildFarmMobileClient(config) ?
|
|
14692
|
-
await
|
|
14764
|
+
const encodedMobileShellClient = shouldBuildFarmMobileClient(config) ? _chunk4JARM2QQcjs.encodeFarmMobileShellClient.call(void 0,
|
|
14765
|
+
await _chunk4JARM2QQcjs.finalizeFarmMobileClient.call(void 0, {
|
|
14693
14766
|
buildDir: _path2.default.join(root, distDir),
|
|
14694
14767
|
clientOutputDir,
|
|
14695
14768
|
webEntry: clientJsSrc,
|
|
@@ -14700,8 +14773,8 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
14700
14773
|
) : null;
|
|
14701
14774
|
for (const output of Object.values(ssrBundle)) {
|
|
14702
14775
|
if (output.type !== "chunk") continue;
|
|
14703
|
-
if (encodedMobileShellClient && output.code.includes(
|
|
14704
|
-
output.code = output.code.split(
|
|
14776
|
+
if (encodedMobileShellClient && output.code.includes(_chunk4JARM2QQcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER)) {
|
|
14777
|
+
output.code = output.code.split(_chunk4JARM2QQcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER).join(encodedMobileShellClient);
|
|
14705
14778
|
}
|
|
14706
14779
|
if (output.code.includes(FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER)) {
|
|
14707
14780
|
output.code = output.code.split(FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER).join(encodedDocsModulePreloads);
|
|
@@ -14999,19 +15072,19 @@ function toFarmNodeResponse(request, response) {
|
|
|
14999
15072
|
);
|
|
15000
15073
|
}
|
|
15001
15074
|
await fs5.writeFile(
|
|
15002
|
-
_path2.default.join(ssrOutputDir,
|
|
15003
|
-
|
|
15075
|
+
_path2.default.join(ssrOutputDir, _chunkJYQMGMKTcjs.FARM_DESKTOP_ENV_MODULE_FILE),
|
|
15076
|
+
_chunkJYQMGMKTcjs.FARM_DESKTOP_ENV_MODULE_SOURCE
|
|
15004
15077
|
);
|
|
15005
15078
|
}
|
|
15006
15079
|
const farmNodeServerEntryPath = preset === "node-server" ? _path2.default.join(ssrOutputDir, "farm-node-server-entry.mjs") : null;
|
|
15007
15080
|
if (farmNodeServerEntryPath && nodeAdapterModule) {
|
|
15008
15081
|
await fs5.writeFile(
|
|
15009
|
-
_path2.default.join(ssrOutputDir,
|
|
15010
|
-
|
|
15082
|
+
_path2.default.join(ssrOutputDir, _chunkJYQMGMKTcjs.FARM_NODE_ENV_MODULE_FILE),
|
|
15083
|
+
_chunkJYQMGMKTcjs.FARM_NODE_ENV_MODULE_SOURCE
|
|
15011
15084
|
);
|
|
15012
15085
|
await fs5.writeFile(
|
|
15013
15086
|
farmNodeServerEntryPath,
|
|
15014
|
-
|
|
15087
|
+
_chunkJYQMGMKTcjs.createFarmNodeServerEntry.call(void 0, {
|
|
15015
15088
|
nitroEntryFile: _path2.default.basename(nitroEntryPath),
|
|
15016
15089
|
nodeAdapterModule,
|
|
15017
15090
|
server: config.server,
|
|
@@ -15024,7 +15097,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15024
15097
|
if (farmBunServerEntryPath) {
|
|
15025
15098
|
await fs5.writeFile(
|
|
15026
15099
|
farmBunServerEntryPath,
|
|
15027
|
-
|
|
15100
|
+
_chunkJYQMGMKTcjs.createFarmBunServerEntry.call(void 0, {
|
|
15028
15101
|
nitroEntryFile: _path2.default.basename(nitroEntryPath),
|
|
15029
15102
|
bunAdapterModule: resolveNitroRuntimeDependency(root, "srvx/bun"),
|
|
15030
15103
|
server: config.server,
|
|
@@ -15058,17 +15131,17 @@ function toFarmNodeResponse(request, response) {
|
|
|
15058
15131
|
ssrOutputDir,
|
|
15059
15132
|
ssrEntryFile
|
|
15060
15133
|
);
|
|
15061
|
-
const configuredNitroRouteRules =
|
|
15062
|
-
varyFarmNitroCacheRules(
|
|
15134
|
+
const configuredNitroRouteRules = _chunkQZRFEHMScjs.nitroRouteRulesBelowBasePath.call(void 0,
|
|
15135
|
+
varyFarmNitroCacheRules(_chunkQZRFEHMScjs.routeRulesToNitroRouteRules.call(void 0, config.routeRules), [
|
|
15063
15136
|
...config.md.enabled ? ["accept"] : [],
|
|
15064
15137
|
...shouldBuildFarmMobileClient(config) ? ["x-farm-shell"] : [],
|
|
15065
|
-
...
|
|
15138
|
+
..._chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])) === "islands" ? ["f-layouts"] : []
|
|
15066
15139
|
]),
|
|
15067
15140
|
config.basePath,
|
|
15068
|
-
|
|
15141
|
+
_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
|
|
15069
15142
|
);
|
|
15070
|
-
const toPrerenderPublicPath = (route) =>
|
|
15071
|
-
|
|
15143
|
+
const toPrerenderPublicPath = (route) => _chunk6FIY4KBCcjs.normalizeFarmTrailingSlashPathname.call(void 0,
|
|
15144
|
+
_chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, route, config.basePath),
|
|
15072
15145
|
config.trailingSlash === true
|
|
15073
15146
|
);
|
|
15074
15147
|
const prerenderNitroRouteRules = Object.fromEntries(
|
|
@@ -15099,10 +15172,10 @@ function toFarmNodeResponse(request, response) {
|
|
|
15099
15172
|
routeRules: configuredNitroRouteRules,
|
|
15100
15173
|
routePaths: [
|
|
15101
15174
|
...[...routeManager.getRoutes().keys()].map(
|
|
15102
|
-
(pattern) =>
|
|
15175
|
+
(pattern) => _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, pattern, config.basePath)
|
|
15103
15176
|
),
|
|
15104
15177
|
...apiRouteManager.getRoutes().keys(),
|
|
15105
|
-
|
|
15178
|
+
_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
|
|
15106
15179
|
]
|
|
15107
15180
|
});
|
|
15108
15181
|
let nitroConfig = {
|
|
@@ -15144,6 +15217,9 @@ function toFarmNodeResponse(request, response) {
|
|
|
15144
15217
|
// answered independently, as by the production server, so keeping several
|
|
15145
15218
|
// in flight overlaps the worker's rendering with this thread's per-route work.
|
|
15146
15219
|
concurrency: Math.min(_os2.default.availableParallelism(), 8),
|
|
15220
|
+
workers: resolveFarmPrerenderWorkers(
|
|
15221
|
+
prerenderRoutes.length + (staticNotFoundPrerenderPath ? 1 : 0)
|
|
15222
|
+
),
|
|
15147
15223
|
routes: [
|
|
15148
15224
|
...prerenderRoutes.map(toPrerenderPublicPath),
|
|
15149
15225
|
...staticNotFoundPrerenderPath ? [staticNotFoundPrerenderPath] : []
|
|
@@ -15172,7 +15248,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15172
15248
|
} : {},
|
|
15173
15249
|
// Use serverHandlers to define our workflow handler first, then the catch-all handler.
|
|
15174
15250
|
handlers: [
|
|
15175
|
-
...farmCloudflareEnvPath ? [{ route: "/**", middleware: true, handler:
|
|
15251
|
+
...farmCloudflareEnvPath ? [{ route: "/**", middleware: true, handler: _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, farmCloudflareEnvPath) }] : [],
|
|
15176
15252
|
...farmWorkflows.handlerPath ? [
|
|
15177
15253
|
{
|
|
15178
15254
|
route: `${config.workflows.route}/**`,
|
|
@@ -15181,7 +15257,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15181
15257
|
] : [],
|
|
15182
15258
|
{
|
|
15183
15259
|
route: "/**",
|
|
15184
|
-
handler:
|
|
15260
|
+
handler: _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, nitroEntryPath)
|
|
15185
15261
|
}
|
|
15186
15262
|
],
|
|
15187
15263
|
routeRules: {
|
|
@@ -15205,7 +15281,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15205
15281
|
// Workers bundle React here rather than loading it from node_modules.
|
|
15206
15282
|
// Unenv rewrites `process` before Nitro's own replacements run, so
|
|
15207
15283
|
// React's development builds would otherwise ship next to production.
|
|
15208
|
-
...isCloudflareWorker ? [
|
|
15284
|
+
...isCloudflareWorker ? [_chunkJYQMGMKTcjs.createReactProductionModePlugin.call(void 0, )] : []
|
|
15209
15285
|
]
|
|
15210
15286
|
},
|
|
15211
15287
|
// Keep the public Nitro boolean intact for build hooks. Farm replaces
|
|
@@ -15218,7 +15294,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15218
15294
|
if (pluginManager) {
|
|
15219
15295
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
15220
15296
|
}
|
|
15221
|
-
const expectedServerDir =
|
|
15297
|
+
const expectedServerDir = runtimeServerOutputDir;
|
|
15222
15298
|
const customRollupKeys = Object.keys(nitroConfig.rollupConfig || {}).filter(
|
|
15223
15299
|
(key) => key !== "external" && key !== "plugins"
|
|
15224
15300
|
);
|
|
@@ -15236,7 +15312,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15236
15312
|
(handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess', _339 => _339.handler]) || "") === nitroEntryPath
|
|
15237
15313
|
)])
|
|
15238
15314
|
);
|
|
15239
|
-
const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset
|
|
15315
|
+
const canReusePrebuiltSSR = isPrebuiltSSRCandidate && PREBUILT_SSR_PRESETS.has(_nullishCoalesce(nitroConfig.preset, () => ( ""))) && nitroBuildIsFarms && _path2.default.resolve(_optionalChain([nitroConfig, 'access', _340 => _340.output, 'optionalAccess', _341 => _341.serverDir]) || "") === _path2.default.resolve(expectedServerDir);
|
|
15240
15316
|
const prerenderReusesPrebuiltSSR = (prerenderRoutes.length > 0 || staticNotFoundPrerenderPath !== null) && ssrExternalsArePackaged && nitroBuildIsFarms;
|
|
15241
15317
|
const selectRolldownBuilder = canReusePrebuiltSSR && requestedBuilder === void 0 && await canUseRolldownBuilder();
|
|
15242
15318
|
if (selectRolldownBuilder) nitroConfig.builder = "rolldown";
|
|
@@ -15291,7 +15367,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15291
15367
|
const configuredRule = configuredNitroRouteRules[route.route];
|
|
15292
15368
|
if (configuredRule) nitroInstance.options.routeRules[route.route] = configuredRule;
|
|
15293
15369
|
else delete nitroInstance.options.routeRules[route.route];
|
|
15294
|
-
|
|
15370
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u21AA Keeping SSG route ${route.route} server-handled (it does not render HTML)`);
|
|
15295
15371
|
});
|
|
15296
15372
|
nitroInstance.hooks.hook("prerender:done", () => {
|
|
15297
15373
|
if (skippedNonHtmlPrerenderRoute) nitroInstance.routing.sync();
|
|
@@ -15299,7 +15375,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15299
15375
|
if (_optionalChain([config, 'access', _354 => _354.md, 'optionalAccess', _355 => _355.enabled])) {
|
|
15300
15376
|
nitroInstance.hooks.hook("prerender:generate", (route) => {
|
|
15301
15377
|
if (!route.contents || !_optionalChain([route, 'access', _356 => _356.contentType, 'optionalAccess', _357 => _357.toLowerCase, 'call', _358 => _358(), 'access', _359 => _359.includes, 'call', _360 => _360("html")])) return;
|
|
15302
|
-
const alternatePath =
|
|
15378
|
+
const alternatePath = _chunkU2HFXURZcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route, {
|
|
15303
15379
|
routePathname: (pathname) => routeManager.toRoutePathname(pathname)
|
|
15304
15380
|
});
|
|
15305
15381
|
if (!alternatePath) return;
|
|
@@ -15322,7 +15398,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15322
15398
|
if (config.security.csp && config.security.csp.nonce) {
|
|
15323
15399
|
nitroInstance.hooks.hook("prerender:generate", async (route) => {
|
|
15324
15400
|
if (!route.contents || !_optionalChain([route, 'access', _361 => _361.contentType, 'optionalAccess', _362 => _362.toLowerCase, 'call', _363 => _363(), 'access', _364 => _364.includes, 'call', _365 => _365("html")])) return;
|
|
15325
|
-
const staticCsp = await
|
|
15401
|
+
const staticCsp = await _chunkIEZFFXSCcjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
|
|
15326
15402
|
if (!staticCsp) return;
|
|
15327
15403
|
route.contents = staticCsp.html;
|
|
15328
15404
|
const routeRule = nitroInstance.options.routeRules[route.route] || {};
|
|
@@ -15371,7 +15447,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15371
15447
|
});
|
|
15372
15448
|
await nitroBuilder.prepare(nitroInstance);
|
|
15373
15449
|
await nitroBuilder.copyPublicAssets(nitroInstance);
|
|
15374
|
-
if (prerenderReusesPrebuiltSSR && !canReusePrebuiltSSR) {
|
|
15450
|
+
if (prerenderReusesPrebuiltSSR && (!canReusePrebuiltSSR || preset !== "node-server")) {
|
|
15375
15451
|
nitroInstance.hooks.hook("prerender:config", (prerendererConfig) => {
|
|
15376
15452
|
const configuredPlugins = _optionalChain([prerendererConfig, 'access', _371 => _371.rollupConfig, 'optionalAccess', _372 => _372.plugins]);
|
|
15377
15453
|
const plugins = Array.isArray(configuredPlugins) ? configuredPlugins : configuredPlugins ? [configuredPlugins] : [];
|
|
@@ -15439,15 +15515,15 @@ function toFarmNodeResponse(request, response) {
|
|
|
15439
15515
|
}
|
|
15440
15516
|
if (prerenderRoutes.length > 0 || staticNotFoundPrerenderPath) {
|
|
15441
15517
|
if (prerenderRoutes.length > 0) {
|
|
15442
|
-
|
|
15518
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
|
|
15443
15519
|
}
|
|
15444
|
-
const previousPrerender = process.env[
|
|
15445
|
-
process.env[
|
|
15520
|
+
const previousPrerender = process.env[_chunkMBDDLYT5cjs.FARM_PRERENDER_ENV];
|
|
15521
|
+
process.env[_chunkMBDDLYT5cjs.FARM_PRERENDER_ENV] = "1";
|
|
15446
15522
|
try {
|
|
15447
15523
|
await nitroBuilder.prerender(nitroInstance);
|
|
15448
15524
|
} finally {
|
|
15449
|
-
if (previousPrerender === void 0) delete process.env[
|
|
15450
|
-
else process.env[
|
|
15525
|
+
if (previousPrerender === void 0) delete process.env[_chunkMBDDLYT5cjs.FARM_PRERENDER_ENV];
|
|
15526
|
+
else process.env[_chunkMBDDLYT5cjs.FARM_PRERENDER_ENV] = previousPrerender;
|
|
15451
15527
|
}
|
|
15452
15528
|
}
|
|
15453
15529
|
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs5, preset) : Promise.resolve(null);
|
|
@@ -15488,7 +15564,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
15488
15564
|
const copyResults = await Promise.allSettled([
|
|
15489
15565
|
prebuiltSSRFilesResult.value ? writeSSRBundleFiles(
|
|
15490
15566
|
prebuiltSSRFilesResult.value,
|
|
15491
|
-
_path2.default.join(
|
|
15567
|
+
_path2.default.join(expectedServerDir, FARM_SSR_OUTPUT_DIR),
|
|
15492
15568
|
fs5
|
|
15493
15569
|
) : Promise.resolve(),
|
|
15494
15570
|
runtimeCopyPromise
|
|
@@ -15498,11 +15574,11 @@ function toFarmNodeResponse(request, response) {
|
|
|
15498
15574
|
);
|
|
15499
15575
|
if (failedCopy) throw failedCopy.reason;
|
|
15500
15576
|
if (canReusePrebuiltSSR) {
|
|
15501
|
-
await registerPrebuiltSSRPackageImport(
|
|
15502
|
-
|
|
15577
|
+
await registerPrebuiltSSRPackageImport(expectedServerDir, ssrEntryFile, fs5);
|
|
15578
|
+
_chunk7ZDLE77Pcjs.logger.info("\u26A1 Reused Farm's prebuilt SSR bundle for the Node output");
|
|
15503
15579
|
}
|
|
15504
15580
|
if (useRolldownBuilder) {
|
|
15505
|
-
|
|
15581
|
+
_chunk7ZDLE77Pcjs.logger.info("\u26A1 Built the Node adapter with Rolldown");
|
|
15506
15582
|
}
|
|
15507
15583
|
if (preset === "node-server" && !desktopServerEntry) {
|
|
15508
15584
|
await installFarmCompileCacheLauncher(_path2.default.join(outputDir, "server"), fs5);
|
|
@@ -15515,12 +15591,13 @@ function toFarmNodeResponse(request, response) {
|
|
|
15515
15591
|
root,
|
|
15516
15592
|
preset,
|
|
15517
15593
|
distDir,
|
|
15518
|
-
outputDir
|
|
15594
|
+
outputDir,
|
|
15595
|
+
serverDir: _path2.default.resolve(nitroInstance.options.output.serverDir)
|
|
15519
15596
|
});
|
|
15520
15597
|
}
|
|
15521
15598
|
let staticNotFoundRoutes;
|
|
15522
15599
|
if (staticNotFoundPlan && "input" in staticNotFoundPlan && staticNotFoundPrerenderPath) {
|
|
15523
|
-
const toHandlerKey = (handler) =>
|
|
15600
|
+
const toHandlerKey = (handler) => _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _path2.default.resolve(root, handler));
|
|
15524
15601
|
const handlerSources = getFarmStaticNotFoundHandlerSources(
|
|
15525
15602
|
nitroInstance.options.handlers.map((handler) => ({
|
|
15526
15603
|
route: handler.route,
|
|
@@ -15545,10 +15622,10 @@ function toFarmNodeResponse(request, response) {
|
|
|
15545
15622
|
);
|
|
15546
15623
|
const notFoundRoute = staticNotFoundRoutes[staticNotFoundRoutes.length - 1];
|
|
15547
15624
|
if (notFoundRoute && Object.keys(cspHeaders).length > 0) notFoundRoute.headers = cspHeaders;
|
|
15548
|
-
|
|
15625
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F4C4} Serving the not-found page as a file to missing URLs");
|
|
15549
15626
|
}
|
|
15550
15627
|
if (!staticNotFoundRoutes) {
|
|
15551
|
-
|
|
15628
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
15552
15629
|
`\u21AA Keeping missing URLs server-handled: experimental.staticNotFound is off because ${_nullishCoalesce(staticNotFoundRefusal, () => ( "the build did not write the not-found page"))}`
|
|
15553
15630
|
);
|
|
15554
15631
|
}
|
|
@@ -15571,7 +15648,10 @@ function toFarmNodeResponse(request, response) {
|
|
|
15571
15648
|
staticNotFoundRoutes
|
|
15572
15649
|
);
|
|
15573
15650
|
}
|
|
15574
|
-
|
|
15651
|
+
_chunk7ZDLE77Pcjs.logger.success(`\u2705 Nitro build completed with preset: ${preset}`);
|
|
15652
|
+
}
|
|
15653
|
+
function resolveFarmPrerenderWorkers(routeCount) {
|
|
15654
|
+
return Math.max(1, Math.min(4, _os2.default.availableParallelism() - 1, Math.ceil(routeCount / 50)));
|
|
15575
15655
|
}
|
|
15576
15656
|
function resolveFarmNitroOutputConfig(preset, outputDir) {
|
|
15577
15657
|
const isVercel = preset === "vercel";
|
|
@@ -15596,7 +15676,7 @@ async function populateCloudflareProcessEnv(serverDir, fs5) {
|
|
|
15596
15676
|
throw error;
|
|
15597
15677
|
}
|
|
15598
15678
|
const wrangler = JSON.parse(source);
|
|
15599
|
-
const flags =
|
|
15679
|
+
const flags = _chunkVIDUNAQEcjs.resolveCloudflareProcessEnvFlags.call(void 0, wrangler);
|
|
15600
15680
|
if (!flags) return;
|
|
15601
15681
|
await fs5.writeFile(
|
|
15602
15682
|
wranglerPath,
|
|
@@ -15626,16 +15706,16 @@ async function copyPrebuiltSSRBundle(ssrBundle, targetDir, minifyOptions, fs5) {
|
|
|
15626
15706
|
}
|
|
15627
15707
|
async function installFarmCompileCacheLauncher(serverDir, fs5) {
|
|
15628
15708
|
const entryPath = _path2.default.join(serverDir, "index.mjs");
|
|
15629
|
-
const serverPath = _path2.default.join(serverDir,
|
|
15709
|
+
const serverPath = _path2.default.join(serverDir, _chunkJYQMGMKTcjs.FARM_SERVER_MODULE_FILE);
|
|
15630
15710
|
const entry = await fs5.readFile(entryPath, "utf8").catch((error) => {
|
|
15631
15711
|
if (error.code === "ENOENT") return null;
|
|
15632
15712
|
throw error;
|
|
15633
15713
|
});
|
|
15634
15714
|
if (entry === null) return false;
|
|
15635
|
-
if (entry.includes(`./${
|
|
15715
|
+
if (entry.includes(`./${_chunkJYQMGMKTcjs.FARM_SERVER_MODULE_FILE}`)) return false;
|
|
15636
15716
|
await fs5.rename(entryPath, serverPath);
|
|
15637
|
-
await fs5.writeFile(entryPath,
|
|
15638
|
-
await fs5.rm(_path2.default.join(serverDir,
|
|
15717
|
+
await fs5.writeFile(entryPath, _chunkJYQMGMKTcjs.createFarmCompileCacheLauncher.call(void 0, _chunkJYQMGMKTcjs.FARM_SERVER_MODULE_FILE));
|
|
15718
|
+
await fs5.rm(_path2.default.join(serverDir, _chunkJYQMGMKTcjs.FARM_COMPILE_CACHE_DIR), { recursive: true, force: true });
|
|
15639
15719
|
return true;
|
|
15640
15720
|
}
|
|
15641
15721
|
async function registerPrebuiltSSRPackageImport(serverDir, ssrEntryFile, fs5) {
|
|
@@ -15661,7 +15741,7 @@ async function moveVercelOutputPath(src, dest, fs5) {
|
|
|
15661
15741
|
return;
|
|
15662
15742
|
} catch (error) {
|
|
15663
15743
|
const code = _optionalChain([error, 'optionalAccess', _377 => _377.code]);
|
|
15664
|
-
if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY") {
|
|
15744
|
+
if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY" && code !== "EEXIST") {
|
|
15665
15745
|
throw error;
|
|
15666
15746
|
}
|
|
15667
15747
|
}
|
|
@@ -15700,7 +15780,7 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
|
|
|
15700
15780
|
config.basePath
|
|
15701
15781
|
);
|
|
15702
15782
|
const edgeMiddlewareRoutes = edgeMiddleware.middlewareRoutes.filter(
|
|
15703
|
-
(route) => edgeMiddleware.guardedPages.some((pathname) =>
|
|
15783
|
+
(route) => edgeMiddleware.guardedPages.some((pathname) => _chunkIGBQSUT5cjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
|
|
15704
15784
|
);
|
|
15705
15785
|
if (edgeMiddlewareRoutes.length > 0) {
|
|
15706
15786
|
await writeFarmVercelEdgeMiddlewareFunction({
|
|
@@ -15721,17 +15801,17 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
|
|
|
15721
15801
|
markdownRoutes: createFarmVercelMarkdownRoutes(prerenderedPages),
|
|
15722
15802
|
notFoundRoutes
|
|
15723
15803
|
});
|
|
15724
|
-
const vercelConfigWithWorkflowCrons =
|
|
15804
|
+
const vercelConfigWithWorkflowCrons = _chunkXE3E4MERcjs.applyFarmWorkflowVercelCrons.call(void 0,
|
|
15725
15805
|
vercelConfig,
|
|
15726
15806
|
farmWorkflows.workflows
|
|
15727
15807
|
);
|
|
15728
|
-
const vercelConfigWithCrons =
|
|
15808
|
+
const vercelConfigWithCrons = _chunkXH4GQ7MTcjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
|
|
15729
15809
|
await fs5.writeFile(configPath, JSON.stringify(vercelConfigWithCrons, null, 2));
|
|
15730
|
-
|
|
15810
|
+
_chunk7ZDLE77Pcjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
|
|
15731
15811
|
}
|
|
15732
15812
|
async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs5, options = {}) {
|
|
15733
15813
|
if (!_optionalChain([config, 'access', _379 => _379.docs, 'optionalAccess', _380 => _380.enabled])) return;
|
|
15734
|
-
const [mainRoot, ...extraRoots] =
|
|
15814
|
+
const [mainRoot, ...extraRoots] = _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs);
|
|
15735
15815
|
await copyFarmDocsRootContent(
|
|
15736
15816
|
mainRoot,
|
|
15737
15817
|
root,
|
|
@@ -15757,12 +15837,12 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs5, opt
|
|
|
15757
15837
|
async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs5, { log = true } = {}) {
|
|
15758
15838
|
const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
|
|
15759
15839
|
if (!docsContentDir) return;
|
|
15760
|
-
const lastModifiedManifest =
|
|
15840
|
+
const lastModifiedManifest = _chunk4A6WSOZHcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
|
|
15761
15841
|
fallback: "now"
|
|
15762
15842
|
});
|
|
15763
15843
|
const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access', _381 => _381.unknown, 'optionalAccess', _382 => _382.length]), () => ( 0));
|
|
15764
15844
|
if (log && undatedPages > 0) {
|
|
15765
|
-
|
|
15845
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
15766
15846
|
`${undatedPages} docs page(s) were last changed before this shallow clone's Git history, so they show no "Last updated" date. Build from a full clone (git fetch --unshallow) or set lastModified in the page's frontmatter.`
|
|
15767
15847
|
);
|
|
15768
15848
|
}
|
|
@@ -15774,12 +15854,12 @@ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs
|
|
|
15774
15854
|
dereference: true
|
|
15775
15855
|
});
|
|
15776
15856
|
await fs5.writeFile(
|
|
15777
|
-
_path2.default.join(bundledContentDir,
|
|
15857
|
+
_path2.default.join(bundledContentDir, _chunk4A6WSOZHcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
|
|
15778
15858
|
`${JSON.stringify(lastModifiedManifest, null, 2)}
|
|
15779
15859
|
`
|
|
15780
15860
|
);
|
|
15781
15861
|
if (log) {
|
|
15782
|
-
|
|
15862
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4DA} Bundled docs content for Vercel: ${_path2.default.relative(root, docsContentDir)}`);
|
|
15783
15863
|
}
|
|
15784
15864
|
}
|
|
15785
15865
|
function resolveServerFunctionPlatform(preset) {
|
|
@@ -15847,7 +15927,7 @@ async function stageSharpRuntime(config, root, distDir, fs5, preset) {
|
|
|
15847
15927
|
try {
|
|
15848
15928
|
await copyPackage("sharp", sharpRequire);
|
|
15849
15929
|
if (!copiedPackages.has("sharp")) {
|
|
15850
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
15930
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunkUBH2OARScjs.SHARP_INSTALL_HINT}`);
|
|
15851
15931
|
}
|
|
15852
15932
|
} catch (error) {
|
|
15853
15933
|
await fs5.rm(stageDir, { recursive: true, force: true });
|
|
@@ -15874,7 +15954,7 @@ async function installStagedSharpRuntime(staged, nitroFuncDir, fs5) {
|
|
|
15874
15954
|
} finally {
|
|
15875
15955
|
await fs5.rm(staged.stageDir, { recursive: true, force: true });
|
|
15876
15956
|
}
|
|
15877
|
-
|
|
15957
|
+
_chunk7ZDLE77Pcjs.logger.info(
|
|
15878
15958
|
`\u{1F5BC}\uFE0F Bundled Sharp image runtime (${Object.keys(staged.dependencies).length} packages)`
|
|
15879
15959
|
);
|
|
15880
15960
|
}
|
|
@@ -15918,9 +15998,9 @@ async function mergeStagedDirectory(sourceDir, targetDir, fs5) {
|
|
|
15918
15998
|
function assertMetadataImageRuntimeInstalled(root, metadataImageRoutes) {
|
|
15919
15999
|
const generated = metadataImageRoutes.find((image) => image.sourceType === "module");
|
|
15920
16000
|
if (!generated || resolveMetadataImageRuntimePackageJson(root)) return;
|
|
15921
|
-
const file = generated.modulePath ?
|
|
16001
|
+
const file = generated.modulePath ? _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _path2.default.relative(root, generated.modulePath)) : "";
|
|
15922
16002
|
throw new Error(
|
|
15923
|
-
`${file || "A generated metadata image"} renders with @vercel/og, which is not installed. ${
|
|
16003
|
+
`${file || "A generated metadata image"} renders with @vercel/og, which is not installed. ${_chunkIDUGG7VRcjs.VERCEL_OG_INSTALL_HINT}`
|
|
15924
16004
|
);
|
|
15925
16005
|
}
|
|
15926
16006
|
function resolveMetadataImageRuntimePackageJson(root) {
|
|
@@ -15952,7 +16032,7 @@ async function copyMetadataImageRuntime(root, nitroFuncDir, fs5) {
|
|
|
15952
16032
|
"@vercel/og": String(packageJson.version || "0.11.1")
|
|
15953
16033
|
};
|
|
15954
16034
|
await writeNitroOutputPackage(nitroFuncDir, functionPackage, fs5);
|
|
15955
|
-
|
|
16035
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F5BC}\uFE0F Bundled generated metadata image runtime");
|
|
15956
16036
|
}
|
|
15957
16037
|
async function readNitroOutputPackage(outputDir, fs5) {
|
|
15958
16038
|
const packagePath = _path2.default.join(outputDir, "package.json");
|
|
@@ -16055,6 +16135,7 @@ __farmIslxBuildDefaults({ key: ${JSON.stringify(key)} });`;
|
|
|
16055
16135
|
}
|
|
16056
16136
|
|
|
16057
16137
|
// src/build/project-module-runner.ts
|
|
16138
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
16058
16139
|
async function createFarmProjectModuleSsrEnvironment() {
|
|
16059
16140
|
const vite = await import("vite");
|
|
16060
16141
|
const { ModuleRunner, createNodeImportMeta } = await import("vite/module-runner");
|
|
@@ -16069,7 +16150,7 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
16069
16150
|
},
|
|
16070
16151
|
hmr: false,
|
|
16071
16152
|
createImportMeta: createNodeImportMeta,
|
|
16072
|
-
sourcemapInterceptor: "
|
|
16153
|
+
sourcemapInterceptor: "prepareStackTrace"
|
|
16073
16154
|
})
|
|
16074
16155
|
});
|
|
16075
16156
|
}
|
|
@@ -16079,8 +16160,8 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
16079
16160
|
|
|
16080
16161
|
// src/build/index.ts
|
|
16081
16162
|
async function build(config, options = {}) {
|
|
16082
|
-
return
|
|
16083
|
-
() =>
|
|
16163
|
+
return _chunkJYQMGMKTcjs.withProductionNodeEnv.call(void 0,
|
|
16164
|
+
() => _chunkPSALMEHJcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
|
|
16084
16165
|
);
|
|
16085
16166
|
}
|
|
16086
16167
|
function createBuildTargetBaseline(config) {
|
|
@@ -16091,7 +16172,7 @@ function createBuildTargetBaseline(config) {
|
|
|
16091
16172
|
preset,
|
|
16092
16173
|
distDir,
|
|
16093
16174
|
outputDir,
|
|
16094
|
-
outputWasDerived: outputDir ===
|
|
16175
|
+
outputWasDerived: outputDir === _chunkF5T55PYXcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
16095
16176
|
};
|
|
16096
16177
|
}
|
|
16097
16178
|
function resolveBuildTargets(config, options, baseline) {
|
|
@@ -16100,8 +16181,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
16100
16181
|
const distDir = config.distDir || ".farm";
|
|
16101
16182
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
16102
16183
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
16103
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
16104
|
-
const outputDir = shouldRefreshDerivedOutput ?
|
|
16184
|
+
const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkF5T55PYXcjs.getDeployTargetForPreset.call(void 0, preset);
|
|
16185
|
+
const outputDir = shouldRefreshDerivedOutput ? _chunkF5T55PYXcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
|
|
16105
16186
|
return {
|
|
16106
16187
|
root,
|
|
16107
16188
|
preset,
|
|
@@ -16109,15 +16190,15 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
16109
16190
|
distDir,
|
|
16110
16191
|
deployTarget,
|
|
16111
16192
|
outputDir,
|
|
16112
|
-
deployOutputDir:
|
|
16193
|
+
deployOutputDir: _chunkF5T55PYXcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
16113
16194
|
};
|
|
16114
16195
|
}
|
|
16115
16196
|
async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
16116
16197
|
let config = inputConfig;
|
|
16117
16198
|
const targetBaseline = createBuildTargetBaseline(config);
|
|
16118
16199
|
let targets;
|
|
16119
|
-
const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => (
|
|
16120
|
-
const pluginManager = new (0,
|
|
16200
|
+
const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunk2L4M6YUGcjs.loadFarmProductionVite.call(void 0, ))))]);
|
|
16201
|
+
const pluginManager = new (0, _chunkIGA3OTFYcjs.PluginManager)({
|
|
16121
16202
|
config,
|
|
16122
16203
|
isDev: false,
|
|
16123
16204
|
isProd: true
|
|
@@ -16146,16 +16227,16 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16146
16227
|
};
|
|
16147
16228
|
config = {
|
|
16148
16229
|
...config,
|
|
16149
|
-
images:
|
|
16230
|
+
images: _chunkUBH2OARScjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
16150
16231
|
root: targets.root,
|
|
16151
16232
|
preset: targets.preset
|
|
16152
16233
|
})
|
|
16153
16234
|
};
|
|
16154
|
-
if (_optionalChain([config, 'access', _383 => _383.docs, 'optionalAccess', _384 => _384.enabled])) await
|
|
16235
|
+
if (_optionalChain([config, 'access', _383 => _383.docs, 'optionalAccess', _384 => _384.enabled])) await _chunkTDAH76RRcjs.loadFarmDocsEngine.call(void 0, );
|
|
16155
16236
|
pluginManager.updateContext({ config });
|
|
16156
16237
|
const { root, preset, srcDir, distDir, deployOutputDir } = targets;
|
|
16157
|
-
|
|
16158
|
-
|
|
16238
|
+
_chunkPSALMEHJcjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkPSALMEHJcjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
|
|
16239
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
|
|
16159
16240
|
await pluginManager.setupPlugins();
|
|
16160
16241
|
await pluginManager.runHookParallel("beforeBundle", {
|
|
16161
16242
|
root,
|
|
@@ -16164,7 +16245,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16164
16245
|
distDir,
|
|
16165
16246
|
outputDir: deployOutputDir
|
|
16166
16247
|
});
|
|
16167
|
-
|
|
16248
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
|
|
16168
16249
|
const productionViteResult = productionViteResultPromise ? (await productionViteResultPromise)[0] : void 0;
|
|
16169
16250
|
if (_optionalChain([productionViteResult, 'optionalAccess', _385 => _385.status]) === "rejected") throw productionViteResult.reason;
|
|
16170
16251
|
const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _386 => _386.value]);
|
|
@@ -16175,12 +16256,12 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16175
16256
|
root,
|
|
16176
16257
|
rendererBuild.signal
|
|
16177
16258
|
);
|
|
16178
|
-
const farmApp =
|
|
16259
|
+
const farmApp = _chunkUBH2OARScjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
16179
16260
|
if (options.universal !== false) farmApp.getRouteManager().keepBuildSourceSnapshot();
|
|
16180
16261
|
await farmApp.initialize();
|
|
16181
16262
|
const routeManager = farmApp.getRouteManager();
|
|
16182
16263
|
const serverRenderer = farmApp.getServerRenderer();
|
|
16183
|
-
const typeArtifacts =
|
|
16264
|
+
const typeArtifacts = _chunkKM7ZRKCHcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
16184
16265
|
root,
|
|
16185
16266
|
srcDir,
|
|
16186
16267
|
layers: config.layers,
|
|
@@ -16188,7 +16269,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16188
16269
|
plugins: config.plugins,
|
|
16189
16270
|
extraRoutes: [
|
|
16190
16271
|
..._optionalChain([config, 'access', _387 => _387.openapi, 'optionalAccess', _388 => _388.enabled]) && config.openapi.route ? [config.openapi.route] : [],
|
|
16191
|
-
...
|
|
16272
|
+
..._chunk4A6WSOZHcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
|
|
16192
16273
|
],
|
|
16193
16274
|
suppressLintOnLink: config.suppressLintOnLink,
|
|
16194
16275
|
componentExtensions: config.renderer.componentExtensions,
|
|
@@ -16196,17 +16277,17 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16196
16277
|
i18nConfig: config.i18n
|
|
16197
16278
|
}).catch((error) => {
|
|
16198
16279
|
const message = error instanceof Error ? error.message : String(error);
|
|
16199
|
-
|
|
16280
|
+
_chunk7ZDLE77Pcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
16200
16281
|
});
|
|
16201
|
-
const apiRouteManager = new (0,
|
|
16202
|
-
|
|
16282
|
+
const apiRouteManager = new (0, _chunk5BZ7PR3Tcjs.APIRouteManager)(
|
|
16283
|
+
_chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, config),
|
|
16203
16284
|
projectModuleServer,
|
|
16204
16285
|
{
|
|
16205
16286
|
throwOnLoadError: true,
|
|
16206
16287
|
plugins: config.plugins,
|
|
16207
16288
|
i18n: farmApp.getI18nRuntime(),
|
|
16208
16289
|
bodySizeLimit: config.server.bodySizeLimit,
|
|
16209
|
-
basePath:
|
|
16290
|
+
basePath: _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
|
|
16210
16291
|
}
|
|
16211
16292
|
);
|
|
16212
16293
|
const [, apiDiscovery] = await Promise.allSettled([
|
|
@@ -16224,11 +16305,11 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16224
16305
|
});
|
|
16225
16306
|
} else {
|
|
16226
16307
|
const { build: legacyViteBuild } = await import("vite");
|
|
16227
|
-
|
|
16308
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Building client bundle...");
|
|
16228
16309
|
await buildClient2(legacyViteBuild, config, root, srcDir, _path2.default.join(root, distDir, "client"));
|
|
16229
|
-
|
|
16310
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Building SSR bundle...");
|
|
16230
16311
|
await buildSSR(legacyViteBuild, config, root, srcDir, _path2.default.join(root, distDir, "server"));
|
|
16231
|
-
|
|
16312
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
|
|
16232
16313
|
await buildNitro(
|
|
16233
16314
|
config,
|
|
16234
16315
|
routeManager,
|
|
@@ -16249,8 +16330,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16249
16330
|
outputDir: deployOutputDir,
|
|
16250
16331
|
success: true
|
|
16251
16332
|
});
|
|
16252
|
-
|
|
16253
|
-
|
|
16333
|
+
_chunk7ZDLE77Pcjs.logger.success(`\u2705 Build completed successfully! (preset: ${preset})`);
|
|
16334
|
+
_chunk7ZDLE77Pcjs.logger.info(`\u{1F4C1} Output directory: ${deployOutputDir}`);
|
|
16254
16335
|
} catch (error) {
|
|
16255
16336
|
const { root, preset, distDir, deployOutputDir } = _nullishCoalesce(targets, () => ( resolveBuildTargets(config, options, targetBaseline)));
|
|
16256
16337
|
await pluginManager.runHookParallel("onError", {
|
|
@@ -16269,7 +16350,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16269
16350
|
outputDir: deployOutputDir,
|
|
16270
16351
|
success: false
|
|
16271
16352
|
});
|
|
16272
|
-
|
|
16353
|
+
_chunk7ZDLE77Pcjs.logger.error(`\u274C Build failed: ${error}`);
|
|
16273
16354
|
throw error;
|
|
16274
16355
|
} finally {
|
|
16275
16356
|
try {
|
|
@@ -16281,11 +16362,11 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
16281
16362
|
}
|
|
16282
16363
|
async function createProjectModuleServer(createViteServer, config, root, buildLifetime) {
|
|
16283
16364
|
const { farmNavigationPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
16284
|
-
const rendererVitePlugins = await
|
|
16365
|
+
const rendererVitePlugins = await _chunkHP7QYVSTcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
|
|
16285
16366
|
ssr: true,
|
|
16286
16367
|
buildLifetime
|
|
16287
16368
|
});
|
|
16288
|
-
const viteConfig =
|
|
16369
|
+
const viteConfig = _chunkUBH2OARScjs.mergeFarmViteConfig.call(void 0,
|
|
16289
16370
|
{
|
|
16290
16371
|
root,
|
|
16291
16372
|
appType: "custom",
|
|
@@ -16297,13 +16378,13 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
16297
16378
|
},
|
|
16298
16379
|
plugins: [
|
|
16299
16380
|
...rendererVitePlugins,
|
|
16300
|
-
|
|
16381
|
+
_chunkUBH2OARScjs.farmFontImportsPlugin.call(void 0, {
|
|
16301
16382
|
root,
|
|
16302
16383
|
basePath: config.basePath,
|
|
16303
16384
|
publicDir: config.publicDir,
|
|
16304
|
-
isLayoutModule: (id) =>
|
|
16385
|
+
isLayoutModule: (id) => _chunkUBH2OARScjs.isFarmLayoutModule.call(void 0, id, _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, config))
|
|
16305
16386
|
}),
|
|
16306
|
-
|
|
16387
|
+
_chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, { renderer: config.renderer }),
|
|
16307
16388
|
// Route modules load here at build time (rendering config, prerendering): `server-only`
|
|
16308
16389
|
// resolves as it does in the server build. Module-entry packages load pre-bundled, as in
|
|
16309
16390
|
// `farm dev`: unbundled, lucide-react alone is ~1,750 modules through the module runner,
|
|
@@ -16319,7 +16400,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
16319
16400
|
hmr: false
|
|
16320
16401
|
},
|
|
16321
16402
|
resolve: {
|
|
16322
|
-
alias:
|
|
16403
|
+
alias: _chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
16323
16404
|
dedupe: [...config.renderer.dedupe || []]
|
|
16324
16405
|
},
|
|
16325
16406
|
optimizeDeps: {
|
|
@@ -16375,7 +16456,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
16375
16456
|
farmPlugin,
|
|
16376
16457
|
farmServerOnlyEntriesPlugin
|
|
16377
16458
|
} = await import("./vite.cjs");
|
|
16378
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
16459
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
|
|
16379
16460
|
const pluginManager = new PluginManager2({
|
|
16380
16461
|
config,
|
|
16381
16462
|
isDev: false,
|
|
@@ -16397,14 +16478,14 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
16397
16478
|
farmNavigationPlugin(config.renderer),
|
|
16398
16479
|
farmIslandContainersPlugin(config),
|
|
16399
16480
|
farmPlugin(config, pluginManager),
|
|
16400
|
-
|
|
16481
|
+
_chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
16401
16482
|
],
|
|
16402
16483
|
mode: "production"
|
|
16403
16484
|
});
|
|
16404
16485
|
}
|
|
16405
16486
|
async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
16406
16487
|
const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.cjs");
|
|
16407
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
16488
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
|
|
16408
16489
|
const pluginManager = new PluginManager2({
|
|
16409
16490
|
config,
|
|
16410
16491
|
isDev: false,
|
|
@@ -16424,21 +16505,21 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
|
16424
16505
|
},
|
|
16425
16506
|
define: {
|
|
16426
16507
|
__FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
|
|
16427
|
-
__FARM_ENV__: JSON.stringify(
|
|
16508
|
+
__FARM_ENV__: JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, config.env)),
|
|
16428
16509
|
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _397 => _397.env, 'optionalAccess', _398 => _398.public]) || {})
|
|
16429
16510
|
},
|
|
16430
16511
|
plugins: [
|
|
16431
16512
|
farmI18nClientBridgePlugin(),
|
|
16432
16513
|
farmIslandContainersPlugin(config),
|
|
16433
16514
|
farmPlugin(config, pluginManager),
|
|
16434
|
-
|
|
16515
|
+
_chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
16435
16516
|
],
|
|
16436
16517
|
mode: "production"
|
|
16437
16518
|
});
|
|
16438
16519
|
}
|
|
16439
16520
|
function resolveLegacyPageEntry(config, root, srcDir) {
|
|
16440
16521
|
const appDir = _path2.default.join(root, srcDir, "app");
|
|
16441
|
-
for (const extension of
|
|
16522
|
+
for (const extension of _chunkHP7QYVSTcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer)) {
|
|
16442
16523
|
const candidate = _path2.default.join(appDir, `page${extension}`);
|
|
16443
16524
|
if (_fs.existsSync.call(void 0, candidate)) return candidate;
|
|
16444
16525
|
}
|
|
@@ -16446,7 +16527,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
|
|
|
16446
16527
|
}
|
|
16447
16528
|
async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
|
|
16448
16529
|
const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
|
|
16449
|
-
import("./nitro-
|
|
16530
|
+
import("./nitro-K4MCBBB6.cjs"),
|
|
16450
16531
|
import("nitro/builder")
|
|
16451
16532
|
]);
|
|
16452
16533
|
let nitroConfig = await createNitroConfig(
|
|
@@ -16459,7 +16540,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
16459
16540
|
if (pluginManager) {
|
|
16460
16541
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
16461
16542
|
}
|
|
16462
|
-
const outputDir =
|
|
16543
|
+
const outputDir = _chunkF5T55PYXcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
16463
16544
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
16464
16545
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
16465
16546
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -16469,7 +16550,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
16469
16550
|
try {
|
|
16470
16551
|
await mkdir(publicOutputDir, { recursive: true });
|
|
16471
16552
|
await cp(clientDir, publicOutputDir, { recursive: true });
|
|
16472
|
-
|
|
16553
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Copied client assets to public directory");
|
|
16473
16554
|
const manifestPath = _path2.default.join(publicOutputDir, "farm-client-manifest.json");
|
|
16474
16555
|
const assetsDir = _path2.default.join(publicOutputDir, "assets");
|
|
16475
16556
|
const manifestExists = await import("fs/promises").then(
|
|
@@ -16479,12 +16560,12 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
16479
16560
|
(fs5) => fs5.access(assetsDir).then(() => true).catch(() => false)
|
|
16480
16561
|
);
|
|
16481
16562
|
if (manifestExists && assetsExist) {
|
|
16482
|
-
|
|
16563
|
+
_chunk7ZDLE77Pcjs.logger.info("\u2705 Verified client assets are present");
|
|
16483
16564
|
} else {
|
|
16484
|
-
|
|
16565
|
+
_chunk7ZDLE77Pcjs.logger.warn("\u26A0\uFE0F Some client assets may be missing");
|
|
16485
16566
|
}
|
|
16486
16567
|
} catch (error) {
|
|
16487
|
-
|
|
16568
|
+
_chunk7ZDLE77Pcjs.logger.error(`\u274C Failed to copy client assets: ${error}`);
|
|
16488
16569
|
throw error;
|
|
16489
16570
|
}
|
|
16490
16571
|
const serverDir = _path2.default.join(root, distDir, "server");
|
|
@@ -16492,9 +16573,9 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
16492
16573
|
try {
|
|
16493
16574
|
await mkdir(nitroServerDir, { recursive: true });
|
|
16494
16575
|
await cp(serverDir, nitroServerDir, { recursive: true });
|
|
16495
|
-
|
|
16576
|
+
_chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Copied SSR bundles to Nitro server directory");
|
|
16496
16577
|
} catch (error) {
|
|
16497
|
-
|
|
16578
|
+
_chunk7ZDLE77Pcjs.logger.warn(`Could not copy SSR bundles: ${error}`);
|
|
16498
16579
|
}
|
|
16499
16580
|
const nitro = await createNitro(nitroConfig);
|
|
16500
16581
|
const registryPath = _path2.default.join(root, distDir, ".nitro", "server", "farm-registry.ts");
|
|
@@ -16506,7 +16587,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
16506
16587
|
farmRegistry.apiRouteManager = apiRouteManager;
|
|
16507
16588
|
farmRegistry.routeManager = routeManager;
|
|
16508
16589
|
farmRegistry.serverRenderer = serverRenderer;
|
|
16509
|
-
farmRegistry.env =
|
|
16590
|
+
farmRegistry.env = _chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, config.env);
|
|
16510
16591
|
const routePaths = {};
|
|
16511
16592
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
16512
16593
|
const bundledPath = entry.modulePath.replace(/.*\/src\/app\//, "").replace(/\.(tsx?|jsx?)$/, ".js");
|
|
@@ -16522,7 +16603,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
16522
16603
|
farmRegistry.clientManifest = {};
|
|
16523
16604
|
}
|
|
16524
16605
|
} catch (error) {
|
|
16525
|
-
|
|
16606
|
+
_chunk7ZDLE77Pcjs.logger.warn(`Could not populate registry: ${error}`);
|
|
16526
16607
|
}
|
|
16527
16608
|
await nitroBuild(nitro);
|
|
16528
16609
|
if (pluginManager) {
|
|
@@ -16530,7 +16611,8 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
16530
16611
|
root,
|
|
16531
16612
|
preset,
|
|
16532
16613
|
distDir,
|
|
16533
|
-
outputDir:
|
|
16614
|
+
outputDir: _chunkF5T55PYXcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir),
|
|
16615
|
+
serverDir: _path2.default.resolve(nitro.options.output.serverDir)
|
|
16534
16616
|
});
|
|
16535
16617
|
}
|
|
16536
16618
|
}
|