@farm.js/core 0.1.63 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-OV4WRFBL.cjs → agent-mcp-handler-OXT73ZBY.cjs} +5 -5
- package/dist/{agent-mcp-handler-7QMX2LUY.mjs → agent-mcp-handler-QLFDDTYN.mjs} +4 -4
- package/dist/{agent-mcp.d-CCQ-wKwg.d.mts → agent-mcp.d-CO_ABmNK.d.mts} +1 -1
- package/dist/{agent-mcp.d-DOJCBSh9.d.ts → agent-mcp.d-QD2WZ9BS.d.ts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/analyzer-ODLF2Z6O.cjs +16 -0
- package/dist/{analyzer-WNPQPWFR.mjs → analyzer-Q3QXC6PD.mjs} +3 -2
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/{app-manifest.d-BaA0omsv.d.mts → app-manifest.d-BpKxiU_E.d.mts} +1 -1
- package/dist/{app-manifest.d-poayV4lq.d.ts → app-manifest.d-DDmNkYQQ.d.ts} +1 -1
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/app-markdown.mjs +3 -3
- package/dist/{app.d-DdWxeIGU.d.mts → app.d-kuoVWhWM.d.mts} +4 -4
- package/dist/{app.d-D4Dn03E3.d.ts → app.d-x68Cwr0_.d.ts} +4 -4
- package/dist/{chunk-LT4VAF5Z.cjs → chunk-2C5L5RPM.cjs} +7 -6
- package/dist/{chunk-PVJX4UPA.cjs → chunk-3EBHJET2.cjs} +103 -98
- package/dist/{chunk-4DIKLG56.mjs → chunk-6NHSGVVA.mjs} +1 -1
- package/dist/{chunk-S2NUYHRY.mjs → chunk-6NNYPY5W.mjs} +327 -13
- package/dist/{chunk-PRFNLQSP.cjs → chunk-7XGWBPQQ.cjs} +4 -4
- package/dist/{chunk-U6WCUVSV.cjs → chunk-DUSHDZQL.cjs} +9 -9
- package/dist/{chunk-GVOMPU3Y.cjs → chunk-EL4364S2.cjs} +209 -32
- package/dist/{chunk-QN5WRQSQ.cjs → chunk-FAP7CX7C.cjs} +101 -101
- package/dist/{chunk-GPKBUME5.mjs → chunk-FH45OB37.mjs} +2 -2
- package/dist/{chunk-55U5QIXQ.mjs → chunk-FIR62CR3.mjs} +1 -1
- package/dist/{chunk-MEQN6DDA.cjs → chunk-FJWN7RV4.cjs} +5 -5
- package/dist/chunk-IOEXXZK3.mjs +88 -0
- package/dist/{chunk-Z74NNER4.cjs → chunk-JCPSA4X5.cjs} +135 -134
- package/dist/{chunk-YSXTNSXS.mjs → chunk-K7OZAVOI.mjs} +7 -6
- package/dist/{chunk-KVW2M6PI.mjs → chunk-KL7SHLQB.mjs} +1 -1
- package/dist/{chunk-RFYL5OLP.mjs → chunk-LQDLEWPO.mjs} +1 -1
- package/dist/{chunk-UZZ6IEQP.mjs → chunk-MESQF2JC.mjs} +2 -2
- package/dist/{chunk-5L7I6AMY.cjs → chunk-MG356ROI.cjs} +5 -5
- package/dist/{chunk-Y2YBNQ3D.cjs → chunk-N3Z3PLHC.cjs} +2 -2
- package/dist/{chunk-XICXQXYE.mjs → chunk-NNLFW3P4.mjs} +2 -2
- package/dist/{chunk-EYLC6GD6.cjs → chunk-NXFA7G3Y.cjs} +12 -12
- package/dist/{chunk-FNHN3RBD.cjs → chunk-O2XFIPNL.cjs} +1 -1
- package/dist/{chunk-BA2IA32Q.mjs → chunk-O4FWNLQK.mjs} +3 -3
- package/dist/{chunk-DZPR2W6U.cjs → chunk-O6L3YYPM.cjs} +5 -5
- package/dist/{chunk-LFFSDZ4Y.cjs → chunk-O7IEMY55.cjs} +3 -3
- package/dist/{chunk-6BJJYOFL.cjs → chunk-OLIGNTWU.cjs} +7 -7
- package/dist/{chunk-EENTT56C.mjs → chunk-OYF23QLG.mjs} +15 -14
- package/dist/{chunk-CBDRR3J3.mjs → chunk-RAH5MT53.mjs} +19 -14
- package/dist/{chunk-E72UD6ME.mjs → chunk-RVGSVQWT.mjs} +1 -1
- package/dist/{chunk-5IKQ7BIR.cjs → chunk-S25BQIFW.cjs} +16 -16
- package/dist/{chunk-LWWDTBGL.cjs → chunk-S7ZW72JH.cjs} +2 -2
- package/dist/{chunk-7FFW7DC4.mjs → chunk-SLYDIHLW.mjs} +4 -4
- package/dist/{chunk-LA6O5EL2.mjs → chunk-SNFTMSHX.mjs} +1 -1
- package/dist/{chunk-PCXIJKPM.mjs → chunk-TNBJ4LZG.mjs} +2 -2
- package/dist/{chunk-O27PLNQZ.cjs → chunk-UJ3R2AH2.cjs} +4 -4
- package/dist/{chunk-T4TBK5NY.mjs → chunk-VQ4NWOWO.mjs} +2 -2
- package/dist/{chunk-ZZ2QKCKW.mjs → chunk-WAY6LOQH.mjs} +1 -1
- package/dist/chunk-WBTHHTBO.cjs +88 -0
- package/dist/{chunk-O5FCWI6O.mjs → chunk-WFNAOWH4.mjs} +1 -1
- package/dist/{chunk-IWRLV46X.cjs → chunk-WMTBBQHY.cjs} +4 -4
- package/dist/{chunk-LA45FN37.mjs → chunk-WNYRYI4D.mjs} +10 -10
- package/dist/{chunk-CI4UNQHO.cjs → chunk-XBSKPLHF.cjs} +2 -2
- package/dist/{chunk-IOF4KXMP.mjs → chunk-XVWSDSUM.mjs} +201 -24
- package/dist/{chunk-ANXU3D32.cjs → chunk-XZLZ6YPP.cjs} +346 -32
- package/dist/{chunk-QAS7KE7J.cjs → chunk-Y5TOT5F6.cjs} +5 -5
- package/dist/{chunk-DPE53XWL.mjs → chunk-ZEXE4TGY.mjs} +1 -1
- package/dist/{client-component.d-CSEFlHfG.d.mts → client-component.d-D74pqdea.d.mts} +2 -2
- package/dist/{client-component.d-CQLvqLAJ.d.ts → client-component.d-D8VcypQA.d.ts} +2 -2
- package/dist/{client-plugins.d-BgPUYPc9.d.ts → client-plugins.d-CXElzotB.d.ts} +8 -1
- package/dist/{client-plugins.d-BTF0gZm4.d.mts → client-plugins.d-D4-6hNx7.d.mts} +8 -1
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-HDKTYIZF.mjs → devtools-MX3FE733.mjs} +4 -4
- package/dist/{devtools-ZHN5JLVI.cjs → devtools-WET5NAKO.cjs} +5 -5
- package/dist/docs.cjs +7 -7
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +6 -6
- package/dist/index.cjs +20 -19
- package/dist/{index.d-Coow7bD4.d.ts → index.d-A_x10zGS.d.ts} +1 -1
- package/dist/{index.d-Dbjx0ku7.d.mts → index.d-SSgYDv4D.d.mts} +1 -1
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.mjs +19 -18
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +21 -20
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +20 -19
- package/dist/internal/cli-runtime.cjs +6 -6
- package/dist/internal/cli-runtime.mjs +5 -5
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +4 -4
- package/dist/internal/client-runtime.d.ts +4 -4
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.d.mts +4 -4
- package/dist/internal/config-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +9 -9
- package/dist/internal/infra-analytics-runtime.mjs +7 -7
- package/dist/internal/native-server-fns.cjs +5 -4
- package/dist/internal/native-server-fns.mjs +4 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +11 -11
- package/dist/internal/production-runtime.d.mts +13 -12
- package/dist/internal/production-runtime.d.ts +13 -12
- package/dist/internal/production-runtime.mjs +10 -10
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/mobile.d.mts +2 -2
- package/dist/mobile.d.ts +2 -2
- package/dist/{native-tree-AS5L3ID3.mjs → native-tree-BPEE2LAL.mjs} +2 -2
- package/dist/{native-tree-Z2WYUJEV.cjs → native-tree-WOX3JMBG.cjs} +3 -3
- package/dist/{navigation-delegate.d-Ca_BV0Wu.d.mts → navigation-delegate.d-DQVYKoaZ.d.mts} +1 -1
- package/dist/{navigation-delegate.d-aHiPI6GL.d.ts → navigation-delegate.d-GghbHJuK.d.ts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/plugin.cjs +13 -13
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +12 -12
- package/dist/{production-runtime.d-C0rF7a10.d.ts → production-runtime.d-Bzns3NW9.d.ts} +1 -1
- package/dist/{production-runtime.d-CnAsSWgF.d.mts → production-runtime.d-DiFa5vHW.d.mts} +1 -1
- package/dist/{render-plan.d-BxeITFT1.d.ts → render-plan.d-CL_Ikfg_.d.ts} +1 -1
- package/dist/{render-plan.d-Z-93m5GZ.d.mts → render-plan.d-CcF0MeCf.d.mts} +1 -1
- package/dist/renderer-client.d.mts +4 -4
- package/dist/renderer-client.d.ts +4 -4
- package/dist/{request.d-X7Q1vmGF.d.ts → request.d-B1RnTLri.d.ts} +1 -1
- package/dist/{request.d-8_fMFNEb.d.mts → request.d-DarDOCk9.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-BUr3Jp8S.d.ts → route-rendering.d-BTUYCIj4.d.ts} +1 -1
- package/dist/{route-rendering.d-BInmBmul.d.mts → route-rendering.d-D_2Ual0-.d.mts} +1 -1
- package/dist/{router.d-crorSRiW.d.ts → router.d-CMANF6da.d.ts} +1 -1
- package/dist/{router.d-CZQmbpHx.d.mts → router.d-Cuv1jntg.d.mts} +1 -1
- package/dist/{routes.d-BknKQcTu.d.ts → routes.d-B6yFe6jm.d.ts} +1 -1
- package/dist/{routes.d-D1IrO9KK.d.mts → routes.d-c2HKfrfL.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-3MPRULGA.mjs → rsc-pipeline-3LNVP2OO.mjs} +5 -5
- package/dist/{rsc-pipeline-RHEZNBFQ.cjs → rsc-pipeline-G5WELVW3.cjs} +6 -6
- package/dist/{runtime-OZKFZQCU.cjs → runtime-DMEULPE7.cjs} +21 -10
- package/dist/{runtime-X5UR7VHP.mjs → runtime-HQJ2LLQL.mjs} +19 -8
- package/dist/{runtime.d-CCsjTZJW.d.ts → runtime.d-C3RQUj6_.d.ts} +1 -1
- package/dist/{runtime.d-CETtpLb-.d.mts → runtime.d-wvh4ngU0.d.mts} +1 -1
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server.cjs +30 -30
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +15 -15
- package/dist/{spa-router.d-CtSHzXlC.d.mts → spa-router.d-WU_qS5gJ.d.mts} +2 -2
- package/dist/{spa-router.d-CCADbSqJ.d.ts → spa-router.d-m8H_Kl_B.d.ts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils.d-CjyE-npA.d.ts → utils.d-C9dQD5Zg.d.ts} +1 -1
- package/dist/{utils.d-zFPHKFFJ.d.mts → utils.d-W9IiEqmW.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +13 -13
- package/dist/vite.d.mts +4 -4
- package/dist/vite.d.ts +4 -4
- package/dist/vite.mjs +12 -12
- package/package.json +1 -1
- package/dist/analyzer-KEA5JVDR.cjs +0 -15
|
@@ -31,14 +31,14 @@ var _chunk4BS3HSY7cjs = require('./chunk-4BS3HSY7.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkO7IEMY55cjs = require('./chunk-O7IEMY55.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunkS25BQIFWcjs = require('./chunk-S25BQIFW.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
@@ -50,7 +50,7 @@ var _chunk5IKQ7BIRcjs = require('./chunk-5IKQ7BIR.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
var
|
|
53
|
+
var _chunkWMTBBQHYcjs = require('./chunk-WMTBBQHY.cjs');
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
@@ -58,7 +58,7 @@ var _chunkIWRLV46Xcjs = require('./chunk-IWRLV46X.cjs');
|
|
|
58
58
|
var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
var
|
|
61
|
+
var _chunkMG356ROIcjs = require('./chunk-MG356ROI.cjs');
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
@@ -67,7 +67,7 @@ var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkDUSHDZQLcjs = require('./chunk-DUSHDZQL.cjs');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
var _chunkBRWIVOV4cjs = require('./chunk-BRWIVOV4.cjs');
|
|
@@ -111,7 +111,7 @@ var _chunkOCS3PSYRcjs = require('./chunk-OCS3PSYR.cjs');
|
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
var
|
|
114
|
+
var _chunkFAP7CX7Ccjs = require('./chunk-FAP7CX7C.cjs');
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
|
|
@@ -135,7 +135,7 @@ var _chunkX4K7TYN6cjs = require('./chunk-X4K7TYN6.cjs');
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
var
|
|
138
|
+
var _chunkUJ3R2AH2cjs = require('./chunk-UJ3R2AH2.cjs');
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
@@ -149,15 +149,15 @@ var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
var
|
|
152
|
+
var _chunkNXFA7G3Ycjs = require('./chunk-NXFA7G3Y.cjs');
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
var
|
|
157
|
+
var _chunkY5TOT5F6cjs = require('./chunk-Y5TOT5F6.cjs');
|
|
158
158
|
|
|
159
159
|
|
|
160
|
-
var
|
|
160
|
+
var _chunkS7ZW72JHcjs = require('./chunk-S7ZW72JH.cjs');
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
@@ -199,14 +199,14 @@ var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
|
199
199
|
var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
var
|
|
202
|
+
var _chunk7XGWBPQQcjs = require('./chunk-7XGWBPQQ.cjs');
|
|
203
203
|
|
|
204
204
|
|
|
205
205
|
|
|
206
206
|
var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
var
|
|
209
|
+
var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
|
|
@@ -264,7 +264,7 @@ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
|
264
264
|
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
265
265
|
|
|
266
266
|
|
|
267
|
-
var
|
|
267
|
+
var _chunkO2XFIPNLcjs = require('./chunk-O2XFIPNL.cjs');
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
var _chunkE552H232cjs = require('./chunk-E552H232.cjs');
|
|
@@ -382,7 +382,7 @@ function getDocsTitle(docs) {
|
|
|
382
382
|
return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
|
|
383
383
|
}
|
|
384
384
|
function loadPages(contentDir, docs) {
|
|
385
|
-
return
|
|
385
|
+
return _chunkWMTBBQHYcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkWMTBBQHYcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
|
|
386
386
|
}
|
|
387
387
|
function findSocialImagePath(html) {
|
|
388
388
|
const match = /<meta\s+property=["']og:image["']\s+content=["']([^"']+)["']/i.exec(html) || /<meta\s+content=["']([^"']+)["']\s+property=["']og:image["']/i.exec(html);
|
|
@@ -400,14 +400,14 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
|
|
|
400
400
|
return response;
|
|
401
401
|
}
|
|
402
402
|
async function compileFarmDocsManifest(docs, options) {
|
|
403
|
-
const contentDir =
|
|
403
|
+
const contentDir = _chunkWMTBBQHYcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
|
|
404
404
|
const pages = loadPages(contentDir, docs);
|
|
405
405
|
const absolutePaths = [
|
|
406
406
|
_path2.default.resolve(options.root),
|
|
407
407
|
_path2.default.resolve(contentDir),
|
|
408
408
|
docs.configPath || ""
|
|
409
409
|
];
|
|
410
|
-
const handler =
|
|
410
|
+
const handler = _chunkWMTBBQHYcjs.createFarmDocsHandler.call(void 0, docs, {
|
|
411
411
|
root: options.root,
|
|
412
412
|
srcDir: options.srcDir,
|
|
413
413
|
clientEntry: options.clientEntry,
|
|
@@ -416,7 +416,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
416
416
|
globalStylesheetHref: options.globalStylesheetHref,
|
|
417
417
|
isPathGuarded: options.isPathGuarded
|
|
418
418
|
});
|
|
419
|
-
const apiHandler =
|
|
419
|
+
const apiHandler = _chunkS25BQIFWcjs.createFarmDocsAPIHandler.call(void 0, {
|
|
420
420
|
rootDir: options.root,
|
|
421
421
|
srcDir: options.srcDir,
|
|
422
422
|
docs,
|
|
@@ -427,7 +427,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
427
427
|
const apiMarkdown = {};
|
|
428
428
|
for (const page of pages) {
|
|
429
429
|
const htmlResponse = await addHandlerRoute(routes, page.href, handler, absolutePaths);
|
|
430
|
-
const markdownPath =
|
|
430
|
+
const markdownPath = _chunkWMTBBQHYcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
|
|
431
431
|
await addHandlerRoute(routes, markdownPath, handler, absolutePaths);
|
|
432
432
|
if (htmlResponse) {
|
|
433
433
|
const socialImagePath = findSocialImagePath(await htmlResponse.text());
|
|
@@ -511,7 +511,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
511
511
|
post: await compileResponse(postResponse, absolutePaths),
|
|
512
512
|
search: {
|
|
513
513
|
pages: publicPages.map((page) => ({
|
|
514
|
-
...
|
|
514
|
+
..._chunkWMTBBQHYcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
515
515
|
sourcePath: `farm-docs:${page.slug || "index"}`
|
|
516
516
|
})),
|
|
517
517
|
search: _nullishCoalesce(searchConfig, () => ( true)),
|
|
@@ -1875,7 +1875,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
1875
1875
|
assertFarmDocsRuntimeSupported(config, preset);
|
|
1876
1876
|
const srcDir = config.srcDir || "src";
|
|
1877
1877
|
const distDir = config.distDir || ".farm";
|
|
1878
|
-
const deployOutputDir =
|
|
1878
|
+
const deployOutputDir = _chunkDUSHDZQLcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
1879
1879
|
const lifecyclePluginManager = options.pluginManager;
|
|
1880
1880
|
const productionViteResultPromise = Promise.allSettled([
|
|
1881
1881
|
Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))
|
|
@@ -1894,7 +1894,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
1894
1894
|
const routeRuntimeManifestResultPromise = Promise.allSettled([routeRuntimeManifestPromise]);
|
|
1895
1895
|
const pageRoutes = [];
|
|
1896
1896
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
1897
|
-
const markdownSourcePath = entry.markdownSourcePath || (
|
|
1897
|
+
const markdownSourcePath = entry.markdownSourcePath || (_chunk7XGWBPQQcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
|
|
1898
1898
|
pageRoutes.push({
|
|
1899
1899
|
pattern,
|
|
1900
1900
|
...entry.directory ? { directory: entry.directory } : {},
|
|
@@ -2148,7 +2148,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
|
|
|
2148
2148
|
}
|
|
2149
2149
|
const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
|
|
2150
2150
|
await fs4.writeFile(fontCssPath, normalizedFontCss);
|
|
2151
|
-
await fs4.writeFile(clientCssPath,
|
|
2151
|
+
await fs4.writeFile(clientCssPath, _chunkFAP7CX7Ccjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
2152
2152
|
}
|
|
2153
2153
|
var IncompleteClientBuildOutputError = class extends Error {
|
|
2154
2154
|
constructor(detail) {
|
|
@@ -2194,7 +2194,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
2194
2194
|
const key = `${_path2.default.resolve(root)}\0${mode}\0${options.asyncOwnerIslands === true}\0${options.serverOwners === true}\0${options.serverTreeLayouts === true}\0${_path2.default.resolve(modulePath)}`;
|
|
2195
2195
|
let plan = cache.get(key);
|
|
2196
2196
|
if (!plan) {
|
|
2197
|
-
plan =
|
|
2197
|
+
plan = _chunkFAP7CX7Ccjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
2198
2198
|
cache.set(key, plan);
|
|
2199
2199
|
}
|
|
2200
2200
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
@@ -2223,14 +2223,14 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2223
2223
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
2224
2224
|
);
|
|
2225
2225
|
}
|
|
2226
|
-
const isolatedMode =
|
|
2226
|
+
const isolatedMode = _chunkFAP7CX7Ccjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
2227
2227
|
_optionalChain([config, 'access', _61 => _61.experimental, 'optionalAccess', _62 => _62.isolatedClientHydration]),
|
|
2228
2228
|
{
|
|
2229
2229
|
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _63 => _63.experimental, 'optionalAccess', _64 => _64.serverComponents])) === "rsc",
|
|
2230
2230
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
2231
2231
|
}
|
|
2232
2232
|
);
|
|
2233
|
-
const planOptions =
|
|
2233
|
+
const planOptions = _chunkFAP7CX7Ccjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
2234
2234
|
config.renderer,
|
|
2235
2235
|
Boolean(unsupportedIntegrationProvider)
|
|
2236
2236
|
);
|
|
@@ -2287,13 +2287,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2287
2287
|
};
|
|
2288
2288
|
}
|
|
2289
2289
|
});
|
|
2290
|
-
const layoutAppliesToRoute =
|
|
2290
|
+
const layoutAppliesToRoute = _chunkUJ3R2AH2cjs.routeBoundaryCoversDirectory;
|
|
2291
2291
|
const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
|
|
2292
2292
|
const islandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _67 => _67.experimental, 'optionalAccess', _68 => _68.serverComponents])) === "islands";
|
|
2293
2293
|
const adapterOwnsDocsRuntime = Boolean(
|
|
2294
2294
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _69 => _69.docs, 'optionalAccess', _70 => _70.enabled]) && _optionalChain([config, 'access', _71 => _71.docs, 'access', _72 => _72.adapter, 'optionalAccess', _73 => _73.server]) && config.docs.adapter.react
|
|
2295
2295
|
);
|
|
2296
|
-
const docsEntries = _optionalChain([config, 'access', _74 => _74.docs, 'optionalAccess', _75 => _75.enabled]) ?
|
|
2296
|
+
const docsEntries = _optionalChain([config, 'access', _74 => _74.docs, 'optionalAccess', _75 => _75.enabled]) ? _chunkWMTBBQHYcjs.getFarmDocsRoots.call(void 0, config.docs).map(
|
|
2297
2297
|
(docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
|
|
2298
2298
|
) : [];
|
|
2299
2299
|
const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
|
|
@@ -2302,7 +2302,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2302
2302
|
);
|
|
2303
2303
|
const syntheticDocsEntry = _optionalChain([config, 'access', _76 => _76.docs, 'optionalAccess', _77 => _77.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
2304
2304
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
2305
|
-
const markdownPagePlan =
|
|
2305
|
+
const markdownPagePlan = _chunkFAP7CX7Ccjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
2306
2306
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), root),
|
|
2307
2307
|
root,
|
|
2308
2308
|
isolatedMode,
|
|
@@ -2310,7 +2310,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2310
2310
|
);
|
|
2311
2311
|
const routePlans = pageRoutes.map((route) => ({
|
|
2312
2312
|
route,
|
|
2313
|
-
metadata:
|
|
2313
|
+
metadata: _chunk7XGWBPQQcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
2314
2314
|
route.modulePath,
|
|
2315
2315
|
root,
|
|
2316
2316
|
isolatedMode,
|
|
@@ -2318,7 +2318,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2318
2318
|
pagePlanOptions
|
|
2319
2319
|
)
|
|
2320
2320
|
}));
|
|
2321
|
-
|
|
2321
|
+
_chunkFAP7CX7Ccjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
2322
2322
|
clientLayouts.map((layout) => ({
|
|
2323
2323
|
pattern: layout.pattern,
|
|
2324
2324
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -2327,7 +2327,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2327
2327
|
[
|
|
2328
2328
|
...routePlans.map(({ route, metadata }) => ({
|
|
2329
2329
|
pattern: routeDirectory(route),
|
|
2330
|
-
depth:
|
|
2330
|
+
depth: _chunkUJ3R2AH2cjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
|
|
2331
2331
|
metadata
|
|
2332
2332
|
})),
|
|
2333
2333
|
...syntheticDocsPatterns.map((pattern) => ({
|
|
@@ -2351,7 +2351,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2351
2351
|
for (const layout of clientLayouts) {
|
|
2352
2352
|
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
|
|
2353
2353
|
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
2354
|
-
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F ${
|
|
2354
|
+
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F ${_chunkFAP7CX7Ccjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
2357
|
if (isolatedMode === "analyze") {
|
|
@@ -2375,12 +2375,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2375
2375
|
);
|
|
2376
2376
|
if (metadata.suppressedAsyncHydration) {
|
|
2377
2377
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
2378
|
-
`\u26A0\uFE0F ${
|
|
2378
|
+
`\u26A0\uFE0F ${_chunkFAP7CX7Ccjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
|
|
2379
2379
|
);
|
|
2380
2380
|
}
|
|
2381
2381
|
if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0) {
|
|
2382
2382
|
const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
|
|
2383
|
-
const islandStrategy =
|
|
2383
|
+
const islandStrategy = _chunkFAP7CX7Ccjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
2384
2384
|
route,
|
|
2385
2385
|
metadata,
|
|
2386
2386
|
clientLayouts,
|
|
@@ -2398,7 +2398,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2398
2398
|
...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
|
|
2399
2399
|
],
|
|
2400
2400
|
// The server renders a server tree only below a hydrating layout.
|
|
2401
|
-
...
|
|
2401
|
+
..._chunkFAP7CX7Ccjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
|
|
2402
2402
|
});
|
|
2403
2403
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
|
|
2404
2404
|
}
|
|
@@ -2434,7 +2434,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2434
2434
|
}
|
|
2435
2435
|
const clientRouteSlots = routeSlots.filter((slot) => {
|
|
2436
2436
|
try {
|
|
2437
|
-
return
|
|
2437
|
+
return _chunkFAP7CX7Ccjs.getClientModuleMetadata.call(void 0, slot.modulePath, root).shouldHydrate;
|
|
2438
2438
|
} catch (error) {
|
|
2439
2439
|
_chunkQMNWKQL4cjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
|
|
2440
2440
|
return false;
|
|
@@ -2456,7 +2456,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2456
2456
|
srcDir,
|
|
2457
2457
|
adapterOwnsDocsRuntime ? false : _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
|
|
2458
2458
|
adapterOwnsDocsRuntime ? void 0 : _chunkDZZHTMWMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
|
|
2459
|
-
_optionalChain([config, 'access', _78 => _78.docs, 'optionalAccess', _79 => _79.enabled]) ?
|
|
2459
|
+
_optionalChain([config, 'access', _78 => _78.docs, 'optionalAccess', _79 => _79.enabled]) ? _chunkWMTBBQHYcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
|
|
2460
2460
|
adapterOwnsDocsRuntime ? _optionalChain([config, 'access', _80 => _80.docs, 'access', _81 => _81.adapter, 'optionalAccess', _82 => _82.react]) : void 0,
|
|
2461
2461
|
config.i18n,
|
|
2462
2462
|
config.plugins,
|
|
@@ -2465,11 +2465,11 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2465
2465
|
config.trailingSlash,
|
|
2466
2466
|
_chunkI32V5CZLcjs.getIntegrationProviders.call(void 0, config.integrations),
|
|
2467
2467
|
config.basePath,
|
|
2468
|
-
|
|
2468
|
+
_chunkFAP7CX7Ccjs.generateClientCachePersistenceCode.call(void 0, _chunkFAP7CX7Ccjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
|
|
2469
2469
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
|
|
2470
2470
|
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _83 => _83.experimental, 'optionalAccess', _84 => _84.serverComponents])) === "islands",
|
|
2471
2471
|
platform,
|
|
2472
|
-
islandsMode ?
|
|
2472
|
+
islandsMode ? _chunkFAP7CX7Ccjs.collectFarmServerStylesheets.call(void 0,
|
|
2473
2473
|
[
|
|
2474
2474
|
...layoutRoutes.map((layout) => layout.modulePath),
|
|
2475
2475
|
...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
|
|
@@ -2480,7 +2480,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2480
2480
|
const entryName = platform === "mobile" ? _chunkEFZGB7JCcjs.FARM_MOBILE_CLIENT_ENTRY_NAME : "farm-client";
|
|
2481
2481
|
await fs4.writeFile(clientEntryPath, clientHydrationCode);
|
|
2482
2482
|
const clientInput = { [entryName]: clientEntryPath };
|
|
2483
|
-
if (platform === "web" &&
|
|
2483
|
+
if (platform === "web" && _chunkFAP7CX7Ccjs.canBootFarmIslandsClient.call(void 0, config)) {
|
|
2484
2484
|
const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
|
|
2485
2485
|
await fs4.writeFile(
|
|
2486
2486
|
clientBootPath,
|
|
@@ -2552,7 +2552,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2552
2552
|
}
|
|
2553
2553
|
},
|
|
2554
2554
|
plugins: [
|
|
2555
|
-
|
|
2555
|
+
_chunkFAP7CX7Ccjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
2556
2556
|
createFarmPrivateClientSourcemapsPlugin({
|
|
2557
2557
|
outDir: _path2.default.join(
|
|
2558
2558
|
_path2.default.dirname(outputDir),
|
|
@@ -2584,7 +2584,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2584
2584
|
...rendererVitePlugins,
|
|
2585
2585
|
...config.vite.plugins || [],
|
|
2586
2586
|
farmServerOnlyEntriesPlugin({ platform }),
|
|
2587
|
-
|
|
2587
|
+
_chunkFAP7CX7Ccjs.farmDocsClientConfigPlugin.call(void 0,
|
|
2588
2588
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
|
|
2589
2589
|
),
|
|
2590
2590
|
// Plugin to redirect @farm.js/core imports to client-only exports
|
|
@@ -2646,7 +2646,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2646
2646
|
} : void 0,
|
|
2647
2647
|
// Ensure React is bundled for client
|
|
2648
2648
|
resolve: {
|
|
2649
|
-
alias:
|
|
2649
|
+
alias: _chunkFAP7CX7Ccjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
2650
2650
|
dedupe: [...config.renderer.dedupe || []]
|
|
2651
2651
|
},
|
|
2652
2652
|
// Optimize dependencies - exclude server-side code from client bundle
|
|
@@ -2659,7 +2659,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2659
2659
|
]
|
|
2660
2660
|
}
|
|
2661
2661
|
};
|
|
2662
|
-
await viteBuild(
|
|
2662
|
+
await viteBuild(_chunkFAP7CX7Ccjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
|
|
2663
2663
|
if (platform === "mobile") {
|
|
2664
2664
|
await fs4.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
|
|
2665
2665
|
if (!await _chunkEFZGB7JCcjs.hasFarmMobileClientEntry.call(void 0, _path2.default.dirname(outputDir), outputDir)) {
|
|
@@ -2758,7 +2758,7 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
2758
2758
|
return response;
|
|
2759
2759
|
}
|
|
2760
2760
|
|
|
2761
|
-
${streamNavigations ?
|
|
2761
|
+
${streamNavigations ? _chunkFAP7CX7Ccjs.FARM_NAVIGATION_STREAM_READER_SOURCE : ""}
|
|
2762
2762
|
|
|
2763
2763
|
function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
|
|
2764
2764
|
if (error?.name === "FarmDeploymentMismatchError") {
|
|
@@ -3516,7 +3516,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
3516
3516
|
direction: {}
|
|
3517
3517
|
}, plugins = [], renderer = _chunkRD623KW4cjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
|
|
3518
3518
|
const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
|
|
3519
|
-
const clientPluginEntry =
|
|
3519
|
+
const clientPluginEntry = _chunkFAP7CX7Ccjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
3520
3520
|
plugins,
|
|
3521
3521
|
root,
|
|
3522
3522
|
srcDir,
|
|
@@ -3528,7 +3528,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
3528
3528
|
import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
|
|
3529
3529
|
import __farmAppSetup from ${JSON.stringify(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appSetupPath))};
|
|
3530
3530
|
__farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
|
|
3531
|
-
const providerClientCode =
|
|
3531
|
+
const providerClientCode = _chunkFAP7CX7Ccjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
3532
3532
|
integrationProviders,
|
|
3533
3533
|
root,
|
|
3534
3534
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -3551,18 +3551,18 @@ __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot
|
|
|
3551
3551
|
const layoutImportStatements = [];
|
|
3552
3552
|
const layoutRegistrations = [];
|
|
3553
3553
|
const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
|
|
3554
|
-
const treeLayoutPatterns = islandValues ?
|
|
3554
|
+
const treeLayoutPatterns = islandValues ? _chunkUJ3R2AH2cjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
|
|
3555
3555
|
layoutRoutes.forEach((layout, index) => {
|
|
3556
3556
|
const relativePath = toImportPath(layout.modulePath);
|
|
3557
3557
|
const treeLayout = treeLayoutPatterns.has(layout.pattern);
|
|
3558
3558
|
const rendersOnClient = treeLayout || !layout.hasIsolatedClientBoundaries && hydratingLayoutPatterns.some(
|
|
3559
|
-
(pattern) =>
|
|
3559
|
+
(pattern) => _chunkUJ3R2AH2cjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
|
|
3560
3560
|
);
|
|
3561
3561
|
if (rendersOnClient && !treeLayout) {
|
|
3562
3562
|
layoutImportStatements.push(`import Layout${index} from "${relativePath}";`);
|
|
3563
3563
|
}
|
|
3564
|
-
const groupScope =
|
|
3565
|
-
const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(
|
|
3564
|
+
const groupScope = _chunkUJ3R2AH2cjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
3565
|
+
const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(_chunkUJ3R2AH2cjs.stripRouteGroups.call(void 0, layout.pattern))}, groupScope: ${JSON.stringify(groupScope)}` : "";
|
|
3566
3566
|
layoutRegistrations.push(
|
|
3567
3567
|
` { pattern: ${JSON.stringify(layout.pattern)}${groupFields}, Component: ${rendersOnClient ? treeLayout ? `getFarmTreeLayoutComponent(${JSON.stringify(layout.pattern)})` : `Layout${index}` : "null"}, shouldHydrate: ${JSON.stringify(layout.shouldHydrate)}, islandStrategy: ${JSON.stringify(layout.islandStrategy)}${treeLayout ? ", serverTree: true" : ""} }`
|
|
3568
3568
|
);
|
|
@@ -4085,7 +4085,7 @@ function hasHydratableLayout(pathname) {
|
|
|
4085
4085
|
});
|
|
4086
4086
|
}
|
|
4087
4087
|
|
|
4088
|
-
${
|
|
4088
|
+
${_chunkFAP7CX7Ccjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
4089
4089
|
// Wrap a page element with applicable layouts
|
|
4090
4090
|
function wrapWithLayouts(pageElement, pathname, params) {
|
|
4091
4091
|
const layouts = getApplicableLayouts(pathname);
|
|
@@ -4120,7 +4120,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
|
|
|
4120
4120
|
return React.createElement("div", props, pageElement);
|
|
4121
4121
|
}
|
|
4122
4122
|
let farmLastRouteState = null;
|
|
4123
|
-
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${
|
|
4123
|
+
${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkFAP7CX7Ccjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
4124
4124
|
function farmTreeLayoutsOf(pathname) {
|
|
4125
4125
|
return getApplicableLayouts(pathname).filter(function(layout) {
|
|
4126
4126
|
return layout.serverTree === true;
|
|
@@ -5350,7 +5350,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5350
5350
|
}
|
|
5351
5351
|
const middlewareRoutes = await discoverMiddlewareRoutes(appDirs);
|
|
5352
5352
|
const instrumentationPath = _chunkBRWIVOV4cjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
|
|
5353
|
-
const notFoundPath =
|
|
5353
|
+
const notFoundPath = _chunkFAP7CX7Ccjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
|
|
5354
5354
|
if (notFoundPath) _chunkQMNWKQL4cjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
|
|
5355
5355
|
layoutRoutes.sort((a, b) => {
|
|
5356
5356
|
const depthA = a.pattern.split("/").filter(Boolean).length;
|
|
@@ -5372,8 +5372,8 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5372
5372
|
);
|
|
5373
5373
|
const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
|
|
5374
5374
|
const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _91 => _91.mdx, 'optionalAccess', _92 => _92.components]));
|
|
5375
|
-
const hasMiddlewareConfig =
|
|
5376
|
-
const hasRouteContextConfig =
|
|
5375
|
+
const hasMiddlewareConfig = _chunkUJ3R2AH2cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
5376
|
+
const hasRouteContextConfig = _chunkDUSHDZQLcjs.hasCustomFarmRouteContext.call(void 0, config);
|
|
5377
5377
|
const hasServerRuntimePlugins = hasFarmServerRuntimePlugins(config);
|
|
5378
5378
|
const hasPluginRoutes = hasFarmPluginRoutes(config);
|
|
5379
5379
|
const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
|
|
@@ -5383,9 +5383,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5383
5383
|
const hasConfiguredRuntimePlugins = Boolean(
|
|
5384
5384
|
hasRuntimeConfigModule && (config.plugins || []).length > 0
|
|
5385
5385
|
);
|
|
5386
|
-
if (
|
|
5386
|
+
if (_chunkS25BQIFWcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
5387
5387
|
const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
|
|
5388
|
-
|
|
5388
|
+
_chunkS25BQIFWcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
|
|
5389
5389
|
config.docs,
|
|
5390
5390
|
{ root, srcDir: config.srcDir },
|
|
5391
5391
|
(pathname) => adapterGuardedPaths.has(pathname)
|
|
@@ -5394,7 +5394,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5394
5394
|
const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
|
|
5395
5395
|
const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _93 => _93.docs, 'optionalAccess', _94 => _94.enabled]) && _chunkE552H232cjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunkHNAISJFDcjs._runWithFarmCspNonce.call(void 0,
|
|
5396
5396
|
farmDocsCspNonceMarker,
|
|
5397
|
-
async () => _optionalChain([config, 'access', _95 => _95.docs, 'access', _96 => _96.adapter, 'optionalAccess', _97 => _97.server]) ? await
|
|
5397
|
+
async () => _optionalChain([config, 'access', _95 => _95.docs, 'access', _96 => _96.adapter, 'optionalAccess', _97 => _97.server]) ? await _chunkS25BQIFWcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
|
|
5398
5398
|
root,
|
|
5399
5399
|
srcDir: config.srcDir,
|
|
5400
5400
|
clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
|
|
@@ -5557,7 +5557,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5557
5557
|
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _103 => _103.env, 'optionalAccess', _104 => _104.public]) || {})
|
|
5558
5558
|
},
|
|
5559
5559
|
plugins: [
|
|
5560
|
-
|
|
5560
|
+
_chunkFAP7CX7Ccjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
5561
5561
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
5562
5562
|
...rendererVitePlugins,
|
|
5563
5563
|
...config.vite.plugins || [],
|
|
@@ -5618,7 +5618,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5618
5618
|
resolve: {
|
|
5619
5619
|
alias: [
|
|
5620
5620
|
...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
|
|
5621
|
-
...Object.entries(
|
|
5621
|
+
...Object.entries(_chunkFAP7CX7Ccjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
|
|
5622
5622
|
([find, replacement]) => ({ find, replacement })
|
|
5623
5623
|
)
|
|
5624
5624
|
],
|
|
@@ -5626,7 +5626,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5626
5626
|
dedupe: [...config.renderer.dedupe || []]
|
|
5627
5627
|
}
|
|
5628
5628
|
};
|
|
5629
|
-
await viteBuild(
|
|
5629
|
+
await viteBuild(_chunkFAP7CX7Ccjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
5630
5630
|
} finally {
|
|
5631
5631
|
if (postcssConfigDir) {
|
|
5632
5632
|
try {
|
|
@@ -5668,9 +5668,9 @@ function getFarmDocsGuardedPaths(config, middlewareRoutes) {
|
|
|
5668
5668
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
5669
5669
|
middlewareRoutes
|
|
5670
5670
|
};
|
|
5671
|
-
return
|
|
5672
|
-
(docsRoot) =>
|
|
5673
|
-
).flatMap((page) => [page.href,
|
|
5671
|
+
return _chunkWMTBBQHYcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
|
|
5672
|
+
(docsRoot) => _chunkWMTBBQHYcjs.discoverFarmDocsPages.call(void 0, _chunkWMTBBQHYcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
|
|
5673
|
+
).flatMap((page) => [page.href, _chunkWMTBBQHYcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkUJ3R2AH2cjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
|
|
5674
5674
|
}
|
|
5675
5675
|
function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
|
|
5676
5676
|
const llmsTxt = _optionalChain([agent, 'optionalAccess', _107 => _107.llmsTxt]);
|
|
@@ -6050,7 +6050,7 @@ ReactDOMServer.configureApp(__farmAppSetup);`;
|
|
|
6050
6050
|
}
|
|
6051
6051
|
function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache, mobileShellLoadingRoutes = []) {
|
|
6052
6052
|
const farmIslandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _121 => _121.experimental, 'optionalAccess', _122 => _122.serverComponents])) === "islands";
|
|
6053
|
-
const farmClientBoot =
|
|
6053
|
+
const farmClientBoot = _chunkFAP7CX7Ccjs.canBootFarmIslandsClient.call(void 0, config);
|
|
6054
6054
|
const farmMobileClient = shouldBuildFarmMobileClient(config);
|
|
6055
6055
|
const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
|
|
6056
6056
|
const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
@@ -6060,7 +6060,7 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
|
|
|
6060
6060
|
const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _126 => _126.agent, 'optionalAccess', _127 => _127.sitemap, 'optionalAccess', _128 => _128.enabled])) && !applicationMetadataRoutes.some(
|
|
6061
6061
|
(metadata) => metadata.kind === "sitemap" && metadata.pattern === "/"
|
|
6062
6062
|
);
|
|
6063
|
-
const servesDefaultMCP = _optionalChain([config, 'access', _129 => _129.agent, 'optionalAccess', _130 => _130.mcp]) === true && !
|
|
6063
|
+
const servesDefaultMCP = _optionalChain([config, 'access', _129 => _129.agent, 'optionalAccess', _130 => _130.mcp]) === true && !_chunkY5TOT5F6cjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
|
|
6064
6064
|
const servesAiCatalog = _optionalChain([config, 'access', _131 => _131.agent, 'optionalAccess', _132 => _132.aiCatalog]) !== false;
|
|
6065
6065
|
const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
|
|
6066
6066
|
const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
|
|
@@ -6117,7 +6117,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6117
6117
|
const hasGeneratedMetadataImages = metadataImageRoutes.some(
|
|
6118
6118
|
(image) => image.sourceType === "module"
|
|
6119
6119
|
);
|
|
6120
|
-
const hasMiddlewareRuntime = middlewareRoutes.length > 0 ||
|
|
6120
|
+
const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkUJ3R2AH2cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
6121
6121
|
const farmDocsFontAssets = _optionalChain([config, 'access', _143 => _143.docs, 'optionalAccess', _144 => _144.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
|
|
6122
6122
|
const integrationProviders = _chunkI32V5CZLcjs.getIntegrationProviders.call(void 0, config.integrations);
|
|
6123
6123
|
const renderedIntegrationProviders = integrationProviders.filter(
|
|
@@ -6128,7 +6128,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6128
6128
|
`Integration provider components are not supported by the "${config.renderer.name}" renderer.`
|
|
6129
6129
|
);
|
|
6130
6130
|
}
|
|
6131
|
-
const providerServerModules =
|
|
6131
|
+
const providerServerModules = _chunkFAP7CX7Ccjs.generateFarmIntegrationProviderServerModules.call(void 0,
|
|
6132
6132
|
renderedIntegrationProviders,
|
|
6133
6133
|
config.root,
|
|
6134
6134
|
_nullishCoalesce(config.renderer.componentExtensions, () => ( []))
|
|
@@ -6148,14 +6148,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6148
6148
|
const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
|
|
6149
6149
|
(provider) => provider.supportsIsolatedHydration !== true
|
|
6150
6150
|
);
|
|
6151
|
-
const isolatedHydrationMode =
|
|
6151
|
+
const isolatedHydrationMode = _chunkFAP7CX7Ccjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
6152
6152
|
_optionalChain([config, 'access', _147 => _147.experimental, 'optionalAccess', _148 => _148.isolatedClientHydration]),
|
|
6153
6153
|
{
|
|
6154
6154
|
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _149 => _149.experimental, 'optionalAccess', _150 => _150.serverComponents])) === "rsc",
|
|
6155
6155
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
6156
6156
|
}
|
|
6157
6157
|
);
|
|
6158
|
-
const hydrationPlanOptions =
|
|
6158
|
+
const hydrationPlanOptions = _chunkFAP7CX7Ccjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
6159
6159
|
config.renderer,
|
|
6160
6160
|
Boolean(unsupportedIntegrationProvider)
|
|
6161
6161
|
);
|
|
@@ -6173,7 +6173,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6173
6173
|
{ ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
|
|
6174
6174
|
)
|
|
6175
6175
|
}));
|
|
6176
|
-
const markdownPagePlan =
|
|
6176
|
+
const markdownPagePlan = _chunkFAP7CX7Ccjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
6177
6177
|
_chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
|
|
6178
6178
|
config.root,
|
|
6179
6179
|
isolatedHydrationMode,
|
|
@@ -6182,7 +6182,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6182
6182
|
const pageHydrationPlans = new Map(
|
|
6183
6183
|
pageRoutes.map((route) => [
|
|
6184
6184
|
route.modulePath,
|
|
6185
|
-
|
|
6185
|
+
_chunk7XGWBPQQcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
6186
6186
|
route.modulePath,
|
|
6187
6187
|
config.root,
|
|
6188
6188
|
isolatedHydrationMode,
|
|
@@ -6191,7 +6191,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6191
6191
|
)
|
|
6192
6192
|
])
|
|
6193
6193
|
);
|
|
6194
|
-
|
|
6194
|
+
_chunkFAP7CX7Ccjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
6195
6195
|
layoutHydrationPlans.map((layout) => ({
|
|
6196
6196
|
pattern: layout.pattern,
|
|
6197
6197
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -6200,10 +6200,10 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6200
6200
|
pageRoutes.map((route) => ({
|
|
6201
6201
|
// Compared by directory so a grouped layout applies only inside its group.
|
|
6202
6202
|
pattern: _nullishCoalesce(route.directory, () => ( route.pattern)),
|
|
6203
|
-
depth:
|
|
6203
|
+
depth: _chunkUJ3R2AH2cjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
|
|
6204
6204
|
metadata: pageHydrationPlans.get(route.modulePath)
|
|
6205
6205
|
})),
|
|
6206
|
-
|
|
6206
|
+
_chunkUJ3R2AH2cjs.routeBoundaryCoversDirectory,
|
|
6207
6207
|
{ serverOwners: pageHydrationPlanOptions.serverOwners }
|
|
6208
6208
|
);
|
|
6209
6209
|
const providerServerImports = [
|
|
@@ -6234,7 +6234,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6234
6234
|
}).map(({ route }) => route);
|
|
6235
6235
|
orderedPageRoutes.forEach((route, index) => {
|
|
6236
6236
|
const varName = `pageRoute${index}`;
|
|
6237
|
-
if (
|
|
6237
|
+
if (_chunk7XGWBPQQcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
|
|
6238
6238
|
pageRegistrations.push(`
|
|
6239
6239
|
{
|
|
6240
6240
|
pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
|
|
@@ -6266,8 +6266,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6266
6266
|
module: ${varName},
|
|
6267
6267
|
shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
|
|
6268
6268
|
clientModule: ${JSON.stringify(_chunkQMNWKQL4cjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
|
|
6269
|
-
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${
|
|
6270
|
-
const rootStrategy =
|
|
6269
|
+
islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkFAP7CX7Ccjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
|
|
6270
|
+
const rootStrategy = _chunkFAP7CX7Ccjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
6271
6271
|
route,
|
|
6272
6272
|
clientMetadata,
|
|
6273
6273
|
layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
|
|
@@ -6286,7 +6286,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6286
6286
|
});
|
|
6287
6287
|
const layoutImports = [];
|
|
6288
6288
|
const layoutRegistrations = [];
|
|
6289
|
-
const treeLayoutPatterns = farmIslandsMode ?
|
|
6289
|
+
const treeLayoutPatterns = farmIslandsMode ? _chunkUJ3R2AH2cjs.getFarmServerTreeLayoutPatterns.call(void 0,
|
|
6290
6290
|
layoutHydrationPlans.map((layout) => ({
|
|
6291
6291
|
pattern: layout.pattern,
|
|
6292
6292
|
shouldHydrate: layout.hydration.shouldHydrate,
|
|
@@ -6340,12 +6340,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6340
6340
|
errorImports.push(
|
|
6341
6341
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
|
|
6342
6342
|
);
|
|
6343
|
-
const groupScope =
|
|
6343
|
+
const groupScope = _chunkUJ3R2AH2cjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
|
|
6344
6344
|
errorRegistrations.push(`
|
|
6345
6345
|
{
|
|
6346
|
-
pattern: ${JSON.stringify(
|
|
6346
|
+
pattern: ${JSON.stringify(_chunkUJ3R2AH2cjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
|
|
6347
6347
|
groupScope: ${JSON.stringify(groupScope)},
|
|
6348
|
-
directoryDepth: ${
|
|
6348
|
+
directoryDepth: ${_chunkUJ3R2AH2cjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
|
|
6349
6349
|
module: ${varName},
|
|
6350
6350
|
}`);
|
|
6351
6351
|
});
|
|
@@ -6357,12 +6357,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6357
6357
|
loadingImports.push(
|
|
6358
6358
|
`import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
|
|
6359
6359
|
);
|
|
6360
|
-
const groupScope =
|
|
6360
|
+
const groupScope = _chunkUJ3R2AH2cjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
|
|
6361
6361
|
loadingRegistrations.push(`
|
|
6362
6362
|
{
|
|
6363
|
-
pattern: ${JSON.stringify(
|
|
6363
|
+
pattern: ${JSON.stringify(_chunkUJ3R2AH2cjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
|
|
6364
6364
|
groupScope: ${JSON.stringify(groupScope)},
|
|
6365
|
-
directoryDepth: ${
|
|
6365
|
+
directoryDepth: ${_chunkUJ3R2AH2cjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
|
|
6366
6366
|
module: ${varName},
|
|
6367
6367
|
}`);
|
|
6368
6368
|
});
|
|
@@ -6619,10 +6619,10 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
|
|
|
6619
6619
|
);
|
|
6620
6620
|
const nativeServerFns = (config.plugins || []).some(
|
|
6621
6621
|
(plugin) => _optionalChain([plugin, 'optionalAccess', _171 => _171.name]) === _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN
|
|
6622
|
-
) ?
|
|
6622
|
+
) ? _chunkO7IEMY55cjs.collectFarmNativeServerFns.call(void 0, {
|
|
6623
6623
|
root: config.root,
|
|
6624
6624
|
srcDir: config.srcDir,
|
|
6625
|
-
entries:
|
|
6625
|
+
entries: _chunkO7IEMY55cjs.findFarmNativeScreenFiles.call(void 0, _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, config))
|
|
6626
6626
|
}) : void 0;
|
|
6627
6627
|
const integrationImports = `
|
|
6628
6628
|
${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
|
|
@@ -6637,7 +6637,7 @@ ${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.c
|
|
|
6637
6637
|
${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
|
|
6638
6638
|
});` : ""}
|
|
6639
6639
|
`;
|
|
6640
|
-
const imageRuntime =
|
|
6640
|
+
const imageRuntime = _chunkFAP7CX7Ccjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
6641
6641
|
const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
|
|
6642
6642
|
const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
|
|
6643
6643
|
const apiHandlerCode = apiRoutes.length > 0 ? `
|
|
@@ -6817,7 +6817,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
|
|
|
6817
6817
|
|
|
6818
6818
|
function FarmDefault404Page() {
|
|
6819
6819
|
return React.createElement(React.Fragment, null,
|
|
6820
|
-
React.createElement("style", null, ${JSON.stringify(
|
|
6820
|
+
React.createElement("style", null, ${JSON.stringify(_chunkFAP7CX7Ccjs.DEFAULT_NOT_FOUND_STYLES)}),
|
|
6821
6821
|
React.createElement("main", {
|
|
6822
6822
|
className: "farm-default-not-found",
|
|
6823
6823
|
"aria-labelledby": "farm-default-not-found-title",
|
|
@@ -6967,7 +6967,7 @@ ${_optionalChain([config, 'access', _179 => _179.agent, 'optionalAccess', _180 =
|
|
|
6967
6967
|
// to the build.
|
|
6968
6968
|
const farmNoindexPreview = resolveFarmPreviewDeployment(
|
|
6969
6969
|
globalThis.process?.env,
|
|
6970
|
-
${JSON.stringify(
|
|
6970
|
+
${JSON.stringify(_chunkS7ZW72JHcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
|
|
6971
6971
|
);` : ""}
|
|
6972
6972
|
const farmMdxComponents = ${mdxComponentsPath ? `(FarmMdxComponentsModule.components || Reflect.get(FarmMdxComponentsModule, "default") || {})` : `(configuredFarmMdxComponents && typeof configuredFarmMdxComponents === "object" ? configuredFarmMdxComponents : {})`};
|
|
6973
6973
|
const farmObservabilityConfig = farmUserConfig?.observability ?? ${JSON.stringify(
|
|
@@ -7134,12 +7134,12 @@ function fetchFarmInnerRequest(request, context) {
|
|
|
7134
7134
|
}
|
|
7135
7135
|
const farmLocalAPIBasePath = ${JSON.stringify(_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
|
|
7136
7136
|
const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
|
|
7137
|
-
${_optionalChain([config, 'access', _192 => _192.agent, 'optionalAccess', _193 => _193.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(
|
|
7137
|
+
${_optionalChain([config, 'access', _192 => _192.agent, 'optionalAccess', _193 => _193.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkNXFA7G3Ycjs.resolveFarmApiCatalogInput.call(void 0, config))};
|
|
7138
7138
|
` : ""}${_optionalChain([config, 'access', _194 => _194.agent, 'optionalAccess', _195 => _195.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
|
|
7139
|
-
|
|
7139
|
+
_chunkNXFA7G3Ycjs.resolveFarmAppManifestInput.call(void 0, config, {
|
|
7140
7140
|
build: config.deploymentId,
|
|
7141
|
-
packages:
|
|
7142
|
-
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ?
|
|
7141
|
+
packages: _chunkFAP7CX7Ccjs.resolveFarmAppPackages.call(void 0, config.root),
|
|
7142
|
+
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkFAP7CX7Ccjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
|
|
7143
7143
|
})
|
|
7144
7144
|
)};
|
|
7145
7145
|
${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -7765,7 +7765,7 @@ function peelFarmDocumentPrefix(markup) {
|
|
|
7765
7765
|
let inner = markup.replace(/^\\s+/, "");
|
|
7766
7766
|
let hoisted = "";
|
|
7767
7767
|
const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents;?\\s*["'][^>]*>/i;
|
|
7768
|
-
const hoistable = /${
|
|
7768
|
+
const hoistable = /${_chunkUJ3R2AH2cjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
7769
7769
|
let match;
|
|
7770
7770
|
while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
|
|
7771
7771
|
if (!/^<div/i.test(match[0])) hoisted += match[0];
|
|
@@ -8297,7 +8297,7 @@ function createFarmAgentRobotsResponse(request) {
|
|
|
8297
8297
|
// a route guard.
|
|
8298
8298
|
const farmAgentGuardedPages = new Set(${JSON.stringify(
|
|
8299
8299
|
pageRoutes.map((route) => route.pattern).filter(
|
|
8300
|
-
(pattern) => !pattern.includes("[") &&
|
|
8300
|
+
(pattern) => !pattern.includes("[") && _chunkUJ3R2AH2cjs.farmPathGuardCoversPage.call(void 0,
|
|
8301
8301
|
{
|
|
8302
8302
|
config: { middleware: config.middleware, integrations: config.integrations },
|
|
8303
8303
|
middlewareRoutes
|
|
@@ -8344,12 +8344,12 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
|
|
|
8344
8344
|
// aside for a page route that answers /mcp and for any MCP server published or
|
|
8345
8345
|
// registered at runtime, such as the docs engine's.
|
|
8346
8346
|
const farmDefaultMCPServer = ${JSON.stringify(
|
|
8347
|
-
|
|
8347
|
+
_chunkY5TOT5F6cjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkO2XFIPNLcjs.FARM_VERSION)
|
|
8348
8348
|
)};
|
|
8349
8349
|
let farmDefaultMCPRouteFree;
|
|
8350
8350
|
function getFarmDefaultMCPServer() {
|
|
8351
8351
|
if (farmDefaultMCPRouteFree === undefined) {
|
|
8352
|
-
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(
|
|
8352
|
+
farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkY5TOT5F6cjs.FARM_DEFAULT_MCP_PATH)});
|
|
8353
8353
|
}
|
|
8354
8354
|
return farmDefaultMCPRouteFree ? resolveFarmDefaultMCPServer(farmDefaultMCPServer) : undefined;
|
|
8355
8355
|
}
|
|
@@ -8754,7 +8754,7 @@ ${hasInfraAnalyticsRuntime ? `
|
|
|
8754
8754
|
// endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
|
|
8755
8755
|
// labeled here; route.pattern keeps meaning the matched app route for plugins.
|
|
8756
8756
|
const farmBuiltInRoutePaths = new Set(${JSON.stringify(
|
|
8757
|
-
|
|
8757
|
+
_chunkNXFA7G3Ycjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
8758
8758
|
agent: {
|
|
8759
8759
|
...config.agent,
|
|
8760
8760
|
aiCatalog: servesAiCatalog,
|
|
@@ -9343,8 +9343,9 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9343
9343
|
// The mobile app's native-tier screens: the page, rendered as for a browser, read into a
|
|
9344
9344
|
// tree of native views.
|
|
9345
9345
|
const farmNativeStylesheets = JSON.parse(${JSON.stringify(FARM_NATIVE_STYLESHEETS_PLACEHOLDER)});
|
|
9346
|
+
// A POST is a form a native-tier screen submitted (native-tree.ts).
|
|
9346
9347
|
if (
|
|
9347
|
-
(request.method === "GET" || request.method === "HEAD") &&
|
|
9348
|
+
(request.method === "GET" || request.method === "HEAD" || request.method === "POST") &&
|
|
9348
9349
|
request.headers.get("accept")?.includes(${JSON.stringify(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)})
|
|
9349
9350
|
) {
|
|
9350
9351
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
@@ -9460,7 +9461,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9460
9461
|
// agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
|
|
9461
9462
|
// public manifest, the same document for every request.
|
|
9462
9463
|
if (
|
|
9463
|
-
[${JSON.stringify(
|
|
9464
|
+
[${JSON.stringify(_chunkNXFA7G3Ycjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkNXFA7G3Ycjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
|
|
9464
9465
|
normalizeRuntimePath(routePathname),
|
|
9465
9466
|
)
|
|
9466
9467
|
) {
|
|
@@ -9472,7 +9473,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9472
9473
|
` : ""}
|
|
9473
9474
|
${_optionalChain([config, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.apiCatalog]) ? `
|
|
9474
9475
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
9475
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
9476
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkNXFA7G3Ycjs.FARM_API_CATALOG_PATH)}) {
|
|
9476
9477
|
return applyProductionMiddlewareHeaders(
|
|
9477
9478
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
9478
9479
|
middlewareHeaders,
|
|
@@ -10608,7 +10609,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
10608
10609
|
${servesDefaultMCP ? `
|
|
10609
10610
|
// agent.mcp: no app route answered /mcp, so the default read-only server may.
|
|
10610
10611
|
if (
|
|
10611
|
-
normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
10612
|
+
normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkY5TOT5F6cjs.FARM_DEFAULT_MCP_PATH)} &&
|
|
10612
10613
|
getFarmDefaultMCPServer()
|
|
10613
10614
|
) {
|
|
10614
10615
|
return applyProductionMiddlewareHeaders(
|
|
@@ -11020,9 +11021,9 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
11020
11021
|
if (rewriteSources.some((source) => middlewarePatternMatches(source, pathname))) {
|
|
11021
11022
|
return "rewrite";
|
|
11022
11023
|
}
|
|
11023
|
-
if (
|
|
11024
|
-
if (
|
|
11025
|
-
if (
|
|
11024
|
+
if (_chunkUJ3R2AH2cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
|
|
11025
|
+
if (_chunkUJ3R2AH2cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
|
|
11026
|
+
if (_chunkDUSHDZQLcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
|
|
11026
11027
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
11027
11028
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
11028
11029
|
if (_optionalChain([manifestEntry, 'optionalAccess', _240 => _240.rendering]) === "dynamic") return "dynamic runtime manifest";
|
|
@@ -11040,7 +11041,7 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
11040
11041
|
}
|
|
11041
11042
|
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
11042
11043
|
if (!_optionalChain([config, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.enabled]) || !config.docs.prerender) return [];
|
|
11043
|
-
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !
|
|
11044
|
+
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !_chunkS25BQIFWcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
11044
11045
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11045
11046
|
"docs.prerender needs a docs adapter such as @farming-labs/farmjs; Farm's built-in docs renderer keeps rendering docs pages on request."
|
|
11046
11047
|
);
|
|
@@ -11052,7 +11053,7 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
11052
11053
|
);
|
|
11053
11054
|
return [];
|
|
11054
11055
|
}
|
|
11055
|
-
const pages = await
|
|
11056
|
+
const pages = await _chunkS25BQIFWcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
|
|
11056
11057
|
if (!pages) {
|
|
11057
11058
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11058
11059
|
`The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
|
|
@@ -11078,10 +11079,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11078
11079
|
const nitroBuilder = nitroBuilderResult.value;
|
|
11079
11080
|
const isVercel = preset === "vercel" || preset === "vercel-edge";
|
|
11080
11081
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
11081
|
-
const outputDir =
|
|
11082
|
+
const outputDir = _chunkDUSHDZQLcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
11082
11083
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
11083
11084
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
11084
|
-
const imageRuntime =
|
|
11085
|
+
const imageRuntime = _chunkFAP7CX7Ccjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
11085
11086
|
const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
|
|
11086
11087
|
(image) => image.sourceType === "module"
|
|
11087
11088
|
);
|
|
@@ -11672,7 +11673,7 @@ function toFarmNodeResponse(request, response) {
|
|
|
11672
11673
|
if (_optionalChain([config, 'access', _266 => _266.md, 'optionalAccess', _267 => _267.enabled])) {
|
|
11673
11674
|
nitroInstance.hooks.hook("prerender:generate", (route) => {
|
|
11674
11675
|
if (!route.contents || !_optionalChain([route, 'access', _268 => _268.contentType, 'optionalAccess', _269 => _269.toLowerCase, 'call', _270 => _270(), 'access', _271 => _271.includes, 'call', _272 => _272("html")])) return;
|
|
11675
|
-
const alternatePath =
|
|
11676
|
+
const alternatePath = _chunk2C5L5RPMcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route);
|
|
11676
11677
|
if (!alternatePath) return;
|
|
11677
11678
|
const routeRule = nitroInstance.options.routeRules[route.route] || {};
|
|
11678
11679
|
const alternate = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
|
|
@@ -11767,13 +11768,13 @@ function toFarmNodeResponse(request, response) {
|
|
|
11767
11768
|
}
|
|
11768
11769
|
if (prerenderRoutes.length > 0) {
|
|
11769
11770
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
|
|
11770
|
-
const previousPrerender = process.env[
|
|
11771
|
-
process.env[
|
|
11771
|
+
const previousPrerender = process.env[_chunkMG356ROIcjs.FARM_PRERENDER_ENV];
|
|
11772
|
+
process.env[_chunkMG356ROIcjs.FARM_PRERENDER_ENV] = "1";
|
|
11772
11773
|
try {
|
|
11773
11774
|
await nitroBuilder.prerender(nitroInstance);
|
|
11774
11775
|
} finally {
|
|
11775
|
-
if (previousPrerender === void 0) delete process.env[
|
|
11776
|
-
else process.env[
|
|
11776
|
+
if (previousPrerender === void 0) delete process.env[_chunkMG356ROIcjs.FARM_PRERENDER_ENV];
|
|
11777
|
+
else process.env[_chunkMG356ROIcjs.FARM_PRERENDER_ENV] = previousPrerender;
|
|
11777
11778
|
}
|
|
11778
11779
|
}
|
|
11779
11780
|
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs4, preset) : Promise.resolve(null);
|
|
@@ -11976,7 +11977,7 @@ async function postProcessVercelOutput(root, outputDir, fs4, config, farmWorkflo
|
|
|
11976
11977
|
}
|
|
11977
11978
|
async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
11978
11979
|
if (!_optionalChain([config, 'access', _280 => _280.docs, 'optionalAccess', _281 => _281.enabled])) return;
|
|
11979
|
-
const [mainRoot, ...extraRoots] =
|
|
11980
|
+
const [mainRoot, ...extraRoots] = _chunkWMTBBQHYcjs.getFarmDocsRoots.call(void 0, config.docs);
|
|
11980
11981
|
await copyFarmDocsRootContent(
|
|
11981
11982
|
mainRoot,
|
|
11982
11983
|
root,
|
|
@@ -11997,7 +11998,7 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs4) {
|
|
|
11997
11998
|
async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs4) {
|
|
11998
11999
|
const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
|
|
11999
12000
|
if (!docsContentDir) return;
|
|
12000
|
-
const lastModifiedManifest =
|
|
12001
|
+
const lastModifiedManifest = _chunkWMTBBQHYcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
|
|
12001
12002
|
fallback: "now"
|
|
12002
12003
|
});
|
|
12003
12004
|
await fs4.rm(bundledContentDir, { recursive: true, force: true });
|
|
@@ -12007,7 +12008,7 @@ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs
|
|
|
12007
12008
|
force: true
|
|
12008
12009
|
});
|
|
12009
12010
|
await fs4.writeFile(
|
|
12010
|
-
_path2.default.join(bundledContentDir,
|
|
12011
|
+
_path2.default.join(bundledContentDir, _chunkWMTBBQHYcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
|
|
12011
12012
|
`${JSON.stringify(lastModifiedManifest, null, 2)}
|
|
12012
12013
|
`
|
|
12013
12014
|
);
|
|
@@ -12078,7 +12079,7 @@ async function stageSharpRuntime(config, root, distDir, fs4, preset) {
|
|
|
12078
12079
|
try {
|
|
12079
12080
|
await copyPackage("sharp", sharpRequire);
|
|
12080
12081
|
if (!copiedPackages.has("sharp")) {
|
|
12081
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
12082
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunkFAP7CX7Ccjs.SHARP_INSTALL_HINT}`);
|
|
12082
12083
|
}
|
|
12083
12084
|
} catch (error) {
|
|
12084
12085
|
await fs4.rm(stageDir, { recursive: true, force: true });
|
|
@@ -12299,7 +12300,7 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
12299
12300
|
// src/build/index.ts
|
|
12300
12301
|
async function build(config, options = {}) {
|
|
12301
12302
|
return _chunk4IHMHFQBcjs.withProductionNodeEnv.call(void 0,
|
|
12302
|
-
() =>
|
|
12303
|
+
() => _chunkFAP7CX7Ccjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
|
|
12303
12304
|
);
|
|
12304
12305
|
}
|
|
12305
12306
|
function createBuildTargetBaseline(config) {
|
|
@@ -12310,7 +12311,7 @@ function createBuildTargetBaseline(config) {
|
|
|
12310
12311
|
preset,
|
|
12311
12312
|
distDir,
|
|
12312
12313
|
outputDir,
|
|
12313
|
-
outputWasDerived: outputDir ===
|
|
12314
|
+
outputWasDerived: outputDir === _chunkDUSHDZQLcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
12314
12315
|
};
|
|
12315
12316
|
}
|
|
12316
12317
|
function resolveBuildTargets(config, options, baseline) {
|
|
@@ -12319,8 +12320,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12319
12320
|
const distDir = config.distDir || ".farm";
|
|
12320
12321
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
12321
12322
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
12322
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
12323
|
-
const outputDir = shouldRefreshDerivedOutput ?
|
|
12323
|
+
const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkDUSHDZQLcjs.getDeployTargetForPreset.call(void 0, preset);
|
|
12324
|
+
const outputDir = shouldRefreshDerivedOutput ? _chunkDUSHDZQLcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
|
|
12324
12325
|
return {
|
|
12325
12326
|
root,
|
|
12326
12327
|
preset,
|
|
@@ -12328,7 +12329,7 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12328
12329
|
distDir,
|
|
12329
12330
|
deployTarget,
|
|
12330
12331
|
outputDir,
|
|
12331
|
-
deployOutputDir:
|
|
12332
|
+
deployOutputDir: _chunkDUSHDZQLcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
12332
12333
|
};
|
|
12333
12334
|
}
|
|
12334
12335
|
async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
@@ -12365,7 +12366,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12365
12366
|
};
|
|
12366
12367
|
config = {
|
|
12367
12368
|
...config,
|
|
12368
|
-
images:
|
|
12369
|
+
images: _chunkFAP7CX7Ccjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
12369
12370
|
root: targets.root,
|
|
12370
12371
|
preset: targets.preset
|
|
12371
12372
|
})
|
|
@@ -12373,7 +12374,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12373
12374
|
if (_optionalChain([config, 'access', _282 => _282.docs, 'optionalAccess', _283 => _283.enabled])) await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
|
|
12374
12375
|
pluginManager.updateContext({ config });
|
|
12375
12376
|
const { root, preset, srcDir, distDir, deployOutputDir } = targets;
|
|
12376
|
-
|
|
12377
|
+
_chunkFAP7CX7Ccjs.usePackageClientBoundaryCacheFile.call(void 0,
|
|
12377
12378
|
_path2.default.resolve(root, distDir, "cache", "client-boundaries.json")
|
|
12378
12379
|
);
|
|
12379
12380
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
|
|
@@ -12396,7 +12397,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12396
12397
|
root,
|
|
12397
12398
|
rendererBuild.signal
|
|
12398
12399
|
);
|
|
12399
|
-
const farmApp =
|
|
12400
|
+
const farmApp = _chunkFAP7CX7Ccjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
12400
12401
|
await farmApp.initialize();
|
|
12401
12402
|
const routeManager = farmApp.getRouteManager();
|
|
12402
12403
|
const serverRenderer = farmApp.getServerRenderer();
|
|
@@ -12407,7 +12408,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12407
12408
|
plugins: config.plugins,
|
|
12408
12409
|
extraRoutes: [
|
|
12409
12410
|
..._optionalChain([config, 'access', _286 => _286.openapi, 'optionalAccess', _287 => _287.enabled]) && config.openapi.route ? [config.openapi.route] : [],
|
|
12410
|
-
...
|
|
12411
|
+
..._chunkWMTBBQHYcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
|
|
12411
12412
|
],
|
|
12412
12413
|
suppressLintOnLink: config.suppressLintOnLink,
|
|
12413
12414
|
componentExtensions: config.renderer.componentExtensions,
|
|
@@ -12503,7 +12504,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12503
12504
|
ssr: true,
|
|
12504
12505
|
buildLifetime
|
|
12505
12506
|
});
|
|
12506
|
-
const viteConfig =
|
|
12507
|
+
const viteConfig = _chunkFAP7CX7Ccjs.mergeFarmViteConfig.call(void 0,
|
|
12507
12508
|
{
|
|
12508
12509
|
root,
|
|
12509
12510
|
appType: "custom",
|
|
@@ -12515,7 +12516,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12515
12516
|
},
|
|
12516
12517
|
plugins: [
|
|
12517
12518
|
...rendererVitePlugins,
|
|
12518
|
-
|
|
12519
|
+
_chunkFAP7CX7Ccjs.farmFontImportsPlugin.call(void 0, {
|
|
12519
12520
|
root,
|
|
12520
12521
|
basePath: config.basePath,
|
|
12521
12522
|
publicDir: config.publicDir
|
|
@@ -12530,7 +12531,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12530
12531
|
hmr: false
|
|
12531
12532
|
},
|
|
12532
12533
|
resolve: {
|
|
12533
|
-
alias:
|
|
12534
|
+
alias: _chunkFAP7CX7Ccjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
12534
12535
|
dedupe: [...config.renderer.dedupe || []]
|
|
12535
12536
|
},
|
|
12536
12537
|
optimizeDeps: {
|
|
@@ -12655,7 +12656,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12655
12656
|
if (pluginManager) {
|
|
12656
12657
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
12657
12658
|
}
|
|
12658
|
-
const outputDir =
|
|
12659
|
+
const outputDir = _chunkDUSHDZQLcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
12659
12660
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
12660
12661
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
12661
12662
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -12726,7 +12727,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12726
12727
|
root,
|
|
12727
12728
|
preset,
|
|
12728
12729
|
distDir,
|
|
12729
|
-
outputDir:
|
|
12730
|
+
outputDir: _chunkDUSHDZQLcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
|
|
12730
12731
|
});
|
|
12731
12732
|
}
|
|
12732
12733
|
}
|