@farm.js/core 0.1.65 → 0.1.66
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/{analyzer-PE33SK5W.mjs → analyzer-4UFP4HVP.mjs} +3 -3
- package/dist/analyzer-H7SIX6BJ.cjs +16 -0
- package/dist/{chunk-IP2KHSGF.mjs → chunk-27FPUFWR.mjs} +56 -3
- package/dist/{chunk-JCEFKP5M.mjs → chunk-423SSBYQ.mjs} +6 -0
- package/dist/{chunk-E2TSYUHV.mjs → chunk-435QJNC2.mjs} +2 -2
- package/dist/{chunk-YD4J37RN.cjs → chunk-4OSOLDPL.cjs} +30 -19
- package/dist/{chunk-OSFIUSYK.cjs → chunk-4TVPYN32.cjs} +3 -3
- package/dist/{chunk-ZAUOOGER.mjs → chunk-672ISQIG.mjs} +1 -1
- package/dist/{chunk-C7DCMGC4.cjs → chunk-752IHQTD.cjs} +4 -4
- package/dist/{chunk-7QVRWGBL.cjs → chunk-7ONGIFYX.cjs} +4 -4
- package/dist/{chunk-VHHLKIDZ.mjs → chunk-AZUUKA66.mjs} +7 -7
- package/dist/{chunk-A3G5IY2W.cjs → chunk-BIF5MLTH.cjs} +1 -1
- package/dist/{chunk-HKNYNSOK.mjs → chunk-BYRZ5VTH.mjs} +1 -1
- package/dist/{chunk-V727H3RI.cjs → chunk-CCAUIBIS.cjs} +6 -0
- package/dist/{chunk-32RPJAAS.cjs → chunk-DVKH2RVN.cjs} +2 -2
- package/dist/{chunk-3KJPIO5D.cjs → chunk-E4UDLFWR.cjs} +24 -24
- package/dist/{chunk-EFZGB7JC.cjs → chunk-E5UN4OWX.cjs} +1 -0
- package/dist/{chunk-7GYCZRTH.mjs → chunk-EMNKZGF4.mjs} +4 -4
- package/dist/{chunk-ZQQK4U66.cjs → chunk-HZPKJRYA.cjs} +70 -17
- package/dist/{chunk-TZOGZKI7.cjs → chunk-IT6WRNGB.cjs} +77 -77
- package/dist/{chunk-72JSHQQQ.mjs → chunk-MPIGW42F.mjs} +1 -1
- package/dist/{chunk-WNXVWXG3.cjs → chunk-MPJEIHW2.cjs} +2 -2
- package/dist/{chunk-53ZCZ46B.cjs → chunk-NHQM2Q4I.cjs} +2 -1
- package/dist/{chunk-UYRI6U3P.mjs → chunk-O75GQVUK.mjs} +2 -1
- package/dist/{chunk-6X5NKNBE.mjs → chunk-OB7VKCUZ.mjs} +11 -10
- package/dist/{chunk-T4M52BA5.cjs → chunk-OP7LHY4Y.cjs} +103 -102
- package/dist/{chunk-CZF4XIRZ.cjs → chunk-RY4ABNPE.cjs} +3 -3
- package/dist/{chunk-GRBJ7VKH.mjs → chunk-SK7QSNWE.mjs} +1 -1
- package/dist/{chunk-YUW7F6SK.mjs → chunk-TKK5QHKZ.mjs} +1 -1
- package/dist/{chunk-ZNXTU4YH.mjs → chunk-TM2E623I.mjs} +1 -0
- package/dist/{chunk-ZX2JHEWW.mjs → chunk-UBMHQVWN.mjs} +20 -9
- package/dist/{chunk-TRIDJQ6A.cjs → chunk-VBCQ5WOI.cjs} +2 -2
- package/dist/{chunk-QHRCR44V.mjs → chunk-WFWFECDW.mjs} +1 -1
- package/dist/{chunk-Q75QPLBA.mjs → chunk-WVYRLP5E.mjs} +1 -1
- package/dist/{devtools-SGYOG36E.cjs → devtools-N2JQCMXB.cjs} +2 -2
- package/dist/{devtools-PUVZB3F2.mjs → devtools-NZUVNUP3.mjs} +1 -1
- package/dist/docs.cjs +3 -3
- package/dist/docs.mjs +2 -2
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/index.cjs +14 -14
- package/dist/index.mjs +13 -13
- package/dist/internal/build-runtime.cjs +15 -15
- package/dist/internal/build-runtime.mjs +14 -14
- package/dist/internal/cli-runtime.cjs +2 -2
- package/dist/internal/cli-runtime.mjs +1 -1
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/config-runtime.cjs +3 -3
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +7 -7
- package/dist/internal/production-runtime.d.mts +7 -0
- package/dist/internal/production-runtime.d.ts +7 -0
- package/dist/internal/production-runtime.mjs +6 -6
- package/dist/{native-tree-HE2FLS72.cjs → native-tree-7LPH57Z4.cjs} +3 -3
- package/dist/{native-tree-YF2DSPKM.mjs → native-tree-VV6WN3GX.mjs} +2 -2
- package/dist/plugin.cjs +7 -7
- package/dist/plugin.mjs +6 -6
- package/dist/{port-UFUZL6RI.mjs → port-CLL4BC4O.mjs} +1 -1
- package/dist/{port-VTLHPZOI.cjs → port-HASZTQGY.cjs} +9 -9
- package/dist/{rsc-pipeline-T3PWURLJ.mjs → rsc-pipeline-7PNVJSTR.mjs} +2 -2
- package/dist/{rsc-pipeline-V4ANLRAA.cjs → rsc-pipeline-Z7QBZOIJ.cjs} +3 -3
- package/dist/{runtime-5AROV2C3.cjs → runtime-FKFCUHSK.cjs} +13 -13
- package/dist/{runtime-LRIQ3XH7.mjs → runtime-QQHX4BP3.mjs} +5 -5
- package/dist/server.cjs +25 -25
- package/dist/server.mjs +9 -9
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +7 -7
- package/dist/vite.mjs +6 -6
- package/package.json +1 -1
- package/dist/analyzer-GHWK46LX.cjs +0 -16
- /package/dist/{chunk-IMK32ERL.cjs → chunk-CHYTADNK.cjs} +0 -0
- /package/dist/{chunk-2L54YV25.mjs → chunk-XBSLKXBL.mjs} +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkE5UN4OWXcjs = require('./chunk-E5UN4OWX.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkMF3IA2AWcjs = require('./chunk-MF3IA2AW.cjs');
|
|
@@ -31,14 +31,14 @@ var _chunk4BS3HSY7cjs = require('./chunk-4BS3HSY7.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkRY4ABNPEcjs = require('./chunk-RY4ABNPE.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunkDVKH2RVNcjs = require('./chunk-DVKH2RVN.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
@@ -58,7 +58,7 @@ var _chunkWMTBBQHYcjs = require('./chunk-WMTBBQHY.cjs');
|
|
|
58
58
|
var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
var
|
|
61
|
+
var _chunk4TVPYN32cjs = require('./chunk-4TVPYN32.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 _chunkCHYTADNKcjs = require('./chunk-CHYTADNK.cjs');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
var _chunkBRWIVOV4cjs = require('./chunk-BRWIVOV4.cjs');
|
|
@@ -100,7 +100,7 @@ var _chunkOCS3PSYRcjs = require('./chunk-OCS3PSYR.cjs');
|
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
var
|
|
103
|
+
var _chunkE4UDLFWRcjs = require('./chunk-E4UDLFWR.cjs');
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
|
|
@@ -138,7 +138,7 @@ var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
|
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
var
|
|
141
|
+
var _chunk752IHQTDcjs = require('./chunk-752IHQTD.cjs');
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
@@ -146,7 +146,7 @@ var _chunkC7DCMGC4cjs = require('./chunk-C7DCMGC4.cjs');
|
|
|
146
146
|
var _chunkY5TOT5F6cjs = require('./chunk-Y5TOT5F6.cjs');
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
var
|
|
149
|
+
var _chunkMPJEIHW2cjs = require('./chunk-MPJEIHW2.cjs');
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
@@ -163,7 +163,7 @@ var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
var
|
|
166
|
+
var _chunk7ONGIFYXcjs = require('./chunk-7ONGIFYX.cjs');
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
|
|
@@ -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 _chunkBIF5MLTHcjs = require('./chunk-BIF5MLTH.cjs');
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
var _chunkE552H232cjs = require('./chunk-E552H232.cjs');
|
|
@@ -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 = _chunkDVKH2RVNcjs.createFarmDocsAPIHandler.call(void 0, {
|
|
420
420
|
rootDir: options.root,
|
|
421
421
|
srcDir: options.srcDir,
|
|
422
422
|
docs,
|
|
@@ -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 = _chunkCHYTADNKcjs.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, ))))
|
|
@@ -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, _chunkE4UDLFWRcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
2152
2152
|
}
|
|
2153
2153
|
var IncompleteClientBuildOutputError = class extends Error {
|
|
2154
2154
|
constructor(detail) {
|
|
@@ -2194,13 +2194,13 @@ 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 = _chunk7ONGIFYXcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
2198
2198
|
cache.set(key, plan);
|
|
2199
2199
|
}
|
|
2200
2200
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
2201
2201
|
}
|
|
2202
2202
|
async function buildClient(productionVite, config, root, srcDir, outputDir, pageRoutes, layoutRoutes = [], routeSlots = [], isolatedClientBoundaryModules = /* @__PURE__ */ new Set(), hydrationPlanCache = /* @__PURE__ */ new Map(), rendererBuildLifetime, programmaticClientRoutes, mobile = false) {
|
|
2203
|
-
if (!mobile) await
|
|
2203
|
+
if (!mobile) await _chunkE5UN4OWXcjs.removeFarmMobileClientManifest.call(void 0, _path2.default.dirname(outputDir));
|
|
2204
2204
|
const viteBuild = productionVite.build;
|
|
2205
2205
|
const { farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
|
|
2206
2206
|
const { PluginManager: PluginManager2 } = await import("./plugin-HZIBL3DW.cjs");
|
|
@@ -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 = _chunk7ONGIFYXcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
2227
2227
|
_optionalChain([config, 'access', _61 => _61.experimental, 'optionalAccess', _62 => _62.isolatedClientHydration]),
|
|
2228
2228
|
{
|
|
2229
2229
|
serverComponents: _chunkZIHWAN55cjs.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 = _chunk7ONGIFYXcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
2234
2234
|
config.renderer,
|
|
2235
2235
|
Boolean(unsupportedIntegrationProvider)
|
|
2236
2236
|
);
|
|
@@ -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 = _chunk7ONGIFYXcjs.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,
|
|
@@ -2318,7 +2318,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2318
2318
|
pagePlanOptions
|
|
2319
2319
|
)
|
|
2320
2320
|
}));
|
|
2321
|
-
|
|
2321
|
+
_chunk7ONGIFYXcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
2322
2322
|
clientLayouts.map((layout) => ({
|
|
2323
2323
|
pattern: layout.pattern,
|
|
2324
2324
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -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 ${_chunk7ONGIFYXcjs.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 ${_chunk7ONGIFYXcjs.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 = _chunkE4UDLFWRcjs.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
|
+
..._chunk7ONGIFYXcjs.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 _chunk7ONGIFYXcjs.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;
|
|
@@ -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
|
+
_chunkE4UDLFWRcjs.generateClientCachePersistenceCode.call(void 0, _chunkE4UDLFWRcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
|
|
2469
2469
|
adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
|
|
2470
2470
|
_chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _83 => _83.experimental, 'optionalAccess', _84 => _84.serverComponents])) === "islands",
|
|
2471
2471
|
platform,
|
|
2472
|
-
islandsMode ?
|
|
2472
|
+
islandsMode ? _chunk7ONGIFYXcjs.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)
|
|
@@ -2477,10 +2477,10 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2477
2477
|
root
|
|
2478
2478
|
) : []
|
|
2479
2479
|
);
|
|
2480
|
-
const entryName = platform === "mobile" ?
|
|
2480
|
+
const entryName = platform === "mobile" ? _chunkE5UN4OWXcjs.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" && _chunkE4UDLFWRcjs.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
|
+
_chunkE4UDLFWRcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
2556
2556
|
createFarmPrivateClientSourcemapsPlugin({
|
|
2557
2557
|
outDir: _path2.default.join(
|
|
2558
2558
|
_path2.default.dirname(outputDir),
|
|
@@ -2560,7 +2560,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2560
2560
|
)
|
|
2561
2561
|
}),
|
|
2562
2562
|
// The web client's preload manifests; the mobile client records its files instead.
|
|
2563
|
-
platform === "mobile" ?
|
|
2563
|
+
platform === "mobile" ? _chunkE5UN4OWXcjs.createFarmMobileClientManifestPlugin.call(void 0, {
|
|
2564
2564
|
buildDir: _path2.default.dirname(outputDir),
|
|
2565
2565
|
entryName
|
|
2566
2566
|
}) : createFarmClientModulePreloadPlugin({
|
|
@@ -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
|
+
_chunkE4UDLFWRcjs.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
|
|
@@ -2638,7 +2638,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2638
2638
|
{ ...config, isolatedClientBoundaryModules, programmaticClientRoutes },
|
|
2639
2639
|
pluginManager
|
|
2640
2640
|
),
|
|
2641
|
-
|
|
2641
|
+
_chunk7ONGIFYXcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
2642
2642
|
],
|
|
2643
2643
|
mode: "production",
|
|
2644
2644
|
css: postcssSearchPath ? {
|
|
@@ -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: _chunkE4UDLFWRcjs.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,12 +2659,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2659
2659
|
]
|
|
2660
2660
|
}
|
|
2661
2661
|
};
|
|
2662
|
-
await viteBuild(
|
|
2662
|
+
await viteBuild(_chunkE4UDLFWRcjs.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
|
-
if (!await
|
|
2665
|
+
if (!await _chunkE5UN4OWXcjs.hasFarmMobileClientEntry.call(void 0, _path2.default.dirname(outputDir), outputDir)) {
|
|
2666
2666
|
throw new IncompleteClientBuildOutputError(
|
|
2667
|
-
`${
|
|
2667
|
+
`${_chunkE5UN4OWXcjs.FARM_MOBILE_CLIENT_ENTRY_NAME}.js is missing or empty`
|
|
2668
2668
|
);
|
|
2669
2669
|
}
|
|
2670
2670
|
} else {
|
|
@@ -2758,7 +2758,7 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
2758
2758
|
return response;
|
|
2759
2759
|
}
|
|
2760
2760
|
|
|
2761
|
-
${streamNavigations ?
|
|
2761
|
+
${streamNavigations ? _chunkE4UDLFWRcjs.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 = _chunkE4UDLFWRcjs.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 = _chunkE4UDLFWRcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
3532
3532
|
integrationProviders,
|
|
3533
3533
|
root,
|
|
3534
3534
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -4085,7 +4085,7 @@ function hasHydratableLayout(pathname) {
|
|
|
4085
4085
|
});
|
|
4086
4086
|
}
|
|
4087
4087
|
|
|
4088
|
-
${
|
|
4088
|
+
${_chunkE4UDLFWRcjs.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 ? `${_chunkE4UDLFWRcjs.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 = _chunkE4UDLFWRcjs.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;
|
|
@@ -5373,7 +5373,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
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
5375
|
const hasMiddlewareConfig = _chunkUJ3R2AH2cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
|
|
5376
|
-
const hasRouteContextConfig =
|
|
5376
|
+
const hasRouteContextConfig = _chunkCHYTADNKcjs.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 (_chunkDVKH2RVNcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
5387
5387
|
const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
|
|
5388
|
-
|
|
5388
|
+
_chunkDVKH2RVNcjs.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 _chunkDVKH2RVNcjs.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
|
+
_chunkE4UDLFWRcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
5561
5561
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
5562
5562
|
...rendererVitePlugins,
|
|
5563
5563
|
...config.vite.plugins || [],
|
|
@@ -5571,7 +5571,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
5571
5571
|
{ ...createReactProductionModePlugin(), enforce: "pre" },
|
|
5572
5572
|
farmServerOnlyEntriesPlugin(),
|
|
5573
5573
|
farmPlugin({ ...config, isolatedClientBoundaryModules }, pluginManager),
|
|
5574
|
-
|
|
5574
|
+
_chunk7ONGIFYXcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
5575
5575
|
...hasRuntimeConfigModule ? [
|
|
5576
5576
|
farmStripPlatformConfigPlugin(
|
|
5577
5577
|
[
|
|
@@ -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(_chunkE4UDLFWRcjs.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(_chunkE4UDLFWRcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
5630
5630
|
} finally {
|
|
5631
5631
|
if (postcssConfigDir) {
|
|
5632
5632
|
try {
|
|
@@ -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 = _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _121 => _121.experimental, 'optionalAccess', _122 => _122.serverComponents])) === "islands";
|
|
6053
|
-
const farmClientBoot =
|
|
6053
|
+
const farmClientBoot = _chunkE4UDLFWRcjs.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";
|
|
@@ -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 = _chunkE4UDLFWRcjs.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 = _chunk7ONGIFYXcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
6152
6152
|
_optionalChain([config, 'access', _147 => _147.experimental, 'optionalAccess', _148 => _148.isolatedClientHydration]),
|
|
6153
6153
|
{
|
|
6154
6154
|
serverComponents: _chunkZIHWAN55cjs.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 = _chunk7ONGIFYXcjs.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 = _chunk7ONGIFYXcjs.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,
|
|
@@ -6191,7 +6191,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
|
|
|
6191
6191
|
)
|
|
6192
6192
|
])
|
|
6193
6193
|
);
|
|
6194
|
-
|
|
6194
|
+
_chunk7ONGIFYXcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
6195
6195
|
layoutHydrationPlans.map((layout) => ({
|
|
6196
6196
|
pattern: layout.pattern,
|
|
6197
6197
|
depth: layout.pattern.split("/").filter(Boolean).length,
|
|
@@ -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)},${_chunk7ONGIFYXcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
|
|
6270
|
+
const rootStrategy = _chunkE4UDLFWRcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
6271
6271
|
route,
|
|
6272
6272
|
clientMetadata,
|
|
6273
6273
|
layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
|
|
@@ -6516,7 +6516,7 @@ import { _applyFarmMobileShellClient } from "@farm.js/core/internal/production-r
|
|
|
6516
6516
|
// The mobile client documents load when a mobile shell asks for them (RFC 0004, 7.2), filled in
|
|
6517
6517
|
// once the client build has finished (see buildNitroUniversal). A shell's document stays out of
|
|
6518
6518
|
// shared caches, which the adapter learns as it does for a guarded response.
|
|
6519
|
-
const farmMobileShellClient = JSON.parse("${
|
|
6519
|
+
const farmMobileShellClient = JSON.parse("${_chunkE5UN4OWXcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER}");
|
|
6520
6520
|
function applyFarmMobileShellResponse(request, response, context) {
|
|
6521
6521
|
return _applyFarmMobileShellClient(request, response, farmMobileShellClient, () =>
|
|
6522
6522
|
context?.onGuardedResponse?.()
|
|
@@ -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
|
+
) ? _chunkRY4ABNPEcjs.collectFarmNativeServerFns.call(void 0, {
|
|
6623
6623
|
root: config.root,
|
|
6624
6624
|
srcDir: config.srcDir,
|
|
6625
|
-
entries:
|
|
6625
|
+
entries: _chunkRY4ABNPEcjs.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 = _chunkE4UDLFWRcjs.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(_chunkE4UDLFWRcjs.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(_chunkMPJEIHW2cjs.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(_chunk752IHQTDcjs.resolveFarmApiCatalogInput.call(void 0, config))};
|
|
7138
7138
|
` : ""}${_optionalChain([config, 'access', _194 => _194.agent, 'optionalAccess', _195 => _195.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
|
|
7139
|
-
|
|
7139
|
+
_chunk752IHQTDcjs.resolveFarmAppManifestInput.call(void 0, config, {
|
|
7140
7140
|
build: config.deploymentId,
|
|
7141
|
-
packages:
|
|
7142
|
-
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ?
|
|
7141
|
+
packages: _chunkE4UDLFWRcjs.resolveFarmAppPackages.call(void 0, config.root),
|
|
7142
|
+
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkE4UDLFWRcjs.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.
|
|
@@ -8344,7 +8344,7 @@ ${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
|
-
_chunkY5TOT5F6cjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root),
|
|
8347
|
+
_chunkY5TOT5F6cjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkBIF5MLTHcjs.FARM_VERSION)
|
|
8348
8348
|
)};
|
|
8349
8349
|
let farmDefaultMCPRouteFree;
|
|
8350
8350
|
function getFarmDefaultMCPServer() {
|
|
@@ -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
|
+
_chunk752IHQTDcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
8758
8758
|
agent: {
|
|
8759
8759
|
...config.agent,
|
|
8760
8760
|
aiCatalog: servesAiCatalog,
|
|
@@ -9465,7 +9465,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9465
9465
|
// agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
|
|
9466
9466
|
// public manifest, the same document for every request.
|
|
9467
9467
|
if (
|
|
9468
|
-
[${JSON.stringify(
|
|
9468
|
+
[${JSON.stringify(_chunk752IHQTDcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunk752IHQTDcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
|
|
9469
9469
|
normalizeRuntimePath(routePathname),
|
|
9470
9470
|
)
|
|
9471
9471
|
) {
|
|
@@ -9477,7 +9477,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9477
9477
|
` : ""}
|
|
9478
9478
|
${_optionalChain([config, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.apiCatalog]) ? `
|
|
9479
9479
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
9480
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
9480
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunk752IHQTDcjs.FARM_API_CATALOG_PATH)}) {
|
|
9481
9481
|
return applyProductionMiddlewareHeaders(
|
|
9482
9482
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
9483
9483
|
middlewareHeaders,
|
|
@@ -11027,7 +11027,7 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
11027
11027
|
}
|
|
11028
11028
|
if (_chunkUJ3R2AH2cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
|
|
11029
11029
|
if (_chunkUJ3R2AH2cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
|
|
11030
|
-
if (
|
|
11030
|
+
if (_chunkCHYTADNKcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
|
|
11031
11031
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
11032
11032
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
11033
11033
|
if (_optionalChain([manifestEntry, 'optionalAccess', _240 => _240.rendering]) === "dynamic") return "dynamic runtime manifest";
|
|
@@ -11045,7 +11045,7 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
11045
11045
|
}
|
|
11046
11046
|
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
11047
11047
|
if (!_optionalChain([config, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.enabled]) || !config.docs.prerender) return [];
|
|
11048
|
-
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !
|
|
11048
|
+
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !_chunkDVKH2RVNcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
11049
11049
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11050
11050
|
"docs.prerender needs a docs adapter such as @farming-labs/farmjs; Farm's built-in docs renderer keeps rendering docs pages on request."
|
|
11051
11051
|
);
|
|
@@ -11057,7 +11057,7 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
11057
11057
|
);
|
|
11058
11058
|
return [];
|
|
11059
11059
|
}
|
|
11060
|
-
const pages = await
|
|
11060
|
+
const pages = await _chunkDVKH2RVNcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
|
|
11061
11061
|
if (!pages) {
|
|
11062
11062
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11063
11063
|
`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.`
|
|
@@ -11083,10 +11083,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11083
11083
|
const nitroBuilder = nitroBuilderResult.value;
|
|
11084
11084
|
const isVercel = preset === "vercel" || preset === "vercel-edge";
|
|
11085
11085
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
11086
|
-
const outputDir =
|
|
11086
|
+
const outputDir = _chunkCHYTADNKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
11087
11087
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
11088
11088
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
11089
|
-
const imageRuntime =
|
|
11089
|
+
const imageRuntime = _chunkE4UDLFWRcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
11090
11090
|
const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
|
|
11091
11091
|
(image) => image.sourceType === "module"
|
|
11092
11092
|
);
|
|
@@ -11201,19 +11201,20 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11201
11201
|
let nativeStylesheets;
|
|
11202
11202
|
const encodedDocsModulePreloads = encodeFarmDocsModulePreloads(docsModulePreloads);
|
|
11203
11203
|
const encodedClientModulePreloads = encodeFarmClientModulePreloads(clientModulePreloads);
|
|
11204
|
-
const encodedMobileShellClient = shouldBuildFarmMobileClient(config) ?
|
|
11205
|
-
await
|
|
11204
|
+
const encodedMobileShellClient = shouldBuildFarmMobileClient(config) ? _chunkE5UN4OWXcjs.encodeFarmMobileShellClient.call(void 0,
|
|
11205
|
+
await _chunkE5UN4OWXcjs.finalizeFarmMobileClient.call(void 0, {
|
|
11206
11206
|
buildDir: _path2.default.join(root, distDir),
|
|
11207
11207
|
clientOutputDir,
|
|
11208
11208
|
webEntry: clientJsSrc,
|
|
11209
|
+
webBoot: clientBootSrc,
|
|
11209
11210
|
stylesheet: clientCssHref,
|
|
11210
11211
|
webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess', _248 => _248.files]), () => ( []))
|
|
11211
11212
|
})
|
|
11212
11213
|
) : null;
|
|
11213
11214
|
for (const output of Object.values(ssrBundle)) {
|
|
11214
11215
|
if (output.type !== "chunk") continue;
|
|
11215
|
-
if (encodedMobileShellClient && output.code.includes(
|
|
11216
|
-
output.code = output.code.split(
|
|
11216
|
+
if (encodedMobileShellClient && output.code.includes(_chunkE5UN4OWXcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER)) {
|
|
11217
|
+
output.code = output.code.split(_chunkE5UN4OWXcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER).join(encodedMobileShellClient);
|
|
11217
11218
|
}
|
|
11218
11219
|
if (output.code.includes(FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER)) {
|
|
11219
11220
|
output.code = output.code.split(FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER).join(encodedDocsModulePreloads);
|
|
@@ -11772,13 +11773,13 @@ function toFarmNodeResponse(request, response) {
|
|
|
11772
11773
|
}
|
|
11773
11774
|
if (prerenderRoutes.length > 0) {
|
|
11774
11775
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
|
|
11775
|
-
const previousPrerender = process.env[
|
|
11776
|
-
process.env[
|
|
11776
|
+
const previousPrerender = process.env[_chunk4TVPYN32cjs.FARM_PRERENDER_ENV];
|
|
11777
|
+
process.env[_chunk4TVPYN32cjs.FARM_PRERENDER_ENV] = "1";
|
|
11777
11778
|
try {
|
|
11778
11779
|
await nitroBuilder.prerender(nitroInstance);
|
|
11779
11780
|
} finally {
|
|
11780
|
-
if (previousPrerender === void 0) delete process.env[
|
|
11781
|
-
else process.env[
|
|
11781
|
+
if (previousPrerender === void 0) delete process.env[_chunk4TVPYN32cjs.FARM_PRERENDER_ENV];
|
|
11782
|
+
else process.env[_chunk4TVPYN32cjs.FARM_PRERENDER_ENV] = previousPrerender;
|
|
11782
11783
|
}
|
|
11783
11784
|
}
|
|
11784
11785
|
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs4, preset) : Promise.resolve(null);
|
|
@@ -12083,7 +12084,7 @@ async function stageSharpRuntime(config, root, distDir, fs4, preset) {
|
|
|
12083
12084
|
try {
|
|
12084
12085
|
await copyPackage("sharp", sharpRequire);
|
|
12085
12086
|
if (!copiedPackages.has("sharp")) {
|
|
12086
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
12087
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunkE4UDLFWRcjs.SHARP_INSTALL_HINT}`);
|
|
12087
12088
|
}
|
|
12088
12089
|
} catch (error) {
|
|
12089
12090
|
await fs4.rm(stageDir, { recursive: true, force: true });
|
|
@@ -12304,7 +12305,7 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
12304
12305
|
// src/build/index.ts
|
|
12305
12306
|
async function build(config, options = {}) {
|
|
12306
12307
|
return _chunk4IHMHFQBcjs.withProductionNodeEnv.call(void 0,
|
|
12307
|
-
() =>
|
|
12308
|
+
() => _chunk7ONGIFYXcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
|
|
12308
12309
|
);
|
|
12309
12310
|
}
|
|
12310
12311
|
function createBuildTargetBaseline(config) {
|
|
@@ -12315,7 +12316,7 @@ function createBuildTargetBaseline(config) {
|
|
|
12315
12316
|
preset,
|
|
12316
12317
|
distDir,
|
|
12317
12318
|
outputDir,
|
|
12318
|
-
outputWasDerived: outputDir ===
|
|
12319
|
+
outputWasDerived: outputDir === _chunkCHYTADNKcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
12319
12320
|
};
|
|
12320
12321
|
}
|
|
12321
12322
|
function resolveBuildTargets(config, options, baseline) {
|
|
@@ -12324,8 +12325,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12324
12325
|
const distDir = config.distDir || ".farm";
|
|
12325
12326
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
12326
12327
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
12327
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
12328
|
-
const outputDir = shouldRefreshDerivedOutput ?
|
|
12328
|
+
const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkCHYTADNKcjs.getDeployTargetForPreset.call(void 0, preset);
|
|
12329
|
+
const outputDir = shouldRefreshDerivedOutput ? _chunkCHYTADNKcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
|
|
12329
12330
|
return {
|
|
12330
12331
|
root,
|
|
12331
12332
|
preset,
|
|
@@ -12333,7 +12334,7 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12333
12334
|
distDir,
|
|
12334
12335
|
deployTarget,
|
|
12335
12336
|
outputDir,
|
|
12336
|
-
deployOutputDir:
|
|
12337
|
+
deployOutputDir: _chunkCHYTADNKcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
12337
12338
|
};
|
|
12338
12339
|
}
|
|
12339
12340
|
async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
@@ -12370,7 +12371,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12370
12371
|
};
|
|
12371
12372
|
config = {
|
|
12372
12373
|
...config,
|
|
12373
|
-
images:
|
|
12374
|
+
images: _chunkE4UDLFWRcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
12374
12375
|
root: targets.root,
|
|
12375
12376
|
preset: targets.preset
|
|
12376
12377
|
})
|
|
@@ -12378,7 +12379,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12378
12379
|
if (_optionalChain([config, 'access', _282 => _282.docs, 'optionalAccess', _283 => _283.enabled])) await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
|
|
12379
12380
|
pluginManager.updateContext({ config });
|
|
12380
12381
|
const { root, preset, srcDir, distDir, deployOutputDir } = targets;
|
|
12381
|
-
|
|
12382
|
+
_chunk7ONGIFYXcjs.usePackageClientBoundaryCacheFile.call(void 0,
|
|
12382
12383
|
_path2.default.resolve(root, distDir, "cache", "client-boundaries.json")
|
|
12383
12384
|
);
|
|
12384
12385
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
|
|
@@ -12401,7 +12402,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12401
12402
|
root,
|
|
12402
12403
|
rendererBuild.signal
|
|
12403
12404
|
);
|
|
12404
|
-
const farmApp =
|
|
12405
|
+
const farmApp = _chunkE4UDLFWRcjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
12405
12406
|
await farmApp.initialize();
|
|
12406
12407
|
const routeManager = farmApp.getRouteManager();
|
|
12407
12408
|
const serverRenderer = farmApp.getServerRenderer();
|
|
@@ -12508,7 +12509,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12508
12509
|
ssr: true,
|
|
12509
12510
|
buildLifetime
|
|
12510
12511
|
});
|
|
12511
|
-
const viteConfig =
|
|
12512
|
+
const viteConfig = _chunkE4UDLFWRcjs.mergeFarmViteConfig.call(void 0,
|
|
12512
12513
|
{
|
|
12513
12514
|
root,
|
|
12514
12515
|
appType: "custom",
|
|
@@ -12520,12 +12521,12 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12520
12521
|
},
|
|
12521
12522
|
plugins: [
|
|
12522
12523
|
...rendererVitePlugins,
|
|
12523
|
-
|
|
12524
|
+
_chunkE4UDLFWRcjs.farmFontImportsPlugin.call(void 0, {
|
|
12524
12525
|
root,
|
|
12525
12526
|
basePath: config.basePath,
|
|
12526
12527
|
publicDir: config.publicDir
|
|
12527
12528
|
}),
|
|
12528
|
-
|
|
12529
|
+
_chunk7ONGIFYXcjs.farmEnvironmentFunctionsPlugin.call(void 0, ),
|
|
12529
12530
|
// Route modules load here at build time (rendering config, prerendering): `server-only`
|
|
12530
12531
|
// resolves as it does in the server build.
|
|
12531
12532
|
farmServerOnlyEntriesPlugin()
|
|
@@ -12535,7 +12536,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12535
12536
|
hmr: false
|
|
12536
12537
|
},
|
|
12537
12538
|
resolve: {
|
|
12538
|
-
alias:
|
|
12539
|
+
alias: _chunkE4UDLFWRcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
12539
12540
|
dedupe: [...config.renderer.dedupe || []]
|
|
12540
12541
|
},
|
|
12541
12542
|
optimizeDeps: {
|
|
@@ -12599,7 +12600,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
12599
12600
|
farmI18nClientBridgePlugin(),
|
|
12600
12601
|
farmServerOnlyEntriesPlugin(),
|
|
12601
12602
|
farmPlugin(config, pluginManager),
|
|
12602
|
-
|
|
12603
|
+
_chunk7ONGIFYXcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
12603
12604
|
],
|
|
12604
12605
|
mode: "production"
|
|
12605
12606
|
});
|
|
@@ -12632,7 +12633,7 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
|
12632
12633
|
plugins: [
|
|
12633
12634
|
farmI18nClientBridgePlugin(),
|
|
12634
12635
|
farmPlugin(config, pluginManager),
|
|
12635
|
-
|
|
12636
|
+
_chunk7ONGIFYXcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
12636
12637
|
],
|
|
12637
12638
|
mode: "production"
|
|
12638
12639
|
});
|
|
@@ -12660,7 +12661,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12660
12661
|
if (pluginManager) {
|
|
12661
12662
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
12662
12663
|
}
|
|
12663
|
-
const outputDir =
|
|
12664
|
+
const outputDir = _chunkCHYTADNKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
12664
12665
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
12665
12666
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
12666
12667
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -12731,7 +12732,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12731
12732
|
root,
|
|
12732
12733
|
preset,
|
|
12733
12734
|
distDir,
|
|
12734
|
-
outputDir:
|
|
12735
|
+
outputDir: _chunkCHYTADNKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
|
|
12735
12736
|
});
|
|
12736
12737
|
}
|
|
12737
12738
|
}
|