fumadocs-mdx 10.0.1 → 10.0.2
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.
|
@@ -90,7 +90,6 @@ async function getConfigHash(configPath) {
|
|
|
90
90
|
|
|
91
91
|
// src/map/manifest.ts
|
|
92
92
|
import fs2 from "node:fs";
|
|
93
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
94
93
|
import path2 from "node:path";
|
|
95
94
|
|
|
96
95
|
// src/utils/get-type-from-path.ts
|
|
@@ -104,8 +103,9 @@ function getTypeFromPath(path3) {
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
// src/map/manifest.ts
|
|
107
|
-
function
|
|
108
|
-
|
|
106
|
+
function getManifestEntryPath(originalPath) {
|
|
107
|
+
const toName = path2.relative(process.cwd(), originalPath).replaceAll(`..${path2.sep}`, "-").replaceAll(path2.sep, "_");
|
|
108
|
+
return path2.resolve(".next/cache/fumadocs", `${toName}.json`);
|
|
109
109
|
}
|
|
110
110
|
function writeManifest(to, config) {
|
|
111
111
|
const output = { files: [] };
|
|
@@ -113,9 +113,7 @@ function writeManifest(to, config) {
|
|
|
113
113
|
const type = config.collections.get(collection)?.type ?? getTypeFromPath(file);
|
|
114
114
|
if (type === "meta") continue;
|
|
115
115
|
try {
|
|
116
|
-
const content = fs2.readFileSync(
|
|
117
|
-
path2.resolve(".next/cache/fumadocs", `${getKey(file)}.json`)
|
|
118
|
-
);
|
|
116
|
+
const content = fs2.readFileSync(getManifestEntryPath(file));
|
|
119
117
|
const meta = JSON.parse(content.toString());
|
|
120
118
|
output.files.push({
|
|
121
119
|
...meta,
|
|
@@ -134,6 +132,6 @@ export {
|
|
|
134
132
|
loadConfigCached,
|
|
135
133
|
getConfigHash,
|
|
136
134
|
getTypeFromPath,
|
|
137
|
-
|
|
135
|
+
getManifestEntryPath,
|
|
138
136
|
writeManifest
|
|
139
137
|
};
|
package/dist/loader-mdx.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigHash,
|
|
3
|
-
|
|
3
|
+
getManifestEntryPath,
|
|
4
4
|
loadConfigCached
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VW6REBOK.mjs";
|
|
6
6
|
import {
|
|
7
7
|
getDefaultMDXOptions
|
|
8
8
|
} from "./chunk-LRV535YP.mjs";
|
|
@@ -192,7 +192,7 @@ async function loader(source, callback) {
|
|
|
192
192
|
if (config.global?.generateManifest) {
|
|
193
193
|
await fs2.mkdir(".next/cache/fumadocs", { recursive: true });
|
|
194
194
|
await fs2.writeFile(
|
|
195
|
-
|
|
195
|
+
getManifestEntryPath(filePath),
|
|
196
196
|
JSON.stringify({
|
|
197
197
|
path: filePath,
|
|
198
198
|
data: file.data
|
package/dist/next/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"@types/mdx": "^2.0.13",
|
|
61
61
|
"@types/micromatch": "^4.0.9",
|
|
62
62
|
"@types/react": "^18.3.5",
|
|
63
|
-
"next": "^14.2.
|
|
63
|
+
"next": "^14.2.8",
|
|
64
64
|
"unified": "^11.0.5",
|
|
65
65
|
"webpack": "^5.90.3",
|
|
66
66
|
"eslint-config-custom": "0.0.0",
|
|
67
|
-
"fumadocs-core": "13.4.
|
|
67
|
+
"fumadocs-core": "13.4.8",
|
|
68
68
|
"tsconfig": "0.0.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|