@rspress/core 2.0.5 → 2.0.7
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/0~1402.js +1 -0
- package/dist/{0~7675.423f6a06.js → 0~execa.js} +6 -5
- package/dist/1361.js +5 -0
- package/dist/1965.js +7 -0
- package/dist/4454.js +8 -0
- package/dist/{7744.421b464f.js → 4524.js} +20 -5
- package/dist/7397.js +18 -0
- package/dist/{5485.0bb24594.js → 8311.js} +5 -2
- package/dist/8474.js +4 -0
- package/dist/8885.js +4 -0
- package/dist/cli/index.js +2 -3
- package/dist/config/loadConfigFile.js +1 -2
- package/dist/eject-theme/components/Banner/index.tsx +1 -1
- package/dist/eject-theme/components/Button/index.tsx +1 -1
- package/dist/eject-theme/components/CodeBlock/index.scss +54 -1
- package/dist/eject-theme/components/CodeBlock/index.tsx +77 -7
- package/dist/eject-theme/components/CodeBlockRuntime/index.tsx +12 -2
- package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.tsx +1 -1
- package/dist/eject-theme/components/CodeButtonGroup/index.tsx +15 -15
- package/dist/eject-theme/components/DocContent/docComponents/a.tsx +1 -1
- package/dist/eject-theme/components/DocContent/docComponents/pre.tsx +5 -1
- package/dist/eject-theme/components/DocContent/docComponents/title.tsx +6 -1
- package/dist/eject-theme/components/DocContent/index.tsx +1 -1
- package/dist/eject-theme/components/DocFooter/index.tsx +1 -1
- package/dist/eject-theme/components/EditLink/index.tsx +1 -1
- package/dist/eject-theme/components/FallbackHeading/index.tsx +4 -1
- package/dist/eject-theme/components/HomeFeature/index.tsx +5 -1
- package/dist/eject-theme/components/HomeFooter/index.tsx +1 -1
- package/dist/eject-theme/components/HomeHero/index.tsx +2 -2
- package/dist/eject-theme/components/HoverGroup/index.tsx +5 -2
- package/dist/eject-theme/components/Link/useLinkNavigate.ts +1 -1
- package/dist/eject-theme/components/Llms/LlmsCopyButton.tsx +3 -2
- package/dist/eject-theme/components/Llms/LlmsCopyRow.tsx +3 -2
- package/dist/eject-theme/components/Llms/LlmsOpenRow.tsx +1 -1
- package/dist/eject-theme/components/Llms/LlmsViewOptions.tsx +3 -2
- package/dist/eject-theme/components/Llms/copy.ts +12 -0
- package/dist/eject-theme/components/Nav/NavMenu.tsx +9 -2
- package/dist/eject-theme/components/Nav/index.tsx +1 -1
- package/dist/eject-theme/components/NavHamburger/index.tsx +6 -1
- package/dist/eject-theme/components/NavScreen/NavScreenAppearance.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/NavScreenLangs.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.tsx +5 -1
- package/dist/eject-theme/components/NavScreen/NavScreenMenuOthers.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/NavScreenVersions.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/index.tsx +1 -1
- package/dist/eject-theme/components/NavTitle/index.tsx +1 -1
- package/dist/eject-theme/components/Outline/ScrollToTop.tsx +5 -1
- package/dist/eject-theme/components/Outline/index.tsx +1 -1
- package/dist/eject-theme/components/Overview/index.tsx +1 -1
- package/dist/eject-theme/components/OverviewGroup/index.tsx +2 -2
- package/dist/eject-theme/components/PackageManagerTabs/index.tsx +1 -1
- package/dist/eject-theme/components/PrevNextPage/index.tsx +1 -1
- package/dist/eject-theme/components/Root/index.tsx +1 -1
- package/dist/eject-theme/components/Search/NoSearchResult.tsx +1 -1
- package/dist/eject-theme/components/Search/SearchButton.tsx +1 -1
- package/dist/eject-theme/components/Search/SearchPanel.tsx +3 -1
- package/dist/eject-theme/components/Search/SuggestItem.tsx +1 -1
- package/dist/eject-theme/components/Search/index.tsx +1 -1
- package/dist/eject-theme/components/Sidebar/SidebarGroup.tsx +5 -1
- package/dist/eject-theme/components/Sidebar/SidebarItem.scss +0 -4
- package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +1 -1
- package/dist/eject-theme/components/Sidebar/SidebarSectionHeader.tsx +1 -1
- package/dist/eject-theme/components/SidebarMenu/index.tsx +1 -1
- package/dist/eject-theme/components/SocialLinks/index.tsx +1 -1
- package/dist/eject-theme/components/SourceCode/index.tsx +1 -1
- package/dist/eject-theme/components/SvgWrapper/index.tsx +1 -1
- package/dist/eject-theme/components/SwitchAppearance/index.tsx +1 -1
- package/dist/eject-theme/components/Tabs/index.scss +13 -15
- package/dist/eject-theme/components/Tabs/index.tsx +1 -1
- package/dist/eject-theme/components/Tag/index.tsx +1 -1
- package/dist/eject-theme/components/Toc/TocItem.tsx +5 -1
- package/dist/eject-theme/components/Toc/index.tsx +1 -1
- package/dist/index.js +1 -3
- package/dist/node/PluginDriver.js +3 -8
- package/dist/node/auto-nav-sidebar/index.js +1 -2
- package/dist/node/auto-nav-sidebar/locales.js +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +3 -2
- package/dist/node/auto-nav-sidebar/utils.js +1 -2
- package/dist/node/auto-nav-sidebar/walk.js +1 -2
- package/dist/node/constants.js +1 -2
- package/dist/node/eject.js +1 -1
- package/dist/node/initRsbuild.js +2 -4
- package/dist/node/last-updated/index.js +1 -1
- package/dist/node/logger/hint.js +4 -1
- package/dist/node/mdx/options.js +1 -3
- package/dist/node/mdx/processor.js +1 -2
- package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
- package/dist/node/mdx/rehypePlugins/headerAnchor.js +1 -2
- package/dist/node/mdx/rehypePlugins/shiki.d.ts +1 -1
- package/dist/node/mdx/rehypePlugins/shiki.js +2 -1
- package/dist/node/mdx/rehypePlugins/transformers/add-fold.d.ts +6 -0
- package/dist/node/mdx/rehypePlugins/transformers/add-fold.js +38 -0
- package/dist/node/mdx/rehypePlugins/transformers/index.d.ts +1 -0
- package/dist/node/mdx/rehypePlugins/transformers/index.js +1 -0
- package/dist/node/mdx/rehypePlugins/transformers/meta-highlight.js +1 -1
- package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +1 -2
- package/dist/node/mdx/remarkPlugins/image.js +1 -1
- package/dist/node/mdx/remarkPlugins/link.js +1 -2
- package/dist/node/mdx/remarkPlugins/toc.js +1 -1
- package/dist/node/medium-zoom/index.js +1 -1
- package/dist/node/route/RoutePage.js +1 -1
- package/dist/node/route/RouteService.js +1 -3
- package/dist/node/route/extractPageData.js +1 -3
- package/dist/node/route/normalizeRoutePath.js +1 -2
- package/dist/node/runtimeModule/i18n.js +2 -3
- package/dist/node/runtimeModule/pageData/createPageData.js +1 -2
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -2
- package/dist/node/runtimeModule/searchHooks.js +1 -1
- package/dist/node/runtimeModule/siteData/createSiteData.js +1 -1
- package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +1 -1
- package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +1 -1
- package/dist/node/serve.js +1 -1
- package/dist/node/ssg/renderPage.js +1 -2
- package/dist/node/ssg/renderPageWorker.js +2 -2
- package/dist/node/ssg/renderPages.js +3 -4
- package/dist/node/ssg/rsbuildPluginSSG.js +1 -2
- package/dist/node/ssg/ssgEnv.d.ts +1 -1
- package/dist/node/ssg/ssgEnv.js +2 -2
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +5 -7
- package/dist/node/ssg-md/llms/llmsTxt.js +1 -2
- package/dist/node/ssg-md/remarkSplitMdx.js +1 -2
- package/dist/node/ssg-md/renderPage.js +1 -2
- package/dist/node/ssg-md/renderPages.js +2 -2
- package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -2
- package/dist/node/utils/checkLanguageParity.js +1 -1
- package/dist/node/utils/createHash.js +1 -1
- package/dist/node/utils/error.js +1 -1
- package/dist/node/utils/flattenMdxContent.js +1 -3
- package/dist/node/utils/fs.js +1 -1
- package/dist/node/utils/getPageKey.js +1 -1
- package/dist/node/utils/normalizePath.js +1 -2
- package/dist/node/utils/reactAlias.js +15 -10
- package/dist/runtime/index.js +20 -21
- package/dist/runtime/ssrMdServerEntry.js +2 -2
- package/dist/runtime/ssrServerEntry.js +2 -2
- package/dist/runtime/utils.d.ts +1 -1
- package/dist/runtime/utils.js +1 -1
- package/dist/shiki-transformers.js +1 -0
- package/dist/theme/assets/arrow-down.js +1 -1
- package/dist/theme/assets/arrow-right.js +1 -1
- package/dist/theme/assets/close.js +1 -1
- package/dist/theme/assets/copy.js +1 -1
- package/dist/theme/assets/deprecated.js +1 -1
- package/dist/theme/assets/down.js +1 -1
- package/dist/theme/assets/edit.js +1 -1
- package/dist/theme/assets/empty.js +1 -1
- package/dist/theme/assets/experimental.js +1 -1
- package/dist/theme/assets/external-link.js +1 -1
- package/dist/theme/assets/file.js +1 -1
- package/dist/theme/assets/github.js +1 -1
- package/dist/theme/assets/gitlab.js +1 -1
- package/dist/theme/assets/header.js +1 -1
- package/dist/theme/assets/jump.js +1 -1
- package/dist/theme/assets/link.js +1 -1
- package/dist/theme/assets/loading.js +1 -1
- package/dist/theme/assets/menu.js +1 -1
- package/dist/theme/assets/moon.js +1 -1
- package/dist/theme/assets/scroll-to-top.js +1 -1
- package/dist/theme/assets/search.js +1 -1
- package/dist/theme/assets/small-menu.js +1 -1
- package/dist/theme/assets/success.js +1 -1
- package/dist/theme/assets/sun.js +1 -1
- package/dist/theme/assets/title.js +1 -1
- package/dist/theme/assets/wrap.js +1 -1
- package/dist/theme/assets/wrapped.js +1 -1
- package/dist/theme/components/Banner/index.js +1 -1
- package/dist/theme/components/Button/index.js +1 -1
- package/dist/theme/components/Callout/index.js +2 -1
- package/dist/theme/components/CodeBlock/index.css +49 -1
- package/dist/theme/components/CodeBlock/index.d.ts +11 -3
- package/dist/theme/components/CodeBlock/index.js +51 -6
- package/dist/theme/components/CodeBlockRuntime/index.d.ts +2 -2
- package/dist/theme/components/CodeBlockRuntime/index.js +10 -2
- package/dist/theme/components/CodeButtonGroup/CopyCodeButton.js +1 -1
- package/dist/theme/components/CodeButtonGroup/index.d.ts +6 -6
- package/dist/theme/components/CodeButtonGroup/index.js +10 -10
- package/dist/theme/components/DocContent/docComponents/a.js +1 -1
- package/dist/theme/components/DocContent/docComponents/pre.d.ts +2 -2
- package/dist/theme/components/DocContent/docComponents/pre.js +4 -2
- package/dist/theme/components/DocContent/docComponents/title.js +1 -1
- package/dist/theme/components/DocContent/index.js +1 -1
- package/dist/theme/components/DocFooter/index.js +1 -1
- package/dist/theme/components/EditLink/index.js +1 -1
- package/dist/theme/components/FallbackHeading/index.js +1 -1
- package/dist/theme/components/HomeBackground/index.css +1 -0
- package/dist/theme/components/HomeFeature/index.css +3 -3
- package/dist/theme/components/HomeFeature/index.js +1 -1
- package/dist/theme/components/HomeFooter/index.js +1 -1
- package/dist/theme/components/HomeHero/index.d.ts +1 -1
- package/dist/theme/components/HomeHero/index.js +1 -1
- package/dist/theme/components/HoverGroup/index.d.ts +1 -1
- package/dist/theme/components/HoverGroup/index.js +4 -1
- package/dist/theme/components/Link/useLinkNavigate.d.ts +1 -1
- package/dist/theme/components/Llms/LlmsCopyButton.js +4 -3
- package/dist/theme/components/Llms/LlmsCopyRow.js +3 -2
- package/dist/theme/components/Llms/LlmsOpenRow.js +1 -1
- package/dist/theme/components/Llms/LlmsViewOptions.js +4 -3
- package/dist/theme/components/Llms/copy.d.ts +1 -0
- package/dist/theme/components/Llms/copy.js +9 -0
- package/dist/theme/components/Llms/index.css +1 -0
- package/dist/theme/components/Llms/index.js +4 -5
- package/dist/theme/components/Nav/NavMenu.d.ts +1 -1
- package/dist/theme/components/Nav/NavMenu.js +2 -1
- package/dist/theme/components/Nav/index.css +1 -1
- package/dist/theme/components/Nav/index.js +1 -1
- package/dist/theme/components/NavHamburger/index.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenAppearance.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenLangs.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenMenuItem.d.ts +2 -1
- package/dist/theme/components/NavScreen/NavScreenMenuItem.js +4 -2
- package/dist/theme/components/NavScreen/NavScreenMenuOthers.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenVersions.js +1 -1
- package/dist/theme/components/NavScreen/index.css +1 -1
- package/dist/theme/components/NavScreen/index.js +1 -1
- package/dist/theme/components/NavTitle/index.js +1 -1
- package/dist/theme/components/Outline/ScrollToTop.js +1 -1
- package/dist/theme/components/Outline/index.js +1 -1
- package/dist/theme/components/Overview/index.d.ts +1 -1
- package/dist/theme/components/Overview/index.js +1 -1
- package/dist/theme/components/OverviewGroup/icons/plugin.js +1 -1
- package/dist/theme/components/OverviewGroup/index.css +1 -0
- package/dist/theme/components/OverviewGroup/index.js +1 -1
- package/dist/theme/components/PackageManagerTabs/index.js +1 -1
- package/dist/theme/components/PrevNextPage/index.js +1 -1
- package/dist/theme/components/Root/index.d.ts +1 -1
- package/dist/theme/components/Search/NoSearchResult.js +1 -1
- package/dist/theme/components/Search/SearchButton.js +1 -1
- package/dist/theme/components/Search/SearchPanel.js +3 -2
- package/dist/theme/components/Search/SuggestItem.js +1 -1
- package/dist/theme/components/Search/index.js +1 -1
- package/dist/theme/components/Search/logic/providers/LocalProvider.js +1 -1
- package/dist/theme/components/Sidebar/SidebarGroup.js +1 -1
- package/dist/theme/components/Sidebar/SidebarItem.css +0 -4
- package/dist/theme/components/Sidebar/SidebarItem.js +1 -1
- package/dist/theme/components/Sidebar/SidebarSectionHeader.js +1 -1
- package/dist/theme/components/SidebarMenu/index.js +1 -1
- package/dist/theme/components/SocialLinks/index.js +1 -1
- package/dist/theme/components/SourceCode/index.js +1 -1
- package/dist/theme/components/SvgWrapper/index.js +1 -1
- package/dist/theme/components/SwitchAppearance/index.js +1 -1
- package/dist/theme/components/Tabs/index.css +14 -8
- package/dist/theme/components/Tabs/index.js +1 -1
- package/dist/theme/components/Tag/index.js +1 -1
- package/dist/theme/components/Toc/TocItem.css +1 -1
- package/dist/theme/components/Toc/TocItem.js +1 -1
- package/dist/theme/components/Toc/index.js +1 -1
- package/dist/theme/index.js +66 -67
- package/dist/theme/layout/DocLayout/index.css +11 -11
- package/dist/theme/layout/DocLayout/index.js +1 -1
- package/dist/theme/layout/HomeLayout/index.js +1 -1
- package/dist/theme/layout/Layout/index.d.ts +2 -2
- package/dist/theme/layout/Layout/index.js +16 -6
- package/dist/theme/layout/NotFountLayout/index.js +1 -1
- package/dist/theme/styles/base.css +7 -4
- package/dist/theme/styles/preflight.css +2 -0
- package/dist/theme/styles/vars/home-vars.css +28 -4
- package/nav-json-schema.json +3 -0
- package/package.json +14 -14
- package/dist/6289.29817fb4.js +0 -4
- package/dist/9348.1beb3e25.js +0 -11
- package/dist/cli/index.44f3184c.js +0 -2
- package/dist/node/mdx/loader.15134034.js +0 -9
- /package/dist/{node/ssg/renderPageWorker.165b5d46.js → 9224.js} +0 -0
- /package/dist/{rslib-runtime.99091bf6.js → rslib-runtime.js} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isExternalUrl, slash } from "../../9348.1beb3e25.js";
|
|
1
|
+
import { extname, stat as promises_stat, logger, picocolors, readdir, isExternalUrl, relative, slash, join } from "../../4524.js";
|
|
3
2
|
import { createError } from "../utils/error.js";
|
|
4
3
|
import { PUBLIC_DIR } from "../constants.js";
|
|
5
4
|
import { pathExists, extractInfoFromFrontmatterWithAbsolutePath, readJson } from "./utils.js";
|
|
@@ -152,6 +151,7 @@ async function metaDirItemToSidebarItem(metaItem, workDir, docsDir, extensions,
|
|
|
152
151
|
collapsible,
|
|
153
152
|
collapsed,
|
|
154
153
|
items: await getItems(),
|
|
154
|
+
tag: metaJsonTag,
|
|
155
155
|
overviewHeaders: metaJsonOverviewHeaders,
|
|
156
156
|
context: metaJsonContext,
|
|
157
157
|
_fileKey: getFileKey(dirAbsolutePath, docsDir)
|
|
@@ -163,6 +163,7 @@ async function metaDirItemToSidebarItem(metaItem, workDir, docsDir, extensions,
|
|
|
163
163
|
collapsible,
|
|
164
164
|
collapsed,
|
|
165
165
|
items: await getItems(),
|
|
166
|
+
tag: metaJsonTag,
|
|
166
167
|
overviewHeaders: metaJsonOverviewHeaders,
|
|
167
168
|
context: metaJsonContext,
|
|
168
169
|
_fileKey: getFileKey(dirAbsolutePath, docsDir)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { node_path, promises } from "../../
|
|
2
|
-
import { loadFrontMatter, extractTextAndId } from "../../9348.1beb3e25.js";
|
|
1
|
+
import { node_path, extractTextAndId, promises, loadFrontMatter } from "../../4524.js";
|
|
3
2
|
async function pathExists(path) {
|
|
4
3
|
try {
|
|
5
4
|
await promises.access(path);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { node_path, promises } from "../../
|
|
2
|
-
import { isExternalUrl } from "../../9348.1beb3e25.js";
|
|
1
|
+
import { isExternalUrl, node_path, promises } from "../../4524.js";
|
|
3
2
|
import { pathExists } from "../utils/fs.js";
|
|
4
3
|
import { readJson } from "./utils.js";
|
|
5
4
|
import { createError } from "../utils/error.js";
|
package/dist/node/constants.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createRequire, package_namespaceObject } from "../
|
|
2
|
-
import { node_path } from "../6289.29817fb4.js";
|
|
1
|
+
import { createRequire, node_path, package_namespaceObject } from "../8311.js";
|
|
3
2
|
const constants_require = createRequire(import.meta.url);
|
|
4
3
|
const RSPRESS_VERSION = package_namespaceObject.rE;
|
|
5
4
|
const APPEARANCE_KEY = 'rspress-theme-appearance';
|
package/dist/node/eject.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { node_path, logger, promises, picocolors } from "../
|
|
1
|
+
import { node_path, logger, promises, picocolors } from "../4454.js";
|
|
2
2
|
import { EJECTED_THEME } from "./constants.js";
|
|
3
3
|
let _themeComponentsPathOverride;
|
|
4
4
|
function getThemeComponentsPath() {
|
package/dist/node/initRsbuild.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { node_path } from "../6289.29817fb4.js";
|
|
3
|
-
import { addTrailingSlash, removeTrailingSlash, cwd, MDX_OR_MD_REGEXP } from "../9348.1beb3e25.js";
|
|
4
|
-
import { PLUGIN_REACT_NAME, pluginReact, pluginVirtualModule } from "../7744.421b464f.js";
|
|
1
|
+
import { addTrailingSlash, node_path, fileURLToPath, cwd, PLUGIN_REACT_NAME, removeTrailingSlash, pluginVirtualModule, pluginReact, createRequire, MDX_OR_MD_REGEXP } from "../4524.js";
|
|
5
2
|
import { createError } from "./utils/error.js";
|
|
6
3
|
import { PUBLIC_DIR, CSR_CLIENT_ENTRY, SSR_CLIENT_ENTRY, OUTPUT_DIR, SSG_MD_SERVER_ENTRY, inlineThemeScript, NODE_SSG_BUNDLE_FOLDER, isProduction, PACKAGE_ROOT, SSR_SERVER_ENTRY, TEMPLATE_PATH, NODE_SSG_MD_BUNDLE_FOLDER, DEFAULT_THEME, NODE_SSG_MD_BUNDLE_NAME, DEFAULT_TITLE, NODE_SSG_BUNDLE_NAME } from "./constants.js";
|
|
7
4
|
import { hintBuilderPluginsBreakingChange, hintThemeBreakingChange } from "./logger/hint.js";
|
|
@@ -17,6 +14,7 @@ import { siteDataVMPlugin } from "./runtimeModule/siteData/rsbuildPlugin.js";
|
|
|
17
14
|
import { rsbuildPluginSSG } from "./ssg/rsbuildPluginSSG.js";
|
|
18
15
|
import { rsbuildPluginCSR } from "./ssg/rsbuildPluginCSR.js";
|
|
19
16
|
import { rsbuildPluginSSGMD } from "./ssg-md/rsbuildPluginSSGMD.js";
|
|
17
|
+
import { package_namespaceObject } from "../8311.js";
|
|
20
18
|
function isPluginIncluded(config, pluginName) {
|
|
21
19
|
return Boolean(config.builderConfig?.plugins?.some((plugin)=>plugin && plugin.name === pluginName));
|
|
22
20
|
}
|
package/dist/node/logger/hint.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { picocolors, relative, logger, join, readFile } from "../../
|
|
1
|
+
import { picocolors, relative, logger, join, readFile } from "../../8885.js";
|
|
2
2
|
import { pathExists } from "../utils/fs.js";
|
|
3
3
|
const THEME_DEFAULT_EXPORT_PATTERN = /export\s+default\s+\{/;
|
|
4
4
|
const THEME_OLD_IMPORT_0 = /from\s+['"]rspress\/theme['"]/;
|
|
@@ -65,7 +65,10 @@ function hintSSGFailed() {
|
|
|
65
65
|
function hintSSGFalse() {
|
|
66
66
|
logger.info('`ssg: false` detected, SSG will be disabled.');
|
|
67
67
|
}
|
|
68
|
+
let reactVersionLogged = false;
|
|
68
69
|
function hintReactVersion() {
|
|
70
|
+
if (reactVersionLogged) return;
|
|
71
|
+
reactVersionLogged = true;
|
|
69
72
|
logger.info('[Rspress v2] Rspress support React 18 and 19, please confirm that both react and react-dom are installed in package.json with the same version. ');
|
|
70
73
|
}
|
|
71
74
|
function hintNavJsonChangeThenPanic(metaJson, metaJsonDir, docsDir) {
|
package/dist/node/mdx/options.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { node_path } from "../../
|
|
2
|
-
import { remark_gfm, nodeTypes } from "../../9348.1beb3e25.js";
|
|
3
|
-
import { rehype_external_links, rehype_raw, remark_cjk_friendly, rehype, remark_cjk_friendly_gfm_strikethrough } from "./loader.15134034.js";
|
|
1
|
+
import { node_path, rehype_external_links, rehype_raw, remark_cjk_friendly, nodeTypes, remark_gfm, rehype, remark_cjk_friendly_gfm_strikethrough } from "../../7397.js";
|
|
4
2
|
import { remarkToc } from "./remarkPlugins/toc.js";
|
|
5
3
|
import { remarkContainerSyntax } from "./remarkPlugins/containerSyntax.js";
|
|
6
4
|
import { remarkFileCodeBlock } from "./remarkPlugins/fileCodeBlock.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { node_path } from "../../
|
|
2
|
-
import { createProcessor, loadFrontMatter, extractTextAndId } from "../../9348.1beb3e25.js";
|
|
1
|
+
import { node_path, extractTextAndId, createProcessor, loadFrontMatter } from "../../7397.js";
|
|
3
2
|
import { createMDXOptions } from "./options.js";
|
|
4
3
|
import { applyReplaceRules } from "../utils/applyReplaceRules.js";
|
|
5
4
|
import { escapeMarkdownHeadingIds } from "../utils/escapeHeadingIds.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { visit } from "../../../
|
|
1
|
+
import { visit } from "../../../7397.js";
|
|
2
2
|
const rehypeCodeMeta = ()=>(tree)=>{
|
|
3
3
|
visit(tree, 'element', (node)=>{
|
|
4
4
|
if ('pre' === node.tagName && node.children[0]?.type === 'element' && 'code' === node.children[0].tagName) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { visit, github_slugger,
|
|
2
|
-
import { headingRank } from "../loader.15134034.js";
|
|
1
|
+
import { visit, extractTextAndId, github_slugger, headingRank } from "../../../7397.js";
|
|
3
2
|
const rehypeHeaderAnchor = ()=>{
|
|
4
3
|
const slugger = new github_slugger();
|
|
5
4
|
return (tree)=>{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RehypeShikiOptions } from '@shikijs/rehype';
|
|
2
2
|
import rehypeShiki from '@shikijs/rehype';
|
|
3
3
|
declare function createRehypeShikiOptions(showLineNumbers: boolean, defaultWrapCode: boolean, options?: Partial<RehypeShikiOptions>): RehypeShikiOptions;
|
|
4
|
-
export {
|
|
4
|
+
export { createRehypeShikiOptions, rehypeShiki };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { transformerAddLang, transformerAddLineNumbers, transformerAddTitle, createCssVariablesTheme, transformerAddWrapCode } from "
|
|
1
|
+
import { transformerAddLang, transformerAddLineNumbers, transformerAddTitle, transformerAddFold, createCssVariablesTheme, transformerAddWrapCode } from "../../../7397.js";
|
|
2
2
|
const cssVariablesTheme = createCssVariablesTheme({
|
|
3
3
|
name: 'css-variables',
|
|
4
4
|
variablePrefix: '--shiki-',
|
|
@@ -16,6 +16,7 @@ function createRehypeShikiOptions(showLineNumbers, defaultWrapCode, options) {
|
|
|
16
16
|
transformerAddWrapCode({
|
|
17
17
|
defaultWrapCode
|
|
18
18
|
}),
|
|
19
|
+
transformerAddFold(),
|
|
19
20
|
...transformers
|
|
20
21
|
];
|
|
21
22
|
return {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const SHIKI_TRANSFORMER_ADD_FOLD = 'shiki-transformer:add-fold';
|
|
2
|
+
const DEFAULT_FOLD_HEIGHT = 300;
|
|
3
|
+
function hasFoldInMeta(meta) {
|
|
4
|
+
if (!meta) return;
|
|
5
|
+
const kvList = meta.split(' ').filter(Boolean);
|
|
6
|
+
if (kvList.includes('fold=false')) return false;
|
|
7
|
+
if (kvList.includes('fold') || kvList.includes('fold=true')) return true;
|
|
8
|
+
}
|
|
9
|
+
function parseHeightFromMeta(meta) {
|
|
10
|
+
if (!meta) return;
|
|
11
|
+
const kvList = meta.split(' ').filter(Boolean);
|
|
12
|
+
for (const item of kvList){
|
|
13
|
+
const [k, v = ''] = item.split('=').filter(Boolean);
|
|
14
|
+
if ('height' === k && v.length > 0) {
|
|
15
|
+
const num = Number(v.replace(/["'`]/g, ''));
|
|
16
|
+
if (!Number.isNaN(num) && num > 0) return num;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function transformerAddFold() {
|
|
21
|
+
return {
|
|
22
|
+
name: SHIKI_TRANSFORMER_ADD_FOLD,
|
|
23
|
+
pre (pre) {
|
|
24
|
+
const meta = this.options.meta?.__raw;
|
|
25
|
+
const shouldFold = hasFoldInMeta(meta);
|
|
26
|
+
if (shouldFold) {
|
|
27
|
+
const height = parseHeightFromMeta(meta) ?? DEFAULT_FOLD_HEIGHT;
|
|
28
|
+
pre.properties = {
|
|
29
|
+
...pre.properties,
|
|
30
|
+
fold: true,
|
|
31
|
+
height
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return pre;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export { SHIKI_TRANSFORMER_ADD_FOLD, transformerAddFold };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { SHIKI_TRANSFORMER_ADD_FOLD, transformerAddFold, } from './add-fold.js';
|
|
1
2
|
export { SHIKI_TRANSFORMER_ADD_LANG, transformerAddLang } from './add-lang.js';
|
|
2
3
|
export { SHIKI_TRANSFORMER_ADD_LINE_NUMBERS, transformerAddLineNumbers, } from './add-line-numbers.js';
|
|
3
4
|
export { SHIKI_TRANSFORMER_ADD_TITLE, transformerAddTitle } from './add-title.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*!
|
|
1
|
+
/*! LICENSE: meta-highlight.js.LICENSE.txt */
|
|
2
2
|
/**
|
|
3
3
|
* these codes are copied from @shiki/transformers, transformerMetaHighlight
|
|
4
4
|
* @source https://github.com/shikijs/shiki/blob/f5cf06f55a0b4643d7b02f15ee2c5033be6f1245/packages/transformers/src/transformers/meta-highlight.ts#L56
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { node_path } from "../../../
|
|
1
|
+
import { node_path } from "../../../7397.js";
|
|
2
2
|
import { getDefaultImportAstNode } from "../../utils/getImportAstNode.js";
|
|
3
3
|
const remarkBuiltin = ({ globalComponents })=>(tree)=>{
|
|
4
4
|
const demos = globalComponents.map((componentPath)=>{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { node_path, logger, picocolors, readFile } from "../../../
|
|
2
|
-
import { visit, cwd } from "../../../9348.1beb3e25.js";
|
|
1
|
+
import { visit, node_path, logger, cwd, picocolors, readFile } from "../../../1965.js";
|
|
3
2
|
import { createError } from "../../utils/error.js";
|
|
4
3
|
const ERROR_PREFIX = '[remarkFileCodeBlock]';
|
|
5
4
|
function parseFileFromMeta(meta) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isExternalUrl, getNodeAttribute, visit } from "../../../
|
|
1
|
+
import { isExternalUrl, getNodeAttribute, visit } from "../../../7397.js";
|
|
2
2
|
import { getDefaultImportAstNode } from "../../utils/getImportAstNode.js";
|
|
3
3
|
const normalizeImageUrl = (imageUrl)=>{
|
|
4
4
|
if (isExternalUrl(imageUrl) || imageUrl.startsWith('/')) return '';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { node_path, logger, picocolors } from "../../../
|
|
2
|
-
import { isExternalUrl, isProduction, addLeadingSlash, parseUrl, normalizeHref, visit, withBase } from "../../../9348.1beb3e25.js";
|
|
1
|
+
import { normalizeHref, node_path, addLeadingSlash, logger, visit, picocolors, isExternalUrl, isProduction, parseUrl, withBase } from "../../../1965.js";
|
|
3
2
|
import { hintRelativeMarkdownLink } from "../../logger/hint.js";
|
|
4
3
|
import { createError } from "../../utils/error.js";
|
|
5
4
|
function link_checkDeadLinks(checkDeadLinks, internalLinks, file, lint) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { github_slugger, visitChildren, extractTextAndId } from "../../../
|
|
1
|
+
import { github_slugger, visitChildren, extractTextAndId } from "../../../1361.js";
|
|
2
2
|
const extractChildText = (child)=>{
|
|
3
3
|
if ('link' === child.type) return child.children?.map(extractChildText).join('') ?? '';
|
|
4
4
|
if ('strong' === child.type) return `**${child.children?.map(extractChildText).join('') ?? ''}**`;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { node_path, promises } from "../../
|
|
2
|
-
import { RSPRESS_TEMP_DIR, removeTrailingSlash, addTrailingSlash } from "../../9348.1beb3e25.js";
|
|
3
|
-
import { DEFAULT_PAGE_EXTENSIONS, glob } from "../../7744.421b464f.js";
|
|
1
|
+
import { RSPRESS_TEMP_DIR, node_path, removeTrailingSlash, promises, addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, glob } from "../../4524.js";
|
|
4
2
|
import { PUBLIC_DIR } from "../constants.js";
|
|
5
3
|
import { RoutePage, absolutePathToRoutePath, absolutePathToRelativePath } from "./RoutePage.js";
|
|
6
4
|
import { createError } from "../utils/error.js";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { node_path, promises } from "../../
|
|
2
|
-
import { unified, visit, remark_gfm, loadFrontMatter, remark_stringify, MDX_OR_MD_REGEXP } from "../../9348.1beb3e25.js";
|
|
3
|
-
import { remove, remark_parse } from "../../7744.421b464f.js";
|
|
1
|
+
import { unified, node_path, visit, promises, loadFrontMatter, remark_stringify, remove, remark_gfm, MDX_OR_MD_REGEXP, remark_parse } from "../../4524.js";
|
|
4
2
|
import { applyReplaceRules } from "../utils/applyReplaceRules.js";
|
|
5
3
|
import { flattenMdxContent } from "../utils/flattenMdxContent.js";
|
|
6
4
|
import { importStatementRegex } from "../constants.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { addTrailingSlash, addLeadingSlash } from "../../
|
|
2
|
-
import { DEFAULT_PAGE_EXTENSIONS } from "../../7744.421b464f.js";
|
|
1
|
+
import { addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, addLeadingSlash } from "../../4524.js";
|
|
3
2
|
const getRoutePathParts = (relativePath, lang, version, langs, versions)=>{
|
|
4
3
|
const [versionPart, langPart, purePath] = splitRoutePathParts(relativePath, lang, version, langs, versions);
|
|
5
4
|
return [
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createRequire } from "../../
|
|
2
|
-
import { picocolors, join, logger } from "../../6289.29817fb4.js";
|
|
1
|
+
import { logger, createRequire, join, picocolors } from "../../4524.js";
|
|
3
2
|
import { DEFAULT_I18N_TEXT } from "./DEFAULT_I18N_TEXT.js";
|
|
4
3
|
import { createError } from "../utils/error.js";
|
|
5
4
|
import { pathExists } from "../utils/fs.js";
|
|
@@ -30,7 +29,7 @@ async function getI18nData(docConfig, pluginDriver) {
|
|
|
30
29
|
delete i18n_require.cache[i18nSourcePath];
|
|
31
30
|
i18nSourceFromJson = i18n_require(i18nSourcePath);
|
|
32
31
|
} catch (e) {
|
|
33
|
-
logger.debug('getI18nData from i18n.json Failed: \n', e);
|
|
32
|
+
logger.debug('getI18nData from i18n.json Failed: \n', e instanceof Error ? e.message : '');
|
|
34
33
|
}
|
|
35
34
|
i18nSourceFull = mergeI18nData(i18nSourceFull, i18nSourceFromJson);
|
|
36
35
|
if ('function' == typeof i18nSource) try {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SEARCH_INDEX_NAME } from "../../../
|
|
2
|
-
import { groupBy } from "../../../7744.421b464f.js";
|
|
1
|
+
import { SEARCH_INDEX_NAME, groupBy } from "../../../4524.js";
|
|
3
2
|
import { extractPageData } from "../../route/extractPageData.js";
|
|
4
3
|
import { createHash } from "../../utils/createHash.js";
|
|
5
4
|
function deletePrivateField(obj) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { logger } from "../../../
|
|
2
|
-
import { pluginVirtualModule } from "../../../7744.421b464f.js";
|
|
1
|
+
import { logger, pluginVirtualModule } from "../../../4524.js";
|
|
3
2
|
import { createPageData } from "./createPageData.js";
|
|
4
3
|
const rsbuildPluginDocVM = async ({ config, userDocRoot, routeService, pluginDriver })=>{
|
|
5
4
|
const ref = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getIconUrlPath } from "../../../
|
|
1
|
+
import { getIconUrlPath } from "../../../4524.js";
|
|
2
2
|
import { normalizeThemeConfig } from "./normalizeThemeConfig.js";
|
|
3
3
|
async function createSiteData(userConfig) {
|
|
4
4
|
const tempSearchObj = Object.assign({}, userConfig.search);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isExternalUrl, slash, addLeadingSlash, normalizeHref } from "../../../
|
|
1
|
+
import { isExternalUrl, slash, addLeadingSlash, normalizeHref } from "../../../4524.js";
|
|
2
2
|
import { getI18nData } from "../i18n.js";
|
|
3
3
|
import { applyReplaceRules } from "../../utils/applyReplaceRules.js";
|
|
4
4
|
async function normalizeThemeConfig(docConfig) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { logger } from "../../../
|
|
1
|
+
import { logger } from "../../../4524.js";
|
|
2
2
|
import { modifyConfigWithAutoNavSide } from "../../auto-nav-sidebar/index.js";
|
|
3
3
|
import { createSiteData } from "./createSiteData.js";
|
|
4
4
|
const siteDataVMPlugin = (context)=>{
|
package/dist/node/serve.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { transformHtmlTemplate, pathToFileURL,
|
|
2
|
-
import { logger, picocolors } from "../../6289.29817fb4.js";
|
|
1
|
+
import { createHead, logger, transformHtmlTemplate, pathToFileURL, picocolors } from "../../8311.js";
|
|
3
2
|
import { hintSSGFailed } from "../logger/hint.js";
|
|
4
3
|
import { renderHtmlTemplate } from "./renderHtmlTemplate.js";
|
|
5
4
|
async function renderPage(route, htmlTemplate, configHead, ssrBundlePath) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { workerData } from "
|
|
1
|
+
import { workerData } from "../../9224.js";
|
|
2
2
|
import { createError } from "../utils/error.js";
|
|
3
|
-
import { pMap } from "../../
|
|
3
|
+
import { pMap } from "../../8311.js";
|
|
4
4
|
import { renderPage } from "./renderPage.js";
|
|
5
5
|
const params = workerData?.[1]?.params;
|
|
6
6
|
if (!params) throw createError('SSG Worker Thread workerData params missing');
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
import { logger, picocolors } from "../../
|
|
3
|
-
import { chunk } from "../../7744.421b464f.js";
|
|
1
|
+
/*! LICENSE: renderPages.js.LICENSE.txt */
|
|
2
|
+
import { chunk, logger, picocolors } from "../../4524.js";
|
|
4
3
|
import { SSGWorkerThreadTaskSize, getNumberOfThreads, SSGWorkerThreadRecyclerMaxMemory, SSGConcurrency } from "./ssgEnv.js";
|
|
5
|
-
import { pMap } from "../../
|
|
4
|
+
import { pMap } from "../../8311.js";
|
|
6
5
|
import { renderPage } from "./renderPage.js";
|
|
7
6
|
import { hintSSGFailed } from "../logger/hint.js";
|
|
8
7
|
import { renderHtmlTemplate } from "./renderHtmlTemplate.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { logger, writeFile, mkdir, rm, join } from "../../
|
|
2
|
-
import { isDebugMode } from "../../9348.1beb3e25.js";
|
|
1
|
+
import { logger, writeFile, mkdir, rm, join, isDebugMode } from "../../4524.js";
|
|
3
2
|
import { NODE_SSG_BUNDLE_FOLDER, NODE_SSG_BUNDLE_NAME } from "../constants.js";
|
|
4
3
|
import { renderPages } from "./renderPages.js";
|
|
5
4
|
const rsbuildPluginSSG = ({ routeService, config })=>({
|
|
@@ -7,4 +7,4 @@ declare function SSGWorkerThreadTaskSize(): number;
|
|
|
7
7
|
declare function SSGWorkerThreadRecyclerMaxMemory(): number | undefined;
|
|
8
8
|
declare function getNumberOfThreads(pathnamesLength: number): number;
|
|
9
9
|
declare function SSGConcurrency(): number;
|
|
10
|
-
export {
|
|
10
|
+
export { getNumberOfThreads, SSGConcurrency, SSGWorkerThreadRecyclerMaxMemory, SSGWorkerThreadTaskSize, };
|
package/dist/node/ssg/ssgEnv.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
import { node_os } from "../../
|
|
1
|
+
/*! LICENSE: ssgEnv.js.LICENSE.txt */
|
|
2
|
+
import { node_os } from "../../4524.js";
|
|
3
3
|
/**
|
|
4
4
|
* these codes are copied from
|
|
5
5
|
* @link https://github.com/facebook/docusaurus/blob/45065e8d2b5831117b8d69fec1be28f5520cf105/packages/docusaurus/src/ssg/ssgEnv.ts#L11
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { getSidebarDataGroup } from "../../../
|
|
2
|
-
import { matchPath } from "../../../7744.421b464f.js";
|
|
1
|
+
import { matchPath, getSidebarDataGroup } from "../../../4524.js";
|
|
3
2
|
import { generateLlmsTxt, generateLlmsFullTxt } from "./llmsTxt.js";
|
|
4
3
|
async function emitLlmsTxt(config, routeService, emitAsset, mdContents) {
|
|
5
4
|
const base = config.base ?? '/';
|
|
@@ -87,12 +86,11 @@ function organizeBySidebar(sidebar, routes) {
|
|
|
87
86
|
const currSidebar = getSidebarDataGroup(sidebar, route);
|
|
88
87
|
if (0 === currSidebar.length) return;
|
|
89
88
|
const orderList = flatSidebar(currSidebar);
|
|
89
|
+
const normalizeLink = (p)=>p.replace(/\.html$/, '').replace(/\/index$/, '/');
|
|
90
90
|
routes.sort((a, b)=>{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (-1 === bIndex) bIndex = Number.MAX_SAFE_INTEGER;
|
|
95
|
-
return aIndex - bIndex;
|
|
91
|
+
const aIndex = orderList.findIndex((order)=>matchPath(normalizeLink(order), a));
|
|
92
|
+
const bIndex = orderList.findIndex((order)=>matchPath(normalizeLink(order), b));
|
|
93
|
+
return (-1 === aIndex ? Number.MAX_SAFE_INTEGER : aIndex) - (-1 === bIndex ? Number.MAX_SAFE_INTEGER : bIndex);
|
|
96
94
|
});
|
|
97
95
|
}
|
|
98
96
|
export { emitLlmsTxt };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { normalizeHref, withBase } from "../../../
|
|
2
|
-
import { logger } from "../../../6289.29817fb4.js";
|
|
1
|
+
import { normalizeHref, logger, withBase } from "../../../4524.js";
|
|
3
2
|
import { extractInfoFromFrontmatterWithAbsolutePath } from "../../auto-nav-sidebar/utils.js";
|
|
4
3
|
function routePathToMdPath(routePath, base) {
|
|
5
4
|
let url = routePath;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { unified, visit, remark_gfm, remark_stringify } from "../../
|
|
2
|
-
import { remark_mdx } from "../mdx/loader.15134034.js";
|
|
1
|
+
import { unified, visit, remark_gfm, remark_mdx, remark_stringify } from "../../7397.js";
|
|
3
2
|
function remarkSplitMdx(options = {}) {
|
|
4
3
|
return (tree)=>{
|
|
5
4
|
const newChildren = [];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { pathToFileURL,
|
|
2
|
-
import { logger, picocolors } from "../../6289.29817fb4.js";
|
|
1
|
+
import { createHead, logger, pathToFileURL, picocolors } from "../../4524.js";
|
|
3
2
|
import { hintSSGFailed } from "../logger/hint.js";
|
|
4
3
|
async function renderPage(route, ssrBundlePath) {
|
|
5
4
|
let render;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { logger, picocolors } from "../../
|
|
2
|
-
import { pMap } from "../../
|
|
1
|
+
import { logger, picocolors } from "../../4524.js";
|
|
2
|
+
import { pMap } from "../../8311.js";
|
|
3
3
|
import { renderPage } from "./renderPage.js";
|
|
4
4
|
import { SSGConcurrency } from "../ssg/ssgEnv.js";
|
|
5
5
|
const routePage2MdFilename = (routePath)=>{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { writeFile, mkdir, rm, join } from "../../
|
|
2
|
-
import { isDebugMode } from "../../9348.1beb3e25.js";
|
|
1
|
+
import { writeFile, mkdir, rm, join, isDebugMode } from "../../4524.js";
|
|
3
2
|
import { NODE_SSG_MD_BUNDLE_FOLDER, NODE_SSG_MD_BUNDLE_NAME } from "../constants.js";
|
|
4
3
|
import { renderPages } from "./renderPages.js";
|
|
5
4
|
import { emitLlmsTxt } from "./llms/emitLlmsTxt.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createHash as external_node_crypto_createHash } from "../../
|
|
1
|
+
import { createHash as external_node_crypto_createHash } from "../../4524.js";
|
|
2
2
|
function createHash(str) {
|
|
3
3
|
return external_node_crypto_createHash('sha256').update(str).digest('hex').slice(0, 8);
|
|
4
4
|
}
|
package/dist/node/utils/error.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { node_fs, core_rspack } from "../../
|
|
2
|
-
import { node_path, logger } from "../../6289.29817fb4.js";
|
|
3
|
-
import { createProcessor, MDX_OR_MD_REGEXP } from "../../9348.1beb3e25.js";
|
|
1
|
+
import { node_fs, node_path, core_rspack, logger, createProcessor, MDX_OR_MD_REGEXP } from "../../4524.js";
|
|
4
2
|
import { createError } from "./error.js";
|
|
5
3
|
import { importStatementRegex } from "../constants.js";
|
|
6
4
|
const RspackResolveFactory = core_rspack.experiments.resolver.ResolverFactory;
|
package/dist/node/utils/fs.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { node_path, logger, picocolors } from "../../
|
|
2
|
-
import { core_rspack } from "../../7744.421b464f.js";
|
|
1
|
+
import { node_path, core_rspack, logger, picocolors } from "../../4524.js";
|
|
3
2
|
import { pathExists, readJson } from "./fs.js";
|
|
4
3
|
import { PACKAGE_ROOT } from "../constants.js";
|
|
5
4
|
import { hintReactVersion } from "../logger/hint.js";
|
|
@@ -26,7 +25,8 @@ async function resolveReactRouterDomAlias() {
|
|
|
26
25
|
extensions: [
|
|
27
26
|
'.js'
|
|
28
27
|
],
|
|
29
|
-
alias
|
|
28
|
+
alias,
|
|
29
|
+
enablePnp: !!process.versions.pnp
|
|
30
30
|
});
|
|
31
31
|
try {
|
|
32
32
|
const resolved = await resolver.async(basedir, 'react-router-dom/package.json');
|
|
@@ -59,12 +59,16 @@ async function resolveReactAlias(isSSR) {
|
|
|
59
59
|
'.js'
|
|
60
60
|
],
|
|
61
61
|
alias,
|
|
62
|
-
conditionNames:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
conditionNames: [
|
|
63
|
+
...isSSR ? [
|
|
64
|
+
'node'
|
|
65
|
+
] : [
|
|
66
|
+
'browser'
|
|
67
|
+
],
|
|
68
|
+
'import',
|
|
69
|
+
'module'
|
|
70
|
+
],
|
|
71
|
+
enablePnp: !!process.versions.pnp
|
|
68
72
|
});
|
|
69
73
|
await Promise.all(libPaths.map(async (lib)=>{
|
|
70
74
|
try {
|
|
@@ -98,7 +102,8 @@ async function resolveReactRenderToMarkdownAlias() {
|
|
|
98
102
|
'require',
|
|
99
103
|
'node',
|
|
100
104
|
'default'
|
|
101
|
-
]
|
|
105
|
+
],
|
|
106
|
+
enablePnp: !!process.versions.pnp
|
|
102
107
|
});
|
|
103
108
|
try {
|
|
104
109
|
const resolved = await resolver.async(process.cwd(), 'react-render-to-markdown');
|