rspress 2.0.0-beta.4 → 2.0.0-beta.6
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 +268 -0
- package/package.json +9 -7
package/dist/index.js
CHANGED
@@ -8,7 +8,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE__rspress_shared_constants_70084e62__ from "@rspress/shared/constants";
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__ from "node:child_process";
|
10
10
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__ from "node:fs/promises";
|
11
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
11
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.6"}');
|
12
12
|
const findConfig = (basePath)=>__WEBPACK_EXTERNAL_MODULE__rspress_shared_constants_70084e62__.DEFAULT_CONFIG_EXTENSIONS.map((ext)=>basePath + ext).find(__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync);
|
13
13
|
async function loadConfigFile(customConfigFile) {
|
14
14
|
const baseDir = process.cwd();
|
@@ -0,0 +1,268 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
+
"$ref": "#/definitions/MetaJson",
|
4
|
+
"definitions": {
|
5
|
+
"MetaJson": {
|
6
|
+
"anyOf": [
|
7
|
+
{
|
8
|
+
"type": "array",
|
9
|
+
"items": {
|
10
|
+
"$ref": "#/definitions/SideMetaItem"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"type": "array",
|
15
|
+
"items": {
|
16
|
+
"$ref": "#/definitions/NavItem"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
]
|
20
|
+
},
|
21
|
+
"SideMetaItem": {
|
22
|
+
"anyOf": [
|
23
|
+
{
|
24
|
+
"type": "object",
|
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
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"type": "object",
|
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
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"type": "object",
|
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
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"type": "object",
|
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
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"type": "object",
|
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
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"type": "string"
|
158
|
+
}
|
159
|
+
]
|
160
|
+
},
|
161
|
+
"NavItem": {
|
162
|
+
"anyOf": [
|
163
|
+
{
|
164
|
+
"$ref": "#/definitions/NavItemWithLink"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"$ref": "#/definitions/NavItemWithChildren"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"$ref": "#/definitions/NavItemWithLinkAndChildren"
|
171
|
+
}
|
172
|
+
]
|
173
|
+
},
|
174
|
+
"NavItemWithLink": {
|
175
|
+
"type": "object",
|
176
|
+
"properties": {
|
177
|
+
"text": {
|
178
|
+
"type": "string"
|
179
|
+
},
|
180
|
+
"link": {
|
181
|
+
"type": "string"
|
182
|
+
},
|
183
|
+
"tag": {
|
184
|
+
"type": "string"
|
185
|
+
},
|
186
|
+
"activeMatch": {
|
187
|
+
"type": "string"
|
188
|
+
},
|
189
|
+
"position": {
|
190
|
+
"type": "string",
|
191
|
+
"enum": [
|
192
|
+
"left",
|
193
|
+
"right"
|
194
|
+
]
|
195
|
+
}
|
196
|
+
},
|
197
|
+
"required": [
|
198
|
+
"text",
|
199
|
+
"link"
|
200
|
+
],
|
201
|
+
"additionalProperties": false
|
202
|
+
},
|
203
|
+
"NavItemWithChildren": {
|
204
|
+
"type": "object",
|
205
|
+
"properties": {
|
206
|
+
"text": {
|
207
|
+
"type": "string"
|
208
|
+
},
|
209
|
+
"tag": {
|
210
|
+
"type": "string"
|
211
|
+
},
|
212
|
+
"items": {
|
213
|
+
"type": "array",
|
214
|
+
"items": {
|
215
|
+
"$ref": "#/definitions/NavItemWithLink"
|
216
|
+
}
|
217
|
+
},
|
218
|
+
"position": {
|
219
|
+
"type": "string",
|
220
|
+
"enum": [
|
221
|
+
"left",
|
222
|
+
"right"
|
223
|
+
]
|
224
|
+
}
|
225
|
+
},
|
226
|
+
"required": [
|
227
|
+
"items"
|
228
|
+
],
|
229
|
+
"additionalProperties": false
|
230
|
+
},
|
231
|
+
"NavItemWithLinkAndChildren": {
|
232
|
+
"type": "object",
|
233
|
+
"properties": {
|
234
|
+
"text": {
|
235
|
+
"type": "string"
|
236
|
+
},
|
237
|
+
"link": {
|
238
|
+
"type": "string"
|
239
|
+
},
|
240
|
+
"items": {
|
241
|
+
"type": "array",
|
242
|
+
"items": {
|
243
|
+
"$ref": "#/definitions/NavItemWithLink"
|
244
|
+
}
|
245
|
+
},
|
246
|
+
"tag": {
|
247
|
+
"type": "string"
|
248
|
+
},
|
249
|
+
"activeMatch": {
|
250
|
+
"type": "string"
|
251
|
+
},
|
252
|
+
"position": {
|
253
|
+
"type": "string",
|
254
|
+
"enum": [
|
255
|
+
"left",
|
256
|
+
"right"
|
257
|
+
]
|
258
|
+
}
|
259
|
+
},
|
260
|
+
"required": [
|
261
|
+
"text",
|
262
|
+
"link",
|
263
|
+
"items"
|
264
|
+
],
|
265
|
+
"additionalProperties": false
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
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.6",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/web-infra-dev/rspress.git",
|
@@ -33,24 +33,26 @@
|
|
33
33
|
"dist",
|
34
34
|
"runtime.ts",
|
35
35
|
"theme.ts",
|
36
|
-
"config.ts"
|
36
|
+
"config.ts",
|
37
|
+
"meta-json-schema.json"
|
37
38
|
],
|
38
39
|
"dependencies": {
|
39
|
-
"@rsbuild/core": "1.3.
|
40
|
+
"@rsbuild/core": "~1.3.18",
|
40
41
|
"cac": "^6.7.14",
|
41
42
|
"chokidar": "^3.6.0",
|
42
43
|
"picocolors": "^1.1.1",
|
43
|
-
"@rspress/
|
44
|
-
"@rspress/
|
44
|
+
"@rspress/shared": "2.0.0-beta.6",
|
45
|
+
"@rspress/core": "2.0.0-beta.6"
|
45
46
|
},
|
46
47
|
"devDependencies": {
|
47
48
|
"@microsoft/api-extractor": "^7.52.7",
|
48
|
-
"@rslib/core": "0.6.
|
49
|
+
"@rslib/core": "0.6.9",
|
49
50
|
"@types/jest": "~29.5.14",
|
50
51
|
"@types/node": "^18.11.17",
|
51
52
|
"@types/react": "^18.3.21",
|
52
53
|
"rimraf": "^6.0.1",
|
53
|
-
"rsbuild-plugin-publint": "^0.3.
|
54
|
+
"rsbuild-plugin-publint": "^0.3.2",
|
55
|
+
"ts-json-schema-generator": "^2.4.0",
|
54
56
|
"typescript": "^5.8.2"
|
55
57
|
},
|
56
58
|
"publishConfig": {
|