@farming-labs/next 0.1.128 → 0.1.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-reference.d.mts +1 -1
- package/dist/changelog.d.mts +6 -6
- package/dist/changelog.mjs +1 -1
- package/dist/config.mjs +64 -0
- package/dist/layout.d.mts +1 -1
- package/package.json +3 -3
package/dist/api-reference.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DocsConfig } from "@farming-labs/docs";
|
|
1
2
|
import { resolveApiReferenceConfig } from "@farming-labs/docs/server";
|
|
2
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { DocsConfig } from "@farming-labs/docs";
|
|
4
4
|
|
|
5
5
|
//#region src/api-reference.d.ts
|
|
6
6
|
interface NextApiReferenceSourceState {
|
package/dist/changelog.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ChangelogFrontmatter } from "@farming-labs/docs";
|
|
1
2
|
import { ComponentType } from "react";
|
|
2
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
-
import { DocsConfig } from "@farming-labs/theme";
|
|
4
|
-
import { ChangelogFrontmatter } from "@farming-labs/docs";
|
|
4
|
+
import { DocsConfig as DocsConfig$1 } from "@farming-labs/theme";
|
|
5
5
|
import { Metadata } from "next";
|
|
6
6
|
|
|
7
7
|
//#region src/changelog.d.ts
|
|
@@ -13,8 +13,8 @@ interface GeneratedChangelogEntry {
|
|
|
13
13
|
Component: ComponentType;
|
|
14
14
|
metadata?: ChangelogFrontmatter;
|
|
15
15
|
}
|
|
16
|
-
declare function createNextChangelogIndexPage(config: DocsConfig, entries: GeneratedChangelogEntry[]): () => react_jsx_runtime0.JSX.Element;
|
|
17
|
-
declare function createNextChangelogEntryPage(config: DocsConfig, entries: GeneratedChangelogEntry[]): (props: {
|
|
16
|
+
declare function createNextChangelogIndexPage(config: DocsConfig$1, entries: GeneratedChangelogEntry[]): () => react_jsx_runtime0.JSX.Element;
|
|
17
|
+
declare function createNextChangelogEntryPage(config: DocsConfig$1, entries: GeneratedChangelogEntry[]): (props: {
|
|
18
18
|
params?: Promise<{
|
|
19
19
|
slug?: string;
|
|
20
20
|
}> | {
|
|
@@ -24,8 +24,8 @@ declare function createNextChangelogEntryPage(config: DocsConfig, entries: Gener
|
|
|
24
24
|
declare function createNextChangelogStaticParams(entries: GeneratedChangelogEntry[]): () => {
|
|
25
25
|
slug: string;
|
|
26
26
|
}[];
|
|
27
|
-
declare function createNextChangelogIndexMetadata(config: DocsConfig): Metadata;
|
|
28
|
-
declare function createNextChangelogEntryMetadata(config: DocsConfig, entries: GeneratedChangelogEntry[]): (props: {
|
|
27
|
+
declare function createNextChangelogIndexMetadata(config: DocsConfig$1): Metadata;
|
|
28
|
+
declare function createNextChangelogEntryMetadata(config: DocsConfig$1, entries: GeneratedChangelogEntry[]): (props: {
|
|
29
29
|
params?: Promise<{
|
|
30
30
|
slug?: string;
|
|
31
31
|
}> | {
|
package/dist/changelog.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChangelogDirectory, ChangelogTOC } from "./changelog-rail-search.mjs";
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
+
import { resolveChangelogConfig } from "@farming-labs/docs";
|
|
4
5
|
import Link from "next/link";
|
|
5
6
|
import { notFound } from "next/navigation";
|
|
6
7
|
import { createElement, isValidElement } from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { createPageMetadata } from "@farming-labs/theme";
|
|
9
|
-
import { resolveChangelogConfig } from "@farming-labs/docs";
|
|
10
10
|
|
|
11
11
|
//#region src/changelog.tsx
|
|
12
12
|
function formatDisplayDate(value) {
|
package/dist/config.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, isAbsolute, join, relative } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN } from "@farming-labs/docs";
|
|
4
5
|
import { ensureDocsReviewWorkflow } from "@farming-labs/docs/server";
|
|
5
6
|
import matter from "gray-matter";
|
|
6
7
|
import createMDX from "@next/mdx";
|
|
@@ -1000,6 +1001,25 @@ function buildDocsMarkdownRewrites(entry, docsPath) {
|
|
|
1000
1001
|
key: "signature-agent",
|
|
1001
1002
|
value: ".+"
|
|
1002
1003
|
};
|
|
1004
|
+
const markdownAgentUserAgentHeader = {
|
|
1005
|
+
type: "header",
|
|
1006
|
+
key: "user-agent",
|
|
1007
|
+
value: DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN
|
|
1008
|
+
};
|
|
1009
|
+
const markdownBotLikeUserAgentHeader = {
|
|
1010
|
+
type: "header",
|
|
1011
|
+
key: "user-agent",
|
|
1012
|
+
value: DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN
|
|
1013
|
+
};
|
|
1014
|
+
const markdownTraditionalBotUserAgentHeader = {
|
|
1015
|
+
type: "header",
|
|
1016
|
+
key: "user-agent",
|
|
1017
|
+
value: DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN
|
|
1018
|
+
};
|
|
1019
|
+
const markdownSecFetchModeHeader = {
|
|
1020
|
+
type: "header",
|
|
1021
|
+
key: "sec-fetch-mode"
|
|
1022
|
+
};
|
|
1003
1023
|
if (publicBase === "") {
|
|
1004
1024
|
const rootPageSource = docsRootSource(normalizedEntry);
|
|
1005
1025
|
return [
|
|
@@ -1030,6 +1050,28 @@ function buildDocsMarkdownRewrites(entry, docsPath) {
|
|
|
1030
1050
|
source: rootPageSource,
|
|
1031
1051
|
has: [markdownSignatureAgentHeader],
|
|
1032
1052
|
destination: "/api/docs?format=markdown&path=:slug"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
source: "/",
|
|
1056
|
+
has: [markdownAgentUserAgentHeader],
|
|
1057
|
+
destination: "/api/docs?format=markdown"
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
source: rootPageSource,
|
|
1061
|
+
has: [markdownAgentUserAgentHeader],
|
|
1062
|
+
destination: "/api/docs?format=markdown&path=:slug"
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
source: "/",
|
|
1066
|
+
has: [markdownBotLikeUserAgentHeader],
|
|
1067
|
+
missing: [markdownTraditionalBotUserAgentHeader, markdownSecFetchModeHeader],
|
|
1068
|
+
destination: "/api/docs?format=markdown"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
source: rootPageSource,
|
|
1072
|
+
has: [markdownBotLikeUserAgentHeader],
|
|
1073
|
+
missing: [markdownTraditionalBotUserAgentHeader, markdownSecFetchModeHeader],
|
|
1074
|
+
destination: "/api/docs?format=markdown&path=:slug"
|
|
1033
1075
|
}
|
|
1034
1076
|
];
|
|
1035
1077
|
}
|
|
@@ -1061,6 +1103,28 @@ function buildDocsMarkdownRewrites(entry, docsPath) {
|
|
|
1061
1103
|
source: `${publicBase}/:slug*`,
|
|
1062
1104
|
has: [markdownSignatureAgentHeader],
|
|
1063
1105
|
destination: "/api/docs?format=markdown&path=:slug*"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
source: publicBase,
|
|
1109
|
+
has: [markdownAgentUserAgentHeader],
|
|
1110
|
+
destination: "/api/docs?format=markdown"
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
source: `${publicBase}/:slug*`,
|
|
1114
|
+
has: [markdownAgentUserAgentHeader],
|
|
1115
|
+
destination: "/api/docs?format=markdown&path=:slug*"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
source: publicBase,
|
|
1119
|
+
has: [markdownBotLikeUserAgentHeader],
|
|
1120
|
+
missing: [markdownTraditionalBotUserAgentHeader, markdownSecFetchModeHeader],
|
|
1121
|
+
destination: "/api/docs?format=markdown"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
source: `${publicBase}/:slug*`,
|
|
1125
|
+
has: [markdownBotLikeUserAgentHeader],
|
|
1126
|
+
missing: [markdownTraditionalBotUserAgentHeader, markdownSecFetchModeHeader],
|
|
1127
|
+
destination: "/api/docs?format=markdown&path=:slug*"
|
|
1064
1128
|
}
|
|
1065
1129
|
];
|
|
1066
1130
|
}
|
package/dist/layout.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { DocsConfig } from "@farming-labs/docs";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/layout.d.ts
|
|
5
5
|
declare function createNextDocsMetadata(config: DocsConfig): Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.130",
|
|
4
4
|
"description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"tsdown": "^0.20.3",
|
|
106
106
|
"typescript": "^5.9.3",
|
|
107
107
|
"vitest": "^3.2.4",
|
|
108
|
-
"@farming-labs/
|
|
109
|
-
"@farming-labs/
|
|
108
|
+
"@farming-labs/theme": "0.1.130",
|
|
109
|
+
"@farming-labs/docs": "0.1.130"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
112
|
"@farming-labs/docs": ">=0.0.1",
|