@farm.js/core 0.1.64 → 0.1.65
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-GHWK46LX.cjs +16 -0
- package/dist/{analyzer-Q3QXC6PD.mjs → analyzer-PE33SK5W.mjs} +2 -2
- package/dist/{chunk-O4FWNLQK.mjs → chunk-2L54YV25.mjs} +10 -8
- package/dist/{chunk-S25BQIFW.cjs → chunk-32RPJAAS.cjs} +2 -2
- package/dist/{chunk-FAP7CX7C.cjs → chunk-3KJPIO5D.cjs} +526 -3018
- package/dist/{chunk-OYF23QLG.mjs → chunk-6X5NKNBE.mjs} +36 -32
- package/dist/{chunk-LQDLEWPO.mjs → chunk-72JSHQQQ.mjs} +1 -1
- package/dist/{chunk-WNYRYI4D.mjs → chunk-7GYCZRTH.mjs} +379 -2871
- package/dist/chunk-7QVRWGBL.cjs +3704 -0
- package/dist/{chunk-O2XFIPNL.cjs → chunk-A3G5IY2W.cjs} +1 -1
- package/dist/{chunk-NXFA7G3Y.cjs → chunk-C7DCMGC4.cjs} +4 -4
- package/dist/chunk-CJNAUEVC.mjs +34 -0
- package/dist/{chunk-O7IEMY55.cjs → chunk-CZF4XIRZ.cjs} +3 -3
- package/dist/{chunk-SLYDIHLW.mjs → chunk-E2TSYUHV.mjs} +2 -2
- package/dist/{chunk-VVTJTMGQ.cjs → chunk-GL7N5UHF.cjs} +4 -4
- package/dist/{chunk-6NHSGVVA.mjs → chunk-GRBJ7VKH.mjs} +1 -1
- package/dist/{chunk-UR25Z5Z6.mjs → chunk-HCGWDRZO.mjs} +1 -1
- package/dist/{chunk-FH45OB37.mjs → chunk-HKNYNSOK.mjs} +1 -1
- package/dist/{chunk-DUSHDZQL.cjs → chunk-IMK32ERL.cjs} +15 -13
- package/dist/{chunk-XVWSDSUM.mjs → chunk-IP2KHSGF.mjs} +4 -2
- package/dist/{chunk-MG356ROI.cjs → chunk-OSFIUSYK.cjs} +3 -3
- package/dist/{chunk-SNFTMSHX.mjs → chunk-Q75QPLBA.mjs} +1 -1
- package/dist/{chunk-WFNAOWH4.mjs → chunk-QHRCR44V.mjs} +2 -2
- package/dist/{chunk-JCPSA4X5.cjs → chunk-T4M52BA5.cjs} +116 -112
- package/dist/{chunk-PAKCHVUS.mjs → chunk-TPA2PV5J.mjs} +3 -35
- package/dist/{chunk-N3Z3PLHC.cjs → chunk-TRIDJQ6A.cjs} +6 -6
- package/dist/{chunk-3EBHJET2.cjs → chunk-TZOGZKI7.cjs} +380 -269
- package/dist/{chunk-BPNOYILC.cjs → chunk-UVV3I5QA.cjs} +3 -35
- package/dist/{chunk-RAH5MT53.mjs → chunk-VHHLKIDZ.mjs} +153 -42
- package/dist/{chunk-S7ZW72JH.cjs → chunk-WNXVWXG3.cjs} +2 -2
- package/dist/{chunk-XZLZ6YPP.cjs → chunk-YD4J37RN.cjs} +90 -33
- package/dist/{chunk-NNLFW3P4.mjs → chunk-YUW7F6SK.mjs} +1 -1
- package/dist/chunk-ZAUOOGER.mjs +3704 -0
- package/dist/chunk-ZIHWAN55.cjs +34 -0
- package/dist/{chunk-EL4364S2.cjs → chunk-ZQQK4U66.cjs} +4 -2
- package/dist/{chunk-6NNYPY5W.mjs → chunk-ZX2JHEWW.mjs} +59 -2
- package/dist/{devtools-MX3FE733.mjs → devtools-PUVZB3F2.mjs} +4 -3
- package/dist/{devtools-WET5NAKO.cjs → devtools-SGYOG36E.cjs} +5 -4
- package/dist/docs.cjs +6 -5
- package/dist/docs.mjs +5 -4
- package/dist/environment/vite.cjs +9 -2
- package/dist/environment/vite.d.mts +3 -0
- package/dist/environment/vite.d.ts +3 -0
- package/dist/environment/vite.mjs +8 -1
- package/dist/index.cjs +20 -19
- package/dist/index.mjs +19 -18
- package/dist/internal/build-runtime.cjs +18 -17
- package/dist/internal/build-runtime.mjs +17 -16
- package/dist/internal/cli-runtime.cjs +6 -5
- package/dist/internal/cli-runtime.mjs +5 -4
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/config-runtime.cjs +6 -5
- package/dist/internal/config-runtime.mjs +5 -4
- 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 +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +5 -5
- package/dist/internal/production-runtime.d.mts +7 -0
- package/dist/internal/production-runtime.d.ts +7 -0
- package/dist/internal/production-runtime.mjs +4 -4
- package/dist/{native-tree-WOX3JMBG.cjs → native-tree-HE2FLS72.cjs} +2 -2
- package/dist/{native-tree-BPEE2LAL.mjs → native-tree-YF2DSPKM.mjs} +1 -1
- package/dist/plugin.cjs +11 -10
- package/dist/plugin.mjs +10 -9
- package/dist/{rsc-pipeline-3LNVP2OO.mjs → rsc-pipeline-T3PWURLJ.mjs} +6 -5
- package/dist/{rsc-pipeline-G5WELVW3.cjs → rsc-pipeline-V4ANLRAA.cjs} +7 -6
- package/dist/{runtime-DMEULPE7.cjs → runtime-5AROV2C3.cjs} +12 -11
- package/dist/{runtime-HQJ2LLQL.mjs → runtime-LRIQ3XH7.mjs} +9 -8
- package/dist/server.cjs +36 -35
- package/dist/server.mjs +19 -18
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +14 -12
- package/dist/vite.mjs +13 -11
- package/package.json +1 -1
- package/dist/analyzer-ODLF2Z6O.cjs +0 -16
- package/dist/chunk-NK2VWS7P.cjs +0 -954
- package/dist/chunk-ZQ5BDNKW.mjs +0 -954
|
@@ -31,14 +31,14 @@ var _chunk4BS3HSY7cjs = require('./chunk-4BS3HSY7.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkCZF4XIRZcjs = require('./chunk-CZF4XIRZ.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunk32RPJAAScjs = require('./chunk-32RPJAAS.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 _chunkOSFIUSYKcjs = require('./chunk-OSFIUSYK.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 _chunkIMK32ERLcjs = require('./chunk-IMK32ERL.cjs');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
var _chunkBRWIVOV4cjs = require('./chunk-BRWIVOV4.cjs');
|
|
@@ -100,34 +100,37 @@ var _chunkOCS3PSYRcjs = require('./chunk-OCS3PSYR.cjs');
|
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
+
var _chunk3KJPIO5Dcjs = require('./chunk-3KJPIO5D.cjs');
|
|
103
104
|
|
|
104
105
|
|
|
106
|
+
var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
|
|
105
107
|
|
|
106
108
|
|
|
109
|
+
var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
|
|
107
110
|
|
|
108
111
|
|
|
109
112
|
|
|
110
113
|
|
|
114
|
+
var _chunkX4K7TYN6cjs = require('./chunk-X4K7TYN6.cjs');
|
|
111
115
|
|
|
112
116
|
|
|
113
117
|
|
|
114
|
-
var _chunkFAP7CX7Ccjs = require('./chunk-FAP7CX7C.cjs');
|
|
115
118
|
|
|
116
119
|
|
|
117
|
-
var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
|
|
118
120
|
|
|
119
121
|
|
|
120
|
-
var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
|
|
121
122
|
|
|
122
123
|
|
|
123
124
|
|
|
124
125
|
|
|
125
|
-
var _chunkX4K7TYN6cjs = require('./chunk-X4K7TYN6.cjs');
|
|
126
126
|
|
|
127
|
+
var _chunkUJ3R2AH2cjs = require('./chunk-UJ3R2AH2.cjs');
|
|
127
128
|
|
|
128
129
|
|
|
130
|
+
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
129
131
|
|
|
130
132
|
|
|
133
|
+
var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
|
|
131
134
|
|
|
132
135
|
|
|
133
136
|
|
|
@@ -135,35 +138,32 @@ var _chunkX4K7TYN6cjs = require('./chunk-X4K7TYN6.cjs');
|
|
|
135
138
|
|
|
136
139
|
|
|
137
140
|
|
|
138
|
-
var
|
|
141
|
+
var _chunkC7DCMGC4cjs = require('./chunk-C7DCMGC4.cjs');
|
|
139
142
|
|
|
140
143
|
|
|
141
|
-
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
142
144
|
|
|
143
145
|
|
|
144
|
-
var
|
|
146
|
+
var _chunkY5TOT5F6cjs = require('./chunk-Y5TOT5F6.cjs');
|
|
145
147
|
|
|
146
148
|
|
|
149
|
+
var _chunkWNXVWXG3cjs = require('./chunk-WNXVWXG3.cjs');
|
|
147
150
|
|
|
148
151
|
|
|
152
|
+
var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
149
153
|
|
|
150
154
|
|
|
151
155
|
|
|
152
|
-
var _chunkNXFA7G3Ycjs = require('./chunk-NXFA7G3Y.cjs');
|
|
153
156
|
|
|
154
157
|
|
|
155
158
|
|
|
156
159
|
|
|
157
|
-
var _chunkY5TOT5F6cjs = require('./chunk-Y5TOT5F6.cjs');
|
|
158
160
|
|
|
159
161
|
|
|
160
|
-
var _chunkS7ZW72JHcjs = require('./chunk-S7ZW72JH.cjs');
|
|
161
162
|
|
|
162
163
|
|
|
163
|
-
var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
var
|
|
166
|
+
var _chunk7QVRWGBLcjs = require('./chunk-7QVRWGBL.cjs');
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
|
|
@@ -174,26 +174,26 @@ var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
|
|
|
174
174
|
var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
|
|
175
175
|
|
|
176
176
|
|
|
177
|
-
var
|
|
177
|
+
var _chunkV56632LAcjs = require('./chunk-V56632LA.cjs');
|
|
178
178
|
|
|
179
179
|
|
|
180
|
-
var _chunkV56632LAcjs = require('./chunk-V56632LA.cjs');
|
|
181
180
|
|
|
181
|
+
var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
|
|
182
182
|
|
|
183
183
|
|
|
184
|
+
var _chunkZIHWAN55cjs = require('./chunk-ZIHWAN55.cjs');
|
|
184
185
|
|
|
185
186
|
|
|
187
|
+
var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
186
188
|
|
|
187
189
|
|
|
188
190
|
|
|
189
|
-
var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
|
|
190
191
|
|
|
191
192
|
|
|
192
193
|
|
|
193
|
-
var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
|
|
194
194
|
|
|
195
195
|
|
|
196
|
-
var
|
|
196
|
+
var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
|
|
197
197
|
|
|
198
198
|
|
|
199
199
|
var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
@@ -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 _chunkA3G5IY2Wcjs = require('./chunk-A3G5IY2W.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 = _chunk32RPJAAScjs.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 = _chunkIMK32ERLcjs.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, _chunk3KJPIO5Dcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
|
|
2152
2152
|
}
|
|
2153
2153
|
var IncompleteClientBuildOutputError = class extends Error {
|
|
2154
2154
|
constructor(detail) {
|
|
@@ -2194,7 +2194,7 @@ function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, optio
|
|
|
2194
2194
|
const key = `${_path2.default.resolve(root)}\0${mode}\0${options.asyncOwnerIslands === true}\0${options.serverOwners === true}\0${options.serverTreeLayouts === true}\0${_path2.default.resolve(modulePath)}`;
|
|
2195
2195
|
let plan = cache.get(key);
|
|
2196
2196
|
if (!plan) {
|
|
2197
|
-
plan =
|
|
2197
|
+
plan = _chunk7QVRWGBLcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
|
|
2198
2198
|
cache.set(key, plan);
|
|
2199
2199
|
}
|
|
2200
2200
|
return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
|
|
@@ -2218,25 +2218,25 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2218
2218
|
const unsupportedIntegrationProvider = integrationProviders.find(
|
|
2219
2219
|
(provider) => provider.supportsIsolatedHydration !== true
|
|
2220
2220
|
);
|
|
2221
|
-
if (_optionalChain([config, 'access', _57 => _57.experimental, 'optionalAccess', _58 => _58.isolatedClientHydration]) === "enabled" &&
|
|
2221
|
+
if (_optionalChain([config, 'access', _57 => _57.experimental, 'optionalAccess', _58 => _58.isolatedClientHydration]) === "enabled" && _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _59 => _59.experimental, 'optionalAccess', _60 => _60.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
|
|
2222
2222
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
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 = _chunk7QVRWGBLcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
2227
2227
|
_optionalChain([config, 'access', _61 => _61.experimental, 'optionalAccess', _62 => _62.isolatedClientHydration]),
|
|
2228
2228
|
{
|
|
2229
|
-
serverComponents:
|
|
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 = _chunk7QVRWGBLcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
2234
2234
|
config.renderer,
|
|
2235
2235
|
Boolean(unsupportedIntegrationProvider)
|
|
2236
2236
|
);
|
|
2237
2237
|
const pagePlanOptions = {
|
|
2238
2238
|
...planOptions,
|
|
2239
|
-
serverOwners:
|
|
2239
|
+
serverOwners: _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _65 => _65.experimental, 'optionalAccess', _66 => _66.serverComponents])) === "islands"
|
|
2240
2240
|
};
|
|
2241
2241
|
const layoutPlanOptions = {
|
|
2242
2242
|
...planOptions,
|
|
@@ -2289,7 +2289,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2289
2289
|
});
|
|
2290
2290
|
const layoutAppliesToRoute = _chunkUJ3R2AH2cjs.routeBoundaryCoversDirectory;
|
|
2291
2291
|
const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
|
|
2292
|
-
const islandsMode =
|
|
2292
|
+
const islandsMode = _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _67 => _67.experimental, 'optionalAccess', _68 => _68.serverComponents])) === "islands";
|
|
2293
2293
|
const adapterOwnsDocsRuntime = Boolean(
|
|
2294
2294
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _69 => _69.docs, 'optionalAccess', _70 => _70.enabled]) && _optionalChain([config, 'access', _71 => _71.docs, 'access', _72 => _72.adapter, 'optionalAccess', _73 => _73.server]) && config.docs.adapter.react
|
|
2295
2295
|
);
|
|
@@ -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 = _chunk7QVRWGBLcjs.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
|
+
_chunk7QVRWGBLcjs.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 ${_chunk7QVRWGBLcjs.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 ${_chunk7QVRWGBLcjs.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 = _chunk3KJPIO5Dcjs.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
|
+
..._chunk7QVRWGBLcjs.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 _chunk7QVRWGBLcjs.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
|
+
_chunk3KJPIO5Dcjs.generateClientCachePersistenceCode.call(void 0, _chunk3KJPIO5Dcjs.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 ? _chunk7QVRWGBLcjs.collectFarmServerStylesheets.call(void 0,
|
|
2473
2473
|
[
|
|
2474
2474
|
...layoutRoutes.map((layout) => layout.modulePath),
|
|
2475
2475
|
...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
|
|
@@ -2480,7 +2480,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2480
2480
|
const entryName = platform === "mobile" ? _chunkEFZGB7JCcjs.FARM_MOBILE_CLIENT_ENTRY_NAME : "farm-client";
|
|
2481
2481
|
await fs4.writeFile(clientEntryPath, clientHydrationCode);
|
|
2482
2482
|
const clientInput = { [entryName]: clientEntryPath };
|
|
2483
|
-
if (platform === "web" &&
|
|
2483
|
+
if (platform === "web" && _chunk3KJPIO5Dcjs.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
|
+
_chunk3KJPIO5Dcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
2556
2556
|
createFarmPrivateClientSourcemapsPlugin({
|
|
2557
2557
|
outDir: _path2.default.join(
|
|
2558
2558
|
_path2.default.dirname(outputDir),
|
|
@@ -2584,7 +2584,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2584
2584
|
...rendererVitePlugins,
|
|
2585
2585
|
...config.vite.plugins || [],
|
|
2586
2586
|
farmServerOnlyEntriesPlugin({ platform }),
|
|
2587
|
-
|
|
2587
|
+
_chunk3KJPIO5Dcjs.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
|
+
_chunk7QVRWGBLcjs.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: _chunk3KJPIO5Dcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
2650
2650
|
dedupe: [...config.renderer.dedupe || []]
|
|
2651
2651
|
},
|
|
2652
2652
|
// Optimize dependencies - exclude server-side code from client bundle
|
|
@@ -2659,7 +2659,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
2659
2659
|
]
|
|
2660
2660
|
}
|
|
2661
2661
|
};
|
|
2662
|
-
await viteBuild(
|
|
2662
|
+
await viteBuild(_chunk3KJPIO5Dcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite));
|
|
2663
2663
|
if (platform === "mobile") {
|
|
2664
2664
|
await fs4.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
|
|
2665
2665
|
if (!await _chunkEFZGB7JCcjs.hasFarmMobileClientEntry.call(void 0, _path2.default.dirname(outputDir), outputDir)) {
|
|
@@ -2758,7 +2758,7 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
|
|
|
2758
2758
|
return response;
|
|
2759
2759
|
}
|
|
2760
2760
|
|
|
2761
|
-
${streamNavigations ?
|
|
2761
|
+
${streamNavigations ? _chunk3KJPIO5Dcjs.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 = _chunk3KJPIO5Dcjs.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 = _chunk3KJPIO5Dcjs.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
|
+
${_chunk3KJPIO5Dcjs.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 ? `${_chunk3KJPIO5Dcjs.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 = _chunk3KJPIO5Dcjs.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 = _chunkIMK32ERLcjs.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 (_chunk32RPJAAScjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
5387
5387
|
const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
|
|
5388
|
-
|
|
5388
|
+
_chunk32RPJAAScjs.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 _chunk32RPJAAScjs.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
|
+
_chunk3KJPIO5Dcjs.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
|
+
_chunk7QVRWGBLcjs.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(_chunk3KJPIO5Dcjs.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(_chunk3KJPIO5Dcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
|
|
5630
5630
|
} finally {
|
|
5631
5631
|
if (postcssConfigDir) {
|
|
5632
5632
|
try {
|
|
@@ -6049,8 +6049,8 @@ if (typeof ReactDOMServer.configureApp !== "function") {
|
|
|
6049
6049
|
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
|
-
const farmIslandsMode =
|
|
6053
|
-
const farmClientBoot =
|
|
6052
|
+
const farmIslandsMode = _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _121 => _121.experimental, 'optionalAccess', _122 => _122.serverComponents])) === "islands";
|
|
6053
|
+
const farmClientBoot = _chunk3KJPIO5Dcjs.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 = _chunk3KJPIO5Dcjs.generateFarmIntegrationProviderServerModules.call(void 0,
|
|
6132
6132
|
renderedIntegrationProviders,
|
|
6133
6133
|
config.root,
|
|
6134
6134
|
_nullishCoalesce(config.renderer.componentExtensions, () => ( []))
|
|
@@ -6148,20 +6148,20 @@ 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 = _chunk7QVRWGBLcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
6152
6152
|
_optionalChain([config, 'access', _147 => _147.experimental, 'optionalAccess', _148 => _148.isolatedClientHydration]),
|
|
6153
6153
|
{
|
|
6154
|
-
serverComponents:
|
|
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 = _chunk7QVRWGBLcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
6159
6159
|
config.renderer,
|
|
6160
6160
|
Boolean(unsupportedIntegrationProvider)
|
|
6161
6161
|
);
|
|
6162
6162
|
const pageHydrationPlanOptions = {
|
|
6163
6163
|
...hydrationPlanOptions,
|
|
6164
|
-
serverOwners:
|
|
6164
|
+
serverOwners: _chunkZIHWAN55cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _151 => _151.experimental, 'optionalAccess', _152 => _152.serverComponents])) === "islands"
|
|
6165
6165
|
};
|
|
6166
6166
|
const layoutHydrationPlans = layoutRoutes.map((layout) => ({
|
|
6167
6167
|
...layout,
|
|
@@ -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 = _chunk7QVRWGBLcjs.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
|
+
_chunk7QVRWGBLcjs.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)},${_chunk7QVRWGBLcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
|
|
6270
|
+
const rootStrategy = _chunk3KJPIO5Dcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
6271
6271
|
route,
|
|
6272
6272
|
clientMetadata,
|
|
6273
6273
|
layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
|
|
@@ -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
|
+
) ? _chunkCZF4XIRZcjs.collectFarmNativeServerFns.call(void 0, {
|
|
6623
6623
|
root: config.root,
|
|
6624
6624
|
srcDir: config.srcDir,
|
|
6625
|
-
entries:
|
|
6625
|
+
entries: _chunkCZF4XIRZcjs.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 = _chunk3KJPIO5Dcjs.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(_chunk3KJPIO5Dcjs.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(_chunkWNXVWXG3cjs.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(_chunkC7DCMGC4cjs.resolveFarmApiCatalogInput.call(void 0, config))};
|
|
7138
7138
|
` : ""}${_optionalChain([config, 'access', _194 => _194.agent, 'optionalAccess', _195 => _195.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
|
|
7139
|
-
|
|
7139
|
+
_chunkC7DCMGC4cjs.resolveFarmAppManifestInput.call(void 0, config, {
|
|
7140
7140
|
build: config.deploymentId,
|
|
7141
|
-
packages:
|
|
7142
|
-
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ?
|
|
7141
|
+
packages: _chunk3KJPIO5Dcjs.resolveFarmAppPackages.call(void 0, config.root),
|
|
7142
|
+
webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunk3KJPIO5Dcjs.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), _chunkA3G5IY2Wcjs.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
|
+
_chunkC7DCMGC4cjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
8758
8758
|
agent: {
|
|
8759
8759
|
...config.agent,
|
|
8760
8760
|
aiCatalog: servesAiCatalog,
|
|
@@ -9353,6 +9353,10 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9353
9353
|
renderPage: (targetRequest) => fetchFarmInnerRequest(targetRequest, adapterContext),
|
|
9354
9354
|
// The client CSS this build emitted, embedded once it settled (FARM_NATIVE_STYLESHEETS).
|
|
9355
9355
|
loadStylesheet: (href) => farmNativeStylesheets[href],
|
|
9356
|
+
// Behind a TLS-terminating proxy, links and form actions use the forwarded origin.
|
|
9357
|
+
origin: resolveFarmWebRequestOrigin(request, {
|
|
9358
|
+
trustProxy: farmServerConfig.trustProxy === true,
|
|
9359
|
+
}),
|
|
9356
9360
|
});
|
|
9357
9361
|
return applyProductionMiddlewareHeaders(treeResponse, middlewareHeaders);
|
|
9358
9362
|
}
|
|
@@ -9461,7 +9465,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9461
9465
|
// agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
|
|
9462
9466
|
// public manifest, the same document for every request.
|
|
9463
9467
|
if (
|
|
9464
|
-
[${JSON.stringify(
|
|
9468
|
+
[${JSON.stringify(_chunkC7DCMGC4cjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkC7DCMGC4cjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
|
|
9465
9469
|
normalizeRuntimePath(routePathname),
|
|
9466
9470
|
)
|
|
9467
9471
|
) {
|
|
@@ -9473,7 +9477,7 @@ ${hasServerRuntimeIntegrations ? `
|
|
|
9473
9477
|
` : ""}
|
|
9474
9478
|
${_optionalChain([config, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.apiCatalog]) ? `
|
|
9475
9479
|
// agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
|
|
9476
|
-
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(
|
|
9480
|
+
if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkC7DCMGC4cjs.FARM_API_CATALOG_PATH)}) {
|
|
9477
9481
|
return applyProductionMiddlewareHeaders(
|
|
9478
9482
|
createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
|
|
9479
9483
|
middlewareHeaders,
|
|
@@ -11023,7 +11027,7 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
11023
11027
|
}
|
|
11024
11028
|
if (_chunkUJ3R2AH2cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
|
|
11025
11029
|
if (_chunkUJ3R2AH2cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
|
|
11026
|
-
if (
|
|
11030
|
+
if (_chunkIMK32ERLcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
|
|
11027
11031
|
if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
|
|
11028
11032
|
const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
|
|
11029
11033
|
if (_optionalChain([manifestEntry, 'optionalAccess', _240 => _240.rendering]) === "dynamic") return "dynamic runtime manifest";
|
|
@@ -11041,7 +11045,7 @@ function getPhysicalPrerenderBypassReason(options) {
|
|
|
11041
11045
|
}
|
|
11042
11046
|
async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
11043
11047
|
if (!_optionalChain([config, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.enabled]) || !config.docs.prerender) return [];
|
|
11044
|
-
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !
|
|
11048
|
+
if (!_chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) || !_chunk32RPJAAScjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
|
|
11045
11049
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11046
11050
|
"docs.prerender needs a docs adapter such as @farming-labs/farmjs; Farm's built-in docs renderer keeps rendering docs pages on request."
|
|
11047
11051
|
);
|
|
@@ -11053,7 +11057,7 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
|
|
|
11053
11057
|
);
|
|
11054
11058
|
return [];
|
|
11055
11059
|
}
|
|
11056
|
-
const pages = await
|
|
11060
|
+
const pages = await _chunk32RPJAAScjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
|
|
11057
11061
|
if (!pages) {
|
|
11058
11062
|
_chunkQMNWKQL4cjs.logger.warn(
|
|
11059
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.`
|
|
@@ -11079,10 +11083,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
|
|
|
11079
11083
|
const nitroBuilder = nitroBuilderResult.value;
|
|
11080
11084
|
const isVercel = preset === "vercel" || preset === "vercel-edge";
|
|
11081
11085
|
const isCloudflareWorker = preset === "cloudflare-module";
|
|
11082
|
-
const outputDir =
|
|
11086
|
+
const outputDir = _chunkIMK32ERLcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
11083
11087
|
const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
|
|
11084
11088
|
const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
|
|
11085
|
-
const imageRuntime =
|
|
11089
|
+
const imageRuntime = _chunk3KJPIO5Dcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
|
|
11086
11090
|
const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
|
|
11087
11091
|
(image) => image.sourceType === "module"
|
|
11088
11092
|
);
|
|
@@ -11768,13 +11772,13 @@ function toFarmNodeResponse(request, response) {
|
|
|
11768
11772
|
}
|
|
11769
11773
|
if (prerenderRoutes.length > 0) {
|
|
11770
11774
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
|
|
11771
|
-
const previousPrerender = process.env[
|
|
11772
|
-
process.env[
|
|
11775
|
+
const previousPrerender = process.env[_chunkOSFIUSYKcjs.FARM_PRERENDER_ENV];
|
|
11776
|
+
process.env[_chunkOSFIUSYKcjs.FARM_PRERENDER_ENV] = "1";
|
|
11773
11777
|
try {
|
|
11774
11778
|
await nitroBuilder.prerender(nitroInstance);
|
|
11775
11779
|
} finally {
|
|
11776
|
-
if (previousPrerender === void 0) delete process.env[
|
|
11777
|
-
else process.env[
|
|
11780
|
+
if (previousPrerender === void 0) delete process.env[_chunkOSFIUSYKcjs.FARM_PRERENDER_ENV];
|
|
11781
|
+
else process.env[_chunkOSFIUSYKcjs.FARM_PRERENDER_ENV] = previousPrerender;
|
|
11778
11782
|
}
|
|
11779
11783
|
}
|
|
11780
11784
|
const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs4, preset) : Promise.resolve(null);
|
|
@@ -12079,7 +12083,7 @@ async function stageSharpRuntime(config, root, distDir, fs4, preset) {
|
|
|
12079
12083
|
try {
|
|
12080
12084
|
await copyPackage("sharp", sharpRequire);
|
|
12081
12085
|
if (!copiedPackages.has("sharp")) {
|
|
12082
|
-
throw new Error(`Farm image optimization requires sharp. ${
|
|
12086
|
+
throw new Error(`Farm image optimization requires sharp. ${_chunk3KJPIO5Dcjs.SHARP_INSTALL_HINT}`);
|
|
12083
12087
|
}
|
|
12084
12088
|
} catch (error) {
|
|
12085
12089
|
await fs4.rm(stageDir, { recursive: true, force: true });
|
|
@@ -12300,7 +12304,7 @@ async function createFarmProjectModuleSsrEnvironment() {
|
|
|
12300
12304
|
// src/build/index.ts
|
|
12301
12305
|
async function build(config, options = {}) {
|
|
12302
12306
|
return _chunk4IHMHFQBcjs.withProductionNodeEnv.call(void 0,
|
|
12303
|
-
() =>
|
|
12307
|
+
() => _chunk7QVRWGBLcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
|
|
12304
12308
|
);
|
|
12305
12309
|
}
|
|
12306
12310
|
function createBuildTargetBaseline(config) {
|
|
@@ -12311,7 +12315,7 @@ function createBuildTargetBaseline(config) {
|
|
|
12311
12315
|
preset,
|
|
12312
12316
|
distDir,
|
|
12313
12317
|
outputDir,
|
|
12314
|
-
outputWasDerived: outputDir ===
|
|
12318
|
+
outputWasDerived: outputDir === _chunkIMK32ERLcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
|
|
12315
12319
|
};
|
|
12316
12320
|
}
|
|
12317
12321
|
function resolveBuildTargets(config, options, baseline) {
|
|
@@ -12320,8 +12324,8 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12320
12324
|
const distDir = config.distDir || ".farm";
|
|
12321
12325
|
const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
|
|
12322
12326
|
const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
|
|
12323
|
-
const deployTarget = preset === config.deploy.preset ? config.deploy.target :
|
|
12324
|
-
const outputDir = shouldRefreshDerivedOutput ?
|
|
12327
|
+
const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkIMK32ERLcjs.getDeployTargetForPreset.call(void 0, preset);
|
|
12328
|
+
const outputDir = shouldRefreshDerivedOutput ? _chunkIMK32ERLcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
|
|
12325
12329
|
return {
|
|
12326
12330
|
root,
|
|
12327
12331
|
preset,
|
|
@@ -12329,7 +12333,7 @@ function resolveBuildTargets(config, options, baseline) {
|
|
|
12329
12333
|
distDir,
|
|
12330
12334
|
deployTarget,
|
|
12331
12335
|
outputDir,
|
|
12332
|
-
deployOutputDir:
|
|
12336
|
+
deployOutputDir: _chunkIMK32ERLcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
|
|
12333
12337
|
};
|
|
12334
12338
|
}
|
|
12335
12339
|
async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
@@ -12366,7 +12370,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12366
12370
|
};
|
|
12367
12371
|
config = {
|
|
12368
12372
|
...config,
|
|
12369
|
-
images:
|
|
12373
|
+
images: _chunk3KJPIO5Dcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
|
|
12370
12374
|
root: targets.root,
|
|
12371
12375
|
preset: targets.preset
|
|
12372
12376
|
})
|
|
@@ -12374,7 +12378,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12374
12378
|
if (_optionalChain([config, 'access', _282 => _282.docs, 'optionalAccess', _283 => _283.enabled])) await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
|
|
12375
12379
|
pluginManager.updateContext({ config });
|
|
12376
12380
|
const { root, preset, srcDir, distDir, deployOutputDir } = targets;
|
|
12377
|
-
|
|
12381
|
+
_chunk7QVRWGBLcjs.usePackageClientBoundaryCacheFile.call(void 0,
|
|
12378
12382
|
_path2.default.resolve(root, distDir, "cache", "client-boundaries.json")
|
|
12379
12383
|
);
|
|
12380
12384
|
_chunkQMNWKQL4cjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
|
|
@@ -12397,7 +12401,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
|
|
|
12397
12401
|
root,
|
|
12398
12402
|
rendererBuild.signal
|
|
12399
12403
|
);
|
|
12400
|
-
const farmApp =
|
|
12404
|
+
const farmApp = _chunk3KJPIO5Dcjs.createFarmApp.call(void 0, config, projectModuleServer);
|
|
12401
12405
|
await farmApp.initialize();
|
|
12402
12406
|
const routeManager = farmApp.getRouteManager();
|
|
12403
12407
|
const serverRenderer = farmApp.getServerRenderer();
|
|
@@ -12504,7 +12508,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12504
12508
|
ssr: true,
|
|
12505
12509
|
buildLifetime
|
|
12506
12510
|
});
|
|
12507
|
-
const viteConfig =
|
|
12511
|
+
const viteConfig = _chunk3KJPIO5Dcjs.mergeFarmViteConfig.call(void 0,
|
|
12508
12512
|
{
|
|
12509
12513
|
root,
|
|
12510
12514
|
appType: "custom",
|
|
@@ -12516,12 +12520,12 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12516
12520
|
},
|
|
12517
12521
|
plugins: [
|
|
12518
12522
|
...rendererVitePlugins,
|
|
12519
|
-
|
|
12523
|
+
_chunk3KJPIO5Dcjs.farmFontImportsPlugin.call(void 0, {
|
|
12520
12524
|
root,
|
|
12521
12525
|
basePath: config.basePath,
|
|
12522
12526
|
publicDir: config.publicDir
|
|
12523
12527
|
}),
|
|
12524
|
-
|
|
12528
|
+
_chunk7QVRWGBLcjs.farmEnvironmentFunctionsPlugin.call(void 0, ),
|
|
12525
12529
|
// Route modules load here at build time (rendering config, prerendering): `server-only`
|
|
12526
12530
|
// resolves as it does in the server build.
|
|
12527
12531
|
farmServerOnlyEntriesPlugin()
|
|
@@ -12531,7 +12535,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
12531
12535
|
hmr: false
|
|
12532
12536
|
},
|
|
12533
12537
|
resolve: {
|
|
12534
|
-
alias:
|
|
12538
|
+
alias: _chunk3KJPIO5Dcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
|
|
12535
12539
|
dedupe: [...config.renderer.dedupe || []]
|
|
12536
12540
|
},
|
|
12537
12541
|
optimizeDeps: {
|
|
@@ -12595,7 +12599,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
12595
12599
|
farmI18nClientBridgePlugin(),
|
|
12596
12600
|
farmServerOnlyEntriesPlugin(),
|
|
12597
12601
|
farmPlugin(config, pluginManager),
|
|
12598
|
-
|
|
12602
|
+
_chunk7QVRWGBLcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
12599
12603
|
],
|
|
12600
12604
|
mode: "production"
|
|
12601
12605
|
});
|
|
@@ -12628,7 +12632,7 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
|
12628
12632
|
plugins: [
|
|
12629
12633
|
farmI18nClientBridgePlugin(),
|
|
12630
12634
|
farmPlugin(config, pluginManager),
|
|
12631
|
-
|
|
12635
|
+
_chunk7QVRWGBLcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
|
|
12632
12636
|
],
|
|
12633
12637
|
mode: "production"
|
|
12634
12638
|
});
|
|
@@ -12656,7 +12660,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12656
12660
|
if (pluginManager) {
|
|
12657
12661
|
nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
|
|
12658
12662
|
}
|
|
12659
|
-
const outputDir =
|
|
12663
|
+
const outputDir = _chunkIMK32ERLcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
|
|
12660
12664
|
const serverOutputDir = _path2.default.join(outputDir, "server");
|
|
12661
12665
|
const publicOutputDir = _path2.default.join(outputDir, "public");
|
|
12662
12666
|
const { mkdir, cp } = await import("fs/promises");
|
|
@@ -12727,7 +12731,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
|
|
|
12727
12731
|
root,
|
|
12728
12732
|
preset,
|
|
12729
12733
|
distDir,
|
|
12730
|
-
outputDir:
|
|
12734
|
+
outputDir: _chunkIMK32ERLcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
|
|
12731
12735
|
});
|
|
12732
12736
|
}
|
|
12733
12737
|
}
|