rspress 2.0.0-beta.16 → 2.0.0-beta.17
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.js +1 -1
- package/meta-json-schema.json +94 -192
- package/package.json +5 -5
package/dist/index.js
CHANGED
@@ -6,7 +6,7 @@ import chokidar from "chokidar";
|
|
6
6
|
import picocolors from "picocolors";
|
7
7
|
import node_fs from "node:fs";
|
8
8
|
import { DEFAULT_CONFIG_EXTENSIONS, DEFAULT_CONFIG_NAME } from "@rspress/shared/constants";
|
9
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
9
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.17"}');
|
10
10
|
const findConfig = (basePath)=>DEFAULT_CONFIG_EXTENSIONS.map((ext)=>basePath + ext).find(node_fs.existsSync);
|
11
11
|
async function loadConfigFile(customConfigFile) {
|
12
12
|
const baseDir = process.cwd();
|
package/meta-json-schema.json
CHANGED
@@ -3,264 +3,166 @@
|
|
3
3
|
"$ref": "#/definitions/MetaJson",
|
4
4
|
"definitions": {
|
5
5
|
"MetaJson": {
|
6
|
-
"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
{
|
14
|
-
"type": "array",
|
15
|
-
"items": {
|
16
|
-
"$ref": "#/definitions/NavItem"
|
17
|
-
}
|
18
|
-
}
|
19
|
-
]
|
6
|
+
"$ref": "#/definitions/SideMeta"
|
7
|
+
},
|
8
|
+
"SideMeta": {
|
9
|
+
"type": "array",
|
10
|
+
"items": {
|
11
|
+
"$ref": "#/definitions/SideMetaItem"
|
12
|
+
}
|
20
13
|
},
|
21
14
|
"SideMetaItem": {
|
22
15
|
"anyOf": [
|
23
16
|
{
|
24
|
-
"
|
25
|
-
"properties": {
|
26
|
-
"type": {
|
27
|
-
"type": "string",
|
28
|
-
"const": "file"
|
29
|
-
},
|
30
|
-
"name": {
|
31
|
-
"type": "string"
|
32
|
-
},
|
33
|
-
"label": {
|
34
|
-
"type": "string"
|
35
|
-
},
|
36
|
-
"tag": {
|
37
|
-
"type": "string"
|
38
|
-
},
|
39
|
-
"overviewHeaders": {
|
40
|
-
"type": "array",
|
41
|
-
"items": {
|
42
|
-
"type": "number"
|
43
|
-
}
|
44
|
-
},
|
45
|
-
"context": {
|
46
|
-
"type": "string"
|
47
|
-
}
|
48
|
-
},
|
49
|
-
"required": [
|
50
|
-
"type",
|
51
|
-
"name"
|
52
|
-
],
|
53
|
-
"additionalProperties": false
|
17
|
+
"$ref": "#/definitions/FileSideMeta"
|
54
18
|
},
|
55
19
|
{
|
56
|
-
"
|
57
|
-
"properties": {
|
58
|
-
"type": {
|
59
|
-
"type": "string",
|
60
|
-
"const": "dir"
|
61
|
-
},
|
62
|
-
"name": {
|
63
|
-
"type": "string"
|
64
|
-
},
|
65
|
-
"label": {
|
66
|
-
"type": "string"
|
67
|
-
},
|
68
|
-
"collapsible": {
|
69
|
-
"type": "boolean"
|
70
|
-
},
|
71
|
-
"collapsed": {
|
72
|
-
"type": "boolean"
|
73
|
-
},
|
74
|
-
"tag": {
|
75
|
-
"type": "string"
|
76
|
-
},
|
77
|
-
"overviewHeaders": {
|
78
|
-
"type": "array",
|
79
|
-
"items": {
|
80
|
-
"type": "number"
|
81
|
-
}
|
82
|
-
},
|
83
|
-
"context": {
|
84
|
-
"type": "string"
|
85
|
-
}
|
86
|
-
},
|
87
|
-
"required": [
|
88
|
-
"type",
|
89
|
-
"name"
|
90
|
-
],
|
91
|
-
"additionalProperties": false
|
20
|
+
"$ref": "#/definitions/DirSideMeta"
|
92
21
|
},
|
93
22
|
{
|
94
|
-
"
|
95
|
-
"properties": {
|
96
|
-
"type": {
|
97
|
-
"type": "string",
|
98
|
-
"const": "divider"
|
99
|
-
},
|
100
|
-
"dashed": {
|
101
|
-
"type": "boolean"
|
102
|
-
}
|
103
|
-
},
|
104
|
-
"required": [
|
105
|
-
"type"
|
106
|
-
],
|
107
|
-
"additionalProperties": false
|
23
|
+
"$ref": "#/definitions/DividerSideMeta"
|
108
24
|
},
|
109
25
|
{
|
110
|
-
"
|
111
|
-
"properties": {
|
112
|
-
"type": {
|
113
|
-
"type": "string",
|
114
|
-
"const": "section-header"
|
115
|
-
},
|
116
|
-
"label": {
|
117
|
-
"type": "string"
|
118
|
-
},
|
119
|
-
"tag": {
|
120
|
-
"type": "string"
|
121
|
-
}
|
122
|
-
},
|
123
|
-
"required": [
|
124
|
-
"type",
|
125
|
-
"label"
|
126
|
-
],
|
127
|
-
"additionalProperties": false
|
26
|
+
"$ref": "#/definitions/SectionHeaderMeta"
|
128
27
|
},
|
129
28
|
{
|
130
|
-
"
|
131
|
-
"properties": {
|
132
|
-
"type": {
|
133
|
-
"type": "string",
|
134
|
-
"const": "custom-link"
|
135
|
-
},
|
136
|
-
"label": {
|
137
|
-
"type": "string"
|
138
|
-
},
|
139
|
-
"link": {
|
140
|
-
"type": "string"
|
141
|
-
},
|
142
|
-
"context": {
|
143
|
-
"type": "string"
|
144
|
-
},
|
145
|
-
"tag": {
|
146
|
-
"type": "string"
|
147
|
-
}
|
148
|
-
},
|
149
|
-
"required": [
|
150
|
-
"type",
|
151
|
-
"label",
|
152
|
-
"link"
|
153
|
-
],
|
154
|
-
"additionalProperties": false
|
29
|
+
"$ref": "#/definitions/CustomLinkMeta"
|
155
30
|
},
|
156
31
|
{
|
157
32
|
"type": "string"
|
158
33
|
}
|
159
34
|
]
|
160
35
|
},
|
161
|
-
"
|
162
|
-
"anyOf": [
|
163
|
-
{
|
164
|
-
"$ref": "#/definitions/NavItemWithLink"
|
165
|
-
},
|
166
|
-
{
|
167
|
-
"$ref": "#/definitions/NavItemWithChildren"
|
168
|
-
},
|
169
|
-
{
|
170
|
-
"$ref": "#/definitions/NavItemWithLinkAndChildren"
|
171
|
-
}
|
172
|
-
]
|
173
|
-
},
|
174
|
-
"NavItemWithLink": {
|
36
|
+
"FileSideMeta": {
|
175
37
|
"type": "object",
|
176
38
|
"properties": {
|
177
|
-
"
|
39
|
+
"type": {
|
40
|
+
"type": "string",
|
41
|
+
"const": "file"
|
42
|
+
},
|
43
|
+
"name": {
|
178
44
|
"type": "string"
|
179
45
|
},
|
180
|
-
"
|
46
|
+
"label": {
|
181
47
|
"type": "string"
|
182
48
|
},
|
183
49
|
"tag": {
|
184
50
|
"type": "string"
|
185
51
|
},
|
186
|
-
"
|
187
|
-
"type": "
|
52
|
+
"overviewHeaders": {
|
53
|
+
"type": "array",
|
54
|
+
"items": {
|
55
|
+
"type": "number"
|
56
|
+
}
|
188
57
|
},
|
189
|
-
"
|
190
|
-
"type": "string"
|
191
|
-
"enum": [
|
192
|
-
"left",
|
193
|
-
"right"
|
194
|
-
]
|
58
|
+
"context": {
|
59
|
+
"type": "string"
|
195
60
|
}
|
196
61
|
},
|
197
62
|
"required": [
|
198
|
-
"
|
199
|
-
"
|
63
|
+
"type",
|
64
|
+
"name"
|
200
65
|
],
|
201
66
|
"additionalProperties": false
|
202
67
|
},
|
203
|
-
"
|
68
|
+
"DirSideMeta": {
|
204
69
|
"type": "object",
|
205
70
|
"properties": {
|
206
|
-
"
|
71
|
+
"type": {
|
72
|
+
"type": "string",
|
73
|
+
"const": "dir"
|
74
|
+
},
|
75
|
+
"name": {
|
76
|
+
"type": "string"
|
77
|
+
},
|
78
|
+
"label": {
|
207
79
|
"type": "string"
|
208
80
|
},
|
81
|
+
"collapsible": {
|
82
|
+
"type": "boolean"
|
83
|
+
},
|
84
|
+
"collapsed": {
|
85
|
+
"type": "boolean"
|
86
|
+
},
|
209
87
|
"tag": {
|
210
88
|
"type": "string"
|
211
89
|
},
|
212
|
-
"
|
90
|
+
"overviewHeaders": {
|
213
91
|
"type": "array",
|
214
92
|
"items": {
|
215
|
-
"
|
93
|
+
"type": "number"
|
216
94
|
}
|
217
95
|
},
|
218
|
-
"
|
96
|
+
"context": {
|
97
|
+
"type": "string"
|
98
|
+
}
|
99
|
+
},
|
100
|
+
"required": [
|
101
|
+
"type",
|
102
|
+
"name"
|
103
|
+
],
|
104
|
+
"additionalProperties": false
|
105
|
+
},
|
106
|
+
"DividerSideMeta": {
|
107
|
+
"type": "object",
|
108
|
+
"properties": {
|
109
|
+
"type": {
|
219
110
|
"type": "string",
|
220
|
-
"
|
221
|
-
|
222
|
-
|
223
|
-
|
111
|
+
"const": "divider"
|
112
|
+
},
|
113
|
+
"dashed": {
|
114
|
+
"type": "boolean"
|
224
115
|
}
|
225
116
|
},
|
226
117
|
"required": [
|
227
|
-
"
|
118
|
+
"type"
|
228
119
|
],
|
229
120
|
"additionalProperties": false
|
230
121
|
},
|
231
|
-
"
|
122
|
+
"SectionHeaderMeta": {
|
232
123
|
"type": "object",
|
233
124
|
"properties": {
|
234
|
-
"
|
125
|
+
"type": {
|
126
|
+
"type": "string",
|
127
|
+
"const": "section-header"
|
128
|
+
},
|
129
|
+
"label": {
|
235
130
|
"type": "string"
|
236
131
|
},
|
237
|
-
"
|
132
|
+
"tag": {
|
238
133
|
"type": "string"
|
134
|
+
}
|
135
|
+
},
|
136
|
+
"required": [
|
137
|
+
"type",
|
138
|
+
"label"
|
139
|
+
],
|
140
|
+
"additionalProperties": false
|
141
|
+
},
|
142
|
+
"CustomLinkMeta": {
|
143
|
+
"type": "object",
|
144
|
+
"properties": {
|
145
|
+
"type": {
|
146
|
+
"type": "string",
|
147
|
+
"const": "custom-link"
|
239
148
|
},
|
240
|
-
"
|
241
|
-
"type": "
|
242
|
-
"items": {
|
243
|
-
"$ref": "#/definitions/NavItemWithLink"
|
244
|
-
}
|
149
|
+
"label": {
|
150
|
+
"type": "string"
|
245
151
|
},
|
246
|
-
"
|
152
|
+
"link": {
|
247
153
|
"type": "string"
|
248
154
|
},
|
249
|
-
"
|
155
|
+
"context": {
|
250
156
|
"type": "string"
|
251
157
|
},
|
252
|
-
"
|
253
|
-
"type": "string"
|
254
|
-
"enum": [
|
255
|
-
"left",
|
256
|
-
"right"
|
257
|
-
]
|
158
|
+
"tag": {
|
159
|
+
"type": "string"
|
258
160
|
}
|
259
161
|
},
|
260
162
|
"required": [
|
261
|
-
"
|
262
|
-
"
|
263
|
-
"
|
163
|
+
"type",
|
164
|
+
"label",
|
165
|
+
"link"
|
264
166
|
],
|
265
167
|
"additionalProperties": false
|
266
168
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "rspress",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.17",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/web-infra-dev/rspress.git",
|
@@ -41,16 +41,16 @@
|
|
41
41
|
"meta-json-schema.json"
|
42
42
|
],
|
43
43
|
"dependencies": {
|
44
|
-
"@rsbuild/core": "~1.
|
44
|
+
"@rsbuild/core": "~1.4.0-rc.0",
|
45
45
|
"cac": "^6.7.14",
|
46
46
|
"chokidar": "^3.6.0",
|
47
47
|
"picocolors": "^1.1.1",
|
48
|
-
"@rspress/core": "2.0.0-beta.
|
49
|
-
"@rspress/shared": "2.0.0-beta.
|
48
|
+
"@rspress/core": "2.0.0-beta.17",
|
49
|
+
"@rspress/shared": "2.0.0-beta.17"
|
50
50
|
},
|
51
51
|
"devDependencies": {
|
52
52
|
"@microsoft/api-extractor": "^7.52.8",
|
53
|
-
"@rslib/core": "0.10.
|
53
|
+
"@rslib/core": "0.10.2",
|
54
54
|
"@types/jest": "~29.5.14",
|
55
55
|
"@types/node": "^22.8.1",
|
56
56
|
"@types/react": "^19.1.8",
|