@farming-labs/docs 0.1.47 → 0.1.48
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/cli/index.mjs
CHANGED
|
@@ -75,7 +75,7 @@ async function main() {
|
|
|
75
75
|
const { runMcp } = await import("../mcp-CYpMeMfi.mjs");
|
|
76
76
|
await runMcp(mcpOptions);
|
|
77
77
|
} else if (parsedCommand.command === "agent" && subcommand === "compact") {
|
|
78
|
-
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-
|
|
78
|
+
const { compactAgentDocs, parseAgentCompactArgs, printAgentCompactHelp } = await import("../agent-D6Fa41gs.mjs");
|
|
79
79
|
const agentCompactOptions = parseAgentCompactArgs(args.slice(2));
|
|
80
80
|
if (agentCompactOptions.help) {
|
|
81
81
|
printAgentCompactHelp();
|
|
@@ -85,7 +85,7 @@ async function main() {
|
|
|
85
85
|
} else if (parsedCommand.command === "agent") {
|
|
86
86
|
console.error(pc.red(`Unknown agent subcommand: ${subcommand ?? "(missing)"}`));
|
|
87
87
|
console.error();
|
|
88
|
-
const { printAgentCompactHelp } = await import("../agent-
|
|
88
|
+
const { printAgentCompactHelp } = await import("../agent-D6Fa41gs.mjs");
|
|
89
89
|
printAgentCompactHelp();
|
|
90
90
|
process.exit(1);
|
|
91
91
|
} else if (parsedCommand.command === "doctor") {
|
package/dist/index.d.mts
CHANGED
|
@@ -124,6 +124,10 @@ interface ResolvedReadingTimeOptions {
|
|
|
124
124
|
declare function estimateReadingTimeMinutes(content: string, wordsPerMinute?: number): number;
|
|
125
125
|
declare function resolveReadingTimeOptions(readingTime: boolean | ReadingTimeConfig | null | undefined): ResolvedReadingTimeOptions;
|
|
126
126
|
declare function resolveReadingTimeFromContent(frontmatter: Partial<PageFrontmatter> | undefined, content: string, wordsPerMinute?: number): number | null;
|
|
127
|
+
declare function resolvePageReadingTime(frontmatter: Partial<PageFrontmatter> | undefined, content: string, options?: {
|
|
128
|
+
enabledByDefault?: boolean;
|
|
129
|
+
wordsPerMinute?: number;
|
|
130
|
+
}): number | null | undefined;
|
|
127
131
|
declare function resolveReadingTimeFromSource(source: string, wordsPerMinute?: number): number | null;
|
|
128
132
|
//#endregion
|
|
129
133
|
//#region src/related.d.ts
|
|
@@ -334,4 +338,4 @@ declare function buildDocsAgentDiscoverySpec({
|
|
|
334
338
|
};
|
|
335
339
|
};
|
|
336
340
|
//#endregion
|
|
337
|
-
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsMarkdownPage, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsPathMatch, type DocsRelatedItem, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsSkillDocumentOptions, type DocsTheme, type FeedbackConfig, type FontStyle, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageTwitter, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsI18n, type ResolvedDocsRelatedLink, type SidebarComponentProps, type SidebarConfig, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, buildDocsAgentDiscoverySpec, buildDocsSearchDocuments, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, performDocsSearch, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSkillDocument, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsPath, resolveDocsSkillFormat, resolveOGImage, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveTitle };
|
|
341
|
+
export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, type DocsAgentDiscoverySpecOptions, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsAgentFeedbackDiscoveryConfig, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsLlmsDiscoveryConfig, type DocsMarkdownPage, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsPathMatch, type DocsRelatedItem, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsSkillDocumentOptions, type DocsTheme, type FeedbackConfig, type FontStyle, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageTwitter, type ReadingTimeConfig, type ResolvedChangelogConfig, type ResolvedDocsI18n, type ResolvedDocsRelatedLink, type SidebarComponentProps, type SidebarConfig, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, buildDocsAgentDiscoverySpec, buildDocsSearchDocuments, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, performDocsSearch, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSkillDocument, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsPath, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveTitle };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { _ as defineDocs, a as resolveReadingTimeOptions, c as resolveOGImage, d as resolveDocsLocale, f as resolveDocsPath, g as resolveChangelogConfig, h as deepMerge, i as resolveReadingTimeFromSource, l as resolveTitle, m as extendTheme, n as resolvePageReadingTime, o as buildPageOpenGraph, p as createTheme, r as resolveReadingTimeFromContent, s as buildPageTwitter, t as estimateReadingTimeMinutes, u as resolveDocsI18n } from "./reading-time-DCZXC6-3.mjs";
|
|
2
2
|
import { a as createSimpleSearchAdapter, c as resolveSearchRequestConfig, i as createMcpSearchAdapter, l as normalizeDocsRelated, n as createAlgoliaSearchAdapter, o as createTypesenseSearchAdapter, r as createCustomSearchAdapter, s as performDocsSearch, t as buildDocsSearchDocuments, u as renderDocsRelatedMarkdownLines } from "./search-8oEskRtz.mjs";
|
|
3
3
|
import { C as renderDocsMarkdownDocument, D as resolveDocsMarkdownRequest, E as resolveDocsLlmsTxtFormat, O as resolveDocsSkillFormat, S as normalizeDocsUrlPath, T as resolveDocsAgentMdxContent, _ as isDocsAgentDiscoveryRequest, a as DEFAULT_DOCS_API_ROUTE, b as isDocsSkillRequest, c as DEFAULT_LLMS_TXT_ROUTE, d as DEFAULT_MCP_ROUTE, f as DEFAULT_MCP_WELL_KNOWN_ROUTE, g as findDocsMarkdownPage, h as buildDocsAgentDiscoverySpec, i as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, l as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, m as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, n as DEFAULT_AGENT_SPEC_ROUTE, o as DEFAULT_LLMS_FULL_TXT_ROUTE, p as DEFAULT_SKILL_MD_ROUTE, r as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, s as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, t as DEFAULT_AGENT_FEEDBACK_ROUTE, u as DEFAULT_MCP_PUBLIC_ROUTE, v as isDocsMcpRequest, w as renderDocsSkillDocument, x as normalizeDocsPathSegment, y as isDocsPublicGetRequest } from "./agent-CbAtuZAc.mjs";
|
|
4
4
|
|
|
5
|
-
export { DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, buildDocsAgentDiscoverySpec, buildDocsSearchDocuments, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, performDocsSearch, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSkillDocument, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsPath, resolveDocsSkillFormat, resolveOGImage, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveTitle };
|
|
5
|
+
export { DEFAULT_AGENT_FEEDBACK_ROUTE, DEFAULT_AGENT_SPEC_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, DEFAULT_DOCS_API_ROUTE, DEFAULT_LLMS_FULL_TXT_ROUTE, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, DEFAULT_LLMS_TXT_ROUTE, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE, DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE, DEFAULT_SKILL_MD_ROUTE, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, buildDocsAgentDiscoverySpec, buildDocsSearchDocuments, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, estimateReadingTimeMinutes, extendTheme, findDocsMarkdownPage, isDocsAgentDiscoveryRequest, isDocsMcpRequest, isDocsPublicGetRequest, isDocsSkillRequest, normalizeDocsPathSegment, normalizeDocsRelated, normalizeDocsUrlPath, performDocsSearch, renderDocsMarkdownDocument, renderDocsRelatedMarkdownLines, renderDocsSkillDocument, resolveChangelogConfig, resolveDocsAgentMdxContent, resolveDocsI18n, resolveDocsLlmsTxtFormat, resolveDocsLocale, resolveDocsMarkdownRequest, resolveDocsPath, resolveDocsSkillFormat, resolveOGImage, resolvePageReadingTime, resolveReadingTimeFromContent, resolveReadingTimeFromSource, resolveReadingTimeOptions, resolveSearchRequestConfig, resolveTitle };
|
|
@@ -269,6 +269,9 @@ function buildPageTwitter(page, ogConfig, baseUrl) {
|
|
|
269
269
|
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/reading-time.ts
|
|
272
|
+
function hasExplicitReadingTime(frontmatter) {
|
|
273
|
+
return Object.prototype.hasOwnProperty.call(frontmatter ?? {}, "readingTime");
|
|
274
|
+
}
|
|
272
275
|
function normalizeWordsPerMinute(wordsPerMinute) {
|
|
273
276
|
if (typeof wordsPerMinute !== "number" || !Number.isFinite(wordsPerMinute)) return 220;
|
|
274
277
|
return Math.max(1, Math.floor(wordsPerMinute));
|
|
@@ -295,10 +298,14 @@ function resolveReadingTimeFromContent(frontmatter, content, wordsPerMinute) {
|
|
|
295
298
|
if (typeof pageData.readingTime === "number" && Number.isFinite(pageData.readingTime)) return Math.max(1, Math.ceil(pageData.readingTime));
|
|
296
299
|
return estimateReadingTimeMinutes(content, wordsPerMinute);
|
|
297
300
|
}
|
|
301
|
+
function resolvePageReadingTime(frontmatter, content, options) {
|
|
302
|
+
if (!(options?.enabledByDefault ?? false) && !hasExplicitReadingTime(frontmatter)) return;
|
|
303
|
+
return resolveReadingTimeFromContent(frontmatter, content, options?.wordsPerMinute);
|
|
304
|
+
}
|
|
298
305
|
function resolveReadingTimeFromSource(source, wordsPerMinute) {
|
|
299
306
|
const { data, content } = matter(source);
|
|
300
307
|
return resolveReadingTimeFromContent(data, content, wordsPerMinute);
|
|
301
308
|
}
|
|
302
309
|
|
|
303
310
|
//#endregion
|
|
304
|
-
export {
|
|
311
|
+
export { defineDocs as _, resolveReadingTimeOptions as a, resolveOGImage as c, resolveDocsLocale as d, resolveDocsPath as f, resolveChangelogConfig as g, deepMerge as h, resolveReadingTimeFromSource as i, resolveTitle as l, extendTheme as m, resolvePageReadingTime as n, buildPageOpenGraph as o, createTheme as p, resolveReadingTimeFromContent as r, buildPageTwitter as s, estimateReadingTimeMinutes as t, resolveDocsI18n as u };
|