@farm.js/core 0.1.51-beta.2 → 0.1.51-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-WWCC4GLG.mjs → agent-mcp-handler-7JSKGSOW.mjs} +4 -4
- package/dist/{agent-mcp-handler-RT3COCEL.cjs → agent-mcp-handler-YE4AGWHN.cjs} +5 -5
- package/dist/{agent-mcp.d-CR5Ov83o.d.ts → agent-mcp.d-BAR9njbJ.d.ts} +1 -1
- package/dist/{agent-mcp.d-Z5DuwrqW.d.mts → agent-mcp.d-BJKChOrO.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/{analyzer-Z6TNEAET.mjs → analyzer-OTPEWH5W.mjs} +14 -3
- package/dist/{analyzer-T76CN3S7.cjs → analyzer-TSQXZCZN.cjs} +14 -3
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/{app-manifest.d-DiWr_Jfx.d.ts → app-manifest.d-BLFbaqx8.d.ts} +1 -1
- package/dist/{app-manifest.d-CAHkOBFa.d.mts → app-manifest.d-DEQNnNhV.d.mts} +1 -1
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +3 -3
- package/dist/{app.d-DmapqkbV.d.ts → app.d-CNPaUYaa.d.ts} +4 -4
- package/dist/{app.d-BfgJCsTQ.d.mts → app.d-CT7xDkj2.d.mts} +4 -4
- package/dist/{chunk-YVJV7Q2X.mjs → chunk-3BLEXUGE.mjs} +1 -1
- package/dist/chunk-3HLQTOVU.cjs +6 -0
- package/dist/{chunk-E6LTONL4.mjs → chunk-3SMXQNFD.mjs} +2 -2
- package/dist/{chunk-PMKUU273.mjs → chunk-3TLKUBXG.mjs} +411 -166
- package/dist/{chunk-74Z5KX4A.mjs → chunk-3WSIYBMG.mjs} +41 -19
- package/dist/{chunk-GNJIYJMS.cjs → chunk-3XQ57EFI.cjs} +16 -16
- package/dist/{chunk-GW4YUIHW.mjs → chunk-3Z63X45F.mjs} +1 -1
- package/dist/{chunk-IBSAYAWB.mjs → chunk-4353ZRE5.mjs} +1 -1
- package/dist/{chunk-SBABQKPT.cjs → chunk-46KXZBOG.cjs} +5 -5
- package/dist/{chunk-YU42A5MA.cjs → chunk-4CGOMZP3.cjs} +221 -199
- package/dist/{chunk-J3LBO2O4.cjs → chunk-4SEHMBL4.cjs} +10 -10
- package/dist/{chunk-E73PGHSR.mjs → chunk-4TKAIO2F.mjs} +3 -3
- package/dist/{chunk-NJLTQR5P.cjs → chunk-53SACYBY.cjs} +7 -7
- package/dist/{chunk-FM2UEKS2.mjs → chunk-5FXPJIOT.mjs} +2 -2
- package/dist/{chunk-QXPSWMUD.cjs → chunk-7MD37P5V.cjs} +5 -5
- package/dist/{chunk-JATTVAHA.cjs → chunk-B3GM5I6N.cjs} +4 -4
- package/dist/{chunk-WJFFPXCV.cjs → chunk-D7UQC4O6.cjs} +10 -8
- package/dist/{chunk-KRRZJ77U.mjs → chunk-E5DXF5GE.mjs} +2 -2
- package/dist/chunk-EFZGB7JC.cjs +114 -0
- package/dist/{chunk-NYQSC4DX.cjs → chunk-FFE2EMF7.cjs} +5 -5
- package/dist/{chunk-CTM4SPB3.mjs → chunk-GAO7MS5O.mjs} +4 -3
- package/dist/{chunk-HIFIG6HL.cjs → chunk-H33PJEXN.cjs} +5 -5
- package/dist/{chunk-NXBHYO7S.cjs → chunk-HLWOWZFX.cjs} +2 -2
- package/dist/chunk-JXEPLIXD.cjs +389 -0
- package/dist/{chunk-NPQLMP7M.cjs → chunk-KLNFJDFM.cjs} +10 -9
- package/dist/{chunk-KBRZAYI7.mjs → chunk-LDNSSHEG.mjs} +2 -2
- package/dist/chunk-LLZSYFOM.mjs +6 -0
- package/dist/{chunk-N77JBPLC.mjs → chunk-LPDKG6RA.mjs} +9 -7
- package/dist/chunk-MIGFX2FN.mjs +758 -0
- package/dist/{chunk-72D2NX77.mjs → chunk-MRNDAJEV.mjs} +1 -1
- package/dist/{chunk-4SSRBCBR.mjs → chunk-NOTSHVRN.mjs} +355 -218
- package/dist/{chunk-GUJTVM36.cjs → chunk-OAMUSC7H.cjs} +1 -1
- package/dist/chunk-P6MHI5O2.cjs +758 -0
- package/dist/{chunk-6CYQQQGR.mjs → chunk-R4PHCZ3G.mjs} +1 -1
- package/dist/{chunk-WZW6LEHM.cjs → chunk-TQMI6BYO.cjs} +675 -430
- package/dist/{chunk-76GHW3WI.cjs → chunk-TSFMFPRU.cjs} +4 -4
- package/dist/{chunk-5N7QAGEA.cjs → chunk-TWHXBMLJ.cjs} +37 -7
- package/dist/{chunk-BOVGCUDZ.cjs → chunk-UJL4JOXV.cjs} +2 -2
- package/dist/chunk-UQF3OJVE.mjs +389 -0
- package/dist/{chunk-DTU4PX7V.cjs → chunk-WGUHDWT5.cjs} +557 -420
- package/dist/{chunk-LAZK6UV7.mjs → chunk-YAJTD3ZG.mjs} +1 -1
- package/dist/{chunk-7UPCJDB5.mjs → chunk-YUEYBL35.mjs} +2 -2
- package/dist/{chunk-EIMK7D2D.mjs → chunk-ZD2VKAUI.mjs} +34 -4
- package/dist/chunk-ZNXTU4YH.mjs +114 -0
- package/dist/{client-plugins.d-Bx3FXpqm.d.mts → client-plugins.d-DllmH8eM.d.mts} +17 -4
- package/dist/{client-plugins.d-TiLbS5j4.d.ts → client-plugins.d-n3iWY1EJ.d.ts} +17 -4
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/{config.d-iRPI16ku.d.ts → config.d-DqKaCr1r.d.mts} +8 -1
- package/dist/{config.d-iRPI16ku.d.mts → config.d-DqKaCr1r.d.ts} +8 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-6XWCZIGO.cjs → devtools-TO6TAO32.cjs} +5 -5
- package/dist/{devtools-UQLDAOEI.mjs → devtools-UESYARTF.mjs} +4 -4
- package/dist/docs.cjs +7 -7
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +6 -6
- package/dist/index.cjs +22 -18
- package/dist/{index.d-YxJ2AiDF.d.mts → index.d-BL7KKiwa.d.mts} +1 -1
- package/dist/{index.d-yueUNipJ.d.ts → index.d-BXsAXm1U.d.ts} +1 -1
- package/dist/index.d.mts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.mjs +22 -18
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.cjs +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +20 -18
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +19 -17
- package/dist/internal/cli-runtime.cjs +7 -7
- package/dist/internal/cli-runtime.mjs +6 -6
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.d.mts +31 -7
- package/dist/internal/config-runtime.d.ts +31 -7
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +8 -8
- package/dist/internal/infra-analytics-runtime.mjs +6 -6
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +87 -9
- package/dist/internal/production-runtime.d.mts +44 -12
- package/dist/internal/production-runtime.d.ts +44 -12
- package/dist/internal/production-runtime.mjs +86 -8
- package/dist/markdown.cjs +4 -2
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +3 -1
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/mobile.d.mts +21 -5
- package/dist/mobile.d.ts +21 -5
- package/dist/native-tree-EBPDFTRW.mjs +25 -0
- package/dist/native-tree-MMZS7S6W.cjs +25 -0
- package/dist/{navigation-delegate.d-HnDXhlyP.d.mts → navigation-delegate.d-C76gXTmO.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BY1e_Xrh.d.ts → navigation-delegate.d-DIyDslxt.d.ts} +1 -1
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/plugin.cjs +14 -13
- package/dist/plugin.d.mts +5 -4
- package/dist/plugin.d.ts +5 -4
- package/dist/plugin.mjs +13 -12
- package/dist/{production-runtime.d-BpJUDzP8.d.mts → production-runtime.d-CDHztggO.d.mts} +1 -1
- package/dist/{production-runtime.d-lMjvE9cf.d.ts → production-runtime.d-tyaGdbk6.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-BlFp5hv4.d.ts → programmatic-routes-client.d-XfmIrCK1.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-6CGQ3TCk.d.mts → programmatic-routes-client.d-aAWiDd64.d.mts} +2 -2
- package/dist/{render-plan.d-BH9edqKs.d.mts → render-plan.d-Diwybxo8.d.mts} +1 -1
- package/dist/{render-plan.d-DhP0mTHF.d.ts → render-plan.d-Dr5WRjoV.d.ts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-BVZrsR1v.d.ts → request.d-D01fRn--.d.ts} +1 -1
- package/dist/{request.d-DJFRdKi8.d.mts → request.d-Dd3AFR79.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-Bpmw7PED.d.mts → route-rendering.d-BQ53lJ_D.d.mts} +1 -1
- package/dist/{route-rendering.d-B00JtK_-.d.ts → route-rendering.d-Bhx4QoJt.d.ts} +1 -1
- package/dist/{router.d-e0jQ3jQ-.d.mts → router.d-Bi23a6Xc.d.mts} +1 -1
- package/dist/{router.d-Bd1x9XxQ.d.ts → router.d-DQ3k7EYn.d.ts} +1 -1
- package/dist/{routes.d-Cmv8TgVq.d.mts → routes.d-BgTd7vI4.d.mts} +3 -3
- package/dist/{routes.d-D96Dq9lz.d.ts → routes.d-C7jMJFvP.d.ts} +3 -3
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-ZQ4CTVEG.mjs → rsc-pipeline-K3ER3Q4N.mjs} +5 -5
- package/dist/{rsc-pipeline-DX4OC5FN.cjs → rsc-pipeline-OCZIT5OF.cjs} +6 -6
- package/dist/{runtime-NQ3EDSA7.cjs → runtime-DKNSIH7V.cjs} +30 -23
- package/dist/{runtime-NPDRDV6R.mjs → runtime-MKYDEUZT.mjs} +20 -13
- package/dist/{runtime.d-CgB3IJDq.d.mts → runtime.d-B2Js6qZ2.d.mts} +1 -1
- package/dist/{runtime.d-D-td-RR3.d.ts → runtime.d-BL-CGwoi.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +31 -30
- package/dist/server.d.mts +11 -10
- package/dist/server.d.ts +11 -10
- package/dist/server.mjs +16 -15
- package/dist/{spa-router.d-BWDhS0FK.d.mts → spa-router.d-B2rIFGs0.d.mts} +2 -2
- package/dist/{spa-router.d-CO01mVOM.d.ts → spa-router.d-DqZ6Lfs0.d.ts} +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/{utils.d-B77__yh8.d.ts → utils.d-Bv2MPeLR.d.ts} +1 -1
- package/dist/{utils.d-DRDazhCA.d.mts → utils.d-fqXe8lNc.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +14 -13
- package/dist/vite.d.mts +12 -6
- package/dist/vite.d.ts +12 -6
- package/dist/vite.mjs +13 -12
- package/package.json +1 -1
|
@@ -37,7 +37,7 @@ var _chunkA5BJKSZEcjs = require('./chunk-A5BJKSZE.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkTQMI6BYOcjs = require('./chunk-TQMI6BYO.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunkLNM57D3Hcjs = require('./chunk-LNM57D3H.cjs');
|
|
@@ -61,7 +61,10 @@ var _chunkUQHIWZZ6cjs = require('./chunk-UQHIWZZ6.cjs');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunkTSFMFPRUcjs = require('./chunk-TSFMFPRU.cjs');
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
65
68
|
|
|
66
69
|
|
|
67
70
|
var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
|
|
@@ -79,10 +82,10 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
|
|
|
79
82
|
|
|
80
83
|
|
|
81
84
|
|
|
82
|
-
var
|
|
85
|
+
var _chunk4SEHMBL4cjs = require('./chunk-4SEHMBL4.cjs');
|
|
83
86
|
|
|
84
87
|
|
|
85
|
-
var
|
|
88
|
+
var _chunk46KXZBOGcjs = require('./chunk-46KXZBOG.cjs');
|
|
86
89
|
|
|
87
90
|
|
|
88
91
|
var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
|
|
@@ -98,7 +101,7 @@ var _chunkNK2VWS7Pcjs = require('./chunk-NK2VWS7P.cjs');
|
|
|
98
101
|
|
|
99
102
|
|
|
100
103
|
|
|
101
|
-
var
|
|
104
|
+
var _chunkB3GM5I6Ncjs = require('./chunk-B3GM5I6N.cjs');
|
|
102
105
|
|
|
103
106
|
|
|
104
107
|
|
|
@@ -129,10 +132,10 @@ var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
|
|
|
129
132
|
|
|
130
133
|
|
|
131
134
|
|
|
132
|
-
var
|
|
135
|
+
var _chunkFFE2EMF7cjs = require('./chunk-FFE2EMF7.cjs');
|
|
133
136
|
|
|
134
137
|
|
|
135
|
-
var
|
|
138
|
+
var _chunkH33PJEXNcjs = require('./chunk-H33PJEXN.cjs');
|
|
136
139
|
|
|
137
140
|
|
|
138
141
|
|
|
@@ -153,7 +156,7 @@ var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
|
153
156
|
|
|
154
157
|
|
|
155
158
|
|
|
156
|
-
var
|
|
159
|
+
var _chunkD7UQC4O6cjs = require('./chunk-D7UQC4O6.cjs');
|
|
157
160
|
|
|
158
161
|
|
|
159
162
|
|
|
@@ -244,7 +247,7 @@ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
|
244
247
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
245
248
|
|
|
246
249
|
|
|
247
|
-
var
|
|
250
|
+
var _chunkOAMUSC7Hcjs = require('./chunk-OAMUSC7H.cjs');
|
|
248
251
|
|
|
249
252
|
|
|
250
253
|
var _chunkIWFV5ZEDcjs = require('./chunk-IWFV5ZED.cjs');
|
|
@@ -714,13 +717,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkVQJYGZNXcjs.logge
|
|
|
714
717
|
// src/vite.ts
|
|
715
718
|
var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
|
|
716
719
|
function farmLlmsTxtGeneratedPaths(config) {
|
|
717
|
-
const llms =
|
|
720
|
+
const llms = _chunkH33PJEXNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _39 => _39.agent, 'optionalAccess', _40 => _40.llmsTxt]));
|
|
718
721
|
if (!llms.enabled) return [];
|
|
719
722
|
return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
|
|
720
723
|
}
|
|
721
724
|
function farmAgentGeneratedPaths(config) {
|
|
722
|
-
const crawlers =
|
|
723
|
-
const sitemap =
|
|
725
|
+
const crawlers = _chunkFFE2EMF7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _41 => _41.agent, 'optionalAccess', _42 => _42.crawlers]));
|
|
726
|
+
const sitemap = _chunkFFE2EMF7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _43 => _43.agent, 'optionalAccess', _44 => _44.sitemap]));
|
|
724
727
|
return [
|
|
725
728
|
...farmLlmsTxtGeneratedPaths(config),
|
|
726
729
|
...sitemap.enabled ? ["/sitemap.xml"] : [],
|
|
@@ -765,7 +768,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
765
768
|
return import("./workflows.cjs");
|
|
766
769
|
}
|
|
767
770
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
768
|
-
return import("./devtools-
|
|
771
|
+
return import("./devtools-TO6TAO32.cjs");
|
|
769
772
|
}
|
|
770
773
|
function loadFarmDevtoolsUIRuntime() {
|
|
771
774
|
return import("./devtools-ui-SYRUXUA7.cjs");
|
|
@@ -792,14 +795,14 @@ function farmI18nClientBridgePlugin() {
|
|
|
792
795
|
var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
|
|
793
796
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
794
797
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
795
|
-
function createFarmPlatformClientModule() {
|
|
796
|
-
return `export function platform() { return ${JSON.stringify(
|
|
798
|
+
function createFarmPlatformClientModule(platform) {
|
|
799
|
+
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
797
800
|
export function appDataDir() {
|
|
798
801
|
throw new Error("[Farm] appDataDir() is server-only. Read and write app data from a server function or API route.");
|
|
799
802
|
}
|
|
800
803
|
`;
|
|
801
804
|
}
|
|
802
|
-
function farmServerOnlyEntriesPlugin() {
|
|
805
|
+
function farmServerOnlyEntriesPlugin(options = {}) {
|
|
803
806
|
let root = process.cwd();
|
|
804
807
|
let vercelOgInstalled = false;
|
|
805
808
|
return {
|
|
@@ -813,14 +816,14 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
813
816
|
configResolved(config) {
|
|
814
817
|
root = config.root;
|
|
815
818
|
},
|
|
816
|
-
resolveId(id, importer,
|
|
817
|
-
if (id === FARM_PLATFORM_ENTRY) return _optionalChain([
|
|
818
|
-
if (!_optionalChain([
|
|
819
|
-
return _chunkNK2VWS7Pcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer,
|
|
819
|
+
resolveId(id, importer, options2) {
|
|
820
|
+
if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _46 => _46.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
|
|
821
|
+
if (!_optionalChain([options2, 'optionalAccess', _47 => _47.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
822
|
+
return _chunkNK2VWS7Pcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
820
823
|
}
|
|
821
824
|
if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
|
|
822
825
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
823
|
-
if (!_optionalChain([
|
|
826
|
+
if (!_optionalChain([options2, 'optionalAccess', _48 => _48.ssr])) {
|
|
824
827
|
this.error(
|
|
825
828
|
`${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
|
|
826
829
|
);
|
|
@@ -834,7 +837,9 @@ function farmServerOnlyEntriesPlugin() {
|
|
|
834
837
|
return null;
|
|
835
838
|
},
|
|
836
839
|
load(id) {
|
|
837
|
-
if (id === FARM_PLATFORM_CLIENT_ID)
|
|
840
|
+
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
841
|
+
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
|
|
842
|
+
}
|
|
838
843
|
return _nullishCoalesce(_chunkNK2VWS7Pcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
839
844
|
}
|
|
840
845
|
};
|
|
@@ -867,7 +872,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
|
|
|
867
872
|
if (!snapshot) return "";
|
|
868
873
|
const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
|
|
869
874
|
if (snapshot.routing === "none") return runtime;
|
|
870
|
-
return `${
|
|
875
|
+
return `${_chunkTSFMFPRUcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
|
|
871
876
|
}
|
|
872
877
|
function getPublicEnvDefine(config) {
|
|
873
878
|
const publicEnv = _optionalChain([config, 'access', _49 => _49.env, 'optionalAccess', _50 => _50.public]);
|
|
@@ -1401,7 +1406,7 @@ function hasViteAlias(alias, find) {
|
|
|
1401
1406
|
}
|
|
1402
1407
|
function farmPlugin(options = {}, initialPluginManager) {
|
|
1403
1408
|
const imageImports = farmImageImportsPlugin();
|
|
1404
|
-
const fontImports =
|
|
1409
|
+
const fontImports = _chunkTQMI6BYOcjs.farmFontImportsPlugin.call(void 0, {
|
|
1405
1410
|
root: options.root,
|
|
1406
1411
|
basePath: options.basePath,
|
|
1407
1412
|
publicDir: options.publicDir
|
|
@@ -1442,7 +1447,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1442
1447
|
config(userConfig, configEnv) {
|
|
1443
1448
|
isBuild = configEnv.command === "build";
|
|
1444
1449
|
const layerAliases = _chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, options.layers);
|
|
1445
|
-
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _83 => _83.resolve, 'optionalAccess', _84 => _84.alias]), "@") ? {} :
|
|
1450
|
+
const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _83 => _83.resolve, 'optionalAccess', _84 => _84.alias]), "@") ? {} : _chunkTQMI6BYOcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
|
|
1446
1451
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
1447
1452
|
return {
|
|
1448
1453
|
// Honor Farm's publicDir so the dev server serves the same static
|
|
@@ -1495,7 +1500,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1495
1500
|
} catch (e12) {
|
|
1496
1501
|
}
|
|
1497
1502
|
};
|
|
1498
|
-
farmApp = new (0,
|
|
1503
|
+
farmApp = new (0, _chunkTQMI6BYOcjs.FarmApp)(
|
|
1499
1504
|
{
|
|
1500
1505
|
...options,
|
|
1501
1506
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -1508,14 +1513,14 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1508
1513
|
if (_optionalChain([farmConfig, 'access', _92 => _92.agent, 'optionalAccess', _93 => _93.noindexPreviews])) {
|
|
1509
1514
|
server.middlewares.use((_req, res, next) => {
|
|
1510
1515
|
if (_chunkSGBNF56Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
1511
|
-
res.setHeader("X-Robots-Tag",
|
|
1516
|
+
res.setHeader("X-Robots-Tag", _chunkFFE2EMF7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
1512
1517
|
}
|
|
1513
1518
|
next();
|
|
1514
1519
|
});
|
|
1515
1520
|
}
|
|
1516
1521
|
const apiServerBasePath = _chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
1517
1522
|
const devBuiltInRoutePaths = new Set(
|
|
1518
|
-
|
|
1523
|
+
_chunk4SEHMBL4cjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
1519
1524
|
agent: {
|
|
1520
1525
|
apiCatalog: true,
|
|
1521
1526
|
mcp: true,
|
|
@@ -1833,7 +1838,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1833
1838
|
return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
|
|
1834
1839
|
};
|
|
1835
1840
|
releaseDocsMCPServers();
|
|
1836
|
-
const isFarmDocsPathGuarded = (href) =>
|
|
1841
|
+
const isFarmDocsPathGuarded = (href) => _chunkTSFMFPRUcjs.farmPathGuardCoversPage.call(void 0,
|
|
1837
1842
|
{
|
|
1838
1843
|
config: farmConfig,
|
|
1839
1844
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -1846,7 +1851,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1846
1851
|
clientEntry: "/@farm/client.js",
|
|
1847
1852
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
1848
1853
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
1849
|
-
globalStylesheetHref:
|
|
1854
|
+
globalStylesheetHref: _chunkTQMI6BYOcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
1850
1855
|
farmConfig.root,
|
|
1851
1856
|
farmConfig.srcDir
|
|
1852
1857
|
),
|
|
@@ -1876,7 +1881,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1876
1881
|
fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
1877
1882
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
1878
1883
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
1879
|
-
globalStylesheetHref:
|
|
1884
|
+
globalStylesheetHref: _chunkTQMI6BYOcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
1880
1885
|
farmConfig.root,
|
|
1881
1886
|
farmConfig.srcDir
|
|
1882
1887
|
),
|
|
@@ -1890,7 +1895,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1890
1895
|
const matchedRoute = routeManager.matchRoute(pathname);
|
|
1891
1896
|
const layoutEntries = matchedRoute.layouts.map((layout) => ({
|
|
1892
1897
|
...layout,
|
|
1893
|
-
metadata:
|
|
1898
|
+
metadata: _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
|
|
1894
1899
|
}));
|
|
1895
1900
|
if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
|
|
1896
1901
|
return response;
|
|
@@ -2154,9 +2159,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2154
2159
|
if (_optionalChain([pm, 'optionalAccess', _148 => _148.hasRuntimeRequestHooks, 'call', _149 => _149()])) {
|
|
2155
2160
|
try {
|
|
2156
2161
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
2157
|
-
const route =
|
|
2162
|
+
const route = _chunk4SEHMBL4cjs.setFarmRouteLabel.call(void 0,
|
|
2158
2163
|
{ pathname: requestPathname },
|
|
2159
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
2164
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk4SEHMBL4cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
2160
2165
|
);
|
|
2161
2166
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
2162
2167
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -2232,24 +2237,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2232
2237
|
);
|
|
2233
2238
|
return;
|
|
2234
2239
|
}
|
|
2235
|
-
if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.manifest]) !== false &&
|
|
2240
|
+
if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.manifest]) !== false && _chunk4SEHMBL4cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
2236
2241
|
await serveBuiltInRoute(async () => {
|
|
2237
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
2238
|
-
const manifest = await
|
|
2242
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkTQMI6BYOcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
2243
|
+
const manifest = await _chunk4SEHMBL4cjs.createFarmAppManifestResponse.call(void 0,
|
|
2239
2244
|
new Request(parsedRequestUrl, {
|
|
2240
2245
|
method: requestMethod,
|
|
2241
2246
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
2242
2247
|
}),
|
|
2243
2248
|
{
|
|
2244
|
-
...
|
|
2249
|
+
..._chunk4SEHMBL4cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
2245
2250
|
build: "development",
|
|
2246
2251
|
packages: farmAppPackages,
|
|
2247
2252
|
// Read again on each request; unchanged files come from a cache.
|
|
2248
|
-
webmcpTools: _optionalChain([farmConfig, 'access', _157 => _157.plugins, 'optionalAccess', _158 => _158.some, 'call', _159 => _159(({ name }) => name === "farm:webmcp")]) ?
|
|
2253
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _157 => _157.plugins, 'optionalAccess', _158 => _158.some, 'call', _159 => _159(({ name }) => name === "farm:webmcp")]) ? _chunkTQMI6BYOcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
2249
2254
|
}),
|
|
2250
2255
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
2251
2256
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
2252
|
-
guardCoversPath: (path6) =>
|
|
2257
|
+
guardCoversPath: (path6) => _chunkTSFMFPRUcjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
2253
2258
|
{
|
|
2254
2259
|
config: farmConfig,
|
|
2255
2260
|
middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
|
|
@@ -2263,11 +2268,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2263
2268
|
});
|
|
2264
2269
|
return;
|
|
2265
2270
|
}
|
|
2266
|
-
if (_optionalChain([options, 'access', _160 => _160.agent, 'optionalAccess', _161 => _161.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
2271
|
+
if (_optionalChain([options, 'access', _160 => _160.agent, 'optionalAccess', _161 => _161.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk4SEHMBL4cjs.FARM_API_CATALOG_PATH) {
|
|
2267
2272
|
await serveBuiltInRoute(
|
|
2268
|
-
() =>
|
|
2273
|
+
() => _chunk4SEHMBL4cjs.createFarmApiCatalogResponse.call(void 0,
|
|
2269
2274
|
requestMethod,
|
|
2270
|
-
|
|
2275
|
+
_chunk4SEHMBL4cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
2271
2276
|
new Request(parsedRequestUrl, {
|
|
2272
2277
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
2273
2278
|
})
|
|
@@ -2276,7 +2281,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2276
2281
|
return;
|
|
2277
2282
|
}
|
|
2278
2283
|
if (_optionalChain([options, 'access', _162 => _162.agent, 'optionalAccess', _163 => _163.aiCatalog]) !== false) {
|
|
2279
|
-
const aiCatalog =
|
|
2284
|
+
const aiCatalog = _chunk4SEHMBL4cjs.createFarmAiCatalogResponse.call(void 0,
|
|
2280
2285
|
new Request(parsedRequestUrl, {
|
|
2281
2286
|
method: requestMethod,
|
|
2282
2287
|
headers: {
|
|
@@ -2320,7 +2325,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2320
2325
|
{
|
|
2321
2326
|
kind: "docs",
|
|
2322
2327
|
computed: docsResponse,
|
|
2323
|
-
label:
|
|
2328
|
+
label: _chunk4SEHMBL4cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
2324
2329
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
2325
2330
|
{
|
|
2326
2331
|
path: _optionalChain([farmConfig, 'access', _164 => _164.docs, 'optionalAccess', _165 => _165.entry]) || "/docs",
|
|
@@ -2332,11 +2337,28 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2332
2337
|
return;
|
|
2333
2338
|
}
|
|
2334
2339
|
}
|
|
2335
|
-
|
|
2340
|
+
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD") && _optionalChain([req, 'access', _170 => _170.headers, 'access', _171 => _171.accept, 'optionalAccess', _172 => _172.includes, 'call', _173 => _173(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
|
|
2341
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-MMZS7S6W.cjs");
|
|
2342
|
+
const treeResponse = await createFarmNativeTreeResponse({
|
|
2343
|
+
request: new Request(fullUrl, { method: requestMethod, headers: docsHeaders }),
|
|
2344
|
+
// As for the Markdown mirror: this server's own listener, redirects not followed.
|
|
2345
|
+
renderPage: (request) => _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server)(
|
|
2346
|
+
new Request(request, {
|
|
2347
|
+
signal: res.destroyed ? AbortSignal.abort() : _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
|
|
2348
|
+
})
|
|
2349
|
+
)
|
|
2350
|
+
});
|
|
2351
|
+
await serveBuiltInRoute(() => treeResponse, {
|
|
2352
|
+
computed: treeResponse,
|
|
2353
|
+
label: _nullishCoalesce(_optionalChain([farmApp, 'access', _174 => _174.getRouteManager, 'call', _175 => _175(), 'access', _176 => _176.matchRoute, 'call', _177 => _177(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _178 => _178.route, 'optionalAccess', _179 => _179.pattern]), () => ( null))
|
|
2354
|
+
});
|
|
2355
|
+
return;
|
|
2356
|
+
}
|
|
2357
|
+
const markdownRouteLabel = () => _chunk4SEHMBL4cjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
2336
2358
|
_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
2337
|
-
(page) => _optionalChain([farmApp, 'access',
|
|
2359
|
+
(page) => _optionalChain([farmApp, 'access', _180 => _180.getRouteManager, 'call', _181 => _181(), 'access', _182 => _182.matchRoute, 'call', _183 => _183(page), 'access', _184 => _184.route, 'optionalAccess', _185 => _185.pattern])
|
|
2338
2360
|
);
|
|
2339
|
-
const markdownSourceResponse = viteModuleRequest ? null : await
|
|
2361
|
+
const markdownSourceResponse = viteModuleRequest ? null : await _chunkB3GM5I6Ncjs.createFarmMarkdownSourceResponse.call(void 0, {
|
|
2340
2362
|
request: new Request(fullUrl, {
|
|
2341
2363
|
method: requestMethod,
|
|
2342
2364
|
headers: docsHeaders
|
|
@@ -2344,7 +2366,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2344
2366
|
config: farmApp.getConfig().mdx,
|
|
2345
2367
|
resolveSource: async (pathname2) => {
|
|
2346
2368
|
const match = farmApp.getRouteManager().matchRoute(pathname2);
|
|
2347
|
-
const sourcePath = _optionalChain([match, 'access',
|
|
2369
|
+
const sourcePath = _optionalChain([match, 'access', _186 => _186.route, 'optionalAccess', _187 => _187.markdownSourcePath]) || (match.route && _chunkB3GM5I6Ncjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
|
|
2348
2370
|
if (!sourcePath) {
|
|
2349
2371
|
return null;
|
|
2350
2372
|
}
|
|
@@ -2369,7 +2391,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2369
2391
|
});
|
|
2370
2392
|
return;
|
|
2371
2393
|
}
|
|
2372
|
-
const markdownResponse = viteModuleRequest ? null : await
|
|
2394
|
+
const markdownResponse = viteModuleRequest ? null : await _chunkD7UQC4O6cjs.createMarkdownMirrorResponse.call(void 0, {
|
|
2373
2395
|
request: new Request(fullUrl, {
|
|
2374
2396
|
method: requestMethod,
|
|
2375
2397
|
headers: docsHeaders
|
|
@@ -2400,16 +2422,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2400
2422
|
});
|
|
2401
2423
|
return;
|
|
2402
2424
|
}
|
|
2403
|
-
if (!viteModuleRequest &&
|
|
2404
|
-
const markdownRoute = farmApp.getRouteManager().matchRoute(
|
|
2425
|
+
if (!viteModuleRequest && _chunkD7UQC4O6cjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
|
|
2426
|
+
const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkB3GM5I6Ncjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
|
|
2405
2427
|
if (!markdownRoute.route) {
|
|
2406
2428
|
await serveBuiltInRoute(
|
|
2407
2429
|
() => new Response(
|
|
2408
|
-
|
|
2430
|
+
_chunkD7UQC4O6cjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
|
|
2409
2431
|
{
|
|
2410
2432
|
status: 404,
|
|
2411
2433
|
headers: {
|
|
2412
|
-
"Content-Type":
|
|
2434
|
+
"Content-Type": _chunkD7UQC4O6cjs.FARM_MARKDOWN_CONTENT_TYPE,
|
|
2413
2435
|
"X-Farm-Markdown-Error": "404",
|
|
2414
2436
|
"Cache-Control": "no-store"
|
|
2415
2437
|
}
|
|
@@ -2419,7 +2441,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2419
2441
|
return;
|
|
2420
2442
|
}
|
|
2421
2443
|
}
|
|
2422
|
-
const markdownPageTarget =
|
|
2444
|
+
const markdownPageTarget = _chunkD7UQC4O6cjs.resolveMarkdownMirrorTarget.call(void 0,
|
|
2423
2445
|
farmApp.getConfig().md,
|
|
2424
2446
|
requestPathname,
|
|
2425
2447
|
{
|
|
@@ -2432,7 +2454,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2432
2454
|
if (!varyValues.some((value) => value.toLowerCase() === "accept")) {
|
|
2433
2455
|
res.setHeader("Vary", [...varyValues, "Accept"].join(", "));
|
|
2434
2456
|
}
|
|
2435
|
-
const alternatePath =
|
|
2457
|
+
const alternatePath = _chunkD7UQC4O6cjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
|
|
2436
2458
|
const alternateLink = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
|
|
2437
2459
|
const currentLink = res.getHeader("Link");
|
|
2438
2460
|
res.setHeader(
|
|
@@ -2484,7 +2506,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2484
2506
|
"beforeRequest",
|
|
2485
2507
|
(plugin) => {
|
|
2486
2508
|
const owner = _chunkCECUDGXQcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
|
|
2487
|
-
return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess',
|
|
2509
|
+
return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _188 => _188.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
|
|
2488
2510
|
},
|
|
2489
2511
|
req,
|
|
2490
2512
|
res
|
|
@@ -2520,7 +2542,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2520
2542
|
isProd: false
|
|
2521
2543
|
},
|
|
2522
2544
|
request,
|
|
2523
|
-
{ clientAddress: _optionalChain([req, 'access',
|
|
2545
|
+
{ clientAddress: _optionalChain([req, 'access', _189 => _189.socket, 'optionalAccess', _190 => _190.remoteAddress]) }
|
|
2524
2546
|
);
|
|
2525
2547
|
if (!result) {
|
|
2526
2548
|
throw new Error(`Matched integration route did not return a response`);
|
|
@@ -2584,7 +2606,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2584
2606
|
trustProxy: currentServerConfig.trustProxy
|
|
2585
2607
|
}).pathname;
|
|
2586
2608
|
const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
|
|
2587
|
-
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2609
|
+
farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _191 => _191.isFarmDocsAPIRequest, 'call', _192 => _192(requestPathname)])
|
|
2588
2610
|
);
|
|
2589
2611
|
try {
|
|
2590
2612
|
if (pm) {
|
|
@@ -2628,7 +2650,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2628
2650
|
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
2629
2651
|
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
2630
2652
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
2631
|
-
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess',
|
|
2653
|
+
const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _193 => _193.route, 'access', _194 => _194.path]) || urlPath2;
|
|
2632
2654
|
_chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
|
|
2633
2655
|
type: "route.matched",
|
|
2634
2656
|
pathname: pathname2,
|
|
@@ -2718,7 +2740,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2718
2740
|
return;
|
|
2719
2741
|
}
|
|
2720
2742
|
}
|
|
2721
|
-
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess',
|
|
2743
|
+
if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _195 => _195.isFarmDocsAPIRequest, 'call', _196 => _196(pathname2)])) {
|
|
2722
2744
|
try {
|
|
2723
2745
|
const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
|
|
2724
2746
|
const headers = new Headers();
|
|
@@ -2756,11 +2778,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2756
2778
|
};
|
|
2757
2779
|
const docsResponse = pm ? await pm.runRuntimeRequest(request, invokeDocsAPIHandler, {
|
|
2758
2780
|
kind: "docs",
|
|
2759
|
-
route:
|
|
2781
|
+
route: _chunk4SEHMBL4cjs.setFarmRouteLabel.call(void 0,
|
|
2760
2782
|
{ pathname: pathname2, pattern: apiLifecyclePayload.routePath },
|
|
2761
|
-
|
|
2762
|
-
path: _optionalChain([farmConfig, 'access',
|
|
2763
|
-
roots: _optionalChain([farmConfig, 'access',
|
|
2783
|
+
_chunk4SEHMBL4cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
2784
|
+
path: _optionalChain([farmConfig, 'access', _197 => _197.docs, 'optionalAccess', _198 => _198.entry]) || "/docs",
|
|
2785
|
+
roots: _optionalChain([farmConfig, 'access', _199 => _199.docs, 'optionalAccess', _200 => _200.roots, 'optionalAccess', _201 => _201.map, 'call', _202 => _202((root) => root.entry)])
|
|
2764
2786
|
})
|
|
2765
2787
|
)
|
|
2766
2788
|
}) : await invokeDocsAPIHandler(request);
|
|
@@ -2794,18 +2816,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2794
2816
|
res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
|
|
2795
2817
|
return;
|
|
2796
2818
|
}
|
|
2797
|
-
if (_optionalChain([req, 'access',
|
|
2819
|
+
if (_optionalChain([req, 'access', _203 => _203.url, 'optionalAccess', _204 => _204.startsWith, 'call', _205 => _205("/@")]) || _optionalChain([req, 'access', _206 => _206.url, 'optionalAccess', _207 => _207.startsWith, 'call', _208 => _208("/node_modules")])) {
|
|
2798
2820
|
return next();
|
|
2799
2821
|
}
|
|
2800
2822
|
if (shouldBypassFarmRouterForDottedPath(
|
|
2801
2823
|
requestPathname,
|
|
2802
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
2824
|
+
_optionalChain([farmApp, 'optionalAccess', _209 => _209.getRouteManager, 'call', _210 => _210()]),
|
|
2803
2825
|
[server.config.publicDir, server.config.root],
|
|
2804
2826
|
farmAgentGeneratedPaths(farmConfig)
|
|
2805
2827
|
)) {
|
|
2806
2828
|
return next();
|
|
2807
2829
|
}
|
|
2808
|
-
if (_optionalChain([req, 'access',
|
|
2830
|
+
if (_optionalChain([req, 'access', _211 => _211.url, 'optionalAccess', _212 => _212.startsWith, 'call', _213 => _213("/__farm/page-data")])) {
|
|
2809
2831
|
const urlObj = parsedRequestUrl;
|
|
2810
2832
|
const targetPath = urlObj.searchParams.get("path") || "/";
|
|
2811
2833
|
try {
|
|
@@ -2833,7 +2855,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2833
2855
|
});
|
|
2834
2856
|
let middlewareMap = /* @__PURE__ */ new Map();
|
|
2835
2857
|
let middlewareContext = /* @__PURE__ */ new Map();
|
|
2836
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
2858
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()])) {
|
|
2837
2859
|
const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
|
|
2838
2860
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
2839
2861
|
farmApp.getServerRenderer(),
|
|
@@ -2861,10 +2883,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2861
2883
|
if (pm) {
|
|
2862
2884
|
await pm.runHookParallel("afterRouteMatch", {
|
|
2863
2885
|
pathname: targetPath,
|
|
2864
|
-
matched: !!_optionalChain([match, 'optionalAccess',
|
|
2865
|
-
routePattern: _optionalChain([match, 'optionalAccess',
|
|
2866
|
-
params: _optionalChain([match, 'optionalAccess',
|
|
2867
|
-
layoutPatterns: (_optionalChain([match, 'optionalAccess',
|
|
2886
|
+
matched: !!_optionalChain([match, 'optionalAccess', _216 => _216.route]),
|
|
2887
|
+
routePattern: _optionalChain([match, 'optionalAccess', _217 => _217.route, 'optionalAccess', _218 => _218.pattern]) || null,
|
|
2888
|
+
params: _optionalChain([match, 'optionalAccess', _219 => _219.params]) || {},
|
|
2889
|
+
layoutPatterns: (_optionalChain([match, 'optionalAccess', _220 => _220.layouts]) || []).map((l) => l.pattern)
|
|
2868
2890
|
});
|
|
2869
2891
|
}
|
|
2870
2892
|
if (!match) {
|
|
@@ -2887,7 +2909,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2887
2909
|
);
|
|
2888
2910
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
2889
2911
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
2890
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
2912
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
2891
2913
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
2892
2914
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
2893
2915
|
let mergedMetadata = {};
|
|
@@ -2895,7 +2917,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2895
2917
|
layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
|
|
2896
2918
|
);
|
|
2897
2919
|
const layoutHydrationMetadata = layouts.map(
|
|
2898
|
-
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => (
|
|
2920
|
+
(layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
|
|
2899
2921
|
);
|
|
2900
2922
|
const shouldHydrateLayout = layoutHydrationMetadata.some(
|
|
2901
2923
|
(metadata) => metadata.shouldHydrate
|
|
@@ -2952,14 +2974,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2952
2974
|
mergedMetadata = await _chunk6IOZPJ3Icjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
|
|
2953
2975
|
mergedMetadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
|
|
2954
2976
|
mergedMetadata,
|
|
2955
|
-
|
|
2977
|
+
_chunkD7UQC4O6cjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
|
|
2956
2978
|
);
|
|
2957
2979
|
const routeSlots = await Promise.all(
|
|
2958
2980
|
slots.map(async (slot) => {
|
|
2959
2981
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
2960
2982
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
2961
2983
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
2962
|
-
), () => (
|
|
2984
|
+
), () => ( _chunkTQMI6BYOcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
2963
2985
|
const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
2964
2986
|
request: targetRequest,
|
|
2965
2987
|
params: slot.params,
|
|
@@ -3005,15 +3027,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3005
3027
|
);
|
|
3006
3028
|
const projectRoot = server.config.root;
|
|
3007
3029
|
const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
|
|
3008
|
-
const renderPlan =
|
|
3030
|
+
const renderPlan = _chunkTSFMFPRUcjs.createFarmRouteRenderPlan.call(void 0, {
|
|
3009
3031
|
pageShouldHydrate: shouldHydrate,
|
|
3010
3032
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
3011
3033
|
islandStrategy: hydrationIslandStrategy,
|
|
3012
3034
|
rendering: _chunkUQHIWZZ6cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
3013
3035
|
});
|
|
3014
3036
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
3015
|
-
const layoutStartIndex =
|
|
3016
|
-
|
|
3037
|
+
const layoutStartIndex = _chunkTSFMFPRUcjs.getSharedLayoutPrefixLength.call(void 0,
|
|
3038
|
+
_chunkTSFMFPRUcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
|
|
3017
3039
|
destinationLayoutPatterns
|
|
3018
3040
|
);
|
|
3019
3041
|
const renderer = farmApp.getServerRenderer();
|
|
@@ -3023,7 +3045,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3023
3045
|
middlewareContext,
|
|
3024
3046
|
() => renderer.renderNavigationFragment({
|
|
3025
3047
|
PageComponent: routeModule.default,
|
|
3026
|
-
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess',
|
|
3048
|
+
LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _221 => _221.default]),
|
|
3027
3049
|
pageProps: routeProps,
|
|
3028
3050
|
params,
|
|
3029
3051
|
layouts: layouts.map((layout, index) => ({
|
|
@@ -3094,7 +3116,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3094
3116
|
{
|
|
3095
3117
|
status: 200,
|
|
3096
3118
|
headers: {
|
|
3097
|
-
"Cache-Control":
|
|
3119
|
+
"Cache-Control": _chunkTSFMFPRUcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
|
|
3098
3120
|
"X-Farm-Navigation": "html-fragment",
|
|
3099
3121
|
Vary: "X-Farm-Layout-Chain",
|
|
3100
3122
|
[_chunkE552H232cjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
|
|
@@ -3131,21 +3153,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3131
3153
|
trustProxy: currentServerConfig.trustProxy
|
|
3132
3154
|
}).pathname;
|
|
3133
3155
|
const routeManager2 = farmApp.getRouteManager();
|
|
3134
|
-
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3135
|
-
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3136
|
-
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3137
|
-
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3138
|
-
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3139
|
-
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3140
|
-
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3141
|
-
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess',
|
|
3156
|
+
const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _222 => _222.hasHook, 'call', _223 => _223("beforeRouteMatch")]), () => ( false));
|
|
3157
|
+
const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _224 => _224.hasHook, 'call', _225 => _225("afterRouteMatch")]), () => ( false));
|
|
3158
|
+
const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _226 => _226.hasHook, 'call', _227 => _227("beforeRequest")]), () => ( false));
|
|
3159
|
+
const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _228 => _228.hasHook, 'call', _229 => _229("beforeRender")]), () => ( false));
|
|
3160
|
+
const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _230 => _230.hasHook, 'call', _231 => _231("afterResponse")]), () => ( false));
|
|
3161
|
+
const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _232 => _232.hasHook, 'call', _233 => _233("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _234 => _234.hasHook, 'call', _235 => _235("afterRender")]), () => ( false)));
|
|
3162
|
+
const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _236 => _236.hasRuntimeRequestHooks, 'call', _237 => _237()]), () => ( false));
|
|
3163
|
+
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _238 => _238.hasRuntimeHook, 'call', _239 => _239("after")]), () => ( false));
|
|
3142
3164
|
const requestedMatch = routeManager2.matchRoute(requestedPathname);
|
|
3143
3165
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
3144
3166
|
const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
3145
|
-
const mcpLabel =
|
|
3167
|
+
const mcpLabel = _chunk4SEHMBL4cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
3146
3168
|
if (mcpLabel) return mcpLabel;
|
|
3147
3169
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
3148
|
-
return routePathname ===
|
|
3170
|
+
return routePathname === _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunk46KXZBOGcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
3149
3171
|
};
|
|
3150
3172
|
let runtimeSession;
|
|
3151
3173
|
if (pm && hasRuntimeRequestHooks) {
|
|
@@ -3154,13 +3176,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3154
3176
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
3155
3177
|
{
|
|
3156
3178
|
kind: "page",
|
|
3157
|
-
route:
|
|
3179
|
+
route: _chunk4SEHMBL4cjs.setFarmRouteLabel.call(void 0,
|
|
3158
3180
|
{
|
|
3159
3181
|
pathname: requestedPathname,
|
|
3160
|
-
pattern: _optionalChain([requestedMatch, 'optionalAccess',
|
|
3161
|
-
params: _optionalChain([requestedMatch, 'optionalAccess',
|
|
3182
|
+
pattern: _optionalChain([requestedMatch, 'optionalAccess', _240 => _240.route, 'optionalAccess', _241 => _241.pattern]) || null,
|
|
3183
|
+
params: _optionalChain([requestedMatch, 'optionalAccess', _242 => _242.params]) || {}
|
|
3162
3184
|
},
|
|
3163
|
-
_optionalChain([requestedMatch, 'optionalAccess',
|
|
3185
|
+
_optionalChain([requestedMatch, 'optionalAccess', _243 => _243.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
|
|
3164
3186
|
)
|
|
3165
3187
|
}
|
|
3166
3188
|
);
|
|
@@ -3193,17 +3215,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3193
3215
|
if (pm && hasAfterRouteMatchHook) {
|
|
3194
3216
|
await pm.runHookParallel("afterRouteMatch", {
|
|
3195
3217
|
pathname,
|
|
3196
|
-
matched: !!_optionalChain([routeMatch, 'optionalAccess',
|
|
3197
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
3198
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
3199
|
-
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess',
|
|
3218
|
+
matched: !!_optionalChain([routeMatch, 'optionalAccess', _244 => _244.route]),
|
|
3219
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _245 => _245.route, 'optionalAccess', _246 => _246.pattern]) || null,
|
|
3220
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _247 => _247.params]) || {},
|
|
3221
|
+
layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _248 => _248.layouts]) || []).map((l) => l.pattern)
|
|
3200
3222
|
});
|
|
3201
3223
|
}
|
|
3202
3224
|
const renderPayload = {
|
|
3203
3225
|
pathname,
|
|
3204
3226
|
method,
|
|
3205
|
-
routePattern: _optionalChain([routeMatch, 'optionalAccess',
|
|
3206
|
-
params: _optionalChain([routeMatch, 'optionalAccess',
|
|
3227
|
+
routePattern: _optionalChain([routeMatch, 'optionalAccess', _249 => _249.route, 'optionalAccess', _250 => _250.pattern]) || null,
|
|
3228
|
+
params: _optionalChain([routeMatch, 'optionalAccess', _251 => _251.params]) || {}
|
|
3207
3229
|
};
|
|
3208
3230
|
const shouldInterceptResponse = Boolean(
|
|
3209
3231
|
pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
|
|
@@ -3225,7 +3247,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3225
3247
|
emitError: (error) => emitPluginError("response-end", error, { pathname })
|
|
3226
3248
|
}) : void 0;
|
|
3227
3249
|
try {
|
|
3228
|
-
if (_optionalChain([middlewareManager, 'optionalAccess',
|
|
3250
|
+
if (_optionalChain([middlewareManager, 'optionalAccess', _252 => _252.hasMiddleware, 'call', _253 => _253()])) {
|
|
3229
3251
|
const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
|
|
3230
3252
|
const handled = await runFarmMiddlewareWithNavigation(
|
|
3231
3253
|
farmApp.getServerRenderer(),
|
|
@@ -3235,7 +3257,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3235
3257
|
() => middlewareManager.execute(req, res)
|
|
3236
3258
|
);
|
|
3237
3259
|
if (handled) {
|
|
3238
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
3260
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _254 => _254.isEnded, 'call', _255 => _255()])) {
|
|
3239
3261
|
const duration = Date.now() - startTime;
|
|
3240
3262
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
3241
3263
|
}
|
|
@@ -3248,14 +3270,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3248
3270
|
req.url || "/",
|
|
3249
3271
|
`http://${req.headers.host || "localhost:3000"}`
|
|
3250
3272
|
).pathname;
|
|
3251
|
-
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access',
|
|
3273
|
+
const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _256 => _256.matchRoute, 'call', _257 => _257(currentPathname), 'optionalAccess', _258 => _258.route]));
|
|
3252
3274
|
await pm.runHookParallelFiltered(
|
|
3253
3275
|
"beforeRequest",
|
|
3254
3276
|
(plugin) => !hasLocalPageRoute || plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
3255
3277
|
req,
|
|
3256
3278
|
res
|
|
3257
3279
|
);
|
|
3258
|
-
if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access',
|
|
3280
|
+
if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _259 => _259.url, 'optionalAccess', _260 => _260.startsWith, 'call', _261 => _261("/")]) && !res.writableEnded) {
|
|
3259
3281
|
const destinationUrl = new URL(req.url, fullUrl);
|
|
3260
3282
|
const destinationMatch = routeManager2.matchRoute(destinationUrl.pathname);
|
|
3261
3283
|
const guarded = await pm.runRuntimeBeforeForRewrite(
|
|
@@ -3265,8 +3287,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3265
3287
|
kind: "page",
|
|
3266
3288
|
route: {
|
|
3267
3289
|
pathname: destinationUrl.pathname,
|
|
3268
|
-
pattern: _optionalChain([destinationMatch, 'optionalAccess',
|
|
3269
|
-
params: _optionalChain([destinationMatch, 'optionalAccess',
|
|
3290
|
+
pattern: _optionalChain([destinationMatch, 'optionalAccess', _262 => _262.route, 'optionalAccess', _263 => _263.pattern]) || null,
|
|
3291
|
+
params: _optionalChain([destinationMatch, 'optionalAccess', _264 => _264.params]) || {}
|
|
3270
3292
|
}
|
|
3271
3293
|
}
|
|
3272
3294
|
);
|
|
@@ -3278,8 +3300,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3278
3300
|
}
|
|
3279
3301
|
}
|
|
3280
3302
|
}
|
|
3281
|
-
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess',
|
|
3282
|
-
if (!_optionalChain([responseInterceptor, 'optionalAccess',
|
|
3303
|
+
if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _265 => _265.isEnded, 'call', _266 => _266()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
|
|
3304
|
+
if (!_optionalChain([responseInterceptor, 'optionalAccess', _267 => _267.isEnded, 'call', _268 => _268()])) {
|
|
3283
3305
|
const duration = Date.now() - startTime;
|
|
3284
3306
|
logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
|
|
3285
3307
|
}
|
|
@@ -3343,8 +3365,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3343
3365
|
if (imageModule) return imageModule;
|
|
3344
3366
|
}
|
|
3345
3367
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
|
|
3346
|
-
const renderer = _optionalChain([farmApp, 'optionalAccess',
|
|
3347
|
-
const root = _optionalChain([server, 'optionalAccess',
|
|
3368
|
+
const renderer = _optionalChain([farmApp, 'optionalAccess', _269 => _269.getConfig, 'call', _270 => _270(), 'access', _271 => _271.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
3369
|
+
const root = _optionalChain([server, 'optionalAccess', _272 => _272.config, 'access', _273 => _273.root]) || options.root;
|
|
3348
3370
|
if (isClientEnvironment(this, loadOptions)) {
|
|
3349
3371
|
return generateProgrammaticClientRouteModuleForId(
|
|
3350
3372
|
id,
|
|
@@ -3357,21 +3379,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3357
3379
|
return generateProgrammaticRouteModule(id, root, renderer);
|
|
3358
3380
|
}
|
|
3359
3381
|
if (isFarmClientVirtualId(id)) {
|
|
3360
|
-
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
3361
|
-
const renderer = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3362
|
-
const integrations = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3363
|
-
const root = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3364
|
-
const docs = _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3382
|
+
const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _274 => _274.getConfig, 'call', _275 => _275()]);
|
|
3383
|
+
const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _276 => _276.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
|
|
3384
|
+
const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _277 => _277.integrations]) || options.integrations;
|
|
3385
|
+
const root = _optionalChain([resolvedConfig, 'optionalAccess', _278 => _278.root]) || _optionalChain([server, 'optionalAccess', _279 => _279.config, 'access', _280 => _280.root]) || process.cwd();
|
|
3386
|
+
const docs = _optionalChain([resolvedConfig, 'optionalAccess', _281 => _281.docs]);
|
|
3365
3387
|
const adapterOwnsDocsRuntime = Boolean(
|
|
3366
|
-
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess',
|
|
3388
|
+
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _282 => _282.adapter, 'optionalAccess', _283 => _283.server]) && docs.adapter.react
|
|
3367
3389
|
);
|
|
3368
|
-
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3390
|
+
const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _284 => _284.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
|
|
3369
3391
|
const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
|
|
3370
|
-
_optionalChain([docs, 'optionalAccess',
|
|
3371
|
-
_optionalChain([docs, 'optionalAccess',
|
|
3392
|
+
_optionalChain([docs, 'optionalAccess', _285 => _285.enabled]) ? loadFarmDocsDevRuntime() : null,
|
|
3393
|
+
_optionalChain([docs, 'optionalAccess', _286 => _286.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
|
|
3372
3394
|
devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
|
|
3373
3395
|
]);
|
|
3374
|
-
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess',
|
|
3396
|
+
const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _287 => _287.isFarmDocsSearchEnabled, 'call', _288 => _288(docs)]), () => ( false));
|
|
3375
3397
|
const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
|
|
3376
3398
|
docsSearchEnabled,
|
|
3377
3399
|
docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
|
|
@@ -3379,10 +3401,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3379
3401
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
3380
3402
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkBPNOYILCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
3381
3403
|
const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, integrations) : [];
|
|
3382
|
-
const isolatedHydrationMode =
|
|
3383
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3404
|
+
const isolatedHydrationMode = _chunkTQMI6BYOcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
3405
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _289 => _289.experimental, 'optionalAccess', _290 => _290.isolatedClientHydration]),
|
|
3384
3406
|
{
|
|
3385
|
-
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3407
|
+
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _291 => _291.experimental, 'optionalAccess', _292 => _292.serverComponents])) === "rsc",
|
|
3386
3408
|
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
|
|
3387
3409
|
}
|
|
3388
3410
|
);
|
|
@@ -3390,32 +3412,32 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3390
3412
|
integrationProviders,
|
|
3391
3413
|
[
|
|
3392
3414
|
..._chunkCECUDGXQcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
|
|
3393
|
-
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess',
|
|
3415
|
+
..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _293 => _293.getFarmDocsDocumentNavigationMatchers, 'call', _294 => _294(docs)]), () => ( []))
|
|
3394
3416
|
],
|
|
3395
3417
|
generatedDocsSearchRuntime,
|
|
3396
3418
|
`${generatedDevtoolsClientRuntime}
|
|
3397
3419
|
${generatedDevIndicatorsClientRuntime}`,
|
|
3398
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3420
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _295 => _295.plugins]) || [],
|
|
3399
3421
|
root,
|
|
3400
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3401
|
-
_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3402
|
-
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess',
|
|
3422
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _296 => _296.srcDir]) || options.srcDir || "src",
|
|
3423
|
+
_optionalChain([resolvedConfig, 'optionalAccess', _297 => _297.publicRuntimeConfig]) || options.publicRuntimeConfig,
|
|
3424
|
+
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _298 => _298.adapter, 'optionalAccess', _299 => _299.react]) : void 0,
|
|
3403
3425
|
renderer,
|
|
3404
|
-
isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
3405
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3406
|
-
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess',
|
|
3407
|
-
|
|
3408
|
-
|
|
3426
|
+
isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _300 => _300.getRouteManager, 'call', _301 => _301(), 'access', _302 => _302.getIsolatedClientBoundaryModules, 'call', _303 => _303(root)])))), 'optionalAccess', _304 => _304.size]) > 0,
|
|
3427
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _305 => _305.trailingSlash]), () => ( false)),
|
|
3428
|
+
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _306 => _306.basePath]), () => ( "/")),
|
|
3429
|
+
_chunkTQMI6BYOcjs.generateClientCachePersistenceCode.call(void 0,
|
|
3430
|
+
_chunkTQMI6BYOcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _307 => _307.cache]))
|
|
3409
3431
|
),
|
|
3410
3432
|
_chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
3411
|
-
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess',
|
|
3433
|
+
_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _308 => _308.experimental, 'optionalAccess', _309 => _309.serverComponents])) === "islands"
|
|
3412
3434
|
);
|
|
3413
3435
|
}
|
|
3414
3436
|
if (id === "/@farm/server") {
|
|
3415
3437
|
return generateServerCode();
|
|
3416
3438
|
}
|
|
3417
3439
|
if (id === "/@farm/manifest") {
|
|
3418
|
-
const routeManager = _optionalChain([farmApp, 'optionalAccess',
|
|
3440
|
+
const routeManager = _optionalChain([farmApp, 'optionalAccess', _310 => _310.getRouteManager, 'call', _311 => _311()]);
|
|
3419
3441
|
if (!routeManager) {
|
|
3420
3442
|
return `
|
|
3421
3443
|
export const getManifest = () => ({
|
|
@@ -3428,9 +3450,9 @@ export const getManifest = () => ({
|
|
|
3428
3450
|
`;
|
|
3429
3451
|
}
|
|
3430
3452
|
const manifest = routeManager.generateClientManifest(server.config.root);
|
|
3431
|
-
const globalStylesheetHref =
|
|
3453
|
+
const globalStylesheetHref = _chunkTQMI6BYOcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
3432
3454
|
server.config.root,
|
|
3433
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3455
|
+
_optionalChain([farmApp, 'optionalAccess', _312 => _312.getConfig, 'call', _313 => _313(), 'access', _314 => _314.srcDir])
|
|
3434
3456
|
);
|
|
3435
3457
|
const fullManifest = {
|
|
3436
3458
|
clientEntry: "/@farm/client.js",
|
|
@@ -3456,11 +3478,11 @@ export const getManifest = () => ({
|
|
|
3456
3478
|
};
|
|
3457
3479
|
}
|
|
3458
3480
|
for (const layout of manifest.layouts) {
|
|
3459
|
-
const groupScope =
|
|
3481
|
+
const groupScope = _chunkTSFMFPRUcjs.getRouteGroupScope.call(void 0, layout.pattern);
|
|
3460
3482
|
fullManifest.layouts[layout.pattern] = {
|
|
3461
3483
|
modulePath: layout.modulePath,
|
|
3462
3484
|
pattern: layout.pattern,
|
|
3463
|
-
...groupScope ? { urlPattern:
|
|
3485
|
+
...groupScope ? { urlPattern: _chunkTSFMFPRUcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
|
|
3464
3486
|
shouldHydrate: layout.shouldHydrate,
|
|
3465
3487
|
islandStrategy: layout.islandStrategy,
|
|
3466
3488
|
// Islands mode: rebuilt from its server tree, so its module is never preloaded.
|
|
@@ -3486,46 +3508,46 @@ export const manifest = getManifest();
|
|
|
3486
3508
|
}
|
|
3487
3509
|
},
|
|
3488
3510
|
async transform(code, id, transformOptions) {
|
|
3489
|
-
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3511
|
+
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _315 => _315.getConfig, 'call', _316 => _316()]), () => ( options));
|
|
3490
3512
|
if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3491
3513
|
const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
|
|
3492
|
-
environment: _optionalChain([transformOptions, 'optionalAccess',
|
|
3514
|
+
environment: _optionalChain([transformOptions, 'optionalAccess', _317 => _317.ssr]) === true ? "rsc" : "client"
|
|
3493
3515
|
});
|
|
3494
3516
|
if (serverFns) {
|
|
3495
3517
|
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
3496
3518
|
code = serverFns.code;
|
|
3497
3519
|
}
|
|
3498
3520
|
}
|
|
3499
|
-
if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access',
|
|
3521
|
+
if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _318 => _318.experimental, 'optionalAccess', _319 => _319.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3500
3522
|
const file = id.split("?", 1)[0];
|
|
3501
3523
|
const actionModule = transformFarmFormActionModule({
|
|
3502
3524
|
code,
|
|
3503
3525
|
id,
|
|
3504
|
-
root: actionConfig.root || _optionalChain([server, 'optionalAccess',
|
|
3505
|
-
ssr: _optionalChain([transformOptions, 'optionalAccess',
|
|
3526
|
+
root: actionConfig.root || _optionalChain([server, 'optionalAccess', _320 => _320.config, 'access', _321 => _321.root]) || process.cwd(),
|
|
3527
|
+
ssr: _optionalChain([transformOptions, 'optionalAccess', _322 => _322.ssr]) === true,
|
|
3506
3528
|
// Parsed by file type: page components are TSX.
|
|
3507
3529
|
parse: (source) => _vite.parseSync.call(void 0, file, source).program
|
|
3508
3530
|
});
|
|
3509
3531
|
if (actionModule) return { code: actionModule, map: null };
|
|
3510
3532
|
}
|
|
3511
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3512
|
-
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess',
|
|
3513
|
-
if (
|
|
3514
|
-
const redacted =
|
|
3533
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _323 => _323.ssr])) {
|
|
3534
|
+
const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _324 => _324.getConfig, 'call', _325 => _325(), 'optionalAccess', _326 => _326.docs]));
|
|
3535
|
+
if (_chunkTQMI6BYOcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
3536
|
+
const redacted = _chunkTQMI6BYOcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
3515
3537
|
if (redacted !== null) return { code: redacted, map: null };
|
|
3516
3538
|
}
|
|
3517
3539
|
}
|
|
3518
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3519
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3520
|
-
if ((_optionalChain([currentConfig, 'access',
|
|
3540
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _327 => _327.ssr])) {
|
|
3541
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options));
|
|
3542
|
+
if ((_optionalChain([currentConfig, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
3521
3543
|
const violation = findClientServerFnViolation(code, id);
|
|
3522
3544
|
if (violation) {
|
|
3523
3545
|
this.error(formatServerFnBoundaryError(violation, id));
|
|
3524
3546
|
}
|
|
3525
3547
|
}
|
|
3526
3548
|
}
|
|
3527
|
-
if (!_optionalChain([transformOptions, 'optionalAccess',
|
|
3528
|
-
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3549
|
+
if (!_optionalChain([transformOptions, 'optionalAccess', _332 => _332.ssr]) && shouldInspectClientBoundary(id, code)) {
|
|
3550
|
+
warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _333 => _333.getConfig, 'call', _334 => _334()]), () => ( options)));
|
|
3529
3551
|
}
|
|
3530
3552
|
if (typeof imageImports.transform === "function") {
|
|
3531
3553
|
const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
|
|
@@ -3540,13 +3562,13 @@ export const manifest = getManifest();
|
|
|
3540
3562
|
id,
|
|
3541
3563
|
transformOptions
|
|
3542
3564
|
);
|
|
3543
|
-
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess',
|
|
3565
|
+
const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _335 => _335.code, 'optionalAccess', _336 => _336.toString, 'call', _337 => _337()]);
|
|
3544
3566
|
if (fontCode) {
|
|
3545
3567
|
transformedCode = fontCode;
|
|
3546
3568
|
transformed = true;
|
|
3547
3569
|
}
|
|
3548
3570
|
}
|
|
3549
|
-
if (_optionalChain([transformOptions, 'optionalAccess',
|
|
3571
|
+
if (_optionalChain([transformOptions, 'optionalAccess', _338 => _338.ssr]) && server) {
|
|
3550
3572
|
const rewrittenImports = rewriteEarlySsrRelativeImports({
|
|
3551
3573
|
code: transformedCode,
|
|
3552
3574
|
id,
|
|
@@ -3558,28 +3580,28 @@ export const manifest = getManifest();
|
|
|
3558
3580
|
transformed = true;
|
|
3559
3581
|
}
|
|
3560
3582
|
}
|
|
3561
|
-
if (
|
|
3583
|
+
if (_chunkTQMI6BYOcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
3562
3584
|
const clientBoundarySource = transformedCode;
|
|
3563
3585
|
const moduleInfo = this.getModuleInfo(id);
|
|
3564
3586
|
if (moduleInfo) {
|
|
3565
3587
|
moduleInfo.isClientComponent = true;
|
|
3566
3588
|
}
|
|
3567
|
-
transformedCode =
|
|
3589
|
+
transformedCode = _chunkTQMI6BYOcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
3568
3590
|
transformed = true;
|
|
3569
|
-
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess',
|
|
3591
|
+
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _339 => _339.getConfig, 'call', _340 => _340()]), () => ( options));
|
|
3570
3592
|
let isolatedModuleReference = null;
|
|
3571
|
-
const root = currentConfig.root || _optionalChain([server, 'optionalAccess',
|
|
3593
|
+
const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _341 => _341.config, 'access', _342 => _342.root]) || process.cwd();
|
|
3572
3594
|
const cleanId = id.split("?", 1)[0];
|
|
3573
|
-
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess',
|
|
3574
|
-
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess',
|
|
3575
|
-
if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration &&
|
|
3595
|
+
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _343 => _343.getRouteManager, 'call', _344 => _344(), 'access', _345 => _345.getIsolatedClientBoundaryModules, 'call', _346 => _346(root)])));
|
|
3596
|
+
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _347 => _347.has, 'call', _348 => _348(path5.resolve(cleanId))]) === true;
|
|
3597
|
+
if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkTQMI6BYOcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
|
|
3576
3598
|
isolatedModuleReference = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
3577
3599
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
3578
3600
|
code: transformedCode,
|
|
3579
3601
|
moduleReference: isolatedModuleReference,
|
|
3580
|
-
islandStrategy: _nullishCoalesce(
|
|
3602
|
+
islandStrategy: _nullishCoalesce(_chunkTQMI6BYOcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
3581
3603
|
parse: (source) => this.parse(source),
|
|
3582
|
-
slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access',
|
|
3604
|
+
slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _349 => _349.experimental, 'optionalAccess', _350 => _350.serverComponents])) === "islands"
|
|
3583
3605
|
});
|
|
3584
3606
|
if (!transformedBoundary) {
|
|
3585
3607
|
this.error(
|
|
@@ -3609,7 +3631,7 @@ export const manifest = getManifest();
|
|
|
3609
3631
|
);
|
|
3610
3632
|
return;
|
|
3611
3633
|
}` : "";
|
|
3612
|
-
const hmrCode = _optionalChain([transformOptions, 'optionalAccess',
|
|
3634
|
+
const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _351 => _351.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
|
|
3613
3635
|
if (import.meta.hot) {
|
|
3614
3636
|
import.meta.hot.accept((newModule) => {
|
|
3615
3637
|
${isolatedHmrUpdate}
|
|
@@ -3664,14 +3686,14 @@ if (import.meta.hot) {
|
|
|
3664
3686
|
}
|
|
3665
3687
|
_chunkVQJYGZNXcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
|
|
3666
3688
|
_chunkVQJYGZNXcjs.logger.info("Pre-rendering SSG pages...");
|
|
3667
|
-
const outDir = path5.join(_optionalChain([server, 'optionalAccess',
|
|
3689
|
+
const outDir = path5.join(_optionalChain([server, 'optionalAccess', _352 => _352.config, 'access', _353 => _353.root]) || process.cwd(), options.outDir || "dist");
|
|
3668
3690
|
const clientDir = path5.join(outDir, "client");
|
|
3669
3691
|
for (const page of ssgPages) {
|
|
3670
3692
|
try {
|
|
3671
3693
|
const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
|
|
3672
3694
|
await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
|
|
3673
3695
|
const mod = await routeManager.loadRouteModule(page.filePath);
|
|
3674
|
-
if (!_optionalChain([mod, 'optionalAccess',
|
|
3696
|
+
if (!_optionalChain([mod, 'optionalAccess', _354 => _354.default])) return;
|
|
3675
3697
|
const { layouts } = routeManager.matchRoute(page.urlPath);
|
|
3676
3698
|
const layoutModules = await Promise.all(
|
|
3677
3699
|
layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
|
|
@@ -3703,7 +3725,7 @@ if (import.meta.hot) {
|
|
|
3703
3725
|
const i18nSnapshot = _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, );
|
|
3704
3726
|
const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
|
|
3705
3727
|
const fullHtml = `<!DOCTYPE html>
|
|
3706
|
-
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess',
|
|
3728
|
+
<html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _355 => _355.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
|
|
3707
3729
|
<head>
|
|
3708
3730
|
<meta charset="utf-8">
|
|
3709
3731
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
@@ -3761,13 +3783,13 @@ if (import.meta.hot) {
|
|
|
3761
3783
|
});
|
|
3762
3784
|
}
|
|
3763
3785
|
}
|
|
3764
|
-
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess',
|
|
3786
|
+
const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _356 => _356.getConfig, 'call', _357 => _357()]);
|
|
3765
3787
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
3766
3788
|
if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
|
|
3767
3789
|
(appDir) => normalizedFile.startsWith(`${_chunkVQJYGZNXcjs.toPosixPath.call(void 0, appDir)}/api/`)
|
|
3768
3790
|
)) {
|
|
3769
3791
|
for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
|
|
3770
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3792
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _358 => _358(`updated ${file}`)]);
|
|
3771
3793
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
3772
3794
|
return [];
|
|
3773
3795
|
}
|
|
@@ -3777,7 +3799,7 @@ if (import.meta.hot) {
|
|
|
3777
3799
|
for (const mod of modules) {
|
|
3778
3800
|
server2.moduleGraph.invalidateModule(mod);
|
|
3779
3801
|
}
|
|
3780
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3802
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _359 => _359(`updated ${file}`)]);
|
|
3781
3803
|
server2.ws.send({
|
|
3782
3804
|
type: "full-reload",
|
|
3783
3805
|
path: "*"
|
|
@@ -3790,7 +3812,7 @@ if (import.meta.hot) {
|
|
|
3790
3812
|
for (const mod of modules) {
|
|
3791
3813
|
server2.moduleGraph.invalidateModule(mod);
|
|
3792
3814
|
}
|
|
3793
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3815
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _360 => _360(`updated ${file}`)]);
|
|
3794
3816
|
server2.ws.send({
|
|
3795
3817
|
type: "full-reload",
|
|
3796
3818
|
path: "*"
|
|
@@ -3798,12 +3820,12 @@ if (import.meta.hot) {
|
|
|
3798
3820
|
return [];
|
|
3799
3821
|
}
|
|
3800
3822
|
if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
|
|
3801
|
-
await _optionalChain([refreshRouteDiscovery, 'optionalCall',
|
|
3823
|
+
await _optionalChain([refreshRouteDiscovery, 'optionalCall', _361 => _361(`updated ${file}`)]);
|
|
3802
3824
|
}
|
|
3803
|
-
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
3804
|
-
const planRouteManager = _optionalChain([farmApp, 'optionalAccess',
|
|
3825
|
+
const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _362 => _362.experimental, 'optionalAccess', _363 => _363.isolatedClientHydration]);
|
|
3826
|
+
const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _364 => _364.getRouteManager, 'call', _365 => _365()]);
|
|
3805
3827
|
const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
|
|
3806
|
-
const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess',
|
|
3828
|
+
const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _366 => _366.renderer])) && planRouteManager !== void 0;
|
|
3807
3829
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
3808
3830
|
const routeManager = planRouteManager;
|
|
3809
3831
|
if (routeManager) {
|
|
@@ -3863,7 +3885,7 @@ if (import.meta.hot) {
|
|
|
3863
3885
|
}
|
|
3864
3886
|
return [];
|
|
3865
3887
|
}
|
|
3866
|
-
_optionalChain([farmApp, 'optionalAccess',
|
|
3888
|
+
_optionalChain([farmApp, 'optionalAccess', _367 => _367.getRouteManager, 'call', _368 => _368(), 'access', _369 => _369.invalidateClientManifest, 'call', _370 => _370()]);
|
|
3867
3889
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
3868
3890
|
if (manifestModule) {
|
|
3869
3891
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -3919,12 +3941,12 @@ function isFarmClientVirtualId(id) {
|
|
|
3919
3941
|
}
|
|
3920
3942
|
function isClientEnvironment(context, loadOptions) {
|
|
3921
3943
|
const environment = context.environment;
|
|
3922
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
3923
|
-
if (_optionalChain([environment, 'optionalAccess',
|
|
3924
|
-
return _optionalChain([loadOptions, 'optionalAccess',
|
|
3944
|
+
if (_optionalChain([environment, 'optionalAccess', _371 => _371.config, 'optionalAccess', _372 => _372.consumer])) return environment.config.consumer === "client";
|
|
3945
|
+
if (_optionalChain([environment, 'optionalAccess', _373 => _373.name])) return environment.name === "client";
|
|
3946
|
+
return _optionalChain([loadOptions, 'optionalAccess', _374 => _374.ssr]) !== true;
|
|
3925
3947
|
}
|
|
3926
3948
|
function invalidateProgrammaticClientRouteModules(server) {
|
|
3927
|
-
const graph = _optionalChain([server, 'access',
|
|
3949
|
+
const graph = _optionalChain([server, 'access', _375 => _375.environments, 'optionalAccess', _376 => _376.client, 'optionalAccess', _377 => _377.moduleGraph]);
|
|
3928
3950
|
if (!graph) return;
|
|
3929
3951
|
for (const [id, module] of graph.idToModuleMap) {
|
|
3930
3952
|
if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
|
|
@@ -3938,7 +3960,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
3938
3960
|
kind: parsed.kind,
|
|
3939
3961
|
routePath: parsed.routePath,
|
|
3940
3962
|
routesFile,
|
|
3941
|
-
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess',
|
|
3963
|
+
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _378 => _378.routes, 'access', _379 => _379.get, 'call', _380 => _380(
|
|
3942
3964
|
_chunkNK2VWS7Pcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
3943
3965
|
)]),
|
|
3944
3966
|
rendererServer: renderer.server,
|
|
@@ -3946,7 +3968,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
3946
3968
|
});
|
|
3947
3969
|
}
|
|
3948
3970
|
function resolveRealModuleFile(filePath, root) {
|
|
3949
|
-
const resolved = _nullishCoalesce(
|
|
3971
|
+
const resolved = _nullishCoalesce(_chunkTQMI6BYOcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
3950
3972
|
try {
|
|
3951
3973
|
return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
3952
3974
|
} catch (e15) {
|
|
@@ -4260,12 +4282,12 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
4260
4282
|
}
|
|
4261
4283
|
const schemas = routeModule.__farmRouteSchemas;
|
|
4262
4284
|
const params = parseRouteModuleSchema(
|
|
4263
|
-
_optionalChain([schemas, 'optionalAccess',
|
|
4285
|
+
_optionalChain([schemas, 'optionalAccess', _381 => _381.params]),
|
|
4264
4286
|
input.props.params,
|
|
4265
4287
|
"params",
|
|
4266
4288
|
input.routePath
|
|
4267
4289
|
);
|
|
4268
|
-
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess',
|
|
4290
|
+
const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _382 => _382.search]), input.search, "search", input.routePath);
|
|
4269
4291
|
return {
|
|
4270
4292
|
...input.props,
|
|
4271
4293
|
params,
|
|
@@ -4285,12 +4307,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
4285
4307
|
}
|
|
4286
4308
|
}
|
|
4287
4309
|
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkRD623KW4cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
4288
|
-
const providerClientCode =
|
|
4310
|
+
const providerClientCode = _chunkTQMI6BYOcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
4289
4311
|
integrationProviders,
|
|
4290
4312
|
root,
|
|
4291
4313
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
4292
4314
|
);
|
|
4293
|
-
const clientPluginEntry =
|
|
4315
|
+
const clientPluginEntry = _chunkTQMI6BYOcjs.generateFarmClientPluginEntryCode.call(void 0,
|
|
4294
4316
|
plugins,
|
|
4295
4317
|
root,
|
|
4296
4318
|
srcDir,
|
|
@@ -4338,7 +4360,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
4338
4360
|
return null;
|
|
4339
4361
|
}
|
|
4340
4362
|
}
|
|
4341
|
-
${islandValues ? `${
|
|
4363
|
+
${islandValues ? `${_chunkTQMI6BYOcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
4342
4364
|
let farmLastRouteState = null;
|
|
4343
4365
|
|
|
4344
4366
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -5147,7 +5169,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
5147
5169
|
return loadedLayouts;
|
|
5148
5170
|
}
|
|
5149
5171
|
|
|
5150
|
-
${
|
|
5172
|
+
${_chunkTQMI6BYOcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
5151
5173
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
5152
5174
|
let wrapped = element;
|
|
5153
5175
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -6003,7 +6025,7 @@ function generateClientManifest(bundle) {
|
|
|
6003
6025
|
async function defineConfig(config = {}) {
|
|
6004
6026
|
const tailwindVitePlugin = await _chunkLNM57D3Hcjs.loadTailwindVitePlugin.call(void 0, );
|
|
6005
6027
|
const appRoot = path5.resolve(config.root || process.cwd());
|
|
6006
|
-
if (_optionalChain([config, 'access',
|
|
6028
|
+
if (_optionalChain([config, 'access', _383 => _383.extends, 'optionalAccess', _384 => _384.length])) {
|
|
6007
6029
|
const { config: layeredConfig } = await import("./layers-DMRXRL7F.cjs").then(
|
|
6008
6030
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
6009
6031
|
root: appRoot,
|
|
@@ -6013,7 +6035,7 @@ async function defineConfig(config = {}) {
|
|
|
6013
6035
|
config = layeredConfig;
|
|
6014
6036
|
}
|
|
6015
6037
|
config.renderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
6016
|
-
config.images =
|
|
6038
|
+
config.images = _chunkTQMI6BYOcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
6017
6039
|
const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
6018
6040
|
ssr: true
|
|
6019
6041
|
});
|
|
@@ -6105,13 +6127,13 @@ async function defineConfig(config = {}) {
|
|
|
6105
6127
|
if (!serverStarted) {
|
|
6106
6128
|
serverStarted = true;
|
|
6107
6129
|
const elapsed = Date.now() - startTime;
|
|
6108
|
-
const address = _optionalChain([server, 'access',
|
|
6130
|
+
const address = _optionalChain([server, 'access', _385 => _385.httpServer, 'optionalAccess', _386 => _386.address, 'call', _387 => _387()]);
|
|
6109
6131
|
const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
|
|
6110
6132
|
const hostConfig = server.config.server.host;
|
|
6111
6133
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
6112
6134
|
console.log("");
|
|
6113
6135
|
console.log(
|
|
6114
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
6136
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkOAMUSC7Hcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
6115
6137
|
);
|
|
6116
6138
|
console.log("");
|
|
6117
6139
|
console.log(
|
|
@@ -6145,7 +6167,7 @@ async function defineConfig(config = {}) {
|
|
|
6145
6167
|
plugins: [
|
|
6146
6168
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
6147
6169
|
_chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
6148
|
-
|
|
6170
|
+
_chunkTQMI6BYOcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
6149
6171
|
tailwindVitePlugin,
|
|
6150
6172
|
...rendererVitePlugins,
|
|
6151
6173
|
...reactRefreshPlugins,
|
|
@@ -6159,8 +6181,8 @@ async function defineConfig(config = {}) {
|
|
|
6159
6181
|
customLogger: farmLogger,
|
|
6160
6182
|
clearScreen: false,
|
|
6161
6183
|
optimizeDeps: {
|
|
6162
|
-
...
|
|
6163
|
-
|
|
6184
|
+
..._chunkTQMI6BYOcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
6185
|
+
_chunkTQMI6BYOcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
6164
6186
|
appRoot,
|
|
6165
6187
|
_chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
6166
6188
|
),
|
|
@@ -6203,7 +6225,7 @@ async function defineConfig(config = {}) {
|
|
|
6203
6225
|
// Stub out problematic server-only modules during dev mode
|
|
6204
6226
|
alias: {
|
|
6205
6227
|
..._chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
6206
|
-
...
|
|
6228
|
+
..._chunkTQMI6BYOcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
6207
6229
|
// Nitro internals that should not be resolved in browser
|
|
6208
6230
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
6209
6231
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|