@farming-labs/next 0.1.38 → 0.1.41
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/config.mjs +18 -1
- package/package.json +3 -3
package/dist/config.mjs
CHANGED
|
@@ -157,6 +157,8 @@ const DEFAULT_LLMS_TXT_ROUTE = "/llms.txt";
|
|
|
157
157
|
const DEFAULT_LLMS_FULL_TXT_ROUTE = "/llms-full.txt";
|
|
158
158
|
const DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms.txt";
|
|
159
159
|
const DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms-full.txt";
|
|
160
|
+
const DEFAULT_SKILL_MD_ROUTE = "/skill.md";
|
|
161
|
+
const DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE = "/.well-known/skill.md";
|
|
160
162
|
const MARKDOWN_ACCEPT_HEADER_VALUE = [
|
|
161
163
|
"(?:^|.*,\\s*)",
|
|
162
164
|
"text/markdown",
|
|
@@ -774,6 +776,15 @@ function buildLlmsTxtRewrites() {
|
|
|
774
776
|
}
|
|
775
777
|
];
|
|
776
778
|
}
|
|
779
|
+
function buildSkillMdRewrites() {
|
|
780
|
+
return [{
|
|
781
|
+
source: DEFAULT_SKILL_MD_ROUTE,
|
|
782
|
+
destination: "/api/docs?format=skill"
|
|
783
|
+
}, {
|
|
784
|
+
source: DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE,
|
|
785
|
+
destination: "/api/docs?format=skill"
|
|
786
|
+
}];
|
|
787
|
+
}
|
|
777
788
|
function buildMcpRewrites(config) {
|
|
778
789
|
if (!config.enabled) return [];
|
|
779
790
|
return [DEFAULT_MCP_PUBLIC_ROUTE, DEFAULT_MCP_WELL_KNOWN_ROUTE].filter((source) => source !== config.route).map((source) => ({
|
|
@@ -807,6 +818,7 @@ function mergeDocsMarkdownRewrites(entry, mcp, agentFeedback, result) {
|
|
|
807
818
|
...buildAgentSpecRewrites(),
|
|
808
819
|
...buildMcpRewrites(mcp),
|
|
809
820
|
...buildLlmsTxtRewrites(),
|
|
821
|
+
...buildSkillMdRewrites(),
|
|
810
822
|
...buildDocsMarkdownRewrites(entry),
|
|
811
823
|
...buildAgentFeedbackRewrites(agentFeedback)
|
|
812
824
|
];
|
|
@@ -993,6 +1005,7 @@ function withDocs(nextConfig = {}) {
|
|
|
993
1005
|
};
|
|
994
1006
|
const existingTracingIncludes = nextConfig.outputFileTracingIncludes ?? {};
|
|
995
1007
|
const docsTraceGlob = docsContentDir.replace(/\\/g, "/").replace(/^\.?\//, "") + "/**/*";
|
|
1008
|
+
const skillTraceFile = "skill.md";
|
|
996
1009
|
if (!isStaticExport) {
|
|
997
1010
|
const existingRewrites = nextConfig.rewrites;
|
|
998
1011
|
nextConfig.rewrites = async () => {
|
|
@@ -1001,7 +1014,11 @@ function withDocs(nextConfig = {}) {
|
|
|
1001
1014
|
}
|
|
1002
1015
|
nextConfig.outputFileTracingIncludes = {
|
|
1003
1016
|
...existingTracingIncludes,
|
|
1004
|
-
"/api/docs": [...new Set([
|
|
1017
|
+
"/api/docs": [...new Set([
|
|
1018
|
+
...existingTracingIncludes["/api/docs"] ?? [],
|
|
1019
|
+
docsTraceGlob,
|
|
1020
|
+
skillTraceFile
|
|
1021
|
+
])],
|
|
1005
1022
|
[DEFAULT_MCP_ROUTE]: [...new Set([...existingTracingIncludes[DEFAULT_MCP_ROUTE] ?? [], docsTraceGlob])]
|
|
1006
1023
|
};
|
|
1007
1024
|
return withMDX(nextConfig);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"tsdown": "^0.20.3",
|
|
96
96
|
"typescript": "^5.9.3",
|
|
97
97
|
"vitest": "^3.2.4",
|
|
98
|
-
"@farming-labs/docs": "0.1.
|
|
99
|
-
"@farming-labs/theme": "0.1.
|
|
98
|
+
"@farming-labs/docs": "0.1.41",
|
|
99
|
+
"@farming-labs/theme": "0.1.41"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@farming-labs/docs": ">=0.0.1",
|