@farm.js/core 0.1.70 → 0.1.72
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-6T2Z7TB6.cjs → agent-mcp-handler-KE4J3W7S.cjs} +4 -4
- package/dist/{agent-mcp-handler-CPU354QQ.mjs → agent-mcp-handler-VIT4GOSR.mjs} +3 -3
- package/dist/{agent-mcp.d-DulgFLBt.d.ts → agent-mcp.d-BO3rZXEM.d.ts} +15 -5
- package/dist/{agent-mcp.d-TAs1ES2F.d.mts → agent-mcp.d-Cwff7lcA.d.mts} +15 -5
- package/dist/agent-runtime.d.mts +3 -3
- package/dist/agent-runtime.d.ts +3 -3
- package/dist/{analyzer-QGRBLETM.mjs → analyzer-5Q75LTIL.mjs} +2 -2
- package/dist/analyzer-UJG4MIZW.cjs +16 -0
- package/dist/api/node.d.mts +5 -5
- package/dist/api/node.d.ts +5 -5
- package/dist/api/route-manager.cjs +7 -6
- package/dist/api/route-manager.d.mts +7 -7
- package/dist/api/route-manager.d.ts +7 -7
- package/dist/api/route-manager.mjs +6 -5
- package/dist/api/runtime.d.mts +4 -4
- package/dist/api/runtime.d.ts +4 -4
- package/dist/api.cjs +8 -7
- package/dist/api.d.mts +8 -8
- package/dist/api.d.ts +8 -8
- package/dist/api.mjs +7 -6
- package/dist/{app-manifest.d-C-nf3Vmm.d.ts → app-manifest.d-DwjGkYlP.d.ts} +1 -1
- package/dist/{app-manifest.d-6zXb90o6.d.mts → app-manifest.d-USD_IbFd.d.mts} +1 -1
- package/dist/app-markdown.cjs +5 -3
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/app-markdown.mjs +4 -2
- package/dist/{app.d-C2xeMIYT.d.ts → app.d-DAmF2MAk.d.ts} +52 -8
- package/dist/{app.d-DF0aundc.d.mts → app.d-fW06_h8h.d.mts} +52 -8
- package/dist/{chunk-7A3URI2F.mjs → chunk-2EVESLP3.mjs} +8 -1
- package/dist/{chunk-JRF2SKCD.mjs → chunk-3JN5M3T5.mjs} +259 -61
- package/dist/{chunk-XYVPTTUT.cjs → chunk-3WG7GJQL.cjs} +11 -6
- package/dist/{chunk-K66JILV3.cjs → chunk-5LOARKDP.cjs} +2 -2
- package/dist/{chunk-I7NUT24Z.cjs → chunk-5R4Q5FN7.cjs} +2 -2
- package/dist/{chunk-BPUVDCGG.cjs → chunk-5X6OHJEE.cjs} +15 -3
- package/dist/{chunk-RMOU3PR4.mjs → chunk-5XFKWHZD.mjs} +293 -66
- package/dist/{chunk-A2TH5MKE.mjs → chunk-645ENY7W.mjs} +3 -3
- package/dist/{chunk-NYF7A4UW.mjs → chunk-77VNYVVX.mjs} +1 -1
- package/dist/{chunk-32SYRIQ7.cjs → chunk-7QCJDYZQ.cjs} +3 -3
- package/dist/{chunk-QZHTDVH4.mjs → chunk-AUAMXI6N.mjs} +1 -1
- package/dist/{chunk-5R3JQPWD.mjs → chunk-AYVGD3PK.mjs} +1 -1
- package/dist/{chunk-IEN2EFE5.cjs → chunk-BE7AQXJB.cjs} +346 -148
- package/dist/{chunk-CCHJWJGP.mjs → chunk-BSXKZPFE.mjs} +204 -98
- package/dist/{chunk-2MR4MABG.cjs → chunk-C5AM2XDN.cjs} +54 -4
- package/dist/{chunk-M6U6E4F7.cjs → chunk-CBLRSZQL.cjs} +557 -330
- package/dist/{chunk-BBPDJGCU.cjs → chunk-CYOTNHDF.cjs} +2 -2
- package/dist/{chunk-5IJRJWJS.mjs → chunk-DGNMXL2O.mjs} +11 -1
- package/dist/{chunk-3EXCZJEN.mjs → chunk-DS7JGFW5.mjs} +13 -1
- package/dist/{chunk-EDZU7YRK.mjs → chunk-E2V7RRFL.mjs} +2 -2
- package/dist/{chunk-K7JMTAFH.cjs → chunk-E3LE6EZH.cjs} +20 -10
- package/dist/{chunk-DIHBWZDZ.cjs → chunk-ET6WW3FY.cjs} +636 -355
- package/dist/{chunk-65FPDDT4.cjs → chunk-EXN4DTVF.cjs} +2 -2
- package/dist/{chunk-K4UGCUXX.cjs → chunk-FSSONJRV.cjs} +7 -7
- package/dist/{chunk-Y2SZVIVH.cjs → chunk-GPICBTDV.cjs} +8 -1
- package/dist/{chunk-FJ5YCERM.cjs → chunk-HLMUWKAP.cjs} +466 -359
- package/dist/{chunk-A7HCBHMC.cjs → chunk-IWCYRDRQ.cjs} +3 -3
- package/dist/{chunk-R7254L3R.mjs → chunk-J5ASGNKF.mjs} +23 -0
- package/dist/{chunk-75E5FDX2.mjs → chunk-JMFTKNBA.mjs} +10 -10
- package/dist/{chunk-TLSSIYAL.mjs → chunk-KQAB5LML.mjs} +10 -3
- package/dist/{chunk-NSZY3EWG.cjs → chunk-L6E4SHUB.cjs} +31 -8
- package/dist/{chunk-OCNV4CI2.cjs → chunk-MQ4DYVFS.cjs} +26 -0
- package/dist/{chunk-4AC4PXZO.cjs → chunk-N3XO5AL5.cjs} +2 -2
- package/dist/{chunk-2AM26UGI.cjs → chunk-NLBK37HI.cjs} +5 -4
- package/dist/{chunk-R2ZHU37O.mjs → chunk-NLRAQXAA.mjs} +26 -0
- package/dist/{chunk-NA77GEIU.mjs → chunk-NV26EGMC.mjs} +51 -1
- package/dist/{chunk-LECZ5DPZ.cjs → chunk-OSEQL34Q.cjs} +2 -2
- package/dist/{chunk-3WS5AZ3R.mjs → chunk-OSMUE5ST.mjs} +8 -3
- package/dist/{chunk-JFPKARWM.cjs → chunk-PMU4U2W2.cjs} +1 -0
- package/dist/{chunk-KPMLDT3B.mjs → chunk-QUYAGU65.mjs} +581 -300
- package/dist/{chunk-N62IYXYD.mjs → chunk-RFWWXEIF.mjs} +1 -1
- package/dist/{chunk-E77IA5IF.mjs → chunk-RLFGKJQ6.mjs} +1 -1
- package/dist/{chunk-3AUINHFG.mjs → chunk-TNYC3TYP.mjs} +3 -2
- package/dist/{chunk-VG6HYT5K.cjs → chunk-TP4RAV7Y.cjs} +9 -9
- package/dist/{chunk-JFVT5ZZV.mjs → chunk-VAWDGGW3.mjs} +1 -1
- package/dist/{chunk-MU5V7XHL.mjs → chunk-VJSXPN3W.mjs} +3 -0
- package/dist/{chunk-DU4VHHPJ.mjs → chunk-VO55MMBX.mjs} +1 -1
- package/dist/{chunk-LDVJIBGN.mjs → chunk-VT25ERQK.mjs} +1 -1
- package/dist/{chunk-HAXFV2CD.mjs → chunk-WIJF3PBM.mjs} +1 -1
- package/dist/{chunk-QEWWKYDL.cjs → chunk-YCNHUIPR.cjs} +17 -10
- package/dist/{chunk-FILXOEWD.cjs → chunk-YXIQYWOK.cjs} +2 -2
- package/dist/{chunk-THG2TVDH.mjs → chunk-YZLEOMMA.mjs} +3 -3
- package/dist/{chunk-PJQ5W356.mjs → chunk-Z5ZZAGIH.mjs} +1 -0
- package/dist/{chunk-MZLJFNMH.cjs → chunk-ZDZUFD67.cjs} +1 -1
- package/dist/{chunk-Q5HMVGR5.cjs → chunk-ZFEJ2SF2.cjs} +13 -13
- package/dist/{chunk-LNVGXUL3.cjs → chunk-ZMSVKVI3.cjs} +3 -0
- package/dist/{client-component.d-DNbC4oWI.d.ts → client-component.d-9J7CkTWW.d.ts} +2 -2
- package/dist/{client-component.d-Bk5qKJM-.d.mts → client-component.d-ciHeCxr-.d.mts} +2 -2
- package/dist/{client-plugins.d-DwUqh4gp.d.ts → client-plugins.d-CUOhfapO.d.ts} +12 -8
- package/dist/{client-plugins.d-Pi9nG0W0.d.mts → client-plugins.d-JnRz5a1o.d.mts} +12 -8
- package/dist/client-plugins.d.mts +3 -3
- package/dist/client-plugins.d.ts +3 -3
- package/dist/client.cjs +1 -1
- package/dist/client.d.mts +8 -8
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +1 -1
- package/dist/config.d.mts +3 -3
- package/dist/config.d.ts +3 -3
- package/dist/desktop.d.mts +4 -4
- package/dist/desktop.d.ts +4 -4
- package/dist/{devtools-CB43AHEP.mjs → devtools-7JPQMSTQ.mjs} +4 -4
- package/dist/{devtools-L5DUNDF3.cjs → devtools-IZFUYWPG.cjs} +5 -5
- package/dist/docs.cjs +6 -6
- package/dist/docs.d.mts +4 -4
- package/dist/docs.d.ts +4 -4
- package/dist/docs.mjs +5 -5
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/{headers.d-CE6OWB-n.d.ts → headers.d-CqpTL_fZ.d.ts} +2 -2
- package/dist/{headers.d-DED1hHh4.d.mts → headers.d-rbbTKGaN.d.mts} +2 -2
- package/dist/i18n/client.cjs +3 -2
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +2 -1
- package/dist/i18n/index.cjs +3 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +2 -1
- package/dist/i18n/server.cjs +6 -5
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +5 -4
- package/dist/index.cjs +29 -27
- package/dist/{index.d-c9UwIqDy.d.ts → index.d-CMKvzHLW.d.ts} +1 -1
- package/dist/{index.d-CbvOjJcp.d.mts → index.d-D_B2D9Il.d.mts} +1 -1
- package/dist/index.d.mts +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.mjs +28 -26
- package/dist/integrations/orm.d.mts +3 -3
- package/dist/integrations/orm.d.ts +3 -3
- package/dist/integrations.d.mts +3 -3
- package/dist/integrations.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.cjs +4 -2
- package/dist/internal/app-markdown-runtime.d.mts +13 -5
- package/dist/internal/app-markdown-runtime.d.ts +13 -5
- package/dist/internal/app-markdown-runtime.mjs +3 -1
- package/dist/internal/build-runtime.cjs +26 -26
- package/dist/internal/build-runtime.d.mts +5 -5
- package/dist/internal/build-runtime.d.ts +5 -5
- package/dist/internal/build-runtime.mjs +25 -25
- package/dist/internal/cli-runtime.cjs +9 -7
- package/dist/internal/cli-runtime.mjs +8 -6
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +2 -2
- package/dist/internal/client-runtime.d.mts +6 -6
- package/dist/internal/client-runtime.d.ts +6 -6
- package/dist/internal/client-runtime.mjs +3 -3
- package/dist/internal/compression-runtime.d.mts +3 -3
- package/dist/internal/compression-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.d.mts +6 -6
- package/dist/internal/config-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +8 -8
- package/dist/internal/infra-analytics-runtime.mjs +6 -6
- package/dist/internal/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 +15 -15
- package/dist/internal/production-runtime.d.mts +41 -24
- package/dist/internal/production-runtime.d.ts +41 -24
- package/dist/internal/production-runtime.mjs +14 -14
- package/dist/internal/vercel-edge-middleware.d.mts +2 -2
- package/dist/internal/vercel-edge-middleware.d.ts +2 -2
- package/dist/markdown.d.mts +3 -3
- package/dist/markdown.d.ts +3 -3
- package/dist/middleware.cjs +3 -3
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +2 -2
- package/dist/mobile.d.mts +3 -3
- package/dist/mobile.d.ts +3 -3
- package/dist/{mount.d-DngLY7NL.d.ts → mount.d-B0XMxDRh.d.ts} +1 -1
- package/dist/{mount.d-BvWxf8ZE.d.mts → mount.d-ImEO7q8a.d.mts} +1 -1
- package/dist/{navigation-delegate.d-CMyl1h2l.d.mts → navigation-delegate.d-83Q7ksf7.d.mts} +1 -1
- package/dist/{navigation-delegate.d-zZogiDfa.d.ts → navigation-delegate.d-RRx1CSlb.d.ts} +1 -1
- package/dist/navigation.d.mts +6 -6
- package/dist/navigation.d.ts +6 -6
- package/dist/{nitro-Y3LGITW3.cjs → nitro-2LMOMIST.cjs} +2 -2
- package/dist/{nitro-NSTXT7LB.mjs → nitro-72TFIGGO.mjs} +1 -1
- package/dist/{plugin-F2O4BFTK.cjs → plugin-5PIQQVRP.cjs} +2 -2
- package/dist/{plugin-VEBRN7A3.mjs → plugin-QZT747YW.mjs} +1 -1
- package/dist/plugin.cjs +20 -20
- package/dist/plugin.d.mts +6 -6
- package/dist/plugin.d.ts +6 -6
- package/dist/plugin.mjs +19 -19
- package/dist/{production-runtime.d-B0IeWWyO.d.mts → production-runtime.d-Bcu37SCo.d.mts} +1 -1
- package/dist/{production-runtime.d-q3aHIv5Y.d.ts → production-runtime.d-qPj3XRET.d.ts} +1 -1
- package/dist/{render-plan.d-DQj2bzd2.d.ts → render-plan.d-Ds2sXJ5m.d.ts} +1 -1
- package/dist/{render-plan.d-Di1znBDW.d.mts → render-plan.d-wP8nTeRV.d.mts} +1 -1
- package/dist/renderer-client.cjs +3 -2
- package/dist/renderer-client.d.mts +6 -6
- package/dist/renderer-client.d.ts +6 -6
- package/dist/renderer-client.mjs +2 -1
- package/dist/{request.d-CJWzfDYJ.d.mts → request.d-F3h7K37m.d.mts} +1 -1
- package/dist/{request.d-C5vyoYeL.d.ts → request.d-zpSn6pu_.d.ts} +1 -1
- package/dist/request.d.mts +4 -4
- package/dist/request.d.ts +4 -4
- package/dist/{resolver.d-9iKC79CU.d.mts → resolver.d-DJgzbdsp.d.mts} +1 -1
- package/dist/{resolver.d-CY6mEa_F.d.ts → resolver.d-yaHcGCCG.d.ts} +1 -1
- package/dist/{route-rendering.d-DhsY5M2I.d.ts → route-rendering.d-BL0_AdKj.d.ts} +1 -1
- package/dist/{route-rendering.d-C-et2TZ1.d.mts → route-rendering.d-Mw0ZKG2e.d.mts} +1 -1
- package/dist/{router.d-CJB-Ntni.d.ts → router.d-BwXigemZ.d.ts} +1 -1
- package/dist/{router.d-BMDS5s5X.d.mts → router.d-NGVsU11T.d.mts} +1 -1
- package/dist/{routes.d-D3aJw1H5.d.mts → routes.d-CCccJRrp.d.mts} +1 -1
- package/dist/{routes.d-K-Qg79AA.d.ts → routes.d-b7khoRoU.d.ts} +1 -1
- package/dist/routes.d.mts +3 -3
- package/dist/routes.d.ts +3 -3
- package/dist/{routing.d-BxOZ2YWc.d.ts → routing.d-BhPgtN_S.d.ts} +2 -1
- package/dist/{routing.d-DwSUVZbF.d.mts → routing.d-D67HQmnv.d.mts} +2 -1
- package/dist/{rsc-pipeline-NJKLZ3YE.cjs → rsc-pipeline-BNXYMG4G.cjs} +6 -6
- package/dist/{rsc-pipeline-AXQJCCHI.mjs → rsc-pipeline-DHYZLWSF.mjs} +5 -5
- package/dist/{runtime-DMW6DDOI.cjs → runtime-IWOT6ZVC.cjs} +7 -7
- package/dist/{runtime-JXNEKOSE.mjs → runtime-XPYKUNL3.mjs} +5 -5
- package/dist/{runtime.d-BonodRI9.d.mts → runtime.d-BA3MzhXz.d.mts} +1 -1
- package/dist/{runtime.d-nUz0HAL4.d.mts → runtime.d-CTAXWZby.d.mts} +2 -2
- package/dist/{runtime.d-uw4123iI.d.ts → runtime.d-OBIZWpx1.d.ts} +1 -1
- package/dist/{runtime.d-B_uPfMjA.d.ts → runtime.d-PUA5qBnd.d.ts} +2 -2
- package/dist/server-plugins.d.mts +5 -5
- package/dist/server-plugins.d.ts +5 -5
- package/dist/server.cjs +40 -40
- package/dist/server.d.mts +14 -14
- package/dist/server.d.ts +14 -14
- package/dist/server.mjs +22 -22
- package/dist/{spa-router.d-rha3M95y.d.mts → spa-router.d-BG2XzE5p.d.mts} +3 -3
- package/dist/{spa-router.d-l0d9pPZj.d.ts → spa-router.d-DrYT944-.d.ts} +3 -3
- package/dist/testing.cjs +6 -5
- package/dist/testing.d.mts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.mjs +6 -5
- package/dist/{types.d-wVRlLtBf.d.mts → types.d-euATAbE4.d.mts} +4 -0
- package/dist/{types.d-wVRlLtBf.d.ts → types.d-euATAbE4.d.ts} +4 -0
- package/dist/{utils.d-BzuTobEc.d.mts → utils.d-C1k9BJeD.d.mts} +1 -1
- package/dist/{utils.d-BK-PTOF8.d.ts → utils.d-DcF4wxey.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +20 -20
- package/dist/vite.d.mts +9 -7
- package/dist/vite.d.ts +9 -7
- package/dist/vite.mjs +19 -19
- package/package.json +2 -2
- package/dist/analyzer-GUIRJWZH.cjs +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
|
|
4
4
|
|
|
5
5
|
// src/i18n/catalog.ts
|
|
6
6
|
var _promises = require('fs/promises');
|
|
@@ -11,7 +11,7 @@ async function readFarmI18nCatalogs(config) {
|
|
|
11
11
|
}
|
|
12
12
|
const catalogs = {};
|
|
13
13
|
for (const locale of config.locales) {
|
|
14
|
-
const filePath =
|
|
14
|
+
const filePath = _chunkZMSVKVI3cjs.resolveFarmI18nMessagePath.call(void 0, config, locale);
|
|
15
15
|
let source;
|
|
16
16
|
try {
|
|
17
17
|
source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
@@ -26,6 +26,9 @@ import {
|
|
|
26
26
|
getFarmAppDirectories,
|
|
27
27
|
getFarmSourceRoots
|
|
28
28
|
} from "./chunk-E7VF3LQ5.mjs";
|
|
29
|
+
import {
|
|
30
|
+
isFarmMarkdownPageFile
|
|
31
|
+
} from "./chunk-J5ASGNKF.mjs";
|
|
29
32
|
import {
|
|
30
33
|
resolveSchemaModels
|
|
31
34
|
} from "./chunk-F3N52U7S.mjs";
|
|
@@ -34,7 +37,7 @@ import {
|
|
|
34
37
|
} from "./chunk-K63OWRY2.mjs";
|
|
35
38
|
import {
|
|
36
39
|
readFarmI18nCatalogs
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-VO55MMBX.mjs";
|
|
38
41
|
import {
|
|
39
42
|
resolvePluginRoutes
|
|
40
43
|
} from "./chunk-OB45EAQL.mjs";
|
|
@@ -420,6 +423,13 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
420
423
|
continue;
|
|
421
424
|
}
|
|
422
425
|
const source = await readFile(route.filePath, "utf8").catch(() => void 0);
|
|
426
|
+
if (options.docsAdapterRoutes?.owns(route.path) && isFarmMarkdownPageFile(route.filePath)) {
|
|
427
|
+
ssrRoutes.push(route.path);
|
|
428
|
+
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(null, source, { isDynamic: route.isDynamic }).candidate) {
|
|
429
|
+
staticCandidateDocsPages += 1;
|
|
430
|
+
}
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
423
433
|
const configuredRendering = resolveConfiguredRouteRenderingConfig(mod, source);
|
|
424
434
|
const rendering = resolveRouteRenderingConfig(mod, source);
|
|
425
435
|
if (configuredRendering.ssg && !rendering.ssg && source) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFarmRouteLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-645ENY7W.mjs";
|
|
4
4
|
import {
|
|
5
5
|
classifyFarmAgent
|
|
6
6
|
} from "./chunk-KPJYBSHL.mjs";
|
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
getCurrentRequestOrNull
|
|
12
12
|
} from "./chunk-5OFNUETM.mjs";
|
|
13
|
+
import {
|
|
14
|
+
stripFarmBasePath
|
|
15
|
+
} from "./chunk-SF3JB56B.mjs";
|
|
13
16
|
|
|
14
17
|
// src/plugins/infra-analytics.ts
|
|
15
18
|
import { AsyncLocalStorage } from "async_hooks";
|
|
@@ -80,6 +83,12 @@ function classifyFarmInfraAgent(userAgent) {
|
|
|
80
83
|
function routeTemplate(pattern) {
|
|
81
84
|
return typeof pattern === "string" && pattern.length <= 256 && /^\/(?!\/)[a-zA-Z0-9_./:[\]()*-]*$/.test(pattern) ? pattern : "/[unmatched]";
|
|
82
85
|
}
|
|
86
|
+
var PATH = /^\/(?!\/)[\w!$%&'()*+,\-./:;=@[\]^|~]*$/;
|
|
87
|
+
var MAX_PATH_LENGTH = 1024;
|
|
88
|
+
function requestPath(request) {
|
|
89
|
+
const path = stripFarmBasePath(new URL(request.url).pathname);
|
|
90
|
+
return path.length <= MAX_PATH_LENGTH && PATH.test(path) ? path : void 0;
|
|
91
|
+
}
|
|
83
92
|
function duration(value) {
|
|
84
93
|
return Number.isFinite(value) ? Math.min(864e5, Math.max(0, value)) : 0;
|
|
85
94
|
}
|
|
@@ -263,6 +272,7 @@ function beginRequest(request, route, waitUntil) {
|
|
|
263
272
|
return {
|
|
264
273
|
id: uuid(),
|
|
265
274
|
agent: classifyFarmInfraAgent(request.headers.get("user-agent")),
|
|
275
|
+
path: requestPath(request),
|
|
266
276
|
route,
|
|
267
277
|
completed: false,
|
|
268
278
|
waitUntil
|
|
@@ -274,6 +284,7 @@ function requestEvent(metadata, method, status, durationMs) {
|
|
|
274
284
|
requestId: metadata.id,
|
|
275
285
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
276
286
|
route: routeTemplate(getFarmRouteLabel(metadata.route)),
|
|
287
|
+
...metadata.path ? { path: metadata.path } : {},
|
|
277
288
|
agent: metadata.agent,
|
|
278
289
|
kind: "request",
|
|
279
290
|
method,
|
|
@@ -287,6 +298,7 @@ function toolEvent(metadata, event) {
|
|
|
287
298
|
requestId: metadata.id,
|
|
288
299
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
289
300
|
route: routeTemplate(getFarmRouteLabel(metadata.route)),
|
|
301
|
+
...metadata.path ? { path: metadata.path } : {},
|
|
290
302
|
agent: metadata.agent,
|
|
291
303
|
kind: "mcp.tool",
|
|
292
304
|
tool: event.tool,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-FN5UEC7I.mjs";
|
|
11
11
|
import {
|
|
12
12
|
resolveDeployOutputPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OSMUE5ST.mjs";
|
|
14
14
|
import {
|
|
15
15
|
farmDesktopDevGuardPlugin,
|
|
16
16
|
loadFarmReactPlugin
|
|
@@ -210,7 +210,7 @@ async function resolveFarmRscServerPlugins(userConfig, config, root) {
|
|
|
210
210
|
}
|
|
211
211
|
async function configureFarmRscPlugins(config, command) {
|
|
212
212
|
if (config.plugins.length === 0) return config;
|
|
213
|
-
const { PluginManager } = await import("./plugin-
|
|
213
|
+
const { PluginManager } = await import("./plugin-QZT747YW.mjs");
|
|
214
214
|
const manager = new PluginManager({
|
|
215
215
|
config,
|
|
216
216
|
isDev: command === "serve",
|
|
@@ -28,13 +28,16 @@ var _chunkAQIRXBBYcjs = require('./chunk-AQIRXBBY.cjs');
|
|
|
28
28
|
var _chunkMTBDJ326cjs = require('./chunk-MTBDJ326.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
var _chunkL6E4SHUBcjs = require('./chunk-L6E4SHUB.cjs');
|
|
32
|
+
|
|
33
|
+
|
|
31
34
|
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
32
35
|
|
|
33
36
|
|
|
34
37
|
var _chunkJ6TZRYCOcjs = require('./chunk-J6TZRYCO.cjs');
|
|
35
38
|
|
|
36
39
|
|
|
37
|
-
var
|
|
40
|
+
var _chunkCYOTNHDFcjs = require('./chunk-CYOTNHDF.cjs');
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
var _chunk2AFW7673cjs = require('./chunk-2AFW7673.cjs');
|
|
@@ -420,6 +423,13 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
420
423
|
continue;
|
|
421
424
|
}
|
|
422
425
|
const source = await _promises.readFile.call(void 0, route.filePath, "utf8").catch(() => void 0);
|
|
426
|
+
if (_optionalChain([options, 'access', _41 => _41.docsAdapterRoutes, 'optionalAccess', _42 => _42.owns, 'call', _43 => _43(route.path)]) && _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, route.filePath)) {
|
|
427
|
+
ssrRoutes.push(route.path);
|
|
428
|
+
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(null, source, { isDynamic: route.isDynamic }).candidate) {
|
|
429
|
+
staticCandidateDocsPages += 1;
|
|
430
|
+
}
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
423
433
|
const configuredRendering = resolveConfiguredRouteRenderingConfig(mod, source);
|
|
424
434
|
const rendering = resolveRouteRenderingConfig(mod, source);
|
|
425
435
|
if (configuredRendering.ssg && !rendering.ssg && source) {
|
|
@@ -458,7 +468,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
458
468
|
} else {
|
|
459
469
|
ssrRoutes.push(route.path);
|
|
460
470
|
if (options.suggestStaticRendering !== false && analyzeStaticRouteCandidate(mod, source, { isDynamic: route.isDynamic }).candidate) {
|
|
461
|
-
if (_optionalChain([options, 'access',
|
|
471
|
+
if (_optionalChain([options, 'access', _44 => _44.docsAdapterRoutes, 'optionalAccess', _45 => _45.owns, 'call', _46 => _46(route.path)])) staticCandidateDocsPages += 1;
|
|
462
472
|
else staticCandidateRoutes.push(route.path);
|
|
463
473
|
}
|
|
464
474
|
}
|
|
@@ -478,7 +488,7 @@ async function collectSSGPages(routes, loadModule, options = {}) {
|
|
|
478
488
|
Add \`export const dynamic = "force-static";\` after verifying that imported code does not read cookies, headers, authentication, or other request data.`
|
|
479
489
|
);
|
|
480
490
|
}
|
|
481
|
-
if (staticCandidateDocsPages > 0 && !_optionalChain([options, 'access',
|
|
491
|
+
if (staticCandidateDocsPages > 0 && !_optionalChain([options, 'access', _47 => _47.docsAdapterRoutes, 'optionalAccess', _48 => _48.prerender])) {
|
|
482
492
|
console.warn(
|
|
483
493
|
`[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.`
|
|
484
494
|
);
|
|
@@ -550,7 +560,7 @@ declare module "*?url" {
|
|
|
550
560
|
|
|
551
561
|
async function generateFarmI18nTypes(options) {
|
|
552
562
|
if (!options.config.enabled) return void 0;
|
|
553
|
-
const { signatures } = await
|
|
563
|
+
const { signatures } = await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, options.config);
|
|
554
564
|
const outFile = options.outFile ? _path.resolve.call(void 0, options.root, options.outFile) : _path.join.call(void 0, _path.resolve.call(void 0, options.root), options.srcDir || "src", "farm-i18n.d.ts");
|
|
555
565
|
const content = renderFarmI18nTypes(options.config.locales, signatures);
|
|
556
566
|
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, outFile), { recursive: true });
|
|
@@ -760,7 +770,7 @@ function fieldTsType(field) {
|
|
|
760
770
|
case "json":
|
|
761
771
|
return "unknown";
|
|
762
772
|
case "enum":
|
|
763
|
-
return _optionalChain([field, 'access',
|
|
773
|
+
return _optionalChain([field, 'access', _49 => _49.values, 'optionalAccess', _50 => _50.length]) ? field.values.map((value) => JSON.stringify(value)).join(" | ") : "string";
|
|
764
774
|
// id, uuid, string, text, datetime all travel as strings over JSON.
|
|
765
775
|
default:
|
|
766
776
|
return "string";
|
|
@@ -784,7 +794,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
784
794
|
const shouldGenerateApi = options.api !== false;
|
|
785
795
|
const shouldGenerateEnv = options.env !== false;
|
|
786
796
|
const shouldGenerateImages = options.images !== false;
|
|
787
|
-
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access',
|
|
797
|
+
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access', _51 => _51.i18nConfig, 'optionalAccess', _52 => _52.enabled]);
|
|
788
798
|
const sourceRoots = _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
|
|
789
799
|
const appDirs = _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
|
|
790
800
|
const result = {
|
|
@@ -829,7 +839,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
829
839
|
const apiRoutes = generator.scanAPIRoutes();
|
|
830
840
|
const apiTypesPath = options.apiTypesOutFile ? _path.resolve.call(void 0, root, options.apiTypesOutFile) : _path.join.call(void 0, root, srcDir, "lib", "api.generated.ts");
|
|
831
841
|
const pluginRoutes = _chunk2AFW7673cjs.resolvePluginRoutes.call(void 0,
|
|
832
|
-
_optionalChain([options, 'access',
|
|
842
|
+
_optionalChain([options, 'access', _53 => _53.plugins, 'optionalAccess', _54 => _54.filter, 'call', _55 => _55((plugin) => plugin.name !== _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN)])
|
|
833
843
|
);
|
|
834
844
|
const configFiles = [
|
|
835
845
|
...(_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.configFile).filter((file) => Boolean(file)),
|
|
@@ -906,14 +916,14 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
906
916
|
});
|
|
907
917
|
}
|
|
908
918
|
}
|
|
909
|
-
if (shouldRefreshUnifiedTypes && _optionalChain([options, 'access',
|
|
910
|
-
const { signatures } = await
|
|
919
|
+
if (shouldRefreshUnifiedTypes && _optionalChain([options, 'access', _56 => _56.i18nConfig, 'optionalAccess', _57 => _57.enabled]) && !options.i18nTypesOutFile) {
|
|
920
|
+
const { signatures } = await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
|
|
911
921
|
unifiedSections.push(renderFarmI18nTypes(options.i18nConfig.locales, signatures));
|
|
912
922
|
result.i18nTypesPath = unifiedTypesPath;
|
|
913
923
|
} else if (shouldGenerateI18n && options.i18nConfig) {
|
|
914
924
|
if (options.check) {
|
|
915
925
|
const i18nTypesPath = resolveGeneratedPath(root, srcDir, options.i18nTypesOutFile, false);
|
|
916
|
-
const { signatures } = await
|
|
926
|
+
const { signatures } = await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
|
|
917
927
|
checkGeneratedFile(
|
|
918
928
|
i18nTypesPath,
|
|
919
929
|
renderFarmI18nTypes(options.i18nConfig.locales, signatures),
|