@farm.js/core 0.2.3 → 0.2.4
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.d-gI3ahrF6.d.mts → agent-mcp.d-CaJJsAVy.d.mts} +1 -1
- package/dist/{agent-mcp.d-DuZjglYX.d.ts → agent-mcp.d-klsG_XKS.d.ts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/{analyzer-7TNBOI3J.mjs → analyzer-CY7BS4GB.mjs} +2 -2
- package/dist/analyzer-KHCOL6JF.cjs +17 -0
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/{app-manifest.d-bHK9EGPI.d.mts → app-manifest.d-BIdn8Whr.d.mts} +1 -1
- package/dist/{app-manifest.d-B3h89j6a.d.ts → app-manifest.d-DkIbmExG.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{app.d-C3uyET_L.d.ts → app.d-DhZ61V9X.d.ts} +8 -5
- package/dist/{app.d-Cr7fXGvJ.d.mts → app.d-DnqxbvCI.d.mts} +8 -5
- package/dist/{chunk-JJUHUPRB.cjs → chunk-6UBGXEIH.cjs} +2 -2
- package/dist/{chunk-TAXZQNFZ.cjs → chunk-76ES7BCO.cjs} +64 -59
- package/dist/{chunk-HOBCEE5J.mjs → chunk-7FNKBP3J.mjs} +185 -28
- package/dist/{chunk-CIRC2LRP.mjs → chunk-7IM2MKRK.mjs} +1 -1
- package/dist/{chunk-YPPAYYSX.cjs → chunk-7Q6KUXH6.cjs} +54 -23
- package/dist/{chunk-WFL7CD5C.cjs → chunk-AMSX2U4D.cjs} +304 -7
- package/dist/{chunk-CTHQE7DO.mjs → chunk-AOSZIHL7.mjs} +1 -1
- package/dist/chunk-APVJJCMB.mjs +547 -0
- package/dist/{chunk-IPKL7L6B.mjs → chunk-BCIUG6EQ.mjs} +2 -2
- package/dist/{chunk-KJMRW3IP.mjs → chunk-BUIZTM3Q.mjs} +1 -1
- package/dist/{chunk-GWFNJLDN.cjs → chunk-BY5VQ57W.cjs} +6 -6
- package/dist/{chunk-VZRY3CL5.mjs → chunk-CQ5LVPBL.mjs} +1 -1
- package/dist/{chunk-2FKGY2ZS.mjs → chunk-CV7C75LN.mjs} +1 -1
- package/dist/{chunk-RS4QZOFK.mjs → chunk-D4DAL7KK.mjs} +34 -3
- package/dist/{chunk-XGBDRC5B.mjs → chunk-DR65XXXD.mjs} +1 -1
- package/dist/{chunk-C2J5LMH6.cjs → chunk-EZRB5N6S.cjs} +1 -1
- package/dist/{chunk-K7RXZ77U.cjs → chunk-JEJXSTYR.cjs} +2 -2
- package/dist/{chunk-6QWBZGGP.cjs → chunk-JRPCCBGL.cjs} +447 -289
- package/dist/{chunk-A4WDDASS.cjs → chunk-KHTDVXXR.cjs} +2 -2
- package/dist/{chunk-XLJ2REOI.cjs → chunk-LJZZDRD5.cjs} +138 -131
- package/dist/{chunk-SO4USIKL.cjs → chunk-PVR63WHW.cjs} +4 -4
- package/dist/{chunk-H7DAFRYR.cjs → chunk-T2VXOAC3.cjs} +4 -4
- package/dist/{chunk-IQQ3SWH6.mjs → chunk-UIBCPZFO.mjs} +16 -9
- package/dist/{chunk-ERY4VYUH.mjs → chunk-XEOIZ4QC.mjs} +1 -1
- package/dist/{chunk-F6JSVP5C.cjs → chunk-Y7FLPQSL.cjs} +3 -3
- package/dist/{chunk-6YOMQ4GX.mjs → chunk-YR7ZI57S.mjs} +14 -9
- package/dist/{client-component.d-BavTzqsn.d.ts → client-component.d-BHE9Ns8s.d.ts} +1 -1
- package/dist/{client-component.d-X3j9FOZ2.d.mts → client-component.d-uya-qDZu.d.mts} +1 -1
- package/dist/{client-plugins.d-DnnAopKG.d.mts → client-plugins.d-CqFAvu-W.d.mts} +38 -1
- package/dist/{client-plugins.d-CqTr5IrQ.d.ts → client-plugins.d-Dp89a9Gf.d.ts} +38 -1
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-VPFBH6I2.mjs → devtools-CRZCFRRL.mjs} +1 -1
- package/dist/{devtools-YTND2OWT.cjs → devtools-ZHYYPMZ3.cjs} +2 -2
- package/dist/docs.cjs +3 -3
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +2 -2
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{handler.d-BSlpYCDB.d.mts → handler.d-BgJGywnq.d.mts} +1 -1
- package/dist/{handler.d-DgX7gPO6.d.ts → handler.d-DHxaRQr7.d.ts} +1 -1
- package/dist/{headers.d-CmxW42R2.d.ts → headers.d-DVm2BMtR.d.ts} +1 -1
- package/dist/{headers.d-Cf8l5LMo.d.mts → headers.d-QrzpChrN.d.mts} +1 -1
- package/dist/index.cjs +13 -13
- package/dist/{index.d-BZZt7kxO.d.ts → index.d-B8lXhfTs.d.ts} +1 -1
- package/dist/{index.d-7xoJqKRZ.d.mts → index.d-Bpu1TV0-.d.mts} +1 -1
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/index.mjs +12 -12
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +14 -14
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +13 -13
- package/dist/internal/cli-runtime.cjs +3 -3
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +2 -2
- 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 +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +3 -3
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +4 -4
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +3 -3
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/{mount.d-CD-xVBu7.d.ts → mount.d-Cw_75kb9.d.ts} +1 -1
- package/dist/{mount.d-Dd0xeRMl.d.mts → mount.d-CyfNKOHK.d.mts} +1 -1
- package/dist/{navigation-delegate.d-Bses_F-y.d.ts → navigation-delegate.d--imR0rY7.d.ts} +1 -1
- package/dist/{navigation-delegate.d-dBNg976E.d.mts → navigation-delegate.d-DVEtyGYw.d.mts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/plugin.cjs +9 -9
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +8 -8
- package/dist/{render-plan.d-vOdZHHLI.d.mts → render-plan.d-CTehM6y8.d.mts} +1 -1
- package/dist/{render-plan.d-DaIwnRK2.d.ts → render-plan.d-DpxLd_1i.d.ts} +1 -1
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/{request.d-CgXp3EEc.d.ts → request.d-BFXzOr32.d.ts} +1 -1
- package/dist/{request.d-B8U4pVFP.d.mts → request.d-BmQzlKtT.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-Di0AxFix.d.ts → route-rendering.d-bEil1VkF.d.ts} +1 -1
- package/dist/{route-rendering.d-BQvNYQqu.d.mts → route-rendering.d-geg68qd0.d.mts} +1 -1
- package/dist/{router.d-BJVGhSAJ.d.ts → router.d-4OCT2ak5.d.ts} +1 -1
- package/dist/{router.d-hNedVdoB.d.mts → router.d-CQjEcNih.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-2JSNRVIL.mjs → rsc-pipeline-JISGZS6G.mjs} +2 -2
- package/dist/{rsc-pipeline-WTKDMTE2.cjs → rsc-pipeline-R5W3PAAL.cjs} +3 -3
- package/dist/{runtime-I4GV4CDP.cjs → runtime-HSTND4FF.cjs} +4 -4
- package/dist/{runtime-RNSTQY27.mjs → runtime-I2SBIB2Q.mjs} +2 -2
- package/dist/{runtime.d-0R8nHCM6.d.ts → runtime.d-BKoa6J55.d.ts} +1 -1
- package/dist/{runtime.d-DpeuF_T-.d.mts → runtime.d-DjYo5E1n.d.mts} +1 -1
- package/dist/{schema-dependencies.d-_Wyey4Wv.d.mts → schema-dependencies.d-CGNgsyKS.d.mts} +1 -1
- package/dist/{schema-dependencies.d-tkUHREqz.d.ts → schema-dependencies.d-CRoN2Q9N.d.ts} +1 -1
- package/dist/{server-components-status.d-sN7ju-ie.d.mts → server-components-status.d-Crl3IonP.d.mts} +1 -1
- package/dist/{server-components-status.d-B2Z5WvO5.d.ts → server-components-status.d-CwfcQD6n.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +30 -30
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +10 -10
- package/dist/{spa-router.d-MjT6sGb9.d.ts → spa-router.d-Bv-r3AAK.d.ts} +2 -2
- package/dist/{spa-router.d-D3AtR2Bc.d.mts → spa-router.d-DhO_PJHP.d.mts} +2 -2
- package/dist/{ssg.d-C1SNuPz5.d.ts → ssg.d-CzFOAkqy.d.mts} +13 -2
- package/dist/{ssg.d-B32Cp_XW.d.mts → ssg.d-SfEQfMsA.d.ts} +13 -2
- package/dist/{store-core.d-BZ3YXs70.d.ts → store-core.d-Ch0N8dni.d.ts} +2 -2
- package/dist/{store-core.d-BbVdaoA0.d.mts → store-core.d-pKJCUdTR.d.mts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils.d-Bjbm44fP.d.ts → utils.d-BaLODLrK.d.ts} +1 -1
- package/dist/{utils.d-CoLozp7-.d.mts → utils.d-TPjb_Q7w.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +9 -9
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +8 -8
- package/package.json +2 -2
- package/dist/analyzer-5RSMYPWD.cjs +0 -17
- package/dist/chunk-4WCEWA22.mjs +0 -251
- /package/dist/{chunk-MVNIAD6O.mjs → chunk-3QC2XTCN.mjs} +0 -0
- /package/dist/{chunk-2LGM5WIK.cjs → chunk-GDKJGL7D.cjs} +0 -0
|
@@ -44,7 +44,7 @@ var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunk76ES7BCOcjs = require('./chunk-76ES7BCO.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
@@ -59,10 +59,10 @@ var _chunk5B2Y4EVScjs = require('./chunk-5B2Y4EVS.cjs');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunk7Q6KUXH6cjs = require('./chunk-7Q6KUXH6.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunkT2VXOAC3cjs = require('./chunk-T2VXOAC3.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -89,13 +89,13 @@ var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunkPVR63WHWcjs = require('./chunk-PVR63WHW.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunk6UBGXEIHcjs = require('./chunk-6UBGXEIH.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
@@ -148,7 +148,7 @@ var _chunkSIQPXYBBcjs = require('./chunk-SIQPXYBB.cjs');
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
var
|
|
151
|
+
var _chunkBY5VQ57Wcjs = require('./chunk-BY5VQ57W.cjs');
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
|
|
@@ -322,7 +322,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
|
|
|
322
322
|
var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
|
|
323
323
|
|
|
324
324
|
|
|
325
|
-
var
|
|
325
|
+
var _chunkEZRB5N6Scjs = require('./chunk-EZRB5N6S.cjs');
|
|
326
326
|
|
|
327
327
|
|
|
328
328
|
var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
|
|
@@ -739,7 +739,7 @@ function findClientServerFnViolation(code, id) {
|
|
|
739
739
|
return null;
|
|
740
740
|
}
|
|
741
741
|
function createServerFnBoundaryDiagnostic(violation, id, location) {
|
|
742
|
-
return
|
|
742
|
+
return _chunkBY5VQ57Wcjs.createFarmDiagnostic.call(void 0,
|
|
743
743
|
"CLIENT_SERVER_FUNCTION",
|
|
744
744
|
id,
|
|
745
745
|
`${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
|
|
@@ -999,21 +999,21 @@ function readPropertyKey(property) {
|
|
|
999
999
|
function createClientBoundaryDiagnostic(file, finding, location) {
|
|
1000
1000
|
switch (finding.kind) {
|
|
1001
1001
|
case "server-env":
|
|
1002
|
-
return
|
|
1002
|
+
return _chunkBY5VQ57Wcjs.createFarmDiagnostic.call(void 0,
|
|
1003
1003
|
"CLIENT_SERVER_ENV",
|
|
1004
1004
|
file,
|
|
1005
1005
|
`process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
|
|
1006
1006
|
location
|
|
1007
1007
|
);
|
|
1008
1008
|
case "public-env":
|
|
1009
|
-
return
|
|
1009
|
+
return _chunkBY5VQ57Wcjs.createFarmDiagnostic.call(void 0,
|
|
1010
1010
|
"CLIENT_PROCESS_ENV_PUBLIC",
|
|
1011
1011
|
file,
|
|
1012
1012
|
`process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
|
|
1013
1013
|
location
|
|
1014
1014
|
);
|
|
1015
1015
|
case "builtin":
|
|
1016
|
-
return
|
|
1016
|
+
return _chunkBY5VQ57Wcjs.createFarmDiagnostic.call(void 0,
|
|
1017
1017
|
"CLIENT_NODE_BUILTIN",
|
|
1018
1018
|
file,
|
|
1019
1019
|
`"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
|
|
@@ -1320,7 +1320,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1320
1320
|
return import("./workflows.cjs");
|
|
1321
1321
|
}
|
|
1322
1322
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1323
|
-
return import("./devtools-
|
|
1323
|
+
return import("./devtools-ZHYYPMZ3.cjs");
|
|
1324
1324
|
}
|
|
1325
1325
|
function loadFarmDevtoolsUIRuntime() {
|
|
1326
1326
|
return import("./devtools-ui-TPBPQEEB.cjs");
|
|
@@ -1370,16 +1370,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
|
1370
1370
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1371
1371
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1372
1372
|
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1373
|
-
|
|
1374
|
-
new RegExp(`^${
|
|
1373
|
+
_chunk76ES7BCOcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1374
|
+
new RegExp(`^${_chunkBY5VQ57Wcjs.FARM_RESOLVE_FROM_PREFIX}`),
|
|
1375
1375
|
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1376
1376
|
// included.
|
|
1377
1377
|
/^node:/,
|
|
1378
|
-
|
|
1378
|
+
_chunk76ES7BCOcjs.exactIdPattern.call(void 0, _module.builtinModules)
|
|
1379
1379
|
];
|
|
1380
1380
|
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1381
|
-
|
|
1382
|
-
new RegExp(`^${
|
|
1381
|
+
_chunk76ES7BCOcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1382
|
+
new RegExp(`^${_chunkBY5VQ57Wcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1383
1383
|
];
|
|
1384
1384
|
function createFarmPlatformClientModule(platform) {
|
|
1385
1385
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
@@ -1415,7 +1415,7 @@ function farmIslandContainersPlugin(config) {
|
|
|
1415
1415
|
// without calling into JavaScript.
|
|
1416
1416
|
filter: {
|
|
1417
1417
|
id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
|
|
1418
|
-
code:
|
|
1418
|
+
code: _chunkBY5VQ57Wcjs.FARM_ISLAND_CONTAINER_TAG
|
|
1419
1419
|
},
|
|
1420
1420
|
handler(code, id) {
|
|
1421
1421
|
if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "islands") {
|
|
@@ -1424,20 +1424,20 @@ function farmIslandContainersPlugin(config) {
|
|
|
1424
1424
|
if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
|
|
1425
1425
|
return null;
|
|
1426
1426
|
}
|
|
1427
|
-
if (
|
|
1428
|
-
if (!
|
|
1427
|
+
if (_chunkBY5VQ57Wcjs.hasUseClientDirective.call(void 0, code)) return null;
|
|
1428
|
+
if (!_chunkBY5VQ57Wcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
|
|
1429
1429
|
const file = id.split("?", 1)[0];
|
|
1430
|
-
const inspect = () =>
|
|
1430
|
+
const inspect = () => _chunkBY5VQ57Wcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
|
|
1431
1431
|
const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
|
|
1432
1432
|
if (bindings.length === 0) return null;
|
|
1433
|
-
const grown =
|
|
1433
|
+
const grown = _chunkBY5VQ57Wcjs.wrapFarmIslandContainers.call(void 0, {
|
|
1434
1434
|
code,
|
|
1435
1435
|
file,
|
|
1436
1436
|
bindings,
|
|
1437
|
-
reference:
|
|
1437
|
+
reference: _chunkBY5VQ57Wcjs.farmIslandContainerReferencePath.call(void 0, root)
|
|
1438
1438
|
});
|
|
1439
1439
|
if (grown === null) return null;
|
|
1440
|
-
|
|
1440
|
+
_chunkBY5VQ57Wcjs.ensureFarmIslandContainerReference.call(void 0, root);
|
|
1441
1441
|
return { code: grown, map: null };
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
@@ -1452,18 +1452,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1452
1452
|
config(config) {
|
|
1453
1453
|
const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
|
|
1454
1454
|
if (options.distDir) {
|
|
1455
|
-
|
|
1455
|
+
_chunkBY5VQ57Wcjs.usePackageScanCacheFile.call(void 0,
|
|
1456
1456
|
path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
|
|
1457
1457
|
);
|
|
1458
1458
|
}
|
|
1459
|
-
const bundledPackages =
|
|
1459
|
+
const bundledPackages = _chunkBY5VQ57Wcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
|
|
1460
1460
|
const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
|
|
1461
|
-
|
|
1461
|
+
_chunkBY5VQ57Wcjs.persistPackageScanCache.call(void 0, );
|
|
1462
1462
|
return {
|
|
1463
1463
|
optimizeDeps: {
|
|
1464
1464
|
// A package that defines fonts is served unbundled, so Farm's font compiler sees it.
|
|
1465
1465
|
exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
|
|
1466
|
-
rolldownOptions: { plugins: [
|
|
1466
|
+
rolldownOptions: { plugins: [_chunkBY5VQ57Wcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
|
|
1467
1467
|
},
|
|
1468
1468
|
ssr: {
|
|
1469
1469
|
noExternal: [
|
|
@@ -1489,8 +1489,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1489
1489
|
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1490
1490
|
}
|
|
1491
1491
|
this.error(
|
|
1492
|
-
|
|
1493
|
-
|
|
1492
|
+
_chunkBY5VQ57Wcjs.formatFarmDiagnostic.call(void 0,
|
|
1493
|
+
_chunkBY5VQ57Wcjs.createFarmDiagnostic.call(void 0,
|
|
1494
1494
|
"CLIENT_SERVER_ONLY_IMPORT",
|
|
1495
1495
|
_nullishCoalesce(importer, () => ( "<unknown module>")),
|
|
1496
1496
|
`${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
|
|
@@ -1500,9 +1500,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1500
1500
|
);
|
|
1501
1501
|
}
|
|
1502
1502
|
if (!_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) && _module.isBuiltin.call(void 0, id)) {
|
|
1503
|
-
return
|
|
1503
|
+
return _chunkBY5VQ57Wcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
|
|
1504
1504
|
}
|
|
1505
|
-
const resolveFrom = importer ?
|
|
1505
|
+
const resolveFrom = importer ? _chunkBY5VQ57Wcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
|
|
1506
1506
|
if (resolveFrom) {
|
|
1507
1507
|
const directory = path6.dirname(resolveFrom.importer);
|
|
1508
1508
|
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
@@ -1519,8 +1519,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1519
1519
|
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1520
1520
|
if (!_optionalChain([options2, 'optionalAccess', _78 => _78.ssr])) {
|
|
1521
1521
|
this.error(
|
|
1522
|
-
|
|
1523
|
-
|
|
1522
|
+
_chunkBY5VQ57Wcjs.formatFarmDiagnostic.call(void 0,
|
|
1523
|
+
_chunkBY5VQ57Wcjs.createFarmDiagnostic.call(void 0,
|
|
1524
1524
|
"CLIENT_SERVER_ONLY_ENTRY",
|
|
1525
1525
|
_nullishCoalesce(importer, () => ( id)),
|
|
1526
1526
|
`${id} is server-only and cannot be imported into client code.`
|
|
@@ -1545,7 +1545,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1545
1545
|
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1546
1546
|
return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunk5B2Y4EVScjs.resolveFarmPlatform.call(void 0, ))));
|
|
1547
1547
|
}
|
|
1548
|
-
return _nullishCoalesce(
|
|
1548
|
+
return _nullishCoalesce(_chunkBY5VQ57Wcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
1551
|
};
|
|
@@ -2161,7 +2161,7 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
2161
2161
|
return null;
|
|
2162
2162
|
}
|
|
2163
2163
|
const body = Array.isArray(ast.body) ? ast.body : [];
|
|
2164
|
-
const everyExportIsComponent = options.code.includes(
|
|
2164
|
+
const everyExportIsComponent = options.code.includes(_chunkBY5VQ57Wcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkBY5VQ57Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
|
|
2165
2165
|
const replacements = [];
|
|
2166
2166
|
const wrapperStatements = [];
|
|
2167
2167
|
const originalEntries = [];
|
|
@@ -2316,16 +2316,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
|
|
|
2316
2316
|
for (const finding of analyzeClientBoundary(program, publicKeys)) {
|
|
2317
2317
|
if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
|
|
2318
2318
|
const resolved = await context.resolve(finding.name, id).catch(() => null);
|
|
2319
|
-
if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(
|
|
2319
|
+
if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkBY5VQ57Wcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
|
|
2320
2320
|
}
|
|
2321
2321
|
findings.push(finding);
|
|
2322
2322
|
}
|
|
2323
2323
|
if (findings.length === 0) return;
|
|
2324
2324
|
warnedClientBoundaryIds.add(id);
|
|
2325
|
-
const locate =
|
|
2325
|
+
const locate = _chunkBY5VQ57Wcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
|
|
2326
2326
|
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2327
2327
|
findings.map(
|
|
2328
|
-
(finding) =>
|
|
2328
|
+
(finding) => _chunkBY5VQ57Wcjs.formatFarmDiagnostic.call(void 0,
|
|
2329
2329
|
createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
|
|
2330
2330
|
config.root
|
|
2331
2331
|
)
|
|
@@ -2396,12 +2396,12 @@ function hasFarmSourceAliasOverride(alias) {
|
|
|
2396
2396
|
function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
2397
2397
|
const rendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, options.renderer);
|
|
2398
2398
|
const imageImports = farmImageImportsPlugin();
|
|
2399
|
-
const fontImports =
|
|
2399
|
+
const fontImports = _chunk76ES7BCOcjs.farmFontImportsPlugin.call(void 0, {
|
|
2400
2400
|
root: options.root,
|
|
2401
2401
|
basePath: options.basePath,
|
|
2402
2402
|
publicDir: options.publicDir,
|
|
2403
2403
|
// A production build never starts the app, so it reads the directories from these options.
|
|
2404
|
-
isLayoutModule: (id) =>
|
|
2404
|
+
isLayoutModule: (id) => _chunk76ES7BCOcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options))))
|
|
2405
2405
|
});
|
|
2406
2406
|
let farmApp;
|
|
2407
2407
|
const isFarmGeneratedOutput = (file) => {
|
|
@@ -2432,8 +2432,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2432
2432
|
if (mdxComponents) files.add(mdxComponents);
|
|
2433
2433
|
return files;
|
|
2434
2434
|
};
|
|
2435
|
-
const islxActionsMode = () =>
|
|
2436
|
-
const islandsServerFns = () =>
|
|
2435
|
+
const islxActionsMode = () => _chunk76ES7BCOcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
|
|
2436
|
+
const islandsServerFns = () => _chunk76ES7BCOcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
|
|
2437
2437
|
let reactRefreshActive = false;
|
|
2438
2438
|
let server;
|
|
2439
2439
|
let deferredGates;
|
|
@@ -2464,7 +2464,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2464
2464
|
console.log(log);
|
|
2465
2465
|
};
|
|
2466
2466
|
const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _121 => _121.getRouteManager, 'call', _122 => _122(), 'access', _123 => _123.getProgrammaticClientRoutes, 'call', _124 => _124()])));
|
|
2467
|
-
const inBuildPackageCache =
|
|
2467
|
+
const inBuildPackageCache = _chunkBY5VQ57Wcjs.bindPackageClientBoundaryCache.call(void 0, );
|
|
2468
2468
|
const inspectPackages = (operation) => {
|
|
2469
2469
|
const routeManager = _optionalChain([farmApp, 'optionalAccess', _125 => _125.getRouteManager, 'call', _126 => _126()]);
|
|
2470
2470
|
return inBuildPackageCache(
|
|
@@ -2487,11 +2487,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2487
2487
|
isBuild = configEnv.command === "build";
|
|
2488
2488
|
const farmAliases = {
|
|
2489
2489
|
..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, options.layers),
|
|
2490
|
-
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} :
|
|
2490
|
+
...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} : _chunk76ES7BCOcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
|
|
2491
2491
|
};
|
|
2492
2492
|
if (Object.keys(farmAliases).length > 0) {
|
|
2493
2493
|
_nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
|
|
2494
|
-
userConfig.resolve.alias =
|
|
2494
|
+
userConfig.resolve.alias = _chunk76ES7BCOcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
|
|
2495
2495
|
}
|
|
2496
2496
|
const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
|
|
2497
2497
|
farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.cors]) === void 0;
|
|
@@ -2566,7 +2566,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2566
2566
|
} catch (e21) {
|
|
2567
2567
|
}
|
|
2568
2568
|
};
|
|
2569
|
-
farmApp = new (0,
|
|
2569
|
+
farmApp = new (0, _chunk76ES7BCOcjs.FarmApp)(
|
|
2570
2570
|
{
|
|
2571
2571
|
...options,
|
|
2572
2572
|
root: resolveDevelopmentRoot(options.root, server.config.root)
|
|
@@ -2574,7 +2574,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2574
2574
|
server
|
|
2575
2575
|
);
|
|
2576
2576
|
farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
|
|
2577
|
-
|
|
2577
|
+
_chunkBY5VQ57Wcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
|
|
2578
2578
|
farmApp.getConfig().root,
|
|
2579
2579
|
options.distDir || ".farm"
|
|
2580
2580
|
)
|
|
@@ -2585,7 +2585,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2585
2585
|
let farmAppPackages;
|
|
2586
2586
|
if (_optionalChain([farmConfig, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.noindexPreviews])) {
|
|
2587
2587
|
farmMiddlewares.use((_req, res, next) => {
|
|
2588
|
-
if (
|
|
2588
|
+
if (_chunk6UBGXEIHcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
|
|
2589
2589
|
res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
|
|
2590
2590
|
}
|
|
2591
2591
|
next();
|
|
@@ -2593,7 +2593,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2593
2593
|
}
|
|
2594
2594
|
const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
|
|
2595
2595
|
const devBuiltInRoutePaths = new Set(
|
|
2596
|
-
|
|
2596
|
+
_chunkPVR63WHWcjs.listFarmBuiltInRoutePaths.call(void 0, {
|
|
2597
2597
|
agent: {
|
|
2598
2598
|
apiCatalog: true,
|
|
2599
2599
|
mcp: true,
|
|
@@ -2625,6 +2625,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
const sourceRoots = _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, farmConfig);
|
|
2627
2627
|
server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
|
|
2628
|
+
server.watcher.add(farmConfig.layers.map((layer) => layer.root));
|
|
2628
2629
|
if (farmConfig.i18n.enabled) {
|
|
2629
2630
|
server.watcher.add(
|
|
2630
2631
|
farmConfig.i18n.locales.map(
|
|
@@ -2644,7 +2645,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2644
2645
|
const polyroute = _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
|
|
2645
2646
|
const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
|
|
2646
2647
|
try {
|
|
2647
|
-
const result = await
|
|
2648
|
+
const result = await _chunk7Q6KUXH6cjs.generateFarmTypeArtifacts.call(void 0, {
|
|
2648
2649
|
root: farmConfig.root,
|
|
2649
2650
|
srcDir: farmConfig.srcDir,
|
|
2650
2651
|
layers: farmConfig.layers,
|
|
@@ -2752,7 +2753,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2752
2753
|
_chunkVB7P66Q4cjs.invalidateFailedFarmDevModules.call(void 0, server);
|
|
2753
2754
|
}
|
|
2754
2755
|
const normalizedFile = file.replace(/\\/g, "/");
|
|
2755
|
-
const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
|
|
2756
|
+
const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile) || farmConfig.layers.some((layer) => isFarmConfigFile(file, layer.root));
|
|
2757
|
+
if (configChanged) {
|
|
2758
|
+
const displayPath = path6.posix.relative(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, farmConfig.root), normalizedFile);
|
|
2759
|
+
_chunk7ZDLE77Pcjs.logger.warn(
|
|
2760
|
+
`Farm config changed (${displayPath}). Restart the dev server to apply the change.`
|
|
2761
|
+
);
|
|
2762
|
+
}
|
|
2756
2763
|
const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
|
|
2757
2764
|
const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
|
|
2758
2765
|
routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
|
|
@@ -2953,7 +2960,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2953
2960
|
rendererServer: farmConfig.renderer.server,
|
|
2954
2961
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
2955
2962
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
2956
|
-
globalStylesheetHref:
|
|
2963
|
+
globalStylesheetHref: _chunk76ES7BCOcjs.resolveDevGlobalStylesheetHref.call(void 0, farmConfig.root, farmConfig.srcDir),
|
|
2957
2964
|
loadModule: async (specifier) => {
|
|
2958
2965
|
const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
|
|
2959
2966
|
if (specifier === _optionalChain([farmConfig, 'access', _191 => _191.docs, 'access', _192 => _192.adapter, 'optionalAccess', _193 => _193.server]) && _optionalChain([resolved, 'optionalAccess', _194 => _194.id])) {
|
|
@@ -3001,7 +3008,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3001
3008
|
fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
|
|
3002
3009
|
resolveLayoutFonts: resolveDocsLayoutFonts,
|
|
3003
3010
|
fontStylesheetHref: "/@farm/fonts.css",
|
|
3004
|
-
globalStylesheetHref:
|
|
3011
|
+
globalStylesheetHref: _chunk76ES7BCOcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
3005
3012
|
farmConfig.root,
|
|
3006
3013
|
farmConfig.srcDir
|
|
3007
3014
|
),
|
|
@@ -3038,9 +3045,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3038
3045
|
}
|
|
3039
3046
|
const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _202 => _202.getPlugins, 'call', _203 => _203(), 'access', _204 => _204.find, 'call', _205 => _205((plugin2) => plugin2.name === "farm:infra-analytics")]);
|
|
3040
3047
|
if (farmInfraAnalyticsPlugin) {
|
|
3041
|
-
|
|
3048
|
+
_chunkT2VXOAC3cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
|
|
3042
3049
|
if (farmDocsDevRuntime) {
|
|
3043
|
-
const label =
|
|
3050
|
+
const label = _chunkPVR63WHWcjs.resolveFarmDocsRouteLabel.call(void 0,
|
|
3044
3051
|
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
|
|
3045
3052
|
{
|
|
3046
3053
|
path: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.entry]) || "/docs",
|
|
@@ -3048,7 +3055,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3048
3055
|
pages: await getFarmDocsPagePaths()
|
|
3049
3056
|
}
|
|
3050
3057
|
);
|
|
3051
|
-
if (label) return
|
|
3058
|
+
if (label) return _chunkPVR63WHWcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
|
|
3052
3059
|
}
|
|
3053
3060
|
const match = farmApp.getRouteManager().matchRoute(pathname);
|
|
3054
3061
|
return { pathname, pattern: _optionalChain([match, 'access', _212 => _212.route, 'optionalAccess', _213 => _213.pattern]) || null };
|
|
@@ -3212,7 +3219,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3212
3219
|
if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
|
|
3213
3220
|
res.statusCode = 200;
|
|
3214
3221
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
3215
|
-
res.end(requestMethod === "HEAD" ? void 0 :
|
|
3222
|
+
res.end(requestMethod === "HEAD" ? void 0 : _chunk76ES7BCOcjs.FARM_VIDEO_PLAYER_HTML);
|
|
3216
3223
|
return;
|
|
3217
3224
|
}
|
|
3218
3225
|
const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
|
|
@@ -3492,9 +3499,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3492
3499
|
if (pm && opensFarmDevRuntimeSession(pm)) {
|
|
3493
3500
|
try {
|
|
3494
3501
|
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
|
|
3495
|
-
const route =
|
|
3502
|
+
const route = _chunkPVR63WHWcjs.setFarmRouteLabel.call(void 0,
|
|
3496
3503
|
{ pathname: requestPathname },
|
|
3497
|
-
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname :
|
|
3504
|
+
label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkPVR63WHWcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
|
|
3498
3505
|
);
|
|
3499
3506
|
runtimeSession2 = await pm.beginRuntimeRequest(
|
|
3500
3507
|
createRequestFromNodeRequest(req, new URL(fullUrl)),
|
|
@@ -3583,7 +3590,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3583
3590
|
);
|
|
3584
3591
|
return;
|
|
3585
3592
|
}
|
|
3586
|
-
if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false &&
|
|
3593
|
+
if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false && _chunkPVR63WHWcjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
|
|
3587
3594
|
const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
|
|
3588
3595
|
{
|
|
3589
3596
|
config: farmConfig,
|
|
@@ -3593,18 +3600,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3593
3600
|
apiServerBasePath
|
|
3594
3601
|
);
|
|
3595
3602
|
await serveBuiltInRoute(async () => {
|
|
3596
|
-
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages =
|
|
3597
|
-
const manifest = await
|
|
3603
|
+
_nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunk76ES7BCOcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
|
|
3604
|
+
const manifest = await _chunkPVR63WHWcjs.createFarmAppManifestResponse.call(void 0,
|
|
3598
3605
|
new Request(parsedRequestUrl, {
|
|
3599
3606
|
method: requestMethod,
|
|
3600
3607
|
headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
|
|
3601
3608
|
}),
|
|
3602
3609
|
{
|
|
3603
|
-
...
|
|
3610
|
+
..._chunkPVR63WHWcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
|
|
3604
3611
|
build: "development",
|
|
3605
3612
|
packages: farmAppPackages,
|
|
3606
3613
|
// Read again on each request; unchanged files come from a cache.
|
|
3607
|
-
webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ?
|
|
3614
|
+
webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ? _chunk76ES7BCOcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
|
|
3608
3615
|
}),
|
|
3609
3616
|
defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
|
|
3610
3617
|
// A guard written for an MCP server's path keeps its tools out of the public view.
|
|
@@ -3622,11 +3629,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3622
3629
|
});
|
|
3623
3630
|
return;
|
|
3624
3631
|
}
|
|
3625
|
-
if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) ===
|
|
3632
|
+
if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkPVR63WHWcjs.FARM_API_CATALOG_PATH) {
|
|
3626
3633
|
await serveBuiltInRoute(
|
|
3627
|
-
() =>
|
|
3634
|
+
() => _chunkPVR63WHWcjs.createFarmApiCatalogResponse.call(void 0,
|
|
3628
3635
|
requestMethod,
|
|
3629
|
-
|
|
3636
|
+
_chunkPVR63WHWcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
|
|
3630
3637
|
new Request(parsedRequestUrl, {
|
|
3631
3638
|
headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
|
|
3632
3639
|
})
|
|
@@ -3635,7 +3642,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3635
3642
|
return;
|
|
3636
3643
|
}
|
|
3637
3644
|
if (_optionalChain([options, 'access', _255 => _255.agent, 'optionalAccess', _256 => _256.aiCatalog]) !== false) {
|
|
3638
|
-
const aiCatalog =
|
|
3645
|
+
const aiCatalog = _chunkPVR63WHWcjs.createFarmAiCatalogResponse.call(void 0,
|
|
3639
3646
|
new Request(parsedRequestUrl, {
|
|
3640
3647
|
method: requestMethod,
|
|
3641
3648
|
headers: {
|
|
@@ -3722,7 +3729,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3722
3729
|
{
|
|
3723
3730
|
kind: "docs",
|
|
3724
3731
|
computed: docsResponse,
|
|
3725
|
-
label:
|
|
3732
|
+
label: _chunkPVR63WHWcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
|
|
3726
3733
|
_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
|
|
3727
3734
|
{
|
|
3728
3735
|
path: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.entry]) || "/docs",
|
|
@@ -3759,7 +3766,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3759
3766
|
}
|
|
3760
3767
|
const markdownRouteLabel = () => (
|
|
3761
3768
|
// On the route path, as production labels it: /fr/index.md is /index.md.
|
|
3762
|
-
|
|
3769
|
+
_chunkPVR63WHWcjs.resolveFarmMarkdownRouteLabel.call(void 0,
|
|
3763
3770
|
toRoutePathname(requestPathname),
|
|
3764
3771
|
(page) => _optionalChain([farmApp, 'access', _283 => _283.getRouteManager, 'call', _284 => _284(), 'access', _285 => _285.matchRoute, 'call', _286 => _286(page), 'access', _287 => _287.route, 'optionalAccess', _288 => _288.pattern])
|
|
3765
3772
|
)
|
|
@@ -3780,7 +3787,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3780
3787
|
return {
|
|
3781
3788
|
source: await fs2.promises.readFile(sourcePath, "utf8"),
|
|
3782
3789
|
// Project-relative, as production sends it: never the machine's path.
|
|
3783
|
-
filePath:
|
|
3790
|
+
filePath: _chunk76ES7BCOcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
|
|
3784
3791
|
};
|
|
3785
3792
|
},
|
|
3786
3793
|
// The anonymous check goes through this server, so its guards and
|
|
@@ -4123,9 +4130,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4123
4130
|
);
|
|
4124
4131
|
const docsRuntimeOptions = () => ({
|
|
4125
4132
|
kind: "docs",
|
|
4126
|
-
route:
|
|
4133
|
+
route: _chunkPVR63WHWcjs.setFarmRouteLabel.call(void 0,
|
|
4127
4134
|
{ pathname: pathname2, pattern: urlPath2 },
|
|
4128
|
-
|
|
4135
|
+
_chunkPVR63WHWcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
|
|
4129
4136
|
path: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.entry]) || "/docs",
|
|
4130
4137
|
roots: _optionalChain([farmConfig, 'access', _302 => _302.docs, 'optionalAccess', _303 => _303.roots, 'optionalAccess', _304 => _304.map, 'call', _305 => _305((root) => root.entry)])
|
|
4131
4138
|
})
|
|
@@ -4479,7 +4486,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4479
4486
|
);
|
|
4480
4487
|
const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
|
|
4481
4488
|
const navigationManifest = routeManager3.generateClientManifest(server.config.root);
|
|
4482
|
-
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => (
|
|
4489
|
+
const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkBY5VQ57Wcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
|
|
4483
4490
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
4484
4491
|
const shouldHydrate = moduleMetadata.shouldHydrate;
|
|
4485
4492
|
let mergedMetadata = {};
|
|
@@ -4490,7 +4497,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4490
4497
|
(layout) => _nullishCoalesce(navigationManifest.layouts.find(
|
|
4491
4498
|
(entry) => entry.pattern === layout.pattern
|
|
4492
4499
|
), () => ( {
|
|
4493
|
-
...
|
|
4500
|
+
..._chunkBY5VQ57Wcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
|
|
4494
4501
|
serverTree: false
|
|
4495
4502
|
}))
|
|
4496
4503
|
);
|
|
@@ -4505,7 +4512,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4505
4512
|
];
|
|
4506
4513
|
const hydrationIslandStrategy = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0,
|
|
4507
4514
|
_chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options)))
|
|
4508
|
-
) === "islands" ?
|
|
4515
|
+
) === "islands" ? _chunk76ES7BCOcjs.resolveFarmRouteRootStrategy.call(void 0,
|
|
4509
4516
|
route,
|
|
4510
4517
|
{ shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
|
|
4511
4518
|
layouts.map((layout, index) => ({
|
|
@@ -4571,7 +4578,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4571
4578
|
const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
|
|
4572
4579
|
const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
|
|
4573
4580
|
(entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
|
|
4574
|
-
), () => (
|
|
4581
|
+
), () => ( _chunkBY5VQ57Wcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
|
|
4575
4582
|
const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
|
|
4576
4583
|
request: targetRequest,
|
|
4577
4584
|
params: slot.params,
|
|
@@ -4621,7 +4628,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4621
4628
|
pageShouldHydrate: shouldHydrate,
|
|
4622
4629
|
layoutShouldHydrate: shouldHydrateLayout,
|
|
4623
4630
|
islandStrategy: hydrationIslandStrategy,
|
|
4624
|
-
rendering:
|
|
4631
|
+
rendering: _chunk7Q6KUXH6cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
|
|
4625
4632
|
});
|
|
4626
4633
|
const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
|
|
4627
4634
|
const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
|
|
@@ -4756,7 +4763,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4756
4763
|
const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _347 => _347.hasRuntimeHook, 'call', _348 => _348("after")]), () => ( false));
|
|
4757
4764
|
const pageBuiltInRouteLabel = (pathname2) => {
|
|
4758
4765
|
const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
|
|
4759
|
-
const mcpLabel =
|
|
4766
|
+
const mcpLabel = _chunkPVR63WHWcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
|
|
4760
4767
|
if (mcpLabel) return mcpLabel;
|
|
4761
4768
|
if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
|
|
4762
4769
|
return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
|
|
@@ -4765,7 +4772,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4765
4772
|
const match = routeManager2.matchRoute(pathname2);
|
|
4766
4773
|
return {
|
|
4767
4774
|
kind: "page",
|
|
4768
|
-
route:
|
|
4775
|
+
route: _chunkPVR63WHWcjs.setFarmRouteLabel.call(void 0,
|
|
4769
4776
|
{
|
|
4770
4777
|
pathname: pathname2,
|
|
4771
4778
|
pattern: _optionalChain([match, 'optionalAccess', _349 => _349.route, 'optionalAccess', _350 => _350.pattern]) || null,
|
|
@@ -5029,7 +5036,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
5029
5036
|
const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
|
|
5030
5037
|
const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
|
|
5031
5038
|
const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
|
|
5032
|
-
const isolatedHydrationMode =
|
|
5039
|
+
const isolatedHydrationMode = _chunkBY5VQ57Wcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
5033
5040
|
_optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.experimental, 'optionalAccess', _394 => _394.isolatedClientHydration]),
|
|
5034
5041
|
{
|
|
5035
5042
|
serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "rsc",
|
|
@@ -5054,8 +5061,8 @@ ${generatedDevIndicatorsClientRuntime}`,
|
|
|
5054
5061
|
isolatedHydrationMode === "enabled" || _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _401 => _401.getRouteManager, 'call', _402 => _402(), 'access', _403 => _403.getIsolatedClientBoundaryModules, 'call', _404 => _404(root)])))), 'optionalAccess', _405 => _405.size]) > 0,
|
|
5055
5062
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.trailingSlash]), () => ( false)),
|
|
5056
5063
|
_nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _407 => _407.basePath]), () => ( "/")),
|
|
5057
|
-
|
|
5058
|
-
|
|
5064
|
+
_chunk76ES7BCOcjs.generateClientCachePersistenceCode.call(void 0,
|
|
5065
|
+
_chunk76ES7BCOcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _408 => _408.cache]))
|
|
5059
5066
|
),
|
|
5060
5067
|
adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
|
|
5061
5068
|
_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "islands"
|
|
@@ -5077,11 +5084,11 @@ export const getManifest = () => ({
|
|
|
5077
5084
|
});
|
|
5078
5085
|
`;
|
|
5079
5086
|
}
|
|
5080
|
-
const globalStylesheetHref =
|
|
5087
|
+
const globalStylesheetHref = _chunk76ES7BCOcjs.resolveDevGlobalStylesheetHref.call(void 0,
|
|
5081
5088
|
server.config.root,
|
|
5082
5089
|
_optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412(), 'access', _413 => _413.srcDir])
|
|
5083
5090
|
);
|
|
5084
|
-
const fullManifest =
|
|
5091
|
+
const fullManifest = _chunk76ES7BCOcjs.createFarmDevClientManifest.call(void 0,
|
|
5085
5092
|
routeManager.generateClientManifest(server.config.root),
|
|
5086
5093
|
{
|
|
5087
5094
|
sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
|
|
@@ -5103,45 +5110,45 @@ export { manifest };
|
|
|
5103
5110
|
const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
|
|
5104
5111
|
const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417()]), () => ( options));
|
|
5105
5112
|
let rewrotePackageImports = false;
|
|
5106
|
-
if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") && !isFarmCoreModule(id) || _optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !
|
|
5113
|
+
if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") && !isFarmCoreModule(id) || _optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkBY5VQ57Wcjs.hasUseClientDirective.call(void 0, code)) {
|
|
5107
5114
|
const file = id.split("?", 1)[0];
|
|
5108
5115
|
const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _419 => _419.config, 'access', _420 => _420.root]) || process.cwd();
|
|
5109
5116
|
const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
|
|
5110
5117
|
const rewrite = () => {
|
|
5111
5118
|
if (_optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true) {
|
|
5112
5119
|
if (farmReactServerFiles.has(file)) {
|
|
5113
|
-
for (const child of
|
|
5120
|
+
for (const child of _chunkBY5VQ57Wcjs.farmRelativeImportFiles.call(void 0, code, file))
|
|
5114
5121
|
farmReactServerFiles.add(child);
|
|
5115
5122
|
}
|
|
5116
|
-
const serverModule = farmReactServerFiles.has(file) || !
|
|
5123
|
+
const serverModule = farmReactServerFiles.has(file) || !_chunkBY5VQ57Wcjs.getFarmClientReachableModules.call(void 0,
|
|
5117
5124
|
path6.resolve(projectRoot, actionConfig.srcDir || "src"),
|
|
5118
5125
|
projectRoot
|
|
5119
5126
|
).has(path6.resolve(file));
|
|
5120
|
-
const reactServer = !serverModule ? null :
|
|
5127
|
+
const reactServer = !serverModule ? null : _chunkBY5VQ57Wcjs.rewriteFarmReactServerImports.call(void 0, {
|
|
5121
5128
|
code,
|
|
5122
5129
|
file,
|
|
5123
|
-
reference: (specifier, exportName) =>
|
|
5130
|
+
reference: (specifier, exportName) => _chunkBY5VQ57Wcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
|
|
5124
5131
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
5125
5132
|
});
|
|
5126
5133
|
if (reactServer !== null) {
|
|
5127
5134
|
code = reactServer;
|
|
5128
5135
|
rewrotePackageImports = true;
|
|
5129
5136
|
}
|
|
5130
|
-
const internal = farmReactServerFiles.has(file) ?
|
|
5137
|
+
const internal = farmReactServerFiles.has(file) ? _chunkBY5VQ57Wcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
|
|
5131
5138
|
code,
|
|
5132
5139
|
file,
|
|
5133
|
-
reference: (clientFile) =>
|
|
5140
|
+
reference: (clientFile) => _chunkBY5VQ57Wcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
|
|
5134
5141
|
}) : null;
|
|
5135
5142
|
if (internal !== null) {
|
|
5136
5143
|
code = internal;
|
|
5137
5144
|
rewrotePackageImports = true;
|
|
5138
5145
|
}
|
|
5139
5146
|
}
|
|
5140
|
-
const rewritePackageImports = (source2) =>
|
|
5147
|
+
const rewritePackageImports = (source2) => _chunkBY5VQ57Wcjs.rewriteFarmPackageClientImports.call(void 0, {
|
|
5141
5148
|
code: source2,
|
|
5142
5149
|
file,
|
|
5143
5150
|
root: projectRoot,
|
|
5144
|
-
isClientPackage: (specifier) =>
|
|
5151
|
+
isClientPackage: (specifier) => _chunkBY5VQ57Wcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
|
|
5145
5152
|
});
|
|
5146
5153
|
const source = code;
|
|
5147
5154
|
const referenced = inspectPackages(() => rewritePackageImports(source));
|
|
@@ -5161,7 +5168,7 @@ export { manifest };
|
|
|
5161
5168
|
}
|
|
5162
5169
|
}
|
|
5163
5170
|
};
|
|
5164
|
-
if (buildSnapshot)
|
|
5171
|
+
if (buildSnapshot) _chunkBY5VQ57Wcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
|
|
5165
5172
|
else rewrite();
|
|
5166
5173
|
}
|
|
5167
5174
|
if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
@@ -5190,8 +5197,8 @@ export { manifest };
|
|
|
5190
5197
|
}
|
|
5191
5198
|
if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
|
|
5192
5199
|
const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
|
|
5193
|
-
if (
|
|
5194
|
-
const redacted =
|
|
5200
|
+
if (_chunk76ES7BCOcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
|
|
5201
|
+
const redacted = _chunk76ES7BCOcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
|
|
5195
5202
|
if (redacted !== null) return { code: redacted, map: null };
|
|
5196
5203
|
}
|
|
5197
5204
|
}
|
|
@@ -5200,9 +5207,9 @@ export { manifest };
|
|
|
5200
5207
|
if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
5201
5208
|
const violation = findClientServerFnViolation(code, id);
|
|
5202
5209
|
if (violation) {
|
|
5203
|
-
const locate =
|
|
5210
|
+
const locate = _chunkBY5VQ57Wcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
|
|
5204
5211
|
this.error(
|
|
5205
|
-
|
|
5212
|
+
_chunkBY5VQ57Wcjs.formatFarmDiagnostic.call(void 0,
|
|
5206
5213
|
createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
|
|
5207
5214
|
currentConfig.root
|
|
5208
5215
|
)
|
|
@@ -5244,13 +5251,13 @@ export { manifest };
|
|
|
5244
5251
|
transformed = true;
|
|
5245
5252
|
}
|
|
5246
5253
|
}
|
|
5247
|
-
if (
|
|
5254
|
+
if (_chunkBY5VQ57Wcjs.hasUseClientDirective.call(void 0, transformedCode)) {
|
|
5248
5255
|
const clientBoundarySource = transformedCode;
|
|
5249
5256
|
const moduleInfo = this.getModuleInfo(id);
|
|
5250
5257
|
if (moduleInfo) {
|
|
5251
5258
|
moduleInfo.isClientComponent = true;
|
|
5252
5259
|
}
|
|
5253
|
-
transformedCode =
|
|
5260
|
+
transformedCode = _chunkBY5VQ57Wcjs.stripUseClientDirective.call(void 0, transformedCode);
|
|
5254
5261
|
transformed = true;
|
|
5255
5262
|
const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
|
|
5256
5263
|
let isolatedModuleReference = null;
|
|
@@ -5259,12 +5266,12 @@ export { manifest };
|
|
|
5259
5266
|
const cleanId = id.split("?", 1)[0];
|
|
5260
5267
|
const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
|
|
5261
5268
|
const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
|
|
5262
|
-
if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (
|
|
5263
|
-
cleanId.replace(/\\/g, "/").includes(
|
|
5269
|
+
if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkBY5VQ57Wcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
|
|
5270
|
+
cleanId.replace(/\\/g, "/").includes(_chunkBY5VQ57Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5264
5271
|
isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
|
|
5265
5272
|
const islandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, currentConfig)) === "islands";
|
|
5266
|
-
const explicitStrategy =
|
|
5267
|
-
const inference = islandsMode && explicitStrategy === null ?
|
|
5273
|
+
const explicitStrategy = _chunkBY5VQ57Wcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
|
|
5274
|
+
const inference = islandsMode && explicitStrategy === null ? _chunk76ES7BCOcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
|
|
5268
5275
|
if (inference) {
|
|
5269
5276
|
for (const file of inference.files) {
|
|
5270
5277
|
if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
|
|
@@ -5287,14 +5294,14 @@ export { manifest };
|
|
|
5287
5294
|
);
|
|
5288
5295
|
}
|
|
5289
5296
|
transformedCode = transformedBoundary;
|
|
5290
|
-
} else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (
|
|
5297
|
+
} else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkBY5VQ57Wcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkBY5VQ57Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
|
|
5291
5298
|
rendererIslandModule = true;
|
|
5292
5299
|
if (_optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) === true) {
|
|
5293
5300
|
const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
|
|
5294
5301
|
const transformedBoundary = transformIsolatedClientBoundaryModule({
|
|
5295
5302
|
code: transformedCode,
|
|
5296
5303
|
moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
|
|
5297
|
-
islandStrategy: _nullishCoalesce(
|
|
5304
|
+
islandStrategy: _nullishCoalesce(_chunkBY5VQ57Wcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
|
|
5298
5305
|
parse: (source) => this.parse(source),
|
|
5299
5306
|
withIsland: renderer.server
|
|
5300
5307
|
});
|
|
@@ -5478,10 +5485,10 @@ if (import.meta.hot) {
|
|
|
5478
5485
|
const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
|
|
5479
5486
|
const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
|
|
5480
5487
|
if (appSource) _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464(), 'access', _465 => _465.noteSourceChange, 'call', _466 => _466(id, change.event)]);
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5488
|
+
_chunkBY5VQ57Wcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
|
|
5489
|
+
_chunkBY5VQ57Wcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
|
|
5490
|
+
_chunk76ES7BCOcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
|
|
5491
|
+
_chunkBY5VQ57Wcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
|
|
5485
5492
|
},
|
|
5486
5493
|
async handleHotUpdate(ctx) {
|
|
5487
5494
|
if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
|
|
@@ -5514,10 +5521,10 @@ if (import.meta.hot) {
|
|
|
5514
5521
|
}
|
|
5515
5522
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
5516
5523
|
};
|
|
5517
|
-
if (normalizedFile.includes(
|
|
5524
|
+
if (normalizedFile.includes(_chunkBY5VQ57Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
|
|
5518
5525
|
path6.posix.join(
|
|
5519
5526
|
_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _469 => _469.root]) || options.root || server2.config.root),
|
|
5520
|
-
|
|
5527
|
+
_chunkBY5VQ57Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY
|
|
5521
5528
|
)
|
|
5522
5529
|
))
|
|
5523
5530
|
return modules;
|
|
@@ -5832,12 +5839,12 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5832
5839
|
const parsed = _chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
|
|
5833
5840
|
const routesFile = resolveRealModuleFile(parsed.filePath, root);
|
|
5834
5841
|
watchFile(routesFile);
|
|
5835
|
-
return
|
|
5842
|
+
return _chunkBY5VQ57Wcjs.generateProgrammaticClientRouteModule.call(void 0, {
|
|
5836
5843
|
kind: parsed.kind,
|
|
5837
5844
|
routePath: parsed.routePath,
|
|
5838
5845
|
routesFile,
|
|
5839
5846
|
route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _509 => _509.routes, 'access', _510 => _510.get, 'call', _511 => _511(
|
|
5840
|
-
|
|
5847
|
+
_chunkBY5VQ57Wcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
|
|
5841
5848
|
)]),
|
|
5842
5849
|
// React's client module exports no createElement; the main client entry imports React too.
|
|
5843
5850
|
rendererClient: _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
|
|
@@ -5845,7 +5852,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
|
|
|
5845
5852
|
});
|
|
5846
5853
|
}
|
|
5847
5854
|
function resolveRealModuleFile(filePath, root) {
|
|
5848
|
-
const resolved = _nullishCoalesce(
|
|
5855
|
+
const resolved = _nullishCoalesce(_chunkBY5VQ57Wcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
|
|
5849
5856
|
try {
|
|
5850
5857
|
return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
|
|
5851
5858
|
} catch (e29) {
|
|
@@ -6184,7 +6191,7 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
|
6184
6191
|
}
|
|
6185
6192
|
}
|
|
6186
6193
|
function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
|
|
6187
|
-
const providerClientCode =
|
|
6194
|
+
const providerClientCode = _chunk76ES7BCOcjs.generateFarmIntegrationProviderClientCode.call(void 0,
|
|
6188
6195
|
integrationProviders,
|
|
6189
6196
|
root,
|
|
6190
6197
|
_nullishCoalesce(renderer.componentExtensions, () => ( []))
|
|
@@ -6282,7 +6289,7 @@ async function createFarmServerTreePageElement(source, pathname) {
|
|
|
6282
6289
|
return null;
|
|
6283
6290
|
}
|
|
6284
6291
|
}
|
|
6285
|
-
${islandValues ? `${
|
|
6292
|
+
${islandValues ? `${_chunk76ES7BCOcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
|
|
6286
6293
|
let farmLastRouteState = null;
|
|
6287
6294
|
|
|
6288
6295
|
// A hot update to a layout tree's client module renders the route again.
|
|
@@ -7123,7 +7130,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
|
|
|
7123
7130
|
return loadedLayouts;
|
|
7124
7131
|
}
|
|
7125
7132
|
|
|
7126
|
-
${
|
|
7133
|
+
${_chunk76ES7BCOcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
|
|
7127
7134
|
function wrapWithLoadedLayouts(element, loadedLayouts, params) {
|
|
7128
7135
|
let wrapped = element;
|
|
7129
7136
|
for (let index = loadedLayouts.length - 1; index >= 0; index--) {
|
|
@@ -7423,7 +7430,7 @@ function readActiveLayoutPatterns() {
|
|
|
7423
7430
|
);
|
|
7424
7431
|
}
|
|
7425
7432
|
|
|
7426
|
-
${
|
|
7433
|
+
${_chunk76ES7BCOcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
7427
7434
|
|
|
7428
7435
|
function activateFragmentScripts(root) {
|
|
7429
7436
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
@@ -7482,7 +7489,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
7482
7489
|
return shell.innerHTML;
|
|
7483
7490
|
}
|
|
7484
7491
|
|
|
7485
|
-
${islandValues ?
|
|
7492
|
+
${islandValues ? _chunk76ES7BCOcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
7486
7493
|
container,
|
|
7487
7494
|
fragment,
|
|
7488
7495
|
currentPatterns,
|
|
@@ -7557,9 +7564,9 @@ ${islandValues ? `
|
|
|
7557
7564
|
return nextTarget;
|
|
7558
7565
|
}
|
|
7559
7566
|
|
|
7560
|
-
${islandValues ? `${
|
|
7567
|
+
${islandValues ? `${_chunk76ES7BCOcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
|
|
7561
7568
|
|
|
7562
|
-
${
|
|
7569
|
+
${_chunk76ES7BCOcjs.FARM_EARLY_NAVIGATION_SOURCE}
|
|
7563
7570
|
|
|
7564
7571
|
// Islands mode navigates as the production client does: it fetches the page itself, names the
|
|
7565
7572
|
// layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
|
|
@@ -8275,7 +8282,7 @@ async function defineConfig(config = {}) {
|
|
|
8275
8282
|
config = layeredConfig;
|
|
8276
8283
|
}
|
|
8277
8284
|
config.renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
|
|
8278
|
-
config.images =
|
|
8285
|
+
config.images = _chunk76ES7BCOcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
|
|
8279
8286
|
const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
|
|
8280
8287
|
ssr: true
|
|
8281
8288
|
});
|
|
@@ -8373,7 +8380,7 @@ async function defineConfig(config = {}) {
|
|
|
8373
8380
|
const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
|
|
8374
8381
|
console.log("");
|
|
8375
8382
|
console.log(
|
|
8376
|
-
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${
|
|
8383
|
+
` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkEZRB5N6Scjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
|
|
8377
8384
|
);
|
|
8378
8385
|
console.log("");
|
|
8379
8386
|
console.log(
|
|
@@ -8407,7 +8414,7 @@ async function defineConfig(config = {}) {
|
|
|
8407
8414
|
plugins: [
|
|
8408
8415
|
// `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
|
|
8409
8416
|
_chunk5RYBQKBYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
|
|
8410
|
-
|
|
8417
|
+
_chunk76ES7BCOcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
|
|
8411
8418
|
tailwindVitePlugin,
|
|
8412
8419
|
...rendererVitePlugins,
|
|
8413
8420
|
...reactRefreshPlugins,
|
|
@@ -8417,14 +8424,14 @@ async function defineConfig(config = {}) {
|
|
|
8417
8424
|
farmNavigationPlugin(config.renderer),
|
|
8418
8425
|
farmIslandContainersPlugin(config),
|
|
8419
8426
|
farmPlugin(config),
|
|
8420
|
-
|
|
8427
|
+
_chunkBY5VQ57Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
|
|
8421
8428
|
farmBrandingPlugin
|
|
8422
8429
|
],
|
|
8423
8430
|
customLogger: farmLogger,
|
|
8424
8431
|
clearScreen: false,
|
|
8425
8432
|
optimizeDeps: {
|
|
8426
|
-
...
|
|
8427
|
-
|
|
8433
|
+
..._chunk76ES7BCOcjs.createFarmClientOptimizeDepsConfig.call(void 0,
|
|
8434
|
+
_chunk76ES7BCOcjs.createFarmClientOptimizeDepsEntries.call(void 0,
|
|
8428
8435
|
appRoot,
|
|
8429
8436
|
_chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
|
|
8430
8437
|
),
|
|
@@ -8468,7 +8475,7 @@ async function defineConfig(config = {}) {
|
|
|
8468
8475
|
// Stub out problematic server-only modules during dev mode
|
|
8469
8476
|
alias: {
|
|
8470
8477
|
..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, config.layers),
|
|
8471
|
-
...
|
|
8478
|
+
..._chunk76ES7BCOcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
|
|
8472
8479
|
// Nitro internals that should not be resolved in browser
|
|
8473
8480
|
"supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
|
|
8474
8481
|
"@poppinss/dumper": "data:text/javascript,export default {};",
|