@farm.js/core 0.1.26 → 0.1.27
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 +7 -9
- package/dist/agent-runtime.d.ts +7 -9
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.d.mts +4 -5
- package/dist/api/client.d.ts +4 -5
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +6 -5
- package/dist/api/route-manager.d.mts +6 -8
- package/dist/api/route-manager.d.ts +6 -8
- package/dist/api/route-manager.mjs +5 -4
- package/dist/api/runtime.cjs +10 -4
- package/dist/api/runtime.d.mts +35 -3
- package/dist/api/runtime.d.ts +35 -3
- package/dist/api/runtime.mjs +9 -3
- package/dist/{api-client-Cx54IR5g.d.mts → api-client-BjMmY8OD.d.mts} +2 -3
- package/dist/{api-client-DykpaKcY.d.ts → api-client-CyFtZFJ4.d.ts} +2 -3
- package/dist/api.cjs +9 -8
- package/dist/api.d.mts +8 -10
- package/dist/api.d.ts +8 -10
- package/dist/api.mjs +9 -8
- package/dist/{app-29vG5tmY.d.mts → app-BfzZdjgX.d.mts} +3 -4
- package/dist/{app-Cx71s_PT.d.ts → app-CXK7Prrt.d.ts} +3 -4
- package/dist/app-markdown.cjs +10 -4
- package/dist/app-markdown.d.mts +8 -10
- package/dist/app-markdown.d.ts +8 -10
- package/dist/app-markdown.mjs +9 -3
- package/dist/{chunk-74RZNRY6.mjs → chunk-3PTVHMLD.mjs} +1 -1
- package/dist/{chunk-OFKG57MZ.mjs → chunk-4FHDV7VM.mjs} +2 -2
- package/dist/{chunk-KLSSO6YD.mjs → chunk-4UNKCNSL.mjs} +1 -1
- package/dist/chunk-5MKEDGLD.cjs +53 -0
- package/dist/{chunk-2CT6XUNO.cjs → chunk-DQMTHWPI.cjs} +4 -4
- package/dist/{chunk-ALIFMS4A.cjs → chunk-FOT7LZEO.cjs} +1 -1
- package/dist/{chunk-DU2CASV6.mjs → chunk-FPW4W3VW.mjs} +1 -1
- package/dist/{chunk-RCYINC4A.cjs → chunk-HF5SIACK.cjs} +3 -3
- package/dist/{chunk-ARXCHQLX.mjs → chunk-HG237IEY.mjs} +4 -4
- package/dist/{chunk-BD2U4ZL6.cjs → chunk-JQGDQO2I.cjs} +8 -8
- package/dist/{chunk-RAI7NULA.mjs → chunk-JT25KHDI.mjs} +1 -1
- package/dist/{chunk-WFPRVVF2.cjs → chunk-KAERLFD3.cjs} +16 -11
- package/dist/{chunk-H7CJRJ4L.cjs → chunk-LAHZ7LZA.cjs} +16 -16
- package/dist/{chunk-JM5GQL4H.mjs → chunk-MBFURXAC.mjs} +1 -1
- package/dist/{chunk-QLXEYIAW.cjs → chunk-NPFGGBM5.cjs} +13 -13
- package/dist/{chunk-VZWO3XVL.mjs → chunk-O2LV5XDG.mjs} +2 -2
- package/dist/chunk-O6XNAMBV.mjs +53 -0
- package/dist/{chunk-UXQXGB5A.mjs → chunk-OGHTEYXS.mjs} +11 -10
- package/dist/{chunk-OOIL3BWR.mjs → chunk-POXI72VV.mjs} +12 -0
- package/dist/{chunk-QGG336NI.mjs → chunk-Q4BHBO6V.mjs} +1 -1
- package/dist/{chunk-3WSWXPYM.cjs → chunk-QI7WQSMI.cjs} +4 -4
- package/dist/{chunk-PPIW3MH6.mjs → chunk-QQQNJS2E.mjs} +1 -1
- package/dist/{chunk-W2HZKYES.cjs → chunk-TDWFCC2T.cjs} +2 -2
- package/dist/{chunk-3TQG7CGC.cjs → chunk-UNSKL6BI.cjs} +78 -77
- package/dist/{chunk-QPPQHB6X.mjs → chunk-UWTQTZFN.mjs} +17 -11
- package/dist/{chunk-YMUH2BLR.mjs → chunk-WIVTGKLY.mjs} +7 -2
- package/dist/{chunk-QJ4D3UKJ.cjs → chunk-WJKVTJJR.cjs} +4 -4
- package/dist/{chunk-OAVTUMJP.cjs → chunk-YXM74XOW.cjs} +9 -9
- package/dist/{chunk-SZ4LYNUX.cjs → chunk-YZBV7733.cjs} +82 -76
- package/dist/{chunk-QIH2HD6H.cjs → chunk-ZSO5GWGD.cjs} +33 -21
- package/dist/{client-plugins-B8RPJnot.d.mts → client-plugins-1GS4zubE.d.mts} +1799 -1623
- package/dist/{client-plugins-bPBf4haK.d.ts → client-plugins-B1Za6F5x.d.ts} +1799 -1623
- package/dist/client-plugins.d.mts +7 -9
- package/dist/client-plugins.d.ts +7 -9
- package/dist/client.cjs +4 -4
- package/dist/client.d.mts +9 -11
- package/dist/client.d.ts +9 -11
- package/dist/client.mjs +3 -3
- package/dist/config.d.mts +7 -9
- package/dist/config.d.ts +7 -9
- package/dist/{devtools-5D4ZDRPR.mjs → devtools-6RN6KHTW.mjs} +6 -3
- package/dist/{devtools-QZJEUOJW.cjs → devtools-CQJ3H6MX.cjs} +7 -4
- package/dist/docs.cjs +9 -6
- package/dist/docs.mjs +8 -5
- package/dist/{endpoint-1zA994xL.d.ts → endpoint-CA-TNX60.d.ts} +1 -1
- package/dist/{endpoint-DAc96i93.d.mts → endpoint-CCHFqyTE.d.mts} +1 -1
- package/dist/index.cjs +21 -20
- package/dist/index.d.mts +15 -17
- package/dist/index.d.ts +15 -17
- package/dist/index.mjs +21 -20
- package/dist/{integration-api-BbaiokCC.d.ts → integration-api-0y4FXJpC.d.mts} +128 -1
- package/dist/{integration-api-BbaiokCC.d.mts → integration-api-BPJo5oXb.d.ts} +128 -1
- package/dist/integrations.d.mts +7 -9
- package/dist/integrations.d.ts +7 -9
- package/dist/internal/app-markdown-runtime.cjs +9 -3
- package/dist/internal/app-markdown-runtime.d.mts +8 -9
- package/dist/internal/app-markdown-runtime.d.ts +8 -9
- package/dist/internal/app-markdown-runtime.mjs +8 -2
- package/dist/internal/build-runtime.cjs +17 -16
- package/dist/internal/build-runtime.d.mts +9 -11
- package/dist/internal/build-runtime.d.ts +9 -11
- package/dist/internal/build-runtime.mjs +16 -15
- package/dist/internal/cli-runtime.cjs +8 -5
- package/dist/internal/cli-runtime.mjs +7 -4
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +7 -9
- package/dist/internal/compression-runtime.d.ts +7 -9
- package/dist/internal/config-runtime.cjs +7 -4
- package/dist/internal/config-runtime.d.mts +8 -10
- package/dist/internal/config-runtime.d.ts +8 -10
- package/dist/internal/config-runtime.mjs +6 -3
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +7 -5
- package/dist/internal/production-runtime.d.mts +12 -14
- package/dist/internal/production-runtime.d.ts +12 -14
- package/dist/internal/production-runtime.mjs +6 -4
- package/dist/markdown.cjs +8 -2
- package/dist/markdown.d.mts +35 -153
- package/dist/markdown.d.ts +35 -153
- package/dist/markdown.mjs +7 -1
- package/dist/{metadata-CzBP4Mfp.d.ts → metadata-7LKgQEWF.d.ts} +1 -1
- package/dist/{metadata-C3na4CBj.d.mts → metadata-B9mCxKgp.d.mts} +1 -1
- package/dist/middleware.d.mts +8 -10
- package/dist/middleware.d.ts +8 -10
- package/dist/navigation.d.mts +9 -11
- package/dist/navigation.d.ts +9 -11
- package/dist/{nitro-ZKLGOTVY.mjs → nitro-NAKCRVHX.mjs} +4 -3
- package/dist/{nitro-KQDU7CFE.cjs → nitro-VYDZGYFY.cjs} +4 -3
- package/dist/plugin.cjs +13 -12
- package/dist/plugin.d.mts +8 -10
- package/dist/plugin.d.ts +8 -10
- package/dist/plugin.mjs +12 -11
- package/dist/{production-runtime-CYg4wM4E.d.ts → production-runtime-B3xnY6fI.d.ts} +1 -1
- package/dist/{production-runtime-DP94hPGe.d.mts → production-runtime-DramhI0c.d.mts} +1 -1
- package/dist/{render-plan-Bl6Fzg5z.d.ts → render-plan-CpW32tOL.d.ts} +1 -1
- package/dist/{render-plan-CKAJg0jC.d.mts → render-plan-CtQB-zHS.d.mts} +1 -1
- package/dist/renderer-client.d.mts +5 -7
- package/dist/renderer-client.d.ts +5 -7
- package/dist/{request-CR-Bp1Px.d.ts → request-BVGGeQv4.d.ts} +1 -1
- package/dist/{request-CrBCcPZZ.d.mts → request-DlLVBKe3.d.mts} +1 -1
- package/dist/request.d.mts +8 -10
- package/dist/request.d.ts +8 -10
- package/dist/{route-rendering-CZH5FegB.d.ts → route-rendering-BdEldajn.d.ts} +1 -1
- package/dist/{route-rendering-C1NAHo-C.d.mts → route-rendering-DChYLNdh.d.mts} +1 -1
- package/dist/{router-Cg_kD3Bd.d.ts → router-D0Az-1Nu.d.ts} +1 -1
- package/dist/{router-B57eDJ3u.d.mts → router-D5htHn_M.d.mts} +1 -1
- package/dist/routes.d.mts +5 -7
- package/dist/routes.d.ts +5 -7
- package/dist/server-fn-client.d.mts +3 -4
- package/dist/server-fn-client.d.ts +3 -4
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-plugins.d.mts +7 -9
- package/dist/server-plugins.d.ts +7 -9
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server.cjs +198 -104
- package/dist/server.d.mts +12 -14
- package/dist/server.d.ts +12 -14
- package/dist/server.mjs +184 -90
- package/dist/{spa-router-DTdbuinx.d.mts → spa-router-DVfSJZ5o.d.mts} +2 -2
- package/dist/{spa-router-BstQUO6Q.d.ts → spa-router-DmwP_7QL.d.ts} +2 -2
- package/dist/testing.cjs +6 -5
- package/dist/testing.d.mts +6 -8
- package/dist/testing.d.ts +6 -8
- package/dist/testing.mjs +5 -4
- package/dist/{utils-CS3ZLnEJ.d.mts → utils-B_Rmr0-n.d.mts} +1 -1
- package/dist/{utils-D3rdsIvM.d.ts → utils-Dv0OuLtF.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +13 -12
- package/dist/vite.d.mts +7 -9
- package/dist/vite.d.ts +7 -9
- package/dist/vite.mjs +12 -11
- package/package.json +1 -1
- package/dist/route-B0XrsrFk.d.mts +0 -128
- package/dist/route-DOEpbyWZ.d.ts +0 -128
- package/dist/{chunk-GDUYXFIS.mjs → chunk-6EG7U4NF.mjs} +3 -3
- package/dist/{chunk-YAOX43YI.cjs → chunk-C7OUJ6JI.cjs} +2 -2
- package/dist/{chunk-IXTFU4PL.cjs → chunk-NL3ZSMZB.cjs} +2 -2
- package/dist/{chunk-L6V3P73N.mjs → chunk-UOXGA6TO.mjs} +4 -4
|
@@ -7,7 +7,7 @@ var _chunkMT763TDWcjs = require('./chunk-MT763TDW.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkNPFGGBM5cjs = require('./chunk-NPFGGBM5.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ var _chunkQLXEYIAWcjs = require('./chunk-QLXEYIAW.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkQI7WQSMIcjs = require('./chunk-QI7WQSMI.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -34,7 +34,7 @@ var _chunkIK6LVLKCcjs = require('./chunk-IK6LVLKC.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkKAERLFD3cjs = require('./chunk-KAERLFD3.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
var _chunkKCMTCM6Icjs = require('./chunk-KCMTCM6I.cjs');
|
|
@@ -70,7 +70,7 @@ var _chunk2SJ4RQ6Pcjs = require('./chunk-2SJ4RQ6P.cjs');
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
73
|
+
var _chunkUNSKL6BIcjs = require('./chunk-UNSKL6BI.cjs');
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
@@ -80,7 +80,7 @@ var _chunkDW34V5SMcjs = require('./chunk-DW34V5SM.cjs');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkWJKVTJJRcjs = require('./chunk-WJKVTJJR.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
var _chunkCXP5U3RWcjs = require('./chunk-CXP5U3RW.cjs');
|
|
@@ -112,7 +112,7 @@ var _chunkVPTDD5XFcjs = require('./chunk-VPTDD5XF.cjs');
|
|
|
112
112
|
var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
var
|
|
115
|
+
var _chunkDQMTHWPIcjs = require('./chunk-DQMTHWPI.cjs');
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
@@ -124,14 +124,14 @@ var _chunk6EXBPJ24cjs = require('./chunk-6EXBPJ24.cjs');
|
|
|
124
124
|
var _chunkVEKFLAQMcjs = require('./chunk-VEKFLAQM.cjs');
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
var
|
|
127
|
+
var _chunkHF5SIACKcjs = require('./chunk-HF5SIACK.cjs');
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
var
|
|
134
|
+
var _chunkZSO5GWGDcjs = require('./chunk-ZSO5GWGD.cjs');
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
@@ -145,7 +145,7 @@ var _chunkZ5HIWVDPcjs = require('./chunk-Z5HIWVDP.cjs');
|
|
|
145
145
|
var _chunkWM6HL7E7cjs = require('./chunk-WM6HL7E7.cjs');
|
|
146
146
|
|
|
147
147
|
|
|
148
|
-
var
|
|
148
|
+
var _chunkJQGDQO2Icjs = require('./chunk-JQGDQO2I.cjs');
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
var _chunkIQXFRNY2cjs = require('./chunk-IQXFRNY2.cjs');
|
|
@@ -279,7 +279,7 @@ function getDocsTitle(docs) {
|
|
|
279
279
|
}
|
|
280
280
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getDocsTitle, "getDocsTitle");
|
|
281
281
|
function loadPages(contentDir, docs) {
|
|
282
|
-
return
|
|
282
|
+
return _chunkQI7WQSMIcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkQI7WQSMIcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
|
|
283
283
|
}
|
|
284
284
|
_chunkS3JO3N4Hcjs.__name.call(void 0, loadPages, "loadPages");
|
|
285
285
|
function findSocialImagePath(html) {
|
|
@@ -300,14 +300,14 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
|
|
|
300
300
|
}
|
|
301
301
|
_chunkS3JO3N4Hcjs.__name.call(void 0, addHandlerRoute, "addHandlerRoute");
|
|
302
302
|
async function compileFarmDocsManifest(docs, options) {
|
|
303
|
-
const contentDir =
|
|
303
|
+
const contentDir = _chunkQI7WQSMIcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
|
|
304
304
|
const pages = loadPages(contentDir, docs);
|
|
305
305
|
const absolutePaths = [
|
|
306
306
|
_path2.default.resolve(options.root),
|
|
307
307
|
_path2.default.resolve(contentDir),
|
|
308
308
|
docs.configPath || ""
|
|
309
309
|
];
|
|
310
|
-
const handler =
|
|
310
|
+
const handler = _chunkQI7WQSMIcjs.createFarmDocsHandler.call(void 0, docs, {
|
|
311
311
|
root: options.root,
|
|
312
312
|
srcDir: options.srcDir,
|
|
313
313
|
clientEntry: options.clientEntry,
|
|
@@ -315,7 +315,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
315
315
|
fontStylesheetHref: options.fontStylesheetHref,
|
|
316
316
|
globalStylesheetHref: options.globalStylesheetHref
|
|
317
317
|
});
|
|
318
|
-
const apiHandler =
|
|
318
|
+
const apiHandler = _chunkNPFGGBM5cjs.createFarmDocsAPIHandler.call(void 0, {
|
|
319
319
|
rootDir: options.root,
|
|
320
320
|
srcDir: options.srcDir,
|
|
321
321
|
docs
|
|
@@ -407,7 +407,7 @@ async function compileFarmDocsManifest(docs, options) {
|
|
|
407
407
|
post: await compileResponse(postResponse, absolutePaths),
|
|
408
408
|
search: {
|
|
409
409
|
pages: pages.map((page) => ({
|
|
410
|
-
...
|
|
410
|
+
..._chunkQI7WQSMIcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
411
411
|
sourcePath: `farm-docs:${page.slug || "index"}`
|
|
412
412
|
})),
|
|
413
413
|
search: _nullishCoalesce(searchConfig, () => ( true)),
|
|
@@ -1487,7 +1487,7 @@ function hasFarmPluginRoutes(config) {
|
|
|
1487
1487
|
_chunkS3JO3N4Hcjs.__name.call(void 0, hasFarmPluginRoutes, "hasFarmPluginRoutes");
|
|
1488
1488
|
function farmServerRuntimePluginsMayHandlePath(config, pathname) {
|
|
1489
1489
|
return (config.plugins || []).some(
|
|
1490
|
-
(plugin) => _chunkZ5HIWVDPcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false &&
|
|
1490
|
+
(plugin) => _chunkZ5HIWVDPcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && _chunkUNSKL6BIcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
|
|
1491
1491
|
);
|
|
1492
1492
|
}
|
|
1493
1493
|
_chunkS3JO3N4Hcjs.__name.call(void 0, farmServerRuntimePluginsMayHandlePath, "farmServerRuntimePluginsMayHandlePath");
|
|
@@ -1549,7 +1549,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
1549
1549
|
assertFarmDocsRuntimeSupported(config, preset);
|
|
1550
1550
|
const srcDir = config.srcDir || "src";
|
|
1551
1551
|
const distDir = config.distDir || ".farm";
|
|
1552
|
-
const deployOutputDir =
|
|
1552
|
+
const deployOutputDir = _chunkKAERLFD3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
1553
1553
|
const lifecyclePluginManager = options.pluginManager;
|
|
1554
1554
|
const productionViteResultPromise = Promise.allSettled([
|
|
1555
1555
|
Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkA6WIQH5Zcjs.loadFarmProductionVite.call(void 0, ))))
|
|
@@ -1568,7 +1568,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
|
|
|
1568
1568
|
const routeRuntimeManifestResultPromise = Promise.allSettled([routeRuntimeManifestPromise]);
|
|
1569
1569
|
const pageRoutes = [];
|
|
1570
1570
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|
|
1571
|
-
const markdownSourcePath = entry.markdownSourcePath || (
|
|
1571
|
+
const markdownSourcePath = entry.markdownSourcePath || (_chunkHF5SIACKcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
|
|
1572
1572
|
pageRoutes.push({
|
|
1573
1573
|
pattern,
|
|
1574
1574
|
modulePath: entry.modulePath,
|
|
@@ -1797,7 +1797,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
|
|
|
1797
1797
|
}
|
|
1798
1798
|
const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
|
|
1799
1799
|
await fs.writeFile(fontCssPath, normalizedFontCss);
|
|
1800
|
-
await fs.writeFile(clientCssPath,
|
|
1800
|
+
await fs.writeFile(clientCssPath, _chunkUNSKL6BIcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
1801
1801
|
}
|
|
1802
1802
|
_chunkS3JO3N4Hcjs.__name.call(void 0, mergeBuiltFontCss, "mergeBuiltFontCss");
|
|
1803
1803
|
var _IncompleteClientBuildOutputError = class _IncompleteClientBuildOutputError extends Error {
|
|
@@ -1847,7 +1847,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
1847
1847
|
const key = `${_path2.default.resolve(root)}\0${mode}\0${options.asyncOwnerIslands === true}\0${_path2.default.resolve(modulePath)}`;
|
|
1848
1848
|
let plan = cache.get(key);
|
|
1849
1849
|
if (!plan) {
|
|
1850
|
-
plan =
|
|
1850
|
+
plan = _chunkUNSKL6BIcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
1851
1851
|
cache.set(key, plan);
|
|
1852
1852
|
}
|
|
1853
1853
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
@@ -1876,14 +1876,14 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
1876
1876
|
`[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
|
|
1877
1877
|
);
|
|
1878
1878
|
}
|
|
1879
|
-
const isolatedMode =
|
|
1879
|
+
const isolatedMode = _chunkUNSKL6BIcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
1880
1880
|
_optionalChain([config, 'access', _35 => _35.experimental, 'optionalAccess', _36 => _36.isolatedClientHydration]),
|
|
1881
1881
|
{
|
|
1882
1882
|
serverComponents: _optionalChain([config, 'access', _37 => _37.experimental, 'optionalAccess', _38 => _38.serverComponents]) === true,
|
|
1883
1883
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
1884
1884
|
}
|
|
1885
1885
|
);
|
|
1886
|
-
const planOptions =
|
|
1886
|
+
const planOptions = _chunkUNSKL6BIcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
1887
1887
|
config.renderer,
|
|
1888
1888
|
Boolean(unsupportedIntegrationProvider)
|
|
1889
1889
|
);
|
|
@@ -1940,7 +1940,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
1940
1940
|
), "isAdapterDocsRoute");
|
|
1941
1941
|
const syntheticDocsEntry = _optionalChain([config, 'access', _46 => _46.docs, 'optionalAccess', _47 => _47.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
|
|
1942
1942
|
const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
|
|
1943
|
-
const markdownPagePlan =
|
|
1943
|
+
const markdownPagePlan = _chunkUNSKL6BIcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
1944
1944
|
_chunkOHY2ZWUGcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, config.mdx), root),
|
|
1945
1945
|
root,
|
|
1946
1946
|
isolatedMode,
|
|
@@ -1948,7 +1948,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
1948
1948
|
);
|
|
1949
1949
|
const routePlans = pageRoutes.map((route) => ({
|
|
1950
1950
|
route,
|
|
1951
|
-
metadata:
|
|
1951
|
+
metadata: _chunkHF5SIACKcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
1952
1952
|
route.modulePath,
|
|
1953
1953
|
root,
|
|
1954
1954
|
isolatedMode,
|
|
@@ -1956,7 +1956,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
1956
1956
|
planOptions
|
|
1957
1957
|
)
|
|
1958
1958
|
}));
|
|
1959
|
-
|
|
1959
|
+
_chunkUNSKL6BIcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
1960
1960
|
clientLayouts.map((layout) => ({
|
|
1961
1961
|
pattern: layout.pattern,
|
|
1962
1962
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -1988,7 +1988,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
1988
1988
|
for (const layout of clientLayouts) {
|
|
1989
1989
|
const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, route.pattern)) || Boolean(adapterDocsEntry && layoutAppliesToRoute(layout.pattern, adapterDocsEntry));
|
|
1990
1990
|
if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
|
|
1991
|
-
_chunk5QIKR7RRcjs.logger.warn(`\u26A0\uFE0F ${
|
|
1991
|
+
_chunk5QIKR7RRcjs.logger.warn(`\u26A0\uFE0F ${_chunkUNSKL6BIcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`);
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
1994
|
if (isolatedMode === "analyze") {
|
|
@@ -2012,7 +2012,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2012
2012
|
);
|
|
2013
2013
|
if (metadata.suppressedAsyncHydration) {
|
|
2014
2014
|
_chunk5QIKR7RRcjs.logger.warn(
|
|
2015
|
-
`\u26A0\uFE0F ${
|
|
2015
|
+
`\u26A0\uFE0F ${_chunkUNSKL6BIcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
|
|
2016
2016
|
);
|
|
2017
2017
|
}
|
|
2018
2018
|
if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0) {
|
|
@@ -2071,7 +2071,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2071
2071
|
}
|
|
2072
2072
|
const clientRouteSlots = routeSlots.filter((slot) => {
|
|
2073
2073
|
try {
|
|
2074
|
-
return
|
|
2074
|
+
return _chunkUNSKL6BIcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root).shouldHydrate;
|
|
2075
2075
|
} catch (error) {
|
|
2076
2076
|
_chunk5QIKR7RRcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
|
|
2077
2077
|
return false;
|
|
@@ -2101,7 +2101,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2101
2101
|
config.trailingSlash,
|
|
2102
2102
|
_chunkZ5HIWVDPcjs.getIntegrationProviders.call(void 0, config.integrations),
|
|
2103
2103
|
config.basePath,
|
|
2104
|
-
|
|
2104
|
+
_chunkUNSKL6BIcjs.generateClientCachePersistenceCode.call(void 0, _chunkUNSKL6BIcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
|
|
2105
2105
|
adapterOwnsDocsRuntime ? _chunk75WGQVQAcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
|
|
2106
2106
|
);
|
|
2107
2107
|
await fs.writeFile(clientEntryPath, clientHydrationCode);
|
|
@@ -2118,7 +2118,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2118
2118
|
const postcssConfigPath = _path2.default.join(clientEntryDir, "postcss.config.cjs");
|
|
2119
2119
|
await fs.writeFile(postcssConfigPath, "module.exports = { plugins: [] };\n");
|
|
2120
2120
|
postcssSearchPath = clientEntryDir;
|
|
2121
|
-
tailwindVitePlugin = await
|
|
2121
|
+
tailwindVitePlugin = await _chunkUNSKL6BIcjs.loadTailwindVitePlugin.call(void 0, {
|
|
2122
2122
|
builder: productionVite.builder,
|
|
2123
2123
|
announce: true
|
|
2124
2124
|
});
|
|
@@ -2187,7 +2187,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2187
2187
|
}
|
|
2188
2188
|
},
|
|
2189
2189
|
plugins: [
|
|
2190
|
-
|
|
2190
|
+
_chunkUNSKL6BIcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
2191
2191
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
2192
2192
|
...rendererVitePlugins,
|
|
2193
2193
|
...config.vite.plugins || [],
|
|
@@ -2248,7 +2248,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2248
2248
|
} : void 0,
|
|
2249
2249
|
// Ensure React is bundled for client
|
|
2250
2250
|
resolve: {
|
|
2251
|
-
alias:
|
|
2251
|
+
alias: _chunkUNSKL6BIcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
2252
2252
|
dedupe: [...config.renderer.dedupe || []]
|
|
2253
2253
|
},
|
|
2254
2254
|
// Optimize dependencies - exclude server-side code from client bundle
|
|
@@ -2261,7 +2261,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2261
2261
|
]
|
|
2262
2262
|
}
|
|
2263
2263
|
};
|
|
2264
|
-
await viteBuild(
|
|
2264
|
+
await viteBuild(_chunkUNSKL6BIcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
|
|
2265
2265
|
await mergeBuiltFontCss(outputDir);
|
|
2266
2266
|
await validateClientBuildOutput(root, srcDir, outputDir);
|
|
2267
2267
|
} finally {
|
|
@@ -3020,7 +3020,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
3020
3020
|
direction: {}
|
|
3021
3021
|
}, plugins = [], renderer = _chunkPSV6XKPOcjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule) {
|
|
3022
3022
|
const toImportPath = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (targetPath) => targetPath.replace(/\\/g, "/"), "toImportPath");
|
|
3023
|
-
const clientPluginEntry =
|
|
3023
|
+
const clientPluginEntry = _chunkUNSKL6BIcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
3024
3024
|
plugins,
|
|
3025
3025
|
root,
|
|
3026
3026
|
srcDir,
|
|
@@ -3031,7 +3031,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
|
|
|
3031
3031
|
import { createRoot, hydrateRoot } from "react-dom/client";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
|
|
3032
3032
|
import __farmAppSetup from ${JSON.stringify(_chunk5QIKR7RRcjs.toPosixPath.call(void 0, appSetupPath))};
|
|
3033
3033
|
__farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
|
|
3034
|
-
const providerClientCode =
|
|
3034
|
+
const providerClientCode = _chunkUNSKL6BIcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
3035
3035
|
integrationProviders,
|
|
3036
3036
|
root,
|
|
3037
3037
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -3516,7 +3516,7 @@ function hasHydratableLayout(pathname) {
|
|
|
3516
3516
|
});
|
|
3517
3517
|
}
|
|
3518
3518
|
|
|
3519
|
-
${
|
|
3519
|
+
${_chunkUNSKL6BIcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
3520
3520
|
// Wrap a page element with applicable layouts
|
|
3521
3521
|
function wrapWithLayouts(pageElement, pathname, params) {
|
|
3522
3522
|
const layouts = getApplicableLayouts(pathname);
|
|
@@ -4431,7 +4431,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4431
4431
|
_path2.default.join(postcssConfigDir, "postcss.config.cjs"),
|
|
4432
4432
|
"module.exports = { plugins: [] };\n"
|
|
4433
4433
|
);
|
|
4434
|
-
tailwindVitePlugin = await
|
|
4434
|
+
tailwindVitePlugin = await _chunkUNSKL6BIcjs.loadTailwindVitePlugin.call(void 0, {
|
|
4435
4435
|
builder: productionVite.builder,
|
|
4436
4436
|
label: "for SSR"
|
|
4437
4437
|
});
|
|
@@ -4527,7 +4527,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4527
4527
|
}
|
|
4528
4528
|
const middlewareRoutes = await discoverMiddlewareRoutes(appDirs);
|
|
4529
4529
|
const instrumentationPath = _chunkKCMTCM6Icjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
|
|
4530
|
-
const notFoundPath =
|
|
4530
|
+
const notFoundPath = _chunkUNSKL6BIcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
|
|
4531
4531
|
if (notFoundPath) _chunk5QIKR7RRcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
|
|
4532
4532
|
layoutRoutes.sort((a, b) => {
|
|
4533
4533
|
const depthA = a.pattern.split("/").filter(Boolean).length;
|
|
@@ -4550,7 +4550,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4550
4550
|
const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
|
|
4551
4551
|
const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _56 => _56.mdx, 'optionalAccess', _57 => _57.components]));
|
|
4552
4552
|
const hasMiddlewareConfig = hasFarmMiddlewareConfig(config.middleware);
|
|
4553
|
-
const hasRouteContextConfig =
|
|
4553
|
+
const hasRouteContextConfig = _chunkKAERLFD3cjs.hasCustomFarmRouteContext.call(void 0, config);
|
|
4554
4554
|
const hasServerRuntimePlugins = hasFarmServerRuntimePlugins(config);
|
|
4555
4555
|
const hasPluginRoutes = hasFarmPluginRoutes(config);
|
|
4556
4556
|
const configModulePath = hasServerRuntimeIntegrations || hasObservabilityHandler || hasMdxComponentConfig || hasMiddlewareConfig || hasRouteContextConfig || hasServerRuntimePlugins || hasPluginRoutes || hasIntegrationProviders ? await findFarmConfigPath(root) : null;
|
|
@@ -4559,7 +4559,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4559
4559
|
const hasConfiguredRuntimePlugins = Boolean(
|
|
4560
4560
|
hasRuntimeConfigModule && (config.plugins || []).length > 0
|
|
4561
4561
|
);
|
|
4562
|
-
const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _58 => _58.docs, 'optionalAccess', _59 => _59.enabled]) && _chunkC5GUTBZKcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? _optionalChain([config, 'access', _60 => _60.docs, 'access', _61 => _61.adapter, 'optionalAccess', _62 => _62.server]) ? await
|
|
4562
|
+
const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _58 => _58.docs, 'optionalAccess', _59 => _59.enabled]) && _chunkC5GUTBZKcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? _optionalChain([config, 'access', _60 => _60.docs, 'access', _61 => _61.adapter, 'optionalAccess', _62 => _62.server]) ? await _chunkNPFGGBM5cjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
|
|
4563
4563
|
root,
|
|
4564
4564
|
srcDir: config.srcDir,
|
|
4565
4565
|
clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
|
|
@@ -4709,7 +4709,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4709
4709
|
__FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _68 => _68.env, 'optionalAccess', _69 => _69.public]) || {})
|
|
4710
4710
|
},
|
|
4711
4711
|
plugins: [
|
|
4712
|
-
|
|
4712
|
+
_chunkUNSKL6BIcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
4713
4713
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
4714
4714
|
...rendererVitePlugins,
|
|
4715
4715
|
...config.vite.plugins || [],
|
|
@@ -4769,7 +4769,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4769
4769
|
resolve: {
|
|
4770
4770
|
alias: [
|
|
4771
4771
|
...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
|
|
4772
|
-
...Object.entries(
|
|
4772
|
+
...Object.entries(_chunkUNSKL6BIcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
|
|
4773
4773
|
([find, replacement]) => ({ find, replacement })
|
|
4774
4774
|
)
|
|
4775
4775
|
],
|
|
@@ -4777,7 +4777,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
4777
4777
|
dedupe: [...config.renderer.dedupe || []]
|
|
4778
4778
|
}
|
|
4779
4779
|
};
|
|
4780
|
-
await viteBuild(
|
|
4780
|
+
await viteBuild(_chunkUNSKL6BIcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
4781
4781
|
} finally {
|
|
4782
4782
|
if (postcssConfigDir) {
|
|
4783
4783
|
try {
|
|
@@ -5154,7 +5154,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
|
|
|
5154
5154
|
`Integration provider components are not supported by the "${config.renderer.name}" renderer.`
|
|
5155
5155
|
);
|
|
5156
5156
|
}
|
|
5157
|
-
const providerServerModules =
|
|
5157
|
+
const providerServerModules = _chunkUNSKL6BIcjs.generateFarmIntegrationProviderServerModules.call(void 0,
|
|
5158
5158
|
renderedIntegrationProviders,
|
|
5159
5159
|
config.root,
|
|
5160
5160
|
_nullishCoalesce(config.renderer.componentExtensions, () => ( []))
|
|
@@ -5174,14 +5174,14 @@ function isolateFarmRouteServerPage(element) { return element; }`;
|
|
|
5174
5174
|
const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
|
|
5175
5175
|
(provider) => provider.supportsIsolatedHydration !== true
|
|
5176
5176
|
);
|
|
5177
|
-
const isolatedHydrationMode =
|
|
5177
|
+
const isolatedHydrationMode = _chunkUNSKL6BIcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
5178
5178
|
_optionalChain([config, 'access', _89 => _89.experimental, 'optionalAccess', _90 => _90.isolatedClientHydration]),
|
|
5179
5179
|
{
|
|
5180
5180
|
serverComponents: _optionalChain([config, 'access', _91 => _91.experimental, 'optionalAccess', _92 => _92.serverComponents]) === true,
|
|
5181
5181
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
5182
5182
|
}
|
|
5183
5183
|
);
|
|
5184
|
-
const hydrationPlanOptions =
|
|
5184
|
+
const hydrationPlanOptions = _chunkUNSKL6BIcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
5185
5185
|
config.renderer,
|
|
5186
5186
|
Boolean(unsupportedIntegrationProvider)
|
|
5187
5187
|
);
|
|
@@ -5196,7 +5196,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
|
|
|
5196
5196
|
hydrationPlanOptions
|
|
5197
5197
|
)
|
|
5198
5198
|
}));
|
|
5199
|
-
const markdownPagePlan =
|
|
5199
|
+
const markdownPagePlan = _chunkUNSKL6BIcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
5200
5200
|
_chunkOHY2ZWUGcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
|
|
5201
5201
|
config.root,
|
|
5202
5202
|
isolatedHydrationMode,
|
|
@@ -5205,7 +5205,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
|
|
|
5205
5205
|
const pageHydrationPlans = new Map(
|
|
5206
5206
|
pageRoutes.map((route) => [
|
|
5207
5207
|
route.modulePath,
|
|
5208
|
-
|
|
5208
|
+
_chunkHF5SIACKcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
|
|
5209
5209
|
route.modulePath,
|
|
5210
5210
|
config.root,
|
|
5211
5211
|
isolatedHydrationMode,
|
|
@@ -5214,7 +5214,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
|
|
|
5214
5214
|
)
|
|
5215
5215
|
])
|
|
5216
5216
|
);
|
|
5217
|
-
|
|
5217
|
+
_chunkUNSKL6BIcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
5218
5218
|
layoutHydrationPlans.map((layout) => ({
|
|
5219
5219
|
pattern: layout.pattern,
|
|
5220
5220
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -5255,7 +5255,7 @@ function isolateFarmRouteServerPage(element) { return element; }`;
|
|
|
5255
5255
|
}).map(({ route }) => route);
|
|
5256
5256
|
orderedPageRoutes.forEach((route, index) => {
|
|
5257
5257
|
const varName = `pageRoute${index}`;
|
|
5258
|
-
if (
|
|
5258
|
+
if (_chunkHF5SIACKcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
|
|
5259
5259
|
pageRegistrations.push(`
|
|
5260
5260
|
{
|
|
5261
5261
|
pattern: ${JSON.stringify(route.pattern)},
|
|
@@ -5697,7 +5697,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
|
|
|
5697
5697
|
|
|
5698
5698
|
function FarmDefault404Page() {
|
|
5699
5699
|
return React.createElement(React.Fragment, null,
|
|
5700
|
-
React.createElement("style", null, ${JSON.stringify(
|
|
5700
|
+
React.createElement("style", null, ${JSON.stringify(_chunkUNSKL6BIcjs.DEFAULT_NOT_FOUND_STYLES)}),
|
|
5701
5701
|
React.createElement("main", {
|
|
5702
5702
|
className: "farm-default-not-found",
|
|
5703
5703
|
"aria-labelledby": "farm-default-not-found-title",
|
|
@@ -5936,7 +5936,7 @@ const apiRoutes = ${apiRoutes.length > 0 ? "mergePluginAPIRoutes(" : ""}[${apiRe
|
|
|
5936
5936
|
]${apiRoutes.length > 0 ? `, configuredPlugins, ${JSON.stringify(apiRoutes.map(({ path: path7, methods }) => ({ path: path7, methods })))}, { bodySizeLimit: ${JSON.stringify(config.server.bodySizeLimit)} })` : ""};
|
|
5937
5937
|
const farmLocalAPIBasePath = ${JSON.stringify(_chunkWPYFSQKKcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
|
|
5938
5938
|
const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
|
|
5939
|
-
${_optionalChain([config, 'access', _122 => _122.agent, 'optionalAccess', _123 => _123.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(
|
|
5939
|
+
${_optionalChain([config, 'access', _122 => _122.agent, 'optionalAccess', _123 => _123.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkWJKVTJJRcjs.resolveFarmApiCatalogInput.call(void 0, config))};
|
|
5940
5940
|
` : ""}
|
|
5941
5941
|
function isFarmLocalAPIPathname(pathname) {
|
|
5942
5942
|
return farmLocalAPIBasePath !== "/" &&
|
|
@@ -6333,7 +6333,7 @@ function peelFarmDocumentPrefix(markup) {
|
|
|
6333
6333
|
let inner = markup.replace(/^\\s+/, "");
|
|
6334
6334
|
let hoisted = "";
|
|
6335
6335
|
const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents["'][^>]*>/i;
|
|
6336
|
-
const hoistable = /${
|
|
6336
|
+
const hoistable = /${_chunkUNSKL6BIcjs.HOISTED_HEAD_ELEMENT.source}/i;
|
|
6337
6337
|
let match;
|
|
6338
6338
|
while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
|
|
6339
6339
|
if (!/^<div/i.test(match[0])) hoisted += match[0];
|
|
@@ -7564,6 +7564,7 @@ async function handleFarmRequestInContext(
|
|
|
7564
7564
|
routeExists: (targetPathname) =>
|
|
7565
7565
|
Boolean(matchPageRoute(getFarmRoutePathname(targetPathname))),
|
|
7566
7566
|
renderPage: (targetRequest) => handleFarmRequest(targetRequest, adapterContext),
|
|
7567
|
+
apiServerBasePath: farmLocalAPIBasePath,
|
|
7567
7568
|
});
|
|
7568
7569
|
if (markdownResponse) {
|
|
7569
7570
|
return applyProductionMiddlewareHeaders(markdownResponse, middlewareHeaders);
|
|
@@ -7648,7 +7649,7 @@ async function handleFarmRequestInContext(
|
|
|
7648
7649
|
` : ""}
|
|
7649
7650
|
${_optionalChain([config, 'access', _138 => _138.agent, 'optionalAccess', _139 => _139.apiCatalog]) ? `
|
|
7650
7651
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
7651
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
7652
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkWJKVTJJRcjs.FARM_API_CATALOG_PATH)}) {
|
|
7652
7653
|
return applyProductionMiddlewareHeaders(
|
|
7653
7654
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
7654
7655
|
middlewareHeaders,
|
|
@@ -8964,7 +8965,7 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
8964
8965
|
}
|
|
8965
8966
|
if (appMiddlewareMayHandlePath(middlewareRoutes, pathname)) return "app middleware";
|
|
8966
8967
|
if (configMiddlewareMayHandlePath(config.middleware, pathname)) return "configured middleware";
|
|
8967
|
-
if (
|
|
8968
|
+
if (_chunkKAERLFD3cjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
|
|
8968
8969
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
8969
8970
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
8970
8971
|
if (_optionalChain([manifestEntry, 'optionalAccess', _159 => _159.rendering]) === "dynamic") return "dynamic runtime manifest";
|
|
@@ -8990,7 +8991,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
8990
8991
|
const nitroBuilder = nitroBuilderResult.value;
|
|
8991
8992
|
const isVercel = preset === "vercel" || preset === "vercel-edge";
|
|
8992
8993
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
8993
|
-
const outputDir =
|
|
8994
|
+
const outputDir = _chunkKAERLFD3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
8994
8995
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
8995
8996
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
8996
8997
|
const imageRuntime = resolveImageRuntime(config, preset);
|
|
@@ -9242,7 +9243,12 @@ export default async function farmNitroEventHandler(event) {
|
|
|
9242
9243
|
preset,
|
|
9243
9244
|
...farmNodeServerEntryPath ? { entry: farmNodeServerEntryPath } : {},
|
|
9244
9245
|
rootDir: root,
|
|
9245
|
-
|
|
9246
|
+
// Farm registers every handler, task, and plugin explicitly. Scanning the
|
|
9247
|
+
// project root would bundle an app's own `middleware/`, `api/`, `routes/`,
|
|
9248
|
+
// `plugins/`, or `tasks/` folder, or a root `server.ts` (common without a
|
|
9249
|
+
// `src` directory), as Nitro handlers outside Farm's aliases.
|
|
9250
|
+
serverDir: false,
|
|
9251
|
+
serverEntry: false,
|
|
9246
9252
|
buildDir: _path2.default.join(root, distDir, ".nitro"),
|
|
9247
9253
|
alias: resolveNitroInternalRuntimeAliases(root),
|
|
9248
9254
|
compatibilityDate: "2024-12-01",
|
|
@@ -9348,7 +9354,7 @@ export default async function farmNitroEventHandler(event) {
|
|
|
9348
9354
|
if (_optionalChain([config, 'access', _179 => _179.md, 'optionalAccess', _180 => _180.enabled])) {
|
|
9349
9355
|
nitroInstance.hooks.hook("prerender:generate", (route) => {
|
|
9350
9356
|
if (!route.contents || !_optionalChain([route, 'access', _181 => _181.contentType, 'optionalAccess', _182 => _182.toLowerCase, 'call', _183 => _183(), 'access', _184 => _184.includes, 'call', _185 => _185("html")])) return;
|
|
9351
|
-
const alternatePath =
|
|
9357
|
+
const alternatePath = _chunkZSO5GWGDcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route);
|
|
9352
9358
|
if (!alternatePath) return;
|
|
9353
9359
|
const routeRule = nitroInstance.options.routeRules[route.route] || {};
|
|
9354
9360
|
const alternate = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
|
|
@@ -9369,7 +9375,7 @@ export default async function farmNitroEventHandler(event) {
|
|
|
9369
9375
|
if (config.security.csp && config.security.csp.nonce) {
|
|
9370
9376
|
nitroInstance.hooks.hook("prerender:generate", async (route) => {
|
|
9371
9377
|
if (!route.contents || !_optionalChain([route, 'access', _186 => _186.contentType, 'optionalAccess', _187 => _187.toLowerCase, 'call', _188 => _188(), 'access', _189 => _189.includes, 'call', _190 => _190("html")])) return;
|
|
9372
|
-
const staticCsp = await
|
|
9378
|
+
const staticCsp = await _chunkDQMTHWPIcjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
|
|
9373
9379
|
if (!staticCsp) return;
|
|
9374
9380
|
route.contents = staticCsp.html;
|
|
9375
9381
|
const routeRule = nitroInstance.options.routeRules[route.route] || {};
|
|
@@ -9636,7 +9642,7 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs) {
|
|
|
9636
9642
|
const docsContentDir = resolveBuildDocsContentDir(config, root);
|
|
9637
9643
|
if (!docsContentDir) return;
|
|
9638
9644
|
const bundledContentDir = _path2.default.join(nitroFuncDir, "farm-docs-content");
|
|
9639
|
-
const lastModifiedManifest =
|
|
9645
|
+
const lastModifiedManifest = _chunkQI7WQSMIcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
|
|
9640
9646
|
fallback: "now"
|
|
9641
9647
|
});
|
|
9642
9648
|
await fs.rm(bundledContentDir, { recursive: true, force: true });
|
|
@@ -9646,7 +9652,7 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs) {
|
|
|
9646
9652
|
force: true
|
|
9647
9653
|
});
|
|
9648
9654
|
await fs.writeFile(
|
|
9649
|
-
_path2.default.join(bundledContentDir,
|
|
9655
|
+
_path2.default.join(bundledContentDir, _chunkQI7WQSMIcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
|
|
9650
9656
|
`${JSON.stringify(lastModifiedManifest, null, 2)}
|
|
9651
9657
|
`
|
|
9652
9658
|
);
|
|
@@ -9723,7 +9729,7 @@ async function stageSharpRuntime(config, root, distDir, fs, preset) {
|
|
|
9723
9729
|
try {
|
|
9724
9730
|
await copyPackage("sharp", sharpRequire);
|
|
9725
9731
|
if (!copiedPackages.has("sharp")) {
|
|
9726
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
9732
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunkUNSKL6BIcjs.SHARP_INSTALL_HINT}`);
|
|
9727
9733
|
}
|
|
9728
9734
|
} catch (error) {
|
|
9729
9735
|
await fs.rm(stageDir, { recursive: true, force: true });
|
|
@@ -9937,7 +9943,7 @@ function createBuildTargetBaseline(config) {
|
|
|
9937
9943
|
preset,
|
|
9938
9944
|
distDir,
|
|
9939
9945
|
outputDir,
|
|
9940
|
-
outputWasDerived: outputDir ===
|
|
9946
|
+
outputWasDerived: outputDir === _chunkKAERLFD3cjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
9941
9947
|
};
|
|
9942
9948
|
}
|
|
9943
9949
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createBuildTargetBaseline, "createBuildTargetBaseline");
|
|
@@ -9947,8 +9953,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
9947
9953
|
const distDir = config.distDir || ".farm";
|
|
9948
9954
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
9949
9955
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
9950
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
9951
|
-
const outputDir = shouldRefreshDerivedOutput ?
|
|
9956
|
+
const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkKAERLFD3cjs.getDeployTargetForPreset.call(void 0, preset);
|
|
9957
|
+
const outputDir = shouldRefreshDerivedOutput ? _chunkKAERLFD3cjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
|
|
9952
9958
|
return {
|
|
9953
9959
|
root,
|
|
9954
9960
|
preset,
|
|
@@ -9956,7 +9962,7 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
9956
9962
|
distDir,
|
|
9957
9963
|
deployTarget,
|
|
9958
9964
|
outputDir,
|
|
9959
|
-
deployOutputDir:
|
|
9965
|
+
deployOutputDir: _chunkKAERLFD3cjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
9960
9966
|
};
|
|
9961
9967
|
}
|
|
9962
9968
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveBuildTargets, "resolveBuildTargets");
|
|
@@ -9965,7 +9971,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
9965
9971
|
const targetBaseline = createBuildTargetBaseline(config);
|
|
9966
9972
|
let targets;
|
|
9967
9973
|
const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkA6WIQH5Zcjs.loadFarmProductionVite.call(void 0, ))))]);
|
|
9968
|
-
const pluginManager = new (0,
|
|
9974
|
+
const pluginManager = new (0, _chunkUNSKL6BIcjs.PluginManager)({
|
|
9969
9975
|
config,
|
|
9970
9976
|
isDev: false,
|
|
9971
9977
|
isProd: true
|
|
@@ -9994,7 +10000,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
9994
10000
|
};
|
|
9995
10001
|
config = {
|
|
9996
10002
|
...config,
|
|
9997
|
-
images:
|
|
10003
|
+
images: _chunkUNSKL6BIcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
9998
10004
|
root: targets.root,
|
|
9999
10005
|
preset: targets.preset
|
|
10000
10006
|
})
|
|
@@ -10022,7 +10028,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
10022
10028
|
root,
|
|
10023
10029
|
rendererBuild.signal
|
|
10024
10030
|
);
|
|
10025
|
-
const farmApp =
|
|
10031
|
+
const farmApp = _chunkUNSKL6BIcjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
10026
10032
|
await farmApp.initialize();
|
|
10027
10033
|
const routeManager = farmApp.getRouteManager();
|
|
10028
10034
|
const serverRenderer = farmApp.getServerRenderer();
|
|
@@ -10033,7 +10039,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
10033
10039
|
plugins: config.plugins,
|
|
10034
10040
|
extraRoutes: [
|
|
10035
10041
|
..._optionalChain([config, 'access', _197 => _197.openapi, 'optionalAccess', _198 => _198.enabled]) && config.openapi.route ? [config.openapi.route] : [],
|
|
10036
|
-
...
|
|
10042
|
+
..._chunkQI7WQSMIcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
|
|
10037
10043
|
],
|
|
10038
10044
|
suppressLintOnLink: config.suppressLintOnLink,
|
|
10039
10045
|
componentExtensions: config.renderer.componentExtensions,
|
|
@@ -10042,7 +10048,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
10042
10048
|
const message = error instanceof Error ? error.message : String(error);
|
|
10043
10049
|
_chunk5QIKR7RRcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
|
|
10044
10050
|
});
|
|
10045
|
-
const apiRouteManager = new (0,
|
|
10051
|
+
const apiRouteManager = new (0, _chunkJQGDQO2Icjs.APIRouteManager)(
|
|
10046
10052
|
_chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, config),
|
|
10047
10053
|
projectModuleServer,
|
|
10048
10054
|
{
|
|
@@ -10129,7 +10135,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
10129
10135
|
ssr: true,
|
|
10130
10136
|
buildLifetime
|
|
10131
10137
|
});
|
|
10132
|
-
const viteConfig =
|
|
10138
|
+
const viteConfig = _chunkUNSKL6BIcjs.mergeFarmViteConfig.call(void 0,
|
|
10133
10139
|
{
|
|
10134
10140
|
root,
|
|
10135
10141
|
appType: "custom",
|
|
@@ -10141,7 +10147,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
10141
10147
|
},
|
|
10142
10148
|
plugins: [
|
|
10143
10149
|
...rendererVitePlugins,
|
|
10144
|
-
|
|
10150
|
+
_chunkUNSKL6BIcjs.farmFontImportsPlugin.call(void 0, {
|
|
10145
10151
|
root,
|
|
10146
10152
|
basePath: config.basePath,
|
|
10147
10153
|
publicDir: config.publicDir
|
|
@@ -10153,7 +10159,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
10153
10159
|
hmr: false
|
|
10154
10160
|
},
|
|
10155
10161
|
resolve: {
|
|
10156
|
-
alias:
|
|
10162
|
+
alias: _chunkUNSKL6BIcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
10157
10163
|
dedupe: [...config.renderer.dedupe || []]
|
|
10158
10164
|
},
|
|
10159
10165
|
optimizeDeps: {
|
|
@@ -10261,7 +10267,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
|
|
|
10261
10267
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveLegacyPageEntry, "resolveLegacyPageEntry");
|
|
10262
10268
|
async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
|
|
10263
10269
|
const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
|
|
10264
|
-
import("./nitro-
|
|
10270
|
+
import("./nitro-VYDZGYFY.cjs"),
|
|
10265
10271
|
import("nitro/builder")
|
|
10266
10272
|
]);
|
|
10267
10273
|
let nitroConfig = await createNitroConfig(
|
|
@@ -10274,7 +10280,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
10274
10280
|
if (pluginManager) {
|
|
10275
10281
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
10276
10282
|
}
|
|
10277
|
-
const outputDir =
|
|
10283
|
+
const outputDir = _chunkKAERLFD3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
10278
10284
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
10279
10285
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
10280
10286
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -10345,7 +10351,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
10345
10351
|
root,
|
|
10346
10352
|
preset,
|
|
10347
10353
|
distDir,
|
|
10348
|
-
outputDir:
|
|
10354
|
+
outputDir: _chunkKAERLFD3cjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
|
|
10349
10355
|
});
|
|
10350
10356
|
}
|
|
10351
10357
|
}
|