@chatbi-v/cli 2.0.4 → 2.0.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 +955 -775
- package/package.json +7 -7
- package/templates/app/package.json.hbs +3 -2
- package/templates/app/src/features/settings/PluginList.tsx.hbs +7 -1
- package/templates/plugin/package.json.hbs +3 -3
- package/templates/sandbox/.npmrc.hbs +2 -0
- package/templates/sandbox/package.json.hbs +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatbi-v/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Standardized CLI tooling for ChatBI Monorepo",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup",
|
|
22
|
+
"dev": "tsup --watch",
|
|
23
|
+
"test": "vitest"
|
|
24
|
+
},
|
|
20
25
|
"dependencies": {
|
|
21
26
|
"boxen": "^8.0.1",
|
|
22
27
|
"cac": "^6.7.14",
|
|
@@ -44,10 +49,5 @@
|
|
|
44
49
|
"@vitest/coverage-v8": "1.6.1",
|
|
45
50
|
"tsup": "^8.5.1",
|
|
46
51
|
"vitest": "^1.0.0"
|
|
47
|
-
},
|
|
48
|
-
"scripts": {
|
|
49
|
-
"build": "tsup",
|
|
50
|
-
"dev": "tsup --watch",
|
|
51
|
-
"test": "vitest"
|
|
52
52
|
}
|
|
53
|
-
}
|
|
53
|
+
}
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@ant-design/icons": "^5.2.6",
|
|
14
14
|
"@ant-design/x": "^2.1.1",
|
|
15
|
-
"@chatbi-v/core": "2.0.
|
|
16
|
-
"@chatbi-v/mocks": "2.0.
|
|
15
|
+
"@chatbi-v/core": "^2.0.5",
|
|
16
|
+
"@chatbi-v/mocks": "^2.0.5",
|
|
17
|
+
"@chatbi-v/cli": "^2.0.5",
|
|
17
18
|
"@chatbi-v/plugin-theme-manager": "2.0.4",
|
|
18
19
|
"@chatbi-v/plugin-layout-transform": "2.0.4",
|
|
19
20
|
"@chatbi-v/plugin-system-monitor": "2.0.4",
|
|
@@ -20,6 +20,7 @@ export const PluginList: React.FC<PluginListProps> = ({
|
|
|
20
20
|
const renderPluginItem = useCallback((plugin: Plugin) => {
|
|
21
21
|
const state = pluginManager.getPluginState(plugin.id);
|
|
22
22
|
const hasSettings = pluginManager.getUnifiedCapabilities(plugin.id).configurable;
|
|
23
|
+
const error = pluginManager.getPluginError(plugin.id);
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
26
|
<div
|
|
@@ -27,7 +28,7 @@ export const PluginList: React.FC<PluginListProps> = ({
|
|
|
27
28
|
className="rounded-lg px-4 py-3 shadow-sm flex items-center justify-between border transition-colors duration-200"
|
|
28
29
|
style={{
|
|
29
30
|
backgroundColor: 'rgb(var(--color-surface))',
|
|
30
|
-
borderColor: 'rgb(var(--color-border))',
|
|
31
|
+
borderColor: error ? '#ff4d4f' : 'rgb(var(--color-border))',
|
|
31
32
|
}}
|
|
32
33
|
>
|
|
33
34
|
<div className="flex-1">
|
|
@@ -39,6 +40,11 @@ export const PluginList: React.FC<PluginListProps> = ({
|
|
|
39
40
|
{plugin.metadata.name}
|
|
40
41
|
</span>
|
|
41
42
|
<Tag color={plugin.metadata.type === 'business' ? 'blue' : 'green'}>{plugin.metadata.type}</Tag>
|
|
43
|
+
{error && (
|
|
44
|
+
<Tooltip title={`插件加载或运行出错: ${error.message}`}>
|
|
45
|
+
<Tag color="error">运行时错误</Tag>
|
|
46
|
+
</Tooltip>
|
|
47
|
+
)}
|
|
42
48
|
</div>
|
|
43
49
|
<div>
|
|
44
50
|
<div className="text-xs mb-1 font-mono" style={{ color: 'rgb(var(--color-text-muted))' }}>{plugin.id}</div>
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"plugin": true,
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@chatbi-v/core": "^2.0.
|
|
24
|
+
"@chatbi-v/core": "^2.0.5",
|
|
25
25
|
"antd": "^5.20.0",
|
|
26
26
|
"react": ">=18.0.0",
|
|
27
27
|
"react-dom": ">=18.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@chatbi-v/core": "^2.0.
|
|
31
|
-
"@chatbi-v/tsconfig": "^2.0.
|
|
30
|
+
"@chatbi-v/core": "^2.0.5",
|
|
31
|
+
"@chatbi-v/tsconfig": "^2.0.5",
|
|
32
32
|
"tsup": "^8.5.1",
|
|
33
33
|
"vite": "^5.0.0"
|
|
34
34
|
}
|