@farm.js/core 0.1.36 → 0.1.37
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-BVExL8rZ.d.mts → agent-mcp-BC0bAGVF.d.mts} +1 -1
- package/dist/{agent-mcp-luzfXK-P.d.ts → agent-mcp-jyDHbQKe.d.ts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +2 -2
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +6 -6
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +4 -4
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api/runtime.mjs +3 -3
- package/dist/api.cjs +9 -8
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +8 -7
- package/dist/{app-Yfa2dsFy.d.ts → app-CKO3iN1c.d.ts} +3 -3
- package/dist/{app-BukwkFIu.d.mts → app-Cbkj9ufe.d.mts} +3 -3
- package/dist/app-markdown.cjs +5 -3
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +4 -2
- package/dist/{chunk-UVW64BCB.cjs → chunk-3A4KGQYI.cjs} +2 -2
- package/dist/{chunk-AO6RYU5N.cjs → chunk-3IP27TCG.cjs} +30 -22
- package/dist/{chunk-FDR64H6B.mjs → chunk-3KGDJLJK.mjs} +41 -2
- package/dist/{chunk-KXWRO25S.cjs → chunk-4GPOC4LN.cjs} +3 -3
- package/dist/{chunk-Z2HLU4IX.cjs → chunk-4GWRFP22.cjs} +23 -2
- package/dist/{chunk-276VJSM6.mjs → chunk-4P6ULFMD.mjs} +43 -30
- package/dist/{chunk-BPMATOP2.cjs → chunk-5BXGGEC7.cjs} +25 -20
- package/dist/{chunk-JNUWCDTF.cjs → chunk-5D2JIPLH.cjs} +2 -2
- package/dist/{chunk-AHGECQEW.mjs → chunk-666CKENS.mjs} +1 -1
- package/dist/{chunk-BO36SELV.cjs → chunk-6LGFV2CQ.cjs} +2 -2
- package/dist/{chunk-2YTDKNH3.cjs → chunk-6TJITR2B.cjs} +192 -120
- package/dist/{chunk-JZVADIOD.cjs → chunk-75X755YZ.cjs} +2 -2
- package/dist/{chunk-VQLJWDVW.cjs → chunk-7DWNJI73.cjs} +2 -2
- package/dist/{chunk-N2NAS2AM.cjs → chunk-7O5M4UKW.cjs} +2 -2
- package/dist/{chunk-BJPBQNIE.cjs → chunk-7SQ5SGYZ.cjs} +2 -2
- package/dist/{chunk-27ZWSI3W.cjs → chunk-ADOAUDQ6.cjs} +2 -2
- package/dist/{chunk-YKX5BK66.cjs → chunk-ATWHHSY2.cjs} +7 -7
- package/dist/{chunk-42NHY7HW.cjs → chunk-B5PFZLKV.cjs} +40 -9
- package/dist/{chunk-FNO7A7CM.cjs → chunk-BHY547NB.cjs} +34 -16
- package/dist/{chunk-4GLOOWKE.mjs → chunk-CQMVIOYP.mjs} +1 -1
- package/dist/{chunk-D2BB47NB.cjs → chunk-CVH2BXPY.cjs} +6 -6
- package/dist/{chunk-TKSCR644.cjs → chunk-D3C5LBQY.cjs} +2 -2
- package/dist/{chunk-PZNL3WEG.mjs → chunk-DMEPTZTI.mjs} +22 -11
- package/dist/{chunk-GQ3Z3IZI.cjs → chunk-EMMQ64QW.cjs} +18 -18
- package/dist/{chunk-OHLSEQ57.mjs → chunk-EXG5LD6B.mjs} +1 -1
- package/dist/{chunk-WZ77PUAM.mjs → chunk-FBOJ55OM.mjs} +1 -1
- package/dist/{chunk-OTC5BDGO.mjs → chunk-FGRYBX5X.mjs} +12 -7
- package/dist/{chunk-D227TIEN.cjs → chunk-FWE7LEQC.cjs} +13 -13
- package/dist/{chunk-3BU22U3M.cjs → chunk-G2TEB74S.cjs} +5 -2
- package/dist/{chunk-O6I6VWKK.mjs → chunk-HEVMCTSR.mjs} +1 -1
- package/dist/{chunk-W7LF2J2S.mjs → chunk-HMRSWN47.mjs} +1 -1
- package/dist/{chunk-JG6DJF5A.mjs → chunk-HZFM2LWQ.mjs} +22 -1
- package/dist/{chunk-35GKZR22.mjs → chunk-IAIYV4RZ.mjs} +1 -1
- package/dist/{chunk-F2SE2VDO.mjs → chunk-IHQIOZLC.mjs} +1 -1
- package/dist/{chunk-2NNMOPDN.mjs → chunk-J3ANCZKA.mjs} +4 -1
- package/dist/{chunk-C4SPBWFM.cjs → chunk-JEZO6VUR.cjs} +10 -1
- package/dist/{chunk-SC2WYWPF.mjs → chunk-JPNFPAZ4.mjs} +3 -3
- package/dist/{chunk-HOXTWRGB.mjs → chunk-K3SAEIM3.mjs} +5 -2
- package/dist/{chunk-35WV46VL.mjs → chunk-K4I4O5TS.mjs} +98 -26
- package/dist/{chunk-KN7K4VQN.mjs → chunk-KDTBF3UU.mjs} +1 -1
- package/dist/{chunk-QORUJDIV.mjs → chunk-KPFKMDM7.mjs} +2 -2
- package/dist/{chunk-YSCV4SJF.cjs → chunk-L5H2GSUC.cjs} +4 -4
- package/dist/{chunk-YDQZGSDS.mjs → chunk-LBDP3YT3.mjs} +1 -1
- package/dist/{chunk-LSZAVSGY.mjs → chunk-LBGILORX.mjs} +1 -1
- package/dist/{chunk-ADEA7PN3.cjs → chunk-LOFKRKO7.cjs} +2 -2
- package/dist/{chunk-ZWM5KGAA.cjs → chunk-LPFV45AY.cjs} +23 -20
- package/dist/{chunk-3KZS4SUS.mjs → chunk-MCIZVNOQ.mjs} +1 -1
- package/dist/{chunk-XCMCS4DA.mjs → chunk-ND2CWPOD.mjs} +2 -2
- package/dist/{chunk-S6VYG6XU.cjs → chunk-NDILNQ4L.cjs} +2 -2
- package/dist/{chunk-BPOF5U4N.mjs → chunk-NFMDCAOS.mjs} +10 -7
- package/dist/{chunk-UXFQ3UDA.cjs → chunk-NICDYKBS.cjs} +42 -3
- package/dist/{chunk-EZDQRNQ7.mjs → chunk-NNSAQX3U.mjs} +23 -5
- package/dist/{chunk-DZ5ZVB2K.cjs → chunk-NQ6QFZWD.cjs} +1 -1
- package/dist/{chunk-U4KT7QP3.cjs → chunk-OW67PDDS.cjs} +14 -1
- package/dist/{chunk-77GNHH2Z.cjs → chunk-PMQHMWZU.cjs} +3 -3
- package/dist/{chunk-NMHWYWDR.cjs → chunk-Q5FYSK45.cjs} +169 -156
- package/dist/{chunk-5SJWVY6R.mjs → chunk-QHSH7IH4.mjs} +9 -0
- package/dist/{chunk-EWET4D2Y.mjs → chunk-RRMVL6CJ.mjs} +3 -3
- package/dist/{chunk-IZY3V5XW.mjs → chunk-S3VWVTVA.mjs} +14 -1
- package/dist/{chunk-FFFW3OQ7.cjs → chunk-S6FJO323.cjs} +2 -2
- package/dist/chunk-SGBZPZUW.mjs +75 -0
- package/dist/{chunk-2ELDTQRN.mjs → chunk-TDNWPAVR.mjs} +1 -1
- package/dist/{chunk-IHNIDL6H.cjs → chunk-TO4GJ56K.cjs} +22 -11
- package/dist/{chunk-4WCZJQUO.mjs → chunk-TPLJVC7E.mjs} +37 -6
- package/dist/{chunk-NRSN7G7E.mjs → chunk-TW4GYDBJ.mjs} +1 -1
- package/dist/{chunk-FO427P6I.cjs → chunk-U6MPZ35Q.cjs} +10 -10
- package/dist/{chunk-CBJJH36A.cjs → chunk-UJZLSXUB.cjs} +3 -3
- package/dist/chunk-UXHS27O6.cjs +75 -0
- package/dist/{chunk-DQQOKWYA.cjs → chunk-VR4GD5I3.cjs} +3 -3
- package/dist/{chunk-T4OGRVNS.mjs → chunk-VXAWRDK7.mjs} +2 -2
- package/dist/{chunk-4NU4GGTC.cjs → chunk-W2YDNK66.cjs} +6 -3
- package/dist/{chunk-GQRWBCWK.mjs → chunk-WQ7T2263.mjs} +13 -5
- package/dist/chunk-WRPHYQVY.mjs +109 -0
- package/dist/chunk-WT4TGLXT.cjs +109 -0
- package/dist/{chunk-4E5AEDKY.mjs → chunk-XOPOIFTJ.mjs} +1 -1
- package/dist/{chunk-OO7GXVSR.mjs → chunk-YCKO6FRS.mjs} +1 -1
- package/dist/{chunk-MKYBIIAQ.mjs → chunk-Z5BEWYVO.mjs} +1 -1
- package/dist/{chunk-VILIPRS6.mjs → chunk-Z7LA7MHQ.mjs} +1 -1
- package/dist/{client-plugins-r1mOtSC1.d.ts → client-plugins-C8DjftDF.d.ts} +14 -0
- package/dist/{client-plugins-C3mK9Pol.d.mts → client-plugins-CV4eJ9De.d.mts} +14 -0
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +8 -8
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-JZJJY5CK.cjs → devtools-JXFQNWSH.cjs} +4 -4
- package/dist/{devtools-ERIKFEXX.mjs → devtools-KVOY2TCZ.mjs} +3 -3
- package/dist/docs.cjs +5 -5
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +4 -4
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/i18n/client.cjs +11 -11
- package/dist/i18n/client.mjs +3 -3
- package/dist/index.cjs +42 -39
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +41 -38
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +4 -2
- package/dist/internal/app-markdown-runtime.d.mts +19 -5
- package/dist/internal/app-markdown-runtime.d.ts +19 -5
- package/dist/internal/app-markdown-runtime.mjs +3 -1
- package/dist/internal/build-runtime.cjs +25 -23
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +24 -22
- package/dist/internal/cli-runtime.cjs +8 -8
- package/dist/internal/cli-runtime.mjs +7 -7
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +2 -2
- package/dist/internal/client-runtime.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +4 -4
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +3 -3
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +15 -50
- package/dist/internal/production-runtime.d.mts +8 -8
- package/dist/internal/production-runtime.d.ts +8 -8
- package/dist/internal/production-runtime.mjs +11 -46
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.cjs +8 -8
- package/dist/middleware.d.mts +6 -4
- package/dist/middleware.d.ts +6 -4
- package/dist/middleware.mjs +7 -7
- package/dist/navigation.cjs +7 -7
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +6 -6
- package/dist/plugin.cjs +19 -18
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +18 -17
- package/dist/{production-runtime-DPnsggY3.d.ts → production-runtime-C2kkrPVZ.d.ts} +1 -1
- package/dist/{production-runtime-CCeVZXst.d.mts → production-runtime-Du_FHb2-.d.mts} +1 -1
- package/dist/query/client.cjs +9 -9
- package/dist/query/client.mjs +4 -4
- package/dist/{render-plan-Cw4f5E_R.d.ts → render-plan-BnnPTpus.d.ts} +1 -1
- package/dist/{render-plan-BuGaPFe6.d.mts → render-plan-Cgx7v8tJ.d.mts} +1 -1
- package/dist/renderer-client.cjs +12 -12
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/renderer-client.mjs +4 -4
- package/dist/{request-Bkg-hERy.d.ts → request-BNWr7r5e.d.ts} +1 -1
- package/dist/{request-CsGARcAw.d.mts → request-sKayKcop.d.mts} +1 -1
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-BUZMH_64.d.ts → route-rendering-Bx4Auw6Q.d.ts} +1 -1
- package/dist/{route-rendering-f11yh5dp.d.mts → route-rendering-DWFp3Yq4.d.mts} +1 -1
- package/dist/{router-Cp6yRE8A.d.mts → router-BK6K42Ij.d.mts} +1 -1
- package/dist/{router-B8CR9GbD.d.ts → router-DnW_2tQi.d.ts} +1 -1
- package/dist/routes.cjs +2 -2
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.mjs +1 -1
- package/dist/{runtime-CQVsT330.d.ts → runtime-CA3Ei5k_.d.ts} +1 -1
- package/dist/{runtime-CAEv36S_.d.mts → runtime-DJDaCMd_.d.mts} +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +45 -44
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +23 -22
- package/dist/{spa-router-DwbqGkGj.d.mts → spa-router-D6fUA4Rn.d.mts} +2 -2
- package/dist/{spa-router-BuciWGCZ.d.ts → spa-router-Mwbd7g2L.d.ts} +2 -2
- package/dist/testing.cjs +8 -8
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +6 -6
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-CaoWKtYM.d.ts → utils-BwVcAfUR.d.ts} +1 -1
- package/dist/{utils-B9V0S_yL.d.mts → utils-p9Hs-jCc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +19 -18
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +18 -17
- package/package.json +1 -1
- package/types/middleware.d.ts +5 -1
- package/dist/chunk-FXEF4PPL.mjs +0 -47
- package/dist/chunk-XD32KALF.cjs +0 -47
- /package/dist/{chunk-SJNMVDDF.cjs → chunk-FUCSUGDM.cjs} +0 -0
- /package/dist/{chunk-UDNPLXW7.mjs → chunk-MYIZXDZA.mjs} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk5D2JIPLHcjs = require('./chunk-5D2JIPLH.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -42,7 +42,7 @@ var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _chunkLOFKRKO7cjs = require('./chunk-LOFKRKO7.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
@@ -73,7 +73,7 @@ var _chunk3SDFA7UFcjs = require('./chunk-3SDFA7UF.cjs');
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
var
|
|
76
|
+
var _chunk4GPOC4LNcjs = require('./chunk-4GPOC4LN.cjs');
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
@@ -154,12 +154,12 @@ var _chunkVEKFLAQMcjs = require('./chunk-VEKFLAQM.cjs');
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
var
|
|
157
|
+
var _chunk75X755YZcjs = require('./chunk-75X755YZ.cjs');
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
var
|
|
162
|
+
var _chunkB5PFZLKVcjs = require('./chunk-B5PFZLKV.cjs');
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
@@ -196,10 +196,10 @@ var _chunk6QQDAAAZcjs = require('./chunk-6QQDAAAZ.cjs');
|
|
|
196
196
|
|
|
197
197
|
|
|
198
198
|
|
|
199
|
-
var
|
|
199
|
+
var _chunkUJZLSXUBcjs = require('./chunk-UJZLSXUB.cjs');
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
var
|
|
202
|
+
var _chunkLPFV45AYcjs = require('./chunk-LPFV45AY.cjs');
|
|
203
203
|
|
|
204
204
|
|
|
205
205
|
|
|
@@ -209,7 +209,10 @@ var _chunkM7MKQXAFcjs = require('./chunk-M7MKQXAF.cjs');
|
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
var
|
|
212
|
+
var _chunkG2TEB74Scjs = require('./chunk-G2TEB74S.cjs');
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
var _chunkUXHS27O6cjs = require('./chunk-UXHS27O6.cjs');
|
|
213
216
|
|
|
214
217
|
|
|
215
218
|
var _chunk4PPEPOZZcjs = require('./chunk-4PPEPOZZ.cjs');
|
|
@@ -218,11 +221,11 @@ var _chunk4PPEPOZZcjs = require('./chunk-4PPEPOZZ.cjs');
|
|
|
218
221
|
var _chunkMQ3H6LT5cjs = require('./chunk-MQ3H6LT5.cjs');
|
|
219
222
|
|
|
220
223
|
|
|
221
|
-
var
|
|
224
|
+
var _chunkU6MPZ35Qcjs = require('./chunk-U6MPZ35Q.cjs');
|
|
222
225
|
|
|
223
226
|
|
|
224
227
|
|
|
225
|
-
var
|
|
228
|
+
var _chunkFUCSUGDMcjs = require('./chunk-FUCSUGDM.cjs');
|
|
226
229
|
|
|
227
230
|
|
|
228
231
|
|
|
@@ -237,7 +240,7 @@ var _chunkXJXBIP67cjs = require('./chunk-XJXBIP67.cjs');
|
|
|
237
240
|
var _chunkLYLEZIG3cjs = require('./chunk-LYLEZIG3.cjs');
|
|
238
241
|
|
|
239
242
|
|
|
240
|
-
var
|
|
243
|
+
var _chunkNDILNQ4Lcjs = require('./chunk-NDILNQ4L.cjs');
|
|
241
244
|
|
|
242
245
|
|
|
243
246
|
var _chunk75RZHGLScjs = require('./chunk-75RZHGLS.cjs');
|
|
@@ -322,7 +325,7 @@ var _chunkUQZ4AYTHcjs = require('./chunk-UQZ4AYTH.cjs');
|
|
|
322
325
|
var _chunkKNBBQHO2cjs = require('./chunk-KNBBQHO2.cjs');
|
|
323
326
|
|
|
324
327
|
|
|
325
|
-
var
|
|
328
|
+
var _chunkNQ6QFZWDcjs = require('./chunk-NQ6QFZWD.cjs');
|
|
326
329
|
|
|
327
330
|
|
|
328
331
|
|
|
@@ -360,7 +363,7 @@ var _chunkQBK2AA4Ucjs = require('./chunk-QBK2AA4U.cjs');
|
|
|
360
363
|
var _chunkNYJMY3JAcjs = require('./chunk-NYJMY3JA.cjs');
|
|
361
364
|
|
|
362
365
|
|
|
363
|
-
var
|
|
366
|
+
var _chunkADOAUDQ6cjs = require('./chunk-ADOAUDQ6.cjs');
|
|
364
367
|
|
|
365
368
|
|
|
366
369
|
var _chunkYX3DBN4Mcjs = require('./chunk-YX3DBN4M.cjs');
|
|
@@ -375,10 +378,10 @@ var _chunkOX6O6WVAcjs = require('./chunk-OX6O6WVA.cjs');
|
|
|
375
378
|
|
|
376
379
|
|
|
377
380
|
|
|
378
|
-
var
|
|
381
|
+
var _chunkNICDYKBScjs = require('./chunk-NICDYKBS.cjs');
|
|
379
382
|
|
|
380
383
|
|
|
381
|
-
var
|
|
384
|
+
var _chunkOW67PDDScjs = require('./chunk-OW67PDDS.cjs');
|
|
382
385
|
|
|
383
386
|
|
|
384
387
|
|
|
@@ -2043,8 +2046,8 @@ var _RouteManager = class _RouteManager {
|
|
|
2043
2046
|
)
|
|
2044
2047
|
);
|
|
2045
2048
|
this.orderedLayouts = Array.from(this.layouts.values()).sort(
|
|
2046
|
-
(left, right) =>
|
|
2047
|
-
).map((entry) => ({ entry, groupScope:
|
|
2049
|
+
(left, right) => _chunkLOFKRKO7cjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkLOFKRKO7cjs.getRouteDirectoryDepth.call(void 0, right.pattern)
|
|
2050
|
+
).map((entry) => ({ entry, groupScope: _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, entry.pattern) }));
|
|
2048
2051
|
for (const slot of this.routeSlots.values()) {
|
|
2049
2052
|
if (!this.routeSlotOwnerSegments.has(slot.ownerPattern)) {
|
|
2050
2053
|
this.routeSlotOwnerSegments.set(
|
|
@@ -2286,7 +2289,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2286
2289
|
}
|
|
2287
2290
|
return absolutePath;
|
|
2288
2291
|
}, "toUrlPath");
|
|
2289
|
-
const integrationProviders =
|
|
2292
|
+
const integrationProviders = _chunkUJZLSXUBcjs.getIntegrationProviders.call(void 0, this.config.integrations).filter(
|
|
2290
2293
|
(provider) => provider.component || provider.type === "clerk"
|
|
2291
2294
|
);
|
|
2292
2295
|
const unsupportedIntegrationProvider = integrationProviders.find(
|
|
@@ -2325,7 +2328,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2325
2328
|
);
|
|
2326
2329
|
const routeEntries = Array.from(this.routes.values()).map((entry) => ({
|
|
2327
2330
|
entry,
|
|
2328
|
-
metadata:
|
|
2331
|
+
metadata: _chunkB5PFZLKVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : getClientModuleHydrationPlan(
|
|
2329
2332
|
entry.modulePath,
|
|
2330
2333
|
normalizedProjectRoot,
|
|
2331
2334
|
isolatedMode,
|
|
@@ -2333,7 +2336,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2333
2336
|
)
|
|
2334
2337
|
}));
|
|
2335
2338
|
const markdownFallback = routeEntries.find(
|
|
2336
|
-
({ entry, metadata }) =>
|
|
2339
|
+
({ entry, metadata }) => _chunkB5PFZLKVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
|
|
2337
2340
|
);
|
|
2338
2341
|
if (markdownFallback) {
|
|
2339
2342
|
_chunk5QIKR7RRcjs.logger.warn(
|
|
@@ -2341,7 +2344,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2341
2344
|
);
|
|
2342
2345
|
}
|
|
2343
2346
|
const markdownStaticPackages = _optionalChain([routeEntries, 'access', _121 => _121.find, 'call', _122 => _122(
|
|
2344
|
-
({ entry, metadata }) =>
|
|
2347
|
+
({ entry, metadata }) => _chunkB5PFZLKVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
|
|
2345
2348
|
), 'optionalAccess', _123 => _123.metadata, 'access', _124 => _124.staticPackageBoundaries]);
|
|
2346
2349
|
if (markdownStaticPackages) {
|
|
2347
2350
|
_chunk5QIKR7RRcjs.logger.info(
|
|
@@ -2349,7 +2352,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2349
2352
|
);
|
|
2350
2353
|
}
|
|
2351
2354
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
2352
|
-
if (
|
|
2355
|
+
if (_chunkB5PFZLKVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
|
|
2353
2356
|
_chunk5QIKR7RRcjs.logger.info(
|
|
2354
2357
|
`[Farm.js] ${entry.pattern} is async, so it renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
2355
2358
|
);
|
|
@@ -2357,15 +2360,15 @@ var _RouteManager = class _RouteManager {
|
|
|
2357
2360
|
enforceFarmIsolatedHydrationRouteBudget(
|
|
2358
2361
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
2359
2362
|
pattern: entry.pattern,
|
|
2360
|
-
depth:
|
|
2363
|
+
depth: _chunkLOFKRKO7cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
|
|
2361
2364
|
metadata
|
|
2362
2365
|
})),
|
|
2363
2366
|
routeEntries.map(({ entry, metadata }) => ({
|
|
2364
2367
|
pattern: getRouteEntryDirectory(entry),
|
|
2365
|
-
depth:
|
|
2368
|
+
depth: _chunkLOFKRKO7cjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
|
|
2366
2369
|
metadata
|
|
2367
2370
|
})),
|
|
2368
|
-
|
|
2371
|
+
_chunkLOFKRKO7cjs.routeBoundaryCoversDirectory
|
|
2369
2372
|
);
|
|
2370
2373
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
2371
2374
|
if (!metadata.costGuardExceeded) continue;
|
|
@@ -2384,7 +2387,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2384
2387
|
const routes = routeEntries.map(({ entry, metadata }) => {
|
|
2385
2388
|
const programmaticPage = this.programmaticPages.get(entry.modulePath);
|
|
2386
2389
|
const layoutShouldHydrate = layoutEntries.some(
|
|
2387
|
-
({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate &&
|
|
2390
|
+
({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkLOFKRKO7cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
|
|
2388
2391
|
);
|
|
2389
2392
|
return {
|
|
2390
2393
|
pattern: entry.pattern,
|
|
@@ -2503,13 +2506,13 @@ var _RouteManager = class _RouteManager {
|
|
|
2503
2506
|
const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
|
|
2504
2507
|
return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
|
|
2505
2508
|
}
|
|
2506
|
-
if (
|
|
2509
|
+
if (_chunkB5PFZLKVcjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
|
|
2507
2510
|
const mdxConfig = _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, this.config.mdx);
|
|
2508
|
-
const components = await
|
|
2511
|
+
const components = await _chunk75X755YZcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
|
|
2509
2512
|
root: this.config.root,
|
|
2510
2513
|
loadModule: this.viteServer ? (componentModulePath) => _chunkSHLXACIOcjs.loadFarmDevModule.call(void 0, this.viteServer, componentModulePath) : void 0
|
|
2511
2514
|
});
|
|
2512
|
-
return await
|
|
2515
|
+
return await _chunk75X755YZcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
|
|
2513
2516
|
components,
|
|
2514
2517
|
config: mdxConfig
|
|
2515
2518
|
});
|
|
@@ -2559,7 +2562,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2559
2562
|
*/
|
|
2560
2563
|
createRoutePattern(route) {
|
|
2561
2564
|
if (route.segments.length === 0) return "/";
|
|
2562
|
-
return "/" + route.segments.map(
|
|
2565
|
+
return "/" + route.segments.map(_chunkLOFKRKO7cjs.formatRouteSegment).join("/");
|
|
2563
2566
|
}
|
|
2564
2567
|
registerPageRoute(entry) {
|
|
2565
2568
|
_chunkNO3WWW3Ncjs.assertUniqueRouteParameters.call(void 0, entry.pattern);
|
|
@@ -2610,8 +2613,8 @@ var _RouteManager = class _RouteManager {
|
|
|
2610
2613
|
}
|
|
2611
2614
|
}
|
|
2612
2615
|
for (const [pattern, group] of canonicalPageGroups) {
|
|
2613
|
-
const componentFiles = group.files.filter((file) => !
|
|
2614
|
-
const markdownFiles = group.files.filter(
|
|
2616
|
+
const componentFiles = group.files.filter((file) => !_chunkB5PFZLKVcjs.isFarmMarkdownPageFile.call(void 0, file));
|
|
2617
|
+
const markdownFiles = group.files.filter(_chunkB5PFZLKVcjs.isFarmMarkdownPageFile);
|
|
2615
2618
|
if (componentFiles.length > 1) {
|
|
2616
2619
|
throw new Error(
|
|
2617
2620
|
`Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path9.default.join(appDir, file)).join(" and ")}.`
|
|
@@ -2653,7 +2656,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2653
2656
|
for (const file of files) {
|
|
2654
2657
|
const route = _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, file);
|
|
2655
2658
|
const modulePath = path9.default.join(appDir, file);
|
|
2656
|
-
const pattern =
|
|
2659
|
+
const pattern = _chunkLOFKRKO7cjs.createRouteDirectoryPattern.call(void 0, route);
|
|
2657
2660
|
const existing = target.get(pattern);
|
|
2658
2661
|
if (_optionalChain([existing, 'optionalAccess', _129 => _129.sourceRoot]) === source.root) {
|
|
2659
2662
|
throw new Error(
|
|
@@ -2675,7 +2678,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2675
2678
|
const modulePath = path9.default.join(appDir, file);
|
|
2676
2679
|
const pattern = this.createRoutePattern(slot.route);
|
|
2677
2680
|
const ownerPattern = this.createRoutePattern(slot.ownerRoute);
|
|
2678
|
-
const ownerDirectory =
|
|
2681
|
+
const ownerDirectory = _chunkLOFKRKO7cjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
|
|
2679
2682
|
const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
|
|
2680
2683
|
const existing = this.routeSlots.get(key);
|
|
2681
2684
|
if (_optionalChain([existing, 'optionalAccess', _130 => _130.sourceRoot]) === source.root) {
|
|
@@ -2751,7 +2754,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2751
2754
|
}
|
|
2752
2755
|
}
|
|
2753
2756
|
async discoverProgrammaticRoutes(source) {
|
|
2754
|
-
const manifests = await
|
|
2757
|
+
const manifests = await _chunkFUCSUGDMcjs.loadProgrammaticRouteManifests.call(void 0, {
|
|
2755
2758
|
root: source.root,
|
|
2756
2759
|
srcDir: source.srcDir,
|
|
2757
2760
|
loadModule: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (filePath) => this.loadProgrammaticRoutesModule(filePath), "loadModule")
|
|
@@ -2780,7 +2783,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2780
2783
|
}
|
|
2781
2784
|
if (definition.kind === "layout") {
|
|
2782
2785
|
const route = _chunk6V4TDWECcjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
|
|
2783
|
-
const pattern =
|
|
2786
|
+
const pattern = _chunkLOFKRKO7cjs.createRouteDirectoryPattern.call(void 0, route);
|
|
2784
2787
|
const existing = this.layouts.get(pattern);
|
|
2785
2788
|
if (_optionalChain([existing, 'optionalAccess', _134 => _134.sourceRoot]) === source.root) {
|
|
2786
2789
|
throw new Error(
|
|
@@ -2827,7 +2830,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2827
2830
|
const matchingLayouts = [];
|
|
2828
2831
|
for (const { entry, groupScope } of this.orderedLayouts) {
|
|
2829
2832
|
if (!_chunk5QIKR7RRcjs.matchRoutePrefixParts.call(void 0, pathnameParts, entry.route.segments)) continue;
|
|
2830
|
-
if (groupScope !== null && !
|
|
2833
|
+
if (groupScope !== null && !_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
|
|
2831
2834
|
continue;
|
|
2832
2835
|
}
|
|
2833
2836
|
matchingLayouts.push(entry);
|
|
@@ -2908,14 +2911,14 @@ var _RouteManager = class _RouteManager {
|
|
|
2908
2911
|
let page = route;
|
|
2909
2912
|
for (const boundaryEntry of boundaries.values()) {
|
|
2910
2913
|
if (!_chunk5QIKR7RRcjs.matchRoutePrefix.call(void 0, normalizedPath, boundaryEntry.route.segments)) continue;
|
|
2911
|
-
const groupScope =
|
|
2914
|
+
const groupScope = _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
|
|
2912
2915
|
if (groupScope !== null) {
|
|
2913
2916
|
if (page === void 0) page = this.matchPageRoute(_chunk5QIKR7RRcjs.splitRoutePath.call(void 0, normalizedPath));
|
|
2914
|
-
if (!
|
|
2917
|
+
if (!_chunkLOFKRKO7cjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
|
|
2915
2918
|
}
|
|
2916
2919
|
const depth = boundaryEntry.route.segments.length;
|
|
2917
2920
|
const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _138 => _138.route, 'access', _139 => _139.segments, 'access', _140 => _140.length]), () => ( -1));
|
|
2918
|
-
if (!bestMatch || depth > bestDepth || depth === bestDepth &&
|
|
2921
|
+
if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkLOFKRKO7cjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkLOFKRKO7cjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
|
|
2919
2922
|
bestMatch = boundaryEntry;
|
|
2920
2923
|
}
|
|
2921
2924
|
}
|
|
@@ -2952,7 +2955,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2952
2955
|
pattern: entry.pattern
|
|
2953
2956
|
}));
|
|
2954
2957
|
const i18n = this.getI18nConfig();
|
|
2955
|
-
const result = await
|
|
2958
|
+
const result = await _chunk5D2JIPLHcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
|
|
2956
2959
|
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n)
|
|
2957
2960
|
});
|
|
2958
2961
|
if (!i18n) {
|
|
@@ -2997,7 +3000,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2997
3000
|
async isRouteSSG(modulePath) {
|
|
2998
3001
|
try {
|
|
2999
3002
|
const mod = await this.loadRouteModule(modulePath);
|
|
3000
|
-
const rendering = await
|
|
3003
|
+
const rendering = await _chunk5D2JIPLHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
3001
3004
|
return rendering.ssg;
|
|
3002
3005
|
} catch (e10) {
|
|
3003
3006
|
return false;
|
|
@@ -3009,7 +3012,7 @@ var _RouteManager = class _RouteManager {
|
|
|
3009
3012
|
async hasRouteISR(modulePath) {
|
|
3010
3013
|
try {
|
|
3011
3014
|
const mod = await this.loadRouteModule(modulePath);
|
|
3012
|
-
const rendering = await
|
|
3015
|
+
const rendering = await _chunk5D2JIPLHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
3013
3016
|
return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
|
|
3014
3017
|
} catch (e11) {
|
|
3015
3018
|
return false;
|
|
@@ -3021,7 +3024,7 @@ var _RouteManager = class _RouteManager {
|
|
|
3021
3024
|
async getRouteRevalidateInterval(modulePath) {
|
|
3022
3025
|
try {
|
|
3023
3026
|
const mod = await this.loadRouteModule(modulePath);
|
|
3024
|
-
const rendering = await
|
|
3027
|
+
const rendering = await _chunk5D2JIPLHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
3025
3028
|
return rendering.revalidate;
|
|
3026
3029
|
} catch (e12) {
|
|
3027
3030
|
return void 0;
|
|
@@ -3031,7 +3034,7 @@ var _RouteManager = class _RouteManager {
|
|
|
3031
3034
|
_chunkS3JO3N4Hcjs.__name.call(void 0, _RouteManager, "RouteManager");
|
|
3032
3035
|
var RouteManager = _RouteManager;
|
|
3033
3036
|
function getPageDirectoryField(route, pattern) {
|
|
3034
|
-
const directory =
|
|
3037
|
+
const directory = _chunkLOFKRKO7cjs.createRouteDirectoryPattern.call(void 0, route);
|
|
3035
3038
|
return directory === pattern ? {} : { directory };
|
|
3036
3039
|
}
|
|
3037
3040
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getPageDirectoryField, "getPageDirectoryField");
|
|
@@ -4411,7 +4414,7 @@ function generateFarmIntegrationProviderClientCode(providers, root, rendererComp
|
|
|
4411
4414
|
let hasClerkProvider = false;
|
|
4412
4415
|
renderedProviders.forEach((provider, index) => {
|
|
4413
4416
|
let componentExpression = "null";
|
|
4414
|
-
if (
|
|
4417
|
+
if (_chunkUJZLSXUBcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
|
|
4415
4418
|
const namespace = `FarmIntegrationProviderModule${index}`;
|
|
4416
4419
|
imports.push(
|
|
4417
4420
|
`import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
|
|
@@ -4470,7 +4473,7 @@ function generateFarmIntegrationProviderServerModules(providers, root, rendererC
|
|
|
4470
4473
|
const entries = [];
|
|
4471
4474
|
let needsMarkHelper = false;
|
|
4472
4475
|
providers.forEach((provider, index) => {
|
|
4473
|
-
if (!
|
|
4476
|
+
if (!_chunkUJZLSXUBcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) return;
|
|
4474
4477
|
const namespace = `FarmServerIntegrationProviderModule${index}`;
|
|
4475
4478
|
imports.push(
|
|
4476
4479
|
`import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
|
|
@@ -4692,7 +4695,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, appendResponseVary, "appendResponseVary");
|
|
|
4692
4695
|
function renderI18nAlternateLinks(requestPath, snapshot, options) {
|
|
4693
4696
|
if (snapshot.routing === "none") return "";
|
|
4694
4697
|
const url = new URL(requestPath, "http://farm.local");
|
|
4695
|
-
return
|
|
4698
|
+
return _chunkLOFKRKO7cjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
|
|
4696
4699
|
}
|
|
4697
4700
|
_chunkS3JO3N4Hcjs.__name.call(void 0, renderI18nAlternateLinks, "renderI18nAlternateLinks");
|
|
4698
4701
|
var PPR_REFRESH_MAX_ATTEMPTS = 3;
|
|
@@ -5075,7 +5078,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5075
5078
|
return this.renderElementToCompleteHTML(await this.wrapWithIntegrationProviders(element));
|
|
5076
5079
|
}
|
|
5077
5080
|
async runWithRequestContext(request2, fn) {
|
|
5078
|
-
return
|
|
5081
|
+
return _chunkNICDYKBScjs._runWithCurrentRequest.call(void 0,
|
|
5079
5082
|
request2,
|
|
5080
5083
|
() => _optionalChain([this, 'access', _162 => _162.i18nRuntime, 'optionalAccess', _163 => _163.config, 'access', _164 => _164.enabled]) ? _chunkXJXBIP67cjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
|
|
5081
5084
|
redirect: false
|
|
@@ -5108,7 +5111,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5108
5111
|
* Check if a path should be served from SSG cache
|
|
5109
5112
|
*/
|
|
5110
5113
|
async shouldServeSSG(pathname) {
|
|
5111
|
-
const ssgPage =
|
|
5114
|
+
const ssgPage = _chunk5D2JIPLHcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
|
|
5112
5115
|
if (!ssgPage) return null;
|
|
5113
5116
|
const cached = await this.getCachedSSGPage(pathname);
|
|
5114
5117
|
if (cached && await this.dataCache.isStaleAsync(cached)) {
|
|
@@ -5348,7 +5351,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5348
5351
|
const header = _chunkMRMI32SNcjs.getFarmSecurityHeader.call(void 0, this.security, cspNonce);
|
|
5349
5352
|
res.setHeader(header.key, header.value);
|
|
5350
5353
|
}
|
|
5351
|
-
const request2 =
|
|
5354
|
+
const request2 = _chunkNICDYKBScjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
5352
5355
|
trustProxy: _optionalChain([this, 'access', _167 => _167.config, 'access', _168 => _168.server, 'optionalAccess', _169 => _169.trustProxy])
|
|
5353
5356
|
});
|
|
5354
5357
|
const runtime = this.i18nRuntime;
|
|
@@ -5395,7 +5398,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5395
5398
|
});
|
|
5396
5399
|
}, "completeRender");
|
|
5397
5400
|
try {
|
|
5398
|
-
const url =
|
|
5401
|
+
const url = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _172 => _172.config, 'access', _173 => _173.server, 'optionalAccess', _174 => _174.trustProxy]) });
|
|
5399
5402
|
pathname = url.pathname;
|
|
5400
5403
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
|
|
5401
5404
|
searchParamsObject = _chunkQNPEUFHQcjs.searchParamsToObject.call(void 0, url.searchParams);
|
|
@@ -5481,7 +5484,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5481
5484
|
pluginExposedContext = _chunkKIIMAWOJcjs.getRequestContextSnapshot.call(void 0, req, {
|
|
5482
5485
|
exposedOnly: true
|
|
5483
5486
|
});
|
|
5484
|
-
const currentRequest =
|
|
5487
|
+
const currentRequest = _chunkNICDYKBScjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
5485
5488
|
trustProxy: _optionalChain([this, 'access', _175 => _175.config, 'access', _176 => _176.server, 'optionalAccess', _177 => _177.trustProxy])
|
|
5486
5489
|
});
|
|
5487
5490
|
const routeContext = await this.resolveRouteContext({
|
|
@@ -5536,7 +5539,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5536
5539
|
throw error;
|
|
5537
5540
|
}
|
|
5538
5541
|
}
|
|
5539
|
-
const renderingConfig = await
|
|
5542
|
+
const renderingConfig = await _chunk5D2JIPLHcjs.resolveRouteRenderingConfigFromFile.call(void 0,
|
|
5540
5543
|
routeModule,
|
|
5541
5544
|
route.modulePath,
|
|
5542
5545
|
{ experimentalPPR: _optionalChain([this, 'access', _180 => _180.config, 'access', _181 => _181.experimental, 'optionalAccess', _182 => _182.ppr]) === true }
|
|
@@ -5596,8 +5599,8 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5596
5599
|
key: pprCacheKey
|
|
5597
5600
|
});
|
|
5598
5601
|
}
|
|
5599
|
-
const outerRequest =
|
|
5600
|
-
const countRequestReads = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => (outerRequest ?
|
|
5602
|
+
const outerRequest = _chunkOW67PDDScjs._resolveCurrentRequest.call(void 0, );
|
|
5603
|
+
const countRequestReads = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => (outerRequest ? _chunkNICDYKBScjs._getRequestReadCount.call(void 0, outerRequest) : 0) + _chunkNICDYKBScjs._getRequestReadCount.call(void 0, currentRequest), "countRequestReads");
|
|
5601
5604
|
const requestReadsBeforeRender = countRequestReads();
|
|
5602
5605
|
let LoadingFallbackComponent = null;
|
|
5603
5606
|
if (loadingBoundaryEntry) {
|
|
@@ -5779,9 +5782,9 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5779
5782
|
});
|
|
5780
5783
|
req.__FARM_METADATA__ = mergedMetadata;
|
|
5781
5784
|
const middlewareDataForContext = middlewareMap;
|
|
5782
|
-
await
|
|
5783
|
-
await
|
|
5784
|
-
await
|
|
5785
|
+
await _chunkG2TEB74Scjs._runWithMiddlewareData.call(void 0, middlewareDataForContext, async () => {
|
|
5786
|
+
await _chunkG2TEB74Scjs._runWithMiddlewareContext.call(void 0, middlewareContext, async () => {
|
|
5787
|
+
await _chunkNICDYKBScjs._runWithCurrentRequest.call(void 0, currentRequest, async () => {
|
|
5785
5788
|
let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
|
|
5786
5789
|
if (LoadingFallbackComponent) {
|
|
5787
5790
|
const loadingFallback = this.rendererRuntime.createElement(LoadingFallbackComponent, {
|
|
@@ -5868,8 +5871,8 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5868
5871
|
req,
|
|
5869
5872
|
res,
|
|
5870
5873
|
() => {
|
|
5871
|
-
|
|
5872
|
-
|
|
5874
|
+
_chunkG2TEB74Scjs._clearCurrentMiddlewareData.call(void 0, );
|
|
5875
|
+
_chunkG2TEB74Scjs._clearCurrentMiddlewareContext.call(void 0, );
|
|
5873
5876
|
},
|
|
5874
5877
|
{
|
|
5875
5878
|
responseHeaders: pprHeaders,
|
|
@@ -5959,7 +5962,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5959
5962
|
}
|
|
5960
5963
|
}
|
|
5961
5964
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, { type: "render.error", route: pathname, error });
|
|
5962
|
-
const errorStatus =
|
|
5965
|
+
const errorStatus = _chunkLOFKRKO7cjs.resolveDefaultErrorStatus.call(void 0, error);
|
|
5963
5966
|
if (pprRefreshRoute) {
|
|
5964
5967
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, {
|
|
5965
5968
|
type: "ppr.refresh.error",
|
|
@@ -5995,7 +5998,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5995
5998
|
}
|
|
5996
5999
|
}
|
|
5997
6000
|
async wrapWithIntegrationProviders(element) {
|
|
5998
|
-
const providers =
|
|
6001
|
+
const providers = _chunkUJZLSXUBcjs.getIntegrationProviders.call(void 0, this.config.integrations);
|
|
5999
6002
|
let wrapped = element;
|
|
6000
6003
|
for (let i = providers.length - 1; i >= 0; i--) {
|
|
6001
6004
|
const provider = providers[i];
|
|
@@ -6013,7 +6016,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6013
6016
|
}
|
|
6014
6017
|
let ProviderComponent;
|
|
6015
6018
|
let providerSourceModule;
|
|
6016
|
-
if (
|
|
6019
|
+
if (_chunkUJZLSXUBcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
|
|
6017
6020
|
providerSourceModule = provider.component.module;
|
|
6018
6021
|
const providerModuleId = provider.component.module.startsWith(".") ? _chunk5QIKR7RRcjs.toViteModuleId.call(void 0,
|
|
6019
6022
|
path9.resolve(this.config.root, provider.component.module),
|
|
@@ -6168,7 +6171,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6168
6171
|
`Metadata route module ${match.metadata.modulePath} does not export a default value or handler`
|
|
6169
6172
|
);
|
|
6170
6173
|
}
|
|
6171
|
-
const request2 =
|
|
6174
|
+
const request2 = _chunkNICDYKBScjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
6172
6175
|
trustProxy: _optionalChain([this, 'access', _202 => _202.config, 'access', _203 => _203.server, 'optionalAccess', _204 => _204.trustProxy])
|
|
6173
6176
|
});
|
|
6174
6177
|
const url = new URL(request2.url);
|
|
@@ -6187,7 +6190,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6187
6190
|
origin: url.origin,
|
|
6188
6191
|
readMarkdown: llmsContext.markdown
|
|
6189
6192
|
}) : value;
|
|
6190
|
-
const response =
|
|
6193
|
+
const response = _chunkLOFKRKO7cjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
|
|
6191
6194
|
method,
|
|
6192
6195
|
request: request2
|
|
6193
6196
|
});
|
|
@@ -6212,7 +6215,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6212
6215
|
}
|
|
6213
6216
|
async renderGeneratedLlmsTxt(req, res, kind) {
|
|
6214
6217
|
try {
|
|
6215
|
-
const request2 =
|
|
6218
|
+
const request2 = _chunkNICDYKBScjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
6216
6219
|
trustProxy: _optionalChain([this, 'access', _208 => _208.config, 'access', _209 => _209.server, 'optionalAccess', _210 => _210.trustProxy])
|
|
6217
6220
|
});
|
|
6218
6221
|
const config = _chunk4WQ6PGSJcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _211 => _211.config, 'access', _212 => _212.agent, 'optionalAccess', _213 => _213.llmsTxt]));
|
|
@@ -6223,7 +6226,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6223
6226
|
}) : context.defaults;
|
|
6224
6227
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
6225
6228
|
res,
|
|
6226
|
-
|
|
6229
|
+
_chunkLOFKRKO7cjs.createFarmMetadataRouteResponse.call(void 0,
|
|
6227
6230
|
kind,
|
|
6228
6231
|
body,
|
|
6229
6232
|
{ revalidate: config.revalidate },
|
|
@@ -6258,7 +6261,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6258
6261
|
});
|
|
6259
6262
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
6260
6263
|
res,
|
|
6261
|
-
|
|
6264
|
+
_chunkLOFKRKO7cjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
|
|
6262
6265
|
);
|
|
6263
6266
|
} catch (error) {
|
|
6264
6267
|
_chunk5QIKR7RRcjs.logger.error(`Generated robots.txt failed: ${error}`);
|
|
@@ -6277,7 +6280,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6277
6280
|
/** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
|
|
6278
6281
|
async renderGeneratedSitemap(req, res) {
|
|
6279
6282
|
try {
|
|
6280
|
-
const request2 =
|
|
6283
|
+
const request2 = _chunkNICDYKBScjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
6281
6284
|
trustProxy: _optionalChain([this, 'access', _226 => _226.config, 'access', _227 => _227.server, 'optionalAccess', _228 => _228.trustProxy])
|
|
6282
6285
|
});
|
|
6283
6286
|
const sources = await Promise.all(
|
|
@@ -6302,7 +6305,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6302
6305
|
});
|
|
6303
6306
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
6304
6307
|
res,
|
|
6305
|
-
|
|
6308
|
+
_chunkLOFKRKO7cjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
|
|
6306
6309
|
);
|
|
6307
6310
|
} catch (error) {
|
|
6308
6311
|
_chunk5QIKR7RRcjs.logger.error(`Generated sitemap.xml failed: ${error}`);
|
|
@@ -6330,13 +6333,13 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6330
6333
|
if (this.routeManager.matchRoute(_chunkPTZ2TVNEcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
|
|
6331
6334
|
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkPTZ2TVNEcjs.createFarmDefaultMCPServer.call(void 0,
|
|
6332
6335
|
readAppPackageIdentity(this.config.root),
|
|
6333
|
-
|
|
6336
|
+
_chunkNQ6QFZWDcjs.FARM_VERSION
|
|
6334
6337
|
))));
|
|
6335
6338
|
return _chunkPTZ2TVNEcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
|
|
6336
6339
|
}
|
|
6337
6340
|
async renderDefaultMCP(req, res) {
|
|
6338
6341
|
const server = this.getDefaultMCPServer();
|
|
6339
|
-
const request2 = _nullishCoalesce(
|
|
6342
|
+
const request2 = _nullishCoalesce(_chunkNICDYKBScjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunkNICDYKBScjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _238 => _238.config, 'access', _239 => _239.server, 'optionalAccess', _240 => _240.trustProxy]) })));
|
|
6340
6343
|
try {
|
|
6341
6344
|
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-SJAHFSPI.cjs");
|
|
6342
6345
|
const origin = new URL(request2.url).origin;
|
|
@@ -6411,7 +6414,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6411
6414
|
pages,
|
|
6412
6415
|
config,
|
|
6413
6416
|
rootMetadata,
|
|
6414
|
-
mcp: _optionalChain([this, 'access', _244 => _244.config, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) === false ? [] :
|
|
6417
|
+
mcp: _optionalChain([this, 'access', _244 => _244.config, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) === false ? [] : _chunkLOFKRKO7cjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
|
|
6415
6418
|
basePath: this.config.basePath,
|
|
6416
6419
|
apiServerBasePath: _chunkKNBBQHO2cjs.resolveFarmAPIServerBasePath.call(void 0,
|
|
6417
6420
|
_chunkS3A45T7Fcjs.normalizeFarmAPIConfig.call(void 0,
|
|
@@ -6499,7 +6502,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6499
6502
|
return;
|
|
6500
6503
|
}
|
|
6501
6504
|
const etag = `"${image.staticInfo.hash}"`;
|
|
6502
|
-
const requestUrl =
|
|
6505
|
+
const requestUrl = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, {
|
|
6503
6506
|
trustProxy: _optionalChain([this, 'access', _252 => _252.config, 'access', _253 => _253.server, 'optionalAccess', _254 => _254.trustProxy])
|
|
6504
6507
|
});
|
|
6505
6508
|
const isVersioned = requestUrl.searchParams.get("v") === image.staticInfo.hash;
|
|
@@ -6561,9 +6564,9 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6561
6564
|
});
|
|
6562
6565
|
}
|
|
6563
6566
|
wrapped = await this.wrapWithIntegrationProviders(wrapped);
|
|
6564
|
-
const html = await
|
|
6567
|
+
const html = await _chunkG2TEB74Scjs._runWithMiddlewareData.call(void 0,
|
|
6565
6568
|
options.middlewareMap,
|
|
6566
|
-
() =>
|
|
6569
|
+
() => _chunkG2TEB74Scjs._runWithMiddlewareContext.call(void 0,
|
|
6567
6570
|
options.middlewareContext,
|
|
6568
6571
|
() => this.rendererRuntime.renderToString(wrapped)
|
|
6569
6572
|
)
|
|
@@ -6672,7 +6675,7 @@ window.__FARM_ISLAND_STRATEGY__ = ${JSON.stringify(req.__FARM_ISLAND_STRATEGY__
|
|
|
6672
6675
|
window.__FARM_PAGE_MODULE__ = ${JSON.stringify(relativePath)};
|
|
6673
6676
|
window.__FARM_LOADING_MODULE__ = ${JSON.stringify(req.__FARM_LOADING_MODULE_PATH__ || null)};
|
|
6674
6677
|
window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
6675
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
6678
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkUJZLSXUBcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
6676
6679
|
window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
|
|
6677
6680
|
</script>`;
|
|
6678
6681
|
const deferredScript = createDeferredHydrationScript(deferredProps.records);
|
|
@@ -6696,18 +6699,18 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6696
6699
|
i18nSnapshot,
|
|
6697
6700
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6698
6701
|
) : "";
|
|
6699
|
-
const themeDocument =
|
|
6702
|
+
const themeDocument = _chunkLOFKRKO7cjs.createFarmThemeDocumentParts.call(void 0,
|
|
6700
6703
|
this.config.theme,
|
|
6701
6704
|
this.config.basePath,
|
|
6702
|
-
|
|
6705
|
+
_chunk4GPOC4LNcjs.getTheme.call(void 0, )
|
|
6703
6706
|
);
|
|
6704
|
-
const fullDocument =
|
|
6707
|
+
const fullDocument = _chunkLOFKRKO7cjs.extractFarmFullDocument.call(void 0, content);
|
|
6705
6708
|
let html;
|
|
6706
6709
|
if (fullDocument) {
|
|
6707
6710
|
const shouldReplaceLayoutTitle = hasExplicitTitle || rendererHasTitle;
|
|
6708
|
-
const documentHtml = shouldReplaceLayoutTitle ?
|
|
6709
|
-
const effectiveRendererHead = hasExplicitTitle ?
|
|
6710
|
-
html =
|
|
6711
|
+
const documentHtml = shouldReplaceLayoutTitle ? _chunkLOFKRKO7cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
|
|
6712
|
+
const effectiveRendererHead = hasExplicitTitle ? _chunkLOFKRKO7cjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
|
|
6713
|
+
html = _chunkLOFKRKO7cjs.composeFarmFullDocument.call(void 0, documentHtml, {
|
|
6711
6714
|
fallbackIcon: !hasFavicon,
|
|
6712
6715
|
viewport: viewportTags,
|
|
6713
6716
|
htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
|
|
@@ -6915,7 +6918,7 @@ window.__FARM_LOADING_MODULE__ = ${JSON.stringify(
|
|
|
6915
6918
|
req.__FARM_LOADING_MODULE_PATH__ || null
|
|
6916
6919
|
)};
|
|
6917
6920
|
window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
|
|
6918
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
6921
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkUJZLSXUBcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
6919
6922
|
window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
|
|
6920
6923
|
</script>`;
|
|
6921
6924
|
const hydrationClickQueueScript = isClientComponent || req.__FARM_SHOULD_HYDRATE__ === true || req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ === true ? createPreHydrationClickQueueScript() : "";
|
|
@@ -6935,10 +6938,10 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6935
6938
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6936
6939
|
) : "";
|
|
6937
6940
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
6938
|
-
const themeDocument =
|
|
6941
|
+
const themeDocument = _chunkLOFKRKO7cjs.createFarmThemeDocumentParts.call(void 0,
|
|
6939
6942
|
this.config.theme,
|
|
6940
6943
|
this.config.basePath,
|
|
6941
|
-
|
|
6944
|
+
_chunk4GPOC4LNcjs.getTheme.call(void 0, )
|
|
6942
6945
|
);
|
|
6943
6946
|
const streamRoot = req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? element : this.rendererRuntime.createElement("div", { style: { display: "contents" } }, element);
|
|
6944
6947
|
const devStyleLinks = this.collectDevStyleLinks();
|
|
@@ -6997,7 +7000,7 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6997
7000
|
if (!chunkText) return;
|
|
6998
7001
|
if (!checkedFullDocument) {
|
|
6999
7002
|
documentPrefix += chunkText;
|
|
7000
|
-
const prefix =
|
|
7003
|
+
const prefix = _chunkLOFKRKO7cjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
|
|
7001
7004
|
if (prefix !== "pending") {
|
|
7002
7005
|
checkedFullDocument = true;
|
|
7003
7006
|
documentPrefix = "";
|
|
@@ -7194,9 +7197,9 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7194
7197
|
*/
|
|
7195
7198
|
async createLateNavigationRecoveryHTML(req, error) {
|
|
7196
7199
|
if (_chunkOX6O6WVAcjs.isFarmRedirectError.call(void 0, error)) {
|
|
7197
|
-
return
|
|
7200
|
+
return _chunkLOFKRKO7cjs.createLateRedirectRecovery.call(void 0, this.localizeRedirectUrl(_chunkOX6O6WVAcjs.getFarmRedirectError.call(void 0, error).url));
|
|
7198
7201
|
}
|
|
7199
|
-
const pathname =
|
|
7202
|
+
const pathname = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, {
|
|
7200
7203
|
trustProxy: _optionalChain([this, 'access', _279 => _279.config, 'access', _280 => _280.server, 'optionalAccess', _281 => _281.trustProxy])
|
|
7201
7204
|
}).pathname;
|
|
7202
7205
|
let content = this.defaultNotFoundContent();
|
|
@@ -7212,11 +7215,11 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7212
7215
|
_chunk5QIKR7RRcjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
|
|
7213
7216
|
}
|
|
7214
7217
|
}
|
|
7215
|
-
return
|
|
7218
|
+
return _chunkLOFKRKO7cjs.createLateNotFoundRecovery.call(void 0, content);
|
|
7216
7219
|
}
|
|
7217
7220
|
async render404(req, res) {
|
|
7218
7221
|
res.statusCode = 404;
|
|
7219
|
-
const pathname =
|
|
7222
|
+
const pathname = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, {
|
|
7220
7223
|
trustProxy: _optionalChain([this, 'access', _282 => _282.config, 'access', _283 => _283.server, 'optionalAccess', _284 => _284.trustProxy])
|
|
7221
7224
|
}).pathname;
|
|
7222
7225
|
const acceptHeader = req.headers.accept;
|
|
@@ -7283,12 +7286,12 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7283
7286
|
}
|
|
7284
7287
|
res.statusCode = statusCode;
|
|
7285
7288
|
const isDev = process.env.NODE_ENV === "development";
|
|
7286
|
-
const requestUrl =
|
|
7289
|
+
const requestUrl = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, {
|
|
7287
7290
|
trustProxy: _optionalChain([this, 'access', _287 => _287.config, 'access', _288 => _288.server, 'optionalAccess', _289 => _289.trustProxy])
|
|
7288
7291
|
});
|
|
7289
7292
|
const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
|
|
7290
|
-
const statusText =
|
|
7291
|
-
const content =
|
|
7293
|
+
const statusText = _chunkLOFKRKO7cjs.getDefaultErrorStatusText.call(void 0, statusCode);
|
|
7294
|
+
const content = _chunkLOFKRKO7cjs.createDefaultErrorMarkup.call(void 0, {
|
|
7292
7295
|
statusCode,
|
|
7293
7296
|
statusText,
|
|
7294
7297
|
requestPath: requestUrl.pathname,
|
|
@@ -7298,7 +7301,7 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7298
7301
|
stack: _optionalChain([diagnostics, 'optionalAccess', _292 => _292.stack]),
|
|
7299
7302
|
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _293 => _293.sourceFrame]),
|
|
7300
7303
|
development: isDev,
|
|
7301
|
-
farmVersion:
|
|
7304
|
+
farmVersion: _chunkNQ6QFZWDcjs.FARM_VERSION,
|
|
7302
7305
|
nodeVersion: process.version,
|
|
7303
7306
|
mode: isDev ? "development" : "production"
|
|
7304
7307
|
});
|
|
@@ -7324,7 +7327,7 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7324
7327
|
getI18nAlternateOptions(req, metadata) {
|
|
7325
7328
|
return {
|
|
7326
7329
|
metadataBase: _optionalChain([metadata, 'optionalAccess', _294 => _294.metadataBase]),
|
|
7327
|
-
origin: req ?
|
|
7330
|
+
origin: req ? _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _295 => _295.config, 'access', _296 => _296.server, 'optionalAccess', _297 => _297.trustProxy]) }).origin : void 0
|
|
7328
7331
|
};
|
|
7329
7332
|
}
|
|
7330
7333
|
createFullHTML(content, isClientComponent = false, requestPath = "/", metadataHead, alternates = {}) {
|
|
@@ -7332,7 +7335,7 @@ window.__FARM_I18N__ = ${_chunkXJXBIP67cjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7332
7335
|
const clientScript = isClientComponent ? ` <script type="module" src="/@farm/client.js"></script>` : "";
|
|
7333
7336
|
const integrationManifestScript = `<script>
|
|
7334
7337
|
window.__FARM_DEPLOYMENT_ID__ = ${serializeInlineValue(this.getDeploymentId())};
|
|
7335
|
-
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(
|
|
7338
|
+
window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkUJZLSXUBcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
|
|
7336
7339
|
${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};` : ""}
|
|
7337
7340
|
</script>`;
|
|
7338
7341
|
const alternateLinks = i18nSnapshot ? renderI18nAlternateLinks(
|
|
@@ -7341,17 +7344,17 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
|
|
|
7341
7344
|
this.getI18nAlternateOptions(alternates.req, alternates.metadata)
|
|
7342
7345
|
) : "";
|
|
7343
7346
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
7344
|
-
const themeDocument =
|
|
7347
|
+
const themeDocument = _chunkLOFKRKO7cjs.createFarmThemeDocumentParts.call(void 0,
|
|
7345
7348
|
this.config.theme,
|
|
7346
7349
|
this.config.basePath,
|
|
7347
|
-
|
|
7350
|
+
_chunk4GPOC4LNcjs.getTheme.call(void 0, )
|
|
7348
7351
|
);
|
|
7349
7352
|
const rendererHydrationScript = _optionalChain([this, 'access', _298 => _298.rendererRuntime, 'access', _299 => _299.generateHydrationScript, 'optionalCall', _300 => _300()]) || "";
|
|
7350
7353
|
const viewportTags = _chunkEK4QAEFZcjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _301 => _301.metadata, 'optionalAccess', _302 => _302.viewport]));
|
|
7351
|
-
const fullDocument =
|
|
7354
|
+
const fullDocument = _chunkLOFKRKO7cjs.extractFarmFullDocument.call(void 0, content);
|
|
7352
7355
|
if (fullDocument) {
|
|
7353
|
-
return
|
|
7354
|
-
metadataHead ?
|
|
7356
|
+
return _chunkLOFKRKO7cjs.composeFarmFullDocument.call(void 0,
|
|
7357
|
+
metadataHead ? _chunkLOFKRKO7cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
|
|
7355
7358
|
{
|
|
7356
7359
|
fallbackIcon: !metadataHead,
|
|
7357
7360
|
viewport: viewportTags,
|
|
@@ -7443,7 +7446,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7443
7446
|
constructor(config = {}, viteServer) {
|
|
7444
7447
|
this.config = this.normalizeConfig(config);
|
|
7445
7448
|
_chunkE3UK5IIBcjs.configureFarmObservability.call(void 0, this.config.observability);
|
|
7446
|
-
|
|
7449
|
+
_chunk4GPOC4LNcjs._setDefaultFarmThemeConfig.call(void 0, this.config.theme);
|
|
7447
7450
|
this.i18nRuntime = _chunkXJXBIP67cjs.createFarmI18nRuntime.call(void 0, this.config.i18n);
|
|
7448
7451
|
_chunkXJXBIP67cjs._setDefaultFarmI18nRuntime.call(void 0, this.i18nRuntime);
|
|
7449
7452
|
this.viteServer = viteServer;
|
|
@@ -7558,7 +7561,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7558
7561
|
);
|
|
7559
7562
|
if (!hasAppDirectory) {
|
|
7560
7563
|
const routeFiles = _chunkWBKEZXWEcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
|
|
7561
|
-
(source) =>
|
|
7564
|
+
(source) => _chunkFUCSUGDMcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
|
|
7562
7565
|
);
|
|
7563
7566
|
if (routeFiles.length > 0) {
|
|
7564
7567
|
return;
|
|
@@ -7993,7 +7996,7 @@ var _PluginManager = class _PluginManager {
|
|
|
7993
7996
|
};
|
|
7994
7997
|
}
|
|
7995
7998
|
createPluginHookContext(plugin, context = this.context) {
|
|
7996
|
-
const integration =
|
|
7999
|
+
const integration = _chunkUJZLSXUBcjs.getFarmPluginIntegrationContext.call(void 0, plugin);
|
|
7997
8000
|
return integration ? { ...context, integration } : context;
|
|
7998
8001
|
}
|
|
7999
8002
|
createRequestHookContext(target, plugin) {
|
|
@@ -10162,7 +10165,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
10162
10165
|
}
|
|
10163
10166
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmWorkflowsDevRuntime, "loadFarmWorkflowsDevRuntime");
|
|
10164
10167
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
10165
|
-
return import("./devtools-
|
|
10168
|
+
return import("./devtools-JXFQNWSH.cjs");
|
|
10166
10169
|
}
|
|
10167
10170
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDevtoolsSnapshotRuntime, "loadFarmDevtoolsSnapshotRuntime");
|
|
10168
10171
|
function loadFarmDevtoolsUIRuntime() {
|
|
@@ -10249,7 +10252,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
10249
10252
|
if (!snapshot) return "";
|
|
10250
10253
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
10251
10254
|
if (snapshot.routing === "none") return runtime;
|
|
10252
|
-
return `${
|
|
10255
|
+
return `${_chunkLOFKRKO7cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
10253
10256
|
}
|
|
10254
10257
|
_chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmI18nStaticHead, "renderFarmI18nStaticHead");
|
|
10255
10258
|
function getPublicEnvDefine(config) {
|
|
@@ -10276,7 +10279,7 @@ function createRequestFromNodeRequest(req, url, signal) {
|
|
|
10276
10279
|
});
|
|
10277
10280
|
}
|
|
10278
10281
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createRequestFromNodeRequest, "createRequestFromNodeRequest");
|
|
10279
|
-
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request2) =>
|
|
10282
|
+
function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request2) => _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, request2)) {
|
|
10280
10283
|
const middleware = _chunkMQ3H6LT5cjs._withAfterNodeMiddleware.call(void 0, handler);
|
|
10281
10284
|
return (req, res, next) => {
|
|
10282
10285
|
const traceUrl = resolveTraceUrl(req);
|
|
@@ -10903,7 +10906,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
10903
10906
|
);
|
|
10904
10907
|
const generateTypeArtifacts = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
10905
10908
|
try {
|
|
10906
|
-
const result = await
|
|
10909
|
+
const result = await _chunk5D2JIPLHcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
10907
10910
|
root: farmConfig.root,
|
|
10908
10911
|
srcDir: farmConfig.srcDir,
|
|
10909
10912
|
layers: farmConfig.layers,
|
|
@@ -11070,7 +11073,8 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
11070
11073
|
layoutCount: discoveredRoutes.filter((r) => r.kind === "layout").length
|
|
11071
11074
|
});
|
|
11072
11075
|
}
|
|
11073
|
-
|
|
11076
|
+
const dispatchToDevServer = _chunkUXHS27O6cjs.createFarmDevServerDispatch.call(void 0, server);
|
|
11077
|
+
apiRouteManager = new (0, _chunkU6MPZ35Qcjs.APIRouteManager)(appDirs, server, {
|
|
11074
11078
|
plugins: farmConfig.plugins,
|
|
11075
11079
|
i18n: farmApp.getI18nRuntime(),
|
|
11076
11080
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -11080,7 +11084,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
11080
11084
|
dispatch: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (request2) => {
|
|
11081
11085
|
const url = new URL(request2.url);
|
|
11082
11086
|
url.pathname = _chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, url.pathname, farmConfig.basePath);
|
|
11083
|
-
return
|
|
11087
|
+
return dispatchToDevServer(new Request(url, request2));
|
|
11084
11088
|
}, "dispatch")
|
|
11085
11089
|
});
|
|
11086
11090
|
await apiRouteManager.discoverRoutes();
|
|
@@ -11116,7 +11120,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
11116
11120
|
});
|
|
11117
11121
|
}
|
|
11118
11122
|
}
|
|
11119
|
-
middlewareManager = new (0,
|
|
11123
|
+
middlewareManager = new (0, _chunkLPFV45AYcjs.MiddlewareManager)(
|
|
11120
11124
|
appDirs,
|
|
11121
11125
|
server,
|
|
11122
11126
|
farmConfig.middleware,
|
|
@@ -11354,7 +11358,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11354
11358
|
(request2) => {
|
|
11355
11359
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _610 => _610.getConfig, 'call', _611 => _611()]), () => ( options));
|
|
11356
11360
|
const currentServerConfig = _chunkKIIMAWOJcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
11357
|
-
return
|
|
11361
|
+
return _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, request2, {
|
|
11358
11362
|
trustProxy: currentServerConfig.trustProxy
|
|
11359
11363
|
});
|
|
11360
11364
|
}
|
|
@@ -11365,7 +11369,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11365
11369
|
const requestMethod = req.method || "GET";
|
|
11366
11370
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _612 => _612.getConfig, 'call', _613 => _613()]), () => ( options));
|
|
11367
11371
|
const currentServerConfig = _chunkKIIMAWOJcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
|
|
11368
|
-
const parsedRequestUrl =
|
|
11372
|
+
const parsedRequestUrl = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, {
|
|
11369
11373
|
trustProxy: currentServerConfig.trustProxy
|
|
11370
11374
|
});
|
|
11371
11375
|
const fullUrl = parsedRequestUrl.toString();
|
|
@@ -11487,20 +11491,20 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11487
11491
|
const docsHandler = openAPIManager.getDocsRouteHandler(parsedRequestUrl.origin);
|
|
11488
11492
|
return docsHandler(req, res);
|
|
11489
11493
|
}
|
|
11490
|
-
if (_optionalChain([options, 'access', _622 => _622.agent, 'optionalAccess', _623 => _623.manifest]) !== false &&
|
|
11494
|
+
if (_optionalChain([options, 'access', _622 => _622.agent, 'optionalAccess', _623 => _623.manifest]) !== false && _chunkLOFKRKO7cjs.isFarmAppManifestPath.call(void 0, _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
11491
11495
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
11492
11496
|
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = resolveFarmAppPackages(_nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
11493
11497
|
const header = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (name) => String(_nullishCoalesce(req.headers[name], () => ( ""))), "header");
|
|
11494
|
-
const manifest = await
|
|
11498
|
+
const manifest = await _chunkLOFKRKO7cjs.createFarmAppManifestResponse.call(void 0,
|
|
11495
11499
|
new Request(parsedRequestUrl, {
|
|
11496
11500
|
method: requestMethod,
|
|
11497
11501
|
headers: {
|
|
11498
11502
|
"if-none-match": header("if-none-match"),
|
|
11499
|
-
[
|
|
11503
|
+
[_chunkLOFKRKO7cjs.FARM_INFRA_SIGNATURE_HEADER]: header(_chunkLOFKRKO7cjs.FARM_INFRA_SIGNATURE_HEADER)
|
|
11500
11504
|
}
|
|
11501
11505
|
}),
|
|
11502
11506
|
{
|
|
11503
|
-
...
|
|
11507
|
+
..._chunkLOFKRKO7cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
11504
11508
|
build: "development",
|
|
11505
11509
|
packages: farmAppPackages,
|
|
11506
11510
|
// Read again on each request; unchanged files come from a cache.
|
|
@@ -11512,13 +11516,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11512
11516
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0, res, manifest);
|
|
11513
11517
|
return;
|
|
11514
11518
|
}
|
|
11515
|
-
if (_optionalChain([options, 'access', _627 => _627.agent, 'optionalAccess', _628 => _628.apiCatalog]) && _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
11519
|
+
if (_optionalChain([options, 'access', _627 => _627.agent, 'optionalAccess', _628 => _628.apiCatalog]) && _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkLOFKRKO7cjs.FARM_API_CATALOG_PATH) {
|
|
11516
11520
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
11517
11521
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
11518
11522
|
res,
|
|
11519
|
-
|
|
11523
|
+
_chunkLOFKRKO7cjs.createFarmApiCatalogResponse.call(void 0,
|
|
11520
11524
|
requestMethod,
|
|
11521
|
-
|
|
11525
|
+
_chunkLOFKRKO7cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
11522
11526
|
new Request(parsedRequestUrl, {
|
|
11523
11527
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
11524
11528
|
})
|
|
@@ -11527,7 +11531,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11527
11531
|
return;
|
|
11528
11532
|
}
|
|
11529
11533
|
if (_optionalChain([options, 'access', _629 => _629.agent, 'optionalAccess', _630 => _630.aiCatalog]) !== false) {
|
|
11530
|
-
const aiCatalog =
|
|
11534
|
+
const aiCatalog = _chunkLOFKRKO7cjs.createFarmAiCatalogResponse.call(void 0,
|
|
11531
11535
|
new Request(parsedRequestUrl, {
|
|
11532
11536
|
method: requestMethod,
|
|
11533
11537
|
headers: {
|
|
@@ -11575,7 +11579,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11575
11579
|
return;
|
|
11576
11580
|
}
|
|
11577
11581
|
}
|
|
11578
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
11582
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunkB5PFZLKVcjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
11579
11583
|
request: new Request(fullUrl, {
|
|
11580
11584
|
method: requestMethod,
|
|
11581
11585
|
headers: docsHeaders
|
|
@@ -11583,7 +11587,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11583
11587
|
config: farmApp.getConfig().mdx,
|
|
11584
11588
|
resolveSource: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (pathname2) => {
|
|
11585
11589
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
11586
|
-
const sourcePath = _optionalChain([match, 'access', _631 => _631.route, 'optionalAccess', _632 => _632.markdownSourcePath]) || (match.route &&
|
|
11590
|
+
const sourcePath = _optionalChain([match, 'access', _631 => _631.route, 'optionalAccess', _632 => _632.markdownSourcePath]) || (match.route && _chunkB5PFZLKVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
11587
11591
|
if (!sourcePath) {
|
|
11588
11592
|
return null;
|
|
11589
11593
|
}
|
|
@@ -11593,11 +11597,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11593
11597
|
};
|
|
11594
11598
|
}, "resolveSource"),
|
|
11595
11599
|
// The anonymous check goes through this server, so its guards and
|
|
11596
|
-
// middleware see the page's own path, as in production.
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11600
|
+
// middleware see the page's own path, as in production. It connects to
|
|
11601
|
+
// this server's own listener, never the host the caller's Host names.
|
|
11602
|
+
renderPage: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (request2) => _chunkUXHS27O6cjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
11603
|
+
new Request(request2, {
|
|
11604
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunkKIIMAWOJcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
11605
|
+
})
|
|
11606
|
+
), "renderPage")
|
|
11601
11607
|
});
|
|
11602
11608
|
if (markdownSourceResponse) {
|
|
11603
11609
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
@@ -11611,14 +11617,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11611
11617
|
}),
|
|
11612
11618
|
config: farmApp.getConfig().md,
|
|
11613
11619
|
routeExists: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pathname2) => Boolean(farmApp.getRouteManager().matchRoute(pathname2).route), "routeExists"),
|
|
11614
|
-
//
|
|
11615
|
-
//
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11620
|
+
// The page is rendered by this server's own listener, never the host the
|
|
11621
|
+
// caller's Host names. Redirects are not followed, so the mirror answers with
|
|
11622
|
+
// the page's own (a sign-in gate, say), as production does.
|
|
11623
|
+
renderPage: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (request2) => {
|
|
11624
|
+
const headers = new Headers(request2.headers);
|
|
11625
|
+
headers.delete("accept-encoding");
|
|
11626
|
+
return _chunkUXHS27O6cjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
11627
|
+
new Request(request2, {
|
|
11628
|
+
headers,
|
|
11629
|
+
// Only accepted mirrors need disconnect listeners. An earlier
|
|
11630
|
+
// close (for example while the docs handler ran) must also abort.
|
|
11631
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunkKIIMAWOJcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
11632
|
+
})
|
|
11633
|
+
);
|
|
11634
|
+
}, "renderPage"),
|
|
11622
11635
|
apiServerBasePath
|
|
11623
11636
|
});
|
|
11624
11637
|
if (markdownResponse) {
|
|
@@ -11627,7 +11640,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11627
11640
|
return;
|
|
11628
11641
|
}
|
|
11629
11642
|
if (!viteModuleRequest && _chunkEUV4YR3Vcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
11630
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
11643
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkB5PFZLKVcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
|
|
11631
11644
|
if (!markdownRoute.route) {
|
|
11632
11645
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
11633
11646
|
res.statusCode = 404;
|
|
@@ -11691,7 +11704,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11691
11704
|
}
|
|
11692
11705
|
const configuredIntegrations = currentConfig.integrations;
|
|
11693
11706
|
const tryConfiguredIntegrationRoute = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async () => {
|
|
11694
|
-
const matchedRoute =
|
|
11707
|
+
const matchedRoute = _chunkUJZLSXUBcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
|
|
11695
11708
|
pathname: requestPathname,
|
|
11696
11709
|
method: requestMethod
|
|
11697
11710
|
});
|
|
@@ -11704,8 +11717,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11704
11717
|
await pm.runHookParallelFiltered(
|
|
11705
11718
|
"beforeRequest",
|
|
11706
11719
|
(plugin) => {
|
|
11707
|
-
const owner =
|
|
11708
|
-
return plugin.name !==
|
|
11720
|
+
const owner = _chunkUJZLSXUBcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
|
|
11721
|
+
return plugin.name !== _chunkADOAUDQ6cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _633 => _633.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
11709
11722
|
},
|
|
11710
11723
|
req,
|
|
11711
11724
|
res
|
|
@@ -11733,7 +11746,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11733
11746
|
signal: _chunkKIIMAWOJcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
11734
11747
|
});
|
|
11735
11748
|
const dispatchIntegration = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (request2) => {
|
|
11736
|
-
const result = await
|
|
11749
|
+
const result = await _chunkUJZLSXUBcjs.dispatchIntegrationRequest.call(void 0,
|
|
11737
11750
|
{
|
|
11738
11751
|
integration: matchedRoute.integration,
|
|
11739
11752
|
config: currentConfig,
|
|
@@ -11796,11 +11809,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11796
11809
|
}
|
|
11797
11810
|
const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
|
|
11798
11811
|
const hasMatchedApiRoute = Boolean(matchedApiRoute);
|
|
11799
|
-
if (hasMatchedApiRoute ||
|
|
11812
|
+
if (hasMatchedApiRoute || _chunkNDILNQ4Lcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
|
|
11800
11813
|
const startTime2 = Date.now();
|
|
11801
11814
|
const method2 = req.method || "GET";
|
|
11802
11815
|
const urlPath2 = req.url || "/";
|
|
11803
|
-
const pathname2 =
|
|
11816
|
+
const pathname2 = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, {
|
|
11804
11817
|
trustProxy: currentServerConfig.trustProxy
|
|
11805
11818
|
}).pathname;
|
|
11806
11819
|
try {
|
|
@@ -11808,7 +11821,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11808
11821
|
if (hasMatchedApiRoute) {
|
|
11809
11822
|
await pm.runHookParallelFiltered(
|
|
11810
11823
|
"beforeRequest",
|
|
11811
|
-
(plugin) => plugin.name !==
|
|
11824
|
+
(plugin) => plugin.name !== _chunkADOAUDQ6cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
11812
11825
|
req,
|
|
11813
11826
|
res
|
|
11814
11827
|
);
|
|
@@ -12213,7 +12226,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
12213
12226
|
pageShouldHydrate: shouldHydrate,
|
|
12214
12227
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
12215
12228
|
islandStrategy: hydrationIslandStrategy,
|
|
12216
|
-
rendering:
|
|
12229
|
+
rendering: _chunk5D2JIPLHcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
12217
12230
|
});
|
|
12218
12231
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
12219
12232
|
const layoutStartIndex = getSharedLayoutPrefixLength(
|
|
@@ -12221,9 +12234,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
12221
12234
|
destinationLayoutPatterns
|
|
12222
12235
|
);
|
|
12223
12236
|
const renderer = farmApp.getServerRenderer();
|
|
12224
|
-
const fragmentHtml = await
|
|
12237
|
+
const fragmentHtml = await _chunkG2TEB74Scjs._runWithMiddlewareData.call(void 0,
|
|
12225
12238
|
middlewareMap,
|
|
12226
|
-
() =>
|
|
12239
|
+
() => _chunkG2TEB74Scjs._runWithMiddlewareContext.call(void 0,
|
|
12227
12240
|
middlewareContext,
|
|
12228
12241
|
() => renderer.renderNavigationFragment({
|
|
12229
12242
|
PageComponent: routeModule.default,
|
|
@@ -12331,7 +12344,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
12331
12344
|
const startTime = Date.now();
|
|
12332
12345
|
const method = req.method || "GET";
|
|
12333
12346
|
const urlPath = req.url || "/";
|
|
12334
|
-
const requestedPathname =
|
|
12347
|
+
const requestedPathname = _chunkNICDYKBScjs.resolveFarmRequestURL.call(void 0, req, {
|
|
12335
12348
|
trustProxy: currentServerConfig.trustProxy
|
|
12336
12349
|
}).pathname;
|
|
12337
12350
|
const routeManager2 = farmApp.getRouteManager();
|
|
@@ -12444,7 +12457,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
12444
12457
|
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _694 => _694.matchRoute, 'call', _695 => _695(currentPathname), 'optionalAccess', _696 => _696.route]));
|
|
12445
12458
|
await pm.runHookParallelFiltered(
|
|
12446
12459
|
"beforeRequest",
|
|
12447
|
-
(plugin) => !hasLocalPageRoute || plugin.name !==
|
|
12460
|
+
(plugin) => !hasLocalPageRoute || plugin.name !== _chunkADOAUDQ6cjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
12448
12461
|
req,
|
|
12449
12462
|
res
|
|
12450
12463
|
);
|
|
@@ -12533,7 +12546,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
12533
12546
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
12534
12547
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
12535
12548
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunk6MVFL3R5cjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
12536
|
-
const integrationProviders = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ?
|
|
12549
|
+
const integrationProviders = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _chunkUJZLSXUBcjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
12537
12550
|
const isolatedHydrationMode = resolveFarmIsolatedClientHydrationMode(
|
|
12538
12551
|
_optionalChain([resolvedConfig, 'optionalAccess', _721 => _721.experimental, 'optionalAccess', _722 => _722.isolatedClientHydration]),
|
|
12539
12552
|
{
|
|
@@ -12544,7 +12557,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
12544
12557
|
return generateClientCode(
|
|
12545
12558
|
integrationProviders,
|
|
12546
12559
|
[
|
|
12547
|
-
...
|
|
12560
|
+
..._chunkUJZLSXUBcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
12548
12561
|
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _725 => _725.getFarmDocsDocumentNavigationMatchers, 'call', _726 => _726(docs)]), () => ( []))
|
|
12549
12562
|
],
|
|
12550
12563
|
generatedDocsSearchRuntime,
|
|
@@ -12610,11 +12623,11 @@ export const getManifest = () => ({
|
|
|
12610
12623
|
};
|
|
12611
12624
|
}
|
|
12612
12625
|
for (const layout of manifest.layouts) {
|
|
12613
|
-
const groupScope =
|
|
12626
|
+
const groupScope = _chunkLOFKRKO7cjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
12614
12627
|
fullManifest.layouts[layout.pattern] = {
|
|
12615
12628
|
modulePath: layout.modulePath,
|
|
12616
12629
|
pattern: layout.pattern,
|
|
12617
|
-
...groupScope ? { urlPattern:
|
|
12630
|
+
...groupScope ? { urlPattern: _chunkLOFKRKO7cjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
|
|
12618
12631
|
shouldHydrate: layout.shouldHydrate,
|
|
12619
12632
|
islandStrategy: layout.islandStrategy,
|
|
12620
12633
|
preloads: [layout.modulePath],
|
|
@@ -15134,7 +15147,7 @@ async function defineConfig(config = {}) {
|
|
|
15134
15147
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
15135
15148
|
console.log("");
|
|
15136
15149
|
console.log(
|
|
15137
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
15150
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkNQ6QFZWDcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
15138
15151
|
);
|
|
15139
15152
|
console.log("");
|
|
15140
15153
|
console.log(
|