@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
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
// src/client/route-announcer.ts
|
|
2
|
+
var FARM_ROUTE_ANNOUNCER_ID = "farm-route-announcer";
|
|
3
|
+
var FARM_ROUTE_ANNOUNCEMENT_DELAY_MS = 60;
|
|
4
|
+
var VISUALLY_HIDDEN = "position:absolute;top:0;left:0;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap";
|
|
5
|
+
function readFarmRouteAnnouncement(target) {
|
|
6
|
+
const document = target.document;
|
|
7
|
+
const heading = document.querySelector("h1");
|
|
8
|
+
return document.title.trim() || (heading?.innerText || heading?.textContent || "").trim() || target.location.pathname;
|
|
9
|
+
}
|
|
10
|
+
function getAnnouncerRegion(document) {
|
|
11
|
+
let region = document.getElementById(FARM_ROUTE_ANNOUNCER_ID);
|
|
12
|
+
if (!region) {
|
|
13
|
+
region = document.createElement("div");
|
|
14
|
+
region.id = FARM_ROUTE_ANNOUNCER_ID;
|
|
15
|
+
region.setAttribute("aria-live", "assertive");
|
|
16
|
+
region.setAttribute("aria-atomic", "true");
|
|
17
|
+
region.style.cssText = VISUALLY_HIDDEN;
|
|
18
|
+
document.body.appendChild(region);
|
|
19
|
+
}
|
|
20
|
+
return region;
|
|
21
|
+
}
|
|
22
|
+
function createFarmRouteAnnouncer(target = typeof window === "undefined" ? void 0 : window) {
|
|
23
|
+
if (!target?.document) return () => {
|
|
24
|
+
};
|
|
25
|
+
let pathname = target.location.pathname;
|
|
26
|
+
let title = target.document.title;
|
|
27
|
+
let timer;
|
|
28
|
+
return () => {
|
|
29
|
+
const document = target.document;
|
|
30
|
+
if (!document.body) return;
|
|
31
|
+
const nextPathname = target.location.pathname;
|
|
32
|
+
const nextTitle = document.title;
|
|
33
|
+
if (nextPathname === pathname && nextTitle === title) return;
|
|
34
|
+
pathname = nextPathname;
|
|
35
|
+
title = nextTitle;
|
|
36
|
+
const message = readFarmRouteAnnouncement(target);
|
|
37
|
+
const region = getAnnouncerRegion(document);
|
|
38
|
+
region.textContent = "";
|
|
39
|
+
clearTimeout(timer);
|
|
40
|
+
timer = setTimeout(() => {
|
|
41
|
+
region.textContent = message;
|
|
42
|
+
}, FARM_ROUTE_ANNOUNCEMENT_DELAY_MS);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
1
46
|
// src/client/plugin.ts
|
|
2
47
|
function defineClient(definition) {
|
|
3
48
|
return definition;
|
|
@@ -42,6 +87,8 @@ var FarmClientPluginManager = class {
|
|
|
42
87
|
isProd: options.isProd ?? !options.isDev,
|
|
43
88
|
window: options.window ?? (typeof window !== "undefined" ? window : void 0)
|
|
44
89
|
};
|
|
90
|
+
this.announceRoute = options.announceRoutes === false ? () => {
|
|
91
|
+
} : createFarmRouteAnnouncer(this.options.window);
|
|
45
92
|
}
|
|
46
93
|
start() {
|
|
47
94
|
if (this.startPromise) return this.startPromise;
|
|
@@ -140,6 +187,7 @@ var FarmClientPluginManager = class {
|
|
|
140
187
|
resolve();
|
|
141
188
|
return;
|
|
142
189
|
}
|
|
190
|
+
this.announceRoute();
|
|
143
191
|
void this.runHook(
|
|
144
192
|
"navigation.rendered",
|
|
145
193
|
(instance) => instance.plugin.navigation?.rendered?.({
|
|
@@ -402,6 +450,7 @@ function isObject(value) {
|
|
|
402
450
|
}
|
|
403
451
|
|
|
404
452
|
export {
|
|
453
|
+
createFarmRouteAnnouncer,
|
|
405
454
|
defineClient,
|
|
406
455
|
FarmClientPluginManager,
|
|
407
456
|
createClientPluginManager
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isEndpointFailure,
|
|
3
3
|
resolvePluginRoutes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OB45EAQL.mjs";
|
|
5
5
|
import {
|
|
6
6
|
registerAPIRouteShape
|
|
7
7
|
} from "./chunk-GWXZS7K5.mjs";
|
|
@@ -10,9 +10,10 @@ import {
|
|
|
10
10
|
} from "./chunk-D7Y63SOY.mjs";
|
|
11
11
|
import {
|
|
12
12
|
parseRouteSchema,
|
|
13
|
+
rejectCrossSiteNonJSONBody,
|
|
13
14
|
toPublicValidationIssues,
|
|
14
15
|
validateIntegrationRequestOrigin
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GJEC5S4V.mjs";
|
|
16
17
|
import {
|
|
17
18
|
resolveFarmAPICanonicalPathname
|
|
18
19
|
} from "./chunk-2I6PUKWJ.mjs";
|
|
@@ -22,6 +23,9 @@ import {
|
|
|
22
23
|
cloneFarmRequest,
|
|
23
24
|
createFarmRequestBodyErrorResponse
|
|
24
25
|
} from "./chunk-QDWMCFTH.mjs";
|
|
26
|
+
import {
|
|
27
|
+
isMultipartSchema
|
|
28
|
+
} from "./chunk-YT3SLLZK.mjs";
|
|
25
29
|
import {
|
|
26
30
|
createStaticAPIRouteMatcher,
|
|
27
31
|
matchAPIRoute
|
|
@@ -37,7 +41,7 @@ import {
|
|
|
37
41
|
} from "./chunk-AZQXXXDX.mjs";
|
|
38
42
|
import {
|
|
39
43
|
_runWithCurrentRequest
|
|
40
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-5OFNUETM.mjs";
|
|
41
45
|
|
|
42
46
|
// src/api/plugin-route-runtime.ts
|
|
43
47
|
function mergePluginAPIRoutes(existing, plugins, expected, options = {}) {
|
|
@@ -139,6 +143,7 @@ function createPluginLocalAPI(routes, bodySizeLimit, dispatch) {
|
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
// src/api/runtime.ts
|
|
146
|
+
var CROSS_SITE_JSON_BODY_MESSAGE = "This endpoint reads a JSON body, so a request from another origin must send Content-Type: application/json. To accept form posts from other origins, wrap the body schema in multipart().";
|
|
142
147
|
var API_ROUTE_METHODS = [
|
|
143
148
|
"GET",
|
|
144
149
|
"HEAD",
|
|
@@ -213,14 +218,18 @@ async function invokeAPIRouteEndpointInContext(endpoint, request, params) {
|
|
|
213
218
|
const query = {
|
|
214
219
|
...searchParamsToObject(url.searchParams)
|
|
215
220
|
};
|
|
221
|
+
const types = endpoint.__types || {};
|
|
216
222
|
let body = void 0;
|
|
217
223
|
if (request.method.toUpperCase() !== "GET" && request.method.toUpperCase() !== "HEAD") {
|
|
224
|
+
if (types.body && !isMultipartSchema(types.body)) {
|
|
225
|
+
const rejection = rejectCrossSiteNonJSONBody(request, CROSS_SITE_JSON_BODY_MESSAGE);
|
|
226
|
+
if (rejection) return rejection;
|
|
227
|
+
}
|
|
218
228
|
const parsedBody = await readRequestBody(request);
|
|
219
229
|
if (parsedBody.error) return parsedBody.error;
|
|
220
230
|
body = parsedBody.body;
|
|
221
231
|
}
|
|
222
232
|
const headers = Object.fromEntries(request.headers.entries());
|
|
223
|
-
const types = endpoint.__types || {};
|
|
224
233
|
const queryValidation = await validateInput(types.query, query, "Invalid query parameters");
|
|
225
234
|
if (queryValidation instanceof Response) {
|
|
226
235
|
return queryValidation;
|
|
@@ -324,6 +333,13 @@ function attachEndpointInvalidations(response, keys) {
|
|
|
324
333
|
headers
|
|
325
334
|
});
|
|
326
335
|
}
|
|
336
|
+
var FARM_INTERNAL_SERVER_ERROR_BODY = JSON.stringify({ error: "Internal Server Error" });
|
|
337
|
+
function createFarmInternalServerErrorResponse() {
|
|
338
|
+
return new Response(FARM_INTERNAL_SERVER_ERROR_BODY, {
|
|
339
|
+
status: 500,
|
|
340
|
+
headers: { "Content-Type": "application/json" }
|
|
341
|
+
});
|
|
342
|
+
}
|
|
327
343
|
function createEndpointFailureResponse(failure) {
|
|
328
344
|
return new Response(
|
|
329
345
|
JSON.stringify({
|
|
@@ -449,6 +465,8 @@ export {
|
|
|
449
465
|
invokeAPIRouteEndpoint,
|
|
450
466
|
normalizeRouteResponse,
|
|
451
467
|
isWebResponse,
|
|
468
|
+
FARM_INTERNAL_SERVER_ERROR_BODY,
|
|
469
|
+
createFarmInternalServerErrorResponse,
|
|
452
470
|
createEndpointFailureResponse,
|
|
453
471
|
mergePluginAPIRoutes
|
|
454
472
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkJWLRBDDCcjs = require('./chunk-JWLRBDDC.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,15 +14,15 @@ var _chunkUPYIFH2Hcjs = require('./chunk-UPYIFH2H.cjs');
|
|
|
14
14
|
var _chunk5DX3O6TTcjs = require('./chunk-5DX3O6TT.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
17
|
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
21
18
|
|
|
22
19
|
|
|
23
20
|
var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
24
21
|
|
|
25
22
|
|
|
23
|
+
var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
|
|
24
|
+
|
|
25
|
+
|
|
26
26
|
var _chunkA25FXJ7Dcjs = require('./chunk-A25FXJ7D.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
@@ -81,19 +81,19 @@ var WebResponseHeaderMap = class extends Map {
|
|
|
81
81
|
var WebCookieJar = class {
|
|
82
82
|
constructor(request, headers) {
|
|
83
83
|
this.headers = headers;
|
|
84
|
-
this.cookies =
|
|
84
|
+
this.cookies = _chunkJWLRBDDCcjs.parseMiddlewareCookieHeader.call(void 0, request.headers.get("cookie"));
|
|
85
85
|
}
|
|
86
86
|
get(name) {
|
|
87
87
|
return this.cookies[name];
|
|
88
88
|
}
|
|
89
89
|
set(name, value, options = {}) {
|
|
90
90
|
this.cookies[name] = value;
|
|
91
|
-
const cookieString =
|
|
91
|
+
const cookieString = _chunkJWLRBDDCcjs.serializeMiddlewareCookie.call(void 0, name, value, options);
|
|
92
92
|
this.headers.appendSetCookie(cookieString);
|
|
93
93
|
}
|
|
94
94
|
delete(name, options = {}) {
|
|
95
95
|
delete this.cookies[name];
|
|
96
|
-
this.headers.appendSetCookie(
|
|
96
|
+
this.headers.appendSetCookie(_chunkJWLRBDDCcjs.serializeMiddlewareCookieDeletion.call(void 0, name, options));
|
|
97
97
|
}
|
|
98
98
|
getAll() {
|
|
99
99
|
return { ...this.cookies };
|
|
@@ -399,7 +399,7 @@ function normalizeConfigMiddleware(config) {
|
|
|
399
399
|
function normalizeFileMiddleware(modules = []) {
|
|
400
400
|
const entries = [];
|
|
401
401
|
for (const moduleEntry of modules) {
|
|
402
|
-
const normalized =
|
|
402
|
+
const normalized = _chunkJWLRBDDCcjs.normalizeMiddlewareModule.call(void 0, moduleEntry.module, moduleEntry.path);
|
|
403
403
|
if (!normalized) {
|
|
404
404
|
continue;
|
|
405
405
|
}
|
|
@@ -694,4 +694,5 @@ function _withFarmGuardedResponseCache(response) {
|
|
|
694
694
|
|
|
695
695
|
|
|
696
696
|
|
|
697
|
-
|
|
697
|
+
|
|
698
|
+
exports.matchesMiddlewareConfig = matchesMiddlewareConfig2; exports.createProductionMiddlewareRunner = createProductionMiddlewareRunner; exports.applyProductionMiddlewareHeaders = applyProductionMiddlewareHeaders; exports.CDN_CACHE_CONTROL_HEADERS = CDN_CACHE_CONTROL_HEADERS; exports._withFarmGuardedResponseCache = _withFarmGuardedResponseCache;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _chunkOWOUTKIJcjs = require('./chunk-OWOUTKIJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkQO43L7Z4cjs = require('./chunk-QO43L7Z4.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
|
|
@@ -603,12 +603,12 @@ function createFarmMetadataRouteResponse(kind, value, routeModule = {}, options
|
|
|
603
603
|
return new Response(null, { status: 405, headers: { Allow: "GET, HEAD" } });
|
|
604
604
|
}
|
|
605
605
|
if ((kind === "llms" || kind === "llms-full") && options.request) {
|
|
606
|
-
|
|
606
|
+
_chunkFT6KJHS3cjs.emitFarmAgentRead.call(void 0, options.request, kind, isResponse(value) ? value.status : 200);
|
|
607
607
|
}
|
|
608
608
|
if (isResponse(value)) {
|
|
609
609
|
return method === "HEAD" ? _chunk4DCWVSL2cjs.omitFarmResponseBody.call(void 0, value) : value;
|
|
610
610
|
}
|
|
611
|
-
const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ?
|
|
611
|
+
const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ? _chunkQO43L7Z4cjs.serializeFarmLlmsTxt.call(void 0, value) : serializeManifest(value);
|
|
612
612
|
const contentType = kind === "sitemap" ? "application/xml; charset=utf-8" : kind === "robots" || kind === "llms" || kind === "llms-full" ? "text/plain; charset=utf-8" : "application/manifest+json; charset=utf-8";
|
|
613
613
|
return new Response(method === "HEAD" ? null : body, {
|
|
614
614
|
headers: {
|
|
@@ -1,20 +1,27 @@
|
|
|
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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; } async function _asyncOptionalChain(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 = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
+
var _chunkHHLEYA4Bcjs = require('./chunk-HHLEYA4B.cjs');
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkFJMC24KGcjs = require('./chunk-FJMC24KG.cjs');
|
|
5
11
|
|
|
6
12
|
|
|
7
13
|
var _chunkXVSBALOYcjs = require('./chunk-XVSBALOY.cjs');
|
|
8
14
|
|
|
9
15
|
|
|
10
|
-
var
|
|
16
|
+
var _chunk7LK5CTUMcjs = require('./chunk-7LK5CTUM.cjs');
|
|
11
17
|
|
|
12
18
|
|
|
13
19
|
|
|
14
20
|
var _chunk65Y5SIBHcjs = require('./chunk-65Y5SIBH.cjs');
|
|
15
21
|
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
|
|
24
|
+
var _chunkJSOCDYERcjs = require('./chunk-JSOCDYER.cjs');
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
|
|
@@ -54,7 +61,7 @@ function pickImportTarget(entry) {
|
|
|
54
61
|
return void 0;
|
|
55
62
|
}
|
|
56
63
|
async function importFromApp(root, packageName, subpath = ".") {
|
|
57
|
-
const packageDir =
|
|
64
|
+
const packageDir = _chunkFJMC24KGcjs.findFarmAppPackageDir.call(void 0, root, packageName);
|
|
58
65
|
if (!packageDir) return void 0;
|
|
59
66
|
const manifest = JSON.parse(_fs.readFileSync.call(void 0, _path2.default.join(packageDir, "package.json"), "utf8"));
|
|
60
67
|
const exportsMap = manifest.exports;
|
|
@@ -81,29 +88,65 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
81
88
|
importFromApp(root, "@vitejs/plugin-rsc"),
|
|
82
89
|
importFromApp(root, "@vitejs/plugin-react")
|
|
83
90
|
]);
|
|
84
|
-
if (!pluginRsc || !viteRsc || !
|
|
91
|
+
if (!pluginRsc || !viteRsc || !_chunkFJMC24KGcjs.findFarmAppPackageDir.call(void 0, root, "react-server-dom-webpack")) {
|
|
85
92
|
throw new Error(
|
|
86
|
-
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${
|
|
93
|
+
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${_chunkFJMC24KGcjs.FARM_RSC_INSTALL_HINT}`
|
|
87
94
|
);
|
|
88
95
|
}
|
|
89
|
-
const
|
|
96
|
+
const layered = await _chunkFJMC24KGcjs.resolveFarmRscCheckConfig.call(void 0,
|
|
97
|
+
userConfig,
|
|
98
|
+
root,
|
|
99
|
+
options.command === "build" ? "production" : "development"
|
|
100
|
+
);
|
|
101
|
+
const config = await configureFarmRscPlugins(
|
|
102
|
+
{
|
|
103
|
+
...userConfig,
|
|
104
|
+
vite: typeof userConfig.vite === "function" ? userConfig.vite({}) : userConfig.vite,
|
|
105
|
+
plugins: _nullishCoalesce(_optionalChain([layered, 'optionalAccess', _2 => _2.plugins]), () => ( [])),
|
|
106
|
+
publicRuntimeConfig: _nullishCoalesce(_optionalChain([layered, 'optionalAccess', _3 => _3.publicRuntimeConfig]), () => ( {}))
|
|
107
|
+
},
|
|
108
|
+
options.command
|
|
109
|
+
);
|
|
110
|
+
const blockingKeys = _chunkFJMC24KGcjs.inspectFarmServerComponents.call(void 0, config, root).blockingKeys;
|
|
111
|
+
if (blockingKeys.length > 0) {
|
|
112
|
+
throw new Error(`[Farm.js] ${_chunkFJMC24KGcjs.formatFarmRscBlockingMessage.call(void 0, blockingKeys)}`);
|
|
113
|
+
}
|
|
114
|
+
const { plugins: vitePlugins = [], ...viteOptions } = _nullishCoalesce(config.vite, () => ( {}));
|
|
90
115
|
const rscConfig = {};
|
|
91
116
|
for (const key of FARM_RSC_CONFIG_KEYS) {
|
|
92
|
-
if (
|
|
117
|
+
if (config[key] !== void 0) rscConfig[key] = config[key];
|
|
93
118
|
}
|
|
94
|
-
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async
|
|
95
|
-
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await
|
|
119
|
+
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : await _asyncNullishCoalesce(await _asyncOptionalChain([viteReact, 'optionalAccess', async _4 => _4.default]), async () => ( (options.command === "serve" ? (await _chunk65Y5SIBHcjs.loadFarmReactPlugin.call(void 0, )).default : void 0)));
|
|
120
|
+
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await _chunkJSOCDYERcjs.loadTailwindVitePlugin.call(void 0, );
|
|
96
121
|
const platform = _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, );
|
|
97
|
-
const mobileClient =
|
|
122
|
+
const mobileClient = config.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
|
|
123
|
+
const clientPluginEntry = _chunkJSOCDYERcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
124
|
+
config.plugins,
|
|
125
|
+
root,
|
|
126
|
+
typeof config.srcDir === "string" ? config.srcDir : "src",
|
|
127
|
+
_nullishCoalesce(config.publicRuntimeConfig, () => ( {})),
|
|
128
|
+
// The RSC entry hands navigations to a mobile shell itself.
|
|
129
|
+
"web"
|
|
130
|
+
);
|
|
131
|
+
const serverPlugins = options.command === "build" ? await resolveFarmRscServerPlugins(userConfig, config, root) : void 0;
|
|
98
132
|
const farmConfig = pluginRsc.defineConfig({
|
|
99
133
|
...rscConfig,
|
|
100
134
|
...mobileClient ? { mobileClient } : {},
|
|
101
|
-
|
|
102
|
-
|
|
135
|
+
clientPlugins: {
|
|
136
|
+
empty: clientPluginEntry.empty,
|
|
137
|
+
imports: clientPluginEntry.imports,
|
|
138
|
+
registrations: clientPluginEntry.registrations
|
|
139
|
+
},
|
|
140
|
+
// Plugins with server hooks load in the production server, as in Farm's other servers, so
|
|
141
|
+
// factories such as `bot()` run there. Dev loaded them with the config already.
|
|
142
|
+
...serverPlugins ? { serverPlugins } : {},
|
|
143
|
+
...options.preset ? { preset: options.preset } : {},
|
|
144
|
+
experimental: { ...config.experimental, serverComponents: { mode: "rsc" } },
|
|
145
|
+
port: _nullishCoalesce(options.port, () => ( _optionalChain([config, 'access', _5 => _5.server, 'optionalAccess', _6 => _6.port]))),
|
|
103
146
|
plugins: [
|
|
104
147
|
...options.command === "serve" && platform === "desktop" ? [
|
|
105
148
|
_chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0,
|
|
106
|
-
typeof
|
|
149
|
+
typeof config.basePath === "string" ? config.basePath : void 0
|
|
107
150
|
)
|
|
108
151
|
] : [],
|
|
109
152
|
...tailwind ? [tailwind] : [],
|
|
@@ -114,13 +157,13 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
114
157
|
server: { environmentName: "rsc" },
|
|
115
158
|
config: {
|
|
116
159
|
preset: options.preset,
|
|
117
|
-
outputDir: options.outputDir &&
|
|
160
|
+
outputDir: options.outputDir && _chunk7LK5CTUMcjs.resolveDeployOutputPath.call(void 0, root, options.outputDir)
|
|
118
161
|
}
|
|
119
162
|
})
|
|
120
163
|
]
|
|
121
164
|
});
|
|
122
165
|
for (const key of FARM_RSC_PASSTHROUGH_KEYS) {
|
|
123
|
-
if (
|
|
166
|
+
if (config[key] !== void 0) farmConfig[key] = config[key];
|
|
124
167
|
}
|
|
125
168
|
const { mergeConfig } = await import("vite");
|
|
126
169
|
return {
|
|
@@ -131,6 +174,52 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
131
174
|
mode: options.command === "build" ? "production" : "development"
|
|
132
175
|
};
|
|
133
176
|
}
|
|
177
|
+
async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
178
|
+
const kept = _nullishCoalesce(config.plugins, () => ( []));
|
|
179
|
+
const names = new Set(
|
|
180
|
+
kept.filter((plugin) => _chunkHHLEYA4Bcjs.hasFarmServerRuntimePlugins.call(void 0, [plugin])).map((plugin) => plugin.name)
|
|
181
|
+
);
|
|
182
|
+
if (names.size === 0) return void 0;
|
|
183
|
+
const loads = (plugin) => {
|
|
184
|
+
const candidate = plugin;
|
|
185
|
+
return !!candidate && names.has(candidate.name) && _chunkHHLEYA4Bcjs.hasFarmServerRuntimePlugins.call(void 0, [candidate]);
|
|
186
|
+
};
|
|
187
|
+
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-7P4RLKVX.cjs");
|
|
188
|
+
const files = [];
|
|
189
|
+
if (userConfig.extends) {
|
|
190
|
+
const { layers } = await resolveFarmLayers(userConfig, { root, mode: "production" });
|
|
191
|
+
for (const layer of layers) {
|
|
192
|
+
if (!layer.configFile) continue;
|
|
193
|
+
const layerConfig = await loadFarmConfigFile(layer.configFile, {
|
|
194
|
+
root: layer.root,
|
|
195
|
+
cacheRoot: root
|
|
196
|
+
});
|
|
197
|
+
files.push([layer.configFile, layerConfig.plugins]);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const configFile = findFarmConfigFile(root);
|
|
201
|
+
if (configFile) files.push([configFile, userConfig.plugins]);
|
|
202
|
+
const selections = {};
|
|
203
|
+
for (const [file, plugins] of files) {
|
|
204
|
+
const entries = Array.isArray(plugins) ? plugins : [plugins];
|
|
205
|
+
const indexes = entries.flatMap(
|
|
206
|
+
(entry, index) => [entry].flat(Infinity).some(loads) ? [index] : []
|
|
207
|
+
);
|
|
208
|
+
if (indexes.length > 0) selections[_path2.default.resolve(file)] = { indexes, count: entries.length };
|
|
209
|
+
}
|
|
210
|
+
return Object.keys(selections).length > 0 ? selections : void 0;
|
|
211
|
+
}
|
|
212
|
+
async function configureFarmRscPlugins(config, command) {
|
|
213
|
+
if (config.plugins.length === 0) return config;
|
|
214
|
+
const { PluginManager } = await import("./plugin-WIU4GDD4.cjs");
|
|
215
|
+
const manager = new PluginManager({
|
|
216
|
+
config,
|
|
217
|
+
isDev: command === "serve",
|
|
218
|
+
isProd: command === "build"
|
|
219
|
+
});
|
|
220
|
+
manager.addPlugins(config.plugins);
|
|
221
|
+
return await manager.runHookSerial("config", config);
|
|
222
|
+
}
|
|
134
223
|
async function createFarmRscDevServer(userConfig, options) {
|
|
135
224
|
const { createServer } = await import("vite");
|
|
136
225
|
const { host, ...configOptions } = options;
|
|
@@ -44,28 +44,8 @@ function describeSchemaExtensionApproval(extension) {
|
|
|
44
44
|
return `schema: { allowExtend: { ${JSON.stringify(extension.owner)}: [${JSON.stringify(extension.modelKey)}] } }`;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
// src/schema-owner.ts
|
|
48
|
-
var FARM_SCHEMA_TABLES = /* @__PURE__ */ Symbol.for("farm.schema-tables");
|
|
49
|
-
function declareSchemaTables(target, declaration) {
|
|
50
|
-
Object.defineProperty(target, FARM_SCHEMA_TABLES, {
|
|
51
|
-
value: declaration,
|
|
52
|
-
enumerable: false,
|
|
53
|
-
configurable: true
|
|
54
|
-
});
|
|
55
|
-
return target;
|
|
56
|
-
}
|
|
57
|
-
function readSchemaTables(candidate) {
|
|
58
|
-
if (!candidate || typeof candidate !== "object" && typeof candidate !== "function") {
|
|
59
|
-
return void 0;
|
|
60
|
-
}
|
|
61
|
-
return candidate[FARM_SCHEMA_TABLES];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
47
|
export {
|
|
65
48
|
collectSchemaExtensions,
|
|
66
49
|
isSchemaExtensionAllowed,
|
|
67
|
-
describeSchemaExtensionApproval
|
|
68
|
-
FARM_SCHEMA_TABLES,
|
|
69
|
-
declareSchemaTables,
|
|
70
|
-
readSchemaTables
|
|
50
|
+
describeSchemaExtensionApproval
|
|
71
51
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FARM_DEFAULT_MCP_PATH,
|
|
3
3
|
FARM_DEFAULT_MCP_TOOLS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K6SXMVXO.mjs";
|
|
5
5
|
import {
|
|
6
6
|
normalizeFarmProductionSiteOrigin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-T5XFZQCL.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveFarmAppManifestConfig
|
|
10
10
|
} from "./chunk-SQ5O7I3L.mjs";
|
|
11
11
|
import {
|
|
12
12
|
emitFarmAgentRead,
|
|
13
13
|
getFarmMarkdownMirrorPath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IFR74W6S.mjs";
|
|
15
15
|
import {
|
|
16
16
|
readFarmEnvironmentValue
|
|
17
17
|
} from "./chunk-WXFY5JIY.mjs";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-QDWMCFTH.mjs";
|
|
30
30
|
import {
|
|
31
31
|
FARM_VERSION
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-F6CMGWAL.mjs";
|
|
33
33
|
import {
|
|
34
34
|
applyFarmBasePath
|
|
35
35
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
hasFarmServerRuntimePlugins
|
|
3
|
+
} from "./chunk-QYNZ3CTI.mjs";
|
|
1
4
|
import {
|
|
2
5
|
FARM_RSC_INSTALL_HINT,
|
|
3
|
-
findFarmAppPackageDir
|
|
4
|
-
|
|
6
|
+
findFarmAppPackageDir,
|
|
7
|
+
formatFarmRscBlockingMessage,
|
|
8
|
+
inspectFarmServerComponents,
|
|
9
|
+
resolveFarmRscCheckConfig
|
|
10
|
+
} from "./chunk-3Y52TWYU.mjs";
|
|
5
11
|
import {
|
|
6
12
|
createFarmDevLoopbackPlugin
|
|
7
13
|
} from "./chunk-FN5UEC7I.mjs";
|
|
8
14
|
import {
|
|
9
15
|
resolveDeployOutputPath
|
|
10
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NT4W4H52.mjs";
|
|
11
17
|
import {
|
|
12
18
|
farmDesktopDevGuardPlugin,
|
|
13
19
|
loadFarmReactPlugin
|
|
14
20
|
} from "./chunk-QOSDWGKT.mjs";
|
|
15
21
|
import {
|
|
22
|
+
generateFarmClientPluginEntryCode,
|
|
16
23
|
loadTailwindVitePlugin
|
|
17
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DXZ57EPE.mjs";
|
|
18
25
|
import {
|
|
19
26
|
resolveFarmPlatform
|
|
20
27
|
} from "./chunk-SMUW7UST.mjs";
|
|
@@ -86,24 +93,60 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
86
93
|
`[Farm.js] experimental.serverComponents runs on @farm.js/plugin and the official @vitejs/plugin-rsc. Install them: ${FARM_RSC_INSTALL_HINT}`
|
|
87
94
|
);
|
|
88
95
|
}
|
|
89
|
-
const
|
|
96
|
+
const layered = await resolveFarmRscCheckConfig(
|
|
97
|
+
userConfig,
|
|
98
|
+
root,
|
|
99
|
+
options.command === "build" ? "production" : "development"
|
|
100
|
+
);
|
|
101
|
+
const config = await configureFarmRscPlugins(
|
|
102
|
+
{
|
|
103
|
+
...userConfig,
|
|
104
|
+
vite: typeof userConfig.vite === "function" ? userConfig.vite({}) : userConfig.vite,
|
|
105
|
+
plugins: layered?.plugins ?? [],
|
|
106
|
+
publicRuntimeConfig: layered?.publicRuntimeConfig ?? {}
|
|
107
|
+
},
|
|
108
|
+
options.command
|
|
109
|
+
);
|
|
110
|
+
const blockingKeys = inspectFarmServerComponents(config, root).blockingKeys;
|
|
111
|
+
if (blockingKeys.length > 0) {
|
|
112
|
+
throw new Error(`[Farm.js] ${formatFarmRscBlockingMessage(blockingKeys)}`);
|
|
113
|
+
}
|
|
114
|
+
const { plugins: vitePlugins = [], ...viteOptions } = config.vite ?? {};
|
|
90
115
|
const rscConfig = {};
|
|
91
116
|
for (const key of FARM_RSC_CONFIG_KEYS) {
|
|
92
|
-
if (
|
|
117
|
+
if (config[key] !== void 0) rscConfig[key] = config[key];
|
|
93
118
|
}
|
|
94
119
|
const createReactPlugin = hasPluginNamed(vitePlugins, "vite:react") ? void 0 : viteReact?.default ?? (options.command === "serve" ? (await loadFarmReactPlugin()).default : void 0);
|
|
95
120
|
const tailwind = hasPluginNamed(vitePlugins, "@tailwindcss/vite") ? void 0 : await loadTailwindVitePlugin();
|
|
96
121
|
const platform = resolveFarmPlatform();
|
|
97
|
-
const mobileClient =
|
|
122
|
+
const mobileClient = config.mobile === void 0 || platform === "desktop" ? void 0 : options.command === "build" ? "entry" : platform === "mobile" ? "inline" : void 0;
|
|
123
|
+
const clientPluginEntry = generateFarmClientPluginEntryCode(
|
|
124
|
+
config.plugins,
|
|
125
|
+
root,
|
|
126
|
+
typeof config.srcDir === "string" ? config.srcDir : "src",
|
|
127
|
+
config.publicRuntimeConfig ?? {},
|
|
128
|
+
// The RSC entry hands navigations to a mobile shell itself.
|
|
129
|
+
"web"
|
|
130
|
+
);
|
|
131
|
+
const serverPlugins = options.command === "build" ? await resolveFarmRscServerPlugins(userConfig, config, root) : void 0;
|
|
98
132
|
const farmConfig = pluginRsc.defineConfig({
|
|
99
133
|
...rscConfig,
|
|
100
134
|
...mobileClient ? { mobileClient } : {},
|
|
101
|
-
|
|
102
|
-
|
|
135
|
+
clientPlugins: {
|
|
136
|
+
empty: clientPluginEntry.empty,
|
|
137
|
+
imports: clientPluginEntry.imports,
|
|
138
|
+
registrations: clientPluginEntry.registrations
|
|
139
|
+
},
|
|
140
|
+
// Plugins with server hooks load in the production server, as in Farm's other servers, so
|
|
141
|
+
// factories such as `bot()` run there. Dev loaded them with the config already.
|
|
142
|
+
...serverPlugins ? { serverPlugins } : {},
|
|
143
|
+
...options.preset ? { preset: options.preset } : {},
|
|
144
|
+
experimental: { ...config.experimental, serverComponents: { mode: "rsc" } },
|
|
145
|
+
port: options.port ?? config.server?.port,
|
|
103
146
|
plugins: [
|
|
104
147
|
...options.command === "serve" && platform === "desktop" ? [
|
|
105
148
|
farmDesktopDevGuardPlugin(
|
|
106
|
-
typeof
|
|
149
|
+
typeof config.basePath === "string" ? config.basePath : void 0
|
|
107
150
|
)
|
|
108
151
|
] : [],
|
|
109
152
|
...tailwind ? [tailwind] : [],
|
|
@@ -120,7 +163,7 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
120
163
|
]
|
|
121
164
|
});
|
|
122
165
|
for (const key of FARM_RSC_PASSTHROUGH_KEYS) {
|
|
123
|
-
if (
|
|
166
|
+
if (config[key] !== void 0) farmConfig[key] = config[key];
|
|
124
167
|
}
|
|
125
168
|
const { mergeConfig } = await import("vite");
|
|
126
169
|
return {
|
|
@@ -131,6 +174,52 @@ async function createFarmRscViteConfig(userConfig, options) {
|
|
|
131
174
|
mode: options.command === "build" ? "production" : "development"
|
|
132
175
|
};
|
|
133
176
|
}
|
|
177
|
+
async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
178
|
+
const kept = config.plugins ?? [];
|
|
179
|
+
const names = new Set(
|
|
180
|
+
kept.filter((plugin) => hasFarmServerRuntimePlugins([plugin])).map((plugin) => plugin.name)
|
|
181
|
+
);
|
|
182
|
+
if (names.size === 0) return void 0;
|
|
183
|
+
const loads = (plugin) => {
|
|
184
|
+
const candidate = plugin;
|
|
185
|
+
return !!candidate && names.has(candidate.name) && hasFarmServerRuntimePlugins([candidate]);
|
|
186
|
+
};
|
|
187
|
+
const { findFarmConfigFile, loadFarmConfigFile, resolveFarmLayers } = await import("./layers-XQ7VFMWO.mjs");
|
|
188
|
+
const files = [];
|
|
189
|
+
if (userConfig.extends) {
|
|
190
|
+
const { layers } = await resolveFarmLayers(userConfig, { root, mode: "production" });
|
|
191
|
+
for (const layer of layers) {
|
|
192
|
+
if (!layer.configFile) continue;
|
|
193
|
+
const layerConfig = await loadFarmConfigFile(layer.configFile, {
|
|
194
|
+
root: layer.root,
|
|
195
|
+
cacheRoot: root
|
|
196
|
+
});
|
|
197
|
+
files.push([layer.configFile, layerConfig.plugins]);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const configFile = findFarmConfigFile(root);
|
|
201
|
+
if (configFile) files.push([configFile, userConfig.plugins]);
|
|
202
|
+
const selections = {};
|
|
203
|
+
for (const [file, plugins] of files) {
|
|
204
|
+
const entries = Array.isArray(plugins) ? plugins : [plugins];
|
|
205
|
+
const indexes = entries.flatMap(
|
|
206
|
+
(entry, index) => [entry].flat(Infinity).some(loads) ? [index] : []
|
|
207
|
+
);
|
|
208
|
+
if (indexes.length > 0) selections[path.resolve(file)] = { indexes, count: entries.length };
|
|
209
|
+
}
|
|
210
|
+
return Object.keys(selections).length > 0 ? selections : void 0;
|
|
211
|
+
}
|
|
212
|
+
async function configureFarmRscPlugins(config, command) {
|
|
213
|
+
if (config.plugins.length === 0) return config;
|
|
214
|
+
const { PluginManager } = await import("./plugin-SAS22JL7.mjs");
|
|
215
|
+
const manager = new PluginManager({
|
|
216
|
+
config,
|
|
217
|
+
isDev: command === "serve",
|
|
218
|
+
isProd: command === "build"
|
|
219
|
+
});
|
|
220
|
+
manager.addPlugins(config.plugins);
|
|
221
|
+
return await manager.runHookSerial("config", config);
|
|
222
|
+
}
|
|
134
223
|
async function createFarmRscDevServer(userConfig, options) {
|
|
135
224
|
const { createServer } = await import("vite");
|
|
136
225
|
const { host, ...configOptions } = options;
|