@farm.js/core 0.1.66 → 0.1.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-QLFDDTYN.mjs → agent-mcp-handler-AZ7QW4UP.mjs} +5 -5
- package/dist/{agent-mcp-handler-OXT73ZBY.cjs → agent-mcp-handler-FER4MQDF.cjs} +6 -6
- package/dist/{agent-mcp.d-QD2WZ9BS.d.ts → agent-mcp.d-Uh5xr7aX.d.ts} +1 -1
- package/dist/{agent-mcp.d-CO_ABmNK.d.mts → agent-mcp.d-wkVPK1GA.d.mts} +1 -1
- package/dist/agent-runtime.cjs +6 -5
- package/dist/agent-runtime.d.mts +10 -8
- package/dist/agent-runtime.d.ts +10 -8
- package/dist/agent-runtime.mjs +5 -4
- package/dist/{analyzer-4UFP4HVP.mjs → analyzer-CQDU7E3Y.mjs} +2 -2
- package/dist/analyzer-PPAHM4AW.cjs +16 -0
- package/dist/api/client.cjs +12 -2
- package/dist/api/client.d.mts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/client.mjs +12 -2
- package/dist/api/client.native.cjs +12 -2
- package/dist/api/client.native.d.mts +5 -5
- package/dist/api/client.native.d.ts +5 -5
- package/dist/api/client.native.mjs +12 -2
- package/dist/api/node.cjs +223 -0
- package/dist/api/node.d.mts +61 -0
- package/dist/api/node.d.ts +61 -0
- package/dist/api/node.mjs +223 -0
- package/dist/api/route-manager.cjs +11 -11
- package/dist/api/route-manager.d.mts +14 -11
- package/dist/api/route-manager.d.ts +14 -11
- package/dist/api/route-manager.mjs +10 -10
- package/dist/api/runtime.cjs +11 -7
- package/dist/api/runtime.d.mts +11 -9
- package/dist/api/runtime.d.ts +11 -9
- package/dist/api/runtime.mjs +10 -6
- package/dist/{api-client.d-BNLXNCXJ.d.mts → api-client.d-Bp35zMqR.d.mts} +1 -1
- package/dist/{api-client.d-ddQBNGtu.d.ts → api-client.d-CFI_xL0V.d.ts} +1 -1
- package/dist/api.cjs +17 -13
- package/dist/api.d.mts +15 -12
- package/dist/api.d.ts +15 -12
- package/dist/api.mjs +16 -12
- package/dist/{app-manifest.d-DDmNkYQQ.d.ts → app-manifest.d-BT5i2F-o.d.ts} +1 -1
- package/dist/{app-manifest.d-BpKxiU_E.d.mts → app-manifest.d-Dd4q5CFx.d.mts} +1 -1
- package/dist/app-markdown.cjs +5 -5
- package/dist/app-markdown.d.mts +15 -15
- package/dist/app-markdown.d.ts +15 -15
- package/dist/app-markdown.mjs +4 -4
- package/dist/{app.d-x68Cwr0_.d.ts → app.d-BVOpL_f2.d.ts} +52 -11
- package/dist/{app.d-kuoVWhWM.d.mts → app.d-BhiDXex_.d.mts} +52 -11
- package/dist/{chunk-RY4ABNPE.cjs → chunk-225APHKC.cjs} +3 -3
- package/dist/{chunk-JGAE5XPL.cjs → chunk-23VJEGKC.cjs} +4 -2
- package/dist/{chunk-5C7XMKQ4.cjs → chunk-2AFW7673.cjs} +6 -1
- package/dist/{chunk-SYW346ZN.cjs → chunk-2LHZD3OP.cjs} +1 -21
- package/dist/{chunk-ZZI56IUY.mjs → chunk-2ZOYOYEE.mjs} +13 -13
- package/dist/{chunk-7XGWBPQQ.cjs → chunk-3EEINK7G.cjs} +24 -10
- package/dist/{chunk-BRWIVOV4.cjs → chunk-3GNHJ3RN.cjs} +10 -8
- package/dist/{chunk-HCGWDRZO.mjs → chunk-3Y52TWYU.mjs} +18 -7
- package/dist/{chunk-CBOEJ5Z4.cjs → chunk-437QZIC2.cjs} +133 -46
- package/dist/{chunk-O6L3YYPM.cjs → chunk-4E57QHPW.cjs} +8 -16
- package/dist/{chunk-WKPBIT5Q.cjs → chunk-4HGLJOXZ.cjs} +6 -6
- package/dist/{chunk-CJNAUEVC.mjs → chunk-4QENVMG7.mjs} +1 -1
- package/dist/{chunk-EMNKZGF4.mjs → chunk-4UAQB5LB.mjs} +556 -462
- package/dist/{chunk-BQWBHWEW.mjs → chunk-4ZXKYCYK.mjs} +1 -1
- package/dist/{chunk-N35YPV4N.mjs → chunk-57QAQU4F.mjs} +9 -7
- package/dist/{chunk-ZEXE4TGY.mjs → chunk-5FBZJJGA.mjs} +247 -110
- package/dist/{chunk-4OSOLDPL.cjs → chunk-5JKDFRTK.cjs} +2 -2
- package/dist/{chunk-OLIGNTWU.cjs → chunk-5NFQ6AZI.cjs} +7 -7
- package/dist/{chunk-6HRAK7I5.mjs → chunk-5OFNUETM.mjs} +8 -2
- package/dist/{chunk-RD623KW4.cjs → chunk-67MZTLTF.cjs} +21 -3
- package/dist/chunk-6I4BFRE7.cjs +51 -0
- package/dist/{chunk-UBMHQVWN.mjs → chunk-6OFOIMNS.mjs} +1 -1
- package/dist/{chunk-K5EW7GUU.mjs → chunk-7BIW7VCW.mjs} +13 -5
- package/dist/{chunk-CHYTADNK.cjs → chunk-7LK5CTUM.cjs} +70 -53
- package/dist/{chunk-HPP2II4Z.mjs → chunk-7PJARAQQ.mjs} +1 -1
- package/dist/{chunk-LEJDW34D.cjs → chunk-7PPLTD3P.cjs} +3 -3
- package/dist/{chunk-BYRZ5VTH.mjs → chunk-A3T445WK.mjs} +47 -34
- package/dist/{chunk-TGULJSHD.mjs → chunk-AJNBTOVQ.mjs} +20 -9
- package/dist/{chunk-FBEBSAVI.cjs → chunk-AKIQ54FK.cjs} +82 -63
- package/dist/{chunk-2NGZFOKG.mjs → chunk-AOIUYHPH.mjs} +2 -2
- package/dist/{chunk-NKRZLQUK.mjs → chunk-AQIO3RNL.mjs} +1 -1
- package/dist/chunk-AQIRXBBY.cjs +26 -0
- package/dist/{chunk-DQJ2CIH7.cjs → chunk-ASYOWPSR.cjs} +2 -1
- package/dist/chunk-AZ6IW6SF.mjs +28 -0
- package/dist/{chunk-QMDU6QHN.mjs → chunk-B6RBJJ5G.mjs} +1 -1
- package/dist/{chunk-I32V5CZL.cjs → chunk-BDYM2TN3.cjs} +28 -17
- package/dist/{chunk-JLDNXURZ.cjs → chunk-BZWTBELF.cjs} +32 -32
- package/dist/{chunk-ITV4QQL2.cjs → chunk-C6CUUBY5.cjs} +14 -3
- package/dist/{chunk-QGJ4FI2G.mjs → chunk-C6HGUTXB.mjs} +113 -29
- package/dist/{chunk-YN6BHOYY.cjs → chunk-CL52PD6D.cjs} +10 -3
- package/dist/{chunk-VQJHT2ND.mjs → chunk-CRVSYDHV.mjs} +2 -2
- package/dist/{chunk-XURDCXNH.cjs → chunk-CSLHNBPS.cjs} +6 -6
- package/dist/{chunk-XQSYOVCW.cjs → chunk-DBYNZIIQ.cjs} +13 -5
- package/dist/{chunk-AZUUKA66.mjs → chunk-DIXFKAPM.mjs} +1251 -389
- package/dist/{chunk-QTD6EMN2.mjs → chunk-DQ2DI3Y7.mjs} +11 -4
- package/dist/{chunk-NHQM2Q4I.cjs → chunk-DWLNLU55.cjs} +2 -2
- package/dist/chunk-DXZ57EPE.mjs +375 -0
- package/dist/{chunk-SA7MLSP4.mjs → chunk-E3HDJCWF.mjs} +3 -3
- package/dist/{chunk-52Y3C3HG.mjs → chunk-E7VF3LQ5.mjs} +3 -2
- package/dist/{chunk-752XUZIM.cjs → chunk-EGIY4A7V.cjs} +6 -6
- package/dist/chunk-EIVGPQN5.mjs +51 -0
- package/dist/{chunk-KPAJWD3N.mjs → chunk-EYPSKXO4.mjs} +1 -1
- package/dist/{chunk-E4UDLFWR.cjs → chunk-F36LS2C7.cjs} +796 -702
- package/dist/{chunk-MPIGW42F.mjs → chunk-F6CMGWAL.mjs} +1 -1
- package/dist/{chunk-GL7N5UHF.cjs → chunk-FJMC24KG.cjs} +21 -10
- package/dist/{chunk-QISW423S.cjs → chunk-FPBOAG6N.cjs} +2 -2
- package/dist/{chunk-3CCAICF7.cjs → chunk-FSODPZRT.cjs} +5 -5
- package/dist/{chunk-2C5L5RPM.cjs → chunk-FT6KJHS3.cjs} +71 -38
- package/dist/{chunk-WMTBBQHY.cjs → chunk-FVYBEMOD.cjs} +288 -151
- package/dist/{chunk-BM2LH2JM.mjs → chunk-G7NBPP7H.mjs} +14 -13
- package/dist/{chunk-ES2LD2YD.mjs → chunk-GCRT6GJG.mjs} +18 -0
- package/dist/{chunk-5OJVKXFV.cjs → chunk-GDM3ZD2O.cjs} +10 -8
- package/dist/{chunk-25T5VXOE.mjs → chunk-GFPS7MNE.mjs} +106 -19
- package/dist/{chunk-EMDGXYUD.mjs → chunk-GJ7QVFAG.mjs} +16 -7
- package/dist/{chunk-TGSEVBPO.mjs → chunk-GJEC5S4V.mjs} +11 -0
- package/dist/{chunk-HNAISJFD.cjs → chunk-HDPT6OYE.cjs} +9 -3
- package/dist/{chunk-RVGSVQWT.mjs → chunk-HEJM46HQ.mjs} +21 -7
- package/dist/chunk-HHLEYA4B.cjs +17 -0
- package/dist/{chunk-ZNH6NR3H.cjs → chunk-HJZZSBVK.cjs} +2 -2
- package/dist/{chunk-E552H232.cjs → chunk-I7J5RLGO.cjs} +16 -2
- package/dist/chunk-ICFPTHXM.mjs +97 -0
- package/dist/{chunk-K7OZAVOI.mjs → chunk-IFR74W6S.mjs} +46 -13
- package/dist/{chunk-MPJEIHW2.cjs → chunk-IGDYL2IA.cjs} +2 -2
- package/dist/{chunk-5A77OEIG.cjs → chunk-IHTDLCDJ.cjs} +5 -5
- package/dist/{chunk-OYZXVBZP.cjs → chunk-IUKBPBM7.cjs} +2 -1
- package/dist/chunk-J6TZRYCO.cjs +22 -0
- package/dist/{chunk-E4RDMG3K.mjs → chunk-JL2YW5KX.mjs} +5 -4
- package/dist/chunk-JSOCDYER.cjs +375 -0
- package/dist/{chunk-UPYIFH2H.cjs → chunk-JWLRBDDC.cjs} +2 -2
- package/dist/{chunk-OLGQZRW6.mjs → chunk-JZBU7V4D.mjs} +37 -17
- package/dist/{chunk-ONG4RDW3.mjs → chunk-JZGL2PIH.mjs} +13 -3
- package/dist/chunk-K63OWRY2.mjs +22 -0
- package/dist/{chunk-TUPKMMXT.mjs → chunk-K6HIIWUB.mjs} +1 -1
- package/dist/{chunk-MESQF2JC.mjs → chunk-K6SXMVXO.mjs} +2 -2
- package/dist/{chunk-L2JG337G.cjs → chunk-K6VFYFOY.cjs} +33 -31
- package/dist/{chunk-TKK5QHKZ.mjs → chunk-KDO6T6OB.mjs} +3 -3
- package/dist/{chunk-EZ34EHQP.mjs → chunk-KI3MU7B5.mjs} +1 -1
- package/dist/{chunk-GHNW564E.mjs → chunk-KSZK34HU.mjs} +30 -10
- package/dist/{chunk-IT6WRNGB.cjs → chunk-KWCZKJYU.cjs} +1541 -679
- package/dist/{chunk-DVKH2RVN.cjs → chunk-LDEXTX4I.cjs} +70 -57
- package/dist/{chunk-ECKQFEX2.mjs → chunk-LENKRGBV.mjs} +8 -6
- package/dist/{chunk-XBSKPLHF.cjs → chunk-LR4KP3I7.cjs} +2 -2
- package/dist/{chunk-HEPJIKKQ.cjs → chunk-MCSRMEQV.cjs} +2 -2
- package/dist/{chunk-DQF3QLOH.mjs → chunk-ME7RVELR.mjs} +3 -2
- package/dist/{chunk-VFXE6NWR.mjs → chunk-MGKWYPE3.mjs} +2 -1
- package/dist/{chunk-TZVUF5JJ.mjs → chunk-MGZVDX4R.mjs} +5 -5
- package/dist/{chunk-MGKW5XZE.cjs → chunk-MMDKYJ5V.cjs} +7 -7
- package/dist/{chunk-SK7QSNWE.mjs → chunk-MNJDNTGO.mjs} +1 -1
- package/dist/{chunk-5Y2P454O.cjs → chunk-MTBDJ326.cjs} +6 -5
- package/dist/{chunk-FIR62CR3.mjs → chunk-MV7NWU23.mjs} +1 -1
- package/dist/{chunk-7ONGIFYX.cjs → chunk-MZ4CRSY7.cjs} +481 -171
- package/dist/{chunk-O4F3JUST.mjs → chunk-NDDRTFN4.mjs} +4 -0
- package/dist/{chunk-4IHMHFQB.cjs → chunk-NG2EZ6QS.cjs} +28 -1
- package/dist/{chunk-XBSLKXBL.mjs → chunk-NT4W4H52.mjs} +52 -35
- package/dist/{chunk-UAQD67HM.mjs → chunk-NVOMQLI2.mjs} +16 -2
- package/dist/{chunk-R62SF5R4.mjs → chunk-OB45EAQL.mjs} +6 -1
- package/dist/{chunk-V56632LA.cjs → chunk-OCNV4CI2.cjs} +39 -6
- package/dist/{chunk-SYXPWJ7N.cjs → chunk-OFBLGH6V.cjs} +17 -18
- package/dist/{chunk-VQ4NWOWO.mjs → chunk-OGVTUGMU.mjs} +5 -13
- package/dist/{chunk-3UZVPO72.mjs → chunk-OIOPQ25L.mjs} +6 -7
- package/dist/{chunk-2XGBJSDV.cjs → chunk-OO7DYIJD.cjs} +73 -24
- package/dist/{chunk-27FPUFWR.mjs → chunk-P2NBQ5JI.mjs} +1 -1
- package/dist/{chunk-HZPKJRYA.cjs → chunk-PDFFYZAT.cjs} +2 -2
- package/dist/{chunk-GSVJ3IIF.cjs → chunk-PHCJJJZV.cjs} +2 -2
- package/dist/{chunk-EVMXPJCB.mjs → chunk-PKMUQ7LM.mjs} +2 -1
- package/dist/{chunk-OAJOQU5J.mjs → chunk-PLJKJJ2H.mjs} +82 -63
- package/dist/{chunk-72KCTHLV.cjs → chunk-PRL7FXG4.cjs} +113 -29
- package/dist/{chunk-6XQSPIN6.cjs → chunk-PWKAX5MS.cjs} +13 -3
- package/dist/{chunk-4ZJ5C7UJ.cjs → chunk-QIXEU2WV.cjs} +19 -10
- package/dist/{chunk-FJWN7RV4.cjs → chunk-QO43L7Z4.cjs} +38 -8
- package/dist/{chunk-X4K7TYN6.cjs → chunk-QOGIZKSO.cjs} +26 -25
- package/dist/{chunk-CNNBFGL5.cjs → chunk-QSUYB3RH.cjs} +14 -14
- package/dist/chunk-QYNZ3CTI.mjs +17 -0
- package/dist/{chunk-X3XUZWRB.mjs → chunk-R2ZHU37O.mjs} +36 -3
- package/dist/{chunk-ZIHWAN55.cjs → chunk-RE5E2G5S.cjs} +1 -1
- package/dist/{chunk-O75GQVUK.mjs → chunk-RLH5AH2M.mjs} +1 -1
- package/dist/chunk-RWR7SMD7.cjs +50 -0
- package/dist/{chunk-7PTISZSQ.cjs → chunk-S7MWSFFP.cjs} +4 -0
- package/dist/chunk-SD6JGJOM.mjs +50 -0
- package/dist/{chunk-7H4SVNC4.cjs → chunk-SPP3EZTJ.cjs} +46 -26
- package/dist/{chunk-BIF5MLTH.cjs → chunk-SQ6IWJ3H.cjs} +1 -1
- package/dist/{chunk-WVYRLP5E.mjs → chunk-T5XFZQCL.mjs} +1 -1
- package/dist/{chunk-WAY6LOQH.mjs → chunk-TEJ67GD2.mjs} +1 -1
- package/dist/{chunk-OP7LHY4Y.cjs → chunk-TNK2TVRS.cjs} +2005 -800
- package/dist/{chunk-IFTGERT3.mjs → chunk-TTXIITYA.mjs} +49 -0
- package/dist/{chunk-ZFWYCVKS.mjs → chunk-TY5KCYDE.mjs} +22 -4
- package/dist/{chunk-WYAXRIYP.cjs → chunk-UKZ6AWKZ.cjs} +10 -9
- package/dist/{chunk-UJ3R2AH2.cjs → chunk-UPOYKX4S.cjs} +5 -5
- package/dist/{chunk-VBCQ5WOI.cjs → chunk-URN7VFO7.cjs} +105 -16
- package/dist/{chunk-2DLGV2ZG.mjs → chunk-UTUS6JUH.mjs} +1 -21
- package/dist/{chunk-435QJNC2.mjs → chunk-VFNAK6A5.mjs} +4 -4
- package/dist/{chunk-WFWFECDW.mjs → chunk-VRGY3X2I.mjs} +100 -11
- package/dist/{chunk-LQNW3ABP.cjs → chunk-VX2HZGC7.cjs} +14 -14
- package/dist/chunk-W44X6IC2.cjs +97 -0
- package/dist/{chunk-A2MN5PQJ.mjs → chunk-WMLSZAKN.mjs} +9 -9
- package/dist/{chunk-672ISQIG.mjs → chunk-WPB67LE5.mjs} +379 -69
- package/dist/{chunk-3EEET2Q5.cjs → chunk-WUTFJOV7.cjs} +32 -12
- package/dist/chunk-WVQNXXNE.cjs +28 -0
- package/dist/{chunk-Y5TOT5F6.cjs → chunk-X3MHKLCO.cjs} +5 -5
- package/dist/{chunk-W2ZXMMHA.mjs → chunk-XCAQTCGK.mjs} +1 -1
- package/dist/{chunk-Z7P2BTZ3.cjs → chunk-XGTFLG73.cjs} +30 -12
- package/dist/{chunk-XCXHQBMM.mjs → chunk-Y2LU4LE5.mjs} +1 -1
- package/dist/{chunk-5J45H65F.mjs → chunk-Y5LEPEVH.mjs} +1 -1
- package/dist/{chunk-D4MRNBVF.cjs → chunk-Y6KHPJDB.cjs} +2 -2
- package/dist/{chunk-BT4SEFLC.cjs → chunk-YAEN3L2F.cjs} +3 -2
- package/dist/chunk-YFTGIHNC.mjs +26 -0
- package/dist/{chunk-KL7SHLQB.mjs → chunk-YGJ5P3TJ.mjs} +31 -1
- package/dist/{chunk-752IHQTD.cjs → chunk-YTNBCXCW.cjs} +12 -12
- package/dist/{chunk-RFKTJTWZ.mjs → chunk-YVPX5PI5.mjs} +3 -1
- package/dist/{chunk-4TVPYN32.cjs → chunk-Z3PW3DIR.cjs} +7 -7
- package/dist/{chunk-OB7VKCUZ.mjs → chunk-Z6SOXHAD.mjs} +1851 -646
- package/dist/{chunk-72KABRWN.mjs → chunk-ZJGFAW5U.mjs} +5 -3
- package/dist/{chunk-TNBJ4LZG.mjs → chunk-ZPKJPM7K.mjs} +4 -4
- package/dist/{chunk-5FE5YT2N.mjs → chunk-ZZGQD3LL.mjs} +28 -1
- package/dist/client/lifecycle.cjs +2 -2
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/client/lifecycle.mjs +1 -1
- package/dist/{client-component.d-D74pqdea.d.mts → client-component.d-BvQOxSqh.d.mts} +2 -2
- package/dist/{client-component.d-D8VcypQA.d.ts → client-component.d-DNVSLEPi.d.ts} +2 -2
- package/dist/client-plugins.cjs +2 -2
- package/dist/{client-plugins.d-D4-6hNx7.d.mts → client-plugins.d-CE1lVK2R.d.mts} +116 -373
- package/dist/{client-plugins.d-CXElzotB.d.ts → client-plugins.d-CNDqcAuf.d.ts} +116 -373
- package/dist/client-plugins.d.mts +10 -8
- package/dist/client-plugins.d.ts +10 -8
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +11 -9
- package/dist/client.d.mts +17 -15
- package/dist/client.d.ts +17 -15
- package/dist/client.mjs +10 -8
- package/dist/{config.d-qt-mE8O5.d.mts → config.d-BKIhJtmr.d.mts} +7 -2
- package/dist/{config.d-qt-mE8O5.d.ts → config.d-BKIhJtmr.d.ts} +7 -2
- package/dist/config.d.mts +10 -8
- package/dist/config.d.ts +10 -8
- package/dist/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/deferred.cjs +2 -2
- package/dist/deferred.mjs +1 -1
- package/dist/deployment.cjs +4 -2
- package/dist/deployment.d.mts +15 -1
- package/dist/deployment.d.ts +15 -1
- package/dist/deployment.mjs +3 -1
- package/dist/desktop.d.mts +11 -9
- package/dist/desktop.d.ts +11 -9
- package/dist/{devtools-NZUVNUP3.mjs → devtools-2A2GPC7B.mjs} +33 -29
- package/dist/{devtools-N2JQCMXB.cjs → devtools-R27T3BRY.cjs} +38 -34
- package/dist/docs.cjs +28 -27
- package/dist/docs.d.mts +24 -10
- package/dist/docs.d.ts +24 -10
- package/dist/docs.mjs +27 -26
- package/dist/env-types.cjs +3 -3
- package/dist/env-types.mjs +2 -2
- package/dist/environment/vite.cjs +7 -7
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +6 -6
- package/dist/{generate-route-types.d-BL2pq6xC.d.ts → generate-route-types.d-B76M5R11.d.ts} +1 -1
- package/dist/{generate-route-types.d-BoVDU8qX.d.mts → generate-route-types.d-CaGMIaNI.d.mts} +1 -1
- package/dist/headers.cjs +3 -3
- package/dist/headers.mjs +2 -2
- package/dist/image/server.d.mts +1 -1
- package/dist/image/server.d.ts +1 -1
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/{image-config.d-CeDgNyX4.d.mts → image-config.d-ByhQ0TT7.d.mts} +3 -1
- package/dist/{image-config.d-CeDgNyX4.d.ts → image-config.d-ByhQ0TT7.d.ts} +3 -1
- package/dist/image.cjs +6 -6
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/image.mjs +1 -1
- package/dist/index.cjs +148 -128
- package/dist/{index.d-SSgYDv4D.d.mts → index.d-Bt3kl19W.d.mts} +1 -1
- package/dist/{index.d-A_x10zGS.d.ts → index.d-Cx_-DaKV.d.ts} +1 -1
- package/dist/index.d.mts +39 -87
- package/dist/index.d.ts +39 -87
- package/dist/index.mjs +224 -204
- package/dist/instrumentation.cjs +3 -3
- package/dist/instrumentation.mjs +2 -2
- package/dist/{integration-orm-52GPGTHO.cjs → integrations/orm.cjs} +5 -5
- package/dist/integrations/orm.d.mts +35 -0
- package/dist/integrations/orm.d.ts +35 -0
- package/dist/{integration-orm-CO23MSFE.mjs → integrations/orm.mjs} +5 -5
- package/dist/integrations.cjs +6 -5
- package/dist/integrations.d.mts +10 -8
- package/dist/integrations.d.ts +10 -8
- package/dist/integrations.mjs +5 -4
- package/dist/internal/app-markdown-runtime.cjs +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +27 -11
- package/dist/internal/app-markdown-runtime.d.ts +27 -11
- package/dist/internal/app-markdown-runtime.mjs +3 -3
- package/dist/internal/build-runtime.cjs +76 -71
- package/dist/internal/build-runtime.d.mts +12 -10
- package/dist/internal/build-runtime.d.ts +12 -10
- package/dist/internal/build-runtime.mjs +75 -70
- package/dist/internal/cli-runtime.cjs +47 -46
- package/dist/internal/cli-runtime.mjs +46 -45
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +85 -36
- package/dist/internal/client-runtime.d.mts +44 -13
- package/dist/internal/client-runtime.d.ts +44 -13
- package/dist/internal/client-runtime.mjs +79 -30
- package/dist/internal/compression-runtime.d.mts +10 -8
- package/dist/internal/compression-runtime.d.ts +10 -8
- package/dist/internal/config-runtime.cjs +27 -26
- package/dist/internal/config-runtime.d.mts +14 -12
- package/dist/internal/config-runtime.d.ts +14 -12
- package/dist/internal/config-runtime.mjs +26 -25
- package/dist/internal/docs-precompiled-runtime.cjs +16 -5
- package/dist/internal/docs-precompiled-runtime.d.mts +7 -0
- package/dist/internal/docs-precompiled-runtime.d.ts +7 -0
- package/dist/internal/docs-precompiled-runtime.mjs +15 -4
- package/dist/internal/form-actions.cjs +7 -2
- package/dist/internal/form-actions.d.mts +10 -3
- package/dist/internal/form-actions.d.ts +10 -3
- package/dist/internal/form-actions.mjs +8 -3
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/islands-boot.cjs +6 -1
- package/dist/internal/islands-boot.mjs +6 -1
- package/dist/internal/islands-runtime.cjs +33 -4
- package/dist/internal/islands-runtime.d.mts +1 -1
- package/dist/internal/islands-runtime.d.ts +1 -1
- package/dist/internal/islands-runtime.mjs +31 -2
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-node-env.cjs +4 -2
- package/dist/internal/production-node-env.d.mts +22 -1
- package/dist/internal/production-node-env.d.ts +22 -1
- package/dist/internal/production-node-env.mjs +3 -1
- package/dist/internal/production-runtime.cjs +57 -39
- package/dist/internal/production-runtime.d.mts +27 -21
- package/dist/internal/production-runtime.d.ts +27 -21
- package/dist/internal/production-runtime.mjs +72 -54
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/server-tree.cjs +2 -2
- package/dist/internal/server-tree.d.mts +0 -5
- package/dist/internal/server-tree.d.ts +0 -5
- package/dist/internal/server-tree.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +87 -0
- package/dist/internal/vercel-edge-middleware.d.mts +39 -0
- package/dist/internal/vercel-edge-middleware.d.ts +39 -0
- package/dist/internal/vercel-edge-middleware.mjs +87 -0
- package/dist/layers-7P4RLKVX.cjs +20 -0
- package/dist/{layers-T55SA47E.mjs → layers-XQ7VFMWO.mjs} +4 -2
- package/dist/{layers.d-CcS42OGR.d.mts → layers.d-CH0bC4QL.d.mts} +2 -1
- package/dist/{layers.d-CcS42OGR.d.ts → layers.d-CH0bC4QL.d.ts} +2 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.ts → lifecycle.d-keQs5Swc.d.mts} +7 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.mts → lifecycle.d-keQs5Swc.d.ts} +7 -1
- package/dist/{manager-H5ZM3HAM.mjs → manager-JIA66YJ2.mjs} +4 -3
- package/dist/manager-JOHU6BQI.cjs +15 -0
- package/dist/markdown.cjs +7 -3
- package/dist/markdown.d.mts +10 -8
- package/dist/markdown.d.ts +10 -8
- package/dist/markdown.mjs +6 -2
- package/dist/middleware.cjs +11 -11
- package/dist/middleware.d.mts +13 -10
- package/dist/middleware.d.ts +13 -10
- package/dist/middleware.mjs +13 -13
- package/dist/mobile.d.mts +6 -6
- package/dist/mobile.d.ts +6 -6
- package/dist/mount.d-Bki4pOaJ.d.mts +38 -0
- package/dist/mount.d-DjR5aerM.d.ts +38 -0
- package/dist/{native-server-fn-handler-GLRHAYWV.mjs → native-server-fn-handler-EP5AFJYE.mjs} +5 -5
- package/dist/{native-server-fn-handler-J5MYRXN6.cjs → native-server-fn-handler-QRTXGZA4.cjs} +6 -6
- package/dist/{native-tree-7LPH57Z4.cjs → native-tree-W2SSJB3Y.cjs} +4 -4
- package/dist/{native-tree-VV6WN3GX.mjs → native-tree-Y5YQANW7.mjs} +3 -3
- package/dist/{navigation-delegate.d-GghbHJuK.d.ts → navigation-delegate.d-CtghaSP3.d.ts} +1 -1
- package/dist/{navigation-delegate.d-DQVYKoaZ.d.mts → navigation-delegate.d-VDkziXTK.d.mts} +1 -1
- package/dist/navigation.cjs +8 -7
- package/dist/navigation.d.mts +13 -11
- package/dist/navigation.d.ts +13 -11
- package/dist/navigation.mjs +7 -6
- package/dist/{nitro-DD4QCA66.mjs → nitro-NSTXT7LB.mjs} +11 -11
- package/dist/{nitro-VRDX2H4M.cjs → nitro-Y3LGITW3.cjs} +13 -13
- package/dist/node-module-bundle-LIZ2KMVW.cjs +13 -0
- package/dist/node-module-bundle-VR6NV6AI.mjs +13 -0
- package/dist/{plugin-53SY5YBS.mjs → plugin-SAS22JL7.mjs} +4 -3
- package/dist/{plugin-HZIBL3DW.cjs → plugin-WIU4GDD4.cjs} +5 -4
- package/dist/plugin.cjs +65 -63
- package/dist/plugin.d.mts +12 -10
- package/dist/plugin.d.ts +12 -10
- package/dist/plugin.mjs +64 -62
- package/dist/{production-runtime.d-Bzns3NW9.d.ts → production-runtime.d-BMyyLGBB.d.ts} +3 -57
- package/dist/{production-runtime.d-DiFa5vHW.d.mts → production-runtime.d-DMZY3OgV.d.mts} +3 -57
- package/dist/query/client.cjs +9 -7
- package/dist/query/client.mjs +5 -3
- package/dist/{render-plan.d-CcF0MeCf.d.mts → render-plan.d-BSwV8PE4.d.mts} +1 -1
- package/dist/{render-plan.d-CL_Ikfg_.d.ts → render-plan.d-i9sI4tc9.d.ts} +1 -1
- package/dist/renderer/none/server.cjs +35 -0
- package/dist/renderer/none/server.d.mts +21 -0
- package/dist/renderer/none/server.d.ts +21 -0
- package/dist/renderer/none/server.mjs +35 -0
- package/dist/renderer/react/server.cjs +3 -3
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +13 -11
- package/dist/renderer-client.d.ts +13 -11
- package/dist/renderer-client.mjs +5 -3
- package/dist/renderer.cjs +6 -2
- package/dist/renderer.d.mts +25 -2
- package/dist/renderer.d.ts +25 -2
- package/dist/renderer.mjs +5 -1
- package/dist/request.cjs +2 -2
- package/dist/{request.d-DarDOCk9.d.mts → request.d-C24FNQ_7.d.mts} +1 -1
- package/dist/{request.d-B1RnTLri.d.ts → request.d-Dgln8tuI.d.ts} +1 -1
- package/dist/request.d.mts +11 -9
- package/dist/request.d.ts +11 -9
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-BTUYCIj4.d.ts → route-rendering.d-CUylZKJA.d.ts} +1 -1
- package/dist/{route-rendering.d-D_2Ual0-.d.mts → route-rendering.d-Ds0BfwQi.d.mts} +1 -1
- package/dist/{route.d-BaVH3V0w.d.mts → route.d-DrXkpvcg.d.mts} +1 -1
- package/dist/{route.d-DBTEqifW.d.ts → route.d-hs-_cyHn.d.ts} +1 -1
- package/dist/{router.d-CMANF6da.d.ts → router.d-B56rMOFm.d.ts} +1 -1
- package/dist/{router.d-Cuv1jntg.d.mts → router.d-CFPcbqzc.d.mts} +1 -1
- package/dist/routes.cjs +3 -3
- package/dist/{routes.d-B6yFe6jm.d.ts → routes.d-9GFFNioh.d.ts} +2 -2
- package/dist/{routes.d-c2HKfrfL.d.mts → routes.d-CrEy0lJS.d.mts} +2 -2
- package/dist/routes.d.mts +10 -8
- package/dist/routes.d.ts +10 -8
- package/dist/routes.mjs +2 -2
- package/dist/{rsc-pipeline-Z7QBZOIJ.cjs → rsc-pipeline-3T7V6OUT.cjs} +30 -28
- package/dist/{rsc-pipeline-7PNVJSTR.mjs → rsc-pipeline-GA4AQWZI.mjs} +29 -27
- package/dist/{runtime-FKFCUHSK.cjs → runtime-REUTNTI5.cjs} +72 -46
- package/dist/{runtime-QQHX4BP3.mjs → runtime-ZYCKKY7L.mjs} +60 -34
- package/dist/{runtime.d-wvh4ngU0.d.mts → runtime.d-DLRO-ExG.d.mts} +11 -3
- package/dist/{runtime.d-C3RQUj6_.d.ts → runtime.d-H7k9hOQE.d.ts} +11 -3
- package/dist/{schema-dev-notice-JMXEQWIQ.mjs → schema-dev-notice-C2JINRZI.mjs} +3 -2
- package/dist/{schema-dev-notice-PLBFDTOF.cjs → schema-dev-notice-X7GG7QVB.cjs} +5 -4
- package/dist/schema.cjs +6 -2
- package/dist/schema.d-Dny9pnrm.d.mts +298 -0
- package/dist/schema.d-Dny9pnrm.d.ts +298 -0
- package/dist/schema.d.mts +1 -115
- package/dist/schema.d.ts +1 -115
- package/dist/schema.mjs +5 -1
- package/dist/server-fn-client.d.mts +2 -2
- package/dist/server-fn-client.d.ts +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-http.d-rAe7lAQc.d.mts +70 -0
- package/dist/server-http.d-rAe7lAQc.d.ts +70 -0
- package/dist/server-plugins.cjs +7 -7
- package/dist/server-plugins.d.mts +20 -12
- package/dist/server-plugins.d.ts +20 -12
- package/dist/server-plugins.mjs +8 -8
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +168 -126
- package/dist/server.d-C5FFrZAo.d.ts +57 -0
- package/dist/server.d-DgC8xew5.d.mts +57 -0
- package/dist/server.d.mts +24 -16
- package/dist/server.d.ts +24 -16
- package/dist/server.mjs +144 -102
- package/dist/{spa-router.d-m8H_Kl_B.d.ts → spa-router.d-Dr7oanhl.d.ts} +15 -5
- package/dist/{spa-router.d-WU_qS5gJ.d.mts → spa-router.d-g4CzhEH1.d.mts} +15 -5
- package/dist/testing.cjs +17 -17
- package/dist/testing.d.mts +10 -8
- package/dist/testing.d.ts +10 -8
- package/dist/testing.mjs +13 -13
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/types.d-xCIhyjOq.d.mts +233 -0
- package/dist/types.d-xCIhyjOq.d.ts +233 -0
- package/dist/{utils.d-C9dQD5Zg.d.ts → utils.d-BxxyDEb8.d.ts} +1 -1
- package/dist/{utils.d-W9IiEqmW.d.mts → utils.d-HIla3pD_.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +65 -63
- package/dist/vite.d.mts +36 -14
- package/dist/vite.d.ts +36 -14
- package/dist/vite.mjs +64 -62
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.d.mts +121 -1
- package/dist/workflows.d.ts +121 -1
- package/dist/workflows.mjs +3 -3
- package/package.json +37 -2
- package/dist/analyzer-H7SIX6BJ.cjs +0 -16
- package/dist/chunk-5YPBFMBN.cjs +0 -19
- package/dist/chunk-CLFEQGET.cjs +0 -60
- package/dist/chunk-MK5E44WP.mjs +0 -60
- package/dist/chunk-OM7WILES.mjs +0 -100
- package/dist/chunk-Q5B4LNON.mjs +0 -19
- package/dist/chunk-QPJ4MZTO.mjs +0 -60
- package/dist/chunk-R53QDV6T.cjs +0 -100
- package/dist/chunk-UYTAP4FQ.cjs +0 -60
- package/dist/layers-DMRXRL7F.cjs +0 -18
- package/dist/manager-2LUKNX2N.cjs +0 -14
- package/dist/node-module-bundle-7JHPPF6B.mjs +0 -11
- package/dist/node-module-bundle-YJGYBOGK.cjs +0 -11
- package/dist/workflows.d-CRMzQZ3k.d.mts +0 -188
- package/dist/workflows.d-CRMzQZ3k.d.ts +0 -188
- /package/dist/{chunk-QGOZLGVP.mjs → chunk-I6FIAWNT.mjs} +0 -0
- /package/dist/{chunk-XPIPMWY3.cjs → chunk-K5NI5YQR.cjs} +0 -0
- /package/dist/{chunk-NWUHS6GV.cjs → chunk-QEJWNXRI.cjs} +0 -0
- /package/dist/{chunk-FSXSQQTV.mjs → chunk-TXE4SAMV.mjs} +0 -0
- /package/dist/{chunk-ZXK2EYQW.cjs → chunk-UUQNJDGH.cjs} +0 -0
- /package/dist/{chunk-46P5KNTE.mjs → chunk-VZBAW44S.mjs} +0 -0
|
@@ -12,6 +12,7 @@ var CHUNK_ERROR_PATTERNS = [
|
|
|
12
12
|
/unable to preload CSS/i,
|
|
13
13
|
/module script failed/i
|
|
14
14
|
];
|
|
15
|
+
var LAZY_ROUTER_CHUNK = /\/farm-client-router-h[0-9a-f]+\.js(?:[?#]|$)/;
|
|
15
16
|
function isChunkLoadError(errorLike) {
|
|
16
17
|
const values = collectErrorText(errorLike);
|
|
17
18
|
if (values.some((value) => CHUNK_ERROR_PATTERNS.some((pattern) => pattern.test(value)))) {
|
|
@@ -38,6 +39,9 @@ function installChunkErrorRecovery(options = {}) {
|
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
const recover = (errorLike) => {
|
|
42
|
+
if (LAZY_ROUTER_CHUNK.test(getEventTargetAssetUrl(errorLike) ?? "")) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
41
45
|
if (!isChunkLoadError(errorLike)) {
|
|
42
46
|
return;
|
|
43
47
|
}
|
|
@@ -443,6 +443,33 @@ async function withProductionNodeEnv(operation) {
|
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
+
var REACT_RUNTIME_DIRECTORIES = [
|
|
447
|
+
"/node_modules/react/",
|
|
448
|
+
"/node_modules/react-dom/",
|
|
449
|
+
"/node_modules/react-server-dom-webpack/",
|
|
450
|
+
"/node_modules/@vitejs/plugin-rsc/dist/vendor/react-server-dom/"
|
|
451
|
+
];
|
|
452
|
+
function createReactProductionModePlugin() {
|
|
453
|
+
const nodeEnvExpression = ["process", "env", "NODE_ENV"].join(".");
|
|
454
|
+
return {
|
|
455
|
+
name: "farm-react-production-mode",
|
|
456
|
+
transform: {
|
|
457
|
+
filter: {
|
|
458
|
+
id: /\/node_modules\/(?:react(?:-dom|-server-dom-webpack)?|@vitejs\/plugin-rsc\/dist\/vendor\/react-server-dom)\//,
|
|
459
|
+
code: new RegExp(nodeEnvExpression.replace(/\./g, "\\."))
|
|
460
|
+
},
|
|
461
|
+
handler(code, id) {
|
|
462
|
+
const normalizedId = id.replace(/\\/g, "/");
|
|
463
|
+
const isReactRuntime = REACT_RUNTIME_DIRECTORIES.some(
|
|
464
|
+
(directory) => normalizedId.includes(directory)
|
|
465
|
+
);
|
|
466
|
+
if (!isReactRuntime || !code.includes(nodeEnvExpression)) return null;
|
|
467
|
+
return { code: code.split(nodeEnvExpression).join('"production"'), map: null };
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
|
|
446
473
|
|
|
447
474
|
|
|
448
475
|
|
|
@@ -455,4 +482,4 @@ async function withProductionNodeEnv(operation) {
|
|
|
455
482
|
|
|
456
483
|
|
|
457
484
|
|
|
458
|
-
exports.FARM_NODE_ENV_MODULE_FILE = FARM_NODE_ENV_MODULE_FILE; exports.FARM_NODE_ENV_MODULE_SOURCE = FARM_NODE_ENV_MODULE_SOURCE; exports.FARM_DESKTOP_ENV_MODULE_FILE = FARM_DESKTOP_ENV_MODULE_FILE; exports.FARM_DESKTOP_ENV_MODULE_SOURCE = FARM_DESKTOP_ENV_MODULE_SOURCE; exports.FARM_SERVER_MODULE_FILE = FARM_SERVER_MODULE_FILE; exports.FARM_COMPILE_CACHE_DIR = FARM_COMPILE_CACHE_DIR; exports.createFarmCompileCacheLauncher = createFarmCompileCacheLauncher; exports.createFarmNodeServerEntry = createFarmNodeServerEntry; exports.createFarmBunServerEntry = createFarmBunServerEntry; exports.withProductionNodeEnv = withProductionNodeEnv;
|
|
485
|
+
exports.FARM_NODE_ENV_MODULE_FILE = FARM_NODE_ENV_MODULE_FILE; exports.FARM_NODE_ENV_MODULE_SOURCE = FARM_NODE_ENV_MODULE_SOURCE; exports.FARM_DESKTOP_ENV_MODULE_FILE = FARM_DESKTOP_ENV_MODULE_FILE; exports.FARM_DESKTOP_ENV_MODULE_SOURCE = FARM_DESKTOP_ENV_MODULE_SOURCE; exports.FARM_SERVER_MODULE_FILE = FARM_SERVER_MODULE_FILE; exports.FARM_COMPILE_CACHE_DIR = FARM_COMPILE_CACHE_DIR; exports.createFarmCompileCacheLauncher = createFarmCompileCacheLauncher; exports.createFarmNodeServerEntry = createFarmNodeServerEntry; exports.createFarmBunServerEntry = createFarmBunServerEntry; exports.withProductionNodeEnv = withProductionNodeEnv; exports.createReactProductionModePlugin = createReactProductionModePlugin;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
normalizeRouteRules,
|
|
8
8
|
routeRulesToHeaders,
|
|
9
9
|
routeRulesToRedirects
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R2ZHU37O.mjs";
|
|
11
11
|
import {
|
|
12
12
|
assertPluginDependencies
|
|
13
13
|
} from "./chunk-XR2ZIBQK.mjs";
|
|
@@ -19,33 +19,42 @@ import {
|
|
|
19
19
|
resolveFarmAgentSitemap,
|
|
20
20
|
resolveFarmNoindexPreviews,
|
|
21
21
|
resolveFarmPerformanceConfig
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
farmCspBlocksFrameworkInlineScripts,
|
|
25
|
-
getFarmSecurityHeader,
|
|
26
|
-
resolveFarmSecurityConfig
|
|
27
|
-
} from "./chunk-22W4FNTG.mjs";
|
|
22
|
+
} from "./chunk-OGVTUGMU.mjs";
|
|
28
23
|
import {
|
|
29
24
|
resolveFarmAppManifestConfig
|
|
30
25
|
} from "./chunk-SQ5O7I3L.mjs";
|
|
31
26
|
import {
|
|
32
27
|
resolveFarmLlmsTxtConfig
|
|
33
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-YGJ5P3TJ.mjs";
|
|
29
|
+
import {
|
|
30
|
+
farmCspBlocksFrameworkInlineScripts,
|
|
31
|
+
getFarmSecurityHeader,
|
|
32
|
+
resolveFarmSecurityConfig
|
|
33
|
+
} from "./chunk-22W4FNTG.mjs";
|
|
34
34
|
import {
|
|
35
35
|
resolveFarmServerComponentsMode,
|
|
36
36
|
setFarmProjectSourceDir
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-4QENVMG7.mjs";
|
|
38
38
|
import {
|
|
39
39
|
loadFarmConfigFile,
|
|
40
40
|
resolveFarmLayers
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-E7VF3LQ5.mjs";
|
|
42
42
|
import {
|
|
43
|
+
isFarmRendererDisabled,
|
|
43
44
|
isReactRenderer,
|
|
44
45
|
resolveFarmRenderer
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-GCRT6GJG.mjs";
|
|
46
47
|
import {
|
|
47
48
|
resolveFarmImageConfig
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-AOIUYHPH.mjs";
|
|
50
|
+
import {
|
|
51
|
+
FARM_CRON_NAME_SEGMENT_PATTERN,
|
|
52
|
+
normalizeCronExpression,
|
|
53
|
+
resolveCronConfig
|
|
54
|
+
} from "./chunk-ME7RVELR.mjs";
|
|
55
|
+
import {
|
|
56
|
+
resolveServerActionsConfig
|
|
57
|
+
} from "./chunk-E46NXBNJ.mjs";
|
|
49
58
|
import {
|
|
50
59
|
resolveEnv,
|
|
51
60
|
setEnv
|
|
@@ -55,27 +64,19 @@ import {
|
|
|
55
64
|
} from "./chunk-UIJOLBUL.mjs";
|
|
56
65
|
import {
|
|
57
66
|
resolveMarkdownConfig
|
|
58
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-IFR74W6S.mjs";
|
|
59
68
|
import {
|
|
60
69
|
bundleNodeModule
|
|
61
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-MGKWYPE3.mjs";
|
|
62
71
|
import {
|
|
63
72
|
resolveWorkflowsConfig
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import {
|
|
66
|
-
FARM_CRON_NAME_SEGMENT_PATTERN,
|
|
67
|
-
normalizeCronExpression,
|
|
68
|
-
resolveCronConfig
|
|
69
|
-
} from "./chunk-DQF3QLOH.mjs";
|
|
70
|
-
import {
|
|
71
|
-
resolveServerActionsConfig
|
|
72
|
-
} from "./chunk-E46NXBNJ.mjs";
|
|
73
|
+
} from "./chunk-MGZVDX4R.mjs";
|
|
73
74
|
import {
|
|
74
75
|
resolveFarmThemeConfig
|
|
75
76
|
} from "./chunk-YWPNIYUP.mjs";
|
|
76
77
|
import {
|
|
77
78
|
resolveIntegrationPlugins
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-AJNBTOVQ.mjs";
|
|
79
80
|
import {
|
|
80
81
|
compileMiddlewareConfig
|
|
81
82
|
} from "./chunk-EDPENAVO.mjs";
|
|
@@ -93,10 +94,10 @@ import {
|
|
|
93
94
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
94
95
|
import {
|
|
95
96
|
normalizeFarmDeploymentId
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-NVOMQLI2.mjs";
|
|
97
98
|
import {
|
|
98
99
|
validateConfigRouteSource
|
|
99
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-JZGL2PIH.mjs";
|
|
100
101
|
import {
|
|
101
102
|
isFarmRedirectStatus
|
|
102
103
|
} from "./chunk-JNYFXL7X.mjs";
|
|
@@ -413,21 +414,23 @@ import path3 from "path";
|
|
|
413
414
|
// src/agent-config.ts
|
|
414
415
|
var DEFAULT_JSON_LD = { type: "WebSite" };
|
|
415
416
|
function resolveFarmAgentConfig(input, context = {}) {
|
|
417
|
+
const servesPages = context.pages !== false;
|
|
418
|
+
const pageDefaults = servesPages && !context.docs;
|
|
416
419
|
const jsonLd = input?.jsonLd;
|
|
417
420
|
return {
|
|
418
|
-
jsonLd: jsonLd === void 0 ? { ...DEFAULT_JSON_LD } : !jsonLd ? false : jsonLd === true ? {} : jsonLd,
|
|
421
|
+
jsonLd: jsonLd === void 0 ? servesPages ? { ...DEFAULT_JSON_LD } : false : !jsonLd ? false : jsonLd === true ? {} : jsonLd,
|
|
419
422
|
noindexPreviews: resolveFarmNoindexPreviews(input?.noindexPreviews),
|
|
420
423
|
// The docs engine answers /llms.txt with its own pages; a default here would replace it.
|
|
421
424
|
// llms-full.txt renders every listed page, so it stays opt-in.
|
|
422
|
-
llmsTxt: resolveFarmLlmsTxtConfig(input?.llmsTxt ?? (
|
|
425
|
+
llmsTxt: resolveFarmLlmsTxtConfig(input?.llmsTxt ?? (pageDefaults ? { full: false } : false)),
|
|
423
426
|
// Same rule as llms.txt: the docs engine answers /sitemap.xml with its own pages.
|
|
424
|
-
sitemap: resolveFarmAgentSitemap(input?.sitemap ??
|
|
427
|
+
sitemap: resolveFarmAgentSitemap(input?.sitemap ?? pageDefaults),
|
|
425
428
|
crawlers: resolveFarmAgentCrawlers(input?.crawlers),
|
|
426
429
|
apiCatalog: resolveFarmAgentBoolean(input?.apiCatalog, "apiCatalog", false),
|
|
427
430
|
aiCatalog: resolveFarmAgentBoolean(input?.aiCatalog, "aiCatalog", true),
|
|
428
431
|
manifest: resolveFarmAppManifestConfig(input?.manifest),
|
|
429
432
|
// Same rule as llms.txt: the docs engine serves its own MCP server at /mcp.
|
|
430
|
-
mcp: resolveFarmAgentBoolean(input?.mcp, "mcp",
|
|
433
|
+
mcp: resolveFarmAgentBoolean(input?.mcp, "mcp", pageDefaults)
|
|
431
434
|
};
|
|
432
435
|
}
|
|
433
436
|
function resolveFarmAgentBoolean(input, key, fallback) {
|
|
@@ -595,7 +598,7 @@ function getPresetForDeployTarget(target) {
|
|
|
595
598
|
}
|
|
596
599
|
function getDeployTargetForPreset(preset) {
|
|
597
600
|
if (!preset) return void 0;
|
|
598
|
-
if (preset === "vercel"
|
|
601
|
+
if (preset === "vercel") return "vercel";
|
|
599
602
|
if (preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module") {
|
|
600
603
|
return "cloudflare";
|
|
601
604
|
}
|
|
@@ -628,6 +631,12 @@ function detectPlatformDeployTarget(env = process.env) {
|
|
|
628
631
|
return void 0;
|
|
629
632
|
}
|
|
630
633
|
var warnedPlatformMismatches = /* @__PURE__ */ new Set();
|
|
634
|
+
function assertFarmDeployNameSupported(kind, name) {
|
|
635
|
+
if (name !== "vercel-edge") return;
|
|
636
|
+
throw new Error(
|
|
637
|
+
`Deploy ${kind} "vercel-edge" is not supported: Farm's Nitro version has no vercel-edge preset. Use the "vercel" ${kind} instead, which deploys Vercel Functions on Fluid compute.`
|
|
638
|
+
);
|
|
639
|
+
}
|
|
631
640
|
function resolveDeployConfig(config, overrides = {}) {
|
|
632
641
|
const deploy = config.deploy || {};
|
|
633
642
|
const distDir = config.distDir || ".farm";
|
|
@@ -652,6 +661,8 @@ function resolveDeployConfig(config, overrides = {}) {
|
|
|
652
661
|
const overrideTargetPreset = overrideTarget && getDeployTargetForPreset(configuredPreset) !== overrideTarget ? getPresetForDeployTarget(overrideTarget) : void 0;
|
|
653
662
|
const preset = overrides.preset || overrideTargetPreset || configuredPreset || getPresetForDeployTarget(target) || "node-server";
|
|
654
663
|
const resolvedTarget = target || getDeployTargetForPreset(preset);
|
|
664
|
+
assertFarmDeployNameSupported("preset", preset);
|
|
665
|
+
assertFarmDeployNameSupported("target", resolvedTarget);
|
|
655
666
|
if (detectedTarget && resolvedTarget !== detectedTarget) {
|
|
656
667
|
const mismatchKey = `mismatch:${resolvedTarget}:${detectedTarget}`;
|
|
657
668
|
if (!warnedPlatformMismatches.has(mismatchKey)) {
|
|
@@ -1109,7 +1120,7 @@ async function resolveConfig(userConfig, mode) {
|
|
|
1109
1120
|
integrations: () => integrations
|
|
1110
1121
|
}) : null;
|
|
1111
1122
|
let nativeServerFnAppDirs = [];
|
|
1112
|
-
const nativeServerFnPlugin = userConfig.mobile !== void 0 && userConfig.mobile !== null ? (await import("./native-server-fn-handler-
|
|
1123
|
+
const nativeServerFnPlugin = userConfig.mobile !== void 0 && userConfig.mobile !== null ? (await import("./native-server-fn-handler-EP5AFJYE.mjs")).createFarmNativeServerFnPlugin({
|
|
1113
1124
|
resolve: (await import("./internal/native-server-fns.mjs")).createFarmDevNativeServerFnResolver(
|
|
1114
1125
|
{ root, srcDir, appDirs: () => nativeServerFnAppDirs }
|
|
1115
1126
|
)
|
|
@@ -1162,7 +1173,10 @@ async function resolveConfig(userConfig, mode) {
|
|
|
1162
1173
|
ppr: false,
|
|
1163
1174
|
...userConfig.experimental
|
|
1164
1175
|
},
|
|
1165
|
-
agent: resolveFarmAgentConfig(userConfig.agent, {
|
|
1176
|
+
agent: resolveFarmAgentConfig(userConfig.agent, {
|
|
1177
|
+
docs: docs.enabled,
|
|
1178
|
+
pages: !isFarmRendererDisabled(userConfig.renderer)
|
|
1179
|
+
}),
|
|
1166
1180
|
desktop: desktopSetup?.desktop ?? null,
|
|
1167
1181
|
...userConfig.mobile !== void 0 ? { mobileClient: true } : {},
|
|
1168
1182
|
plugins: [
|
|
@@ -1182,7 +1196,10 @@ async function resolveConfig(userConfig, mode) {
|
|
|
1182
1196
|
...securityHeader ? [{ source: "/*", headers: [securityHeader] }] : []
|
|
1183
1197
|
],
|
|
1184
1198
|
routeRules,
|
|
1185
|
-
images: resolveFarmImageConfig(
|
|
1199
|
+
images: resolveFarmImageConfig(
|
|
1200
|
+
userConfig.images,
|
|
1201
|
+
isFarmRendererDisabled(userConfig.renderer) ? "none" : void 0
|
|
1202
|
+
),
|
|
1186
1203
|
performance: resolveFarmPerformanceConfig(userConfig.performance),
|
|
1187
1204
|
theme: resolveFarmThemeConfig(userConfig.theme, basePath),
|
|
1188
1205
|
publicDir: userConfig.publicDir || "public",
|
|
@@ -1206,7 +1223,7 @@ async function resolveConfig(userConfig, mode) {
|
|
|
1206
1223
|
};
|
|
1207
1224
|
assertPluginDependencies(resolved.plugins, resolved.integrations);
|
|
1208
1225
|
if (nativeServerFnPlugin) {
|
|
1209
|
-
nativeServerFnAppDirs = (await import("./layers-
|
|
1226
|
+
nativeServerFnAppDirs = (await import("./layers-XQ7VFMWO.mjs")).getFarmAppDirectories(resolved);
|
|
1210
1227
|
}
|
|
1211
1228
|
return resolved;
|
|
1212
1229
|
}
|
|
@@ -5,7 +5,7 @@ var FARM_DEPLOYMENT_COOKIE = "__farm_deployment";
|
|
|
5
5
|
var FARM_DEPLOYMENT_MISMATCH_CODE = "FARM_DEPLOYMENT_MISMATCH";
|
|
6
6
|
var FARM_DEPLOYMENT_MISMATCH_STATUS = 409;
|
|
7
7
|
function getFarmPresetRuntime(preset) {
|
|
8
|
-
if (preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module" || preset === "netlify-edge" || preset === "
|
|
8
|
+
if (preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module" || preset === "netlify-edge" || preset === "deno") {
|
|
9
9
|
return "edge";
|
|
10
10
|
}
|
|
11
11
|
if (preset === "node-server" || preset === "vercel" || preset === "netlify" || preset === "aws-lambda" || preset === "azure" || preset === "firebase" || preset === "bun" || preset === "self-host" || preset === "farm") {
|
|
@@ -132,6 +132,19 @@ function readCookie(cookieHeader, name) {
|
|
|
132
132
|
function isSafeRequestMethod(method) {
|
|
133
133
|
return ["GET", "HEAD", "OPTIONS", "QUERY"].includes(method.toUpperCase());
|
|
134
134
|
}
|
|
135
|
+
var CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG = "nodejs_compat_populate_process_env";
|
|
136
|
+
var CLOUDFLARE_DO_NOT_POPULATE_PROCESS_ENV_FLAG = "nodejs_compat_do_not_populate_process_env";
|
|
137
|
+
var CLOUDFLARE_POPULATE_PROCESS_ENV_DATE = "2025-04-01";
|
|
138
|
+
function resolveCloudflareProcessEnvFlags(wrangler) {
|
|
139
|
+
const date = wrangler.compatibility_date;
|
|
140
|
+
const flags = wrangler.compatibility_flags;
|
|
141
|
+
if (typeof date !== "string" || date >= CLOUDFLARE_POPULATE_PROCESS_ENV_DATE) return void 0;
|
|
142
|
+
if (!Array.isArray(flags) || !flags.includes("nodejs_compat")) return void 0;
|
|
143
|
+
if (flags.includes(CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG) || flags.includes(CLOUDFLARE_DO_NOT_POPULATE_PROCESS_ENV_FLAG)) {
|
|
144
|
+
return void 0;
|
|
145
|
+
}
|
|
146
|
+
return [...flags, CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG];
|
|
147
|
+
}
|
|
135
148
|
|
|
136
149
|
export {
|
|
137
150
|
FARM_DEPLOYMENT_ID_HEADER,
|
|
@@ -150,5 +163,6 @@ export {
|
|
|
150
163
|
getFarmResponseDeploymentId,
|
|
151
164
|
isFarmDeploymentMismatchResponse,
|
|
152
165
|
createFarmDeploymentMismatchError,
|
|
153
|
-
createFarmDeploymentCookie
|
|
166
|
+
createFarmDeploymentCookie,
|
|
167
|
+
resolveCloudflareProcessEnvFlags
|
|
154
168
|
};
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
// src/api/endpoint.ts
|
|
14
14
|
import { createEndpoint as betterCallEndpoint } from "better-call";
|
|
15
|
+
var ENDPOINT_FAILURE_SYMBOL = /* @__PURE__ */ Symbol.for("farm.endpoint.failure");
|
|
15
16
|
var EndpointFailure = class extends Error {
|
|
16
17
|
constructor(code, data, options) {
|
|
17
18
|
super(options.message);
|
|
@@ -19,10 +20,14 @@ var EndpointFailure = class extends Error {
|
|
|
19
20
|
this.code = code;
|
|
20
21
|
this.data = data;
|
|
21
22
|
this.status = options.status;
|
|
23
|
+
Object.defineProperty(this, ENDPOINT_FAILURE_SYMBOL, { value: true, enumerable: false });
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
function isEndpointFailure(value) {
|
|
25
|
-
|
|
27
|
+
if (value instanceof EndpointFailure) return true;
|
|
28
|
+
if (!value || typeof value !== "object") return false;
|
|
29
|
+
const candidate = value;
|
|
30
|
+
return candidate[ENDPOINT_FAILURE_SYMBOL] === true && typeof candidate.code === "string" && Number.isInteger(candidate.status) && candidate.status >= 400 && candidate.status <= 599;
|
|
26
31
|
}
|
|
27
32
|
function createEndpoint(pathOrOptions, optionsOrHandler, maybeHandler) {
|
|
28
33
|
let path;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var _chunkOYZXVBZPcjs = require('./chunk-OYZXVBZP.cjs');
|
|
4
3
|
|
|
4
|
+
var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkPWKAX5MScjs = require('./chunk-PWKAX5MS.cjs');
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
|
|
10
12
|
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
16
|
+
|
|
11
17
|
// src/route-rules.ts
|
|
12
18
|
function normalizeRouteRules(routeRules) {
|
|
13
19
|
if (!routeRules) return {};
|
|
@@ -16,7 +22,7 @@ function normalizeRouteRules(routeRules) {
|
|
|
16
22
|
for (const [source, rule] of Object.entries(routeRules)) {
|
|
17
23
|
if (!rule) continue;
|
|
18
24
|
const normalizedSource = normalizeRuleSource(source);
|
|
19
|
-
|
|
25
|
+
_chunkPWKAX5MScjs.validateConfigRouteSource.call(void 0, normalizedSource, `Route rule "${source}" source`);
|
|
20
26
|
const existingSource = normalizedSources.get(normalizedSource);
|
|
21
27
|
if (existingSource !== void 0) {
|
|
22
28
|
throw new Error(
|
|
@@ -31,7 +37,7 @@ function normalizeRouteRules(routeRules) {
|
|
|
31
37
|
}
|
|
32
38
|
normalized[normalizedSource] = {
|
|
33
39
|
...rule,
|
|
34
|
-
...
|
|
40
|
+
..._chunkIUKBPBM7cjs.normalizeFarmRouteRuntimeConfig.call(void 0, rule, `Route rule "${normalizedSource}"`)
|
|
35
41
|
};
|
|
36
42
|
}
|
|
37
43
|
return normalized;
|
|
@@ -100,6 +106,31 @@ function routeRulesToNitroRouteRules(routeRules) {
|
|
|
100
106
|
}
|
|
101
107
|
return nitroRules;
|
|
102
108
|
}
|
|
109
|
+
function nitroRouteRulesBelowBasePath(nitroRules, basePath, apiServerBasePath) {
|
|
110
|
+
const prefix = _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, basePath);
|
|
111
|
+
if (!prefix) return nitroRules;
|
|
112
|
+
const isAPISource = (source) => source === apiServerBasePath || source.startsWith(`${apiServerBasePath}/`);
|
|
113
|
+
const rules = { ...nitroRules };
|
|
114
|
+
for (const [source, rule] of Object.entries(nitroRules)) {
|
|
115
|
+
if (isAPISource(source)) continue;
|
|
116
|
+
const publicSource = _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, source, prefix);
|
|
117
|
+
if (publicSource in nitroRules) continue;
|
|
118
|
+
const to = _optionalChain([rule, 'access', _ => _.redirect, 'optionalAccess', _2 => _2.to]);
|
|
119
|
+
rules[publicSource] = typeof to === "string" && to.startsWith("/") && !to.startsWith("//") ? { ...rule, redirect: { ...rule.redirect, to: _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, to, prefix) } } : rule;
|
|
120
|
+
}
|
|
121
|
+
return rules;
|
|
122
|
+
}
|
|
123
|
+
function resolveRouteRuleCorsPreflightHeaders(routeRules, pathname) {
|
|
124
|
+
if (!routeRules) return void 0;
|
|
125
|
+
let cors;
|
|
126
|
+
let headers = {};
|
|
127
|
+
const matches = Object.entries(routeRules).filter(([source]) => _chunkPWKAX5MScjs.compileConfigRoutePattern.call(void 0, source).regex.test(pathname)).sort(([left], [right]) => _chunkIUKBPBM7cjs.compareFarmRouteRuleSpecificity.call(void 0, left, right));
|
|
128
|
+
for (const [, rule] of matches) {
|
|
129
|
+
if (rule.cors !== void 0) cors = rule.cors;
|
|
130
|
+
headers = { ...headers, ...normalizeCorsHeaders(rule.cors), ...rule.headers };
|
|
131
|
+
}
|
|
132
|
+
return cors ? headers : void 0;
|
|
133
|
+
}
|
|
103
134
|
function normalizeCorsHeaders(cors) {
|
|
104
135
|
if (!cors) return {};
|
|
105
136
|
if (cors === true) {
|
|
@@ -138,4 +169,6 @@ function hasExplicitQuery(destination) {
|
|
|
138
169
|
|
|
139
170
|
|
|
140
171
|
|
|
141
|
-
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
exports.normalizeRouteRules = normalizeRouteRules; exports.routeRulesToRedirects = routeRulesToRedirects; exports.routeRulesToHeaders = routeRulesToHeaders; exports.routeRulesToNitroRouteRules = routeRulesToNitroRouteRules; exports.nitroRouteRulesBelowBasePath = nitroRouteRulesBelowBasePath; exports.resolveRouteRuleCorsPreflightHeaders = resolveRouteRuleCorsPreflightHeaders;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQEJWNXRIcjs = require('./chunk-QEJWNXRI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
|
|
@@ -17,7 +17,8 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
var _chunkXGTFLG73cjs = require('./chunk-XGTFLG73.cjs');
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
var _chunkJXIYH2NOcjs = require('./chunk-JXIYH2NO.cjs');
|
|
@@ -27,7 +28,7 @@ var _chunkE7QOEV5Zcjs = require('./chunk-E7QOEV5Z.cjs');
|
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
var
|
|
31
|
+
var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
|
|
@@ -99,7 +100,7 @@ var APIRouteManager = class {
|
|
|
99
100
|
await this.loadProgrammaticApiRoutes(appDir);
|
|
100
101
|
}
|
|
101
102
|
this.routes = new Map(
|
|
102
|
-
|
|
103
|
+
_chunkXGTFLG73cjs.mergePluginAPIRoutes.call(void 0, [...this.routes.values()], this.plugins, void 0, {
|
|
103
104
|
bodySizeLimit: this.bodySizeLimit,
|
|
104
105
|
dispatch: this.dispatch
|
|
105
106
|
}).map((route) => [route.path, route])
|
|
@@ -147,7 +148,7 @@ var APIRouteManager = class {
|
|
|
147
148
|
const routeModule = await this.loadModule(filePath);
|
|
148
149
|
const endpoints = {};
|
|
149
150
|
const availableMethods = [];
|
|
150
|
-
for (const method of
|
|
151
|
+
for (const method of _chunkXGTFLG73cjs.API_ROUTE_METHODS) {
|
|
151
152
|
if (routeModule[method]) {
|
|
152
153
|
endpoints[method] = routeModule[method];
|
|
153
154
|
availableMethods.push(method);
|
|
@@ -163,8 +164,8 @@ var APIRouteManager = class {
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
|
-
const runtimeConfig =
|
|
167
|
-
|
|
167
|
+
const runtimeConfig = _chunkIUKBPBM7cjs.normalizeFarmRouteRuntimeConfig.call(void 0,
|
|
168
|
+
_chunkIUKBPBM7cjs.getFarmRouteRuntimeConfig.call(void 0, routeModule),
|
|
168
169
|
`API route "${routePath}"`
|
|
169
170
|
);
|
|
170
171
|
this.registerRouteShape(routePath, filePath, appDir);
|
|
@@ -217,7 +218,7 @@ var APIRouteManager = class {
|
|
|
217
218
|
async loadProgrammaticApiRoutes(appDir) {
|
|
218
219
|
const candidateRoots = [path.dirname(appDir), appDir];
|
|
219
220
|
const routeFiles = Array.from(
|
|
220
|
-
new Set(candidateRoots.flatMap((srcRoot) =>
|
|
221
|
+
new Set(candidateRoots.flatMap((srcRoot) => _chunkQEJWNXRIcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot)))
|
|
221
222
|
);
|
|
222
223
|
if (routeFiles.length === 0) return;
|
|
223
224
|
const { getProgrammaticRouteManifest } = await import("./routes.cjs");
|
|
@@ -261,6 +262,7 @@ var APIRouteManager = class {
|
|
|
261
262
|
}
|
|
262
263
|
return null;
|
|
263
264
|
}
|
|
265
|
+
/** Load an app module through the server that loads the routes, as their handlers were. */
|
|
264
266
|
async loadModule(filePath) {
|
|
265
267
|
if (this.viteServer) {
|
|
266
268
|
return await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, filePath);
|
|
@@ -304,7 +306,7 @@ var APIRouteManager = class {
|
|
|
304
306
|
}
|
|
305
307
|
addProgrammaticApiRoute(filePath, route, appDir) {
|
|
306
308
|
const modulePath = _chunkE7QOEV5Zcjs.createProgrammaticRouteModuleId.call(void 0, filePath, "api", route.path);
|
|
307
|
-
const runtimeConfig =
|
|
309
|
+
const runtimeConfig = _chunkIUKBPBM7cjs.normalizeFarmRouteRuntimeConfig.call(void 0, route, `API route "${route.path}"`);
|
|
308
310
|
for (const [method, endpoint] of Object.entries(route.methods)) {
|
|
309
311
|
if (endpoint) {
|
|
310
312
|
this.addEndpoint(route.path, modulePath, method, endpoint, appDir, runtimeConfig);
|
|
@@ -329,7 +331,7 @@ var APIRouteManager = class {
|
|
|
329
331
|
const url = new URL(request.url);
|
|
330
332
|
const pathname = url.pathname;
|
|
331
333
|
const method = request.method.toUpperCase();
|
|
332
|
-
const match =
|
|
334
|
+
const match = _chunkXGTFLG73cjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
|
|
333
335
|
if (!match) {
|
|
334
336
|
return new Response(JSON.stringify({ error: "Not Found" }), {
|
|
335
337
|
status: 404,
|
|
@@ -337,26 +339,23 @@ var APIRouteManager = class {
|
|
|
337
339
|
});
|
|
338
340
|
}
|
|
339
341
|
const { route, params } = match;
|
|
340
|
-
const endpoint =
|
|
342
|
+
const endpoint = _chunkXGTFLG73cjs.resolveAPIRouteEndpoint.call(void 0, route, method);
|
|
341
343
|
if (!endpoint) {
|
|
342
344
|
return new Response(JSON.stringify({ error: "Method Not Allowed" }), {
|
|
343
345
|
status: 405,
|
|
344
346
|
headers: {
|
|
345
|
-
Allow:
|
|
347
|
+
Allow: _chunkXGTFLG73cjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
|
|
346
348
|
"Content-Type": "application/json"
|
|
347
349
|
}
|
|
348
350
|
});
|
|
349
351
|
}
|
|
350
352
|
const invoke = async () => {
|
|
351
353
|
try {
|
|
352
|
-
return await
|
|
354
|
+
return await _chunkXGTFLG73cjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, this.bodySizeLimit);
|
|
353
355
|
} catch (error) {
|
|
354
356
|
if (options.throwOnError) throw error;
|
|
355
357
|
console.error(`[API Error] ${pathname}:`, error);
|
|
356
|
-
return
|
|
357
|
-
status: 500,
|
|
358
|
-
headers: { "Content-Type": "application/json" }
|
|
359
|
-
});
|
|
358
|
+
return _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
|
|
360
359
|
}
|
|
361
360
|
};
|
|
362
361
|
return _optionalChain([this, 'access', _10 => _10.i18n, 'optionalAccess', _11 => _11.config, 'access', _12 => _12.enabled]) ? _chunkRVGLYMJMcjs._runWithFarmI18nRequest.call(void 0, this.i18n, request, invoke, {
|
|
@@ -371,7 +370,7 @@ var APIRouteManager = class {
|
|
|
371
370
|
return Boolean(this.matchRoute(pathname));
|
|
372
371
|
}
|
|
373
372
|
matchRoute(pathname) {
|
|
374
|
-
return
|
|
373
|
+
return _chunkXGTFLG73cjs.matchAPIRouteAtBasePath.call(void 0, this.routes, pathname, this.basePath);
|
|
375
374
|
}
|
|
376
375
|
/**
|
|
377
376
|
* Get all routes for client type generation
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
isFarmMetadataNoIndex
|
|
3
|
-
|
|
2
|
+
isFarmMetadataNoIndex,
|
|
3
|
+
resolveFarmAgentOrigin
|
|
4
|
+
} from "./chunk-YGJ5P3TJ.mjs";
|
|
4
5
|
import {
|
|
5
6
|
matchesFarmMarkdownRoutePattern
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IFR74W6S.mjs";
|
|
7
8
|
import {
|
|
8
9
|
applyFarmBasePath
|
|
9
10
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -161,7 +162,7 @@ function resolveRoutePatterns(value, key) {
|
|
|
161
162
|
}
|
|
162
163
|
function createFarmDefaultSitemap(sources, options) {
|
|
163
164
|
const { include, exclude } = options.config;
|
|
164
|
-
const base =
|
|
165
|
+
const base = resolveFarmAgentOrigin(options.metadataBase, options.origin);
|
|
165
166
|
const entries = /* @__PURE__ */ new Map();
|
|
166
167
|
for (const source of sources) {
|
|
167
168
|
const path = source.pattern;
|
|
@@ -180,15 +181,6 @@ function createFarmDefaultSitemap(sources, options) {
|
|
|
180
181
|
}
|
|
181
182
|
return [...entries.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([, entry]) => entry);
|
|
182
183
|
}
|
|
183
|
-
function toAbsoluteHttpOrigin(value) {
|
|
184
|
-
if (typeof value !== "string" && !(value instanceof URL)) return void 0;
|
|
185
|
-
try {
|
|
186
|
-
const url = new URL(String(value));
|
|
187
|
-
return url.protocol === "https:" || url.protocol === "http:" ? url.origin : void 0;
|
|
188
|
-
} catch {
|
|
189
|
-
return void 0;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
184
|
function isRecord(value) {
|
|
193
185
|
return Boolean(value && typeof value === "object");
|
|
194
186
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findProgrammaticRouteFilesInDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TXE4SAMV.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isFarmAPIRouteFileName
|
|
6
6
|
} from "./chunk-YX6AFPXC.mjs";
|
|
@@ -12,12 +12,13 @@ import {
|
|
|
12
12
|
} from "./chunk-NR63PD3P.mjs";
|
|
13
13
|
import {
|
|
14
14
|
API_ROUTE_METHODS,
|
|
15
|
+
createFarmInternalServerErrorResponse,
|
|
15
16
|
getAllowedAPIRouteMethods,
|
|
16
17
|
invokeAPIRouteEndpoint,
|
|
17
18
|
matchAPIRouteAtBasePath,
|
|
18
19
|
mergePluginAPIRoutes,
|
|
19
20
|
resolveAPIRouteEndpoint
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TY5KCYDE.mjs";
|
|
21
22
|
import {
|
|
22
23
|
registerAPIRouteShape
|
|
23
24
|
} from "./chunk-GWXZS7K5.mjs";
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
import {
|
|
28
29
|
getFarmRouteRuntimeConfig,
|
|
29
30
|
normalizeFarmRouteRuntimeConfig
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PKMUQ7LM.mjs";
|
|
31
32
|
import {
|
|
32
33
|
toFileModuleUrl
|
|
33
34
|
} from "./chunk-VHIXGZYH.mjs";
|
|
@@ -261,6 +262,7 @@ var APIRouteManager = class {
|
|
|
261
262
|
}
|
|
262
263
|
return null;
|
|
263
264
|
}
|
|
265
|
+
/** Load an app module through the server that loads the routes, as their handlers were. */
|
|
264
266
|
async loadModule(filePath) {
|
|
265
267
|
if (this.viteServer) {
|
|
266
268
|
return await loadFarmDevModule(this.viteServer, filePath);
|
|
@@ -353,10 +355,7 @@ var APIRouteManager = class {
|
|
|
353
355
|
} catch (error) {
|
|
354
356
|
if (options.throwOnError) throw error;
|
|
355
357
|
console.error(`[API Error] ${pathname}:`, error);
|
|
356
|
-
return
|
|
357
|
-
status: 500,
|
|
358
|
-
headers: { "Content-Type": "application/json" }
|
|
359
|
-
});
|
|
358
|
+
return createFarmInternalServerErrorResponse();
|
|
360
359
|
}
|
|
361
360
|
};
|
|
362
361
|
return this.i18n?.config.enabled ? _runWithFarmI18nRequest(this.i18n, request, invoke, {
|