@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
|
@@ -8,7 +8,7 @@ var _chunkUNJZGVPUcjs = require('./chunk-UNJZGVPU.cjs');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk5LJF4KUZcjs = require('./chunk-5LJF4KUZ.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
|
|
@@ -21,7 +21,7 @@ function isFarmMarkdownPageFile(filePath) {
|
|
|
21
21
|
function normalizeFarmMarkdownRoutePath(pathname, routePathname) {
|
|
22
22
|
const withoutExtension = pathname.replace(/\.md$/i, "");
|
|
23
23
|
const normalized = withoutExtension.startsWith("/") ? withoutExtension : `/${withoutExtension}`;
|
|
24
|
-
return
|
|
24
|
+
return _chunk5LJF4KUZcjs._resolveFarmMarkdownIndexAlias.call(void 0, normalized.replace(/\/+$/g, "") || "/", routePathname);
|
|
25
25
|
}
|
|
26
26
|
function parseMarkdownFrontmatter(source) {
|
|
27
27
|
if (!source.startsWith("---")) {
|
|
@@ -46,7 +46,7 @@ function parseMarkdownFrontmatter(source) {
|
|
|
46
46
|
return { frontmatter, body };
|
|
47
47
|
}
|
|
48
48
|
function titleFromMarkdown(body, fallback) {
|
|
49
|
-
return _optionalChain([body, 'access',
|
|
49
|
+
return _optionalChain([body, 'access', _2 => _2.match, 'call', _3 => _3(/^#\s+(.+)$/m), 'optionalAccess', _4 => _4[1], 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]) || fallback;
|
|
50
50
|
}
|
|
51
51
|
function createMarkdownMetadata(source, filePath) {
|
|
52
52
|
const { frontmatter, body } = parseMarkdownFrontmatter(source);
|
|
@@ -83,7 +83,7 @@ async function runFarmMarkdownPage(code, filePath, renderer) {
|
|
|
83
83
|
jsxs,
|
|
84
84
|
baseUrl: _url.pathToFileURL.call(void 0, filePath)
|
|
85
85
|
});
|
|
86
|
-
_optionalChain([renderer, 'optionalAccess',
|
|
86
|
+
_optionalChain([renderer, 'optionalAccess', _7 => _7.markFunctionComponent, 'optionalCall', _8 => _8(evaluated.default)]);
|
|
87
87
|
return evaluated;
|
|
88
88
|
}
|
|
89
89
|
function createFarmMarkdownJsxRuntime(renderer) {
|
|
@@ -98,7 +98,7 @@ function createFarmMarkdownJsxRuntime(renderer) {
|
|
|
98
98
|
var FARM_MARKDOWN_PRECOMPILED_PAGES = /* @__PURE__ */ Symbol.for("farm.markdown.precompiledPages");
|
|
99
99
|
function precompiledFarmMarkdownPage(body) {
|
|
100
100
|
const pages = globalThis[FARM_MARKDOWN_PRECOMPILED_PAGES];
|
|
101
|
-
return _optionalChain([pages, 'optionalAccess',
|
|
101
|
+
return _optionalChain([pages, 'optionalAccess', _9 => _9.get, 'call', _10 => _10(body)]);
|
|
102
102
|
}
|
|
103
103
|
async function evaluateMdxSource(body, filePath, renderer) {
|
|
104
104
|
const code = await _asyncNullishCoalesce(precompiledFarmMarkdownPage(body), async () => ( await compileFarmMarkdownPage(body)));
|
|
@@ -107,27 +107,40 @@ async function evaluateMdxSource(body, filePath, renderer) {
|
|
|
107
107
|
var MARKDOWN_ROUTE_CONFIG_EXPORT = /^export\s+const\s+(dynamic|revalidate|ssg)\s*=\s*("[^"\\]*"|'[^'\\]*'|\d+(?:\.\d+)?|true|false)\s*;?\s*$/;
|
|
108
108
|
function readFarmMarkdownRouteConfig(body) {
|
|
109
109
|
const config = {};
|
|
110
|
+
for (const match of findFarmMarkdownRouteConfigExports(body.split("\n")).values()) {
|
|
111
|
+
const literal = match[2];
|
|
112
|
+
config[match[1]] = literal === "true" ? true : literal === "false" ? false : /^\d/.test(literal) ? Number(literal) : literal.slice(1, -1);
|
|
113
|
+
}
|
|
114
|
+
return config;
|
|
115
|
+
}
|
|
116
|
+
function findFarmMarkdownRouteConfigExports(lines) {
|
|
117
|
+
const exports = /* @__PURE__ */ new Map();
|
|
110
118
|
let fence;
|
|
111
|
-
|
|
112
|
-
const
|
|
119
|
+
lines.forEach((raw, index) => {
|
|
120
|
+
const line = raw.endsWith("\r") ? raw.slice(0, -1) : raw;
|
|
121
|
+
const marker = _optionalChain([line, 'access', _11 => _11.match, 'call', _12 => _12(/^ {0,3}(`{3,}|~{3,})/), 'optionalAccess', _13 => _13[1]]);
|
|
113
122
|
if (fence) {
|
|
114
123
|
if (marker && marker[0] === fence[0] && marker.length >= fence.length) fence = void 0;
|
|
115
|
-
|
|
124
|
+
return;
|
|
116
125
|
}
|
|
117
126
|
if (marker) {
|
|
118
127
|
fence = marker;
|
|
119
|
-
|
|
128
|
+
return;
|
|
120
129
|
}
|
|
121
130
|
const match = line.match(MARKDOWN_ROUTE_CONFIG_EXPORT);
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
if (match) exports.set(index, match);
|
|
132
|
+
});
|
|
133
|
+
return exports;
|
|
134
|
+
}
|
|
135
|
+
function withoutFarmMarkdownRouteConfig(source) {
|
|
136
|
+
const lines = source.split("\n");
|
|
137
|
+
const exports = findFarmMarkdownRouteConfigExports(lines);
|
|
138
|
+
if (exports.size === 0) return source;
|
|
139
|
+
return lines.filter((_, index) => !exports.has(index)).join("\n");
|
|
127
140
|
}
|
|
128
141
|
function createFarmMarkdownRouteModule(input) {
|
|
129
142
|
const { body } = parseMarkdownFrontmatter(input.source);
|
|
130
|
-
const className = _optionalChain([input, 'access',
|
|
143
|
+
const className = _optionalChain([input, 'access', _14 => _14.config, 'optionalAccess', _15 => _15.className]) || "farm-markdown";
|
|
131
144
|
let evaluatedPromise;
|
|
132
145
|
let componentsPromise;
|
|
133
146
|
const loadContent = async () => {
|
|
@@ -154,7 +167,7 @@ function createFarmMarkdownRouteModule(input) {
|
|
|
154
167
|
...props,
|
|
155
168
|
components: {
|
|
156
169
|
...components,
|
|
157
|
-
..._optionalChain([props, 'optionalAccess',
|
|
170
|
+
..._optionalChain([props, 'optionalAccess', _16 => _16.components])
|
|
158
171
|
}
|
|
159
172
|
})
|
|
160
173
|
);
|
|
@@ -225,7 +238,7 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
|
|
|
225
238
|
if (!PAGE_CHECK_DROPPED_HEADERS.has(name.toLowerCase())) headers.append(name, value);
|
|
226
239
|
}
|
|
227
240
|
headers.set("accept", "text/html");
|
|
228
|
-
headers.set(
|
|
241
|
+
headers.set(_chunk5LJF4KUZcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER, _chunk5LJF4KUZcjs._getFarmMarkdownPageCheckToken.call(void 0, ));
|
|
229
242
|
const response = await options.renderPage(
|
|
230
243
|
new Request(pageUrl, {
|
|
231
244
|
method: "GET",
|
|
@@ -234,8 +247,8 @@ async function anonymousVisitorOpensPage(options, url, targetPathname) {
|
|
|
234
247
|
signal: options.request.signal
|
|
235
248
|
})
|
|
236
249
|
);
|
|
237
|
-
if (response.status < 200 || response.status >= 300 || !_optionalChain([response, 'access',
|
|
238
|
-
void _optionalChain([response, 'access',
|
|
250
|
+
if (response.status < 200 || response.status >= 300 || !_optionalChain([response, 'access', _17 => _17.headers, 'access', _18 => _18.get, 'call', _19 => _19("content-type"), 'optionalAccess', _20 => _20.toLowerCase, 'call', _21 => _21(), 'access', _22 => _22.includes, 'call', _23 => _23("text/html")])) {
|
|
251
|
+
void _optionalChain([response, 'access', _24 => _24.body, 'optionalAccess', _25 => _25.cancel, 'call', _26 => _26(), 'access', _27 => _27.catch, 'call', _28 => _28(() => {
|
|
239
252
|
})]);
|
|
240
253
|
return false;
|
|
241
254
|
}
|
|
@@ -252,12 +265,12 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
252
265
|
if (options.request.method !== "GET" && options.request.method !== "HEAD") {
|
|
253
266
|
return null;
|
|
254
267
|
}
|
|
255
|
-
if (_optionalChain([options, 'access',
|
|
268
|
+
if (_optionalChain([options, 'access', _29 => _29.config, 'optionalAccess', _30 => _30.markdownRoutes]) === false) {
|
|
256
269
|
return null;
|
|
257
270
|
}
|
|
258
271
|
const url = new URL(options.request.url);
|
|
259
272
|
const hasMarkdownExtension = url.pathname.toLowerCase().endsWith(".md");
|
|
260
|
-
if (!hasMarkdownExtension && !
|
|
273
|
+
if (!hasMarkdownExtension && !_chunk5LJF4KUZcjs.requestAcceptsMarkdown.call(void 0, options.request.headers.get("accept"))) {
|
|
261
274
|
return null;
|
|
262
275
|
}
|
|
263
276
|
const targetPathname = normalizeFarmMarkdownRoutePath(url.pathname, options.routePathname);
|
|
@@ -295,7 +308,7 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
295
308
|
publicSourceResponses.add(response);
|
|
296
309
|
return response;
|
|
297
310
|
}
|
|
298
|
-
await _optionalChain([publicResponse, 'access',
|
|
311
|
+
await _optionalChain([publicResponse, 'access', _31 => _31.body, 'optionalAccess', _32 => _32.cancel, 'call', _33 => _33()]);
|
|
299
312
|
if (!hasMarkdownExtension) return null;
|
|
300
313
|
return new Response(`No public Markdown version of ${targetPathname}.
|
|
301
314
|
`, {
|
|
@@ -311,9 +324,9 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
311
324
|
}
|
|
312
325
|
const headers = new Headers({
|
|
313
326
|
"Content-Type": "text/markdown; charset=utf-8",
|
|
314
|
-
"Content-Location":
|
|
327
|
+
"Content-Location": _chunk5LJF4KUZcjs._getFarmMarkdownPath.call(void 0,
|
|
315
328
|
targetPathname,
|
|
316
|
-
_optionalChain([options, 'access',
|
|
329
|
+
_optionalChain([options, 'access', _34 => _34.routePathname, 'optionalCall', _35 => _35(targetPathname)])
|
|
317
330
|
),
|
|
318
331
|
"Cache-Control": "public, s-maxage=60, stale-while-revalidate=300",
|
|
319
332
|
"X-Farm-Markdown-Route": targetPathname,
|
|
@@ -322,10 +335,10 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
322
335
|
if (!hasMarkdownExtension) {
|
|
323
336
|
headers.set("Vary", "Accept");
|
|
324
337
|
}
|
|
325
|
-
return
|
|
338
|
+
return _chunk5LJF4KUZcjs.createFarmMarkdownViewResponse.call(void 0, {
|
|
326
339
|
request: options.request,
|
|
327
340
|
requestUrl: url,
|
|
328
|
-
markdown: source.source,
|
|
341
|
+
markdown: withoutFarmMarkdownRouteConfig(source.source),
|
|
329
342
|
status: 200,
|
|
330
343
|
headers,
|
|
331
344
|
markdownPath: headers.get("Content-Location")
|
|
@@ -345,4 +358,5 @@ async function createFarmMarkdownSourceResponse(options) {
|
|
|
345
358
|
|
|
346
359
|
|
|
347
360
|
|
|
348
|
-
|
|
361
|
+
|
|
362
|
+
exports.isFarmMarkdownPageFile = isFarmMarkdownPageFile; exports.normalizeFarmMarkdownRoutePath = normalizeFarmMarkdownRoutePath; exports.parseMarkdownFrontmatter = parseMarkdownFrontmatter; exports.titleFromMarkdown = titleFromMarkdown; exports.createMarkdownMetadata = createMarkdownMetadata; exports.compileFarmMarkdownPage = compileFarmMarkdownPage; exports.FARM_MARKDOWN_PRECOMPILED_PAGES = FARM_MARKDOWN_PRECOMPILED_PAGES; exports.readFarmMarkdownRouteConfig = readFarmMarkdownRouteConfig; exports.withoutFarmMarkdownRouteConfig = withoutFarmMarkdownRouteConfig; exports.createFarmMarkdownRouteModule = createFarmMarkdownRouteModule; exports.isFarmMarkdownPublicSourceResponse = isFarmMarkdownPublicSourceResponse; exports.FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS = FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS; exports.createFarmMarkdownSourceResponse = createFarmMarkdownSourceResponse;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDA432P2Fcjs = require('./chunk-DA432P2F.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk5LJF4KUZcjs = require('./chunk-5LJF4KUZ.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -109,11 +109,11 @@ function collectFarmDefaultMCPPages(sources, options) {
|
|
|
109
109
|
for (const source of sources) {
|
|
110
110
|
const module = isRecord(source.module) ? source.module : void 0;
|
|
111
111
|
if (_optionalChain([module, 'optionalAccess', _ => _.__farmRouteGuard])) continue;
|
|
112
|
-
if (!
|
|
112
|
+
if (!_chunk5LJF4KUZcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, source.pattern)) continue;
|
|
113
113
|
readable.push({ pattern: source.pattern, metadata: _optionalChain([module, 'optionalAccess', _2 => _2.metadata]) });
|
|
114
114
|
}
|
|
115
|
-
const base =
|
|
116
|
-
return
|
|
115
|
+
const base = _chunkDA432P2Fcjs.resolveFarmAgentOrigin.call(void 0, options.metadataBase, options.origin);
|
|
116
|
+
return _chunkDA432P2Fcjs.collectFarmLlmsTxtPages.call(void 0, readable, {
|
|
117
117
|
origin: options.origin,
|
|
118
118
|
basePath: options.basePath,
|
|
119
119
|
markdown: options.markdown
|
|
@@ -122,13 +122,13 @@ function collectFarmDefaultMCPPages(sources, options) {
|
|
|
122
122
|
title: page.title,
|
|
123
123
|
// As the sitemap lists it: '/base' without trailingSlash ('/base/' redirects there).
|
|
124
124
|
url: `${base}${_chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
|
|
125
|
-
|
|
125
|
+
_chunkDA432P2Fcjs.getFarmAgentPagePublicPath.call(void 0, page.path, options),
|
|
126
126
|
options.trailingSlash === true
|
|
127
127
|
)}`,
|
|
128
128
|
...page.description ? { description: page.description } : {},
|
|
129
129
|
// A mirror keeps its .md URL whatever trailingSlash says, as llms.txt links it.
|
|
130
|
-
markdownUrl: `${options.origin}${
|
|
131
|
-
|
|
130
|
+
markdownUrl: `${options.origin}${_chunkDA432P2Fcjs.getFarmAgentPagePublicPath.call(void 0,
|
|
131
|
+
_chunk5LJF4KUZcjs.getFarmMarkdownMirrorPath.call(void 0, page.path),
|
|
132
132
|
options
|
|
133
133
|
)}`
|
|
134
134
|
}));
|
|
@@ -22,7 +22,7 @@ var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkEUZFBHPPcjs = require('./chunk-EUZFBHPP.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunkC5QHZ626cjs = require('./chunk-C5QHZ626.cjs');
|
|
@@ -84,7 +84,7 @@ function subscribeHistoryChange(listener) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// src/client/metadata-reconciler.ts
|
|
87
|
-
var MANAGED_ATTRIBUTE =
|
|
87
|
+
var MANAGED_ATTRIBUTE = _chunkEUZFBHPPcjs.FARM_METADATA_ATTRIBUTE;
|
|
88
88
|
var OWNED_SELECTORS = [
|
|
89
89
|
'meta[name="description"]',
|
|
90
90
|
'meta[name="keywords"]',
|
|
@@ -118,8 +118,8 @@ function removeAll(selector) {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
function applyFarmMetadataToDocument(metadata, pathname) {
|
|
121
|
-
document.title =
|
|
122
|
-
const rendered =
|
|
121
|
+
document.title = _chunkEUZFBHPPcjs.resolveMetadataTitle.call(void 0, _optionalChain([metadata, 'optionalAccess', _ => _.title])) || "";
|
|
122
|
+
const rendered = _chunkEUZFBHPPcjs.renderMetadataHead.call(void 0, metadata, { pathname });
|
|
123
123
|
const template = document.createElement("template");
|
|
124
124
|
template.innerHTML = rendered.tags;
|
|
125
125
|
const viewport = document.createElement("template");
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XAXTTBUT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
serializeFarmLlmsTxt
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HIDZM23B.mjs";
|
|
7
7
|
import {
|
|
8
8
|
stampFarmCspNonce
|
|
9
9
|
} from "./chunk-22W4FNTG.mjs";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-S32PDOLO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
emitFarmAgentRead
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CRF5MOLO.mjs";
|
|
16
16
|
import {
|
|
17
17
|
resolveFarmThemeConfig
|
|
18
18
|
} from "./chunk-YWPNIYUP.mjs";
|
|
@@ -44,12 +44,12 @@ import {
|
|
|
44
44
|
resolveFarmIslxActionsMode,
|
|
45
45
|
resolveFarmRouteRootStrategy,
|
|
46
46
|
toBakedMarkdownSourcePath
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-HVGINJTO.mjs";
|
|
48
48
|
import {
|
|
49
49
|
generateFarmClientPluginEntryCode,
|
|
50
50
|
hasFarmServerRuntimePlugins,
|
|
51
51
|
loadTailwindVitePlugin
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-NNNMFSXG.mjs";
|
|
53
53
|
import {
|
|
54
54
|
FARM_NODE_RESPONSE_END_PENDING
|
|
55
55
|
} from "./chunk-IVP5Q4BX.mjs";
|
|
@@ -59,10 +59,10 @@ import {
|
|
|
59
59
|
import {
|
|
60
60
|
generateFarmTypeArtifacts,
|
|
61
61
|
resolveRouteRenderingConfig
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-HNB5JHBO.mjs";
|
|
63
63
|
import {
|
|
64
64
|
_setFarmInfraAnalyticsWebMCPRoute
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-COK4IXOO.mjs";
|
|
66
66
|
import {
|
|
67
67
|
createFarmRouteRenderPlan,
|
|
68
68
|
farmPathGuardCoversEndpoint,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
getSharedLayoutPrefixLength,
|
|
72
72
|
parseFarmLayoutChainHeader,
|
|
73
73
|
renderFarmLocaleAlternateLinks
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-LP6DIYGA.mjs";
|
|
75
75
|
import {
|
|
76
76
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
77
77
|
} from "./chunk-LLZSYFOM.mjs";
|
|
@@ -89,13 +89,13 @@ import {
|
|
|
89
89
|
resolveFarmMCPRouteLabel,
|
|
90
90
|
resolveFarmMarkdownRouteLabel,
|
|
91
91
|
setFarmRouteLabel
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-P2TGLGRR.mjs";
|
|
93
93
|
import {
|
|
94
94
|
FARM_DEFAULT_MCP_PATH
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-WABOJXAA.mjs";
|
|
96
96
|
import {
|
|
97
97
|
isFarmPreviewDeploymentEnvironment
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-SSFAPTRD.mjs";
|
|
99
99
|
import {
|
|
100
100
|
createFarmServerFnBoundaryModule,
|
|
101
101
|
isFarmServerFnBoundaryId,
|
|
@@ -109,6 +109,7 @@ import {
|
|
|
109
109
|
FARM_CLIENT_REFERENCE_DIRECTORY,
|
|
110
110
|
FARM_CLIENT_REFERENCE_PRAGMA,
|
|
111
111
|
FARM_RESOLVE_FROM_PREFIX,
|
|
112
|
+
bindPackageClientBoundaryCache,
|
|
112
113
|
collectFarmServerBundledPackageInfo,
|
|
113
114
|
createFarmDiagnostic,
|
|
114
115
|
createFarmSourceLocator,
|
|
@@ -128,10 +129,10 @@ import {
|
|
|
128
129
|
getIslandStrategyExport,
|
|
129
130
|
hasUseClientDirective,
|
|
130
131
|
invalidateFarmClientOnlyScan,
|
|
131
|
-
invalidateFarmClientReachableModules,
|
|
132
132
|
isFarmPackageClientBoundary,
|
|
133
133
|
isIsolatableClientBoundarySource,
|
|
134
134
|
loadFarmBrowserBuiltin,
|
|
135
|
+
noteFarmClientReachableModuleChange,
|
|
135
136
|
parseFarmResolveFrom,
|
|
136
137
|
persistPackageScanCache,
|
|
137
138
|
programmaticClientRouteKey,
|
|
@@ -146,7 +147,7 @@ import {
|
|
|
146
147
|
usePackageScanCacheFile,
|
|
147
148
|
withFarmSourceSnapshotOf,
|
|
148
149
|
wrapFarmIslandContainers
|
|
149
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-Q637AXGZ.mjs";
|
|
150
151
|
import {
|
|
151
152
|
generateFarmDocsAdapterClientRuntime,
|
|
152
153
|
getFarmDocsAdapterConfigModule
|
|
@@ -175,10 +176,10 @@ import {
|
|
|
175
176
|
FARM_PREVIEW_ROBOTS_TAG,
|
|
176
177
|
resolveFarmAgentCrawlers,
|
|
177
178
|
resolveFarmAgentSitemap
|
|
178
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-CV4MOEMO.mjs";
|
|
179
180
|
import {
|
|
180
181
|
resolveFarmLlmsTxtConfig
|
|
181
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-HIDZM23B.mjs";
|
|
182
183
|
import {
|
|
183
184
|
getFarmAppDirectories,
|
|
184
185
|
getFarmLayerAliases,
|
|
@@ -205,7 +206,7 @@ import {
|
|
|
205
206
|
createFarmMarkdownSourceResponse,
|
|
206
207
|
isFarmMarkdownPageFile,
|
|
207
208
|
normalizeFarmMarkdownRoutePath
|
|
208
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-NWF2FTFV.mjs";
|
|
209
210
|
import {
|
|
210
211
|
resolveFarmMdxComponentsModulePath,
|
|
211
212
|
resolveMdxConfig
|
|
@@ -217,14 +218,15 @@ import {
|
|
|
217
218
|
farmRequestWantsMarkdown,
|
|
218
219
|
getFarmMarkdownAlternatePath,
|
|
219
220
|
resolveMarkdownMirrorTarget
|
|
220
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-CRF5MOLO.mjs";
|
|
221
222
|
import {
|
|
222
223
|
dispatchIntegrationRequest,
|
|
223
224
|
getFarmIntegrationPluginOwner,
|
|
224
225
|
getIntegrationDocumentNavigationMatchers,
|
|
225
226
|
getIntegrationProviders,
|
|
226
|
-
matchIntegrationRoute
|
|
227
|
-
|
|
227
|
+
matchIntegrationRoute,
|
|
228
|
+
providerSupportsIslands
|
|
229
|
+
} from "./chunk-E72GG355.mjs";
|
|
228
230
|
import {
|
|
229
231
|
resolveFarmRouteContext,
|
|
230
232
|
withFarmRouteContext
|
|
@@ -247,11 +249,11 @@ import {
|
|
|
247
249
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
248
250
|
import {
|
|
249
251
|
APIRouteManager
|
|
250
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-SPKZCFPH.mjs";
|
|
251
253
|
import {
|
|
252
254
|
hasPolyroutePlugin,
|
|
253
255
|
isFarmAPIRouteFileName
|
|
254
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-GTHBWZUK.mjs";
|
|
255
257
|
import {
|
|
256
258
|
getFarmI18nClientSnapshot
|
|
257
259
|
} from "./chunk-O7JEFGUV.mjs";
|
|
@@ -314,7 +316,7 @@ import {
|
|
|
314
316
|
} from "./chunk-EILUVBKS.mjs";
|
|
315
317
|
import {
|
|
316
318
|
FARM_VERSION
|
|
317
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-I5KPOXUE.mjs";
|
|
318
320
|
import {
|
|
319
321
|
DEFAULT_FARM_API_BASE_PATH
|
|
320
322
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -331,7 +333,7 @@ import {
|
|
|
331
333
|
addMetadataMarkdownAlternate,
|
|
332
334
|
mergeMetadata,
|
|
333
335
|
mergeModuleViewport
|
|
334
|
-
} from "./chunk-
|
|
336
|
+
} from "./chunk-23NBOP43.mjs";
|
|
335
337
|
import {
|
|
336
338
|
createDeferredDataResponse
|
|
337
339
|
} from "./chunk-7BIW7VCW.mjs";
|
|
@@ -351,6 +353,9 @@ import {
|
|
|
351
353
|
FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
352
354
|
getConfigRedirectMatcher
|
|
353
355
|
} from "./chunk-CLM73YYD.mjs";
|
|
356
|
+
import {
|
|
357
|
+
_withFarmResponseHeaders
|
|
358
|
+
} from "./chunk-LM55GS4R.mjs";
|
|
354
359
|
import {
|
|
355
360
|
_runWithCurrentRequest,
|
|
356
361
|
parseFarmRequestTarget,
|
|
@@ -1287,13 +1292,13 @@ function loadFarmDocsSearchDevRuntime() {
|
|
|
1287
1292
|
return import("./search-client-GIXIEU75.mjs");
|
|
1288
1293
|
}
|
|
1289
1294
|
function loadFarmOpenAPIDevRuntime() {
|
|
1290
|
-
return import("./manager-
|
|
1295
|
+
return import("./manager-7BNSJKME.mjs");
|
|
1291
1296
|
}
|
|
1292
1297
|
function loadFarmWorkflowsDevRuntime() {
|
|
1293
1298
|
return import("./workflows.mjs");
|
|
1294
1299
|
}
|
|
1295
1300
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1296
|
-
return import("./devtools-
|
|
1301
|
+
return import("./devtools-DPYIYHTI.mjs");
|
|
1297
1302
|
}
|
|
1298
1303
|
function loadFarmDevtoolsUIRuntime() {
|
|
1299
1304
|
return import("./devtools-ui-BOG33MT5.mjs");
|
|
@@ -1375,11 +1380,13 @@ function createFarmServerPrebundleConfig(bundledPackages) {
|
|
|
1375
1380
|
}
|
|
1376
1381
|
function farmIslandContainersPlugin(config) {
|
|
1377
1382
|
let root = config.root ?? process.cwd();
|
|
1383
|
+
let farmApi;
|
|
1378
1384
|
return {
|
|
1379
1385
|
name: "farm:island-containers",
|
|
1380
1386
|
enforce: "pre",
|
|
1381
1387
|
configResolved(resolved) {
|
|
1382
1388
|
root = config.root || resolved.root;
|
|
1389
|
+
farmApi = resolved.plugins.find((plugin) => plugin.name === "farm")?.api;
|
|
1383
1390
|
},
|
|
1384
1391
|
transform(code, id) {
|
|
1385
1392
|
if (resolveFarmServerComponentsMode(config.experimental?.serverComponents) !== "islands") {
|
|
@@ -1390,7 +1397,8 @@ function farmIslandContainersPlugin(config) {
|
|
|
1390
1397
|
}
|
|
1391
1398
|
if (hasUseClientDirective(code)) return null;
|
|
1392
1399
|
const file = id.split("?", 1)[0];
|
|
1393
|
-
const
|
|
1400
|
+
const inspect = () => getFarmClientRenderingBindings(code, file, root);
|
|
1401
|
+
const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
|
|
1394
1402
|
if (bindings.length === 0) return null;
|
|
1395
1403
|
const grown = wrapFarmIslandContainers({
|
|
1396
1404
|
code,
|
|
@@ -2417,6 +2425,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2417
2425
|
console.log(log);
|
|
2418
2426
|
};
|
|
2419
2427
|
const getProgrammaticClientRoutes = () => options.programmaticClientRoutes ?? farmApp?.getRouteManager().getProgrammaticClientRoutes();
|
|
2428
|
+
const inBuildPackageCache = bindPackageClientBoundaryCache();
|
|
2429
|
+
const inspectPackages = (operation) => {
|
|
2430
|
+
const routeManager = farmApp?.getRouteManager();
|
|
2431
|
+
return inBuildPackageCache(
|
|
2432
|
+
() => routeManager ? routeManager.inspectPackages(operation) : operation()
|
|
2433
|
+
);
|
|
2434
|
+
};
|
|
2420
2435
|
const isOutsideAppRoot = (file) => {
|
|
2421
2436
|
const root = farmApp?.getConfig().root || server?.config.root || options.root;
|
|
2422
2437
|
if (!root) return false;
|
|
@@ -2425,7 +2440,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
2425
2440
|
};
|
|
2426
2441
|
const plugin = {
|
|
2427
2442
|
name: "farm",
|
|
2428
|
-
api: {
|
|
2443
|
+
api: {
|
|
2444
|
+
getProgrammaticClientRoutes,
|
|
2445
|
+
inspectPackages
|
|
2446
|
+
},
|
|
2429
2447
|
config(userConfig, configEnv) {
|
|
2430
2448
|
isBuild = configEnv.command === "build";
|
|
2431
2449
|
const farmAliases = {
|
|
@@ -3621,15 +3639,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3621
3639
|
await docsResponse.body?.cancel();
|
|
3622
3640
|
return createFarmDeploymentMismatchResponse(deploymentMismatch);
|
|
3623
3641
|
}
|
|
3624
|
-
|
|
3642
|
+
const page = _withFarmResponseHeaders(
|
|
3625
3643
|
await wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse),
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3644
|
+
(headers) => {
|
|
3645
|
+
const vary = (headers.get("Vary") ?? "").split(",").map((value) => value.trim()).filter(Boolean);
|
|
3646
|
+
if (!vary.some((value) => value.toLowerCase() === "accept")) {
|
|
3647
|
+
headers.set("Vary", [...vary, "Accept"].join(", "));
|
|
3648
|
+
}
|
|
3631
3649
|
}
|
|
3632
3650
|
);
|
|
3651
|
+
return withFarmDeploymentResponse(page, farmConfig.deploymentId, {
|
|
3652
|
+
setCookie: request.method.toUpperCase() === "GET",
|
|
3653
|
+
cookiePath: farmConfig.basePath || "/",
|
|
3654
|
+
secureCookie: new URL(request.url).protocol === "https:"
|
|
3655
|
+
});
|
|
3633
3656
|
},
|
|
3634
3657
|
{
|
|
3635
3658
|
kind: "docs",
|
|
@@ -3648,7 +3671,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
3648
3671
|
}
|
|
3649
3672
|
}
|
|
3650
3673
|
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && req.headers.accept?.includes(FARM_NATIVE_TREE_CONTENT_TYPE)) {
|
|
3651
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
3674
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-AO7PQ7FR.mjs");
|
|
3652
3675
|
const treeBodyInit = requestMethod === "POST" ? { body: createFarmNodeRequestBodyStream(req), duplex: "half" } : {};
|
|
3653
3676
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
3654
3677
|
request: new Request(fullUrl, {
|
|
@@ -4945,7 +4968,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
|
|
|
4945
4968
|
resolvedConfig?.experimental?.isolatedClientHydration,
|
|
4946
4969
|
{
|
|
4947
4970
|
serverComponents: resolveFarmServerComponentsMode(resolvedConfig?.experimental?.serverComponents) === "rsc",
|
|
4948
|
-
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider
|
|
4971
|
+
hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !providerSupportsIslands(provider))
|
|
4949
4972
|
}
|
|
4950
4973
|
);
|
|
4951
4974
|
return generateClientCode(
|
|
@@ -5055,9 +5078,8 @@ export { manifest };
|
|
|
5055
5078
|
root: projectRoot,
|
|
5056
5079
|
isClientPackage: (specifier) => isFarmPackageClientBoundary(file, specifier, projectRoot)
|
|
5057
5080
|
});
|
|
5058
|
-
const routeManager = farmApp?.getRouteManager();
|
|
5059
5081
|
const source = code;
|
|
5060
|
-
const referenced =
|
|
5082
|
+
const referenced = inspectPackages(() => rewritePackageImports(source));
|
|
5061
5083
|
if (referenced !== null) {
|
|
5062
5084
|
code = referenced;
|
|
5063
5085
|
rewrotePackageImports = true;
|
|
@@ -5389,12 +5411,11 @@ if (import.meta.hot) {
|
|
|
5389
5411
|
},
|
|
5390
5412
|
watchChange(id, change) {
|
|
5391
5413
|
const watched = toPosixPath(id);
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
}
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
invalidateFarmRouteRootInferences();
|
|
5414
|
+
const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
|
|
5415
|
+
if (appSource) farmApp?.getRouteManager().noteSourceChange(id, change.event);
|
|
5416
|
+
noteFarmClientReachableModuleChange(id, change.event, { appSource });
|
|
5417
|
+
invalidateFarmClientOnlyScan(id, change.event);
|
|
5418
|
+
invalidateFarmRouteRootInferences(id, change.event);
|
|
5398
5419
|
dropLatestPackageClientBoundaryCache();
|
|
5399
5420
|
},
|
|
5400
5421
|
async handleHotUpdate(ctx) {
|