@rspress/core 1.43.2 → 1.43.4

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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { mergeDocConfig } from '@rspress/shared/node-utils';
2
2
  import type { RsbuildConfig } from '@rsbuild/core';
3
+ import { RsbuildInstance } from '@rsbuild/core';
3
4
  import { UserConfig } from '@rspress/shared';
4
5
 
5
6
  export declare function build(options: BuildOptions): Promise<void>;
@@ -21,7 +22,7 @@ declare interface DevOptions {
21
22
 
22
23
  export { mergeDocConfig }
23
24
 
24
- export declare function serve(options: ServeOptions): Promise<void>;
25
+ export declare function serve(options: ServeOptions): Promise<ReturnType<RsbuildInstance['preview']>>;
25
26
 
26
27
  declare interface ServeOptions {
27
28
  config: UserConfig;
package/dist/index.js CHANGED
@@ -1537,7 +1537,7 @@ async function dev(options) {
1537
1537
  }
1538
1538
  }
1539
1539
  var package_namespaceObject = {
1540
- i8: "1.43.2"
1540
+ i8: "1.43.4"
1541
1541
  };
1542
1542
  async function renderFrontmatterHead(route) {
1543
1543
  if (!isRouteMeta(route)) return '';
@@ -1701,7 +1701,7 @@ async function serve(options) {
1701
1701
  await pluginDriver.init();
1702
1702
  const modifiedConfig = await pluginDriver.modifyConfig();
1703
1703
  const builder = await initRsbuild(config.root, modifiedConfig, pluginDriver, false);
1704
- await builder.preview();
1704
+ return builder.preview();
1705
1705
  }
1706
1706
  var __webpack_exports__mergeDocConfig = __WEBPACK_EXTERNAL_MODULE__rspress_shared_node_utils_78947ce6__.mergeDocConfig;
1707
1707
  export { build, dev, serve, __webpack_exports__mergeDocConfig as mergeDocConfig };
package/dist/loader.js CHANGED
@@ -242,7 +242,7 @@ function checkLinks(links, filepath, root, routeService) {
242
242
  const errorInfos = [];
243
243
  links.filter((link)=>!IGNORE_REGEXP.test(link)).map((link)=>normalizePath(link)).forEach((link)=>{
244
244
  const relativePath = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].relative(root, filepath);
245
- if (!routeService.isExistRoute((0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.cleanUrl)(link))) errorInfos.push(`Internal link to ${link} is dead, check it in ${relativePath}`);
245
+ if (!routeService.isExistRoute((0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.cleanUrl)(link))) errorInfos.push(`Internal link to "${link}" is dead, check it in "${relativePath}"`);
246
246
  });
247
247
  if (errorInfos.length > 0) {
248
248
  null == errorInfos || errorInfos.forEach((err)=>{
@@ -267,7 +267,7 @@ const remarkCheckDeadLinks = (checkLink)=>{
267
267
  checkLinks(Array.from(internalLinks), vfile.path, root, routeService);
268
268
  };
269
269
  };
270
- const remarkPluginNormalizeLink = ({ base, root, cleanUrls })=>(tree, file)=>{
270
+ const remarkPluginNormalizeLink = ({ root, cleanUrls })=>(tree, file)=>{
271
271
  const images = [];
272
272
  (0, __WEBPACK_EXTERNAL_MODULE_unist_util_visit_555e002a__.visit)(tree, 'link', (node)=>{
273
273
  if (!node.url) return;
@@ -286,7 +286,7 @@ const remarkPluginNormalizeLink = ({ base, root, cleanUrls })=>(tree, file)=>{
286
286
  if (url.startsWith('.')) url = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].posix.join((0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.slash)(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].dirname(relativePath)), url);
287
287
  url = (0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.normalizeHref)(url, cleanUrls);
288
288
  if (hash) url += `#${hash}`;
289
- node.url = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].posix.join(base, url);
289
+ node.url = url;
290
290
  });
291
291
  const normalizeImageUrl = (imageUrl)=>{
292
292
  if ((0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.isExternalUrl)(imageUrl) || imageUrl.startsWith('/')) return '';
@@ -437,7 +437,6 @@ async function createMDXOptions(docDirectory, config, checkDeadLinks, routeServi
437
437
  [
438
438
  remarkPluginNormalizeLink,
439
439
  {
440
- base: (null == config ? void 0 : config.base) || '',
441
440
  cleanUrls,
442
441
  defaultLang,
443
442
  root: docDirectory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/core",
3
- "version": "1.43.2",
3
+ "version": "1.43.4",
4
4
  "description": "The Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -73,13 +73,13 @@
73
73
  "unified": "^10.1.2",
74
74
  "unist-util-visit": "^4.1.2",
75
75
  "unist-util-visit-children": "^2.0.2",
76
- "@rspress/plugin-auto-nav-sidebar": "1.43.2",
77
- "@rspress/plugin-last-updated": "1.43.2",
78
- "@rspress/plugin-container-syntax": "1.43.2",
79
- "@rspress/runtime": "1.43.2",
80
- "@rspress/plugin-medium-zoom": "1.43.2",
81
- "@rspress/shared": "1.43.2",
82
- "@rspress/theme-default": "1.43.2"
76
+ "@rspress/plugin-auto-nav-sidebar": "1.43.4",
77
+ "@rspress/plugin-last-updated": "1.43.4",
78
+ "@rspress/plugin-container-syntax": "1.43.4",
79
+ "@rspress/plugin-medium-zoom": "1.43.4",
80
+ "@rspress/runtime": "1.43.4",
81
+ "@rspress/theme-default": "1.43.4",
82
+ "@rspress/shared": "1.43.4"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@microsoft/api-extractor": "^7.49.2",