@farm.js/core 0.2.0-beta.0 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-handler-IUL6OPC3.cjs → agent-mcp-handler-EXOG55M4.cjs} +5 -5
- package/dist/{agent-mcp-handler-GDY5CPPW.mjs → agent-mcp-handler-VX4NDDHR.mjs} +4 -4
- package/dist/{agent-mcp.d-BdM0pIrD.d.ts → agent-mcp.d-DBaonhLg.d.ts} +1 -1
- package/dist/{agent-mcp.d-CMGqpUbk.d.mts → agent-mcp.d-DhCEzIfu.d.mts} +1 -1
- package/dist/agent-runtime.cjs +2 -2
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/agent-runtime.mjs +1 -1
- package/dist/analyzer-OWIHFO5M.cjs +17 -0
- package/dist/{analyzer-PWHYGER6.mjs → analyzer-T2U345WL.mjs} +2 -2
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/route-manager.cjs +3 -3
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +2 -2
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +4 -4
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +3 -3
- package/dist/{app-manifest.d-COhjPgHn.d.ts → app-manifest.d-nLVFFd7N.d.ts} +1 -1
- package/dist/{app-manifest.d-BeDB2OVm.d.mts → app-manifest.d-uE0JGZKN.d.mts} +1 -1
- package/dist/app-markdown.cjs +6 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +7 -5
- package/dist/{app.d-b3A4cca5.d.ts → app.d-CwVkAUEU.d.ts} +14 -8
- package/dist/{app.d-AVZXCfcO.d.mts → app.d-DGGcNXV7.d.mts} +14 -8
- package/dist/{chunk-AG27TI6Q.mjs → chunk-23NBOP43.mjs} +3 -0
- package/dist/{chunk-BGEA4K7C.mjs → chunk-26ZTI2ZO.mjs} +4 -4
- package/dist/{chunk-L6ZL35ZJ.mjs → chunk-4A6A6P4T.mjs} +2 -2
- package/dist/{chunk-ZOD6EYWE.mjs → chunk-4Q263EQI.mjs} +2 -2
- package/dist/{chunk-2NOHVIJ3.cjs → chunk-5LJF4KUZ.cjs} +17 -4
- package/dist/{chunk-5AL2GXAU.mjs → chunk-7MMDEIVC.mjs} +1 -1
- package/dist/{chunk-GV5D5EM6.mjs → chunk-ANKMAGFJ.mjs} +1 -1
- package/dist/{chunk-QBXS4TNG.mjs → chunk-BL54BTVJ.mjs} +1 -1
- package/dist/{chunk-YCHIR3X6.mjs → chunk-BW563VZZ.mjs} +34 -2
- package/dist/{chunk-XRYLMTYF.cjs → chunk-CBB7I6HW.cjs} +3 -3
- package/dist/{chunk-KMGHXIDA.cjs → chunk-CHOOBTDD.cjs} +2 -2
- package/dist/{chunk-MRULVIH3.mjs → chunk-COK4IXOO.mjs} +35 -18
- package/dist/{chunk-YU2MNIIY.mjs → chunk-CRF5MOLO.mjs} +17 -4
- package/dist/{chunk-NQ3Y6E2T.mjs → chunk-CV4MOEMO.mjs} +2 -2
- package/dist/{chunk-OLKYHTLN.cjs → chunk-DA432P2F.cjs} +5 -5
- package/dist/{chunk-B3HQTGXS.cjs → chunk-DVAZ53X6.cjs} +6 -1
- package/dist/{chunk-XRSNW4IU.mjs → chunk-E72GG355.mjs} +5 -0
- package/dist/{chunk-CNGGEHXY.cjs → chunk-EA5HVG45.cjs} +2 -2
- package/dist/{chunk-NG2EZ6QS.cjs → chunk-EODGIFI7.cjs} +4 -2
- package/dist/{chunk-Y3DO7BIJ.cjs → chunk-EUZFBHPP.cjs} +3 -0
- package/dist/{chunk-ERV422FO.cjs → chunk-EXPVSFAG.cjs} +16 -13
- package/dist/{chunk-EACD6ND7.cjs → chunk-EZUTDTFM.cjs} +7 -7
- package/dist/{chunk-PTAGDZ7I.mjs → chunk-GTHBWZUK.mjs} +5 -1
- package/dist/{chunk-KCJBIWBM.mjs → chunk-GVORDLLV.mjs} +1 -1
- package/dist/{chunk-XGL42MQ7.mjs → chunk-HIDZM23B.mjs} +1 -1
- package/dist/{chunk-W3ZBLFLU.mjs → chunk-HNB5JHBO.mjs} +6 -3
- package/dist/{chunk-MM4U2NNI.mjs → chunk-HVGINJTO.mjs} +101 -42
- package/dist/{chunk-XJJQAFZX.mjs → chunk-I5KPOXUE.mjs} +1 -1
- package/dist/{chunk-HR5GU4UU.cjs → chunk-ILQSRLKK.cjs} +4 -4
- package/dist/{chunk-TQFIZRON.cjs → chunk-J2EKGR6E.cjs} +1030 -485
- package/dist/{chunk-26WP75W5.cjs → chunk-JDT733EW.cjs} +41 -27
- package/dist/{chunk-W53Z4WDI.cjs → chunk-JH4CDG4G.cjs} +8 -8
- package/dist/{chunk-KQ6TYQU7.cjs → chunk-KDQKTX3Q.cjs} +4 -4
- package/dist/{chunk-PEQJ4UUT.mjs → chunk-LP6DIYGA.mjs} +2 -2
- package/dist/{chunk-M4CNAZMS.mjs → chunk-LQ3FISSD.mjs} +61 -40
- package/dist/{chunk-PQ6DBVJ2.cjs → chunk-M4YXD6MD.cjs} +291 -232
- package/dist/{chunk-CFLRUCN7.cjs → chunk-MWAWMFG3.cjs} +415 -394
- package/dist/{chunk-ECVSRE4Y.mjs → chunk-N2BRIN7I.mjs} +1 -1
- package/dist/{chunk-SUACCCZG.cjs → chunk-N2ZMSSPP.cjs} +11 -11
- package/dist/{chunk-MO4UTDQ6.mjs → chunk-NNNMFSXG.mjs} +1 -1
- package/dist/{chunk-6266WH6X.cjs → chunk-NOSLIDSG.cjs} +1 -1
- package/dist/{chunk-ICOJ2BC6.mjs → chunk-NWF2FTFV.mjs} +24 -10
- package/dist/{chunk-HU4R2PPW.cjs → chunk-NZRAUCUL.cjs} +2 -2
- package/dist/{chunk-VMGQOP7X.cjs → chunk-OLIWLN4I.cjs} +2 -2
- package/dist/{chunk-H47EH24T.mjs → chunk-OQOII62L.mjs} +1 -1
- package/dist/{chunk-BJHXFEAF.mjs → chunk-P2TGLGRR.mjs} +4 -4
- package/dist/{chunk-THGSPDFD.cjs → chunk-PAKB6JHX.cjs} +7 -7
- package/dist/{chunk-WOTAU3BN.mjs → chunk-Q637AXGZ.mjs} +218 -74
- package/dist/{chunk-ZZGQD3LL.mjs → chunk-QO24II6C.mjs} +4 -2
- package/dist/{chunk-SG5RFGV6.cjs → chunk-RBSGFS5X.cjs} +66 -34
- package/dist/{chunk-IJPRCQHW.cjs → chunk-RGMUS3HO.cjs} +10 -10
- package/dist/{chunk-PA3VZNWU.cjs → chunk-RTAWQXME.cjs} +324 -180
- package/dist/{chunk-DMSXZNQR.cjs → chunk-RZI6436F.cjs} +2 -2
- package/dist/{chunk-HZY63K5C.mjs → chunk-S6MGFULY.mjs} +2 -2
- package/dist/{chunk-5GFTMTX3.cjs → chunk-SAUGKNCF.cjs} +2 -2
- package/dist/{chunk-JGUMFTZT.cjs → chunk-SCE7VWPN.cjs} +12 -12
- package/dist/{chunk-BQHIJOZM.cjs → chunk-SIECKBNK.cjs} +6 -2
- package/dist/{chunk-JDO3X7RB.mjs → chunk-SPKZCFPH.mjs} +1 -1
- package/dist/{chunk-LUGQUU4S.mjs → chunk-SSFAPTRD.mjs} +1 -1
- package/dist/{chunk-7LBNWL3L.cjs → chunk-SWPLGPYF.cjs} +7 -7
- package/dist/{chunk-3MY6TNNE.cjs → chunk-TWFJJPE7.cjs} +3 -3
- package/dist/{chunk-WP77JDKI.cjs → chunk-UCJCU2IL.cjs} +14 -14
- package/dist/{chunk-WX752VMN.mjs → chunk-UCRNNDNS.mjs} +1 -1
- package/dist/{chunk-FEWCWBOF.cjs → chunk-UGWKNZ4U.cjs} +44 -27
- package/dist/{chunk-IRPXOTEN.cjs → chunk-UOMSGJHK.cjs} +11 -11
- package/dist/{chunk-WPB6HJC7.mjs → chunk-UWDFH3ZV.mjs} +1 -1
- package/dist/{chunk-MZPPT5NA.mjs → chunk-V5FEFFHV.mjs} +1 -1
- package/dist/{chunk-HR4N2K4V.mjs → chunk-WABOJXAA.mjs} +2 -2
- package/dist/{chunk-LTXKRIST.mjs → chunk-WANLI3ZC.mjs} +2 -2
- package/dist/{chunk-5ZWXTIGE.cjs → chunk-WEZTGM7N.cjs} +2 -2
- package/dist/{chunk-HQEYZSF3.cjs → chunk-WPURVYXT.cjs} +2 -2
- package/dist/{chunk-TE7AX6HB.mjs → chunk-WV63R4GE.mjs} +1 -1
- package/dist/{chunk-SCOKBXHS.mjs → chunk-XOLYZZDX.mjs} +696 -151
- package/dist/{chunk-4ZVKDHS6.cjs → chunk-YSRZSKQB.cjs} +4 -4
- package/dist/{cli-runtime.d-jqZ7YCsm.d.ts → cli-runtime.d-Dbl-gIoz.d.ts} +5 -5
- package/dist/{cli-runtime.d-qL44rqYO.d.mts → cli-runtime.d-oUiNuspW.d.mts} +5 -5
- package/dist/{client-component.d-BDD5aiUb.d.ts → client-component.d-CT4q7tmy.d.ts} +1 -1
- package/dist/{client-component.d-B2L2LyAr.d.mts → client-component.d-DaUqOhZT.d.mts} +1 -1
- package/dist/{client-plugins.d-Crct3m_r.d.ts → client-plugins.d-24qhjX8c.d.ts} +30 -4
- package/dist/{client-plugins.d-Dzc3vOw_.d.mts → client-plugins.d-BfGTqbAH.d.mts} +30 -4
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +4 -4
- package/dist/client.d.mts +7 -7
- package/dist/client.d.ts +7 -7
- package/dist/client.mjs +3 -3
- 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-RL4AU5KD.cjs → devtools-5WDQQDTA.cjs} +6 -6
- package/dist/{devtools-2CRVXV7E.mjs → devtools-DPYIYHTI.mjs} +5 -5
- package/dist/docs.cjs +8 -8
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +7 -7
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{handler.d-B1S1ZBqS.d.mts → handler.d-GfNuz57p.d.mts} +1 -1
- package/dist/{handler.d-ZweCBJD4.d.ts → handler.d-Oca5kNSz.d.ts} +1 -1
- package/dist/{headers.d-C-yGl_f6.d.mts → headers.d-C_lsQIWA.d.mts} +1 -1
- package/dist/{headers.d-BgBdQN8x.d.ts → headers.d-b8gHJDvu.d.ts} +1 -1
- package/dist/index.cjs +42 -38
- package/dist/{index.d-13h3oDu7.d.mts → index.d-BLtjh1aS.d.mts} +1 -1
- package/dist/{index.d-CtoniAXT.d.ts → index.d-Ckv6kHFm.d.ts} +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.mjs +39 -35
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- package/dist/integrations.cjs +4 -2
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/integrations.mjs +3 -1
- package/dist/internal/app-markdown-runtime.cjs +5 -3
- package/dist/internal/app-markdown-runtime.d.mts +10 -5
- package/dist/internal/app-markdown-runtime.d.ts +10 -5
- package/dist/internal/app-markdown-runtime.mjs +6 -4
- package/dist/internal/build-runtime.cjs +29 -29
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +28 -28
- package/dist/internal/cli-runtime.cjs +12 -12
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +11 -11
- 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 +7 -7
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +6 -6
- package/dist/internal/infra-analytics-runtime.cjs +9 -9
- package/dist/internal/infra-analytics-runtime.mjs +7 -7
- package/dist/internal/metadata-image-runtime.d.mts +2 -2
- package/dist/internal/metadata-image-runtime.d.ts +2 -2
- 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-node-env.cjs +2 -2
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +12 -12
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +11 -11
- package/dist/internal/spa-router.cjs +3 -3
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/spa-router.mjs +2 -2
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/{manager-D4DZRBRS.cjs → manager-37UJPUN4.cjs} +4 -4
- package/dist/{manager-PKPQGBAE.mjs → manager-7BNSJKME.mjs} +3 -3
- package/dist/markdown.cjs +2 -2
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +1 -1
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/{mount.d-_6Un9wdK.d.mts → mount.d-BCS8mD4E.d.mts} +1 -1
- package/dist/{mount.d-DyKlRR6z.d.ts → mount.d-DEX8eref.d.ts} +1 -1
- package/dist/{native-tree-5TENEQ7Y.cjs → native-tree-52CUAP3N.cjs} +3 -3
- package/dist/{native-tree-LNO7K6JR.mjs → native-tree-AO7PQ7FR.mjs} +2 -2
- package/dist/{navigation-delegate.d-BbW1_pf_.d.ts → navigation-delegate.d-Cgi28e5Q.d.ts} +1 -1
- package/dist/{navigation-delegate.d-B9GjWbov.d.mts → navigation-delegate.d-F83ugsZW.d.mts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +4 -4
- package/dist/plugin.cjs +22 -22
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +21 -21
- package/dist/query/client.cjs +7 -7
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-DaM1NPnm.d.mts → render-plan.d-BkVY4aFb.d.mts} +1 -1
- package/dist/{render-plan.d-D0FV9lDT.d.ts → render-plan.d-DCF2GZdD.d.ts} +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +2 -2
- package/dist/renderer.d.mts +22 -11
- package/dist/renderer.d.ts +22 -11
- package/dist/{request.d-CrXC7voZ.d.ts → request.d-C5o-4dU2.d.ts} +1 -1
- package/dist/{request.d-DVSLilGx.d.mts → request.d-DMPB53-i.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-CWi3UYtR.d.mts → route-rendering.d-DDvArvik.d.mts} +1 -1
- package/dist/{route-rendering.d-OfbM_rj8.d.ts → route-rendering.d-DfP6zRP7.d.ts} +1 -1
- package/dist/{router.d-YKVirmj4.d.mts → router.d-1Skf2XCO.d.mts} +1 -1
- package/dist/{router.d-Bm9FNSu3.d.ts → router.d-s40h7aoS.d.ts} +1 -1
- package/dist/routes.d.mts +3 -3
- package/dist/routes.d.ts +3 -3
- package/dist/{rsc-pipeline-LRB4ZG6I.mjs → rsc-pipeline-O2YMVHUF.mjs} +7 -7
- package/dist/{rsc-pipeline-3DYC5ZXW.cjs → rsc-pipeline-SFQSMVI7.cjs} +8 -8
- package/dist/{runtime-3WJNNAAR.mjs → runtime-K2X3IZAF.mjs} +6 -6
- package/dist/{runtime-CRFF32H6.cjs → runtime-WOTVFYQY.cjs} +8 -8
- package/dist/{runtime.d-BVj6apd0.d.mts → runtime.d-Bykc5Qfg.d.mts} +1 -1
- package/dist/{runtime.d-D7QYVJGO.d.ts → runtime.d-k-9kFUsM.d.ts} +1 -1
- package/dist/{server-components-status.d-BDVcxi0z.d.mts → server-components-status.d-D-HixBe0.d.mts} +1 -1
- package/dist/{server-components-status.d-CfKDpmCH.d.ts → server-components-status.d-DLNd1C5j.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +47 -46
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +26 -25
- package/dist/{spa-router.d-DGmropfK.d.mts → spa-router.d-DIlXwm00.d.mts} +2 -2
- package/dist/{spa-router.d-nE1jHNGt.d.ts → spa-router.d-Dl-EJeJT.d.ts} +2 -2
- package/dist/{ssg.d-DS-gXUbf.d.mts → ssg.d-D2ZV0bhs.d.mts} +2 -2
- package/dist/{ssg.d-jXlUAKzg.d.ts → ssg.d-bE-ylg0e.d.ts} +2 -2
- package/dist/{store-core.d-B5cwOd8g.d.ts → store-core.d-BmdnMopD.d.ts} +2 -2
- package/dist/{store-core.d-C-gATBwd.d.mts → store-core.d-DPsCYzV7.d.mts} +2 -2
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +2 -2
- package/dist/{utils.d-BODwBtkz.d.ts → utils.d-BFZQcBZV.d.ts} +1 -1
- package/dist/{utils.d-Cmj-fzds.d.mts → utils.d-nM3OHKq5.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +22 -22
- package/dist/vite.d.mts +6 -6
- package/dist/vite.d.ts +6 -6
- package/dist/vite.mjs +21 -21
- package/package.json +1 -1
- package/dist/analyzer-B2TRJT3B.cjs +0 -17
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkZSVFI7JMcjs = require('./chunk-ZSVFI7JM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkWEZTGM7Ncjs = require('./chunk-WEZTGM7N.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -29,7 +29,7 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
|
|
|
29
29
|
var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkJDT733EWcjs = require('./chunk-JDT733EW.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
@@ -92,7 +92,7 @@ function analyzeStaticRouteCandidate(mod, source, options = {}) {
|
|
|
92
92
|
if (!source) {
|
|
93
93
|
blockers.push("route source is unavailable");
|
|
94
94
|
}
|
|
95
|
-
if (options.isDynamic) {
|
|
95
|
+
if (options.isDynamic && !listsStaticPaths(mod)) {
|
|
96
96
|
blockers.push("the route has dynamic path segments");
|
|
97
97
|
}
|
|
98
98
|
if (hasExplicitRenderingConfig(mod, source)) {
|
|
@@ -285,8 +285,11 @@ function sanitizeSource(source, maskLiterals) {
|
|
|
285
285
|
function escapeRegExp(value) {
|
|
286
286
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
287
287
|
}
|
|
288
|
+
function listsStaticPaths(mod) {
|
|
289
|
+
return typeof _optionalChain([mod, 'optionalAccess', _35 => _35.getStaticPaths]) === "function" || typeof _optionalChain([mod, 'optionalAccess', _36 => _36.generateStaticParams]) === "function";
|
|
290
|
+
}
|
|
288
291
|
function hasExplicitRenderingConfig(mod, source) {
|
|
289
|
-
return typeof _optionalChain([mod, 'optionalAccess',
|
|
292
|
+
return typeof _optionalChain([mod, 'optionalAccess', _37 => _37.ssg]) === "boolean" || typeof _optionalChain([mod, 'optionalAccess', _38 => _38.ppr]) === "boolean" || typeof _optionalChain([mod, 'optionalAccess', _39 => _39.experimental_ppr]) === "boolean" || typeof _optionalChain([mod, 'optionalAccess', _40 => _40.revalidate]) !== "undefined" || typeof _optionalChain([mod, 'optionalAccess', _41 => _41.dynamic]) !== "undefined" || typeof parseRouteRenderingDirective(source) !== "undefined";
|
|
290
293
|
}
|
|
291
294
|
function parseRouteRenderingDirective(source) {
|
|
292
295
|
if (!source) {
|
|
@@ -315,7 +318,7 @@ function parseKnownRenderingDirective(directive) {
|
|
|
315
318
|
const match = normalized.match(
|
|
316
319
|
/^use\s+(ssg|static|isr|ssr|dynamic|ppr)(?:\s*[;:]\s*(\d+))?\s*;?$/
|
|
317
320
|
);
|
|
318
|
-
if (!_optionalChain([match, 'optionalAccess',
|
|
321
|
+
if (!_optionalChain([match, 'optionalAccess', _42 => _42[1]])) {
|
|
319
322
|
return void 0;
|
|
320
323
|
}
|
|
321
324
|
const mode = match[1];
|
|
@@ -424,7 +427,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
424
427
|
continue;
|
|
425
428
|
}
|
|
426
429
|
const source = await _promises.readFile.call(void 0, route.filePath, "utf8").catch(() => void 0);
|
|
427
|
-
if (_optionalChain([options, 'access',
|
|
430
|
+
if (_optionalChain([options, 'access', _43 => _43.docsAdapterRoutes, 'optionalAccess', _44 => _44.owns, 'call', _45 => _45(route.path)]) && _chunkJDT733EWcjs.isFarmMarkdownPageFile.call(void 0, route.filePath)) {
|
|
428
431
|
ssrRoutes.push(route.path);
|
|
429
432
|
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(null, source, { isDynamic: route.isDynamic }).candidate) {
|
|
430
433
|
staticCandidateDocsPages += 1;
|
|
@@ -469,7 +472,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
469
472
|
} else {
|
|
470
473
|
ssrRoutes.push(route.path);
|
|
471
474
|
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(mod, source, { isDynamic: route.isDynamic }).candidate) {
|
|
472
|
-
if (_optionalChain([options, 'access',
|
|
475
|
+
if (_optionalChain([options, 'access', _46 => _46.docsAdapterRoutes, 'optionalAccess', _47 => _47.owns, 'call', _48 => _48(route.path)])) staticCandidateDocsPages += 1;
|
|
473
476
|
else staticCandidateRoutes.push(route.path);
|
|
474
477
|
}
|
|
475
478
|
}
|
|
@@ -489,7 +492,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
489
492
|
Add \`export const dynamic = "force-static";\` after verifying that imported code does not read cookies, headers, authentication, or other request data.`
|
|
490
493
|
);
|
|
491
494
|
}
|
|
492
|
-
if (staticCandidateDocsPages > 0 && !_optionalChain([options, 'access',
|
|
495
|
+
if (staticCandidateDocsPages > 0 && !_optionalChain([options, 'access', _49 => _49.docsAdapterRoutes, 'optionalAccess', _50 => _50.prerender])) {
|
|
493
496
|
console.warn(
|
|
494
497
|
`[Farm.js] ${staticCandidateDocsPages} docs page${staticCandidateDocsPages === 1 ? " renders" : "s render"} on each request. Set \`docs.prerender: true\` in farm.config.ts to prerender docs pages on Node and serverless targets.`
|
|
495
498
|
);
|
|
@@ -771,7 +774,7 @@ function fieldTsType(field) {
|
|
|
771
774
|
case "json":
|
|
772
775
|
return "unknown";
|
|
773
776
|
case "enum":
|
|
774
|
-
return _optionalChain([field, 'access',
|
|
777
|
+
return _optionalChain([field, 'access', _51 => _51.values, 'optionalAccess', _52 => _52.length]) ? field.values.map((value) => JSON.stringify(value)).join(" | ") : "string";
|
|
775
778
|
// id, uuid, string, text, datetime all travel as strings over JSON.
|
|
776
779
|
default:
|
|
777
780
|
return "string";
|
|
@@ -795,7 +798,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
795
798
|
const shouldGenerateApi = options.api !== false;
|
|
796
799
|
const shouldGenerateEnv = options.env !== false;
|
|
797
800
|
const shouldGenerateImages = options.images !== false;
|
|
798
|
-
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access',
|
|
801
|
+
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access', _53 => _53.i18nConfig, 'optionalAccess', _54 => _54.enabled]);
|
|
799
802
|
const sourceRoots = _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
|
|
800
803
|
const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
|
|
801
804
|
const result = {
|
|
@@ -838,11 +841,11 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
838
841
|
}
|
|
839
842
|
}
|
|
840
843
|
if (shouldGenerateApi) {
|
|
841
|
-
const generator = new (0,
|
|
844
|
+
const generator = new (0, _chunkWEZTGM7Ncjs.APITypeGenerator)(appDirs);
|
|
842
845
|
const apiRoutes = generator.scanAPIRoutes();
|
|
843
846
|
const apiTypesPath = options.apiTypesOutFile ? _path.resolve.call(void 0, root, options.apiTypesOutFile) : _path.join.call(void 0, root, srcDir, "lib", "api.generated.ts");
|
|
844
847
|
const pluginRoutes = _chunkVGVRGGP4cjs.resolvePluginRoutes.call(void 0,
|
|
845
|
-
_optionalChain([options, 'access',
|
|
848
|
+
_optionalChain([options, 'access', _55 => _55.plugins, 'optionalAccess', _56 => _56.filter, 'call', _57 => _57((plugin) => plugin.name !== _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN)])
|
|
846
849
|
);
|
|
847
850
|
const configFiles = [
|
|
848
851
|
...(_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.configFile).filter((file) => Boolean(file)),
|
|
@@ -919,7 +922,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
919
922
|
});
|
|
920
923
|
}
|
|
921
924
|
}
|
|
922
|
-
if (shouldRefreshUnifiedTypes && _optionalChain([options, 'access',
|
|
925
|
+
if (shouldRefreshUnifiedTypes && _optionalChain([options, 'access', _58 => _58.i18nConfig, 'optionalAccess', _59 => _59.enabled]) && !options.i18nTypesOutFile) {
|
|
923
926
|
const { signatures } = await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
|
|
924
927
|
unifiedSections.push(renderFarmI18nTypes(options.i18nConfig.locales, signatures));
|
|
925
928
|
result.i18nTypesPath = unifiedTypesPath;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDA432P2Fcjs = require('./chunk-DA432P2F.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk5LJF4KUZcjs = require('./chunk-5LJF4KUZ.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
|
|
@@ -166,22 +166,22 @@ function resolveRoutePatterns(value, key) {
|
|
|
166
166
|
}
|
|
167
167
|
function createFarmDefaultSitemap(sources, options) {
|
|
168
168
|
const { include, exclude } = options.config;
|
|
169
|
-
const base =
|
|
169
|
+
const base = _chunkDA432P2Fcjs.resolveFarmAgentOrigin.call(void 0, options.metadataBase, options.origin);
|
|
170
170
|
const entries = /* @__PURE__ */ new Map();
|
|
171
171
|
for (const source of sources) {
|
|
172
172
|
const path = source.pattern;
|
|
173
173
|
if (path.includes("[") || path.includes("(") || entries.has(path)) continue;
|
|
174
|
-
if (include.length && !include.some((pattern) =>
|
|
174
|
+
if (include.length && !include.some((pattern) => _chunk5LJF4KUZcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
175
175
|
continue;
|
|
176
176
|
}
|
|
177
|
-
if (exclude.some((pattern) =>
|
|
177
|
+
if (exclude.some((pattern) => _chunk5LJF4KUZcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
178
178
|
const module = isRecord(source.module) ? source.module : void 0;
|
|
179
|
-
if (
|
|
179
|
+
if (_chunkDA432P2Fcjs.isFarmMetadataNoIndex.call(void 0, _optionalChain([module, 'optionalAccess', _2 => _2.metadata]))) continue;
|
|
180
180
|
if (_optionalChain([module, 'optionalAccess', _3 => _3.__farmRouteGuard])) continue;
|
|
181
181
|
entries.set(path, {
|
|
182
182
|
url: new URL(
|
|
183
183
|
_chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
|
|
184
|
-
|
|
184
|
+
_chunkDA432P2Fcjs.getFarmAgentPagePublicPath.call(void 0, path, options),
|
|
185
185
|
options.trailingSlash === true
|
|
186
186
|
),
|
|
187
187
|
base
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
function hasPolyroutePlugin(plugins) {
|
|
3
3
|
return plugins?.some((plugin) => plugin.name === "polyroute") === true;
|
|
4
4
|
}
|
|
5
|
+
function isPolyrouteRouteFileName(fileName) {
|
|
6
|
+
return fileName === "route.rs" || fileName === "route.go";
|
|
7
|
+
}
|
|
5
8
|
function isFarmAPIRouteFileName(fileName, polyroute = false) {
|
|
6
|
-
if (polyroute && fileName
|
|
9
|
+
if (polyroute && isPolyrouteRouteFileName(fileName)) return true;
|
|
7
10
|
return /^route\.(?:ts|tsx|js|jsx)$/.test(fileName);
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
export {
|
|
11
14
|
hasPolyroutePlugin,
|
|
15
|
+
isPolyrouteRouteFileName,
|
|
12
16
|
isFarmAPIRouteFileName
|
|
13
17
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-YNPVG2GG.mjs";
|
|
5
5
|
import {
|
|
6
6
|
APITypeGenerator
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ANKMAGFJ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
getOptionalCatchAllParameterNames,
|
|
10
10
|
materializeSSGRoutePath,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-Z3RM3VA2.mjs";
|
|
30
30
|
import {
|
|
31
31
|
isFarmMarkdownPageFile
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NWF2FTFV.mjs";
|
|
33
33
|
import {
|
|
34
34
|
resolveSchemaModels
|
|
35
35
|
} from "./chunk-F3N52U7S.mjs";
|
|
@@ -92,7 +92,7 @@ function analyzeStaticRouteCandidate(mod, source, options = {}) {
|
|
|
92
92
|
if (!source) {
|
|
93
93
|
blockers.push("route source is unavailable");
|
|
94
94
|
}
|
|
95
|
-
if (options.isDynamic) {
|
|
95
|
+
if (options.isDynamic && !listsStaticPaths(mod)) {
|
|
96
96
|
blockers.push("the route has dynamic path segments");
|
|
97
97
|
}
|
|
98
98
|
if (hasExplicitRenderingConfig(mod, source)) {
|
|
@@ -285,6 +285,9 @@ function sanitizeSource(source, maskLiterals) {
|
|
|
285
285
|
function escapeRegExp(value) {
|
|
286
286
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
287
287
|
}
|
|
288
|
+
function listsStaticPaths(mod) {
|
|
289
|
+
return typeof mod?.getStaticPaths === "function" || typeof mod?.generateStaticParams === "function";
|
|
290
|
+
}
|
|
288
291
|
function hasExplicitRenderingConfig(mod, source) {
|
|
289
292
|
return typeof mod?.ssg === "boolean" || typeof mod?.ppr === "boolean" || typeof mod?.experimental_ppr === "boolean" || typeof mod?.revalidate !== "undefined" || typeof mod?.dynamic !== "undefined" || typeof parseRouteRenderingDirective(source) !== "undefined";
|
|
290
293
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveFarmAppClientEntry,
|
|
3
3
|
resolveFarmClientPlugins
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NNNMFSXG.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveFarmPlatform
|
|
7
7
|
} from "./chunk-SMUW7UST.mjs";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
collectSSGPages,
|
|
10
10
|
matchSSGPage,
|
|
11
11
|
resolveRouteRenderingConfigFromFile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HNB5JHBO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
resolveFarmRendererRoutes
|
|
15
15
|
} from "./chunk-YNPVG2GG.mjs";
|
|
@@ -56,10 +56,10 @@ import {
|
|
|
56
56
|
stripRouteGroups,
|
|
57
57
|
takeFarmHoistedHead,
|
|
58
58
|
takeFarmNavigationOutlet
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-LP6DIYGA.mjs";
|
|
60
60
|
import {
|
|
61
61
|
listFarmMCPLlmsTxtLinks
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-P2TGLGRR.mjs";
|
|
63
63
|
import {
|
|
64
64
|
FARM_DEFAULT_MCP_PATH,
|
|
65
65
|
collectFarmDefaultMCPPages,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
farmConfigMountsMCP,
|
|
68
68
|
isFarmDefaultMCPPathname,
|
|
69
69
|
resolveFarmDefaultMCPServer
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-WABOJXAA.mjs";
|
|
71
71
|
import {
|
|
72
72
|
getFarmFormState,
|
|
73
73
|
handleFarmFormActionRequest,
|
|
@@ -89,6 +89,7 @@ import {
|
|
|
89
89
|
getClientModuleMetadata,
|
|
90
90
|
getFarmClientHydrationPlanOptions,
|
|
91
91
|
getFarmSourceStamp,
|
|
92
|
+
getInstalledPackageDirectory,
|
|
92
93
|
getIslandStrategyExport,
|
|
93
94
|
isFarmClientModulePlanUnchanged,
|
|
94
95
|
memoizeInFarmSourceSnapshot,
|
|
@@ -101,10 +102,11 @@ import {
|
|
|
101
102
|
runWithLatestPackageClientBoundaryCache,
|
|
102
103
|
runWithPackageClientBoundaryCacheFile,
|
|
103
104
|
setFarmRendererHydrationScope,
|
|
105
|
+
traceFarmSourceReadGroups,
|
|
104
106
|
traceFarmSourceReads,
|
|
105
107
|
usesFarmServerTree,
|
|
106
108
|
withFarmSourceSnapshot
|
|
107
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-Q637AXGZ.mjs";
|
|
108
110
|
import {
|
|
109
111
|
_setDefaultFarmThemeConfig,
|
|
110
112
|
getTheme
|
|
@@ -128,7 +130,7 @@ import {
|
|
|
128
130
|
resolveFarmAgentCrawlers,
|
|
129
131
|
resolveFarmAgentSitemap,
|
|
130
132
|
resolveFarmPerformanceConfig
|
|
131
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-CV4MOEMO.mjs";
|
|
132
134
|
import {
|
|
133
135
|
collectFarmLlmsTxtPages,
|
|
134
136
|
createFarmDefaultLlmsTxt,
|
|
@@ -138,7 +140,7 @@ import {
|
|
|
138
140
|
renderFarmLlmsFullTxt,
|
|
139
141
|
resolveFarmAgentOrigin,
|
|
140
142
|
resolveFarmLlmsTxtConfig
|
|
141
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-HIDZM23B.mjs";
|
|
142
144
|
import {
|
|
143
145
|
createFarmCspNonce,
|
|
144
146
|
createFarmCspNonceRewriter,
|
|
@@ -175,10 +177,10 @@ import {
|
|
|
175
177
|
import {
|
|
176
178
|
createFarmMarkdownRouteModuleFromFile,
|
|
177
179
|
loadFarmMdxComponents
|
|
178
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-N2BRIN7I.mjs";
|
|
179
181
|
import {
|
|
180
182
|
isFarmMarkdownPageFile
|
|
181
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-NWF2FTFV.mjs";
|
|
182
184
|
import {
|
|
183
185
|
resolveFarmMdxComponentsModulePath,
|
|
184
186
|
resolveMdxConfig
|
|
@@ -191,7 +193,7 @@ import {
|
|
|
191
193
|
farmRequestWantsMarkdown,
|
|
192
194
|
getFarmMarkdownAlternatePath,
|
|
193
195
|
resolveMarkdownConfig
|
|
194
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-CRF5MOLO.mjs";
|
|
195
197
|
import {
|
|
196
198
|
isPackageSpecifier
|
|
197
199
|
} from "./chunk-AYDVUCXD.mjs";
|
|
@@ -204,8 +206,9 @@ import {
|
|
|
204
206
|
import {
|
|
205
207
|
getIntegrationProviders,
|
|
206
208
|
getRegisteredIntegrationAPIManifest,
|
|
207
|
-
isFarmIntegrationProviderComponentReference
|
|
208
|
-
|
|
209
|
+
isFarmIntegrationProviderComponentReference,
|
|
210
|
+
providerSupportsIslands
|
|
211
|
+
} from "./chunk-E72GG355.mjs";
|
|
209
212
|
import {
|
|
210
213
|
initStorage
|
|
211
214
|
} from "./chunk-QBJ6N5MT.mjs";
|
|
@@ -304,7 +307,7 @@ import {
|
|
|
304
307
|
} from "./chunk-EILUVBKS.mjs";
|
|
305
308
|
import {
|
|
306
309
|
FARM_VERSION
|
|
307
|
-
} from "./chunk-
|
|
310
|
+
} from "./chunk-I5KPOXUE.mjs";
|
|
308
311
|
import {
|
|
309
312
|
normalizeFarmAPIConfig
|
|
310
313
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -325,7 +328,7 @@ import {
|
|
|
325
328
|
renderMetadataHead,
|
|
326
329
|
renderViewportHead,
|
|
327
330
|
resolveFarmNotFoundMetadata
|
|
328
|
-
} from "./chunk-
|
|
331
|
+
} from "./chunk-23NBOP43.mjs";
|
|
329
332
|
import {
|
|
330
333
|
prepareDeferredData,
|
|
331
334
|
snapshotDeferredData
|
|
@@ -477,11 +480,6 @@ function compareRouteEntries(left, right) {
|
|
|
477
480
|
}
|
|
478
481
|
var PLAN_SOURCE = /\.(?:[cm]?[jt]sx?|vue|svelte)$/;
|
|
479
482
|
var NODE_MODULES_SEGMENT = `${path2.sep}node_modules${path2.sep}`;
|
|
480
|
-
function getInstalledPackageDirectory(file, start) {
|
|
481
|
-
let end = file.indexOf(path2.sep, start);
|
|
482
|
-
if (end !== -1 && file[start] === "@") end = file.indexOf(path2.sep, end + 1);
|
|
483
|
-
return end === -1 ? file : file.slice(0, end);
|
|
484
|
-
}
|
|
485
483
|
function realPathOutsideNodeModules(target) {
|
|
486
484
|
try {
|
|
487
485
|
const real = fs.realpathSync(target);
|
|
@@ -524,7 +522,10 @@ var RouteManager = class _RouteManager {
|
|
|
524
522
|
// read, so a production build can tell whether a route module's plan still holds.
|
|
525
523
|
this.planStamps = /* @__PURE__ */ new Map();
|
|
526
524
|
this.sourceChangeTracking = false;
|
|
527
|
-
|
|
525
|
+
// planSourcePath of each file a plan read.
|
|
526
|
+
this.planSources = /* @__PURE__ */ new Map();
|
|
527
|
+
// The watched paths of the files in a list a plan read whole (a cached package inspection's).
|
|
528
|
+
this.planGroupSources = /* @__PURE__ */ new WeakMap();
|
|
528
529
|
// Whether each package directory under `node_modules` a plan read from links to a workspace.
|
|
529
530
|
this.linkedPackages = /* @__PURE__ */ new Map();
|
|
530
531
|
// Source files edited since the last plan; null when the next plan must recompute every module.
|
|
@@ -975,7 +976,8 @@ var RouteManager = class _RouteManager {
|
|
|
975
976
|
}
|
|
976
977
|
this.editedSources = null;
|
|
977
978
|
this.sourceSnapshot?.clear();
|
|
978
|
-
this.
|
|
979
|
+
this.planSources.clear();
|
|
980
|
+
this.planGroupSources = /* @__PURE__ */ new WeakMap();
|
|
979
981
|
this.linkedPackages.clear();
|
|
980
982
|
}
|
|
981
983
|
/**
|
|
@@ -999,12 +1001,15 @@ var RouteManager = class _RouteManager {
|
|
|
999
1001
|
if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
|
|
1000
1002
|
return { ...previous.plan };
|
|
1001
1003
|
}
|
|
1002
|
-
const { result, files } =
|
|
1004
|
+
const { result, files, groups } = traceFarmSourceReadGroups(compute);
|
|
1003
1005
|
const sources = /* @__PURE__ */ new Set();
|
|
1004
1006
|
for (const file of files) {
|
|
1005
1007
|
const source = this.planSourcePath(file);
|
|
1006
1008
|
if (source) sources.add(source);
|
|
1007
1009
|
}
|
|
1010
|
+
for (const group of groups) {
|
|
1011
|
+
for (const source of this.planGroupSourcePaths(group)) sources.add(source);
|
|
1012
|
+
}
|
|
1008
1013
|
if (!this.sourceChangeTracking) {
|
|
1009
1014
|
for (const source of sources) {
|
|
1010
1015
|
if (!this.planStamps.has(source)) this.planStamps.set(source, getFarmSourceStamp(source));
|
|
@@ -1037,6 +1042,22 @@ var RouteManager = class _RouteManager {
|
|
|
1037
1042
|
}
|
|
1038
1043
|
return plans;
|
|
1039
1044
|
}
|
|
1045
|
+
/**
|
|
1046
|
+
* planSourcePath of each file in `group`, a list every route module that imports one package
|
|
1047
|
+
* reads whole, mapped once per list instead of once per route module.
|
|
1048
|
+
*/
|
|
1049
|
+
planGroupSourcePaths(group) {
|
|
1050
|
+
let sources = this.planGroupSources.get(group);
|
|
1051
|
+
if (!sources) {
|
|
1052
|
+
sources = [];
|
|
1053
|
+
for (const file of group) {
|
|
1054
|
+
const source = this.planSourcePath(file);
|
|
1055
|
+
if (source) sources.push(source);
|
|
1056
|
+
}
|
|
1057
|
+
this.planGroupSources.set(group, sources);
|
|
1058
|
+
}
|
|
1059
|
+
return sources;
|
|
1060
|
+
}
|
|
1040
1061
|
/**
|
|
1041
1062
|
* The path the watcher reports for a file a plan read: itself, or the real path of a workspace
|
|
1042
1063
|
* package's source read through its `node_modules` link. Null for an installed package's file.
|
|
@@ -1044,20 +1065,20 @@ var RouteManager = class _RouteManager {
|
|
|
1044
1065
|
* installed package; a plan reads thousands of files of an icon package.
|
|
1045
1066
|
*/
|
|
1046
1067
|
planSourcePath(file) {
|
|
1068
|
+
let source = this.planSources.get(file);
|
|
1069
|
+
if (source !== void 0) return source;
|
|
1070
|
+
source = file;
|
|
1047
1071
|
const index = file.lastIndexOf(NODE_MODULES_SEGMENT);
|
|
1048
|
-
if (index
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
let source = this.linkedSources.get(file);
|
|
1057
|
-
if (source === void 0) {
|
|
1058
|
-
source = realPathOutsideNodeModules(file);
|
|
1059
|
-
this.linkedSources.set(file, source);
|
|
1072
|
+
if (index !== -1) {
|
|
1073
|
+
const directory = getInstalledPackageDirectory(file, index + NODE_MODULES_SEGMENT.length);
|
|
1074
|
+
let linked = this.linkedPackages.get(directory);
|
|
1075
|
+
if (linked === void 0) {
|
|
1076
|
+
linked = realPathOutsideNodeModules(directory) !== null;
|
|
1077
|
+
this.linkedPackages.set(directory, linked);
|
|
1078
|
+
}
|
|
1079
|
+
source = linked ? realPathOutsideNodeModules(file) : null;
|
|
1060
1080
|
}
|
|
1081
|
+
this.planSources.set(file, source);
|
|
1061
1082
|
return source;
|
|
1062
1083
|
}
|
|
1063
1084
|
/**
|
|
@@ -1090,11 +1111,11 @@ var RouteManager = class _RouteManager {
|
|
|
1090
1111
|
(provider) => provider.component || provider.type === "clerk"
|
|
1091
1112
|
);
|
|
1092
1113
|
const unsupportedIntegrationProvider = integrationProviders.find(
|
|
1093
|
-
(provider) => provider
|
|
1114
|
+
(provider) => !providerSupportsIslands(provider)
|
|
1094
1115
|
);
|
|
1095
1116
|
if (this.config.experimental?.isolatedClientHydration === "enabled" && resolveFarmServerComponentsMode(this.config.experimental?.serverComponents) !== "rsc" && unsupportedIntegrationProvider) {
|
|
1096
1117
|
logger.warn(
|
|
1097
|
-
`[Farm.js]
|
|
1118
|
+
`[Farm.js] Client components hydrate with their route, not as islands, because integration provider "${unsupportedIntegrationProvider.name}" doesn't declare \`islands: true\`.`
|
|
1098
1119
|
);
|
|
1099
1120
|
}
|
|
1100
1121
|
const isolatedMode = resolveFarmIsolatedClientHydrationMode(
|
|
@@ -3401,8 +3422,24 @@ function inferFarmIslandStrategy(filePath, root) {
|
|
|
3401
3422
|
return result;
|
|
3402
3423
|
}
|
|
3403
3424
|
var routeRootInferences = /* @__PURE__ */ new Map();
|
|
3404
|
-
function invalidateFarmRouteRootInferences() {
|
|
3405
|
-
|
|
3425
|
+
function invalidateFarmRouteRootInferences(file, event) {
|
|
3426
|
+
const updated = file && event === "update" ? updatedSourcePaths(file) : null;
|
|
3427
|
+
if (!updated) {
|
|
3428
|
+
routeRootInferences.clear();
|
|
3429
|
+
return;
|
|
3430
|
+
}
|
|
3431
|
+
for (const [key, inference] of routeRootInferences) {
|
|
3432
|
+
if (inference.stamps.some(([read]) => updated.has(read))) routeRootInferences.delete(key);
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
function updatedSourcePaths(file) {
|
|
3436
|
+
const resolved = path6.resolve(file);
|
|
3437
|
+
if (isInstalledPackageFile(resolved) || path6.basename(resolved) === "package.json") return null;
|
|
3438
|
+
try {
|
|
3439
|
+
return /* @__PURE__ */ new Set([resolved, fs3.realpathSync(resolved)]);
|
|
3440
|
+
} catch {
|
|
3441
|
+
return null;
|
|
3442
|
+
}
|
|
3406
3443
|
}
|
|
3407
3444
|
function inferFarmRouteRootStrategy(owners, root) {
|
|
3408
3445
|
const key = [root ?? "", ...owners.map((owner) => path6.resolve(owner))].join("\n");
|
|
@@ -4512,12 +4549,12 @@ var ServerRenderer = class {
|
|
|
4512
4549
|
return islands.wrapFarmIsolatedClientGraph(void 0, element);
|
|
4513
4550
|
return this.rendererRuntime.wrapClientGraph(element);
|
|
4514
4551
|
}
|
|
4515
|
-
/** The page a hydrating layout keeps as server HTML: islands again, or a server tree. */
|
|
4516
4552
|
/** The route root's strategy, inspecting packages with the dev server's latest plan's cache. */
|
|
4517
4553
|
resolveRouteRootStrategy(...args) {
|
|
4518
4554
|
const resolve3 = () => resolveFarmRouteRootStrategy(...args);
|
|
4519
4555
|
return typeof this.routeManager.inspectPackages === "function" ? this.routeManager.inspectPackages(resolve3) : resolve3();
|
|
4520
4556
|
}
|
|
4557
|
+
/** The page a hydrating layout keeps as server HTML: islands again, or a server tree. */
|
|
4521
4558
|
async isolateServerPage(element, serverTree) {
|
|
4522
4559
|
if (islands && this.islandValues()) {
|
|
4523
4560
|
const runtime = islands;
|
|
@@ -6298,7 +6335,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
|
|
|
6298
6335
|
const server = this.getDefaultMCPServer();
|
|
6299
6336
|
const request2 = getCurrentRequestOrNull() ?? createWebRequestFromFarmRequest(req, { trustProxy: this.config.server?.trustProxy });
|
|
6300
6337
|
try {
|
|
6301
|
-
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-
|
|
6338
|
+
const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-VX4NDDHR.mjs");
|
|
6302
6339
|
const origin = new URL(request2.url).origin;
|
|
6303
6340
|
const i18n = this.i18nRuntime?.config;
|
|
6304
6341
|
const metadataBase = await this.getRootMetadataBase();
|
|
@@ -8563,10 +8600,12 @@ var FARM_VIDEO_PLAYER_HTML = `<!doctype html>
|
|
|
8563
8600
|
<style>
|
|
8564
8601
|
html, body { height: 100%; margin: 0; background: #000; }
|
|
8565
8602
|
video { display: block; width: 100%; height: 100%; object-fit: contain; }
|
|
8603
|
+
a { position: fixed; inset: 0; cursor: pointer; }
|
|
8566
8604
|
</style>
|
|
8567
8605
|
</head>
|
|
8568
8606
|
<body>
|
|
8569
8607
|
<video controls muted playsinline preload="metadata"></video>
|
|
8608
|
+
<a target="_blank" rel="noopener" hidden></a>
|
|
8570
8609
|
<script>
|
|
8571
8610
|
(() => {
|
|
8572
8611
|
const params = new URLSearchParams(location.search);
|
|
@@ -8579,6 +8618,11 @@ var FARM_VIDEO_PLAYER_HTML = `<!doctype html>
|
|
|
8579
8618
|
return null;
|
|
8580
8619
|
}
|
|
8581
8620
|
};
|
|
8621
|
+
const page = sameOrigin(params.get("page"));
|
|
8622
|
+
if (page && window.top === window) {
|
|
8623
|
+
location.replace(page);
|
|
8624
|
+
return;
|
|
8625
|
+
}
|
|
8582
8626
|
const src = sameOrigin(params.get("src"));
|
|
8583
8627
|
if (!src) return;
|
|
8584
8628
|
const video = document.querySelector("video");
|
|
@@ -8590,7 +8634,17 @@ var FARM_VIDEO_PLAYER_HTML = `<!doctype html>
|
|
|
8590
8634
|
if (video.duration > 10) return;
|
|
8591
8635
|
video.loop = true;
|
|
8592
8636
|
// A browser may refuse autoplay; the controls still play it.
|
|
8593
|
-
video.play().
|
|
8637
|
+
video.play().then(
|
|
8638
|
+
() => {
|
|
8639
|
+
if (!page) return;
|
|
8640
|
+
const link = document.querySelector("a");
|
|
8641
|
+
video.controls = false;
|
|
8642
|
+
link.href = page;
|
|
8643
|
+
link.setAttribute("aria-label", "Open " + page);
|
|
8644
|
+
link.hidden = false;
|
|
8645
|
+
},
|
|
8646
|
+
() => {},
|
|
8647
|
+
);
|
|
8594
8648
|
},
|
|
8595
8649
|
{ once: true },
|
|
8596
8650
|
);
|
|
@@ -8654,6 +8708,11 @@ function getFarmClientOptimizeDepsInclude(renderer, root) {
|
|
|
8654
8708
|
// renderer stays source: pre-bundling it would copy the packages it shares with the app's
|
|
8655
8709
|
// components into the bundle, so a hook would read a different copy than the renderer set.
|
|
8656
8710
|
...renderer && root && !isReactRenderer(renderer) && isPackageSpecifier(renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : [],
|
|
8711
|
+
// Farm's renderer API, which a renderer's bindings import. An app's components reach it only
|
|
8712
|
+
// through them, from files Vite's scan may not read, such as a custom renderer's own format.
|
|
8713
|
+
// Served as source from a linked renderer, its imports were found on the first page request,
|
|
8714
|
+
// and Vite bundled again and reloaded the page while it loaded.
|
|
8715
|
+
...renderer && !isReactRenderer(renderer) ? ["@farm.js/core/renderer-client"] : [],
|
|
8657
8716
|
// The islands runtime of a renderer that declares `islands`, which only Farm's entry imports.
|
|
8658
8717
|
...renderer && !isReactRenderer(renderer) && getFarmRendererCapabilities(renderer).islands ? [
|
|
8659
8718
|
"@farm.js/core/internal/renderer-islands",
|
|
@@ -18,7 +18,7 @@ var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
|
|
|
18
18
|
var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk5LJF4KUZcjs = require('./chunk-5LJF4KUZ.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
@@ -1296,11 +1296,11 @@ function shouldReturnMarkdown(request) {
|
|
|
1296
1296
|
if (url.pathname.endsWith(".md")) return true;
|
|
1297
1297
|
const accept = request.headers.get("accept");
|
|
1298
1298
|
const markdown = Math.max(
|
|
1299
|
-
|
|
1300
|
-
|
|
1299
|
+
_chunk5LJF4KUZcjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
|
|
1300
|
+
_chunk5LJF4KUZcjs.farmAcceptQuality.call(void 0, accept, "text/plain")
|
|
1301
1301
|
);
|
|
1302
1302
|
if (markdown <= 0) return false;
|
|
1303
|
-
return markdown >=
|
|
1303
|
+
return markdown >= _chunk5LJF4KUZcjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
|
|
1304
1304
|
}
|
|
1305
1305
|
function escapeAttribute(value) {
|
|
1306
1306
|
return escapeHtml(value).replace(/'/g, "'");
|