@farming-labs/next 0.2.128 → 0.2.130
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/api.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
3
|
import { createDocsAPI as createDocsAPI$1, createDocsMCPAPI as createDocsMCPAPI$1 } from "@farming-labs/theme/api";
|
|
4
|
-
import { bundledAgentSkills, bundledRootDocuments } from "@farming-labs/docs/agent-skills-bundle";
|
|
4
|
+
import { bundledAgentSkills, bundledAppVersion, bundledRootDocuments } from "@farming-labs/docs/agent-skills-bundle";
|
|
5
5
|
import { createDocsCloudRouteHandler } from "@farming-labs/docs/cloud/server";
|
|
6
6
|
|
|
7
7
|
//#region src/api.ts
|
|
@@ -118,7 +118,8 @@ function createDocsAPI(options = {}, cloudIntegration) {
|
|
|
118
118
|
...options,
|
|
119
119
|
...rootDir ? { rootDir } : {},
|
|
120
120
|
_preloadedAgentSkills: options._preloadedAgentSkills ?? bundledAgentSkills,
|
|
121
|
-
_preloadedRootDocuments: options._preloadedRootDocuments ?? bundledRootDocuments
|
|
121
|
+
_preloadedRootDocuments: options._preloadedRootDocuments ?? bundledRootDocuments,
|
|
122
|
+
_preloadedAppVersion: options._preloadedAppVersion ?? bundledAppVersion
|
|
122
123
|
});
|
|
123
124
|
const integration = resolveDocsCloudIntegration(cloudIntegration);
|
|
124
125
|
if (!integration) return handlers;
|
|
@@ -148,7 +149,8 @@ function createDocsMCPAPI(options = {}) {
|
|
|
148
149
|
...options,
|
|
149
150
|
...rootDir ? { rootDir } : {},
|
|
150
151
|
_preloadedAgentSkills: options._preloadedAgentSkills ?? bundledAgentSkills,
|
|
151
|
-
_preloadedRootDocuments: options._preloadedRootDocuments ?? bundledRootDocuments
|
|
152
|
+
_preloadedRootDocuments: options._preloadedRootDocuments ?? bundledRootDocuments,
|
|
153
|
+
_preloadedAppVersion: options._preloadedAppVersion ?? bundledAppVersion
|
|
152
154
|
});
|
|
153
155
|
}
|
|
154
156
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, extname, isAbsolute, join, relative } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { DEFAULT_A2A_AGENT_CARD_ROUTE, DEFAULT_AGENT_SKILLS_INDEX_ROUTE, DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, DEFAULT_AGENT_SKILL_ARCHIVE_FORMAT, DEFAULT_API_CATALOG_ROUTE, DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, ensureDocsReviewWorkflow, renderDocsAgentSkillsBundle, resolveConfiguredAgentSkillsSync } from "@farming-labs/docs/build";
|
|
4
|
+
import { DEFAULT_A2A_AGENT_CARD_ROUTE, DEFAULT_AGENT_SKILLS_INDEX_ROUTE, DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, DEFAULT_AGENT_SKILL_ARCHIVE_FORMAT, DEFAULT_API_CATALOG_ROUTE, DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN, ensureDocsReviewWorkflow, readDocsAppVersion, renderDocsAgentSkillsBundle, resolveConfiguredAgentSkillsSync } from "@farming-labs/docs/build";
|
|
5
5
|
import matter from "gray-matter";
|
|
6
6
|
import { parse } from "@babel/parser";
|
|
7
7
|
import createMDX from "@next/mdx";
|
|
@@ -778,7 +778,7 @@ function readRootDocumentsSnapshot(root) {
|
|
|
778
778
|
}
|
|
779
779
|
function writeAgentSkillsBundle(root, configuredSkills) {
|
|
780
780
|
const bundlePath = join(root, AGENT_SKILLS_BUNDLE_PATH);
|
|
781
|
-
const source = `${GENERATED_BANNER}${renderDocsAgentSkillsBundle(resolveConfiguredAgentSkillsSync(configuredSkills, { rootDir: root }), readRootDocumentsSnapshot(root))}`;
|
|
781
|
+
const source = `${GENERATED_BANNER}${renderDocsAgentSkillsBundle(resolveConfiguredAgentSkillsSync(configuredSkills, { rootDir: root }), readRootDocumentsSnapshot(root), readDocsAppVersion(root))}`;
|
|
782
782
|
makeGeneratedDir(dirname(bundlePath));
|
|
783
783
|
if (!existsSync(bundlePath) || readFileSync(bundlePath, "utf8") !== source) writeGeneratedFile(bundlePath, source);
|
|
784
784
|
return bundlePath;
|
package/dist/config.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as withDocs } from "./config-
|
|
1
|
+
import { t as withDocs } from "./config-P11Zy8qf.mjs";
|
|
2
2
|
import { createDocsAPI, createDocsMCPAPI } from "./api.mjs";
|
|
3
3
|
import { a as withNextApiReferenceBanner } from "./api-reference-banner-q98BnSRL.mjs";
|
|
4
4
|
import { buildNextOpenApiDocument, createNextApiReference, createNextApiReferenceLayout, createNextApiReferencePage, getNextApiReferenceMode, getNextApiReferenceSourceState, resolveApiReferenceConfig } from "./api-reference.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.130",
|
|
4
4
|
"description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
"tsdown": "^0.20.3",
|
|
115
115
|
"typescript": "^5.9.3",
|
|
116
116
|
"vitest": "^4.1.8",
|
|
117
|
-
"@farming-labs/
|
|
118
|
-
"@farming-labs/
|
|
117
|
+
"@farming-labs/theme": "0.2.130",
|
|
118
|
+
"@farming-labs/docs": "0.2.130"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"@farming-labs/docs": ">=0.2.121",
|