@farm.js/core 0.1.63 → 0.1.64
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-OV4WRFBL.cjs → agent-mcp-handler-OXT73ZBY.cjs} +5 -5
- package/dist/{agent-mcp-handler-7QMX2LUY.mjs → agent-mcp-handler-QLFDDTYN.mjs} +4 -4
- package/dist/{agent-mcp.d-CCQ-wKwg.d.mts → agent-mcp.d-CO_ABmNK.d.mts} +1 -1
- package/dist/{agent-mcp.d-DOJCBSh9.d.ts → agent-mcp.d-QD2WZ9BS.d.ts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/analyzer-ODLF2Z6O.cjs +16 -0
- package/dist/{analyzer-WNPQPWFR.mjs → analyzer-Q3QXC6PD.mjs} +3 -2
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/{app-manifest.d-BaA0omsv.d.mts → app-manifest.d-BpKxiU_E.d.mts} +1 -1
- package/dist/{app-manifest.d-poayV4lq.d.ts → app-manifest.d-DDmNkYQQ.d.ts} +1 -1
- 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/{app.d-DdWxeIGU.d.mts → app.d-kuoVWhWM.d.mts} +4 -4
- package/dist/{app.d-D4Dn03E3.d.ts → app.d-x68Cwr0_.d.ts} +4 -4
- package/dist/{chunk-LT4VAF5Z.cjs → chunk-2C5L5RPM.cjs} +7 -6
- package/dist/{chunk-PVJX4UPA.cjs → chunk-3EBHJET2.cjs} +103 -98
- package/dist/{chunk-4DIKLG56.mjs → chunk-6NHSGVVA.mjs} +1 -1
- package/dist/{chunk-S2NUYHRY.mjs → chunk-6NNYPY5W.mjs} +327 -13
- package/dist/{chunk-PRFNLQSP.cjs → chunk-7XGWBPQQ.cjs} +4 -4
- package/dist/{chunk-U6WCUVSV.cjs → chunk-DUSHDZQL.cjs} +9 -9
- package/dist/{chunk-GVOMPU3Y.cjs → chunk-EL4364S2.cjs} +209 -32
- package/dist/{chunk-QN5WRQSQ.cjs → chunk-FAP7CX7C.cjs} +101 -101
- package/dist/{chunk-GPKBUME5.mjs → chunk-FH45OB37.mjs} +2 -2
- package/dist/{chunk-55U5QIXQ.mjs → chunk-FIR62CR3.mjs} +1 -1
- package/dist/{chunk-MEQN6DDA.cjs → chunk-FJWN7RV4.cjs} +5 -5
- package/dist/chunk-IOEXXZK3.mjs +88 -0
- package/dist/{chunk-Z74NNER4.cjs → chunk-JCPSA4X5.cjs} +135 -134
- package/dist/{chunk-YSXTNSXS.mjs → chunk-K7OZAVOI.mjs} +7 -6
- package/dist/{chunk-KVW2M6PI.mjs → chunk-KL7SHLQB.mjs} +1 -1
- package/dist/{chunk-RFYL5OLP.mjs → chunk-LQDLEWPO.mjs} +1 -1
- package/dist/{chunk-UZZ6IEQP.mjs → chunk-MESQF2JC.mjs} +2 -2
- package/dist/{chunk-5L7I6AMY.cjs → chunk-MG356ROI.cjs} +5 -5
- package/dist/{chunk-Y2YBNQ3D.cjs → chunk-N3Z3PLHC.cjs} +2 -2
- package/dist/{chunk-XICXQXYE.mjs → chunk-NNLFW3P4.mjs} +2 -2
- package/dist/{chunk-EYLC6GD6.cjs → chunk-NXFA7G3Y.cjs} +12 -12
- package/dist/{chunk-FNHN3RBD.cjs → chunk-O2XFIPNL.cjs} +1 -1
- package/dist/{chunk-BA2IA32Q.mjs → chunk-O4FWNLQK.mjs} +3 -3
- package/dist/{chunk-DZPR2W6U.cjs → chunk-O6L3YYPM.cjs} +5 -5
- package/dist/{chunk-LFFSDZ4Y.cjs → chunk-O7IEMY55.cjs} +3 -3
- package/dist/{chunk-6BJJYOFL.cjs → chunk-OLIGNTWU.cjs} +7 -7
- package/dist/{chunk-EENTT56C.mjs → chunk-OYF23QLG.mjs} +15 -14
- package/dist/{chunk-CBDRR3J3.mjs → chunk-RAH5MT53.mjs} +19 -14
- package/dist/{chunk-E72UD6ME.mjs → chunk-RVGSVQWT.mjs} +1 -1
- package/dist/{chunk-5IKQ7BIR.cjs → chunk-S25BQIFW.cjs} +16 -16
- package/dist/{chunk-LWWDTBGL.cjs → chunk-S7ZW72JH.cjs} +2 -2
- package/dist/{chunk-7FFW7DC4.mjs → chunk-SLYDIHLW.mjs} +4 -4
- package/dist/{chunk-LA6O5EL2.mjs → chunk-SNFTMSHX.mjs} +1 -1
- package/dist/{chunk-PCXIJKPM.mjs → chunk-TNBJ4LZG.mjs} +2 -2
- package/dist/{chunk-O27PLNQZ.cjs → chunk-UJ3R2AH2.cjs} +4 -4
- package/dist/{chunk-T4TBK5NY.mjs → chunk-VQ4NWOWO.mjs} +2 -2
- package/dist/{chunk-ZZ2QKCKW.mjs → chunk-WAY6LOQH.mjs} +1 -1
- package/dist/chunk-WBTHHTBO.cjs +88 -0
- package/dist/{chunk-O5FCWI6O.mjs → chunk-WFNAOWH4.mjs} +1 -1
- package/dist/{chunk-IWRLV46X.cjs → chunk-WMTBBQHY.cjs} +4 -4
- package/dist/{chunk-LA45FN37.mjs → chunk-WNYRYI4D.mjs} +10 -10
- package/dist/{chunk-CI4UNQHO.cjs → chunk-XBSKPLHF.cjs} +2 -2
- package/dist/{chunk-IOF4KXMP.mjs → chunk-XVWSDSUM.mjs} +201 -24
- package/dist/{chunk-ANXU3D32.cjs → chunk-XZLZ6YPP.cjs} +346 -32
- package/dist/{chunk-QAS7KE7J.cjs → chunk-Y5TOT5F6.cjs} +5 -5
- package/dist/{chunk-DPE53XWL.mjs → chunk-ZEXE4TGY.mjs} +1 -1
- package/dist/{client-component.d-CSEFlHfG.d.mts → client-component.d-D74pqdea.d.mts} +2 -2
- package/dist/{client-component.d-CQLvqLAJ.d.ts → client-component.d-D8VcypQA.d.ts} +2 -2
- package/dist/{client-plugins.d-BgPUYPc9.d.ts → client-plugins.d-CXElzotB.d.ts} +8 -1
- package/dist/{client-plugins.d-BTF0gZm4.d.mts → client-plugins.d-D4-6hNx7.d.mts} +8 -1
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.d.mts +6 -6
- package/dist/client.d.ts +6 -6
- 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-HDKTYIZF.mjs → devtools-MX3FE733.mjs} +4 -4
- package/dist/{devtools-ZHN5JLVI.cjs → devtools-WET5NAKO.cjs} +5 -5
- package/dist/docs.cjs +7 -7
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +6 -6
- package/dist/index.cjs +20 -19
- package/dist/{index.d-Coow7bD4.d.ts → index.d-A_x10zGS.d.ts} +1 -1
- package/dist/{index.d-Dbjx0ku7.d.mts → index.d-SSgYDv4D.d.mts} +1 -1
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.mjs +19 -18
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -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 +21 -20
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +20 -19
- package/dist/internal/cli-runtime.cjs +6 -6
- package/dist/internal/cli-runtime.mjs +5 -5
- 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 +4 -4
- package/dist/internal/client-runtime.d.ts +4 -4
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.d.mts +4 -4
- package/dist/internal/config-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +9 -9
- package/dist/internal/infra-analytics-runtime.mjs +7 -7
- package/dist/internal/native-server-fns.cjs +5 -4
- package/dist/internal/native-server-fns.mjs +4 -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 +11 -11
- package/dist/internal/production-runtime.d.mts +13 -12
- package/dist/internal/production-runtime.d.ts +13 -12
- package/dist/internal/production-runtime.mjs +10 -10
- 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 +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/mobile.d.mts +2 -2
- package/dist/mobile.d.ts +2 -2
- package/dist/{native-tree-AS5L3ID3.mjs → native-tree-BPEE2LAL.mjs} +2 -2
- package/dist/{native-tree-Z2WYUJEV.cjs → native-tree-WOX3JMBG.cjs} +3 -3
- package/dist/{navigation-delegate.d-Ca_BV0Wu.d.mts → navigation-delegate.d-DQVYKoaZ.d.mts} +1 -1
- package/dist/{navigation-delegate.d-aHiPI6GL.d.ts → navigation-delegate.d-GghbHJuK.d.ts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/plugin.cjs +13 -13
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +12 -12
- package/dist/{production-runtime.d-C0rF7a10.d.ts → production-runtime.d-Bzns3NW9.d.ts} +1 -1
- package/dist/{production-runtime.d-CnAsSWgF.d.mts → production-runtime.d-DiFa5vHW.d.mts} +1 -1
- package/dist/{render-plan.d-BxeITFT1.d.ts → render-plan.d-CL_Ikfg_.d.ts} +1 -1
- package/dist/{render-plan.d-Z-93m5GZ.d.mts → render-plan.d-CcF0MeCf.d.mts} +1 -1
- package/dist/renderer-client.d.mts +4 -4
- package/dist/renderer-client.d.ts +4 -4
- package/dist/{request.d-X7Q1vmGF.d.ts → request.d-B1RnTLri.d.ts} +1 -1
- package/dist/{request.d-8_fMFNEb.d.mts → request.d-DarDOCk9.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-BUr3Jp8S.d.ts → route-rendering.d-BTUYCIj4.d.ts} +1 -1
- package/dist/{route-rendering.d-BInmBmul.d.mts → route-rendering.d-D_2Ual0-.d.mts} +1 -1
- package/dist/{router.d-crorSRiW.d.ts → router.d-CMANF6da.d.ts} +1 -1
- package/dist/{router.d-CZQmbpHx.d.mts → router.d-Cuv1jntg.d.mts} +1 -1
- package/dist/{routes.d-BknKQcTu.d.ts → routes.d-B6yFe6jm.d.ts} +1 -1
- package/dist/{routes.d-D1IrO9KK.d.mts → routes.d-c2HKfrfL.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-3MPRULGA.mjs → rsc-pipeline-3LNVP2OO.mjs} +5 -5
- package/dist/{rsc-pipeline-RHEZNBFQ.cjs → rsc-pipeline-G5WELVW3.cjs} +6 -6
- package/dist/{runtime-OZKFZQCU.cjs → runtime-DMEULPE7.cjs} +21 -10
- package/dist/{runtime-X5UR7VHP.mjs → runtime-HQJ2LLQL.mjs} +19 -8
- package/dist/{runtime.d-CCsjTZJW.d.ts → runtime.d-C3RQUj6_.d.ts} +1 -1
- package/dist/{runtime.d-CETtpLb-.d.mts → runtime.d-wvh4ngU0.d.mts} +1 -1
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server.cjs +30 -30
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +15 -15
- package/dist/{spa-router.d-CtSHzXlC.d.mts → spa-router.d-WU_qS5gJ.d.mts} +2 -2
- package/dist/{spa-router.d-CCADbSqJ.d.ts → spa-router.d-m8H_Kl_B.d.ts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{utils.d-CjyE-npA.d.ts → utils.d-C9dQD5Zg.d.ts} +1 -1
- package/dist/{utils.d-zFPHKFFJ.d.mts → utils.d-W9IiEqmW.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +13 -13
- package/dist/vite.d.mts +4 -4
- package/dist/vite.d.ts +4 -4
- package/dist/vite.mjs +12 -12
- package/package.json +1 -1
- package/dist/analyzer-KEA5JVDR.cjs +0 -15
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
loadFarmDocsPage,
|
|
6
6
|
resolveFarmDocsContentDir,
|
|
7
7
|
toFarmDocsMarkdownPage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZEXE4TGY.mjs";
|
|
9
9
|
import {
|
|
10
10
|
docsEngine,
|
|
11
11
|
loadFarmDocsEngine
|
|
12
12
|
} from "./chunk-VE3FWJBO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
resolveDocsConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-O4FWNLQK.mjs";
|
|
16
16
|
import {
|
|
17
17
|
getFarmDocsAdapterConfigModule,
|
|
18
18
|
isSecretDocsConfigKey
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -59,12 +59,12 @@ function collectFarmLlmsTxtPages(sources, options) {
|
|
|
59
59
|
for (const source of sources) {
|
|
60
60
|
const path = source.pattern;
|
|
61
61
|
if (path.includes("[") || pages.has(path)) continue;
|
|
62
|
-
if (include.length && !include.some((pattern) =>
|
|
62
|
+
if (include.length && !include.some((pattern) => _chunk2C5L5RPMcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
63
63
|
continue;
|
|
64
64
|
}
|
|
65
|
-
if (exclude.some((pattern) =>
|
|
65
|
+
if (exclude.some((pattern) => _chunk2C5L5RPMcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
66
66
|
if (isFarmMetadataNoIndex(source.metadata)) continue;
|
|
67
|
-
const target =
|
|
67
|
+
const target = _chunk2C5L5RPMcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? _chunk2C5L5RPMcjs.getFarmMarkdownMirrorPath.call(void 0, path) : path;
|
|
68
68
|
const description = readMetadataString(source.metadata, "description");
|
|
69
69
|
pages.set(path, {
|
|
70
70
|
path,
|
|
@@ -155,7 +155,7 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
155
155
|
try {
|
|
156
156
|
const response = await fetchMarkdown(
|
|
157
157
|
new Request(url, {
|
|
158
|
-
headers: { accept: "text/markdown", [
|
|
158
|
+
headers: { accept: "text/markdown", [_chunk2C5L5RPMcjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
|
|
159
159
|
})
|
|
160
160
|
);
|
|
161
161
|
const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/mobile/component-blocks.ts
|
|
2
|
+
function farmComponentKind(file) {
|
|
3
|
+
return file.endsWith(".vue") ? "vue" : file.endsWith(".svelte") ? "svelte" : void 0;
|
|
4
|
+
}
|
|
5
|
+
function readAttributes(text) {
|
|
6
|
+
const attributes = {};
|
|
7
|
+
for (const match of text.matchAll(
|
|
8
|
+
/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g
|
|
9
|
+
)) {
|
|
10
|
+
attributes[match[1].toLowerCase()] = match[2] ?? match[3] ?? match[4] ?? true;
|
|
11
|
+
}
|
|
12
|
+
return attributes;
|
|
13
|
+
}
|
|
14
|
+
function readFarmComponentBlocks(file, source) {
|
|
15
|
+
const kind = farmComponentKind(file);
|
|
16
|
+
if (!kind) throw new TypeError(`${file} is not a .vue or .svelte component`);
|
|
17
|
+
const scripts = [];
|
|
18
|
+
const styles = [];
|
|
19
|
+
const taken = [];
|
|
20
|
+
for (const name of ["script", "style"]) {
|
|
21
|
+
const open = new RegExp(`<${name}\\b((?:[^>"']|"[^"]*"|'[^']*')*)>`, "gi");
|
|
22
|
+
let match;
|
|
23
|
+
while (match = open.exec(source)) {
|
|
24
|
+
const start = match.index + match[0].length;
|
|
25
|
+
const close = source.toLowerCase().indexOf(`</${name}>`, start);
|
|
26
|
+
const end = close === -1 ? source.length : close;
|
|
27
|
+
(name === "script" ? scripts : styles).push({
|
|
28
|
+
start,
|
|
29
|
+
end,
|
|
30
|
+
attributes: readAttributes(match[1] ?? "")
|
|
31
|
+
});
|
|
32
|
+
taken.push({ start: match.index, end: close === -1 ? end : close + name.length + 3 });
|
|
33
|
+
open.lastIndex = end;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
taken.sort((left, right) => left.start - right.start);
|
|
37
|
+
const markup = [];
|
|
38
|
+
if (kind === "svelte") {
|
|
39
|
+
let cursor = 0;
|
|
40
|
+
for (const range of taken) {
|
|
41
|
+
if (range.start > cursor) markup.push({ start: cursor, end: range.start });
|
|
42
|
+
cursor = Math.max(cursor, range.end);
|
|
43
|
+
}
|
|
44
|
+
if (cursor < source.length) markup.push({ start: cursor, end: source.length });
|
|
45
|
+
} else {
|
|
46
|
+
const tag = /<(\/?)template\b(?:[^>"']|"[^"]*"|'[^']*')*?(\/?)>/gi;
|
|
47
|
+
let depth = 0;
|
|
48
|
+
let start = -1;
|
|
49
|
+
let match;
|
|
50
|
+
while (match = tag.exec(source)) {
|
|
51
|
+
if (taken.some((range) => match.index >= range.start && match.index < range.end)) continue;
|
|
52
|
+
if (match[2]) continue;
|
|
53
|
+
if (!match[1]) {
|
|
54
|
+
if (depth === 0) start = match.index + match[0].length;
|
|
55
|
+
depth += 1;
|
|
56
|
+
} else if (depth > 0) {
|
|
57
|
+
depth -= 1;
|
|
58
|
+
if (depth === 0) {
|
|
59
|
+
markup.push({ start, end: match.index });
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return { kind, scripts, styles, markup };
|
|
66
|
+
}
|
|
67
|
+
function keepFarmComponentRanges(source, ranges) {
|
|
68
|
+
let out = "";
|
|
69
|
+
let cursor = 0;
|
|
70
|
+
const blank = (text) => text.replace(/[^\n]/g, " ");
|
|
71
|
+
for (const range of [...ranges].sort((left, right) => left.start - right.start)) {
|
|
72
|
+
out += blank(source.slice(cursor, range.start)) + source.slice(range.start, range.end);
|
|
73
|
+
cursor = range.end;
|
|
74
|
+
}
|
|
75
|
+
return out + blank(source.slice(cursor));
|
|
76
|
+
}
|
|
77
|
+
function farmComponentModuleScripts(blocks) {
|
|
78
|
+
return blocks.scripts.filter(
|
|
79
|
+
(script) => blocks.kind === "vue" ? script.attributes.setup === void 0 : script.attributes.module !== void 0 || script.attributes.context === "module"
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
farmComponentKind,
|
|
85
|
+
readFarmComponentBlocks,
|
|
86
|
+
keepFarmComponentRanges,
|
|
87
|
+
farmComponentModuleScripts
|
|
88
|
+
};
|