@alauda/doom 1.0.3 → 1.1.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/global.d.ts +15 -0
- package/lib/cli/load-config.js +8 -1
- package/lib/global/VersionsNav/index.js +3 -3
- package/package.json +6 -3
package/global.d.ts
CHANGED
|
@@ -2,3 +2,18 @@
|
|
|
2
2
|
/// <reference types="@alauda/doom/types" />
|
|
3
3
|
|
|
4
4
|
type MDXProvidedComponents = typeof import('@alauda/doom/runtime')
|
|
5
|
+
|
|
6
|
+
declare module '*.module.scss' {
|
|
7
|
+
const classes: { [key: string]: string }
|
|
8
|
+
export default classes
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module '*.svg' {
|
|
12
|
+
const content: string
|
|
13
|
+
export default content
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module '*.svg?react' {
|
|
17
|
+
const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
|
|
18
|
+
export default ReactComponent
|
|
19
|
+
}
|
package/lib/cli/load-config.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import { pluginReact } from '@rsbuild/plugin-react';
|
|
3
4
|
import { pluginSass } from '@rsbuild/plugin-sass';
|
|
5
|
+
import { pluginSvgr } from '@rsbuild/plugin-svgr';
|
|
4
6
|
import { pluginYaml } from '@rsbuild/plugin-yaml';
|
|
5
7
|
import { addLeadingSlash, addTrailingSlash, normalizeSlash, removeLeadingSlash, } from '@rspress/core';
|
|
6
8
|
import { pluginAlgolia } from '@rspress/plugin-algolia';
|
|
@@ -200,7 +202,12 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
|
|
|
200
202
|
dev: {
|
|
201
203
|
lazyCompilation: lazy,
|
|
202
204
|
},
|
|
203
|
-
plugins: [pluginSass(), pluginYaml()],
|
|
205
|
+
plugins: [pluginReact(), pluginSass(), pluginSvgr(), pluginYaml()],
|
|
206
|
+
resolve: {
|
|
207
|
+
alias: {
|
|
208
|
+
classnames$: 'clsx',
|
|
209
|
+
},
|
|
210
|
+
},
|
|
204
211
|
server: {
|
|
205
212
|
open,
|
|
206
213
|
},
|
|
@@ -20,9 +20,9 @@ const LEGACY_NAV_ITEMS = LEGACY_VERSIONS.map((v) => ({
|
|
|
20
20
|
text: v,
|
|
21
21
|
link: `https://docs.alauda.io/document/release-notes?version=${v}`,
|
|
22
22
|
}));
|
|
23
|
-
const
|
|
23
|
+
const ALLOWED_LEGACY_DOMAINS = new Set(['docs.alauda.cn', 'docs.alauda.io']);
|
|
24
24
|
if (!isProduction()) {
|
|
25
|
-
|
|
25
|
+
ALLOWED_LEGACY_DOMAINS.add('localhost');
|
|
26
26
|
}
|
|
27
27
|
const VersionsNav_ = () => {
|
|
28
28
|
const { siteData } = usePageData();
|
|
@@ -99,7 +99,7 @@ const VersionsNav_ = () => {
|
|
|
99
99
|
? { text: v, items: [] }
|
|
100
100
|
: { text: v, link: `${versionsBase}/${v}/`, activeMatch: v });
|
|
101
101
|
if (versionsBase != null &&
|
|
102
|
-
|
|
102
|
+
ALLOWED_LEGACY_DOMAINS.has(location.hostname) &&
|
|
103
103
|
virtual.userBase === ACP_BASE) {
|
|
104
104
|
versionItems.push(...LEGACY_NAV_ITEMS);
|
|
105
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": "git+https://github.com/alauda/doom.git",
|
|
@@ -35,22 +35,25 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@cspell/eslint-plugin": "^8.19.4 || ^9.0.2",
|
|
38
|
-
"@eslint-react/eslint-plugin": "^1.51.
|
|
38
|
+
"@eslint-react/eslint-plugin": "^1.51.2",
|
|
39
39
|
"@inquirer/prompts": "^7.5.3",
|
|
40
40
|
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
|
|
41
41
|
"@playwright/browser-chromium": "^1.52.0",
|
|
42
|
+
"@rsbuild/plugin-react": "^1.3.2",
|
|
42
43
|
"@rsbuild/plugin-sass": "^1.3.2",
|
|
44
|
+
"@rsbuild/plugin-svgr": "^1.2.0",
|
|
43
45
|
"@rsbuild/plugin-yaml": "^1.0.2",
|
|
44
46
|
"@rspress/core": "2.0.0-beta.11",
|
|
45
47
|
"@rspress/plugin-algolia": "2.0.0-beta.11",
|
|
46
48
|
"@rspress/plugin-llms": "^2.0.0-beta.11",
|
|
47
49
|
"@shikijs/transformers": "^3.6.0",
|
|
50
|
+
"@total-typescript/ts-reset": "^0.6.1",
|
|
48
51
|
"chokidar": "^4.0.3",
|
|
49
52
|
"cli-progress": "^3.12.0",
|
|
50
53
|
"clsx": "^2.1.1",
|
|
51
54
|
"commander": "^13.1.0 || ^14.0.0",
|
|
52
55
|
"ejs": "^3.1.10",
|
|
53
|
-
"es-toolkit": "^1.39.
|
|
56
|
+
"es-toolkit": "^1.39.3",
|
|
54
57
|
"eslint": "^9.28.0",
|
|
55
58
|
"eslint-plugin-mdx": "^3.4.2",
|
|
56
59
|
"html-tag-names": "^2.1.0",
|