@farm.js/core 0.1.27 → 0.1.29
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-runtime.d.mts +3 -2
- package/dist/agent-runtime.d.ts +3 -2
- package/dist/api/client.cjs +4 -6
- package/dist/api/client.d.mts +1 -0
- package/dist/api/client.d.ts +1 -0
- package/dist/api/client.mjs +3 -5
- package/dist/api/route-manager.cjs +9 -8
- package/dist/api/route-manager.d.mts +2 -1
- package/dist/api/route-manager.d.ts +2 -1
- package/dist/api/route-manager.mjs +8 -7
- package/dist/api/runtime.cjs +7 -6
- package/dist/api/runtime.d.mts +3 -2
- package/dist/api/runtime.d.ts +3 -2
- package/dist/api/runtime.mjs +6 -5
- package/dist/api.cjs +12 -11
- package/dist/api.d.mts +19 -4
- package/dist/api.d.ts +19 -4
- package/dist/api.mjs +11 -10
- package/dist/{app-BfzZdjgX.d.mts → app-DAuUTIZf.d.mts} +3 -3
- package/dist/app-markdown.cjs +6 -5
- package/dist/app-markdown.d.mts +4 -3
- package/dist/app-markdown.d.ts +4 -3
- package/dist/app-markdown.mjs +5 -4
- package/dist/{app-CXK7Prrt.d.ts → app-sUJ3jnTZ.d.ts} +3 -3
- package/dist/cache-invalidation-BD0z_lfu.d.mts +4 -0
- package/dist/cache-invalidation-BD0z_lfu.d.ts +4 -0
- package/dist/cache.cjs +6 -4
- package/dist/cache.d.mts +11 -6
- package/dist/cache.d.ts +11 -6
- package/dist/cache.mjs +7 -5
- package/dist/{chunk-N6UROPT7.mjs → chunk-2FQHH5SC.mjs} +12 -13
- package/dist/{chunk-UUYF3CHN.mjs → chunk-2N5PX3LS.mjs} +2 -2
- package/dist/{chunk-H6G5INWM.cjs → chunk-2SDO73HK.cjs} +14 -156
- package/dist/{chunk-4FHDV7VM.mjs → chunk-2UABTL3Y.mjs} +2 -2
- package/dist/{chunk-LAHZ7LZA.cjs → chunk-3FCFQP5V.cjs} +32 -20
- package/dist/{chunk-3TQWUUNP.cjs → chunk-3LUF2PE2.cjs} +10 -5
- package/dist/{chunk-SYGGPS4A.mjs → chunk-4IEPYMHF.mjs} +3 -3
- package/dist/{chunk-WD5PNSOB.mjs → chunk-4V7GIE2U.mjs} +6 -4
- package/dist/{chunk-UWTQTZFN.mjs → chunk-5KDPVSS3.mjs} +271 -155
- package/dist/{chunk-I7PUUDGY.cjs → chunk-63H6BKXG.cjs} +2 -2
- package/dist/{chunk-ZSO5GWGD.cjs → chunk-6CNX6Q3K.cjs} +168 -51
- package/dist/{chunk-3PTVHMLD.mjs → chunk-6G3ZZ2IE.mjs} +1 -1
- package/dist/{chunk-QBPXNZGV.cjs → chunk-6MVFL3R5.cjs} +25 -6
- package/dist/{chunk-FG5H2VCJ.mjs → chunk-6ZCMSZ5U.mjs} +2 -2
- package/dist/{chunk-YZBV7733.cjs → chunk-74T3CEA7.cjs} +397 -281
- package/dist/{chunk-ZMN3H73H.cjs → chunk-75DYEVXI.cjs} +13 -11
- package/dist/{chunk-WIVTGKLY.mjs → chunk-7CXKSRKL.mjs} +18 -11
- package/dist/{chunk-POXI72VV.mjs → chunk-ATXI6LGT.mjs} +148 -31
- package/dist/{chunk-NL3ZSMZB.cjs → chunk-BJPBQNIE.cjs} +12 -12
- package/dist/{chunk-Q4BHBO6V.mjs → chunk-BXFWA23T.mjs} +2 -2
- package/dist/{chunk-MBFURXAC.mjs → chunk-BZ3CHOFX.mjs} +1 -1
- package/dist/{chunk-TDWFCC2T.cjs → chunk-BZAGKCKB.cjs} +2 -2
- package/dist/chunk-CNOQY6Z7.mjs +156 -0
- package/dist/{chunk-DW34V5SM.cjs → chunk-CTV2TTNP.cjs} +4 -4
- package/dist/{chunk-HG237IEY.mjs → chunk-D234YWNA.mjs} +1 -1
- package/dist/{chunk-YXM74XOW.cjs → chunk-D4JE5NNV.cjs} +12 -12
- package/dist/{chunk-O2LV5XDG.mjs → chunk-DGXN3L4D.mjs} +20 -8
- package/dist/{chunk-4UNKCNSL.mjs → chunk-E76XC6ZG.mjs} +2 -2
- package/dist/{chunk-QQQNJS2E.mjs → chunk-E7UN576T.mjs} +1 -1
- package/dist/{chunk-G3HRIVEY.cjs → chunk-ES4B2IXW.cjs} +2 -2
- package/dist/{chunk-JQGDQO2I.cjs → chunk-EXLKRR4U.cjs} +10 -10
- package/dist/chunk-FJ3M4CUX.cjs +46 -0
- package/dist/chunk-FXEF4PPL.mjs +47 -0
- package/dist/{chunk-WD4YXVLV.mjs → chunk-GZYH4OER.mjs} +1 -1
- package/dist/{chunk-DX4VKYAJ.cjs → chunk-I26CZYPV.cjs} +6 -4
- package/dist/{chunk-F6SJAKFJ.mjs → chunk-IV6CQY7O.mjs} +12 -154
- package/dist/{chunk-6D242YGO.mjs → chunk-JATSG2ZO.mjs} +1 -1
- package/dist/{chunk-KAERLFD3.cjs → chunk-JFHKNFEO.cjs} +30 -23
- package/dist/{chunk-U74A3P2P.cjs → chunk-JLRDISQL.cjs} +7 -7
- package/dist/{chunk-BYODCJD6.cjs → chunk-K7CELQLK.cjs} +12 -13
- package/dist/{chunk-Y4YWHNKU.cjs → chunk-KH7BN726.cjs} +9 -9
- package/dist/{chunk-3IL5UC5I.cjs → chunk-KZLND3D2.cjs} +2 -2
- package/dist/{chunk-TKDY6AJP.mjs → chunk-MKMBQSNQ.mjs} +1 -1
- package/dist/{chunk-OCE65DDM.mjs → chunk-MNUGPHLN.mjs} +1 -1
- package/dist/{chunk-WJKVTJJR.cjs → chunk-NPPL5YDT.cjs} +2 -2
- package/dist/{chunk-HF5SIACK.cjs → chunk-NXG66MR7.cjs} +3 -3
- package/dist/chunk-NYJMY3JA.cjs +156 -0
- package/dist/{chunk-VVJCWBIE.mjs → chunk-O3DTUAX2.mjs} +2 -2
- package/dist/{chunk-R6AIILII.cjs → chunk-OZVEHHMA.cjs} +15 -14
- package/dist/{chunk-FPW4W3VW.mjs → chunk-PQD2AI3B.mjs} +1 -1
- package/dist/{chunk-C7OUJ6JI.cjs → chunk-PZNCMPJF.cjs} +3 -3
- package/dist/{chunk-QI7WQSMI.cjs → chunk-Q5JFU33Q.cjs} +4 -4
- package/dist/{chunk-52SH7TKB.mjs → chunk-QG5HNS7P.mjs} +2 -2
- package/dist/{chunk-CEYUWDWA.mjs → chunk-QZCT2CQ4.mjs} +10 -5
- package/dist/{chunk-FZC7EEPM.mjs → chunk-RSOJ7DRT.mjs} +26 -7
- package/dist/{chunk-QMV4QELL.mjs → chunk-S5GDHOE4.mjs} +4 -2
- package/dist/{chunk-CRQPYWLK.cjs → chunk-SORB3MAR.cjs} +14 -14
- package/dist/{chunk-I4J452B7.cjs → chunk-VHJGDMCG.cjs} +3 -3
- package/dist/{chunk-B6ZCT36X.cjs → chunk-WNLBF77X.cjs} +4 -4
- package/dist/{chunk-FOT7LZEO.cjs → chunk-WPPX4G7Q.cjs} +1 -1
- package/dist/{chunk-UNSKL6BI.cjs → chunk-X4ZV4QC5.cjs} +266 -228
- package/dist/{chunk-6EG7U4NF.mjs → chunk-X7WVQMIB.mjs} +1 -1
- package/dist/chunk-XD32KALF.cjs +47 -0
- package/dist/{chunk-RDV44SED.mjs → chunk-XJJVLDM6.mjs} +15 -14
- package/dist/{chunk-DQMTHWPI.cjs → chunk-XLTV4VOG.cjs} +21 -16
- package/dist/{chunk-5SPPCN5J.mjs → chunk-XNPDONUH.mjs} +1 -1
- package/dist/{chunk-UOXGA6TO.mjs → chunk-YDQZGSDS.mjs} +1 -1
- package/dist/{chunk-JT25KHDI.mjs → chunk-YMUE7L3D.mjs} +18 -13
- package/dist/chunk-Z3HATSKO.mjs +46 -0
- package/dist/{chunk-C3VRMB6H.cjs → chunk-ZCU4NZ3M.cjs} +6 -6
- package/dist/{chunk-NPFGGBM5.cjs → chunk-ZDILFMWN.cjs} +13 -13
- package/dist/{chunk-OGHTEYXS.mjs → chunk-ZYVFAOBT.mjs} +72 -34
- package/dist/{client-plugins-1GS4zubE.d.mts → client-plugins-BX2ptm4H.d.mts} +42 -34
- package/dist/{client-plugins-B1Za6F5x.d.ts → client-plugins-BmxM5KW_.d.ts} +42 -34
- package/dist/client-plugins.d.mts +3 -2
- package/dist/client-plugins.d.ts +3 -2
- package/dist/client.cjs +11 -12
- package/dist/client.d.mts +6 -5
- package/dist/client.d.ts +6 -5
- package/dist/client.mjs +10 -11
- package/dist/config.d.mts +3 -2
- package/dist/config.d.ts +3 -2
- package/dist/{devtools-CQJ3H6MX.cjs → devtools-GGVPZHJX.cjs} +96 -21
- package/dist/{devtools-6RN6KHTW.mjs → devtools-THVNPI2M.mjs} +80 -5
- package/dist/{devtools-client-4WAPJY5L.cjs → devtools-client-CXQ6PXI6.cjs} +1 -1
- package/dist/{devtools-client-LEUIHHAS.mjs → devtools-client-HJS2T34Y.mjs} +1 -1
- package/dist/docs.cjs +9 -8
- package/dist/docs.mjs +8 -7
- package/dist/index.cjs +61 -57
- package/dist/index.d.mts +26 -15
- package/dist/index.d.ts +26 -15
- package/dist/index.mjs +69 -65
- package/dist/integrations.d.mts +3 -2
- package/dist/integrations.d.ts +3 -2
- package/dist/internal/app-markdown-runtime.cjs +5 -4
- package/dist/internal/app-markdown-runtime.d.mts +4 -3
- package/dist/internal/app-markdown-runtime.d.ts +4 -3
- package/dist/internal/app-markdown-runtime.mjs +4 -3
- package/dist/internal/build-runtime.cjs +26 -23
- package/dist/internal/build-runtime.d.mts +5 -4
- package/dist/internal/build-runtime.d.ts +5 -4
- package/dist/internal/build-runtime.mjs +25 -22
- package/dist/internal/cli-runtime.cjs +15 -13
- package/dist/internal/cli-runtime.mjs +14 -12
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +5 -1
- package/dist/internal/client-runtime.d.mts +1 -0
- package/dist/internal/client-runtime.d.ts +1 -0
- package/dist/internal/client-runtime.mjs +4 -0
- package/dist/internal/compression-runtime.cjs +3 -2
- package/dist/internal/compression-runtime.d.mts +6 -3
- package/dist/internal/compression-runtime.d.ts +6 -3
- package/dist/internal/compression-runtime.mjs +2 -1
- package/dist/internal/config-runtime.cjs +7 -6
- package/dist/internal/config-runtime.d.mts +4 -3
- package/dist/internal/config-runtime.d.ts +4 -3
- package/dist/internal/config-runtime.mjs +6 -5
- package/dist/internal/product-telemetry-runtime.cjs +10 -6
- package/dist/internal/product-telemetry-runtime.mjs +9 -5
- package/dist/internal/production-runtime.cjs +29 -13
- package/dist/internal/production-runtime.d.mts +36 -8
- package/dist/internal/production-runtime.d.ts +36 -8
- package/dist/internal/production-runtime.mjs +32 -16
- package/dist/markdown.cjs +4 -3
- package/dist/markdown.d.mts +3 -2
- package/dist/markdown.d.ts +3 -2
- package/dist/markdown.mjs +3 -2
- package/dist/{metadata-B9mCxKgp.d.mts → metadata-DsEaK7mQ.d.mts} +1 -1
- package/dist/{metadata-7LKgQEWF.d.ts → metadata-fwZ3gfG6.d.ts} +1 -1
- package/dist/middleware.cjs +6 -5
- package/dist/middleware.d.mts +4 -3
- package/dist/middleware.d.ts +4 -3
- package/dist/middleware.mjs +5 -4
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +5 -4
- package/dist/navigation.d.ts +5 -4
- package/dist/navigation.mjs +4 -4
- package/dist/plugin.cjs +25 -20
- package/dist/plugin.d.mts +3 -2
- package/dist/plugin.d.ts +3 -2
- package/dist/plugin.mjs +25 -20
- package/dist/{production-runtime-DramhI0c.d.mts → production-runtime-Baqgwtvc.d.mts} +1 -1
- package/dist/{production-runtime-B3xnY6fI.d.ts → production-runtime-DNkpFnmg.d.ts} +1 -1
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan-CtQB-zHS.d.mts → render-plan-DhwQnmmX.d.mts} +1 -1
- package/dist/{render-plan-CpW32tOL.d.ts → render-plan-rkIK9wd9.d.ts} +1 -1
- package/dist/renderer-client.cjs +13 -14
- package/dist/renderer-client.d.mts +4 -3
- package/dist/renderer-client.d.ts +4 -3
- package/dist/renderer-client.mjs +6 -7
- package/dist/{request-BVGGeQv4.d.ts → request-BcY4RYPC.d.ts} +1 -1
- package/dist/{request-DlLVBKe3.d.mts → request-CFy1BltJ.d.mts} +1 -1
- package/dist/request.d.mts +4 -3
- package/dist/request.d.ts +4 -3
- package/dist/{route-rendering-DChYLNdh.d.mts → route-rendering-BkS0TBlB.d.mts} +1 -1
- package/dist/{route-rendering-BdEldajn.d.ts → route-rendering-D4XpMjam.d.ts} +1 -1
- package/dist/{router-D5htHn_M.d.mts → router-C4zPlC3V.d.mts} +1 -1
- package/dist/{router-D0Az-1Nu.d.ts → router-Cq7BcZxg.d.ts} +1 -1
- package/dist/routes.cjs +6 -5
- package/dist/routes.d.mts +3 -2
- package/dist/routes.d.ts +3 -2
- package/dist/routes.mjs +5 -4
- package/dist/server-fn-client.d.mts +1 -0
- package/dist/server-fn-client.d.ts +1 -0
- package/dist/server-fn.cjs +6 -5
- package/dist/server-fn.d.mts +1 -0
- package/dist/server-fn.d.ts +1 -0
- package/dist/server-fn.mjs +5 -4
- package/dist/server-plugins.cjs +3 -2
- package/dist/server-plugins.d.mts +3 -2
- package/dist/server-plugins.d.ts +3 -2
- package/dist/server-plugins.mjs +2 -1
- package/dist/server-query-client.cjs +5 -7
- package/dist/server-query-client.d.mts +1 -0
- package/dist/server-query-client.d.ts +1 -0
- package/dist/server-query-client.mjs +4 -6
- package/dist/server-query.cjs +7 -6
- package/dist/server-query.d.mts +1 -0
- package/dist/server-query.d.ts +1 -0
- package/dist/server-query.mjs +6 -5
- package/dist/server.cjs +72 -57
- package/dist/server.d.mts +10 -9
- package/dist/server.d.ts +10 -9
- package/dist/server.mjs +56 -41
- package/dist/{spa-router-DmwP_7QL.d.ts → spa-router-B1HI3X9k.d.ts} +2 -2
- package/dist/{spa-router-DVfSJZ5o.d.mts → spa-router-DzPZH-AO.d.mts} +2 -2
- package/dist/testing.cjs +14 -13
- package/dist/testing.d.mts +2 -1
- package/dist/testing.d.ts +2 -1
- package/dist/testing.mjs +11 -10
- package/dist/{utils-B_Rmr0-n.d.mts → utils-CEBktlBG.d.mts} +1 -1
- package/dist/{utils-Dv0OuLtF.d.ts → utils-DMD1Hzta.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +21 -19
- package/dist/vite.d.mts +3 -2
- package/dist/vite.d.ts +3 -2
- package/dist/vite.mjs +20 -18
- package/package.json +1 -1
- package/dist/{chunk-YOYF2E4U.mjs → chunk-LNZ7JZUS.mjs} +0 -0
- package/dist/{chunk-N4RLRSWW.cjs → chunk-SUIBNSNO.cjs} +0 -0
- package/dist/{chunk-TIKNUAU7.mjs → chunk-VUMAE7NC.mjs} +3 -3
- package/dist/{chunk-WM6HL7E7.cjs → chunk-ZHVYQL3H.cjs} +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkCTV2TTNPcjs = require('./chunk-CTV2TTNP.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -27,7 +27,7 @@ var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkNPPL5YDTcjs = require('./chunk-NPPL5YDT.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
var _chunkCXP5U3RWcjs = require('./chunk-CXP5U3RW.cjs');
|
|
@@ -64,7 +64,8 @@ var _chunkHREOKQWTcjs = require('./chunk-HREOKQWT.cjs');
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
|
|
68
|
+
var _chunk6MVFL3R5cjs = require('./chunk-6MVFL3R5.cjs');
|
|
68
69
|
|
|
69
70
|
|
|
70
71
|
|
|
@@ -107,7 +108,7 @@ var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
|
|
|
107
108
|
|
|
108
109
|
|
|
109
110
|
|
|
110
|
-
var
|
|
111
|
+
var _chunkXLTV4VOGcjs = require('./chunk-XLTV4VOG.cjs');
|
|
111
112
|
|
|
112
113
|
|
|
113
114
|
|
|
@@ -125,12 +126,12 @@ var _chunkVEKFLAQMcjs = require('./chunk-VEKFLAQM.cjs');
|
|
|
125
126
|
|
|
126
127
|
|
|
127
128
|
|
|
128
|
-
var
|
|
129
|
+
var _chunkBZAGKCKBcjs = require('./chunk-BZAGKCKB.cjs');
|
|
129
130
|
|
|
130
131
|
|
|
131
132
|
|
|
132
133
|
|
|
133
|
-
var
|
|
134
|
+
var _chunkNXG66MR7cjs = require('./chunk-NXG66MR7.cjs');
|
|
134
135
|
|
|
135
136
|
|
|
136
137
|
|
|
@@ -144,7 +145,7 @@ var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
|
|
|
144
145
|
|
|
145
146
|
|
|
146
147
|
|
|
147
|
-
var
|
|
148
|
+
var _chunk6CNX6Q3Kcjs = require('./chunk-6CNX6Q3K.cjs');
|
|
148
149
|
|
|
149
150
|
|
|
150
151
|
var _chunkMPEYMSCFcjs = require('./chunk-MPEYMSCF.cjs');
|
|
@@ -170,7 +171,7 @@ var _chunk6QQDAAAZcjs = require('./chunk-6QQDAAAZ.cjs');
|
|
|
170
171
|
var _chunkZ5HIWVDPcjs = require('./chunk-Z5HIWVDP.cjs');
|
|
171
172
|
|
|
172
173
|
|
|
173
|
-
var
|
|
174
|
+
var _chunkZHVYQL3Hcjs = require('./chunk-ZHVYQL3H.cjs');
|
|
174
175
|
|
|
175
176
|
|
|
176
177
|
|
|
@@ -185,11 +186,11 @@ var _chunk4PPEPOZZcjs = require('./chunk-4PPEPOZZ.cjs');
|
|
|
185
186
|
var _chunkMQ3H6LT5cjs = require('./chunk-MQ3H6LT5.cjs');
|
|
186
187
|
|
|
187
188
|
|
|
188
|
-
var
|
|
189
|
+
var _chunkEXLKRR4Ucjs = require('./chunk-EXLKRR4U.cjs');
|
|
189
190
|
|
|
190
191
|
|
|
191
192
|
|
|
192
|
-
var
|
|
193
|
+
var _chunkSUIBNSNOcjs = require('./chunk-SUIBNSNO.cjs');
|
|
193
194
|
|
|
194
195
|
|
|
195
196
|
|
|
@@ -204,7 +205,7 @@ var _chunkUJ2C4ICScjs = require('./chunk-UJ2C4ICS.cjs');
|
|
|
204
205
|
var _chunkLYLEZIG3cjs = require('./chunk-LYLEZIG3.cjs');
|
|
205
206
|
|
|
206
207
|
|
|
207
|
-
var
|
|
208
|
+
var _chunkPZNCMPJFcjs = require('./chunk-PZNCMPJF.cjs');
|
|
208
209
|
|
|
209
210
|
|
|
210
211
|
var _chunkWPYFSQKKcjs = require('./chunk-WPYFSQKK.cjs');
|
|
@@ -227,6 +228,11 @@ var _chunkSOR334EBcjs = require('./chunk-SOR334EB.cjs');
|
|
|
227
228
|
|
|
228
229
|
|
|
229
230
|
|
|
231
|
+
var _chunk2SDO73HKcjs = require('./chunk-2SDO73HK.cjs');
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
230
236
|
|
|
231
237
|
|
|
232
238
|
|
|
@@ -271,10 +277,15 @@ var _chunkQNPEUFHQcjs = require('./chunk-QNPEUFHQ.cjs');
|
|
|
271
277
|
|
|
272
278
|
|
|
273
279
|
|
|
280
|
+
|
|
281
|
+
var _chunkE3UK5IIBcjs = require('./chunk-E3UK5IIB.cjs');
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
274
285
|
var _chunkUQZ4AYTHcjs = require('./chunk-UQZ4AYTH.cjs');
|
|
275
286
|
|
|
276
287
|
|
|
277
|
-
var
|
|
288
|
+
var _chunkWPPX4G7Qcjs = require('./chunk-WPPX4G7Q.cjs');
|
|
278
289
|
|
|
279
290
|
|
|
280
291
|
|
|
@@ -293,7 +304,7 @@ var _chunk75BRBIFPcjs = require('./chunk-75BRBIFP.cjs');
|
|
|
293
304
|
|
|
294
305
|
|
|
295
306
|
|
|
296
|
-
var
|
|
307
|
+
var _chunk3LUF2PE2cjs = require('./chunk-3LUF2PE2.cjs');
|
|
297
308
|
|
|
298
309
|
|
|
299
310
|
|
|
@@ -307,15 +318,7 @@ var _chunkC5GUTBZKcjs = require('./chunk-C5GUTBZK.cjs');
|
|
|
307
318
|
var _chunkQBK2AA4Ucjs = require('./chunk-QBK2AA4U.cjs');
|
|
308
319
|
|
|
309
320
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
var _chunkH6G5INWMcjs = require('./chunk-H6G5INWM.cjs');
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
var _chunkE3UK5IIBcjs = require('./chunk-E3UK5IIB.cjs');
|
|
321
|
+
var _chunkNYJMY3JAcjs = require('./chunk-NYJMY3JA.cjs');
|
|
319
322
|
|
|
320
323
|
|
|
321
324
|
var _chunkYZTASLPQcjs = require('./chunk-YZTASLPQ.cjs');
|
|
@@ -1501,8 +1504,10 @@ function getProjectImportAliases(projectRoot) {
|
|
|
1501
1504
|
return "-";
|
|
1502
1505
|
}
|
|
1503
1506
|
}).join(":");
|
|
1507
|
+
const sourceDir = _chunk6MVFL3R5cjs.getFarmProjectSourceDir.call(void 0, projectRoot);
|
|
1508
|
+
const cacheStamp = `${stamp}:${sourceDir}`;
|
|
1504
1509
|
const cached = projectImportAliasCache.get(projectRoot);
|
|
1505
|
-
if (_optionalChain([cached, 'optionalAccess', _88 => _88.stamp]) ===
|
|
1510
|
+
if (_optionalChain([cached, 'optionalAccess', _88 => _88.stamp]) === cacheStamp) return cached.aliases;
|
|
1506
1511
|
const aliases = [
|
|
1507
1512
|
...readTsconfigPathAliases(projectRoot),
|
|
1508
1513
|
...readPackageImportAliases(projectRoot)
|
|
@@ -1512,10 +1517,10 @@ function getProjectImportAliases(projectRoot) {
|
|
|
1512
1517
|
prefix: "@/",
|
|
1513
1518
|
suffix: "",
|
|
1514
1519
|
wildcard: true,
|
|
1515
|
-
targets: [path9.default.join(projectRoot,
|
|
1520
|
+
targets: [path9.default.join(projectRoot, sourceDir, "*")]
|
|
1516
1521
|
});
|
|
1517
1522
|
}
|
|
1518
|
-
projectImportAliasCache.set(projectRoot, { stamp, aliases });
|
|
1523
|
+
projectImportAliasCache.set(projectRoot, { stamp: cacheStamp, aliases });
|
|
1519
1524
|
return aliases;
|
|
1520
1525
|
}
|
|
1521
1526
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getProjectImportAliases, "getProjectImportAliases");
|
|
@@ -2237,7 +2242,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2237
2242
|
);
|
|
2238
2243
|
const routeEntries = Array.from(this.routes.values()).map((entry) => ({
|
|
2239
2244
|
entry,
|
|
2240
|
-
metadata:
|
|
2245
|
+
metadata: _chunkNXG66MR7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : getClientModuleHydrationPlan(
|
|
2241
2246
|
entry.modulePath,
|
|
2242
2247
|
normalizedProjectRoot,
|
|
2243
2248
|
isolatedMode,
|
|
@@ -2245,7 +2250,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2245
2250
|
)
|
|
2246
2251
|
}));
|
|
2247
2252
|
const markdownFallback = routeEntries.find(
|
|
2248
|
-
({ entry, metadata }) =>
|
|
2253
|
+
({ entry, metadata }) => _chunkNXG66MR7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
|
|
2249
2254
|
);
|
|
2250
2255
|
if (markdownFallback) {
|
|
2251
2256
|
_chunk5QIKR7RRcjs.logger.warn(
|
|
@@ -2253,7 +2258,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2253
2258
|
);
|
|
2254
2259
|
}
|
|
2255
2260
|
const markdownStaticPackages = _optionalChain([routeEntries, 'access', _120 => _120.find, 'call', _121 => _121(
|
|
2256
|
-
({ entry, metadata }) =>
|
|
2261
|
+
({ entry, metadata }) => _chunkNXG66MR7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
|
|
2257
2262
|
), 'optionalAccess', _122 => _122.metadata, 'access', _123 => _123.staticPackageBoundaries]);
|
|
2258
2263
|
if (markdownStaticPackages) {
|
|
2259
2264
|
_chunk5QIKR7RRcjs.logger.info(
|
|
@@ -2261,7 +2266,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2261
2266
|
);
|
|
2262
2267
|
}
|
|
2263
2268
|
for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
|
|
2264
|
-
if (
|
|
2269
|
+
if (_chunkNXG66MR7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
|
|
2265
2270
|
_chunk5QIKR7RRcjs.logger.info(
|
|
2266
2271
|
`[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.`
|
|
2267
2272
|
);
|
|
@@ -2413,13 +2418,13 @@ var _RouteManager = class _RouteManager {
|
|
|
2413
2418
|
const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
|
|
2414
2419
|
return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
|
|
2415
2420
|
}
|
|
2416
|
-
if (
|
|
2421
|
+
if (_chunkNXG66MR7cjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
|
|
2417
2422
|
const mdxConfig = _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, this.config.mdx);
|
|
2418
|
-
const components = await
|
|
2423
|
+
const components = await _chunkBZAGKCKBcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
|
|
2419
2424
|
root: this.config.root,
|
|
2420
2425
|
loadModule: this.viteServer ? (componentModulePath) => _chunkBMWDEBXOcjs.loadFarmDevModule.call(void 0, this.viteServer, componentModulePath) : void 0
|
|
2421
2426
|
});
|
|
2422
|
-
return await
|
|
2427
|
+
return await _chunkBZAGKCKBcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
|
|
2423
2428
|
components,
|
|
2424
2429
|
config: mdxConfig
|
|
2425
2430
|
});
|
|
@@ -2512,7 +2517,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2512
2517
|
appDir
|
|
2513
2518
|
);
|
|
2514
2519
|
const canonicalPageGroups = /* @__PURE__ */ new Map();
|
|
2515
|
-
for (const file of pageFiles.filter((candidate) =>
|
|
2520
|
+
for (const file of pageFiles.filter((candidate) => _chunkCTV2TTNPcjs.parseRouteSlotFile.call(void 0, candidate) === null)) {
|
|
2516
2521
|
const route = _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, file);
|
|
2517
2522
|
const pattern = this.createRoutePattern(route);
|
|
2518
2523
|
const group = canonicalPageGroups.get(pattern);
|
|
@@ -2526,8 +2531,8 @@ var _RouteManager = class _RouteManager {
|
|
|
2526
2531
|
}
|
|
2527
2532
|
}
|
|
2528
2533
|
for (const [pattern, group] of canonicalPageGroups) {
|
|
2529
|
-
const componentFiles = group.files.filter((file) => !
|
|
2530
|
-
const markdownFiles = group.files.filter(
|
|
2534
|
+
const componentFiles = group.files.filter((file) => !_chunkNXG66MR7cjs.isFarmMarkdownPageFile.call(void 0, file));
|
|
2535
|
+
const markdownFiles = group.files.filter(_chunkNXG66MR7cjs.isFarmMarkdownPageFile);
|
|
2531
2536
|
if (componentFiles.length > 1) {
|
|
2532
2537
|
throw new Error(
|
|
2533
2538
|
`Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path9.default.join(appDir, file)).join(" and ")}.`
|
|
@@ -2585,7 +2590,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2585
2590
|
}
|
|
2586
2591
|
}
|
|
2587
2592
|
for (const file of [...pageFiles, ...slotDefaultFiles]) {
|
|
2588
|
-
const slot =
|
|
2593
|
+
const slot = _chunkCTV2TTNPcjs.parseRouteSlotFile.call(void 0, file);
|
|
2589
2594
|
if (!slot) continue;
|
|
2590
2595
|
const modulePath = path9.default.join(appDir, file);
|
|
2591
2596
|
const pattern = this.createRoutePattern(slot.route);
|
|
@@ -2607,7 +2612,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2607
2612
|
ownerPattern,
|
|
2608
2613
|
interception: slot.interception,
|
|
2609
2614
|
fallback: slot.fallback,
|
|
2610
|
-
containerId:
|
|
2615
|
+
containerId: _chunkCTV2TTNPcjs.createRouteSlotContainerId.call(void 0, slot.name, ownerPattern)
|
|
2611
2616
|
});
|
|
2612
2617
|
}
|
|
2613
2618
|
for (const file of metadataImageFiles) {
|
|
@@ -2664,7 +2669,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2664
2669
|
}
|
|
2665
2670
|
}
|
|
2666
2671
|
async discoverProgrammaticRoutes(source) {
|
|
2667
|
-
const manifests = await
|
|
2672
|
+
const manifests = await _chunkSUIBNSNOcjs.loadProgrammaticRouteManifests.call(void 0, {
|
|
2668
2673
|
root: source.root,
|
|
2669
2674
|
srcDir: source.srcDir,
|
|
2670
2675
|
loadModule: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (filePath) => this.loadProgrammaticRoutesModule(filePath), "loadModule")
|
|
@@ -2845,7 +2850,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2845
2850
|
pattern: entry.pattern
|
|
2846
2851
|
}));
|
|
2847
2852
|
const i18n = this.getI18nConfig();
|
|
2848
|
-
const result = await
|
|
2853
|
+
const result = await _chunkCTV2TTNPcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
|
|
2849
2854
|
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n)
|
|
2850
2855
|
});
|
|
2851
2856
|
if (!i18n) {
|
|
@@ -2890,7 +2895,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2890
2895
|
async isRouteSSG(modulePath) {
|
|
2891
2896
|
try {
|
|
2892
2897
|
const mod = await this.loadRouteModule(modulePath);
|
|
2893
|
-
const rendering = await
|
|
2898
|
+
const rendering = await _chunkCTV2TTNPcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
2894
2899
|
return rendering.ssg;
|
|
2895
2900
|
} catch (e10) {
|
|
2896
2901
|
return false;
|
|
@@ -2902,7 +2907,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2902
2907
|
async hasRouteISR(modulePath) {
|
|
2903
2908
|
try {
|
|
2904
2909
|
const mod = await this.loadRouteModule(modulePath);
|
|
2905
|
-
const rendering = await
|
|
2910
|
+
const rendering = await _chunkCTV2TTNPcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
2906
2911
|
return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
|
|
2907
2912
|
} catch (e11) {
|
|
2908
2913
|
return false;
|
|
@@ -2914,7 +2919,7 @@ var _RouteManager = class _RouteManager {
|
|
|
2914
2919
|
async getRouteRevalidateInterval(modulePath) {
|
|
2915
2920
|
try {
|
|
2916
2921
|
const mod = await this.loadRouteModule(modulePath);
|
|
2917
|
-
const rendering = await
|
|
2922
|
+
const rendering = await _chunkCTV2TTNPcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
2918
2923
|
return rendering.revalidate;
|
|
2919
2924
|
} catch (e12) {
|
|
2920
2925
|
return void 0;
|
|
@@ -4686,7 +4691,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, appendResponseVary, "appendResponseVary");
|
|
|
4686
4691
|
function renderI18nAlternateLinks(requestPath, snapshot, options) {
|
|
4687
4692
|
if (snapshot.routing === "none") return "";
|
|
4688
4693
|
const url = new URL(requestPath, "http://farm.local");
|
|
4689
|
-
return
|
|
4694
|
+
return _chunkNPPL5YDTcjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
|
|
4690
4695
|
}
|
|
4691
4696
|
_chunkS3JO3N4Hcjs.__name.call(void 0, renderI18nAlternateLinks, "renderI18nAlternateLinks");
|
|
4692
4697
|
var PPR_REFRESH_MAX_ATTEMPTS = 3;
|
|
@@ -4820,12 +4825,12 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, createRouteStateProps, "createRouteStatePr
|
|
|
4820
4825
|
var _ServerRenderer = class _ServerRenderer {
|
|
4821
4826
|
constructor(config, routeManager, i18nRuntime, viteServer) {
|
|
4822
4827
|
this.ssgManifest = [];
|
|
4823
|
-
this.dataCache =
|
|
4828
|
+
this.dataCache = _chunk2SDO73HKcjs.getFarmDataCache.call(void 0, );
|
|
4824
4829
|
this.config = config;
|
|
4825
4830
|
this.routeManager = routeManager;
|
|
4826
4831
|
this.i18nRuntime = i18nRuntime;
|
|
4827
4832
|
this.viteServer = viteServer;
|
|
4828
|
-
this.security =
|
|
4833
|
+
this.security = _chunkXLTV4VOGcjs.resolveFarmSecurityConfig.call(void 0, config.security);
|
|
4829
4834
|
this.loadSSGManifest();
|
|
4830
4835
|
}
|
|
4831
4836
|
async initialize() {
|
|
@@ -5090,7 +5095,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5090
5095
|
* Check if a path should be served from SSG cache
|
|
5091
5096
|
*/
|
|
5092
5097
|
async shouldServeSSG(pathname) {
|
|
5093
|
-
const ssgPage =
|
|
5098
|
+
const ssgPage = _chunkCTV2TTNPcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
|
|
5094
5099
|
if (!ssgPage) return null;
|
|
5095
5100
|
const cached = await this.getCachedSSGPage(pathname);
|
|
5096
5101
|
if (cached && await this.dataCache.isStaleAsync(cached)) {
|
|
@@ -5099,11 +5104,11 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5099
5104
|
return ssgPage;
|
|
5100
5105
|
}
|
|
5101
5106
|
getSSGCacheKey(urlPath) {
|
|
5102
|
-
return
|
|
5107
|
+
return _chunkNYJMY3JAcjs.createFarmCacheKey.call(void 0, ["ssg", _chunk2SDO73HKcjs.normalizeRevalidatePath.call(void 0, urlPath)]);
|
|
5103
5108
|
}
|
|
5104
5109
|
getPPRCacheKey(pathname, search = "", locale = "", origin = "") {
|
|
5105
|
-
const key = ["ppr", locale,
|
|
5106
|
-
return
|
|
5110
|
+
const key = ["ppr", locale, _chunk2SDO73HKcjs.normalizeRevalidatePath.call(void 0, pathname), search];
|
|
5111
|
+
return _chunkNYJMY3JAcjs.createFarmCacheKey.call(void 0, origin ? [...key, origin] : key);
|
|
5107
5112
|
}
|
|
5108
5113
|
getCachedSSGPage(urlPath) {
|
|
5109
5114
|
return this.dataCache.getEntryAsync(this.getSSGCacheKey(urlPath), {
|
|
@@ -5256,7 +5261,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5256
5261
|
pageProps,
|
|
5257
5262
|
pathname: page.urlPath
|
|
5258
5263
|
});
|
|
5259
|
-
const { title, tags, hasFavicon } =
|
|
5264
|
+
const { title, tags, hasFavicon } = _chunk3LUF2PE2cjs.renderMetadataHead.call(void 0, mergedMetadata);
|
|
5260
5265
|
const metadataHead = `${hasFavicon ? "" : '<link rel="icon" href="data:,">\n '}<title>${title}</title>${tags}`;
|
|
5261
5266
|
const fullDocument = this.createFullHTML(
|
|
5262
5267
|
html,
|
|
@@ -5324,10 +5329,10 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5324
5329
|
if (this.viteServer) await this.applyRendererAppSetup();
|
|
5325
5330
|
_chunkI57LW5VZcjs.setFarmBasePath.call(void 0, this.config.basePath);
|
|
5326
5331
|
_chunkOYEUREB6cjs.setFarmTrailingSlashPreference.call(void 0, this.config.trailingSlash);
|
|
5327
|
-
const cspNonce =
|
|
5332
|
+
const cspNonce = _chunkXLTV4VOGcjs.createFarmCspNonce.call(void 0, this.security);
|
|
5328
5333
|
if (cspNonce) {
|
|
5329
5334
|
req.__FARM_CSP_NONCE__ = cspNonce;
|
|
5330
|
-
const header =
|
|
5335
|
+
const header = _chunkXLTV4VOGcjs.getFarmSecurityHeader.call(void 0, this.security, cspNonce);
|
|
5331
5336
|
res.setHeader(header.key, header.value);
|
|
5332
5337
|
}
|
|
5333
5338
|
const request2 = _chunk5ZSWG4UXcjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
@@ -5506,7 +5511,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5506
5511
|
throw error;
|
|
5507
5512
|
}
|
|
5508
5513
|
}
|
|
5509
|
-
const renderingConfig = await
|
|
5514
|
+
const renderingConfig = await _chunkCTV2TTNPcjs.resolveRouteRenderingConfigFromFile.call(void 0,
|
|
5510
5515
|
routeModule,
|
|
5511
5516
|
route.modulePath,
|
|
5512
5517
|
{ experimentalPPR: _optionalChain([this, 'access', _176 => _176.config, 'access', _177 => _177.experimental, 'optionalAccess', _178 => _178.ppr]) === true }
|
|
@@ -5910,7 +5915,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
5910
5915
|
}
|
|
5911
5916
|
}
|
|
5912
5917
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, { type: "render.error", route: pathname, error });
|
|
5913
|
-
const errorStatus =
|
|
5918
|
+
const errorStatus = _chunkNPPL5YDTcjs.resolveDefaultErrorStatus.call(void 0, error);
|
|
5914
5919
|
if (pprRefreshRoute) {
|
|
5915
5920
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, {
|
|
5916
5921
|
type: "ppr.refresh.error",
|
|
@@ -6009,9 +6014,9 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6009
6014
|
async resolveRouteMetadata(options) {
|
|
6010
6015
|
let metadata = {};
|
|
6011
6016
|
for (const layoutModule of options.layoutModules) {
|
|
6012
|
-
metadata =
|
|
6017
|
+
metadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0, metadata, layoutModule.metadata);
|
|
6013
6018
|
if (typeof layoutModule.generateMetadata === "function") {
|
|
6014
|
-
metadata =
|
|
6019
|
+
metadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0,
|
|
6015
6020
|
metadata,
|
|
6016
6021
|
await layoutModule.generateMetadata({
|
|
6017
6022
|
params: options.pageProps.params
|
|
@@ -6019,9 +6024,9 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6019
6024
|
);
|
|
6020
6025
|
}
|
|
6021
6026
|
}
|
|
6022
|
-
metadata =
|
|
6027
|
+
metadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0, metadata, options.routeModule.metadata);
|
|
6023
6028
|
if (typeof options.routeModule.generateMetadata === "function") {
|
|
6024
|
-
metadata =
|
|
6029
|
+
metadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0,
|
|
6025
6030
|
metadata,
|
|
6026
6031
|
await options.routeModule.generateMetadata(options.pageProps)
|
|
6027
6032
|
);
|
|
@@ -6044,7 +6049,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6044
6049
|
for (const kind of ["opengraph", "twitter"]) {
|
|
6045
6050
|
const reference = await this.resolveMetadataImageReference(kind, options.pathname);
|
|
6046
6051
|
if (reference) {
|
|
6047
|
-
metadata =
|
|
6052
|
+
metadata = _chunk3LUF2PE2cjs.addMetadataImageReference.call(void 0, metadata, reference);
|
|
6048
6053
|
}
|
|
6049
6054
|
}
|
|
6050
6055
|
const snapshot = _chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
@@ -6052,9 +6057,9 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6052
6057
|
snapshot ? _chunkBIDYX3SLcjs.localizeFarmHref.call(void 0, options.pathname, snapshot.locale, snapshot) : options.pathname,
|
|
6053
6058
|
this.config.basePath
|
|
6054
6059
|
);
|
|
6055
|
-
metadata =
|
|
6060
|
+
metadata = _chunk3LUF2PE2cjs.addMetadataMarkdownAlternate.call(void 0,
|
|
6056
6061
|
metadata,
|
|
6057
|
-
|
|
6062
|
+
_chunk6CNX6Q3Kcjs.getFarmMarkdownAlternatePath.call(void 0, _chunk6CNX6Q3Kcjs.resolveMarkdownConfig.call(void 0, this.config.md), publicPathname)
|
|
6058
6063
|
);
|
|
6059
6064
|
return metadata;
|
|
6060
6065
|
}
|
|
@@ -6126,11 +6131,11 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6126
6131
|
path: match.routePath,
|
|
6127
6132
|
...llmsContext
|
|
6128
6133
|
}) : routeModule.default;
|
|
6129
|
-
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await
|
|
6134
|
+
const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await _chunkXLTV4VOGcjs.renderFarmLlmsFullTxt.call(void 0, value, {
|
|
6130
6135
|
origin: url.origin,
|
|
6131
6136
|
readMarkdown: llmsContext.markdown
|
|
6132
6137
|
}) : value;
|
|
6133
|
-
const response =
|
|
6138
|
+
const response = _chunkNPPL5YDTcjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
|
|
6134
6139
|
method,
|
|
6135
6140
|
request: request2
|
|
6136
6141
|
});
|
|
@@ -6148,7 +6153,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6148
6153
|
}
|
|
6149
6154
|
/** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
|
|
6150
6155
|
getGeneratedLlmsKind(pathname) {
|
|
6151
|
-
const config =
|
|
6156
|
+
const config = _chunkXLTV4VOGcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _200 => _200.config, 'access', _201 => _201.agent, 'optionalAccess', _202 => _202.llmsTxt]));
|
|
6152
6157
|
if (!config.enabled) return null;
|
|
6153
6158
|
if (pathname === "/llms.txt") return "llms";
|
|
6154
6159
|
return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
|
|
@@ -6158,15 +6163,15 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6158
6163
|
const request2 = _chunk5ZSWG4UXcjs.createWebRequestFromFarmRequest.call(void 0, req, {
|
|
6159
6164
|
trustProxy: _optionalChain([this, 'access', _203 => _203.config, 'access', _204 => _204.server, 'optionalAccess', _205 => _205.trustProxy])
|
|
6160
6165
|
});
|
|
6161
|
-
const config =
|
|
6166
|
+
const config = _chunkXLTV4VOGcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _206 => _206.config, 'access', _207 => _207.agent, 'optionalAccess', _208 => _208.llmsTxt]));
|
|
6162
6167
|
const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
|
|
6163
|
-
const body = kind === "llms-full" ? await
|
|
6168
|
+
const body = kind === "llms-full" ? await _chunkXLTV4VOGcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
|
|
6164
6169
|
origin: new URL(request2.url).origin,
|
|
6165
6170
|
readMarkdown: context.markdown
|
|
6166
6171
|
}) : context.defaults;
|
|
6167
6172
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
6168
6173
|
res,
|
|
6169
|
-
|
|
6174
|
+
_chunkNPPL5YDTcjs.createFarmMetadataRouteResponse.call(void 0,
|
|
6170
6175
|
kind,
|
|
6171
6176
|
body,
|
|
6172
6177
|
{ revalidate: config.revalidate },
|
|
@@ -6185,7 +6190,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6185
6190
|
}
|
|
6186
6191
|
}
|
|
6187
6192
|
getAgentCrawlers() {
|
|
6188
|
-
return
|
|
6193
|
+
return _chunkXLTV4VOGcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _209 => _209.config, 'access', _210 => _210.agent, 'optionalAccess', _211 => _211.crawlers]));
|
|
6189
6194
|
}
|
|
6190
6195
|
/** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
|
|
6191
6196
|
async renderGeneratedRobotsTxt(req, res) {
|
|
@@ -6193,7 +6198,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6193
6198
|
const sitemapPath = _optionalChain([this, 'access', _212 => _212.routeManager, 'access', _213 => _213.matchMetadataRoute, 'call', _214 => _214("/sitemap.xml"), 'optionalAccess', _215 => _215.metadata, 'access', _216 => _216.kind]) === "sitemap" ? "/sitemap.xml" : void 0;
|
|
6194
6199
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
6195
6200
|
const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
6196
|
-
const robots =
|
|
6201
|
+
const robots = _chunkXLTV4VOGcjs.createFarmAgentRobots.call(void 0, {
|
|
6197
6202
|
crawlers: this.getAgentCrawlers(),
|
|
6198
6203
|
sitemapPath,
|
|
6199
6204
|
metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _217 => _217.metadataBase]),
|
|
@@ -6201,7 +6206,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6201
6206
|
});
|
|
6202
6207
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
6203
6208
|
res,
|
|
6204
|
-
|
|
6209
|
+
_chunkNPPL5YDTcjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
|
|
6205
6210
|
);
|
|
6206
6211
|
} catch (error) {
|
|
6207
6212
|
_chunk5QIKR7RRcjs.logger.error(`Generated robots.txt failed: ${error}`);
|
|
@@ -6216,7 +6221,7 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6216
6221
|
}
|
|
6217
6222
|
/** Same inputs the production server gives llms.txt: static pages and root metadata. */
|
|
6218
6223
|
async createLlmsTxtContext(request2, options = {}) {
|
|
6219
|
-
const config =
|
|
6224
|
+
const config = _chunkXLTV4VOGcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _218 => _218.config, 'access', _219 => _219.agent, 'optionalAccess', _220 => _220.llmsTxt]));
|
|
6220
6225
|
const origin = new URL(request2.url).origin;
|
|
6221
6226
|
const staticRoutes = [...this.routeManager.getRoutes()].filter(
|
|
6222
6227
|
([pattern]) => !pattern.includes("[")
|
|
@@ -6234,16 +6239,16 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6234
6239
|
);
|
|
6235
6240
|
const rootLayout = this.routeManager.getLayouts().get("/");
|
|
6236
6241
|
const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
|
|
6237
|
-
const pages =
|
|
6242
|
+
const pages = _chunkXLTV4VOGcjs.collectFarmLlmsTxtPages.call(void 0, sources, {
|
|
6238
6243
|
origin,
|
|
6239
6244
|
basePath: this.config.basePath,
|
|
6240
|
-
markdown:
|
|
6245
|
+
markdown: _chunk6CNX6Q3Kcjs.resolveMarkdownConfig.call(void 0, this.config.md),
|
|
6241
6246
|
include: config.include,
|
|
6242
6247
|
exclude: config.exclude
|
|
6243
6248
|
});
|
|
6244
6249
|
return {
|
|
6245
6250
|
pages,
|
|
6246
|
-
defaults:
|
|
6251
|
+
defaults: _chunkXLTV4VOGcjs.createFarmDefaultLlmsTxt.call(void 0, { origin, pages, config, rootMetadata }),
|
|
6247
6252
|
...options.full ? { markdown: this.createDevMarkdownReader(options.req) } : {}
|
|
6248
6253
|
};
|
|
6249
6254
|
}
|
|
@@ -6263,11 +6268,11 @@ var _ServerRenderer = class _ServerRenderer {
|
|
|
6263
6268
|
}
|
|
6264
6269
|
if (socket.encrypted) {
|
|
6265
6270
|
const address = { host: socket.localAddress, port: socket.localPort };
|
|
6266
|
-
return
|
|
6271
|
+
return _chunkXLTV4VOGcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => requestOwnHttpsServer(page, address));
|
|
6267
6272
|
}
|
|
6268
6273
|
const host = socket.localAddress.includes(":") ? `[${socket.localAddress}]` : socket.localAddress;
|
|
6269
6274
|
const localOrigin = `http://${host}:${socket.localPort}`;
|
|
6270
|
-
const read =
|
|
6275
|
+
const read = _chunkXLTV4VOGcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => fetch(page));
|
|
6271
6276
|
return (url) => {
|
|
6272
6277
|
const target = new URL(url);
|
|
6273
6278
|
return read(`${localOrigin}${target.pathname}${target.search}`);
|
|
@@ -6506,7 +6511,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6506
6511
|
tags: metaTags,
|
|
6507
6512
|
hasFavicon,
|
|
6508
6513
|
hasExplicitTitle
|
|
6509
|
-
} =
|
|
6514
|
+
} = _chunk3LUF2PE2cjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
|
|
6510
6515
|
pathname: getFarmMetadataPathname(req),
|
|
6511
6516
|
jsonLd: _optionalChain([this, 'access', _232 => _232.config, 'access', _233 => _233.agent, 'optionalAccess', _234 => _234.jsonLd])
|
|
6512
6517
|
});
|
|
@@ -6518,7 +6523,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6518
6523
|
i18nSnapshot,
|
|
6519
6524
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6520
6525
|
) : "";
|
|
6521
|
-
const themeDocument =
|
|
6526
|
+
const themeDocument = _chunkNPPL5YDTcjs.createFarmThemeDocumentParts.call(void 0,
|
|
6522
6527
|
this.config.theme,
|
|
6523
6528
|
this.config.basePath,
|
|
6524
6529
|
_chunkXWAWFQFScjs.getTheme.call(void 0, )
|
|
@@ -6744,7 +6749,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6744
6749
|
title,
|
|
6745
6750
|
tags: metaTags,
|
|
6746
6751
|
hasFavicon
|
|
6747
|
-
} =
|
|
6752
|
+
} = _chunk3LUF2PE2cjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
|
|
6748
6753
|
pathname: getFarmMetadataPathname(req),
|
|
6749
6754
|
jsonLd: _optionalChain([this, 'access', _243 => _243.config, 'access', _244 => _244.agent, 'optionalAccess', _245 => _245.jsonLd])
|
|
6750
6755
|
});
|
|
@@ -6755,7 +6760,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6755
6760
|
this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
|
|
6756
6761
|
) : "";
|
|
6757
6762
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
6758
|
-
const themeDocument =
|
|
6763
|
+
const themeDocument = _chunkNPPL5YDTcjs.createFarmThemeDocumentParts.call(void 0,
|
|
6759
6764
|
this.config.theme,
|
|
6760
6765
|
this.config.basePath,
|
|
6761
6766
|
_chunkXWAWFQFScjs.getTheme.call(void 0, )
|
|
@@ -6764,7 +6769,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6764
6769
|
const devStyleLinks = this.collectDevStyleLinks();
|
|
6765
6770
|
const globalStylesheetLink = this.devGlobalStylesheetLink(true);
|
|
6766
6771
|
const cspNonce = this.getCspNonce(req);
|
|
6767
|
-
const secureDocumentHTML = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (html) => cspNonce ?
|
|
6772
|
+
const secureDocumentHTML = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (html) => cspNonce ? _chunkXLTV4VOGcjs.addFarmCspNonceToScriptTags.call(void 0, html, cspNonce) : html, "secureDocumentHTML");
|
|
6768
6773
|
const createLateNavigationRecovery = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (navigationError) => this.createLateNavigationRecoveryHTML(req, navigationError), "createLateNavigationRecovery");
|
|
6769
6774
|
const { pipe, abort } = renderToPipeableStream(streamRoot, {
|
|
6770
6775
|
nonce: cspNonce,
|
|
@@ -6811,7 +6816,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6811
6816
|
let firstChunk = true;
|
|
6812
6817
|
let checkedFullDocument = false;
|
|
6813
6818
|
let documentPrefix = "";
|
|
6814
|
-
const cspNonceRewriter = cspNonce ?
|
|
6819
|
+
const cspNonceRewriter = cspNonce ? _chunkXLTV4VOGcjs.createFarmCspNonceRewriter.call(void 0, cspNonce) : void 0;
|
|
6815
6820
|
const cspStreamDecoder = cspNonceRewriter ? new TextDecoder() : void 0;
|
|
6816
6821
|
const recordRenderedChunk = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (chunkText) => {
|
|
6817
6822
|
if (!chunkText) return;
|
|
@@ -6995,8 +7000,8 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
6995
7000
|
}
|
|
6996
7001
|
/** The not-found document's head: layout and not-found metadata, as production renders it. */
|
|
6997
7002
|
async notFoundMetadataHead(layoutModule, notFoundModule) {
|
|
6998
|
-
const metadata = await
|
|
6999
|
-
const { title, tags, hasFavicon } =
|
|
7003
|
+
const metadata = await _chunk3LUF2PE2cjs.resolveFarmNotFoundMetadata.call(void 0, [layoutModule], notFoundModule);
|
|
7004
|
+
const { title, tags, hasFavicon } = _chunk3LUF2PE2cjs.renderMetadataHead.call(void 0, metadata);
|
|
7000
7005
|
return {
|
|
7001
7006
|
head: `${hasFavicon ? "" : '<link rel="icon" href="data:,">\n '}<title>${title}</title>${tags}`,
|
|
7002
7007
|
metadata
|
|
@@ -7014,7 +7019,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7014
7019
|
*/
|
|
7015
7020
|
async createLateNavigationRecoveryHTML(req, error) {
|
|
7016
7021
|
if (_chunkOX6O6WVAcjs.isFarmRedirectError.call(void 0, error)) {
|
|
7017
|
-
return
|
|
7022
|
+
return _chunkNPPL5YDTcjs.createLateRedirectRecovery.call(void 0, this.localizeRedirectUrl(_chunkOX6O6WVAcjs.getFarmRedirectError.call(void 0, error).url));
|
|
7018
7023
|
}
|
|
7019
7024
|
const pathname = _chunk5ZSWG4UXcjs.resolveFarmRequestURL.call(void 0, req, {
|
|
7020
7025
|
trustProxy: _optionalChain([this, 'access', _253 => _253.config, 'access', _254 => _254.server, 'optionalAccess', _255 => _255.trustProxy])
|
|
@@ -7032,7 +7037,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7032
7037
|
_chunk5QIKR7RRcjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
|
|
7033
7038
|
}
|
|
7034
7039
|
}
|
|
7035
|
-
return
|
|
7040
|
+
return _chunkNPPL5YDTcjs.createLateNotFoundRecovery.call(void 0, content);
|
|
7036
7041
|
}
|
|
7037
7042
|
async render404(req, res) {
|
|
7038
7043
|
res.statusCode = 404;
|
|
@@ -7041,11 +7046,11 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7041
7046
|
}).pathname;
|
|
7042
7047
|
const acceptHeader = req.headers.accept;
|
|
7043
7048
|
const accept = Array.isArray(acceptHeader) ? acceptHeader.join(",") : acceptHeader;
|
|
7044
|
-
if (
|
|
7045
|
-
res.setHeader("Content-Type",
|
|
7049
|
+
if (_chunk6CNX6Q3Kcjs.farmRequestWantsMarkdown.call(void 0, pathname, accept)) {
|
|
7050
|
+
res.setHeader("Content-Type", _chunk6CNX6Q3Kcjs.FARM_MARKDOWN_CONTENT_TYPE);
|
|
7046
7051
|
res.setHeader("X-Farm-Markdown-Error", "404");
|
|
7047
7052
|
res.setHeader("Cache-Control", "no-store");
|
|
7048
|
-
res.end(
|
|
7053
|
+
res.end(_chunk6CNX6Q3Kcjs.createFarmMarkdownErrorBody.call(void 0, 404, pathname, this.config.basePath || "/"));
|
|
7049
7054
|
return;
|
|
7050
7055
|
}
|
|
7051
7056
|
const appDir = path9.join(this.config.root, this.config.srcDir, "app");
|
|
@@ -7107,8 +7112,8 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7107
7112
|
trustProxy: _optionalChain([this, 'access', _261 => _261.config, 'access', _262 => _262.server, 'optionalAccess', _263 => _263.trustProxy])
|
|
7108
7113
|
});
|
|
7109
7114
|
const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
|
|
7110
|
-
const statusText =
|
|
7111
|
-
const content =
|
|
7115
|
+
const statusText = _chunkNPPL5YDTcjs.getDefaultErrorStatusText.call(void 0, statusCode);
|
|
7116
|
+
const content = _chunkNPPL5YDTcjs.createDefaultErrorMarkup.call(void 0, {
|
|
7112
7117
|
statusCode,
|
|
7113
7118
|
statusText,
|
|
7114
7119
|
requestPath: requestUrl.pathname,
|
|
@@ -7118,7 +7123,7 @@ window.__FARM_I18N__ = ${_chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7118
7123
|
stack: _optionalChain([diagnostics, 'optionalAccess', _266 => _266.stack]),
|
|
7119
7124
|
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _267 => _267.sourceFrame]),
|
|
7120
7125
|
development: isDev,
|
|
7121
|
-
farmVersion:
|
|
7126
|
+
farmVersion: _chunkWPPX4G7Qcjs.FARM_VERSION,
|
|
7122
7127
|
nodeVersion: process.version,
|
|
7123
7128
|
mode: isDev ? "development" : "production"
|
|
7124
7129
|
});
|
|
@@ -7161,7 +7166,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
|
|
|
7161
7166
|
this.getI18nAlternateOptions(alternates.req, alternates.metadata)
|
|
7162
7167
|
) : "";
|
|
7163
7168
|
const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
|
|
7164
|
-
const themeDocument =
|
|
7169
|
+
const themeDocument = _chunkNPPL5YDTcjs.createFarmThemeDocumentParts.call(void 0,
|
|
7165
7170
|
this.config.theme,
|
|
7166
7171
|
this.config.basePath,
|
|
7167
7172
|
_chunkXWAWFQFScjs.getTheme.call(void 0, )
|
|
@@ -7221,7 +7226,7 @@ ${clientScript}
|
|
|
7221
7226
|
}
|
|
7222
7227
|
secureDocumentHTML(req, html) {
|
|
7223
7228
|
const nonce = this.getCspNonce(req);
|
|
7224
|
-
return nonce ?
|
|
7229
|
+
return nonce ? _chunkXLTV4VOGcjs.addFarmCspNonceToScriptTags.call(void 0, html, nonce) : html;
|
|
7225
7230
|
}
|
|
7226
7231
|
applyDeploymentHeaders(req, res) {
|
|
7227
7232
|
const deploymentId = this.getDeploymentId();
|
|
@@ -7278,7 +7283,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7278
7283
|
_chunk5QIKR7RRcjs.logger.info("Initializing Farm.js application...");
|
|
7279
7284
|
}
|
|
7280
7285
|
await _chunk4ZFL5GFNcjs.initStorage.call(void 0, this.config.storage);
|
|
7281
|
-
await
|
|
7286
|
+
await _chunk2SDO73HKcjs.configureFarmCache.call(void 0, this.config.cache);
|
|
7282
7287
|
await this.i18nRuntime.initialize();
|
|
7283
7288
|
await this.serverRenderer.initialize();
|
|
7284
7289
|
await this.verifyAppStructure();
|
|
@@ -7317,7 +7322,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7317
7322
|
storage: config.storage || {},
|
|
7318
7323
|
schema: config.schema || {},
|
|
7319
7324
|
cache: config.cache || {},
|
|
7320
|
-
auth: isResolvedAuthConfig(config.auth) ? config.auth :
|
|
7325
|
+
auth: isResolvedAuthConfig(config.auth) ? config.auth : _chunk6MVFL3R5cjs.resolveFarmAuthConfig.call(void 0, config.auth),
|
|
7321
7326
|
integrations: config.integrations || {},
|
|
7322
7327
|
plugins: config.plugins || [],
|
|
7323
7328
|
migrations: config.migrations || { commands: [] },
|
|
@@ -7329,9 +7334,9 @@ var _FarmApp = class _FarmApp {
|
|
|
7329
7334
|
context: config.context || (() => void 0),
|
|
7330
7335
|
server: _chunkEM6SBQKMcjs.resolveFarmServerConfig.call(void 0, config.server),
|
|
7331
7336
|
serverActions: _chunkT5CERMEHcjs.resolveServerActionsConfig.call(void 0, config.serverActions),
|
|
7332
|
-
security:
|
|
7337
|
+
security: _chunkXLTV4VOGcjs.resolveFarmSecurityConfig.call(void 0, config.security),
|
|
7333
7338
|
images: _chunkYFPGHF5Fcjs.resolveFarmImageConfig.call(void 0, config.images),
|
|
7334
|
-
performance:
|
|
7339
|
+
performance: _chunkXLTV4VOGcjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
|
|
7335
7340
|
theme: _chunkOI6CMLWXcjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
|
|
7336
7341
|
i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkHBTUGXHScjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
|
|
7337
7342
|
root,
|
|
@@ -7343,7 +7348,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7343
7348
|
serverRuntimeConfig: config.serverRuntimeConfig || {},
|
|
7344
7349
|
publicRuntimeConfig: config.publicRuntimeConfig || {},
|
|
7345
7350
|
docs: isResolvedDocsConfig(config.docs) ? config.docs : defaultDocsConfig,
|
|
7346
|
-
md:
|
|
7351
|
+
md: _chunk6CNX6Q3Kcjs.resolveMarkdownConfig.call(void 0, config.md),
|
|
7347
7352
|
mdx: _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, config.mdx),
|
|
7348
7353
|
observability: _nullishCoalesce(config.observability, () => ( false)),
|
|
7349
7354
|
telemetry: config.telemetry !== false,
|
|
@@ -7352,7 +7357,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7352
7357
|
config.devtools,
|
|
7353
7358
|
process.env.NODE_ENV === "production" ? "production" : "development"
|
|
7354
7359
|
),
|
|
7355
|
-
devIndicators:
|
|
7360
|
+
devIndicators: _chunk6MVFL3R5cjs.resolveFarmDevIndicatorsConfig.call(void 0,
|
|
7356
7361
|
config.devIndicators,
|
|
7357
7362
|
process.env.NODE_ENV === "production" ? "production" : "development"
|
|
7358
7363
|
),
|
|
@@ -7376,7 +7381,7 @@ var _FarmApp = class _FarmApp {
|
|
|
7376
7381
|
);
|
|
7377
7382
|
if (!hasAppDirectory) {
|
|
7378
7383
|
const routeFiles = _chunkVPTDD5XFcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
|
|
7379
|
-
(source) =>
|
|
7384
|
+
(source) => _chunkSUIBNSNOcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
|
|
7380
7385
|
);
|
|
7381
7386
|
if (routeFiles.length > 0) {
|
|
7382
7387
|
return;
|
|
@@ -8409,6 +8414,27 @@ var _PluginManager = class _PluginManager {
|
|
|
8409
8414
|
return false;
|
|
8410
8415
|
}
|
|
8411
8416
|
const plugins = this.getSortedPlugins().filter(include);
|
|
8417
|
+
if (hookName === "onError") {
|
|
8418
|
+
const failures = [];
|
|
8419
|
+
const reports = [];
|
|
8420
|
+
for (const plugin of plugins) {
|
|
8421
|
+
for (const hook of this.getPluginHooks(plugin, hookName)) {
|
|
8422
|
+
reports.push(
|
|
8423
|
+
(async () => {
|
|
8424
|
+
try {
|
|
8425
|
+
const hookContext = this.getHookContext(plugin, hookName, args);
|
|
8426
|
+
await hook.apply(plugin, [...args, hookContext]);
|
|
8427
|
+
} catch (error) {
|
|
8428
|
+
failures.push(error);
|
|
8429
|
+
}
|
|
8430
|
+
})()
|
|
8431
|
+
);
|
|
8432
|
+
}
|
|
8433
|
+
}
|
|
8434
|
+
await Promise.all(reports);
|
|
8435
|
+
if (failures.length > 0) throw failures[0];
|
|
8436
|
+
return false;
|
|
8437
|
+
}
|
|
8412
8438
|
const sequentialHooks = /* @__PURE__ */ new Set([
|
|
8413
8439
|
"ready",
|
|
8414
8440
|
"shutdown",
|
|
@@ -8451,11 +8477,17 @@ var _PluginManager = class _PluginManager {
|
|
|
8451
8477
|
}
|
|
8452
8478
|
} else {
|
|
8453
8479
|
const promises3 = [];
|
|
8454
|
-
|
|
8455
|
-
for (const
|
|
8456
|
-
const
|
|
8457
|
-
|
|
8480
|
+
try {
|
|
8481
|
+
for (const plugin of plugins) {
|
|
8482
|
+
for (const hook of this.getPluginHooks(plugin, hookName)) {
|
|
8483
|
+
const hookContext = this.getHookContext(plugin, hookName, args);
|
|
8484
|
+
promises3.push(hook.apply(plugin, [...args, hookContext]));
|
|
8485
|
+
}
|
|
8458
8486
|
}
|
|
8487
|
+
} catch (error) {
|
|
8488
|
+
void Promise.all(promises3).catch(() => {
|
|
8489
|
+
});
|
|
8490
|
+
throw error;
|
|
8459
8491
|
}
|
|
8460
8492
|
await Promise.all(promises3);
|
|
8461
8493
|
}
|
|
@@ -8499,7 +8531,7 @@ function createPluginFactory(definition) {
|
|
|
8499
8531
|
}
|
|
8500
8532
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createPluginFactory, "createPluginFactory");
|
|
8501
8533
|
function pluginSchemaName(pluginName) {
|
|
8502
|
-
const name =
|
|
8534
|
+
const name = _chunk6MVFL3R5cjs.pluginShortName.call(void 0, pluginName);
|
|
8503
8535
|
if (!/^[a-z0-9][a-z0-9_-]*$/iu.test(name)) {
|
|
8504
8536
|
throw new Error(
|
|
8505
8537
|
`Plugin "${pluginName}" declares a schema, so its name must end in a word made of letters, numbers, "-" or "_": that word becomes \`farm <name> migrate\`.`
|
|
@@ -8530,7 +8562,7 @@ function declarePluginSchema(plugin) {
|
|
|
8530
8562
|
schema: plugin.schema,
|
|
8531
8563
|
// Also listed by key, which tooling from before `external` existed reads.
|
|
8532
8564
|
models: Object.keys(models).filter((key) => !models[key].external),
|
|
8533
|
-
...plugin.dependsOn ? { dependsOn: plugin.dependsOn.map(
|
|
8565
|
+
...plugin.dependsOn ? { dependsOn: plugin.dependsOn.map(_chunk6MVFL3R5cjs.pluginShortName) } : {},
|
|
8534
8566
|
...plugin.version ? { version: plugin.version } : {},
|
|
8535
8567
|
..._optionalChain([plugin, 'access', _402 => _402.migrations, 'optionalAccess', _403 => _403.length]) ? { migrations: plugin.migrations } : {},
|
|
8536
8568
|
dialect: _optionalChain([database, 'optionalAccess', _404 => _404.dialect]),
|
|
@@ -9466,13 +9498,13 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, reportOpenAPIDevGenerationResult, "reportO
|
|
|
9466
9498
|
// src/vite.ts
|
|
9467
9499
|
var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
|
|
9468
9500
|
function farmLlmsTxtGeneratedPaths(config) {
|
|
9469
|
-
const llms =
|
|
9501
|
+
const llms = _chunkXLTV4VOGcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _474 => _474.agent, 'optionalAccess', _475 => _475.llmsTxt]));
|
|
9470
9502
|
if (!llms.enabled) return [];
|
|
9471
9503
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
9472
9504
|
}
|
|
9473
9505
|
_chunkS3JO3N4Hcjs.__name.call(void 0, farmLlmsTxtGeneratedPaths, "farmLlmsTxtGeneratedPaths");
|
|
9474
9506
|
function farmAgentGeneratedPaths(config) {
|
|
9475
|
-
const crawlers =
|
|
9507
|
+
const crawlers = _chunkXLTV4VOGcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _476 => _476.agent, 'optionalAccess', _477 => _477.crawlers]));
|
|
9476
9508
|
return [...farmLlmsTxtGeneratedPaths(config), ...crawlers.enabled ? ["/robots.txt"] : []];
|
|
9477
9509
|
}
|
|
9478
9510
|
_chunkS3JO3N4Hcjs.__name.call(void 0, farmAgentGeneratedPaths, "farmAgentGeneratedPaths");
|
|
@@ -9518,7 +9550,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
9518
9550
|
}
|
|
9519
9551
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmWorkflowsDevRuntime, "loadFarmWorkflowsDevRuntime");
|
|
9520
9552
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
9521
|
-
return import("./devtools-
|
|
9553
|
+
return import("./devtools-GGVPZHJX.cjs");
|
|
9522
9554
|
}
|
|
9523
9555
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDevtoolsSnapshotRuntime, "loadFarmDevtoolsSnapshotRuntime");
|
|
9524
9556
|
function loadFarmDevtoolsUIRuntime() {
|
|
@@ -9526,7 +9558,7 @@ function loadFarmDevtoolsUIRuntime() {
|
|
|
9526
9558
|
}
|
|
9527
9559
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDevtoolsUIRuntime, "loadFarmDevtoolsUIRuntime");
|
|
9528
9560
|
function loadFarmDevtoolsClientRuntime() {
|
|
9529
|
-
return import("./devtools-client-
|
|
9561
|
+
return import("./devtools-client-CXQ6PXI6.cjs");
|
|
9530
9562
|
}
|
|
9531
9563
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDevtoolsClientRuntime, "loadFarmDevtoolsClientRuntime");
|
|
9532
9564
|
function farmI18nClientBridgePlugin() {
|
|
@@ -9605,7 +9637,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
9605
9637
|
if (!snapshot) return "";
|
|
9606
9638
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
9607
9639
|
if (snapshot.routing === "none") return runtime;
|
|
9608
|
-
return `${
|
|
9640
|
+
return `${_chunkNPPL5YDTcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
9609
9641
|
}
|
|
9610
9642
|
_chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmI18nStaticHead, "renderFarmI18nStaticHead");
|
|
9611
9643
|
function getPublicEnvDefine(config) {
|
|
@@ -10204,7 +10236,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
10204
10236
|
if (_optionalChain([farmConfig, 'access', _505 => _505.agent, 'optionalAccess', _506 => _506.noindexPreviews])) {
|
|
10205
10237
|
server.middlewares.use((_req, res, next) => {
|
|
10206
10238
|
if (_chunkCXP5U3RWcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
10207
|
-
res.setHeader("X-Robots-Tag",
|
|
10239
|
+
res.setHeader("X-Robots-Tag", _chunkXLTV4VOGcjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
10208
10240
|
}
|
|
10209
10241
|
next();
|
|
10210
10242
|
});
|
|
@@ -10249,7 +10281,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
10249
10281
|
);
|
|
10250
10282
|
const generateTypeArtifacts = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
10251
10283
|
try {
|
|
10252
|
-
const result = await
|
|
10284
|
+
const result = await _chunkCTV2TTNPcjs.generateFarmTypeArtifacts.call(void 0, {
|
|
10253
10285
|
root: farmConfig.root,
|
|
10254
10286
|
srcDir: farmConfig.srcDir,
|
|
10255
10287
|
layers: farmConfig.layers,
|
|
@@ -10416,7 +10448,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
10416
10448
|
layoutCount: discoveredRoutes.filter((r) => r.kind === "layout").length
|
|
10417
10449
|
});
|
|
10418
10450
|
}
|
|
10419
|
-
apiRouteManager = new (0,
|
|
10451
|
+
apiRouteManager = new (0, _chunkEXLKRR4Ucjs.APIRouteManager)(appDirs, server, {
|
|
10420
10452
|
plugins: farmConfig.plugins,
|
|
10421
10453
|
i18n: farmApp.getI18nRuntime(),
|
|
10422
10454
|
bodySizeLimit: serverConfig.bodySizeLimit,
|
|
@@ -10454,7 +10486,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
10454
10486
|
});
|
|
10455
10487
|
}
|
|
10456
10488
|
}
|
|
10457
|
-
middlewareManager = new (0,
|
|
10489
|
+
middlewareManager = new (0, _chunkZHVYQL3Hcjs.MiddlewareManager)(
|
|
10458
10490
|
appDirs,
|
|
10459
10491
|
server,
|
|
10460
10492
|
farmConfig.middleware,
|
|
@@ -10757,7 +10789,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10757
10789
|
...currentConfig,
|
|
10758
10790
|
openapi: options.openapi
|
|
10759
10791
|
},
|
|
10760
|
-
workflows: discoveredWorkflows
|
|
10792
|
+
workflows: discoveredWorkflows,
|
|
10793
|
+
plugins: _optionalChain([pm, 'optionalAccess', _552 => _552.getSortedPlugins, 'call', _553 => _553()])
|
|
10761
10794
|
});
|
|
10762
10795
|
res.statusCode = 200;
|
|
10763
10796
|
res.setHeader(
|
|
@@ -10780,7 +10813,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10780
10813
|
return;
|
|
10781
10814
|
}
|
|
10782
10815
|
const runAppMiddlewareForContentRoute = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async () => {
|
|
10783
|
-
if (!_optionalChain([middlewareManager, 'optionalAccess',
|
|
10816
|
+
if (!_optionalChain([middlewareManager, 'optionalAccess', _554 => _554.hasMiddleware, 'call', _555 => _555()])) return false;
|
|
10784
10817
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
10785
10818
|
return runFarmMiddlewareWithNavigation(
|
|
10786
10819
|
farmApp.getServerRenderer(),
|
|
@@ -10791,7 +10824,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10791
10824
|
);
|
|
10792
10825
|
}, "runAppMiddlewareForContentRoute");
|
|
10793
10826
|
const openAPIRequestPathname = openAPIManager ? _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
|
|
10794
|
-
if (openAPIManager && _optionalChain([options, 'access',
|
|
10827
|
+
if (openAPIManager && _optionalChain([options, 'access', _556 => _556.openapi, 'optionalAccess', _557 => _557.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
|
|
10795
10828
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
10796
10829
|
if (requestMethod !== "GET" && requestMethod !== "HEAD") {
|
|
10797
10830
|
res.statusCode = 405;
|
|
@@ -10808,18 +10841,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10808
10841
|
res.end(requestMethod === "HEAD" ? void 0 : body);
|
|
10809
10842
|
return;
|
|
10810
10843
|
}
|
|
10811
|
-
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access',
|
|
10844
|
+
if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _558 => _558.openapi, 'optionalAccess', _559 => _559.route])) {
|
|
10812
10845
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
10813
10846
|
const docsHandler = openAPIManager.getDocsRouteHandler(parsedRequestUrl.origin);
|
|
10814
10847
|
return docsHandler(req, res);
|
|
10815
10848
|
}
|
|
10816
|
-
if (_optionalChain([options, 'access',
|
|
10849
|
+
if (_optionalChain([options, 'access', _560 => _560.agent, 'optionalAccess', _561 => _561.apiCatalog]) && _chunkI57LW5VZcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkNPPL5YDTcjs.FARM_API_CATALOG_PATH) {
|
|
10817
10850
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
10818
10851
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0,
|
|
10819
10852
|
res,
|
|
10820
|
-
|
|
10853
|
+
_chunkNPPL5YDTcjs.createFarmApiCatalogResponse.call(void 0,
|
|
10821
10854
|
requestMethod,
|
|
10822
|
-
|
|
10855
|
+
_chunkNPPL5YDTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
10823
10856
|
new Request(parsedRequestUrl, {
|
|
10824
10857
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
10825
10858
|
})
|
|
@@ -10854,7 +10887,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10854
10887
|
return;
|
|
10855
10888
|
}
|
|
10856
10889
|
}
|
|
10857
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
10890
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunkNXG66MR7cjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
10858
10891
|
request: new Request(fullUrl, {
|
|
10859
10892
|
method: requestMethod,
|
|
10860
10893
|
headers: docsHeaders
|
|
@@ -10862,7 +10895,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10862
10895
|
config: farmApp.getConfig().mdx,
|
|
10863
10896
|
resolveSource: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (pathname2) => {
|
|
10864
10897
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
10865
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
10898
|
+
const sourcePath = _optionalChain([match, 'access', _562 => _562.route, 'optionalAccess', _563 => _563.markdownSourcePath]) || (match.route && _chunkNXG66MR7cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
10866
10899
|
if (!sourcePath) {
|
|
10867
10900
|
return null;
|
|
10868
10901
|
}
|
|
@@ -10877,7 +10910,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10877
10910
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0, res, markdownSourceResponse);
|
|
10878
10911
|
return;
|
|
10879
10912
|
}
|
|
10880
|
-
const markdownResponse = viteModuleRequest ? null : await
|
|
10913
|
+
const markdownResponse = viteModuleRequest ? null : await _chunk6CNX6Q3Kcjs.createMarkdownMirrorResponse.call(void 0, {
|
|
10881
10914
|
request: new Request(fullUrl, {
|
|
10882
10915
|
method: requestMethod,
|
|
10883
10916
|
headers: docsHeaders
|
|
@@ -10886,7 +10919,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10886
10919
|
routeExists: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pathname2) => Boolean(farmApp.getRouteManager().matchRoute(pathname2).route), "routeExists"),
|
|
10887
10920
|
// Keep the page's own redirect (a sign-in gate, say) so the mirror
|
|
10888
10921
|
// answers with it, as production does, instead of the target page.
|
|
10889
|
-
renderPage: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (request2) => fetch(request2, {
|
|
10922
|
+
renderPage: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (request2) => fetch(request2, {
|
|
10923
|
+
redirect: "manual",
|
|
10924
|
+
// Only accepted mirrors need disconnect listeners. An earlier
|
|
10925
|
+
// close (for example while the docs handler ran) must also abort.
|
|
10926
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunkEM6SBQKMcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
10927
|
+
}), "renderPage"),
|
|
10890
10928
|
apiServerBasePath
|
|
10891
10929
|
});
|
|
10892
10930
|
if (markdownResponse) {
|
|
@@ -10894,21 +10932,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10894
10932
|
await _chunkUQZ4AYTHcjs.sendWebResponse.call(void 0, res, markdownResponse);
|
|
10895
10933
|
return;
|
|
10896
10934
|
}
|
|
10897
|
-
if (!viteModuleRequest &&
|
|
10898
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
10935
|
+
if (!viteModuleRequest && _chunk6CNX6Q3Kcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
10936
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkNXG66MR7cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
|
|
10899
10937
|
if (!markdownRoute.route) {
|
|
10900
10938
|
if (await runAppMiddlewareForContentRoute()) return;
|
|
10901
10939
|
res.statusCode = 404;
|
|
10902
|
-
res.setHeader("Content-Type",
|
|
10940
|
+
res.setHeader("Content-Type", _chunk6CNX6Q3Kcjs.FARM_MARKDOWN_CONTENT_TYPE);
|
|
10903
10941
|
res.setHeader("X-Farm-Markdown-Error", "404");
|
|
10904
10942
|
res.setHeader("Cache-Control", "no-store");
|
|
10905
10943
|
res.end(
|
|
10906
|
-
|
|
10944
|
+
_chunk6CNX6Q3Kcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/")
|
|
10907
10945
|
);
|
|
10908
10946
|
return;
|
|
10909
10947
|
}
|
|
10910
10948
|
}
|
|
10911
|
-
const markdownPageTarget =
|
|
10949
|
+
const markdownPageTarget = _chunk6CNX6Q3Kcjs.resolveMarkdownMirrorTarget.call(void 0,
|
|
10912
10950
|
farmApp.getConfig().md,
|
|
10913
10951
|
requestPathname,
|
|
10914
10952
|
{
|
|
@@ -10921,7 +10959,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10921
10959
|
if (!varyValues.some((value) => value.toLowerCase() === "accept")) {
|
|
10922
10960
|
res.setHeader("Vary", [...varyValues, "Accept"].join(", "));
|
|
10923
10961
|
}
|
|
10924
|
-
const alternatePath =
|
|
10962
|
+
const alternatePath = _chunk6CNX6Q3Kcjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
|
|
10925
10963
|
const alternateLink = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
|
|
10926
10964
|
const currentLink = res.getHeader("Link");
|
|
10927
10965
|
res.setHeader(
|
|
@@ -10973,7 +11011,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
10973
11011
|
"beforeRequest",
|
|
10974
11012
|
(plugin) => {
|
|
10975
11013
|
const owner = _chunkZ5HIWVDPcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
|
|
10976
|
-
return plugin.name !== _chunkYZTASLPQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess',
|
|
11014
|
+
return plugin.name !== _chunkYZTASLPQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _564 => _564.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
10977
11015
|
},
|
|
10978
11016
|
req,
|
|
10979
11017
|
res
|
|
@@ -11064,7 +11102,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11064
11102
|
}
|
|
11065
11103
|
const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
|
|
11066
11104
|
const hasMatchedApiRoute = Boolean(matchedApiRoute);
|
|
11067
|
-
if (hasMatchedApiRoute ||
|
|
11105
|
+
if (hasMatchedApiRoute || _chunkPZNCMPJFcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
|
|
11068
11106
|
const startTime2 = Date.now();
|
|
11069
11107
|
const method2 = req.method || "GET";
|
|
11070
11108
|
const urlPath2 = req.url || "/";
|
|
@@ -11103,7 +11141,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11103
11141
|
const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
|
|
11104
11142
|
const hasExplicitAPIRoute = hasMatchedApiRoute || Boolean(apiRouteManager.matchRoute(pathname2));
|
|
11105
11143
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
11106
|
-
const apiRoutePattern = _optionalChain([matchedApiRoute, 'optionalAccess',
|
|
11144
|
+
const apiRoutePattern = _optionalChain([matchedApiRoute, 'optionalAccess', _565 => _565.route, 'access', _566 => _566.path]) || _optionalChain([apiRouteManager, 'access', _567 => _567.matchRoute, 'call', _568 => _568(pathname2), 'optionalAccess', _569 => _569.route, 'access', _570 => _570.path]) || urlPath2;
|
|
11107
11145
|
_chunkE3UK5IIBcjs.emitFarmEvent.call(void 0, {
|
|
11108
11146
|
type: "route.matched",
|
|
11109
11147
|
pathname: pathname2,
|
|
@@ -11193,7 +11231,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11193
11231
|
return;
|
|
11194
11232
|
}
|
|
11195
11233
|
}
|
|
11196
|
-
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
11234
|
+
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _571 => _571.isFarmDocsAPIRequest, 'call', _572 => _572(pathname2)])) {
|
|
11197
11235
|
try {
|
|
11198
11236
|
const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
|
|
11199
11237
|
const headers = new Headers();
|
|
@@ -11266,18 +11304,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11266
11304
|
res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
|
|
11267
11305
|
return;
|
|
11268
11306
|
}
|
|
11269
|
-
if (_optionalChain([req, 'access',
|
|
11307
|
+
if (_optionalChain([req, 'access', _573 => _573.url, 'optionalAccess', _574 => _574.startsWith, 'call', _575 => _575("/@")]) || _optionalChain([req, 'access', _576 => _576.url, 'optionalAccess', _577 => _577.startsWith, 'call', _578 => _578("/node_modules")])) {
|
|
11270
11308
|
return next();
|
|
11271
11309
|
}
|
|
11272
11310
|
if (shouldBypassFarmRouterForDottedPath(
|
|
11273
11311
|
requestPathname,
|
|
11274
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
11312
|
+
_optionalChain([farmApp, 'optionalAccess', _579 => _579.getRouteManager, 'call', _580 => _580()]),
|
|
11275
11313
|
[server.config.publicDir, server.config.root],
|
|
11276
11314
|
farmAgentGeneratedPaths(farmConfig)
|
|
11277
11315
|
)) {
|
|
11278
11316
|
return next();
|
|
11279
11317
|
}
|
|
11280
|
-
if (_optionalChain([req, 'access',
|
|
11318
|
+
if (_optionalChain([req, 'access', _581 => _581.url, 'optionalAccess', _582 => _582.startsWith, 'call', _583 => _583("/__farm/page-data")])) {
|
|
11281
11319
|
const urlObj = parsedRequestUrl;
|
|
11282
11320
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
11283
11321
|
try {
|
|
@@ -11305,7 +11343,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11305
11343
|
});
|
|
11306
11344
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
11307
11345
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
11308
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
11346
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _584 => _584.hasMiddleware, 'call', _585 => _585()])) {
|
|
11309
11347
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
11310
11348
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
11311
11349
|
farmApp.getServerRenderer(),
|
|
@@ -11333,10 +11371,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11333
11371
|
if (pm) {
|
|
11334
11372
|
await pm.runHookParallel("afterRouteMatch", {
|
|
11335
11373
|
pathname: targetPath,
|
|
11336
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
11337
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
11338
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
11339
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
11374
|
+
matched: !!_optionalChain([match, 'optionalAccess', _586 => _586.route]),
|
|
11375
|
+
routePattern: _optionalChain([match, 'optionalAccess', _587 => _587.route, 'optionalAccess', _588 => _588.pattern]) || null,
|
|
11376
|
+
params: _optionalChain([match, 'optionalAccess', _589 => _589.params]) || {},
|
|
11377
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _590 => _590.layouts]) || []).map((l) => l.pattern)
|
|
11340
11378
|
});
|
|
11341
11379
|
}
|
|
11342
11380
|
if (!match) {
|
|
@@ -11400,24 +11438,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11400
11438
|
routePath: route.pattern
|
|
11401
11439
|
});
|
|
11402
11440
|
for (const layoutModule of layoutModules) {
|
|
11403
|
-
mergedMetadata =
|
|
11441
|
+
mergedMetadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0, mergedMetadata, layoutModule.metadata);
|
|
11404
11442
|
if (typeof layoutModule.generateMetadata === "function") {
|
|
11405
|
-
mergedMetadata =
|
|
11443
|
+
mergedMetadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0,
|
|
11406
11444
|
mergedMetadata,
|
|
11407
11445
|
await layoutModule.generateMetadata({ params: routeProps.params })
|
|
11408
11446
|
);
|
|
11409
11447
|
}
|
|
11410
11448
|
}
|
|
11411
|
-
mergedMetadata =
|
|
11449
|
+
mergedMetadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0, mergedMetadata, routeModule.metadata);
|
|
11412
11450
|
if (typeof routeModule.generateMetadata === "function") {
|
|
11413
|
-
mergedMetadata =
|
|
11451
|
+
mergedMetadata = _chunk3LUF2PE2cjs.mergeMetadata.call(void 0,
|
|
11414
11452
|
mergedMetadata,
|
|
11415
11453
|
await routeModule.generateMetadata(routeProps)
|
|
11416
11454
|
);
|
|
11417
11455
|
}
|
|
11418
|
-
mergedMetadata =
|
|
11456
|
+
mergedMetadata = _chunk3LUF2PE2cjs.addMetadataMarkdownAlternate.call(void 0,
|
|
11419
11457
|
mergedMetadata,
|
|
11420
|
-
|
|
11458
|
+
_chunk6CNX6Q3Kcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
|
|
11421
11459
|
);
|
|
11422
11460
|
const routeSlots = await Promise.all(
|
|
11423
11461
|
slots.map(async (slot) => {
|
|
@@ -11473,7 +11511,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11473
11511
|
pageShouldHydrate: shouldHydrate,
|
|
11474
11512
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
11475
11513
|
islandStrategy: hydrationIslandStrategy,
|
|
11476
|
-
rendering:
|
|
11514
|
+
rendering: _chunkCTV2TTNPcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
11477
11515
|
});
|
|
11478
11516
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
11479
11517
|
const layoutStartIndex = getSharedLayoutPrefixLength(
|
|
@@ -11487,7 +11525,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11487
11525
|
middlewareContext,
|
|
11488
11526
|
() => renderer.renderNavigationFragment({
|
|
11489
11527
|
PageComponent: routeModule.default,
|
|
11490
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
11528
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _591 => _591.default]),
|
|
11491
11529
|
pageProps: routeProps,
|
|
11492
11530
|
params,
|
|
11493
11531
|
layouts: layouts.map((layout, index) => ({
|
|
@@ -11593,14 +11631,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11593
11631
|
trustProxy: currentServerConfig.trustProxy
|
|
11594
11632
|
}).pathname;
|
|
11595
11633
|
const routeManager2 = farmApp.getRouteManager();
|
|
11596
|
-
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11597
|
-
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11598
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11599
|
-
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11600
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11601
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11602
|
-
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11603
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
11634
|
+
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _592 => _592.hasHook, 'call', _593 => _593("beforeRouteMatch")]), () => ( false));
|
|
11635
|
+
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _594 => _594.hasHook, 'call', _595 => _595("afterRouteMatch")]), () => ( false));
|
|
11636
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _596 => _596.hasHook, 'call', _597 => _597("beforeRequest")]), () => ( false));
|
|
11637
|
+
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _598 => _598.hasHook, 'call', _599 => _599("beforeRender")]), () => ( false));
|
|
11638
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _600 => _600.hasHook, 'call', _601 => _601("afterResponse")]), () => ( false));
|
|
11639
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _602 => _602.hasHook, 'call', _603 => _603("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _604 => _604.hasHook, 'call', _605 => _605("afterRender")]), () => ( false)));
|
|
11640
|
+
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _606 => _606.hasRuntimeRequestHooks, 'call', _607 => _607()]), () => ( false));
|
|
11641
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _608 => _608.hasRuntimeHook, 'call', _609 => _609("after")]), () => ( false));
|
|
11604
11642
|
const requestedMatch = routeManager2.matchRoute(requestedPathname);
|
|
11605
11643
|
let runtimeSession;
|
|
11606
11644
|
if (pm && hasRuntimeRequestHooks) {
|
|
@@ -11611,8 +11649,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11611
11649
|
kind: "page",
|
|
11612
11650
|
route: {
|
|
11613
11651
|
pathname: requestedPathname,
|
|
11614
|
-
pattern: _optionalChain([requestedMatch, 'optionalAccess',
|
|
11615
|
-
params: _optionalChain([requestedMatch, 'optionalAccess',
|
|
11652
|
+
pattern: _optionalChain([requestedMatch, 'optionalAccess', _610 => _610.route, 'optionalAccess', _611 => _611.pattern]) || null,
|
|
11653
|
+
params: _optionalChain([requestedMatch, 'optionalAccess', _612 => _612.params]) || {}
|
|
11616
11654
|
}
|
|
11617
11655
|
}
|
|
11618
11656
|
);
|
|
@@ -11645,17 +11683,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11645
11683
|
if (pm && hasAfterRouteMatchHook) {
|
|
11646
11684
|
await pm.runHookParallel("afterRouteMatch", {
|
|
11647
11685
|
pathname,
|
|
11648
|
-
matched: !!_optionalChain([routeMatch, 'optionalAccess',
|
|
11649
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
11650
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
11651
|
-
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess',
|
|
11686
|
+
matched: !!_optionalChain([routeMatch, 'optionalAccess', _613 => _613.route]),
|
|
11687
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _614 => _614.route, 'optionalAccess', _615 => _615.pattern]) || null,
|
|
11688
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _616 => _616.params]) || {},
|
|
11689
|
+
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _617 => _617.layouts]) || []).map((l) => l.pattern)
|
|
11652
11690
|
});
|
|
11653
11691
|
}
|
|
11654
11692
|
const renderPayload = {
|
|
11655
11693
|
pathname,
|
|
11656
11694
|
method,
|
|
11657
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
11658
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
11695
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _618 => _618.route, 'optionalAccess', _619 => _619.pattern]) || null,
|
|
11696
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _620 => _620.params]) || {}
|
|
11659
11697
|
};
|
|
11660
11698
|
const shouldInterceptResponse = Boolean(
|
|
11661
11699
|
pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
|
|
@@ -11677,7 +11715,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11677
11715
|
emitError: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (error) => emitPluginError("response-end", error, { pathname }), "emitError")
|
|
11678
11716
|
}) : void 0;
|
|
11679
11717
|
try {
|
|
11680
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
11718
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _621 => _621.hasMiddleware, 'call', _622 => _622()])) {
|
|
11681
11719
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
11682
11720
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
11683
11721
|
farmApp.getServerRenderer(),
|
|
@@ -11687,7 +11725,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11687
11725
|
() => middlewareManager.execute(req, res)
|
|
11688
11726
|
);
|
|
11689
11727
|
if (handled) {
|
|
11690
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
11728
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _623 => _623.isEnded, 'call', _624 => _624()])) {
|
|
11691
11729
|
const duration = Date.now() - startTime;
|
|
11692
11730
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
11693
11731
|
}
|
|
@@ -11699,7 +11737,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11699
11737
|
req.url || "/",
|
|
11700
11738
|
`http://${req.headers.host || "localhost:3000"}`
|
|
11701
11739
|
).pathname;
|
|
11702
|
-
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access',
|
|
11740
|
+
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _625 => _625.matchRoute, 'call', _626 => _626(currentPathname), 'optionalAccess', _627 => _627.route]));
|
|
11703
11741
|
await pm.runHookParallelFiltered(
|
|
11704
11742
|
"beforeRequest",
|
|
11705
11743
|
(plugin) => !hasLocalPageRoute || plugin.name !== _chunkYZTASLPQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
@@ -11707,8 +11745,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11707
11745
|
res
|
|
11708
11746
|
);
|
|
11709
11747
|
}
|
|
11710
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
11711
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
11748
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _628 => _628.isEnded, 'call', _629 => _629()])) {
|
|
11749
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _630 => _630.isEnded, 'call', _631 => _631()])) {
|
|
11712
11750
|
const duration = Date.now() - startTime;
|
|
11713
11751
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
11714
11752
|
}
|
|
@@ -11766,36 +11804,36 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11766
11804
|
if (imageModule) return imageModule;
|
|
11767
11805
|
}
|
|
11768
11806
|
if (_chunk6V4TDWECcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
11769
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
11770
|
-
return generateProgrammaticRouteModule(id, _optionalChain([server, 'optionalAccess',
|
|
11807
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _632 => _632.getConfig, 'call', _633 => _633(), 'access', _634 => _634.renderer]) || _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
11808
|
+
return generateProgrammaticRouteModule(id, _optionalChain([server, 'optionalAccess', _635 => _635.config, 'access', _636 => _636.root]) || options.root, renderer);
|
|
11771
11809
|
}
|
|
11772
11810
|
if (isFarmClientVirtualId(id)) {
|
|
11773
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
11774
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
11775
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
11776
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
11777
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
11811
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _637 => _637.getConfig, 'call', _638 => _638()]);
|
|
11812
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _639 => _639.renderer]) || _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
11813
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _640 => _640.integrations]) || options.integrations;
|
|
11814
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _641 => _641.root]) || _optionalChain([server, 'optionalAccess', _642 => _642.config, 'access', _643 => _643.root]) || process.cwd();
|
|
11815
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _644 => _644.docs]);
|
|
11778
11816
|
const adapterOwnsDocsRuntime = Boolean(
|
|
11779
|
-
_chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess',
|
|
11817
|
+
_chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _645 => _645.adapter, 'optionalAccess', _646 => _646.server]) && docs.adapter.react
|
|
11780
11818
|
);
|
|
11781
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
11819
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _647 => _647.devtools]), () => ( _chunkYJRZR7VUcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
11782
11820
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
11783
|
-
_optionalChain([docs, 'optionalAccess',
|
|
11784
|
-
_optionalChain([docs, 'optionalAccess',
|
|
11821
|
+
_optionalChain([docs, 'optionalAccess', _648 => _648.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
11822
|
+
_optionalChain([docs, 'optionalAccess', _649 => _649.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
11785
11823
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
11786
11824
|
]);
|
|
11787
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
11825
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _650 => _650.isFarmDocsSearchEnabled, 'call', _651 => _651(docs)]), () => ( false));
|
|
11788
11826
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
11789
11827
|
docsSearchEnabled,
|
|
11790
11828
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
11791
11829
|
) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
|
|
11792
11830
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
11793
|
-
const generatedDevIndicatorsClientRuntime = farmApp ?
|
|
11831
|
+
const generatedDevIndicatorsClientRuntime = farmApp ? _chunk6MVFL3R5cjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
11794
11832
|
const integrationProviders = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _chunkZ5HIWVDPcjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
11795
11833
|
const isolatedHydrationMode = resolveFarmIsolatedClientHydrationMode(
|
|
11796
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
11834
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _652 => _652.experimental, 'optionalAccess', _653 => _653.isolatedClientHydration]),
|
|
11797
11835
|
{
|
|
11798
|
-
serverComponents: _optionalChain([resolvedConfig, 'optionalAccess',
|
|
11836
|
+
serverComponents: _optionalChain([resolvedConfig, 'optionalAccess', _654 => _654.experimental, 'optionalAccess', _655 => _655.serverComponents]) === true,
|
|
11799
11837
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
11800
11838
|
}
|
|
11801
11839
|
);
|
|
@@ -11803,22 +11841,22 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
11803
11841
|
integrationProviders,
|
|
11804
11842
|
[
|
|
11805
11843
|
..._chunkZ5HIWVDPcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
11806
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
11844
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _656 => _656.getFarmDocsDocumentNavigationMatchers, 'call', _657 => _657(docs)]), () => ( []))
|
|
11807
11845
|
],
|
|
11808
11846
|
generatedDocsSearchRuntime,
|
|
11809
11847
|
`${generatedDevtoolsClientRuntime}
|
|
11810
11848
|
${generatedDevIndicatorsClientRuntime}`,
|
|
11811
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
11849
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _658 => _658.plugins]) || [],
|
|
11812
11850
|
root,
|
|
11813
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
11814
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
11815
|
-
_chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess',
|
|
11851
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _659 => _659.srcDir]) || options.srcDir || "src",
|
|
11852
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _660 => _660.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
11853
|
+
_chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _661 => _661.adapter, 'optionalAccess', _662 => _662.react]) : void 0,
|
|
11816
11854
|
renderer,
|
|
11817
|
-
isolatedHydrationMode === "enabled" || _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
11818
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
11819
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
11855
|
+
isolatedHydrationMode === "enabled" || _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _663 => _663.getRouteManager, 'call', _664 => _664(), 'access', _665 => _665.getIsolatedClientBoundaryModules, 'call', _666 => _666(root)])))), 'optionalAccess', _667 => _667.size]) > 0,
|
|
11856
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _668 => _668.trailingSlash]), () => ( false)),
|
|
11857
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _669 => _669.basePath]), () => ( "/")),
|
|
11820
11858
|
generateClientCachePersistenceCode(
|
|
11821
|
-
resolveFarmClientCacheAdapterEntry(root, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
11859
|
+
resolveFarmClientCacheAdapterEntry(root, _optionalChain([resolvedConfig, 'optionalAccess', _670 => _670.cache]))
|
|
11822
11860
|
),
|
|
11823
11861
|
_chunkPSV6XKPOcjs.isReactRenderer.call(void 0, renderer) ? _chunk75WGQVQAcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0
|
|
11824
11862
|
);
|
|
@@ -11827,7 +11865,7 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
11827
11865
|
return generateServerCode();
|
|
11828
11866
|
}
|
|
11829
11867
|
if (id === "/@farm/manifest") {
|
|
11830
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
11868
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _671 => _671.getRouteManager, 'call', _672 => _672()]);
|
|
11831
11869
|
if (!routeManager) {
|
|
11832
11870
|
return `
|
|
11833
11871
|
export const getManifest = () => ({
|
|
@@ -11842,7 +11880,7 @@ export const getManifest = () => ({
|
|
|
11842
11880
|
const manifest = routeManager.generateClientManifest(server.config.root);
|
|
11843
11881
|
const globalStylesheetHref = resolveDevGlobalStylesheetHref(
|
|
11844
11882
|
server.config.root,
|
|
11845
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
11883
|
+
_optionalChain([farmApp, 'optionalAccess', _673 => _673.getConfig, 'call', _674 => _674(), 'access', _675 => _675.srcDir])
|
|
11846
11884
|
);
|
|
11847
11885
|
const fullManifest = {
|
|
11848
11886
|
clientEntry: "/@farm/client.js",
|
|
@@ -11893,17 +11931,17 @@ export const manifest = getManifest();
|
|
|
11893
11931
|
}
|
|
11894
11932
|
},
|
|
11895
11933
|
async transform(code, id, transformOptions) {
|
|
11896
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
11897
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
11898
|
-
if (_optionalChain([currentConfig, 'access',
|
|
11934
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _676 => _676.ssr])) {
|
|
11935
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _677 => _677.getConfig, 'call', _678 => _678()]), () => ( options));
|
|
11936
|
+
if (_optionalChain([currentConfig, 'access', _679 => _679.experimental, 'optionalAccess', _680 => _680.serverActions]) !== true || !serverFnTransformActive) {
|
|
11899
11937
|
const violation = findClientServerFnViolation(code, id);
|
|
11900
11938
|
if (violation) {
|
|
11901
11939
|
this.error(formatServerFnBoundaryError(violation, id));
|
|
11902
11940
|
}
|
|
11903
11941
|
}
|
|
11904
11942
|
}
|
|
11905
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
11906
|
-
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
11943
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _681 => _681.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
11944
|
+
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _682 => _682.getConfig, 'call', _683 => _683()]), () => ( options)));
|
|
11907
11945
|
}
|
|
11908
11946
|
if (typeof imageImports.transform === "function") {
|
|
11909
11947
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -11918,13 +11956,13 @@ export const manifest = getManifest();
|
|
|
11918
11956
|
id,
|
|
11919
11957
|
transformOptions
|
|
11920
11958
|
);
|
|
11921
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
11959
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _684 => _684.code, 'optionalAccess', _685 => _685.toString, 'call', _686 => _686()]);
|
|
11922
11960
|
if (fontCode) {
|
|
11923
11961
|
transformedCode = fontCode;
|
|
11924
11962
|
transformed = true;
|
|
11925
11963
|
}
|
|
11926
11964
|
}
|
|
11927
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
11965
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _687 => _687.ssr]) && server) {
|
|
11928
11966
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
11929
11967
|
code: transformedCode,
|
|
11930
11968
|
id,
|
|
@@ -11944,12 +11982,12 @@ export const manifest = getManifest();
|
|
|
11944
11982
|
}
|
|
11945
11983
|
transformedCode = stripUseClientDirective(transformedCode);
|
|
11946
11984
|
transformed = true;
|
|
11947
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
11985
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _688 => _688.getConfig, 'call', _689 => _689()]), () => ( options));
|
|
11948
11986
|
let isolatedModuleReference = null;
|
|
11949
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
11987
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _690 => _690.config, 'access', _691 => _691.root]) || process.cwd();
|
|
11950
11988
|
const cleanId = id.split("?", 1)[0];
|
|
11951
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
11952
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
11989
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _692 => _692.getRouteManager, 'call', _693 => _693(), 'access', _694 => _694.getIsolatedClientBoundaryModules, 'call', _695 => _695(root)])));
|
|
11990
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _696 => _696.has, 'call', _697 => _697(path17.resolve(cleanId))]) === true;
|
|
11953
11991
|
if (_chunkPSV6XKPOcjs.isReactRenderer.call(void 0, _chunkPSV6XKPOcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && isIsolatableClientBoundarySource(clientBoundarySource)) {
|
|
11954
11992
|
isolatedModuleReference = _chunk5QIKR7RRcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
11955
11993
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
@@ -11986,7 +12024,7 @@ export const manifest = getManifest();
|
|
|
11986
12024
|
);
|
|
11987
12025
|
return;
|
|
11988
12026
|
}` : "";
|
|
11989
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
12027
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _698 => _698.ssr]) || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
11990
12028
|
if (import.meta.hot) {
|
|
11991
12029
|
import.meta.hot.accept((newModule) => {
|
|
11992
12030
|
${isolatedHmrUpdate}
|
|
@@ -12040,14 +12078,14 @@ if (import.meta.hot) {
|
|
|
12040
12078
|
}
|
|
12041
12079
|
_chunk5QIKR7RRcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
12042
12080
|
_chunk5QIKR7RRcjs.logger.info("Pre-rendering SSG pages...");
|
|
12043
|
-
const outDir = path17.join(_optionalChain([server, 'optionalAccess',
|
|
12081
|
+
const outDir = path17.join(_optionalChain([server, 'optionalAccess', _699 => _699.config, 'access', _700 => _700.root]) || process.cwd(), options.outDir || "dist");
|
|
12044
12082
|
const clientDir = path17.join(outDir, "client");
|
|
12045
12083
|
for (const page of ssgPages) {
|
|
12046
12084
|
try {
|
|
12047
12085
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
12048
12086
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
12049
12087
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
12050
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
12088
|
+
if (!_optionalChain([mod, 'optionalAccess', _701 => _701.default])) return;
|
|
12051
12089
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
12052
12090
|
const layoutModules = await Promise.all(
|
|
12053
12091
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -12079,7 +12117,7 @@ if (import.meta.hot) {
|
|
|
12079
12117
|
const i18nSnapshot = _chunkUJ2C4ICScjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
12080
12118
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
12081
12119
|
const fullHtml = `<!DOCTYPE html>
|
|
12082
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
12120
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _702 => _702.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
12083
12121
|
<head>
|
|
12084
12122
|
<meta charset="utf-8">
|
|
12085
12123
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -12137,13 +12175,13 @@ if (import.meta.hot) {
|
|
|
12137
12175
|
});
|
|
12138
12176
|
}
|
|
12139
12177
|
}
|
|
12140
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
12178
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _703 => _703.getConfig, 'call', _704 => _704()]);
|
|
12141
12179
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
12142
12180
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
12143
12181
|
(appDir) => normalizedFile.startsWith(`${_chunk5QIKR7RRcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
12144
12182
|
)) {
|
|
12145
12183
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
12146
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
12184
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _705 => _705(`updated ${file}`)]);
|
|
12147
12185
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
12148
12186
|
return [];
|
|
12149
12187
|
}
|
|
@@ -12153,7 +12191,7 @@ if (import.meta.hot) {
|
|
|
12153
12191
|
for (const mod of modules) {
|
|
12154
12192
|
server2.moduleGraph.invalidateModule(mod);
|
|
12155
12193
|
}
|
|
12156
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
12194
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _706 => _706(`updated ${file}`)]);
|
|
12157
12195
|
server2.ws.send({
|
|
12158
12196
|
type: "full-reload",
|
|
12159
12197
|
path: "*"
|
|
@@ -12166,17 +12204,17 @@ if (import.meta.hot) {
|
|
|
12166
12204
|
for (const mod of modules) {
|
|
12167
12205
|
server2.moduleGraph.invalidateModule(mod);
|
|
12168
12206
|
}
|
|
12169
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
12207
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _707 => _707(`updated ${file}`)]);
|
|
12170
12208
|
server2.ws.send({
|
|
12171
12209
|
type: "full-reload",
|
|
12172
12210
|
path: "*"
|
|
12173
12211
|
});
|
|
12174
12212
|
return [];
|
|
12175
12213
|
}
|
|
12176
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
12177
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
12214
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _708 => _708.experimental, 'optionalAccess', _709 => _709.isolatedClientHydration]);
|
|
12215
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _710 => _710.getRouteManager, 'call', _711 => _711()]);
|
|
12178
12216
|
const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
|
|
12179
|
-
const tracksAsyncOwnerIslands = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
12217
|
+
const tracksAsyncOwnerIslands = _chunkPSV6XKPOcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _712 => _712.renderer])) && planRouteManager !== void 0;
|
|
12180
12218
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
12181
12219
|
const routeManager = planRouteManager;
|
|
12182
12220
|
if (routeManager) {
|
|
@@ -12236,7 +12274,7 @@ if (import.meta.hot) {
|
|
|
12236
12274
|
}
|
|
12237
12275
|
return [];
|
|
12238
12276
|
}
|
|
12239
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
12277
|
+
_optionalChain([farmApp, 'optionalAccess', _713 => _713.getRouteManager, 'call', _714 => _714(), 'access', _715 => _715.invalidateClientManifest, 'call', _716 => _716()]);
|
|
12240
12278
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
12241
12279
|
if (manifestModule) {
|
|
12242
12280
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -12605,12 +12643,12 @@ async function parseRouteModuleProps2(routeModule, input) {
|
|
|
12605
12643
|
}
|
|
12606
12644
|
const schemas = routeModule.__farmRouteSchemas;
|
|
12607
12645
|
const params = parseRouteModuleSchema2(
|
|
12608
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
12646
|
+
_optionalChain([schemas, 'optionalAccess', _717 => _717.params]),
|
|
12609
12647
|
input.props.params,
|
|
12610
12648
|
"params",
|
|
12611
12649
|
input.routePath
|
|
12612
12650
|
);
|
|
12613
|
-
const search = parseRouteModuleSchema2(_optionalChain([schemas, 'optionalAccess',
|
|
12651
|
+
const search = parseRouteModuleSchema2(_optionalChain([schemas, 'optionalAccess', _718 => _718.search]), input.search, "search", input.routePath);
|
|
12614
12652
|
return {
|
|
12615
12653
|
...input.props,
|
|
12616
12654
|
params,
|
|
@@ -14206,7 +14244,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, generateClientManifest, "generateClientMan
|
|
|
14206
14244
|
async function defineConfig(config = {}) {
|
|
14207
14245
|
const tailwindVitePlugin = await loadTailwindVitePlugin();
|
|
14208
14246
|
const appRoot = path17.resolve(config.root || process.cwd());
|
|
14209
|
-
if (_optionalChain([config, 'access',
|
|
14247
|
+
if (_optionalChain([config, 'access', _719 => _719.extends, 'optionalAccess', _720 => _720.length])) {
|
|
14210
14248
|
const { config: layeredConfig } = await import("./layers-4PNE2HOY.cjs").then(
|
|
14211
14249
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
14212
14250
|
root: appRoot,
|
|
@@ -14307,13 +14345,13 @@ async function defineConfig(config = {}) {
|
|
|
14307
14345
|
if (!serverStarted) {
|
|
14308
14346
|
serverStarted = true;
|
|
14309
14347
|
const elapsed = Date.now() - startTime;
|
|
14310
|
-
const address = _optionalChain([server, 'access',
|
|
14348
|
+
const address = _optionalChain([server, 'access', _721 => _721.httpServer, 'optionalAccess', _722 => _722.address, 'call', _723 => _723()]);
|
|
14311
14349
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
14312
14350
|
const hostConfig = server.config.server.host;
|
|
14313
14351
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
14314
14352
|
console.log("");
|
|
14315
14353
|
console.log(
|
|
14316
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
14354
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkWPPX4G7Qcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
14317
14355
|
);
|
|
14318
14356
|
console.log("");
|
|
14319
14357
|
console.log(
|