@rspress/core 2.0.0-beta.22 → 2.0.0-beta.24
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/208.js +0 -2
- package/dist/309.js +0 -2
- package/dist/94.js +0 -2
- package/dist/cli.js +1 -3
- package/dist/index.d.ts +14 -5
- package/dist/index.js +317 -367
- package/dist/loader.d.ts +3 -1
- package/dist/loader.js +3 -6
- package/dist/processor.d.ts +5 -2
- package/dist/processor.js +270 -238
- package/dist/renderPageWorker.js +2 -2
- package/dist/runtime/ssrServerEntry.js +2 -2
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.js +2 -2
- package/dist/shiki-transformers.js +13 -13
- package/package.json +7 -8
package/dist/208.js
CHANGED
package/dist/309.js
CHANGED
package/dist/94.js
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import 'module';
|
|
2
|
-
/*#__PURE__*/ import.meta.url;
|
|
3
1
|
import node_path from "node:path";
|
|
4
2
|
import { logger } from "@rspress/shared/logger";
|
|
5
3
|
import { cac } from "cac";
|
|
@@ -8,7 +6,7 @@ import picocolors from "picocolors";
|
|
|
8
6
|
import { build, dev, serve } from "./index.js";
|
|
9
7
|
import node_fs from "node:fs";
|
|
10
8
|
import { DEFAULT_CONFIG_EXTENSIONS, DEFAULT_CONFIG_NAME } from "@rspress/shared/constants";
|
|
11
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
|
9
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.24"}');
|
|
12
10
|
const findConfig = (basePath)=>DEFAULT_CONFIG_EXTENSIONS.map((ext)=>basePath + ext).find(node_fs.existsSync);
|
|
13
11
|
async function loadConfigFile(customConfigFile) {
|
|
14
12
|
const baseDir = process.cwd();
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { getIconUrlPath } from '@rspress/shared/node-utils';
|
|
|
5
5
|
import { getNodeAttribute } from '@rspress/shared/node-utils';
|
|
6
6
|
import { getSidebarDataGroup } from '@rspress/shared';
|
|
7
7
|
import { logger } from '@rspress/shared/logger';
|
|
8
|
+
import { MarkdownOptions } from '@rspress/shared';
|
|
8
9
|
import { matchPath } from '@rspress/runtime/server';
|
|
9
10
|
import { mergeDocConfig } from '@rspress/shared/node-utils';
|
|
10
11
|
import { Nav } from '@rspress/shared';
|
|
@@ -18,6 +19,7 @@ import { removeTrailingSlash } from '@rspress/shared';
|
|
|
18
19
|
import { RouteMeta } from '@rspress/shared';
|
|
19
20
|
import type { RsbuildConfig } from '@rsbuild/core';
|
|
20
21
|
import { RsbuildInstance } from '@rsbuild/core';
|
|
22
|
+
import type { Rspack as Rspack_2 } from '@rsbuild/core';
|
|
21
23
|
import { RSPRESS_TEMP_DIR } from '@rspress/shared';
|
|
22
24
|
import { RspressPlugin } from '@rspress/shared';
|
|
23
25
|
import { Sidebar } from '@rspress/shared';
|
|
@@ -155,18 +157,23 @@ declare class PluginDriver {
|
|
|
155
157
|
_runSerialAsyncHook<H extends RspressPluginHookKeys>(hookName: H, ...args: Parameters<Required<RspressPlugin>[H]>): RspressPlugin;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
|
-
export declare const remarkFileCodeBlock: Plugin_2<[
|
|
160
|
+
export declare const remarkFileCodeBlock: Plugin_2<[
|
|
161
|
+
{
|
|
159
162
|
filepath: string;
|
|
160
|
-
|
|
163
|
+
addDependency?: Rspack_2.LoaderContext['addDependency'];
|
|
164
|
+
}
|
|
165
|
+
], Root>;
|
|
161
166
|
|
|
162
167
|
/**
|
|
163
168
|
* Remark plugin to normalize a link href
|
|
169
|
+
* 1. add version and lang prefix to the link
|
|
170
|
+
* 2. checkDeadLinks
|
|
164
171
|
*/
|
|
165
|
-
export declare const
|
|
172
|
+
export declare const remarkLink: Plugin_2<[
|
|
166
173
|
{
|
|
167
174
|
cleanUrls: boolean | string;
|
|
168
175
|
routeService: RouteService | null;
|
|
169
|
-
|
|
176
|
+
remarkLinkOptions?: MarkdownOptions['link'];
|
|
170
177
|
__base?: string;
|
|
171
178
|
}
|
|
172
179
|
], Root>;
|
|
@@ -227,7 +234,8 @@ export declare class RouteService {
|
|
|
227
234
|
isExistRoute(routePath: string): boolean;
|
|
228
235
|
generateRoutesCode(): string;
|
|
229
236
|
private generateRoutesCodeByRouteMeta;
|
|
230
|
-
getRoutePathParts(relativePath: string):
|
|
237
|
+
getRoutePathParts(relativePath: string): string[];
|
|
238
|
+
splitRoutePathParts(relativePath: string): readonly [string, string, string];
|
|
231
239
|
normalizeRoutePath(relativePath: string): {
|
|
232
240
|
pureRoutePath: string;
|
|
233
241
|
routePath: string;
|
|
@@ -235,6 +243,7 @@ export declare class RouteService {
|
|
|
235
243
|
version: string;
|
|
236
244
|
};
|
|
237
245
|
absolutePathToRoutePath(absolutePath: string): string;
|
|
246
|
+
isInDocsDir(absolutePath: string): boolean;
|
|
238
247
|
absolutePathToRelativePath(absolutePath: string): string;
|
|
239
248
|
getRoutePageByRoutePath(routePath: string): RoutePage | undefined;
|
|
240
249
|
}
|