@rspress/core 2.0.21 → 2.0.22
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/cli/index.js +12 -13
- package/dist/config/loadConfigFile.d.ts +3 -4
- package/dist/config/loadConfigFile.js +13 -17
- package/dist/{7748~0.js → d~0.js} +0 -2
- package/dist/eject-theme/components/Llms/LlmsHint.test.tsx +8 -0
- package/dist/eject-theme/components/Llms/LlmsHint.tsx +11 -3
- package/dist/eject-theme/components/Nav/NavMenu.scss +4 -0
- package/dist/eject-theme/components/Nav/NavMenu.tsx +20 -13
- package/dist/eject-theme/components/Nav/index.tsx +30 -4
- package/dist/eject-theme/components/NavHamburger/index.tsx +11 -3
- package/dist/eject-theme/components/NavList/context.ts +3 -0
- package/dist/eject-theme/components/NavList/index.tsx +24 -0
- package/dist/eject-theme/components/NavScreen/NavScreenMenu.test.tsx +59 -0
- package/dist/eject-theme/components/NavScreen/NavScreenMenu.tsx +43 -2
- package/dist/eject-theme/components/NavScreen/index.scss +0 -6
- package/dist/eject-theme/components/NavScreen/index.tsx +20 -3
- package/dist/eject-theme/components/ReadPercent/useReadPercent.ts +1 -1
- package/dist/eject-theme/components/Search/SearchButton.scss +1 -0
- package/dist/eject-theme/components/Search/SearchPanel.scss +51 -12
- package/dist/eject-theme/components/Search/SearchPanel.tsx +54 -212
- package/dist/eject-theme/components/Search/logic/providers/LocalProvider.ts +38 -16
- package/dist/eject-theme/components/Search/useSearchPanel.ts +216 -0
- package/dist/eject-theme/components/Steps/index.scss +1 -1
- package/dist/eject-theme/components/SwitchAppearance/getClipPath.test.ts +15 -0
- package/dist/eject-theme/components/SwitchAppearance/getClipPath.ts +26 -0
- package/dist/eject-theme/components/SwitchAppearance/index.tsx +22 -26
- package/dist/eject-theme/components/Tabs/index.tsx +14 -14
- package/dist/index.js +1 -1
- package/dist/node/PluginDriver.d.ts +1 -1
- package/dist/node/PluginDriver.js +5 -9
- package/dist/node/auto-nav-sidebar/index.js +1 -1
- package/dist/node/auto-nav-sidebar/locales.js +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +6 -6
- package/dist/node/auto-nav-sidebar/utils.js +1 -1
- package/dist/node/auto-nav-sidebar/walk.js +1 -1
- package/dist/node/build.d.ts +3 -2
- package/dist/node/build.js +9 -3
- package/dist/node/constants.js +1 -1
- package/dist/node/dev.d.ts +4 -4
- package/dist/node/dev.js +8 -6
- package/dist/node/eject.js +5 -5
- package/dist/node/initRsbuild.d.ts +2 -3
- package/dist/node/initRsbuild.js +9 -7
- package/dist/node/last-updated/index.js +2 -2
- package/dist/node/logger/hint.js +4 -4
- package/dist/node/mdx/options.js +1 -1
- package/dist/node/mdx/processor.js +3 -3
- package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
- package/dist/node/mdx/rehypePlugins/headerAnchor.js +1 -1
- package/dist/node/mdx/rehypePlugins/shiki.js +1 -1
- package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
- package/dist/node/mdx/remarkPlugins/containerSyntax.js +6 -5
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +5 -5
- package/dist/node/mdx/remarkPlugins/image.js +5 -5
- package/dist/node/mdx/remarkPlugins/link.js +5 -5
- package/dist/node/mdx/remarkPlugins/toc.js +1 -1
- package/dist/node/medium-zoom/index.js +1 -1
- package/dist/node/route/RoutePage.js +6 -4
- package/dist/node/route/RouteService.js +3 -3
- package/dist/node/route/extractPageData.js +20 -7
- package/dist/node/route/normalizeRoutePath.js +1 -1
- package/dist/node/runtimeModule/i18n.js +5 -5
- package/dist/node/runtimeModule/pageData/createPageData.js +1 -1
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -1
- 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.d.ts +3 -3
- package/dist/node/serve.js +10 -4
- package/dist/node/ssg/alternateLinks.js +1 -1
- package/dist/node/ssg/htmlFile.js +1 -1
- package/dist/node/ssg/renderHtmlTemplate.js +1 -1
- package/dist/node/ssg/renderPage.js +5 -5
- package/dist/node/ssg/renderPageWorker.js +2 -2
- package/dist/node/ssg/renderPages.js +6 -6
- package/dist/node/ssg/rsbuildPluginSSG.js +1 -1
- package/dist/node/ssg/ssgEnv.js +1 -1
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +1 -1
- package/dist/node/ssg-md/llms/llmsTxt.js +1 -1
- package/dist/node/ssg-md/remarkSplitMdx.js +1 -1
- package/dist/node/ssg-md/renderPage.js +5 -5
- package/dist/node/ssg-md/renderPages.js +6 -6
- package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -1
- package/dist/node/utils/checkLanguageParity.js +5 -7
- package/dist/node/utils/createHash.js +1 -1
- package/dist/node/utils/error.js +4 -4
- package/dist/node/utils/flattenMdxContent.js +2 -2
- package/dist/node/utils/fs.js +1 -1
- package/dist/node/utils/getPageKey.js +1 -1
- package/dist/node/utils/index.d.ts +1 -1
- package/dist/node/utils/reactAlias.js +5 -5
- package/dist/node/utils/slash.d.ts +1 -0
- package/dist/node/utils/slash.js +4 -0
- package/dist/{864~0.js → n~0.js} +41 -41
- package/dist/{2711~0.js → o~0.js} +90 -56
- package/dist/rslib-runtime~0.js +27 -35
- package/dist/theme/components/Link/useLinkNavigate.js +1 -1
- package/dist/theme/components/Llms/LlmsHint.js +23 -6
- package/dist/theme/components/Nav/NavMenu.css +4 -0
- package/dist/theme/components/Nav/NavMenu.d.ts +4 -2
- package/dist/theme/components/Nav/NavMenu.js +17 -9
- package/dist/theme/components/Nav/index.d.ts +7 -1
- package/dist/theme/components/Nav/index.js +13 -4
- package/dist/theme/components/NavHamburger/index.d.ts +2 -1
- package/dist/theme/components/NavHamburger/index.js +8 -2
- package/dist/theme/components/NavList/context.d.ts +1 -0
- package/dist/theme/components/NavList/context.js +3 -0
- package/dist/theme/components/NavList/index.d.ts +6 -0
- package/dist/theme/components/NavList/index.js +17 -0
- package/dist/theme/components/NavScreen/NavScreenMenu.d.ts +3 -2
- package/dist/theme/components/NavScreen/NavScreenMenu.js +42 -6
- package/dist/theme/components/NavScreen/index.css +0 -10
- package/dist/theme/components/NavScreen/index.d.ts +2 -1
- package/dist/theme/components/NavScreen/index.js +11 -3
- package/dist/theme/components/PackageManagerTabs/index.js +2 -2
- package/dist/theme/components/ReadPercent/useReadPercent.js +1 -0
- package/dist/theme/components/Search/SearchButton.css +1 -0
- package/dist/theme/components/Search/SearchPanel.css +47 -9
- package/dist/theme/components/Search/SearchPanel.js +97 -205
- package/dist/theme/components/Search/logic/providers/LocalProvider.d.ts +1 -0
- package/dist/theme/components/Search/logic/providers/LocalProvider.js +23 -13
- package/dist/theme/components/Search/logic/search.js +1 -1
- package/dist/theme/components/Search/useSearchPanel.d.ts +23 -0
- package/dist/theme/components/Search/useSearchPanel.js +155 -0
- package/dist/theme/components/Steps/index.css +3 -3
- package/dist/theme/components/SwitchAppearance/getClipPath.d.ts +8 -0
- package/dist/theme/components/SwitchAppearance/getClipPath.js +13 -0
- package/dist/theme/components/SwitchAppearance/index.js +9 -7
- package/dist/theme/components/Tabs/index.js +4 -4
- package/dist/theme/components/Tag/index.js +2 -2
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme/layout/DocLayout/index.js +2 -2
- package/dist/theme/layout/Layout/index.js +12 -4
- package/dist/theme/logic/useFullTextSearch.js +6 -1
- package/dist/theme/styles/vars/shiki-vars.css +1 -1
- package/dist/tinypool~0.js +5 -3
- package/dist/{4538~0.js → t~0.js} +2 -2
- package/dist/{8472~0.js → v~0.js} +1 -1
- package/package.json +11 -12
- package/dist/eject-theme/components/NavScreen/NavScreenMenuOthers.tsx +0 -29
- package/dist/node/utils/normalizePath.d.ts +0 -3
- package/dist/node/utils/normalizePath.js +0 -10
- package/dist/theme/components/NavScreen/NavScreenMenuOthers.d.ts +0 -2
- package/dist/theme/components/NavScreen/NavScreenMenuOthers.js +0 -30
- package/dist/theme/logic/useHandler.d.ts +0 -6
- package/dist/theme/logic/useHandler.js +0 -7
- /package/dist/{9857~0.js → 4~0.js} +0 -0
- /package/dist/{8016~0.js → i~0.js} +0 -0
- /package/dist/{5357~0.js → r~0.js} +0 -0
- /package/dist/{102~0.js → t2~0.js} +0 -0
- /package/dist/{9940~0.js → tx~0.js} +0 -0
package/dist/node/initRsbuild.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { external_node_process_cwd, node_path, fileURLToPath, addTrailingSlash, PLUGIN_REACT_NAME, removeTrailingSlash, normalizeDarkMode, pluginVirtualModule, pluginReact, createRequire, MDX_OR_MD_REGEXP } from "../
|
|
1
|
+
import { external_node_process_cwd, node_path, fileURLToPath, addTrailingSlash, PLUGIN_REACT_NAME, removeTrailingSlash, normalizeDarkMode, pluginVirtualModule, pluginReact, createRequire, MDX_OR_MD_REGEXP } from "../o~0.js";
|
|
2
2
|
import { createError } from "./utils/error.js";
|
|
3
3
|
import { CSR_CLIENT_ENTRY, SSR_CLIENT_ENTRY, OUTPUT_DIR, SSG_MD_SERVER_ENTRY, NODE_SSG_BUNDLE_FOLDER, getInlineLocaleRedirectScript, isProduction, PACKAGE_ROOT, SSR_SERVER_ENTRY, TEMPLATE_PATH, NODE_SSG_MD_BUNDLE_FOLDER, DEFAULT_THEME, NODE_SSG_MD_BUNDLE_NAME, getInlineThemeScript, DEFAULT_TITLE, NODE_SSG_BUNDLE_NAME } from "./constants.js";
|
|
4
4
|
import { isLlmsUIEnabled, isLlmsHintEnabled } from "./llms.js";
|
|
@@ -16,7 +16,7 @@ import { siteDataVMPlugin } from "./runtimeModule/siteData/rsbuildPlugin.js";
|
|
|
16
16
|
import { rsbuildPluginSSG } from "./ssg/rsbuildPluginSSG.js";
|
|
17
17
|
import { rsbuildPluginCSR } from "./ssg/rsbuildPluginCSR.js";
|
|
18
18
|
import { rsbuildPluginSSGMD } from "./ssg-md/rsbuildPluginSSGMD.js";
|
|
19
|
-
import { package_namespaceObject } from "../
|
|
19
|
+
import { package_namespaceObject } from "../v~0.js";
|
|
20
20
|
function isPluginIncluded(config, pluginName) {
|
|
21
21
|
return Boolean(config.builderConfig?.plugins?.some((plugin)=>plugin && plugin.name === pluginName));
|
|
22
22
|
}
|
|
@@ -197,8 +197,7 @@ async function createInternalBuildConfig(userDocRoot, config, enableSSG, routeSe
|
|
|
197
197
|
...'false' !== process.env.RSPRESS_PERSISTENT_CACHE ? {
|
|
198
198
|
buildCache: {
|
|
199
199
|
buildDependencies: [
|
|
200
|
-
fileURLToPath(import.meta.url)
|
|
201
|
-
pluginDriver.getConfigFilePath()
|
|
200
|
+
fileURLToPath(import.meta.url)
|
|
202
201
|
],
|
|
203
202
|
cacheDigest: [
|
|
204
203
|
routeService.generateRoutesCode(),
|
|
@@ -376,17 +375,20 @@ async function createInternalBuildConfig(userDocRoot, config, enableSSG, routeSe
|
|
|
376
375
|
}
|
|
377
376
|
};
|
|
378
377
|
}
|
|
379
|
-
async function initRsbuild(rootDir,
|
|
378
|
+
async function initRsbuild(rootDir, configResult, pluginDriver, routeService, enableSSG, options = {}) {
|
|
379
|
+
const { content: config } = configResult;
|
|
380
380
|
const userDocRoot = node_path.resolve(rootDir || config.root);
|
|
381
381
|
hintBuilderPluginsBreakingChange(config);
|
|
382
382
|
const { createRsbuild, mergeRsbuildConfig } = await import("@rsbuild/core");
|
|
383
383
|
const internalRsbuildConfig = await createInternalBuildConfig(userDocRoot, config, enableSSG, routeService, pluginDriver, options.restart);
|
|
384
384
|
const rsbuildConfig = mergeRsbuildConfig(internalRsbuildConfig, ...pluginDriver.getPlugins()?.map((plugin)=>plugin.builderConfig ?? {}) || [], config.builderConfig || {}, options.extraRsbuildConfig || {});
|
|
385
|
-
if (options.configFileMeta) rsbuildConfig._privateMeta = options.configFileMeta;
|
|
386
385
|
const rsbuild = await createRsbuild({
|
|
387
386
|
callerName: 'rspress',
|
|
388
387
|
restart: options.restart,
|
|
389
|
-
|
|
388
|
+
config: {
|
|
389
|
+
...configResult,
|
|
390
|
+
content: rsbuildConfig
|
|
391
|
+
}
|
|
390
392
|
});
|
|
391
393
|
return rsbuild;
|
|
392
394
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { node_path, execa } from "../../
|
|
2
|
-
import { slash } from "../utils/
|
|
1
|
+
import { node_path, execa } from "../../n~0.js";
|
|
2
|
+
import { slash } from "../utils/slash.js";
|
|
3
3
|
function transform(timestamp, lang) {
|
|
4
4
|
return new Date(timestamp).toLocaleString(lang || 'zh');
|
|
5
5
|
}
|
package/dist/node/logger/hint.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { relative, logger, join, readFile } from "../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../rslib-runtime~0.js";
|
|
2
|
+
import { relative, logger, join, readFile } from "../../t~0.js";
|
|
3
3
|
import { pathExists } from "../utils/fs.js";
|
|
4
|
-
const picocolors =
|
|
5
|
-
var picocolors_default = /*#__PURE__*/
|
|
4
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
5
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
6
6
|
const THEME_DEFAULT_EXPORT_PATTERN = /export\s+default\s+\{/;
|
|
7
7
|
const THEME_OLD_IMPORT_0 = /from\s+['"]rspress\/theme['"]/;
|
|
8
8
|
const THEME_OLD_IMPORT_1 = /from\s+['"]@rspress\/core\/theme['"]/;
|
package/dist/node/mdx/options.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { node_path, rehype_external_links, rehype_raw, remark_cjk_friendly, nodeTypes, remark_gfm, rehype, remark_cjk_friendly_gfm_strikethrough } from "../../
|
|
1
|
+
import { node_path, rehype_external_links, rehype_raw, remark_cjk_friendly, nodeTypes, remark_gfm, rehype, remark_cjk_friendly_gfm_strikethrough } from "../../tx~0.js";
|
|
2
2
|
import { remarkToc } from "./remarkPlugins/toc.js";
|
|
3
3
|
import { remarkContainerSyntax } from "./remarkPlugins/containerSyntax.js";
|
|
4
4
|
import { remarkFileCodeBlock } from "./remarkPlugins/fileCodeBlock.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { node_path, extractTextAndId, createProcessor, loadFrontMatter } from "../../
|
|
1
|
+
import { node_path, extractTextAndId, createProcessor, loadFrontMatter } from "../../tx~0.js";
|
|
2
2
|
import { createMDXOptions } from "./options.js";
|
|
3
3
|
import { applyReplaceRules } from "../utils/applyReplaceRules.js";
|
|
4
4
|
import { escapeMarkdownHeadingIds } from "../utils/escapeHeadingIds.js";
|
|
5
|
-
import {
|
|
5
|
+
import { slash } from "../utils/slash.js";
|
|
6
6
|
import { createError } from "../utils/error.js";
|
|
7
7
|
async function compile(options) {
|
|
8
8
|
const { source, filepath, docDirectory, config, routeService, pluginDriver, addDependency, isSsgMd = false } = options;
|
|
@@ -49,7 +49,7 @@ async function compile(options) {
|
|
|
49
49
|
const result = `${compileResult}
|
|
50
50
|
|
|
51
51
|
MDXContent.__RSPRESS_PAGE_META = {};
|
|
52
|
-
MDXContent.__RSPRESS_PAGE_META["${encodeURIComponent(
|
|
52
|
+
MDXContent.__RSPRESS_PAGE_META["${encodeURIComponent(slash(node_path.relative(docDirectory, filepath)))}"] = ${JSON.stringify(pageMeta)};
|
|
53
53
|
`;
|
|
54
54
|
return result;
|
|
55
55
|
} catch (e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { visit } from "../../../
|
|
1
|
+
import { visit } from "../../../tx~0.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,4 +1,4 @@
|
|
|
1
|
-
import { visit, extractTextAndId, github_slugger, headingRank } from "../../../
|
|
1
|
+
import { visit, extractTextAndId, github_slugger, headingRank } from "../../../tx~0.js";
|
|
2
2
|
const rehypeHeaderAnchor = ()=>{
|
|
3
3
|
const slugger = new github_slugger();
|
|
4
4
|
return (tree)=>{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { transformerAddLang, transformerAddLineNumbers, transformerAddTitle, transformerAddFold, createCssVariablesTheme, transformerAddWrapCode } from "../../../
|
|
1
|
+
import { transformerAddLang, transformerAddLineNumbers, transformerAddTitle, transformerAddFold, createCssVariablesTheme, transformerAddWrapCode } from "../../../tx~0.js";
|
|
2
2
|
const cssVariablesTheme = createCssVariablesTheme({
|
|
3
3
|
name: 'css-variables',
|
|
4
4
|
variablePrefix: '--shiki-',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { node_path } from "../../../
|
|
1
|
+
import { node_path } from "../../../tx~0.js";
|
|
2
2
|
import { getDefaultImportAstNode } from "../../utils/getImportAstNode.js";
|
|
3
3
|
const remarkBuiltin = ({ globalComponents })=>(tree)=>{
|
|
4
4
|
const demos = globalComponents.map((componentPath)=>{
|
|
@@ -170,12 +170,13 @@ function transformer(tree, warnUnknownType) {
|
|
|
170
170
|
const newChild = createContainer(type, title, wrappedChildren);
|
|
171
171
|
tree.children.splice(i, j - i + 1, newChild);
|
|
172
172
|
break;
|
|
173
|
+
} else {
|
|
174
|
+
wrappedChildren.push({
|
|
175
|
+
...currentParagraph,
|
|
176
|
+
children: currentParagraph.children.filter((child)=>child !== firstTextNode)
|
|
177
|
+
});
|
|
178
|
+
j++;
|
|
173
179
|
}
|
|
174
|
-
wrappedChildren.push({
|
|
175
|
-
...currentParagraph,
|
|
176
|
-
children: currentParagraph.children.filter((child)=>child !== firstTextNode)
|
|
177
|
-
});
|
|
178
|
-
j++;
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
i++;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../../
|
|
3
|
-
import { visit, node_path, logger, cwd, readFile } from "../../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../../rslib-runtime~0.js";
|
|
2
|
+
import "../../../t~0.js";
|
|
3
|
+
import { visit, node_path, logger, cwd, readFile } from "../../../r~0.js";
|
|
4
4
|
import { createError } from "../../utils/error.js";
|
|
5
|
-
const picocolors =
|
|
6
|
-
var picocolors_default = /*#__PURE__*/
|
|
5
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
6
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
7
7
|
const ERROR_PREFIX = '[remarkFileCodeBlock]';
|
|
8
8
|
function parseFileFromMeta(meta) {
|
|
9
9
|
if (!meta) return '';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../../
|
|
3
|
-
import { visit, node_path, logger, isDataUrl, existsSync, getNodeAttribute, isExternalUrl, isProduction, parseUrl } from "../../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../../rslib-runtime~0.js";
|
|
2
|
+
import "../../../t~0.js";
|
|
3
|
+
import { visit, node_path, logger, isDataUrl, existsSync, getNodeAttribute, isExternalUrl, isProduction, parseUrl } from "../../../r~0.js";
|
|
4
4
|
import { createError } from "../../utils/error.js";
|
|
5
5
|
import { getDefaultImportAstNode } from "../../utils/getImportAstNode.js";
|
|
6
|
-
const picocolors =
|
|
7
|
-
var picocolors_default = /*#__PURE__*/
|
|
6
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
7
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
8
8
|
const normalizeImageUrl = (imageUrl)=>{
|
|
9
9
|
if (isExternalUrl(imageUrl) || imageUrl.startsWith('/')) return '';
|
|
10
10
|
return imageUrl;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../../
|
|
3
|
-
import { normalizeHref, node_path, addLeadingSlash, logger, visit, isExternalUrl, isProduction, parseUrl, withSiteOrigin, MDX_OR_MD_REGEXP, withBase } from "../../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../../rslib-runtime~0.js";
|
|
2
|
+
import "../../../t~0.js";
|
|
3
|
+
import { normalizeHref, node_path, addLeadingSlash, logger, visit, isExternalUrl, isProduction, parseUrl, withSiteOrigin, MDX_OR_MD_REGEXP, withBase } from "../../../r~0.js";
|
|
4
4
|
import { hintRelativeMarkdownLink } from "../../logger/hint.js";
|
|
5
5
|
import { createError } from "../../utils/error.js";
|
|
6
|
-
const picocolors =
|
|
7
|
-
var picocolors_default = /*#__PURE__*/
|
|
6
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
7
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
8
8
|
function createExcluder(checkOption) {
|
|
9
9
|
const excludes = 'object' == typeof checkOption ? checkOption.excludes : void 0;
|
|
10
10
|
const excludesUrl = Array.isArray(excludes) ? new Set(excludes) : void 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { visitChildren, extractTextAndId, github_slugger, slug } from "../../../
|
|
1
|
+
import { visitChildren, extractTextAndId, github_slugger, slug } from "../../../d~0.js";
|
|
2
2
|
const extractChildText = (child, preserveInlineMarkdown = true)=>{
|
|
3
3
|
if ('link' === child.type) return child.children?.map((child)=>extractChildText(child, preserveInlineMarkdown)).join('') ?? '';
|
|
4
4
|
if ('strong' === child.type) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { node_path } from "../../
|
|
1
|
+
import { node_path } from "../../o~0.js";
|
|
2
2
|
import { RouteService } from "./RouteService.js";
|
|
3
|
-
import { normalizePath, slash } from "../utils/normalizePath.js";
|
|
4
3
|
import { getPageKey } from "../utils/getPageKey.js";
|
|
4
|
+
import { slash } from "../utils/slash.js";
|
|
5
5
|
class RoutePage {
|
|
6
6
|
routeMeta;
|
|
7
7
|
pageIndexInfo;
|
|
@@ -21,12 +21,13 @@ class RoutePage {
|
|
|
21
21
|
}
|
|
22
22
|
static generateRouteMeta(routePath, filepath, docDir) {
|
|
23
23
|
const routeService = RouteService.getInstance();
|
|
24
|
+
const absolutePath = node_path.normalize(filepath);
|
|
24
25
|
const { routePath: normalizedPath, lang, pureRoutePath, version } = routeService.normalizeRoutePath(routePath);
|
|
25
26
|
return {
|
|
26
27
|
routePath: normalizedPath,
|
|
27
28
|
pureRoutePath,
|
|
28
|
-
absolutePath
|
|
29
|
-
relativePath: absolutePathToRelativePath(
|
|
29
|
+
absolutePath,
|
|
30
|
+
relativePath: absolutePathToRelativePath(absolutePath, docDir),
|
|
30
31
|
pageName: getPageKey(routePath),
|
|
31
32
|
lang,
|
|
32
33
|
version
|
|
@@ -37,6 +38,7 @@ function absolutePathToRelativePath(absolutePath, docsDir) {
|
|
|
37
38
|
return slash(node_path.relative(docsDir, absolutePath));
|
|
38
39
|
}
|
|
39
40
|
function absolutePathToRouteMeta(absolutePath, docsDir, routeService = RouteService.getInstance()) {
|
|
41
|
+
absolutePath = node_path.normalize(absolutePath);
|
|
40
42
|
const relativePath = absolutePathToRelativePath(absolutePath, docsDir);
|
|
41
43
|
const { lang, pureRoutePath, routePath, version } = routeService.normalizeRoutePath(relativePath);
|
|
42
44
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RSPRESS_TEMP_DIR, node_path, removeTrailingSlash, promises, addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, glob } from "../../
|
|
1
|
+
import { RSPRESS_TEMP_DIR, node_path, removeTrailingSlash, promises, addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, glob } from "../../o~0.js";
|
|
2
2
|
import { RoutePage, absolutePathToRoutePath, absolutePathToRelativePath } from "./RoutePage.js";
|
|
3
3
|
import { createError } from "../utils/error.js";
|
|
4
4
|
import { getRouteChunkName } from "./routeChunkAssets.js";
|
|
@@ -103,7 +103,7 @@ class RouteService {
|
|
|
103
103
|
const { routeMeta: { routePath } } = routePage;
|
|
104
104
|
if (this.routeData.has(routePath)) throw createError(`routePath ${routePath} has already been added`);
|
|
105
105
|
this.routeData.set(routePath, routePage);
|
|
106
|
-
this.#routeDataByFilePath.set(
|
|
106
|
+
this.#routeDataByFilePath.set(routePage.routeMeta.absolutePath, routePage);
|
|
107
107
|
}
|
|
108
108
|
getRoutes() {
|
|
109
109
|
return Array.from(this.routeData.values()).map((i)=>i.routeMeta);
|
|
@@ -155,7 +155,7 @@ import React from 'react';
|
|
|
155
155
|
import { lazyWithPreload } from "react-lazy-with-preload";
|
|
156
156
|
${routeMeta.map((route, index)=>{
|
|
157
157
|
const chunkName = getRouteChunkName(route);
|
|
158
|
-
return `const loadRoute${index} = () => import(/* webpackChunkName: "${chunkName}" */
|
|
158
|
+
return `const loadRoute${index} = () => import(/* webpackChunkName: "${chunkName}" */ ${JSON.stringify(route.absolutePath)})
|
|
159
159
|
const Route${index} = lazyWithPreload(loadRoute${index})`;
|
|
160
160
|
}).join('\n')}
|
|
161
161
|
export const routes = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unified, node_path, promises, loadFrontMatter,
|
|
1
|
+
import { unified, node_path, promises, loadFrontMatter, extractTextAndId, remark_gfm, remark_parse, MDX_OR_MD_REGEXP } from "../../o~0.js";
|
|
2
2
|
import { applyReplaceRules } from "../utils/applyReplaceRules.js";
|
|
3
3
|
import { flattenMdxContent } from "../utils/flattenMdxContent.js";
|
|
4
4
|
import { importStatementRegex } from "../constants.js";
|
|
@@ -34,21 +34,30 @@ const SEARCH_BLOCK_TYPES = new Set([
|
|
|
34
34
|
'listItem',
|
|
35
35
|
'tableRow'
|
|
36
36
|
]);
|
|
37
|
-
function extractSearchText(node, codeblocks) {
|
|
37
|
+
function extractSearchText(node, codeblocks, parentType) {
|
|
38
38
|
const { type } = node;
|
|
39
39
|
if (SEARCH_SKIP_TYPES.has(type)) return [];
|
|
40
40
|
if ('code' === type && !codeblocks) return [];
|
|
41
41
|
if ('break' === type) return [
|
|
42
42
|
'\n'
|
|
43
43
|
];
|
|
44
|
-
if ('
|
|
44
|
+
if ('inlineCode' === type) return [
|
|
45
45
|
node.value
|
|
46
46
|
];
|
|
47
|
-
if ('
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
if ('text' === type) {
|
|
48
|
+
const value = 'heading' === parentType ? extractTextAndId(node.value)[0] : node.value;
|
|
49
|
+
return [
|
|
50
|
+
stripSearchMarkdownMarkers(value)
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
if ('code' === type) {
|
|
54
|
+
const value = stripSearchMarkdownMarkers(node.value);
|
|
55
|
+
return value ? [
|
|
56
|
+
`\n${value}\n`
|
|
57
|
+
] : [];
|
|
58
|
+
}
|
|
50
59
|
const result = [];
|
|
51
|
-
if ('children' in node) for (const child of node.children)result.push(...extractSearchText(child, codeblocks));
|
|
60
|
+
if ('children' in node) for (const child of node.children)result.push(...extractSearchText(child, codeblocks, type));
|
|
52
61
|
if (SEARCH_BLOCK_TYPES.has(type)) result.push('\n');
|
|
53
62
|
if ('tableCell' === type) result.push('\t');
|
|
54
63
|
return result;
|
|
@@ -96,6 +105,10 @@ const SKIP_NODE_TYPES = new Set([
|
|
|
96
105
|
]);
|
|
97
106
|
const CONTAINER_DIRECTIVE_REGEX = /^\s*:::\s*(\w+)\s*(.*)?/;
|
|
98
107
|
const CONTAINER_DIRECTIVE_END_REGEX = /^\s*:::\s*$/;
|
|
108
|
+
const GITHUB_ALERT_MARKER_REGEX = /^\s*\[!\w+\]\s*$/;
|
|
109
|
+
function stripSearchMarkdownMarkers(text) {
|
|
110
|
+
return text.split('\n').filter((line)=>!CONTAINER_DIRECTIVE_REGEX.test(line) && !CONTAINER_DIRECTIVE_END_REGEX.test(line) && !GITHUB_ALERT_MARKER_REGEX.test(line)).join('\n');
|
|
111
|
+
}
|
|
99
112
|
function stripContainerDirectives(text) {
|
|
100
113
|
const lines = text.split('\n');
|
|
101
114
|
const result = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, addLeadingSlash } from "../../
|
|
1
|
+
import { addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, addLeadingSlash } from "../../o~0.js";
|
|
2
2
|
const getRoutePathParts = (relativePath, lang, version, langs, versions)=>{
|
|
3
3
|
const [versionPart, langPart, purePath] = splitRoutePathParts(relativePath, lang, version, langs, versions);
|
|
4
4
|
return [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
3
|
-
import { createRequire, join, logger } from "../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../rslib-runtime~0.js";
|
|
2
|
+
import "../../t~0.js";
|
|
3
|
+
import { createRequire, join, logger } from "../../o~0.js";
|
|
4
4
|
import { DEFAULT_I18N_TEXT } from "./DEFAULT_I18N_TEXT.js";
|
|
5
5
|
import { createError } from "../utils/error.js";
|
|
6
6
|
import { pathExists } from "../utils/fs.js";
|
|
7
|
-
const picocolors =
|
|
8
|
-
var picocolors_default = /*#__PURE__*/
|
|
7
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
8
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
9
9
|
const i18n_require = createRequire(import.meta.url);
|
|
10
10
|
const DEFAULT_I18N_SOURCE_PATH = join(process.cwd(), 'i18n.json');
|
|
11
11
|
function mergeI18nData(...sources) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SEARCH_INDEX_NAME, groupBy } from "../../../
|
|
1
|
+
import { SEARCH_INDEX_NAME, groupBy } from "../../../o~0.js";
|
|
2
2
|
import { extractPageData } from "../../route/extractPageData.js";
|
|
3
3
|
import { createHash } from "../../utils/createHash.js";
|
|
4
4
|
function deletePrivateField(obj) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { logger, pluginVirtualModule } from "../../../
|
|
1
|
+
import { logger, pluginVirtualModule } from "../../../o~0.js";
|
|
2
2
|
import { createPageData } from "./createPageData.js";
|
|
3
3
|
const rsbuildPluginDocVM = async ({ config, userDocRoot, routeService, pluginDriver })=>{
|
|
4
4
|
const ref = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getIconUrlPath } from "../../../
|
|
1
|
+
import { getIconUrlPath } from "../../../o~0.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 "../../../o~0.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 { isProduction, logger } from "../../../
|
|
1
|
+
import { isProduction, logger } from "../../../o~0.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.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type RsbuildInstance } from '@rsbuild/core';
|
|
1
|
+
import { type LoadConfigResult, type RsbuildInstance } from '@rsbuild/core';
|
|
2
2
|
import type { UserConfig } from '@rspress/shared';
|
|
3
3
|
interface ServeOptions {
|
|
4
|
-
config: UserConfig
|
|
5
|
-
configFilePath
|
|
4
|
+
config: UserConfig | LoadConfigResult<UserConfig>;
|
|
5
|
+
configFilePath?: string;
|
|
6
6
|
port?: number;
|
|
7
7
|
host?: string;
|
|
8
8
|
}
|
package/dist/node/serve.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { mergeRsbuildConfig } from "../
|
|
1
|
+
import { mergeRsbuildConfig } from "../o~0.js";
|
|
2
|
+
import { normalizeConfigResult } from "../config/loadConfigFile.js";
|
|
2
3
|
import { PluginDriver } from "./PluginDriver.js";
|
|
3
4
|
import { initRsbuild } from "./initRsbuild.js";
|
|
4
5
|
import { RouteService } from "./route/RouteService.js";
|
|
5
6
|
async function serve(options) {
|
|
6
|
-
const {
|
|
7
|
+
const { port: userPort, host: userHost } = options;
|
|
8
|
+
const configResult = normalizeConfigResult(options.config, options.configFilePath);
|
|
9
|
+
const { content: config } = configResult;
|
|
7
10
|
const envPort = process.env.PORT;
|
|
8
11
|
const envHost = process.env.HOST;
|
|
9
12
|
const { builderConfig = {} } = config;
|
|
@@ -15,9 +18,12 @@ async function serve(options) {
|
|
|
15
18
|
host
|
|
16
19
|
}
|
|
17
20
|
});
|
|
18
|
-
const pluginDriver = await PluginDriver.create(
|
|
21
|
+
const pluginDriver = await PluginDriver.create(configResult.content, true);
|
|
19
22
|
const modifiedConfig = await pluginDriver.modifyConfig();
|
|
20
|
-
const rsbuild = await initRsbuild(config.root,
|
|
23
|
+
const rsbuild = await initRsbuild(config.root, {
|
|
24
|
+
...configResult,
|
|
25
|
+
content: modifiedConfig
|
|
26
|
+
}, pluginDriver, await RouteService.createSimple(), false);
|
|
21
27
|
return rsbuild.preview();
|
|
22
28
|
}
|
|
23
29
|
export { serve };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizeHref, removeTrailingSlash, addLeadingSlash, normalizePosixPath, withSiteOrigin } from "../../
|
|
1
|
+
import { normalizeHref, removeTrailingSlash, addLeadingSlash, normalizePosixPath, withSiteOrigin } from "../../o~0.js";
|
|
2
2
|
function createAlternateLinksByRoute(routes, config) {
|
|
3
3
|
const routeGroups = new Map();
|
|
4
4
|
for (const route of routes){
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { external_node_path_resolve, relative, isAbsolute } from "../../
|
|
1
|
+
import { external_node_path_resolve, relative, isAbsolute } from "../../v~0.js";
|
|
2
2
|
const routePath2HtmlFileName = (routePath)=>{
|
|
3
3
|
let fileName = routePath;
|
|
4
4
|
fileName = fileName.endsWith('/') ? `${routePath}index.html` : `${routePath}.html`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { posix } from "../../
|
|
1
|
+
import { posix } from "../../v~0.js";
|
|
2
2
|
import { META_GENERATOR, RSPRESS_VERSION, APP_HTML_MARKER, HEAD_MARKER } from "../constants.js";
|
|
3
3
|
import { routePath2HtmlFileName } from "./htmlFile.js";
|
|
4
4
|
import { createError } from "../utils/error.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
3
|
-
import { createHead, logger, transformHtmlTemplate, pathToFileURL } from "../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../rslib-runtime~0.js";
|
|
2
|
+
import "../../t~0.js";
|
|
3
|
+
import { createHead, logger, transformHtmlTemplate, pathToFileURL } from "../../v~0.js";
|
|
4
4
|
import { hintSSGFailed } from "../logger/hint.js";
|
|
5
5
|
import { renderHtmlTemplate } from "./renderHtmlTemplate.js";
|
|
6
|
-
const picocolors =
|
|
7
|
-
var picocolors_default = /*#__PURE__*/
|
|
6
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
7
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
8
8
|
async function renderPage(route, htmlTemplate, configHead, ssrBundlePath, alternateLinks = [], routeChunkAssets) {
|
|
9
9
|
let render;
|
|
10
10
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { writeFile, mkdir, dirname, workerData } from "../../
|
|
1
|
+
import { writeFile, mkdir, dirname, workerData } from "../../4~0.js";
|
|
2
2
|
import { createError } from "../utils/error.js";
|
|
3
3
|
import { resolveHtmlFilePath } from "./htmlFile.js";
|
|
4
|
-
import { pMap } from "../../
|
|
4
|
+
import { pMap } from "../../v~0.js";
|
|
5
5
|
import { renderPage } from "./renderPage.js";
|
|
6
6
|
const params = workerData?.[1]?.params;
|
|
7
7
|
if (!params) throw createError('SSG Worker Thread workerData params missing');
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*! LICENSE: renderPages.js.LICENSE.txt */
|
|
2
|
-
import {
|
|
3
|
-
import "../../
|
|
4
|
-
import { node_path, fileURLToPath, logger, chunk } from "../../
|
|
2
|
+
import { rspackRequire, compatGetDefaultExport } from "../../rslib-runtime~0.js";
|
|
3
|
+
import "../../t~0.js";
|
|
4
|
+
import { node_path, fileURLToPath, logger, chunk } from "../../o~0.js";
|
|
5
5
|
import { createAlternateLinksByRoute } from "./alternateLinks.js";
|
|
6
6
|
import { SSGWorkerThreadTaskSize, getNumberOfThreads, SSGWorkerThreadRecyclerMaxMemory, SSGConcurrency } from "./ssgEnv.js";
|
|
7
7
|
import { routePath2HtmlFileName } from "./htmlFile.js";
|
|
8
|
-
import { pMap } from "../../
|
|
8
|
+
import { pMap } from "../../v~0.js";
|
|
9
9
|
import { renderPage } from "./renderPage.js";
|
|
10
10
|
import { hintSSGFailed } from "../logger/hint.js";
|
|
11
11
|
import { renderHtmlTemplate } from "./renderHtmlTemplate.js";
|
|
12
|
-
const picocolors =
|
|
13
|
-
var picocolors_default = /*#__PURE__*/
|
|
12
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
13
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
14
14
|
async function renderPages(routeService, config, ssrBundlePath, htmlTemplate, emitAsset, workerOutputDistPath, routeChunkAssets) {
|
|
15
15
|
const startTime = Date.now();
|
|
16
16
|
const ssg = config.ssg ?? true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { logger, writeFile, mkdir, rm, join, isDebugMode } from "../../
|
|
1
|
+
import { logger, writeFile, mkdir, rm, join, isDebugMode } from "../../o~0.js";
|
|
2
2
|
import { NODE_SSG_BUNDLE_FOLDER, NODE_SSG_BUNDLE_NAME } from "../constants.js";
|
|
3
3
|
import { renderPages } from "./renderPages.js";
|
|
4
4
|
const rsbuildPluginSSG = ({ routeService, config, routeChunkAssets })=>({
|
package/dist/node/ssg/ssgEnv.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! LICENSE: ssgEnv.js.LICENSE.txt */
|
|
2
|
-
import { node_os } from "../../
|
|
2
|
+
import { node_os } from "../../o~0.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,4 +1,4 @@
|
|
|
1
|
-
import { matchPath, getSidebarDataGroup } from "../../../
|
|
1
|
+
import { matchPath, getSidebarDataGroup } from "../../../o~0.js";
|
|
2
2
|
import { generateLlmsTxt, generateLlmsFullTxt } from "./llmsTxt.js";
|
|
3
3
|
async function emitLlmsTxt(config, routeService, emitAsset, mdContents) {
|
|
4
4
|
const base = config.base ?? '/';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizeHref, withSiteOrigin, logger, withBase } from "../../../
|
|
1
|
+
import { normalizeHref, withSiteOrigin, logger, withBase } from "../../../o~0.js";
|
|
2
2
|
import { extractInfoFromFrontmatterWithAbsolutePath } from "../../auto-nav-sidebar/utils.js";
|
|
3
3
|
function routePathToMdPath(routePath, base, siteOrigin) {
|
|
4
4
|
let url = routePath;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
3
|
-
import { createHead, pathToFileURL, logger } from "../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../rslib-runtime~0.js";
|
|
2
|
+
import "../../t~0.js";
|
|
3
|
+
import { createHead, pathToFileURL, logger } from "../../o~0.js";
|
|
4
4
|
import { hintSSGFailed } from "../logger/hint.js";
|
|
5
|
-
const picocolors =
|
|
6
|
-
var picocolors_default = /*#__PURE__*/
|
|
5
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
6
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
7
7
|
async function renderPage(route, ssrBundlePath) {
|
|
8
8
|
let render;
|
|
9
9
|
try {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
3
|
-
import { logger } from "../../
|
|
4
|
-
import { pMap } from "../../
|
|
1
|
+
import { rspackRequire, compatGetDefaultExport } from "../../rslib-runtime~0.js";
|
|
2
|
+
import "../../t~0.js";
|
|
3
|
+
import { logger } from "../../o~0.js";
|
|
4
|
+
import { pMap } from "../../v~0.js";
|
|
5
5
|
import { renderPage } from "./renderPage.js";
|
|
6
6
|
import { SSGConcurrency } from "../ssg/ssgEnv.js";
|
|
7
|
-
const picocolors =
|
|
8
|
-
var picocolors_default = /*#__PURE__*/
|
|
7
|
+
const picocolors = rspackRequire("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
8
|
+
var picocolors_default = /*#__PURE__*/ compatGetDefaultExport(picocolors);
|
|
9
9
|
const routePage2MdFilename = (routePath)=>{
|
|
10
10
|
let fileName = routePath;
|
|
11
11
|
fileName = fileName.endsWith('/') ? `${routePath}index.md` : `${routePath}.md`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { writeFile, mkdir, rm, join, isDebugMode } from "../../
|
|
1
|
+
import { writeFile, mkdir, rm, join, isDebugMode } from "../../o~0.js";
|
|
2
2
|
import { NODE_SSG_MD_BUNDLE_FOLDER, NODE_SSG_MD_BUNDLE_NAME } from "../constants.js";
|
|
3
3
|
import { renderPages } from "./renderPages.js";
|
|
4
4
|
import { emitLlmsTxt } from "./llms/emitLlmsTxt.js";
|