fumadocs-mdx 8.2.26 → 8.2.28
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.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { NextConfig } from 'next';
|
|
|
2
2
|
import { RemarkHeadingOptions, RemarkImageOptions, RehypeCodeOptions } from 'fumadocs-core/mdx-plugins';
|
|
3
3
|
import { Pluggable } from 'unified';
|
|
4
4
|
import { Options as Options$1 } from './loader-mdx.mjs';
|
|
5
|
-
import { O as Options } from './search-index-plugin-
|
|
5
|
+
import { O as Options } from './search-index-plugin-Dz3ovOHb.mjs';
|
|
6
6
|
import '@mdx-js/mdx';
|
|
7
7
|
import 'webpack';
|
|
8
8
|
|
package/dist/config.mjs
CHANGED
|
@@ -73,8 +73,7 @@ function getMdastExport(name, value) {
|
|
|
73
73
|
function remarkMdxExport({ values }) {
|
|
74
74
|
return (tree, vfile) => {
|
|
75
75
|
for (const name of values) {
|
|
76
|
-
if (!(name in vfile.data))
|
|
77
|
-
return;
|
|
76
|
+
if (!(name in vfile.data)) return;
|
|
78
77
|
tree.children.unshift(getMdastExport(name, vfile.data[name]));
|
|
79
78
|
}
|
|
80
79
|
};
|
|
@@ -101,11 +100,9 @@ var SearchIndexPlugin = class _SearchIndexPlugin {
|
|
|
101
100
|
} = this.options;
|
|
102
101
|
const logger = compiler.getInfrastructureLogger(_SearchIndexPlugin.name);
|
|
103
102
|
const isProduction = process.env.NODE_ENV === "production";
|
|
104
|
-
if (productionOnly && !isProduction)
|
|
105
|
-
return;
|
|
103
|
+
if (productionOnly && !isProduction) return;
|
|
106
104
|
compiler.hooks.compilation.tap(_SearchIndexPlugin.name, (compilation) => {
|
|
107
|
-
if (compilation.name !== "server")
|
|
108
|
-
return;
|
|
105
|
+
if (compilation.name !== "server") return;
|
|
109
106
|
compilation.hooks.processAssets.tap(
|
|
110
107
|
{
|
|
111
108
|
name: _SearchIndexPlugin.name,
|
|
@@ -114,8 +111,7 @@ var SearchIndexPlugin = class _SearchIndexPlugin {
|
|
|
114
111
|
() => {
|
|
115
112
|
const indexFiles = /* @__PURE__ */ new Map();
|
|
116
113
|
for (const m of compilation.modules.values()) {
|
|
117
|
-
if (!m.buildInfo || !("__fumadocs" in m.buildInfo))
|
|
118
|
-
continue;
|
|
114
|
+
if (!m.buildInfo || !("__fumadocs" in m.buildInfo)) continue;
|
|
119
115
|
const info = m.buildInfo.__fumadocs;
|
|
120
116
|
const relativePath = path.relative(rootContentDir, info.path);
|
|
121
117
|
if (relativePath.startsWith("../") || !filter(relativePath))
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { MDXProps } from 'mdx/types';
|
|
4
4
|
import { StructuredData } from 'fumadocs-core/mdx-plugins';
|
|
5
5
|
import { TableOfContents } from 'fumadocs-core/server';
|
|
6
|
-
export { S as SearchIndex } from './search-index-plugin-
|
|
6
|
+
export { S as SearchIndex } from './search-index-plugin-Dz3ovOHb.mjs';
|
|
7
7
|
|
|
8
8
|
declare const defaultSchemas: {
|
|
9
9
|
frontmatter: z.ZodObject<{
|
package/dist/index.mjs
CHANGED
|
@@ -53,8 +53,7 @@ function resolveFiles({
|
|
|
53
53
|
}) {
|
|
54
54
|
const outputs = [];
|
|
55
55
|
for (const [file, value] of Object.entries(map)) {
|
|
56
|
-
if (!file.startsWith(rootDir))
|
|
57
|
-
continue;
|
|
56
|
+
if (!file.startsWith(rootDir)) continue;
|
|
58
57
|
const parsed = path.parse(file);
|
|
59
58
|
if (metaTypes.includes(parsed.ext)) {
|
|
60
59
|
outputs.push({
|
package/dist/loader-mdx.mjs
CHANGED
|
@@ -10,8 +10,7 @@ import { spawn } from "cross-spawn";
|
|
|
10
10
|
var cache = /* @__PURE__ */ new Map();
|
|
11
11
|
function getGitTimestamp(file) {
|
|
12
12
|
const cachedTimestamp = cache.get(file);
|
|
13
|
-
if (cachedTimestamp)
|
|
14
|
-
return Promise.resolve(cachedTimestamp);
|
|
13
|
+
if (cachedTimestamp) return Promise.resolve(cachedTimestamp);
|
|
15
14
|
return new Promise((resolve, reject) => {
|
|
16
15
|
const cwd = path.dirname(file);
|
|
17
16
|
if (!fs.existsSync(cwd)) {
|
|
@@ -25,8 +24,7 @@ function getGitTimestamp(file) {
|
|
|
25
24
|
let output;
|
|
26
25
|
child.stdout.on("data", (d) => output = new Date(String(d)));
|
|
27
26
|
child.on("close", () => {
|
|
28
|
-
if (output)
|
|
29
|
-
cache.set(file, output);
|
|
27
|
+
if (output) cache.set(file, output);
|
|
30
28
|
resolve(output);
|
|
31
29
|
});
|
|
32
30
|
child.on("error", reject);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-mdx",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.28",
|
|
4
4
|
"description": "The built-in source for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"fast-glob": "^3.3.1",
|
|
44
44
|
"gray-matter": "^4.0.3",
|
|
45
45
|
"zod": "^3.23.8",
|
|
46
|
-
"fumadocs-core": "
|
|
46
|
+
"fumadocs-core": "12.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/cross-spawn": "^6.0.6",
|
|
File without changes
|