@farm.js/core 0.1.37 → 0.1.38
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-BC0bAGVF.d.mts → agent-mcp-BwKlpnc7.d.mts} +1 -1
- package/dist/{agent-mcp-jyDHbQKe.d.ts → agent-mcp-De1imoMS.d.ts} +1 -1
- package/dist/{agent-mcp-handler-SJAHFSPI.cjs → agent-mcp-handler-MRGP3WJ3.cjs} +5 -5
- package/dist/{agent-mcp-handler-LPJ2CADR.mjs → agent-mcp-handler-OLRMZONF.mjs} +4 -4
- 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/api/client.cjs +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +5 -5
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +4 -4
- package/dist/api/runtime.cjs +4 -4
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api/runtime.mjs +3 -3
- package/dist/api.cjs +7 -7
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +6 -6
- package/dist/{app-Cbkj9ufe.d.mts → app-CFZt-srr.d.mts} +21 -3
- package/dist/{app-CKO3iN1c.d.ts → app-kT_QXTdx.d.ts} +21 -3
- package/dist/app-markdown.cjs +4 -4
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/app-markdown.mjs +3 -3
- package/dist/{chunk-LOFKRKO7.cjs → chunk-2DD4JMQC.cjs} +113 -22
- package/dist/chunk-2ZYGC6SS.cjs +576 -0
- package/dist/{chunk-75X755YZ.cjs → chunk-34UCJRQO.cjs} +2 -2
- package/dist/{chunk-CVH2BXPY.cjs → chunk-3LOLJTFV.cjs} +6 -6
- package/dist/{chunk-4GPOC4LN.cjs → chunk-472NCAZ7.cjs} +3 -3
- package/dist/{chunk-WT4TGLXT.cjs → chunk-4E5QXOCL.cjs} +6 -6
- package/dist/{chunk-7DWNJI73.cjs → chunk-4IE345DM.cjs} +37 -19
- package/dist/{chunk-O6WAEAX3.mjs → chunk-5BWWFHR2.mjs} +70 -15
- package/dist/{chunk-6LGFV2CQ.cjs → chunk-5OKBARDN.cjs} +2 -2
- package/dist/{chunk-3IP27TCG.cjs → chunk-5PWXMJOH.cjs} +19 -19
- package/dist/chunk-6BK3K2GB.mjs +318 -0
- package/dist/{chunk-HEVMCTSR.mjs → chunk-6HB6V3R7.mjs} +1 -1
- package/dist/{chunk-NICDYKBS.cjs → chunk-6XWDE2P2.cjs} +22 -4
- package/dist/{chunk-Z7LA7MHQ.mjs → chunk-7FPTZLKH.mjs} +1 -1
- package/dist/{chunk-JPNFPAZ4.mjs → chunk-7PEP3BUT.mjs} +1 -1
- package/dist/{chunk-XOPOIFTJ.mjs → chunk-A3EAIURZ.mjs} +25 -7
- package/dist/{chunk-LBDP3YT3.mjs → chunk-ARC7I3O2.mjs} +1 -1
- package/dist/{chunk-LBGILORX.mjs → chunk-B6G5CKMC.mjs} +101 -10
- package/dist/{chunk-MCIZVNOQ.mjs → chunk-BZHXGVMA.mjs} +1 -1
- package/dist/{chunk-KDTBF3UU.mjs → chunk-CNNOLE4O.mjs} +1 -1
- package/dist/{chunk-TDNWPAVR.mjs → chunk-CUM5NYL5.mjs} +1 -1
- package/dist/{chunk-HITLGIAO.cjs → chunk-CY2ZQ5C6.cjs} +7 -6
- package/dist/{chunk-KPFKMDM7.mjs → chunk-DRLKAXDM.mjs} +1 -1
- package/dist/{chunk-VR4GD5I3.cjs → chunk-EIPC3FDA.cjs} +12 -4
- package/dist/{chunk-K3SAEIM3.mjs → chunk-EKF7KDFD.mjs} +1 -1
- package/dist/{chunk-B5PFZLKV.cjs → chunk-EKN7NSZO.cjs} +25 -8
- package/dist/{chunk-ATWHHSY2.cjs → chunk-EMO6K4YY.cjs} +4 -4
- package/dist/{chunk-6SJ2KJTA.mjs → chunk-EPYU2EBL.mjs} +1 -1
- package/dist/{chunk-PTZ2TVNE.cjs → chunk-H5CLOUZS.cjs} +5 -5
- package/dist/{chunk-DTSROJ5J.mjs → chunk-HD5CF3OE.mjs} +1 -1
- package/dist/{chunk-IAIYV4RZ.mjs → chunk-HXRYZWTA.mjs} +1 -1
- package/dist/{chunk-Z5BEWYVO.mjs → chunk-IBUQWVYA.mjs} +16 -0
- package/dist/{chunk-HMRSWN47.mjs → chunk-INL3THCU.mjs} +1 -1
- package/dist/{chunk-FBOJ55OM.mjs → chunk-IVLZZZEI.mjs} +1 -1
- package/dist/{chunk-ENLZ4R3Y.mjs → chunk-J7K2NZD6.mjs} +7 -6
- package/dist/{chunk-NFMDCAOS.mjs → chunk-JCKYH4LG.mjs} +2 -2
- package/dist/{chunk-PMQHMWZU.cjs → chunk-JCYYXBAJ.cjs} +3 -3
- package/dist/{chunk-LPFV45AY.cjs → chunk-KCQBAKIY.cjs} +9 -9
- package/dist/{chunk-FGRYBX5X.mjs → chunk-KHKLMNI5.mjs} +1 -1
- package/dist/{chunk-NQ6QFZWD.cjs → chunk-KKSTAEMY.cjs} +1 -1
- package/dist/{chunk-7O5M4UKW.cjs → chunk-L4DD7ODZ.cjs} +2 -2
- package/dist/{chunk-YCKO6FRS.mjs → chunk-LI2F57NI.mjs} +1 -1
- package/dist/{chunk-TW4GYDBJ.mjs → chunk-MLY2RP5R.mjs} +10 -2
- package/dist/{chunk-5BXGGEC7.cjs → chunk-N32CC42M.cjs} +5 -5
- package/dist/{chunk-BHY547NB.cjs → chunk-NBBEQLOK.cjs} +9 -9
- package/dist/{chunk-WQ7T2263.mjs → chunk-OAHTRMIC.mjs} +3 -3
- package/dist/{chunk-K4I4O5TS.mjs → chunk-OCIEZME4.mjs} +790 -671
- package/dist/{chunk-UH6QN5NL.mjs → chunk-P664ZVTV.mjs} +2 -2
- package/dist/{chunk-TE2G5ION.cjs → chunk-PGZDEPTM.cjs} +88 -33
- package/dist/{chunk-3KGDJLJK.mjs → chunk-POSPE3IO.mjs} +19 -1
- package/dist/{chunk-3A4KGQYI.cjs → chunk-Q3NXS4MU.cjs} +16 -14
- package/dist/{chunk-TPLJVC7E.mjs → chunk-QFW2IH5E.mjs} +23 -6
- package/dist/{chunk-S3VWVTVA.mjs → chunk-QRKIMN7T.mjs} +13 -1
- package/dist/chunk-QTXBII4Z.cjs +632 -0
- package/dist/{chunk-CI6E3UOH.cjs → chunk-RG4A6LB2.cjs} +7 -7
- package/dist/{chunk-7SQ5SGYZ.cjs → chunk-RW63BOV7.cjs} +2 -2
- package/dist/{chunk-U6MPZ35Q.cjs → chunk-RWFLWR5J.cjs} +8 -8
- package/dist/{chunk-EUV4YR3V.cjs → chunk-SGBJ247Q.cjs} +18 -2
- package/dist/{chunk-J3ANCZKA.mjs → chunk-SKVTP5PR.mjs} +1 -1
- package/dist/{chunk-6TJITR2B.cjs → chunk-TGFQVLLF.cjs} +870 -751
- package/dist/{chunk-4P6ULFMD.mjs → chunk-TUBTR2OP.mjs} +221 -102
- package/dist/{chunk-EMMQ64QW.cjs → chunk-TYJALEHQ.cjs} +2 -2
- package/dist/{chunk-WRPHYQVY.mjs → chunk-TYMMBFN2.mjs} +1 -1
- package/dist/chunk-U6QLDL3G.mjs +576 -0
- package/dist/{chunk-OW67PDDS.cjs → chunk-ULASELLA.cjs} +13 -1
- package/dist/{chunk-WWIKMBRN.mjs → chunk-VNGH5MLF.mjs} +17 -1
- package/dist/{chunk-NNSAQX3U.mjs → chunk-VT4WFRHA.mjs} +1 -1
- package/dist/{chunk-UJZLSXUB.cjs → chunk-VU6AAZVY.cjs} +17 -1
- package/dist/{chunk-ADOAUDQ6.cjs → chunk-VXEEATVD.cjs} +2 -2
- package/dist/{chunk-RRMVL6CJ.mjs → chunk-W36M2BQ4.mjs} +1 -1
- package/dist/{chunk-4WQ6PGSJ.cjs → chunk-WEW2JVA4.cjs} +4 -4
- package/dist/{chunk-4E5WBPEG.mjs → chunk-WFRT7JPX.mjs} +8 -533
- package/dist/{chunk-VXAWRDK7.mjs → chunk-WLL43JMO.mjs} +1 -1
- package/dist/chunk-WW46B6HA.cjs +318 -0
- package/dist/{chunk-D3C5LBQY.cjs → chunk-WXJLNP33.cjs} +2 -2
- package/dist/{chunk-NDILNQ4L.cjs → chunk-XKG2BLFN.cjs} +2 -2
- package/dist/{chunk-W2YDNK66.cjs → chunk-XKVVMZP5.cjs} +2 -2
- package/dist/{chunk-Q5FYSK45.cjs → chunk-YR2VBEMO.cjs} +619 -500
- package/dist/{chunk-EXG5LD6B.mjs → chunk-ZJD2PN6Z.mjs} +10 -8
- package/dist/{chunk-G2TEB74S.cjs → chunk-ZXH4TS3F.cjs} +2 -2
- package/dist/{client-plugins-C8DjftDF.d.ts → client-plugins-BvlNhGEB.d.ts} +40 -7
- package/dist/{client-plugins-CV4eJ9De.d.mts → client-plugins-DUrIYX9B.d.mts} +40 -7
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +5 -5
- package/dist/client.d.mts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +4 -4
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{devtools-KVOY2TCZ.mjs → devtools-JYJNOLPQ.mjs} +7 -5
- package/dist/{devtools-JXFQNWSH.cjs → devtools-VQWJANJV.cjs} +8 -6
- package/dist/docs.cjs +11 -9
- package/dist/docs.d.mts +20 -2
- package/dist/docs.d.ts +20 -2
- package/dist/docs.mjs +10 -8
- package/dist/headers.cjs +6 -4
- package/dist/headers.d.mts +11 -1
- package/dist/headers.d.ts +11 -1
- package/dist/headers.mjs +5 -3
- package/dist/index.cjs +52 -39
- package/dist/index.d.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.mjs +52 -39
- 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 +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +28 -27
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +27 -26
- package/dist/internal/cli-runtime.cjs +10 -8
- package/dist/internal/cli-runtime.mjs +9 -7
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +8 -6
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +7 -5
- package/dist/internal/docs-precompiled-runtime.cjs +19 -13
- package/dist/internal/docs-precompiled-runtime.d.mts +5 -0
- package/dist/internal/docs-precompiled-runtime.d.ts +5 -0
- package/dist/internal/docs-precompiled-runtime.mjs +14 -8
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-node-env.cjs +6 -2
- package/dist/internal/production-node-env.d.mts +10 -1
- package/dist/internal/production-node-env.d.ts +10 -1
- package/dist/internal/production-node-env.mjs +5 -1
- package/dist/internal/production-runtime.cjs +34 -14
- package/dist/internal/production-runtime.d.mts +51 -11
- package/dist/internal/production-runtime.d.ts +51 -11
- package/dist/internal/production-runtime.mjs +36 -16
- package/dist/markdown.cjs +8 -2
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.mjs +7 -1
- package/dist/middleware.cjs +9 -7
- package/dist/middleware.d.mts +24 -4
- package/dist/middleware.d.ts +24 -4
- package/dist/middleware.mjs +9 -7
- package/dist/navigation.cjs +4 -4
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +3 -3
- package/dist/plugin.cjs +21 -20
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +20 -19
- package/dist/{production-runtime-Du_FHb2-.d.mts → production-runtime-BQ4_WLwQ.d.mts} +1 -1
- package/dist/{production-runtime-C2kkrPVZ.d.ts → production-runtime-D2aMyzjr.d.ts} +1 -1
- package/dist/query/client.cjs +2 -2
- package/dist/query/client.mjs +1 -1
- package/dist/{render-plan-BnnPTpus.d.ts → render-plan-25p4hrj4.d.ts} +1 -1
- package/dist/{render-plan-Cgx7v8tJ.d.mts → render-plan-DtkXMN8D.d.mts} +1 -1
- package/dist/renderer-client.d.mts +3 -3
- package/dist/renderer-client.d.ts +3 -3
- package/dist/renderer.d.mts +13 -4
- package/dist/renderer.d.ts +13 -4
- package/dist/{request-sKayKcop.d.mts → request-DgCkIdcn.d.mts} +4 -2
- package/dist/{request-BNWr7r5e.d.ts → request-jF4jwx8f.d.ts} +4 -2
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-Bx4Auw6Q.d.ts → route-rendering-Bji6S6a_.d.ts} +1 -1
- package/dist/{route-rendering-DWFp3Yq4.d.mts → route-rendering-CSBF78Ya.d.mts} +1 -1
- package/dist/{router-BK6K42Ij.d.mts → router-B09Ui3Qm.d.mts} +1 -1
- package/dist/{router-DnW_2tQi.d.ts → router-CPB9cXtG.d.ts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{runtime-DJDaCMd_.d.mts → runtime-CM6E6yuI.d.mts} +1 -1
- package/dist/{runtime-CA3Ei5k_.d.ts → runtime-EDMwLdjv.d.ts} +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +47 -46
- package/dist/server.d.mts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.mjs +25 -24
- package/dist/{spa-router-Mwbd7g2L.d.ts → spa-router-B_N8XgVu.d.ts} +2 -2
- package/dist/{spa-router-D6fUA4Rn.d.mts → spa-router-Cgimzfbi.d.mts} +2 -2
- package/dist/testing.cjs +5 -5
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +4 -4
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-BwVcAfUR.d.ts → utils-BNxAKAuT.d.ts} +1 -1
- package/dist/{utils-p9Hs-jCc.d.mts → utils-DZciYXYl.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +21 -20
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +20 -19
- package/package.json +1 -1
- package/dist/chunk-655RLQQL.mjs +0 -43
- package/dist/chunk-MRMI32SN.cjs +0 -1157
- package/dist/chunk-MT763TDW.cjs +0 -43
package/dist/app-markdown.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FarmMdxComponents, u as FarmMdxResolvedConfig, s as RouteModule } from './client-plugins-
|
|
2
|
-
export { z as FARM_MARKDOWN_CONTENT_TYPE, x as FarmMdxComponent, y as FarmMdxUserConfig, A as createFarmMarkdownErrorBody, B as farmRequestWantsMarkdown, v as resolveFarmMdxComponentsModulePath, w as resolveMdxConfig } from './client-plugins-
|
|
1
|
+
import { t as FarmMdxComponents, u as FarmMdxResolvedConfig, s as RouteModule } from './client-plugins-BvlNhGEB.js';
|
|
2
|
+
export { z as FARM_MARKDOWN_CONTENT_TYPE, x as FarmMdxComponent, y as FarmMdxUserConfig, A as createFarmMarkdownErrorBody, B as farmRequestWantsMarkdown, v as resolveFarmMdxComponentsModulePath, w as resolveMdxConfig } from './client-plugins-BvlNhGEB.js';
|
|
3
3
|
export { FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS, FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, createMarkdownMetadata, isFarmMarkdownPageFile, isFarmMarkdownPublicSourceResponse, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './internal/app-markdown-runtime.js';
|
|
4
4
|
import './lifecycle-DK06VuKP.js';
|
|
5
5
|
import './integration-api-BPJo5oXb.js';
|
package/dist/app-markdown.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFarmMarkdownRouteModuleFromFile,
|
|
3
3
|
loadFarmMdxComponents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IVLZZZEI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS,
|
|
7
7
|
createFarmMarkdownRouteModule,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
normalizeFarmMarkdownRoutePath,
|
|
13
13
|
parseMarkdownFrontmatter,
|
|
14
14
|
titleFromMarkdown
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QFW2IH5E.mjs";
|
|
16
16
|
import {
|
|
17
17
|
resolveFarmMdxComponentsModulePath,
|
|
18
18
|
resolveMdxConfig
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
22
22
|
createFarmMarkdownErrorBody,
|
|
23
23
|
farmRequestWantsMarkdown
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VNGH5MLF.mjs";
|
|
25
25
|
import "./chunk-MVL2RAJW.mjs";
|
|
26
26
|
import "./chunk-ZLAT2CWY.mjs";
|
|
27
27
|
import "./chunk-FUZEBRP3.mjs";
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkH5CLOUZScjs = require('./chunk-H5CLOUZS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkOWOUTKIJcjs = require('./chunk-OWOUTKIJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkWEW2JVA4cjs = require('./chunk-WEW2JVA4.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk2ZYGC6SScjs = require('./chunk-2ZYGC6SS.cjs');
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
var _chunkJ63ZH5OQcjs = require('./chunk-J63ZH5OQ.cjs');
|
|
@@ -15,6 +18,14 @@ var _chunkJ63ZH5OQcjs = require('./chunk-J63ZH5OQ.cjs');
|
|
|
15
18
|
var _chunkOI6CMLWXcjs = require('./chunk-OI6CMLWX.cjs');
|
|
16
19
|
|
|
17
20
|
|
|
21
|
+
var _chunkVU6AAZVYcjs = require('./chunk-VU6AAZVY.cjs');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var _chunk4GWRFP22cjs = require('./chunk-4GWRFP22.cjs');
|
|
27
|
+
|
|
28
|
+
|
|
18
29
|
var _chunkTKJZFIMLcjs = require('./chunk-TKJZFIML.cjs');
|
|
19
30
|
|
|
20
31
|
|
|
@@ -27,10 +38,11 @@ var _chunkKIIMAWOJcjs = require('./chunk-KIIMAWOJ.cjs');
|
|
|
27
38
|
|
|
28
39
|
|
|
29
40
|
|
|
41
|
+
|
|
30
42
|
var _chunkKNBBQHO2cjs = require('./chunk-KNBBQHO2.cjs');
|
|
31
43
|
|
|
32
44
|
|
|
33
|
-
var
|
|
45
|
+
var _chunkKKSTAEMYcjs = require('./chunk-KKSTAEMY.cjs');
|
|
34
46
|
|
|
35
47
|
|
|
36
48
|
var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
|
|
@@ -219,6 +231,71 @@ ${html}`;
|
|
|
219
231
|
}
|
|
220
232
|
_chunkS3JO3N4Hcjs.__name.call(void 0, composeFarmFullDocument, "composeFarmFullDocument");
|
|
221
233
|
|
|
234
|
+
// src/middleware/may-handle.ts
|
|
235
|
+
function hasFarmMiddlewareConfig(config) {
|
|
236
|
+
if (!config) return false;
|
|
237
|
+
if (Array.isArray(config)) return config.length > 0;
|
|
238
|
+
const configRecord = config;
|
|
239
|
+
return Boolean(
|
|
240
|
+
configRecord.matcher || configRecord.exclude || configRecord.runtime || configRecord.handler || Array.isArray(configRecord.handlers) && configRecord.handlers.length > 0
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, hasFarmMiddlewareConfig, "hasFarmMiddlewareConfig");
|
|
244
|
+
function configMiddlewareMayHandlePath(config, pathname) {
|
|
245
|
+
if (!hasFarmMiddlewareConfig(config)) return false;
|
|
246
|
+
const entries = Array.isArray(config) ? config : [config];
|
|
247
|
+
return entries.some((entry) => {
|
|
248
|
+
if (!entry.matcher && !entry.exclude) return true;
|
|
249
|
+
const matchers = entry.matcher ? (Array.isArray(entry.matcher) ? entry.matcher : [entry.matcher]).map(
|
|
250
|
+
(matcher) => (
|
|
251
|
+
// A request-aware matcher cannot be proven safe at build time.
|
|
252
|
+
typeof matcher === "function" ? () => true : matcher
|
|
253
|
+
)
|
|
254
|
+
) : void 0;
|
|
255
|
+
const compiled = _chunk4GWRFP22cjs.compileMiddlewareConfig.call(void 0, { matcher: matchers, exclude: entry.exclude });
|
|
256
|
+
return _chunk4GWRFP22cjs.matchesCompiledMiddlewareConfig.call(void 0, pathname, compiled, {}).matched;
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, configMiddlewareMayHandlePath, "configMiddlewareMayHandlePath");
|
|
260
|
+
function appMiddlewareMayHandlePath(middlewareRoutes, pathname) {
|
|
261
|
+
return middlewareRoutes.some((route) => _chunk4GWRFP22cjs.matchesMiddlewareRoute.call(void 0, pathname, route).matched);
|
|
262
|
+
}
|
|
263
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, appMiddlewareMayHandlePath, "appMiddlewareMayHandlePath");
|
|
264
|
+
var CATCH_ALL_PROBE = "/__farm-listing-probe__/0";
|
|
265
|
+
function isPathSpecificMatcher(matcher) {
|
|
266
|
+
if (typeof matcher === "function") return false;
|
|
267
|
+
const compiled = _chunk4GWRFP22cjs.compileMiddlewareConfig.call(void 0, { matcher });
|
|
268
|
+
return !_chunk4GWRFP22cjs.matchesCompiledMiddlewareConfig.call(void 0, CATCH_ALL_PROBE, compiled, {}).matched;
|
|
269
|
+
}
|
|
270
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isPathSpecificMatcher, "isPathSpecificMatcher");
|
|
271
|
+
function pathSpecificConfigMiddlewareCovers(config, pathname) {
|
|
272
|
+
if (!hasFarmMiddlewareConfig(config)) return false;
|
|
273
|
+
const entries = Array.isArray(config) ? config : [config];
|
|
274
|
+
return entries.some((entry) => {
|
|
275
|
+
if (!entry.matcher) return false;
|
|
276
|
+
const matchers = (Array.isArray(entry.matcher) ? entry.matcher : [entry.matcher]).filter(
|
|
277
|
+
isPathSpecificMatcher
|
|
278
|
+
);
|
|
279
|
+
if (matchers.length === 0) return false;
|
|
280
|
+
const compiled = _chunk4GWRFP22cjs.compileMiddlewareConfig.call(void 0, { matcher: matchers, exclude: entry.exclude });
|
|
281
|
+
return _chunk4GWRFP22cjs.matchesCompiledMiddlewareConfig.call(void 0, pathname, compiled, {}).matched;
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, pathSpecificConfigMiddlewareCovers, "pathSpecificConfigMiddlewareCovers");
|
|
285
|
+
function farmPathGuardCoversPage(options, pathname) {
|
|
286
|
+
return appMiddlewareMayHandlePath(
|
|
287
|
+
options.middlewareRoutes.filter((route) => route.path !== "/"),
|
|
288
|
+
pathname
|
|
289
|
+
) || pathSpecificConfigMiddlewareCovers(options.config.middleware, pathname) || _chunkVU6AAZVYcjs.integrationMiddlewareMayHandlePath.call(void 0, options.config.integrations, pathname, CATCH_ALL_PROBE);
|
|
290
|
+
}
|
|
291
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, farmPathGuardCoversPage, "farmPathGuardCoversPage");
|
|
292
|
+
function farmPathGuardCoversEndpoint(options, path, apiServerBasePath) {
|
|
293
|
+
return _chunkKNBBQHO2cjs.createFarmAPIMiddlewarePathnames.call(void 0, apiServerBasePath)(path).some(
|
|
294
|
+
(pathname) => farmPathGuardCoversPage(options, pathname)
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, farmPathGuardCoversEndpoint, "farmPathGuardCoversEndpoint");
|
|
298
|
+
|
|
222
299
|
// src/i18n/alternates.ts
|
|
223
300
|
function renderFarmLocaleAlternateLinks(pathname, config, options = {}) {
|
|
224
301
|
if (config.routing === "none") return "";
|
|
@@ -269,13 +346,19 @@ function isLateRedirectTarget(url) {
|
|
|
269
346
|
}
|
|
270
347
|
}
|
|
271
348
|
_chunkS3JO3N4Hcjs.__name.call(void 0, isLateRedirectTarget, "isLateRedirectTarget");
|
|
272
|
-
function createLateRedirectRecovery(url) {
|
|
349
|
+
function createLateRedirectRecovery(url, nonce) {
|
|
273
350
|
if (!isLateRedirectTarget(url)) return "";
|
|
274
|
-
return
|
|
351
|
+
return _chunk2ZYGC6SScjs.stampFarmCspNonce.call(void 0,
|
|
352
|
+
`<script>window.location.replace(${serializeForInlineScript(url)})</script>`,
|
|
353
|
+
nonce
|
|
354
|
+
);
|
|
275
355
|
}
|
|
276
356
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createLateRedirectRecovery, "createLateRedirectRecovery");
|
|
277
|
-
function createLateNotFoundRecovery(content) {
|
|
278
|
-
return `<template id="${TEMPLATE_ID}">${content}</template
|
|
357
|
+
function createLateNotFoundRecovery(content, nonce) {
|
|
358
|
+
return `<template id="${TEMPLATE_ID}">${content}</template>` + _chunk2ZYGC6SScjs.stampFarmCspNonce.call(void 0,
|
|
359
|
+
`<script>(function(){var t=document.getElementById("${TEMPLATE_ID}");var p=document.getElementById("${PAGE_CONTAINER_ID}");if(t&&p){p.replaceChildren(t.content.cloneNode(true));}if(t)t.remove();document.documentElement.dataset.farmLateNotFound="true";var m=document.createElement("meta");m.name="robots";m.content="noindex";document.head.appendChild(m);})();</script>`,
|
|
360
|
+
nonce
|
|
361
|
+
);
|
|
279
362
|
}
|
|
280
363
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createLateNotFoundRecovery, "createLateNotFoundRecovery");
|
|
281
364
|
|
|
@@ -402,7 +485,7 @@ function createFarmMetadataRouteResponse(kind, value, routeModule = {}, options
|
|
|
402
485
|
if (isResponse(value)) {
|
|
403
486
|
return method === "HEAD" ? _chunkTKJZFIMLcjs.omitFarmResponseBody.call(void 0, value) : value;
|
|
404
487
|
}
|
|
405
|
-
const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ?
|
|
488
|
+
const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ? _chunkWEW2JVA4cjs.serializeFarmLlmsTxt.call(void 0, value) : serializeManifest(value);
|
|
406
489
|
const contentType = kind === "sitemap" ? "application/xml; charset=utf-8" : kind === "robots" || kind === "llms" || kind === "llms-full" ? "text/plain; charset=utf-8" : "application/manifest+json; charset=utf-8";
|
|
407
490
|
return new Response(method === "HEAD" ? null : body, {
|
|
408
491
|
headers: {
|
|
@@ -763,7 +846,9 @@ function createFarmThemeDocumentParts(input, basePath = "/", serverTheme) {
|
|
|
763
846
|
const script = createFarmThemeBootstrapScript(config, hydrationTheme);
|
|
764
847
|
return {
|
|
765
848
|
attributes: ` data-theme="${initialTheme}"`,
|
|
766
|
-
head:
|
|
849
|
+
head: _chunk2ZYGC6SScjs.stampFarmCspNonce.call(void 0,
|
|
850
|
+
`<style id="${THEME_STYLE_ID}">:root[data-theme="light"]{color-scheme:light}:root[data-theme="dark"]{color-scheme:dark}</style><script id="${THEME_SCRIPT_ID}">${script}</script>`
|
|
851
|
+
)
|
|
767
852
|
};
|
|
768
853
|
}
|
|
769
854
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmThemeDocumentParts, "createFarmThemeDocumentParts");
|
|
@@ -912,7 +997,7 @@ function createFarmAppManifest(input, { full = false } = {}) {
|
|
|
912
997
|
const manifest = {
|
|
913
998
|
schemaVersion: 1,
|
|
914
999
|
app: {
|
|
915
|
-
farm:
|
|
1000
|
+
farm: _chunkKKSTAEMYcjs.FARM_VERSION,
|
|
916
1001
|
renderer: input.renderer,
|
|
917
1002
|
basePath: input.basePath,
|
|
918
1003
|
build: input.build
|
|
@@ -920,16 +1005,17 @@ function createFarmAppManifest(input, { full = false } = {}) {
|
|
|
920
1005
|
packages: input.packages,
|
|
921
1006
|
mcp: {
|
|
922
1007
|
servers: _chunk75RZHGLScjs._listFarmMCPCatalogs.call(void 0, ).map(({ server, tools, details }) => {
|
|
923
|
-
const
|
|
1008
|
+
const open = _optionalChain([details, 'optionalAccess', _37 => _37.public]) === true && !_optionalChain([input, 'access', _38 => _38.guardCoversPath, 'optionalCall', _39 => _39(server.path)]);
|
|
1009
|
+
const listed = full || open;
|
|
924
1010
|
return {
|
|
925
1011
|
name: server.name,
|
|
926
1012
|
version: server.version,
|
|
927
1013
|
path: server.path,
|
|
928
|
-
authorization:
|
|
929
|
-
resources: listed ? [..._nullishCoalesce(_optionalChain([details, 'optionalAccess',
|
|
930
|
-
prompts: listed ? [..._nullishCoalesce(_optionalChain([details, 'optionalAccess',
|
|
1014
|
+
authorization: open ? "none" : "required",
|
|
1015
|
+
resources: listed ? [..._nullishCoalesce(_optionalChain([details, 'optionalAccess', _40 => _40.resources]), () => ( []))] : [],
|
|
1016
|
+
prompts: listed ? [..._nullishCoalesce(_optionalChain([details, 'optionalAccess', _41 => _41.prompts]), () => ( []))] : [],
|
|
931
1017
|
tools: (listed ? tools : []).map((tool) => {
|
|
932
|
-
const schemas = _optionalChain([details, 'optionalAccess',
|
|
1018
|
+
const schemas = _optionalChain([details, 'optionalAccess', _42 => _42.schemas, 'optionalAccess', _43 => _43[tool.name]]);
|
|
933
1019
|
const hints = Object.fromEntries(
|
|
934
1020
|
["readOnlyHint", "destructiveHint", "idempotentHint", "openWorldHint"].filter((hint) => typeof tool[hint] === "boolean").map((hint) => [hint, tool[hint]])
|
|
935
1021
|
);
|
|
@@ -942,7 +1028,7 @@ function createFarmAppManifest(input, { full = false } = {}) {
|
|
|
942
1028
|
...full && tool.kind === "endpoint" ? { method: tool.method, path: tool.path } : {},
|
|
943
1029
|
...hints,
|
|
944
1030
|
...schemas ? { inputSchema: schemas.input } : {},
|
|
945
|
-
..._optionalChain([schemas, 'optionalAccess',
|
|
1031
|
+
..._optionalChain([schemas, 'optionalAccess', _44 => _44.output]) ? { outputSchema: schemas.output } : {}
|
|
946
1032
|
};
|
|
947
1033
|
})
|
|
948
1034
|
};
|
|
@@ -958,7 +1044,7 @@ function createFarmAppManifest(input, { full = false } = {}) {
|
|
|
958
1044
|
}
|
|
959
1045
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmAppManifest, "createFarmAppManifest");
|
|
960
1046
|
function listDefaultServer(input) {
|
|
961
|
-
const server = _optionalChain([input, 'access',
|
|
1047
|
+
const server = _optionalChain([input, 'access', _45 => _45.defaultMCP, 'optionalCall', _46 => _46()]);
|
|
962
1048
|
if (!server) return [];
|
|
963
1049
|
return [
|
|
964
1050
|
{
|
|
@@ -968,7 +1054,7 @@ function listDefaultServer(input) {
|
|
|
968
1054
|
authorization: "none",
|
|
969
1055
|
resources: [],
|
|
970
1056
|
prompts: [],
|
|
971
|
-
tools:
|
|
1057
|
+
tools: _chunkH5CLOUZScjs.FARM_DEFAULT_MCP_TOOLS.map((tool) => ({
|
|
972
1058
|
name: tool.name,
|
|
973
1059
|
title: tool.title,
|
|
974
1060
|
description: tool.description,
|
|
@@ -1011,7 +1097,7 @@ async function verifyFarmInfraManifestSignature(header, key, now = Date.now()) {
|
|
|
1011
1097
|
if (!header || header.length > 2048) return false;
|
|
1012
1098
|
const parts = header.split(",").map((part) => part.trim());
|
|
1013
1099
|
const timestamp = Number(
|
|
1014
|
-
_optionalChain([/^t=(\d{1,12})$/, 'access',
|
|
1100
|
+
_optionalChain([/^t=(\d{1,12})$/, 'access', _47 => _47.exec, 'call', _48 => _48(_nullishCoalesce(parts.find((part) => part.startsWith("t=")), () => ( ""))), 'optionalAccess', _49 => _49[1]])
|
|
1015
1101
|
);
|
|
1016
1102
|
if (!Number.isSafeInteger(timestamp)) return false;
|
|
1017
1103
|
if (Math.abs(now / 1e3 - timestamp) > SIGNATURE_WINDOW_SECONDS) return false;
|
|
@@ -1023,7 +1109,7 @@ ${timestamp}`);
|
|
|
1023
1109
|
}
|
|
1024
1110
|
_chunkS3JO3N4Hcjs.__name.call(void 0, verifyFarmInfraManifestSignature, "verifyFarmInfraManifestSignature");
|
|
1025
1111
|
function processEnv() {
|
|
1026
|
-
return _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
1112
|
+
return _nullishCoalesce(_optionalChain([globalThis, 'access', _50 => _50.process, 'optionalAccess', _51 => _51.env]), () => ( {}));
|
|
1027
1113
|
}
|
|
1028
1114
|
_chunkS3JO3N4Hcjs.__name.call(void 0, processEnv, "processEnv");
|
|
1029
1115
|
var CORS_HEADERS = {
|
|
@@ -1042,7 +1128,7 @@ async function createFarmAppManifestResponse(request, input, options = {}) {
|
|
|
1042
1128
|
});
|
|
1043
1129
|
}
|
|
1044
1130
|
const signature = request.headers.get(FARM_INFRA_SIGNATURE_HEADER);
|
|
1045
|
-
const key = input.analytics ? _optionalChain([(_nullishCoalesce(options.env, () => ( processEnv()))), 'access',
|
|
1131
|
+
const key = input.analytics ? _optionalChain([(_nullishCoalesce(options.env, () => ( processEnv()))), 'access', _52 => _52.FARMJS_API_KEY, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]) : void 0;
|
|
1046
1132
|
const full = Boolean(
|
|
1047
1133
|
signature && key && await verifyFarmInfraManifestSignature(signature, key)
|
|
1048
1134
|
);
|
|
@@ -1098,4 +1184,9 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmAppManifestResponse, "createFarm
|
|
|
1098
1184
|
|
|
1099
1185
|
|
|
1100
1186
|
|
|
1101
|
-
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
exports.formatRouteSegment = formatRouteSegment; exports.createRouteDirectoryPattern = createRouteDirectoryPattern; exports.stripRouteGroups = stripRouteGroups; exports.getRouteGroupScope = getRouteGroupScope; exports.isInRouteGroupScope = isInRouteGroupScope; exports.getRouteDirectoryDepth = getRouteDirectoryDepth; exports.routeBoundaryCoversDirectory = routeBoundaryCoversDirectory; exports.HOISTED_HEAD_ELEMENT = HOISTED_HEAD_ELEMENT; exports.extractFarmFullDocument = extractFarmFullDocument; exports.classifyFarmDocumentPrefix = classifyFarmDocumentPrefix; exports.removeFarmDocumentTitles = removeFarmDocumentTitles; exports.ensureFarmDocumentMeta = ensureFarmDocumentMeta; exports.composeFarmFullDocument = composeFarmFullDocument; exports.hasFarmMiddlewareConfig = hasFarmMiddlewareConfig; exports.configMiddlewareMayHandlePath = configMiddlewareMayHandlePath; exports.appMiddlewareMayHandlePath = appMiddlewareMayHandlePath; exports.farmPathGuardCoversPage = farmPathGuardCoversPage; exports.farmPathGuardCoversEndpoint = farmPathGuardCoversEndpoint; exports.renderFarmLocaleAlternateLinks = renderFarmLocaleAlternateLinks; exports.createLateRedirectRecovery = createLateRedirectRecovery; exports.createLateNotFoundRecovery = createLateNotFoundRecovery; exports.createFarmMetadataRouteResponse = createFarmMetadataRouteResponse; exports.listFarmMCPLlmsTxtLinks = listFarmMCPLlmsTxtLinks; exports.createFarmAiCatalogResponse = createFarmAiCatalogResponse; exports.resolveDefaultErrorStatus = resolveDefaultErrorStatus; exports.getDefaultErrorStatusText = getDefaultErrorStatusText; exports.createDefaultErrorMarkup = createDefaultErrorMarkup; exports.createFarmThemeDocumentParts = createFarmThemeDocumentParts; exports.applyFarmThemeDocument = applyFarmThemeDocument; exports.FARM_API_CATALOG_PATH = FARM_API_CATALOG_PATH; exports.resolveFarmApiCatalogInput = resolveFarmApiCatalogInput; exports.createFarmApiCatalogResponse = createFarmApiCatalogResponse; exports.FARM_APP_MANIFEST_PATH = FARM_APP_MANIFEST_PATH; exports.FARM_APP_MANIFEST_LEGACY_PATH = FARM_APP_MANIFEST_LEGACY_PATH; exports.isFarmAppManifestPath = isFarmAppManifestPath; exports.FARM_INFRA_SIGNATURE_HEADER = FARM_INFRA_SIGNATURE_HEADER; exports.resolveFarmAppManifestInput = resolveFarmAppManifestInput; exports.createFarmAppManifestResponse = createFarmAppManifestResponse;
|