@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
|
@@ -6,17 +6,19 @@ var _chunkUNJZGVPUcjs = require('./chunk-UNJZGVPU.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
|
|
10
12
|
|
|
11
13
|
// src/app-markdown-runtime.ts
|
|
12
14
|
var _url = require('url');
|
|
13
15
|
function isFarmMarkdownPageFile(filePath) {
|
|
14
16
|
return /(^|[/\\])page\.mdx?$/i.test(filePath);
|
|
15
17
|
}
|
|
16
|
-
function normalizeFarmMarkdownRoutePath(pathname) {
|
|
18
|
+
function normalizeFarmMarkdownRoutePath(pathname, routePathname) {
|
|
17
19
|
const withoutExtension = pathname.replace(/\.md$/i, "");
|
|
18
20
|
const normalized = withoutExtension.startsWith("/") ? withoutExtension : `/${withoutExtension}`;
|
|
19
|
-
return
|
|
21
|
+
return _chunkFT6KJHS3cjs._resolveFarmMarkdownIndexAlias.call(void 0, normalized.replace(/\/+$/g, "") || "/", routePathname);
|
|
20
22
|
}
|
|
21
23
|
function parseMarkdownFrontmatter(source) {
|
|
22
24
|
if (!source.startsWith("---")) {
|
|
@@ -72,16 +74,25 @@ async function evaluateMdxSource(source, filePath) {
|
|
|
72
74
|
}
|
|
73
75
|
function createFarmMarkdownRouteModule(input) {
|
|
74
76
|
const { body } = parseMarkdownFrontmatter(input.source);
|
|
75
|
-
const components = input.components || {};
|
|
76
77
|
const className = _optionalChain([input, 'access', _6 => _6.config, 'optionalAccess', _7 => _7.className]) || "farm-markdown";
|
|
77
78
|
let evaluatedPromise;
|
|
79
|
+
let componentsPromise;
|
|
78
80
|
const loadContent = async () => {
|
|
79
81
|
_nullishCoalesce(evaluatedPromise, () => ( (evaluatedPromise = evaluateMdxSource(body, input.filePath))));
|
|
80
82
|
return evaluatedPromise;
|
|
81
83
|
};
|
|
84
|
+
const loadComponents = () => {
|
|
85
|
+
const configured = input.components;
|
|
86
|
+
if (typeof configured !== "function") return configured || {};
|
|
87
|
+
_nullishCoalesce(componentsPromise, () => ( (componentsPromise = configured().catch((error) => {
|
|
88
|
+
componentsPromise = void 0;
|
|
89
|
+
throw error;
|
|
90
|
+
}))));
|
|
91
|
+
return componentsPromise;
|
|
92
|
+
};
|
|
82
93
|
async function FarmMarkdownPage(props) {
|
|
83
94
|
const { createElement } = await import("react");
|
|
84
|
-
const evaluated = await loadContent();
|
|
95
|
+
const [evaluated, components] = await Promise.all([loadContent(), loadComponents()]);
|
|
85
96
|
const MDXContent = evaluated.default;
|
|
86
97
|
return createElement(
|
|
87
98
|
"article",
|
|
@@ -160,7 +171,7 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
|
|
|
160
171
|
if (!PAGE_CHECK_DROPPED_HEADERS.has(name.toLowerCase())) headers.append(name, value);
|
|
161
172
|
}
|
|
162
173
|
headers.set("accept", "text/html");
|
|
163
|
-
headers.set(
|
|
174
|
+
headers.set(_chunkFT6KJHS3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunkFT6KJHS3cjs._getFarmMarkdownPageCheckToken.call(void 0, ));
|
|
164
175
|
const response = await options.renderPage(
|
|
165
176
|
new Request(pageUrl, {
|
|
166
177
|
method: "GET",
|
|
@@ -192,10 +203,10 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
192
203
|
}
|
|
193
204
|
const url = new URL(options.request.url);
|
|
194
205
|
const hasMarkdownExtension = url.pathname.toLowerCase().endsWith(".md");
|
|
195
|
-
if (!hasMarkdownExtension && !
|
|
206
|
+
if (!hasMarkdownExtension && !_chunkFT6KJHS3cjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
|
|
196
207
|
return null;
|
|
197
208
|
}
|
|
198
|
-
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname);
|
|
209
|
+
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname, options.routePathname);
|
|
199
210
|
const source = await options.resolveSource(targetPathname);
|
|
200
211
|
if (!source) {
|
|
201
212
|
return null;
|
|
@@ -246,7 +257,10 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
246
257
|
}
|
|
247
258
|
const headers = new Headers({
|
|
248
259
|
"Content-Type": "text/markdown; charset=utf-8",
|
|
249
|
-
"Content-Location":
|
|
260
|
+
"Content-Location": _chunkFT6KJHS3cjs._getFarmMarkdownPath.call(void 0,
|
|
261
|
+
targetPathname,
|
|
262
|
+
_optionalChain([options, 'access', _26 => _26.routePathname, 'optionalCall', _27 => _27(targetPathname)])
|
|
263
|
+
),
|
|
250
264
|
"Cache-Control": "public, s-maxage=60, stale-while-revalidate=300",
|
|
251
265
|
"X-Farm-Markdown-Route": targetPathname,
|
|
252
266
|
"X-Farm-Markdown-Source": source.filePath
|
|
@@ -254,7 +268,7 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
254
268
|
if (!hasMarkdownExtension) {
|
|
255
269
|
headers.set("Vary", "Accept");
|
|
256
270
|
}
|
|
257
|
-
return
|
|
271
|
+
return _chunkFT6KJHS3cjs.createFarmMarkdownViewResponse.call(void 0, {
|
|
258
272
|
request: options.request,
|
|
259
273
|
requestUrl: url,
|
|
260
274
|
markdown: source.source,
|
|
@@ -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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkASYOWPSRcjs = require('./chunk-ASYOWPSR.cjs');
|
|
4
4
|
|
|
5
5
|
// src/instrumentation.ts
|
|
6
6
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -9,12 +9,14 @@ var _url = require('url');
|
|
|
9
9
|
var INSTRUMENTATION_EXTENSIONS = ["ts", "mts", "js", "mjs"];
|
|
10
10
|
function resolveFarmInstrumentationFile(root, srcDir = "src") {
|
|
11
11
|
const candidates = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
.../* @__PURE__ */ new Set([
|
|
13
|
+
...INSTRUMENTATION_EXTENSIONS.map(
|
|
14
|
+
(extension) => _path2.default.join(root, srcDir, `instrumentation.${extension}`)
|
|
15
|
+
),
|
|
16
|
+
...INSTRUMENTATION_EXTENSIONS.map(
|
|
17
|
+
(extension) => _path2.default.join(root, `instrumentation.${extension}`)
|
|
18
|
+
)
|
|
19
|
+
])
|
|
18
20
|
].filter((candidate) => _fs2.default.existsSync(candidate));
|
|
19
21
|
if (candidates.length > 1) {
|
|
20
22
|
throw new Error(
|
|
@@ -30,7 +32,7 @@ async function loadFarmInstrumentation(filePath, root) {
|
|
|
30
32
|
const outputDirectory = _path2.default.join(root, ".farm", ".instrumentation-loader");
|
|
31
33
|
const outputFile = _path2.default.join(outputDirectory, "instrumentation.mjs");
|
|
32
34
|
await _fs2.default.promises.mkdir(outputDirectory, { recursive: true });
|
|
33
|
-
await
|
|
35
|
+
await _chunkASYOWPSRcjs.bundleNodeModule.call(void 0, {
|
|
34
36
|
root,
|
|
35
37
|
entry: filePath,
|
|
36
38
|
outfile: outputFile,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isExplicitFarmServerComponentsMode,
|
|
3
3
|
resolveFarmServerComponentsMode
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4QENVMG7.mjs";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-JSDV2NUN.mjs";
|
|
@@ -93,7 +93,7 @@ function formatFarmRscBlockingMessage(blockingKeys) {
|
|
|
93
93
|
var warnedFallback = false;
|
|
94
94
|
async function resolveFarmRscCheckConfig(config, root, mode) {
|
|
95
95
|
if (!config?.extends) return config;
|
|
96
|
-
const { resolveFarmLayers } = await import("./layers-
|
|
96
|
+
const { resolveFarmLayers } = await import("./layers-XQ7VFMWO.mjs");
|
|
97
97
|
return (await resolveFarmLayers(config, { root, mode })).config;
|
|
98
98
|
}
|
|
99
99
|
function farmAppUsesRscPipeline(config, root) {
|
|
@@ -113,14 +113,25 @@ function farmAppUsesRscPipeline(config, root) {
|
|
|
113
113
|
throw new Error(`[Farm.js] ${formatFarmRscBlockingMessage(status.blockingKeys)}`);
|
|
114
114
|
}
|
|
115
115
|
if (status.ignoredKeys.length > 0) {
|
|
116
|
-
logger.warn(
|
|
117
|
-
`[Farm.js] experimental.serverComponents runs on the RSC pipeline, which does not run ${formatKeys(
|
|
118
|
-
status.ignoredKeys
|
|
119
|
-
)} yet. ${status.ignoredKeys.length === 1 ? "It is" : "They are"} ignored.`
|
|
120
|
-
);
|
|
116
|
+
logger.warn(`[Farm.js] ${formatFarmRscIgnoredMessage(status.ignoredKeys)}`);
|
|
121
117
|
}
|
|
122
118
|
return true;
|
|
123
119
|
}
|
|
120
|
+
function formatFarmRscIgnoredMessage(ignoredKeys) {
|
|
121
|
+
const others = ignoredKeys.filter((key) => key !== "plugins");
|
|
122
|
+
const clauses = [];
|
|
123
|
+
if (others.length > 0) {
|
|
124
|
+
clauses.push(
|
|
125
|
+
`does not run ${formatKeys(others)} yet. ${others.length === 1 ? "It is" : "They are"} ignored.`
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
if (others.length < ignoredKeys.length) {
|
|
129
|
+
clauses.push(
|
|
130
|
+
"runs only the `configure` and browser `client` hooks of `plugins` and ignores their other hooks."
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
return `experimental.serverComponents runs on the RSC pipeline, which ${clauses.join(" It also ")}`;
|
|
134
|
+
}
|
|
124
135
|
|
|
125
136
|
export {
|
|
126
137
|
FARM_RSC_PACKAGES,
|
|
@@ -1,4 +1,4 @@
|
|
|
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
3
|
|
|
4
4
|
var _chunkRI3EVPKDcjs = require('./chunk-RI3EVPKD.cjs');
|
|
@@ -16,6 +16,9 @@ var _chunkQQ44FYROcjs = require('./chunk-QQ44FYRO.cjs');
|
|
|
16
16
|
var _chunkPENBZAHJcjs = require('./chunk-PENBZAHJ.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
|
|
20
|
+
|
|
21
|
+
|
|
19
22
|
|
|
20
23
|
|
|
21
24
|
var _chunk6IOZPJ3Icjs = require('./chunk-6IOZPJ3I.cjs');
|
|
@@ -26,10 +29,10 @@ var _chunkCQL5ZGFUcjs = require('./chunk-CQL5ZGFU.cjs');
|
|
|
26
29
|
|
|
27
30
|
|
|
28
31
|
|
|
29
|
-
var
|
|
32
|
+
var _chunkI7J5RLGOcjs = require('./chunk-I7J5RLGO.cjs');
|
|
30
33
|
|
|
31
34
|
|
|
32
|
-
var
|
|
35
|
+
var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
|
|
33
36
|
|
|
34
37
|
// src/client/metadata-reconciler.ts
|
|
35
38
|
var MANAGED_ATTRIBUTE = _chunk6IOZPJ3Icjs.FARM_METADATA_ATTRIBUTE;
|
|
@@ -92,6 +95,14 @@ function applyFarmMetadataToDocument(metadata, pathname) {
|
|
|
92
95
|
|
|
93
96
|
// src/client/spa-router.ts
|
|
94
97
|
var MAX_CONCURRENT_VIEWPORT_PREFETCHES = 4;
|
|
98
|
+
var MAX_PAGE_DATA_REDIRECTS = 20;
|
|
99
|
+
var FarmPageDataRedirectSignal = class extends Error {
|
|
100
|
+
constructor(redirect) {
|
|
101
|
+
super(`Page data redirected to ${redirect.location}`);
|
|
102
|
+
this.redirect = redirect;
|
|
103
|
+
this.name = "FarmPageDataRedirect";
|
|
104
|
+
}
|
|
105
|
+
};
|
|
95
106
|
var FARM_PAGE_STATE_KEY = "__farmPageState";
|
|
96
107
|
var FARM_INTERCEPT_FROM_KEY = "__farmInterceptFrom";
|
|
97
108
|
var FARM_HISTORY_INDEX_KEY = "__farmHistoryIndex";
|
|
@@ -217,7 +228,10 @@ var SPARouter = class {
|
|
|
217
228
|
/**
|
|
218
229
|
* Navigate to a new URL
|
|
219
230
|
*/
|
|
220
|
-
|
|
231
|
+
navigate(href, options = {}) {
|
|
232
|
+
return this.runNavigation(href, options, 0);
|
|
233
|
+
}
|
|
234
|
+
async runNavigation(href, options, redirectCount) {
|
|
221
235
|
const {
|
|
222
236
|
replace = false,
|
|
223
237
|
scroll = true,
|
|
@@ -255,15 +269,17 @@ var SPARouter = class {
|
|
|
255
269
|
}
|
|
256
270
|
const from = window.location.pathname + window.location.search;
|
|
257
271
|
const action = replace ? "replace" : "push";
|
|
258
|
-
if (
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
this.
|
|
272
|
+
if (redirectCount === 0) {
|
|
273
|
+
if (await this.shouldBlockNavigation({ from, to: fullPath, action })) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (!(refresh && fullPath === from) && await _chunkJIBEFLQ7cjs.runFarmNavigationDelegates.call(void 0, { url: url.href, from, to: fullPath, action })) {
|
|
277
|
+
this.cancelActiveNavigation();
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (this.options.scrollRestoration) {
|
|
281
|
+
this.saveScrollPosition(window.location.pathname + window.location.search);
|
|
282
|
+
}
|
|
267
283
|
}
|
|
268
284
|
const navigation = this.startNavigation({
|
|
269
285
|
from,
|
|
@@ -278,13 +294,17 @@ var SPARouter = class {
|
|
|
278
294
|
action: replace ? "replace" : "push"
|
|
279
295
|
})]);
|
|
280
296
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
281
|
-
const pageData = await
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
297
|
+
const pageData = await this.fetchPageData(
|
|
298
|
+
fullPath,
|
|
299
|
+
true,
|
|
300
|
+
from,
|
|
301
|
+
refresh,
|
|
302
|
+
navigation.controller.signal,
|
|
303
|
+
true
|
|
304
|
+
);
|
|
285
305
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
286
306
|
if (clientNavigation) {
|
|
287
|
-
await _optionalChain([this, 'access',
|
|
307
|
+
await _optionalChain([this, 'access', _15 => _15.clientPlugins, 'optionalAccess', _16 => _16.markNavigationLoaded, 'call', _17 => _17(clientNavigation, pageData)]);
|
|
288
308
|
}
|
|
289
309
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
290
310
|
await this.runViewTransition(
|
|
@@ -302,20 +322,53 @@ var SPARouter = class {
|
|
|
302
322
|
);
|
|
303
323
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
304
324
|
if (clientNavigation) {
|
|
305
|
-
await _optionalChain([this, 'access',
|
|
306
|
-
void _optionalChain([this, 'access',
|
|
325
|
+
await _optionalChain([this, 'access', _18 => _18.clientPlugins, 'optionalAccess', _19 => _19.resolveNavigation, 'call', _20 => _20(clientNavigation)]);
|
|
326
|
+
void _optionalChain([this, 'access', _21 => _21.clientPlugins, 'optionalAccess', _22 => _22.scheduleNavigationRendered, 'call', _23 => _23(clientNavigation)]);
|
|
307
327
|
}
|
|
308
328
|
this.finishNavigation(navigation);
|
|
309
329
|
} catch (error) {
|
|
310
330
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
331
|
+
if (error instanceof FarmPageDataRedirectSignal) {
|
|
332
|
+
await this.followPageDataRedirect(
|
|
333
|
+
error.redirect,
|
|
334
|
+
url,
|
|
335
|
+
options,
|
|
336
|
+
redirectCount,
|
|
337
|
+
clientNavigation
|
|
338
|
+
);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
311
341
|
if (clientNavigation) {
|
|
312
|
-
await _optionalChain([this, 'access',
|
|
342
|
+
await _optionalChain([this, 'access', _24 => _24.clientPlugins, 'optionalAccess', _25 => _25.failNavigation, 'call', _26 => _26(clientNavigation, error)]);
|
|
313
343
|
}
|
|
314
344
|
this.finishNavigation(navigation);
|
|
315
345
|
console.error("[Farm.js] Navigation error:", error);
|
|
316
346
|
window.location.href = href;
|
|
317
347
|
}
|
|
318
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Continue a navigation whose page data redirected, as a document load
|
|
351
|
+
* follows a server redirect: the target takes the history entry the
|
|
352
|
+
* redirecting URL would have had, inherits its fragment when the target has
|
|
353
|
+
* none, and leaves the app when it is cross-origin.
|
|
354
|
+
*/
|
|
355
|
+
followPageDataRedirect(redirect, from, options, redirectCount, clientNavigation) {
|
|
356
|
+
if (clientNavigation) _optionalChain([this, 'access', _27 => _27.clientPlugins, 'optionalAccess', _28 => _28.cancelNavigation, 'optionalCall', _29 => _29(clientNavigation, "superseded")]);
|
|
357
|
+
const target = resolvePageDataRedirectTarget(redirect.location, from);
|
|
358
|
+
const replace = options.replace === true || target !== null && target.pathname + target.search === window.location.pathname + window.location.search;
|
|
359
|
+
if (!target || redirectCount >= MAX_PAGE_DATA_REDIRECTS) {
|
|
360
|
+
this.cancelActiveNavigation();
|
|
361
|
+
const documentURL = (_nullishCoalesce(target, () => ( from))).href;
|
|
362
|
+
if (replace) window.location.replace(documentURL);
|
|
363
|
+
else window.location.assign(documentURL);
|
|
364
|
+
return Promise.resolve();
|
|
365
|
+
}
|
|
366
|
+
return this.runNavigation(
|
|
367
|
+
target.href,
|
|
368
|
+
{ ...options, replace, refresh: true },
|
|
369
|
+
redirectCount + 1
|
|
370
|
+
);
|
|
371
|
+
}
|
|
319
372
|
/**
|
|
320
373
|
* Re-render the active route from the server while preserving the document,
|
|
321
374
|
* shared layouts, client runtime, and browser history entry.
|
|
@@ -343,9 +396,11 @@ var SPARouter = class {
|
|
|
343
396
|
if (this.isCached(fullPath, interceptFrom)) return;
|
|
344
397
|
this.prefetchingUrls.add(fullPath);
|
|
345
398
|
try {
|
|
346
|
-
await this.fetchPageData(fullPath, false, interceptFrom);
|
|
399
|
+
await this.fetchPageData(fullPath, false, interceptFrom, false, void 0, true);
|
|
347
400
|
} catch (error) {
|
|
348
|
-
|
|
401
|
+
if (!(error instanceof FarmPageDataRedirectSignal)) {
|
|
402
|
+
console.warn("[Farm.js] Prefetch failed:", href, error);
|
|
403
|
+
}
|
|
349
404
|
} finally {
|
|
350
405
|
this.prefetchingUrls.delete(fullPath);
|
|
351
406
|
}
|
|
@@ -561,7 +616,7 @@ var SPARouter = class {
|
|
|
561
616
|
/**
|
|
562
617
|
* Fetch page data from cache or server
|
|
563
618
|
*/
|
|
564
|
-
async fetchPageData(path, recover = true, interceptFrom, fresh = false, signal) {
|
|
619
|
+
async fetchPageData(path, recover = true, interceptFrom, fresh = false, signal, readDocument = false) {
|
|
565
620
|
const cacheKey = getPageDataCacheKey(path, interceptFrom);
|
|
566
621
|
const cached = fresh ? void 0 : this.cache.get(cacheKey);
|
|
567
622
|
if (cached && Date.now() - cached.timestamp < this.options.cacheMaxAge) {
|
|
@@ -603,6 +658,16 @@ var SPARouter = class {
|
|
|
603
658
|
}
|
|
604
659
|
};
|
|
605
660
|
try {
|
|
661
|
+
const documentData = readDocument && this.options.fetchNavigationDocument ? await this.options.fetchNavigationDocument(path, {
|
|
662
|
+
signal,
|
|
663
|
+
refresh: fresh,
|
|
664
|
+
prefetch: !recover
|
|
665
|
+
}) : null;
|
|
666
|
+
if (documentData) {
|
|
667
|
+
if (!recover) cacheData(documentData);
|
|
668
|
+
_optionalChain([prefetch2, 'optionalAccess', _45 => _45.resolve, 'call', _46 => _46(documentData)]);
|
|
669
|
+
return documentData;
|
|
670
|
+
}
|
|
606
671
|
return await this.requestPageData(
|
|
607
672
|
path,
|
|
608
673
|
recover,
|
|
@@ -610,10 +675,10 @@ var SPARouter = class {
|
|
|
610
675
|
activeLayoutChain,
|
|
611
676
|
signal,
|
|
612
677
|
cacheData,
|
|
613
|
-
_optionalChain([prefetch2, 'optionalAccess',
|
|
678
|
+
_optionalChain([prefetch2, 'optionalAccess', _47 => _47.resolve])
|
|
614
679
|
);
|
|
615
680
|
} finally {
|
|
616
|
-
_optionalChain([prefetch2, 'optionalAccess',
|
|
681
|
+
_optionalChain([prefetch2, 'optionalAccess', _48 => _48.resolve, 'call', _49 => _49(void 0)]);
|
|
617
682
|
if (prefetch2 && this.pendingPrefetches.get(prefetchKey) === prefetch2) {
|
|
618
683
|
this.pendingPrefetches.delete(prefetchKey);
|
|
619
684
|
}
|
|
@@ -622,7 +687,7 @@ var SPARouter = class {
|
|
|
622
687
|
async requestPageData(path, recover, interceptFrom, activeLayoutChain, signal, cacheData, resolvePrefetch) {
|
|
623
688
|
const response = await fetch(`/__farm/page-data?path=${encodeURIComponent(path)}`, {
|
|
624
689
|
signal,
|
|
625
|
-
headers:
|
|
690
|
+
headers: _chunkI7J5RLGOcjs.createFarmDeploymentRequestHeaders.call(void 0, this.options.deploymentId, {
|
|
626
691
|
Accept: "application/x-farm-deferred+json, application/json",
|
|
627
692
|
"X-Farm-SPA": "1",
|
|
628
693
|
...activeLayoutChain ? { "X-Farm-Layout-Chain": activeLayoutChain } : {},
|
|
@@ -631,8 +696,8 @@ var SPARouter = class {
|
|
|
631
696
|
..._chunkCQL5ZGFUcjs.getFarmIslandValueHeaders.call(void 0, )
|
|
632
697
|
})
|
|
633
698
|
});
|
|
634
|
-
if (
|
|
635
|
-
const error =
|
|
699
|
+
if (_chunkI7J5RLGOcjs.isFarmDeploymentMismatchResponse.call(void 0, response, this.options.deploymentId)) {
|
|
700
|
+
const error = _chunkI7J5RLGOcjs.createFarmDeploymentMismatchError.call(void 0,
|
|
636
701
|
response,
|
|
637
702
|
this.options.deploymentId || "unknown"
|
|
638
703
|
);
|
|
@@ -642,24 +707,26 @@ var SPARouter = class {
|
|
|
642
707
|
}
|
|
643
708
|
throw error;
|
|
644
709
|
}
|
|
710
|
+
const redirect = await _chunkRWR7SMD7cjs.readFarmPageDataRedirect.call(void 0, response);
|
|
711
|
+
if (redirect) throw new FarmPageDataRedirectSignal(redirect);
|
|
645
712
|
if (!response.ok) {
|
|
646
713
|
throw new Error(`Failed to fetch page data: ${response.status}`);
|
|
647
714
|
}
|
|
648
715
|
const isDeferredResponse = (response.headers.get("Content-Type") || "").toLowerCase().startsWith("application/x-farm-deferred+json");
|
|
649
716
|
if (!isDeferredResponse) {
|
|
650
|
-
const data2 = await
|
|
717
|
+
const data2 = await _chunkDBYNZIIQcjs.readDeferredDataResponse.call(void 0, response);
|
|
651
718
|
cacheData(data2);
|
|
652
|
-
_optionalChain([resolvePrefetch, 'optionalCall',
|
|
719
|
+
_optionalChain([resolvePrefetch, 'optionalCall', _50 => _50(data2)]);
|
|
653
720
|
return data2;
|
|
654
721
|
}
|
|
655
|
-
_optionalChain([resolvePrefetch, 'optionalCall',
|
|
722
|
+
_optionalChain([resolvePrefetch, 'optionalCall', _51 => _51(void 0)]);
|
|
656
723
|
let data;
|
|
657
724
|
let streamCompleted = false;
|
|
658
725
|
const markStreamComplete = () => {
|
|
659
726
|
streamCompleted = true;
|
|
660
727
|
if (data) cacheData(data);
|
|
661
728
|
};
|
|
662
|
-
data = await
|
|
729
|
+
data = await _chunkDBYNZIIQcjs.readDeferredDataResponse.call(void 0, response, {
|
|
663
730
|
onComplete: markStreamComplete
|
|
664
731
|
});
|
|
665
732
|
if (streamCompleted) cacheData(data);
|
|
@@ -711,7 +778,7 @@ var SPARouter = class {
|
|
|
711
778
|
}
|
|
712
779
|
const path = window.location.pathname + window.location.search;
|
|
713
780
|
const from = _nullishCoalesce(this.currentHistoryPath, () => ( path));
|
|
714
|
-
if (path === from && window.location.hash !== this.currentHistoryHash && _optionalChain([event, 'access',
|
|
781
|
+
if (path === from && window.location.hash !== this.currentHistoryHash && _optionalChain([event, 'access', _52 => _52.state, 'optionalAccess', _53 => _53[FARM_INTERCEPT_FROM_KEY]]) === this.currentInterceptFrom) {
|
|
715
782
|
this.cancelActiveNavigation();
|
|
716
783
|
this.currentHistoryHash = window.location.hash;
|
|
717
784
|
this.currentHistoryIndex = readHistoryIndex(event.state);
|
|
@@ -727,7 +794,7 @@ var SPARouter = class {
|
|
|
727
794
|
}
|
|
728
795
|
this.currentHistoryPath = path;
|
|
729
796
|
this.currentHistoryHash = window.location.hash;
|
|
730
|
-
this.currentInterceptFrom = _optionalChain([event, 'access',
|
|
797
|
+
this.currentInterceptFrom = _optionalChain([event, 'access', _54 => _54.state, 'optionalAccess', _55 => _55[FARM_INTERCEPT_FROM_KEY]]);
|
|
731
798
|
this.currentHistoryIndex = readHistoryIndex(event.state);
|
|
732
799
|
const navigation = this.startNavigation({
|
|
733
800
|
from,
|
|
@@ -736,13 +803,13 @@ var SPARouter = class {
|
|
|
736
803
|
});
|
|
737
804
|
let clientNavigation;
|
|
738
805
|
try {
|
|
739
|
-
clientNavigation = await _optionalChain([this, 'access',
|
|
806
|
+
clientNavigation = await _optionalChain([this, 'access', _56 => _56.clientPlugins, 'optionalAccess', _57 => _57.beginNavigation, 'call', _58 => _58({
|
|
740
807
|
from: null,
|
|
741
808
|
to: window.location.href,
|
|
742
809
|
action: "pop"
|
|
743
810
|
})]);
|
|
744
811
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
745
|
-
const interceptFrom = typeof _optionalChain([event, 'access',
|
|
812
|
+
const interceptFrom = typeof _optionalChain([event, 'access', _59 => _59.state, 'optionalAccess', _60 => _60[FARM_INTERCEPT_FROM_KEY]]) === "string" ? event.state[FARM_INTERCEPT_FROM_KEY] : void 0;
|
|
746
813
|
const pageData = await this.fetchPageData(
|
|
747
814
|
path,
|
|
748
815
|
true,
|
|
@@ -752,7 +819,7 @@ var SPARouter = class {
|
|
|
752
819
|
);
|
|
753
820
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
754
821
|
if (clientNavigation) {
|
|
755
|
-
await _optionalChain([this, 'access',
|
|
822
|
+
await _optionalChain([this, 'access', _61 => _61.clientPlugins, 'optionalAccess', _62 => _62.markNavigationLoaded, 'call', _63 => _63(clientNavigation, pageData)]);
|
|
756
823
|
}
|
|
757
824
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
758
825
|
this.updateDocumentMetadata(pageData.metadata);
|
|
@@ -775,14 +842,24 @@ var SPARouter = class {
|
|
|
775
842
|
this.restoreScrollElements(destinationPath);
|
|
776
843
|
}
|
|
777
844
|
if (clientNavigation) {
|
|
778
|
-
await _optionalChain([this, 'access',
|
|
779
|
-
void _optionalChain([this, 'access',
|
|
845
|
+
await _optionalChain([this, 'access', _64 => _64.clientPlugins, 'optionalAccess', _65 => _65.resolveNavigation, 'call', _66 => _66(clientNavigation)]);
|
|
846
|
+
void _optionalChain([this, 'access', _67 => _67.clientPlugins, 'optionalAccess', _68 => _68.scheduleNavigationRendered, 'call', _69 => _69(clientNavigation)]);
|
|
780
847
|
}
|
|
781
848
|
this.finishNavigation(navigation);
|
|
782
849
|
} catch (error) {
|
|
783
850
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
851
|
+
if (error instanceof FarmPageDataRedirectSignal) {
|
|
852
|
+
await this.followPageDataRedirect(
|
|
853
|
+
error.redirect,
|
|
854
|
+
new URL(window.location.href),
|
|
855
|
+
{ replace: true },
|
|
856
|
+
0,
|
|
857
|
+
clientNavigation
|
|
858
|
+
);
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
784
861
|
if (clientNavigation) {
|
|
785
|
-
await _optionalChain([this, 'access',
|
|
862
|
+
await _optionalChain([this, 'access', _70 => _70.clientPlugins, 'optionalAccess', _71 => _71.failNavigation, 'call', _72 => _72(clientNavigation, error)]);
|
|
786
863
|
}
|
|
787
864
|
this.finishNavigation(navigation);
|
|
788
865
|
console.error("[Farm.js] Popstate navigation error:", error);
|
|
@@ -822,7 +899,7 @@ var SPARouter = class {
|
|
|
822
899
|
shouldBlockUnload() {
|
|
823
900
|
for (const blocker of this.blockers) {
|
|
824
901
|
try {
|
|
825
|
-
if (_optionalChain([this, 'access',
|
|
902
|
+
if (_optionalChain([this, 'access', _73 => _73.unloadBlockers, 'access', _74 => _74.get, 'call', _75 => _75(blocker), 'optionalCall', _76 => _76()])) return true;
|
|
826
903
|
} catch (e4) {
|
|
827
904
|
return true;
|
|
828
905
|
}
|
|
@@ -833,7 +910,7 @@ var SPARouter = class {
|
|
|
833
910
|
applyFarmMetadataToDocument(metadata, window.location.pathname);
|
|
834
911
|
}
|
|
835
912
|
startNavigation(options) {
|
|
836
|
-
_optionalChain([this, 'access',
|
|
913
|
+
_optionalChain([this, 'access', _77 => _77.activeNavigation, 'optionalAccess', _78 => _78.controller, 'access', _79 => _79.abort, 'call', _80 => _80("superseded")]);
|
|
837
914
|
const navigation = {
|
|
838
915
|
id: ++this.navigationSequence,
|
|
839
916
|
controller: new AbortController()
|
|
@@ -850,10 +927,10 @@ var SPARouter = class {
|
|
|
850
927
|
return navigation;
|
|
851
928
|
}
|
|
852
929
|
isCurrentNavigation(navigation, clientNavigation) {
|
|
853
|
-
return _optionalChain([this, 'access',
|
|
930
|
+
return _optionalChain([this, 'access', _81 => _81.activeNavigation, 'optionalAccess', _82 => _82.id]) === navigation.id && !navigation.controller.signal.aborted && !_optionalChain([clientNavigation, 'optionalAccess', _83 => _83.signal, 'access', _84 => _84.aborted]);
|
|
854
931
|
}
|
|
855
932
|
finishNavigation(navigation) {
|
|
856
|
-
if (_optionalChain([this, 'access',
|
|
933
|
+
if (_optionalChain([this, 'access', _85 => _85.activeNavigation, 'optionalAccess', _86 => _86.id]) !== navigation.id) return;
|
|
857
934
|
this.activeNavigation = void 0;
|
|
858
935
|
this.setNavigationState(IDLE_NAVIGATION_STATE);
|
|
859
936
|
}
|
|
@@ -963,7 +1040,7 @@ function readBrowserDeploymentId() {
|
|
|
963
1040
|
if (typeof window === "undefined") return void 0;
|
|
964
1041
|
const runtimeId = window.__FARM_DEPLOYMENT_ID__;
|
|
965
1042
|
if (typeof runtimeId === "string" && runtimeId) return runtimeId;
|
|
966
|
-
return _optionalChain([document, 'access',
|
|
1043
|
+
return _optionalChain([document, 'access', _87 => _87.querySelector, 'call', _88 => _88('meta[name="farm-deployment-id"]'), 'optionalAccess', _89 => _89.content]);
|
|
967
1044
|
}
|
|
968
1045
|
function dispatchDeploymentMismatch(error) {
|
|
969
1046
|
if (typeof window === "undefined" || typeof CustomEvent === "undefined") return;
|
|
@@ -1019,6 +1096,16 @@ function createHistoryState(path, pageState, currentState, interceptFrom) {
|
|
|
1019
1096
|
}
|
|
1020
1097
|
return nextState;
|
|
1021
1098
|
}
|
|
1099
|
+
function resolvePageDataRedirectTarget(location, from) {
|
|
1100
|
+
let target;
|
|
1101
|
+
try {
|
|
1102
|
+
target = new URL(location, from);
|
|
1103
|
+
} catch (e9) {
|
|
1104
|
+
return null;
|
|
1105
|
+
}
|
|
1106
|
+
if (!target.hash && from.hash) target.hash = from.hash;
|
|
1107
|
+
return target;
|
|
1108
|
+
}
|
|
1022
1109
|
function getPageDataCacheKey(path, interceptFrom) {
|
|
1023
1110
|
return interceptFrom ? `${path}
|
|
1024
1111
|
intercept:${interceptFrom}` : path;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
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 _chunkFJWN7RV4cjs = require('./chunk-FJWN7RV4.cjs');
|
|
4
3
|
|
|
4
|
+
var _chunkQO43L7Z4cjs = require('./chunk-QO43L7Z4.cjs');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
var _chunkFT6KJHS3cjs = require('./chunk-FT6KJHS3.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -161,17 +162,17 @@ 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 = _chunkQO43L7Z4cjs.resolveFarmAgentOrigin.call(void 0, options.metadataBase, options.origin);
|
|
165
166
|
const entries = /* @__PURE__ */ new Map();
|
|
166
167
|
for (const source of sources) {
|
|
167
168
|
const path = source.pattern;
|
|
168
169
|
if (path.includes("[") || path.includes("(") || entries.has(path)) continue;
|
|
169
|
-
if (include.length && !include.some((pattern) =>
|
|
170
|
+
if (include.length && !include.some((pattern) => _chunkFT6KJHS3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
170
171
|
continue;
|
|
171
172
|
}
|
|
172
|
-
if (exclude.some((pattern) =>
|
|
173
|
+
if (exclude.some((pattern) => _chunkFT6KJHS3cjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
173
174
|
const module = isRecord(source.module) ? source.module : void 0;
|
|
174
|
-
if (
|
|
175
|
+
if (_chunkQO43L7Z4cjs.isFarmMetadataNoIndex.call(void 0, _optionalChain([module, 'optionalAccess', _2 => _2.metadata]))) continue;
|
|
175
176
|
if (_optionalChain([module, 'optionalAccess', _3 => _3.__farmRouteGuard])) continue;
|
|
176
177
|
entries.set(path, {
|
|
177
178
|
url: new URL(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, path, options.basePath), base).href,
|
|
@@ -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 (e2) {
|
|
189
|
-
return void 0;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
184
|
function isRecord(value) {
|
|
193
185
|
return Boolean(value && typeof value === "object");
|
|
194
186
|
}
|
|
@@ -566,7 +558,7 @@ function applyFarmPreviewRobotsTag(response) {
|
|
|
566
558
|
try {
|
|
567
559
|
response.headers.set("X-Robots-Tag", FARM_PREVIEW_ROBOTS_TAG);
|
|
568
560
|
return response;
|
|
569
|
-
} catch (
|
|
561
|
+
} catch (e2) {
|
|
570
562
|
const headers = new Headers(response.headers);
|
|
571
563
|
headers.set("X-Robots-Tag", FARM_PREVIEW_ROBOTS_TAG);
|
|
572
564
|
return new Response(response.body, {
|