@alauda/doom 1.20.5 → 1.21.1
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/lib/cli/load-config.js +19 -10
- package/package.json +6 -7
- package/styles/global.scss +1 -1
package/lib/cli/load-config.js
CHANGED
|
@@ -216,7 +216,7 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
|
|
|
216
216
|
return mergeConfig(rspackConfig, {
|
|
217
217
|
ignoreWarnings: [
|
|
218
218
|
{
|
|
219
|
-
module: /\
|
|
219
|
+
module: /\b(flexsearch|vscode-languageserver-types)\b/,
|
|
220
220
|
},
|
|
221
221
|
],
|
|
222
222
|
resolve: {
|
|
@@ -323,18 +323,27 @@ export async function loadConfig(root, { config: configFile, base, prefix, v: ve
|
|
|
323
323
|
lang,
|
|
324
324
|
});
|
|
325
325
|
base = commonConfig.base;
|
|
326
|
+
lang = commonConfig.lang;
|
|
327
|
+
root = commonConfig.root;
|
|
326
328
|
const mergedConfig = mergeRsbuildConfig(commonConfig, config, {
|
|
327
329
|
base,
|
|
328
|
-
lang
|
|
329
|
-
root
|
|
330
|
+
lang,
|
|
331
|
+
root,
|
|
332
|
+
});
|
|
333
|
+
const hasLocales = !!commonConfig.themeConfig.locales?.length;
|
|
334
|
+
const apiEntries = await glob(`${hasLocales ? commonConfig.lang + '/' : ''}apis/{advanced_apis,crds,kubernetes_apis}/*/index.{md,mdx}`, { cwd: root });
|
|
335
|
+
const apiExports = apiEntries.map((entry) => {
|
|
336
|
+
const scope = entry.replace(/index\.mdx?$/, '');
|
|
337
|
+
return {
|
|
338
|
+
name: path.basename(path.dirname(entry)) + '_apis',
|
|
339
|
+
scope: hasLocales ? scope.replace(lang, '*') : scope,
|
|
340
|
+
};
|
|
330
341
|
});
|
|
331
|
-
mergedConfig.export =
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
flattenScope: (await glob(item.scope, { cwd: commonConfig.root })).filter(isDoc),
|
|
337
|
-
}))));
|
|
342
|
+
mergedConfig.export = await Promise.all([...(config.export ?? []), ...apiExports].map(async (item) => ({
|
|
343
|
+
...item,
|
|
344
|
+
scope: Array.isArray(item.scope) ? item.scope : [item.scope],
|
|
345
|
+
flattenScope: (await glob(item.scope, { cwd: root })).filter(isDoc),
|
|
346
|
+
})));
|
|
338
347
|
if (base && prefix) {
|
|
339
348
|
mergedConfig.base = (mergedConfig.prefix = normalizeSlash(prefix)) + base;
|
|
340
349
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": {
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"@rsbuild/plugin-sass": "^1.5.0",
|
|
50
50
|
"@rsbuild/plugin-svgr": "^1.3.0",
|
|
51
51
|
"@rsbuild/plugin-yaml": "^1.0.4",
|
|
52
|
-
"@rspress/core": "2.0.
|
|
53
|
-
"@rspress/plugin-algolia": "2.0.
|
|
54
|
-
"@rspress/plugin-sitemap": "2.0.
|
|
55
|
-
"@rspress/shared": "2.0.
|
|
52
|
+
"@rspress/core": "2.0.5",
|
|
53
|
+
"@rspress/plugin-algolia": "2.0.5",
|
|
54
|
+
"@rspress/plugin-sitemap": "2.0.5",
|
|
55
|
+
"@rspress/shared": "2.0.5",
|
|
56
56
|
"@shikijs/transformers": "^4.0.1",
|
|
57
57
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
58
58
|
"@types/react": "^19.2.14",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"chokidar": "^5.0.0",
|
|
61
61
|
"clsx": "^2.1.1",
|
|
62
62
|
"commander": "^14.0.3",
|
|
63
|
-
"ejs": "^
|
|
63
|
+
"ejs": "^5.0.0",
|
|
64
64
|
"es-toolkit": "^1.45.0",
|
|
65
65
|
"eslint": "^9.39.3",
|
|
66
66
|
"eslint-plugin-mdx": "^3.7.0",
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
"remark-mdx": "^3.1.1",
|
|
96
96
|
"remark-message-control": "^8.0.0",
|
|
97
97
|
"remark-stringify": "^11.0.0",
|
|
98
|
-
"shiki": "^4.0.1",
|
|
99
98
|
"simple-git": "^3.32.3",
|
|
100
99
|
"string-width": "^8.2.0",
|
|
101
100
|
"swagger2openapi": "^7.0.8",
|