@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
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkQCVP22KWcjs = require('./chunk-QCVP22KW.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkW4KSV6GXcjs = require('./chunk-W4KSV6GX.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -44,25 +44,25 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkUBH2OARScjs = require('./chunk-UBH2OARS.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var _chunkADCVSTFVcjs = require('./chunk-ADCVSTFV.cjs');
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkIGA3OTFYcjs = require('./chunk-IGA3OTFY.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkYQXLBYY2cjs = require('./chunk-YQXLBYY2.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkKM7ZRKCHcjs = require('./chunk-KM7ZRKCH.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunkMBDDLYT5cjs = require('./chunk-MBDDLYT5.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -71,10 +71,10 @@ var _chunkUGWKNZ4Ucjs = require('./chunk-UGWKNZ4U.cjs');
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
var
|
|
74
|
+
var _chunkIGBQSUT5cjs = require('./chunk-IGBQSUT5.cjs');
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
@@ -89,21 +89,21 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunkC4DZAEVTcjs = require('./chunk-C4DZAEVT.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
var
|
|
95
|
+
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkNNHIV3O2cjs = require('./chunk-NNHIV3O2.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
var
|
|
103
|
+
var _chunk7O3YJ6NPcjs = require('./chunk-7O3YJ6NP.cjs');
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
var
|
|
106
|
+
var _chunkSIQPXYBBcjs = require('./chunk-SIQPXYBB.cjs');
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
|
|
@@ -147,45 +147,45 @@ var _chunkNDMPGFKLcjs = require('./chunk-NDMPGFKL.cjs');
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
var _chunkRTAWQXMEcjs = require('./chunk-RTAWQXME.cjs');
|
|
151
150
|
|
|
151
|
+
var _chunkPSALMEHJcjs = require('./chunk-PSALMEHJ.cjs');
|
|
152
152
|
|
|
153
153
|
|
|
154
|
-
var _chunkXJDB564Acjs = require('./chunk-XJDB564A.cjs');
|
|
155
154
|
|
|
155
|
+
var _chunkP4ZLFUNBcjs = require('./chunk-P4ZLFUNB.cjs');
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
|
|
159
158
|
|
|
159
|
+
var _chunkQTGYT2DFcjs = require('./chunk-QTGYT2DF.cjs');
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
var _chunkL2GUEYHRcjs = require('./chunk-L2GUEYHR.cjs');
|
|
164
163
|
|
|
164
|
+
var _chunkVZ2P6GRCcjs = require('./chunk-VZ2P6GRC.cjs');
|
|
165
165
|
|
|
166
|
-
var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
|
|
167
166
|
|
|
167
|
+
var _chunkQZRFEHMScjs = require('./chunk-QZRFEHMS.cjs');
|
|
168
168
|
|
|
169
169
|
|
|
170
170
|
|
|
171
|
-
var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
|
|
172
171
|
|
|
172
|
+
var _chunkRQSPBWXJcjs = require('./chunk-RQSPBWXJ.cjs');
|
|
173
173
|
|
|
174
|
-
var _chunkZ43CIBURcjs = require('./chunk-Z43CIBUR.cjs');
|
|
175
174
|
|
|
175
|
+
var _chunkIU4YTFFQcjs = require('./chunk-IU4YTFFQ.cjs');
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
var _chunkEZUTDTFMcjs = require('./chunk-EZUTDTFM.cjs');
|
|
180
179
|
|
|
180
|
+
var _chunkERSLQ4C7cjs = require('./chunk-ERSLQ4C7.cjs');
|
|
181
181
|
|
|
182
|
-
var _chunkDA432P2Fcjs = require('./chunk-DA432P2F.cjs');
|
|
183
182
|
|
|
183
|
+
var _chunk25CHWAZYcjs = require('./chunk-25CHWAZY.cjs');
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
|
|
187
|
-
var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
188
187
|
|
|
188
|
+
var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
|
|
@@ -195,185 +195,191 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
|
|
198
|
-
var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.cjs');
|
|
199
198
|
|
|
199
|
+
var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
|
|
200
200
|
|
|
201
|
-
var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
|
|
202
201
|
|
|
202
|
+
var _chunkXH4GQ7MTcjs = require('./chunk-XH4GQ7MT.cjs');
|
|
203
203
|
|
|
204
|
-
var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
205
204
|
|
|
205
|
+
var _chunkTP7JAC3Tcjs = require('./chunk-TP7JAC3T.cjs');
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
var _chunkJDT733EWcjs = require('./chunk-JDT733EW.cjs');
|
|
210
209
|
|
|
210
|
+
var _chunk27IPPPCVcjs = require('./chunk-27IPPPCV.cjs');
|
|
211
211
|
|
|
212
212
|
|
|
213
|
-
var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
214
213
|
|
|
214
|
+
var _chunkYQ5NVEFScjs = require('./chunk-YQ5NVEFS.cjs');
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
var _chunk5LJF4KUZcjs = require('./chunk-5LJF4KUZ.cjs');
|
|
222
221
|
|
|
222
|
+
var _chunkU2HFXURZcjs = require('./chunk-U2HFXURZ.cjs');
|
|
223
223
|
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
var _chunkDVAZ53X6cjs = require('./chunk-DVAZ53X6.cjs');
|
|
230
229
|
|
|
230
|
+
var _chunkN4AM7Q34cjs = require('./chunk-N4AM7Q34.cjs');
|
|
231
231
|
|
|
232
232
|
|
|
233
|
-
var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
|
|
234
233
|
|
|
234
|
+
var _chunkYZMSJRM5cjs = require('./chunk-YZMSJRM5.cjs');
|
|
235
235
|
|
|
236
|
-
var _chunkUA77C2ZAcjs = require('./chunk-UA77C2ZA.cjs');
|
|
237
236
|
|
|
237
|
+
var _chunkHF3JJPH4cjs = require('./chunk-HF3JJPH4.cjs');
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
var _chunkYDXLC4DWcjs = require('./chunk-YDXLC4DW.cjs');
|
|
241
240
|
|
|
241
|
+
var _chunkXZ6L3FUUcjs = require('./chunk-XZ6L3FUU.cjs');
|
|
242
242
|
|
|
243
|
-
var _chunkBNH53KOTcjs = require('./chunk-BNH53KOT.cjs');
|
|
244
243
|
|
|
244
|
+
var _chunkSZBBBLLScjs = require('./chunk-SZBBBLLS.cjs');
|
|
245
245
|
|
|
246
|
-
var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
247
246
|
|
|
247
|
+
var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
|
|
248
248
|
|
|
249
|
-
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
250
249
|
|
|
250
|
+
var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
|
|
251
251
|
|
|
252
|
-
var _chunkTWFJJPE7cjs = require('./chunk-TWFJJPE7.cjs');
|
|
253
252
|
|
|
253
|
+
var _chunk5BZ7PR3Tcjs = require('./chunk-5BZ7PR3T.cjs');
|
|
254
254
|
|
|
255
255
|
|
|
256
|
-
var _chunkSIECKBNKcjs = require('./chunk-SIECKBNK.cjs');
|
|
257
256
|
|
|
257
|
+
var _chunkXJEOHDPNcjs = require('./chunk-XJEOHDPN.cjs');
|
|
258
258
|
|
|
259
|
-
var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
|
|
260
259
|
|
|
260
|
+
var _chunkYCIFGYBYcjs = require('./chunk-YCIFGYBY.cjs');
|
|
261
261
|
|
|
262
262
|
|
|
263
|
-
var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
264
263
|
|
|
264
|
+
var _chunkIDUGG7VRcjs = require('./chunk-IDUGG7VR.cjs');
|
|
265
265
|
|
|
266
266
|
|
|
267
267
|
|
|
268
|
-
var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
|
|
269
268
|
|
|
269
|
+
var _chunk5P3TZGS3cjs = require('./chunk-5P3TZGS3.cjs');
|
|
270
270
|
|
|
271
|
-
var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
|
|
272
271
|
|
|
272
|
+
var _chunk3ACTVXZGcjs = require('./chunk-3ACTVXZG.cjs');
|
|
273
273
|
|
|
274
274
|
|
|
275
275
|
|
|
276
|
-
var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
|
|
277
276
|
|
|
277
|
+
var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
|
|
278
278
|
|
|
279
|
-
var _chunkY3WG64CPcjs = require('./chunk-Y3WG64CP.cjs');
|
|
280
279
|
|
|
280
|
+
var _chunkCH2JX3CMcjs = require('./chunk-CH2JX3CM.cjs');
|
|
281
281
|
|
|
282
282
|
|
|
283
283
|
|
|
284
|
-
var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
|
|
285
284
|
|
|
285
|
+
var _chunk6VC7NUY3cjs = require('./chunk-6VC7NUY3.cjs');
|
|
286
286
|
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
var _chunkI2RBHZF7cjs = require('./chunk-I2RBHZF7.cjs');
|
|
290
289
|
|
|
290
|
+
var _chunkVB7P66Q4cjs = require('./chunk-VB7P66Q4.cjs');
|
|
291
291
|
|
|
292
292
|
|
|
293
|
-
var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
|
|
294
293
|
|
|
294
|
+
var _chunkB2VSX33Tcjs = require('./chunk-B2VSX33T.cjs');
|
|
295
295
|
|
|
296
296
|
|
|
297
297
|
|
|
298
|
-
var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
|
|
299
298
|
|
|
299
|
+
var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
|
|
300
300
|
|
|
301
|
-
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
302
301
|
|
|
302
|
+
var _chunkH5AC3XSEcjs = require('./chunk-H5AC3XSE.cjs');
|
|
303
303
|
|
|
304
304
|
|
|
305
305
|
|
|
306
306
|
|
|
307
307
|
|
|
308
|
-
var _chunk7Q7UB4TLcjs = require('./chunk-7Q7UB4TL.cjs');
|
|
309
308
|
|
|
309
|
+
var _chunk7GKZDRY2cjs = require('./chunk-7GKZDRY2.cjs');
|
|
310
310
|
|
|
311
311
|
|
|
312
|
-
var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
|
|
313
312
|
|
|
313
|
+
var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
|
|
314
314
|
|
|
315
315
|
|
|
316
|
-
var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
|
|
317
316
|
|
|
317
|
+
var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
|
|
318
318
|
|
|
319
|
-
var _chunkNOSLIDSGcjs = require('./chunk-NOSLIDSG.cjs');
|
|
320
319
|
|
|
320
|
+
var _chunkXPVS4HKUcjs = require('./chunk-XPVS4HKU.cjs');
|
|
321
321
|
|
|
322
|
-
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
323
322
|
|
|
323
|
+
var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
|
|
324
324
|
|
|
325
325
|
|
|
326
|
-
var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
|
|
327
326
|
|
|
327
|
+
var _chunkJ2JMESBJcjs = require('./chunk-J2JMESBJ.cjs');
|
|
328
328
|
|
|
329
329
|
|
|
330
|
-
var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
|
|
331
330
|
|
|
331
|
+
var _chunkS2QSTMBEcjs = require('./chunk-S2QSTMBE.cjs');
|
|
332
332
|
|
|
333
333
|
|
|
334
334
|
|
|
335
335
|
|
|
336
|
-
var _chunkEUZFBHPPcjs = require('./chunk-EUZFBHPP.cjs');
|
|
337
336
|
|
|
337
|
+
var _chunkO7B6LJWEcjs = require('./chunk-O7B6LJWE.cjs');
|
|
338
338
|
|
|
339
|
-
var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
340
339
|
|
|
340
|
+
var _chunkZ2JQR56Wcjs = require('./chunk-Z2JQR56W.cjs');
|
|
341
341
|
|
|
342
342
|
|
|
343
343
|
|
|
344
344
|
|
|
345
|
-
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
346
345
|
|
|
346
|
+
var _chunkVIDUNAQEcjs = require('./chunk-VIDUNAQE.cjs');
|
|
347
347
|
|
|
348
348
|
|
|
349
|
-
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
350
349
|
|
|
350
|
+
var _chunk6FIY4KBCcjs = require('./chunk-6FIY4KBC.cjs');
|
|
351
351
|
|
|
352
352
|
|
|
353
353
|
|
|
354
354
|
|
|
355
|
-
var _chunkH7OFZJCVcjs = require('./chunk-H7OFZJCV.cjs');
|
|
356
355
|
|
|
356
|
+
var _chunkQBMMQS25cjs = require('./chunk-QBMMQS25.cjs');
|
|
357
357
|
|
|
358
|
-
var _chunkA25FXJ7Dcjs = require('./chunk-A25FXJ7D.cjs');
|
|
359
358
|
|
|
359
|
+
var _chunkSWOJU7LIcjs = require('./chunk-SWOJU7LI.cjs');
|
|
360
360
|
|
|
361
361
|
|
|
362
362
|
|
|
363
|
-
var _chunk2RSVYJT6cjs = require('./chunk-2RSVYJT6.cjs');
|
|
364
363
|
|
|
364
|
+
var _chunkIBZW57NWcjs = require('./chunk-IBZW57NW.cjs');
|
|
365
365
|
|
|
366
|
-
var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
|
|
367
366
|
|
|
367
|
+
var _chunk7MQMWGTLcjs = require('./chunk-7MQMWGTL.cjs');
|
|
368
368
|
|
|
369
369
|
|
|
370
|
-
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
371
370
|
|
|
371
|
+
var _chunkTFCBJFP7cjs = require('./chunk-TFCBJFP7.cjs');
|
|
372
372
|
|
|
373
373
|
|
|
374
|
-
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
|
|
377
|
+
|
|
378
|
+
// src/vite.ts
|
|
379
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
375
380
|
|
|
376
381
|
// src/form-actions-transform.ts
|
|
382
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
377
383
|
var _crypto = require('crypto');
|
|
378
384
|
var _compiler = require('@farm.js/islx/compiler');
|
|
379
385
|
var _path2 = require('path'); var path2 = _interopRequireWildcard(_path2); var path6 = _interopRequireWildcard(_path2); var path3 = _interopRequireWildcard(_path2);
|
|
@@ -403,10 +409,11 @@ var _async_hooks = require('async_hooks');
|
|
|
403
409
|
var _module = require('module');
|
|
404
410
|
|
|
405
411
|
// src/dev-preview-guard.ts
|
|
412
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
406
413
|
var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
|
|
407
414
|
|
|
408
415
|
function isFarmPreviewTunnelRequest(headers) {
|
|
409
|
-
return headers[
|
|
416
|
+
return headers[_chunkXH4GQ7MTcjs.FARM_PREVIEW_REQUEST_HEADER] !== void 0;
|
|
410
417
|
}
|
|
411
418
|
var VITE_DEFAULT_FS_DENY = [
|
|
412
419
|
".env",
|
|
@@ -521,6 +528,7 @@ function isInside(directory, file) {
|
|
|
521
528
|
}
|
|
522
529
|
|
|
523
530
|
// src/server/dev-cors.ts
|
|
531
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
524
532
|
var VITE_DEFAULT_CORS_ORIGIN = /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/;
|
|
525
533
|
var VITE_DEFAULT_CORS_METHODS = "GET,HEAD,PUT,PATCH,POST,DELETE";
|
|
526
534
|
function appendVary(res, value) {
|
|
@@ -558,6 +566,7 @@ function createFarmDevViteCorsMiddleware() {
|
|
|
558
566
|
var _url = require('url');
|
|
559
567
|
|
|
560
568
|
// src/dev-static.ts
|
|
569
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
561
570
|
|
|
562
571
|
|
|
563
572
|
function shouldBypassFarmRouterForDottedPath(pathname, routeManager, baseDirs, generatedPaths = [], method = "GET") {
|
|
@@ -707,6 +716,7 @@ function devServableFileExists(pathname, baseDirs) {
|
|
|
707
716
|
}
|
|
708
717
|
|
|
709
718
|
// src/server-query-boundary.ts
|
|
719
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
710
720
|
var SERVER_FN_FACTORIES = ["createServerQuery", "createServerFn"];
|
|
711
721
|
var FARM_CORE_IMPORT_RE = /import\s*(?!type\b)(?:[\w$]+\s*,\s*)?\{([^}]*)\}\s*from\s*(["'])@farm\.js\/core(?:\/[\w./-]+)?\2/g;
|
|
712
722
|
function findClientServerFnViolation(code, id) {
|
|
@@ -724,7 +734,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
724
734
|
return null;
|
|
725
735
|
}
|
|
726
736
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
727
|
-
return
|
|
737
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
728
738
|
"CLIENT_SERVER_FUNCTION",
|
|
729
739
|
id,
|
|
730
740
|
`${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
|
|
@@ -733,6 +743,7 @@ function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
|
733
743
|
}
|
|
734
744
|
|
|
735
745
|
// src/client-boundary-env.ts
|
|
746
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
736
747
|
|
|
737
748
|
var FUNCTION_BODY_TYPES = /* @__PURE__ */ new Set([
|
|
738
749
|
"FunctionDeclaration",
|
|
@@ -983,21 +994,21 @@ function readPropertyKey(property) {
|
|
|
983
994
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
984
995
|
switch (finding.kind) {
|
|
985
996
|
case "server-env":
|
|
986
|
-
return
|
|
997
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
987
998
|
"CLIENT_SERVER_ENV",
|
|
988
999
|
file,
|
|
989
1000
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
990
1001
|
location
|
|
991
1002
|
);
|
|
992
1003
|
case "public-env":
|
|
993
|
-
return
|
|
1004
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
994
1005
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
995
1006
|
file,
|
|
996
1007
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
997
1008
|
location
|
|
998
1009
|
);
|
|
999
1010
|
case "builtin":
|
|
1000
|
-
return
|
|
1011
|
+
return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
1001
1012
|
"CLIENT_NODE_BUILTIN",
|
|
1002
1013
|
file,
|
|
1003
1014
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1007,6 +1018,7 @@ function createClientBoundaryDiagnostic(file, finding, location) {
|
|
|
1007
1018
|
}
|
|
1008
1019
|
|
|
1009
1020
|
// src/image-vite.ts
|
|
1021
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1010
1022
|
var _promises = require('fs/promises');
|
|
1011
1023
|
|
|
1012
1024
|
var _imagesize = require('image-size');
|
|
@@ -1074,6 +1086,7 @@ async function createBlurDataURL(bytes) {
|
|
|
1074
1086
|
}
|
|
1075
1087
|
|
|
1076
1088
|
// src/dev/deferred-setup.ts
|
|
1089
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1077
1090
|
function createFarmDeferredMiddleware(ready) {
|
|
1078
1091
|
const stack = [];
|
|
1079
1092
|
const run = (req, res, next) => {
|
|
@@ -1113,6 +1126,7 @@ function createFarmDeferredMiddleware(ready) {
|
|
|
1113
1126
|
|
|
1114
1127
|
|
|
1115
1128
|
// src/islands-react-cache-transform.ts
|
|
1129
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1116
1130
|
|
|
1117
1131
|
var _parseAst = require('rolldown/parseAst');
|
|
1118
1132
|
var FARM_REACT_CACHE_MODULE = "@farm.js/core/internal/react-cache";
|
|
@@ -1207,8 +1221,9 @@ import { ${[...used].map((name) => `${name} as ${REACT_CACHE_APIS[name]}`).join(
|
|
|
1207
1221
|
}
|
|
1208
1222
|
|
|
1209
1223
|
// src/navigation/page-data-error.ts
|
|
1224
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1210
1225
|
function resolveFarmPageDataFailure(error) {
|
|
1211
|
-
if (
|
|
1226
|
+
if (_chunk7MQMWGTLcjs.isFarmNotFoundError.call(void 0, error)) {
|
|
1212
1227
|
return {
|
|
1213
1228
|
status: 404,
|
|
1214
1229
|
payload: {
|
|
@@ -1237,7 +1252,8 @@ function resolveFarmPageDataFailure(error) {
|
|
|
1237
1252
|
}
|
|
1238
1253
|
|
|
1239
1254
|
// src/openapi/dev-status.ts
|
|
1240
|
-
|
|
1255
|
+
_chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
|
|
1256
|
+
function reportOpenAPIDevGenerationResult(spec, output = _chunk7ZDLE77Pcjs.logger) {
|
|
1241
1257
|
if (spec) {
|
|
1242
1258
|
output.success("\u2705 OpenAPI documentation enabled");
|
|
1243
1259
|
return;
|
|
@@ -1248,13 +1264,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunk7U4XF76Rcjs.logge
|
|
|
1248
1264
|
// src/vite.ts
|
|
1249
1265
|
var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
|
|
1250
1266
|
function farmLlmsTxtGeneratedPaths(config) {
|
|
1251
|
-
const llms =
|
|
1267
|
+
const llms = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
|
|
1252
1268
|
if (!llms.enabled) return [];
|
|
1253
1269
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
1254
1270
|
}
|
|
1255
1271
|
function farmAgentGeneratedPaths(config) {
|
|
1256
|
-
const crawlers =
|
|
1257
|
-
const sitemap =
|
|
1272
|
+
const crawlers = _chunkERSLQ4C7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
|
|
1273
|
+
const sitemap = _chunkERSLQ4C7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
|
|
1258
1274
|
return [
|
|
1259
1275
|
...farmLlmsTxtGeneratedPaths(config),
|
|
1260
1276
|
...sitemap.enabled ? ["/sitemap.xml"] : [],
|
|
@@ -1290,22 +1306,22 @@ function loadFarmDocsDevRuntime() {
|
|
|
1290
1306
|
return import("./docs.cjs");
|
|
1291
1307
|
}
|
|
1292
1308
|
function loadFarmDocsSearchDevRuntime() {
|
|
1293
|
-
return import("./search-client-
|
|
1309
|
+
return import("./search-client-Z7KDVD4C.cjs");
|
|
1294
1310
|
}
|
|
1295
1311
|
function loadFarmOpenAPIDevRuntime() {
|
|
1296
|
-
return import("./manager-
|
|
1312
|
+
return import("./manager-3DFQDKJ6.cjs");
|
|
1297
1313
|
}
|
|
1298
1314
|
function loadFarmWorkflowsDevRuntime() {
|
|
1299
1315
|
return import("./workflows.cjs");
|
|
1300
1316
|
}
|
|
1301
1317
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1302
|
-
return import("./devtools-
|
|
1318
|
+
return import("./devtools-OBQY3XOY.cjs");
|
|
1303
1319
|
}
|
|
1304
1320
|
function loadFarmDevtoolsUIRuntime() {
|
|
1305
|
-
return import("./devtools-ui-
|
|
1321
|
+
return import("./devtools-ui-TPBPQEEB.cjs");
|
|
1306
1322
|
}
|
|
1307
1323
|
function loadFarmDevtoolsClientRuntime() {
|
|
1308
|
-
return import("./devtools-client-
|
|
1324
|
+
return import("./devtools-client-3K67NMWA.cjs");
|
|
1309
1325
|
}
|
|
1310
1326
|
function farmI18nClientBridgePlugin() {
|
|
1311
1327
|
return {
|
|
@@ -1324,7 +1340,7 @@ function farmI18nClientBridgePlugin() {
|
|
|
1324
1340
|
};
|
|
1325
1341
|
}
|
|
1326
1342
|
function farmNavigationPlugin(renderer) {
|
|
1327
|
-
const otherRenderer = !
|
|
1343
|
+
const otherRenderer = !_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
|
|
1328
1344
|
return {
|
|
1329
1345
|
name: "farm:navigation",
|
|
1330
1346
|
config() {
|
|
@@ -1349,16 +1365,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1349
1365
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1350
1366
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1351
1367
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1352
|
-
|
|
1353
|
-
new RegExp(`^${
|
|
1368
|
+
_chunkUBH2OARScjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1369
|
+
new RegExp(`^${_chunkPSALMEHJcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1354
1370
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1355
1371
|
// included.
|
|
1356
1372
|
/^node:/,
|
|
1357
|
-
|
|
1373
|
+
_chunkUBH2OARScjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1358
1374
|
];
|
|
1359
1375
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1360
|
-
|
|
1361
|
-
new RegExp(`^${
|
|
1376
|
+
_chunkUBH2OARScjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1377
|
+
new RegExp(`^${_chunkPSALMEHJcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1362
1378
|
];
|
|
1363
1379
|
function createFarmPlatformClientModule(platform) {
|
|
1364
1380
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1389,27 +1405,36 @@ function farmIslandContainersPlugin(config) {
|
|
|
1389
1405
|
root = config.root || resolved.root;
|
|
1390
1406
|
farmApi = _optionalChain([resolved, 'access', _70 => _70.plugins, 'access', _71 => _71.find, 'call', _72 => _72((plugin) => plugin.name === "farm"), 'optionalAccess', _73 => _73.api]);
|
|
1391
1407
|
},
|
|
1392
|
-
transform
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1408
|
+
transform: {
|
|
1409
|
+
// Most modules a build transforms open no container element. The bundler skips them
|
|
1410
|
+
// without calling into JavaScript.
|
|
1411
|
+
filter: {
|
|
1412
|
+
id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
|
|
1413
|
+
code: _chunkPSALMEHJcjs.FARM_ISLAND_CONTAINER_TAG
|
|
1414
|
+
},
|
|
1415
|
+
handler(code, id) {
|
|
1416
|
+
if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _74 => _74.experimental, 'optionalAccess', _75 => _75.serverComponents])) !== "islands") {
|
|
1417
|
+
return null;
|
|
1418
|
+
}
|
|
1419
|
+
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1420
|
+
return null;
|
|
1421
|
+
}
|
|
1422
|
+
if (_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1423
|
+
if (!_chunkPSALMEHJcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
|
|
1424
|
+
const file = id.split("?", 1)[0];
|
|
1425
|
+
const inspect = () => _chunkPSALMEHJcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1426
|
+
const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
|
|
1427
|
+
if (bindings.length === 0) return null;
|
|
1428
|
+
const grown = _chunkPSALMEHJcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1429
|
+
code,
|
|
1430
|
+
file,
|
|
1431
|
+
bindings,
|
|
1432
|
+
reference: _chunkPSALMEHJcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1433
|
+
});
|
|
1434
|
+
if (grown === null) return null;
|
|
1435
|
+
_chunkPSALMEHJcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1436
|
+
return { code: grown, map: null };
|
|
1398
1437
|
}
|
|
1399
|
-
if (_chunkRTAWQXMEcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1400
|
-
const file = id.split("?", 1)[0];
|
|
1401
|
-
const inspect = () => _chunkRTAWQXMEcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1402
|
-
const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
|
|
1403
|
-
if (bindings.length === 0) return null;
|
|
1404
|
-
const grown = _chunkRTAWQXMEcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1405
|
-
code,
|
|
1406
|
-
file,
|
|
1407
|
-
bindings,
|
|
1408
|
-
reference: _chunkRTAWQXMEcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1409
|
-
});
|
|
1410
|
-
if (grown === null) return null;
|
|
1411
|
-
_chunkRTAWQXMEcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1412
|
-
return { code: grown, map: null };
|
|
1413
1438
|
}
|
|
1414
1439
|
};
|
|
1415
1440
|
}
|
|
@@ -1422,18 +1447,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1422
1447
|
config(config) {
|
|
1423
1448
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1424
1449
|
if (options.distDir) {
|
|
1425
|
-
|
|
1450
|
+
_chunkPSALMEHJcjs.usePackageScanCacheFile.call(void 0,
|
|
1426
1451
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1427
1452
|
);
|
|
1428
1453
|
}
|
|
1429
|
-
const bundledPackages =
|
|
1454
|
+
const bundledPackages = _chunkPSALMEHJcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1430
1455
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1431
|
-
|
|
1456
|
+
_chunkPSALMEHJcjs.persistPackageScanCache.call(void 0, );
|
|
1432
1457
|
return {
|
|
1433
1458
|
optimizeDeps: {
|
|
1434
1459
|
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1435
1460
|
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1436
|
-
rolldownOptions: { plugins: [
|
|
1461
|
+
rolldownOptions: { plugins: [_chunkPSALMEHJcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1437
1462
|
},
|
|
1438
1463
|
ssr: {
|
|
1439
1464
|
noExternal: [
|
|
@@ -1459,8 +1484,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1459
1484
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1460
1485
|
}
|
|
1461
1486
|
this.error(
|
|
1462
|
-
|
|
1463
|
-
|
|
1487
|
+
_chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
1488
|
+
_chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
1464
1489
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1465
1490
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1466
1491
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1470,9 +1495,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1470
1495
|
);
|
|
1471
1496
|
}
|
|
1472
1497
|
if (!_optionalChain([options2, 'optionalAccess', _79 => _79.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1473
|
-
return
|
|
1498
|
+
return _chunkPSALMEHJcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1474
1499
|
}
|
|
1475
|
-
const resolveFrom = importer ?
|
|
1500
|
+
const resolveFrom = importer ? _chunkPSALMEHJcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1476
1501
|
if (resolveFrom) {
|
|
1477
1502
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1478
1503
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1489,8 +1514,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1489
1514
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1490
1515
|
if (!_optionalChain([options2, 'optionalAccess', _80 => _80.ssr])) {
|
|
1491
1516
|
this.error(
|
|
1492
|
-
|
|
1493
|
-
|
|
1517
|
+
_chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
1518
|
+
_chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
|
|
1494
1519
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1495
1520
|
_nullishCoalesce(importer, () => ( id)),
|
|
1496
1521
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1499,10 +1524,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1499
1524
|
)
|
|
1500
1525
|
);
|
|
1501
1526
|
}
|
|
1502
|
-
vercelOgInstalled || (vercelOgInstalled =
|
|
1527
|
+
vercelOgInstalled || (vercelOgInstalled = _chunkIDUGG7VRcjs.isOptionalPeerInstalled.call(void 0, root, "@vercel/og"));
|
|
1503
1528
|
if (!vercelOgInstalled) {
|
|
1504
1529
|
this.error(
|
|
1505
|
-
`${id} needs @vercel/og, which is not installed${importedBy}. ${
|
|
1530
|
+
`${id} needs @vercel/og, which is not installed${importedBy}. ${_chunkIDUGG7VRcjs.VERCEL_OG_INSTALL_HINT}`
|
|
1506
1531
|
);
|
|
1507
1532
|
}
|
|
1508
1533
|
return null;
|
|
@@ -1513,9 +1538,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1513
1538
|
handler(id) {
|
|
1514
1539
|
if (id === FARM_SERVER_ONLY_PACKAGE_ID) return "export {};";
|
|
1515
1540
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1516
|
-
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => (
|
|
1541
|
+
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkYQXLBYY2cjs.resolveFarmPlatform.call(void 0, ))));
|
|
1517
1542
|
}
|
|
1518
|
-
return _nullishCoalesce(
|
|
1543
|
+
return _nullishCoalesce(_chunkPSALMEHJcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1519
1544
|
}
|
|
1520
1545
|
}
|
|
1521
1546
|
};
|
|
@@ -1548,7 +1573,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
1548
1573
|
if (!snapshot) return "";
|
|
1549
1574
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
1550
1575
|
if (snapshot.routing === "none") return runtime;
|
|
1551
|
-
return `${
|
|
1576
|
+
return `${_chunkIGBQSUT5cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
1552
1577
|
}
|
|
1553
1578
|
function getPublicEnvDefine(config) {
|
|
1554
1579
|
const publicEnv = _optionalChain([config, 'access', _81 => _81.env, 'optionalAccess', _82 => _82.public]);
|
|
@@ -1572,15 +1597,15 @@ function createRequestFromNodeRequest(req, url, signal) {
|
|
|
1572
1597
|
signal
|
|
1573
1598
|
});
|
|
1574
1599
|
}
|
|
1575
|
-
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request) =>
|
|
1576
|
-
const middleware =
|
|
1600
|
+
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request) => _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request)) {
|
|
1601
|
+
const middleware = _chunkKSRWTQ6Jcjs._withAfterNodeMiddleware.call(void 0, handler);
|
|
1577
1602
|
return (req, res, next) => {
|
|
1578
1603
|
const traceUrl = resolveTraceUrl(req);
|
|
1579
1604
|
const traceRequest = createRequestFromNodeRequest(req, traceUrl);
|
|
1580
|
-
const run = () =>
|
|
1605
|
+
const run = () => _chunkRFKPIAOFcjs.runWithFarmRequestSpan.call(void 0, traceRequest, () => middleware(req, res, next), {
|
|
1581
1606
|
getStatusCode: () => res.statusCode || 200
|
|
1582
1607
|
});
|
|
1583
|
-
const result = apiRuntime ?
|
|
1608
|
+
const result = apiRuntime ? _chunkIVEV44O2cjs._runWithAPIRequestRuntime.call(void 0, apiRuntime, run) : run();
|
|
1584
1609
|
return Promise.resolve(result).catch((error) => {
|
|
1585
1610
|
console.error(
|
|
1586
1611
|
`[FARM] Unhandled error while handling ${req.method || "GET"} ${req.url || "/"}:`,
|
|
@@ -1595,7 +1620,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
|
|
|
1595
1620
|
}
|
|
1596
1621
|
res.statusCode = 500;
|
|
1597
1622
|
res.setHeader("Content-Type", "application/json");
|
|
1598
|
-
res.end(
|
|
1623
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1599
1624
|
});
|
|
1600
1625
|
};
|
|
1601
1626
|
}
|
|
@@ -1603,10 +1628,10 @@ function sendFarmDevErrorJSON(res) {
|
|
|
1603
1628
|
res.statusCode = 500;
|
|
1604
1629
|
res.setHeader("Content-Type", "application/json");
|
|
1605
1630
|
res.setHeader("Cache-Control", "private, no-store");
|
|
1606
|
-
res.end(
|
|
1631
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
1607
1632
|
}
|
|
1608
1633
|
function createFarmDevMiddlewareErrorResponse() {
|
|
1609
|
-
return new Response(
|
|
1634
|
+
return new Response(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
|
|
1610
1635
|
status: 500,
|
|
1611
1636
|
headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
|
|
1612
1637
|
});
|
|
@@ -1618,15 +1643,15 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
|
|
|
1618
1643
|
}
|
|
1619
1644
|
function sendFarmDevRuntimeHookError(res, json) {
|
|
1620
1645
|
setFarmDevRuntimeHookErrorHead(res, json);
|
|
1621
|
-
res.end(json ?
|
|
1646
|
+
res.end(json ? _chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1622
1647
|
}
|
|
1623
1648
|
function opensFarmDevRuntimeSession(pm) {
|
|
1624
|
-
return pm.hasRuntimeRequestHooks() ||
|
|
1649
|
+
return pm.hasRuntimeRequestHooks() || _chunkADCVSTFVcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
|
|
1625
1650
|
}
|
|
1626
1651
|
var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1652
|
+
_chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
1653
|
+
_chunkQBMMQS25cjs.FARM_CONFIG_REDIRECTS_PLUGIN_NAME,
|
|
1654
|
+
_chunkQBMMQS25cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME
|
|
1630
1655
|
]);
|
|
1631
1656
|
function isFarmConfigRoutePlugin(plugin) {
|
|
1632
1657
|
return FARM_CONFIG_ROUTE_PLUGIN_NAMES.has(plugin.name);
|
|
@@ -1637,10 +1662,10 @@ async function proxyFarmExternalRewrite(req, res, bodySizeLimit) {
|
|
|
1637
1662
|
if (!destination || !/^https?:\/\//i.test(destination)) return false;
|
|
1638
1663
|
let request = createRequestFromNodeRequest(req, new URL(destination));
|
|
1639
1664
|
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
1640
|
-
const body = await
|
|
1665
|
+
const body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, bodySizeLimit);
|
|
1641
1666
|
request = new Request(request, { method: request.method, body: toRequestBody(body) });
|
|
1642
1667
|
}
|
|
1643
|
-
await
|
|
1668
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, await _chunk6VC7NUY3cjs.fetchFarmExternalRewrite.call(void 0, request));
|
|
1644
1669
|
return true;
|
|
1645
1670
|
}
|
|
1646
1671
|
function toRequestBody(body) {
|
|
@@ -1677,7 +1702,7 @@ function applyWebResponseToNodeResponse(response, res) {
|
|
|
1677
1702
|
for (const name of res.getHeaderNames()) {
|
|
1678
1703
|
res.removeHeader(name);
|
|
1679
1704
|
}
|
|
1680
|
-
|
|
1705
|
+
_chunk6VC7NUY3cjs.applyWebResponseHeaders.call(void 0, res, response.headers);
|
|
1681
1706
|
}
|
|
1682
1707
|
function toNodeResponseBuffer(chunk, encoding) {
|
|
1683
1708
|
if (chunk === void 0 || chunk === null || typeof chunk === "function") return void 0;
|
|
@@ -1734,7 +1759,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1734
1759
|
res.end = originalEnd;
|
|
1735
1760
|
res.writeHead = originalWriteHead;
|
|
1736
1761
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1737
|
-
delete res[
|
|
1762
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1738
1763
|
};
|
|
1739
1764
|
let runtimeHookFailed = false;
|
|
1740
1765
|
const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
|
|
@@ -1748,7 +1773,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1748
1773
|
const writeRuntimeHookFailure = () => {
|
|
1749
1774
|
setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
|
|
1750
1775
|
originalWriteHead(500);
|
|
1751
|
-
originalWrite(options.jsonError ?
|
|
1776
|
+
originalWrite(options.jsonError ? _chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
|
|
1752
1777
|
};
|
|
1753
1778
|
const htmlChunks = [];
|
|
1754
1779
|
const responseChunks = [];
|
|
@@ -1858,7 +1883,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1858
1883
|
});
|
|
1859
1884
|
res.end = ((...args) => {
|
|
1860
1885
|
interceptedEnd = true;
|
|
1861
|
-
res[
|
|
1886
|
+
res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
|
|
1862
1887
|
if (afterResponseCalled) return res;
|
|
1863
1888
|
afterResponseCalled = true;
|
|
1864
1889
|
options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
|
|
@@ -1941,7 +1966,7 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1941
1966
|
res.end = originalEnd;
|
|
1942
1967
|
res.writeHead = originalWriteHead;
|
|
1943
1968
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1944
|
-
delete res[
|
|
1969
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1945
1970
|
originalEnd(...originalEndArgs);
|
|
1946
1971
|
}).catch((error) => {
|
|
1947
1972
|
reportFailure(error);
|
|
@@ -1958,14 +1983,14 @@ function interceptFarmDevPageResponse(options) {
|
|
|
1958
1983
|
res.end = originalEnd;
|
|
1959
1984
|
res.writeHead = originalWriteHead;
|
|
1960
1985
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1961
|
-
delete res[
|
|
1986
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1962
1987
|
originalEnd(body, callback);
|
|
1963
1988
|
} else {
|
|
1964
1989
|
res.write = originalWrite;
|
|
1965
1990
|
res.end = originalEnd;
|
|
1966
1991
|
res.writeHead = originalWriteHead;
|
|
1967
1992
|
if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
|
|
1968
|
-
delete res[
|
|
1993
|
+
delete res[_chunkIGA3OTFYcjs.FARM_NODE_RESPONSE_END_PENDING];
|
|
1969
1994
|
originalEnd(...originalEndArgs);
|
|
1970
1995
|
}
|
|
1971
1996
|
});
|
|
@@ -1993,22 +2018,22 @@ function getEnvDefines(config, configEnv) {
|
|
|
1993
2018
|
__FARM_API_BASE_URL__: JSON.stringify(getFarmAPIBaseURLDefine(config)),
|
|
1994
2019
|
__FARM_PUBLIC_ENV__: JSON.stringify(getPublicEnvDefine(config)),
|
|
1995
2020
|
__FARM_IMAGE_CONFIG__: JSON.stringify(
|
|
1996
|
-
|
|
1997
|
-
|
|
2021
|
+
_chunkJ2JMESBJcjs.getPublicFarmImageConfig.call(void 0,
|
|
2022
|
+
_chunkJ2JMESBJcjs.resolveFarmImageConfig.call(void 0,
|
|
1998
2023
|
config.images,
|
|
1999
|
-
|
|
2024
|
+
_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
|
|
2000
2025
|
)
|
|
2001
2026
|
)
|
|
2002
2027
|
)
|
|
2003
2028
|
};
|
|
2004
2029
|
if (_optionalChain([configEnv, 'optionalAccess', _91 => _91.isSsrBuild])) {
|
|
2005
|
-
defines.__FARM_ENV__ = JSON.stringify(
|
|
2030
|
+
defines.__FARM_ENV__ = JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
|
|
2006
2031
|
}
|
|
2007
2032
|
return defines;
|
|
2008
2033
|
}
|
|
2009
2034
|
function getFarmAPIBaseURLDefine(config) {
|
|
2010
2035
|
const baseURL = _optionalChain([config, 'access', _92 => _92.api, 'optionalAccess', _93 => _93.baseURL]);
|
|
2011
|
-
return typeof baseURL === "string" && baseURL ? baseURL :
|
|
2036
|
+
return typeof baseURL === "string" && baseURL ? baseURL : _chunkG5KGLMPNcjs.DEFAULT_FARM_API_BASE_PATH;
|
|
2012
2037
|
}
|
|
2013
2038
|
function isResolvedEnvScope(value) {
|
|
2014
2039
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -2026,7 +2051,7 @@ function fileContainsProgrammaticPageRoute(file) {
|
|
|
2026
2051
|
return false;
|
|
2027
2052
|
}
|
|
2028
2053
|
try {
|
|
2029
|
-
return
|
|
2054
|
+
return _chunkPYPHM7AScjs.scanProgrammaticPagePaths.call(void 0, fs2.readFileSync(file, "utf8")).length > 0;
|
|
2030
2055
|
} catch (e15) {
|
|
2031
2056
|
return false;
|
|
2032
2057
|
}
|
|
@@ -2086,8 +2111,8 @@ function rewriteEarlySsrRelativeImports(options) {
|
|
|
2086
2111
|
const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
|
|
2087
2112
|
const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
|
|
2088
2113
|
const resolvedPath = path6.resolve(path6.dirname(cleanId), sourcePath);
|
|
2089
|
-
const moduleId =
|
|
2090
|
-
const specifier = moduleId.startsWith("/@fs/") ?
|
|
2114
|
+
const moduleId = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, resolvedPath, options.root);
|
|
2115
|
+
const specifier = moduleId.startsWith("/@fs/") ? _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
|
|
2091
2116
|
replacements.push({
|
|
2092
2117
|
start: source.start,
|
|
2093
2118
|
end: source.end,
|
|
@@ -2129,7 +2154,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2129
2154
|
return null;
|
|
2130
2155
|
}
|
|
2131
2156
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2132
|
-
const everyExportIsComponent = options.code.includes(
|
|
2157
|
+
const everyExportIsComponent = options.code.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2133
2158
|
const replacements = [];
|
|
2134
2159
|
const wrapperStatements = [];
|
|
2135
2160
|
const originalEntries = [];
|
|
@@ -2284,16 +2309,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2284
2309
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2285
2310
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2286
2311
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2287
|
-
if (!_optionalChain([resolved, 'optionalAccess', _107 => _107.id, 'access', _108 => _108.startsWith, 'call', _109 => _109(
|
|
2312
|
+
if (!_optionalChain([resolved, 'optionalAccess', _107 => _107.id, 'access', _108 => _108.startsWith, 'call', _109 => _109(_chunkPSALMEHJcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2288
2313
|
}
|
|
2289
2314
|
findings.push(finding);
|
|
2290
2315
|
}
|
|
2291
2316
|
if (findings.length === 0) return;
|
|
2292
2317
|
warnedClientBoundaryIds.add(id);
|
|
2293
|
-
const locate =
|
|
2294
|
-
|
|
2318
|
+
const locate = _chunkPSALMEHJcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2319
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2295
2320
|
findings.map(
|
|
2296
|
-
(finding) =>
|
|
2321
|
+
(finding) => _chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
2297
2322
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2298
2323
|
config.root
|
|
2299
2324
|
)
|
|
@@ -2310,7 +2335,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
|
|
|
2310
2335
|
);
|
|
2311
2336
|
}
|
|
2312
2337
|
function shouldEmitFarmClientRootHmr(renderer) {
|
|
2313
|
-
return
|
|
2338
|
+
return _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
|
|
2314
2339
|
}
|
|
2315
2340
|
function reachesSharedFarmRendererIsland(graph, file, islandModules) {
|
|
2316
2341
|
const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _110 => _110.getModulesByFile, 'call', _111 => _111(file)]), () => ( [])));
|
|
@@ -2333,7 +2358,7 @@ function toFarmRuntimeModuleId(specifier) {
|
|
|
2333
2358
|
return FARM_RUNTIME_MODULE_PREFIX + specifier;
|
|
2334
2359
|
}
|
|
2335
2360
|
function getFarmCoreFile() {
|
|
2336
|
-
return typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0,
|
|
2361
|
+
return typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0, _chunkUGL4BDNBcjs.define_import_meta_default.url);
|
|
2337
2362
|
}
|
|
2338
2363
|
var FARM_SOURCE_ALIAS_PROBES = [
|
|
2339
2364
|
"@/x",
|
|
@@ -2357,20 +2382,20 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2357
2382
|
);
|
|
2358
2383
|
}
|
|
2359
2384
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2360
|
-
const rendererDisabled =
|
|
2385
|
+
const rendererDisabled = _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2361
2386
|
const imageImports = farmImageImportsPlugin();
|
|
2362
|
-
const fontImports =
|
|
2387
|
+
const fontImports = _chunkUBH2OARScjs.farmFontImportsPlugin.call(void 0, {
|
|
2363
2388
|
root: options.root,
|
|
2364
2389
|
basePath: options.basePath,
|
|
2365
2390
|
publicDir: options.publicDir,
|
|
2366
2391
|
// A production build never starts the app, so it reads the directories from these options.
|
|
2367
|
-
isLayoutModule: (id) =>
|
|
2392
|
+
isLayoutModule: (id) => _chunkUBH2OARScjs.isFarmLayoutModule.call(void 0, id, _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113()]), () => ( options))))
|
|
2368
2393
|
});
|
|
2369
2394
|
let farmApp;
|
|
2370
2395
|
const isFarmGeneratedOutput = (file) => {
|
|
2371
2396
|
const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _114 => _114.getConfig, 'call', _115 => _115(), 'access', _116 => _116.root]), () => ( options.root));
|
|
2372
2397
|
if (!root) return file.includes("/.farm/");
|
|
2373
|
-
const output =
|
|
2398
|
+
const output = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
|
|
2374
2399
|
return file === output || file.startsWith(`${output}/`);
|
|
2375
2400
|
};
|
|
2376
2401
|
let serverFnTransformActive = false;
|
|
@@ -2388,15 +2413,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2388
2413
|
for (const entry of entries.values()) files.add(entry.modulePath);
|
|
2389
2414
|
}
|
|
2390
2415
|
const config = farmApp.getConfig();
|
|
2391
|
-
const mdxComponents =
|
|
2392
|
-
|
|
2416
|
+
const mdxComponents = _chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0,
|
|
2417
|
+
_chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, config.mdx),
|
|
2393
2418
|
config.root
|
|
2394
2419
|
);
|
|
2395
2420
|
if (mdxComponents) files.add(mdxComponents);
|
|
2396
2421
|
return files;
|
|
2397
2422
|
};
|
|
2398
|
-
const islxActionsMode = () =>
|
|
2399
|
-
const islandsServerFns = () =>
|
|
2423
|
+
const islxActionsMode = () => _chunkUBH2OARScjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
|
|
2424
|
+
const islandsServerFns = () => _chunkUBH2OARScjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _121 => _121.getConfig, 'call', _122 => _122()]), () => ( options)));
|
|
2400
2425
|
let reactRefreshActive = false;
|
|
2401
2426
|
let server;
|
|
2402
2427
|
let deferredGates;
|
|
@@ -2416,7 +2441,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2416
2441
|
docsMCPServerDisposers.clear();
|
|
2417
2442
|
};
|
|
2418
2443
|
const logUpdate = (tag, message) => {
|
|
2419
|
-
const pc =
|
|
2444
|
+
const pc = _chunkCH2JX3CMcjs.createCliColors.call(void 0, );
|
|
2420
2445
|
const log = [
|
|
2421
2446
|
pc.dim("[") + pc.bold(pc.blue("FARM")) + pc.dim("]"),
|
|
2422
2447
|
pc.dim("[") + pc.bold(pc.cyan(tag)) + pc.dim("]"),
|
|
@@ -2426,7 +2451,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2426
2451
|
console.log(log);
|
|
2427
2452
|
};
|
|
2428
2453
|
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _123 => _123.getRouteManager, 'call', _124 => _124(), 'access', _125 => _125.getProgrammaticClientRoutes, 'call', _126 => _126()])));
|
|
2429
|
-
const inBuildPackageCache =
|
|
2454
|
+
const inBuildPackageCache = _chunkPSALMEHJcjs.bindPackageClientBoundaryCache.call(void 0, );
|
|
2430
2455
|
const inspectPackages = (operation) => {
|
|
2431
2456
|
const routeManager = _optionalChain([farmApp, 'optionalAccess', _127 => _127.getRouteManager, 'call', _128 => _128()]);
|
|
2432
2457
|
return inBuildPackageCache(
|
|
@@ -2448,12 +2473,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2448
2473
|
config(userConfig, configEnv) {
|
|
2449
2474
|
isBuild = configEnv.command === "build";
|
|
2450
2475
|
const farmAliases = {
|
|
2451
|
-
...
|
|
2452
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _134 => _134.resolve, 'optionalAccess', _135 => _135.alias])) ? {} :
|
|
2476
|
+
..._chunkKBURN62Zcjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2477
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _134 => _134.resolve, 'optionalAccess', _135 => _135.alias])) ? {} : _chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2453
2478
|
};
|
|
2454
2479
|
if (Object.keys(farmAliases).length > 0) {
|
|
2455
2480
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2456
|
-
userConfig.resolve.alias =
|
|
2481
|
+
userConfig.resolve.alias = _chunkUBH2OARScjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2457
2482
|
}
|
|
2458
2483
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2459
2484
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _136 => _136.server, 'optionalAccess', _137 => _137.cors]) === void 0;
|
|
@@ -2493,9 +2518,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2493
2518
|
serverFnTransformActive = config.plugins.some(
|
|
2494
2519
|
(plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
2495
2520
|
);
|
|
2496
|
-
reactRefreshActive =
|
|
2521
|
+
reactRefreshActive = _chunkQCVP22KWcjs.isFarmReactRefreshActive.call(void 0, config);
|
|
2497
2522
|
if (_optionalChain([options, 'access', _143 => _143.experimental, 'optionalAccess', _144 => _144.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
2498
|
-
|
|
2523
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2499
2524
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
2500
2525
|
);
|
|
2501
2526
|
}
|
|
@@ -2503,7 +2528,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2503
2528
|
async configureServer(viteServer) {
|
|
2504
2529
|
viteServer.middlewares.use(
|
|
2505
2530
|
createFarmDevPreviewGuard(viteServer, {
|
|
2506
|
-
getSourceRoots: () =>
|
|
2531
|
+
getSourceRoots: () => _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _145 => _145.getConfig, 'call', _146 => _146()]), () => ( options)))
|
|
2507
2532
|
})
|
|
2508
2533
|
);
|
|
2509
2534
|
if (typeof fontImports.configureServer === "function") {
|
|
@@ -2517,7 +2542,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2517
2542
|
_optionalChain([pm, 'optionalAccess', _151 => _151.getPlugins, 'call', _152 => _152(), 'access', _153 => _153.filter, 'call', _154 => _154(isFarmConfigRoutePlugin), 'access', _155 => _155.map, 'call', _156 => _156((plugin2) => plugin2.name)])
|
|
2518
2543
|
);
|
|
2519
2544
|
const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _157 => _157.getPlugins, 'call', _158 => _158()]), () => ( []))).flatMap((plugin2) => {
|
|
2520
|
-
const matcher =
|
|
2545
|
+
const matcher = _chunkQBMMQS25cjs.getConfigRedirectMatcher.call(void 0, plugin2);
|
|
2521
2546
|
return matcher ? [matcher] : [];
|
|
2522
2547
|
});
|
|
2523
2548
|
const emitPluginError = async (phase, error, meta) => {
|
|
@@ -2527,7 +2552,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2527
2552
|
} catch (e21) {
|
|
2528
2553
|
}
|
|
2529
2554
|
};
|
|
2530
|
-
farmApp = new (0,
|
|
2555
|
+
farmApp = new (0, _chunkUBH2OARScjs.FarmApp)(
|
|
2531
2556
|
{
|
|
2532
2557
|
...options,
|
|
2533
2558
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2535,7 +2560,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2535
2560
|
server
|
|
2536
2561
|
);
|
|
2537
2562
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2538
|
-
|
|
2563
|
+
_chunkPSALMEHJcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2539
2564
|
farmApp.getConfig().root,
|
|
2540
2565
|
options.distDir || ".farm"
|
|
2541
2566
|
)
|
|
@@ -2546,15 +2571,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2546
2571
|
let farmAppPackages;
|
|
2547
2572
|
if (_optionalChain([farmConfig, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.noindexPreviews])) {
|
|
2548
2573
|
farmMiddlewares.use((_req, res, next) => {
|
|
2549
|
-
if (
|
|
2550
|
-
res.setHeader("X-Robots-Tag",
|
|
2574
|
+
if (_chunkNNHIV3O2cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2575
|
+
res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2551
2576
|
}
|
|
2552
2577
|
next();
|
|
2553
2578
|
});
|
|
2554
2579
|
}
|
|
2555
|
-
const apiServerBasePath =
|
|
2580
|
+
const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2556
2581
|
const devBuiltInRoutePaths = new Set(
|
|
2557
|
-
|
|
2582
|
+
_chunkC4DZAEVTcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2558
2583
|
agent: {
|
|
2559
2584
|
apiCatalog: true,
|
|
2560
2585
|
mcp: true,
|
|
@@ -2565,12 +2590,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2565
2590
|
openapi: options.openapi
|
|
2566
2591
|
})
|
|
2567
2592
|
);
|
|
2568
|
-
const serverConfig =
|
|
2569
|
-
globalThis.__FARM_IMAGE_CONFIG__ =
|
|
2593
|
+
const serverConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, farmConfig.server);
|
|
2594
|
+
globalThis.__FARM_IMAGE_CONFIG__ = _chunkJ2JMESBJcjs.getPublicFarmImageConfig.call(void 0, farmConfig.images);
|
|
2570
2595
|
let imageHandler = null;
|
|
2571
2596
|
if (farmConfig.images.provider !== "none") {
|
|
2572
2597
|
const { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } = await import("./image/sharp.cjs");
|
|
2573
|
-
imageHandler =
|
|
2598
|
+
imageHandler = _chunk6QWCFVGLcjs.createFarmImageHandler.call(void 0, farmConfig.images, {
|
|
2574
2599
|
transform: createSharpImageTransformer(),
|
|
2575
2600
|
fetchRemote: createNodeImageFetcher(farmConfig.images),
|
|
2576
2601
|
validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
|
|
@@ -2578,18 +2603,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2578
2603
|
// a caller-controlled Host header.
|
|
2579
2604
|
trustedLocalOrigin: () => _optionalChain([server, 'access', _161 => _161.resolvedUrls, 'optionalAccess', _162 => _162.local, 'access', _163 => _163[0]]),
|
|
2580
2605
|
onError(error) {
|
|
2581
|
-
|
|
2606
|
+
_chunk7ZDLE77Pcjs.logger.error(
|
|
2582
2607
|
`Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2583
2608
|
);
|
|
2584
2609
|
}
|
|
2585
2610
|
});
|
|
2586
2611
|
}
|
|
2587
|
-
const sourceRoots =
|
|
2612
|
+
const sourceRoots = _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, farmConfig);
|
|
2588
2613
|
server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
|
|
2589
2614
|
if (farmConfig.i18n.enabled) {
|
|
2590
2615
|
server.watcher.add(
|
|
2591
2616
|
farmConfig.i18n.locales.map(
|
|
2592
|
-
(locale) =>
|
|
2617
|
+
(locale) => _chunkB2VSX33Tcjs.resolveFarmI18nMessagePath.call(void 0, farmConfig.i18n, locale)
|
|
2593
2618
|
)
|
|
2594
2619
|
);
|
|
2595
2620
|
}
|
|
@@ -2604,7 +2629,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2604
2629
|
);
|
|
2605
2630
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2606
2631
|
try {
|
|
2607
|
-
const result = await
|
|
2632
|
+
const result = await _chunkKM7ZRKCHcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2608
2633
|
root: farmConfig.root,
|
|
2609
2634
|
srcDir: farmConfig.srcDir,
|
|
2610
2635
|
layers: farmConfig.layers,
|
|
@@ -2635,7 +2660,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2635
2660
|
}
|
|
2636
2661
|
} catch (e) {
|
|
2637
2662
|
const message = e instanceof Error ? e.message : String(e);
|
|
2638
|
-
|
|
2663
|
+
_chunk7ZDLE77Pcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
2639
2664
|
if (pm) {
|
|
2640
2665
|
await emitPluginError("type-artifact-generation", e, { reason });
|
|
2641
2666
|
}
|
|
@@ -2649,7 +2674,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2649
2674
|
farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _168 => _168.configFile, 'optionalAccess', _169 => _169.replace, 'call', _170 => _170(/\\/g, "/")])).filter((file) => Boolean(file))
|
|
2650
2675
|
);
|
|
2651
2676
|
const routeModuleExtensions = /* @__PURE__ */ new Set([
|
|
2652
|
-
...
|
|
2677
|
+
..._chunkHP7QYVSTcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
|
|
2653
2678
|
".md",
|
|
2654
2679
|
".mdx"
|
|
2655
2680
|
]);
|
|
@@ -2658,14 +2683,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2658
2683
|
const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
|
|
2659
2684
|
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
|
|
2660
2685
|
};
|
|
2661
|
-
const polyroute =
|
|
2686
|
+
const polyroute = _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2662
2687
|
const isApiRouteFile = (file) => {
|
|
2663
2688
|
const normalized = file.replace(/\\/g, "/");
|
|
2664
|
-
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) &&
|
|
2689
|
+
return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
|
|
2665
2690
|
};
|
|
2666
2691
|
const isProgrammaticRouteFile = (file) => {
|
|
2667
2692
|
const normalized = file.replace(/\\/g, "/");
|
|
2668
|
-
return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) &&
|
|
2693
|
+
return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalized);
|
|
2669
2694
|
};
|
|
2670
2695
|
const isProgrammaticRouteSourceFile = (file) => {
|
|
2671
2696
|
const normalized = file.replace(/\\/g, "/");
|
|
@@ -2678,13 +2703,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2678
2703
|
const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
|
|
2679
2704
|
file.replace(/\\/g, "/")
|
|
2680
2705
|
);
|
|
2681
|
-
const isI18nCatalogFile = (file) =>
|
|
2706
|
+
const isI18nCatalogFile = (file) => _chunkB2VSX33Tcjs.isFarmI18nCatalogFile.call(void 0, farmConfig.i18n, file);
|
|
2682
2707
|
let typeArtifactGenScheduled = null;
|
|
2683
2708
|
let pendingTypeArtifacts = createEmptyTypeArtifactSelection();
|
|
2684
2709
|
let pendingTypeArtifactReason = "";
|
|
2685
2710
|
let queuedRouteFiles;
|
|
2686
2711
|
const scheduleTypeArtifactGen = (file, event, selection) => {
|
|
2687
|
-
const normalizedFile =
|
|
2712
|
+
const normalizedFile = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, file);
|
|
2688
2713
|
for (const [artifact, enabled] of Object.entries(selection)) {
|
|
2689
2714
|
if (enabled) {
|
|
2690
2715
|
pendingTypeArtifacts[artifact] = true;
|
|
@@ -2705,7 +2730,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2705
2730
|
["add", "change", "unlink"].forEach((ev) => {
|
|
2706
2731
|
server.watcher.on(ev, (file) => {
|
|
2707
2732
|
if (ev === "add") {
|
|
2708
|
-
|
|
2733
|
+
_chunkVB7P66Q4cjs.invalidateFailedFarmDevModules.call(void 0, server);
|
|
2709
2734
|
}
|
|
2710
2735
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
2711
2736
|
const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
|
|
@@ -2721,7 +2746,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2721
2746
|
scheduleTypeArtifactGen(file, ev, typeArtifacts);
|
|
2722
2747
|
}
|
|
2723
2748
|
if (isI18nCatalogFile(file)) {
|
|
2724
|
-
_optionalChain([farmApp, 'optionalAccess', _175 => _175.getI18nRuntime, 'call', _176 => _176(), 'access', _177 => _177.reload, 'call', _178 => _178(), 'access', _179 => _179.then, 'call', _180 => _180(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _181 => _181.catch, 'call', _182 => _182((error) =>
|
|
2749
|
+
_optionalChain([farmApp, 'optionalAccess', _175 => _175.getI18nRuntime, 'call', _176 => _176(), 'access', _177 => _177.reload, 'call', _178 => _178(), 'access', _179 => _179.then, 'call', _180 => _180(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _181 => _181.catch, 'call', _182 => _182((error) => _chunk7ZDLE77Pcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
|
|
2725
2750
|
}
|
|
2726
2751
|
const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || polyroute && isApiRouteFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
|
|
2727
2752
|
if (isRouteRefreshEvent) {
|
|
@@ -2739,7 +2764,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2739
2764
|
if (pendingRouteReloads.size === 1)
|
|
2740
2765
|
server.ws.send({ type: "full-reload", path: "*" });
|
|
2741
2766
|
} catch (error) {
|
|
2742
|
-
|
|
2767
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2743
2768
|
`Route refresh failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2744
2769
|
);
|
|
2745
2770
|
} finally {
|
|
@@ -2751,7 +2776,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2751
2776
|
}
|
|
2752
2777
|
});
|
|
2753
2778
|
});
|
|
2754
|
-
const appDirs =
|
|
2779
|
+
const appDirs = _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, farmConfig);
|
|
2755
2780
|
const routeManager = farmApp.getRouteManager();
|
|
2756
2781
|
const discoveredRoutes = [];
|
|
2757
2782
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
@@ -2778,10 +2803,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2778
2803
|
layoutCount: discoveredRoutes.filter((r) => r.kind === "layout").length
|
|
2779
2804
|
});
|
|
2780
2805
|
}
|
|
2781
|
-
const dispatchToDevServer =
|
|
2806
|
+
const dispatchToDevServer = _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server);
|
|
2782
2807
|
if (options.mobileClient) {
|
|
2783
2808
|
const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
|
|
2784
|
-
const load = (file) =>
|
|
2809
|
+
const load = (file) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, file);
|
|
2785
2810
|
globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
|
|
2786
2811
|
_optionalChain([server, 'access', _186 => _186.httpServer, 'optionalAccess', _187 => _187.once, 'call', _188 => _188("close", () => {
|
|
2787
2812
|
const globals = globalThis;
|
|
@@ -2790,7 +2815,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2790
2815
|
}
|
|
2791
2816
|
})]);
|
|
2792
2817
|
}
|
|
2793
|
-
apiRouteManager = new (0,
|
|
2818
|
+
apiRouteManager = new (0, _chunk5BZ7PR3Tcjs.APIRouteManager)(appDirs, server, {
|
|
2794
2819
|
plugins: farmConfig.plugins,
|
|
2795
2820
|
i18n: farmApp.getI18nRuntime(),
|
|
2796
2821
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -2799,7 +2824,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2799
2824
|
// so the endpoint's middleware and integration guards run for it, as in production.
|
|
2800
2825
|
dispatch: (request) => {
|
|
2801
2826
|
const url = new URL(request.url);
|
|
2802
|
-
url.pathname =
|
|
2827
|
+
url.pathname = _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, url.pathname, farmConfig.basePath);
|
|
2803
2828
|
return dispatchToDevServer(new Request(url, request));
|
|
2804
2829
|
}
|
|
2805
2830
|
});
|
|
@@ -2814,17 +2839,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2814
2839
|
discoveredWorkflows = await discoverFarmWorkflows(
|
|
2815
2840
|
{ ...farmConfig, workflows: workflowConfig },
|
|
2816
2841
|
{
|
|
2817
|
-
loadModule: async (filePath) =>
|
|
2842
|
+
loadModule: async (filePath) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, filePath)
|
|
2818
2843
|
}
|
|
2819
2844
|
);
|
|
2820
2845
|
if (discoveredWorkflows.length > 0) {
|
|
2821
2846
|
workflowHandler = createFarmWorkflowRequestHandler({
|
|
2822
2847
|
workflows: discoveredWorkflows,
|
|
2823
2848
|
config: workflowConfig,
|
|
2824
|
-
loadModule: async (workflow) =>
|
|
2849
|
+
loadModule: async (workflow) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
|
|
2825
2850
|
server: farmConfig.server
|
|
2826
2851
|
});
|
|
2827
|
-
|
|
2852
|
+
_chunk7ZDLE77Pcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
|
|
2828
2853
|
}
|
|
2829
2854
|
}
|
|
2830
2855
|
if (pm) {
|
|
@@ -2836,7 +2861,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2836
2861
|
});
|
|
2837
2862
|
}
|
|
2838
2863
|
}
|
|
2839
|
-
middlewareManager = new (0,
|
|
2864
|
+
middlewareManager = new (0, _chunkHF3JJPH4cjs.MiddlewareManager)(
|
|
2840
2865
|
appDirs,
|
|
2841
2866
|
server,
|
|
2842
2867
|
farmConfig.middleware,
|
|
@@ -2880,19 +2905,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2880
2905
|
await openAPIManager.invalidateCache();
|
|
2881
2906
|
}
|
|
2882
2907
|
if (process.env.FARM_VERBOSE) {
|
|
2883
|
-
|
|
2908
|
+
_chunk7ZDLE77Pcjs.logger.info(`Refreshed routes: ${reason}`);
|
|
2884
2909
|
}
|
|
2885
2910
|
};
|
|
2886
|
-
const farmDocsFontAssetList = farmDocsDevRuntime ?
|
|
2911
|
+
const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
|
|
2887
2912
|
const resolveDocsLayoutFonts = async (pathname) => {
|
|
2888
2913
|
const layouts = routeManager.matchRoute(pathname).layouts;
|
|
2889
2914
|
const layoutModules = await Promise.all(
|
|
2890
2915
|
layouts.map((layout) => routeManager.loadLayoutModule(layout.modulePath))
|
|
2891
2916
|
);
|
|
2892
|
-
return
|
|
2917
|
+
return _chunkSIQPXYBBcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
2893
2918
|
};
|
|
2894
2919
|
releaseDocsMCPServers();
|
|
2895
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
2920
|
+
const isFarmDocsPathGuarded = (href) => _chunkIGBQSUT5cjs.farmPathGuardCoversPage.call(void 0,
|
|
2896
2921
|
{
|
|
2897
2922
|
config: farmConfig,
|
|
2898
2923
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2906,7 +2931,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2906
2931
|
rendererServer: farmConfig.renderer.server,
|
|
2907
2932
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2908
2933
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2909
|
-
globalStylesheetHref:
|
|
2934
|
+
globalStylesheetHref: _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2910
2935
|
farmConfig.root,
|
|
2911
2936
|
farmConfig.srcDir
|
|
2912
2937
|
),
|
|
@@ -2919,10 +2944,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2919
2944
|
_url.pathToFileURL.call(void 0, file).href
|
|
2920
2945
|
);
|
|
2921
2946
|
}
|
|
2922
|
-
return
|
|
2947
|
+
return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _197 => _197.id]), () => ( specifier)));
|
|
2923
2948
|
},
|
|
2924
2949
|
registerMCPServer: (mcpServer) => {
|
|
2925
|
-
const dispose =
|
|
2950
|
+
const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
|
|
2926
2951
|
docsMCPServerDisposers.add(dispose);
|
|
2927
2952
|
return () => {
|
|
2928
2953
|
docsMCPServerDisposers.delete(dispose);
|
|
@@ -2934,10 +2959,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2934
2959
|
root: farmConfig.root,
|
|
2935
2960
|
srcDir: farmConfig.srcDir,
|
|
2936
2961
|
clientEntry: "/@farm/client.js",
|
|
2937
|
-
fontAssets:
|
|
2962
|
+
fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
2938
2963
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2939
2964
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2940
|
-
globalStylesheetHref:
|
|
2965
|
+
globalStylesheetHref: _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
2941
2966
|
farmConfig.root,
|
|
2942
2967
|
farmConfig.srcDir
|
|
2943
2968
|
),
|
|
@@ -2957,7 +2982,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2957
2982
|
}).then(
|
|
2958
2983
|
(pages) => new Set(pages),
|
|
2959
2984
|
(error) => {
|
|
2960
|
-
|
|
2985
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2961
2986
|
`Farm Infra analytics reports docs pages by the docs route, not each page's path: listing them failed (${error instanceof Error ? error.message : String(error)}).`
|
|
2962
2987
|
);
|
|
2963
2988
|
return void 0;
|
|
@@ -2974,17 +2999,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2974
2999
|
}
|
|
2975
3000
|
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _202 => _202.getPlugins, 'call', _203 => _203(), 'access', _204 => _204.find, 'call', _205 => _205((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
2976
3001
|
if (farmInfraAnalyticsPlugin) {
|
|
2977
|
-
|
|
3002
|
+
_chunkMBDDLYT5cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
2978
3003
|
if (farmDocsDevRuntime) {
|
|
2979
|
-
const label =
|
|
2980
|
-
|
|
3004
|
+
const label = _chunkC4DZAEVTcjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
3005
|
+
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
2981
3006
|
{
|
|
2982
3007
|
path: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.entry]) || "/docs",
|
|
2983
3008
|
roots: _optionalChain([farmConfig, 'access', _208 => _208.docs, 'optionalAccess', _209 => _209.roots, 'optionalAccess', _210 => _210.map, 'call', _211 => _211((root) => root.entry)]),
|
|
2984
3009
|
pages: await getFarmDocsPagePaths()
|
|
2985
3010
|
}
|
|
2986
3011
|
);
|
|
2987
|
-
if (label) return
|
|
3012
|
+
if (label) return _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
2988
3013
|
}
|
|
2989
3014
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
2990
3015
|
return { pathname, pattern: _optionalChain([match, 'access', _212 => _212.route, 'optionalAccess', _213 => _213.pattern]) || null };
|
|
@@ -2998,7 +3023,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2998
3023
|
server.watcher.add(docsContentDirs);
|
|
2999
3024
|
for (const event of ["add", "change", "unlink"]) {
|
|
3000
3025
|
server.watcher.on(event, (file) => {
|
|
3001
|
-
const normalizedFile =
|
|
3026
|
+
const normalizedFile = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, file);
|
|
3002
3027
|
if (appDirSlugs.some((appDir) => normalizedFile.startsWith(`${appDir}/`))) return;
|
|
3003
3028
|
const contentDirs = docsContentDirs.filter(
|
|
3004
3029
|
(contentDir) => farmDocsDevRuntime.isFarmDocsContentFile(contentDir, file)
|
|
@@ -3009,7 +3034,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3009
3034
|
}
|
|
3010
3035
|
logUpdate(
|
|
3011
3036
|
"PAGE",
|
|
3012
|
-
`${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${
|
|
3037
|
+
`${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.relative(farmConfig.root, file))}`
|
|
3013
3038
|
);
|
|
3014
3039
|
server.ws.send({ type: "full-reload", path: "*" });
|
|
3015
3040
|
});
|
|
@@ -3036,7 +3061,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3036
3061
|
return;
|
|
3037
3062
|
}
|
|
3038
3063
|
logResponse.__last = { key: dedupeKey, ts: now };
|
|
3039
|
-
const pc =
|
|
3064
|
+
const pc = _chunkCH2JX3CMcjs.createCliColors.call(void 0, );
|
|
3040
3065
|
let statusColor = pc.green;
|
|
3041
3066
|
if (status >= 500) statusColor = pc.red;
|
|
3042
3067
|
else if (status >= 400) statusColor = pc.yellow;
|
|
@@ -3063,8 +3088,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3063
3088
|
},
|
|
3064
3089
|
(request) => {
|
|
3065
3090
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
|
|
3066
|
-
const currentServerConfig =
|
|
3067
|
-
return
|
|
3091
|
+
const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
3092
|
+
return _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request, {
|
|
3068
3093
|
trustProxy: currentServerConfig.trustProxy
|
|
3069
3094
|
});
|
|
3070
3095
|
}
|
|
@@ -3079,8 +3104,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3079
3104
|
const requestUrl = req.url || "/";
|
|
3080
3105
|
const requestMethod = req.method || "GET";
|
|
3081
3106
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _216 => _216.getConfig, 'call', _217 => _217()]), () => ( options));
|
|
3082
|
-
const currentServerConfig =
|
|
3083
|
-
const parsedRequestUrl =
|
|
3107
|
+
const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
3108
|
+
const parsedRequestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
3084
3109
|
trustProxy: currentServerConfig.trustProxy
|
|
3085
3110
|
});
|
|
3086
3111
|
const fullUrl = parsedRequestUrl.toString();
|
|
@@ -3101,7 +3126,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3101
3126
|
}
|
|
3102
3127
|
}
|
|
3103
3128
|
if (requestMethod === "OPTIONS" && req.headers.origin && req.headers["access-control-request-method"]) {
|
|
3104
|
-
const preflightHeaders =
|
|
3129
|
+
const preflightHeaders = _chunkQZRFEHMScjs.resolveRouteRuleCorsPreflightHeaders.call(void 0,
|
|
3105
3130
|
currentConfig.routeRules,
|
|
3106
3131
|
requestPathname
|
|
3107
3132
|
);
|
|
@@ -3116,14 +3141,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3116
3141
|
createRequestFromNodeRequest(req, new URL(fullUrl))
|
|
3117
3142
|
);
|
|
3118
3143
|
if (imageResponse) {
|
|
3119
|
-
await
|
|
3144
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, imageResponse);
|
|
3120
3145
|
return;
|
|
3121
3146
|
}
|
|
3122
3147
|
}
|
|
3123
3148
|
if (pm && requestMethod !== "GET" && requestMethod !== "HEAD" && pm._hasRuntimeEndpoint(requestPathname)) {
|
|
3124
3149
|
let body;
|
|
3125
3150
|
try {
|
|
3126
|
-
body = await
|
|
3151
|
+
body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
3127
3152
|
} catch (error) {
|
|
3128
3153
|
res.statusCode = _nullishCoalesce(error.status, () => ( 400));
|
|
3129
3154
|
res.end();
|
|
@@ -3142,13 +3167,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3142
3167
|
sendFarmDevRuntimeHookError(res, true);
|
|
3143
3168
|
return;
|
|
3144
3169
|
}
|
|
3145
|
-
await
|
|
3170
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3146
3171
|
return;
|
|
3147
3172
|
}
|
|
3148
|
-
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname ===
|
|
3173
|
+
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3149
3174
|
res.statusCode = 200;
|
|
3150
3175
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3151
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3176
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunkUBH2OARScjs.FARM_VIDEO_PLAYER_HTML);
|
|
3152
3177
|
return;
|
|
3153
3178
|
}
|
|
3154
3179
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3160,7 +3185,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3160
3185
|
else fs2.createReadStream(farmDocsFontPath).pipe(res);
|
|
3161
3186
|
return;
|
|
3162
3187
|
}
|
|
3163
|
-
if (requestMethod === "GET" && (requestPathname ===
|
|
3188
|
+
if (requestMethod === "GET" && (requestPathname === _chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH || requestPathname === `${_chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH}.json`)) {
|
|
3164
3189
|
if (!farmConfig.devtools.enabled) {
|
|
3165
3190
|
res.statusCode = 404;
|
|
3166
3191
|
res.setHeader("Content-Type", "text/plain; charset=utf-8");
|
|
@@ -3168,19 +3193,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3168
3193
|
res.end("Farm DevTools are disabled.");
|
|
3169
3194
|
return;
|
|
3170
3195
|
}
|
|
3171
|
-
if (requestPathname ===
|
|
3196
|
+
if (requestPathname === _chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH && parsedRequestUrl.searchParams.get("embedded") !== "1" && !rendererDisabled) {
|
|
3172
3197
|
let launchUrl = new URL(farmConfig.basePath || "/", parsedRequestUrl.origin);
|
|
3173
3198
|
const referrer = req.headers.referer;
|
|
3174
3199
|
if (referrer) {
|
|
3175
3200
|
try {
|
|
3176
3201
|
const referrerUrl = new URL(referrer);
|
|
3177
|
-
if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(
|
|
3202
|
+
if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(_chunkRQSPBWXJcjs.FARM_DEVTOOLS_PATH)) {
|
|
3178
3203
|
launchUrl = referrerUrl;
|
|
3179
3204
|
}
|
|
3180
3205
|
} catch (e23) {
|
|
3181
3206
|
}
|
|
3182
3207
|
}
|
|
3183
|
-
launchUrl.searchParams.set(
|
|
3208
|
+
launchUrl.searchParams.set(_chunkRQSPBWXJcjs.FARM_DEVTOOLS_LAUNCH_PARAM, "1");
|
|
3184
3209
|
res.statusCode = 302;
|
|
3185
3210
|
res.setHeader(
|
|
3186
3211
|
"Location",
|
|
@@ -3216,7 +3241,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3216
3241
|
} else {
|
|
3217
3242
|
if (!warnedDeprecatedDevtoolsDashboard) {
|
|
3218
3243
|
warnedDeprecatedDevtoolsDashboard = true;
|
|
3219
|
-
|
|
3244
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
3220
3245
|
"The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
|
|
3221
3246
|
);
|
|
3222
3247
|
}
|
|
@@ -3227,7 +3252,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3227
3252
|
}
|
|
3228
3253
|
const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
|
|
3229
3254
|
const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
|
|
3230
|
-
const runtimeHookErrorAnswersJSON = rendererDisabled ||
|
|
3255
|
+
const runtimeHookErrorAnswersJSON = rendererDisabled || _chunk5P3TZGS3cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
|
|
3231
3256
|
const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
|
|
3232
3257
|
let pageHookRouteMatch;
|
|
3233
3258
|
const pageHookRoute = () => {
|
|
@@ -3276,13 +3301,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3276
3301
|
};
|
|
3277
3302
|
const meetsRequestedURLRoutes = configRewriteSource === void 0 && !deferredDottedRequests.has(req);
|
|
3278
3303
|
const routeRedirect = meetsRequestedURLRoutes ? farmApp.getRouteManager().matchRedirect(requestPathname, parsedRequestUrl.search) : null;
|
|
3279
|
-
if (meetsRequestedURLRoutes && (routeRedirect || pm && (configRoutePlugins.has(
|
|
3304
|
+
if (meetsRequestedURLRoutes && (routeRedirect || pm && (configRoutePlugins.has(_chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME) || configRedirectMatchers.length > 0)) && !isViteOwnedRequest()) {
|
|
3280
3305
|
let redirect = routeRedirect;
|
|
3281
3306
|
try {
|
|
3282
3307
|
if (pm) {
|
|
3283
3308
|
await pm.runHookParallelFiltered(
|
|
3284
3309
|
"beforeRequest",
|
|
3285
|
-
(plugin2) => plugin2.name ===
|
|
3310
|
+
(plugin2) => plugin2.name === _chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
|
|
3286
3311
|
req,
|
|
3287
3312
|
res
|
|
3288
3313
|
);
|
|
@@ -3308,7 +3333,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3308
3333
|
const redirectResponse = response;
|
|
3309
3334
|
try {
|
|
3310
3335
|
const metadataRoute = matchAppMetadataRoute(requestPathname);
|
|
3311
|
-
const kind = metadataRoute ? "asset" :
|
|
3336
|
+
const kind = metadataRoute ? "asset" : _chunk5P3TZGS3cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
|
|
3312
3337
|
response = await pm.runRuntimeRequest(
|
|
3313
3338
|
createRequestFromNodeRequest(req, parsedRequestUrl),
|
|
3314
3339
|
async () => {
|
|
@@ -3323,7 +3348,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3323
3348
|
return;
|
|
3324
3349
|
}
|
|
3325
3350
|
}
|
|
3326
|
-
await
|
|
3351
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3327
3352
|
logResponse(requestMethod, requestUrl, res.statusCode, 0, "PAGE");
|
|
3328
3353
|
return;
|
|
3329
3354
|
}
|
|
@@ -3363,7 +3388,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3363
3388
|
return 500;
|
|
3364
3389
|
}
|
|
3365
3390
|
}
|
|
3366
|
-
await
|
|
3391
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3367
3392
|
return response.status;
|
|
3368
3393
|
};
|
|
3369
3394
|
const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
|
|
@@ -3422,15 +3447,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3422
3447
|
sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3423
3448
|
return;
|
|
3424
3449
|
}
|
|
3425
|
-
await
|
|
3450
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, runtimeResponse);
|
|
3426
3451
|
};
|
|
3427
3452
|
let runtimeSession2;
|
|
3428
3453
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3429
3454
|
try {
|
|
3430
|
-
const routePathname =
|
|
3431
|
-
const route =
|
|
3455
|
+
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3456
|
+
const route = _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
|
|
3432
3457
|
{ pathname: requestPathname },
|
|
3433
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3458
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkC4DZAEVTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3434
3459
|
);
|
|
3435
3460
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3436
3461
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3472,7 +3497,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3472
3497
|
);
|
|
3473
3498
|
} catch (error) {
|
|
3474
3499
|
if (!responding && !res.headersSent) {
|
|
3475
|
-
|
|
3500
|
+
_chunk7ZDLE77Pcjs.logger.error(`Middleware error: ${error}`);
|
|
3476
3501
|
await discard();
|
|
3477
3502
|
await sendMiddlewareErrorJSON(runtimeSession2, error);
|
|
3478
3503
|
return;
|
|
@@ -3485,9 +3510,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3485
3510
|
}
|
|
3486
3511
|
if (!response) return;
|
|
3487
3512
|
if (runtimeSession2) await sendRuntimeResponse(runtimeSession2, response);
|
|
3488
|
-
else await
|
|
3513
|
+
else await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3489
3514
|
};
|
|
3490
|
-
const openAPIRequestPathname = openAPIManager ?
|
|
3515
|
+
const openAPIRequestPathname = openAPIManager ? _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
3491
3516
|
if (openAPIManager && _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
3492
3517
|
const specManager = openAPIManager;
|
|
3493
3518
|
await serveBuiltInRoute(async () => {
|
|
@@ -3519,8 +3544,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3519
3544
|
);
|
|
3520
3545
|
return;
|
|
3521
3546
|
}
|
|
3522
|
-
if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false &&
|
|
3523
|
-
const manifestGuardCoversPath = (path7) =>
|
|
3547
|
+
if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false && _chunkC4DZAEVTcjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3548
|
+
const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3524
3549
|
{
|
|
3525
3550
|
config: farmConfig,
|
|
3526
3551
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -3529,25 +3554,25 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3529
3554
|
apiServerBasePath
|
|
3530
3555
|
);
|
|
3531
3556
|
await serveBuiltInRoute(async () => {
|
|
3532
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3533
|
-
const manifest = await
|
|
3557
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkUBH2OARScjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3558
|
+
const manifest = await _chunkC4DZAEVTcjs.createFarmAppManifestResponse.call(void 0,
|
|
3534
3559
|
new Request(parsedRequestUrl, {
|
|
3535
3560
|
method: requestMethod,
|
|
3536
3561
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3537
3562
|
}),
|
|
3538
3563
|
{
|
|
3539
|
-
...
|
|
3564
|
+
..._chunkC4DZAEVTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3540
3565
|
build: "development",
|
|
3541
3566
|
packages: farmAppPackages,
|
|
3542
3567
|
// Read again on each request; unchanged files come from a cache.
|
|
3543
|
-
webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ?
|
|
3568
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ? _chunkUBH2OARScjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3544
3569
|
}),
|
|
3545
3570
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3546
3571
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
3547
3572
|
guardCoversPath: manifestGuardCoversPath,
|
|
3548
3573
|
// A docs runtime's MCP server lists its tools when asked, read on each request.
|
|
3549
3574
|
...farmDocsHandler ? {
|
|
3550
|
-
registeredMCP: (request) =>
|
|
3575
|
+
registeredMCP: (request) => _chunkW4KSV6GXcjs._listFarmRegisteredMCPServerTools.call(void 0, farmDocsHandler, request, {
|
|
3551
3576
|
basePath: farmConfig.basePath,
|
|
3552
3577
|
guardCoversPath: manifestGuardCoversPath
|
|
3553
3578
|
})
|
|
@@ -3558,11 +3583,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3558
3583
|
});
|
|
3559
3584
|
return;
|
|
3560
3585
|
}
|
|
3561
|
-
if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) &&
|
|
3586
|
+
if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkC4DZAEVTcjs.FARM_API_CATALOG_PATH) {
|
|
3562
3587
|
await serveBuiltInRoute(
|
|
3563
|
-
() =>
|
|
3588
|
+
() => _chunkC4DZAEVTcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3564
3589
|
requestMethod,
|
|
3565
|
-
|
|
3590
|
+
_chunkC4DZAEVTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3566
3591
|
new Request(parsedRequestUrl, {
|
|
3567
3592
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3568
3593
|
})
|
|
@@ -3571,7 +3596,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3571
3596
|
return;
|
|
3572
3597
|
}
|
|
3573
3598
|
if (_optionalChain([options, 'access', _255 => _255.agent, 'optionalAccess', _256 => _256.aiCatalog]) !== false) {
|
|
3574
|
-
const aiCatalog =
|
|
3599
|
+
const aiCatalog = _chunkC4DZAEVTcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3575
3600
|
new Request(parsedRequestUrl, {
|
|
3576
3601
|
method: requestMethod,
|
|
3577
3602
|
headers: {
|
|
@@ -3611,9 +3636,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3611
3636
|
method: requestMethod,
|
|
3612
3637
|
headers: docsHeaders
|
|
3613
3638
|
});
|
|
3614
|
-
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body:
|
|
3639
|
+
const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
|
|
3615
3640
|
const docsHandlerRequest = new Request(docsRequest, docsBodyInit);
|
|
3616
|
-
const registeredMCPCalls = await
|
|
3641
|
+
const registeredMCPCalls = await _chunkW4KSV6GXcjs._readFarmRegisteredMCPCalls.call(void 0,
|
|
3617
3642
|
docsHandlerRequest,
|
|
3618
3643
|
farmConfig.basePath
|
|
3619
3644
|
);
|
|
@@ -3627,20 +3652,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3627
3652
|
docsRequest,
|
|
3628
3653
|
docsResponse
|
|
3629
3654
|
);
|
|
3630
|
-
return
|
|
3655
|
+
return _chunkIBZW57NWcjs._runWithCurrentRequest.call(void 0,
|
|
3631
3656
|
request,
|
|
3632
|
-
() =>
|
|
3657
|
+
() => _chunkW4KSV6GXcjs._observeFarmRegisteredMCPResponse.call(void 0, response, registeredMCPCalls)
|
|
3633
3658
|
);
|
|
3634
3659
|
}
|
|
3635
|
-
const deploymentMismatch =
|
|
3660
|
+
const deploymentMismatch = _chunkVIDUNAQEcjs.getFarmDeploymentMismatch.call(void 0,
|
|
3636
3661
|
request,
|
|
3637
3662
|
farmConfig.deploymentId
|
|
3638
3663
|
);
|
|
3639
3664
|
if (deploymentMismatch) {
|
|
3640
3665
|
await _optionalChain([docsResponse, 'access', _264 => _264.body, 'optionalAccess', _265 => _265.cancel, 'call', _266 => _266()]);
|
|
3641
|
-
return
|
|
3666
|
+
return _chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
|
|
3642
3667
|
}
|
|
3643
|
-
const page =
|
|
3668
|
+
const page = _chunkSWOJU7LIcjs._withFarmResponseHeaders.call(void 0,
|
|
3644
3669
|
await wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse),
|
|
3645
3670
|
(headers) => {
|
|
3646
3671
|
const vary = (_nullishCoalesce(headers.get("Vary"), () => ( ""))).split(",").map((value) => value.trim()).filter(Boolean);
|
|
@@ -3649,7 +3674,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3649
3674
|
}
|
|
3650
3675
|
}
|
|
3651
3676
|
);
|
|
3652
|
-
return
|
|
3677
|
+
return _chunkVIDUNAQEcjs.withFarmDeploymentResponse.call(void 0, page, farmConfig.deploymentId, {
|
|
3653
3678
|
setCookie: request.method.toUpperCase() === "GET",
|
|
3654
3679
|
cookiePath: farmConfig.basePath || "/",
|
|
3655
3680
|
secureCookie: new URL(request.url).protocol === "https:"
|
|
@@ -3658,8 +3683,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3658
3683
|
{
|
|
3659
3684
|
kind: "docs",
|
|
3660
3685
|
computed: docsResponse,
|
|
3661
|
-
label:
|
|
3662
|
-
|
|
3686
|
+
label: _chunkC4DZAEVTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3687
|
+
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3663
3688
|
{
|
|
3664
3689
|
path: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.entry]) || "/docs",
|
|
3665
3690
|
roots: _optionalChain([farmConfig, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.roots, 'optionalAccess', _271 => _271.map, 'call', _272 => _272((root) => root.entry)]),
|
|
@@ -3671,9 +3696,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3671
3696
|
return;
|
|
3672
3697
|
}
|
|
3673
3698
|
}
|
|
3674
|
-
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _273 => _273.headers, 'access', _274 => _274.accept, 'optionalAccess', _275 => _275.includes, 'call', _276 => _276(
|
|
3675
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
3676
|
-
const treeBodyInit = requestMethod === "POST" ? { body:
|
|
3699
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _273 => _273.headers, 'access', _274 => _274.accept, 'optionalAccess', _275 => _275.includes, 'call', _276 => _276(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
3700
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-PHCV43W4.cjs");
|
|
3701
|
+
const treeBodyInit = requestMethod === "POST" ? { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
|
|
3677
3702
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
3678
3703
|
request: new Request(fullUrl, {
|
|
3679
3704
|
method: requestMethod,
|
|
@@ -3681,26 +3706,26 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3681
3706
|
...treeBodyInit
|
|
3682
3707
|
}),
|
|
3683
3708
|
// As for the Markdown mirror: this server's own listener, redirects not followed.
|
|
3684
|
-
renderPage: (request) =>
|
|
3709
|
+
renderPage: (request) => _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3685
3710
|
new Request(request, {
|
|
3686
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3711
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3687
3712
|
})
|
|
3688
3713
|
)
|
|
3689
3714
|
});
|
|
3690
3715
|
await serveBuiltInRoute(() => treeResponse, {
|
|
3691
3716
|
computed: treeResponse,
|
|
3692
|
-
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(
|
|
3717
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern]), () => ( null))
|
|
3693
3718
|
});
|
|
3694
3719
|
return;
|
|
3695
3720
|
}
|
|
3696
3721
|
const markdownRouteLabel = () => (
|
|
3697
3722
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3698
|
-
|
|
3723
|
+
_chunkC4DZAEVTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3699
3724
|
toRoutePathname(requestPathname),
|
|
3700
3725
|
(page) => _optionalChain([farmApp, 'access', _283 => _283.getRouteManager, 'call', _284 => _284(), 'access', _285 => _285.matchRoute, 'call', _286 => _286(page), 'access', _287 => _287.route, 'optionalAccess', _288 => _288.pattern])
|
|
3701
3726
|
)
|
|
3702
3727
|
);
|
|
3703
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
3728
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunk27IPPPCVcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
3704
3729
|
request: new Request(fullUrl, {
|
|
3705
3730
|
method: requestMethod,
|
|
3706
3731
|
headers: docsHeaders
|
|
@@ -3709,28 +3734,28 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3709
3734
|
routePathname: toRoutePathname,
|
|
3710
3735
|
resolveSource: async (pathname2) => {
|
|
3711
3736
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
3712
|
-
const sourcePath = _optionalChain([match, 'access', _289 => _289.route, 'optionalAccess', _290 => _290.markdownSourcePath]) || (match.route &&
|
|
3737
|
+
const sourcePath = _optionalChain([match, 'access', _289 => _289.route, 'optionalAccess', _290 => _290.markdownSourcePath]) || (match.route && _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
3713
3738
|
if (!sourcePath) {
|
|
3714
3739
|
return null;
|
|
3715
3740
|
}
|
|
3716
3741
|
return {
|
|
3717
3742
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3718
3743
|
// Project-relative, as production sends it: never the machine's path.
|
|
3719
|
-
filePath:
|
|
3744
|
+
filePath: _chunkUBH2OARScjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3720
3745
|
};
|
|
3721
3746
|
},
|
|
3722
3747
|
// The anonymous check goes through this server, so its guards and
|
|
3723
3748
|
// middleware see the page's own path, as in production. It connects to
|
|
3724
3749
|
// this server's own listener, never the host the caller's Host names. The
|
|
3725
3750
|
// page is asked for at the URL it answers at, not through the trailing-slash 308.
|
|
3726
|
-
renderPage: async (request) =>
|
|
3751
|
+
renderPage: async (request) => _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3727
3752
|
new Request(
|
|
3728
|
-
|
|
3753
|
+
_chunk6FIY4KBCcjs.toFarmTrailingSlashPageRequest.call(void 0,
|
|
3729
3754
|
request,
|
|
3730
3755
|
farmApp.getConfig().trailingSlash === true
|
|
3731
3756
|
),
|
|
3732
3757
|
{
|
|
3733
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3758
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3734
3759
|
}
|
|
3735
3760
|
)
|
|
3736
3761
|
)
|
|
@@ -3742,7 +3767,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3742
3767
|
});
|
|
3743
3768
|
return;
|
|
3744
3769
|
}
|
|
3745
|
-
const markdownResponse = viteModuleRequest ? null : await
|
|
3770
|
+
const markdownResponse = viteModuleRequest ? null : await _chunkU2HFXURZcjs.createMarkdownMirrorResponse.call(void 0, {
|
|
3746
3771
|
request: new Request(fullUrl, {
|
|
3747
3772
|
method: requestMethod,
|
|
3748
3773
|
headers: docsHeaders
|
|
@@ -3757,9 +3782,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3757
3782
|
renderPage: async (request) => {
|
|
3758
3783
|
const headers = new Headers(request.headers);
|
|
3759
3784
|
headers.delete("accept-encoding");
|
|
3760
|
-
return
|
|
3785
|
+
return _chunkSZBBBLLScjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
3761
3786
|
new Request(
|
|
3762
|
-
|
|
3787
|
+
_chunk6FIY4KBCcjs.toFarmTrailingSlashPageRequest.call(void 0,
|
|
3763
3788
|
request,
|
|
3764
3789
|
farmApp.getConfig().trailingSlash === true
|
|
3765
3790
|
),
|
|
@@ -3767,7 +3792,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3767
3792
|
headers,
|
|
3768
3793
|
// Only accepted mirrors need disconnect listeners. An earlier
|
|
3769
3794
|
// close (for example while the docs handler ran) must also abort.
|
|
3770
|
-
signal: res.destroyed ? AbortSignal.abort() :
|
|
3795
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3771
3796
|
}
|
|
3772
3797
|
)
|
|
3773
3798
|
);
|
|
@@ -3781,16 +3806,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3781
3806
|
});
|
|
3782
3807
|
return;
|
|
3783
3808
|
}
|
|
3784
|
-
if (!viteModuleRequest &&
|
|
3785
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
3809
|
+
if (!viteModuleRequest && _chunkU2HFXURZcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
3810
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunk27IPPPCVcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
|
|
3786
3811
|
if (!markdownRoute.route) {
|
|
3787
3812
|
await serveBuiltInRoute(
|
|
3788
3813
|
() => new Response(
|
|
3789
|
-
|
|
3814
|
+
_chunkU2HFXURZcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
|
|
3790
3815
|
{
|
|
3791
3816
|
status: 404,
|
|
3792
3817
|
headers: {
|
|
3793
|
-
"Content-Type":
|
|
3818
|
+
"Content-Type": _chunkU2HFXURZcjs.FARM_MARKDOWN_CONTENT_TYPE,
|
|
3794
3819
|
"X-Farm-Markdown-Error": "404",
|
|
3795
3820
|
"Cache-Control": "no-store"
|
|
3796
3821
|
}
|
|
@@ -3800,7 +3825,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3800
3825
|
return;
|
|
3801
3826
|
}
|
|
3802
3827
|
}
|
|
3803
|
-
const markdownPageTarget =
|
|
3828
|
+
const markdownPageTarget = _chunkU2HFXURZcjs.resolveMarkdownMirrorTarget.call(void 0,
|
|
3804
3829
|
farmApp.getConfig().md,
|
|
3805
3830
|
requestPathname,
|
|
3806
3831
|
{
|
|
@@ -3825,15 +3850,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3825
3850
|
let workflowBody;
|
|
3826
3851
|
try {
|
|
3827
3852
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
3828
|
-
workflowBody = await
|
|
3853
|
+
workflowBody = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0,
|
|
3829
3854
|
req,
|
|
3830
3855
|
currentServerConfig.bodySizeLimit
|
|
3831
3856
|
);
|
|
3832
3857
|
}
|
|
3833
3858
|
} catch (error) {
|
|
3834
|
-
const response =
|
|
3859
|
+
const response = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3835
3860
|
if (!response) throw error;
|
|
3836
|
-
await
|
|
3861
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3837
3862
|
return;
|
|
3838
3863
|
}
|
|
3839
3864
|
const workflowResponse = await workflowHandler(
|
|
@@ -3841,17 +3866,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3841
3866
|
method: requestMethod,
|
|
3842
3867
|
headers: docsHeaders,
|
|
3843
3868
|
body: toRequestBody(workflowBody),
|
|
3844
|
-
signal:
|
|
3869
|
+
signal: _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3845
3870
|
})
|
|
3846
3871
|
);
|
|
3847
3872
|
if (workflowResponse) {
|
|
3848
|
-
await
|
|
3873
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, workflowResponse);
|
|
3849
3874
|
return;
|
|
3850
3875
|
}
|
|
3851
3876
|
}
|
|
3852
3877
|
const configuredIntegrations = currentConfig.integrations;
|
|
3853
3878
|
const tryConfiguredIntegrationRoute = async () => {
|
|
3854
|
-
const matchedRoute =
|
|
3879
|
+
const matchedRoute = _chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3855
3880
|
pathname: requestPathname,
|
|
3856
3881
|
method: requestMethod
|
|
3857
3882
|
});
|
|
@@ -3865,7 +3890,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3865
3890
|
await pm.runHookParallelFiltered(
|
|
3866
3891
|
"beforeRequest",
|
|
3867
3892
|
(plugin2) => {
|
|
3868
|
-
const owner =
|
|
3893
|
+
const owner = _chunkN4AM7Q34cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
|
|
3869
3894
|
return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _291 => _291.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
3870
3895
|
},
|
|
3871
3896
|
req,
|
|
@@ -3885,17 +3910,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3885
3910
|
}
|
|
3886
3911
|
let body;
|
|
3887
3912
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
3888
|
-
body = await
|
|
3913
|
+
body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
3889
3914
|
}
|
|
3890
3915
|
const integrationRequest = new Request(fullUrl, {
|
|
3891
3916
|
method: req.method,
|
|
3892
3917
|
headers,
|
|
3893
3918
|
body: toRequestBody(body),
|
|
3894
|
-
signal:
|
|
3919
|
+
signal: _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
3895
3920
|
});
|
|
3896
3921
|
const dispatchIntegration = async (request, runtime) => {
|
|
3897
3922
|
try {
|
|
3898
|
-
const result = await
|
|
3923
|
+
const result = await _chunkN4AM7Q34cjs.dispatchIntegrationRequest.call(void 0,
|
|
3899
3924
|
{
|
|
3900
3925
|
integration: matchedRoute.integration,
|
|
3901
3926
|
config: currentConfig,
|
|
@@ -3910,9 +3935,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3910
3935
|
}
|
|
3911
3936
|
return result;
|
|
3912
3937
|
} catch (error) {
|
|
3913
|
-
|
|
3938
|
+
_chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
|
|
3914
3939
|
await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
|
|
3915
|
-
return
|
|
3940
|
+
return _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
3916
3941
|
}
|
|
3917
3942
|
};
|
|
3918
3943
|
runtimeReportsErrors = Boolean(pm);
|
|
@@ -3928,12 +3953,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3928
3953
|
}
|
|
3929
3954
|
const duration = Date.now() - startTime2;
|
|
3930
3955
|
logResponse(requestMethod, requestUrl, response.status, duration, "API");
|
|
3931
|
-
await
|
|
3956
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
3932
3957
|
return true;
|
|
3933
3958
|
} catch (error) {
|
|
3934
|
-
const bodyErrorResponse =
|
|
3959
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
3935
3960
|
if (bodyErrorResponse) {
|
|
3936
|
-
await
|
|
3961
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
3937
3962
|
return true;
|
|
3938
3963
|
}
|
|
3939
3964
|
const duration = Date.now() - startTime2;
|
|
@@ -3946,23 +3971,23 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3946
3971
|
integration: matchedRoute.key
|
|
3947
3972
|
});
|
|
3948
3973
|
}
|
|
3949
|
-
|
|
3974
|
+
_chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
|
|
3950
3975
|
if (runtimeReportsErrors) {
|
|
3951
3976
|
if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
|
|
3952
3977
|
else if (!res.writableEnded) res.end();
|
|
3953
3978
|
} else if (!res.writableEnded) {
|
|
3954
3979
|
res.statusCode = 500;
|
|
3955
3980
|
res.setHeader("Content-Type", "application/json");
|
|
3956
|
-
res.end(
|
|
3981
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
3957
3982
|
}
|
|
3958
3983
|
return true;
|
|
3959
3984
|
}
|
|
3960
3985
|
};
|
|
3961
|
-
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(
|
|
3986
|
+
if (pm && configRewriteSource === void 0 && configRoutePlugins.has(_chunkQBMMQS25cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME)) {
|
|
3962
3987
|
const hasLocalDevRoute = () => {
|
|
3963
3988
|
const routeManager3 = farmApp.getRouteManager();
|
|
3964
3989
|
return Boolean(
|
|
3965
|
-
|
|
3990
|
+
_chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
3966
3991
|
pathname: requestPathname,
|
|
3967
3992
|
method: requestMethod
|
|
3968
3993
|
}) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
|
|
@@ -3971,7 +3996,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3971
3996
|
try {
|
|
3972
3997
|
await pm.runHookParallelFiltered(
|
|
3973
3998
|
"beforeRequest",
|
|
3974
|
-
(plugin2) => plugin2.name ===
|
|
3999
|
+
(plugin2) => plugin2.name === _chunkQBMMQS25cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
3975
4000
|
req,
|
|
3976
4001
|
res
|
|
3977
4002
|
);
|
|
@@ -3999,11 +4024,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3999
4024
|
}
|
|
4000
4025
|
const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
|
|
4001
4026
|
const hasMatchedApiRoute = Boolean(matchedApiRoute);
|
|
4002
|
-
if (hasMatchedApiRoute ||
|
|
4027
|
+
if (hasMatchedApiRoute || _chunk5P3TZGS3cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
|
|
4003
4028
|
const startTime2 = Date.now();
|
|
4004
4029
|
const method2 = req.method || "GET";
|
|
4005
4030
|
const urlPath2 = req.url || "/";
|
|
4006
|
-
const pathname2 =
|
|
4031
|
+
const pathname2 = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4007
4032
|
trustProxy: currentServerConfig.trustProxy
|
|
4008
4033
|
}).pathname;
|
|
4009
4034
|
try {
|
|
@@ -4025,10 +4050,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4025
4050
|
urlPath: urlPath2,
|
|
4026
4051
|
method: method2
|
|
4027
4052
|
});
|
|
4028
|
-
|
|
4053
|
+
_chunk7ZDLE77Pcjs.logger.error(`Request hook error: ${error}`);
|
|
4029
4054
|
res.statusCode = 500;
|
|
4030
4055
|
res.setHeader("Content-Type", "application/json");
|
|
4031
|
-
res.end(
|
|
4056
|
+
res.end(_chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
|
|
4032
4057
|
return;
|
|
4033
4058
|
}
|
|
4034
4059
|
const createAPIRequest = async () => {
|
|
@@ -4040,17 +4065,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4040
4065
|
}
|
|
4041
4066
|
let body;
|
|
4042
4067
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
4043
|
-
body = await
|
|
4068
|
+
body = await _chunk7GKZDRY2cjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
|
|
4044
4069
|
}
|
|
4045
4070
|
return new Request(
|
|
4046
|
-
|
|
4071
|
+
_chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4047
4072
|
trustProxy: currentServerConfig.trustProxy
|
|
4048
4073
|
}),
|
|
4049
4074
|
{
|
|
4050
4075
|
method: req.method,
|
|
4051
4076
|
headers,
|
|
4052
4077
|
body: toRequestBody(body),
|
|
4053
|
-
signal:
|
|
4078
|
+
signal: _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
4054
4079
|
}
|
|
4055
4080
|
);
|
|
4056
4081
|
};
|
|
@@ -4059,9 +4084,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4059
4084
|
);
|
|
4060
4085
|
const docsRuntimeOptions = () => ({
|
|
4061
4086
|
kind: "docs",
|
|
4062
|
-
route:
|
|
4087
|
+
route: _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
|
|
4063
4088
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4064
|
-
|
|
4089
|
+
_chunkC4DZAEVTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4065
4090
|
path: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.entry]) || "/docs",
|
|
4066
4091
|
roots: _optionalChain([farmConfig, 'access', _302 => _302.docs, 'optionalAccess', _303 => _303.roots, 'optionalAccess', _304 => _304.map, 'call', _305 => _305((root) => root.entry)])
|
|
4067
4092
|
})
|
|
@@ -4084,11 +4109,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4084
4109
|
runtimeSession2.response
|
|
4085
4110
|
);
|
|
4086
4111
|
logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
|
|
4087
|
-
await
|
|
4112
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
4088
4113
|
return;
|
|
4089
4114
|
}
|
|
4090
4115
|
} catch (error) {
|
|
4091
|
-
const bodyErrorResponse =
|
|
4116
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4092
4117
|
if (bodyErrorResponse) {
|
|
4093
4118
|
logResponse(
|
|
4094
4119
|
method2,
|
|
@@ -4097,10 +4122,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4097
4122
|
Date.now() - startTime2,
|
|
4098
4123
|
"API"
|
|
4099
4124
|
);
|
|
4100
|
-
await
|
|
4125
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4101
4126
|
return;
|
|
4102
4127
|
}
|
|
4103
|
-
|
|
4128
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4104
4129
|
sendFarmDevRuntimeHookError(res, true);
|
|
4105
4130
|
return;
|
|
4106
4131
|
}
|
|
@@ -4120,7 +4145,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4120
4145
|
if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
|
|
4121
4146
|
throw error;
|
|
4122
4147
|
}
|
|
4123
|
-
|
|
4148
|
+
_chunk7ZDLE77Pcjs.logger.error(`Middleware error: ${error}`);
|
|
4124
4149
|
const status = await sendMiddlewareErrorJSON(runtimeSession2, error);
|
|
4125
4150
|
logResponse(method2, urlPath2, status, Date.now() - startTime2, "API");
|
|
4126
4151
|
return;
|
|
@@ -4138,7 +4163,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4138
4163
|
(_request, runtime) => handler(request, runtime)
|
|
4139
4164
|
) : pm ? pm.runRuntimeRequest(request, handler, options2) : handler(request);
|
|
4140
4165
|
const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
|
|
4141
|
-
const routedPathname =
|
|
4166
|
+
const routedPathname = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4142
4167
|
trustProxy: currentServerConfig.trustProxy
|
|
4143
4168
|
}).pathname;
|
|
4144
4169
|
const rewritten = routedPathname !== pathname2;
|
|
@@ -4146,12 +4171,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4146
4171
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
4147
4172
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
4148
4173
|
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _306 => _306.route, 'access', _307 => _307.path]) || urlPath2;
|
|
4149
|
-
|
|
4174
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4150
4175
|
type: "route.matched",
|
|
4151
4176
|
pathname: pathname2,
|
|
4152
4177
|
route: apiRoutePattern
|
|
4153
4178
|
});
|
|
4154
|
-
|
|
4179
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4155
4180
|
type: "api.request.start",
|
|
4156
4181
|
pathname: pathname2,
|
|
4157
4182
|
route: apiRoutePattern,
|
|
@@ -4176,7 +4201,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4176
4201
|
try {
|
|
4177
4202
|
response = await apiHandler(handledRequest);
|
|
4178
4203
|
apiOutcomeReported = true;
|
|
4179
|
-
|
|
4204
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4180
4205
|
type: "api.request.complete",
|
|
4181
4206
|
pathname: pathname2,
|
|
4182
4207
|
route: apiRoutePattern,
|
|
@@ -4186,7 +4211,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4186
4211
|
});
|
|
4187
4212
|
} catch (error) {
|
|
4188
4213
|
apiOutcomeReported = true;
|
|
4189
|
-
|
|
4214
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4190
4215
|
type: "api.error",
|
|
4191
4216
|
pathname: pathname2,
|
|
4192
4217
|
route: apiRoutePattern,
|
|
@@ -4194,9 +4219,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4194
4219
|
durationMs: Date.now() - startTime2,
|
|
4195
4220
|
error
|
|
4196
4221
|
});
|
|
4197
|
-
|
|
4222
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4198
4223
|
await _optionalChain([runtime, 'optionalAccess', _308 => _308.reportError, 'call', _309 => _309(error)]);
|
|
4199
|
-
response =
|
|
4224
|
+
response = _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
4200
4225
|
}
|
|
4201
4226
|
return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
|
|
4202
4227
|
};
|
|
@@ -4209,12 +4234,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4209
4234
|
});
|
|
4210
4235
|
const duration = Date.now() - startTime2;
|
|
4211
4236
|
logResponse(method2, urlPath2, handledResponse.status, duration, "API");
|
|
4212
|
-
await
|
|
4237
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, handledResponse);
|
|
4213
4238
|
return;
|
|
4214
4239
|
} catch (error) {
|
|
4215
4240
|
const duration = Date.now() - startTime2;
|
|
4216
4241
|
if (!apiOutcomeReported) {
|
|
4217
|
-
|
|
4242
|
+
_chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
|
|
4218
4243
|
type: "api.error",
|
|
4219
4244
|
pathname: pathname2,
|
|
4220
4245
|
route: apiRoutePattern,
|
|
@@ -4223,13 +4248,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4223
4248
|
error
|
|
4224
4249
|
});
|
|
4225
4250
|
}
|
|
4226
|
-
const bodyErrorResponse =
|
|
4251
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4227
4252
|
if (bodyErrorResponse) {
|
|
4228
4253
|
logResponse(method2, urlPath2, bodyErrorResponse.status, duration, "API");
|
|
4229
|
-
await
|
|
4254
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4230
4255
|
return;
|
|
4231
4256
|
}
|
|
4232
|
-
|
|
4257
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4233
4258
|
sendFarmDevRuntimeHookError(res, true);
|
|
4234
4259
|
return;
|
|
4235
4260
|
}
|
|
@@ -4262,16 +4287,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4262
4287
|
if (docsResponse) {
|
|
4263
4288
|
const duration = Date.now() - startTime2;
|
|
4264
4289
|
logResponse(method2, urlPath2, docsResponse.status, duration, "API");
|
|
4265
|
-
await
|
|
4290
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, docsResponse);
|
|
4266
4291
|
return;
|
|
4267
4292
|
}
|
|
4268
4293
|
} catch (error) {
|
|
4269
|
-
const bodyErrorResponse =
|
|
4294
|
+
const bodyErrorResponse = _chunk7GKZDRY2cjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
4270
4295
|
if (bodyErrorResponse) {
|
|
4271
|
-
await
|
|
4296
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
|
|
4272
4297
|
return;
|
|
4273
4298
|
}
|
|
4274
|
-
|
|
4299
|
+
_chunk7ZDLE77Pcjs.logger.error(`Docs API route error: ${error}`);
|
|
4275
4300
|
sendFarmDevRuntimeHookError(res, true);
|
|
4276
4301
|
return;
|
|
4277
4302
|
}
|
|
@@ -4293,9 +4318,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4293
4318
|
})
|
|
4294
4319
|
);
|
|
4295
4320
|
logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
|
|
4296
|
-
await
|
|
4321
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
4297
4322
|
} catch (error) {
|
|
4298
|
-
|
|
4323
|
+
_chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
|
|
4299
4324
|
sendFarmDevRuntimeHookError(res, true);
|
|
4300
4325
|
}
|
|
4301
4326
|
return;
|
|
@@ -4321,16 +4346,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4321
4346
|
const request = createRequestFromNodeRequest(
|
|
4322
4347
|
req,
|
|
4323
4348
|
urlObj,
|
|
4324
|
-
|
|
4349
|
+
_chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
4325
4350
|
);
|
|
4326
|
-
const deploymentMismatch =
|
|
4351
|
+
const deploymentMismatch = _chunkVIDUNAQEcjs.getFarmDeploymentMismatch.call(void 0,
|
|
4327
4352
|
request,
|
|
4328
4353
|
farmConfig.deploymentId
|
|
4329
4354
|
);
|
|
4330
4355
|
if (deploymentMismatch) {
|
|
4331
|
-
await
|
|
4356
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
|
|
4332
4357
|
res,
|
|
4333
|
-
|
|
4358
|
+
_chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch)
|
|
4334
4359
|
);
|
|
4335
4360
|
return;
|
|
4336
4361
|
}
|
|
@@ -4396,7 +4421,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4396
4421
|
res.end(JSON.stringify({ error: "Route not found" }));
|
|
4397
4422
|
return;
|
|
4398
4423
|
}
|
|
4399
|
-
const trailingSlashLocation =
|
|
4424
|
+
const trailingSlashLocation = _chunk6FIY4KBCcjs.resolveFarmTrailingSlashRedirect.call(void 0,
|
|
4400
4425
|
targetRequestUrl,
|
|
4401
4426
|
farmApp.getConfig().trailingSlash === true
|
|
4402
4427
|
);
|
|
@@ -4415,7 +4440,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4415
4440
|
);
|
|
4416
4441
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4417
4442
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4418
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4443
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4419
4444
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4420
4445
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4421
4446
|
let mergedMetadata = {};
|
|
@@ -4426,7 +4451,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4426
4451
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4427
4452
|
(entry) => entry.pattern === layout.pattern
|
|
4428
4453
|
), () => ( {
|
|
4429
|
-
...
|
|
4454
|
+
..._chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4430
4455
|
serverTree: false
|
|
4431
4456
|
}))
|
|
4432
4457
|
);
|
|
@@ -4439,9 +4464,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4439
4464
|
(metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
|
|
4440
4465
|
)
|
|
4441
4466
|
];
|
|
4442
|
-
const hydrationIslandStrategy =
|
|
4467
|
+
const hydrationIslandStrategy = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4443
4468
|
_optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options))), 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])
|
|
4444
|
-
) === "islands" ?
|
|
4469
|
+
) === "islands" ? _chunkUBH2OARScjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4445
4470
|
route,
|
|
4446
4471
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4447
4472
|
layouts.map((layout, index) => ({
|
|
@@ -4456,18 +4481,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4456
4481
|
true
|
|
4457
4482
|
) : hydrationStrategies.every((strategy) => strategy === hydrationStrategies[0]) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
|
|
4458
4483
|
const targetUrl = new URL(targetPath, "http://localhost");
|
|
4459
|
-
const searchParams =
|
|
4460
|
-
const routeContext = await
|
|
4484
|
+
const searchParams = _chunkK6LZMZNBcjs.searchParamsToObject.call(void 0, targetUrl.searchParams);
|
|
4485
|
+
const routeContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4461
4486
|
request: targetRequest,
|
|
4462
4487
|
params,
|
|
4463
4488
|
search: searchParams,
|
|
4464
4489
|
path: targetUrl.pathname
|
|
4465
4490
|
});
|
|
4466
4491
|
const routeProps = await parseRouteModuleProps(routeModule, {
|
|
4467
|
-
props:
|
|
4492
|
+
props: _chunkYZMSJRM5cjs.withFarmRouteContext.call(void 0,
|
|
4468
4493
|
{
|
|
4469
4494
|
params,
|
|
4470
|
-
searchParams:
|
|
4495
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, searchParams),
|
|
4471
4496
|
path: targetUrl.pathname,
|
|
4472
4497
|
middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
|
|
4473
4498
|
},
|
|
@@ -4477,28 +4502,28 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4477
4502
|
routePath: route.pattern
|
|
4478
4503
|
});
|
|
4479
4504
|
for (const layoutModule of layoutModules) {
|
|
4480
|
-
mergedMetadata =
|
|
4505
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0, mergedMetadata, layoutModule.metadata);
|
|
4481
4506
|
if (typeof layoutModule.generateMetadata === "function") {
|
|
4482
|
-
mergedMetadata =
|
|
4507
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0,
|
|
4483
4508
|
mergedMetadata,
|
|
4484
4509
|
await layoutModule.generateMetadata({ params: routeProps.params })
|
|
4485
4510
|
);
|
|
4486
4511
|
}
|
|
4487
|
-
mergedMetadata = await
|
|
4512
|
+
mergedMetadata = await _chunkO7B6LJWEcjs.mergeModuleViewport.call(void 0, mergedMetadata, layoutModule, {
|
|
4488
4513
|
params: routeProps.params
|
|
4489
4514
|
});
|
|
4490
4515
|
}
|
|
4491
|
-
mergedMetadata =
|
|
4516
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0, mergedMetadata, routeModule.metadata);
|
|
4492
4517
|
if (typeof routeModule.generateMetadata === "function") {
|
|
4493
|
-
mergedMetadata =
|
|
4518
|
+
mergedMetadata = _chunkO7B6LJWEcjs.mergeMetadata.call(void 0,
|
|
4494
4519
|
mergedMetadata,
|
|
4495
4520
|
await routeModule.generateMetadata(routeProps)
|
|
4496
4521
|
);
|
|
4497
4522
|
}
|
|
4498
|
-
mergedMetadata = await
|
|
4499
|
-
mergedMetadata =
|
|
4523
|
+
mergedMetadata = await _chunkO7B6LJWEcjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
|
|
4524
|
+
mergedMetadata = _chunkO7B6LJWEcjs.addMetadataMarkdownAlternate.call(void 0,
|
|
4500
4525
|
mergedMetadata,
|
|
4501
|
-
|
|
4526
|
+
_chunkU2HFXURZcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
|
|
4502
4527
|
routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
|
|
4503
4528
|
})
|
|
4504
4529
|
);
|
|
@@ -4507,18 +4532,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4507
4532
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4508
4533
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4509
4534
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4510
|
-
), () => (
|
|
4511
|
-
const slotContext = await
|
|
4535
|
+
), () => ( _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4536
|
+
const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4512
4537
|
request: targetRequest,
|
|
4513
4538
|
params: slot.params,
|
|
4514
4539
|
search: searchParams,
|
|
4515
4540
|
path: targetUrl.pathname
|
|
4516
4541
|
});
|
|
4517
4542
|
const slotProps = await parseRouteModuleProps(slotModule, {
|
|
4518
|
-
props:
|
|
4543
|
+
props: _chunkYZMSJRM5cjs.withFarmRouteContext.call(void 0,
|
|
4519
4544
|
{
|
|
4520
4545
|
params: slot.params,
|
|
4521
|
-
searchParams:
|
|
4546
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, searchParams),
|
|
4522
4547
|
path: targetUrl.pathname
|
|
4523
4548
|
},
|
|
4524
4549
|
slotContext
|
|
@@ -4552,22 +4577,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4552
4577
|
})
|
|
4553
4578
|
);
|
|
4554
4579
|
const projectRoot = server.config.root;
|
|
4555
|
-
const toUrlPath = (absolutePath) =>
|
|
4556
|
-
const renderPlan =
|
|
4580
|
+
const toUrlPath = (absolutePath) => _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
4581
|
+
const renderPlan = _chunkIGBQSUT5cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
4557
4582
|
pageShouldHydrate: shouldHydrate,
|
|
4558
4583
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4559
4584
|
islandStrategy: hydrationIslandStrategy,
|
|
4560
|
-
rendering:
|
|
4585
|
+
rendering: _chunkKM7ZRKCHcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4561
4586
|
});
|
|
4562
4587
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4563
|
-
const layoutStartIndex =
|
|
4564
|
-
|
|
4588
|
+
const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
4589
|
+
_chunkIGBQSUT5cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
4565
4590
|
destinationLayoutPatterns
|
|
4566
4591
|
);
|
|
4567
4592
|
const renderer = farmApp.getServerRenderer();
|
|
4568
|
-
const fragmentHtml = await
|
|
4593
|
+
const fragmentHtml = await _chunkXZ6L3FUUcjs._runWithMiddlewareData.call(void 0,
|
|
4569
4594
|
middlewareMap,
|
|
4570
|
-
() =>
|
|
4595
|
+
() => _chunkXZ6L3FUUcjs._runWithMiddlewareContext.call(void 0,
|
|
4571
4596
|
middlewareContext,
|
|
4572
4597
|
() => renderer.renderNavigationFragment({
|
|
4573
4598
|
PageComponent: routeModule.default,
|
|
@@ -4634,24 +4659,24 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4634
4659
|
from: interceptFromHeader,
|
|
4635
4660
|
slots: routeSlots.filter((slot) => slot.interception).map((slot) => slot.name)
|
|
4636
4661
|
} : void 0,
|
|
4637
|
-
i18n:
|
|
4662
|
+
i18n: _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, )
|
|
4638
4663
|
};
|
|
4639
|
-
await
|
|
4664
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
|
|
4640
4665
|
res,
|
|
4641
|
-
|
|
4666
|
+
_chunkZ2JQR56Wcjs.createDeferredDataResponse.call(void 0,
|
|
4642
4667
|
pageData,
|
|
4643
4668
|
{
|
|
4644
4669
|
status: 200,
|
|
4645
4670
|
headers: {
|
|
4646
|
-
"Cache-Control":
|
|
4671
|
+
"Cache-Control": _chunkIGBQSUT5cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
4647
4672
|
"X-Farm-Navigation": "html-fragment",
|
|
4648
4673
|
Vary: "X-Farm-Layout-Chain",
|
|
4649
|
-
[
|
|
4674
|
+
[_chunkVIDUNAQEcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
4650
4675
|
}
|
|
4651
4676
|
},
|
|
4652
4677
|
{
|
|
4653
4678
|
onError(error, id) {
|
|
4654
|
-
|
|
4679
|
+
_chunk7ZDLE77Pcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
|
|
4655
4680
|
}
|
|
4656
4681
|
}
|
|
4657
4682
|
)
|
|
@@ -4681,7 +4706,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4681
4706
|
const startTime = Date.now();
|
|
4682
4707
|
const method = req.method || "GET";
|
|
4683
4708
|
const urlPath = req.url || "/";
|
|
4684
|
-
const requestedPathname =
|
|
4709
|
+
const requestedPathname = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
4685
4710
|
trustProxy: currentServerConfig.trustProxy
|
|
4686
4711
|
}).pathname;
|
|
4687
4712
|
const routeManager2 = farmApp.getRouteManager();
|
|
@@ -4691,17 +4716,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4691
4716
|
const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
|
|
4692
4717
|
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _349 => _349.hasRuntimeHook, 'call', _350 => _350("after")]), () => ( false));
|
|
4693
4718
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4694
|
-
const routePathname =
|
|
4695
|
-
const mcpLabel =
|
|
4719
|
+
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4720
|
+
const mcpLabel = _chunkC4DZAEVTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4696
4721
|
if (mcpLabel) return mcpLabel;
|
|
4697
4722
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4698
|
-
return routePathname ===
|
|
4723
|
+
return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
4699
4724
|
};
|
|
4700
4725
|
const pageRuntimeOptions = (pathname2) => {
|
|
4701
4726
|
const match = routeManager2.matchRoute(pathname2);
|
|
4702
4727
|
return {
|
|
4703
4728
|
kind: "page",
|
|
4704
|
-
route:
|
|
4729
|
+
route: _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
|
|
4705
4730
|
{
|
|
4706
4731
|
pathname: pathname2,
|
|
4707
4732
|
pattern: _optionalChain([match, 'optionalAccess', _351 => _351.route, 'optionalAccess', _352 => _352.pattern]) || null,
|
|
@@ -4731,7 +4756,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4731
4756
|
))));
|
|
4732
4757
|
if (routedRequest instanceof Response) {
|
|
4733
4758
|
const response = await pm.endRuntimeRequest(runtimeSession, routedRequest);
|
|
4734
|
-
await
|
|
4759
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
|
|
4735
4760
|
return;
|
|
4736
4761
|
}
|
|
4737
4762
|
pm.copyRequestContext(routedRequest, req);
|
|
@@ -4867,7 +4892,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4867
4892
|
}
|
|
4868
4893
|
if (!rendererDisabled) return next();
|
|
4869
4894
|
const requested = _nullishCoalesce(_nullishCoalesce(req.originalUrl, () => ( req.url)), () => ( "/"));
|
|
4870
|
-
const pathname =
|
|
4895
|
+
const pathname = _chunkIBZW57NWcjs.parseFarmRequestTarget.call(void 0, requested, "http://localhost").pathname;
|
|
4871
4896
|
res.statusCode = 404;
|
|
4872
4897
|
res.setHeader("Content-Type", "application/json");
|
|
4873
4898
|
res.end(JSON.stringify({ error: "Not found", pathname }));
|
|
@@ -4896,7 +4921,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4896
4921
|
const imageId = await imageImports.resolveId.call(this, id, importer, resolveOptions);
|
|
4897
4922
|
if (imageId) return imageId;
|
|
4898
4923
|
}
|
|
4899
|
-
if (
|
|
4924
|
+
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4900
4925
|
return id;
|
|
4901
4926
|
}
|
|
4902
4927
|
if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
|
|
@@ -4913,11 +4938,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4913
4938
|
if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _376 => _376.ssr]) && !farmSetupContext.getStore()) {
|
|
4914
4939
|
await pendingClientSetup;
|
|
4915
4940
|
}
|
|
4916
|
-
if (
|
|
4941
|
+
if (_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
|
|
4917
4942
|
const file = id.split("?", 1)[0];
|
|
4918
4943
|
this.addWatchFile(file);
|
|
4919
4944
|
const source = await fs2.promises.readFile(file, "utf8");
|
|
4920
|
-
return _nullishCoalesce(
|
|
4945
|
+
return _nullishCoalesce(_chunk7O3YJ6NPcjs.createFarmServerFnBoundaryModule.call(void 0, source, file), () => ( "export {};\n"));
|
|
4921
4946
|
}
|
|
4922
4947
|
if (typeof fontImports.load === "function") {
|
|
4923
4948
|
const fontModule = await fontImports.load.call(this, id);
|
|
@@ -4927,8 +4952,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4927
4952
|
const imageModule = await imageImports.load.call(this, id);
|
|
4928
4953
|
if (imageModule) return imageModule;
|
|
4929
4954
|
}
|
|
4930
|
-
if (
|
|
4931
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess', _377 => _377.getConfig, 'call', _378 => _378(), 'access', _379 => _379.renderer]) ||
|
|
4955
|
+
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
4956
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _377 => _377.getConfig, 'call', _378 => _378(), 'access', _379 => _379.renderer]) || _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4932
4957
|
const root = _optionalChain([server, 'optionalAccess', _380 => _380.config, 'access', _381 => _381.root]) || options.root;
|
|
4933
4958
|
if (isClientEnvironment(this, loadOptions)) {
|
|
4934
4959
|
return generateProgrammaticClientRouteModuleForId(
|
|
@@ -4946,12 +4971,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4946
4971
|
}
|
|
4947
4972
|
if (isFarmClientVirtualId(id)) {
|
|
4948
4973
|
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _382 => _382.getConfig, 'call', _383 => _383()]);
|
|
4949
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.renderer]) ||
|
|
4974
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.renderer]) || _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
4950
4975
|
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.integrations]) || options.integrations;
|
|
4951
4976
|
const root = _optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.root]) || _optionalChain([server, 'optionalAccess', _387 => _387.config, 'access', _388 => _388.root]) || process.cwd();
|
|
4952
4977
|
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.docs]);
|
|
4953
|
-
const adapterOwnsDocsRuntime =
|
|
4954
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.devtools]), () => (
|
|
4978
|
+
const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
|
|
4979
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
4955
4980
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
4956
4981
|
_optionalChain([docs, 'optionalAccess', _391 => _391.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
4957
4982
|
_optionalChain([docs, 'optionalAccess', _392 => _392.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
@@ -4963,19 +4988,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4963
4988
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
4964
4989
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
4965
4990
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
4966
|
-
const generatedDevIndicatorsClientRuntime = farmApp ?
|
|
4967
|
-
const integrationProviders =
|
|
4968
|
-
const isolatedHydrationMode =
|
|
4991
|
+
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
4992
|
+
const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
|
|
4993
|
+
const isolatedHydrationMode = _chunkPSALMEHJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
4969
4994
|
_optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.experimental, 'optionalAccess', _396 => _396.isolatedClientHydration]),
|
|
4970
4995
|
{
|
|
4971
|
-
serverComponents:
|
|
4972
|
-
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !
|
|
4996
|
+
serverComponents: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.experimental, 'optionalAccess', _398 => _398.serverComponents])) === "rsc",
|
|
4997
|
+
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider))
|
|
4973
4998
|
}
|
|
4974
4999
|
);
|
|
4975
5000
|
return generateClientCode(
|
|
4976
5001
|
integrationProviders,
|
|
4977
5002
|
[
|
|
4978
|
-
...
|
|
5003
|
+
..._chunkN4AM7Q34cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
4979
5004
|
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _399 => _399.getFarmDocsDocumentNavigationMatchers, 'call', _400 => _400(docs)]), () => ( []))
|
|
4980
5005
|
],
|
|
4981
5006
|
generatedDocsSearchRuntime,
|
|
@@ -4985,16 +5010,16 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
4985
5010
|
root,
|
|
4986
5011
|
_optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.srcDir]) || options.srcDir || "src",
|
|
4987
5012
|
_optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
4988
|
-
adapterOwnsDocsRuntime ?
|
|
5013
|
+
adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _404 => _404.adapter])) : void 0,
|
|
4989
5014
|
renderer,
|
|
4990
|
-
isolatedHydrationMode === "enabled" ||
|
|
5015
|
+
isolatedHydrationMode === "enabled" || _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406(), 'access', _407 => _407.getIsolatedClientBoundaryModules, 'call', _408 => _408(root)])))), 'optionalAccess', _409 => _409.size]) > 0,
|
|
4991
5016
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _410 => _410.trailingSlash]), () => ( false)),
|
|
4992
5017
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _411 => _411.basePath]), () => ( "/")),
|
|
4993
|
-
|
|
4994
|
-
|
|
5018
|
+
_chunkUBH2OARScjs.generateClientCachePersistenceCode.call(void 0,
|
|
5019
|
+
_chunkUBH2OARScjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _412 => _412.cache]))
|
|
4995
5020
|
),
|
|
4996
|
-
adapterOwnsDocsRuntime ?
|
|
4997
|
-
|
|
5021
|
+
adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
5022
|
+
_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands"
|
|
4998
5023
|
);
|
|
4999
5024
|
}
|
|
5000
5025
|
if (id === "/@farm/server") {
|
|
@@ -5013,11 +5038,11 @@ export const getManifest = () => ({
|
|
|
5013
5038
|
});
|
|
5014
5039
|
`;
|
|
5015
5040
|
}
|
|
5016
|
-
const globalStylesheetHref =
|
|
5041
|
+
const globalStylesheetHref = _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
5017
5042
|
server.config.root,
|
|
5018
5043
|
_optionalChain([farmApp, 'optionalAccess', _417 => _417.getConfig, 'call', _418 => _418(), 'access', _419 => _419.srcDir])
|
|
5019
5044
|
);
|
|
5020
|
-
const fullManifest =
|
|
5045
|
+
const fullManifest = _chunkUBH2OARScjs.createFarmDevClientManifest.call(void 0,
|
|
5021
5046
|
routeManager.generateClientManifest(server.config.root),
|
|
5022
5047
|
{
|
|
5023
5048
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -5039,45 +5064,45 @@ export { manifest };
|
|
|
5039
5064
|
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
5040
5065
|
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _422 => _422.getConfig, 'call', _423 => _423()]), () => ( options));
|
|
5041
5066
|
let rewrotePackageImports = false;
|
|
5042
|
-
if (
|
|
5067
|
+
if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _424 => _424.experimental, 'optionalAccess', _425 => _425.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, code)) {
|
|
5043
5068
|
const file = id.split("?", 1)[0];
|
|
5044
5069
|
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _427 => _427.config, 'access', _428 => _428.root]) || process.cwd();
|
|
5045
5070
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
5046
5071
|
const rewrite = () => {
|
|
5047
5072
|
if (_optionalChain([transformOptions, 'optionalAccess', _429 => _429.ssr]) === true) {
|
|
5048
5073
|
if (farmReactServerFiles.has(file)) {
|
|
5049
|
-
for (const child of
|
|
5074
|
+
for (const child of _chunkPSALMEHJcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
5050
5075
|
farmReactServerFiles.add(child);
|
|
5051
5076
|
}
|
|
5052
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5077
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkPSALMEHJcjs.getFarmClientReachableModules.call(void 0,
|
|
5053
5078
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5054
5079
|
projectRoot
|
|
5055
5080
|
).has(path6.resolve(file));
|
|
5056
|
-
const reactServer = !serverModule ? null :
|
|
5081
|
+
const reactServer = !serverModule ? null : _chunkPSALMEHJcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5057
5082
|
code,
|
|
5058
5083
|
file,
|
|
5059
|
-
reference: (specifier, exportName) =>
|
|
5084
|
+
reference: (specifier, exportName) => _chunkPSALMEHJcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5060
5085
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5061
5086
|
});
|
|
5062
5087
|
if (reactServer !== null) {
|
|
5063
5088
|
code = reactServer;
|
|
5064
5089
|
rewrotePackageImports = true;
|
|
5065
5090
|
}
|
|
5066
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5091
|
+
const internal = farmReactServerFiles.has(file) ? _chunkPSALMEHJcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5067
5092
|
code,
|
|
5068
5093
|
file,
|
|
5069
|
-
reference: (clientFile) =>
|
|
5094
|
+
reference: (clientFile) => _chunkPSALMEHJcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5070
5095
|
}) : null;
|
|
5071
5096
|
if (internal !== null) {
|
|
5072
5097
|
code = internal;
|
|
5073
5098
|
rewrotePackageImports = true;
|
|
5074
5099
|
}
|
|
5075
5100
|
}
|
|
5076
|
-
const rewritePackageImports = (source2) =>
|
|
5101
|
+
const rewritePackageImports = (source2) => _chunkPSALMEHJcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5077
5102
|
code: source2,
|
|
5078
5103
|
file,
|
|
5079
5104
|
root: projectRoot,
|
|
5080
|
-
isClientPackage: (specifier) =>
|
|
5105
|
+
isClientPackage: (specifier) => _chunkPSALMEHJcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5081
5106
|
});
|
|
5082
5107
|
const source = code;
|
|
5083
5108
|
const referenced = inspectPackages(() => rewritePackageImports(source));
|
|
@@ -5097,11 +5122,11 @@ export { manifest };
|
|
|
5097
5122
|
}
|
|
5098
5123
|
}
|
|
5099
5124
|
};
|
|
5100
|
-
if (buildSnapshot)
|
|
5125
|
+
if (buildSnapshot) _chunkPSALMEHJcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5101
5126
|
else rewrite();
|
|
5102
5127
|
}
|
|
5103
|
-
if (islandsServerFns() && !
|
|
5104
|
-
const serverFns =
|
|
5128
|
+
if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
5129
|
+
const serverFns = _chunk7O3YJ6NPcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
5105
5130
|
environment: _optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr]) === true ? "rsc" : "client"
|
|
5106
5131
|
});
|
|
5107
5132
|
if (serverFns) {
|
|
@@ -5125,9 +5150,9 @@ export { manifest };
|
|
|
5125
5150
|
if (actionModule) return { code: actionModule, map: null };
|
|
5126
5151
|
}
|
|
5127
5152
|
if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr])) {
|
|
5128
|
-
const docsConfigModule =
|
|
5129
|
-
if (
|
|
5130
|
-
const redacted =
|
|
5153
|
+
const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438(), 'optionalAccess', _439 => _439.docs]));
|
|
5154
|
+
if (_chunkUBH2OARScjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5155
|
+
const redacted = _chunkUBH2OARScjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5131
5156
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5132
5157
|
}
|
|
5133
5158
|
}
|
|
@@ -5136,9 +5161,9 @@ export { manifest };
|
|
|
5136
5161
|
if ((_optionalChain([currentConfig, 'access', _443 => _443.experimental, 'optionalAccess', _444 => _444.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5137
5162
|
const violation = findClientServerFnViolation(code, id);
|
|
5138
5163
|
if (violation) {
|
|
5139
|
-
const locate =
|
|
5164
|
+
const locate = _chunkPSALMEHJcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5140
5165
|
this.error(
|
|
5141
|
-
|
|
5166
|
+
_chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
|
|
5142
5167
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5143
5168
|
currentConfig.root
|
|
5144
5169
|
)
|
|
@@ -5180,13 +5205,13 @@ export { manifest };
|
|
|
5180
5205
|
transformed = true;
|
|
5181
5206
|
}
|
|
5182
5207
|
}
|
|
5183
|
-
if (
|
|
5208
|
+
if (_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5184
5209
|
const clientBoundarySource = transformedCode;
|
|
5185
5210
|
const moduleInfo = this.getModuleInfo(id);
|
|
5186
5211
|
if (moduleInfo) {
|
|
5187
5212
|
moduleInfo.isClientComponent = true;
|
|
5188
5213
|
}
|
|
5189
|
-
transformedCode =
|
|
5214
|
+
transformedCode = _chunkPSALMEHJcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5190
5215
|
transformed = true;
|
|
5191
5216
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _452 => _452.getConfig, 'call', _453 => _453()]), () => ( options));
|
|
5192
5217
|
let isolatedModuleReference = null;
|
|
@@ -5195,12 +5220,12 @@ export { manifest };
|
|
|
5195
5220
|
const cleanId = id.split("?", 1)[0];
|
|
5196
5221
|
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _456 => _456.getRouteManager, 'call', _457 => _457(), 'access', _458 => _458.getIsolatedClientBoundaryModules, 'call', _459 => _459(root)])));
|
|
5197
5222
|
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _460 => _460.has, 'call', _461 => _461(path6.resolve(cleanId))]) === true;
|
|
5198
|
-
if (
|
|
5199
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5200
|
-
isolatedModuleReference =
|
|
5201
|
-
const islandsMode =
|
|
5202
|
-
const explicitStrategy =
|
|
5203
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5223
|
+
if (_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkPSALMEHJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5224
|
+
cleanId.replace(/\\/g, "/").includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5225
|
+
isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5226
|
+
const islandsMode = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _462 => _462.experimental, 'optionalAccess', _463 => _463.serverComponents])) === "islands";
|
|
5227
|
+
const explicitStrategy = _chunkPSALMEHJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5228
|
+
const inference = islandsMode && explicitStrategy === null ? _chunkUBH2OARScjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5204
5229
|
if (inference) {
|
|
5205
5230
|
for (const file of inference.files) {
|
|
5206
5231
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5223,14 +5248,14 @@ export { manifest };
|
|
|
5223
5248
|
);
|
|
5224
5249
|
}
|
|
5225
5250
|
transformedCode = transformedBoundary;
|
|
5226
|
-
} else if (selectedForIsolatedHydration &&
|
|
5251
|
+
} else if (selectedForIsolatedHydration && _chunkIU4YTFFQcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkPSALMEHJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5227
5252
|
rendererIslandModule = true;
|
|
5228
5253
|
if (_optionalChain([transformOptions, 'optionalAccess', _466 => _466.ssr]) === true) {
|
|
5229
|
-
const renderer =
|
|
5254
|
+
const renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5230
5255
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5231
5256
|
code: transformedCode,
|
|
5232
|
-
moduleReference:
|
|
5233
|
-
islandStrategy: _nullishCoalesce(
|
|
5257
|
+
moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5258
|
+
islandStrategy: _nullishCoalesce(_chunkPSALMEHJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5234
5259
|
parse: (source) => this.parse(source),
|
|
5235
5260
|
withIsland: renderer.server
|
|
5236
5261
|
});
|
|
@@ -5268,7 +5293,7 @@ export { manifest };
|
|
|
5268
5293
|
if (import.meta.hot) {
|
|
5269
5294
|
import.meta.hot.accept((newModule) => {
|
|
5270
5295
|
const runtime = window.__FARM_ISOLATED_HYDRATION_RUNTIME__;
|
|
5271
|
-
if (!newModule || !runtime?.updateModule?.(${JSON.stringify(
|
|
5296
|
+
if (!newModule || !runtime?.updateModule?.(${JSON.stringify(_chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root))}, newModule)) {
|
|
5272
5297
|
import.meta.hot.invalidate();
|
|
5273
5298
|
}
|
|
5274
5299
|
});
|
|
@@ -5324,11 +5349,11 @@ if (import.meta.hot) {
|
|
|
5324
5349
|
if (!routeManager) return;
|
|
5325
5350
|
const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
|
|
5326
5351
|
if (ssgPages.length === 0) {
|
|
5327
|
-
|
|
5352
|
+
_chunk7ZDLE77Pcjs.logger.info("No SSG pages found - all pages will use SSR");
|
|
5328
5353
|
return;
|
|
5329
5354
|
}
|
|
5330
|
-
|
|
5331
|
-
|
|
5355
|
+
_chunk7ZDLE77Pcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
5356
|
+
_chunk7ZDLE77Pcjs.logger.info("Pre-rendering SSG pages...");
|
|
5332
5357
|
const outDir = path6.join(_optionalChain([server, 'optionalAccess', _469 => _469.config, 'access', _470 => _470.root]) || process.cwd(), options.outDir || "dist");
|
|
5333
5358
|
const clientDir = path6.join(outDir, "client");
|
|
5334
5359
|
for (const page of ssgPages) {
|
|
@@ -5346,7 +5371,7 @@ if (import.meta.hot) {
|
|
|
5346
5371
|
const PageComponent = mod.default;
|
|
5347
5372
|
const pageProps = {
|
|
5348
5373
|
params: page.params,
|
|
5349
|
-
searchParams:
|
|
5374
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, {}),
|
|
5350
5375
|
path: page.urlPath
|
|
5351
5376
|
};
|
|
5352
5377
|
let pageElement = React.createElement(
|
|
@@ -5365,7 +5390,7 @@ if (import.meta.hot) {
|
|
|
5365
5390
|
);
|
|
5366
5391
|
}
|
|
5367
5392
|
const html = renderToString(pageElement);
|
|
5368
|
-
const i18nSnapshot =
|
|
5393
|
+
const i18nSnapshot = _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
5369
5394
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
5370
5395
|
const fullHtml = `<!DOCTYPE html>
|
|
5371
5396
|
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _472 => _472.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
@@ -5386,10 +5411,10 @@ if (import.meta.hot) {
|
|
|
5386
5411
|
fs2.mkdirSync(path6.dirname(outputPath), { recursive: true });
|
|
5387
5412
|
fs2.writeFileSync(outputPath, fullHtml);
|
|
5388
5413
|
const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
|
|
5389
|
-
|
|
5414
|
+
_chunk7ZDLE77Pcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
|
|
5390
5415
|
});
|
|
5391
5416
|
} catch (error) {
|
|
5392
|
-
|
|
5417
|
+
_chunk7ZDLE77Pcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
|
|
5393
5418
|
}
|
|
5394
5419
|
}
|
|
5395
5420
|
const manifestPath = path6.join(outDir, "__ssg_manifest.json");
|
|
@@ -5405,19 +5430,19 @@ if (import.meta.hot) {
|
|
|
5405
5430
|
2
|
|
5406
5431
|
)
|
|
5407
5432
|
);
|
|
5408
|
-
|
|
5433
|
+
_chunk7ZDLE77Pcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
|
|
5409
5434
|
} catch (error) {
|
|
5410
|
-
|
|
5435
|
+
_chunk7ZDLE77Pcjs.logger.error(`SSG build failed: ${error}`);
|
|
5411
5436
|
}
|
|
5412
5437
|
},
|
|
5413
5438
|
watchChange(id, change) {
|
|
5414
|
-
const watched =
|
|
5439
|
+
const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
|
|
5415
5440
|
const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
|
|
5416
5441
|
if (appSource) _optionalChain([farmApp, 'optionalAccess', _473 => _473.getRouteManager, 'call', _474 => _474(), 'access', _475 => _475.noteSourceChange, 'call', _476 => _476(id, change.event)]);
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5442
|
+
_chunkPSALMEHJcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
|
|
5443
|
+
_chunkPSALMEHJcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
|
|
5444
|
+
_chunkUBH2OARScjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
|
|
5445
|
+
_chunkPSALMEHJcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5421
5446
|
},
|
|
5422
5447
|
async handleHotUpdate(ctx) {
|
|
5423
5448
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5438,7 +5463,7 @@ if (import.meta.hot) {
|
|
|
5438
5463
|
}
|
|
5439
5464
|
for (const island of _nullishCoalesce(farmIslandInferenceDependents.get(path6.resolve(file)), () => ( []))) {
|
|
5440
5465
|
if (island === path6.resolve(file)) continue;
|
|
5441
|
-
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(
|
|
5466
|
+
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, island)), () => ( []))) {
|
|
5442
5467
|
server2.moduleGraph.invalidateModule(mod);
|
|
5443
5468
|
}
|
|
5444
5469
|
}
|
|
@@ -5450,26 +5475,26 @@ if (import.meta.hot) {
|
|
|
5450
5475
|
}
|
|
5451
5476
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5452
5477
|
};
|
|
5453
|
-
if (normalizedFile.includes(
|
|
5478
|
+
if (normalizedFile.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5454
5479
|
path6.posix.join(
|
|
5455
|
-
|
|
5456
|
-
|
|
5480
|
+
_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.root]) || options.root || server2.config.root),
|
|
5481
|
+
_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5457
5482
|
)
|
|
5458
5483
|
))
|
|
5459
5484
|
return modules;
|
|
5460
|
-
if (currentFarmConfig &&
|
|
5485
|
+
if (currentFarmConfig && _chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0,
|
|
5461
5486
|
path6.posix.basename(normalizedFile),
|
|
5462
|
-
|
|
5463
|
-
) &&
|
|
5464
|
-
(appDir) => normalizedFile.startsWith(`${
|
|
5487
|
+
_chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
|
|
5488
|
+
) && _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
5489
|
+
(appDir) => normalizedFile.startsWith(`${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
5465
5490
|
)) {
|
|
5466
5491
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5467
5492
|
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _480 => _480(`updated ${file}`)]);
|
|
5468
5493
|
reloadAfterEdit();
|
|
5469
5494
|
return [];
|
|
5470
5495
|
}
|
|
5471
|
-
const currentSrcRoot = currentFarmConfig ?
|
|
5472
|
-
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) &&
|
|
5496
|
+
const currentSrcRoot = currentFarmConfig ? _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
|
|
5497
|
+
if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
|
|
5473
5498
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5474
5499
|
for (const mod of modules) {
|
|
5475
5500
|
server2.moduleGraph.invalidateModule(mod);
|
|
@@ -5488,13 +5513,13 @@ if (import.meta.hot) {
|
|
|
5488
5513
|
reloadAfterEdit();
|
|
5489
5514
|
return [];
|
|
5490
5515
|
}
|
|
5491
|
-
if (apiRouteManager &&
|
|
5516
|
+
if (apiRouteManager && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
5492
5517
|
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _483 => _483(`updated ${file}`)]);
|
|
5493
5518
|
}
|
|
5494
5519
|
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _484 => _484.experimental, 'optionalAccess', _485 => _485.isolatedClientHydration]);
|
|
5495
5520
|
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _486 => _486.getRouteManager, 'call', _487 => _487()]);
|
|
5496
5521
|
const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
|
|
5497
|
-
const tracksAsyncOwnerIslands =
|
|
5522
|
+
const tracksAsyncOwnerIslands = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _488 => _488.renderer])) && planRouteManager !== void 0;
|
|
5498
5523
|
let clientPlanCurrent = false;
|
|
5499
5524
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
5500
5525
|
const routeManager = planRouteManager;
|
|
@@ -5523,7 +5548,7 @@ if (import.meta.hot) {
|
|
|
5523
5548
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
5524
5549
|
for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
|
|
5525
5550
|
if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
|
|
5526
|
-
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(
|
|
5551
|
+
for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
|
|
5527
5552
|
server2.moduleGraph.invalidateModule(mod);
|
|
5528
5553
|
}
|
|
5529
5554
|
}
|
|
@@ -5536,7 +5561,7 @@ if (import.meta.hot) {
|
|
|
5536
5561
|
}
|
|
5537
5562
|
clientPlanCurrent = true;
|
|
5538
5563
|
} catch (error) {
|
|
5539
|
-
|
|
5564
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
5540
5565
|
`[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
|
|
5541
5566
|
);
|
|
5542
5567
|
return modules;
|
|
@@ -5548,7 +5573,7 @@ if (import.meta.hot) {
|
|
|
5548
5573
|
if (normalizedFile.includes("middleware.")) {
|
|
5549
5574
|
if (middlewareManager) {
|
|
5550
5575
|
await middlewareManager.reload();
|
|
5551
|
-
|
|
5576
|
+
_chunk7ZDLE77Pcjs.logger.success("\u2705 Middleware reloaded!");
|
|
5552
5577
|
if (initialPluginManager) {
|
|
5553
5578
|
for (const middleware of middlewareManager.getMiddlewares()) {
|
|
5554
5579
|
await initialPluginManager.runHookParallel("middlewareDiscovered", {
|
|
@@ -5576,7 +5601,7 @@ if (import.meta.hot) {
|
|
|
5576
5601
|
return [];
|
|
5577
5602
|
}
|
|
5578
5603
|
}
|
|
5579
|
-
if (currentFarmConfig && planRouteManager &&
|
|
5604
|
+
if (currentFarmConfig && planRouteManager && _chunkIU4YTFFQcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
|
|
5580
5605
|
_optionalChain([server2, 'access', _501 => _501.environments, 'access', _502 => _502.client, 'optionalAccess', _503 => _503.moduleGraph]),
|
|
5581
5606
|
normalizedFile,
|
|
5582
5607
|
planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
|
|
@@ -5584,7 +5609,7 @@ if (import.meta.hot) {
|
|
|
5584
5609
|
reloadAfterEdit();
|
|
5585
5610
|
return [];
|
|
5586
5611
|
}
|
|
5587
|
-
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _504 => _504.environments, 'access', _505 => _505.client, 'optionalAccess', _506 => _506.moduleGraph, 'access', _507 => _507.getModulesByFile, 'call', _508 => _508(normalizedFile), 'optionalAccess', _509 => _509.size]) &&
|
|
5612
|
+
if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _504 => _504.environments, 'access', _505 => _505.client, 'optionalAccess', _506 => _506.moduleGraph, 'access', _507 => _507.getModulesByFile, 'call', _508 => _508(normalizedFile), 'optionalAccess', _509 => _509.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
|
|
5588
5613
|
logUpdate("PAGE", `updated ${path6.basename(file)}`);
|
|
5589
5614
|
reloadAfterEdit();
|
|
5590
5615
|
return [];
|
|
@@ -5657,7 +5682,7 @@ function createPageDataMiddlewareResponse(res) {
|
|
|
5657
5682
|
const captures = (status, location) => {
|
|
5658
5683
|
if (redirect) return true;
|
|
5659
5684
|
if (passthrough) return false;
|
|
5660
|
-
redirect =
|
|
5685
|
+
redirect = _chunkS2QSTMBEcjs.getFarmPageDataRedirectFromResponse.call(void 0,
|
|
5661
5686
|
status,
|
|
5662
5687
|
Array.isArray(location) ? location[0] : typeof location === "string" ? location : null
|
|
5663
5688
|
);
|
|
@@ -5715,9 +5740,9 @@ function readWriteHeadLocation(headers) {
|
|
|
5715
5740
|
}
|
|
5716
5741
|
async function sendFarmPageDataRedirect(res, redirect, deploymentId) {
|
|
5717
5742
|
for (const name of ["location", "content-length", "content-type"]) res.removeHeader(name);
|
|
5718
|
-
await
|
|
5743
|
+
await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
|
|
5719
5744
|
res,
|
|
5720
|
-
|
|
5745
|
+
_chunkVIDUNAQEcjs.withFarmDeploymentResponse.call(void 0, _chunkS2QSTMBEcjs.createFarmPageDataRedirectResponse.call(void 0, redirect), deploymentId)
|
|
5721
5746
|
);
|
|
5722
5747
|
}
|
|
5723
5748
|
function resolveDevelopmentRoot(farmRoot, viteRoot) {
|
|
@@ -5754,35 +5779,35 @@ function invalidateProgrammaticClientRouteModules(server) {
|
|
|
5754
5779
|
const graph = _optionalChain([server, 'access', _515 => _515.environments, 'optionalAccess', _516 => _516.client, 'optionalAccess', _517 => _517.moduleGraph]);
|
|
5755
5780
|
if (!graph) return;
|
|
5756
5781
|
for (const [id, module] of graph.idToModuleMap) {
|
|
5757
|
-
if (
|
|
5782
|
+
if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
5758
5783
|
}
|
|
5759
5784
|
}
|
|
5760
5785
|
function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, clientRoutes, watchFile) {
|
|
5761
|
-
const parsed =
|
|
5786
|
+
const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5762
5787
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5763
5788
|
watchFile(routesFile);
|
|
5764
|
-
return
|
|
5789
|
+
return _chunkPSALMEHJcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5765
5790
|
kind: parsed.kind,
|
|
5766
5791
|
routePath: parsed.routePath,
|
|
5767
5792
|
routesFile,
|
|
5768
5793
|
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _518 => _518.routes, 'access', _519 => _519.get, 'call', _520 => _520(
|
|
5769
|
-
|
|
5794
|
+
_chunkPSALMEHJcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5770
5795
|
)]),
|
|
5771
5796
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5772
|
-
rendererClient:
|
|
5797
|
+
rendererClient: _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
5773
5798
|
toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
|
|
5774
5799
|
});
|
|
5775
5800
|
}
|
|
5776
5801
|
function resolveRealModuleFile(filePath, root) {
|
|
5777
|
-
const resolved = _nullishCoalesce(
|
|
5802
|
+
const resolved = _nullishCoalesce(_chunkPSALMEHJcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5778
5803
|
try {
|
|
5779
|
-
return
|
|
5804
|
+
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5780
5805
|
} catch (e29) {
|
|
5781
|
-
return
|
|
5806
|
+
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolved);
|
|
5782
5807
|
}
|
|
5783
5808
|
}
|
|
5784
|
-
function generateProgrammaticRouteModule(moduleId, root, renderer =
|
|
5785
|
-
const parsed =
|
|
5809
|
+
function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkHP7QYVSTcjs.REACT_RENDERER) {
|
|
5810
|
+
const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5786
5811
|
if (!parsed) {
|
|
5787
5812
|
return "";
|
|
5788
5813
|
}
|
|
@@ -6074,7 +6099,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
|
|
|
6074
6099
|
`.trim();
|
|
6075
6100
|
}
|
|
6076
6101
|
function toProgrammaticRouteImportSpecifier(filePath, root) {
|
|
6077
|
-
return root ?
|
|
6102
|
+
return root ? _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
|
|
6078
6103
|
}
|
|
6079
6104
|
async function parseRouteModuleProps(routeModule, input) {
|
|
6080
6105
|
if (typeof routeModule.__farmResolveRouteProps === "function") {
|
|
@@ -6098,7 +6123,7 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
6098
6123
|
...input.props,
|
|
6099
6124
|
params,
|
|
6100
6125
|
search,
|
|
6101
|
-
searchParams:
|
|
6126
|
+
searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, search)
|
|
6102
6127
|
};
|
|
6103
6128
|
}
|
|
6104
6129
|
function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
@@ -6112,20 +6137,20 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6112
6137
|
throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
|
|
6113
6138
|
}
|
|
6114
6139
|
}
|
|
6115
|
-
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer =
|
|
6116
|
-
const providerClientCode =
|
|
6140
|
+
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkHP7QYVSTcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
6141
|
+
const providerClientCode = _chunkUBH2OARScjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6117
6142
|
integrationProviders,
|
|
6118
6143
|
root,
|
|
6119
6144
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
6120
6145
|
);
|
|
6121
|
-
const clientPluginEntry =
|
|
6146
|
+
const clientPluginEntry = _chunkADCVSTFVcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
6122
6147
|
plugins,
|
|
6123
6148
|
root,
|
|
6124
6149
|
srcDir,
|
|
6125
6150
|
publicRuntimeConfig
|
|
6126
6151
|
);
|
|
6127
|
-
const appSetupPath =
|
|
6128
|
-
const rendererClientImports =
|
|
6152
|
+
const appSetupPath = _chunkHP7QYVSTcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
|
|
6153
|
+
const rendererClientImports = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
|
|
6129
6154
|
import { hydrateRoot, createRoot } from 'react-dom/client'
|
|
6130
6155
|
import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
|
|
6131
6156
|
// Named exports only: a renderer's client module needs no default export. `React` is a
|
|
@@ -6133,19 +6158,19 @@ import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
|
|
|
6133
6158
|
// optional export (`Children`, `markFunctionComponent`) feature-checked on the namespace.
|
|
6134
6159
|
appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
|
|
6135
6160
|
import { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
|
|
6136
|
-
import __farmAppSetup from ${JSON.stringify(
|
|
6161
|
+
import __farmAppSetup from ${JSON.stringify(_chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, appSetupPath, root))}
|
|
6137
6162
|
const React = { ...__farmRendererClient }
|
|
6138
6163
|
__farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
|
|
6139
6164
|
import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
|
|
6140
6165
|
const React = { ...__farmRendererClient }`
|
|
6141
6166
|
);
|
|
6142
|
-
const rendererIslands = isolatedHydrationEnabled && !islandValues && !
|
|
6167
|
+
const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
|
|
6143
6168
|
const isolatedHydrationImport = rendererIslands ? "import { createFarmRendererIslandRuntime } from '@farm.js/core/internal/renderer-islands'" : isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
|
|
6144
|
-
const docsAdapterImportBlock =
|
|
6169
|
+
const docsAdapterImportBlock = _chunkP4ZLFUNBcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
|
|
6145
6170
|
docsAdapterUI,
|
|
6146
6171
|
docsConfigModule,
|
|
6147
6172
|
// Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
|
|
6148
|
-
|
|
6173
|
+
_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
|
|
6149
6174
|
);
|
|
6150
6175
|
const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
|
|
6151
6176
|
renderer: React,
|
|
@@ -6211,7 +6236,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6211
6236
|
return null;
|
|
6212
6237
|
}
|
|
6213
6238
|
}
|
|
6214
|
-
${islandValues ? `${
|
|
6239
|
+
${islandValues ? `${_chunkUBH2OARScjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6215
6240
|
let farmLastRouteState = null;
|
|
6216
6241
|
|
|
6217
6242
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -7052,7 +7077,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
7052
7077
|
return loadedLayouts;
|
|
7053
7078
|
}
|
|
7054
7079
|
|
|
7055
|
-
${
|
|
7080
|
+
${_chunkUBH2OARScjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
7056
7081
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
7057
7082
|
let wrapped = element;
|
|
7058
7083
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7131,7 +7156,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
|
|
|
7131
7156
|
|
|
7132
7157
|
function hydrateFarmRoute(container, route) {
|
|
7133
7158
|
farmLastRouteState = route;
|
|
7134
|
-
${
|
|
7159
|
+
${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
|
|
7135
7160
|
}
|
|
7136
7161
|
|
|
7137
7162
|
function renderFarmRoute(root, route) {
|
|
@@ -7275,7 +7300,7 @@ async function tryHydrateImportedPage(
|
|
|
7275
7300
|
wrap: wrapFarmClientRouteGraph,
|
|
7276
7301
|
};
|
|
7277
7302
|
} else if (useHydrate && container?.id === '__farm_page__') {
|
|
7278
|
-
wrappedElement = wrapFarmClientRouteGraph(${
|
|
7303
|
+
wrappedElement = wrapFarmClientRouteGraph(${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
|
|
7279
7304
|
} else {
|
|
7280
7305
|
wrappedElement = await buildWrappedHydrationElement(
|
|
7281
7306
|
currentPageComponent,
|
|
@@ -7352,7 +7377,7 @@ function readActiveLayoutPatterns() {
|
|
|
7352
7377
|
);
|
|
7353
7378
|
}
|
|
7354
7379
|
|
|
7355
|
-
${
|
|
7380
|
+
${_chunkUBH2OARScjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7356
7381
|
|
|
7357
7382
|
function activateFragmentScripts(root) {
|
|
7358
7383
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7411,7 +7436,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7411
7436
|
return shell.innerHTML;
|
|
7412
7437
|
}
|
|
7413
7438
|
|
|
7414
|
-
${islandValues ?
|
|
7439
|
+
${islandValues ? _chunkUBH2OARScjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7415
7440
|
container,
|
|
7416
7441
|
fragment,
|
|
7417
7442
|
currentPatterns,
|
|
@@ -7486,9 +7511,9 @@ ${islandValues ? `
|
|
|
7486
7511
|
return nextTarget;
|
|
7487
7512
|
}
|
|
7488
7513
|
|
|
7489
|
-
${islandValues ? `${
|
|
7514
|
+
${islandValues ? `${_chunkUBH2OARScjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7490
7515
|
|
|
7491
|
-
${
|
|
7516
|
+
${_chunkUBH2OARScjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7492
7517
|
|
|
7493
7518
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7494
7519
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8192,10 +8217,10 @@ function generateClientManifest(bundle) {
|
|
|
8192
8217
|
return manifest;
|
|
8193
8218
|
}
|
|
8194
8219
|
async function defineConfig(config = {}) {
|
|
8195
|
-
const tailwindVitePlugin = await
|
|
8220
|
+
const tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, );
|
|
8196
8221
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
8197
8222
|
if (_optionalChain([config, 'access', _523 => _523.extends, 'optionalAccess', _524 => _524.length])) {
|
|
8198
|
-
const { config: layeredConfig } = await import("./layers-
|
|
8223
|
+
const { config: layeredConfig } = await import("./layers-GP57TBE2.cjs").then(
|
|
8199
8224
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
8200
8225
|
root: appRoot,
|
|
8201
8226
|
mode: process.env.NODE_ENV === "production" ? "production" : "development"
|
|
@@ -8203,12 +8228,12 @@ async function defineConfig(config = {}) {
|
|
|
8203
8228
|
);
|
|
8204
8229
|
config = layeredConfig;
|
|
8205
8230
|
}
|
|
8206
|
-
config.renderer =
|
|
8207
|
-
config.images =
|
|
8208
|
-
const rendererVitePlugins = await
|
|
8231
|
+
config.renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8232
|
+
config.images = _chunkUBH2OARScjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8233
|
+
const rendererVitePlugins = await _chunkHP7QYVSTcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8209
8234
|
ssr: true
|
|
8210
8235
|
});
|
|
8211
|
-
const reactRefreshPlugins =
|
|
8236
|
+
const reactRefreshPlugins = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkQCVP22KWcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
|
|
8212
8237
|
const nodeBuiltinStubs = {
|
|
8213
8238
|
"node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
|
|
8214
8239
|
"node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
|
|
@@ -8267,7 +8292,7 @@ async function defineConfig(config = {}) {
|
|
|
8267
8292
|
return null;
|
|
8268
8293
|
}
|
|
8269
8294
|
};
|
|
8270
|
-
const pc =
|
|
8295
|
+
const pc = _chunkCH2JX3CMcjs.createCliColors.call(void 0, );
|
|
8271
8296
|
let serverStarted = false;
|
|
8272
8297
|
let startTime = Date.now();
|
|
8273
8298
|
const farmLogger = {
|
|
@@ -8302,14 +8327,14 @@ async function defineConfig(config = {}) {
|
|
|
8302
8327
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8303
8328
|
console.log("");
|
|
8304
8329
|
console.log(
|
|
8305
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8330
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkXPVS4HKUcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8306
8331
|
);
|
|
8307
8332
|
console.log("");
|
|
8308
8333
|
console.log(
|
|
8309
8334
|
` ${pc.dim("\u279C")} ${pc.bold("Local:")} ${pc.cyan(`http://localhost:${resolvedPort}/`)}`
|
|
8310
8335
|
);
|
|
8311
8336
|
if (isExposed) {
|
|
8312
|
-
const os =
|
|
8337
|
+
const os = _chunkUGL4BDNBcjs.__require.call(void 0, "os");
|
|
8313
8338
|
const interfaces = os.networkInterfaces();
|
|
8314
8339
|
for (const name of Object.keys(interfaces)) {
|
|
8315
8340
|
for (const iface of interfaces[name] || []) {
|
|
@@ -8335,8 +8360,8 @@ async function defineConfig(config = {}) {
|
|
|
8335
8360
|
return {
|
|
8336
8361
|
plugins: [
|
|
8337
8362
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8338
|
-
|
|
8339
|
-
|
|
8363
|
+
_chunkQCVP22KWcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8364
|
+
_chunkUBH2OARScjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8340
8365
|
tailwindVitePlugin,
|
|
8341
8366
|
...rendererVitePlugins,
|
|
8342
8367
|
...reactRefreshPlugins,
|
|
@@ -8346,16 +8371,16 @@ async function defineConfig(config = {}) {
|
|
|
8346
8371
|
farmNavigationPlugin(config.renderer),
|
|
8347
8372
|
farmIslandContainersPlugin(config),
|
|
8348
8373
|
farmPlugin(config),
|
|
8349
|
-
|
|
8374
|
+
_chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8350
8375
|
farmBrandingPlugin
|
|
8351
8376
|
],
|
|
8352
8377
|
customLogger: farmLogger,
|
|
8353
8378
|
clearScreen: false,
|
|
8354
8379
|
optimizeDeps: {
|
|
8355
|
-
...
|
|
8356
|
-
|
|
8380
|
+
..._chunkUBH2OARScjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8381
|
+
_chunkUBH2OARScjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8357
8382
|
appRoot,
|
|
8358
|
-
|
|
8383
|
+
_chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8359
8384
|
),
|
|
8360
8385
|
config.renderer,
|
|
8361
8386
|
appRoot
|
|
@@ -8396,8 +8421,8 @@ async function defineConfig(config = {}) {
|
|
|
8396
8421
|
dedupe: [...config.renderer.dedupe || []],
|
|
8397
8422
|
// Stub out problematic server-only modules during dev mode
|
|
8398
8423
|
alias: {
|
|
8399
|
-
...
|
|
8400
|
-
...
|
|
8424
|
+
..._chunkKBURN62Zcjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8425
|
+
..._chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8401
8426
|
// Nitro internals that should not be resolved in browser
|
|
8402
8427
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8403
8428
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|