@farm.js/core 0.2.2 → 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-UXWYUTBK.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.cjs +4 -4
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +5 -5
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +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-YOVSWY2E.mjs → chunk-2XDRRAAD.mjs} +1 -1
- package/dist/{chunk-2T4GGCQT.cjs → chunk-6UBGXEIH.cjs} +2 -2
- package/dist/{chunk-BEAQVRMQ.cjs → chunk-76ES7BCO.cjs} +80 -75
- package/dist/{chunk-TK2JJCP5.mjs → chunk-7FNKBP3J.mjs} +186 -29
- package/dist/{chunk-ST3U7XVO.mjs → chunk-7IM2MKRK.mjs} +1 -1
- package/dist/{chunk-GL4SPJTE.cjs → chunk-7Q6KUXH6.cjs} +58 -27
- package/dist/{chunk-5CG2UD6B.cjs → chunk-AMSX2U4D.cjs} +304 -7
- package/dist/{chunk-NPR6SCEV.mjs → chunk-AOSZIHL7.mjs} +1 -1
- package/dist/chunk-APVJJCMB.mjs +547 -0
- package/dist/{chunk-LQZXCSYG.mjs → chunk-B6K2ZM3C.mjs} +5 -3
- package/dist/{chunk-IEXZMDF4.mjs → chunk-BCIUG6EQ.mjs} +2 -2
- package/dist/{chunk-JCERO6YF.mjs → chunk-BUIZTM3Q.mjs} +1 -1
- package/dist/{chunk-SJQ24IB5.cjs → chunk-BY5VQ57W.cjs} +11 -11
- package/dist/{chunk-GKDOKES3.mjs → chunk-CQ5LVPBL.mjs} +1 -1
- package/dist/{chunk-Q4FHYBFT.cjs → chunk-CSCORWIQ.cjs} +11 -11
- package/dist/{chunk-6VMBLDWY.mjs → chunk-CV7C75LN.mjs} +1 -1
- package/dist/{chunk-CZMMU3FP.mjs → chunk-D4DAL7KK.mjs} +35 -4
- package/dist/{chunk-ZVT2F3JU.mjs → chunk-DR65XXXD.mjs} +2 -2
- package/dist/{chunk-PRKFECGT.cjs → chunk-DZWX7FDX.cjs} +6 -4
- package/dist/{chunk-A4AYTO2E.cjs → chunk-EZRB5N6S.cjs} +1 -1
- package/dist/{chunk-B7CZ7T2I.cjs → chunk-JEJXSTYR.cjs} +2 -2
- package/dist/{chunk-56F4CDKE.cjs → chunk-JRPCCBGL.cjs} +449 -291
- package/dist/{chunk-JM5VSEYC.cjs → chunk-KHTDVXXR.cjs} +2 -2
- package/dist/{chunk-PYPHM7AS.cjs → chunk-LH7S7FI3.cjs} +5 -1
- package/dist/{chunk-ZND5D4IC.cjs → chunk-LJZZDRD5.cjs} +363 -326
- package/dist/{chunk-WXPY5FRF.cjs → chunk-P2PF5FUW.cjs} +2 -2
- package/dist/{chunk-CPL7WIMP.mjs → chunk-P3UT3OLV.mjs} +2 -2
- package/dist/{chunk-PZ5ZJAAO.mjs → chunk-POCWXRXW.mjs} +1 -1
- package/dist/{chunk-L7Z6OAE2.cjs → chunk-PVR63WHW.cjs} +4 -4
- package/dist/{chunk-Z23OCU33.cjs → chunk-RF3VCNV7.cjs} +6 -6
- package/dist/{chunk-5AOARZJT.cjs → chunk-T2VXOAC3.cjs} +4 -4
- package/dist/{chunk-FEWGKBMM.mjs → chunk-UIBCPZFO.mjs} +85 -48
- package/dist/{chunk-MYJPW4XN.mjs → chunk-UKGAP2OK.mjs} +3 -3
- package/dist/{chunk-DZXD6CYJ.mjs → chunk-V2RXBDV6.mjs} +4 -0
- package/dist/{chunk-ALGAGXWB.mjs → chunk-XEOIZ4QC.mjs} +1 -1
- package/dist/{chunk-D2VLHRBN.cjs → chunk-Y3MTKPLN.cjs} +4 -4
- package/dist/{chunk-FDS6U2NT.cjs → chunk-Y7FLPQSL.cjs} +3 -3
- package/dist/{chunk-MEXGQE4T.mjs → chunk-YR7ZI57S.mjs} +17 -12
- 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-RFVGDHXH.mjs → devtools-CRZCFRRL.mjs} +1 -1
- package/dist/{devtools-4LMM3DDJ.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 +4 -4
- package/dist/environment/vite.mjs +3 -3
- 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 +19 -19
- 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 +18 -18
- 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 +18 -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 +17 -17
- package/dist/internal/cli-runtime.cjs +7 -7
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +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 +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 +13 -13
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +12 -12
- 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.cjs +3 -3
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.mjs +2 -2
- package/dist/{rsc-pipeline-NCJ3NIE5.mjs → rsc-pipeline-JISGZS6G.mjs} +2 -2
- package/dist/{rsc-pipeline-HT4G3QGT.cjs → rsc-pipeline-R5W3PAAL.cjs} +3 -3
- package/dist/{runtime-6UF5XKUP.cjs → runtime-HSTND4FF.cjs} +8 -8
- package/dist/{runtime-VHXIEXL7.mjs → runtime-I2SBIB2Q.mjs} +5 -5
- 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 +34 -34
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +14 -14
- 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.cjs +5 -5
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +4 -4
- 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 +13 -13
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +12 -12
- package/package.json +2 -2
- package/dist/analyzer-ENHO4SA5.cjs +0 -17
- package/dist/chunk-Q4CPBKPT.mjs +0 -251
- /package/dist/{chunk-JL2HNLMC.mjs → chunk-3QC2XTCN.mjs} +0 -0
- /package/dist/{chunk-COXMHCIV.cjs → chunk-GDKJGL7D.cjs} +0 -0
|
@@ -9,10 +9,10 @@ var _chunk5B2Y4EVScjs = require('./chunk-5B2Y4EVS.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk7Q6KUXH6cjs = require('./chunk-7Q6KUXH6.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkP2PF5FUWcjs = require('./chunk-P2PF5FUW.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkEWPH5IOCcjs = require('./chunk-EWPH5IOC.cjs');
|
|
@@ -59,7 +59,7 @@ var _chunkGYH2B4YQcjs = require('./chunk-GYH2B4YQ.cjs');
|
|
|
59
59
|
var _chunkIGBQSUT5cjs = require('./chunk-IGBQSUT5.cjs');
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkPVR63WHWcjs = require('./chunk-PVR63WHW.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
@@ -108,7 +108,7 @@ var _chunkYLEL4ZRQcjs = require('./chunk-YLEL4ZRQ.cjs');
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
var
|
|
111
|
+
var _chunkBY5VQ57Wcjs = require('./chunk-BY5VQ57W.cjs');
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
|
|
@@ -234,7 +234,7 @@ var _chunkXZ6L3FUUcjs = require('./chunk-XZ6L3FUU.cjs');
|
|
|
234
234
|
|
|
235
235
|
|
|
236
236
|
|
|
237
|
-
var
|
|
237
|
+
var _chunkDZWX7FDXcjs = require('./chunk-DZWX7FDX.cjs');
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
|
|
@@ -251,7 +251,7 @@ var _chunkIDUGG7VRcjs = require('./chunk-IDUGG7VR.cjs');
|
|
|
251
251
|
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
var
|
|
254
|
+
var _chunkLH7S7FI3cjs = require('./chunk-LH7S7FI3.cjs');
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
|
|
@@ -312,7 +312,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
|
|
|
312
312
|
var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
|
|
313
313
|
|
|
314
314
|
|
|
315
|
-
var
|
|
315
|
+
var _chunkEZRB5N6Scjs = require('./chunk-EZRB5N6S.cjs');
|
|
316
316
|
|
|
317
317
|
|
|
318
318
|
var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
|
|
@@ -514,7 +514,7 @@ var RouteManager = class _RouteManager {
|
|
|
514
514
|
this.redirects = /* @__PURE__ */ new Map();
|
|
515
515
|
this.programmaticPages = /* @__PURE__ */ new Map();
|
|
516
516
|
this.programmaticLayouts = /* @__PURE__ */ new Map();
|
|
517
|
-
this.programmaticClientRoutes =
|
|
517
|
+
this.programmaticClientRoutes = _chunkBY5VQ57Wcjs.mergeProgrammaticClientRoutes.call(void 0, []);
|
|
518
518
|
// The hydration settings each route rule returned, by file.
|
|
519
519
|
this.rendererRouteHydration = /* @__PURE__ */ new Map();
|
|
520
520
|
this.disposeRendererHydration = () => {
|
|
@@ -545,7 +545,7 @@ var RouteManager = class _RouteManager {
|
|
|
545
545
|
this.editedSources = null;
|
|
546
546
|
this.config = config;
|
|
547
547
|
this.viteServer = viteServer;
|
|
548
|
-
if (viteServer)
|
|
548
|
+
if (viteServer) _chunkLH7S7FI3cjs.trackProgrammaticRouteSources.call(void 0, );
|
|
549
549
|
}
|
|
550
550
|
setRendererRuntime(rendererRuntime) {
|
|
551
551
|
this.rendererRuntime = rendererRuntime;
|
|
@@ -608,7 +608,7 @@ var RouteManager = class _RouteManager {
|
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
this.disposeRendererHydration =
|
|
611
|
+
this.disposeRendererHydration = _chunkBY5VQ57Wcjs.setFarmRendererHydrationScope.call(void 0,
|
|
612
612
|
_chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, this.config).map((source) => source.root),
|
|
613
613
|
renderer,
|
|
614
614
|
routeModules
|
|
@@ -644,7 +644,7 @@ var RouteManager = class _RouteManager {
|
|
|
644
644
|
await this.discoverFileRoutes(source);
|
|
645
645
|
await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
|
|
646
646
|
}
|
|
647
|
-
this.programmaticClientRoutes =
|
|
647
|
+
this.programmaticClientRoutes = _chunkBY5VQ57Wcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
|
|
648
648
|
for (const slot of this.routeSlots.values()) {
|
|
649
649
|
if (slot.interception && !this.pageRouteShapes.has(_chunkT4YCWRCJcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
|
|
650
650
|
throw new (0, _chunkT4YCWRCJcjs.AmbiguousRouteError)(
|
|
@@ -726,7 +726,7 @@ var RouteManager = class _RouteManager {
|
|
|
726
726
|
getSearchPreserveRoutes() {
|
|
727
727
|
const routes = [];
|
|
728
728
|
for (const entry of this.routes.values()) {
|
|
729
|
-
const preserve = _optionalChain([
|
|
729
|
+
const preserve = _optionalChain([_chunkLH7S7FI3cjs.getProgrammaticRouteSearchClientOptions.call(void 0,
|
|
730
730
|
_optionalChain([this, 'access', _2 => _2.programmaticPages, 'access', _3 => _3.get, 'call', _4 => _4(entry.modulePath), 'optionalAccess', _5 => _5.search])
|
|
731
731
|
), 'optionalAccess', _6 => _6.preserve]);
|
|
732
732
|
if (!_optionalChain([preserve, 'optionalAccess', _7 => _7.length])) continue;
|
|
@@ -939,7 +939,7 @@ var RouteManager = class _RouteManager {
|
|
|
939
939
|
const cacheFile = this.packageClientBoundaryCacheFile;
|
|
940
940
|
const compute = () => {
|
|
941
941
|
try {
|
|
942
|
-
return
|
|
942
|
+
return _chunkBY5VQ57Wcjs.withFarmSourceSnapshot.call(void 0,
|
|
943
943
|
() => this.computeClientManifest(normalizedProjectRoot),
|
|
944
944
|
this.sourceSnapshot
|
|
945
945
|
);
|
|
@@ -948,7 +948,7 @@ var RouteManager = class _RouteManager {
|
|
|
948
948
|
throw error;
|
|
949
949
|
}
|
|
950
950
|
};
|
|
951
|
-
return cacheFile ?
|
|
951
|
+
return cacheFile ? _chunkBY5VQ57Wcjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
|
|
952
952
|
}
|
|
953
953
|
/**
|
|
954
954
|
* @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
|
|
@@ -957,7 +957,7 @@ var RouteManager = class _RouteManager {
|
|
|
957
957
|
*/
|
|
958
958
|
trackSourceChanges() {
|
|
959
959
|
this.sourceChangeTracking = true;
|
|
960
|
-
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0,
|
|
960
|
+
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkBY5VQ57Wcjs.FarmSourceSnapshotStore)())));
|
|
961
961
|
}
|
|
962
962
|
/**
|
|
963
963
|
* @internal A production build edits no source while it runs, so what the plan reads, parses and
|
|
@@ -966,7 +966,7 @@ var RouteManager = class _RouteManager {
|
|
|
966
966
|
*/
|
|
967
967
|
keepBuildSourceSnapshot() {
|
|
968
968
|
if (this.sourceChangeTracking) return;
|
|
969
|
-
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0,
|
|
969
|
+
_nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkBY5VQ57Wcjs.FarmSourceSnapshotStore)(false))));
|
|
970
970
|
}
|
|
971
971
|
/**
|
|
972
972
|
* @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
|
|
@@ -1026,9 +1026,9 @@ var RouteManager = class _RouteManager {
|
|
|
1026
1026
|
*/
|
|
1027
1027
|
isPlanNeutralEdit(file, previous) {
|
|
1028
1028
|
if (previous === void 0) return false;
|
|
1029
|
-
return
|
|
1029
|
+
return _chunkBY5VQ57Wcjs.withFarmSourceSnapshotAside.call(void 0,
|
|
1030
1030
|
this.sourceSnapshot,
|
|
1031
|
-
() =>
|
|
1031
|
+
() => _chunkBY5VQ57Wcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous) || !file.includes(NODE_MODULES_SEGMENT) && !this.linkedSources.has(file) && _chunkBY5VQ57Wcjs.isFarmServerModulePlanUnchanged.call(void 0, file, previous)
|
|
1032
1032
|
);
|
|
1033
1033
|
}
|
|
1034
1034
|
/**
|
|
@@ -1040,7 +1040,7 @@ var RouteManager = class _RouteManager {
|
|
|
1040
1040
|
if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
|
|
1041
1041
|
return { ...previous.plan };
|
|
1042
1042
|
}
|
|
1043
|
-
const { result, files, groups } =
|
|
1043
|
+
const { result, files, groups } = _chunkBY5VQ57Wcjs.traceFarmSourceReadGroups.call(void 0, compute);
|
|
1044
1044
|
const sources = /* @__PURE__ */ new Set();
|
|
1045
1045
|
for (const file of files) {
|
|
1046
1046
|
const source = this.planSourcePath(file);
|
|
@@ -1051,7 +1051,7 @@ var RouteManager = class _RouteManager {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
if (!this.sourceChangeTracking) {
|
|
1053
1053
|
for (const source of sources) {
|
|
1054
|
-
if (!this.planStamps.has(source)) this.planStamps.set(source,
|
|
1054
|
+
if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkBY5VQ57Wcjs.getFarmSourceStamp.call(void 0, source));
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
this.ownerPlans.set(key, { plan: result, files: sources, planKey });
|
|
@@ -1071,7 +1071,7 @@ var RouteManager = class _RouteManager {
|
|
|
1071
1071
|
const isUnchanged = (file) => {
|
|
1072
1072
|
let result = unchanged.get(file);
|
|
1073
1073
|
if (result === void 0) {
|
|
1074
|
-
result = this.planStamps.get(file) ===
|
|
1074
|
+
result = this.planStamps.get(file) === _chunkBY5VQ57Wcjs.getFarmSourceStamp.call(void 0, file);
|
|
1075
1075
|
unchanged.set(file, result);
|
|
1076
1076
|
}
|
|
1077
1077
|
return result;
|
|
@@ -1109,7 +1109,7 @@ var RouteManager = class _RouteManager {
|
|
|
1109
1109
|
source = file;
|
|
1110
1110
|
const index = file.lastIndexOf(NODE_MODULES_SEGMENT);
|
|
1111
1111
|
if (index !== -1) {
|
|
1112
|
-
const directory =
|
|
1112
|
+
const directory = _chunkBY5VQ57Wcjs.getInstalledPackageDirectory.call(void 0, file, index + NODE_MODULES_SEGMENT.length);
|
|
1113
1113
|
let linked = this.linkedPackages.get(directory);
|
|
1114
1114
|
if (linked === void 0) {
|
|
1115
1115
|
linked = realPathOutsideNodeModules(directory) !== null;
|
|
@@ -1135,7 +1135,7 @@ var RouteManager = class _RouteManager {
|
|
|
1135
1135
|
*/
|
|
1136
1136
|
inspectPackages(operation) {
|
|
1137
1137
|
const file = this.packageClientBoundaryCacheFile;
|
|
1138
|
-
return file ?
|
|
1138
|
+
return file ? _chunkBY5VQ57Wcjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
|
|
1139
1139
|
}
|
|
1140
1140
|
computeClientManifest(normalizedProjectRoot) {
|
|
1141
1141
|
const toUrlPath = (absolutePath) => {
|
|
@@ -1158,14 +1158,14 @@ var RouteManager = class _RouteManager {
|
|
|
1158
1158
|
`[Farm.js] Client components hydrate with their route, not as islands, because integration provider "${unsupportedIntegrationProvider.name}" doesn't declare \`islands: true\`.`
|
|
1159
1159
|
);
|
|
1160
1160
|
}
|
|
1161
|
-
const isolatedMode =
|
|
1161
|
+
const isolatedMode = _chunkBY5VQ57Wcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
|
|
1162
1162
|
_optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.isolatedClientHydration]),
|
|
1163
1163
|
{
|
|
1164
1164
|
serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, this.config)) === "rsc",
|
|
1165
1165
|
hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
|
-
const planOptions =
|
|
1168
|
+
const planOptions = _chunkBY5VQ57Wcjs.getFarmClientHydrationPlanOptions.call(void 0,
|
|
1169
1169
|
this.config.renderer,
|
|
1170
1170
|
Boolean(unsupportedIntegrationProvider)
|
|
1171
1171
|
);
|
|
@@ -1190,13 +1190,13 @@ var RouteManager = class _RouteManager {
|
|
|
1190
1190
|
metadata: this.planRouteModule(
|
|
1191
1191
|
`layout:${entry.modulePath}`,
|
|
1192
1192
|
edited,
|
|
1193
|
-
() =>
|
|
1193
|
+
() => _chunkBY5VQ57Wcjs.getClientModuleHydrationPlan.call(void 0,
|
|
1194
1194
|
entry.modulePath,
|
|
1195
1195
|
normalizedProjectRoot,
|
|
1196
1196
|
isolatedMode,
|
|
1197
1197
|
layoutPlanOptions
|
|
1198
1198
|
),
|
|
1199
|
-
|
|
1199
|
+
_chunkBY5VQ57Wcjs.getClientModuleHydrationPlanKey.call(void 0,
|
|
1200
1200
|
entry.modulePath,
|
|
1201
1201
|
normalizedProjectRoot,
|
|
1202
1202
|
isolatedMode,
|
|
@@ -1204,7 +1204,7 @@ var RouteManager = class _RouteManager {
|
|
|
1204
1204
|
)
|
|
1205
1205
|
)
|
|
1206
1206
|
}));
|
|
1207
|
-
const markdownComponentsPlan =
|
|
1207
|
+
const markdownComponentsPlan = _chunkBY5VQ57Wcjs.createMarkdownPageHydrationPlanner.call(void 0,
|
|
1208
1208
|
_chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
|
|
1209
1209
|
normalizedProjectRoot,
|
|
1210
1210
|
isolatedMode,
|
|
@@ -1220,13 +1220,13 @@ var RouteManager = class _RouteManager {
|
|
|
1220
1220
|
metadata: _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
|
|
1221
1221
|
`page:${entry.modulePath}`,
|
|
1222
1222
|
edited,
|
|
1223
|
-
() =>
|
|
1223
|
+
() => _chunkBY5VQ57Wcjs.getClientModuleHydrationPlan.call(void 0,
|
|
1224
1224
|
entry.modulePath,
|
|
1225
1225
|
normalizedProjectRoot,
|
|
1226
1226
|
isolatedMode,
|
|
1227
1227
|
pagePlanOptions
|
|
1228
1228
|
),
|
|
1229
|
-
|
|
1229
|
+
_chunkBY5VQ57Wcjs.getClientModuleHydrationPlanKey.call(void 0,
|
|
1230
1230
|
entry.modulePath,
|
|
1231
1231
|
normalizedProjectRoot,
|
|
1232
1232
|
isolatedMode,
|
|
@@ -1256,7 +1256,7 @@ var RouteManager = class _RouteManager {
|
|
|
1256
1256
|
`[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
|
|
1257
1257
|
);
|
|
1258
1258
|
}
|
|
1259
|
-
|
|
1259
|
+
_chunkBY5VQ57Wcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
|
|
1260
1260
|
layoutEntries.map(({ entry, metadata }) => ({
|
|
1261
1261
|
pattern: entry.pattern,
|
|
1262
1262
|
depth: _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
|
|
@@ -1303,7 +1303,7 @@ var RouteManager = class _RouteManager {
|
|
|
1303
1303
|
modulePath: toUrlPath(boundary.modulePath)
|
|
1304
1304
|
}))
|
|
1305
1305
|
} : {},
|
|
1306
|
-
...
|
|
1306
|
+
..._chunkBY5VQ57Wcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
|
|
1307
1307
|
renderPlan: _chunkIGBQSUT5cjs.createFarmRouteRenderPlan.call(void 0, {
|
|
1308
1308
|
pageShouldHydrate: metadata.shouldHydrate,
|
|
1309
1309
|
layoutShouldHydrate,
|
|
@@ -1311,7 +1311,7 @@ var RouteManager = class _RouteManager {
|
|
|
1311
1311
|
}),
|
|
1312
1312
|
suppressedAsyncHydration: metadata.suppressedAsyncHydration,
|
|
1313
1313
|
...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {},
|
|
1314
|
-
search:
|
|
1314
|
+
search: _chunkLH7S7FI3cjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _34 => _34.search])),
|
|
1315
1315
|
segments: entry.route.segments.map((seg) => ({
|
|
1316
1316
|
segment: seg.segment,
|
|
1317
1317
|
isDynamic: seg.isDynamic,
|
|
@@ -1345,7 +1345,7 @@ var RouteManager = class _RouteManager {
|
|
|
1345
1345
|
...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
|
|
1346
1346
|
}));
|
|
1347
1347
|
const slots = Array.from(this.routeSlots.values()).map((entry) => {
|
|
1348
|
-
const metadata =
|
|
1348
|
+
const metadata = _chunkBY5VQ57Wcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
|
|
1349
1349
|
return {
|
|
1350
1350
|
name: entry.name,
|
|
1351
1351
|
ownerPattern: entry.ownerPattern,
|
|
@@ -1361,7 +1361,7 @@ var RouteManager = class _RouteManager {
|
|
|
1361
1361
|
};
|
|
1362
1362
|
});
|
|
1363
1363
|
const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
|
|
1364
|
-
metadata:
|
|
1364
|
+
metadata: _chunkBY5VQ57Wcjs.getClientModuleHydrationPlan.call(void 0,
|
|
1365
1365
|
entry.modulePath,
|
|
1366
1366
|
normalizedProjectRoot,
|
|
1367
1367
|
isolatedMode,
|
|
@@ -1534,7 +1534,7 @@ var RouteManager = class _RouteManager {
|
|
|
1534
1534
|
(extension) => extension.slice(1)
|
|
1535
1535
|
);
|
|
1536
1536
|
const componentGlob = componentExtensions.join(",");
|
|
1537
|
-
const rendererRoutes = await
|
|
1537
|
+
const rendererRoutes = await _chunkP2PF5FUWcjs.resolveFarmRendererRoutes.call(void 0, {
|
|
1538
1538
|
renderer: this.config.renderer,
|
|
1539
1539
|
root: source.root,
|
|
1540
1540
|
srcDir: source.srcDir
|
|
@@ -1730,27 +1730,27 @@ var RouteManager = class _RouteManager {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
}
|
|
1732
1732
|
async discoverProgrammaticRoutes(source, clientRoutes) {
|
|
1733
|
-
if (this.viteServer)
|
|
1734
|
-
const manifests = await
|
|
1733
|
+
if (this.viteServer) _chunkLH7S7FI3cjs.trackProgrammaticRouteSources.call(void 0, );
|
|
1734
|
+
const manifests = await _chunkDZWX7FDXcjs.loadProgrammaticRouteManifests.call(void 0, {
|
|
1735
1735
|
root: source.root,
|
|
1736
1736
|
srcDir: source.srcDir,
|
|
1737
1737
|
loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
|
|
1738
1738
|
});
|
|
1739
|
-
const graph = this.viteServer ?
|
|
1739
|
+
const graph = this.viteServer ? _chunkBY5VQ57Wcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
|
|
1740
1740
|
for (const { filePath, manifest } of manifests) {
|
|
1741
1741
|
if (graph) {
|
|
1742
1742
|
clientRoutes.push(
|
|
1743
|
-
|
|
1743
|
+
_chunkBY5VQ57Wcjs.resolveProgrammaticClientRoutes.call(void 0, {
|
|
1744
1744
|
graph,
|
|
1745
1745
|
routesFile: toRealPath(filePath),
|
|
1746
1746
|
routes: manifest.routes,
|
|
1747
|
-
normalizeRoutePath:
|
|
1747
|
+
normalizeRoutePath: _chunkLH7S7FI3cjs.normalizeProgrammaticRoutePath
|
|
1748
1748
|
})
|
|
1749
1749
|
);
|
|
1750
1750
|
}
|
|
1751
1751
|
for (const definition of manifest.routes) {
|
|
1752
1752
|
if (definition.kind === "page") {
|
|
1753
|
-
const route =
|
|
1753
|
+
const route = _chunkLH7S7FI3cjs.parseProgrammaticRoutePath.call(void 0, definition.path, "page");
|
|
1754
1754
|
const pattern = this.createRoutePattern(route);
|
|
1755
1755
|
const existing = this.routes.get(pattern);
|
|
1756
1756
|
if (_optionalChain([existing, 'optionalAccess', _46 => _46.sourceRoot]) === source.root) {
|
|
@@ -1758,7 +1758,7 @@ var RouteManager = class _RouteManager {
|
|
|
1758
1758
|
`Duplicate page route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
|
|
1759
1759
|
);
|
|
1760
1760
|
}
|
|
1761
|
-
const modulePath =
|
|
1761
|
+
const modulePath = _chunkLH7S7FI3cjs.createProgrammaticRouteModuleId.call(void 0, filePath, "page", definition.path);
|
|
1762
1762
|
this.programmaticPages.set(modulePath, definition);
|
|
1763
1763
|
this.registerPageRoute({
|
|
1764
1764
|
route,
|
|
@@ -1770,7 +1770,7 @@ var RouteManager = class _RouteManager {
|
|
|
1770
1770
|
});
|
|
1771
1771
|
}
|
|
1772
1772
|
if (definition.kind === "layout") {
|
|
1773
|
-
const route =
|
|
1773
|
+
const route = _chunkLH7S7FI3cjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
|
|
1774
1774
|
const pattern = _chunkIGBQSUT5cjs.createRouteDirectoryPattern.call(void 0, route);
|
|
1775
1775
|
const existing = this.layouts.get(pattern);
|
|
1776
1776
|
if (_optionalChain([existing, 'optionalAccess', _47 => _47.sourceRoot]) === source.root) {
|
|
@@ -1778,7 +1778,7 @@ var RouteManager = class _RouteManager {
|
|
|
1778
1778
|
`Duplicate layout route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
|
|
1779
1779
|
);
|
|
1780
1780
|
}
|
|
1781
|
-
const modulePath =
|
|
1781
|
+
const modulePath = _chunkLH7S7FI3cjs.createProgrammaticRouteModuleId.call(void 0, filePath, "layout", definition.path);
|
|
1782
1782
|
this.programmaticLayouts.set(modulePath, definition);
|
|
1783
1783
|
this.layouts.set(pattern, {
|
|
1784
1784
|
route,
|
|
@@ -1789,7 +1789,7 @@ var RouteManager = class _RouteManager {
|
|
|
1789
1789
|
});
|
|
1790
1790
|
}
|
|
1791
1791
|
if (definition.kind === "redirect") {
|
|
1792
|
-
const route =
|
|
1792
|
+
const route = _chunkLH7S7FI3cjs.parseProgrammaticRoutePath.call(void 0, definition.source, "page");
|
|
1793
1793
|
const pattern = this.createRoutePattern(route);
|
|
1794
1794
|
this.redirects.set(pattern, {
|
|
1795
1795
|
route,
|
|
@@ -1832,16 +1832,18 @@ var RouteManager = class _RouteManager {
|
|
|
1832
1832
|
return null;
|
|
1833
1833
|
}
|
|
1834
1834
|
findMatchingRouteSlots(pathname, pathnameParts, interceptFrom) {
|
|
1835
|
+
const normalizedFrom = interceptFrom ? this.toRoutePathname(new URL(interceptFrom, "http://farm.local").pathname) : void 0;
|
|
1836
|
+
const normalizedFromParts = normalizedFrom ? _chunk7ZDLE77Pcjs.splitRoutePath.call(void 0, normalizedFrom) : void 0;
|
|
1835
1837
|
const groups = /* @__PURE__ */ new Map();
|
|
1836
1838
|
for (const entry of this.routeSlots.values()) {
|
|
1837
|
-
if (!this.matchesRoutePrefix(pathname, entry.ownerPattern, pathnameParts))
|
|
1839
|
+
if (!this.matchesRoutePrefix(pathname, entry.ownerPattern, pathnameParts) && !(entry.interception && normalizedFrom !== void 0 && this.matchesRoutePrefix(normalizedFrom, entry.ownerPattern, normalizedFromParts))) {
|
|
1840
|
+
continue;
|
|
1841
|
+
}
|
|
1838
1842
|
const key = `${entry.ownerPattern}:${entry.name}`;
|
|
1839
1843
|
const entries = _nullishCoalesce(groups.get(key), () => ( []));
|
|
1840
1844
|
entries.push(entry);
|
|
1841
1845
|
groups.set(key, entries);
|
|
1842
1846
|
}
|
|
1843
|
-
const normalizedFrom = interceptFrom ? this.toRoutePathname(new URL(interceptFrom, "http://farm.local").pathname) : void 0;
|
|
1844
|
-
const normalizedFromParts = normalizedFrom ? _chunk7ZDLE77Pcjs.splitRoutePath.call(void 0, normalizedFrom) : void 0;
|
|
1845
1847
|
const matches = [];
|
|
1846
1848
|
for (const entries of groups.values()) {
|
|
1847
1849
|
const candidates = entries.filter((entry) => !entry.fallback).filter(
|
|
@@ -1945,7 +1947,7 @@ var RouteManager = class _RouteManager {
|
|
|
1945
1947
|
* Returns all pages marked with `export const ssg = true` along with
|
|
1946
1948
|
* their pre-computed paths (for dynamic routes using getStaticPaths)
|
|
1947
1949
|
*/
|
|
1948
|
-
async collectSSGPages() {
|
|
1950
|
+
async collectSSGPages(options = {}) {
|
|
1949
1951
|
const routes = Array.from(this.routes.values()).map((entry) => ({
|
|
1950
1952
|
path: entry.pattern,
|
|
1951
1953
|
filePath: entry.modulePath,
|
|
@@ -1954,9 +1956,12 @@ var RouteManager = class _RouteManager {
|
|
|
1954
1956
|
}));
|
|
1955
1957
|
const i18n = this.getI18nConfig();
|
|
1956
1958
|
const docsAdapterRoutes = this.getDocsAdapterRoutes();
|
|
1957
|
-
const result = await
|
|
1959
|
+
const result = await _chunk7Q6KUXH6cjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
|
|
1958
1960
|
suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
|
|
1959
|
-
...docsAdapterRoutes ? { docsAdapterRoutes } : {}
|
|
1961
|
+
...docsAdapterRoutes ? { docsAdapterRoutes } : {},
|
|
1962
|
+
// A localized URL's render depends on the locale the request resolves, so i18n apps keep
|
|
1963
|
+
// every page that asks for nothing on the server.
|
|
1964
|
+
...options.staticCandidates && !i18n ? { staticCandidates: true } : {}
|
|
1960
1965
|
});
|
|
1961
1966
|
if (!i18n) {
|
|
1962
1967
|
return result;
|
|
@@ -2001,7 +2006,7 @@ var RouteManager = class _RouteManager {
|
|
|
2001
2006
|
async isRouteSSG(modulePath) {
|
|
2002
2007
|
try {
|
|
2003
2008
|
const mod = await this.loadRouteModule(modulePath);
|
|
2004
|
-
const rendering = await
|
|
2009
|
+
const rendering = await _chunk7Q6KUXH6cjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
2005
2010
|
return rendering.ssg;
|
|
2006
2011
|
} catch (e2) {
|
|
2007
2012
|
return false;
|
|
@@ -2013,7 +2018,7 @@ var RouteManager = class _RouteManager {
|
|
|
2013
2018
|
async hasRouteISR(modulePath) {
|
|
2014
2019
|
try {
|
|
2015
2020
|
const mod = await this.loadRouteModule(modulePath);
|
|
2016
|
-
const rendering = await
|
|
2021
|
+
const rendering = await _chunk7Q6KUXH6cjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
2017
2022
|
return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
|
|
2018
2023
|
} catch (e3) {
|
|
2019
2024
|
return false;
|
|
@@ -2025,7 +2030,7 @@ var RouteManager = class _RouteManager {
|
|
|
2025
2030
|
async getRouteRevalidateInterval(modulePath) {
|
|
2026
2031
|
try {
|
|
2027
2032
|
const mod = await this.loadRouteModule(modulePath);
|
|
2028
|
-
const rendering = await
|
|
2033
|
+
const rendering = await _chunk7Q6KUXH6cjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
|
|
2029
2034
|
return rendering.revalidate;
|
|
2030
2035
|
} catch (e4) {
|
|
2031
2036
|
return void 0;
|
|
@@ -3457,7 +3462,7 @@ function inferFarmIslandStrategy(filePath, root) {
|
|
|
3457
3462
|
const result = _compiler.inferStrategy.call(void 0, file, code, {
|
|
3458
3463
|
parse: parseFarmIslandSource,
|
|
3459
3464
|
resolve: (specifier, importer) => {
|
|
3460
|
-
const resolved =
|
|
3465
|
+
const resolved = _chunkBY5VQ57Wcjs.resolveImportedModule.call(void 0, importer, specifier, root);
|
|
3461
3466
|
return resolved.local ? resolved.path : null;
|
|
3462
3467
|
}
|
|
3463
3468
|
});
|
|
@@ -3493,7 +3498,7 @@ function inferFarmRouteRootStrategy(owners, root) {
|
|
|
3493
3498
|
if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
|
|
3494
3499
|
return cached.result;
|
|
3495
3500
|
}
|
|
3496
|
-
const { result, files } =
|
|
3501
|
+
const { result, files } = _chunkBY5VQ57Wcjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
|
|
3497
3502
|
const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
|
|
3498
3503
|
routeRootInferences.set(key, {
|
|
3499
3504
|
stamps: [...read].map((file) => [file, modifiedAt(file)]),
|
|
@@ -3510,7 +3515,7 @@ function inferRouteRoot(owners, root) {
|
|
|
3510
3515
|
const files = [];
|
|
3511
3516
|
const modules = [];
|
|
3512
3517
|
for (const owner of owners) {
|
|
3513
|
-
const rendered =
|
|
3518
|
+
const rendered = _chunkBY5VQ57Wcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
|
|
3514
3519
|
if (!rendered) {
|
|
3515
3520
|
return {
|
|
3516
3521
|
strategy: null,
|
|
@@ -3526,7 +3531,7 @@ function inferRouteRoot(owners, root) {
|
|
|
3526
3531
|
source = fs2.default.readFileSync(module, "utf8");
|
|
3527
3532
|
} catch (e12) {
|
|
3528
3533
|
}
|
|
3529
|
-
if (
|
|
3534
|
+
if (_chunkBY5VQ57Wcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
|
|
3530
3535
|
}
|
|
3531
3536
|
for (const module of modules) {
|
|
3532
3537
|
const result = inferFarmIslandStrategy(module, root);
|
|
@@ -3924,7 +3929,7 @@ var DECLARATION_STATEMENTS = /* @__PURE__ */ new Set([
|
|
|
3924
3929
|
function parse(code, file) {
|
|
3925
3930
|
const extension = path4.default.extname(file).slice(1);
|
|
3926
3931
|
const lang = extension === "ts" || extension === "mts" || extension === "cts" ? "ts" : extension === "js" || extension === "mjs" || extension === "cjs" || extension === "jsx" ? "jsx" : "tsx";
|
|
3927
|
-
return
|
|
3932
|
+
return _chunkBY5VQ57Wcjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
|
|
3928
3933
|
try {
|
|
3929
3934
|
return _parseAst.parseAst.call(void 0, code, { lang });
|
|
3930
3935
|
} catch (e15) {
|
|
@@ -4059,14 +4064,14 @@ function isReference(node, parent, key) {
|
|
|
4059
4064
|
}
|
|
4060
4065
|
function readSource(file) {
|
|
4061
4066
|
try {
|
|
4062
|
-
|
|
4067
|
+
_chunkBY5VQ57Wcjs.noteFarmSourceRead.call(void 0, file);
|
|
4063
4068
|
return fs2.default.readFileSync(file, "utf8");
|
|
4064
4069
|
} catch (e16) {
|
|
4065
4070
|
return null;
|
|
4066
4071
|
}
|
|
4067
4072
|
}
|
|
4068
4073
|
function explainFarmKeptLayoutRender(modulePath, root) {
|
|
4069
|
-
const entry =
|
|
4074
|
+
const entry = _chunkBY5VQ57Wcjs.resolveModuleSourcePath.call(void 0, modulePath, root);
|
|
4070
4075
|
if (!entry) return `${modulePath} does not resolve`;
|
|
4071
4076
|
const visited = /* @__PURE__ */ new Set();
|
|
4072
4077
|
const check = (file) => {
|
|
@@ -4076,7 +4081,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
|
|
|
4076
4081
|
if (!SCRIPT_SOURCE.test(file)) return `${path4.default.relative(root, file)} is not a script`;
|
|
4077
4082
|
const code = readSource(file);
|
|
4078
4083
|
if (code === null) return `${path4.default.relative(root, file)} cannot be read`;
|
|
4079
|
-
const { reason, imports } =
|
|
4084
|
+
const { reason, imports } = _chunkBY5VQ57Wcjs.memoizeInFarmSourceSnapshot.call(void 0,
|
|
4080
4085
|
"kept-layout-module",
|
|
4081
4086
|
code,
|
|
4082
4087
|
() => findFarmRequestDecidingConstruct(code, file)
|
|
@@ -4089,7 +4094,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
|
|
|
4089
4094
|
return `${path4.default.relative(root, file)} imports ${imported.names.join(", ")} from ${imported.source}`;
|
|
4090
4095
|
}
|
|
4091
4096
|
if (ASSET_SOURCE.test(imported.source.split("?")[0])) continue;
|
|
4092
|
-
const resolved =
|
|
4097
|
+
const resolved = _chunkBY5VQ57Wcjs.resolveImportedModule.call(void 0, file, imported.source, root);
|
|
4093
4098
|
if (!resolved.path || !resolved.local) {
|
|
4094
4099
|
return `${path4.default.relative(root, file)} imports ${imported.source}`;
|
|
4095
4100
|
}
|
|
@@ -4104,15 +4109,15 @@ var answers = /* @__PURE__ */ new Map();
|
|
|
4104
4109
|
function canFarmSkipKeptLayoutRender(modulePath, root) {
|
|
4105
4110
|
const key = `${root}\0${modulePath}`;
|
|
4106
4111
|
const known = answers.get(key);
|
|
4107
|
-
if (known && known.stamps.every(([file, stamp]) =>
|
|
4112
|
+
if (known && known.stamps.every(([file, stamp]) => _chunkBY5VQ57Wcjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
|
|
4108
4113
|
return known.skip;
|
|
4109
4114
|
}
|
|
4110
|
-
const { result, files } =
|
|
4115
|
+
const { result, files } = _chunkBY5VQ57Wcjs.traceFarmSourceReads.call(void 0,
|
|
4111
4116
|
() => explainFarmKeptLayoutRender(modulePath, root) === null
|
|
4112
4117
|
);
|
|
4113
4118
|
answers.set(key, {
|
|
4114
4119
|
skip: result,
|
|
4115
|
-
stamps: files.map((file) => [file,
|
|
4120
|
+
stamps: files.map((file) => [file, _chunkBY5VQ57Wcjs.getFarmSourceStamp.call(void 0, file)])
|
|
4116
4121
|
});
|
|
4117
4122
|
return result;
|
|
4118
4123
|
}
|
|
@@ -4240,7 +4245,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
|
|
|
4240
4245
|
function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
|
|
4241
4246
|
if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
|
|
4242
4247
|
warnedSuppressedAsyncHydrationModules.add(modulePath);
|
|
4243
|
-
_chunk7ZDLE77Pcjs.logger.warn(
|
|
4248
|
+
_chunk7ZDLE77Pcjs.logger.warn(_chunkBY5VQ57Wcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
|
|
4244
4249
|
}
|
|
4245
4250
|
var fullDocumentRoutes = /* @__PURE__ */ new Set();
|
|
4246
4251
|
var documentLayouts = /* @__PURE__ */ new WeakMap();
|
|
@@ -4966,7 +4971,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
4966
4971
|
* Check if a path should be served from SSG cache
|
|
4967
4972
|
*/
|
|
4968
4973
|
async shouldServeSSG(pathname) {
|
|
4969
|
-
const ssgPage =
|
|
4974
|
+
const ssgPage = _chunk7Q6KUXH6cjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
|
|
4970
4975
|
if (!ssgPage) return null;
|
|
4971
4976
|
const cached = await this.getCachedSSGPage(pathname);
|
|
4972
4977
|
if (cached && await this.dataCache.isStaleAsync(cached)) {
|
|
@@ -5466,7 +5471,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5466
5471
|
throw error;
|
|
5467
5472
|
}
|
|
5468
5473
|
}
|
|
5469
|
-
const renderingConfig = await
|
|
5474
|
+
const renderingConfig = await _chunk7Q6KUXH6cjs.resolveRouteRenderingConfigFromFile.call(void 0,
|
|
5470
5475
|
routeModule,
|
|
5471
5476
|
route.modulePath,
|
|
5472
5477
|
{ experimentalPPR: _optionalChain([this, 'access', _141 => _141.config, 'access', _142 => _142.experimental, 'optionalAccess', _143 => _143.ppr]) === true }
|
|
@@ -5558,7 +5563,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
5558
5563
|
const routeManifestEntry = routeManifest.routes.find(
|
|
5559
5564
|
(entry) => entry.pattern === route.pattern
|
|
5560
5565
|
);
|
|
5561
|
-
const moduleMetadata = routeManifestEntry ||
|
|
5566
|
+
const moduleMetadata = routeManifestEntry || _chunkBY5VQ57Wcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
|
|
5562
5567
|
const isClientComponent = moduleMetadata.isClientComponent;
|
|
5563
5568
|
const renderedRouteSlots = await Promise.all(
|
|
5564
5569
|
routeSlots.map(async (slot) => {
|
|
@@ -6380,7 +6385,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6380
6385
|
if (this.routeManager.matchRoute(_chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
|
|
6381
6386
|
_nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkR6GOH5CHcjs.createFarmDefaultMCPServer.call(void 0,
|
|
6382
6387
|
readAppPackageIdentity(this.config.root),
|
|
6383
|
-
|
|
6388
|
+
_chunkEZRB5N6Scjs.FARM_VERSION
|
|
6384
6389
|
))));
|
|
6385
6390
|
return _chunkR6GOH5CHcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
|
|
6386
6391
|
}
|
|
@@ -6474,7 +6479,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6474
6479
|
pages,
|
|
6475
6480
|
config,
|
|
6476
6481
|
rootMetadata,
|
|
6477
|
-
mcp: _optionalChain([this, 'access', _230 => _230.config, 'access', _231 => _231.agent, 'optionalAccess', _232 => _232.aiCatalog]) === false ? [] :
|
|
6482
|
+
mcp: _optionalChain([this, 'access', _230 => _230.config, 'access', _231 => _231.agent, 'optionalAccess', _232 => _232.aiCatalog]) === false ? [] : _chunkPVR63WHWcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
|
|
6478
6483
|
basePath: this.config.basePath,
|
|
6479
6484
|
apiServerBasePath: _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0,
|
|
6480
6485
|
_chunkG5KGLMPNcjs.normalizeFarmAPIConfig.call(void 0,
|
|
@@ -7502,7 +7507,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
|
|
|
7502
7507
|
stack: _optionalChain([diagnostics, 'optionalAccess', _313 => _313.stack]),
|
|
7503
7508
|
sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _314 => _314.sourceFrame]),
|
|
7504
7509
|
development: isDev,
|
|
7505
|
-
farmVersion:
|
|
7510
|
+
farmVersion: _chunkEZRB5N6Scjs.FARM_VERSION,
|
|
7506
7511
|
nodeVersion: process.version,
|
|
7507
7512
|
mode: isDev ? "development" : "production"
|
|
7508
7513
|
})
|
|
@@ -7806,7 +7811,7 @@ var FarmApp = class {
|
|
|
7806
7811
|
);
|
|
7807
7812
|
if (!hasAppDirectory) {
|
|
7808
7813
|
const routeFiles = _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
|
|
7809
|
-
(source) =>
|
|
7814
|
+
(source) => _chunkDZWX7FDXcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
|
|
7810
7815
|
);
|
|
7811
7816
|
if (routeFiles.length > 0) {
|
|
7812
7817
|
return;
|